diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-11-14 23:35:03 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-11-14 23:35:03 +0100 |
commit | 6bc0c768af6e0f2b6bf3b1f30d65160389f3f7b3 (patch) | |
tree | 12714f24117dfc213da74dd8b2d12d28167e716c /play.js | |
parent | edcbe8f4ed27559a768270d71198626ed98f14a9 (diff) | |
download | maria-6bc0c768af6e0f2b6bf3b1f30d65160389f3f7b3.tar.gz |
show retro markers as if they were taken from the victory pool
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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 } |