summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-04-16 18:19:03 +0200
committerTor Andersson <tor@ccxvii.net>2024-04-16 18:19:03 +0200
commitaacad41caad137521680563dd2659c46a8f2cb88 (patch)
treeda5f6d6551fc24485bc11e27937838845b40ae0c
parent0ef50f6dc9393af6af12cb180dc28eda0ec05f81 (diff)
downloadplantagenet-aacad41caad137521680563dd2659c46a8f2cb88.tar.gz
Move check_london_protected to top (where should it be?)
-rw-r--r--rules.js30
1 files changed, 15 insertions, 15 deletions
diff --git a/rules.js b/rules.js
index 9690e6a..21f46a6 100644
--- a/rules.js
+++ b/rules.js
@@ -9,6 +9,21 @@ let game = null
let view = null
let states = {}
+function check_london_protected() {
+// TODO IF HENRY/MARGARET ARE MUSTERED IT DOES NOT CHANGE FAVOUR
+// ONLY L17/L18 and Pillage will cancel that event
+//(it is annuled when london go to neutral
+ if (game.state === "pillage") {
+ return false
+ }
+ if (game.flags.london_for_york === 1 && game.where === LOC_LONDON) {
+ return true
+ }
+ else {
+ return false
+ }
+}
+
// === CONSTANTS ===
const data = require("./data.js")
@@ -10683,21 +10698,6 @@ states.london_for_york = {
},
}
-function check_london_protected() {
-// TODO IF HENRY/MARGARET ARE MUSTERED IT DOES NOT CHANGE FAVOUR
-// ONLY L17/L18 and Pillage will cancel that event
-//(it is annuled when london go to neutral
- if (game.state === "pillage") {
- return false
- }
- if (game.flags.london_for_york === 1 && game.where === LOC_LONDON) {
- return true
- }
- else {
- return false
- }
-}
-
// === EVENT: SHE-WOLF OF FRANCE ===
function goto_york_event_shewolf_of_france() {