summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-07-31 11:28:38 +0200
committerTor Andersson <tor@ccxvii.net>2024-07-31 11:28:38 +0200
commitb928cb05174c0d790a6b926bdb1dd16f28d96b16 (patch)
tree3533e6c9ea76b1b6559af24fd4b1011646e9f4a5
parentc3a9f0f58cf379f8fccc07d6a2038a4d11e070ec (diff)
downloadplantagenet-b928cb05174c0d790a6b926bdb1dd16f28d96b16.tar.gz
Fix regroup end transition if used during melee phase.
-rw-r--r--rules.js5
-rw-r--r--rules.ts5
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()
},