summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-03-27 03:19:15 +0200
committerTor Andersson <tor@ccxvii.net>2023-02-18 11:54:52 +0100
commitf430388401da9d26baaaa5eb992c5f0fe4f8e228 (patch)
treef31418e84d86bf870f38d51c5d8ae828fd1688ce
parentf2bae6c3bcddaeaca1f585421c67e99fdd57b68a (diff)
downloadwilderness-war-f430388401da9d26baaaa5eb992c5f0fe4f8e228.tar.gz
Must be highest rank (but not necessarily best leader) to siege/assault.
-rw-r--r--rules.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index 3420c36..d649351 100644
--- a/rules.js
+++ b/rules.js
@@ -5594,7 +5594,9 @@ function can_moving_force_siege_or_assault() {
let where = moving_piece_space();
if (has_besieged_enemy_fortifications(where)) {
let commanding = find_friendly_commanding_leader_in_space(where);
- if (leader === commanding && force_has_supplied_drilled_troops(leader)) {
+ let cmd_rank = leader_command(commanding);
+ let ldr_rank = leader_command(leader);
+ if (ldr_rank === cmd_rank && force_has_supplied_drilled_troops(leader)) {
return true;
}
}