From b928cb05174c0d790a6b926bdb1dd16f28d96b16 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 31 Jul 2024 11:28:38 +0200 Subject: Fix regroup end transition if used during melee phase. --- rules.js | 5 +++-- rules.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/rules.js b/rules.js index 2c577b0..397e8ed 100644 --- a/rules.js +++ b/rules.js @@ -5794,7 +5794,7 @@ states.regroup = { ]; }, pass() { - if (game.battle.step < 2) + if (game.battle.step <= 2) game.state = "assign_hits"; else goto_battle_lord_rout_2(); @@ -5853,7 +5853,7 @@ function end_regroup() { set_delete(game.events, EVENT_YORK_REGROUP); game.who = NOBODY; delete game.event_regroup; - if (game.battle.step < 2) + if (game.battle.step <= 2) game.state = "assign_hits"; else goto_battle_lord_rout_2(); @@ -6617,6 +6617,7 @@ states.assign_hits = { }, regroup() { push_undo(); + game.battle.reroll = 0; game.who = NOBODY; goto_regroup(); }, diff --git a/rules.ts b/rules.ts index e15dc7f..bcdce10 100644 --- a/rules.ts +++ b/rules.ts @@ -6864,7 +6864,7 @@ states.regroup = { ] }, pass() { - if (game.battle.step < 2) + if (game.battle.step <= 2) game.state = "assign_hits" else goto_battle_lord_rout_2() @@ -6930,7 +6930,7 @@ function end_regroup() { game.who = NOBODY delete game.event_regroup - if (game.battle.step < 2) + if (game.battle.step <= 2) game.state = "assign_hits" else goto_battle_lord_rout_2() @@ -7776,6 +7776,7 @@ states.assign_hits = { regroup() { push_undo() + game.battle.reroll = 0 game.who = NOBODY goto_regroup() }, -- cgit v1.2.3