summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteisuru <31881306+teisuru@users.noreply.github.com>2024-02-12 14:17:23 +0100
committerteisuru <31881306+teisuru@users.noreply.github.com>2024-02-12 14:17:23 +0100
commit8f1a93558e68b8dfa99c6a2470481090a6f6cba1 (patch)
tree3025bc310d42a49c86b144b4090de6b30ac35b09
parentc895a863d21155a66cf8200a9f1735fa95913667 (diff)
downloadplantagenet-8f1a93558e68b8dfa99c6a2470481090a6f6cba1.tar.gz
fix Y16 the commons
-rw-r--r--rules.js14
1 files 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 = {