diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -1273,6 +1273,9 @@ function on_update() { lone_militia = false } } + // militia that already battled is not part of attacker stack + if (view.combat_region === region && view.combat.attacker >= 0 && !view.combat.militia) + lone_militia = true if (lone_militia) { if (is_battle_stack(region, "militia", region)) { if (has_militia_castra(region)) @@ -1343,8 +1346,13 @@ function on_update() { } } - if (has_militia(region) && inside) - stack.push(ui.militia[region]) + if (has_militia(region) && inside) { + // militia that already battled is not part of attacker stack + if (view.combat_region === region && view.combat.attacker >= 0 && !view.combat.militia) + ; + else + stack.push(ui.militia[region]) + } if (is_battle_stack(region, "general", pi * 6 + ai)) layout_battle_stack(pi * 6 + ai === view.combat.attacker, stack, region) |