diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-10-11 21:36:01 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-12-10 18:16:55 +0100 |
commit | 947ced6f30f7a6dd633c9f0d70149edc4e11f3a7 (patch) | |
tree | a07c15cea0ace36a20b90b542dd32d3793d6d103 /rules.js | |
parent | ecfedbb41323efbf5cf1ff6000e2d0a1bdd183e6 (diff) | |
download | plantagenet-947ced6f30f7a6dd633c9f0d70149edc4e11f3a7.tar.gz |
update has_locale_to_muster
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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 } |