From 8f1a93558e68b8dfa99c6a2470481090a6f6cba1 Mon Sep 17 00:00:00 2001 From: teisuru <31881306+teisuru@users.noreply.github.com> Date: Mon, 12 Feb 2024 14:17:23 +0100 Subject: fix Y16 the commons --- rules.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/rules.js b/rules.js index 1bb253f..c605204 100644 --- a/rules.js +++ b/rules.js @@ -4811,10 +4811,10 @@ states.levy_muster_lord = { if (eligible_kings_name()) { goto_kings_name("Levy Troops") } - if (is_event_in_play(EVENT_YORK_THE_COMMONS)) { + if (is_event_in_play(EVENT_YORK_THE_COMMONS) && is_york_lord(game.who)) { push_undo() game.flags.commons_militia = 2 - game.state = "the_commons" + push_state("the_commons") } resume_levy_muster_lord() }, @@ -5046,10 +5046,18 @@ states.the_commons = { --game.flags.commons_militia }, done() { - resume_levy_muster_lord() + push_undo() + end_the_commons() + } } +function end_the_commons() { + game.flags.commons_militia = 0 + pop_state() + resume_levy_muster_lord() +} + // === CAPABILITY: SOLDIERS OF FORTUNE states.soldier_of_fortune = { -- cgit v1.2.3