From ba0991afac893f64458ec7e548ffc8946508dda0 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 4 Dec 2022 18:20:25 +0100 Subject: 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. --- rules.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 3832b57..c11d22a 100644 --- a/rules.js +++ b/rules.js @@ -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() -- cgit v1.2.3