diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-04-28 23:33:29 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-04-28 23:33:29 +0200 |
commit | 1503e53dc669d45aeee833432580eedbace93962 (patch) | |
tree | b9c735bc9d5a6bcff33999f7c02dec00f1f9e0f0 | |
parent | 47bad382d60e7793e3677ceab5dd858ac241fae3 (diff) | |
download | plantagenet-1503e53dc669d45aeee833432580eedbace93962.tar.gz |
fix swift maneuver with valour remaining
-rw-r--r-- | rules.ts | 20 |
1 files changed, 9 insertions, 11 deletions
@@ -7325,6 +7325,15 @@ function rout_unit(lord: Lord, type: Force, v: Vassal = NOVASSAL) { add_lord_forces(lord, type, -1) add_lord_routed_forces(lord, type, 1) } + + // Swift Maneuver event + if (is_swift_maneuver_in_play() && type === RETINUE) { + set_active_enemy() + game.state = "swift_maneuver" + return + } + + finish_action_assign_hits(lord) } function assign_hit_roll(what, prot, extra) { @@ -7416,15 +7425,6 @@ function action_assign_hits(lord: Lord, type: Force, v=NOVASSAL) { game.vassal = v } else { rout_unit(lord, type, v) - - // Swift Maneuver event - if (is_swift_maneuver_in_play() && type === RETINUE) { - set_active_enemy() - game.state = "swift_maneuver" - return - } - - finish_action_assign_hits(lord) } } else { finish_action_assign_hits(lord) @@ -7458,7 +7458,6 @@ states.spend_valour = { }, pass() { rout_unit(game.who, game.battle.force, game.vassal) - finish_action_assign_hits(game.who) }, valour(_) { let protection = get_modified_protection(game.who, game.battle.force) @@ -7467,7 +7466,6 @@ states.spend_valour = { log(`Reroll:`) if (assign_hit_roll(get_force_name(game.who, game.battle.force, game.vassal), protection, "")) { rout_unit(game.who, game.battle.force, game.vassal) - finish_action_assign_hits(game.who) } else { finish_action_assign_hits(game.who) } |