attack assault paradrop: Don't disclose defender's retreats
When an attacking land unit fails its morale check and retreats, the retreat message needs to be prefixed with a newline to separate it from the casualty characters. However, the code also prints the newline when a defending land unit retreats, leaking the retreat to the attacker. For instance, a fight that forces three defending to retreat could look like this: !!!!!!!!!!!!!!!!!! !@!!!!!!!!!!!!!@! ! - Casualties - Yours: 2 Theirs: 34 Messed up in Empire 3. Fix by printing the newline only when an attacking land unit retreats. The example becomes: !!!!!!!!!!!!!!!!!!!@!!!!!!!!!!!!!@!! - Casualties - Yours: 2 Theirs: 34 Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
3a1f240dc4
commit
44d4a1c7ff
1 changed files with 2 additions and 1 deletions
|
@ -213,7 +213,8 @@ lnd_take_casualty(int combat_mode, struct ulist *llp, int cas)
|
||||||
|
|
||||||
ret_chance = llp->unit.land.lnd_retreat - llp->unit.land.lnd_effic;
|
ret_chance = llp->unit.land.lnd_retreat - llp->unit.land.lnd_effic;
|
||||||
if (pct_chance(ret_chance)) {
|
if (pct_chance(ret_chance)) {
|
||||||
pr("\n");
|
if (llp->unit.land.lnd_own == player->cnum)
|
||||||
|
pr("\n");
|
||||||
lnd_print(llp->unit.land.lnd_own, llp, "fails morale check!");
|
lnd_print(llp->unit.land.lnd_own, llp, "fails morale check!");
|
||||||
llp->unit.land.lnd_mission = 0;
|
llp->unit.land.lnd_mission = 0;
|
||||||
llp->unit.land.lnd_harden = 0;
|
llp->unit.land.lnd_harden = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue