summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-05-07 20:31:29 +0200
committerTor Andersson <tor@ccxvii.net>2023-05-24 21:06:18 +0200
commit23bc441db1a06ba5caf3bd98bfab9929a8964180 (patch)
treeb2ccb5b232aa200412610e09ccac38b9eab3fa5c
parent19be33a825a75f6912ac242055d244e1817f3cf7 (diff)
downloadred-flag-over-paris-23bc441db1a06ba5caf3bd98bfab9929a8964180.tar.gz
Les Amis d'Ordre - must place 2 cubes in Paris spaces.
-rw-r--r--events.txt1
-rw-r--r--rules.js21
2 files changed, 22 insertions, 0 deletions
diff --git a/events.txt b/events.txt
index dd2076d..bb6cff4 100644
--- a/events.txt
+++ b/events.txt
@@ -43,6 +43,7 @@ CARD 7 - Général Espivent
remove_up_to 2 SOCIAL_MOVEMENTS
CARD 8 - Les Amis de l'Ordre
+ # must place 2 in paris spaces
place 2 PARIS
CARD 9 - Socialist Newspaper Ban
diff --git a/rules.js b/rules.js
index 036684d..0aac4cc 100644
--- a/rules.js
+++ b/rules.js
@@ -380,6 +380,17 @@ function can_play_event(c) {
if (game.active !== game.initiative)
return false
+ // Les Amis de l'Ordre - must place 2 cubes in Paris
+ if (c === 8) {
+ if (count_available_versailles_cubes() < 2)
+ return false
+ let n = count_versailles_cubes(BUTTE_MONTMARTRE) +
+ count_versailles_cubes(BUTTE_AUX_CAILLES) +
+ count_versailles_cubes(PERE_LACHAISE)
+ if (n > 12 - 2)
+ return false
+ }
+
// Otto von Bismarck - must remove blue cube from National Assembly
if (c === 12)
if (!has_versailles_cube(NATIONAL_ASSEMBLY))
@@ -764,6 +775,16 @@ function find_available_cube(removed=0) {
return -1
}
+function count_available_versailles_cubes() {
+ return (
+ count_versailles_cubes(BLUE_CUBE_POOL) +
+ count_versailles_cubes(BLUE_CRISIS_TRACK[0]) +
+ count_versailles_cubes(BLUE_CRISIS_TRACK[1]) +
+ count_versailles_cubes(BLUE_CRISIS_TRACK[2]) +
+ count_versailles_cubes(BLUE_CRISIS_TRACK[3])
+ )
+}
+
function for_each_enemy_cube(s, f) {
if (game.active === COMMUNE)
for_each_versailles_cube(s, f)