diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-05-15 12:15:01 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-05-15 12:15:01 +0200 |
commit | a710f774fde5f1c189aad9419dac5ea1a9b2d641 (patch) | |
tree | 9fe93c7f8e541d9bbfa73d9c4f93dba02fe1dc8a | |
parent | cdf2089d18a4c097b72c24b731f19d279345a100 (diff) | |
download | plantagenet-a710f774fde5f1c189aad9419dac5ea1a9b2d641.tar.gz |
fix automatic regroup trigger transition when passing
-rw-r--r-- | rules.js | 10 | ||||
-rw-r--r-- | rules.ts | 12 |
2 files changed, 18 insertions, 4 deletions
@@ -5768,7 +5768,10 @@ states.regroup = { ]; }, pass() { - goto_battle_lord_rout(); + if (game.battle.step < 2) + game.state = "assign_hits"; + else + goto_battle_lord_rout_2(); }, }; states.regroup_roll_protection = { @@ -5827,7 +5830,7 @@ function end_regroup() { if (game.battle.step < 2) game.state = "assign_hits"; else - goto_battle_lord_rout(); + goto_battle_lord_rout_2(); } // === 4.4.2 BATTLE ROUNDS === /* @@ -6794,6 +6797,9 @@ function goto_battle_lord_rout() { goto_regroup(); return; } + goto_battle_lord_rout_2(); +} +function goto_battle_lord_rout_2() { log_h4("Lord Rout"); // lose any unused culverins (from ravine/vanguard combo) delete game.battle.culverins; @@ -6827,7 +6827,10 @@ states.regroup = { ] }, pass() { - goto_battle_lord_rout() + if (game.battle.step < 2) + game.state = "assign_hits" + else + goto_battle_lord_rout_2() }, } @@ -6893,7 +6896,7 @@ function end_regroup() { if (game.battle.step < 2) game.state = "assign_hits" else - goto_battle_lord_rout() + goto_battle_lord_rout_2() } // === 4.4.2 BATTLE ROUNDS === @@ -7979,6 +7982,11 @@ function goto_battle_lord_rout() { return } + goto_battle_lord_rout_2() +} + +function goto_battle_lord_rout_2() { + log_h4("Lord Rout") // lose any unused culverins (from ravine/vanguard combo) |