diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-06-17 17:59:33 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-06-17 17:59:33 +0200 |
commit | 7a99a95a616a73073982e2432b49f57c23135859 (patch) | |
tree | c19cd977afb93c1eeb4f562819eeb1ba9abc8319 | |
parent | 1e6018b24492836e45876fb74955c85f0576a088 (diff) | |
download | wilderness-war-7a99a95a616a73073982e2432b49f57c23135859.tar.gz |
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.
-rw-r--r-- | rules.js | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |