summaryrefslogtreecommitdiff
path: root/rules.ts
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-04-21 14:11:23 +0200
committerTor Andersson <tor@ccxvii.net>2024-04-21 14:12:01 +0200
commit437f723e76d7e518dce4b3cebc0b4283c3cb90e8 (patch)
treefa6623c5570fbb23ed758a28a7a33f60fecf886e /rules.ts
parentaa69a52c4220c16fb8b639902ecd4331b8e9ee21 (diff)
downloadplantagenet-437f723e76d7e518dce4b3cebc0b4283c3cb90e8.tar.gz
Scenario Ia - Allied Networks.
Diffstat (limited to 'rules.ts')
-rw-r--r--rules.ts20
1 files changed, 18 insertions, 2 deletions
diff --git a/rules.ts b/rules.ts
index 9806289..d2a196e 100644
--- a/rules.ts
+++ b/rules.ts
@@ -2673,6 +2673,23 @@ function end_muster_exiles() {
}
}
+function can_use_exile_box(lord: Lord, loc: Locale) {
+ // Ia: Allied Networks
+ if (game.scenario === SCENARIO_IA) {
+ if (lord === LORD_HENRY_VI || lord === LORD_SOMERSET_1)
+ return loc === LOC_SCOTLAND
+ if (lord === LORD_NORTHUMBERLAND_L || lord === LORD_EXETER_1 || lord === LORD_BUCKINGHAM)
+ return loc === LOC_FRANCE
+ if (lord === LORD_YORK || lord === LORD_RUTLAND)
+ return loc === LOC_IRELAND
+ if (lord === LORD_MARCH || lord === LORD_WARWICK_Y || lord === LORD_SALISBURY)
+ return loc === LOC_BURGUNDY
+ throw "BAD ALLIED NETWORK DATA"
+ }
+
+ return has_favour_in_locale(game.active, loc)
+}
+
states.muster_exiles = {
inactive: "Muster Exiles",
prompt() {
@@ -2689,8 +2706,7 @@ states.muster_exiles = {
view.actions.done = true
} else {
for (let loc of data.exile_boxes) {
- // TODO: Allied Networks
- if (has_favour_in_locale(game.active, loc))
+ if (can_use_exile_box(game.who, loc))
gen_action_locale(loc)
}
}