summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-10-11 21:36:01 +0200
committerTor Andersson <tor@ccxvii.net>2023-12-10 18:16:55 +0100
commit947ced6f30f7a6dd633c9f0d70149edc4e11f3a7 (patch)
treea07c15cea0ace36a20b90b542dd32d3793d6d103
parentecfedbb41323efbf5cf1ff6000e2d0a1bdd183e6 (diff)
downloadplantagenet-947ced6f30f7a6dd633c9f0d70149edc4e11f3a7.tar.gz
update has_locale_to_muster
-rw-r--r--rules.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/rules.js b/rules.js
index 565b784..7cdf118 100644
--- a/rules.js
+++ b/rules.js
@@ -1394,14 +1394,16 @@ function is_lord_at_friendly_locale(lord) {
}
function has_locale_to_muster(lord) {
+ // Can muster at own seat without enemy lord.
if (!has_enemy_lord(data.lords[lord].seat))
return true
- for (let l = first_friendly_lord; l <= last_friendly_lord; l++) {
- if (is_lord_on_map(l) && is_friendly_locale(get_lord_locale(l)))
+ // Else, can muster at any friendly seat (of a friendly lord who is also in play)
+ for (let other = first_friendly_lord; other <= last_friendly_lord; other++)
+ if (!is_lord_in_play(other) && is_friendly_locale(data.lords[other].seat))
return true
- }
+ // Tough luck!
return false
}