summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-09-16 16:26:18 +0200
committerTor Andersson <tor@ccxvii.net>2023-02-18 12:42:59 +0100
commit4607d2ee265b0ff7f3aa737b77bf726f28d8da9f (patch)
tree9bd24997f20b76234b72cd99e9f6ed5f2ade8ab5
parent430467b2f67b2ff0917b329da7d3f6214bf224bb (diff)
download300-earth-and-water-4607d2ee265b0ff7f3aa737b77bf726f28d8da9f.tar.gz
Don't allow placing fleets in ports with enemy fleets with Syracuse card.
-rw-r--r--rules.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index b340c95..b7b2025 100644
--- a/rules.js
+++ b/rules.js
@@ -2747,7 +2747,11 @@ function play_triremes() {
}
function can_play_support_from_syracuse() {
- return count_greek_fleets(RESERVE) > 0;
+ if (count_greek_fleets(RESERVE) > 0)
+ for (let port of PORTS)
+ if (is_greek_control(port) && count_persian_fleets(port) === 0)
+ return true
+ return false
}
function play_support_from_syracuse() {
@@ -2761,7 +2765,7 @@ states.support_from_syracuse = {
view.prompt = "Support from Syracuse: Place all Greek fleets from your reserve.";
if (count_greek_fleets(RESERVE) > 0) {
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);
} else {
gen_action(view, 'next');