diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-12-04 18:20:25 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-12-04 18:20:25 +0100 |
commit | ba0991afac893f64458ec7e548ffc8946508dda0 (patch) | |
tree | ae61d09d2735712a8e41ed0399609cc4546f6acb | |
parent | 51a0d654120adbed513ca4eb0743313eaa97551e (diff) | |
download | hammer-of-the-scots-ba0991afac893f64458ec7e548ffc8946508dda0.tar.gz |
Remove blocks from reserve list when the battle ends.
In case a defection battle ends early, if there are blocks still in
reserve they would not be able to move properly during the normal turn.
-rw-r--r-- | rules.js | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -482,6 +482,8 @@ function can_block_move_to(who, from, to) { } function can_block_move(who) { + if (!is_on_map(who)) + return false if (who === B_NORSE) return false if (block_owner(who) === game.active && !set_has(game.moved, who)) { @@ -1667,6 +1669,8 @@ function start_battle(where, reason) { function end_battle() { print_retreat_summary() + bring_on_reserves() + game.flash = "" game.battle_round = 0 reset_border_limits() |