summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-08-02 15:40:58 +0200
committerTor Andersson <tor@ccxvii.net>2024-10-27 12:00:41 +0100
commitc0073245bdc1fcae00cd7a216e5e2fac23aa6f31 (patch)
treeb4118c38611d47900986f012bc5f253ebf1ffe31
parentafb2a57376a1ea25a807ca016b9564a339f192ba (diff)
downloadtime-of-crisis-c0073245bdc1fcae00cd7a216e5e2fac23aa6f31.tar.gz
v2: monument
-rw-r--r--rules.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index 25ef8a5..91c3c7e 100644
--- a/rules.js
+++ b/rules.js
@@ -2444,6 +2444,8 @@ function remove_governor(where, verbose) {
remove_quaestor(where)
remove_emperor_token(where)
+ trigger_monument(where)
+
// NOTE: Automated removal because it can be called from too many places.
// This should be a very rare occurence, so let's not worry about it.
if (is_seat_of_power(where))
@@ -2475,10 +2477,12 @@ function place_governor(where, new_governor) {
if (old_governor >= 0) {
log("Replaced " + PLAYER_NAME[old_governor/6|0] + ".")
set_governor_location(old_governor, AVAILABLE)
+ trigger_monument(where)
if (where !== ITALIA && is_governor_of_emperor_player(old_governor))
reduce_support(ITALIA)
} else {
log("Replaced Neutral.")
+ trigger_monument(where)
}
set_governor_location(new_governor, where)
@@ -2491,7 +2495,6 @@ function place_governor(where, new_governor) {
else if (old_governor < 0)
adjust_neutral_italia(-1)
}
-
}
function count_units_in_capital(where) {
@@ -2755,6 +2758,16 @@ function goto_place_governor_success() {
}
}
+// IMPROVEMENT: MONUMENT
+
+function trigger_monument(where) {
+ if (has_monument(where)) {
+ log("Monument to Mob.")
+ remove_monument(where)
+ set_mobs(where, get_mobs(where) + 1)
+ }
+}
+
// CARD: PRAETORIAN GUARD
function can_play_praetorian_guard() {