summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/rules.js b/rules.js
index a47c92f..7d1552e 100644
--- a/rules.js
+++ b/rules.js
@@ -815,6 +815,12 @@ function set_lord_calendar(lord, turn) {
turn = 16;
set_lord_locale(lord, CALENDAR + turn);
}
+function set_lord_calendar_keep_exile(lord, turn) {
+ let x = is_lord_in_exile(lord);
+ set_lord_calendar(lord, turn);
+ if (x)
+ set_lord_in_exile(lord);
+}
function set_lord_in_exile(lord) {
let turn = get_lord_calendar(lord);
set_lord_locale(lord, CALENDAR_EXILE + turn);
@@ -8418,18 +8424,12 @@ function foreign_haven_shift_lords() {
let turn = current_turn();
for (let lord of all_lancaster_lords) {
if (is_lord_on_calendar(lord) && get_lord_calendar(lord) > turn) {
- let x = is_lord_in_exile(lord);
- set_lord_calendar(lord, turn);
- if (x)
- set_lord_in_exile(lord);
+ set_lord_calendar_keep_exile(lord, turn);
}
}
for (let lord of all_york_lords) {
if (is_lord_on_calendar(lord) && get_lord_calendar(lord) > turn + 1) {
- let x = is_lord_in_exile(lord);
- set_lord_calendar(lord, turn + 1);
- if (x)
- set_lord_in_exile(lord);
+ set_lord_calendar_keep_exile(lord, turn + 1);
}
}
}
@@ -9619,7 +9619,7 @@ states.heralds_attempt = {
},
check(spend) {
if (roll_influence_check("C" + AOW_LANCASTER_HERALDS + " L" + game.who, game.command, spend))
- set_lord_calendar(game.who, current_turn() + 1);
+ set_lord_calendar_keep_exile(game.who, current_turn() + 1);
end_heralds_attempt();
},
};