From c0073245bdc1fcae00cd7a216e5e2fac23aa6f31 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 2 Aug 2024 15:40:58 +0200 Subject: v2: monument --- rules.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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() { -- cgit v1.2.3