From 5e378e0461d54fe54315acc02bdadf02a88d4ca8 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 26 Aug 2024 10:54:09 +0200 Subject: fix stupid typo in retreat from fortified port --- rules.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rules.js b/rules.js index 043bd39..0f44ca3 100644 --- a/rules.js +++ b/rules.js @@ -3056,9 +3056,9 @@ function is_general_without_cu(s) { return has_british_general(s) && !has_british_cu(s) } -function is_not_fortified_port_without_british_cu(s) { +function is_not_fortified_port_without_british_pc(s) { if (is_fortified_port(s)) - return has_british_cu(s) + return has_british_pc(s) return true } @@ -3080,8 +3080,8 @@ function gen_defender_retreat() { } if (game.active === P_BRITAIN) { - if (is_non_blockaded_port(here) && is_not_fortified_port_without_british_cu(here)) { - for (let to of all_spaces) { + if (is_non_blockaded_port(here) && is_not_fortified_port_without_british_pc(here)) { + for (let to of all_port_spaces) { if (to !== game.move.from && is_non_blockaded_port(to)) { if (!has_american_pc(to) && !has_american_or_french_cu(to)) { gen_action_space(to) -- cgit v1.2.3