summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index a5daedd..7cdf519 100644
--- a/rules.js
+++ b/rules.js
@@ -11893,14 +11893,24 @@ function assertAllLordsOnLand() {
}
}
+function assertAllLordsWithoutRoutedTroops() {
+ for (let lord = first_york_lord; lord <= last_lancaster_lord; ++lord) {
+ if (lord_has_routed_troops(lord))
+ throw Error(`ASSERT: Lord "${data.lords[lord].name}" has routed troops during Levy phase.`)
+ }
+}
+
exports.assertState = function (state) {
load_state(state)
// assertMutuallyExclusiveLords()
if (game.state !== "battle_losses" && game.state !== "death_or_disband")
assertAllLordsHaveTroopsOrRetinue()
- if (is_levy_phase())
+
+ if (is_levy_phase()) {
assertAllLordsOnLand()
+ assertAllLordsWithoutRoutedTroops()
+ }
}
let log_sanity = []