summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-08-26 10:54:09 +0200
committerTor Andersson <tor@ccxvii.net>2024-08-26 10:54:09 +0200
commit5e378e0461d54fe54315acc02bdadf02a88d4ca8 (patch)
treec25c4f8be8e4ee879ac175c78e02d2732ead7d40
parente99b858b954388598c49d60ed8e7593f9e8eba25 (diff)
downloadwashingtons-war-5e378e0461d54fe54315acc02bdadf02a88d4ca8.tar.gz
fix stupid typo in retreat from fortified port
-rw-r--r--rules.js8
1 files 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)