diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-04-02 17:24:42 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 11:54:52 +0100 |
commit | e56350909b0831d606f5f6de54088f943fda6c70 (patch) | |
tree | 515b614c4d46145b880b624980634bee292f0fc1 | |
parent | abf4f42a1fb32c6b31a1268e14e3a3925c79b13e (diff) | |
download | wilderness-war-e56350909b0831d606f5f6de54088f943fda6c70.tar.gz |
Fix bug with siege without commanding officer.
-rw-r--r-- | play.css | 4 | ||||
-rw-r--r-- | rules.js | 10 |
2 files changed, 6 insertions, 8 deletions
@@ -134,10 +134,6 @@ aside { width: 220px; } #popup div.enabled:hover { background-color: black; color: white; } #popup div.always { display: block; } -.card.highlight { - outline: 2px solid yellow; -} - /* MAP */ #mapwrap { @@ -5599,10 +5599,12 @@ 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); - 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; + if (commanding > 0) { + 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; + } } } return false; |