summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-04-16 20:03:40 +0200
committerTor Andersson <tor@ccxvii.net>2024-04-16 20:03:40 +0200
commit5fd62dcf90afb79fe8b6898efce18ef00ef95fc3 (patch)
treea2722dfe874dd2a94c8f0e77e9e1aa64b21b49fe /rules.js
parent165de595461086ff3184e69484b5038d3cf9e660 (diff)
downloadplantagenet-5fd62dcf90afb79fe8b6898efce18ef00ef95fc3.tar.gz
Rename reset_flags to reset_flags_for_muster.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index 51abc03..6e0efe1 100644
--- a/rules.js
+++ b/rules.js
@@ -5,6 +5,8 @@
// Check all push/clear_undo
// TODO: check flank attack
+// TODO: clean up use of who/what/which/where -- explicit selected_lord, selected_vassal, etc?
+
let game = null
let view = null
let states = {}
@@ -2359,7 +2361,7 @@ function goto_ready_vassals() {
// === 3.4 MUSTER ===
-function reset_flags() {
+function reset_flags_for_muster() {
// to avoid some flags affecting campaign
game.flags.jack_cade = 0
game.flags.parliament_votes = 0
@@ -2453,7 +2455,7 @@ states.levy_muster = {
push_state("levy_muster_lord")
game.who = lord
game.count = data.lords[lord].lordship
- reset_flags()
+ reset_flags_for_muster()
lordship_effects(lord)
},
end_muster() {
@@ -2551,6 +2553,7 @@ states.levy_muster_lord = {
view.actions.parley = 1
}
}
+
if (is_event_in_play(EVENT_YORK_LOYALTY_AND_TRUST) && game.flags.loyalty_and_trust) {
view.actions.loyalty_and_trust = 1
}