summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-09-02 03:10:51 +0200
committerTor Andersson <tor@ccxvii.net>2023-02-18 11:54:52 +0100
commitf6c631c8f6e08bf7f1084b41e036cdcab97ae164 (patch)
treec52a002f7c57178937950d3bde0820d00ba83ad3 /rules.js
parent5e0c76f4fcc07f3d891ad7b2745a4b8eaaf85308 (diff)
downloadwilderness-war-f6c631c8f6e08bf7f1084b41e036cdcab97ae164.tar.gz
Don't allow lone leaders to stack with enemy lone leaders.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index ce96410..6d1efa0 100644
--- a/rules.js
+++ b/rules.js
@@ -5684,8 +5684,11 @@ states.retreat_lone_leader = {
}
for_each_exit(from, to => {
if (can_defender_retreat_from_to(who, from, to)) {
- can_retreat = true
- gen_action_space(to)
+ // Forbid lone leader to coexist with enemy lone leader
+ if (!has_unbesieged_enemy_leader(to)) {
+ can_retreat = true
+ gen_action_space(to)
+ }
}
})
if (!can_retreat)