summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-04-25 19:15:18 +0200
committerTor Andersson <tor@ccxvii.net>2024-04-25 19:15:18 +0200
commit3653019b7fee1c318a7d16ca53002c4e8e069c98 (patch)
treea5aa2750743521820829a8b309a0981715665f5d /rules.js
parentfebe6f5a96f1d9c05a4d7f4eef75bf6240425ec0 (diff)
downloadcrusader-rex-3653019b7fee1c318a7d16ca53002c4e8e069c98.tar.gz
Besiegers can't sea move away from besieged fortified port.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index 0b68ade..e688381 100644
--- a/rules.js
+++ b/rules.js
@@ -798,6 +798,11 @@ function can_block_sea_move_to(who, to) {
}
function can_block_sea_move_from(who, from) {
+ if (from === TYRE || from === TRIPOLI) {
+ // besieged player controls port!
+ if (is_under_siege(from) && besieged_player(from) !== game.active)
+ return false
+ }
if (is_friendly_port(from))
return true
if (can_leave_besieged_port(from))