summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-05-15 12:15:01 +0200
committerTor Andersson <tor@ccxvii.net>2024-05-15 12:15:01 +0200
commita710f774fde5f1c189aad9419dac5ea1a9b2d641 (patch)
tree9fe93c7f8e541d9bbfa73d9c4f93dba02fe1dc8a
parentcdf2089d18a4c097b72c24b731f19d279345a100 (diff)
downloadplantagenet-a710f774fde5f1c189aad9419dac5ea1a9b2d641.tar.gz
fix automatic regroup trigger transition when passing
-rw-r--r--rules.js10
-rw-r--r--rules.ts12
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)