diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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 = [] |