From 6bc0c768af6e0f2b6bf3b1f30d65160389f3f7b3 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 14 Nov 2024 23:35:03 +0100 Subject: show retro markers as if they were taken from the victory pool --- play.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 } -- cgit v1.2.3