summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-10-06 15:53:50 +0200
committerTor Andersson <tor@ccxvii.net>2023-12-10 18:16:55 +0100
commitf7d581832b249e0413446e73c8acb15267895443 (patch)
tree31a6f9d1bce034c07dc424547d8ddbe5ae249d33
parent9855815fe110cdc9b207dd8f9f25c82f67836f70 (diff)
downloadplantagenet-f7d581832b249e0413446e73c8acb15267895443.tar.gz
fix block nesting error in can_action_sail
-rw-r--r--rules.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/rules.js b/rules.js
index 6ab5480..46b4441 100644
--- a/rules.js
+++ b/rules.js
@@ -4425,11 +4425,12 @@ function can_action_sail() {
return false
// and a valid destination
- for (let to of data.seaports)
+ for (let to of data.seaports) {
if (to !== here && !has_enemy_lord(to))
return true
- if (has_enemy_lord(to) && lord_has_capability(game.command, AOW_LANCASTER_HIGH_ADMIRAL))
- return true
+ if (has_enemy_lord(to) && lord_has_capability(game.command, AOW_LANCASTER_HIGH_ADMIRAL))
+ return true
+ }
return false
}