diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-05-02 16:30:13 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 11:54:52 +0100 |
commit | 640d10a281b619a34758232d1ea16df0c87e5bce (patch) | |
tree | 0d8c66495888fc15f87978606df1c676ef03f63a /rules.js | |
parent | 61aeacc64402baf97dfefcee7e430433d8ada797 (diff) | |
download | wilderness-war-640d10a281b619a34758232d1ea16df0c87e5bce.tar.gz |
Set up retreat state for retreat_attacker even when no units survived.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -5166,10 +5166,12 @@ function determine_winner_battle() { if (victor === game.battle.attacker) { goto_raid_events(); } else { - if (game.battle.atk_pcs.length > 0) + if (game.battle.atk_pcs.length > 0) { + retreat_attacker(game.raid.where, game.raid.from[game.raid.where] | 0); + } else { retreat_attacker(game.raid.where, game.raid.from[game.raid.where] | 0); - else end_retreat_attacker(game.raid.from[game.raid.where]); + } } return; } @@ -5205,6 +5207,7 @@ function determine_winner_battle() { unstack_force(moving_piece()); retreat_attacker(game.battle.where, moving_piece_came_from()); } else { + retreat_attacker(game.battle.where, moving_piece_came_from()); end_retreat_attacker(moving_piece_came_from()); } } |