summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.js17
1 files 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() {