From 7a99a95a616a73073982e2432b49f57c23135859 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 17 Jun 2023 17:59:33 +0200 Subject: Fix bugs involving Intercept + Avoid Battle interactions. The limitation on avoiding after intercepting does not apply to leaders. Fix bug with picking up units that attempted an intercept for avoiding. --- rules.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rules.js b/rules.js index 246a587..b7de0e4 100644 --- a/rules.js +++ b/rules.js @@ -2593,7 +2593,7 @@ states.designate_force = { // pick up units for_each_friendly_unit_in_node(where, p => { - if (game.force.reason === 'avoid' && is_piece_inside(p)) + if (game.force.reason === 'avoid' && (is_piece_inside(p) || did_piece_intercept(p))) return // continue if (is_british_iroquois_or_mohawk(p)) { // 5.534 Only Johnson can command British Iroquois and Mohawk (and for free) @@ -3908,7 +3908,8 @@ function attempt_intercept() { let who = intercepting_piece() if (is_leader(who)) { for_each_piece_in_force(who, p => { - game.move.intercepted.push(p) + if (is_unit(p)) + game.move.intercepted.push(p) }) } else { game.move.intercepted.push(who) @@ -4009,7 +4010,7 @@ states.designate_inside = { function goto_avoid_battle() { let from = moving_piece_space() - if (has_unbesieged_enemy_units(from)) { + if (has_unbesieged_enemy_units_that_did_not_intercept(from)) { if (!game.move.did_attempt_intercept) { if (can_enemy_avoid_battle(from)) { game.move.avoiding = 0 -- cgit v1.2.3