From b9c65696a4fe0046995fa1d643126dedebed786d Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 22 Sep 2022 00:32:39 +0200 Subject: Don't allow naval retreats to ports with enemy fleets. --- rules.js | 4 ++-- 1 file 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'); }, -- cgit v1.2.3