summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-11-14 23:35:03 +0100
committerTor Andersson <tor@ccxvii.net>2024-11-14 23:35:03 +0100
commit6bc0c768af6e0f2b6bf3b1f30d65160389f3f7b3 (patch)
tree12714f24117dfc213da74dd8b2d12d28167e716c /play.js
parentedcbe8f4ed27559a768270d71198626ed98f14a9 (diff)
downloadmaria-6bc0c768af6e0f2b6bf3b1f30d65160389f3f7b3.tar.gz
show retro markers as if they were taken from the victory pool
Diffstat (limited to 'play.js')
-rw-r--r--play.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/play.js b/play.js
index 3de05f8..1306225 100644
--- a/play.js
+++ b/play.js
@@ -318,6 +318,12 @@ const all_electoral_colleges = [
find_city("Berlin"),
]
+const all_elector_fortresses = []
+set_add(all_elector_fortresses, find_city("Trier"))
+set_add(all_elector_fortresses, find_city("Mainz"))
+set_add(all_elector_fortresses, find_city("Köln"))
+set_add(all_elector_fortresses, find_city("Mannheim"))
+
const all_fortresses = []
set_add_all(all_fortresses, data.type.major_fortress)
set_add_all(all_fortresses, data.type.minor_fortress)
@@ -1203,6 +1209,13 @@ function count_victory_markers(pow) {
for (let i = 0; i < view.victory.length; i += 2)
if (view.victory[i+1] === pow)
++n
+
+ // count retroactive markers for display (except 4 special electoral colleges)
+ for (let i = 0; i < view.retro.length; i += 2)
+ if (!set_has(all_elector_fortresses, view.retro[i]))
+ if (view.retro[i+1] === pow)
+ ++n
+
return n
}