diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-05-07 20:31:29 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-05-24 21:06:18 +0200 |
commit | 23bc441db1a06ba5caf3bd98bfab9929a8964180 (patch) | |
tree | b2ccb5b232aa200412610e09ccac38b9eab3fa5c | |
parent | 19be33a825a75f6912ac242055d244e1817f3cf7 (diff) | |
download | red-flag-over-paris-23bc441db1a06ba5caf3bd98bfab9929a8964180.tar.gz |
Les Amis d'Ordre - must place 2 cubes in Paris spaces.
-rw-r--r-- | events.txt | 1 | ||||
-rw-r--r-- | rules.js | 21 |
2 files changed, 22 insertions, 0 deletions
@@ -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 @@ -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) |