diff options
-rw-r--r-- | rules.js | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,6 +1,6 @@ "use strict" -// TODO: "danger_space" action for moving into interception/battle +// TODO: don't allow activating force in Halifax/captured Louisbourg without a 3-value card (nothing to do but sail) // WONTFIX // TODO: select leader for defense instead of automatically picking the best @@ -3107,7 +3107,7 @@ function can_infiltrate_search(type, used, carry, from, to) { } // Continue looking. - if (used < max_movement_cost(type)) { + if (used + 1 < max_movement_cost(type)) { for (let next of spaces[to].exits) { if (can_infiltrate_search(type, used + 1, carry, to, next)) return true @@ -3186,6 +3186,8 @@ function apply_move(to) { let who = moving_piece() let from = moving_piece_space() + let maybe_infiltrated = is_lone_auxiliary(who) && can_infiltrate(from, to) + if (game.move.type === 'naval') game.move.used = 9 else @@ -3236,21 +3238,21 @@ function apply_move(to) { game.move.infiltrated = 0 if (has_enemy_stockade(to)) { - if (is_lone_auxiliary(who) && can_infiltrate(from, to)) + if (maybe_infiltrated) game.move.infiltrated = 1 else stop_move() } if (has_unbesieged_enemy_fort_or_fortress(to)) { - if (is_lone_auxiliary(who) && can_infiltrate(from, to)) + if (maybe_infiltrated) game.move.infiltrated = 1 else stop_move() } if (has_unbesieged_enemy_units(to)) { - if (is_lone_auxiliary(who) && can_infiltrate(from, to)) + if (maybe_infiltrated) game.move.infiltrated = 1 } |