summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index d2876e3..eeb1cf2 100644
--- a/rules.js
+++ b/rules.js
@@ -11879,10 +11879,19 @@ function assertMutuallyExclusiveLords() {
}
}
+function assertAllLordsHaveTroopsOrRetinue() {
+ for (let lord = first_york_lord; lord <= last_lancaster_lord; ++lord) {
+ if (is_lord_on_map(lord) && !count_lord_all_forces(lord) && !get_lord_forces(lord, RETINUE))
+ throw Error(`ASSERT: Lord "${data.lords[lord].name}" without troops or retinue`)
+ }
+}
+
exports.assertState = function (state) {
load_state(state)
- assertMutuallyExclusiveLords()
+ // assertMutuallyExclusiveLords()
+ if (game.state !== "battle_losses" && game.state !== "death_or_disband")
+ assertAllLordsHaveTroopsOrRetinue()
}
let log_sanity = []