summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-09-22 00:32:39 +0200
committerTor Andersson <tor@ccxvii.net>2023-02-18 12:42:59 +0100
commitb9c65696a4fe0046995fa1d643126dedebed786d (patch)
tree08c4468f17bf1f9f568f0e77ddb72ff56b2a3174
parent4607d2ee265b0ff7f3aa737b77bf726f28d8da9f (diff)
download300-earth-and-water-b9c65696a4fe0046995fa1d643126dedebed786d.tar.gz
Don't allow naval retreats to ports with enemy fleets.
-rw-r--r--rules.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index b7b2025..b8319aa 100644
--- a/rules.js
+++ b/rules.js
@@ -1607,7 +1607,7 @@ states.persian_naval_retreat_defender = {
gen_action(view, 'port', game.where); // shortcut for battle
if (game.greek.event !== THEMISTOCLES)
for (let port of PORTS)
- if (is_greek_control(port))
+ if (is_greek_control(port) && count_persian_fleets(port) === 0)
gen_action(view, 'port', port);
gen_action(view, 'battle');
},
@@ -1635,7 +1635,7 @@ states.greek_naval_retreat_defender = {
gen_action(view, 'port', game.where); // shortcut for battle
if (game.greek.event !== THEMISTOCLES)
for (let port of PORTS)
- if (is_persian_control(port))
+ if (is_persian_control(port) && count_greek_fleets(port) === 0)
gen_action(view, 'port', port);
gen_action(view, 'battle');
},