From a710f774fde5f1c189aad9419dac5ea1a9b2d641 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 15 May 2024 12:15:01 +0200 Subject: fix automatic regroup trigger transition when passing --- rules.js | 10 ++++++++-- rules.ts | 12 ++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/rules.js b/rules.js index 4a91c1f..18d19bd 100644 --- a/rules.js +++ b/rules.js @@ -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; diff --git a/rules.ts b/rules.ts index 8fe3bfa..84b236f 100644 --- a/rules.ts +++ b/rules.ts @@ -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) -- cgit v1.2.3