From 567d674893d1d5935e93ab87338dab41ae1fb415 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 13 Dec 2024 11:20:03 +0100 Subject: Retroactive markers in silesia and bavaria/saxony with attacker color. --- play.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/play.js b/play.js index 9969032..836effe 100644 --- a/play.js +++ b/play.js @@ -1438,10 +1438,23 @@ function update_political() { } } -function actual_retro_power(s, current) { +function actual_retro_power(s, attacker) { // conquest retroactive markers have color of new conquering power // re-conquest retroactive markers have color of old conquest marker - return map_get(view.victory, s, current) + let previous = map_get(view.victory, s, -1) + // no previous marker + if (previous < 0) + return attacker + // attacker's marker in silesia which always has a marker + if (set_has(data.country.Silesia, s)) + return attacker + // attacker's marker when reconquering minor power fortresses + if (set_has(data.country.Bavaria, s)) + return attacker + if (set_has(data.country.Saxony, s)) + return attacker + // previous marker to be removed + return previous } function on_update() { -- cgit v1.2.3