diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-12-13 11:20:03 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-12-13 11:20:03 +0100 |
commit | 567d674893d1d5935e93ab87338dab41ae1fb415 (patch) | |
tree | 8e8f4848ed8cc9f742d033beed49f34b9c1952e7 /play.js | |
parent | e333776a3177c7bdaec2deedcda79234554d8819 (diff) | |
download | maria-567d674893d1d5935e93ab87338dab41ae1fb415.tar.gz |
Retroactive markers in silesia and bavaria/saxony with attacker color.
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -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() { |