retreat lretreat: Deprecate pseudo-condition 'c'

It's redundant; retreat path 'h' cancels orders just fine.  Document
that instead.  'c' still works, and I don't plan to break it as long
as it doesn't get in the way, which seems unlikely.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2015-01-10 14:16:00 +01:00
parent 482d54c953
commit 148af51ab3
4 changed files with 13 additions and 8 deletions

View file

@ -4,12 +4,16 @@
.SY "lretreat <UNIT/ARMY> <PATH> <CONDITIONS>" .SY "lretreat <UNIT/ARMY> <PATH> <CONDITIONS>"
.SY "lretreat <UNIT/ARMY> q" .SY "lretreat <UNIT/ARMY> q"
The lretreat command allows you to examine or modify the retreat The lretreat command allows you to examine or modify the retreat
paths and conditions of your land units. orders of your land units.
.s1 .s1
The first argument selects land units to view or give orders for. The first argument selects land units to view or give orders for.
If an army designation is given when specifying orders, the orders If an army designation is given when specifying orders, the orders
apply to all members of that army. apply to all members of that army.
.s1 .s1
Retreat orders consist of a retreat path and conditions.
.s1
A retreat path 'h' orders the ships not to retreat.
.s1
With 'q' instead of a retreat path, the current retreat paths and With 'q' instead of a retreat path, the current retreat paths and
conditions will be listed. conditions will be listed.
The report format contains the following fields: The report format contains the following fields:
@ -66,7 +70,6 @@ Retreat conditions are:
when it is fired upon, and no friendly when it is fired upon, and no friendly
units/sectors (including the unit itself) units/sectors (including the unit itself)
are able to fire back at the aggressor. are able to fire back at the aggressor.
c Cancel retreat order
.fi .fi
.s1 .s1
For example, if the cavalry above was fired at, it would attempt to For example, if the cavalry above was fired at, it would attempt to

View file

@ -4,12 +4,16 @@
.SY "retreat <SHIP/FLEET> <PATH> <CONDITIONS>" .SY "retreat <SHIP/FLEET> <PATH> <CONDITIONS>"
.SY "retreat <SHIP/FLEET> q" .SY "retreat <SHIP/FLEET> q"
The retreat command allows you to examine or modify the retreat The retreat command allows you to examine or modify the retreat
paths and conditions of your ships. orders of your ships
.s1 .s1
The first argument selects ships to view or give orders for. The first argument selects ships to view or give orders for.
If a fleet designation is given when specifying orders, the orders If a fleet designation is given when specifying orders, the orders
apply to all members of that fleet. apply to all members of that fleet.
.s1 .s1
Retreat orders consist of a retreat path and conditions.
.s1
A retreat path 'h' orders the ships not to retreat.
.s1
With 'q' instead of a retreat path, the current retreat paths and With 'q' instead of a retreat path, the current retreat paths and
conditions will be listed. conditions will be listed.
The report format contains the following fields: The report format contains the following fields:
@ -71,7 +75,6 @@ Retreat conditions are:
ships/sectors (including the ship itself) are ships/sectors (including the ship itself) are
able to fire back at the aggressor able to fire back at the aggressor
u Retreat upon a failed boarding attempt u Retreat upon a failed boarding attempt
c Cancel retreat order
.fi .fi
.s1 .s1
For example, if the battleship above was fired at, it would attempt to For example, if the battleship above was fired at, it would attempt to

View file

@ -114,7 +114,8 @@ retreat(int type)
} }
for (i--; i >= 0 && pq[i] == dirch[DIR_STOP]; i--) for (i--; i >= 0 && pq[i] == dirch[DIR_STOP]; i--)
pq[i] = 0; pq[i] = 0;
}
if (pq && *pq) {
again: again:
fl = getstarg(player->argp[3], fl = getstarg(player->argp[3],
"Retreat conditions ('?' to list available ones)? ", "Retreat conditions ('?' to list available ones)? ",
@ -125,6 +126,7 @@ retreat(int type)
for (i = 0; fl[i]; i++) { for (i = 0; fl[i]; i++) {
ch = tolower(fl[i]); ch = tolower(fl[i]);
if (ch == 'c') { if (ch == 'c') {
/* Deprecated, but keeping it around doesn't hurt */
*pq = 0; *pq = 0;
break; break;
} }
@ -135,7 +137,6 @@ retreat(int type)
rflagsc[j], rflagsc[j],
symbol_by_value(1 << j, retreat_flags)); symbol_by_value(1 << j, retreat_flags));
} }
pr("c\tcancel retreat order\n");
goto again; goto again;
} }
p = strchr(rflagsc, ch); p = strchr(rflagsc, ch);

View file

@ -43,7 +43,6 @@
Play#1 output Play#1 1 b retreat when bombed Play#1 output Play#1 1 b retreat when bombed
Play#1 output Play#1 1 d retreat when depth-charged Play#1 output Play#1 1 d retreat when depth-charged
Play#1 output Play#1 1 u retreat when boarded Play#1 output Play#1 1 u retreat when boarded
Play#1 output Play#1 1 c cancel retreat order
Play#1 output Play#1 4 Retreat conditions ('?' to list available ones)? Play#1 output Play#1 4 Retreat conditions ('?' to list available ones)?
Play#1 input junk Play#1 input junk
Play#1 output Play#1 1 Bad retreat condition 'j' Play#1 output Play#1 1 Bad retreat condition 'j'
@ -109,7 +108,6 @@
Play#1 output Play#1 1 i retreat when injured Play#1 output Play#1 1 i retreat when injured
Play#1 output Play#1 1 h retreat when helpless Play#1 output Play#1 1 h retreat when helpless
Play#1 output Play#1 1 b retreat when bombed Play#1 output Play#1 1 b retreat when bombed
Play#1 output Play#1 1 c cancel retreat order
Play#1 output Play#1 4 Retreat conditions ('?' to list available ones)? Play#1 output Play#1 4 Retreat conditions ('?' to list available ones)?
Play#1 input junk Play#1 input junk
Play#1 output Play#1 1 Bad retreat condition 'j' Play#1 output Play#1 1 Bad retreat condition 'j'