diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-08-30 15:54:42 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 11:54:52 +0100 |
commit | bd0d3720b726ca64b95216986cb0b7dc6db9959e (patch) | |
tree | 8a636215bdbe2c68e7455193b8f558b475bcd7bd | |
parent | fdab7a730cc2d9c7f403a6cc40a604a64646509a (diff) | |
download | wilderness-war-bd0d3720b726ca64b95216986cb0b7dc6db9959e.tar.gz |
Fix bug with determining which battles are worth VP.
Militia and Sorties should also count!
-rw-r--r-- | rules.js | 27 |
1 files changed, 15 insertions, 12 deletions
@@ -4257,6 +4257,20 @@ function goto_battle(where, is_assault) { }) } + if (game.raid) + game.raid.battle = where + + // No Militia take part in assaults + if (!game.battle.assault) + goto_battle_militia() + else + goto_battle_sortie() + + // Pause for foul weather before any battles are resolved... + goto_retroactive_foul_weather() +} + +function determine_battle_vp_worth() { if (!game.battle.assault) { let n_atk = 0 for_each_attacking_piece(p => { @@ -4278,18 +4292,6 @@ function goto_battle(where, is_assault) { if (n_def > 4) game.battle.def_worth_vp = 1 } - - if (game.raid) - game.raid.battle = where - - // No Militia take part in assaults - if (!game.battle.assault) - goto_battle_militia() - else - goto_battle_sortie() - - // Pause for foul weather before any battles are resolved... - goto_retroactive_foul_weather() } function goto_battle_militia() { @@ -4709,6 +4711,7 @@ states.defender_events = { */ function goto_battle_roll() { + determine_battle_vp_worth() if (game.events.ambush === game.battle.attacker) goto_atk_fire() else if (game.events.ambush === game.battle.defender) |