summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-11-23 08:51:45 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2024-11-23 08:51:45 +0000
commita35b49e654f2ad82c14855b3c36195c2c2e26d10 (patch)
tree0f56a45c62741907a2ac9dbbe315e025af2dcd7c
parentdd4ef001caac00050d00f8ae1dfa87da9e95eb7c (diff)
parentdb464d9b4adb87cd4316f59058b6b70f61fbeaa3 (diff)
download1989-dawn-of-freedom-a35b49e654f2ad82c14855b3c36195c2c2e26d10.tar.gz
Merge branch 'work-in-progress'
-rw-r--r--.editorconfig7
-rw-r--r--.gitattributes3
-rw-r--r--.gitignore1
-rw-r--r--1989_card_back_ps.gifbin42223 -> 0 bytes
-rw-r--r--1989_map.jpgbin1532763 -> 0 bytes
-rw-r--r--Makefile21
-rw-r--r--Map.docxbin0 -> 44689 bytes
-rw-r--r--about.html26
-rw-r--r--cards/e1.gifbin41173 -> 0 bytes
-rw-r--r--cards/e10.gifbin45725 -> 0 bytes
-rw-r--r--cards/e100.gifbin47033 -> 0 bytes
-rw-r--r--cards/e101.gifbin35715 -> 0 bytes
-rw-r--r--cards/e102.gifbin52121 -> 0 bytes
-rw-r--r--cards/e103.gifbin41393 -> 0 bytes
-rw-r--r--cards/e104.gifbin50934 -> 0 bytes
-rw-r--r--cards/e105.gifbin32868 -> 0 bytes
-rw-r--r--cards/e106.gifbin55236 -> 0 bytes
-rw-r--r--cards/e107.gifbin53985 -> 0 bytes
-rw-r--r--cards/e108.gifbin39396 -> 0 bytes
-rw-r--r--cards/e109.gifbin52280 -> 0 bytes
-rw-r--r--cards/e11.gifbin35357 -> 0 bytes
-rw-r--r--cards/e110.gifbin52196 -> 0 bytes
-rw-r--r--cards/e12.gifbin36855 -> 0 bytes
-rw-r--r--cards/e13.gifbin29026 -> 0 bytes
-rw-r--r--cards/e14.gifbin47291 -> 0 bytes
-rw-r--r--cards/e15.gifbin44485 -> 0 bytes
-rw-r--r--cards/e16.gifbin47827 -> 0 bytes
-rw-r--r--cards/e17.gifbin55283 -> 0 bytes
-rw-r--r--cards/e18.gifbin48673 -> 0 bytes
-rw-r--r--cards/e19.gifbin51580 -> 0 bytes
-rw-r--r--cards/e2.gifbin47713 -> 0 bytes
-rw-r--r--cards/e20.gifbin48684 -> 0 bytes
-rw-r--r--cards/e21.gifbin43661 -> 0 bytes
-rw-r--r--cards/e22.gifbin55339 -> 0 bytes
-rw-r--r--cards/e23.gifbin45012 -> 0 bytes
-rw-r--r--cards/e24.gifbin46517 -> 0 bytes
-rw-r--r--cards/e25.gifbin36750 -> 0 bytes
-rw-r--r--cards/e26.gifbin48924 -> 0 bytes
-rw-r--r--cards/e27.gifbin37383 -> 0 bytes
-rw-r--r--cards/e28.gifbin40841 -> 0 bytes
-rw-r--r--cards/e29.gifbin50513 -> 0 bytes
-rw-r--r--cards/e3.gifbin45791 -> 0 bytes
-rw-r--r--cards/e30.gifbin48397 -> 0 bytes
-rw-r--r--cards/e31.gifbin48803 -> 0 bytes
-rw-r--r--cards/e32.gifbin41812 -> 0 bytes
-rw-r--r--cards/e33.gifbin37416 -> 0 bytes
-rw-r--r--cards/e34.gifbin30253 -> 0 bytes
-rw-r--r--cards/e35.gifbin43812 -> 0 bytes
-rw-r--r--cards/e36.gifbin48081 -> 0 bytes
-rw-r--r--cards/e37.gifbin48246 -> 0 bytes
-rw-r--r--cards/e38.gifbin42546 -> 0 bytes
-rw-r--r--cards/e39.gifbin20887 -> 0 bytes
-rw-r--r--cards/e4.gifbin49249 -> 0 bytes
-rw-r--r--cards/e40.gifbin32686 -> 0 bytes
-rw-r--r--cards/e41.gifbin47201 -> 0 bytes
-rw-r--r--cards/e42.gifbin51711 -> 0 bytes
-rw-r--r--cards/e43.gifbin48165 -> 0 bytes
-rw-r--r--cards/e44.gifbin47662 -> 0 bytes
-rw-r--r--cards/e45.gifbin48593 -> 0 bytes
-rw-r--r--cards/e46.gifbin52918 -> 0 bytes
-rw-r--r--cards/e47.gifbin46167 -> 0 bytes
-rw-r--r--cards/e48.gifbin46050 -> 0 bytes
-rw-r--r--cards/e49.gifbin30897 -> 0 bytes
-rw-r--r--cards/e5.gifbin55871 -> 0 bytes
-rw-r--r--cards/e50.gifbin37886 -> 0 bytes
-rw-r--r--cards/e51.gifbin42136 -> 0 bytes
-rw-r--r--cards/e52.gifbin35487 -> 0 bytes
-rw-r--r--cards/e53.gifbin41152 -> 0 bytes
-rw-r--r--cards/e54.gifbin51568 -> 0 bytes
-rw-r--r--cards/e55.gifbin53379 -> 0 bytes
-rw-r--r--cards/e56.gifbin47264 -> 0 bytes
-rw-r--r--cards/e57.gifbin41053 -> 0 bytes
-rw-r--r--cards/e58.gifbin49002 -> 0 bytes
-rw-r--r--cards/e59.gifbin48521 -> 0 bytes
-rw-r--r--cards/e6.gifbin53364 -> 0 bytes
-rw-r--r--cards/e60.gifbin38365 -> 0 bytes
-rw-r--r--cards/e61.gifbin59278 -> 0 bytes
-rw-r--r--cards/e62.gifbin47030 -> 0 bytes
-rw-r--r--cards/e63.gifbin37173 -> 0 bytes
-rw-r--r--cards/e64.gifbin55336 -> 0 bytes
-rw-r--r--cards/e65.gifbin45256 -> 0 bytes
-rw-r--r--cards/e66.gifbin45276 -> 0 bytes
-rw-r--r--cards/e67.gifbin46779 -> 0 bytes
-rw-r--r--cards/e68.gifbin47975 -> 0 bytes
-rw-r--r--cards/e69.gifbin55250 -> 0 bytes
-rw-r--r--cards/e7.gifbin38561 -> 0 bytes
-rw-r--r--cards/e70.gifbin51398 -> 0 bytes
-rw-r--r--cards/e71.gifbin41245 -> 0 bytes
-rw-r--r--cards/e72.gifbin57623 -> 0 bytes
-rw-r--r--cards/e73.gifbin45497 -> 0 bytes
-rw-r--r--cards/e74.gifbin47107 -> 0 bytes
-rw-r--r--cards/e75.gifbin43205 -> 0 bytes
-rw-r--r--cards/e76.gifbin59066 -> 0 bytes
-rw-r--r--cards/e77.gifbin55423 -> 0 bytes
-rw-r--r--cards/e78.gifbin48166 -> 0 bytes
-rw-r--r--cards/e79.gifbin49578 -> 0 bytes
-rw-r--r--cards/e8.gifbin38108 -> 0 bytes
-rw-r--r--cards/e80.gifbin42881 -> 0 bytes
-rw-r--r--cards/e81.gifbin46392 -> 0 bytes
-rw-r--r--cards/e82.gifbin33240 -> 0 bytes
-rw-r--r--cards/e83.gifbin41811 -> 0 bytes
-rw-r--r--cards/e84.gifbin55422 -> 0 bytes
-rw-r--r--cards/e85.gifbin44517 -> 0 bytes
-rw-r--r--cards/e86.gifbin55559 -> 0 bytes
-rw-r--r--cards/e87.gifbin43060 -> 0 bytes
-rw-r--r--cards/e88.gifbin59184 -> 0 bytes
-rw-r--r--cards/e89.gifbin49189 -> 0 bytes
-rw-r--r--cards/e9.gifbin49698 -> 0 bytes
-rw-r--r--cards/e90.gifbin52416 -> 0 bytes
-rw-r--r--cards/e91.gifbin37102 -> 0 bytes
-rw-r--r--cards/e92.gifbin40982 -> 0 bytes
-rw-r--r--cards/e93.gifbin53105 -> 0 bytes
-rw-r--r--cards/e94.gifbin54882 -> 0 bytes
-rw-r--r--cards/e95.gifbin41576 -> 0 bytes
-rw-r--r--cards/e96.gifbin53108 -> 0 bytes
-rw-r--r--cards/e97.gifbin55092 -> 0 bytes
-rw-r--r--cards/e98.gifbin49232 -> 0 bytes
-rw-r--r--cards/e99.gifbin42212 -> 0 bytes
-rw-r--r--cards100/event_1.avifbin0 -> 10374 bytes
-rw-r--r--cards100/event_1.pngbin0 -> 76401 bytes
-rw-r--r--cards100/event_10.avifbin0 -> 10493 bytes
-rw-r--r--cards100/event_10.pngbin0 -> 84507 bytes
-rw-r--r--cards100/event_100.avifbin0 -> 12763 bytes
-rw-r--r--cards100/event_100.pngbin0 -> 87579 bytes
-rw-r--r--cards100/event_101.avifbin0 -> 11372 bytes
-rw-r--r--cards100/event_101.pngbin0 -> 89250 bytes
-rw-r--r--cards100/event_102.avifbin0 -> 13714 bytes
-rw-r--r--cards100/event_102.pngbin0 -> 103307 bytes
-rw-r--r--cards100/event_103.avifbin0 -> 11124 bytes
-rw-r--r--cards100/event_103.pngbin0 -> 81800 bytes
-rw-r--r--cards100/event_104.avifbin0 -> 17294 bytes
-rw-r--r--cards100/event_104.pngbin0 -> 115195 bytes
-rw-r--r--cards100/event_105.avifbin0 -> 12115 bytes
-rw-r--r--cards100/event_105.pngbin0 -> 63571 bytes
-rw-r--r--cards100/event_106.avifbin0 -> 12027 bytes
-rw-r--r--cards100/event_106.pngbin0 -> 80075 bytes
-rw-r--r--cards100/event_107.avifbin0 -> 18057 bytes
-rw-r--r--cards100/event_107.pngbin0 -> 109916 bytes
-rw-r--r--cards100/event_108.avifbin0 -> 10231 bytes
-rw-r--r--cards100/event_108.pngbin0 -> 81594 bytes
-rw-r--r--cards100/event_109.avifbin0 -> 15704 bytes
-rw-r--r--cards100/event_109.pngbin0 -> 104329 bytes
-rw-r--r--cards100/event_11.avifbin0 -> 9353 bytes
-rw-r--r--cards100/event_11.pngbin0 -> 51855 bytes
-rw-r--r--cards100/event_110.avifbin0 -> 12565 bytes
-rw-r--r--cards100/event_110.pngbin0 -> 83833 bytes
-rw-r--r--cards100/event_12.avifbin0 -> 9706 bytes
-rw-r--r--cards100/event_12.pngbin0 -> 75057 bytes
-rw-r--r--cards100/event_13.avifbin0 -> 9560 bytes
-rw-r--r--cards100/event_13.pngbin0 -> 58296 bytes
-rw-r--r--cards100/event_14.avifbin0 -> 11441 bytes
-rw-r--r--cards100/event_14.pngbin0 -> 88067 bytes
-rw-r--r--cards100/event_15.avifbin0 -> 11925 bytes
-rw-r--r--cards100/event_15.pngbin0 -> 95155 bytes
-rw-r--r--cards100/event_16.avifbin0 -> 15725 bytes
-rw-r--r--cards100/event_16.pngbin0 -> 99024 bytes
-rw-r--r--cards100/event_17.avifbin0 -> 17878 bytes
-rw-r--r--cards100/event_17.pngbin0 -> 111182 bytes
-rw-r--r--cards100/event_18.avifbin0 -> 15200 bytes
-rw-r--r--cards100/event_18.pngbin0 -> 95838 bytes
-rw-r--r--cards100/event_19.avifbin0 -> 22613 bytes
-rw-r--r--cards100/event_19.pngbin0 -> 103977 bytes
-rw-r--r--cards100/event_2.avifbin0 -> 13326 bytes
-rw-r--r--cards100/event_2.pngbin0 -> 98118 bytes
-rw-r--r--cards100/event_20.avifbin0 -> 12151 bytes
-rw-r--r--cards100/event_20.pngbin0 -> 92247 bytes
-rw-r--r--cards100/event_21.avifbin0 -> 11292 bytes
-rw-r--r--cards100/event_21.pngbin0 -> 88492 bytes
-rw-r--r--cards100/event_22.avifbin0 -> 15889 bytes
-rw-r--r--cards100/event_22.pngbin0 -> 102631 bytes
-rw-r--r--cards100/event_23.avifbin0 -> 8007 bytes
-rw-r--r--cards100/event_23.pngbin0 -> 74397 bytes
-rw-r--r--cards100/event_24.avifbin0 -> 11694 bytes
-rw-r--r--cards100/event_24.pngbin0 -> 89102 bytes
-rw-r--r--cards100/event_25.avifbin0 -> 7745 bytes
-rw-r--r--cards100/event_25.pngbin0 -> 70921 bytes
-rw-r--r--cards100/event_26.avifbin0 -> 13237 bytes
-rw-r--r--cards100/event_26.pngbin0 -> 93178 bytes
-rw-r--r--cards100/event_27.avifbin0 -> 10574 bytes
-rw-r--r--cards100/event_27.pngbin0 -> 74142 bytes
-rw-r--r--cards100/event_28.avifbin0 -> 11722 bytes
-rw-r--r--cards100/event_28.pngbin0 -> 79904 bytes
-rw-r--r--cards100/event_29.avifbin0 -> 12170 bytes
-rw-r--r--cards100/event_29.pngbin0 -> 72595 bytes
-rw-r--r--cards100/event_3.avifbin0 -> 10983 bytes
-rw-r--r--cards100/event_3.pngbin0 -> 90933 bytes
-rw-r--r--cards100/event_30.avifbin0 -> 9220 bytes
-rw-r--r--cards100/event_30.pngbin0 -> 73619 bytes
-rw-r--r--cards100/event_31.avifbin0 -> 8857 bytes
-rw-r--r--cards100/event_31.pngbin0 -> 65977 bytes
-rw-r--r--cards100/event_32.avifbin0 -> 13981 bytes
-rw-r--r--cards100/event_32.pngbin0 -> 84004 bytes
-rw-r--r--cards100/event_33.avifbin0 -> 10079 bytes
-rw-r--r--cards100/event_33.pngbin0 -> 76113 bytes
-rw-r--r--cards100/event_34.avifbin0 -> 7426 bytes
-rw-r--r--cards100/event_34.pngbin0 -> 47195 bytes
-rw-r--r--cards100/event_35.avifbin0 -> 13532 bytes
-rw-r--r--cards100/event_35.pngbin0 -> 88855 bytes
-rw-r--r--cards100/event_36.avifbin0 -> 15984 bytes
-rw-r--r--cards100/event_36.pngbin0 -> 105231 bytes
-rw-r--r--cards100/event_37.avifbin0 -> 14992 bytes
-rw-r--r--cards100/event_37.pngbin0 -> 97392 bytes
-rw-r--r--cards100/event_38.avifbin0 -> 9831 bytes
-rw-r--r--cards100/event_38.pngbin0 -> 80584 bytes
-rw-r--r--cards100/event_39.avifbin0 -> 6748 bytes
-rw-r--r--cards100/event_39.pngbin0 -> 31952 bytes
-rw-r--r--cards100/event_4.avifbin0 -> 9990 bytes
-rw-r--r--cards100/event_4.pngbin0 -> 71036 bytes
-rw-r--r--cards100/event_40.avifbin0 -> 10094 bytes
-rw-r--r--cards100/event_40.pngbin0 -> 63233 bytes
-rw-r--r--cards100/event_41.avifbin0 -> 12070 bytes
-rw-r--r--cards100/event_41.pngbin0 -> 91123 bytes
-rw-r--r--cards100/event_42.avifbin0 -> 18480 bytes
-rw-r--r--cards100/event_42.pngbin0 -> 108804 bytes
-rw-r--r--cards100/event_43.avifbin0 -> 10074 bytes
-rw-r--r--cards100/event_43.pngbin0 -> 84960 bytes
-rw-r--r--cards100/event_44.avifbin0 -> 17197 bytes
-rw-r--r--cards100/event_44.pngbin0 -> 102297 bytes
-rw-r--r--cards100/event_45.avifbin0 -> 13019 bytes
-rw-r--r--cards100/event_45.pngbin0 -> 87588 bytes
-rw-r--r--cards100/event_46.avifbin0 -> 14870 bytes
-rw-r--r--cards100/event_46.pngbin0 -> 104877 bytes
-rw-r--r--cards100/event_47.avifbin0 -> 11868 bytes
-rw-r--r--cards100/event_47.pngbin0 -> 82412 bytes
-rw-r--r--cards100/event_48.avifbin0 -> 11849 bytes
-rw-r--r--cards100/event_48.pngbin0 -> 94728 bytes
-rw-r--r--cards100/event_49.avifbin0 -> 10685 bytes
-rw-r--r--cards100/event_49.pngbin0 -> 53345 bytes
-rw-r--r--cards100/event_5.avifbin0 -> 18788 bytes
-rw-r--r--cards100/event_5.pngbin0 -> 116938 bytes
-rw-r--r--cards100/event_50.avifbin0 -> 9070 bytes
-rw-r--r--cards100/event_50.pngbin0 -> 71066 bytes
-rw-r--r--cards100/event_51.avifbin0 -> 13044 bytes
-rw-r--r--cards100/event_51.pngbin0 -> 82170 bytes
-rw-r--r--cards100/event_52.avifbin0 -> 8858 bytes
-rw-r--r--cards100/event_52.pngbin0 -> 74361 bytes
-rw-r--r--cards100/event_53.avifbin0 -> 10808 bytes
-rw-r--r--cards100/event_53.pngbin0 -> 86466 bytes
-rw-r--r--cards100/event_54.avifbin0 -> 13294 bytes
-rw-r--r--cards100/event_54.pngbin0 -> 105101 bytes
-rw-r--r--cards100/event_55.avifbin0 -> 16122 bytes
-rw-r--r--cards100/event_55.pngbin0 -> 104688 bytes
-rw-r--r--cards100/event_56.avifbin0 -> 12253 bytes
-rw-r--r--cards100/event_56.pngbin0 -> 89644 bytes
-rw-r--r--cards100/event_57.avifbin0 -> 9854 bytes
-rw-r--r--cards100/event_57.pngbin0 -> 77970 bytes
-rw-r--r--cards100/event_58.avifbin0 -> 13769 bytes
-rw-r--r--cards100/event_58.pngbin0 -> 93376 bytes
-rw-r--r--cards100/event_59.avifbin0 -> 13815 bytes
-rw-r--r--cards100/event_59.pngbin0 -> 90265 bytes
-rw-r--r--cards100/event_6.avifbin0 -> 10970 bytes
-rw-r--r--cards100/event_6.pngbin0 -> 77143 bytes
-rw-r--r--cards100/event_60.avifbin0 -> 6598 bytes
-rw-r--r--cards100/event_60.pngbin0 -> 57507 bytes
-rw-r--r--cards100/event_61.avifbin0 -> 20356 bytes
-rw-r--r--cards100/event_61.pngbin0 -> 117926 bytes
-rw-r--r--cards100/event_62.avifbin0 -> 12524 bytes
-rw-r--r--cards100/event_62.pngbin0 -> 98866 bytes
-rw-r--r--cards100/event_63.avifbin0 -> 9283 bytes
-rw-r--r--cards100/event_63.pngbin0 -> 73919 bytes
-rw-r--r--cards100/event_64.avifbin0 -> 13876 bytes
-rw-r--r--cards100/event_64.pngbin0 -> 78731 bytes
-rw-r--r--cards100/event_65.avifbin0 -> 11902 bytes
-rw-r--r--cards100/event_65.pngbin0 -> 86900 bytes
-rw-r--r--cards100/event_66.avifbin0 -> 9471 bytes
-rw-r--r--cards100/event_66.pngbin0 -> 67266 bytes
-rw-r--r--cards100/event_67.avifbin0 -> 11095 bytes
-rw-r--r--cards100/event_67.pngbin0 -> 89836 bytes
-rw-r--r--cards100/event_68.avifbin0 -> 10730 bytes
-rw-r--r--cards100/event_68.pngbin0 -> 83500 bytes
-rw-r--r--cards100/event_69.avifbin0 -> 14811 bytes
-rw-r--r--cards100/event_69.pngbin0 -> 103468 bytes
-rw-r--r--cards100/event_7.avifbin0 -> 7424 bytes
-rw-r--r--cards100/event_7.pngbin0 -> 68977 bytes
-rw-r--r--cards100/event_70.avifbin0 -> 10664 bytes
-rw-r--r--cards100/event_70.pngbin0 -> 83151 bytes
-rw-r--r--cards100/event_71.avifbin0 -> 10198 bytes
-rw-r--r--cards100/event_71.pngbin0 -> 83284 bytes
-rw-r--r--cards100/event_72.avifbin0 -> 14858 bytes
-rw-r--r--cards100/event_72.pngbin0 -> 92391 bytes
-rw-r--r--cards100/event_73.avifbin0 -> 12166 bytes
-rw-r--r--cards100/event_73.pngbin0 -> 90703 bytes
-rw-r--r--cards100/event_74.avifbin0 -> 10707 bytes
-rw-r--r--cards100/event_74.pngbin0 -> 83326 bytes
-rw-r--r--cards100/event_75.avifbin0 -> 12301 bytes
-rw-r--r--cards100/event_75.pngbin0 -> 88252 bytes
-rw-r--r--cards100/event_76.avifbin0 -> 12759 bytes
-rw-r--r--cards100/event_76.pngbin0 -> 83370 bytes
-rw-r--r--cards100/event_77.avifbin0 -> 14205 bytes
-rw-r--r--cards100/event_77.pngbin0 -> 87527 bytes
-rw-r--r--cards100/event_78.avifbin0 -> 12723 bytes
-rw-r--r--cards100/event_78.pngbin0 -> 95589 bytes
-rw-r--r--cards100/event_79.avifbin0 -> 13820 bytes
-rw-r--r--cards100/event_79.pngbin0 -> 89148 bytes
-rw-r--r--cards100/event_8.avifbin0 -> 8669 bytes
-rw-r--r--cards100/event_8.pngbin0 -> 73132 bytes
-rw-r--r--cards100/event_80.avifbin0 -> 12546 bytes
-rw-r--r--cards100/event_80.pngbin0 -> 89508 bytes
-rw-r--r--cards100/event_81.avifbin0 -> 12274 bytes
-rw-r--r--cards100/event_81.pngbin0 -> 89669 bytes
-rw-r--r--cards100/event_82.avifbin0 -> 8367 bytes
-rw-r--r--cards100/event_82.pngbin0 -> 58857 bytes
-rw-r--r--cards100/event_83.avifbin0 -> 10340 bytes
-rw-r--r--cards100/event_83.pngbin0 -> 84638 bytes
-rw-r--r--cards100/event_84.avifbin0 -> 20169 bytes
-rw-r--r--cards100/event_84.pngbin0 -> 117291 bytes
-rw-r--r--cards100/event_85.avifbin0 -> 9615 bytes
-rw-r--r--cards100/event_85.pngbin0 -> 83036 bytes
-rw-r--r--cards100/event_86.avifbin0 -> 13776 bytes
-rw-r--r--cards100/event_86.pngbin0 -> 106118 bytes
-rw-r--r--cards100/event_87.avifbin0 -> 15863 bytes
-rw-r--r--cards100/event_87.pngbin0 -> 102148 bytes
-rw-r--r--cards100/event_88.avifbin0 -> 12507 bytes
-rw-r--r--cards100/event_88.pngbin0 -> 79870 bytes
-rw-r--r--cards100/event_89.avifbin0 -> 16933 bytes
-rw-r--r--cards100/event_89.pngbin0 -> 102536 bytes
-rw-r--r--cards100/event_9.avifbin0 -> 14507 bytes
-rw-r--r--cards100/event_9.pngbin0 -> 102645 bytes
-rw-r--r--cards100/event_90.avifbin0 -> 14531 bytes
-rw-r--r--cards100/event_90.pngbin0 -> 99797 bytes
-rw-r--r--cards100/event_91.avifbin0 -> 9591 bytes
-rw-r--r--cards100/event_91.pngbin0 -> 68793 bytes
-rw-r--r--cards100/event_92.avifbin0 -> 11400 bytes
-rw-r--r--cards100/event_92.pngbin0 -> 79928 bytes
-rw-r--r--cards100/event_93.avifbin0 -> 11277 bytes
-rw-r--r--cards100/event_93.pngbin0 -> 79845 bytes
-rw-r--r--cards100/event_94.avifbin0 -> 17481 bytes
-rw-r--r--cards100/event_94.pngbin0 -> 107624 bytes
-rw-r--r--cards100/event_95.avifbin0 -> 8770 bytes
-rw-r--r--cards100/event_95.pngbin0 -> 77323 bytes
-rw-r--r--cards100/event_96.avifbin0 -> 14661 bytes
-rw-r--r--cards100/event_96.pngbin0 -> 104995 bytes
-rw-r--r--cards100/event_97.avifbin0 -> 11322 bytes
-rw-r--r--cards100/event_97.pngbin0 -> 83817 bytes
-rw-r--r--cards100/event_98.avifbin0 -> 10359 bytes
-rw-r--r--cards100/event_98.pngbin0 -> 75200 bytes
-rw-r--r--cards100/event_99.avifbin0 -> 10068 bytes
-rw-r--r--cards100/event_99.pngbin0 -> 74677 bytes
-rw-r--r--cards100/event_back.avifbin0 -> 7023 bytes
-rw-r--r--cards100/event_back.pngbin0 -> 93488 bytes
-rw-r--r--cards100/power_11_14.avifbin0 -> 6400 bytes
-rw-r--r--cards100/power_11_14.pngbin0 -> 38058 bytes
-rw-r--r--cards100/power_15_18.avifbin0 -> 6487 bytes
-rw-r--r--cards100/power_15_18.pngbin0 -> 38685 bytes
-rw-r--r--cards100/power_19_20.avifbin0 -> 11572 bytes
-rw-r--r--cards100/power_19_20.pngbin0 -> 61541 bytes
-rw-r--r--cards100/power_1_6.avifbin0 -> 8674 bytes
-rw-r--r--cards100/power_1_6.pngbin0 -> 47514 bytes
-rw-r--r--cards100/power_21_22.avifbin0 -> 11550 bytes
-rw-r--r--cards100/power_21_22.pngbin0 -> 61324 bytes
-rw-r--r--cards100/power_23_26.avifbin0 -> 11548 bytes
-rw-r--r--cards100/power_23_26.pngbin0 -> 61041 bytes
-rw-r--r--cards100/power_27_30.avifbin0 -> 11575 bytes
-rw-r--r--cards100/power_27_30.pngbin0 -> 61581 bytes
-rw-r--r--cards100/power_31_33.avifbin0 -> 6119 bytes
-rw-r--r--cards100/power_31_33.pngbin0 -> 36542 bytes
-rw-r--r--cards100/power_34_36.avifbin0 -> 6099 bytes
-rw-r--r--cards100/power_34_36.pngbin0 -> 36324 bytes
-rw-r--r--cards100/power_37.avifbin0 -> 7301 bytes
-rw-r--r--cards100/power_37.pngbin0 -> 41576 bytes
-rw-r--r--cards100/power_38.avifbin0 -> 6944 bytes
-rw-r--r--cards100/power_38.pngbin0 -> 38428 bytes
-rw-r--r--cards100/power_39.avifbin0 -> 7605 bytes
-rw-r--r--cards100/power_39.pngbin0 -> 42744 bytes
-rw-r--r--cards100/power_40.avifbin0 -> 6267 bytes
-rw-r--r--cards100/power_40.pngbin0 -> 34279 bytes
-rw-r--r--cards100/power_41.avifbin0 -> 6482 bytes
-rw-r--r--cards100/power_41.pngbin0 -> 35768 bytes
-rw-r--r--cards100/power_42.avifbin0 -> 7787 bytes
-rw-r--r--cards100/power_42.pngbin0 -> 43449 bytes
-rw-r--r--cards100/power_43.avifbin0 -> 5486 bytes
-rw-r--r--cards100/power_43.pngbin0 -> 30403 bytes
-rw-r--r--cards100/power_44.avifbin0 -> 5233 bytes
-rw-r--r--cards100/power_44.pngbin0 -> 28699 bytes
-rw-r--r--cards100/power_45.avifbin0 -> 5702 bytes
-rw-r--r--cards100/power_45.pngbin0 -> 32392 bytes
-rw-r--r--cards100/power_46.avifbin0 -> 9189 bytes
-rw-r--r--cards100/power_46.pngbin0 -> 52749 bytes
-rw-r--r--cards100/power_47.avifbin0 -> 8123 bytes
-rw-r--r--cards100/power_47.pngbin0 -> 44777 bytes
-rw-r--r--cards100/power_48.avifbin0 -> 9604 bytes
-rw-r--r--cards100/power_48.pngbin0 -> 56463 bytes
-rw-r--r--cards100/power_49.avifbin0 -> 5689 bytes
-rw-r--r--cards100/power_49.pngbin0 -> 29311 bytes
-rw-r--r--cards100/power_50.avifbin0 -> 7246 bytes
-rw-r--r--cards100/power_50.pngbin0 -> 38324 bytes
-rw-r--r--cards100/power_51.avifbin0 -> 7119 bytes
-rw-r--r--cards100/power_51.pngbin0 -> 37921 bytes
-rw-r--r--cards100/power_52.avifbin0 -> 8034 bytes
-rw-r--r--cards100/power_52.pngbin0 -> 42402 bytes
-rw-r--r--cards100/power_7_8.avifbin0 -> 6460 bytes
-rw-r--r--cards100/power_7_8.pngbin0 -> 38575 bytes
-rw-r--r--cards100/power_9_10.avifbin0 -> 6460 bytes
-rw-r--r--cards100/power_9_10.pngbin0 -> 38402 bytes
-rw-r--r--cards100/power_back.avifbin0 -> 7597 bytes
-rw-r--r--cards100/power_back.pngbin0 -> 88907 bytes
-rw-r--r--cards150/power_11_14.avifbin0 -> 5229 bytes
-rw-r--r--cards150/power_11_14.pngbin0 -> 47745 bytes
-rw-r--r--cards150/power_15_18.avifbin0 -> 5338 bytes
-rw-r--r--cards150/power_15_18.pngbin0 -> 48545 bytes
-rw-r--r--cards150/power_19_20.avifbin0 -> 10236 bytes
-rw-r--r--cards150/power_19_20.pngbin0 -> 75909 bytes
-rw-r--r--cards150/power_1_6.avifbin0 -> 7535 bytes
-rw-r--r--cards150/power_1_6.pngbin0 -> 56232 bytes
-rw-r--r--cards150/power_21_22.avifbin0 -> 10209 bytes
-rw-r--r--cards150/power_21_22.pngbin0 -> 75707 bytes
-rw-r--r--cards150/power_23_26.avifbin0 -> 10150 bytes
-rw-r--r--cards150/power_23_26.pngbin0 -> 75440 bytes
-rw-r--r--cards150/power_27_30.avifbin0 -> 10219 bytes
-rw-r--r--cards150/power_27_30.pngbin0 -> 75945 bytes
-rw-r--r--cards150/power_31_33.avifbin0 -> 5465 bytes
-rw-r--r--cards150/power_31_33.pngbin0 -> 45714 bytes
-rw-r--r--cards150/power_34_36.avifbin0 -> 5461 bytes
-rw-r--r--cards150/power_34_36.pngbin0 -> 45385 bytes
-rw-r--r--cards150/power_37.avifbin0 -> 6494 bytes
-rw-r--r--cards150/power_37.pngbin0 -> 52511 bytes
-rw-r--r--cards150/power_38.avifbin0 -> 5874 bytes
-rw-r--r--cards150/power_38.pngbin0 -> 46511 bytes
-rw-r--r--cards150/power_39.avifbin0 -> 6783 bytes
-rw-r--r--cards150/power_39.pngbin0 -> 52692 bytes
-rw-r--r--cards150/power_40.avifbin0 -> 5326 bytes
-rw-r--r--cards150/power_40.pngbin0 -> 42140 bytes
-rw-r--r--cards150/power_41.avifbin0 -> 5467 bytes
-rw-r--r--cards150/power_41.pngbin0 -> 42879 bytes
-rw-r--r--cards150/power_42.avifbin0 -> 7152 bytes
-rw-r--r--cards150/power_42.pngbin0 -> 53459 bytes
-rw-r--r--cards150/power_43.avifbin0 -> 4719 bytes
-rw-r--r--cards150/power_43.pngbin0 -> 37679 bytes
-rw-r--r--cards150/power_44.avifbin0 -> 4635 bytes
-rw-r--r--cards150/power_44.pngbin0 -> 36666 bytes
-rw-r--r--cards150/power_45.avifbin0 -> 4718 bytes
-rw-r--r--cards150/power_45.pngbin0 -> 37837 bytes
-rw-r--r--cards150/power_46.avifbin0 -> 8754 bytes
-rw-r--r--cards150/power_46.pngbin0 -> 65902 bytes
-rw-r--r--cards150/power_47.avifbin0 -> 7156 bytes
-rw-r--r--cards150/power_47.pngbin0 -> 54927 bytes
-rw-r--r--cards150/power_48.avifbin0 -> 8849 bytes
-rw-r--r--cards150/power_48.pngbin0 -> 68467 bytes
-rw-r--r--cards150/power_49.avifbin0 -> 5163 bytes
-rw-r--r--cards150/power_49.pngbin0 -> 35375 bytes
-rw-r--r--cards150/power_50.avifbin0 -> 6245 bytes
-rw-r--r--cards150/power_50.pngbin0 -> 45351 bytes
-rw-r--r--cards150/power_51.avifbin0 -> 6531 bytes
-rw-r--r--cards150/power_51.pngbin0 -> 46021 bytes
-rw-r--r--cards150/power_52.avifbin0 -> 7369 bytes
-rw-r--r--cards150/power_52.pngbin0 -> 52690 bytes
-rw-r--r--cards150/power_7_8.avifbin0 -> 5290 bytes
-rw-r--r--cards150/power_7_8.pngbin0 -> 48453 bytes
-rw-r--r--cards150/power_9_10.avifbin0 -> 5261 bytes
-rw-r--r--cards150/power_9_10.pngbin0 -> 48211 bytes
-rw-r--r--cards150/power_back.avifbin0 -> 6271 bytes
-rw-r--r--cards150/power_back.pngbin0 -> 179479 bytes
-rw-r--r--cards200/event_1.avifbin0 -> 15431 bytes
-rw-r--r--cards200/event_1.pngbin0 -> 259615 bytes
-rw-r--r--cards200/event_1.webpbin0 -> 22350 bytes
-rw-r--r--cards200/event_10.avifbin0 -> 14788 bytes
-rw-r--r--cards200/event_10.pngbin0 -> 277835 bytes
-rw-r--r--cards200/event_10.webpbin0 -> 21930 bytes
-rw-r--r--cards200/event_100.avifbin0 -> 19991 bytes
-rw-r--r--cards200/event_100.pngbin0 -> 327789 bytes
-rw-r--r--cards200/event_100.webpbin0 -> 28526 bytes
-rw-r--r--cards200/event_101.avifbin0 -> 16443 bytes
-rw-r--r--cards200/event_101.pngbin0 -> 296226 bytes
-rw-r--r--cards200/event_101.webpbin0 -> 24516 bytes
-rw-r--r--cards200/event_102.avifbin0 -> 20056 bytes
-rw-r--r--cards200/event_102.pngbin0 -> 341430 bytes
-rw-r--r--cards200/event_102.webpbin0 -> 30552 bytes
-rw-r--r--cards200/event_103.avifbin0 -> 13907 bytes
-rw-r--r--cards200/event_103.pngbin0 -> 265631 bytes
-rw-r--r--cards200/event_103.webpbin0 -> 20810 bytes
-rw-r--r--cards200/event_104.avifbin0 -> 28256 bytes
-rw-r--r--cards200/event_104.pngbin0 -> 404806 bytes
-rw-r--r--cards200/event_104.webpbin0 -> 43226 bytes
-rw-r--r--cards200/event_105.avifbin0 -> 16930 bytes
-rw-r--r--cards200/event_105.pngbin0 -> 206282 bytes
-rw-r--r--cards200/event_105.webpbin0 -> 23432 bytes
-rw-r--r--cards200/event_106.avifbin0 -> 16601 bytes
-rw-r--r--cards200/event_106.pngbin0 -> 282693 bytes
-rw-r--r--cards200/event_106.webpbin0 -> 25060 bytes
-rw-r--r--cards200/event_107.avifbin0 -> 29213 bytes
-rw-r--r--cards200/event_107.pngbin0 -> 392446 bytes
-rw-r--r--cards200/event_107.webpbin0 -> 42920 bytes
-rw-r--r--cards200/event_108.avifbin0 -> 13030 bytes
-rw-r--r--cards200/event_108.pngbin0 -> 277705 bytes
-rw-r--r--cards200/event_108.webpbin0 -> 19800 bytes
-rw-r--r--cards200/event_109.avifbin0 -> 24766 bytes
-rw-r--r--cards200/event_109.pngbin0 -> 352205 bytes
-rw-r--r--cards200/event_109.webpbin0 -> 36686 bytes
-rw-r--r--cards200/event_11.avifbin0 -> 13424 bytes
-rw-r--r--cards200/event_11.pngbin0 -> 190177 bytes
-rw-r--r--cards200/event_11.webpbin0 -> 18752 bytes
-rw-r--r--cards200/event_110.avifbin0 -> 19530 bytes
-rw-r--r--cards200/event_110.pngbin0 -> 283675 bytes
-rw-r--r--cards200/event_110.webpbin0 -> 28880 bytes
-rw-r--r--cards200/event_12.avifbin0 -> 13510 bytes
-rw-r--r--cards200/event_12.pngbin0 -> 271825 bytes
-rw-r--r--cards200/event_12.webpbin0 -> 19736 bytes
-rw-r--r--cards200/event_13.avifbin0 -> 14567 bytes
-rw-r--r--cards200/event_13.pngbin0 -> 179873 bytes
-rw-r--r--cards200/event_13.webpbin0 -> 21184 bytes
-rw-r--r--cards200/event_14.avifbin0 -> 15895 bytes
-rw-r--r--cards200/event_14.pngbin0 -> 302836 bytes
-rw-r--r--cards200/event_14.webpbin0 -> 24190 bytes
-rw-r--r--cards200/event_15.avifbin0 -> 18137 bytes
-rw-r--r--cards200/event_15.pngbin0 -> 337976 bytes
-rw-r--r--cards200/event_15.webpbin0 -> 27766 bytes
-rw-r--r--cards200/event_16.avifbin0 -> 27352 bytes
-rw-r--r--cards200/event_16.pngbin0 -> 362142 bytes
-rw-r--r--cards200/event_16.webpbin0 -> 37778 bytes
-rw-r--r--cards200/event_17.avifbin0 -> 30929 bytes
-rw-r--r--cards200/event_17.pngbin0 -> 399237 bytes
-rw-r--r--cards200/event_17.webpbin0 -> 43882 bytes
-rw-r--r--cards200/event_18.avifbin0 -> 26353 bytes
-rw-r--r--cards200/event_18.pngbin0 -> 354207 bytes
-rw-r--r--cards200/event_18.webpbin0 -> 35604 bytes
-rw-r--r--cards200/event_19.avifbin0 -> 34802 bytes
-rw-r--r--cards200/event_19.pngbin0 -> 371538 bytes
-rw-r--r--cards200/event_19.webpbin0 -> 43662 bytes
-rw-r--r--cards200/event_2.avifbin0 -> 19825 bytes
-rw-r--r--cards200/event_2.pngbin0 -> 345023 bytes
-rw-r--r--cards200/event_2.webpbin0 -> 30412 bytes
-rw-r--r--cards200/event_20.avifbin0 -> 18246 bytes
-rw-r--r--cards200/event_20.pngbin0 -> 306673 bytes
-rw-r--r--cards200/event_20.webpbin0 -> 27616 bytes
-rw-r--r--cards200/event_21.avifbin0 -> 15285 bytes
-rw-r--r--cards200/event_21.pngbin0 -> 297010 bytes
-rw-r--r--cards200/event_21.webpbin0 -> 23124 bytes
-rw-r--r--cards200/event_22.avifbin0 -> 22661 bytes
-rw-r--r--cards200/event_22.pngbin0 -> 353902 bytes
-rw-r--r--cards200/event_22.webpbin0 -> 34340 bytes
-rw-r--r--cards200/event_23.avifbin0 -> 11067 bytes
-rw-r--r--cards200/event_23.pngbin0 -> 230720 bytes
-rw-r--r--cards200/event_23.webpbin0 -> 18116 bytes
-rw-r--r--cards200/event_24.avifbin0 -> 18692 bytes
-rw-r--r--cards200/event_24.pngbin0 -> 322090 bytes
-rw-r--r--cards200/event_24.webpbin0 -> 27452 bytes
-rw-r--r--cards200/event_25.avifbin0 -> 10366 bytes
-rw-r--r--cards200/event_25.pngbin0 -> 243225 bytes
-rw-r--r--cards200/event_25.webpbin0 -> 15978 bytes
-rw-r--r--cards200/event_26.avifbin0 -> 18433 bytes
-rw-r--r--cards200/event_26.pngbin0 -> 320783 bytes
-rw-r--r--cards200/event_26.webpbin0 -> 28136 bytes
-rw-r--r--cards200/event_27.avifbin0 -> 14801 bytes
-rw-r--r--cards200/event_27.pngbin0 -> 227552 bytes
-rw-r--r--cards200/event_27.webpbin0 -> 21480 bytes
-rw-r--r--cards200/event_28.avifbin0 -> 15610 bytes
-rw-r--r--cards200/event_28.pngbin0 -> 268870 bytes
-rw-r--r--cards200/event_28.webpbin0 -> 22564 bytes
-rw-r--r--cards200/event_29.avifbin0 -> 18966 bytes
-rw-r--r--cards200/event_29.pngbin0 -> 291363 bytes
-rw-r--r--cards200/event_29.webpbin0 -> 26612 bytes
-rw-r--r--cards200/event_3.avifbin0 -> 16696 bytes
-rw-r--r--cards200/event_3.pngbin0 -> 319603 bytes
-rw-r--r--cards200/event_3.webpbin0 -> 25296 bytes
-rw-r--r--cards200/event_30.avifbin0 -> 13587 bytes
-rw-r--r--cards200/event_30.pngbin0 -> 279505 bytes
-rw-r--r--cards200/event_30.webpbin0 -> 20976 bytes
-rw-r--r--cards200/event_31.avifbin0 -> 11871 bytes
-rw-r--r--cards200/event_31.pngbin0 -> 234244 bytes
-rw-r--r--cards200/event_31.webpbin0 -> 17934 bytes
-rw-r--r--cards200/event_32.avifbin0 -> 20660 bytes
-rw-r--r--cards200/event_32.pngbin0 -> 295166 bytes
-rw-r--r--cards200/event_32.webpbin0 -> 28120 bytes
-rw-r--r--cards200/event_33.avifbin0 -> 13251 bytes
-rw-r--r--cards200/event_33.pngbin0 -> 248488 bytes
-rw-r--r--cards200/event_33.webpbin0 -> 19478 bytes
-rw-r--r--cards200/event_34.avifbin0 -> 9499 bytes
-rw-r--r--cards200/event_34.pngbin0 -> 156815 bytes
-rw-r--r--cards200/event_34.webpbin0 -> 14114 bytes
-rw-r--r--cards200/event_35.avifbin0 -> 19786 bytes
-rw-r--r--cards200/event_35.pngbin0 -> 305325 bytes
-rw-r--r--cards200/event_35.webpbin0 -> 28194 bytes
-rw-r--r--cards200/event_36.avifbin0 -> 21680 bytes
-rw-r--r--cards200/event_36.pngbin0 -> 351686 bytes
-rw-r--r--cards200/event_36.webpbin0 -> 33902 bytes
-rw-r--r--cards200/event_37.avifbin0 -> 22785 bytes
-rw-r--r--cards200/event_37.pngbin0 -> 337289 bytes
-rw-r--r--cards200/event_37.webpbin0 -> 32056 bytes
-rw-r--r--cards200/event_38.avifbin0 -> 12260 bytes
-rw-r--r--cards200/event_38.pngbin0 -> 267869 bytes
-rw-r--r--cards200/event_38.webpbin0 -> 18174 bytes
-rw-r--r--cards200/event_39.avifbin0 -> 10494 bytes
-rw-r--r--cards200/event_39.pngbin0 -> 98163 bytes
-rw-r--r--cards200/event_39.webpbin0 -> 15458 bytes
-rw-r--r--cards200/event_4.avifbin0 -> 13000 bytes
-rw-r--r--cards200/event_4.pngbin0 -> 268051 bytes
-rw-r--r--cards200/event_4.webpbin0 -> 19848 bytes
-rw-r--r--cards200/event_40.avifbin0 -> 16579 bytes
-rw-r--r--cards200/event_40.pngbin0 -> 214220 bytes
-rw-r--r--cards200/event_40.webpbin0 -> 22484 bytes
-rw-r--r--cards200/event_41.avifbin0 -> 19109 bytes
-rw-r--r--cards200/event_41.pngbin0 -> 288966 bytes
-rw-r--r--cards200/event_41.webpbin0 -> 28206 bytes
-rw-r--r--cards200/event_42.avifbin0 -> 27868 bytes
-rw-r--r--cards200/event_42.pngbin0 -> 373767 bytes
-rw-r--r--cards200/event_42.webpbin0 -> 40342 bytes
-rw-r--r--cards200/event_43.avifbin0 -> 12937 bytes
-rw-r--r--cards200/event_43.pngbin0 -> 267196 bytes
-rw-r--r--cards200/event_43.webpbin0 -> 21388 bytes
-rw-r--r--cards200/event_44.avifbin0 -> 26028 bytes
-rw-r--r--cards200/event_44.pngbin0 -> 343099 bytes
-rw-r--r--cards200/event_44.webpbin0 -> 39526 bytes
-rw-r--r--cards200/event_45.avifbin0 -> 16832 bytes
-rw-r--r--cards200/event_45.pngbin0 -> 298622 bytes
-rw-r--r--cards200/event_45.webpbin0 -> 25076 bytes
-rw-r--r--cards200/event_46.avifbin0 -> 22078 bytes
-rw-r--r--cards200/event_46.pngbin0 -> 366622 bytes
-rw-r--r--cards200/event_46.webpbin0 -> 34162 bytes
-rw-r--r--cards200/event_47.avifbin0 -> 15329 bytes
-rw-r--r--cards200/event_47.pngbin0 -> 283489 bytes
-rw-r--r--cards200/event_47.webpbin0 -> 22860 bytes
-rw-r--r--cards200/event_48.avifbin0 -> 16762 bytes
-rw-r--r--cards200/event_48.pngbin0 -> 301210 bytes
-rw-r--r--cards200/event_48.webpbin0 -> 26066 bytes
-rw-r--r--cards200/event_49.avifbin0 -> 15860 bytes
-rw-r--r--cards200/event_49.pngbin0 -> 184309 bytes
-rw-r--r--cards200/event_49.webpbin0 -> 22874 bytes
-rw-r--r--cards200/event_5.avifbin0 -> 30177 bytes
-rw-r--r--cards200/event_5.pngbin0 -> 411265 bytes
-rw-r--r--cards200/event_5.webpbin0 -> 45064 bytes
-rw-r--r--cards200/event_50.avifbin0 -> 11421 bytes
-rw-r--r--cards200/event_50.pngbin0 -> 224707 bytes
-rw-r--r--cards200/event_50.webpbin0 -> 16744 bytes
-rw-r--r--cards200/event_51.avifbin0 -> 20173 bytes
-rw-r--r--cards200/event_51.pngbin0 -> 294064 bytes
-rw-r--r--cards200/event_51.webpbin0 -> 28646 bytes
-rw-r--r--cards200/event_52.avifbin0 -> 12115 bytes
-rw-r--r--cards200/event_52.pngbin0 -> 246973 bytes
-rw-r--r--cards200/event_52.webpbin0 -> 18056 bytes
-rw-r--r--cards200/event_53.avifbin0 -> 14985 bytes
-rw-r--r--cards200/event_53.pngbin0 -> 308357 bytes
-rw-r--r--cards200/event_53.webpbin0 -> 23846 bytes
-rw-r--r--cards200/event_54.avifbin0 -> 20308 bytes
-rw-r--r--cards200/event_54.pngbin0 -> 367897 bytes
-rw-r--r--cards200/event_54.webpbin0 -> 33854 bytes
-rw-r--r--cards200/event_55.avifbin0 -> 20181 bytes
-rw-r--r--cards200/event_55.pngbin0 -> 340090 bytes
-rw-r--r--cards200/event_55.webpbin0 -> 31286 bytes
-rw-r--r--cards200/event_56.avifbin0 -> 17542 bytes
-rw-r--r--cards200/event_56.pngbin0 -> 308871 bytes
-rw-r--r--cards200/event_56.webpbin0 -> 25506 bytes
-rw-r--r--cards200/event_57.avifbin0 -> 13991 bytes
-rw-r--r--cards200/event_57.pngbin0 -> 274039 bytes
-rw-r--r--cards200/event_57.webpbin0 -> 20842 bytes
-rw-r--r--cards200/event_58.avifbin0 -> 19504 bytes
-rw-r--r--cards200/event_58.pngbin0 -> 334416 bytes
-rw-r--r--cards200/event_58.webpbin0 -> 29286 bytes
-rw-r--r--cards200/event_59.avifbin0 -> 20491 bytes
-rw-r--r--cards200/event_59.pngbin0 -> 319998 bytes
-rw-r--r--cards200/event_59.webpbin0 -> 29146 bytes
-rw-r--r--cards200/event_6.avifbin0 -> 14750 bytes
-rw-r--r--cards200/event_6.pngbin0 -> 290894 bytes
-rw-r--r--cards200/event_6.webpbin0 -> 22944 bytes
-rw-r--r--cards200/event_60.avifbin0 -> 8429 bytes
-rw-r--r--cards200/event_60.pngbin0 -> 189771 bytes
-rw-r--r--cards200/event_60.webpbin0 -> 13096 bytes
-rw-r--r--cards200/event_61.avifbin0 -> 32413 bytes
-rw-r--r--cards200/event_61.pngbin0 -> 411497 bytes
-rw-r--r--cards200/event_61.webpbin0 -> 47392 bytes
-rw-r--r--cards200/event_62.avifbin0 -> 18162 bytes
-rw-r--r--cards200/event_62.pngbin0 -> 318732 bytes
-rw-r--r--cards200/event_62.webpbin0 -> 28210 bytes
-rw-r--r--cards200/event_63.avifbin0 -> 12387 bytes
-rw-r--r--cards200/event_63.pngbin0 -> 238860 bytes
-rw-r--r--cards200/event_63.webpbin0 -> 18680 bytes
-rw-r--r--cards200/event_64.avifbin0 -> 21117 bytes
-rw-r--r--cards200/event_64.pngbin0 -> 316967 bytes
-rw-r--r--cards200/event_64.webpbin0 -> 30368 bytes
-rw-r--r--cards200/event_65.avifbin0 -> 16189 bytes
-rw-r--r--cards200/event_65.pngbin0 -> 299827 bytes
-rw-r--r--cards200/event_65.webpbin0 -> 23714 bytes
-rw-r--r--cards200/event_66.avifbin0 -> 13816 bytes
-rw-r--r--cards200/event_66.pngbin0 -> 257061 bytes
-rw-r--r--cards200/event_66.webpbin0 -> 20022 bytes
-rw-r--r--cards200/event_67.avifbin0 -> 14785 bytes
-rw-r--r--cards200/event_67.pngbin0 -> 300107 bytes
-rw-r--r--cards200/event_67.webpbin0 -> 22958 bytes
-rw-r--r--cards200/event_68.avifbin0 -> 15572 bytes
-rw-r--r--cards200/event_68.pngbin0 -> 314811 bytes
-rw-r--r--cards200/event_68.webpbin0 -> 23344 bytes
-rw-r--r--cards200/event_69.avifbin0 -> 21293 bytes
-rw-r--r--cards200/event_69.pngbin0 -> 342266 bytes
-rw-r--r--cards200/event_69.webpbin0 -> 32722 bytes
-rw-r--r--cards200/event_7.avifbin0 -> 9901 bytes
-rw-r--r--cards200/event_7.pngbin0 -> 243802 bytes
-rw-r--r--cards200/event_7.webpbin0 -> 15060 bytes
-rw-r--r--cards200/event_70.avifbin0 -> 15121 bytes
-rw-r--r--cards200/event_70.pngbin0 -> 278964 bytes
-rw-r--r--cards200/event_70.webpbin0 -> 23132 bytes
-rw-r--r--cards200/event_71.avifbin0 -> 13257 bytes
-rw-r--r--cards200/event_71.pngbin0 -> 274514 bytes
-rw-r--r--cards200/event_71.webpbin0 -> 20598 bytes
-rw-r--r--cards200/event_72.avifbin0 -> 25473 bytes
-rw-r--r--cards200/event_72.pngbin0 -> 343171 bytes
-rw-r--r--cards200/event_72.webpbin0 -> 37304 bytes
-rw-r--r--cards200/event_73.avifbin0 -> 17374 bytes
-rw-r--r--cards200/event_73.pngbin0 -> 282944 bytes
-rw-r--r--cards200/event_73.webpbin0 -> 26904 bytes
-rw-r--r--cards200/event_74.avifbin0 -> 13495 bytes
-rw-r--r--cards200/event_74.pngbin0 -> 278914 bytes
-rw-r--r--cards200/event_74.webpbin0 -> 20696 bytes
-rw-r--r--cards200/event_75.avifbin0 -> 16355 bytes
-rw-r--r--cards200/event_75.pngbin0 -> 288703 bytes
-rw-r--r--cards200/event_75.webpbin0 -> 25030 bytes
-rw-r--r--cards200/event_76.avifbin0 -> 19001 bytes
-rw-r--r--cards200/event_76.pngbin0 -> 290812 bytes
-rw-r--r--cards200/event_76.webpbin0 -> 29456 bytes
-rw-r--r--cards200/event_77.avifbin0 -> 22123 bytes
-rw-r--r--cards200/event_77.pngbin0 -> 329122 bytes
-rw-r--r--cards200/event_77.webpbin0 -> 32826 bytes
-rw-r--r--cards200/event_78.avifbin0 -> 17546 bytes
-rw-r--r--cards200/event_78.pngbin0 -> 301561 bytes
-rw-r--r--cards200/event_78.webpbin0 -> 26690 bytes
-rw-r--r--cards200/event_79.avifbin0 -> 19108 bytes
-rw-r--r--cards200/event_79.pngbin0 -> 307939 bytes
-rw-r--r--cards200/event_79.webpbin0 -> 27756 bytes
-rw-r--r--cards200/event_8.avifbin0 -> 11231 bytes
-rw-r--r--cards200/event_8.pngbin0 -> 267101 bytes
-rw-r--r--cards200/event_8.webpbin0 -> 16950 bytes
-rw-r--r--cards200/event_80.avifbin0 -> 17962 bytes
-rw-r--r--cards200/event_80.pngbin0 -> 289690 bytes
-rw-r--r--cards200/event_80.webpbin0 -> 26998 bytes
-rw-r--r--cards200/event_81.avifbin0 -> 17818 bytes
-rw-r--r--cards200/event_81.pngbin0 -> 302357 bytes
-rw-r--r--cards200/event_81.webpbin0 -> 26520 bytes
-rw-r--r--cards200/event_82.avifbin0 -> 12037 bytes
-rw-r--r--cards200/event_82.pngbin0 -> 209097 bytes
-rw-r--r--cards200/event_82.webpbin0 -> 17286 bytes
-rw-r--r--cards200/event_83.avifbin0 -> 15407 bytes
-rw-r--r--cards200/event_83.pngbin0 -> 277694 bytes
-rw-r--r--cards200/event_83.webpbin0 -> 23620 bytes
-rw-r--r--cards200/event_84.avifbin0 -> 33334 bytes
-rw-r--r--cards200/event_84.pngbin0 -> 421097 bytes
-rw-r--r--cards200/event_84.webpbin0 -> 48568 bytes
-rw-r--r--cards200/event_85.avifbin0 -> 13548 bytes
-rw-r--r--cards200/event_85.pngbin0 -> 308200 bytes
-rw-r--r--cards200/event_85.webpbin0 -> 20308 bytes
-rw-r--r--cards200/event_86.avifbin0 -> 19605 bytes
-rw-r--r--cards200/event_86.pngbin0 -> 364045 bytes
-rw-r--r--cards200/event_86.webpbin0 -> 31378 bytes
-rw-r--r--cards200/event_87.avifbin0 -> 23007 bytes
-rw-r--r--cards200/event_87.pngbin0 -> 342680 bytes
-rw-r--r--cards200/event_87.webpbin0 -> 33610 bytes
-rw-r--r--cards200/event_88.avifbin0 -> 18371 bytes
-rw-r--r--cards200/event_88.pngbin0 -> 301693 bytes
-rw-r--r--cards200/event_88.webpbin0 -> 27868 bytes
-rw-r--r--cards200/event_89.avifbin0 -> 26693 bytes
-rw-r--r--cards200/event_89.pngbin0 -> 365522 bytes
-rw-r--r--cards200/event_89.webpbin0 -> 37128 bytes
-rw-r--r--cards200/event_9.avifbin0 -> 23039 bytes
-rw-r--r--cards200/event_9.pngbin0 -> 369097 bytes
-rw-r--r--cards200/event_9.webpbin0 -> 34810 bytes
-rw-r--r--cards200/event_90.avifbin0 -> 21171 bytes
-rw-r--r--cards200/event_90.pngbin0 -> 332210 bytes
-rw-r--r--cards200/event_90.webpbin0 -> 32194 bytes
-rw-r--r--cards200/event_91.avifbin0 -> 14083 bytes
-rw-r--r--cards200/event_91.pngbin0 -> 231620 bytes
-rw-r--r--cards200/event_91.webpbin0 -> 20422 bytes
-rw-r--r--cards200/event_92.avifbin0 -> 15652 bytes
-rw-r--r--cards200/event_92.pngbin0 -> 284812 bytes
-rw-r--r--cards200/event_92.webpbin0 -> 23216 bytes
-rw-r--r--cards200/event_93.avifbin0 -> 17056 bytes
-rw-r--r--cards200/event_93.pngbin0 -> 260380 bytes
-rw-r--r--cards200/event_93.webpbin0 -> 25820 bytes
-rw-r--r--cards200/event_94.avifbin0 -> 28299 bytes
-rw-r--r--cards200/event_94.pngbin0 -> 388087 bytes
-rw-r--r--cards200/event_94.webpbin0 -> 40108 bytes
-rw-r--r--cards200/event_95.avifbin0 -> 11914 bytes
-rw-r--r--cards200/event_95.pngbin0 -> 238004 bytes
-rw-r--r--cards200/event_95.webpbin0 -> 19088 bytes
-rw-r--r--cards200/event_96.avifbin0 -> 23030 bytes
-rw-r--r--cards200/event_96.pngbin0 -> 372006 bytes
-rw-r--r--cards200/event_96.webpbin0 -> 34992 bytes
-rw-r--r--cards200/event_97.avifbin0 -> 18610 bytes
-rw-r--r--cards200/event_97.pngbin0 -> 314185 bytes
-rw-r--r--cards200/event_97.webpbin0 -> 28138 bytes
-rw-r--r--cards200/event_98.avifbin0 -> 14944 bytes
-rw-r--r--cards200/event_98.pngbin0 -> 285419 bytes
-rw-r--r--cards200/event_98.webpbin0 -> 23106 bytes
-rw-r--r--cards200/event_99.avifbin0 -> 15531 bytes
-rw-r--r--cards200/event_99.pngbin0 -> 235551 bytes
-rw-r--r--cards200/event_99.webpbin0 -> 22670 bytes
-rw-r--r--cards200/event_back.avifbin0 -> 7318 bytes
-rw-r--r--cards200/event_back.pngbin0 -> 372035 bytes
-rw-r--r--cards200/event_back.webpbin0 -> 13162 bytes
-rw-r--r--cards200/power_11_14.pngbin0 -> 77721 bytes
-rw-r--r--cards200/power_15_18.pngbin0 -> 79359 bytes
-rw-r--r--cards200/power_19_20.pngbin0 -> 135381 bytes
-rw-r--r--cards200/power_1_6.pngbin0 -> 97989 bytes
-rw-r--r--cards200/power_21_22.pngbin0 -> 134849 bytes
-rw-r--r--cards200/power_23_26.pngbin0 -> 134244 bytes
-rw-r--r--cards200/power_27_30.pngbin0 -> 135502 bytes
-rw-r--r--cards200/power_31_33.pngbin0 -> 78200 bytes
-rw-r--r--cards200/power_34_36.pngbin0 -> 77631 bytes
-rw-r--r--cards200/power_37.pngbin0 -> 95613 bytes
-rw-r--r--cards200/power_38.pngbin0 -> 80927 bytes
-rw-r--r--cards200/power_39.pngbin0 -> 95897 bytes
-rw-r--r--cards200/power_40.pngbin0 -> 73691 bytes
-rw-r--r--cards200/power_41.pngbin0 -> 76173 bytes
-rw-r--r--cards200/power_42.pngbin0 -> 100072 bytes
-rw-r--r--cards200/power_43.pngbin0 -> 66373 bytes
-rw-r--r--cards200/power_44.pngbin0 -> 66348 bytes
-rw-r--r--cards200/power_45.pngbin0 -> 66027 bytes
-rw-r--r--cards200/power_46.pngbin0 -> 125682 bytes
-rw-r--r--cards200/power_47.pngbin0 -> 102159 bytes
-rw-r--r--cards200/power_48.pngbin0 -> 130883 bytes
-rw-r--r--cards200/power_49.pngbin0 -> 60660 bytes
-rw-r--r--cards200/power_50.pngbin0 -> 80368 bytes
-rw-r--r--cards200/power_51.pngbin0 -> 79523 bytes
-rw-r--r--cards200/power_52.pngbin0 -> 91454 bytes
-rw-r--r--cards200/power_7_8.pngbin0 -> 79130 bytes
-rw-r--r--cards200/power_9_10.pngbin0 -> 78478 bytes
-rw-r--r--cards200/power_back.pngbin0 -> 319956 bytes
-rw-r--r--cards75/power_11_14.avifbin0 -> 4722 bytes
-rw-r--r--cards75/power_11_14.pngbin0 -> 27616 bytes
-rw-r--r--cards75/power_15_18.avifbin0 -> 4775 bytes
-rw-r--r--cards75/power_15_18.pngbin0 -> 27962 bytes
-rw-r--r--cards75/power_19_20.avifbin0 -> 8170 bytes
-rw-r--r--cards75/power_19_20.pngbin0 -> 42427 bytes
-rw-r--r--cards75/power_1_6.avifbin0 -> 6346 bytes
-rw-r--r--cards75/power_1_6.pngbin0 -> 33456 bytes
-rw-r--r--cards75/power_21_22.avifbin0 -> 8116 bytes
-rw-r--r--cards75/power_21_22.pngbin0 -> 42296 bytes
-rw-r--r--cards75/power_23_26.avifbin0 -> 8096 bytes
-rw-r--r--cards75/power_23_26.pngbin0 -> 42154 bytes
-rw-r--r--cards75/power_27_30.avifbin0 -> 8185 bytes
-rw-r--r--cards75/power_27_30.pngbin0 -> 42441 bytes
-rw-r--r--cards75/power_31_33.avifbin0 -> 4395 bytes
-rw-r--r--cards75/power_31_33.pngbin0 -> 25599 bytes
-rw-r--r--cards75/power_34_36.avifbin0 -> 4376 bytes
-rw-r--r--cards75/power_34_36.pngbin0 -> 25473 bytes
-rw-r--r--cards75/power_37.avifbin0 -> 5125 bytes
-rw-r--r--cards75/power_37.pngbin0 -> 28776 bytes
-rw-r--r--cards75/power_38.avifbin0 -> 5011 bytes
-rw-r--r--cards75/power_38.pngbin0 -> 27499 bytes
-rw-r--r--cards75/power_39.avifbin0 -> 5362 bytes
-rw-r--r--cards75/power_39.pngbin0 -> 29822 bytes
-rw-r--r--cards75/power_40.avifbin0 -> 4461 bytes
-rw-r--r--cards75/power_40.pngbin0 -> 24275 bytes
-rw-r--r--cards75/power_41.avifbin0 -> 4693 bytes
-rw-r--r--cards75/power_41.pngbin0 -> 25238 bytes
-rw-r--r--cards75/power_42.avifbin0 -> 5519 bytes
-rw-r--r--cards75/power_42.pngbin0 -> 30121 bytes
-rw-r--r--cards75/power_43.avifbin0 -> 3936 bytes
-rw-r--r--cards75/power_43.pngbin0 -> 21595 bytes
-rw-r--r--cards75/power_44.avifbin0 -> 3732 bytes
-rw-r--r--cards75/power_44.pngbin0 -> 20414 bytes
-rw-r--r--cards75/power_45.avifbin0 -> 4254 bytes
-rw-r--r--cards75/power_45.pngbin0 -> 23051 bytes
-rw-r--r--cards75/power_46.avifbin0 -> 6361 bytes
-rw-r--r--cards75/power_46.pngbin0 -> 36124 bytes
-rw-r--r--cards75/power_47.avifbin0 -> 5658 bytes
-rw-r--r--cards75/power_47.pngbin0 -> 30728 bytes
-rw-r--r--cards75/power_48.avifbin0 -> 6765 bytes
-rw-r--r--cards75/power_48.pngbin0 -> 38695 bytes
-rw-r--r--cards75/power_49.avifbin0 -> 4112 bytes
-rw-r--r--cards75/power_49.pngbin0 -> 20622 bytes
-rw-r--r--cards75/power_50.avifbin0 -> 5241 bytes
-rw-r--r--cards75/power_50.pngbin0 -> 27130 bytes
-rw-r--r--cards75/power_51.avifbin0 -> 5126 bytes
-rw-r--r--cards75/power_51.pngbin0 -> 26487 bytes
-rw-r--r--cards75/power_52.avifbin0 -> 5647 bytes
-rw-r--r--cards75/power_52.pngbin0 -> 29560 bytes
-rw-r--r--cards75/power_7_8.avifbin0 -> 4771 bytes
-rw-r--r--cards75/power_7_8.pngbin0 -> 27880 bytes
-rw-r--r--cards75/power_9_10.avifbin0 -> 4739 bytes
-rw-r--r--cards75/power_9_10.pngbin0 -> 27771 bytes
-rw-r--r--cards75/power_back.avifbin0 -> 5387 bytes
-rw-r--r--cards75/power_back.pngbin0 -> 50112 bytes
-rw-r--r--cards_2/ps1.gifbin12989 -> 0 bytes
-rw-r--r--cards_2/ps10.gifbin11046 -> 0 bytes
-rw-r--r--cards_2/ps11.gifbin11029 -> 0 bytes
-rw-r--r--cards_2/ps12.gifbin12107 -> 0 bytes
-rw-r--r--cards_2/ps13.gifbin10798 -> 0 bytes
-rw-r--r--cards_2/ps14.gifbin11340 -> 0 bytes
-rw-r--r--cards_2/ps15.gifbin9963 -> 0 bytes
-rw-r--r--cards_2/ps16.gifbin9427 -> 0 bytes
-rw-r--r--cards_2/ps17.gifbin10657 -> 0 bytes
-rw-r--r--cards_2/ps18.gifbin9394 -> 0 bytes
-rw-r--r--cards_2/ps19.gifbin9370 -> 0 bytes
-rw-r--r--cards_2/ps2.gifbin12816 -> 0 bytes
-rw-r--r--cards_2/ps20.gifbin9022 -> 0 bytes
-rw-r--r--cards_2/ps21.gifbin11928 -> 0 bytes
-rw-r--r--cards_2/ps22.gifbin11208 -> 0 bytes
-rw-r--r--cards_2/ps23.gifbin15085 -> 0 bytes
-rw-r--r--cards_2/ps24.gifbin8340 -> 0 bytes
-rw-r--r--cards_2/ps25.gifbin10627 -> 0 bytes
-rw-r--r--cards_2/ps26.gifbin9910 -> 0 bytes
-rw-r--r--cards_2/ps27.gifbin11695 -> 0 bytes
-rw-r--r--cards_2/ps3.gifbin12752 -> 0 bytes
-rw-r--r--cards_2/ps4.gifbin12713 -> 0 bytes
-rw-r--r--cards_2/ps5.gifbin12776 -> 0 bytes
-rw-r--r--cards_2/ps6.gifbin15057 -> 0 bytes
-rw-r--r--cards_2/ps7.gifbin15033 -> 0 bytes
-rw-r--r--cards_2/ps8.gifbin14977 -> 0 bytes
-rw-r--r--cards_2/ps9.gifbin15088 -> 0 bytes
-rw-r--r--cover.1x.jpgbin21853 -> 22474 bytes
-rw-r--r--cover.1x.pngbin56446 -> 56446 bytes
-rw-r--r--cover.2x.jpgbin66712 -> 69090 bytes
-rw-r--r--cover.2x.pngbin206110 -> 206110 bytes
-rw-r--r--data.js1702
-rw-r--r--events.txt294
-rw-r--r--favicon.pngbin10723 -> 0 bytes
-rw-r--r--images/Event_Marker_Austria_Hungar.gifbin5229 -> 0 bytes
-rw-r--r--images/Event_Marker_Eco_Glasnost.gifbin3849 -> 0 bytes
-rw-r--r--images/Event_Marker_Elena.gifbin5472 -> 0 bytes
-rw-r--r--images/Event_Marker_Foreign_Curren.gifbin5612 -> 0 bytes
-rw-r--r--images/Event_Marker_Grenz_Truppen.gifbin6114 -> 0 bytes
-rw-r--r--images/Event_Marker_Helsinki.gifbin4732 -> 0 bytes
-rw-r--r--images/Event_Marker_Honecker.gifbin5660 -> 0 bytes
-rw-r--r--images/Event_Marker_Laszlo.gifbin4389 -> 0 bytes
-rw-r--r--images/Event_Marker_Li_Peng_.gifbin4496 -> 0 bytes
-rw-r--r--images/Event_Marker_NYE_Party.gifbin5383 -> 0 bytes
-rw-r--r--images/Event_Marker_Pres_Visit.gifbin6248 -> 0 bytes
-rw-r--r--images/Event_Marker_Securitate.gifbin5847 -> 0 bytes
-rw-r--r--images/Event_Marker_Solidarity_Leg.gifbin4948 -> 0 bytes
-rw-r--r--images/Event_Marker_St_Nicholas.gifbin4302 -> 0 bytes
-rw-r--r--images/Event_Marker_Stand_Fast.gifbin6199 -> 0 bytes
-rw-r--r--images/Event_Marker_Systematizatio.gifbin4470 -> 0 bytes
-rw-r--r--images/Event_Marker_The_Tyrant_Is_.gifbin6164 -> 0 bytes
-rw-r--r--images/Event_Marker_The_Wall.gifbin5801 -> 0 bytes
-rw-r--r--images/Event_Marker_USSR_Stability.gifbin1666 -> 0 bytes
-rw-r--r--images/Event_Marker_We_are_the_Peo.gifbin5427 -> 0 bytes
-rw-r--r--images/Hammer_and_sickle.svg5
-rw-r--r--images/SV_2.gifbin2014 -> 0 bytes
-rw-r--r--images/SV_3.gifbin2011 -> 0 bytes
-rw-r--r--images/SV_4.gifbin1959 -> 0 bytes
-rw-r--r--images/SV_5.gifbin1976 -> 0 bytes
-rw-r--r--images/SV_6.gifbin2003 -> 0 bytes
-rw-r--r--images/SV_7.gifbin1976 -> 0 bytes
-rw-r--r--images/SV_8.gifbin1986 -> 0 bytes
-rw-r--r--images/SV_Action_Round.gifbin2007 -> 0 bytes
-rw-r--r--images/SV_Stability.gifbin2556 -> 0 bytes
-rw-r--r--images/SV_Tiananmen_Square.gifbin2288 -> 0 bytes
-rw-r--r--images/SV_blank.gifbin1168 -> 0 bytes
-rw-r--r--images/SVd_blank.gifbin1814 -> 0 bytes
-rw-r--r--images/Turn.gifbin1391 -> 0 bytes
-rw-r--r--images/US_1.gifbin1933 -> 0 bytes
-rw-r--r--images/US_2.gifbin1961 -> 0 bytes
-rw-r--r--images/US_3.gifbin1982 -> 0 bytes
-rw-r--r--images/US_4.gifbin1953 -> 0 bytes
-rw-r--r--images/US_5.gifbin1971 -> 0 bytes
-rw-r--r--images/US_6.gifbin1992 -> 0 bytes
-rw-r--r--images/US_7.gifbin2005 -> 0 bytes
-rw-r--r--images/US_8.gifbin1951 -> 0 bytes
-rw-r--r--images/US_Action_Round.gifbin2667 -> 0 bytes
-rw-r--r--images/US_Tiananmen_Square.gifbin2241 -> 0 bytes
-rw-r--r--images/US_blank.gifbin1542 -> 0 bytes
-rw-r--r--images/USd_blank.gifbin1810 -> 0 bytes
-rw-r--r--images/VP.gifbin1293 -> 0 bytes
-rw-r--r--images/bin.pngbin25047 -> 0 bytes
-rw-r--r--images/cog.svg1
-rw-r--r--images/die_black_pips.svg37
-rw-r--r--images/earth-africa-europe.svg1
-rw-r--r--images/favicon_com.svg5
-rw-r--r--images/favicon_dem.svg39
-rw-r--r--images/remove.pngbin4887 -> 0 bytes
-rw-r--r--images/trash-can.svg1
-rw-r--r--info/cards.html201
-rw-r--r--map150.avifbin0 -> 582101 bytes
-rw-r--r--map150.jpgbin0 -> 2081840 bytes
-rw-r--r--map150.pngbin0 -> 17901047 bytes
-rw-r--r--map75.avifbin0 -> 565994 bytes
-rw-r--r--map75.jpgbin0 -> 871825 bytes
-rw-r--r--map75.pngbin0 -> 5954165 bytes
-rw-r--r--markers150/action_round_blue.pngbin0 -> 4711 bytes
-rw-r--r--markers150/action_round_red.pngbin0 -> 4612 bytes
-rw-r--r--markers150/cc1.pngbin0 -> 3306 bytes
-rw-r--r--markers150/cc2.pngbin0 -> 3862 bytes
-rw-r--r--markers150/cc3.pngbin0 -> 4199 bytes
-rw-r--r--markers150/cc4.pngbin0 -> 3464 bytes
-rw-r--r--markers150/cc5.pngbin0 -> 4066 bytes
-rw-r--r--markers150/cc6.pngbin0 -> 4142 bytes
-rw-r--r--markers150/cc7.pngbin0 -> 3696 bytes
-rw-r--r--markers150/cc8.pngbin0 -> 4085 bytes
-rw-r--r--markers150/ci1.pngbin0 -> 3523 bytes
-rw-r--r--markers150/ci2.pngbin0 -> 4143 bytes
-rw-r--r--markers150/ci3.pngbin0 -> 4448 bytes
-rw-r--r--markers150/ci4.pngbin0 -> 3893 bytes
-rw-r--r--markers150/ci5.pngbin0 -> 4269 bytes
-rw-r--r--markers150/ci6.pngbin0 -> 4486 bytes
-rw-r--r--markers150/ci7.pngbin0 -> 3948 bytes
-rw-r--r--markers150/ci8.pngbin0 -> 4554 bytes
-rw-r--r--markers150/dc1.pngbin0 -> 6019 bytes
-rw-r--r--markers150/dc2.pngbin0 -> 6694 bytes
-rw-r--r--markers150/dc3.pngbin0 -> 7089 bytes
-rw-r--r--markers150/dc4.pngbin0 -> 6311 bytes
-rw-r--r--markers150/dc5.pngbin0 -> 6711 bytes
-rw-r--r--markers150/dc6.pngbin0 -> 7042 bytes
-rw-r--r--markers150/dc7.pngbin0 -> 6684 bytes
-rw-r--r--markers150/dc8.pngbin0 -> 6970 bytes
-rw-r--r--markers150/di1.pngbin0 -> 4487 bytes
-rw-r--r--markers150/di2.pngbin0 -> 5054 bytes
-rw-r--r--markers150/di3.pngbin0 -> 5054 bytes
-rw-r--r--markers150/di4.pngbin0 -> 4851 bytes
-rw-r--r--markers150/di5.pngbin0 -> 4927 bytes
-rw-r--r--markers150/di6.pngbin0 -> 5136 bytes
-rw-r--r--markers150/di7.pngbin0 -> 4826 bytes
-rw-r--r--markers150/di8.pngbin0 -> 5156 bytes
-rw-r--r--markers150/event_austria_hungary.pngbin0 -> 6020 bytes
-rw-r--r--markers150/event_eco_glasnost.pngbin0 -> 4440 bytes
-rw-r--r--markers150/event_elena.pngbin0 -> 12668 bytes
-rw-r--r--markers150/event_foreign_currency.pngbin0 -> 6334 bytes
-rw-r--r--markers150/event_grenz_truppen.pngbin0 -> 13951 bytes
-rw-r--r--markers150/event_helsinki.pngbin0 -> 6123 bytes
-rw-r--r--markers150/event_honecker.pngbin0 -> 13209 bytes
-rw-r--r--markers150/event_laszlo_tokes.pngbin0 -> 5091 bytes
-rw-r--r--markers150/event_li_peng.pngbin0 -> 5037 bytes
-rw-r--r--markers150/event_nye_party.pngbin0 -> 11942 bytes
-rw-r--r--markers150/event_pres_visit.pngbin0 -> 13874 bytes
-rw-r--r--markers150/event_securitate.pngbin0 -> 10784 bytes
-rw-r--r--markers150/event_solidarity_legalized.pngbin0 -> 5723 bytes
-rw-r--r--markers150/event_st_nicholas.pngbin0 -> 4457 bytes
-rw-r--r--markers150/event_stand_fast.pngbin0 -> 12342 bytes
-rw-r--r--markers150/event_systematization.pngbin0 -> 6736 bytes
-rw-r--r--markers150/event_the_wall.pngbin0 -> 14171 bytes
-rw-r--r--markers150/event_tyrant.pngbin0 -> 13208 bytes
-rw-r--r--markers150/event_we_are_the_people.pngbin0 -> 6455 bytes
-rw-r--r--markers150/ts_blue.pngbin0 -> 7267 bytes
-rw-r--r--markers150/ts_blue_back.pngbin0 -> 6405 bytes
-rw-r--r--markers150/ts_red.pngbin0 -> 9802 bytes
-rw-r--r--markers150/ts_red_back.pngbin0 -> 8780 bytes
-rw-r--r--markers150/turn.pngbin0 -> 3177 bytes
-rw-r--r--markers150/ussr_stability_track.pngbin0 -> 4722 bytes
-rw-r--r--markers150/vp.pngbin0 -> 2176 bytes
-rw-r--r--markers75/action_round_blue.pngbin0 -> 2108 bytes
-rw-r--r--markers75/action_round_red.pngbin0 -> 2117 bytes
-rw-r--r--markers75/cc1.pngbin0 -> 1747 bytes
-rw-r--r--markers75/cc2.pngbin0 -> 1961 bytes
-rw-r--r--markers75/cc3.pngbin0 -> 1957 bytes
-rw-r--r--markers75/cc4.pngbin0 -> 1860 bytes
-rw-r--r--markers75/cc5.pngbin0 -> 1961 bytes
-rw-r--r--markers75/cc6.pngbin0 -> 1960 bytes
-rw-r--r--markers75/cc7.pngbin0 -> 1919 bytes
-rw-r--r--markers75/cc8.pngbin0 -> 1937 bytes
-rw-r--r--markers75/ci1.pngbin0 -> 1630 bytes
-rw-r--r--markers75/ci2.pngbin0 -> 1815 bytes
-rw-r--r--markers75/ci3.pngbin0 -> 1840 bytes
-rw-r--r--markers75/ci4.pngbin0 -> 1772 bytes
-rw-r--r--markers75/ci5.pngbin0 -> 1831 bytes
-rw-r--r--markers75/ci6.pngbin0 -> 1849 bytes
-rw-r--r--markers75/ci7.pngbin0 -> 1747 bytes
-rw-r--r--markers75/ci8.pngbin0 -> 1877 bytes
-rw-r--r--markers75/dc1.pngbin0 -> 2563 bytes
-rw-r--r--markers75/dc2.pngbin0 -> 2780 bytes
-rw-r--r--markers75/dc3.pngbin0 -> 2836 bytes
-rw-r--r--markers75/dc4.pngbin0 -> 2753 bytes
-rw-r--r--markers75/dc5.pngbin0 -> 2771 bytes
-rw-r--r--markers75/dc6.pngbin0 -> 2864 bytes
-rw-r--r--markers75/dc7.pngbin0 -> 2800 bytes
-rw-r--r--markers75/dc8.pngbin0 -> 2810 bytes
-rw-r--r--markers75/di1.pngbin0 -> 1767 bytes
-rw-r--r--markers75/di2.pngbin0 -> 1857 bytes
-rw-r--r--markers75/di3.pngbin0 -> 1897 bytes
-rw-r--r--markers75/di4.pngbin0 -> 1846 bytes
-rw-r--r--markers75/di5.pngbin0 -> 1831 bytes
-rw-r--r--markers75/di6.pngbin0 -> 1884 bytes
-rw-r--r--markers75/di7.pngbin0 -> 1790 bytes
-rw-r--r--markers75/di8.pngbin0 -> 1910 bytes
-rw-r--r--markers75/event_austria_hungary.pngbin0 -> 2415 bytes
-rw-r--r--markers75/event_eco_glasnost.pngbin0 -> 1973 bytes
-rw-r--r--markers75/event_elena.pngbin0 -> 3923 bytes
-rw-r--r--markers75/event_foreign_currency.pngbin0 -> 2634 bytes
-rw-r--r--markers75/event_grenz_truppen.pngbin0 -> 4122 bytes
-rw-r--r--markers75/event_helsinki.pngbin0 -> 2388 bytes
-rw-r--r--markers75/event_honecker.pngbin0 -> 3902 bytes
-rw-r--r--markers75/event_laszlo_tokes.pngbin0 -> 2041 bytes
-rw-r--r--markers75/event_li_peng.pngbin0 -> 2186 bytes
-rw-r--r--markers75/event_nye_party.pngbin0 -> 3538 bytes
-rw-r--r--markers75/event_pres_visit.pngbin0 -> 4074 bytes
-rw-r--r--markers75/event_securitate.pngbin0 -> 3423 bytes
-rw-r--r--markers75/event_solidarity_legalized.pngbin0 -> 2133 bytes
-rw-r--r--markers75/event_st_nicholas.pngbin0 -> 2034 bytes
-rw-r--r--markers75/event_stand_fast.pngbin0 -> 3713 bytes
-rw-r--r--markers75/event_systematization.pngbin0 -> 2510 bytes
-rw-r--r--markers75/event_the_wall.pngbin0 -> 3924 bytes
-rw-r--r--markers75/event_tyrant.pngbin0 -> 3978 bytes
-rw-r--r--markers75/event_we_are_the_people.pngbin0 -> 2578 bytes
-rw-r--r--markers75/ts_blue.pngbin0 -> 2711 bytes
-rw-r--r--markers75/ts_blue_back.pngbin0 -> 2259 bytes
-rw-r--r--markers75/ts_red.pngbin0 -> 3455 bytes
-rw-r--r--markers75/ts_red_back.pngbin0 -> 2994 bytes
-rw-r--r--markers75/turn.pngbin0 -> 1424 bytes
-rw-r--r--markers75/ussr_stability_track.pngbin0 -> 1918 bytes
-rw-r--r--markers75/vp.pngbin0 -> 1035 bytes
-rw-r--r--output.txt0
-rw-r--r--play.css1180
-rw-r--r--play.html402
-rw-r--r--play.js1804
-rw-r--r--rules.js18574
-rw-r--r--server.code-workspace10
-rw-r--r--thumbnail.pngbin31023 -> 31023 bytes
-rw-r--r--tools/colors.js110
-rw-r--r--tools/gencode.js (renamed from gencode.js)2
-rw-r--r--tools/gencolors.js78
-rw-r--r--tools/genconst.js25
-rw-r--r--tools/genlayout.js37
-rw-r--r--tools/layout.svg920
1098 files changed, 13569 insertions, 11917 deletions
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..5f2605e
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,7 @@
+root = true
+
+[*.js]
+indent_style = tab
+insert_final_newline = true
+trim_trailing_whitespace = true
+end_of_line = lf
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..aee666c
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,3 @@
+* text=auto
+*.jpg binary
+*.png binary
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7f59b65
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+data.xlsx \ No newline at end of file
diff --git a/1989_card_back_ps.gif b/1989_card_back_ps.gif
deleted file mode 100644
index d77b791..0000000
--- a/1989_card_back_ps.gif
+++ /dev/null
Binary files differ
diff --git a/1989_map.jpg b/1989_map.jpg
deleted file mode 100644
index b0d38b9..0000000
--- a/1989_map.jpg
+++ /dev/null
Binary files differ
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..fc78fed
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+default: rules.js play.js
+
+rules.js: events.txt data.js
+ node tools/gencode.js > /tmp/events.inc
+ node tools/genconst.js > /tmp/const.inc
+ sed -i \
+ -e '/BEGIN CONST/,/END CONST/{//!d}' \
+ -e '/BEGIN CONST/r /tmp/const.inc' \
+ -e '/BEGIN EVENTS/,/END EVENTS/{//!d}' \
+ -e '/BEGIN EVENTS/r /tmp/events.inc' \
+ rules.js
+
+play.js: tools/layout.svg data.js
+ node tools/genlayout.js > /tmp/layout.inc
+ node tools/genconst.js > /tmp/const.inc
+ sed -i \
+ -e '/BEGIN CONST/,/END CONST/{//!d}' \
+ -e '/BEGIN CONST/r /tmp/const.inc' \
+ -e '/BEGIN LAYOUT/,/END LAYOUT/{//!d}' \
+ -e '/BEGIN LAYOUT/r /tmp/layout.inc' \
+ play.js
diff --git a/Map.docx b/Map.docx
new file mode 100644
index 0000000..e23d852
--- /dev/null
+++ b/Map.docx
Binary files differ
diff --git a/about.html b/about.html
index d9ba2a8..7cd0291 100644
--- a/about.html
+++ b/about.html
@@ -1,10 +1,18 @@
<p>
- 1989 is an exciting, fast paced game simulating the end of the Cold War in 1989. During this amazing year, a series of democratic revolutions ended the 40 year Soviet empire in Eastern Europe. 1989 simulates the political, social and economic aspects of these revolutions using a card driven system similar to Twilight Struggle.
-
-
- <p>
- Designer: Jason Matthews, Ted Torgerson.
- <br> Copyright &copy; 2012 <a href="https://www.gmtgames.com/p-543-1989-2nd-printing.aspx">GMT Games, LLC</a>.
- <br> Programming &copy; 2024 Iain Pearce.
-
- \ No newline at end of file
+1989 is an exciting, fast paced game simulating the end of the Cold War in
+1989. During this amazing year, a series of democratic revolutions ended the 40
+year Soviet empire in Eastern Europe. 1989 simulates the political, social and
+economic aspects of these revolutions using a card driven system similar to
+Twilight Struggle.
+
+<p>
+Designer: Jason Matthews, Ted Torgerson.
+<br> Copyright &copy; 2012 <a href="https://www.gmtgames.com/p-543-1989-2nd-printing.aspx">GMT Games, LLC</a>.
+<br> Programming &copy; 2024 Iain Pearce.
+
+<ul>
+<li><a href="/1989-dawn-of-freedom/info/rulebook.html">Rulebook</a>
+<li><a href="/1989-dawn-of-freedom/info/playbook.html">Playbook</a>
+<li><a href="/1989-dawn-of-freedom/info/reference.html">Reference</a>
+<li><a href="/1989-dawn-of-freedom/info/cards.html">Cards</a>
+</ul>
diff --git a/cards/e1.gif b/cards/e1.gif
deleted file mode 100644
index 6e876fe..0000000
--- a/cards/e1.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e10.gif b/cards/e10.gif
deleted file mode 100644
index c73aef7..0000000
--- a/cards/e10.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e100.gif b/cards/e100.gif
deleted file mode 100644
index c4ee1e0..0000000
--- a/cards/e100.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e101.gif b/cards/e101.gif
deleted file mode 100644
index 7e233cd..0000000
--- a/cards/e101.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e102.gif b/cards/e102.gif
deleted file mode 100644
index e9e8c83..0000000
--- a/cards/e102.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e103.gif b/cards/e103.gif
deleted file mode 100644
index 9596e34..0000000
--- a/cards/e103.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e104.gif b/cards/e104.gif
deleted file mode 100644
index d7350fd..0000000
--- a/cards/e104.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e105.gif b/cards/e105.gif
deleted file mode 100644
index c2bbf39..0000000
--- a/cards/e105.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e106.gif b/cards/e106.gif
deleted file mode 100644
index 8d628b7..0000000
--- a/cards/e106.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e107.gif b/cards/e107.gif
deleted file mode 100644
index 45215ec..0000000
--- a/cards/e107.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e108.gif b/cards/e108.gif
deleted file mode 100644
index c7b39d6..0000000
--- a/cards/e108.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e109.gif b/cards/e109.gif
deleted file mode 100644
index 63524d7..0000000
--- a/cards/e109.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e11.gif b/cards/e11.gif
deleted file mode 100644
index 7f1e3d1..0000000
--- a/cards/e11.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e110.gif b/cards/e110.gif
deleted file mode 100644
index 49ed8a7..0000000
--- a/cards/e110.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e12.gif b/cards/e12.gif
deleted file mode 100644
index 6edee5b..0000000
--- a/cards/e12.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e13.gif b/cards/e13.gif
deleted file mode 100644
index 7c2687f..0000000
--- a/cards/e13.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e14.gif b/cards/e14.gif
deleted file mode 100644
index 182f153..0000000
--- a/cards/e14.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e15.gif b/cards/e15.gif
deleted file mode 100644
index 1223dcd..0000000
--- a/cards/e15.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e16.gif b/cards/e16.gif
deleted file mode 100644
index 7cb40a2..0000000
--- a/cards/e16.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e17.gif b/cards/e17.gif
deleted file mode 100644
index 231fe92..0000000
--- a/cards/e17.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e18.gif b/cards/e18.gif
deleted file mode 100644
index 7738d85..0000000
--- a/cards/e18.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e19.gif b/cards/e19.gif
deleted file mode 100644
index 2e59b3f..0000000
--- a/cards/e19.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e2.gif b/cards/e2.gif
deleted file mode 100644
index b6f3f2e..0000000
--- a/cards/e2.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e20.gif b/cards/e20.gif
deleted file mode 100644
index c21ee70..0000000
--- a/cards/e20.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e21.gif b/cards/e21.gif
deleted file mode 100644
index c1cdeb7..0000000
--- a/cards/e21.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e22.gif b/cards/e22.gif
deleted file mode 100644
index e70575b..0000000
--- a/cards/e22.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e23.gif b/cards/e23.gif
deleted file mode 100644
index c3f8974..0000000
--- a/cards/e23.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e24.gif b/cards/e24.gif
deleted file mode 100644
index 66f2dbb..0000000
--- a/cards/e24.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e25.gif b/cards/e25.gif
deleted file mode 100644
index 838fbdd..0000000
--- a/cards/e25.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e26.gif b/cards/e26.gif
deleted file mode 100644
index c7573f4..0000000
--- a/cards/e26.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e27.gif b/cards/e27.gif
deleted file mode 100644
index 850da0b..0000000
--- a/cards/e27.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e28.gif b/cards/e28.gif
deleted file mode 100644
index 6149bab..0000000
--- a/cards/e28.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e29.gif b/cards/e29.gif
deleted file mode 100644
index d34cdee..0000000
--- a/cards/e29.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e3.gif b/cards/e3.gif
deleted file mode 100644
index a0f690c..0000000
--- a/cards/e3.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e30.gif b/cards/e30.gif
deleted file mode 100644
index 8f9d92f..0000000
--- a/cards/e30.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e31.gif b/cards/e31.gif
deleted file mode 100644
index fe6ff2b..0000000
--- a/cards/e31.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e32.gif b/cards/e32.gif
deleted file mode 100644
index a0f4e23..0000000
--- a/cards/e32.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e33.gif b/cards/e33.gif
deleted file mode 100644
index abaa4f2..0000000
--- a/cards/e33.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e34.gif b/cards/e34.gif
deleted file mode 100644
index ec33286..0000000
--- a/cards/e34.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e35.gif b/cards/e35.gif
deleted file mode 100644
index 6e5755d..0000000
--- a/cards/e35.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e36.gif b/cards/e36.gif
deleted file mode 100644
index 7d05d4e..0000000
--- a/cards/e36.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e37.gif b/cards/e37.gif
deleted file mode 100644
index e84bd17..0000000
--- a/cards/e37.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e38.gif b/cards/e38.gif
deleted file mode 100644
index 4cb8e4a..0000000
--- a/cards/e38.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e39.gif b/cards/e39.gif
deleted file mode 100644
index 621ea21..0000000
--- a/cards/e39.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e4.gif b/cards/e4.gif
deleted file mode 100644
index b225bc1..0000000
--- a/cards/e4.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e40.gif b/cards/e40.gif
deleted file mode 100644
index d0f7470..0000000
--- a/cards/e40.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e41.gif b/cards/e41.gif
deleted file mode 100644
index 824fc1f..0000000
--- a/cards/e41.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e42.gif b/cards/e42.gif
deleted file mode 100644
index 23069f5..0000000
--- a/cards/e42.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e43.gif b/cards/e43.gif
deleted file mode 100644
index e883ef7..0000000
--- a/cards/e43.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e44.gif b/cards/e44.gif
deleted file mode 100644
index 15bdf38..0000000
--- a/cards/e44.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e45.gif b/cards/e45.gif
deleted file mode 100644
index fa6c0ca..0000000
--- a/cards/e45.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e46.gif b/cards/e46.gif
deleted file mode 100644
index ec7310c..0000000
--- a/cards/e46.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e47.gif b/cards/e47.gif
deleted file mode 100644
index fcbd622..0000000
--- a/cards/e47.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e48.gif b/cards/e48.gif
deleted file mode 100644
index b40d716..0000000
--- a/cards/e48.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e49.gif b/cards/e49.gif
deleted file mode 100644
index ac3c7b2..0000000
--- a/cards/e49.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e5.gif b/cards/e5.gif
deleted file mode 100644
index bb75531..0000000
--- a/cards/e5.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e50.gif b/cards/e50.gif
deleted file mode 100644
index a91cdb5..0000000
--- a/cards/e50.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e51.gif b/cards/e51.gif
deleted file mode 100644
index 55b1bbd..0000000
--- a/cards/e51.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e52.gif b/cards/e52.gif
deleted file mode 100644
index cc6241a..0000000
--- a/cards/e52.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e53.gif b/cards/e53.gif
deleted file mode 100644
index 0e7638b..0000000
--- a/cards/e53.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e54.gif b/cards/e54.gif
deleted file mode 100644
index 734ae1c..0000000
--- a/cards/e54.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e55.gif b/cards/e55.gif
deleted file mode 100644
index e202be6..0000000
--- a/cards/e55.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e56.gif b/cards/e56.gif
deleted file mode 100644
index 994c526..0000000
--- a/cards/e56.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e57.gif b/cards/e57.gif
deleted file mode 100644
index 1202089..0000000
--- a/cards/e57.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e58.gif b/cards/e58.gif
deleted file mode 100644
index b4cb03c..0000000
--- a/cards/e58.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e59.gif b/cards/e59.gif
deleted file mode 100644
index eb5075d..0000000
--- a/cards/e59.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e6.gif b/cards/e6.gif
deleted file mode 100644
index 56293e7..0000000
--- a/cards/e6.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e60.gif b/cards/e60.gif
deleted file mode 100644
index 42904d1..0000000
--- a/cards/e60.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e61.gif b/cards/e61.gif
deleted file mode 100644
index 9a04b79..0000000
--- a/cards/e61.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e62.gif b/cards/e62.gif
deleted file mode 100644
index 14e4bac..0000000
--- a/cards/e62.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e63.gif b/cards/e63.gif
deleted file mode 100644
index 91cb22f..0000000
--- a/cards/e63.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e64.gif b/cards/e64.gif
deleted file mode 100644
index 1863085..0000000
--- a/cards/e64.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e65.gif b/cards/e65.gif
deleted file mode 100644
index 7d317c2..0000000
--- a/cards/e65.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e66.gif b/cards/e66.gif
deleted file mode 100644
index e709983..0000000
--- a/cards/e66.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e67.gif b/cards/e67.gif
deleted file mode 100644
index 7d4b2de..0000000
--- a/cards/e67.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e68.gif b/cards/e68.gif
deleted file mode 100644
index 500ac35..0000000
--- a/cards/e68.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e69.gif b/cards/e69.gif
deleted file mode 100644
index 1247611..0000000
--- a/cards/e69.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e7.gif b/cards/e7.gif
deleted file mode 100644
index f4022fd..0000000
--- a/cards/e7.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e70.gif b/cards/e70.gif
deleted file mode 100644
index f7769d4..0000000
--- a/cards/e70.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e71.gif b/cards/e71.gif
deleted file mode 100644
index d5ea620..0000000
--- a/cards/e71.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e72.gif b/cards/e72.gif
deleted file mode 100644
index 9ca0a98..0000000
--- a/cards/e72.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e73.gif b/cards/e73.gif
deleted file mode 100644
index aaff909..0000000
--- a/cards/e73.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e74.gif b/cards/e74.gif
deleted file mode 100644
index 608dfec..0000000
--- a/cards/e74.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e75.gif b/cards/e75.gif
deleted file mode 100644
index d644c5d..0000000
--- a/cards/e75.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e76.gif b/cards/e76.gif
deleted file mode 100644
index e679a0a..0000000
--- a/cards/e76.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e77.gif b/cards/e77.gif
deleted file mode 100644
index 4845969..0000000
--- a/cards/e77.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e78.gif b/cards/e78.gif
deleted file mode 100644
index b435bd5..0000000
--- a/cards/e78.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e79.gif b/cards/e79.gif
deleted file mode 100644
index 3821d00..0000000
--- a/cards/e79.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e8.gif b/cards/e8.gif
deleted file mode 100644
index 3a36343..0000000
--- a/cards/e8.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e80.gif b/cards/e80.gif
deleted file mode 100644
index 19885ac..0000000
--- a/cards/e80.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e81.gif b/cards/e81.gif
deleted file mode 100644
index 636e13a..0000000
--- a/cards/e81.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e82.gif b/cards/e82.gif
deleted file mode 100644
index 7dc2ed4..0000000
--- a/cards/e82.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e83.gif b/cards/e83.gif
deleted file mode 100644
index 27e718d..0000000
--- a/cards/e83.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e84.gif b/cards/e84.gif
deleted file mode 100644
index 7847ecf..0000000
--- a/cards/e84.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e85.gif b/cards/e85.gif
deleted file mode 100644
index f6b656e..0000000
--- a/cards/e85.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e86.gif b/cards/e86.gif
deleted file mode 100644
index 46af753..0000000
--- a/cards/e86.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e87.gif b/cards/e87.gif
deleted file mode 100644
index 63bbd5e..0000000
--- a/cards/e87.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e88.gif b/cards/e88.gif
deleted file mode 100644
index f1eedf3..0000000
--- a/cards/e88.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e89.gif b/cards/e89.gif
deleted file mode 100644
index edd968a..0000000
--- a/cards/e89.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e9.gif b/cards/e9.gif
deleted file mode 100644
index 1e094fb..0000000
--- a/cards/e9.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e90.gif b/cards/e90.gif
deleted file mode 100644
index 954e485..0000000
--- a/cards/e90.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e91.gif b/cards/e91.gif
deleted file mode 100644
index baf649a..0000000
--- a/cards/e91.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e92.gif b/cards/e92.gif
deleted file mode 100644
index 15e4d1b..0000000
--- a/cards/e92.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e93.gif b/cards/e93.gif
deleted file mode 100644
index bdcdf5f..0000000
--- a/cards/e93.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e94.gif b/cards/e94.gif
deleted file mode 100644
index 797ff40..0000000
--- a/cards/e94.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e95.gif b/cards/e95.gif
deleted file mode 100644
index 3455ade..0000000
--- a/cards/e95.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e96.gif b/cards/e96.gif
deleted file mode 100644
index 2326e6d..0000000
--- a/cards/e96.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e97.gif b/cards/e97.gif
deleted file mode 100644
index 7a2753c..0000000
--- a/cards/e97.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e98.gif b/cards/e98.gif
deleted file mode 100644
index 2cc5f89..0000000
--- a/cards/e98.gif
+++ /dev/null
Binary files differ
diff --git a/cards/e99.gif b/cards/e99.gif
deleted file mode 100644
index c2def43..0000000
--- a/cards/e99.gif
+++ /dev/null
Binary files differ
diff --git a/cards100/event_1.avif b/cards100/event_1.avif
new file mode 100644
index 0000000..7a383a2
--- /dev/null
+++ b/cards100/event_1.avif
Binary files differ
diff --git a/cards100/event_1.png b/cards100/event_1.png
new file mode 100644
index 0000000..53581d9
--- /dev/null
+++ b/cards100/event_1.png
Binary files differ
diff --git a/cards100/event_10.avif b/cards100/event_10.avif
new file mode 100644
index 0000000..a1f3ac1
--- /dev/null
+++ b/cards100/event_10.avif
Binary files differ
diff --git a/cards100/event_10.png b/cards100/event_10.png
new file mode 100644
index 0000000..c2fbb9d
--- /dev/null
+++ b/cards100/event_10.png
Binary files differ
diff --git a/cards100/event_100.avif b/cards100/event_100.avif
new file mode 100644
index 0000000..a951296
--- /dev/null
+++ b/cards100/event_100.avif
Binary files differ
diff --git a/cards100/event_100.png b/cards100/event_100.png
new file mode 100644
index 0000000..d45748d
--- /dev/null
+++ b/cards100/event_100.png
Binary files differ
diff --git a/cards100/event_101.avif b/cards100/event_101.avif
new file mode 100644
index 0000000..a133130
--- /dev/null
+++ b/cards100/event_101.avif
Binary files differ
diff --git a/cards100/event_101.png b/cards100/event_101.png
new file mode 100644
index 0000000..3af75fd
--- /dev/null
+++ b/cards100/event_101.png
Binary files differ
diff --git a/cards100/event_102.avif b/cards100/event_102.avif
new file mode 100644
index 0000000..5805b5b
--- /dev/null
+++ b/cards100/event_102.avif
Binary files differ
diff --git a/cards100/event_102.png b/cards100/event_102.png
new file mode 100644
index 0000000..d97bca3
--- /dev/null
+++ b/cards100/event_102.png
Binary files differ
diff --git a/cards100/event_103.avif b/cards100/event_103.avif
new file mode 100644
index 0000000..82f5c1b
--- /dev/null
+++ b/cards100/event_103.avif
Binary files differ
diff --git a/cards100/event_103.png b/cards100/event_103.png
new file mode 100644
index 0000000..45859b1
--- /dev/null
+++ b/cards100/event_103.png
Binary files differ
diff --git a/cards100/event_104.avif b/cards100/event_104.avif
new file mode 100644
index 0000000..dbcf3b5
--- /dev/null
+++ b/cards100/event_104.avif
Binary files differ
diff --git a/cards100/event_104.png b/cards100/event_104.png
new file mode 100644
index 0000000..de69e22
--- /dev/null
+++ b/cards100/event_104.png
Binary files differ
diff --git a/cards100/event_105.avif b/cards100/event_105.avif
new file mode 100644
index 0000000..c2b7de9
--- /dev/null
+++ b/cards100/event_105.avif
Binary files differ
diff --git a/cards100/event_105.png b/cards100/event_105.png
new file mode 100644
index 0000000..d6b30ba
--- /dev/null
+++ b/cards100/event_105.png
Binary files differ
diff --git a/cards100/event_106.avif b/cards100/event_106.avif
new file mode 100644
index 0000000..1d07b62
--- /dev/null
+++ b/cards100/event_106.avif
Binary files differ
diff --git a/cards100/event_106.png b/cards100/event_106.png
new file mode 100644
index 0000000..503870b
--- /dev/null
+++ b/cards100/event_106.png
Binary files differ
diff --git a/cards100/event_107.avif b/cards100/event_107.avif
new file mode 100644
index 0000000..ae06cef
--- /dev/null
+++ b/cards100/event_107.avif
Binary files differ
diff --git a/cards100/event_107.png b/cards100/event_107.png
new file mode 100644
index 0000000..11a9113
--- /dev/null
+++ b/cards100/event_107.png
Binary files differ
diff --git a/cards100/event_108.avif b/cards100/event_108.avif
new file mode 100644
index 0000000..32b0da4
--- /dev/null
+++ b/cards100/event_108.avif
Binary files differ
diff --git a/cards100/event_108.png b/cards100/event_108.png
new file mode 100644
index 0000000..de9e2e6
--- /dev/null
+++ b/cards100/event_108.png
Binary files differ
diff --git a/cards100/event_109.avif b/cards100/event_109.avif
new file mode 100644
index 0000000..6e07636
--- /dev/null
+++ b/cards100/event_109.avif
Binary files differ
diff --git a/cards100/event_109.png b/cards100/event_109.png
new file mode 100644
index 0000000..cc1b483
--- /dev/null
+++ b/cards100/event_109.png
Binary files differ
diff --git a/cards100/event_11.avif b/cards100/event_11.avif
new file mode 100644
index 0000000..0910b8d
--- /dev/null
+++ b/cards100/event_11.avif
Binary files differ
diff --git a/cards100/event_11.png b/cards100/event_11.png
new file mode 100644
index 0000000..a368aae
--- /dev/null
+++ b/cards100/event_11.png
Binary files differ
diff --git a/cards100/event_110.avif b/cards100/event_110.avif
new file mode 100644
index 0000000..0d6b569
--- /dev/null
+++ b/cards100/event_110.avif
Binary files differ
diff --git a/cards100/event_110.png b/cards100/event_110.png
new file mode 100644
index 0000000..ee139d5
--- /dev/null
+++ b/cards100/event_110.png
Binary files differ
diff --git a/cards100/event_12.avif b/cards100/event_12.avif
new file mode 100644
index 0000000..818a213
--- /dev/null
+++ b/cards100/event_12.avif
Binary files differ
diff --git a/cards100/event_12.png b/cards100/event_12.png
new file mode 100644
index 0000000..edfbca9
--- /dev/null
+++ b/cards100/event_12.png
Binary files differ
diff --git a/cards100/event_13.avif b/cards100/event_13.avif
new file mode 100644
index 0000000..37518a3
--- /dev/null
+++ b/cards100/event_13.avif
Binary files differ
diff --git a/cards100/event_13.png b/cards100/event_13.png
new file mode 100644
index 0000000..1f3fad9
--- /dev/null
+++ b/cards100/event_13.png
Binary files differ
diff --git a/cards100/event_14.avif b/cards100/event_14.avif
new file mode 100644
index 0000000..c18803d
--- /dev/null
+++ b/cards100/event_14.avif
Binary files differ
diff --git a/cards100/event_14.png b/cards100/event_14.png
new file mode 100644
index 0000000..9fb1e71
--- /dev/null
+++ b/cards100/event_14.png
Binary files differ
diff --git a/cards100/event_15.avif b/cards100/event_15.avif
new file mode 100644
index 0000000..037c600
--- /dev/null
+++ b/cards100/event_15.avif
Binary files differ
diff --git a/cards100/event_15.png b/cards100/event_15.png
new file mode 100644
index 0000000..b36fe5e
--- /dev/null
+++ b/cards100/event_15.png
Binary files differ
diff --git a/cards100/event_16.avif b/cards100/event_16.avif
new file mode 100644
index 0000000..1a2ed1c
--- /dev/null
+++ b/cards100/event_16.avif
Binary files differ
diff --git a/cards100/event_16.png b/cards100/event_16.png
new file mode 100644
index 0000000..081a9ba
--- /dev/null
+++ b/cards100/event_16.png
Binary files differ
diff --git a/cards100/event_17.avif b/cards100/event_17.avif
new file mode 100644
index 0000000..108cc12
--- /dev/null
+++ b/cards100/event_17.avif
Binary files differ
diff --git a/cards100/event_17.png b/cards100/event_17.png
new file mode 100644
index 0000000..0134969
--- /dev/null
+++ b/cards100/event_17.png
Binary files differ
diff --git a/cards100/event_18.avif b/cards100/event_18.avif
new file mode 100644
index 0000000..adccd2f
--- /dev/null
+++ b/cards100/event_18.avif
Binary files differ
diff --git a/cards100/event_18.png b/cards100/event_18.png
new file mode 100644
index 0000000..564d5fe
--- /dev/null
+++ b/cards100/event_18.png
Binary files differ
diff --git a/cards100/event_19.avif b/cards100/event_19.avif
new file mode 100644
index 0000000..4fceeab
--- /dev/null
+++ b/cards100/event_19.avif
Binary files differ
diff --git a/cards100/event_19.png b/cards100/event_19.png
new file mode 100644
index 0000000..2cedd7a
--- /dev/null
+++ b/cards100/event_19.png
Binary files differ
diff --git a/cards100/event_2.avif b/cards100/event_2.avif
new file mode 100644
index 0000000..4b8117d
--- /dev/null
+++ b/cards100/event_2.avif
Binary files differ
diff --git a/cards100/event_2.png b/cards100/event_2.png
new file mode 100644
index 0000000..5279ba4
--- /dev/null
+++ b/cards100/event_2.png
Binary files differ
diff --git a/cards100/event_20.avif b/cards100/event_20.avif
new file mode 100644
index 0000000..600b113
--- /dev/null
+++ b/cards100/event_20.avif
Binary files differ
diff --git a/cards100/event_20.png b/cards100/event_20.png
new file mode 100644
index 0000000..4f3073c
--- /dev/null
+++ b/cards100/event_20.png
Binary files differ
diff --git a/cards100/event_21.avif b/cards100/event_21.avif
new file mode 100644
index 0000000..ee11de1
--- /dev/null
+++ b/cards100/event_21.avif
Binary files differ
diff --git a/cards100/event_21.png b/cards100/event_21.png
new file mode 100644
index 0000000..c0b87f3
--- /dev/null
+++ b/cards100/event_21.png
Binary files differ
diff --git a/cards100/event_22.avif b/cards100/event_22.avif
new file mode 100644
index 0000000..60a9100
--- /dev/null
+++ b/cards100/event_22.avif
Binary files differ
diff --git a/cards100/event_22.png b/cards100/event_22.png
new file mode 100644
index 0000000..80df681
--- /dev/null
+++ b/cards100/event_22.png
Binary files differ
diff --git a/cards100/event_23.avif b/cards100/event_23.avif
new file mode 100644
index 0000000..4bc9229
--- /dev/null
+++ b/cards100/event_23.avif
Binary files differ
diff --git a/cards100/event_23.png b/cards100/event_23.png
new file mode 100644
index 0000000..e23389a
--- /dev/null
+++ b/cards100/event_23.png
Binary files differ
diff --git a/cards100/event_24.avif b/cards100/event_24.avif
new file mode 100644
index 0000000..ad3cc88
--- /dev/null
+++ b/cards100/event_24.avif
Binary files differ
diff --git a/cards100/event_24.png b/cards100/event_24.png
new file mode 100644
index 0000000..8104837
--- /dev/null
+++ b/cards100/event_24.png
Binary files differ
diff --git a/cards100/event_25.avif b/cards100/event_25.avif
new file mode 100644
index 0000000..70a3513
--- /dev/null
+++ b/cards100/event_25.avif
Binary files differ
diff --git a/cards100/event_25.png b/cards100/event_25.png
new file mode 100644
index 0000000..c55be45
--- /dev/null
+++ b/cards100/event_25.png
Binary files differ
diff --git a/cards100/event_26.avif b/cards100/event_26.avif
new file mode 100644
index 0000000..ac2df7c
--- /dev/null
+++ b/cards100/event_26.avif
Binary files differ
diff --git a/cards100/event_26.png b/cards100/event_26.png
new file mode 100644
index 0000000..ad42b5f
--- /dev/null
+++ b/cards100/event_26.png
Binary files differ
diff --git a/cards100/event_27.avif b/cards100/event_27.avif
new file mode 100644
index 0000000..4048947
--- /dev/null
+++ b/cards100/event_27.avif
Binary files differ
diff --git a/cards100/event_27.png b/cards100/event_27.png
new file mode 100644
index 0000000..7d514b1
--- /dev/null
+++ b/cards100/event_27.png
Binary files differ
diff --git a/cards100/event_28.avif b/cards100/event_28.avif
new file mode 100644
index 0000000..681af23
--- /dev/null
+++ b/cards100/event_28.avif
Binary files differ
diff --git a/cards100/event_28.png b/cards100/event_28.png
new file mode 100644
index 0000000..d47838c
--- /dev/null
+++ b/cards100/event_28.png
Binary files differ
diff --git a/cards100/event_29.avif b/cards100/event_29.avif
new file mode 100644
index 0000000..151129c
--- /dev/null
+++ b/cards100/event_29.avif
Binary files differ
diff --git a/cards100/event_29.png b/cards100/event_29.png
new file mode 100644
index 0000000..7152afc
--- /dev/null
+++ b/cards100/event_29.png
Binary files differ
diff --git a/cards100/event_3.avif b/cards100/event_3.avif
new file mode 100644
index 0000000..b2e60ae
--- /dev/null
+++ b/cards100/event_3.avif
Binary files differ
diff --git a/cards100/event_3.png b/cards100/event_3.png
new file mode 100644
index 0000000..0e25416
--- /dev/null
+++ b/cards100/event_3.png
Binary files differ
diff --git a/cards100/event_30.avif b/cards100/event_30.avif
new file mode 100644
index 0000000..3adc58f
--- /dev/null
+++ b/cards100/event_30.avif
Binary files differ
diff --git a/cards100/event_30.png b/cards100/event_30.png
new file mode 100644
index 0000000..e67ed48
--- /dev/null
+++ b/cards100/event_30.png
Binary files differ
diff --git a/cards100/event_31.avif b/cards100/event_31.avif
new file mode 100644
index 0000000..c992c0b
--- /dev/null
+++ b/cards100/event_31.avif
Binary files differ
diff --git a/cards100/event_31.png b/cards100/event_31.png
new file mode 100644
index 0000000..d3b8efc
--- /dev/null
+++ b/cards100/event_31.png
Binary files differ
diff --git a/cards100/event_32.avif b/cards100/event_32.avif
new file mode 100644
index 0000000..f555c22
--- /dev/null
+++ b/cards100/event_32.avif
Binary files differ
diff --git a/cards100/event_32.png b/cards100/event_32.png
new file mode 100644
index 0000000..e602227
--- /dev/null
+++ b/cards100/event_32.png
Binary files differ
diff --git a/cards100/event_33.avif b/cards100/event_33.avif
new file mode 100644
index 0000000..0ddbabf
--- /dev/null
+++ b/cards100/event_33.avif
Binary files differ
diff --git a/cards100/event_33.png b/cards100/event_33.png
new file mode 100644
index 0000000..c67b8d0
--- /dev/null
+++ b/cards100/event_33.png
Binary files differ
diff --git a/cards100/event_34.avif b/cards100/event_34.avif
new file mode 100644
index 0000000..c3051b8
--- /dev/null
+++ b/cards100/event_34.avif
Binary files differ
diff --git a/cards100/event_34.png b/cards100/event_34.png
new file mode 100644
index 0000000..9d97bba
--- /dev/null
+++ b/cards100/event_34.png
Binary files differ
diff --git a/cards100/event_35.avif b/cards100/event_35.avif
new file mode 100644
index 0000000..1c15ddd
--- /dev/null
+++ b/cards100/event_35.avif
Binary files differ
diff --git a/cards100/event_35.png b/cards100/event_35.png
new file mode 100644
index 0000000..807bfb1
--- /dev/null
+++ b/cards100/event_35.png
Binary files differ
diff --git a/cards100/event_36.avif b/cards100/event_36.avif
new file mode 100644
index 0000000..7458365
--- /dev/null
+++ b/cards100/event_36.avif
Binary files differ
diff --git a/cards100/event_36.png b/cards100/event_36.png
new file mode 100644
index 0000000..6729f82
--- /dev/null
+++ b/cards100/event_36.png
Binary files differ
diff --git a/cards100/event_37.avif b/cards100/event_37.avif
new file mode 100644
index 0000000..c1e057d
--- /dev/null
+++ b/cards100/event_37.avif
Binary files differ
diff --git a/cards100/event_37.png b/cards100/event_37.png
new file mode 100644
index 0000000..ee1b36c
--- /dev/null
+++ b/cards100/event_37.png
Binary files differ
diff --git a/cards100/event_38.avif b/cards100/event_38.avif
new file mode 100644
index 0000000..25c31ef
--- /dev/null
+++ b/cards100/event_38.avif
Binary files differ
diff --git a/cards100/event_38.png b/cards100/event_38.png
new file mode 100644
index 0000000..80b1136
--- /dev/null
+++ b/cards100/event_38.png
Binary files differ
diff --git a/cards100/event_39.avif b/cards100/event_39.avif
new file mode 100644
index 0000000..2d419e9
--- /dev/null
+++ b/cards100/event_39.avif
Binary files differ
diff --git a/cards100/event_39.png b/cards100/event_39.png
new file mode 100644
index 0000000..ef17a6f
--- /dev/null
+++ b/cards100/event_39.png
Binary files differ
diff --git a/cards100/event_4.avif b/cards100/event_4.avif
new file mode 100644
index 0000000..c9c40e9
--- /dev/null
+++ b/cards100/event_4.avif
Binary files differ
diff --git a/cards100/event_4.png b/cards100/event_4.png
new file mode 100644
index 0000000..55042ab
--- /dev/null
+++ b/cards100/event_4.png
Binary files differ
diff --git a/cards100/event_40.avif b/cards100/event_40.avif
new file mode 100644
index 0000000..6e97826
--- /dev/null
+++ b/cards100/event_40.avif
Binary files differ
diff --git a/cards100/event_40.png b/cards100/event_40.png
new file mode 100644
index 0000000..fd6014d
--- /dev/null
+++ b/cards100/event_40.png
Binary files differ
diff --git a/cards100/event_41.avif b/cards100/event_41.avif
new file mode 100644
index 0000000..e2682e8
--- /dev/null
+++ b/cards100/event_41.avif
Binary files differ
diff --git a/cards100/event_41.png b/cards100/event_41.png
new file mode 100644
index 0000000..aac3d39
--- /dev/null
+++ b/cards100/event_41.png
Binary files differ
diff --git a/cards100/event_42.avif b/cards100/event_42.avif
new file mode 100644
index 0000000..23c0187
--- /dev/null
+++ b/cards100/event_42.avif
Binary files differ
diff --git a/cards100/event_42.png b/cards100/event_42.png
new file mode 100644
index 0000000..2610b17
--- /dev/null
+++ b/cards100/event_42.png
Binary files differ
diff --git a/cards100/event_43.avif b/cards100/event_43.avif
new file mode 100644
index 0000000..26dfa15
--- /dev/null
+++ b/cards100/event_43.avif
Binary files differ
diff --git a/cards100/event_43.png b/cards100/event_43.png
new file mode 100644
index 0000000..351dc64
--- /dev/null
+++ b/cards100/event_43.png
Binary files differ
diff --git a/cards100/event_44.avif b/cards100/event_44.avif
new file mode 100644
index 0000000..73b583a
--- /dev/null
+++ b/cards100/event_44.avif
Binary files differ
diff --git a/cards100/event_44.png b/cards100/event_44.png
new file mode 100644
index 0000000..a34495e
--- /dev/null
+++ b/cards100/event_44.png
Binary files differ
diff --git a/cards100/event_45.avif b/cards100/event_45.avif
new file mode 100644
index 0000000..c16c96d
--- /dev/null
+++ b/cards100/event_45.avif
Binary files differ
diff --git a/cards100/event_45.png b/cards100/event_45.png
new file mode 100644
index 0000000..1a545fd
--- /dev/null
+++ b/cards100/event_45.png
Binary files differ
diff --git a/cards100/event_46.avif b/cards100/event_46.avif
new file mode 100644
index 0000000..18b63da
--- /dev/null
+++ b/cards100/event_46.avif
Binary files differ
diff --git a/cards100/event_46.png b/cards100/event_46.png
new file mode 100644
index 0000000..2d9e6fb
--- /dev/null
+++ b/cards100/event_46.png
Binary files differ
diff --git a/cards100/event_47.avif b/cards100/event_47.avif
new file mode 100644
index 0000000..ab72cc5
--- /dev/null
+++ b/cards100/event_47.avif
Binary files differ
diff --git a/cards100/event_47.png b/cards100/event_47.png
new file mode 100644
index 0000000..6c820f1
--- /dev/null
+++ b/cards100/event_47.png
Binary files differ
diff --git a/cards100/event_48.avif b/cards100/event_48.avif
new file mode 100644
index 0000000..2a18459
--- /dev/null
+++ b/cards100/event_48.avif
Binary files differ
diff --git a/cards100/event_48.png b/cards100/event_48.png
new file mode 100644
index 0000000..7584b00
--- /dev/null
+++ b/cards100/event_48.png
Binary files differ
diff --git a/cards100/event_49.avif b/cards100/event_49.avif
new file mode 100644
index 0000000..ced038d
--- /dev/null
+++ b/cards100/event_49.avif
Binary files differ
diff --git a/cards100/event_49.png b/cards100/event_49.png
new file mode 100644
index 0000000..c0f6c1d
--- /dev/null
+++ b/cards100/event_49.png
Binary files differ
diff --git a/cards100/event_5.avif b/cards100/event_5.avif
new file mode 100644
index 0000000..f7b344c
--- /dev/null
+++ b/cards100/event_5.avif
Binary files differ
diff --git a/cards100/event_5.png b/cards100/event_5.png
new file mode 100644
index 0000000..bbacd20
--- /dev/null
+++ b/cards100/event_5.png
Binary files differ
diff --git a/cards100/event_50.avif b/cards100/event_50.avif
new file mode 100644
index 0000000..8613ee9
--- /dev/null
+++ b/cards100/event_50.avif
Binary files differ
diff --git a/cards100/event_50.png b/cards100/event_50.png
new file mode 100644
index 0000000..618eb50
--- /dev/null
+++ b/cards100/event_50.png
Binary files differ
diff --git a/cards100/event_51.avif b/cards100/event_51.avif
new file mode 100644
index 0000000..0f186a9
--- /dev/null
+++ b/cards100/event_51.avif
Binary files differ
diff --git a/cards100/event_51.png b/cards100/event_51.png
new file mode 100644
index 0000000..08d223b
--- /dev/null
+++ b/cards100/event_51.png
Binary files differ
diff --git a/cards100/event_52.avif b/cards100/event_52.avif
new file mode 100644
index 0000000..45b2bdb
--- /dev/null
+++ b/cards100/event_52.avif
Binary files differ
diff --git a/cards100/event_52.png b/cards100/event_52.png
new file mode 100644
index 0000000..98167cc
--- /dev/null
+++ b/cards100/event_52.png
Binary files differ
diff --git a/cards100/event_53.avif b/cards100/event_53.avif
new file mode 100644
index 0000000..aeca080
--- /dev/null
+++ b/cards100/event_53.avif
Binary files differ
diff --git a/cards100/event_53.png b/cards100/event_53.png
new file mode 100644
index 0000000..194971f
--- /dev/null
+++ b/cards100/event_53.png
Binary files differ
diff --git a/cards100/event_54.avif b/cards100/event_54.avif
new file mode 100644
index 0000000..535f399
--- /dev/null
+++ b/cards100/event_54.avif
Binary files differ
diff --git a/cards100/event_54.png b/cards100/event_54.png
new file mode 100644
index 0000000..165f49a
--- /dev/null
+++ b/cards100/event_54.png
Binary files differ
diff --git a/cards100/event_55.avif b/cards100/event_55.avif
new file mode 100644
index 0000000..cd04fed
--- /dev/null
+++ b/cards100/event_55.avif
Binary files differ
diff --git a/cards100/event_55.png b/cards100/event_55.png
new file mode 100644
index 0000000..c8b85d6
--- /dev/null
+++ b/cards100/event_55.png
Binary files differ
diff --git a/cards100/event_56.avif b/cards100/event_56.avif
new file mode 100644
index 0000000..a6746f4
--- /dev/null
+++ b/cards100/event_56.avif
Binary files differ
diff --git a/cards100/event_56.png b/cards100/event_56.png
new file mode 100644
index 0000000..f48ce25
--- /dev/null
+++ b/cards100/event_56.png
Binary files differ
diff --git a/cards100/event_57.avif b/cards100/event_57.avif
new file mode 100644
index 0000000..a0457d2
--- /dev/null
+++ b/cards100/event_57.avif
Binary files differ
diff --git a/cards100/event_57.png b/cards100/event_57.png
new file mode 100644
index 0000000..c48357c
--- /dev/null
+++ b/cards100/event_57.png
Binary files differ
diff --git a/cards100/event_58.avif b/cards100/event_58.avif
new file mode 100644
index 0000000..cd37b4b
--- /dev/null
+++ b/cards100/event_58.avif
Binary files differ
diff --git a/cards100/event_58.png b/cards100/event_58.png
new file mode 100644
index 0000000..2f990ca
--- /dev/null
+++ b/cards100/event_58.png
Binary files differ
diff --git a/cards100/event_59.avif b/cards100/event_59.avif
new file mode 100644
index 0000000..80100da
--- /dev/null
+++ b/cards100/event_59.avif
Binary files differ
diff --git a/cards100/event_59.png b/cards100/event_59.png
new file mode 100644
index 0000000..e48fa48
--- /dev/null
+++ b/cards100/event_59.png
Binary files differ
diff --git a/cards100/event_6.avif b/cards100/event_6.avif
new file mode 100644
index 0000000..0406527
--- /dev/null
+++ b/cards100/event_6.avif
Binary files differ
diff --git a/cards100/event_6.png b/cards100/event_6.png
new file mode 100644
index 0000000..830ff28
--- /dev/null
+++ b/cards100/event_6.png
Binary files differ
diff --git a/cards100/event_60.avif b/cards100/event_60.avif
new file mode 100644
index 0000000..b55b62e
--- /dev/null
+++ b/cards100/event_60.avif
Binary files differ
diff --git a/cards100/event_60.png b/cards100/event_60.png
new file mode 100644
index 0000000..5ae1476
--- /dev/null
+++ b/cards100/event_60.png
Binary files differ
diff --git a/cards100/event_61.avif b/cards100/event_61.avif
new file mode 100644
index 0000000..65c72e6
--- /dev/null
+++ b/cards100/event_61.avif
Binary files differ
diff --git a/cards100/event_61.png b/cards100/event_61.png
new file mode 100644
index 0000000..ae6f4b4
--- /dev/null
+++ b/cards100/event_61.png
Binary files differ
diff --git a/cards100/event_62.avif b/cards100/event_62.avif
new file mode 100644
index 0000000..94c450c
--- /dev/null
+++ b/cards100/event_62.avif
Binary files differ
diff --git a/cards100/event_62.png b/cards100/event_62.png
new file mode 100644
index 0000000..621bcfb
--- /dev/null
+++ b/cards100/event_62.png
Binary files differ
diff --git a/cards100/event_63.avif b/cards100/event_63.avif
new file mode 100644
index 0000000..cf804d4
--- /dev/null
+++ b/cards100/event_63.avif
Binary files differ
diff --git a/cards100/event_63.png b/cards100/event_63.png
new file mode 100644
index 0000000..f5974b7
--- /dev/null
+++ b/cards100/event_63.png
Binary files differ
diff --git a/cards100/event_64.avif b/cards100/event_64.avif
new file mode 100644
index 0000000..26ac12a
--- /dev/null
+++ b/cards100/event_64.avif
Binary files differ
diff --git a/cards100/event_64.png b/cards100/event_64.png
new file mode 100644
index 0000000..fbdbff5
--- /dev/null
+++ b/cards100/event_64.png
Binary files differ
diff --git a/cards100/event_65.avif b/cards100/event_65.avif
new file mode 100644
index 0000000..2148e6f
--- /dev/null
+++ b/cards100/event_65.avif
Binary files differ
diff --git a/cards100/event_65.png b/cards100/event_65.png
new file mode 100644
index 0000000..2d7d411
--- /dev/null
+++ b/cards100/event_65.png
Binary files differ
diff --git a/cards100/event_66.avif b/cards100/event_66.avif
new file mode 100644
index 0000000..cb06200
--- /dev/null
+++ b/cards100/event_66.avif
Binary files differ
diff --git a/cards100/event_66.png b/cards100/event_66.png
new file mode 100644
index 0000000..798782b
--- /dev/null
+++ b/cards100/event_66.png
Binary files differ
diff --git a/cards100/event_67.avif b/cards100/event_67.avif
new file mode 100644
index 0000000..8ec0229
--- /dev/null
+++ b/cards100/event_67.avif
Binary files differ
diff --git a/cards100/event_67.png b/cards100/event_67.png
new file mode 100644
index 0000000..37b1d07
--- /dev/null
+++ b/cards100/event_67.png
Binary files differ
diff --git a/cards100/event_68.avif b/cards100/event_68.avif
new file mode 100644
index 0000000..f05faf9
--- /dev/null
+++ b/cards100/event_68.avif
Binary files differ
diff --git a/cards100/event_68.png b/cards100/event_68.png
new file mode 100644
index 0000000..4b36172
--- /dev/null
+++ b/cards100/event_68.png
Binary files differ
diff --git a/cards100/event_69.avif b/cards100/event_69.avif
new file mode 100644
index 0000000..ee3328f
--- /dev/null
+++ b/cards100/event_69.avif
Binary files differ
diff --git a/cards100/event_69.png b/cards100/event_69.png
new file mode 100644
index 0000000..2debba9
--- /dev/null
+++ b/cards100/event_69.png
Binary files differ
diff --git a/cards100/event_7.avif b/cards100/event_7.avif
new file mode 100644
index 0000000..afa9d5b
--- /dev/null
+++ b/cards100/event_7.avif
Binary files differ
diff --git a/cards100/event_7.png b/cards100/event_7.png
new file mode 100644
index 0000000..f2f1090
--- /dev/null
+++ b/cards100/event_7.png
Binary files differ
diff --git a/cards100/event_70.avif b/cards100/event_70.avif
new file mode 100644
index 0000000..fe115d3
--- /dev/null
+++ b/cards100/event_70.avif
Binary files differ
diff --git a/cards100/event_70.png b/cards100/event_70.png
new file mode 100644
index 0000000..668b8cc
--- /dev/null
+++ b/cards100/event_70.png
Binary files differ
diff --git a/cards100/event_71.avif b/cards100/event_71.avif
new file mode 100644
index 0000000..6c9d371
--- /dev/null
+++ b/cards100/event_71.avif
Binary files differ
diff --git a/cards100/event_71.png b/cards100/event_71.png
new file mode 100644
index 0000000..f39ab07
--- /dev/null
+++ b/cards100/event_71.png
Binary files differ
diff --git a/cards100/event_72.avif b/cards100/event_72.avif
new file mode 100644
index 0000000..12f6823
--- /dev/null
+++ b/cards100/event_72.avif
Binary files differ
diff --git a/cards100/event_72.png b/cards100/event_72.png
new file mode 100644
index 0000000..52d7826
--- /dev/null
+++ b/cards100/event_72.png
Binary files differ
diff --git a/cards100/event_73.avif b/cards100/event_73.avif
new file mode 100644
index 0000000..a5ed01f
--- /dev/null
+++ b/cards100/event_73.avif
Binary files differ
diff --git a/cards100/event_73.png b/cards100/event_73.png
new file mode 100644
index 0000000..f746f2f
--- /dev/null
+++ b/cards100/event_73.png
Binary files differ
diff --git a/cards100/event_74.avif b/cards100/event_74.avif
new file mode 100644
index 0000000..b4b3e7a
--- /dev/null
+++ b/cards100/event_74.avif
Binary files differ
diff --git a/cards100/event_74.png b/cards100/event_74.png
new file mode 100644
index 0000000..173bec0
--- /dev/null
+++ b/cards100/event_74.png
Binary files differ
diff --git a/cards100/event_75.avif b/cards100/event_75.avif
new file mode 100644
index 0000000..d141715
--- /dev/null
+++ b/cards100/event_75.avif
Binary files differ
diff --git a/cards100/event_75.png b/cards100/event_75.png
new file mode 100644
index 0000000..4d52da8
--- /dev/null
+++ b/cards100/event_75.png
Binary files differ
diff --git a/cards100/event_76.avif b/cards100/event_76.avif
new file mode 100644
index 0000000..9a41b7c
--- /dev/null
+++ b/cards100/event_76.avif
Binary files differ
diff --git a/cards100/event_76.png b/cards100/event_76.png
new file mode 100644
index 0000000..4fcc9dc
--- /dev/null
+++ b/cards100/event_76.png
Binary files differ
diff --git a/cards100/event_77.avif b/cards100/event_77.avif
new file mode 100644
index 0000000..3f60046
--- /dev/null
+++ b/cards100/event_77.avif
Binary files differ
diff --git a/cards100/event_77.png b/cards100/event_77.png
new file mode 100644
index 0000000..25eb5e7
--- /dev/null
+++ b/cards100/event_77.png
Binary files differ
diff --git a/cards100/event_78.avif b/cards100/event_78.avif
new file mode 100644
index 0000000..f197dc2
--- /dev/null
+++ b/cards100/event_78.avif
Binary files differ
diff --git a/cards100/event_78.png b/cards100/event_78.png
new file mode 100644
index 0000000..479fe0b
--- /dev/null
+++ b/cards100/event_78.png
Binary files differ
diff --git a/cards100/event_79.avif b/cards100/event_79.avif
new file mode 100644
index 0000000..39fa388
--- /dev/null
+++ b/cards100/event_79.avif
Binary files differ
diff --git a/cards100/event_79.png b/cards100/event_79.png
new file mode 100644
index 0000000..d19937d
--- /dev/null
+++ b/cards100/event_79.png
Binary files differ
diff --git a/cards100/event_8.avif b/cards100/event_8.avif
new file mode 100644
index 0000000..50d83a9
--- /dev/null
+++ b/cards100/event_8.avif
Binary files differ
diff --git a/cards100/event_8.png b/cards100/event_8.png
new file mode 100644
index 0000000..fbc34ab
--- /dev/null
+++ b/cards100/event_8.png
Binary files differ
diff --git a/cards100/event_80.avif b/cards100/event_80.avif
new file mode 100644
index 0000000..2dd6515
--- /dev/null
+++ b/cards100/event_80.avif
Binary files differ
diff --git a/cards100/event_80.png b/cards100/event_80.png
new file mode 100644
index 0000000..c96490d
--- /dev/null
+++ b/cards100/event_80.png
Binary files differ
diff --git a/cards100/event_81.avif b/cards100/event_81.avif
new file mode 100644
index 0000000..ef1fe2d
--- /dev/null
+++ b/cards100/event_81.avif
Binary files differ
diff --git a/cards100/event_81.png b/cards100/event_81.png
new file mode 100644
index 0000000..fe6f6a0
--- /dev/null
+++ b/cards100/event_81.png
Binary files differ
diff --git a/cards100/event_82.avif b/cards100/event_82.avif
new file mode 100644
index 0000000..40bd53e
--- /dev/null
+++ b/cards100/event_82.avif
Binary files differ
diff --git a/cards100/event_82.png b/cards100/event_82.png
new file mode 100644
index 0000000..c8cbc2e
--- /dev/null
+++ b/cards100/event_82.png
Binary files differ
diff --git a/cards100/event_83.avif b/cards100/event_83.avif
new file mode 100644
index 0000000..e533c8a
--- /dev/null
+++ b/cards100/event_83.avif
Binary files differ
diff --git a/cards100/event_83.png b/cards100/event_83.png
new file mode 100644
index 0000000..8e109cc
--- /dev/null
+++ b/cards100/event_83.png
Binary files differ
diff --git a/cards100/event_84.avif b/cards100/event_84.avif
new file mode 100644
index 0000000..693ba84
--- /dev/null
+++ b/cards100/event_84.avif
Binary files differ
diff --git a/cards100/event_84.png b/cards100/event_84.png
new file mode 100644
index 0000000..509d79b
--- /dev/null
+++ b/cards100/event_84.png
Binary files differ
diff --git a/cards100/event_85.avif b/cards100/event_85.avif
new file mode 100644
index 0000000..f1483a4
--- /dev/null
+++ b/cards100/event_85.avif
Binary files differ
diff --git a/cards100/event_85.png b/cards100/event_85.png
new file mode 100644
index 0000000..db0912a
--- /dev/null
+++ b/cards100/event_85.png
Binary files differ
diff --git a/cards100/event_86.avif b/cards100/event_86.avif
new file mode 100644
index 0000000..ed7694d
--- /dev/null
+++ b/cards100/event_86.avif
Binary files differ
diff --git a/cards100/event_86.png b/cards100/event_86.png
new file mode 100644
index 0000000..18560ea
--- /dev/null
+++ b/cards100/event_86.png
Binary files differ
diff --git a/cards100/event_87.avif b/cards100/event_87.avif
new file mode 100644
index 0000000..4809e10
--- /dev/null
+++ b/cards100/event_87.avif
Binary files differ
diff --git a/cards100/event_87.png b/cards100/event_87.png
new file mode 100644
index 0000000..f4e7277
--- /dev/null
+++ b/cards100/event_87.png
Binary files differ
diff --git a/cards100/event_88.avif b/cards100/event_88.avif
new file mode 100644
index 0000000..3ff4500
--- /dev/null
+++ b/cards100/event_88.avif
Binary files differ
diff --git a/cards100/event_88.png b/cards100/event_88.png
new file mode 100644
index 0000000..e40c852
--- /dev/null
+++ b/cards100/event_88.png
Binary files differ
diff --git a/cards100/event_89.avif b/cards100/event_89.avif
new file mode 100644
index 0000000..1d75010
--- /dev/null
+++ b/cards100/event_89.avif
Binary files differ
diff --git a/cards100/event_89.png b/cards100/event_89.png
new file mode 100644
index 0000000..fc1e57e
--- /dev/null
+++ b/cards100/event_89.png
Binary files differ
diff --git a/cards100/event_9.avif b/cards100/event_9.avif
new file mode 100644
index 0000000..b5969d3
--- /dev/null
+++ b/cards100/event_9.avif
Binary files differ
diff --git a/cards100/event_9.png b/cards100/event_9.png
new file mode 100644
index 0000000..086d1c8
--- /dev/null
+++ b/cards100/event_9.png
Binary files differ
diff --git a/cards100/event_90.avif b/cards100/event_90.avif
new file mode 100644
index 0000000..05af165
--- /dev/null
+++ b/cards100/event_90.avif
Binary files differ
diff --git a/cards100/event_90.png b/cards100/event_90.png
new file mode 100644
index 0000000..b8624f7
--- /dev/null
+++ b/cards100/event_90.png
Binary files differ
diff --git a/cards100/event_91.avif b/cards100/event_91.avif
new file mode 100644
index 0000000..ea1c3b3
--- /dev/null
+++ b/cards100/event_91.avif
Binary files differ
diff --git a/cards100/event_91.png b/cards100/event_91.png
new file mode 100644
index 0000000..81b19d3
--- /dev/null
+++ b/cards100/event_91.png
Binary files differ
diff --git a/cards100/event_92.avif b/cards100/event_92.avif
new file mode 100644
index 0000000..1d04c24
--- /dev/null
+++ b/cards100/event_92.avif
Binary files differ
diff --git a/cards100/event_92.png b/cards100/event_92.png
new file mode 100644
index 0000000..7b69207
--- /dev/null
+++ b/cards100/event_92.png
Binary files differ
diff --git a/cards100/event_93.avif b/cards100/event_93.avif
new file mode 100644
index 0000000..1a7bae8
--- /dev/null
+++ b/cards100/event_93.avif
Binary files differ
diff --git a/cards100/event_93.png b/cards100/event_93.png
new file mode 100644
index 0000000..aba042a
--- /dev/null
+++ b/cards100/event_93.png
Binary files differ
diff --git a/cards100/event_94.avif b/cards100/event_94.avif
new file mode 100644
index 0000000..5349a30
--- /dev/null
+++ b/cards100/event_94.avif
Binary files differ
diff --git a/cards100/event_94.png b/cards100/event_94.png
new file mode 100644
index 0000000..23f2060
--- /dev/null
+++ b/cards100/event_94.png
Binary files differ
diff --git a/cards100/event_95.avif b/cards100/event_95.avif
new file mode 100644
index 0000000..5af37d7
--- /dev/null
+++ b/cards100/event_95.avif
Binary files differ
diff --git a/cards100/event_95.png b/cards100/event_95.png
new file mode 100644
index 0000000..1ef70f8
--- /dev/null
+++ b/cards100/event_95.png
Binary files differ
diff --git a/cards100/event_96.avif b/cards100/event_96.avif
new file mode 100644
index 0000000..54aea89
--- /dev/null
+++ b/cards100/event_96.avif
Binary files differ
diff --git a/cards100/event_96.png b/cards100/event_96.png
new file mode 100644
index 0000000..98fb4df
--- /dev/null
+++ b/cards100/event_96.png
Binary files differ
diff --git a/cards100/event_97.avif b/cards100/event_97.avif
new file mode 100644
index 0000000..dcd0d63
--- /dev/null
+++ b/cards100/event_97.avif
Binary files differ
diff --git a/cards100/event_97.png b/cards100/event_97.png
new file mode 100644
index 0000000..eab7e13
--- /dev/null
+++ b/cards100/event_97.png
Binary files differ
diff --git a/cards100/event_98.avif b/cards100/event_98.avif
new file mode 100644
index 0000000..0c4b3dc
--- /dev/null
+++ b/cards100/event_98.avif
Binary files differ
diff --git a/cards100/event_98.png b/cards100/event_98.png
new file mode 100644
index 0000000..af012cd
--- /dev/null
+++ b/cards100/event_98.png
Binary files differ
diff --git a/cards100/event_99.avif b/cards100/event_99.avif
new file mode 100644
index 0000000..bf16fa2
--- /dev/null
+++ b/cards100/event_99.avif
Binary files differ
diff --git a/cards100/event_99.png b/cards100/event_99.png
new file mode 100644
index 0000000..d4ad421
--- /dev/null
+++ b/cards100/event_99.png
Binary files differ
diff --git a/cards100/event_back.avif b/cards100/event_back.avif
new file mode 100644
index 0000000..715ef09
--- /dev/null
+++ b/cards100/event_back.avif
Binary files differ
diff --git a/cards100/event_back.png b/cards100/event_back.png
new file mode 100644
index 0000000..c3dfb6b
--- /dev/null
+++ b/cards100/event_back.png
Binary files differ
diff --git a/cards100/power_11_14.avif b/cards100/power_11_14.avif
new file mode 100644
index 0000000..99a94d6
--- /dev/null
+++ b/cards100/power_11_14.avif
Binary files differ
diff --git a/cards100/power_11_14.png b/cards100/power_11_14.png
new file mode 100644
index 0000000..851d3a6
--- /dev/null
+++ b/cards100/power_11_14.png
Binary files differ
diff --git a/cards100/power_15_18.avif b/cards100/power_15_18.avif
new file mode 100644
index 0000000..567c985
--- /dev/null
+++ b/cards100/power_15_18.avif
Binary files differ
diff --git a/cards100/power_15_18.png b/cards100/power_15_18.png
new file mode 100644
index 0000000..c423193
--- /dev/null
+++ b/cards100/power_15_18.png
Binary files differ
diff --git a/cards100/power_19_20.avif b/cards100/power_19_20.avif
new file mode 100644
index 0000000..d294643
--- /dev/null
+++ b/cards100/power_19_20.avif
Binary files differ
diff --git a/cards100/power_19_20.png b/cards100/power_19_20.png
new file mode 100644
index 0000000..5f4051c
--- /dev/null
+++ b/cards100/power_19_20.png
Binary files differ
diff --git a/cards100/power_1_6.avif b/cards100/power_1_6.avif
new file mode 100644
index 0000000..d32d9f7
--- /dev/null
+++ b/cards100/power_1_6.avif
Binary files differ
diff --git a/cards100/power_1_6.png b/cards100/power_1_6.png
new file mode 100644
index 0000000..6f11210
--- /dev/null
+++ b/cards100/power_1_6.png
Binary files differ
diff --git a/cards100/power_21_22.avif b/cards100/power_21_22.avif
new file mode 100644
index 0000000..7c53244
--- /dev/null
+++ b/cards100/power_21_22.avif
Binary files differ
diff --git a/cards100/power_21_22.png b/cards100/power_21_22.png
new file mode 100644
index 0000000..374f43d
--- /dev/null
+++ b/cards100/power_21_22.png
Binary files differ
diff --git a/cards100/power_23_26.avif b/cards100/power_23_26.avif
new file mode 100644
index 0000000..5383a86
--- /dev/null
+++ b/cards100/power_23_26.avif
Binary files differ
diff --git a/cards100/power_23_26.png b/cards100/power_23_26.png
new file mode 100644
index 0000000..3c7f2d1
--- /dev/null
+++ b/cards100/power_23_26.png
Binary files differ
diff --git a/cards100/power_27_30.avif b/cards100/power_27_30.avif
new file mode 100644
index 0000000..5d87825
--- /dev/null
+++ b/cards100/power_27_30.avif
Binary files differ
diff --git a/cards100/power_27_30.png b/cards100/power_27_30.png
new file mode 100644
index 0000000..ee5f176
--- /dev/null
+++ b/cards100/power_27_30.png
Binary files differ
diff --git a/cards100/power_31_33.avif b/cards100/power_31_33.avif
new file mode 100644
index 0000000..b2eb010
--- /dev/null
+++ b/cards100/power_31_33.avif
Binary files differ
diff --git a/cards100/power_31_33.png b/cards100/power_31_33.png
new file mode 100644
index 0000000..4893bb7
--- /dev/null
+++ b/cards100/power_31_33.png
Binary files differ
diff --git a/cards100/power_34_36.avif b/cards100/power_34_36.avif
new file mode 100644
index 0000000..ba41c68
--- /dev/null
+++ b/cards100/power_34_36.avif
Binary files differ
diff --git a/cards100/power_34_36.png b/cards100/power_34_36.png
new file mode 100644
index 0000000..1323183
--- /dev/null
+++ b/cards100/power_34_36.png
Binary files differ
diff --git a/cards100/power_37.avif b/cards100/power_37.avif
new file mode 100644
index 0000000..a253b5e
--- /dev/null
+++ b/cards100/power_37.avif
Binary files differ
diff --git a/cards100/power_37.png b/cards100/power_37.png
new file mode 100644
index 0000000..6547778
--- /dev/null
+++ b/cards100/power_37.png
Binary files differ
diff --git a/cards100/power_38.avif b/cards100/power_38.avif
new file mode 100644
index 0000000..177dbcb
--- /dev/null
+++ b/cards100/power_38.avif
Binary files differ
diff --git a/cards100/power_38.png b/cards100/power_38.png
new file mode 100644
index 0000000..82f3409
--- /dev/null
+++ b/cards100/power_38.png
Binary files differ
diff --git a/cards100/power_39.avif b/cards100/power_39.avif
new file mode 100644
index 0000000..93fec10
--- /dev/null
+++ b/cards100/power_39.avif
Binary files differ
diff --git a/cards100/power_39.png b/cards100/power_39.png
new file mode 100644
index 0000000..66401f1
--- /dev/null
+++ b/cards100/power_39.png
Binary files differ
diff --git a/cards100/power_40.avif b/cards100/power_40.avif
new file mode 100644
index 0000000..4749fa6
--- /dev/null
+++ b/cards100/power_40.avif
Binary files differ
diff --git a/cards100/power_40.png b/cards100/power_40.png
new file mode 100644
index 0000000..de465a1
--- /dev/null
+++ b/cards100/power_40.png
Binary files differ
diff --git a/cards100/power_41.avif b/cards100/power_41.avif
new file mode 100644
index 0000000..545eb46
--- /dev/null
+++ b/cards100/power_41.avif
Binary files differ
diff --git a/cards100/power_41.png b/cards100/power_41.png
new file mode 100644
index 0000000..f041011
--- /dev/null
+++ b/cards100/power_41.png
Binary files differ
diff --git a/cards100/power_42.avif b/cards100/power_42.avif
new file mode 100644
index 0000000..7bc72e2
--- /dev/null
+++ b/cards100/power_42.avif
Binary files differ
diff --git a/cards100/power_42.png b/cards100/power_42.png
new file mode 100644
index 0000000..a90d36d
--- /dev/null
+++ b/cards100/power_42.png
Binary files differ
diff --git a/cards100/power_43.avif b/cards100/power_43.avif
new file mode 100644
index 0000000..60d4c88
--- /dev/null
+++ b/cards100/power_43.avif
Binary files differ
diff --git a/cards100/power_43.png b/cards100/power_43.png
new file mode 100644
index 0000000..615cef9
--- /dev/null
+++ b/cards100/power_43.png
Binary files differ
diff --git a/cards100/power_44.avif b/cards100/power_44.avif
new file mode 100644
index 0000000..e726f93
--- /dev/null
+++ b/cards100/power_44.avif
Binary files differ
diff --git a/cards100/power_44.png b/cards100/power_44.png
new file mode 100644
index 0000000..53c8352
--- /dev/null
+++ b/cards100/power_44.png
Binary files differ
diff --git a/cards100/power_45.avif b/cards100/power_45.avif
new file mode 100644
index 0000000..f0b2264
--- /dev/null
+++ b/cards100/power_45.avif
Binary files differ
diff --git a/cards100/power_45.png b/cards100/power_45.png
new file mode 100644
index 0000000..e4cf94b
--- /dev/null
+++ b/cards100/power_45.png
Binary files differ
diff --git a/cards100/power_46.avif b/cards100/power_46.avif
new file mode 100644
index 0000000..5f60764
--- /dev/null
+++ b/cards100/power_46.avif
Binary files differ
diff --git a/cards100/power_46.png b/cards100/power_46.png
new file mode 100644
index 0000000..83e61f5
--- /dev/null
+++ b/cards100/power_46.png
Binary files differ
diff --git a/cards100/power_47.avif b/cards100/power_47.avif
new file mode 100644
index 0000000..0660baa
--- /dev/null
+++ b/cards100/power_47.avif
Binary files differ
diff --git a/cards100/power_47.png b/cards100/power_47.png
new file mode 100644
index 0000000..ecccc20
--- /dev/null
+++ b/cards100/power_47.png
Binary files differ
diff --git a/cards100/power_48.avif b/cards100/power_48.avif
new file mode 100644
index 0000000..bf54c7f
--- /dev/null
+++ b/cards100/power_48.avif
Binary files differ
diff --git a/cards100/power_48.png b/cards100/power_48.png
new file mode 100644
index 0000000..8ac724d
--- /dev/null
+++ b/cards100/power_48.png
Binary files differ
diff --git a/cards100/power_49.avif b/cards100/power_49.avif
new file mode 100644
index 0000000..772118a
--- /dev/null
+++ b/cards100/power_49.avif
Binary files differ
diff --git a/cards100/power_49.png b/cards100/power_49.png
new file mode 100644
index 0000000..b1c6d23
--- /dev/null
+++ b/cards100/power_49.png
Binary files differ
diff --git a/cards100/power_50.avif b/cards100/power_50.avif
new file mode 100644
index 0000000..35e6390
--- /dev/null
+++ b/cards100/power_50.avif
Binary files differ
diff --git a/cards100/power_50.png b/cards100/power_50.png
new file mode 100644
index 0000000..6f9d90a
--- /dev/null
+++ b/cards100/power_50.png
Binary files differ
diff --git a/cards100/power_51.avif b/cards100/power_51.avif
new file mode 100644
index 0000000..d94c98c
--- /dev/null
+++ b/cards100/power_51.avif
Binary files differ
diff --git a/cards100/power_51.png b/cards100/power_51.png
new file mode 100644
index 0000000..f1d1bb9
--- /dev/null
+++ b/cards100/power_51.png
Binary files differ
diff --git a/cards100/power_52.avif b/cards100/power_52.avif
new file mode 100644
index 0000000..c467932
--- /dev/null
+++ b/cards100/power_52.avif
Binary files differ
diff --git a/cards100/power_52.png b/cards100/power_52.png
new file mode 100644
index 0000000..489a5ca
--- /dev/null
+++ b/cards100/power_52.png
Binary files differ
diff --git a/cards100/power_7_8.avif b/cards100/power_7_8.avif
new file mode 100644
index 0000000..40ef1ac
--- /dev/null
+++ b/cards100/power_7_8.avif
Binary files differ
diff --git a/cards100/power_7_8.png b/cards100/power_7_8.png
new file mode 100644
index 0000000..5a5afce
--- /dev/null
+++ b/cards100/power_7_8.png
Binary files differ
diff --git a/cards100/power_9_10.avif b/cards100/power_9_10.avif
new file mode 100644
index 0000000..a2ef4d3
--- /dev/null
+++ b/cards100/power_9_10.avif
Binary files differ
diff --git a/cards100/power_9_10.png b/cards100/power_9_10.png
new file mode 100644
index 0000000..bfaa5aa
--- /dev/null
+++ b/cards100/power_9_10.png
Binary files differ
diff --git a/cards100/power_back.avif b/cards100/power_back.avif
new file mode 100644
index 0000000..415313f
--- /dev/null
+++ b/cards100/power_back.avif
Binary files differ
diff --git a/cards100/power_back.png b/cards100/power_back.png
new file mode 100644
index 0000000..ea26bb5
--- /dev/null
+++ b/cards100/power_back.png
Binary files differ
diff --git a/cards150/power_11_14.avif b/cards150/power_11_14.avif
new file mode 100644
index 0000000..60be195
--- /dev/null
+++ b/cards150/power_11_14.avif
Binary files differ
diff --git a/cards150/power_11_14.png b/cards150/power_11_14.png
new file mode 100644
index 0000000..f406e04
--- /dev/null
+++ b/cards150/power_11_14.png
Binary files differ
diff --git a/cards150/power_15_18.avif b/cards150/power_15_18.avif
new file mode 100644
index 0000000..0d5fa12
--- /dev/null
+++ b/cards150/power_15_18.avif
Binary files differ
diff --git a/cards150/power_15_18.png b/cards150/power_15_18.png
new file mode 100644
index 0000000..737f367
--- /dev/null
+++ b/cards150/power_15_18.png
Binary files differ
diff --git a/cards150/power_19_20.avif b/cards150/power_19_20.avif
new file mode 100644
index 0000000..fae7847
--- /dev/null
+++ b/cards150/power_19_20.avif
Binary files differ
diff --git a/cards150/power_19_20.png b/cards150/power_19_20.png
new file mode 100644
index 0000000..5d8b367
--- /dev/null
+++ b/cards150/power_19_20.png
Binary files differ
diff --git a/cards150/power_1_6.avif b/cards150/power_1_6.avif
new file mode 100644
index 0000000..16e5188
--- /dev/null
+++ b/cards150/power_1_6.avif
Binary files differ
diff --git a/cards150/power_1_6.png b/cards150/power_1_6.png
new file mode 100644
index 0000000..814a525
--- /dev/null
+++ b/cards150/power_1_6.png
Binary files differ
diff --git a/cards150/power_21_22.avif b/cards150/power_21_22.avif
new file mode 100644
index 0000000..e3cff40
--- /dev/null
+++ b/cards150/power_21_22.avif
Binary files differ
diff --git a/cards150/power_21_22.png b/cards150/power_21_22.png
new file mode 100644
index 0000000..0507797
--- /dev/null
+++ b/cards150/power_21_22.png
Binary files differ
diff --git a/cards150/power_23_26.avif b/cards150/power_23_26.avif
new file mode 100644
index 0000000..ac6bc3c
--- /dev/null
+++ b/cards150/power_23_26.avif
Binary files differ
diff --git a/cards150/power_23_26.png b/cards150/power_23_26.png
new file mode 100644
index 0000000..7391a5f
--- /dev/null
+++ b/cards150/power_23_26.png
Binary files differ
diff --git a/cards150/power_27_30.avif b/cards150/power_27_30.avif
new file mode 100644
index 0000000..f25e44b
--- /dev/null
+++ b/cards150/power_27_30.avif
Binary files differ
diff --git a/cards150/power_27_30.png b/cards150/power_27_30.png
new file mode 100644
index 0000000..c2af3e8
--- /dev/null
+++ b/cards150/power_27_30.png
Binary files differ
diff --git a/cards150/power_31_33.avif b/cards150/power_31_33.avif
new file mode 100644
index 0000000..00f69bd
--- /dev/null
+++ b/cards150/power_31_33.avif
Binary files differ
diff --git a/cards150/power_31_33.png b/cards150/power_31_33.png
new file mode 100644
index 0000000..fd9559f
--- /dev/null
+++ b/cards150/power_31_33.png
Binary files differ
diff --git a/cards150/power_34_36.avif b/cards150/power_34_36.avif
new file mode 100644
index 0000000..0658e28
--- /dev/null
+++ b/cards150/power_34_36.avif
Binary files differ
diff --git a/cards150/power_34_36.png b/cards150/power_34_36.png
new file mode 100644
index 0000000..7a247f6
--- /dev/null
+++ b/cards150/power_34_36.png
Binary files differ
diff --git a/cards150/power_37.avif b/cards150/power_37.avif
new file mode 100644
index 0000000..dfe46c1
--- /dev/null
+++ b/cards150/power_37.avif
Binary files differ
diff --git a/cards150/power_37.png b/cards150/power_37.png
new file mode 100644
index 0000000..dc2bbd0
--- /dev/null
+++ b/cards150/power_37.png
Binary files differ
diff --git a/cards150/power_38.avif b/cards150/power_38.avif
new file mode 100644
index 0000000..ec01486
--- /dev/null
+++ b/cards150/power_38.avif
Binary files differ
diff --git a/cards150/power_38.png b/cards150/power_38.png
new file mode 100644
index 0000000..ec0c371
--- /dev/null
+++ b/cards150/power_38.png
Binary files differ
diff --git a/cards150/power_39.avif b/cards150/power_39.avif
new file mode 100644
index 0000000..0537140
--- /dev/null
+++ b/cards150/power_39.avif
Binary files differ
diff --git a/cards150/power_39.png b/cards150/power_39.png
new file mode 100644
index 0000000..4a8c514
--- /dev/null
+++ b/cards150/power_39.png
Binary files differ
diff --git a/cards150/power_40.avif b/cards150/power_40.avif
new file mode 100644
index 0000000..db88422
--- /dev/null
+++ b/cards150/power_40.avif
Binary files differ
diff --git a/cards150/power_40.png b/cards150/power_40.png
new file mode 100644
index 0000000..c0e49ff
--- /dev/null
+++ b/cards150/power_40.png
Binary files differ
diff --git a/cards150/power_41.avif b/cards150/power_41.avif
new file mode 100644
index 0000000..a954dda
--- /dev/null
+++ b/cards150/power_41.avif
Binary files differ
diff --git a/cards150/power_41.png b/cards150/power_41.png
new file mode 100644
index 0000000..1dce21c
--- /dev/null
+++ b/cards150/power_41.png
Binary files differ
diff --git a/cards150/power_42.avif b/cards150/power_42.avif
new file mode 100644
index 0000000..41bd14a
--- /dev/null
+++ b/cards150/power_42.avif
Binary files differ
diff --git a/cards150/power_42.png b/cards150/power_42.png
new file mode 100644
index 0000000..33c35cb
--- /dev/null
+++ b/cards150/power_42.png
Binary files differ
diff --git a/cards150/power_43.avif b/cards150/power_43.avif
new file mode 100644
index 0000000..a309046
--- /dev/null
+++ b/cards150/power_43.avif
Binary files differ
diff --git a/cards150/power_43.png b/cards150/power_43.png
new file mode 100644
index 0000000..7aec913
--- /dev/null
+++ b/cards150/power_43.png
Binary files differ
diff --git a/cards150/power_44.avif b/cards150/power_44.avif
new file mode 100644
index 0000000..eb0e496
--- /dev/null
+++ b/cards150/power_44.avif
Binary files differ
diff --git a/cards150/power_44.png b/cards150/power_44.png
new file mode 100644
index 0000000..ea208b6
--- /dev/null
+++ b/cards150/power_44.png
Binary files differ
diff --git a/cards150/power_45.avif b/cards150/power_45.avif
new file mode 100644
index 0000000..0c6b812
--- /dev/null
+++ b/cards150/power_45.avif
Binary files differ
diff --git a/cards150/power_45.png b/cards150/power_45.png
new file mode 100644
index 0000000..fb92a03
--- /dev/null
+++ b/cards150/power_45.png
Binary files differ
diff --git a/cards150/power_46.avif b/cards150/power_46.avif
new file mode 100644
index 0000000..c9f53bd
--- /dev/null
+++ b/cards150/power_46.avif
Binary files differ
diff --git a/cards150/power_46.png b/cards150/power_46.png
new file mode 100644
index 0000000..9d26e49
--- /dev/null
+++ b/cards150/power_46.png
Binary files differ
diff --git a/cards150/power_47.avif b/cards150/power_47.avif
new file mode 100644
index 0000000..4a24bc2
--- /dev/null
+++ b/cards150/power_47.avif
Binary files differ
diff --git a/cards150/power_47.png b/cards150/power_47.png
new file mode 100644
index 0000000..37be57a
--- /dev/null
+++ b/cards150/power_47.png
Binary files differ
diff --git a/cards150/power_48.avif b/cards150/power_48.avif
new file mode 100644
index 0000000..fd143e5
--- /dev/null
+++ b/cards150/power_48.avif
Binary files differ
diff --git a/cards150/power_48.png b/cards150/power_48.png
new file mode 100644
index 0000000..81f98e6
--- /dev/null
+++ b/cards150/power_48.png
Binary files differ
diff --git a/cards150/power_49.avif b/cards150/power_49.avif
new file mode 100644
index 0000000..d269d21
--- /dev/null
+++ b/cards150/power_49.avif
Binary files differ
diff --git a/cards150/power_49.png b/cards150/power_49.png
new file mode 100644
index 0000000..b82a1a4
--- /dev/null
+++ b/cards150/power_49.png
Binary files differ
diff --git a/cards150/power_50.avif b/cards150/power_50.avif
new file mode 100644
index 0000000..4acf139
--- /dev/null
+++ b/cards150/power_50.avif
Binary files differ
diff --git a/cards150/power_50.png b/cards150/power_50.png
new file mode 100644
index 0000000..7988f80
--- /dev/null
+++ b/cards150/power_50.png
Binary files differ
diff --git a/cards150/power_51.avif b/cards150/power_51.avif
new file mode 100644
index 0000000..8bf7a59
--- /dev/null
+++ b/cards150/power_51.avif
Binary files differ
diff --git a/cards150/power_51.png b/cards150/power_51.png
new file mode 100644
index 0000000..b342cfd
--- /dev/null
+++ b/cards150/power_51.png
Binary files differ
diff --git a/cards150/power_52.avif b/cards150/power_52.avif
new file mode 100644
index 0000000..64b2c66
--- /dev/null
+++ b/cards150/power_52.avif
Binary files differ
diff --git a/cards150/power_52.png b/cards150/power_52.png
new file mode 100644
index 0000000..c9243d8
--- /dev/null
+++ b/cards150/power_52.png
Binary files differ
diff --git a/cards150/power_7_8.avif b/cards150/power_7_8.avif
new file mode 100644
index 0000000..3959742
--- /dev/null
+++ b/cards150/power_7_8.avif
Binary files differ
diff --git a/cards150/power_7_8.png b/cards150/power_7_8.png
new file mode 100644
index 0000000..8829696
--- /dev/null
+++ b/cards150/power_7_8.png
Binary files differ
diff --git a/cards150/power_9_10.avif b/cards150/power_9_10.avif
new file mode 100644
index 0000000..416ad4b
--- /dev/null
+++ b/cards150/power_9_10.avif
Binary files differ
diff --git a/cards150/power_9_10.png b/cards150/power_9_10.png
new file mode 100644
index 0000000..dcdf959
--- /dev/null
+++ b/cards150/power_9_10.png
Binary files differ
diff --git a/cards150/power_back.avif b/cards150/power_back.avif
new file mode 100644
index 0000000..7faacac
--- /dev/null
+++ b/cards150/power_back.avif
Binary files differ
diff --git a/cards150/power_back.png b/cards150/power_back.png
new file mode 100644
index 0000000..a11dcd9
--- /dev/null
+++ b/cards150/power_back.png
Binary files differ
diff --git a/cards200/event_1.avif b/cards200/event_1.avif
new file mode 100644
index 0000000..37676d7
--- /dev/null
+++ b/cards200/event_1.avif
Binary files differ
diff --git a/cards200/event_1.png b/cards200/event_1.png
new file mode 100644
index 0000000..7be2a30
--- /dev/null
+++ b/cards200/event_1.png
Binary files differ
diff --git a/cards200/event_1.webp b/cards200/event_1.webp
new file mode 100644
index 0000000..f4304b1
--- /dev/null
+++ b/cards200/event_1.webp
Binary files differ
diff --git a/cards200/event_10.avif b/cards200/event_10.avif
new file mode 100644
index 0000000..a7469e4
--- /dev/null
+++ b/cards200/event_10.avif
Binary files differ
diff --git a/cards200/event_10.png b/cards200/event_10.png
new file mode 100644
index 0000000..3f68f6a
--- /dev/null
+++ b/cards200/event_10.png
Binary files differ
diff --git a/cards200/event_10.webp b/cards200/event_10.webp
new file mode 100644
index 0000000..14dc0ee
--- /dev/null
+++ b/cards200/event_10.webp
Binary files differ
diff --git a/cards200/event_100.avif b/cards200/event_100.avif
new file mode 100644
index 0000000..6149bc9
--- /dev/null
+++ b/cards200/event_100.avif
Binary files differ
diff --git a/cards200/event_100.png b/cards200/event_100.png
new file mode 100644
index 0000000..e1a5362
--- /dev/null
+++ b/cards200/event_100.png
Binary files differ
diff --git a/cards200/event_100.webp b/cards200/event_100.webp
new file mode 100644
index 0000000..456f810
--- /dev/null
+++ b/cards200/event_100.webp
Binary files differ
diff --git a/cards200/event_101.avif b/cards200/event_101.avif
new file mode 100644
index 0000000..3b25133
--- /dev/null
+++ b/cards200/event_101.avif
Binary files differ
diff --git a/cards200/event_101.png b/cards200/event_101.png
new file mode 100644
index 0000000..7bc146c
--- /dev/null
+++ b/cards200/event_101.png
Binary files differ
diff --git a/cards200/event_101.webp b/cards200/event_101.webp
new file mode 100644
index 0000000..82438eb
--- /dev/null
+++ b/cards200/event_101.webp
Binary files differ
diff --git a/cards200/event_102.avif b/cards200/event_102.avif
new file mode 100644
index 0000000..4525531
--- /dev/null
+++ b/cards200/event_102.avif
Binary files differ
diff --git a/cards200/event_102.png b/cards200/event_102.png
new file mode 100644
index 0000000..83da244
--- /dev/null
+++ b/cards200/event_102.png
Binary files differ
diff --git a/cards200/event_102.webp b/cards200/event_102.webp
new file mode 100644
index 0000000..ce3e920
--- /dev/null
+++ b/cards200/event_102.webp
Binary files differ
diff --git a/cards200/event_103.avif b/cards200/event_103.avif
new file mode 100644
index 0000000..66e3242
--- /dev/null
+++ b/cards200/event_103.avif
Binary files differ
diff --git a/cards200/event_103.png b/cards200/event_103.png
new file mode 100644
index 0000000..7da9ba1
--- /dev/null
+++ b/cards200/event_103.png
Binary files differ
diff --git a/cards200/event_103.webp b/cards200/event_103.webp
new file mode 100644
index 0000000..1007783
--- /dev/null
+++ b/cards200/event_103.webp
Binary files differ
diff --git a/cards200/event_104.avif b/cards200/event_104.avif
new file mode 100644
index 0000000..7ceb594
--- /dev/null
+++ b/cards200/event_104.avif
Binary files differ
diff --git a/cards200/event_104.png b/cards200/event_104.png
new file mode 100644
index 0000000..180436e
--- /dev/null
+++ b/cards200/event_104.png
Binary files differ
diff --git a/cards200/event_104.webp b/cards200/event_104.webp
new file mode 100644
index 0000000..78d5038
--- /dev/null
+++ b/cards200/event_104.webp
Binary files differ
diff --git a/cards200/event_105.avif b/cards200/event_105.avif
new file mode 100644
index 0000000..2db14ee
--- /dev/null
+++ b/cards200/event_105.avif
Binary files differ
diff --git a/cards200/event_105.png b/cards200/event_105.png
new file mode 100644
index 0000000..1f62151
--- /dev/null
+++ b/cards200/event_105.png
Binary files differ
diff --git a/cards200/event_105.webp b/cards200/event_105.webp
new file mode 100644
index 0000000..1df447d
--- /dev/null
+++ b/cards200/event_105.webp
Binary files differ
diff --git a/cards200/event_106.avif b/cards200/event_106.avif
new file mode 100644
index 0000000..3bb4f2b
--- /dev/null
+++ b/cards200/event_106.avif
Binary files differ
diff --git a/cards200/event_106.png b/cards200/event_106.png
new file mode 100644
index 0000000..d6617e6
--- /dev/null
+++ b/cards200/event_106.png
Binary files differ
diff --git a/cards200/event_106.webp b/cards200/event_106.webp
new file mode 100644
index 0000000..d28872b
--- /dev/null
+++ b/cards200/event_106.webp
Binary files differ
diff --git a/cards200/event_107.avif b/cards200/event_107.avif
new file mode 100644
index 0000000..37c4282
--- /dev/null
+++ b/cards200/event_107.avif
Binary files differ
diff --git a/cards200/event_107.png b/cards200/event_107.png
new file mode 100644
index 0000000..35e208e
--- /dev/null
+++ b/cards200/event_107.png
Binary files differ
diff --git a/cards200/event_107.webp b/cards200/event_107.webp
new file mode 100644
index 0000000..a09f6e5
--- /dev/null
+++ b/cards200/event_107.webp
Binary files differ
diff --git a/cards200/event_108.avif b/cards200/event_108.avif
new file mode 100644
index 0000000..8bf84af
--- /dev/null
+++ b/cards200/event_108.avif
Binary files differ
diff --git a/cards200/event_108.png b/cards200/event_108.png
new file mode 100644
index 0000000..e86613b
--- /dev/null
+++ b/cards200/event_108.png
Binary files differ
diff --git a/cards200/event_108.webp b/cards200/event_108.webp
new file mode 100644
index 0000000..e53ffd8
--- /dev/null
+++ b/cards200/event_108.webp
Binary files differ
diff --git a/cards200/event_109.avif b/cards200/event_109.avif
new file mode 100644
index 0000000..a62f174
--- /dev/null
+++ b/cards200/event_109.avif
Binary files differ
diff --git a/cards200/event_109.png b/cards200/event_109.png
new file mode 100644
index 0000000..584e1aa
--- /dev/null
+++ b/cards200/event_109.png
Binary files differ
diff --git a/cards200/event_109.webp b/cards200/event_109.webp
new file mode 100644
index 0000000..a9d40ab
--- /dev/null
+++ b/cards200/event_109.webp
Binary files differ
diff --git a/cards200/event_11.avif b/cards200/event_11.avif
new file mode 100644
index 0000000..1346b29
--- /dev/null
+++ b/cards200/event_11.avif
Binary files differ
diff --git a/cards200/event_11.png b/cards200/event_11.png
new file mode 100644
index 0000000..90567f9
--- /dev/null
+++ b/cards200/event_11.png
Binary files differ
diff --git a/cards200/event_11.webp b/cards200/event_11.webp
new file mode 100644
index 0000000..3d65c8c
--- /dev/null
+++ b/cards200/event_11.webp
Binary files differ
diff --git a/cards200/event_110.avif b/cards200/event_110.avif
new file mode 100644
index 0000000..371c0e4
--- /dev/null
+++ b/cards200/event_110.avif
Binary files differ
diff --git a/cards200/event_110.png b/cards200/event_110.png
new file mode 100644
index 0000000..93c3e81
--- /dev/null
+++ b/cards200/event_110.png
Binary files differ
diff --git a/cards200/event_110.webp b/cards200/event_110.webp
new file mode 100644
index 0000000..3fcecd5
--- /dev/null
+++ b/cards200/event_110.webp
Binary files differ
diff --git a/cards200/event_12.avif b/cards200/event_12.avif
new file mode 100644
index 0000000..f4b2e39
--- /dev/null
+++ b/cards200/event_12.avif
Binary files differ
diff --git a/cards200/event_12.png b/cards200/event_12.png
new file mode 100644
index 0000000..86ebd53
--- /dev/null
+++ b/cards200/event_12.png
Binary files differ
diff --git a/cards200/event_12.webp b/cards200/event_12.webp
new file mode 100644
index 0000000..76c7a1b
--- /dev/null
+++ b/cards200/event_12.webp
Binary files differ
diff --git a/cards200/event_13.avif b/cards200/event_13.avif
new file mode 100644
index 0000000..ca95700
--- /dev/null
+++ b/cards200/event_13.avif
Binary files differ
diff --git a/cards200/event_13.png b/cards200/event_13.png
new file mode 100644
index 0000000..d2dc40c
--- /dev/null
+++ b/cards200/event_13.png
Binary files differ
diff --git a/cards200/event_13.webp b/cards200/event_13.webp
new file mode 100644
index 0000000..6ab7fa3
--- /dev/null
+++ b/cards200/event_13.webp
Binary files differ
diff --git a/cards200/event_14.avif b/cards200/event_14.avif
new file mode 100644
index 0000000..a90ee46
--- /dev/null
+++ b/cards200/event_14.avif
Binary files differ
diff --git a/cards200/event_14.png b/cards200/event_14.png
new file mode 100644
index 0000000..5b173b5
--- /dev/null
+++ b/cards200/event_14.png
Binary files differ
diff --git a/cards200/event_14.webp b/cards200/event_14.webp
new file mode 100644
index 0000000..a723316
--- /dev/null
+++ b/cards200/event_14.webp
Binary files differ
diff --git a/cards200/event_15.avif b/cards200/event_15.avif
new file mode 100644
index 0000000..8830002
--- /dev/null
+++ b/cards200/event_15.avif
Binary files differ
diff --git a/cards200/event_15.png b/cards200/event_15.png
new file mode 100644
index 0000000..0d9a87c
--- /dev/null
+++ b/cards200/event_15.png
Binary files differ
diff --git a/cards200/event_15.webp b/cards200/event_15.webp
new file mode 100644
index 0000000..0e70483
--- /dev/null
+++ b/cards200/event_15.webp
Binary files differ
diff --git a/cards200/event_16.avif b/cards200/event_16.avif
new file mode 100644
index 0000000..4279e72
--- /dev/null
+++ b/cards200/event_16.avif
Binary files differ
diff --git a/cards200/event_16.png b/cards200/event_16.png
new file mode 100644
index 0000000..7703f86
--- /dev/null
+++ b/cards200/event_16.png
Binary files differ
diff --git a/cards200/event_16.webp b/cards200/event_16.webp
new file mode 100644
index 0000000..70f1988
--- /dev/null
+++ b/cards200/event_16.webp
Binary files differ
diff --git a/cards200/event_17.avif b/cards200/event_17.avif
new file mode 100644
index 0000000..0bb8fd6
--- /dev/null
+++ b/cards200/event_17.avif
Binary files differ
diff --git a/cards200/event_17.png b/cards200/event_17.png
new file mode 100644
index 0000000..14bd6b5
--- /dev/null
+++ b/cards200/event_17.png
Binary files differ
diff --git a/cards200/event_17.webp b/cards200/event_17.webp
new file mode 100644
index 0000000..4ad15b4
--- /dev/null
+++ b/cards200/event_17.webp
Binary files differ
diff --git a/cards200/event_18.avif b/cards200/event_18.avif
new file mode 100644
index 0000000..4e614b8
--- /dev/null
+++ b/cards200/event_18.avif
Binary files differ
diff --git a/cards200/event_18.png b/cards200/event_18.png
new file mode 100644
index 0000000..5d4e50b
--- /dev/null
+++ b/cards200/event_18.png
Binary files differ
diff --git a/cards200/event_18.webp b/cards200/event_18.webp
new file mode 100644
index 0000000..94459ea
--- /dev/null
+++ b/cards200/event_18.webp
Binary files differ
diff --git a/cards200/event_19.avif b/cards200/event_19.avif
new file mode 100644
index 0000000..425a5fb
--- /dev/null
+++ b/cards200/event_19.avif
Binary files differ
diff --git a/cards200/event_19.png b/cards200/event_19.png
new file mode 100644
index 0000000..18f8c42
--- /dev/null
+++ b/cards200/event_19.png
Binary files differ
diff --git a/cards200/event_19.webp b/cards200/event_19.webp
new file mode 100644
index 0000000..2f186df
--- /dev/null
+++ b/cards200/event_19.webp
Binary files differ
diff --git a/cards200/event_2.avif b/cards200/event_2.avif
new file mode 100644
index 0000000..e0b104f
--- /dev/null
+++ b/cards200/event_2.avif
Binary files differ
diff --git a/cards200/event_2.png b/cards200/event_2.png
new file mode 100644
index 0000000..ffdf5d1
--- /dev/null
+++ b/cards200/event_2.png
Binary files differ
diff --git a/cards200/event_2.webp b/cards200/event_2.webp
new file mode 100644
index 0000000..d3c04a7
--- /dev/null
+++ b/cards200/event_2.webp
Binary files differ
diff --git a/cards200/event_20.avif b/cards200/event_20.avif
new file mode 100644
index 0000000..4e8d106
--- /dev/null
+++ b/cards200/event_20.avif
Binary files differ
diff --git a/cards200/event_20.png b/cards200/event_20.png
new file mode 100644
index 0000000..3bc6981
--- /dev/null
+++ b/cards200/event_20.png
Binary files differ
diff --git a/cards200/event_20.webp b/cards200/event_20.webp
new file mode 100644
index 0000000..56e771c
--- /dev/null
+++ b/cards200/event_20.webp
Binary files differ
diff --git a/cards200/event_21.avif b/cards200/event_21.avif
new file mode 100644
index 0000000..fec487f
--- /dev/null
+++ b/cards200/event_21.avif
Binary files differ
diff --git a/cards200/event_21.png b/cards200/event_21.png
new file mode 100644
index 0000000..bdf2aad
--- /dev/null
+++ b/cards200/event_21.png
Binary files differ
diff --git a/cards200/event_21.webp b/cards200/event_21.webp
new file mode 100644
index 0000000..7344fd9
--- /dev/null
+++ b/cards200/event_21.webp
Binary files differ
diff --git a/cards200/event_22.avif b/cards200/event_22.avif
new file mode 100644
index 0000000..92d8304
--- /dev/null
+++ b/cards200/event_22.avif
Binary files differ
diff --git a/cards200/event_22.png b/cards200/event_22.png
new file mode 100644
index 0000000..7a473d5
--- /dev/null
+++ b/cards200/event_22.png
Binary files differ
diff --git a/cards200/event_22.webp b/cards200/event_22.webp
new file mode 100644
index 0000000..87d539f
--- /dev/null
+++ b/cards200/event_22.webp
Binary files differ
diff --git a/cards200/event_23.avif b/cards200/event_23.avif
new file mode 100644
index 0000000..b69c19c
--- /dev/null
+++ b/cards200/event_23.avif
Binary files differ
diff --git a/cards200/event_23.png b/cards200/event_23.png
new file mode 100644
index 0000000..406d6b0
--- /dev/null
+++ b/cards200/event_23.png
Binary files differ
diff --git a/cards200/event_23.webp b/cards200/event_23.webp
new file mode 100644
index 0000000..9f297c8
--- /dev/null
+++ b/cards200/event_23.webp
Binary files differ
diff --git a/cards200/event_24.avif b/cards200/event_24.avif
new file mode 100644
index 0000000..34a08af
--- /dev/null
+++ b/cards200/event_24.avif
Binary files differ
diff --git a/cards200/event_24.png b/cards200/event_24.png
new file mode 100644
index 0000000..1b2f5e7
--- /dev/null
+++ b/cards200/event_24.png
Binary files differ
diff --git a/cards200/event_24.webp b/cards200/event_24.webp
new file mode 100644
index 0000000..c6be7da
--- /dev/null
+++ b/cards200/event_24.webp
Binary files differ
diff --git a/cards200/event_25.avif b/cards200/event_25.avif
new file mode 100644
index 0000000..9df39c4
--- /dev/null
+++ b/cards200/event_25.avif
Binary files differ
diff --git a/cards200/event_25.png b/cards200/event_25.png
new file mode 100644
index 0000000..b766ce3
--- /dev/null
+++ b/cards200/event_25.png
Binary files differ
diff --git a/cards200/event_25.webp b/cards200/event_25.webp
new file mode 100644
index 0000000..3e11268
--- /dev/null
+++ b/cards200/event_25.webp
Binary files differ
diff --git a/cards200/event_26.avif b/cards200/event_26.avif
new file mode 100644
index 0000000..ac2b501
--- /dev/null
+++ b/cards200/event_26.avif
Binary files differ
diff --git a/cards200/event_26.png b/cards200/event_26.png
new file mode 100644
index 0000000..f25449f
--- /dev/null
+++ b/cards200/event_26.png
Binary files differ
diff --git a/cards200/event_26.webp b/cards200/event_26.webp
new file mode 100644
index 0000000..ff259f1
--- /dev/null
+++ b/cards200/event_26.webp
Binary files differ
diff --git a/cards200/event_27.avif b/cards200/event_27.avif
new file mode 100644
index 0000000..c9f465b
--- /dev/null
+++ b/cards200/event_27.avif
Binary files differ
diff --git a/cards200/event_27.png b/cards200/event_27.png
new file mode 100644
index 0000000..2bbca72
--- /dev/null
+++ b/cards200/event_27.png
Binary files differ
diff --git a/cards200/event_27.webp b/cards200/event_27.webp
new file mode 100644
index 0000000..5376eed
--- /dev/null
+++ b/cards200/event_27.webp
Binary files differ
diff --git a/cards200/event_28.avif b/cards200/event_28.avif
new file mode 100644
index 0000000..3177398
--- /dev/null
+++ b/cards200/event_28.avif
Binary files differ
diff --git a/cards200/event_28.png b/cards200/event_28.png
new file mode 100644
index 0000000..6d93051
--- /dev/null
+++ b/cards200/event_28.png
Binary files differ
diff --git a/cards200/event_28.webp b/cards200/event_28.webp
new file mode 100644
index 0000000..97d3ee9
--- /dev/null
+++ b/cards200/event_28.webp
Binary files differ
diff --git a/cards200/event_29.avif b/cards200/event_29.avif
new file mode 100644
index 0000000..e2eb1f1
--- /dev/null
+++ b/cards200/event_29.avif
Binary files differ
diff --git a/cards200/event_29.png b/cards200/event_29.png
new file mode 100644
index 0000000..4a1d1d8
--- /dev/null
+++ b/cards200/event_29.png
Binary files differ
diff --git a/cards200/event_29.webp b/cards200/event_29.webp
new file mode 100644
index 0000000..b8969a1
--- /dev/null
+++ b/cards200/event_29.webp
Binary files differ
diff --git a/cards200/event_3.avif b/cards200/event_3.avif
new file mode 100644
index 0000000..99ecc4e
--- /dev/null
+++ b/cards200/event_3.avif
Binary files differ
diff --git a/cards200/event_3.png b/cards200/event_3.png
new file mode 100644
index 0000000..f2e0367
--- /dev/null
+++ b/cards200/event_3.png
Binary files differ
diff --git a/cards200/event_3.webp b/cards200/event_3.webp
new file mode 100644
index 0000000..8e38616
--- /dev/null
+++ b/cards200/event_3.webp
Binary files differ
diff --git a/cards200/event_30.avif b/cards200/event_30.avif
new file mode 100644
index 0000000..c7733a7
--- /dev/null
+++ b/cards200/event_30.avif
Binary files differ
diff --git a/cards200/event_30.png b/cards200/event_30.png
new file mode 100644
index 0000000..aa38516
--- /dev/null
+++ b/cards200/event_30.png
Binary files differ
diff --git a/cards200/event_30.webp b/cards200/event_30.webp
new file mode 100644
index 0000000..a5a4837
--- /dev/null
+++ b/cards200/event_30.webp
Binary files differ
diff --git a/cards200/event_31.avif b/cards200/event_31.avif
new file mode 100644
index 0000000..233b023
--- /dev/null
+++ b/cards200/event_31.avif
Binary files differ
diff --git a/cards200/event_31.png b/cards200/event_31.png
new file mode 100644
index 0000000..2837385
--- /dev/null
+++ b/cards200/event_31.png
Binary files differ
diff --git a/cards200/event_31.webp b/cards200/event_31.webp
new file mode 100644
index 0000000..e5bdd29
--- /dev/null
+++ b/cards200/event_31.webp
Binary files differ
diff --git a/cards200/event_32.avif b/cards200/event_32.avif
new file mode 100644
index 0000000..03a9d97
--- /dev/null
+++ b/cards200/event_32.avif
Binary files differ
diff --git a/cards200/event_32.png b/cards200/event_32.png
new file mode 100644
index 0000000..ad5c601
--- /dev/null
+++ b/cards200/event_32.png
Binary files differ
diff --git a/cards200/event_32.webp b/cards200/event_32.webp
new file mode 100644
index 0000000..26ee578
--- /dev/null
+++ b/cards200/event_32.webp
Binary files differ
diff --git a/cards200/event_33.avif b/cards200/event_33.avif
new file mode 100644
index 0000000..37b2411
--- /dev/null
+++ b/cards200/event_33.avif
Binary files differ
diff --git a/cards200/event_33.png b/cards200/event_33.png
new file mode 100644
index 0000000..632c09b
--- /dev/null
+++ b/cards200/event_33.png
Binary files differ
diff --git a/cards200/event_33.webp b/cards200/event_33.webp
new file mode 100644
index 0000000..fe37642
--- /dev/null
+++ b/cards200/event_33.webp
Binary files differ
diff --git a/cards200/event_34.avif b/cards200/event_34.avif
new file mode 100644
index 0000000..0bb191a
--- /dev/null
+++ b/cards200/event_34.avif
Binary files differ
diff --git a/cards200/event_34.png b/cards200/event_34.png
new file mode 100644
index 0000000..fdb5109
--- /dev/null
+++ b/cards200/event_34.png
Binary files differ
diff --git a/cards200/event_34.webp b/cards200/event_34.webp
new file mode 100644
index 0000000..7bb3884
--- /dev/null
+++ b/cards200/event_34.webp
Binary files differ
diff --git a/cards200/event_35.avif b/cards200/event_35.avif
new file mode 100644
index 0000000..8f04e43
--- /dev/null
+++ b/cards200/event_35.avif
Binary files differ
diff --git a/cards200/event_35.png b/cards200/event_35.png
new file mode 100644
index 0000000..9d89816
--- /dev/null
+++ b/cards200/event_35.png
Binary files differ
diff --git a/cards200/event_35.webp b/cards200/event_35.webp
new file mode 100644
index 0000000..9e2dde8
--- /dev/null
+++ b/cards200/event_35.webp
Binary files differ
diff --git a/cards200/event_36.avif b/cards200/event_36.avif
new file mode 100644
index 0000000..e752c9b
--- /dev/null
+++ b/cards200/event_36.avif
Binary files differ
diff --git a/cards200/event_36.png b/cards200/event_36.png
new file mode 100644
index 0000000..de38fbf
--- /dev/null
+++ b/cards200/event_36.png
Binary files differ
diff --git a/cards200/event_36.webp b/cards200/event_36.webp
new file mode 100644
index 0000000..5a801f0
--- /dev/null
+++ b/cards200/event_36.webp
Binary files differ
diff --git a/cards200/event_37.avif b/cards200/event_37.avif
new file mode 100644
index 0000000..89dc908
--- /dev/null
+++ b/cards200/event_37.avif
Binary files differ
diff --git a/cards200/event_37.png b/cards200/event_37.png
new file mode 100644
index 0000000..8c20c59
--- /dev/null
+++ b/cards200/event_37.png
Binary files differ
diff --git a/cards200/event_37.webp b/cards200/event_37.webp
new file mode 100644
index 0000000..7cf52b6
--- /dev/null
+++ b/cards200/event_37.webp
Binary files differ
diff --git a/cards200/event_38.avif b/cards200/event_38.avif
new file mode 100644
index 0000000..9319277
--- /dev/null
+++ b/cards200/event_38.avif
Binary files differ
diff --git a/cards200/event_38.png b/cards200/event_38.png
new file mode 100644
index 0000000..cfa6417
--- /dev/null
+++ b/cards200/event_38.png
Binary files differ
diff --git a/cards200/event_38.webp b/cards200/event_38.webp
new file mode 100644
index 0000000..8502e48
--- /dev/null
+++ b/cards200/event_38.webp
Binary files differ
diff --git a/cards200/event_39.avif b/cards200/event_39.avif
new file mode 100644
index 0000000..c05be8b
--- /dev/null
+++ b/cards200/event_39.avif
Binary files differ
diff --git a/cards200/event_39.png b/cards200/event_39.png
new file mode 100644
index 0000000..4d2a82b
--- /dev/null
+++ b/cards200/event_39.png
Binary files differ
diff --git a/cards200/event_39.webp b/cards200/event_39.webp
new file mode 100644
index 0000000..0ad3781
--- /dev/null
+++ b/cards200/event_39.webp
Binary files differ
diff --git a/cards200/event_4.avif b/cards200/event_4.avif
new file mode 100644
index 0000000..a87302b
--- /dev/null
+++ b/cards200/event_4.avif
Binary files differ
diff --git a/cards200/event_4.png b/cards200/event_4.png
new file mode 100644
index 0000000..74e0091
--- /dev/null
+++ b/cards200/event_4.png
Binary files differ
diff --git a/cards200/event_4.webp b/cards200/event_4.webp
new file mode 100644
index 0000000..12cf544
--- /dev/null
+++ b/cards200/event_4.webp
Binary files differ
diff --git a/cards200/event_40.avif b/cards200/event_40.avif
new file mode 100644
index 0000000..4341b04
--- /dev/null
+++ b/cards200/event_40.avif
Binary files differ
diff --git a/cards200/event_40.png b/cards200/event_40.png
new file mode 100644
index 0000000..69f5ab9
--- /dev/null
+++ b/cards200/event_40.png
Binary files differ
diff --git a/cards200/event_40.webp b/cards200/event_40.webp
new file mode 100644
index 0000000..6b2e969
--- /dev/null
+++ b/cards200/event_40.webp
Binary files differ
diff --git a/cards200/event_41.avif b/cards200/event_41.avif
new file mode 100644
index 0000000..70a94cd
--- /dev/null
+++ b/cards200/event_41.avif
Binary files differ
diff --git a/cards200/event_41.png b/cards200/event_41.png
new file mode 100644
index 0000000..4837400
--- /dev/null
+++ b/cards200/event_41.png
Binary files differ
diff --git a/cards200/event_41.webp b/cards200/event_41.webp
new file mode 100644
index 0000000..2dbef1f
--- /dev/null
+++ b/cards200/event_41.webp
Binary files differ
diff --git a/cards200/event_42.avif b/cards200/event_42.avif
new file mode 100644
index 0000000..f5f1c8c
--- /dev/null
+++ b/cards200/event_42.avif
Binary files differ
diff --git a/cards200/event_42.png b/cards200/event_42.png
new file mode 100644
index 0000000..873d29d
--- /dev/null
+++ b/cards200/event_42.png
Binary files differ
diff --git a/cards200/event_42.webp b/cards200/event_42.webp
new file mode 100644
index 0000000..a131d4c
--- /dev/null
+++ b/cards200/event_42.webp
Binary files differ
diff --git a/cards200/event_43.avif b/cards200/event_43.avif
new file mode 100644
index 0000000..c9afc33
--- /dev/null
+++ b/cards200/event_43.avif
Binary files differ
diff --git a/cards200/event_43.png b/cards200/event_43.png
new file mode 100644
index 0000000..c4939cc
--- /dev/null
+++ b/cards200/event_43.png
Binary files differ
diff --git a/cards200/event_43.webp b/cards200/event_43.webp
new file mode 100644
index 0000000..783e4f1
--- /dev/null
+++ b/cards200/event_43.webp
Binary files differ
diff --git a/cards200/event_44.avif b/cards200/event_44.avif
new file mode 100644
index 0000000..0909fa3
--- /dev/null
+++ b/cards200/event_44.avif
Binary files differ
diff --git a/cards200/event_44.png b/cards200/event_44.png
new file mode 100644
index 0000000..ba748fa
--- /dev/null
+++ b/cards200/event_44.png
Binary files differ
diff --git a/cards200/event_44.webp b/cards200/event_44.webp
new file mode 100644
index 0000000..d1316b5
--- /dev/null
+++ b/cards200/event_44.webp
Binary files differ
diff --git a/cards200/event_45.avif b/cards200/event_45.avif
new file mode 100644
index 0000000..d6e5762
--- /dev/null
+++ b/cards200/event_45.avif
Binary files differ
diff --git a/cards200/event_45.png b/cards200/event_45.png
new file mode 100644
index 0000000..8acc4c4
--- /dev/null
+++ b/cards200/event_45.png
Binary files differ
diff --git a/cards200/event_45.webp b/cards200/event_45.webp
new file mode 100644
index 0000000..46817a3
--- /dev/null
+++ b/cards200/event_45.webp
Binary files differ
diff --git a/cards200/event_46.avif b/cards200/event_46.avif
new file mode 100644
index 0000000..1d7e138
--- /dev/null
+++ b/cards200/event_46.avif
Binary files differ
diff --git a/cards200/event_46.png b/cards200/event_46.png
new file mode 100644
index 0000000..a4887f5
--- /dev/null
+++ b/cards200/event_46.png
Binary files differ
diff --git a/cards200/event_46.webp b/cards200/event_46.webp
new file mode 100644
index 0000000..b9f66d4
--- /dev/null
+++ b/cards200/event_46.webp
Binary files differ
diff --git a/cards200/event_47.avif b/cards200/event_47.avif
new file mode 100644
index 0000000..4c3560c
--- /dev/null
+++ b/cards200/event_47.avif
Binary files differ
diff --git a/cards200/event_47.png b/cards200/event_47.png
new file mode 100644
index 0000000..cd0928f
--- /dev/null
+++ b/cards200/event_47.png
Binary files differ
diff --git a/cards200/event_47.webp b/cards200/event_47.webp
new file mode 100644
index 0000000..cfe776a
--- /dev/null
+++ b/cards200/event_47.webp
Binary files differ
diff --git a/cards200/event_48.avif b/cards200/event_48.avif
new file mode 100644
index 0000000..8dffbdd
--- /dev/null
+++ b/cards200/event_48.avif
Binary files differ
diff --git a/cards200/event_48.png b/cards200/event_48.png
new file mode 100644
index 0000000..bbe102c
--- /dev/null
+++ b/cards200/event_48.png
Binary files differ
diff --git a/cards200/event_48.webp b/cards200/event_48.webp
new file mode 100644
index 0000000..56ce918
--- /dev/null
+++ b/cards200/event_48.webp
Binary files differ
diff --git a/cards200/event_49.avif b/cards200/event_49.avif
new file mode 100644
index 0000000..d9e890e
--- /dev/null
+++ b/cards200/event_49.avif
Binary files differ
diff --git a/cards200/event_49.png b/cards200/event_49.png
new file mode 100644
index 0000000..3de292d
--- /dev/null
+++ b/cards200/event_49.png
Binary files differ
diff --git a/cards200/event_49.webp b/cards200/event_49.webp
new file mode 100644
index 0000000..cdcfbed
--- /dev/null
+++ b/cards200/event_49.webp
Binary files differ
diff --git a/cards200/event_5.avif b/cards200/event_5.avif
new file mode 100644
index 0000000..7a2a4ec
--- /dev/null
+++ b/cards200/event_5.avif
Binary files differ
diff --git a/cards200/event_5.png b/cards200/event_5.png
new file mode 100644
index 0000000..0122a96
--- /dev/null
+++ b/cards200/event_5.png
Binary files differ
diff --git a/cards200/event_5.webp b/cards200/event_5.webp
new file mode 100644
index 0000000..6b84db6
--- /dev/null
+++ b/cards200/event_5.webp
Binary files differ
diff --git a/cards200/event_50.avif b/cards200/event_50.avif
new file mode 100644
index 0000000..470453d
--- /dev/null
+++ b/cards200/event_50.avif
Binary files differ
diff --git a/cards200/event_50.png b/cards200/event_50.png
new file mode 100644
index 0000000..9734ecd
--- /dev/null
+++ b/cards200/event_50.png
Binary files differ
diff --git a/cards200/event_50.webp b/cards200/event_50.webp
new file mode 100644
index 0000000..ec14c14
--- /dev/null
+++ b/cards200/event_50.webp
Binary files differ
diff --git a/cards200/event_51.avif b/cards200/event_51.avif
new file mode 100644
index 0000000..04e3828
--- /dev/null
+++ b/cards200/event_51.avif
Binary files differ
diff --git a/cards200/event_51.png b/cards200/event_51.png
new file mode 100644
index 0000000..96d295e
--- /dev/null
+++ b/cards200/event_51.png
Binary files differ
diff --git a/cards200/event_51.webp b/cards200/event_51.webp
new file mode 100644
index 0000000..074c9f6
--- /dev/null
+++ b/cards200/event_51.webp
Binary files differ
diff --git a/cards200/event_52.avif b/cards200/event_52.avif
new file mode 100644
index 0000000..6c89f4b
--- /dev/null
+++ b/cards200/event_52.avif
Binary files differ
diff --git a/cards200/event_52.png b/cards200/event_52.png
new file mode 100644
index 0000000..dc60078
--- /dev/null
+++ b/cards200/event_52.png
Binary files differ
diff --git a/cards200/event_52.webp b/cards200/event_52.webp
new file mode 100644
index 0000000..6711bae
--- /dev/null
+++ b/cards200/event_52.webp
Binary files differ
diff --git a/cards200/event_53.avif b/cards200/event_53.avif
new file mode 100644
index 0000000..996fbe8
--- /dev/null
+++ b/cards200/event_53.avif
Binary files differ
diff --git a/cards200/event_53.png b/cards200/event_53.png
new file mode 100644
index 0000000..57305d2
--- /dev/null
+++ b/cards200/event_53.png
Binary files differ
diff --git a/cards200/event_53.webp b/cards200/event_53.webp
new file mode 100644
index 0000000..ca62a7b
--- /dev/null
+++ b/cards200/event_53.webp
Binary files differ
diff --git a/cards200/event_54.avif b/cards200/event_54.avif
new file mode 100644
index 0000000..35fb210
--- /dev/null
+++ b/cards200/event_54.avif
Binary files differ
diff --git a/cards200/event_54.png b/cards200/event_54.png
new file mode 100644
index 0000000..848f730
--- /dev/null
+++ b/cards200/event_54.png
Binary files differ
diff --git a/cards200/event_54.webp b/cards200/event_54.webp
new file mode 100644
index 0000000..5e222ea
--- /dev/null
+++ b/cards200/event_54.webp
Binary files differ
diff --git a/cards200/event_55.avif b/cards200/event_55.avif
new file mode 100644
index 0000000..c3737e3
--- /dev/null
+++ b/cards200/event_55.avif
Binary files differ
diff --git a/cards200/event_55.png b/cards200/event_55.png
new file mode 100644
index 0000000..989b947
--- /dev/null
+++ b/cards200/event_55.png
Binary files differ
diff --git a/cards200/event_55.webp b/cards200/event_55.webp
new file mode 100644
index 0000000..3dce13c
--- /dev/null
+++ b/cards200/event_55.webp
Binary files differ
diff --git a/cards200/event_56.avif b/cards200/event_56.avif
new file mode 100644
index 0000000..7c2dbf5
--- /dev/null
+++ b/cards200/event_56.avif
Binary files differ
diff --git a/cards200/event_56.png b/cards200/event_56.png
new file mode 100644
index 0000000..fb65a56
--- /dev/null
+++ b/cards200/event_56.png
Binary files differ
diff --git a/cards200/event_56.webp b/cards200/event_56.webp
new file mode 100644
index 0000000..3594f7f
--- /dev/null
+++ b/cards200/event_56.webp
Binary files differ
diff --git a/cards200/event_57.avif b/cards200/event_57.avif
new file mode 100644
index 0000000..6d9e4a5
--- /dev/null
+++ b/cards200/event_57.avif
Binary files differ
diff --git a/cards200/event_57.png b/cards200/event_57.png
new file mode 100644
index 0000000..d81033c
--- /dev/null
+++ b/cards200/event_57.png
Binary files differ
diff --git a/cards200/event_57.webp b/cards200/event_57.webp
new file mode 100644
index 0000000..435f9db
--- /dev/null
+++ b/cards200/event_57.webp
Binary files differ
diff --git a/cards200/event_58.avif b/cards200/event_58.avif
new file mode 100644
index 0000000..fcea69f
--- /dev/null
+++ b/cards200/event_58.avif
Binary files differ
diff --git a/cards200/event_58.png b/cards200/event_58.png
new file mode 100644
index 0000000..c4a1be5
--- /dev/null
+++ b/cards200/event_58.png
Binary files differ
diff --git a/cards200/event_58.webp b/cards200/event_58.webp
new file mode 100644
index 0000000..30d7c20
--- /dev/null
+++ b/cards200/event_58.webp
Binary files differ
diff --git a/cards200/event_59.avif b/cards200/event_59.avif
new file mode 100644
index 0000000..abc5bad
--- /dev/null
+++ b/cards200/event_59.avif
Binary files differ
diff --git a/cards200/event_59.png b/cards200/event_59.png
new file mode 100644
index 0000000..cc4e42a
--- /dev/null
+++ b/cards200/event_59.png
Binary files differ
diff --git a/cards200/event_59.webp b/cards200/event_59.webp
new file mode 100644
index 0000000..b75ecf2
--- /dev/null
+++ b/cards200/event_59.webp
Binary files differ
diff --git a/cards200/event_6.avif b/cards200/event_6.avif
new file mode 100644
index 0000000..b460229
--- /dev/null
+++ b/cards200/event_6.avif
Binary files differ
diff --git a/cards200/event_6.png b/cards200/event_6.png
new file mode 100644
index 0000000..20211bf
--- /dev/null
+++ b/cards200/event_6.png
Binary files differ
diff --git a/cards200/event_6.webp b/cards200/event_6.webp
new file mode 100644
index 0000000..e708af7
--- /dev/null
+++ b/cards200/event_6.webp
Binary files differ
diff --git a/cards200/event_60.avif b/cards200/event_60.avif
new file mode 100644
index 0000000..f346cbd
--- /dev/null
+++ b/cards200/event_60.avif
Binary files differ
diff --git a/cards200/event_60.png b/cards200/event_60.png
new file mode 100644
index 0000000..8337790
--- /dev/null
+++ b/cards200/event_60.png
Binary files differ
diff --git a/cards200/event_60.webp b/cards200/event_60.webp
new file mode 100644
index 0000000..6e5b3e8
--- /dev/null
+++ b/cards200/event_60.webp
Binary files differ
diff --git a/cards200/event_61.avif b/cards200/event_61.avif
new file mode 100644
index 0000000..f7b82d2
--- /dev/null
+++ b/cards200/event_61.avif
Binary files differ
diff --git a/cards200/event_61.png b/cards200/event_61.png
new file mode 100644
index 0000000..8af7292
--- /dev/null
+++ b/cards200/event_61.png
Binary files differ
diff --git a/cards200/event_61.webp b/cards200/event_61.webp
new file mode 100644
index 0000000..5011fa6
--- /dev/null
+++ b/cards200/event_61.webp
Binary files differ
diff --git a/cards200/event_62.avif b/cards200/event_62.avif
new file mode 100644
index 0000000..0e17428
--- /dev/null
+++ b/cards200/event_62.avif
Binary files differ
diff --git a/cards200/event_62.png b/cards200/event_62.png
new file mode 100644
index 0000000..fa9481b
--- /dev/null
+++ b/cards200/event_62.png
Binary files differ
diff --git a/cards200/event_62.webp b/cards200/event_62.webp
new file mode 100644
index 0000000..4192e3c
--- /dev/null
+++ b/cards200/event_62.webp
Binary files differ
diff --git a/cards200/event_63.avif b/cards200/event_63.avif
new file mode 100644
index 0000000..3fa01b4
--- /dev/null
+++ b/cards200/event_63.avif
Binary files differ
diff --git a/cards200/event_63.png b/cards200/event_63.png
new file mode 100644
index 0000000..3f1a60f
--- /dev/null
+++ b/cards200/event_63.png
Binary files differ
diff --git a/cards200/event_63.webp b/cards200/event_63.webp
new file mode 100644
index 0000000..c963bdf
--- /dev/null
+++ b/cards200/event_63.webp
Binary files differ
diff --git a/cards200/event_64.avif b/cards200/event_64.avif
new file mode 100644
index 0000000..e97ac01
--- /dev/null
+++ b/cards200/event_64.avif
Binary files differ
diff --git a/cards200/event_64.png b/cards200/event_64.png
new file mode 100644
index 0000000..95ba4f1
--- /dev/null
+++ b/cards200/event_64.png
Binary files differ
diff --git a/cards200/event_64.webp b/cards200/event_64.webp
new file mode 100644
index 0000000..4914c35
--- /dev/null
+++ b/cards200/event_64.webp
Binary files differ
diff --git a/cards200/event_65.avif b/cards200/event_65.avif
new file mode 100644
index 0000000..6c1f69c
--- /dev/null
+++ b/cards200/event_65.avif
Binary files differ
diff --git a/cards200/event_65.png b/cards200/event_65.png
new file mode 100644
index 0000000..2a81eca
--- /dev/null
+++ b/cards200/event_65.png
Binary files differ
diff --git a/cards200/event_65.webp b/cards200/event_65.webp
new file mode 100644
index 0000000..a4502be
--- /dev/null
+++ b/cards200/event_65.webp
Binary files differ
diff --git a/cards200/event_66.avif b/cards200/event_66.avif
new file mode 100644
index 0000000..df72c90
--- /dev/null
+++ b/cards200/event_66.avif
Binary files differ
diff --git a/cards200/event_66.png b/cards200/event_66.png
new file mode 100644
index 0000000..4a46077
--- /dev/null
+++ b/cards200/event_66.png
Binary files differ
diff --git a/cards200/event_66.webp b/cards200/event_66.webp
new file mode 100644
index 0000000..43a61ee
--- /dev/null
+++ b/cards200/event_66.webp
Binary files differ
diff --git a/cards200/event_67.avif b/cards200/event_67.avif
new file mode 100644
index 0000000..bd9dccd
--- /dev/null
+++ b/cards200/event_67.avif
Binary files differ
diff --git a/cards200/event_67.png b/cards200/event_67.png
new file mode 100644
index 0000000..f02fd09
--- /dev/null
+++ b/cards200/event_67.png
Binary files differ
diff --git a/cards200/event_67.webp b/cards200/event_67.webp
new file mode 100644
index 0000000..3f5b00d
--- /dev/null
+++ b/cards200/event_67.webp
Binary files differ
diff --git a/cards200/event_68.avif b/cards200/event_68.avif
new file mode 100644
index 0000000..267b562
--- /dev/null
+++ b/cards200/event_68.avif
Binary files differ
diff --git a/cards200/event_68.png b/cards200/event_68.png
new file mode 100644
index 0000000..6b20e51
--- /dev/null
+++ b/cards200/event_68.png
Binary files differ
diff --git a/cards200/event_68.webp b/cards200/event_68.webp
new file mode 100644
index 0000000..8238f60
--- /dev/null
+++ b/cards200/event_68.webp
Binary files differ
diff --git a/cards200/event_69.avif b/cards200/event_69.avif
new file mode 100644
index 0000000..5d40d1b
--- /dev/null
+++ b/cards200/event_69.avif
Binary files differ
diff --git a/cards200/event_69.png b/cards200/event_69.png
new file mode 100644
index 0000000..69b5f38
--- /dev/null
+++ b/cards200/event_69.png
Binary files differ
diff --git a/cards200/event_69.webp b/cards200/event_69.webp
new file mode 100644
index 0000000..219f77e
--- /dev/null
+++ b/cards200/event_69.webp
Binary files differ
diff --git a/cards200/event_7.avif b/cards200/event_7.avif
new file mode 100644
index 0000000..6384ba6
--- /dev/null
+++ b/cards200/event_7.avif
Binary files differ
diff --git a/cards200/event_7.png b/cards200/event_7.png
new file mode 100644
index 0000000..302d6d4
--- /dev/null
+++ b/cards200/event_7.png
Binary files differ
diff --git a/cards200/event_7.webp b/cards200/event_7.webp
new file mode 100644
index 0000000..b8a9820
--- /dev/null
+++ b/cards200/event_7.webp
Binary files differ
diff --git a/cards200/event_70.avif b/cards200/event_70.avif
new file mode 100644
index 0000000..0efc38b
--- /dev/null
+++ b/cards200/event_70.avif
Binary files differ
diff --git a/cards200/event_70.png b/cards200/event_70.png
new file mode 100644
index 0000000..40e0027
--- /dev/null
+++ b/cards200/event_70.png
Binary files differ
diff --git a/cards200/event_70.webp b/cards200/event_70.webp
new file mode 100644
index 0000000..40fe8e0
--- /dev/null
+++ b/cards200/event_70.webp
Binary files differ
diff --git a/cards200/event_71.avif b/cards200/event_71.avif
new file mode 100644
index 0000000..7a05cc6
--- /dev/null
+++ b/cards200/event_71.avif
Binary files differ
diff --git a/cards200/event_71.png b/cards200/event_71.png
new file mode 100644
index 0000000..ad04c75
--- /dev/null
+++ b/cards200/event_71.png
Binary files differ
diff --git a/cards200/event_71.webp b/cards200/event_71.webp
new file mode 100644
index 0000000..9628ac7
--- /dev/null
+++ b/cards200/event_71.webp
Binary files differ
diff --git a/cards200/event_72.avif b/cards200/event_72.avif
new file mode 100644
index 0000000..d8755eb
--- /dev/null
+++ b/cards200/event_72.avif
Binary files differ
diff --git a/cards200/event_72.png b/cards200/event_72.png
new file mode 100644
index 0000000..12638f7
--- /dev/null
+++ b/cards200/event_72.png
Binary files differ
diff --git a/cards200/event_72.webp b/cards200/event_72.webp
new file mode 100644
index 0000000..7dd82a0
--- /dev/null
+++ b/cards200/event_72.webp
Binary files differ
diff --git a/cards200/event_73.avif b/cards200/event_73.avif
new file mode 100644
index 0000000..03ef25e
--- /dev/null
+++ b/cards200/event_73.avif
Binary files differ
diff --git a/cards200/event_73.png b/cards200/event_73.png
new file mode 100644
index 0000000..5913623
--- /dev/null
+++ b/cards200/event_73.png
Binary files differ
diff --git a/cards200/event_73.webp b/cards200/event_73.webp
new file mode 100644
index 0000000..dc9a116
--- /dev/null
+++ b/cards200/event_73.webp
Binary files differ
diff --git a/cards200/event_74.avif b/cards200/event_74.avif
new file mode 100644
index 0000000..d003b23
--- /dev/null
+++ b/cards200/event_74.avif
Binary files differ
diff --git a/cards200/event_74.png b/cards200/event_74.png
new file mode 100644
index 0000000..a86af12
--- /dev/null
+++ b/cards200/event_74.png
Binary files differ
diff --git a/cards200/event_74.webp b/cards200/event_74.webp
new file mode 100644
index 0000000..b6d4cee
--- /dev/null
+++ b/cards200/event_74.webp
Binary files differ
diff --git a/cards200/event_75.avif b/cards200/event_75.avif
new file mode 100644
index 0000000..63ae0cf
--- /dev/null
+++ b/cards200/event_75.avif
Binary files differ
diff --git a/cards200/event_75.png b/cards200/event_75.png
new file mode 100644
index 0000000..20a1cd6
--- /dev/null
+++ b/cards200/event_75.png
Binary files differ
diff --git a/cards200/event_75.webp b/cards200/event_75.webp
new file mode 100644
index 0000000..85e1986
--- /dev/null
+++ b/cards200/event_75.webp
Binary files differ
diff --git a/cards200/event_76.avif b/cards200/event_76.avif
new file mode 100644
index 0000000..3968aaa
--- /dev/null
+++ b/cards200/event_76.avif
Binary files differ
diff --git a/cards200/event_76.png b/cards200/event_76.png
new file mode 100644
index 0000000..686a8d8
--- /dev/null
+++ b/cards200/event_76.png
Binary files differ
diff --git a/cards200/event_76.webp b/cards200/event_76.webp
new file mode 100644
index 0000000..2817081
--- /dev/null
+++ b/cards200/event_76.webp
Binary files differ
diff --git a/cards200/event_77.avif b/cards200/event_77.avif
new file mode 100644
index 0000000..c1c7a7e
--- /dev/null
+++ b/cards200/event_77.avif
Binary files differ
diff --git a/cards200/event_77.png b/cards200/event_77.png
new file mode 100644
index 0000000..d337966
--- /dev/null
+++ b/cards200/event_77.png
Binary files differ
diff --git a/cards200/event_77.webp b/cards200/event_77.webp
new file mode 100644
index 0000000..88e9e95
--- /dev/null
+++ b/cards200/event_77.webp
Binary files differ
diff --git a/cards200/event_78.avif b/cards200/event_78.avif
new file mode 100644
index 0000000..f43c986
--- /dev/null
+++ b/cards200/event_78.avif
Binary files differ
diff --git a/cards200/event_78.png b/cards200/event_78.png
new file mode 100644
index 0000000..aa319fc
--- /dev/null
+++ b/cards200/event_78.png
Binary files differ
diff --git a/cards200/event_78.webp b/cards200/event_78.webp
new file mode 100644
index 0000000..271b0d0
--- /dev/null
+++ b/cards200/event_78.webp
Binary files differ
diff --git a/cards200/event_79.avif b/cards200/event_79.avif
new file mode 100644
index 0000000..1b6eba7
--- /dev/null
+++ b/cards200/event_79.avif
Binary files differ
diff --git a/cards200/event_79.png b/cards200/event_79.png
new file mode 100644
index 0000000..d130153
--- /dev/null
+++ b/cards200/event_79.png
Binary files differ
diff --git a/cards200/event_79.webp b/cards200/event_79.webp
new file mode 100644
index 0000000..dbe8982
--- /dev/null
+++ b/cards200/event_79.webp
Binary files differ
diff --git a/cards200/event_8.avif b/cards200/event_8.avif
new file mode 100644
index 0000000..a2809b8
--- /dev/null
+++ b/cards200/event_8.avif
Binary files differ
diff --git a/cards200/event_8.png b/cards200/event_8.png
new file mode 100644
index 0000000..8e86ea3
--- /dev/null
+++ b/cards200/event_8.png
Binary files differ
diff --git a/cards200/event_8.webp b/cards200/event_8.webp
new file mode 100644
index 0000000..bb61f2d
--- /dev/null
+++ b/cards200/event_8.webp
Binary files differ
diff --git a/cards200/event_80.avif b/cards200/event_80.avif
new file mode 100644
index 0000000..285ffdb
--- /dev/null
+++ b/cards200/event_80.avif
Binary files differ
diff --git a/cards200/event_80.png b/cards200/event_80.png
new file mode 100644
index 0000000..4ff0b73
--- /dev/null
+++ b/cards200/event_80.png
Binary files differ
diff --git a/cards200/event_80.webp b/cards200/event_80.webp
new file mode 100644
index 0000000..c89d6af
--- /dev/null
+++ b/cards200/event_80.webp
Binary files differ
diff --git a/cards200/event_81.avif b/cards200/event_81.avif
new file mode 100644
index 0000000..83b6c0d
--- /dev/null
+++ b/cards200/event_81.avif
Binary files differ
diff --git a/cards200/event_81.png b/cards200/event_81.png
new file mode 100644
index 0000000..b17ee8c
--- /dev/null
+++ b/cards200/event_81.png
Binary files differ
diff --git a/cards200/event_81.webp b/cards200/event_81.webp
new file mode 100644
index 0000000..976a368
--- /dev/null
+++ b/cards200/event_81.webp
Binary files differ
diff --git a/cards200/event_82.avif b/cards200/event_82.avif
new file mode 100644
index 0000000..472cc98
--- /dev/null
+++ b/cards200/event_82.avif
Binary files differ
diff --git a/cards200/event_82.png b/cards200/event_82.png
new file mode 100644
index 0000000..e140bc6
--- /dev/null
+++ b/cards200/event_82.png
Binary files differ
diff --git a/cards200/event_82.webp b/cards200/event_82.webp
new file mode 100644
index 0000000..0f3fe27
--- /dev/null
+++ b/cards200/event_82.webp
Binary files differ
diff --git a/cards200/event_83.avif b/cards200/event_83.avif
new file mode 100644
index 0000000..3ada107
--- /dev/null
+++ b/cards200/event_83.avif
Binary files differ
diff --git a/cards200/event_83.png b/cards200/event_83.png
new file mode 100644
index 0000000..cb9b11b
--- /dev/null
+++ b/cards200/event_83.png
Binary files differ
diff --git a/cards200/event_83.webp b/cards200/event_83.webp
new file mode 100644
index 0000000..70cecc4
--- /dev/null
+++ b/cards200/event_83.webp
Binary files differ
diff --git a/cards200/event_84.avif b/cards200/event_84.avif
new file mode 100644
index 0000000..a7b222c
--- /dev/null
+++ b/cards200/event_84.avif
Binary files differ
diff --git a/cards200/event_84.png b/cards200/event_84.png
new file mode 100644
index 0000000..57d9de8
--- /dev/null
+++ b/cards200/event_84.png
Binary files differ
diff --git a/cards200/event_84.webp b/cards200/event_84.webp
new file mode 100644
index 0000000..8d96761
--- /dev/null
+++ b/cards200/event_84.webp
Binary files differ
diff --git a/cards200/event_85.avif b/cards200/event_85.avif
new file mode 100644
index 0000000..81144fa
--- /dev/null
+++ b/cards200/event_85.avif
Binary files differ
diff --git a/cards200/event_85.png b/cards200/event_85.png
new file mode 100644
index 0000000..b86e0aa
--- /dev/null
+++ b/cards200/event_85.png
Binary files differ
diff --git a/cards200/event_85.webp b/cards200/event_85.webp
new file mode 100644
index 0000000..3d74464
--- /dev/null
+++ b/cards200/event_85.webp
Binary files differ
diff --git a/cards200/event_86.avif b/cards200/event_86.avif
new file mode 100644
index 0000000..8aeb528
--- /dev/null
+++ b/cards200/event_86.avif
Binary files differ
diff --git a/cards200/event_86.png b/cards200/event_86.png
new file mode 100644
index 0000000..4f056b1
--- /dev/null
+++ b/cards200/event_86.png
Binary files differ
diff --git a/cards200/event_86.webp b/cards200/event_86.webp
new file mode 100644
index 0000000..3fd9c63
--- /dev/null
+++ b/cards200/event_86.webp
Binary files differ
diff --git a/cards200/event_87.avif b/cards200/event_87.avif
new file mode 100644
index 0000000..cf100e1
--- /dev/null
+++ b/cards200/event_87.avif
Binary files differ
diff --git a/cards200/event_87.png b/cards200/event_87.png
new file mode 100644
index 0000000..bbc7c13
--- /dev/null
+++ b/cards200/event_87.png
Binary files differ
diff --git a/cards200/event_87.webp b/cards200/event_87.webp
new file mode 100644
index 0000000..1907e16
--- /dev/null
+++ b/cards200/event_87.webp
Binary files differ
diff --git a/cards200/event_88.avif b/cards200/event_88.avif
new file mode 100644
index 0000000..2e70d36
--- /dev/null
+++ b/cards200/event_88.avif
Binary files differ
diff --git a/cards200/event_88.png b/cards200/event_88.png
new file mode 100644
index 0000000..0d87631
--- /dev/null
+++ b/cards200/event_88.png
Binary files differ
diff --git a/cards200/event_88.webp b/cards200/event_88.webp
new file mode 100644
index 0000000..1eb3e8b
--- /dev/null
+++ b/cards200/event_88.webp
Binary files differ
diff --git a/cards200/event_89.avif b/cards200/event_89.avif
new file mode 100644
index 0000000..0d0ee43
--- /dev/null
+++ b/cards200/event_89.avif
Binary files differ
diff --git a/cards200/event_89.png b/cards200/event_89.png
new file mode 100644
index 0000000..115e6a3
--- /dev/null
+++ b/cards200/event_89.png
Binary files differ
diff --git a/cards200/event_89.webp b/cards200/event_89.webp
new file mode 100644
index 0000000..0d74ea0
--- /dev/null
+++ b/cards200/event_89.webp
Binary files differ
diff --git a/cards200/event_9.avif b/cards200/event_9.avif
new file mode 100644
index 0000000..fb0ca38
--- /dev/null
+++ b/cards200/event_9.avif
Binary files differ
diff --git a/cards200/event_9.png b/cards200/event_9.png
new file mode 100644
index 0000000..15b9c4f
--- /dev/null
+++ b/cards200/event_9.png
Binary files differ
diff --git a/cards200/event_9.webp b/cards200/event_9.webp
new file mode 100644
index 0000000..6fbb835
--- /dev/null
+++ b/cards200/event_9.webp
Binary files differ
diff --git a/cards200/event_90.avif b/cards200/event_90.avif
new file mode 100644
index 0000000..04d0f6b
--- /dev/null
+++ b/cards200/event_90.avif
Binary files differ
diff --git a/cards200/event_90.png b/cards200/event_90.png
new file mode 100644
index 0000000..a5c07a0
--- /dev/null
+++ b/cards200/event_90.png
Binary files differ
diff --git a/cards200/event_90.webp b/cards200/event_90.webp
new file mode 100644
index 0000000..a0eb56a
--- /dev/null
+++ b/cards200/event_90.webp
Binary files differ
diff --git a/cards200/event_91.avif b/cards200/event_91.avif
new file mode 100644
index 0000000..0dca4a4
--- /dev/null
+++ b/cards200/event_91.avif
Binary files differ
diff --git a/cards200/event_91.png b/cards200/event_91.png
new file mode 100644
index 0000000..429f0f0
--- /dev/null
+++ b/cards200/event_91.png
Binary files differ
diff --git a/cards200/event_91.webp b/cards200/event_91.webp
new file mode 100644
index 0000000..dde0502
--- /dev/null
+++ b/cards200/event_91.webp
Binary files differ
diff --git a/cards200/event_92.avif b/cards200/event_92.avif
new file mode 100644
index 0000000..ef7020e
--- /dev/null
+++ b/cards200/event_92.avif
Binary files differ
diff --git a/cards200/event_92.png b/cards200/event_92.png
new file mode 100644
index 0000000..dd1f186
--- /dev/null
+++ b/cards200/event_92.png
Binary files differ
diff --git a/cards200/event_92.webp b/cards200/event_92.webp
new file mode 100644
index 0000000..acb9a25
--- /dev/null
+++ b/cards200/event_92.webp
Binary files differ
diff --git a/cards200/event_93.avif b/cards200/event_93.avif
new file mode 100644
index 0000000..2b946c2
--- /dev/null
+++ b/cards200/event_93.avif
Binary files differ
diff --git a/cards200/event_93.png b/cards200/event_93.png
new file mode 100644
index 0000000..1bca777
--- /dev/null
+++ b/cards200/event_93.png
Binary files differ
diff --git a/cards200/event_93.webp b/cards200/event_93.webp
new file mode 100644
index 0000000..b91814e
--- /dev/null
+++ b/cards200/event_93.webp
Binary files differ
diff --git a/cards200/event_94.avif b/cards200/event_94.avif
new file mode 100644
index 0000000..1b76bd4
--- /dev/null
+++ b/cards200/event_94.avif
Binary files differ
diff --git a/cards200/event_94.png b/cards200/event_94.png
new file mode 100644
index 0000000..e425fb0
--- /dev/null
+++ b/cards200/event_94.png
Binary files differ
diff --git a/cards200/event_94.webp b/cards200/event_94.webp
new file mode 100644
index 0000000..763da64
--- /dev/null
+++ b/cards200/event_94.webp
Binary files differ
diff --git a/cards200/event_95.avif b/cards200/event_95.avif
new file mode 100644
index 0000000..e502853
--- /dev/null
+++ b/cards200/event_95.avif
Binary files differ
diff --git a/cards200/event_95.png b/cards200/event_95.png
new file mode 100644
index 0000000..9497cc6
--- /dev/null
+++ b/cards200/event_95.png
Binary files differ
diff --git a/cards200/event_95.webp b/cards200/event_95.webp
new file mode 100644
index 0000000..1314556
--- /dev/null
+++ b/cards200/event_95.webp
Binary files differ
diff --git a/cards200/event_96.avif b/cards200/event_96.avif
new file mode 100644
index 0000000..48c25f0
--- /dev/null
+++ b/cards200/event_96.avif
Binary files differ
diff --git a/cards200/event_96.png b/cards200/event_96.png
new file mode 100644
index 0000000..1e3066b
--- /dev/null
+++ b/cards200/event_96.png
Binary files differ
diff --git a/cards200/event_96.webp b/cards200/event_96.webp
new file mode 100644
index 0000000..6c84709
--- /dev/null
+++ b/cards200/event_96.webp
Binary files differ
diff --git a/cards200/event_97.avif b/cards200/event_97.avif
new file mode 100644
index 0000000..fc49e63
--- /dev/null
+++ b/cards200/event_97.avif
Binary files differ
diff --git a/cards200/event_97.png b/cards200/event_97.png
new file mode 100644
index 0000000..b79aa4d
--- /dev/null
+++ b/cards200/event_97.png
Binary files differ
diff --git a/cards200/event_97.webp b/cards200/event_97.webp
new file mode 100644
index 0000000..bf483ef
--- /dev/null
+++ b/cards200/event_97.webp
Binary files differ
diff --git a/cards200/event_98.avif b/cards200/event_98.avif
new file mode 100644
index 0000000..c9170d0
--- /dev/null
+++ b/cards200/event_98.avif
Binary files differ
diff --git a/cards200/event_98.png b/cards200/event_98.png
new file mode 100644
index 0000000..5727c79
--- /dev/null
+++ b/cards200/event_98.png
Binary files differ
diff --git a/cards200/event_98.webp b/cards200/event_98.webp
new file mode 100644
index 0000000..0f0ad1d
--- /dev/null
+++ b/cards200/event_98.webp
Binary files differ
diff --git a/cards200/event_99.avif b/cards200/event_99.avif
new file mode 100644
index 0000000..df735d4
--- /dev/null
+++ b/cards200/event_99.avif
Binary files differ
diff --git a/cards200/event_99.png b/cards200/event_99.png
new file mode 100644
index 0000000..404e4f4
--- /dev/null
+++ b/cards200/event_99.png
Binary files differ
diff --git a/cards200/event_99.webp b/cards200/event_99.webp
new file mode 100644
index 0000000..5ae6e85
--- /dev/null
+++ b/cards200/event_99.webp
Binary files differ
diff --git a/cards200/event_back.avif b/cards200/event_back.avif
new file mode 100644
index 0000000..7a3e1fa
--- /dev/null
+++ b/cards200/event_back.avif
Binary files differ
diff --git a/cards200/event_back.png b/cards200/event_back.png
new file mode 100644
index 0000000..957b0c3
--- /dev/null
+++ b/cards200/event_back.png
Binary files differ
diff --git a/cards200/event_back.webp b/cards200/event_back.webp
new file mode 100644
index 0000000..8243788
--- /dev/null
+++ b/cards200/event_back.webp
Binary files differ
diff --git a/cards200/power_11_14.png b/cards200/power_11_14.png
new file mode 100644
index 0000000..7dbfecb
--- /dev/null
+++ b/cards200/power_11_14.png
Binary files differ
diff --git a/cards200/power_15_18.png b/cards200/power_15_18.png
new file mode 100644
index 0000000..529ebd6
--- /dev/null
+++ b/cards200/power_15_18.png
Binary files differ
diff --git a/cards200/power_19_20.png b/cards200/power_19_20.png
new file mode 100644
index 0000000..9ae5fa2
--- /dev/null
+++ b/cards200/power_19_20.png
Binary files differ
diff --git a/cards200/power_1_6.png b/cards200/power_1_6.png
new file mode 100644
index 0000000..f916eda
--- /dev/null
+++ b/cards200/power_1_6.png
Binary files differ
diff --git a/cards200/power_21_22.png b/cards200/power_21_22.png
new file mode 100644
index 0000000..da5f8fb
--- /dev/null
+++ b/cards200/power_21_22.png
Binary files differ
diff --git a/cards200/power_23_26.png b/cards200/power_23_26.png
new file mode 100644
index 0000000..5daa248
--- /dev/null
+++ b/cards200/power_23_26.png
Binary files differ
diff --git a/cards200/power_27_30.png b/cards200/power_27_30.png
new file mode 100644
index 0000000..1284aa8
--- /dev/null
+++ b/cards200/power_27_30.png
Binary files differ
diff --git a/cards200/power_31_33.png b/cards200/power_31_33.png
new file mode 100644
index 0000000..10afdfe
--- /dev/null
+++ b/cards200/power_31_33.png
Binary files differ
diff --git a/cards200/power_34_36.png b/cards200/power_34_36.png
new file mode 100644
index 0000000..be737dc
--- /dev/null
+++ b/cards200/power_34_36.png
Binary files differ
diff --git a/cards200/power_37.png b/cards200/power_37.png
new file mode 100644
index 0000000..d1ed481
--- /dev/null
+++ b/cards200/power_37.png
Binary files differ
diff --git a/cards200/power_38.png b/cards200/power_38.png
new file mode 100644
index 0000000..6b5dd21
--- /dev/null
+++ b/cards200/power_38.png
Binary files differ
diff --git a/cards200/power_39.png b/cards200/power_39.png
new file mode 100644
index 0000000..6adbcf8
--- /dev/null
+++ b/cards200/power_39.png
Binary files differ
diff --git a/cards200/power_40.png b/cards200/power_40.png
new file mode 100644
index 0000000..49968a5
--- /dev/null
+++ b/cards200/power_40.png
Binary files differ
diff --git a/cards200/power_41.png b/cards200/power_41.png
new file mode 100644
index 0000000..76e627e
--- /dev/null
+++ b/cards200/power_41.png
Binary files differ
diff --git a/cards200/power_42.png b/cards200/power_42.png
new file mode 100644
index 0000000..40f85e9
--- /dev/null
+++ b/cards200/power_42.png
Binary files differ
diff --git a/cards200/power_43.png b/cards200/power_43.png
new file mode 100644
index 0000000..56ada46
--- /dev/null
+++ b/cards200/power_43.png
Binary files differ
diff --git a/cards200/power_44.png b/cards200/power_44.png
new file mode 100644
index 0000000..3e39d36
--- /dev/null
+++ b/cards200/power_44.png
Binary files differ
diff --git a/cards200/power_45.png b/cards200/power_45.png
new file mode 100644
index 0000000..12ce927
--- /dev/null
+++ b/cards200/power_45.png
Binary files differ
diff --git a/cards200/power_46.png b/cards200/power_46.png
new file mode 100644
index 0000000..6f58d9e
--- /dev/null
+++ b/cards200/power_46.png
Binary files differ
diff --git a/cards200/power_47.png b/cards200/power_47.png
new file mode 100644
index 0000000..92dafa3
--- /dev/null
+++ b/cards200/power_47.png
Binary files differ
diff --git a/cards200/power_48.png b/cards200/power_48.png
new file mode 100644
index 0000000..539335b
--- /dev/null
+++ b/cards200/power_48.png
Binary files differ
diff --git a/cards200/power_49.png b/cards200/power_49.png
new file mode 100644
index 0000000..e2db71f
--- /dev/null
+++ b/cards200/power_49.png
Binary files differ
diff --git a/cards200/power_50.png b/cards200/power_50.png
new file mode 100644
index 0000000..1cacc9e
--- /dev/null
+++ b/cards200/power_50.png
Binary files differ
diff --git a/cards200/power_51.png b/cards200/power_51.png
new file mode 100644
index 0000000..37b6c53
--- /dev/null
+++ b/cards200/power_51.png
Binary files differ
diff --git a/cards200/power_52.png b/cards200/power_52.png
new file mode 100644
index 0000000..8b576f5
--- /dev/null
+++ b/cards200/power_52.png
Binary files differ
diff --git a/cards200/power_7_8.png b/cards200/power_7_8.png
new file mode 100644
index 0000000..f12ad6f
--- /dev/null
+++ b/cards200/power_7_8.png
Binary files differ
diff --git a/cards200/power_9_10.png b/cards200/power_9_10.png
new file mode 100644
index 0000000..3766e04
--- /dev/null
+++ b/cards200/power_9_10.png
Binary files differ
diff --git a/cards200/power_back.png b/cards200/power_back.png
new file mode 100644
index 0000000..95c7a04
--- /dev/null
+++ b/cards200/power_back.png
Binary files differ
diff --git a/cards75/power_11_14.avif b/cards75/power_11_14.avif
new file mode 100644
index 0000000..5488f01
--- /dev/null
+++ b/cards75/power_11_14.avif
Binary files differ
diff --git a/cards75/power_11_14.png b/cards75/power_11_14.png
new file mode 100644
index 0000000..040c518
--- /dev/null
+++ b/cards75/power_11_14.png
Binary files differ
diff --git a/cards75/power_15_18.avif b/cards75/power_15_18.avif
new file mode 100644
index 0000000..ef3c3ee
--- /dev/null
+++ b/cards75/power_15_18.avif
Binary files differ
diff --git a/cards75/power_15_18.png b/cards75/power_15_18.png
new file mode 100644
index 0000000..e46f823
--- /dev/null
+++ b/cards75/power_15_18.png
Binary files differ
diff --git a/cards75/power_19_20.avif b/cards75/power_19_20.avif
new file mode 100644
index 0000000..f6c641a
--- /dev/null
+++ b/cards75/power_19_20.avif
Binary files differ
diff --git a/cards75/power_19_20.png b/cards75/power_19_20.png
new file mode 100644
index 0000000..0a44c0d
--- /dev/null
+++ b/cards75/power_19_20.png
Binary files differ
diff --git a/cards75/power_1_6.avif b/cards75/power_1_6.avif
new file mode 100644
index 0000000..ca0280b
--- /dev/null
+++ b/cards75/power_1_6.avif
Binary files differ
diff --git a/cards75/power_1_6.png b/cards75/power_1_6.png
new file mode 100644
index 0000000..2d8735a
--- /dev/null
+++ b/cards75/power_1_6.png
Binary files differ
diff --git a/cards75/power_21_22.avif b/cards75/power_21_22.avif
new file mode 100644
index 0000000..8c9c907
--- /dev/null
+++ b/cards75/power_21_22.avif
Binary files differ
diff --git a/cards75/power_21_22.png b/cards75/power_21_22.png
new file mode 100644
index 0000000..710e0af
--- /dev/null
+++ b/cards75/power_21_22.png
Binary files differ
diff --git a/cards75/power_23_26.avif b/cards75/power_23_26.avif
new file mode 100644
index 0000000..346c49a
--- /dev/null
+++ b/cards75/power_23_26.avif
Binary files differ
diff --git a/cards75/power_23_26.png b/cards75/power_23_26.png
new file mode 100644
index 0000000..751510a
--- /dev/null
+++ b/cards75/power_23_26.png
Binary files differ
diff --git a/cards75/power_27_30.avif b/cards75/power_27_30.avif
new file mode 100644
index 0000000..7de3cc4
--- /dev/null
+++ b/cards75/power_27_30.avif
Binary files differ
diff --git a/cards75/power_27_30.png b/cards75/power_27_30.png
new file mode 100644
index 0000000..9ee10f7
--- /dev/null
+++ b/cards75/power_27_30.png
Binary files differ
diff --git a/cards75/power_31_33.avif b/cards75/power_31_33.avif
new file mode 100644
index 0000000..36e9a11
--- /dev/null
+++ b/cards75/power_31_33.avif
Binary files differ
diff --git a/cards75/power_31_33.png b/cards75/power_31_33.png
new file mode 100644
index 0000000..b48084c
--- /dev/null
+++ b/cards75/power_31_33.png
Binary files differ
diff --git a/cards75/power_34_36.avif b/cards75/power_34_36.avif
new file mode 100644
index 0000000..d3129e2
--- /dev/null
+++ b/cards75/power_34_36.avif
Binary files differ
diff --git a/cards75/power_34_36.png b/cards75/power_34_36.png
new file mode 100644
index 0000000..bedb784
--- /dev/null
+++ b/cards75/power_34_36.png
Binary files differ
diff --git a/cards75/power_37.avif b/cards75/power_37.avif
new file mode 100644
index 0000000..6a56779
--- /dev/null
+++ b/cards75/power_37.avif
Binary files differ
diff --git a/cards75/power_37.png b/cards75/power_37.png
new file mode 100644
index 0000000..8841551
--- /dev/null
+++ b/cards75/power_37.png
Binary files differ
diff --git a/cards75/power_38.avif b/cards75/power_38.avif
new file mode 100644
index 0000000..3966407
--- /dev/null
+++ b/cards75/power_38.avif
Binary files differ
diff --git a/cards75/power_38.png b/cards75/power_38.png
new file mode 100644
index 0000000..2193650
--- /dev/null
+++ b/cards75/power_38.png
Binary files differ
diff --git a/cards75/power_39.avif b/cards75/power_39.avif
new file mode 100644
index 0000000..82f4b4a
--- /dev/null
+++ b/cards75/power_39.avif
Binary files differ
diff --git a/cards75/power_39.png b/cards75/power_39.png
new file mode 100644
index 0000000..0da6f14
--- /dev/null
+++ b/cards75/power_39.png
Binary files differ
diff --git a/cards75/power_40.avif b/cards75/power_40.avif
new file mode 100644
index 0000000..e3fe0c1
--- /dev/null
+++ b/cards75/power_40.avif
Binary files differ
diff --git a/cards75/power_40.png b/cards75/power_40.png
new file mode 100644
index 0000000..034c504
--- /dev/null
+++ b/cards75/power_40.png
Binary files differ
diff --git a/cards75/power_41.avif b/cards75/power_41.avif
new file mode 100644
index 0000000..dab5e03
--- /dev/null
+++ b/cards75/power_41.avif
Binary files differ
diff --git a/cards75/power_41.png b/cards75/power_41.png
new file mode 100644
index 0000000..745f38f
--- /dev/null
+++ b/cards75/power_41.png
Binary files differ
diff --git a/cards75/power_42.avif b/cards75/power_42.avif
new file mode 100644
index 0000000..c299c52
--- /dev/null
+++ b/cards75/power_42.avif
Binary files differ
diff --git a/cards75/power_42.png b/cards75/power_42.png
new file mode 100644
index 0000000..c81a2be
--- /dev/null
+++ b/cards75/power_42.png
Binary files differ
diff --git a/cards75/power_43.avif b/cards75/power_43.avif
new file mode 100644
index 0000000..d7a6e76
--- /dev/null
+++ b/cards75/power_43.avif
Binary files differ
diff --git a/cards75/power_43.png b/cards75/power_43.png
new file mode 100644
index 0000000..4999cff
--- /dev/null
+++ b/cards75/power_43.png
Binary files differ
diff --git a/cards75/power_44.avif b/cards75/power_44.avif
new file mode 100644
index 0000000..60054e6
--- /dev/null
+++ b/cards75/power_44.avif
Binary files differ
diff --git a/cards75/power_44.png b/cards75/power_44.png
new file mode 100644
index 0000000..34d5518
--- /dev/null
+++ b/cards75/power_44.png
Binary files differ
diff --git a/cards75/power_45.avif b/cards75/power_45.avif
new file mode 100644
index 0000000..959bc4a
--- /dev/null
+++ b/cards75/power_45.avif
Binary files differ
diff --git a/cards75/power_45.png b/cards75/power_45.png
new file mode 100644
index 0000000..e104c7c
--- /dev/null
+++ b/cards75/power_45.png
Binary files differ
diff --git a/cards75/power_46.avif b/cards75/power_46.avif
new file mode 100644
index 0000000..727df34
--- /dev/null
+++ b/cards75/power_46.avif
Binary files differ
diff --git a/cards75/power_46.png b/cards75/power_46.png
new file mode 100644
index 0000000..eb8c1c0
--- /dev/null
+++ b/cards75/power_46.png
Binary files differ
diff --git a/cards75/power_47.avif b/cards75/power_47.avif
new file mode 100644
index 0000000..17fdedb
--- /dev/null
+++ b/cards75/power_47.avif
Binary files differ
diff --git a/cards75/power_47.png b/cards75/power_47.png
new file mode 100644
index 0000000..e75894d
--- /dev/null
+++ b/cards75/power_47.png
Binary files differ
diff --git a/cards75/power_48.avif b/cards75/power_48.avif
new file mode 100644
index 0000000..d65080b
--- /dev/null
+++ b/cards75/power_48.avif
Binary files differ
diff --git a/cards75/power_48.png b/cards75/power_48.png
new file mode 100644
index 0000000..9bcbd0a
--- /dev/null
+++ b/cards75/power_48.png
Binary files differ
diff --git a/cards75/power_49.avif b/cards75/power_49.avif
new file mode 100644
index 0000000..f862562
--- /dev/null
+++ b/cards75/power_49.avif
Binary files differ
diff --git a/cards75/power_49.png b/cards75/power_49.png
new file mode 100644
index 0000000..f6e4349
--- /dev/null
+++ b/cards75/power_49.png
Binary files differ
diff --git a/cards75/power_50.avif b/cards75/power_50.avif
new file mode 100644
index 0000000..af77e6b
--- /dev/null
+++ b/cards75/power_50.avif
Binary files differ
diff --git a/cards75/power_50.png b/cards75/power_50.png
new file mode 100644
index 0000000..e5a1582
--- /dev/null
+++ b/cards75/power_50.png
Binary files differ
diff --git a/cards75/power_51.avif b/cards75/power_51.avif
new file mode 100644
index 0000000..bcdf23b
--- /dev/null
+++ b/cards75/power_51.avif
Binary files differ
diff --git a/cards75/power_51.png b/cards75/power_51.png
new file mode 100644
index 0000000..0e9de51
--- /dev/null
+++ b/cards75/power_51.png
Binary files differ
diff --git a/cards75/power_52.avif b/cards75/power_52.avif
new file mode 100644
index 0000000..4d77f9c
--- /dev/null
+++ b/cards75/power_52.avif
Binary files differ
diff --git a/cards75/power_52.png b/cards75/power_52.png
new file mode 100644
index 0000000..c909f71
--- /dev/null
+++ b/cards75/power_52.png
Binary files differ
diff --git a/cards75/power_7_8.avif b/cards75/power_7_8.avif
new file mode 100644
index 0000000..590e627
--- /dev/null
+++ b/cards75/power_7_8.avif
Binary files differ
diff --git a/cards75/power_7_8.png b/cards75/power_7_8.png
new file mode 100644
index 0000000..82acce3
--- /dev/null
+++ b/cards75/power_7_8.png
Binary files differ
diff --git a/cards75/power_9_10.avif b/cards75/power_9_10.avif
new file mode 100644
index 0000000..b5b8aa6
--- /dev/null
+++ b/cards75/power_9_10.avif
Binary files differ
diff --git a/cards75/power_9_10.png b/cards75/power_9_10.png
new file mode 100644
index 0000000..db8daa4
--- /dev/null
+++ b/cards75/power_9_10.png
Binary files differ
diff --git a/cards75/power_back.avif b/cards75/power_back.avif
new file mode 100644
index 0000000..a73f412
--- /dev/null
+++ b/cards75/power_back.avif
Binary files differ
diff --git a/cards75/power_back.png b/cards75/power_back.png
new file mode 100644
index 0000000..4f7725d
--- /dev/null
+++ b/cards75/power_back.png
Binary files differ
diff --git a/cards_2/ps1.gif b/cards_2/ps1.gif
deleted file mode 100644
index 93bdf19..0000000
--- a/cards_2/ps1.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps10.gif b/cards_2/ps10.gif
deleted file mode 100644
index b78ec1f..0000000
--- a/cards_2/ps10.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps11.gif b/cards_2/ps11.gif
deleted file mode 100644
index 298c9e6..0000000
--- a/cards_2/ps11.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps12.gif b/cards_2/ps12.gif
deleted file mode 100644
index ebc293c..0000000
--- a/cards_2/ps12.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps13.gif b/cards_2/ps13.gif
deleted file mode 100644
index 5df58c4..0000000
--- a/cards_2/ps13.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps14.gif b/cards_2/ps14.gif
deleted file mode 100644
index 1ab602b..0000000
--- a/cards_2/ps14.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps15.gif b/cards_2/ps15.gif
deleted file mode 100644
index 77d01eb..0000000
--- a/cards_2/ps15.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps16.gif b/cards_2/ps16.gif
deleted file mode 100644
index 3821417..0000000
--- a/cards_2/ps16.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps17.gif b/cards_2/ps17.gif
deleted file mode 100644
index caaa761..0000000
--- a/cards_2/ps17.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps18.gif b/cards_2/ps18.gif
deleted file mode 100644
index 04c1cd5..0000000
--- a/cards_2/ps18.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps19.gif b/cards_2/ps19.gif
deleted file mode 100644
index f88c379..0000000
--- a/cards_2/ps19.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps2.gif b/cards_2/ps2.gif
deleted file mode 100644
index a900be2..0000000
--- a/cards_2/ps2.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps20.gif b/cards_2/ps20.gif
deleted file mode 100644
index 1387a8d..0000000
--- a/cards_2/ps20.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps21.gif b/cards_2/ps21.gif
deleted file mode 100644
index 31cd0b2..0000000
--- a/cards_2/ps21.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps22.gif b/cards_2/ps22.gif
deleted file mode 100644
index 42a7cec..0000000
--- a/cards_2/ps22.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps23.gif b/cards_2/ps23.gif
deleted file mode 100644
index 50ee901..0000000
--- a/cards_2/ps23.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps24.gif b/cards_2/ps24.gif
deleted file mode 100644
index 3107cc1..0000000
--- a/cards_2/ps24.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps25.gif b/cards_2/ps25.gif
deleted file mode 100644
index ba321f4..0000000
--- a/cards_2/ps25.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps26.gif b/cards_2/ps26.gif
deleted file mode 100644
index c6befdf..0000000
--- a/cards_2/ps26.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps27.gif b/cards_2/ps27.gif
deleted file mode 100644
index 34a4cea..0000000
--- a/cards_2/ps27.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps3.gif b/cards_2/ps3.gif
deleted file mode 100644
index 0f546d2..0000000
--- a/cards_2/ps3.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps4.gif b/cards_2/ps4.gif
deleted file mode 100644
index eebdb7f..0000000
--- a/cards_2/ps4.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps5.gif b/cards_2/ps5.gif
deleted file mode 100644
index b2da6bd..0000000
--- a/cards_2/ps5.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps6.gif b/cards_2/ps6.gif
deleted file mode 100644
index cd2b261..0000000
--- a/cards_2/ps6.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps7.gif b/cards_2/ps7.gif
deleted file mode 100644
index 5516bb3..0000000
--- a/cards_2/ps7.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps8.gif b/cards_2/ps8.gif
deleted file mode 100644
index 136e81a..0000000
--- a/cards_2/ps8.gif
+++ /dev/null
Binary files differ
diff --git a/cards_2/ps9.gif b/cards_2/ps9.gif
deleted file mode 100644
index df79c56..0000000
--- a/cards_2/ps9.gif
+++ /dev/null
Binary files differ
diff --git a/cover.1x.jpg b/cover.1x.jpg
index a8070d8..a7f7128 100644
--- a/cover.1x.jpg
+++ b/cover.1x.jpg
Binary files differ
diff --git a/cover.1x.png b/cover.1x.png
index ece84d7..6ae7868 100644
--- a/cover.1x.png
+++ b/cover.1x.png
Binary files differ
diff --git a/cover.2x.jpg b/cover.2x.jpg
index c8d23c7..a3844f1 100644
--- a/cover.2x.jpg
+++ b/cover.2x.jpg
Binary files differ
diff --git a/cover.2x.png b/cover.2x.png
index 1f09e19..514ed1d 100644
--- a/cover.2x.png
+++ b/cover.2x.png
Binary files differ
diff --git a/data.js b/data.js
index 897de39..8ccb317 100644
--- a/data.js
+++ b/data.js
@@ -1,253 +1,1449 @@
-const spaces = [
- null,
- {name_unique: 'Schwerin', space_id: 1, socio: 4, stability: 3, battleground: 0, demInfl: 0, comInfl: 0, country: 'East_Germany', region: 'Eastern Europe', box: {x: 111, y: 61}, adjacent: [2, 3, , , ]},
- {name_unique: 'Rostock', space_id: 2, socio: 4, stability: 3, battleground: 0, demInfl: 0, comInfl: 0, country: 'East_Germany', region: 'Eastern Europe', box: {x: 228, y: 41}, adjacent: [1, 3, , , ]},
- {name_unique: 'Berlin', space_id: 3, socio: 2, stability: 3, battleground: 1, demInfl: 0, comInfl: 2, country: 'East_Germany', region: 'Eastern Europe', box: {x: 251, y: 113}, adjacent: [1, 2, 5, 9, ]},
- {name_unique: 'German Writers', space_id: 4, socio: 5, stability: 2, battleground: 0, demInfl: 0, comInfl: 0, country: 'East_Germany', region: 'Eastern Europe', box: {x: 58, y: 185}, adjacent: [5, , , , ]},
- {name_unique: 'Walter Ulbricht Academy', space_id: 5, socio: 6, stability: 1, battleground: 0, demInfl: 0, comInfl: 0, country: 'East_Germany', region: 'Eastern Europe', box: {x: 175, y: 187}, adjacent: [3, 4, , , ]},
- {name_unique: 'Lutherian Church', space_id: 6, socio: 7, stability: 5, battleground: 1, demInfl: 1, comInfl: 0, country: 'East_Germany', region: 'Eastern Europe', box: {x: 300, y: 212}, adjacent: [9, , , , ]},
- {name_unique: 'Magdeburg', space_id: 7, socio: 4, stability: 3, battleground: 1, demInfl: 0, comInfl: 0, country: 'East_Germany', region: 'Eastern Europe', box: {x: 58, y: 275}, adjacent: [8, 10, 11, , ]},
- {name_unique: 'Halle', space_id: 8, socio: 4, stability: 3, battleground: 0, demInfl: 0, comInfl: 0, country: 'East_Germany', region: 'Eastern Europe', box: {x: 175, y: 278}, adjacent: [7, 9, 11, , ]},
- {name_unique: 'Leipzig', space_id: 9, socio: 4, stability: 3, battleground: 1, demInfl: 0, comInfl: 0, country: 'East_Germany', region: 'Eastern Europe', box: {x: 297, y: 297}, adjacent: [3, 6, 8, 11, 12]},
- {name_unique: 'Erfurt', space_id: 10, socio: 3, stability: 4, battleground: 0, demInfl: 0, comInfl: 0, country: 'East_Germany', region: 'Eastern Europe', box: {x: 23, y: 356}, adjacent: [7, , , , ]},
- {name_unique: 'Karl-Marx-Stadt', space_id: 11, socio: 4, stability: 3, battleground: 1, demInfl: 0, comInfl: 0, country: 'East_Germany', region: 'Eastern Europe', box: {x: 138, y: 385}, adjacent: [7, 8, 9, 12, ]},
- {name_unique: 'Dresden', space_id: 12, socio: 1, stability: 4, battleground: 1, demInfl: 0, comInfl: 2, country: 'East_Germany', region: 'Eastern Europe', box: {x: 262, y: 375}, adjacent: [9, 11, 19, 27, ]},
- {name_unique: 'Szczecin', space_id: 13, socio: 4, stability: 3, battleground: 0, demInfl: 0, comInfl: 0, country: 'Poland', region: 'Eastern Europe', box: {x: 434, y: 204}, adjacent: [14, 16, , , ]},
- {name_unique: 'Gdańsk', space_id: 14, socio: 4, stability: 3, battleground: 1, demInfl: 1, comInfl: 0, country: 'Poland', region: 'Eastern Europe', box: {x: 699, y: 215}, adjacent: [13, 15, 16, 17, 18]},
- {name_unique: 'Bydgoszcz', space_id: 15, socio: 1, stability: 4, battleground: 0, demInfl: 0, comInfl: 1, country: 'Poland', region: 'Eastern Europe', box: {x: 679, y: 304}, adjacent: [14, 17, , , ]},
- {name_unique: 'Poznań', space_id: 16, socio: 4, stability: 3, battleground: 1, demInfl: 0, comInfl: 0, country: 'Poland', region: 'Eastern Europe', box: {x: 521, y: 355}, adjacent: [13, 14, 19, 20, ]},
- {name_unique: 'Warszawa', space_id: 17, socio: 2, stability: 3, battleground: 1, demInfl: 0, comInfl: 1, country: 'Poland', region: 'Eastern Europe', box: {x: 806, y: 383}, adjacent: [14, 15, 18, 21, 24]},
- {name_unique: 'Białystok', space_id: 18, socio: 3, stability: 4, battleground: 0, demInfl: 0, comInfl: 0, country: 'Poland', region: 'Eastern Europe', box: {x: 940, y: 342}, adjacent: [14, 17, 24, , ]},
- {name_unique: 'Wrocław', space_id: 19, socio: 4, stability: 3, battleground: 1, demInfl: 0, comInfl: 0, country: 'Poland', region: 'Eastern Europe', box: {x: 462, y: 443}, adjacent: [12, 16, 20, 22, ]},
- {name_unique: 'Catholic Church, Poland', space_id: 20, socio: 7, stability: 5, battleground: 0, demInfl: 5, comInfl: 0, country: 'Poland', region: 'Eastern Europe', box: {x: 625, y: 437}, adjacent: [16, 19, 21, 22, 23]},
- {name_unique: 'Łódź', space_id: 21, socio: 4, stability: 3, battleground: 1, demInfl: 0, comInfl: 0, country: 'Poland', region: 'Eastern Europe', box: {x: 749, y: 486}, adjacent: [17, 20, 23, 24, ]},
- {name_unique: 'Katowice', space_id: 22, socio: 4, stability: 3, battleground: 0, demInfl: 0, comInfl: 0, country: 'Poland', region: 'Eastern Europe', box: {x: 570, y: 569}, adjacent: [19, 20, 23, 33, ]},
- {name_unique: 'Kraków', space_id: 23, socio: 4, stability: 3, battleground: 1, demInfl: 1, comInfl: 0, country: 'Poland', region: 'Eastern Europe', box: {x: 711, y: 598}, adjacent: [20, 21, 22, 25, ]},
- {name_unique: 'Lublin', space_id: 24, socio: 3, stability: 4, battleground: 0, demInfl: 0, comInfl: 1, country: 'Poland', region: 'Eastern Europe', box: {x: 879, y: 603}, adjacent: [17, 18, 21, , ]},
- {name_unique: 'Jagiellian University', space_id: 25, socio: 6, stability: 1, battleground: 0, demInfl: 0, comInfl: 0, country: 'Poland', region: 'Eastern Europe', box: {x: 679, y: 681}, adjacent: [23, 26, , , ]},
- {name_unique: 'Polish Writers', space_id: 26, socio: 5, stability: 2, battleground: 0, demInfl: 0, comInfl: 0, country: 'Poland', region: 'Eastern Europe', box: {x: 832, y: 694}, adjacent: [25, , , , ]},
- {name_unique: 'Plzeň', space_id: 27, socio: 1, stability: 4, battleground: 0, demInfl: 0, comInfl: 2, country: 'Czechoslovakia', region: 'Eastern Europe', box: {x: 159, y: 483}, adjacent: [12, 28, 29, , ]},
- {name_unique: 'České Budĕjovice', space_id: 28, socio: 4, stability: 3, battleground: 0, demInfl: 0, comInfl: 0, country: 'Czechoslovakia', region: 'Eastern Europe', box: {x: 196, y: 601}, adjacent: [27, 29, , , ]},
- {name_unique: 'Praha', space_id: 29, socio: 2, stability: 3, battleground: 1, demInfl: 0, comInfl: 2, country: 'Czechoslovakia', region: 'Eastern Europe', box: {x: 317, y: 614}, adjacent: [27, 28, 30, 32, ]},
- {name_unique: 'Charles University', space_id: 30, socio: 6, stability: 1, battleground: 1, demInfl: 0, comInfl: 0, country: 'Czechoslovakia', region: 'Eastern Europe', box: {x: 380, y: 532}, adjacent: [29, 31, , , ]},
- {name_unique: 'Czech Writers', space_id: 31, socio: 5, stability: 2, battleground: 1, demInfl: 2, comInfl: 0, country: 'Czechoslovakia', region: 'Eastern Europe', box: {x: 444, y: 607}, adjacent: [30, , , , ]},
- {name_unique: 'Brno', space_id: 32, socio: 4, stability: 3, battleground: 1, demInfl: 0, comInfl: 1, country: 'Czechoslovakia', region: 'Eastern Europe', box: {x: 403, y: 711}, adjacent: [29, 33, 34, , ]},
- {name_unique: 'Ostrava', space_id: 33, socio: 4, stability: 3, battleground: 1, demInfl: 0, comInfl: 0, country: 'Czechoslovakia', region: 'Eastern Europe', box: {x: 523, y: 681}, adjacent: [22, 32, 34, 35, ]},
- {name_unique: 'Bratislava', space_id: 34, socio: 4, stability: 3, battleground: 1, demInfl: 0, comInfl: 0, country: 'Czechoslovakia', region: 'Eastern Europe', box: {x: 417, y: 797}, adjacent: [32, 33, 35, , ]},
- {name_unique: 'Catholic Church, Czechoslovakia', space_id: 35, socio: 7, stability: 5, battleground: 0, demInfl: 1, comInfl: 0, country: 'Czechoslovakia', region: 'Eastern Europe', box: {x: 538, y: 794}, adjacent: [33, 34, 36, , ]},
- {name_unique: 'Prešov', space_id: 36, socio: 3, stability: 4, battleground: 0, demInfl: 0, comInfl: 0, country: 'Czechoslovakia', region: 'Eastern Europe', box: {x: 658, y: 794}, adjacent: [35, 37, , , ]},
- {name_unique: 'Košice', space_id: 37, socio: 3, stability: 4, battleground: 0, demInfl: 0, comInfl: 0, country: 'Czechoslovakia', region: 'Eastern Europe', box: {x: 777, y: 815}, adjacent: [36, 42, , , ]},
- {name_unique: 'Catholic Church, Hungary', space_id: 38, socio: 7, stability: 5, battleground: 0, demInfl: 1, comInfl: 0, country: 'Hungary', region: 'Eastern Europe', box: {x: 314, y: 886}, adjacent: [39, 43, , , ]},
- {name_unique: 'Győr', space_id: 39, socio: 4, stability: 3, battleground: 0, demInfl: 0, comInfl: 0, country: 'Hungary', region: 'Eastern Europe', box: {x: 434, y: 887}, adjacent: [38, 40, 43, 44, ]},
- {name_unique: 'Tatabánya', space_id: 40, socio: 4, stability: 3, battleground: 0, demInfl: 0, comInfl: 0, country: 'Hungary', region: 'Eastern Europe', box: {x: 549, y: 886}, adjacent: [39, 41, 45, , ]},
- {name_unique: 'Miskolc', space_id: 41, socio: 4, stability: 3, battleground: 1, demInfl: 0, comInfl: 0, country: 'Hungary', region: 'Eastern Europe', box: {x: 664, y: 901}, adjacent: [40, 42, 45, , ]},
- {name_unique: 'Debrecen', space_id: 42, socio: 4, stability: 3, battleground: 1, demInfl: 0, comInfl: 0, country: 'Hungary', region: 'Eastern Europe', box: {x: 781, y: 938}, adjacent: [37, 41, , , ]},
- {name_unique: 'Szombathely', space_id: 43, socio: 1, stability: 4, battleground: 0, demInfl: 0, comInfl: 1, country: 'Hungary', region: 'Eastern Europe', box: {x: 316, y: 963}, adjacent: [38, 39, 44, , ]},
- {name_unique: 'Székesfehérvár', space_id: 44, socio: 4, stability: 3, battleground: 0, demInfl: 1, comInfl: 0, country: 'Hungary', region: 'Eastern Europe', box: {x: 442, y: 962}, adjacent: [39, 43, 45, , ]},
- {name_unique: 'Budapest', space_id: 45, socio: 2, stability: 3, battleground: 1, demInfl: 1, comInfl: 0, country: 'Hungary', region: 'Eastern Europe', box: {x: 630, y: 983}, adjacent: [40, 41, 44, 47, 48]},
- {name_unique: 'Hungarian Writers', space_id: 46, socio: 5, stability: 2, battleground: 0, demInfl: 0, comInfl: 0, country: 'Hungary', region: 'Eastern Europe', box: {x: 348, y: 1040}, adjacent: [47, , , , ]},
- {name_unique: 'Eötvös Loránd University', space_id: 47, socio: 6, stability: 1, battleground: 0, demInfl: 0, comInfl: 0, country: 'Hungary', region: 'Eastern Europe', box: {x: 512, y: 1034}, adjacent: [46, 45, , , ]},
- {name_unique: 'Szeged', space_id: 48, socio: 3, stability: 4, battleground: 1, demInfl: 1, comInfl: 0, country: 'Hungary', region: 'Eastern Europe', box: {x: 632, y: 1073}, adjacent: [45, 49, 50, , ]},
- {name_unique: 'Pécs', space_id: 49, socio: 3, stability: 4, battleground: 0, demInfl: 0, comInfl: 0, country: 'Hungary', region: 'Eastern Europe', box: {x: 486, y: 1105}, adjacent: [48, , , , ]},
- {name_unique: 'Timişoara', space_id: 50, socio: 4, stability: 3, battleground: 1, demInfl: 0, comInfl: 0, country: 'Romania', region: 'Balkans', box: {x: 597, y: 1204}, adjacent: [48, 51, 60, , ]},
- {name_unique: 'Cluj-Napoca', space_id: 51, socio: 1, stability: 4, battleground: 1, demInfl: 0, comInfl: 2, country: 'Romania', region: 'Balkans', box: {x: 756, y: 1125}, adjacent: [50, 54, 58, 61, ]},
- {name_unique: 'Târgu Mureş', space_id: 52, socio: 3, stability: 4, battleground: 0, demInfl: 0, comInfl: 0, country: 'Romania', region: 'Balkans', box: {x: 915, y: 1136}, adjacent: [53, 56, , , ]},
- {name_unique: 'Iaşi', space_id: 53, socio: 4, stability: 3, battleground: 1, demInfl: 0, comInfl: 0, country: 'Romania', region: 'Balkans', box: {x: 1072, y: 1097}, adjacent: [52, 57, 62, , ]},
- {name_unique: 'Babeş-Bolyai University', space_id: 54, socio: 6, stability: 1, battleground: 0, demInfl: 0, comInfl: 0, country: 'Romania', region: 'Balkans', box: {x: 746, y: 1203}, adjacent: [51, 55, , , ]},
- {name_unique: 'Romanian Writers', space_id: 55, socio: 5, stability: 2, battleground: 0, demInfl: 0, comInfl: 0, country: 'Romania', region: 'Balkans', box: {x: 739, y: 1278}, adjacent: [54, , , , ]},
- {name_unique: 'Hargita/Covasna', space_id: 56, socio: 8, stability: 4, battleground: 0, demInfl: 0, comInfl: 0, country: 'Romania', region: 'Balkans', box: {x: 928, y: 1227}, adjacent: [52, , , , ]},
- {name_unique: 'Braşov', space_id: 57, socio: 4, stability: 3, battleground: 1, demInfl: 0, comInfl: 0, country: 'Romania', region: 'Balkans', box: {x: 1049, y: 1225}, adjacent: [53, 59, 61, , ]},
- {name_unique: 'Orthodox Church Romania', space_id: 58, socio: 7, stability: 3, battleground: 0, demInfl: 0, comInfl: 0, country: 'Romania', region: 'Balkans', box: {x: 855, y: 1338}, adjacent: [51, 60, , , ]},
- {name_unique: 'Ploieşti', space_id: 59, socio: 4, stability: 3, battleground: 0, demInfl: 0, comInfl: 0, country: 'Romania', region: 'Balkans', box: {x: 1061, y: 1316}, adjacent: [57, 61, 62, , ]},
- {name_unique: 'Craiova', space_id: 60, socio: 3, stability: 4, battleground: 0, demInfl: 0, comInfl: 0, country: 'Romania', region: 'Balkans', box: {x: 763, y: 1411}, adjacent: [50, 58, 61, , ]},
- {name_unique: 'Bucureşti', space_id: 61, socio: 2, stability: 3, battleground: 1, demInfl: 0, comInfl: 2, country: 'Romania', region: 'Balkans', box: {x: 929, y: 1445}, adjacent: [51, 57, 59, 60, 63]},
- {name_unique: 'Galaţi', space_id: 62, socio: 4, stability: 3, battleground: 1, demInfl: 0, comInfl: 0, country: 'Romania', region: 'Balkans', box: {x: 1104, y: 1399}, adjacent: [53, 59, 63, , ]},
- {name_unique: 'Constanţa', space_id: 63, socio: 4, stability: 3, battleground: 0, demInfl: 0, comInfl: 0, country: 'Romania', region: 'Balkans', box: {x: 1130, y: 1517}, adjacent: [61, 62, 72, , ]},
- {name_unique: 'Pleven', space_id: 64, socio: 3, stability: 4, battleground: 0, demInfl: 0, comInfl: 0, country: 'Bulgaria', region: 'Balkans', box: {x: 764, y: 1534}, adjacent: [68, , , , ]},
- {name_unique: 'Orthodox Church Bulgaria', space_id: 65, socio: 7, stability: 3, battleground: 0, demInfl: 0, comInfl: 0, country: 'Bulgaria', region: 'Balkans', box: {x: 882, y: 1540}, adjacent: [66, 68, , , ]},
- {name_unique: 'Ruse', space_id: 66, socio: 4, stability: 3, battleground: 1, demInfl: 0, comInfl: 0, country: 'Bulgaria', region: 'Balkans', box: {x: 998, y: 1540}, adjacent: [65, 69, 70, 71, 72]},
- {name_unique: 'Sofia University', space_id: 67, socio: 6, stability: 1, battleground: 0, demInfl: 0, comInfl: 0, country: 'Bulgaria', region: 'Balkans', box: {x: 645, y: 1650}, adjacent: [68, 73, , , ]},
- {name_unique: 'Sofia', space_id: 68, socio: 2, stability: 3, battleground: 1, demInfl: 0, comInfl: 2, country: 'Bulgaria', region: 'Balkans', box: {x: 768, y: 1653}, adjacent: [64, 65, 67, 69, 74]},
- {name_unique: 'Stara Zagora', space_id: 69, socio: 1, stability: 4, battleground: 0, demInfl: 0, comInfl: 1, country: 'Bulgaria', region: 'Balkans', box: {x: 886, y: 1694}, adjacent: [66, 68, 71, , ]},
- {name_unique: 'Razgrad', space_id: 70, socio: 8, stability: 4, battleground: 0, demInfl: 0, comInfl: 0, country: 'Bulgaria', region: 'Balkans', box: {x: 954, y: 1620}, adjacent: [66, , , , ]},
- {name_unique: 'Burgas', space_id: 71, socio: 4, stability: 3, battleground: 1, demInfl: 0, comInfl: 0, country: 'Bulgaria', region: 'Balkans', box: {x: 1004, y: 1695}, adjacent: [66, 69, 72, , ]},
- {name_unique: 'Varna', space_id: 72, socio: 4, stability: 3, battleground: 1, demInfl: 0, comInfl: 0, country: 'Bulgaria', region: 'Balkans', box: {x: 1086, y: 1613}, adjacent: [63, 66, 71, , ]},
- {name_unique: 'Bulgarian Writers', space_id: 73, socio: 5, stability: 2, battleground: 0, demInfl: 0, comInfl: 0, country: 'Bulgaria', region: 'Balkans', box: {x: 652, y: 1726}, adjacent: [67, , , , ]},
- {name_unique: 'Plovdiv', space_id: 74, socio: 4, stability: 3, battleground: 1, demInfl: 0, comInfl: 0, country: 'Bulgaria', region: 'Balkans', box: {x: 771, y: 1739}, adjacent: [68, 75, , , ]},
- {name_unique: 'Sliven', space_id: 75, socio: 3, stability: 4, battleground: 0, demInfl: 0, comInfl: 0, country: 'Bulgaria', region: 'Balkans', box: {x: 894, y: 1768}, adjacent: [74, , , , ]}
-]
-
-const cards = [
- null,
- {number: 1, period: 1, side: 'C', name: 'Legacy of Martial Law*', ops: 2, remove: 1, playable: true, red: false},
- {number: 2, period: 1, side: 'D', name: 'Solidarity Legalized*', ops: 4, remove: 1, playable: true, red: true},
- {number: 3, period: 1, side: 'D', name: 'Walesa*', ops: 3, remove: 1, playable: false, red: false},
- {number: 4, period: 1, side: 'D', name: 'Michnik*', ops: 1, remove: 1, playable: true, red: false},
- {number: 5, period: 1, side: 'D', name: 'General Strike', ops: 3, remove: 0, playable: true, red: false},
- {number: 6, period: 1, side: 'C', name: 'Brought in for Questioning', ops: 3, remove: 0, playable: true, red: false},
- {number: 7, period: 1, side: 'C', name: 'State Run Media*', ops: 2, remove: 1, playable: true, red: false},
- {number: 8, period: 1, side: 'N', name: 'Prudence', ops: 4, remove: 0, playable: true, red: false},
- {number: 9, period: 1, side: 'C', name: 'The Wall*', ops: 1, remove: 1, playable: true, red: false},
- {number: 10, period: 1, side: 'C', name: 'Cult of Personality*', ops: 3, remove: 1, playable: true, red: false},
- {number: 11, period: 1, side: 'C', name: 'Dissident Arrested', ops: 2, remove: 0, playable: true, red: false},
- {number: 12, period: 1, side: 'C', name: 'Apparatchiks*', ops: 2, remove: 1, playable: true, red: false},
- {number: 13, period: 1, side: 'C', name: 'Stasi*', ops: 1, remove: 1, playable: true, red: false},
- {number: 14, period: 1, side: 'N', name: 'Gorbachev Charms the West', ops: 4, remove: 0, playable: true, red: false},
- {number: 15, period: 1, side: 'C', name: 'Honecker*', ops: 3, remove: 1, playable: true, red: false},
- {number: 16, period: 1, side: 'C', name: 'Nomenklatura*', ops: 2, remove: 1, playable: true, red: false},
- {number: 17, period: 1, side: 'D', name: 'Roundtable Talks', ops: 3, remove: 0, playable: true, red: false},
- {number: 18, period: 1, side: 'C', name: 'Poszgay Defends the Revolution*', ops: 2, remove: 1, playable: true, red: false},
- {number: 19, period: 1, side: 'D', name: 'Papal Visit*', ops: 2, remove: 1, playable: true, red: false},
- {number: 20, period: 1, side: 'C', name: 'Deutsche Marks*', ops: 4, remove: 1, playable: true, red: false},
- {number: 21, period: 1, side: 'N', name: 'Common European Home', ops: 2, remove: 0, playable: true, red: false},
- {number: 22, period: 1, side: 'N', name: 'Power Struggle - Poland', ops: 0, remove: 0, playable: true, red: false},
- {number: 23, period: 1, side: 'N', name: 'Power Struggle - Hungary', ops: 0, remove: 0, playable: true, red: false},
- {number: 24, period: 1, side: 'D', name: 'St. Nicholas Church*', ops: 1, remove: 1, playable: true, red: true},
- {number: 25, period: 1, side: 'C', name: 'Perestroika*', ops: 3, remove: 1, playable: true, red: false},
- {number: 26, period: 1, side: 'D', name: 'Helsinki Final Act*', ops: 1, remove: 1, playable: true, red: true},
- {number: 27, period: 1, side: 'D', name: 'Consumerism', ops: 3, remove: 0, playable: true, red: false},
- {number: 28, period: 1, side: 'C', name: 'Factory Party Cells', ops: 3, remove: 0, playable: true, red: false},
- {number: 29, period: 1, side: 'D', name: 'Jan Palach Week*', ops: 1, remove: 1, playable: true, red: false},
- {number: 30, period: 1, side: 'C', name: 'Tear Gas*', ops: 1, remove: 1, playable: true, red: false},
- {number: 31, period: 1, side: 'D', name: 'Intelligentsia', ops: 2, remove: 0, playable: true, red: false},
- {number: 32, period: 1, side: 'C', name: 'Peasant Parties*', ops: 2, remove: 1, playable: true, red: false},
- {number: 33, period: 1, side: 'D', name: 'Sajudis*', ops: 2, remove: 1, playable: true, red: true},
- {number: 34, period: 1, side: 'D', name: 'Fidesz*', ops: 2, remove: 1, playable: true, red: false},
- {number: 35, period: 1, side: 'C', name: 'Heal Our Bleeding Wound*', ops: 3, remove: 1, playable: true, red: false},
- {number: 36, period: 1, side: 'D', name: 'Dash for the West*', ops: 3, remove: 1, playable: true, red: false},
- {number: 37, period: 1, side: 'C', name: 'Nagy Reburied*', ops: 3, remove: 1, playable: true, red: false},
- {number: 38, period: 1, side: 'C', name: 'The July Concept*', ops: 3, remove: 1, playable: true, red: false},
- {number: 39, period: 1, side: 'D', name: 'Eco-Glasnost*', ops: 2, remove: 1, playable: true, red: false},
- {number: 40, period: 1, side: 'D', name: 'Hungarian Democratic Forum*', ops: 3, remove: 1, playable: true, red: false},
- {number: 41, period: 2, side: 'C', name: 'Ceausescu*', ops: 3, remove: 1, playable: true, red: false},
- {number: 42, period: 2, side: 'N', name: 'Power Struggle - East Germany', ops: 0, remove: 0, playable: true, red: false},
- {number: 43, period: 2, side: 'N', name: 'Power Struggle - Bulgaria', ops: 0, remove: 0, playable: true, red: false},
- {number: 44, period: 2, side: 'N', name: 'Inflationary Currency*', ops: 3, remove: 1, playable: true, red: false},
- {number: 45, period: 2, side: 'D', name: 'Soviet Troop Withdrawals*', ops: 4, remove: 1, playable: true, red: false},
- {number: 46, period: 2, side: 'D', name: 'Goodbye Lenin!*', ops: 3, remove: 1, playable: true, red: false},
- {number: 47, period: 2, side: 'C', name: 'Bulgarian Turks Expelled*', ops: 3, remove: 1, playable: true, red: false},
- {number: 48, period: 2, side: 'D', name: '\"We are the People!\"', ops: 3, remove: 1, playable: true, red: false},
- {number: 49, period: 2, side: 'D', name: 'Foreign Currency Debt Burden', ops: 1, remove: 1, playable: true, red: false},
- {number: 50, period: 2, side: 'D', name: 'The Sinatra Doctrine*', ops: 3, remove: 1, playable: true, red: false},
- {number: 51, period: 2, side: 'C', name: '40th Anniversary Celebration*', ops: 2, remove: 1, playable: true, red: false},
- {number: 52, period: 2, side: 'C', name: 'Normalization*', ops: 3, remove: 1, playable: true, red: false},
- {number: 53, period: 2, side: 'C', name: 'Li Peng*', ops: 2, remove: 1, playable: true, red: false},
- {number: 54, period: 2, side: 'D', name: 'The Crowd Turns Against Ceausescu*', ops: 3, remove: 1, playable: true, red: true},
- {number: 55, period: 2, side: 'N', name: 'Power Struggle - Czechoslovakia', ops: 0, remove: 0, playable: true, red: false},
- {number: 56, period: 2, side: 'D', name: 'Foreign Television*', ops: 2, remove: 1, playable: true, red: false},
- {number: 57, period: 2, side: 'C', name: 'Central Committee Reshuffle*', ops: 2, remove: 1, playable: true, red: false},
- {number: 58, period: 2, side: 'D', name: 'Austria-Hungary Border Reopened*', ops: 2, remove: 1, playable: true, red: false},
- {number: 59, period: 2, side: 'C', name: 'GrenzTruppen*', ops: 2, remove: 1, playable: true, red: false},
- {number: 60, period: 2, side: 'D', name: 'Toxic Waste*', ops: 2, remove: 1, playable: true, red: false},
- {number: 61, period: 2, side: 'D', name: 'The Monday Demonstrations*', ops: 4, remove: 1, playable: false, red: false},
- {number: 62, period: 2, side: 'D', name: 'Yakovlev Counsels Gorbachev*', ops: 2, remove: 1, playable: true, red: false},
- {number: 63, period: 2, side: 'D', name: 'Genscher*', ops: 2, remove: 1, playable: true, red: false},
- {number: 64, period: 2, side: 'D', name: 'Legacy of 1968*', ops: 4, remove: 1, playable: true, red: false},
- {number: 65, period: 2, side: 'D', name: 'Presidential Visit*', ops: 3, remove: 1, playable: true, red: false},
- {number: 66, period: 2, side: 'D', name: 'New Forum*', ops: 1, remove: 1, playable: true, red: false},
- {number: 67, period: 2, side: 'N', name: 'Reformer Rehabilitated*', ops: 2, remove: 1, playable: false, red: false},
- {number: 68, period: 2, side: 'D', name: 'Klaus and Komarek*', ops: 3, remove: 1, playable: true, red: false},
- {number: 69, period: 2, side: 'C', name: 'Systematization*', ops: 3, remove: 1, playable: true, red: false},
- {number: 70, period: 2, side: 'C', name: 'Securitate*', ops: 2, remove: 1, playable: true, red: false},
- {number: 71, period: 2, side: 'D', name: 'Kiss of Death*', ops: 3, remove: 1, playable: true, red: false},
- {number: 72, period: 2, side: 'D', name: 'Peasant Parties Revolt*', ops: 3, remove: 1, playable: true, red: false},
- {number: 73, period: 2, side: 'D', name: 'Laszlo Tokes*', ops: 2, remove: 1, playable: true, red: true},
- {number: 74, period: 2, side: 'D', name: 'FRG Embassies*', ops: 3, remove: 1, playable: true, red: false},
- {number: 75, period: 2, side: 'D', name: 'Exit Visas*', ops: 3, remove: 1, playable: true, red: false},
- {number: 76, period: 2, side: 'C', name: 'Warsaw Pact Summit*', ops: 2, remove: 1, playable: true, red: false},
- {number: 77, period: 2, side: 'D', name: 'Samizdat*', ops: 1, remove: 1, playable: true, red: false},
- {number: 78, period: 2, side: 'N', name: 'Workers Revolt', ops: 2, remove: 0, playable: true, red: false},
- {number: 79, period: 2, side: 'C', name: 'The Third Way*', ops: 2, remove: 1, playable: true, red: false},
- {number: 80, period: 2, side: 'C', name: 'Nepotism*', ops: 3, remove: 1, playable: true, red: false},
- {number: 81, period: 2, side: 'D', name: 'The Baltic Way*', ops: 3, remove: 1, playable: false, red: true},
- {number: 82, period: 3, side: 'C', name: 'Spitzel*', ops: 1, remove: 1, playable: true, red: false},
- {number: 83, period: 3, side: 'C', name: 'Modrow*', ops: 2, remove: 1, playable: true, red: false},
- {number: 84, period: 3, side: 'D', name: 'Breakaway Baltic Republics*', ops: 4, remove: 1, playable: false, red: true},
- {number: 85, period: 3, side: 'N', name: 'Tank Column/Tank Man*', ops: 2, remove: 1, playable: true, red: false},
- {number: 86, period: 3, side: 'D', name: '\"The Wall Must Go!\"*', ops: 3, remove: 1, playable: true, red: false},
- {number: 87, period: 3, side: 'D', name: 'Kohl Proposes Reunification*', ops: 3, remove: 1, playable: true, red: false},
- {number: 88, period: 3, side: 'C', name: 'Adamec*', ops: 2, remove: 1, playable: true, red: false},
- {number: 89, period: 3, side: 'D', name: 'Domino Theory*', ops: 3, remove: 1, playable: true, red: false},
- {number: 90, period: 3, side: 'D', name: 'Civic Forum*', ops: 4, remove: 1, playable: true, red: false},
- {number: 91, period: 3, side: 'D', name: 'My First Banana*', ops: 3, remove: 1, playable: true, red: false},
- {number: 92, period: 3, side: 'C', name: 'Betrayal*', ops: 3, remove: 1, playable: true, red: false},
- {number: 93, period: 3, side: 'D', name: 'Shock Therapy*', ops: 3, remove: 1, playable: true, red: false},
- {number: 94, period: 3, side: 'D', name: 'Union of Democratic Forces*', ops: 4, remove: 1, playable: true, red: false},
- {number: 95, period: 3, side: 'N', name: 'Power Struggle - Romania', ops: 0, remove: 0, playable: true, red: false},
- {number: 96, period: 3, side: 'C', name: 'The Chinese Solution*', ops: 1, remove: 1, playable: false, red: false},
- {number: 97, period: 3, side: 'D', name: 'The Tyrant is Gone*', ops: 2, remove: 1, playable: false, red: false},
- {number: 98, period: 3, side: 'C', name: 'Politburo Intrigue*', ops: 2, remove: 1, playable: true, red: false},
- {number: 99, period: 3, side: 'C', name: 'Ligachev*', ops: 3, remove: 1, playable: true, red: false},
- {number: 100, period: 3, side: 'N', name: 'Stand Fast*', ops: 3, remove: 1, playable: true, red: false},
- {number: 101, period: 3, side: 'C', name: 'Elena*', ops: 1, remove: 1, playable: true, red: false},
- {number: 102, period: 3, side: 'C', name: 'National Salvation Front*', ops: 3, remove: 1, playable: true, red: false},
- {number: 103, period: 3, side: 'D', name: 'Government Resigns*', ops: 1, remove: 1, playable: true, red: false},
- {number: 104, period: 3, side: 'C', name: 'New Year\'s Eve Party*', ops: 2, remove: 1, playable: true, red: false},
- {number: 105, period: 3, side: 'D', name: 'Public Against Violence*', ops: 3, remove: 1, playable: true, red: false},
- {number: 106, period: 3, side: 'C', name: 'Social Democratic Platform Adopted*', ops: 3, remove: 1, playable: true, red: false},
- {number: 107, period: 3, side: 'C', name: 'Massacre in Timisoara*', ops: 3, remove: 1, playable: false, red: false},
- {number: 108, period: 3, side: 'D', name: 'Army Backs Revolution*', ops: 3, remove: 1, playable: true, red: false},
- {number: 109, period: 3, side: 'C', name: 'Kremlin Coup!*', ops: 3, remove: 1, playable: false, red: false},
- {number: 110, period: 3, side: 'D', name: 'Malta Summit*', ops: 3, remove: 1, playable: true, red: false},
-]
-
-const power_cards = [
-null,
-{number: 1, name: 'Strike', value: 6, socio: 0, url: 'ps2'},
-{number: 2, name: 'Strike', value: 6, socio: 0, url: 'ps2'},
-{number: 3, name: 'Strike', value: 5, socio: 0, url: 'ps3'},
-{number: 4, name: 'Strike', value: 5, socio: 0, url: 'ps3'},
-{number: 5, name: 'Strike', value: 4, socio: 0, url: 'ps4'},
-{number: 6, name: 'Strike', value: 4, socio: 0, url: 'ps4'},
-{number: 7, name: 'Strike', value: 4, socio: 0, url: 'ps4'},
-{number: 8, name: 'Strike', value: 4, socio: 0, url: 'ps4'},
-{number: 9, name: 'Strike', value: 3, socio: 0, url: 'ps5'},
-{number: 10, name: 'Strike', value: 3, socio: 0, url: 'ps5'},
-{number: 11, name: 'Strike', value: 3, socio: 0, url: 'ps5'},
-{number: 12, name: 'Strike', value: 3, socio: 0, url: 'ps5'},
-{number: 13, name: 'March', value: 6, socio: 0, url: 'ps6'},
-{number: 14, name: 'March', value: 6, socio: 0, url: 'ps6'},
-{number: 15, name: 'March', value: 5, socio: 0, url: 'ps7'},
-{number: 16, name: 'March', value: 5, socio: 0, url: 'ps7'},
-{number: 17, name: 'March', value: 4, socio: 0, url: 'ps8'},
-{number: 18, name: 'March', value: 4, socio: 0, url: 'ps8'},
-{number: 19, name: 'March', value: 4, socio: 0, url: 'ps8'},
-{number: 20, name: 'March', value: 4, socio: 0, url: 'ps8'},
-{number: 21, name: 'March', value: 3, socio: 0, url: 'ps9'},
-{number: 22, name: 'March', value: 3, socio: 0, url: 'ps9'},
-{number: 23, name: 'March', value: 3, socio: 0, url: 'ps9'},
-{number: 24, name: 'March', value: 3, socio: 0, url: 'ps9'},
-{number: 25, name: 'Rally in the Square', value: 1, socio: 0, url: 'ps1'},
-{number: 26, name: 'Rally in the Square', value: 1, socio: 0, url: 'ps1'},
-{number: 27, name: 'Rally in the Square', value: 1, socio: 0, url: 'ps1'},
-{number: 28, name: 'Rally in the Square', value: 1, socio: 0, url: 'ps1'},
-{number: 29, name: 'Rally in the Square', value: 1, socio: 0, url: 'ps1'},
-{number: 30, name: 'Rally in the Square', value: 1, socio: 0, url: 'ps1'},
-{number: 31, name: 'Petition', value: 6, socio: 0, url: 'ps10'},
-{number: 32, name: 'Petition', value: 6, socio: 0, url: 'ps10'},
-{number: 33, name: 'Petition', value: 6, socio: 0, url: 'ps10'},
-{number: 34, name: 'Petition', value: 5, socio: 0, url: 'ps11'},
-{number: 35, name: 'Petition', value: 5, socio: 0, url: 'ps11'},
-{number: 36, name: 'Petition', value: 5, socio: 0, url: 'ps11'},
-{number: 37, name: 'Elite Leader', value: 3, socio: 1, url: 'ps16'},
-{number: 38, name: 'Elite Leader', value: 3, socio: 1, url: 'ps17'},
-{number: 39, name: 'Elite Leader', value: 3, socio: 1, url: 'ps18'},
-{number: 40, name: 'Elite Leader', value: 3, socio: 1, url: 'ps19'},
-{number: 41, name: 'Intellectual Leader', value: 3, socio: 5, url: 'ps12'},
-{number: 42, name: 'Intellectual Leader', value: 3, socio: 5, url: 'ps13'},
-{number: 43, name: 'Intellectual Leader', value: 3, socio: 5, url: 'ps14'},
-{number: 44, name: 'Intellectual Leader', value: 3, socio: 5, url: 'ps15'},
-{number: 45, name: 'Worker Leader', value: 3, socio: 4, url: 'ps20'},
-{number: 46, name: 'Worker Leader', value: 3, socio: 4, url: 'ps21'},
-{number: 47, name: 'Church Leader', value: 3, socio: 7, url: 'ps23'},
-{number: 48, name: 'Student Leader', value: 3, socio: 6, url: 'ps22'},
-{number: 49, name: 'Scare Tactics', value: '', socio: 0, url: 'ps26'},
-{number: 50, name: 'Support Surges', value: '', socio: 0, url: 'ps25'},
-{number: 51, name: 'Support Falters', value: '', socio: 0, url: 'ps24'},
-{number: 52, name: 'Tactic Fails', value: '', socio: 0, url: 'ps27'},
-{number: 53, name: 'Rally in the Square', value: 3, socio: 0, url: 'ps1'},
-{number: 54, name: 'Petition', value: 3, socio: 0, url: 'ps10'},
-]
-
-
-if (typeof module !== 'undefined') module.exports = { spaces, cards, power_cards }
+const spaces = [
+ {
+         name_unique: "Schwerin",
+         space_id: 0,
+         socio: 4,
+         stability: 3,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "East_Germany",
+         region: "Eastern Europe",
+         box: {
+                 x: 111,
+                 y: 61,
+         },
+         adjacent: [ 1, 2 ],
+         ascii_name: "Schwerin",
+ },
+ {
+         name_unique: "Rostock",
+         space_id: 1,
+         socio: 4,
+         stability: 3,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "East_Germany",
+         region: "Eastern Europe",
+         box: {
+                 x: 228,
+                 y: 41,
+         },
+         adjacent: [ 0, 2 ],
+         ascii_name: "Rostock",
+ },
+ {
+         name_unique: "Berlin",
+         space_id: 2,
+         socio: 2,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 2,
+         country: "East_Germany",
+         region: "Eastern Europe",
+         box: {
+                 x: 251,
+                 y: 113,
+         },
+         adjacent: [ 0, 1, 4, 8 ],
+         ascii_name: "Berlin",
+ },
+ {
+         name_unique: "German Writers",
+         space_id: 3,
+         socio: 5,
+         stability: 2,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "East_Germany",
+         region: "Eastern Europe",
+         box: {
+                 x: 58,
+                 y: 185,
+         },
+         adjacent: [ 4 ],
+         ascii_name: "German Writers",
+ },
+ {
+         name_unique: "Walter Ulbricht Academy",
+         space_id: 4,
+         socio: 6,
+         stability: 1,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "East_Germany",
+         region: "Eastern Europe",
+         box: {
+                 x: 175,
+                 y: 187,
+         },
+         adjacent: [ 2, 3 ],
+         ascii_name: "Walter Ulbricht Academy",
+ },
+ {
+         name_unique: "Lutheran Church",
+         space_id: 5,
+         socio: 7,
+         stability: 5,
+         battleground: 1,
+         demInfl: 1,
+         comInfl: 0,
+         country: "East_Germany",
+         region: "Eastern Europe",
+         box: {
+                 x: 300,
+                 y: 212,
+         },
+         adjacent: [ 8 ],
+         ascii_name: "Lutheran Church",
+ },
+ {
+         name_unique: "Magdeburg",
+         space_id: 6,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 0,
+         country: "East_Germany",
+         region: "Eastern Europe",
+         box: {
+                 x: 58,
+                 y: 275,
+         },
+         adjacent: [ 7, 9, 10 ],
+         ascii_name: "Magdeburg",
+ },
+ {
+         name_unique: "Halle",
+         space_id: 7,
+         socio: 4,
+         stability: 3,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "East_Germany",
+         region: "Eastern Europe",
+         box: {
+                 x: 175,
+                 y: 278,
+         },
+         adjacent: [ 6, 8, 10 ],
+         ascii_name: "Halle",
+ },
+ {
+         name_unique: "Leipzig",
+         space_id: 8,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 0,
+         country: "East_Germany",
+         region: "Eastern Europe",
+         box: {
+                 x: 297,
+                 y: 297,
+         },
+         adjacent: [ 2, 5, 7, 10, 11 ],
+         ascii_name: "Leipzig",
+ },
+ {
+         name_unique: "Erfurt",
+         space_id: 9,
+         socio: 3,
+         stability: 4,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "East_Germany",
+         region: "Eastern Europe",
+         box: {
+                 x: 23,
+                 y: 356,
+         },
+         adjacent: [ 6 ],
+         ascii_name: "Erfurt",
+ },
+ {
+         name_unique: "Karl-Marx-Stadt",
+         space_id: 10,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 0,
+         country: "East_Germany",
+         region: "Eastern Europe",
+         box: {
+                 x: 138,
+                 y: 385,
+         },
+         adjacent: [ 6, 7, 8, 11 ],
+         ascii_name: "Karl-Marx-Stadt",
+ },
+ {
+         name_unique: "Dresden",
+         space_id: 11,
+         socio: 1,
+         stability: 4,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 2,
+         country: "East_Germany",
+         region: "Eastern Europe",
+         box: {
+                 x: 262,
+                 y: 375,
+         },
+         adjacent: [ 8, 10, 18, 26 ],
+         ascii_name: "Dresden",
+ },
+ {
+         name_unique: "Szczecin",
+         space_id: 12,
+         socio: 4,
+         stability: 3,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Poland",
+         region: "Eastern Europe",
+         box: {
+                 x: 434,
+                 y: 204,
+         },
+         adjacent: [ 13, 15 ],
+         ascii_name: "Szczecin",
+ },
+ {
+         name_unique: "Gdańsk",
+         space_id: 13,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 1,
+         comInfl: 0,
+         country: "Poland",
+         region: "Eastern Europe",
+         box: {
+                 x: 699,
+                 y: 215,
+         },
+         adjacent: [ 12, 14, 15, 16, 17 ],
+         ascii_name: "Gdansk",
+ },
+ {
+         name_unique: "Bydgoszcz",
+         space_id: 14,
+         socio: 1,
+         stability: 4,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 1,
+         country: "Poland",
+         region: "Eastern Europe",
+         box: {
+                 x: 679,
+                 y: 304,
+         },
+         adjacent: [ 13, 16 ],
+         ascii_name: "Bydgoszcz",
+ },
+ {
+         name_unique: "Poznań",
+         space_id: 15,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Poland",
+         region: "Eastern Europe",
+         box: {
+                 x: 521,
+                 y: 355,
+         },
+         adjacent: [ 12, 13, 18, 19 ],
+         ascii_name: "Poznan",
+ },
+ {
+         name_unique: "Warszawa",
+         space_id: 16,
+         socio: 2,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 1,
+         country: "Poland",
+         region: "Eastern Europe",
+         box: {
+                 x: 806,
+                 y: 383,
+         },
+         adjacent: [ 13, 14, 17, 20, 23 ],
+         ascii_name: "Warszawa",
+ },
+ {
+         name_unique: "Białystok",
+         space_id: 17,
+         socio: 3,
+         stability: 4,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Poland",
+         region: "Eastern Europe",
+         box: {
+                 x: 940,
+                 y: 342,
+         },
+         adjacent: [ 13, 16, 23 ],
+         ascii_name: "Bialystok",
+ },
+ {
+         name_unique: "Wrocław",
+         space_id: 18,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Poland",
+         region: "Eastern Europe",
+         box: {
+                 x: 462,
+                 y: 443,
+         },
+         adjacent: [ 11, 15, 19, 21 ],
+         ascii_name: "Wroclaw",
+ },
+ {
+         name_unique: "Catholic Church, Poland",
+         space_id: 19,
+         socio: 7,
+         stability: 5,
+         battleground: 0,
+         demInfl: 5,
+         comInfl: 0,
+         country: "Poland",
+         region: "Eastern Europe",
+         box: {
+                 x: 625,
+                 y: 437,
+         },
+         adjacent: [ 15, 18, 20, 21, 22 ],
+         ascii_name: "Catholic Church, Poland",
+ },
+ {
+         name_unique: "Łódź",
+         space_id: 20,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Poland",
+         region: "Eastern Europe",
+         box: {
+                 x: 749,
+                 y: 486,
+         },
+         adjacent: [ 16, 19, 22, 23 ],
+         ascii_name: "Lodz",
+ },
+ {
+         name_unique: "Katowice",
+         space_id: 21,
+         socio: 4,
+         stability: 3,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Poland",
+         region: "Eastern Europe",
+         box: {
+                 x: 570,
+                 y: 569,
+         },
+         adjacent: [ 18, 19, 22, 32 ],
+         ascii_name: "Katowice",
+ },
+ {
+         name_unique: "Kraków",
+         space_id: 22,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 1,
+         comInfl: 0,
+         country: "Poland",
+         region: "Eastern Europe",
+         box: {
+                 x: 711,
+                 y: 598,
+         },
+         adjacent: [ 19, 20, 21, 24 ],
+         ascii_name: "Krakow",
+ },
+ {
+         name_unique: "Lublin",
+         space_id: 23,
+         socio: 3,
+         stability: 4,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 1,
+         country: "Poland",
+         region: "Eastern Europe",
+         box: {
+                 x: 879,
+                 y: 603,
+         },
+         adjacent: [ 16, 17, 20 ],
+         ascii_name: "Lublin",
+ },
+ {
+         name_unique: "Jagiellonian University",
+         space_id: 24,
+         socio: 6,
+         stability: 1,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Poland",
+         region: "Eastern Europe",
+         box: {
+                 x: 679,
+                 y: 681,
+         },
+         adjacent: [ 22, 25 ],
+         ascii_name: "Jagiellonian University",
+ },
+ {
+         name_unique: "Polish Writers",
+         space_id: 25,
+         socio: 5,
+         stability: 2,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Poland",
+         region: "Eastern Europe",
+         box: {
+                 x: 832,
+                 y: 694,
+         },
+         adjacent: [ 24 ],
+         ascii_name: "Polish Writers",
+ },
+ {
+         name_unique: "Plzeň",
+         space_id: 26,
+         socio: 1,
+         stability: 4,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 2,
+         country: "Czechoslovakia",
+         region: "Eastern Europe",
+         box: {
+                 x: 159,
+                 y: 483,
+         },
+         adjacent: [ 11, 27, 28 ],
+         ascii_name: "Plzen",
+ },
+ {
+         name_unique: "České Budĕjovice",
+         space_id: 27,
+         socio: 4,
+         stability: 3,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Czechoslovakia",
+         region: "Eastern Europe",
+         box: {
+                 x: 196,
+                 y: 601,
+         },
+         adjacent: [ 26, 28 ],
+         ascii_name: "Ceske Budejovice",
+ },
+ {
+         name_unique: "Praha",
+         space_id: 28,
+         socio: 2,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 2,
+         country: "Czechoslovakia",
+         region: "Eastern Europe",
+         box: {
+                 x: 317,
+                 y: 614,
+         },
+         adjacent: [ 26, 27, 29, 31 ],
+         ascii_name: "Praha",
+ },
+ {
+         name_unique: "Charles University",
+         space_id: 29,
+         socio: 6,
+         stability: 1,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Czechoslovakia",
+         region: "Eastern Europe",
+         box: {
+                 x: 380,
+                 y: 532,
+         },
+         adjacent: [ 28, 30 ],
+         ascii_name: "Charles University",
+ },
+ {
+         name_unique: "Czech Writers",
+         space_id: 30,
+         socio: 5,
+         stability: 2,
+         battleground: 1,
+         demInfl: 2,
+         comInfl: 0,
+         country: "Czechoslovakia",
+         region: "Eastern Europe",
+         box: {
+                 x: 444,
+                 y: 607,
+         },
+         adjacent: [ 29 ],
+         ascii_name: "Czech Writers",
+ },
+ {
+         name_unique: "Brno",
+         space_id: 31,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 1,
+         country: "Czechoslovakia",
+         region: "Eastern Europe",
+         box: {
+                 x: 403,
+                 y: 711,
+         },
+         adjacent: [ 28, 32, 33 ],
+         ascii_name: "Brno",
+ },
+ {
+         name_unique: "Ostrava",
+         space_id: 32,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Czechoslovakia",
+         region: "Eastern Europe",
+         box: {
+                 x: 523,
+                 y: 681,
+         },
+         adjacent: [ 21, 31, 33, 34 ],
+         ascii_name: "Ostrava",
+ },
+ {
+         name_unique: "Bratislava",
+         space_id: 33,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Czechoslovakia",
+         region: "Eastern Europe",
+         box: {
+                 x: 417,
+                 y: 797,
+         },
+         adjacent: [ 31, 32, 34 ],
+         ascii_name: "Bratislava",
+ },
+ {
+         name_unique: "Catholic Church, Czechoslovakia",
+         space_id: 34,
+         socio: 7,
+         stability: 5,
+         battleground: 0,
+         demInfl: 1,
+         comInfl: 0,
+         country: "Czechoslovakia",
+         region: "Eastern Europe",
+         box: {
+                 x: 538,
+                 y: 794,
+         },
+         adjacent: [ 32, 33, 35 ],
+         ascii_name: "Catholic Church, Czechoslovakia",
+ },
+ {
+         name_unique: "Prešov",
+         space_id: 35,
+         socio: 3,
+         stability: 4,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Czechoslovakia",
+         region: "Eastern Europe",
+         box: {
+                 x: 658,
+                 y: 794,
+         },
+         adjacent: [ 34, 36 ],
+         ascii_name: "Presov",
+ },
+ {
+         name_unique: "Košice",
+         space_id: 36,
+         socio: 3,
+         stability: 4,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Czechoslovakia",
+         region: "Eastern Europe",
+         box: {
+                 x: 777,
+                 y: 815,
+         },
+         adjacent: [ 35, 41 ],
+         ascii_name: "Kosice",
+ },
+ {
+         name_unique: "Catholic Church, Hungary",
+         space_id: 37,
+         socio: 7,
+         stability: 5,
+         battleground: 0,
+         demInfl: 1,
+         comInfl: 0,
+         country: "Hungary",
+         region: "Eastern Europe",
+         box: {
+                 x: 314,
+                 y: 886,
+         },
+         adjacent: [ 38, 42 ],
+         ascii_name: "Catholic Church, Hungary",
+ },
+ {
+         name_unique: "Győr",
+         space_id: 38,
+         socio: 4,
+         stability: 3,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Hungary",
+         region: "Eastern Europe",
+         box: {
+                 x: 434,
+                 y: 887,
+         },
+         adjacent: [ 37, 39, 42, 43 ],
+         ascii_name: "Gyor",
+ },
+ {
+         name_unique: "Tatabánya",
+         space_id: 39,
+         socio: 4,
+         stability: 3,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Hungary",
+         region: "Eastern Europe",
+         box: {
+                 x: 549,
+                 y: 886,
+         },
+         adjacent: [ 38, 40, 44 ],
+         ascii_name: "Tatabanya",
+ },
+ {
+         name_unique: "Miskolc",
+         space_id: 40,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Hungary",
+         region: "Eastern Europe",
+         box: {
+                 x: 664,
+                 y: 901,
+         },
+         adjacent: [ 39, 41, 44 ],
+         ascii_name: "Miskolc",
+ },
+ {
+         name_unique: "Debrecen",
+         space_id: 41,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Hungary",
+         region: "Eastern Europe",
+         box: {
+                 x: 781,
+                 y: 938,
+         },
+         adjacent: [ 36, 40 ],
+         ascii_name: "Debrecen",
+ },
+ {
+         name_unique: "Szombathely",
+         space_id: 42,
+         socio: 1,
+         stability: 4,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 1,
+         country: "Hungary",
+         region: "Eastern Europe",
+         box: {
+                 x: 316,
+                 y: 963,
+         },
+         adjacent: [ 37, 38, 43 ],
+         ascii_name: "Szombathely",
+ },
+ {
+         name_unique: "Székesfehérvár",
+         space_id: 43,
+         socio: 4,
+         stability: 3,
+         battleground: 0,
+         demInfl: 1,
+         comInfl: 0,
+         country: "Hungary",
+         region: "Eastern Europe",
+         box: {
+                 x: 442,
+                 y: 962,
+         },
+         adjacent: [ 38, 42, 44 ],
+         ascii_name: "Szekesfehervar",
+ },
+ {
+         name_unique: "Budapest",
+         space_id: 44,
+         socio: 2,
+         stability: 3,
+         battleground: 1,
+         demInfl: 1,
+         comInfl: 0,
+         country: "Hungary",
+         region: "Eastern Europe",
+         box: {
+                 x: 630,
+                 y: 983,
+         },
+         adjacent: [ 39, 40, 43, 46, 47 ],
+         ascii_name: "Budapest",
+ },
+ {
+         name_unique: "Hungarian Writers",
+         space_id: 45,
+         socio: 5,
+         stability: 2,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Hungary",
+         region: "Eastern Europe",
+         box: {
+                 x: 348,
+                 y: 1040,
+         },
+         adjacent: [ 46 ],
+         ascii_name: "Hungarian Writers",
+ },
+ {
+         name_unique: "Eötvös Loránd University",
+         space_id: 46,
+         socio: 6,
+         stability: 1,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Hungary",
+         region: "Eastern Europe",
+         box: {
+                 x: 512,
+                 y: 1034,
+         },
+         adjacent: [ 45, 44 ],
+         ascii_name: "Eotvos Lorand University",
+ },
+ {
+         name_unique: "Szeged",
+         space_id: 47,
+         socio: 3,
+         stability: 4,
+         battleground: 1,
+         demInfl: 1,
+         comInfl: 0,
+         country: "Hungary",
+         region: "Eastern Europe",
+         box: {
+                 x: 632,
+                 y: 1073,
+         },
+         adjacent: [ 44, 48, 49 ],
+         ascii_name: "Szeged",
+ },
+ {
+         name_unique: "Pécs",
+         space_id: 48,
+         socio: 3,
+         stability: 4,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Hungary",
+         region: "Eastern Europe",
+         box: {
+                 x: 486,
+                 y: 1105,
+         },
+         adjacent: [ 47 ],
+         ascii_name: "Pecs",
+ },
+ {
+         name_unique: "Timişoara",
+         space_id: 49,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Romania",
+         region: "Balkans",
+         box: {
+                 x: 597,
+                 y: 1204,
+         },
+         adjacent: [ 47, 50, 59 ],
+         ascii_name: "Timisoara",
+ },
+ {
+         name_unique: "Cluj-Napoca",
+         space_id: 50,
+         socio: 1,
+         stability: 4,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 2,
+         country: "Romania",
+         region: "Balkans",
+         box: {
+                 x: 756,
+                 y: 1125,
+         },
+         adjacent: [ 49, 53, 57, 60 ],
+         ascii_name: "Cluj-Napoca",
+ },
+ {
+         name_unique: "Târgu Mureş",
+         space_id: 51,
+         socio: 3,
+         stability: 4,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Romania",
+         region: "Balkans",
+         box: {
+                 x: 915,
+                 y: 1136,
+         },
+         adjacent: [ 52, 55 ],
+         ascii_name: "Targu Mures",
+ },
+ {
+         name_unique: "Iaşi",
+         space_id: 52,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Romania",
+         region: "Balkans",
+         box: {
+                 x: 1072,
+                 y: 1097,
+         },
+         adjacent: [ 51, 56, 61 ],
+         ascii_name: "Iasi",
+ },
+ {
+         name_unique: "Babeş-Bolyai University",
+         space_id: 53,
+         socio: 6,
+         stability: 1,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Romania",
+         region: "Balkans",
+         box: {
+                 x: 746,
+                 y: 1203,
+         },
+         adjacent: [ 50, 54 ],
+         ascii_name: "Babes-Bolyai University",
+ },
+ {
+         name_unique: "Romanian Writers",
+         space_id: 54,
+         socio: 5,
+         stability: 2,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Romania",
+         region: "Balkans",
+         box: {
+                 x: 739,
+                 y: 1278,
+         },
+         adjacent: [ 53 ],
+         ascii_name: "Romanian Writers",
+ },
+ {
+         name_unique: "Harghita/Covasna",
+         space_id: 55,
+         socio: 8,
+         stability: 4,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Romania",
+         region: "Balkans",
+         box: {
+                 x: 928,
+                 y: 1227,
+         },
+         adjacent: [ 51 ],
+         ascii_name: "Harghita/Covasna",
+ },
+ {
+         name_unique: "Braşov",
+         space_id: 56,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Romania",
+         region: "Balkans",
+         box: {
+                 x: 1049,
+                 y: 1225,
+         },
+         adjacent: [ 52, 58, 60 ],
+         ascii_name: "Brasov",
+ },
+ {
+         name_unique: "Orthodox Church, Romania",
+         space_id: 57,
+         socio: 7,
+         stability: 3,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Romania",
+         region: "Balkans",
+         box: {
+                 x: 855,
+                 y: 1338,
+         },
+         adjacent: [ 50, 59 ],
+         ascii_name: "Orthodox Church, Romania",
+ },
+ {
+         name_unique: "Ploieşti",
+         space_id: 58,
+         socio: 4,
+         stability: 3,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Romania",
+         region: "Balkans",
+         box: {
+                 x: 1061,
+                 y: 1316,
+         },
+         adjacent: [ 56, 60, 61 ],
+         ascii_name: "Ploiesti",
+ },
+ {
+         name_unique: "Craiova",
+         space_id: 59,
+         socio: 3,
+         stability: 4,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Romania",
+         region: "Balkans",
+         box: {
+                 x: 763,
+                 y: 1411,
+         },
+         adjacent: [ 49, 57, 60 ],
+         ascii_name: "Craiova",
+ },
+ {
+         name_unique: "Bucureşti",
+         space_id: 60,
+         socio: 2,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 2,
+         country: "Romania",
+         region: "Balkans",
+         box: {
+                 x: 929,
+                 y: 1445,
+         },
+         adjacent: [ 50, 56, 58, 59, 62 ],
+         ascii_name: "Bucuresti",
+ },
+ {
+         name_unique: "Galaţi",
+         space_id: 61,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Romania",
+         region: "Balkans",
+         box: {
+                 x: 1104,
+                 y: 1399,
+         },
+         adjacent: [ 52, 58, 62 ],
+         ascii_name: "Galati",
+ },
+ {
+         name_unique: "Constanţa",
+         space_id: 62,
+         socio: 4,
+         stability: 3,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Romania",
+         region: "Balkans",
+         box: {
+                 x: 1130,
+                 y: 1517,
+         },
+         adjacent: [ 60, 61, 71 ],
+         ascii_name: "Constanta",
+ },
+ {
+         name_unique: "Pleven",
+         space_id: 63,
+         socio: 3,
+         stability: 4,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Bulgaria",
+         region: "Balkans",
+         box: {
+                 x: 764,
+                 y: 1534,
+         },
+         adjacent: [ 67 ],
+         ascii_name: "Pleven",
+ },
+ {
+         name_unique: "Orthodox Church, Bulgaria",
+         space_id: 64,
+         socio: 7,
+         stability: 3,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Bulgaria",
+         region: "Balkans",
+         box: {
+                 x: 882,
+                 y: 1540,
+         },
+         adjacent: [ 65, 67 ],
+         ascii_name: "Orthodox Church, Bulgaria",
+ },
+ {
+         name_unique: "Ruse",
+         space_id: 65,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Bulgaria",
+         region: "Balkans",
+         box: {
+                 x: 998,
+                 y: 1540,
+         },
+         adjacent: [ 64, 68, 69, 70, 71 ],
+         ascii_name: "Ruse",
+ },
+ {
+         name_unique: "Sofia University",
+         space_id: 66,
+         socio: 6,
+         stability: 1,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Bulgaria",
+         region: "Balkans",
+         box: {
+                 x: 645,
+                 y: 1650,
+         },
+         adjacent: [ 67, 72 ],
+         ascii_name: "Sofia University",
+ },
+ {
+         name_unique: "Sofia",
+         space_id: 67,
+         socio: 2,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 2,
+         country: "Bulgaria",
+         region: "Balkans",
+         box: {
+                 x: 768,
+                 y: 1653,
+         },
+         adjacent: [ 63, 64, 66, 68, 73 ],
+         ascii_name: "Sofia",
+ },
+ {
+         name_unique: "Stara Zagora",
+         space_id: 68,
+         socio: 1,
+         stability: 4,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 1,
+         country: "Bulgaria",
+         region: "Balkans",
+         box: {
+                 x: 886,
+                 y: 1694,
+         },
+         adjacent: [ 65, 67, 70 ],
+         ascii_name: "Stara Zagora",
+ },
+ {
+         name_unique: "Razgrad",
+         space_id: 69,
+         socio: 8,
+         stability: 4,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Bulgaria",
+         region: "Balkans",
+         box: {
+                 x: 954,
+                 y: 1620,
+         },
+         adjacent: [ 65 ],
+         ascii_name: "Razgrad",
+ },
+ {
+         name_unique: "Burgas",
+         space_id: 70,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Bulgaria",
+         region: "Balkans",
+         box: {
+                 x: 1004,
+                 y: 1695,
+         },
+         adjacent: [ 65, 68, 71 ],
+         ascii_name: "Burgas",
+ },
+ {
+         name_unique: "Varna",
+         space_id: 71,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Bulgaria",
+         region: "Balkans",
+         box: {
+                 x: 1086,
+                 y: 1613,
+         },
+         adjacent: [ 62, 65, 70 ],
+         ascii_name: "Varna",
+ },
+ {
+         name_unique: "Bulgarian Writers",
+         space_id: 72,
+         socio: 5,
+         stability: 2,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Bulgaria",
+         region: "Balkans",
+         box: {
+                 x: 652,
+                 y: 1726,
+         },
+         adjacent: [ 66 ],
+         ascii_name: "Bulgarian Writers",
+ },
+ {
+         name_unique: "Plovdiv",
+         space_id: 73,
+         socio: 4,
+         stability: 3,
+         battleground: 1,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Bulgaria",
+         region: "Balkans",
+         box: {
+                 x: 771,
+                 y: 1739,
+         },
+         adjacent: [ 67, 74 ],
+         ascii_name: "Plovdiv",
+ },
+ {
+         name_unique: "Sliven",
+         space_id: 74,
+         socio: 3,
+         stability: 4,
+         battleground: 0,
+         demInfl: 0,
+         comInfl: 0,
+         country: "Bulgaria",
+         region: "Balkans",
+         box: {
+                 x: 894,
+                 y: 1768,
+         },
+         adjacent: [ 73 ],
+         ascii_name: "Sliven",
+ },
+]
+
+const cards = [
+ null,
+ {number: 1, period: 1, side: 'C', name: 'Legacy of Martial Law*', ops: 2, remove: true, playable: true, red: false},
+ {number: 2, period: 1, side: 'D', name: 'Solidarity Legalized*', ops: 4, remove: true, playable: true, red: true},
+ {number: 3, period: 1, side: 'D', name: 'Walesa*', ops: 3, remove: true, playable: false, red: false},
+ {number: 4, period: 1, side: 'D', name: 'Michnik*', ops: 1, remove: true, playable: true, red: false},
+ {number: 5, period: 1, side: 'D', name: 'General Strike*', ops: 3, remove: true, playable: true, red: false},
+ {number: 6, period: 1, side: 'C', name: 'Brought in for Questioning', ops: 3, remove: false, playable: true, red: false},
+ {number: 7, period: 1, side: 'C', name: 'State Run Media*', ops: 2, remove: true, playable: true, red: false},
+ {number: 8, period: 1, side: 'N', name: 'Prudence', ops: 4, remove: false, playable: true, red: false},
+ {number: 9, period: 1, side: 'C', name: 'The Wall*', ops: 1, remove: true, playable: false, red: false},
+ {number: 10, period: 1, side: 'C', name: 'Cult of Personality*', ops: 3, remove: true, playable: true, red: false},
+ {number: 11, period: 1, side: 'C', name: 'Dissident Arrested', ops: 2, remove: false, playable: true, red: false},
+ {number: 12, period: 1, side: 'C', name: 'Apparatchiks*', ops: 2, remove: true, playable: true, red: false},
+ {number: 13, period: 1, side: 'C', name: 'Stasi*', ops: 1, remove: true, playable: true, red: false},
+ {number: 14, period: 1, side: 'N', name: 'Gorbachev Charms the West', ops: 4, remove: false, playable: false, red: false},
+ {number: 15, period: 1, side: 'C', name: 'Honecker*', ops: 3, remove: true, playable: false, red: false},
+ {number: 16, period: 1, side: 'C', name: 'Nomenklatura*', ops: 2, remove: true, playable: true, red: false},
+ {number: 17, period: 1, side: 'D', name: 'Roundtable Talks', ops: 3, remove: false, playable: true, red: false},
+ {number: 18, period: 1, side: 'C', name: 'Poszgay Defends the Revolution*', ops: 2, remove: true, playable: true, red: false},
+ {number: 19, period: 1, side: 'D', name: 'Papal Visit*', ops: 2, remove: true, playable: true, red: false},
+ {number: 20, period: 1, side: 'C', name: 'Deutsche Marks*', ops: 4, remove: true, playable: true, red: false},
+ {number: 21, period: 1, side: 'N', name: 'Common European Home', ops: 2, remove: false, playable: true, red: false},
+ {number: 22, period: 1, side: 'N', name: 'Power Struggle - Poland', ops: 0, remove: false, playable: true, red: false},
+ {number: 23, period: 1, side: 'N', name: 'Power Struggle - Hungary', ops: 0, remove: false, playable: true, red: false},
+ {number: 24, period: 1, side: 'D', name: 'St. Nicholas Church*', ops: 1, remove: true, playable: true, red: true},
+ {number: 25, period: 1, side: 'C', name: 'Perestroika*', ops: 3, remove: true, playable: true, red: false},
+ {number: 26, period: 1, side: 'D', name: 'Helsinki Final Act*', ops: 1, remove: true, playable: true, red: true},
+ {number: 27, period: 1, side: 'D', name: 'Consumerism', ops: 3, remove: false, playable: true, red: false},
+ {number: 28, period: 1, side: 'C', name: 'Factory Party Cells', ops: 3, remove: false, playable: true, red: false},
+ {number: 29, period: 1, side: 'D', name: 'Jan Palach Week*', ops: 1, remove: true, playable: true, red: false},
+ {number: 30, period: 1, side: 'C', name: 'Tear Gas*', ops: 1, remove: true, playable: true, red: false},
+ {number: 31, period: 1, side: 'D', name: 'Intelligentsia', ops: 2, remove: false, playable: true, red: false},
+ {number: 32, period: 1, side: 'C', name: 'Peasant Parties*', ops: 2, remove: true, playable: true, red: false},
+ {number: 33, period: 1, side: 'D', name: 'Sajudis*', ops: 2, remove: true, playable: true, red: true},
+ {number: 34, period: 1, side: 'D', name: 'Fidesz*', ops: 2, remove: true, playable: true, red: false},
+ {number: 35, period: 1, side: 'C', name: 'Heal Our Bleeding Wound*', ops: 3, remove: true, playable: true, red: false},
+ {number: 36, period: 1, side: 'D', name: 'Dash for the West*', ops: 3, remove: true, playable: true, red: false},
+ {number: 37, period: 1, side: 'C', name: 'Nagy Reburied*', ops: 3, remove: true, playable: true, red: false},
+ {number: 38, period: 1, side: 'C', name: 'The July Concept*', ops: 3, remove: true, playable: true, red: false},
+ {number: 39, period: 1, side: 'D', name: 'Eco-Glasnost*', ops: 2, remove: true, playable: true, red: false},
+ {number: 40, period: 1, side: 'D', name: 'Hungarian Democratic Forum*', ops: 3, remove: true, playable: true, red: false},
+ {number: 41, period: 2, side: 'C', name: 'Ceausescu*', ops: 3, remove: true, playable: true, red: false},
+ {number: 42, period: 2, side: 'N', name: 'Power Struggle - East Germany', ops: 0, remove: false, playable: true, red: false},
+ {number: 43, period: 2, side: 'N', name: 'Power Struggle - Bulgaria', ops: 0, remove: false, playable: true, red: false},
+ {number: 44, period: 2, side: 'N', name: 'Inflationary Currency*', ops: 3, remove: true, playable: true, red: false},
+ {number: 45, period: 2, side: 'D', name: 'Soviet Troop Withdrawals*', ops: 4, remove: true, playable: true, red: false},
+ {number: 46, period: 2, side: 'D', name: 'Goodbye Lenin!*', ops: 3, remove: true, playable: true, red: false},
+ {number: 47, period: 2, side: 'C', name: 'Bulgarian Turks Expelled*', ops: 3, remove: true, playable: true, red: false},
+ {number: 48, period: 2, side: 'D', name: '\"We are the People!\"', ops: 3, remove: true, playable: true, red: false},
+ {number: 49, period: 2, side: 'D', name: 'Foreign Currency Debt Burden', ops: 1, remove: true, playable: true, red: false},
+ {number: 50, period: 2, side: 'D', name: 'The Sinatra Doctrine*', ops: 3, remove: true, playable: true, red: false},
+ {number: 51, period: 2, side: 'C', name: '40th Anniversary Celebration*', ops: 2, remove: true, playable: true, red: false},
+ {number: 52, period: 2, side: 'C', name: 'Normalization*', ops: 3, remove: true, playable: true, red: false},
+ {number: 53, period: 2, side: 'C', name: 'Li Peng*', ops: 2, remove: true, playable: true, red: false},
+ {number: 54, period: 2, side: 'D', name: 'The Crowd Turns Against Ceausescu*', ops: 3, remove: true, playable: true, red: true},
+ {number: 55, period: 2, side: 'N', name: 'Power Struggle - Czechoslovakia', ops: 0, remove: false, playable: true, red: false},
+ {number: 56, period: 2, side: 'D', name: 'Foreign Television*', ops: 2, remove: true, playable: true, red: false},
+ {number: 57, period: 2, side: 'C', name: 'Central Committee Reshuffle*', ops: 2, remove: true, playable: true, red: false},
+ {number: 58, period: 2, side: 'D', name: 'Austria-Hungary Border Reopened*', ops: 2, remove: true, playable: true, red: false},
+ {number: 59, period: 2, side: 'C', name: 'Grenztruppen*', ops: 2, remove: true, playable: true, red: false},
+ {number: 60, period: 2, side: 'D', name: 'Toxic Waste*', ops: 2, remove: true, playable: true, red: false},
+ {number: 61, period: 2, side: 'D', name: 'The Monday Demonstrations*', ops: 4, remove: true, playable: false, red: false},
+ {number: 62, period: 2, side: 'D', name: 'Yakovlev Counsels Gorbachev*', ops: 2, remove: true, playable: true, red: false},
+ {number: 63, period: 2, side: 'D', name: 'Genscher*', ops: 2, remove: true, playable: true, red: false},
+ {number: 64, period: 2, side: 'D', name: 'Legacy of 1968*', ops: 4, remove: true, playable: true, red: false},
+ {number: 65, period: 2, side: 'D', name: 'Presidential Visit*', ops: 3, remove: true, playable: true, red: false},
+ {number: 66, period: 2, side: 'D', name: 'New Forum*', ops: 1, remove: true, playable: true, red: false},
+ {number: 67, period: 2, side: 'N', name: 'Reformer Rehabilitated*', ops: 2, remove: true, playable: false, red: false},
+ {number: 68, period: 2, side: 'D', name: 'Klaus and Komarek*', ops: 3, remove: true, playable: true, red: false},
+ {number: 69, period: 2, side: 'C', name: 'Systematization*', ops: 3, remove: true, playable: true, red: false},
+ {number: 70, period: 2, side: 'C', name: 'Securitate*', ops: 2, remove: true, playable: true, red: false},
+ {number: 71, period: 2, side: 'D', name: 'Kiss of Death*', ops: 3, remove: true, playable: true, red: false},
+ {number: 72, period: 2, side: 'D', name: 'Peasant Parties Revolt*', ops: 3, remove: true, playable: true, red: false},
+ {number: 73, period: 2, side: 'D', name: 'Laszlo Tokes*', ops: 2, remove: true, playable: true, red: true},
+ {number: 74, period: 2, side: 'D', name: 'FRG Embassies*', ops: 3, remove: true, playable: true, red: false},
+ {number: 75, period: 2, side: 'D', name: 'Exit Visas*', ops: 3, remove: true, playable: true, red: false},
+ {number: 76, period: 2, side: 'C', name: 'Warsaw Pact Summit*', ops: 2, remove: true, playable: true, red: false},
+ {number: 77, period: 2, side: 'D', name: 'Samizdat*', ops: 1, remove: true, playable: true, red: false},
+ {number: 78, period: 2, side: 'N', name: 'Workers Revolt', ops: 2, remove: false, playable: true, red: false},
+ {number: 79, period: 2, side: 'C', name: 'The Third Way*', ops: 2, remove: true, playable: true, red: false},
+ {number: 80, period: 2, side: 'C', name: 'Nepotism*', ops: 3, remove: true, playable: true, red: false},
+ {number: 81, period: 2, side: 'D', name: 'The Baltic Way*', ops: 3, remove: true, playable: false, red: true},
+ {number: 82, period: 3, side: 'C', name: 'Spitzel*', ops: 1, remove: true, playable: true, red: false},
+ {number: 83, period: 3, side: 'C', name: 'Modrow*', ops: 2, remove: true, playable: true, red: false},
+ {number: 84, period: 3, side: 'D', name: 'Breakaway Baltic Republics*', ops: 4, remove: true, playable: false, red: true},
+ {number: 85, period: 3, side: 'N', name: 'Tank Column/Tank Man*', ops: 2, remove: true, playable: true, red: false},
+ {number: 86, period: 3, side: 'D', name: '\"The Wall Must Go!\"*', ops: 3, remove: true, playable: true, red: false},
+ {number: 87, period: 3, side: 'D', name: 'Kohl Proposes Reunification*', ops: 3, remove: true, playable: true, red: false},
+ {number: 88, period: 3, side: 'C', name: 'Adamec*', ops: 2, remove: true, playable: true, red: false},
+ {number: 89, period: 3, side: 'D', name: 'Domino Theory*', ops: 3, remove: true, playable: true, red: false},
+ {number: 90, period: 3, side: 'D', name: 'Civic Forum*', ops: 4, remove: true, playable: true, red: false},
+ {number: 91, period: 3, side: 'D', name: 'My First Banana*', ops: 3, remove: true, playable: true, red: false},
+ {number: 92, period: 3, side: 'C', name: 'Betrayal*', ops: 3, remove: true, playable: true, red: false},
+ {number: 93, period: 3, side: 'D', name: 'Shock Therapy*', ops: 3, remove: true, playable: true, red: false},
+ {number: 94, period: 3, side: 'D', name: 'Union of Democratic Forces*', ops: 4, remove: true, playable: true, red: false},
+ {number: 95, period: 3, side: 'N', name: 'Power Struggle - Romania', ops: 0, remove: false, playable: true, red: false},
+ {number: 96, period: 3, side: 'C', name: 'The Chinese Solution*', ops: 1, remove: true, playable: false, red: false},
+ {number: 97, period: 3, side: 'D', name: 'The Tyrant is Gone*', ops: 2, remove: true, playable: false, red: false},
+ {number: 98, period: 3, side: 'C', name: 'Politburo Intrigue*', ops: 2, remove: true, playable: true, red: false},
+ {number: 99, period: 3, side: 'C', name: 'Ligachev*', ops: 3, remove: true, playable: true, red: false},
+ {number: 100, period: 3, side: 'N', name: 'Stand Fast*', ops: 3, remove: true, playable: true, red: false},
+ {number: 101, period: 3, side: 'C', name: 'Elena*', ops: 1, remove: true, playable: true, red: false},
+ {number: 102, period: 3, side: 'C', name: 'National Salvation Front*', ops: 3, remove: true, playable: true, red: false},
+ {number: 103, period: 3, side: 'D', name: 'Government Resigns*', ops: 1, remove: true, playable: true, red: false},
+ {number: 104, period: 3, side: 'C', name: 'New Year\'s Eve Party*', ops: 2, remove: true, playable: true, red: false},
+ {number: 105, period: 3, side: 'D', name: 'Public Against Violence*', ops: 3, remove: true, playable: true, red: false},
+ {number: 106, period: 3, side: 'C', name: 'Social Democratic Platform Adopted*', ops: 3, remove: true, playable: true, red: false},
+ {number: 107, period: 3, side: 'C', name: 'Massacre in Timisoara*', ops: 3, remove: true, playable: false, red: false},
+ {number: 108, period: 3, side: 'D', name: 'Army Backs Revolution*', ops: 3, remove: true, playable: true, red: false},
+ {number: 109, period: 3, side: 'C', name: 'Kremlin Coup!*', ops: 3, remove: true, playable: false, red: false},
+ {number: 110, period: 3, side: 'D', name: 'Malta Summit*', ops: 3, remove: true, playable: false, red: false},
+]
+
+const power_cards = [
+ null,
+ { number: 1, name: "Rally in the Square", value: 1, socio: 0 },
+ { number: 2, name: "Rally in the Square", value: 1, socio: 0 },
+ { number: 3, name: "Rally in the Square", value: 1, socio: 0 },
+ { number: 4, name: "Rally in the Square", value: 1, socio: 0 },
+ { number: 5, name: "Rally in the Square", value: 1, socio: 0 },
+ { number: 6, name: "Rally in the Square", value: 1, socio: 0 },
+ { number: 7, name: "Strike", value: 6, socio: 0 },
+ { number: 8, name: "Strike", value: 6, socio: 0 },
+ { number: 9, name: "Strike", value: 5, socio: 0 },
+ { number: 10, name: "Strike", value: 5, socio: 0 },
+ { number: 11, name: "Strike", value: 4, socio: 0 },
+ { number: 12, name: "Strike", value: 4, socio: 0 },
+ { number: 13, name: "Strike", value: 4, socio: 0 },
+ { number: 18, name: "Strike", value: 4, socio: 0 },
+ { number: 14, name: "Strike", value: 3, socio: 0 },
+ { number: 15, name: "Strike", value: 3, socio: 0 },
+ { number: 16, name: "Strike", value: 3, socio: 0 },
+ { number: 17, name: "Strike", value: 3, socio: 0 },
+ { number: 19, name: "March", value: 6, socio: 0 },
+ { number: 20, name: "March", value: 6, socio: 0 },
+ { number: 21, name: "March", value: 5, socio: 0 },
+ { number: 22, name: "March", value: 5, socio: 0 },
+ { number: 23, name: "March", value: 4, socio: 0 },
+ { number: 24, name: "March", value: 4, socio: 0 },
+ { number: 25, name: "March", value: 4, socio: 0 },
+ { number: 26, name: "March", value: 4, socio: 0 },
+ { number: 27, name: "March", value: 3, socio: 0 },
+ { number: 28, name: "March", value: 3, socio: 0 },
+ { number: 29, name: "March", value: 3, socio: 0 },
+ { number: 30, name: "March", value: 3, socio: 0 },
+ { number: 31, name: "Petition", value: 6, socio: 0 },
+ { number: 32, name: "Petition", value: 6, socio: 0 },
+ { number: 33, name: "Petition", value: 6, socio: 0 },
+ { number: 34, name: "Petition", value: 5, socio: 0 },
+ { number: 35, name: "Petition", value: 5, socio: 0 },
+ { number: 36, name: "Petition", value: 5, socio: 0 },
+ { number: 37, name: "Intellectual Leader", value: 3, socio: 5 },
+ { number: 38, name: "Intellectual Leader", value: 3, socio: 5 },
+ { number: 39, name: "Intellectual Leader", value: 3, socio: 5 },
+ { number: 40, name: "Intellectual Leader", value: 3, socio: 5 },
+ { number: 41, name: "Elite Leader", value: 3, socio: 1 },
+ { number: 42, name: "Elite Leader", value: 3, socio: 1 },
+ { number: 43, name: "Elite Leader", value: 3, socio: 1 },
+ { number: 44, name: "Elite Leader", value: 3, socio: 1 },
+ { number: 45, name: "Worker Leader", value: 3, socio: 4 },
+ { number: 46, name: "Worker Leader", value: 3, socio: 4 },
+ { number: 47, name: "Student Leader", value: 3, socio: 6 },
+ { number: 48, name: "Church Leader", value: 3, socio: 7 },
+ { number: 49, name: "Support Falters", value: 0, socio: 0 },
+ { number: 50, name: "Support Surges", value: 0, socio: 0 },
+ { number: 51, name: "Scare Tactics", value: 0, socio: 0 },
+ { number: 52, name: "Tactic Fails", value: 0, socio: 0 },
+]
+
+if (typeof module !== 'undefined') module.exports = { spaces, cards, power_cards }
diff --git a/events.txt b/events.txt
index 5855621..5823e7d 100644
--- a/events.txt
+++ b/events.txt
@@ -1,13 +1,13 @@
CARD 1 - Legacy of Martial Law*
# Replace 1 Democratic SP with a Communist SP in Poland and make a Support Check using the Ops value of this card in Poland.
+permanently_remove
valid_spaces_country_opp 'Poland'
prompt 'replace 1 Democratic SP in Poland with a Communist SP'
legacy_of_martial_law
valid_spaces_country_sc 'Poland'
prompt 'make a Support Check in Poland'
1_support_check
-permanently_remove
CARD 2 - Solidarity Legalised*
@@ -16,26 +16,25 @@ solidarity_legalised
valid_spaces_solidarity_legalised
prompt 'to every uncontrolled Worker and Farmer space in Poland'
add_limited_infl 9 1
-permanently_remove
CARD 3 - Walesa
# Place a total of 4 SPs in any spaces(s) in Poland. The Democratic Player may then may Support Checks in Poland using the Ops value of this card. Requires Solidarity Legalized* to be played as event.
+permanently_remove
valid_spaces_country 'Poland'
prompt 'any space(s) in Poland'
add_infl_free 4
valid_spaces_country_sc 'Poland'
-prompt 'Make Support Checks in Poland'
+prompt 'make Support Checks in Poland'
support_check 2
-permanently_remove
CARD 4 - Michnik
# Place 3 Democratic SPs in the Polish Intellectuals space.
-valid_spaces 26
+permanently_remove
+valid_spaces 'Polish Writers'
prompt 'the Polish Intellectuals space'
add_x_infl 3
-permanently_remove
CARD 5 - General strike
@@ -45,14 +44,16 @@ general_strike
CARD 6 - Brought in for Questioning
# The Democratic Player must randomly discard a card. If it is a Communist event it takes place immediately.
+if !is_auto_resolve(C_BROUGHT_IN_FOR_QUESTIONING)
brought_in_for_questioning
+endif
CARD 7 - State Run Media*
# Remove four Democratic SPs, no more than 2 per space.
+permanently_remove
valid_spaces_opponent
remove_limited_opp_infl 4 2
-permanently_remove
CARD 8 - Prudence
@@ -63,38 +64,40 @@ prudence
CARD 9 - The Wall*
# Place in front of the Communist Player. In his next Support Check in Germany cancel drm for any adjacent spaces controlled by the Democratic Player.
the_wall
-permanently_remove
CARD 10 - Cult of Personality
# Place 4 Communist SPs in Worker or Farmer spaces in Romania, no more than 2 per space.
-if !game.the_tyrant_is_gone
+permanently_remove
+if !game.persistent_events.includes(THE_TYRANT_IS_GONE_OCCURRED)
valid_spaces_country_socio_2 'Romania', 3, 4
prompt 'Worker or Farmer spaces in Romania, no more than 2 per space'
add_limited_infl 4 2
+else
+tyrant_block
endif
-permanently_remove
CARD 11 - Dissident arrested
# Remove 2 Democratic SPs from any Intellectuals space.
+if !is_auto_resolve(C_DISSIDENT_ARRESTED)
valid_spaces_opponent_socio 5
prompt 'any Intellectuals space'
remove_x_opp_infl 2
+endif
CARD 12 - Apparatchicks
# Place 3 Communist SPs in any Bureaucratic space(s).
+permanently_remove
valid_spaces_socio 2
prompt ' to any Bureaucratic space(s)'
add_infl_free 3
-permanently_remove
CARD 13 - Stasi
# For the rest this turn the Democratic Player must reveal the card he will play this action round before the Communist plays his card.
stasi
-permanently_remove
CARD 14 - Gorbachev Charms the West
@@ -108,14 +111,13 @@ prompt 'select a space for the Support Check'
CARD 15 - Honecker
# The Communist Player may take any non-Power Struggle - card in the discard pile and put it in his hand. The Communist Player may take one extra action round this turn. May not be played as event after Modrow*.
-permanently_remove
honecker
CARD 16 - Nomenklatura*
# Place 3 SPs in any Elite space(s), or remove all Democratic SPs from Elite spaces.
-nomenklatura
permanently_remove
+nomenklatura
CARD 17 - Roundtable talks
@@ -125,24 +127,26 @@ roundtable_talks
CARD 18 - Poszgay Defends the Revolution
# Place Communist SPs in 4 spaces in Hungary not under Democratic control.
+permanently_remove
poszgay
prompt 'to 4 spaces in Hungary not under Democratic control'
add_limited_infl 4 1
-permanently_remove
CARD 19 - Papal vist
# Place 3 SPs in any Catholic Church space.
-valid_spaces 20 35 38
+permanently_remove
+valid_spaces 'Catholic Church, Poland', 'Catholic Church, Czechoslovakia', 'Catholic Church, Hungary'
prompt 'any Catholic Church space'
add_x_infl 3
-permanently_remove
CARD 20 - Deutsche Marks*
# Democratic Player gives the Communist Player his highest Ops value card. If a Communist event it takes place immediately, otherwise use the Ops value of the card without triggering the event.
permanently_remove
+if !is_auto_resolve(C_DEUTSCHE_MARKS)
deutsche_marks
+endif
CARD 21 - Common European Home
@@ -162,9 +166,11 @@ power_struggle
CARD 24 - St Nicolas Church
# Place sufficient Democratic SPs in the Lutheran Church space for Democratic control. Allows play of The Monday Demonstrations.
-valid_spaces 6
+if !check_dem_control(S_LUTHERAN_CHURCH)
+valid_spaces 'Lutheran Church'
prompt 'the Lutheran Church'
take_control_prep 1
+endif
st_nicholas_church
@@ -176,7 +182,6 @@ perestroika
CARD 26 - Helsinki Final Act*
# +1 VP for every Support Check die roll by the Communist Player in Student or Intellectual spaces the rest of the game.
helsinki_final_act
-permanently_remove
CARD 27 - Consumerism
@@ -199,10 +204,10 @@ remove_limited_opp_infl 3 2
CARD 29 - Jan Palach Week*
# Place 6 Democratic SPs in the Charles University space.
-valid_spaces 30
+permanently_remove
+valid_spaces 'Charles University'
prompt 'the Charles University space'
add_x_infl 6
-permanently_remove
CARD 30 - Tear Gas
@@ -212,72 +217,74 @@ tear_gas
CARD 31 - Intelligentsia
# Place 4 Democratic SPs in Intellectual spaces, no more than 2 per space.
-valid_spaces 4 26 31 46 55 73
+valid_spaces_socio 5
prompt 'Intellectual spaces, no more than 2 per space'
add_limited_infl 4 2
CARD 32 - Peasant Parties*
# Place 4 Communist SPs in Farmer spaces, no more than 2 per space.
+permanently_remove
valid_spaces_socio 3
prompt 'Farmer spaces, no more than 2 per space'
add_limited_infl 4 2
-permanently_remove
CARD 33 - Sajudis*
# +1 VP. Reduce USSR stability by 1. Place sufficient Democratic support in any Minorities space for control. Allows play of The Baltic Way.
+permanently_remove
+sajudis
+if !is_auto_resolve(C_SAJUDIS)
sajudis_check
prompt 'any Minorities space'
take_control_prep 1
-sajudis
-permanently_remove
+endif
+
CARD 34 - Fidesz*
# Place 5 Democratic SPs in Hungary Student space.
-valid_spaces 47
+permanently_remove
+valid_spaces 'Eotvos Lorand University'
prompt 'the Hungary students space'
add_x_infl 5
-permanently_remove
CARD 35 - Heal our Bleeding Wounds*
# If played in Early Year, -3 VPs. If played in Mid Year, -1 VP. If played in Late Year, +3 VPs.
-heal_our_bleeding_wounds
permanently_remove
+heal_our_bleeding_wounds
CARD 36 - Dash for the West*
# Roll a die. If the die roll exceeds the number of Communist controlled spaces in Germany, +1 VP and select any Blue Event with asterisk(*) from the discard pile. The event occurs immediately.
permanently_remove
-prompt 'Dash for the West: select any Democratic event with an asterix(*) from the discard pile. Event occurs immediately'
+prompt 'Dash for the West: select any Democratic Event with an asterix(*) from the discard pile. Event occurs immediately'
dash_for_the_west
-
CARD 37 - Nagy Reburied*
# Remove all Communist SPs from the Hungary Elite space. Then place 4 Communist SPs in Hungary, no more than 2 per space.
+permanently_remove
nagy_reburied
prompt 'the Hungary Elite space'
remove_all_infl 1
valid_spaces_country 'Hungary'
prompt 'Hungary, no more than 2 per space'
add_limited_infl 4 2
-permanently_remove
CARD 38 - July Concept
# Place 3 Communist SPs in Bulgaria
+permanently_remove
valid_spaces_country 'Bulgaria'
prompt 'Bulgaria'
add_infl_free 3
-permanently_remove
CARD 39 - Eco-Glasnost*
# Place 4 Democratic SPs in Ruse.
-valid_spaces 66
+valid_spaces 'Ruse'
prompt 'Ruse'
add_x_infl 4
eco_glasnost
@@ -285,18 +292,22 @@ eco_glasnost
CARD 40 - Hungarian Democratic Forum
# Place 3 Democratic SPs in Hungary and make one Support Check in Hungary.
+permanently_remove
valid_spaces_country 'Hungary'
prompt 'Hungary'
add_infl_free 3
valid_spaces_country_sc 'Hungary'
prompt 'make a Support Check in Hungary'
1_support_check
-permanently_remove
CARD 41 - Ceausescu*
# Remove 3 Democratic SPs in Romania and make a Support Check in Romania using the Ops value of this card. If the Democratic Player has any SPs in spaces adjacent to Cluj at the end of this action round remove 1 Communist SP from Bucharest. May not be played as an event after The Tyrant is Gone.
-if !game.the_tyrant_is_gone
+permanently_remove
+if game.persistent_events.includes(THE_TYRANT_IS_GONE_OCCURRED)
+tyrant_block
+else
+if !is_auto_resolve(C_CEAUSESCU)
valid_spaces_country_opp 'Romania'
prompt ' from Romania'
remove_opp_infl 3
@@ -306,7 +317,6 @@ prompt 'make a support check in Romania'
prompt ' from Bucharesti'
ceausescu
endif
-permanently_remove
CARD 42 - Power Struggle - East Germany
@@ -321,6 +331,7 @@ power_struggle
CARD 44 - Inflationary Currency
# Target any Country where your opponent has Power. Place 2 SPs and make 1 Support Check in the Country using the Ops value of this card. Your opponent may cancel the Support Check by discarding a 3 Ops value card.
+permanently_remove
inflationary_currency
valid_spaces_country_opp
prompt ()=>` from ${country_name(game.vm_active_country)}`
@@ -331,71 +342,74 @@ valid_spaces_country_sc
prompt `make a Support Check in ${country_name(game.vm_active_country)}`
1_support_check
endif
-permanently_remove
CARD 45 - Soviet Troop Withdrawals*
# The Democratic Player may remove 5 Communist SPs from Eastern Europe, no more than 2 per space.
+permanently_remove
valid_spaces_region_opp 'Eastern Europe'
prompt ' from Eastern Europe'
remove_limited_opp_infl 5 2
-permanently_remove
CARD 46 - Goodbye Lenin!*
# The Communist Player must reveal all his events with title written in red. The Democrat may exchange this card for any of them with the event occurring immediately, or he may play this card for Operations.
-goodbye_lenin
permanently_remove
+goodbye_lenin
CARD 47 - Bulgarian Turks Expelled*
# -2 VP. Remove any Democratic SPs in Razgrad.
+permanently_remove
bulgarian_turks_expelled
+if !is_auto_resolve(C_BULGARIAN_TURKS_EXPELLED)
+valid_spaces 'Razgrad'
prompt 'Razgrad'
remove_all_infl 1
-permanently_remove
+endif
CARD 48 - We are the People!*
# The Democrat can move up to 4 SPs from the Lutheran Church space to any spaces in Germany, no more than 2 per space. The Communist may no longer make Support Checks in Leipzig.
+if !is_auto_resolve(C_WE_ARE_THE_PEOPLE)
we_are_the_people
-permanently_remove
+endif
CARD 49 - Foreign Currency Debt Burden*
# The Democrat designates 1 country in Eastern Europe. For the rest of this turn the Communist has a -2 modifier for support checks in this country.
foreign_currency_debt_burden
-permanently_remove
+logi `Communist cannot make Support Checks in ${country_name(game.foreign_currency_debt_burden)} for the rest of the turn`
CARD 50 - The Sinatra Doctrine*
# +1 Ops value for cards played by the Democratic Player the rest of this turn.
the_sinatra_doctrine
-permanently_remove
CARD 51 - 40th Anniversary Celebration*
# Place 2 Communist SPs in Germany. If Communist is ahead add 4 SPs. Then subtract 1 VP.
+permanently_remove
40th_anniversary_celebration
valid_spaces_country 'East_Germany'
prompt 'East Germany'
add_infl_free
40th_anniversary_celebration_vp
-permanently_remove
-CARD 52 - Normalisation
+CARD 52 - Normalization
# Remove all Democratic SPs from the Czechoslovakia Elite and Bureaucrat Spaces.
-normalisation
+permanently_remove
+if !is_auto_resolve(C_NORMALIZATION)
+normalization
prompt 'the Czechoslovakia Elite and Bureaucrat Spaces'
remove_all_infl 2
-permanently_remove
+endif
CARD 53 - Li Peng*
# +1 modifier to all Communist Tiananmen Square track attempts for the rest of the game
li_peng
-permanently_remove
CARD 54 - The Crowd Turns Against Ceausescu*
@@ -410,17 +424,17 @@ power_struggle
CARD 56 - Foreign Television
# Remove 4 Communist SPs no more than 2 per space.
+permanently_remove
foreign_television
remove_limited_opp_infl 4 2
-permanently_remove
CARD 57 - Central Committee Reshuffle*
# Place 3 Communist SPs in any Country where the Communist holds Power.
+permanently_remove
central_committee_reshuffle
prompt `${country_name(game.vm_active_country)}`
add_infl_free 3
-permanently_remove
CARD 58 - Austria-Hungary Border Reopened*
@@ -428,28 +442,28 @@ CARD 58 - Austria-Hungary Border Reopened*
austria_hungary_border_reopened
-CARD 59 - GrenzTruppen*
+CARD 59 - Grenztruppen*
# -1 modifier for Democratic Support Checks in East Germany the rest of this turn.
grenztruppen
CARD 60 - Toxic Waste*
# Add 3 Democratic SPs in any Worker space(s).
+permanently_remove
valid_spaces_socio 4
prompt 'any Worker space(s)'
add_infl_free 3
-permanently_remove
CARD 61 - The Monday Demonstrations*
# Place sufficient SPs in the Lutheran Church Space and Leipzig for Democratic control. Then the Democratic Player may make FIVE support checks in Germany using the Ops value of this card. Requires play of St. Nicholas Church as an event.
+permanently_remove
the_monday_demonstrations
prompt 'the Lutheran Church Space and Leipzig'
take_control_prep 2
valid_spaces_country_sc 'East_Germany'
prompt 'make 5 Support Checks in East Germany'
support_check 5
-permanently_remove
CARD 62 - Yakovlev Counsels Gorbachev*
@@ -464,24 +478,23 @@ genscher
CARD 64 - Legacy of 1968*
# The Democratic Player may place 1 SP in all spaces in Czechoslovakia not controlled by the Communist Player
+permanently_remove
legacy_of_1968
prompt 'all spaces in Czechoslovakia not controlled by the Communist Player'
add_limited_infl 11 1
-permanently_remove
CARD 65 - Presidential Visit*
# The Communist's hand size is reduced to 7 next turn.
presidential_visit
-permanently_remove
CARD 66 - New Forum
# Place a Democratic SP in 3 spaces in Germany
+permanently_remove
valid_spaces_country 'East_Germany'
prompt '3 spaces in East Germany'
add_limited_infl 3 1
-permanently_remove
CARD 67 - Reformer Rehabilitated*
@@ -492,30 +505,39 @@ reformer_rehabilitated
CARD 68 - Klaus and Komarek*
# Remove 2 Communist SPs and add 2 Democratic SPs in Prague.
+permanently_remove
klaus_and_komarek
prompt 'Prague'
remove_x_opp_infl 2
-valid_spaces 29
+valid_spaces 'Praha'
add_x_infl 2
-permanently_remove
CARD 69 - Systematization*
# The Communist player may eliminate 1 space in Romania. Any Democratic SPs are eliminated. Communist SPs are relocated to Bucharest. The connections to the destroyed space are considered to pass through and connect the adjacent spaces directly.
+if !game.persistent_events.includes(THE_TYRANT_IS_GONE_OCCURRED)
valid_spaces_country 'Romania'
systematization
-permanently_remove
+else
+tyrant_block
+endif
CARD 70 - Securitate*
# The Democrat must reveal his battlecards at the start of the Power Struggles in Romania. This event remains in effect until cancelled by Army Backs the Revolution event.
+if !game.persistent_events.includes(C_ARMY_BACKS_REVOLUTION)
securitate
+else
+army_block
+endif
CARD 71 - Kiss of Death*
# The Communist Player must randomly discard a card. If it is neutral or Democratic it takes place immediately.
permanently_remove
+if !is_auto_resolve(C_KISS_OF_DEATH)
kiss_of_death
+endif
CARD 72 - Peasant Parties Revolt
@@ -525,7 +547,7 @@ peasant_parties_revolt
CARD 73 - Laszlo Tokes*
# Place 1 Democratic SP in Timisoara and Harghita/Covasna. The Democratic may then place SPs or make Support Check rolls in Romania using the Ops value of this card. Allows play of Massacre in Timisoara.
-valid_spaces 50 56
+valid_spaces 'Timisoara', 'Harghita/Covasna'
prompt 'in Timisoara and Harghita/Covasna'
add_limited_infl 2 1
laszlo_tokes
@@ -536,8 +558,6 @@ else
prompt 'make 2 Support Checks in Romania'
support_check 2
endif
-permanently_remove
-
CARD 74 - FRG Embassies
@@ -547,28 +567,32 @@ frg_embassies
CARD 75 - Exit Visas*
# The Democratic Player may discard any cards in his hand and draw new cards from the deck.
-exit_visas
permanently_remove
+if !is_auto_resolve(C_EXIT_VISAS)
+exit_visas
+endif
CARD 76 - Warsaw Pact Summit
# The Warsaw Pact holds a summit in Bucharest. The Communist player chooses who dominates the summit, the hardliners or the reformers. The Communist may either make 2 Support Checks with a +2 drm against Student and intellectual spaces, or place 4 SPs in spaces with no influence that are not controlled by the Democratic player.
+permanently_remove
warsaw_pact_summit
if game.phase === 3
prompt ' spaces with no Democratic SPs'
add_infl_free 4
else
prompt 'Select a Student or Intellectual space'
-valid_spaces_country_socio_2 3, 4
+valid_spaces_country_socio_2 3 4
support_check_modified 2 2
endif
-permanently_remove
CARD 77 - Samizdat
# The Democratic Player can put a card in his hand aside for next turn and draw a replacement card from the deck.
-samizdat
permanently_remove
+if !is_auto_resolve(C_SAMIZDAT)
+samizdat
+endif
CARD 78 - Workers Revolt
@@ -578,95 +602,109 @@ workers_revolt
CARD 79 - The Third Way*
# -2 VP. Place 3 Communist SPs in the German writers space.
+permanently_remove
the_third_way
-valid_spaces 4
+valid_spaces 'German Writers'
prompt 'the East German Writers space'
add_x_infl 3
-permanently_remove
CARD 80 - Nepotism*
# Roll a die. 1-2: Place 4 Communist SPs in Worker spaces in the Balkans. 3-4: add 3 SPs in Worker spaces in the Balkans. 5-6: add 1 SP to a Worker space in the Balkans.
+permanently_remove
nepotism
valid_spaces_region_socio 'Balkans', 4
prompt 'Worker spaces in the Balkans'
add_infl_free
-permanently_remove
CARD 81 - The Baltic Way*
# +2 VP. Reduce USSR stability by 1. Place sufficient Democratic SPs in any Minorities space for control. .Requires play of Sajudis. Allows play of Breakaway Baltic Republics.
+permanently_remove
+the_baltic_way_prep
+if !is_auto_resolve(C_THE_BALTIC_WAY)
the_baltic_way
prompt 'any Minorities space'
take_control_prep 1
-permanently_remove
+endif
CARD 82 - Spitzel*
# Remove 2 Democratic SPs in Germany.
+permanently_remove
+if !is_auto_resolve(C_SPITZEL)
valid_spaces_country_opp 'East_Germany'
prompt ' from East Germany'
remove_opp_infl 2
-permanently_remove
+endif
CARD 83 - Modrow*
# Roll a die. If the die roll exceeds the number of Democratically controlled spaces in Germany, then place 4 Communist SPs in Germany, no more than 2 per space.
modrow
valid_spaces_country 'East_Germany'
-prompt 'East Germany'
+prompt 'East Germany, no more than 2 per space'
add_limited_infl 4 2
-permanently_remove
CARD 84 - Breakaway Baltic Republics*
# +3 VPs. Reduce USSR stability by 2. Place sufficient Democratic SPs in any Minorities space for control. Cancels the effect of Gorbachev Charms the West for the rest of the game. Make 1 Support Check using the Ops value of this card. Requires play of The Baltic Way as an event.
+permanently_remove
breakaway_baltic_republics
prompt 'any Minorities space'
take_control_prep 1
valid_spaces_sc
prompt 'select a space for the support check'
1_support_check
-permanently_remove
CARD 85 - Tank Column/Tank Man*
# Advance 1 space on the Tiananmen Square track.
-tank_column
permanently_remove
+tank_column
CARD 86 - The Wall Must Go!*
# Reduce USSR stability by 1. The Democratic Player attempts to tear down the Berlin Wall. Each player rolls a die and adds the number of spaces in Germany they control. Higher total wins. This is best 2 out of 3. If successful +3 VPs and the Communist must remove 3 SPs from Germany.
the_wall_must_go
remove_infl 3
-permanently_remove
CARD 87 - Kohl Proposes Reunification*
# +2 VP. The Democratic Player may place SPs or make Support Checks using the Ops value of this card if The Wall Must Go! has been played as an event successfully.
-kohl_proposes_reunification
permanently_remove
+kohl_proposes_reunification_prep
+if !is_auto_resolve(C_KOHL_PROPOSES_REUNIFICATION)
+kohl_proposes_reunification
+else
+logi `C${C_THE_WALL_MUST_GO} has not been successfully played for the event.`
+endif
CARD 88 - Adamec*
# Roll a die. On a 4-6 add 4 Communist SPs in Czechoslovakia, no more than 2 per space. -1 drm for every Worker or Farmer space in Czechoslovakia that is controlled by the Democratic Player.
+permanently_remove
adamec
valid_spaces_country 'Czechoslovakia'
prompt 'Czechoslovakia'
add_limited_infl 4 2
-permanently_remove
CARD 89 - Domino Theory*
# If the Democrat holds Power in at least 2 counties, he may retrieve any Power Struggle - card from the discard pile and play it immediately as an event. The Democrat receives a -1 drm to his dice rolls for this Power Struggle.
-prompt 'Domino Theory: choose a Power Struggle card to play from the discard pile.'
-domino_theory
permanently_remove
+if !is_auto_resolve(C_DOMINO_THEORY)
+prompt 'Domino Theory: choose a Power Struggle card to play from the discard pile'
+domino_theory
+else
+domino_theory_pass
+endif
CARD 90 - Civic Forum*
# +1 VP. Place 4 SPs in Czechoslovakia. The Democratic Player may make Support Checks in Czechoslovakia using the Ops value of this card if the Czech Writers space is Democratically controlled.
+permanently_remove
+civic_forum_prep
valid_spaces_country 'Czechoslovakia'
prompt 'Czechoslovakia'
add_infl_free 4
@@ -674,45 +712,50 @@ civic_forum
valid_spaces_country_sc 'Czechoslovakia'
prompt 'Select a space in Czechoslovakia'
support_check 2
-permanently_remove
CARD 91 - My First Banana*
# Remove 2 Communist SPs and make two Support Checks in Germany using the Ops value of this card.
+permanently_remove
+if !is_auto_resolve(C_MY_FIRST_BANANA)
valid_spaces_country_opp 'East_Germany'
prompt ' from East Germany'
remove_opp_infl 2
valid_spaces_country_sc 'East_Germany'
prompt 'select a space in East Germany'
support_check 2
-permanently_remove
+endif
CARD 92 - Betrayal
# Choose any Orthodox Church space. Replace all Democratic SPs with Communist SPs.
+permanently_remove
+if !is_auto_resolve(C_BETRAYAL)
prompt 'choose any Orthodox Church space. Replace all Democratic SPs with Communist SPs'
betrayal
-permanently_remove
+endif
CARD 93 - Shock Therapy*
# Target country must be one where the Communist has been toppled from power. Successful 3-6. -1 for every Communist Worker or Farmer space. +2 VPs and place 3 SPs in the country
+permanently_remove
shock_therapy
valid_spaces_country
prompt ` ${country_name(game.vm_active_country)}`
add_infl_free 3
-permanently_remove
CARD 94 - Union of Democratic Forces*
# Remove 4 Communist SPs from Bulgaria. Democratic Player may make Support Checks in Bulgaria using the Ops value of this card if the Bulgarian writers space is Democratically controlled.
+permanently_remove
+if !is_auto_resolve(C_UNION_OF_DEMOCRATIC_FORCES)
valid_spaces_country_opp 'Bulgaria'
prompt ' from Bulgaria'
-remove_opp_infl 4
+remove_limited_opp_infl 4 2
valid_spaces_country_sc 'Bulgaria'
prompt 'Make 2 Support Checks in Bulgaria'
support_check 2
-permanently_remove
+endif
CARD 95 - Power Struggle - Romania
@@ -722,17 +765,17 @@ power_struggle
CARD 96 - The Chinese Solution*
# Can only take place if the Communist has reached the Protesters Massacred space on the Tiananmen Square track. The Communist may choose 1 country where he retains Power and conduct 5 Support Checks with a +3 modifier, but suffers a penalty of +3 VPs.
+permanently_remove
the_chinese_solution
valid_spaces_country_sc
-prompt `Make 5 Support Checks in ${country_name(game.vm_active_country)}`
+prompt `make 5 Support Checks in ${country_name(game.vm_active_country)}`
support_check_modified 5 3
-permanently_remove
CARD 97 - The Tyrant is Gone*
# Remove 4 Communist SPs from the Romanian Elite Space. The Democrat announces where the Ceausescus flee, choosing a space with no Democratic SPs. If the Democratic Player gains control of the space before the end of the game the Ceausescus are captured, +2 VP. If not they escape, -2 VP. Requires play of The Crowd Turns Against Ceausescu
-if game.persistent_events['the_crowd_turns_against_ceausescu']
-valid_spaces 51
+if game.persistent_events.includes(THE_CROWD_TURNS_AGAINST_CEAUSESCU_OCCURRED)
+cluj_check
prompt 'the Romanian Elite Space'
remove_x_opp_infl 4
the_tyrant_is_gone
@@ -744,35 +787,37 @@ endif
CARD 98 - Politburo Intrigue*
# Remove 3 Democratic SPs in Bulgaria, no more than 2 per space. Then make one Support Check in Bulgaria, using the Ops value of this card.
+permanently_remove
+if !is_auto_resolve(C_POLITBURO_INTRIGUE)
valid_spaces_country_opp 'Bulgaria'
prompt ' from Bulgaria'
remove_limited_opp_infl 3 2
valid_spaces_country_sc 'Bulgaria'
prompt 'make a support check in Bulgaria'
1_support_check
-permanently_remove
+endif
CARD 99 - Ligachev*
# -3 VP if the Democrat does not play Gorbachev Charms the West for the event his next action round. -3 VPs take effect as soon as the Democrat plays his card but before the effect of the Democrat's card takes place.
ligachev
-permanently_remove
CARD 100 - Stand Fast*
# -1 to opponent Support Checks in spaces you control for the rest of this turn.
stand_fast
-permanently_remove
CARD 101 - Elena*
# Add 2 SPs to the Romania Elite Space. -1 drm for Democratic Player for Support Checks in Romania the rest of this turn. No longer playable after The Tyrant is Gone
-if !game.the_tyrant_is_gone
-valid_spaces 51
+if !game.persistent_events.includes(THE_TYRANT_IS_GONE_OCCURRED)
+valid_spaces 'Cluj-Napoca'
prompt 'the Romania Elite Space'
add_x_infl 2
-endif
elena
+else
+tyrant_block
+endif
CARD 102 - National Salvation Front*
@@ -782,10 +827,13 @@ national_salvation_front
CARD 103 - Government Resigns*
# Remove all Communist SPs from any uncontrolled Elite space.
+permanently_remove
+if !is_auto_resolve(C_GOVERNMENT_RESIGNS)
government_resigns
prompt 'any uncontrolled Elite space'
remove_all_infl 1
-permanently_remove
+endif
+
CARD 104 - New Year's Eve Party*
@@ -795,19 +843,21 @@ new_years_eve_party
CARD 105 - Public Against Violence*
# Place 2 Democratic SPs each in Kosice and Presov. Make one Support Check in Bratislava using the Ops value of this card.
-valid_spaces 36 37
-prompt 'Kosice and Presov'
+permanently_remove
+valid_spaces 'Kosice'
+prompt 'Kosice'
add_x_infl 2
-valid_spaces 36 37
+valid_spaces 'Presov'
+prompt 'Presov'
add_x_infl 2
public_against_violence
prompt 'Make a Support Check in Bratislava'
support_check_modified 1 2
-permanently_remove
CARD 106 - Social Democratic Platform Adopted*
# Play as an event in a Country where the Democrat has Power. Add 2 SPs and make 1 Support Check in the Country using the Ops value of this card.
+permanently_remove
social_democratic_platform_adopted
valid_spaces_country
prompt `${country_name(game.vm_active_country)}`
@@ -815,36 +865,66 @@ add_infl_free 2
valid_spaces_country_sc
prompt `make a Support Check in ${country_name(game.vm_active_country)}`
1_support_check
-permanently_remove
CARD 107 - Massacre in Timisoara*
# Communist Player makes Support Checks in Romania using the Ops value of this card with +2 drm. Requires play of Lazslo Tokes.
-if !game.the_tyrant_is_gone
+permanently_remove
+if !game.persistent_events.includes(THE_TYRANT_IS_GONE_OCCURRED)
massacre_in_timisoara
valid_spaces_country_sc 'Romania'
prompt 'Make Support Checks in Romania'
support_check_modified 2 2
+else
+tyrant_block
endif
-permanently_remove
CARD 108 - Army Backs Revolution*
# Place in front of the Democratic Player. Cancels effects of Securitate* event.
army_backs_revolution
-permanently_remove
CARD 109 - Kremlin Coup*
# Can only take place if Breakaway Baltic Republics has been played as an event. -3 VPs. In all countries where the Communist retains Power, place sufficient SPs in Elite space for Communist control, then make a support check against the bureaucratic space with a +1 modifier, even if there are no Democratic SPs in the space.
-kremlin_coup
permanently_remove
+kremlin_coup
CARD 110 - Malta Summit*
# Roll a die. The summit is successful 4-6. If successful, +3VPs and remove 5 Communist SPs from elite space(s). The Democrat receives a modifier based on the USSR Stability Track: +1 if Sajudis +2 if The Baltic Way +3 if Breakaway Baltic Republics Not playable for the event after Kremlin Coup.
+permanently_remove
malta_summit
prompt ' from Elite spaces'
remove_opp_infl 5
-permanently_remove
+
+#// ============= TIANANMEN SQUARE TRACK AWARDS ====================
+CARD 203 - Tiananmen Square space 3 award
+tst_3
+
+CARD 204 - Tiananmen Square space 4 award
+valid_spaces_opponent
+tst_4
+
+CARD 206 - Tiananmen Square space 6
+valid_spaces_sc
+tst_6
+
+CARD 208 - Tiananmen Square space 8 event
+tst_8
+
+#// ============= POWER STRUGGLE WILDCARDS =========================
+
+
+CARD 349 - Support Falters
+support_falters
+
+CARD 350 - Support Surges
+support_surges
+
+CARD 351 - Scare Tactics
+scare_tactics
+valid_spaces_country_opp
+prompt ()=>` from ${country_name(game.vm_active_country)}`
+remove_opp_infl 1 \ No newline at end of file
diff --git a/favicon.png b/favicon.png
deleted file mode 100644
index 7431f53..0000000
--- a/favicon.png
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_Austria_Hungar.gif b/images/Event_Marker_Austria_Hungar.gif
deleted file mode 100644
index 5e2053f..0000000
--- a/images/Event_Marker_Austria_Hungar.gif
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_Eco_Glasnost.gif b/images/Event_Marker_Eco_Glasnost.gif
deleted file mode 100644
index c50ac5b..0000000
--- a/images/Event_Marker_Eco_Glasnost.gif
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_Elena.gif b/images/Event_Marker_Elena.gif
deleted file mode 100644
index 9e5ff46..0000000
--- a/images/Event_Marker_Elena.gif
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_Foreign_Curren.gif b/images/Event_Marker_Foreign_Curren.gif
deleted file mode 100644
index 822b098..0000000
--- a/images/Event_Marker_Foreign_Curren.gif
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_Grenz_Truppen.gif b/images/Event_Marker_Grenz_Truppen.gif
deleted file mode 100644
index 1e2832f..0000000
--- a/images/Event_Marker_Grenz_Truppen.gif
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_Helsinki.gif b/images/Event_Marker_Helsinki.gif
deleted file mode 100644
index 7567dc7..0000000
--- a/images/Event_Marker_Helsinki.gif
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_Honecker.gif b/images/Event_Marker_Honecker.gif
deleted file mode 100644
index 52a6ad1..0000000
--- a/images/Event_Marker_Honecker.gif
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_Laszlo.gif b/images/Event_Marker_Laszlo.gif
deleted file mode 100644
index ba09ff2..0000000
--- a/images/Event_Marker_Laszlo.gif
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_Li_Peng_.gif b/images/Event_Marker_Li_Peng_.gif
deleted file mode 100644
index 9477bac..0000000
--- a/images/Event_Marker_Li_Peng_.gif
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_NYE_Party.gif b/images/Event_Marker_NYE_Party.gif
deleted file mode 100644
index b2a91d2..0000000
--- a/images/Event_Marker_NYE_Party.gif
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_Pres_Visit.gif b/images/Event_Marker_Pres_Visit.gif
deleted file mode 100644
index 006e93d..0000000
--- a/images/Event_Marker_Pres_Visit.gif
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_Securitate.gif b/images/Event_Marker_Securitate.gif
deleted file mode 100644
index 9289a99..0000000
--- a/images/Event_Marker_Securitate.gif
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_Solidarity_Leg.gif b/images/Event_Marker_Solidarity_Leg.gif
deleted file mode 100644
index 044f4db..0000000
--- a/images/Event_Marker_Solidarity_Leg.gif
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_St_Nicholas.gif b/images/Event_Marker_St_Nicholas.gif
deleted file mode 100644
index cb09917..0000000
--- a/images/Event_Marker_St_Nicholas.gif
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_Stand_Fast.gif b/images/Event_Marker_Stand_Fast.gif
deleted file mode 100644
index 2d12898..0000000
--- a/images/Event_Marker_Stand_Fast.gif
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_Systematizatio.gif b/images/Event_Marker_Systematizatio.gif
deleted file mode 100644
index 9f53576..0000000
--- a/images/Event_Marker_Systematizatio.gif
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_The_Tyrant_Is_.gif b/images/Event_Marker_The_Tyrant_Is_.gif
deleted file mode 100644
index 05aca22..0000000
--- a/images/Event_Marker_The_Tyrant_Is_.gif
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_The_Wall.gif b/images/Event_Marker_The_Wall.gif
deleted file mode 100644
index a929132..0000000
--- a/images/Event_Marker_The_Wall.gif
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_USSR_Stability.gif b/images/Event_Marker_USSR_Stability.gif
deleted file mode 100644
index daacbbb..0000000
--- a/images/Event_Marker_USSR_Stability.gif
+++ /dev/null
Binary files differ
diff --git a/images/Event_Marker_We_are_the_Peo.gif b/images/Event_Marker_We_are_the_Peo.gif
deleted file mode 100644
index e10d8e6..0000000
--- a/images/Event_Marker_We_are_the_Peo.gif
+++ /dev/null
Binary files differ
diff --git a/images/Hammer_and_sickle.svg b/images/Hammer_and_sickle.svg
new file mode 100644
index 0000000..4aa6dd0
--- /dev/null
+++ b/images/Hammer_and_sickle.svg
@@ -0,0 +1,5 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="600" height="600">
+<path fill="#c00" d="M0 0h600v600H0z"/>
+<path fill="gold" d="m157.543 922.363-16.971 16.971-45.256 45.254-56.571 56.57 62.227 62.225 56.571-56.568 299.828 299.812a32 32 0 0 0 45.256 0 32 32 0 0 0 0-45.254l-299.826-299.814 16.971-16.971 50.915-50.91z" transform="translate(43 -799)"/>
+<path fill="gold" d="M255.989 844s168.008 128 168.008 256c0 64-56.003 136-152.007 136-64.003 0-104.241-47.764-104.241-47.764l-11.313 11.313a16 16 0 0 0-22.628 0 16 16 0 0 0-2.48 3.223 32 32 0 0 0-31.463 8.091 32 32 0 0 0-9.331 21.545c-25.432 13.753-67.565 40.575-86.27 75.592l.03.029a32 32 0 0 0-.03 31.971 32 32 0 0 0 43.715 11.713c35.026-18.708 61.855-60.852 75.605-86.281a32 32 0 0 0 21.537-9.315 32 32 0 0 0 7.932-13.201C177.569 1265.97 224.497 1300 287.99 1300c96.005 0 200.01-72 200.01-200 0-160-232.011-256-232.011-256" transform="translate(43 -799)"/>
+</svg>
diff --git a/images/SV_2.gif b/images/SV_2.gif
deleted file mode 100644
index 76f1f46..0000000
--- a/images/SV_2.gif
+++ /dev/null
Binary files differ
diff --git a/images/SV_3.gif b/images/SV_3.gif
deleted file mode 100644
index 75404f0..0000000
--- a/images/SV_3.gif
+++ /dev/null
Binary files differ
diff --git a/images/SV_4.gif b/images/SV_4.gif
deleted file mode 100644
index 29158b4..0000000
--- a/images/SV_4.gif
+++ /dev/null
Binary files differ
diff --git a/images/SV_5.gif b/images/SV_5.gif
deleted file mode 100644
index 2fdea81..0000000
--- a/images/SV_5.gif
+++ /dev/null
Binary files differ
diff --git a/images/SV_6.gif b/images/SV_6.gif
deleted file mode 100644
index 9f614e7..0000000
--- a/images/SV_6.gif
+++ /dev/null
Binary files differ
diff --git a/images/SV_7.gif b/images/SV_7.gif
deleted file mode 100644
index 43c6a14..0000000
--- a/images/SV_7.gif
+++ /dev/null
Binary files differ
diff --git a/images/SV_8.gif b/images/SV_8.gif
deleted file mode 100644
index a2e7dad..0000000
--- a/images/SV_8.gif
+++ /dev/null
Binary files differ
diff --git a/images/SV_Action_Round.gif b/images/SV_Action_Round.gif
deleted file mode 100644
index 7d2c9ef..0000000
--- a/images/SV_Action_Round.gif
+++ /dev/null
Binary files differ
diff --git a/images/SV_Stability.gif b/images/SV_Stability.gif
deleted file mode 100644
index dbc33aa..0000000
--- a/images/SV_Stability.gif
+++ /dev/null
Binary files differ
diff --git a/images/SV_Tiananmen_Square.gif b/images/SV_Tiananmen_Square.gif
deleted file mode 100644
index 41740bc..0000000
--- a/images/SV_Tiananmen_Square.gif
+++ /dev/null
Binary files differ
diff --git a/images/SV_blank.gif b/images/SV_blank.gif
deleted file mode 100644
index 5b9190b..0000000
--- a/images/SV_blank.gif
+++ /dev/null
Binary files differ
diff --git a/images/SVd_blank.gif b/images/SVd_blank.gif
deleted file mode 100644
index e202de3..0000000
--- a/images/SVd_blank.gif
+++ /dev/null
Binary files differ
diff --git a/images/Turn.gif b/images/Turn.gif
deleted file mode 100644
index 94dba0b..0000000
--- a/images/Turn.gif
+++ /dev/null
Binary files differ
diff --git a/images/US_1.gif b/images/US_1.gif
deleted file mode 100644
index 0f4d999..0000000
--- a/images/US_1.gif
+++ /dev/null
Binary files differ
diff --git a/images/US_2.gif b/images/US_2.gif
deleted file mode 100644
index e30ce29..0000000
--- a/images/US_2.gif
+++ /dev/null
Binary files differ
diff --git a/images/US_3.gif b/images/US_3.gif
deleted file mode 100644
index 3f6596d..0000000
--- a/images/US_3.gif
+++ /dev/null
Binary files differ
diff --git a/images/US_4.gif b/images/US_4.gif
deleted file mode 100644
index 4e1d1b1..0000000
--- a/images/US_4.gif
+++ /dev/null
Binary files differ
diff --git a/images/US_5.gif b/images/US_5.gif
deleted file mode 100644
index 4b32ff1..0000000
--- a/images/US_5.gif
+++ /dev/null
Binary files differ
diff --git a/images/US_6.gif b/images/US_6.gif
deleted file mode 100644
index da52ac1..0000000
--- a/images/US_6.gif
+++ /dev/null
Binary files differ
diff --git a/images/US_7.gif b/images/US_7.gif
deleted file mode 100644
index bbf8135..0000000
--- a/images/US_7.gif
+++ /dev/null
Binary files differ
diff --git a/images/US_8.gif b/images/US_8.gif
deleted file mode 100644
index 18b5f4d..0000000
--- a/images/US_8.gif
+++ /dev/null
Binary files differ
diff --git a/images/US_Action_Round.gif b/images/US_Action_Round.gif
deleted file mode 100644
index 00e4916..0000000
--- a/images/US_Action_Round.gif
+++ /dev/null
Binary files differ
diff --git a/images/US_Tiananmen_Square.gif b/images/US_Tiananmen_Square.gif
deleted file mode 100644
index 0fadb29..0000000
--- a/images/US_Tiananmen_Square.gif
+++ /dev/null
Binary files differ
diff --git a/images/US_blank.gif b/images/US_blank.gif
deleted file mode 100644
index 1f2f331..0000000
--- a/images/US_blank.gif
+++ /dev/null
Binary files differ
diff --git a/images/USd_blank.gif b/images/USd_blank.gif
deleted file mode 100644
index b999b18..0000000
--- a/images/USd_blank.gif
+++ /dev/null
Binary files differ
diff --git a/images/VP.gif b/images/VP.gif
deleted file mode 100644
index bd69b44..0000000
--- a/images/VP.gif
+++ /dev/null
Binary files differ
diff --git a/images/bin.png b/images/bin.png
deleted file mode 100644
index 37ea1a7..0000000
--- a/images/bin.png
+++ /dev/null
Binary files differ
diff --git a/images/cog.svg b/images/cog.svg
deleted file mode 100644
index 6e44bd2..0000000
--- a/images/cog.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><g class="" style="" transform="translate(0,0)"><path d="M234.875 18.78c-26.087 2.367-51.557 8.56-74.875 18.782 15.37 32.763 14.222 66.706-6.72 82.407-20.835 15.617-54.055 7.965-81.124-15.69-16.246 19.452-29.336 41.36-38.875 65.626 33.83 12.333 56.635 37.665 52.94 63.5-3.698 25.835-32.697 43.74-68.626 46.094 2.338 25.796 8.91 50.778 18.937 73.875 17.81-8.182 35.793-11.09 51.095-8.938 13.032 1.87 23.927 7.015 31.156 16.657 15.817 21.097 7.603 54.713-16.78 81.97 19.516 16.35 42.216 29.444 66.594 39.03 12.33-33.828 37.655-56.634 63.5-52.938 25.844 3.697 43.74 32.696 46.094 68.625 26.087-2.365 51.557-8.555 74.875-18.78-15.766-32.997-14.26-67.588 6.843-83.406 9.64-7.23 22.568-9.022 35.594-7.125 15.112 2.16 31.19 10.25 45.563 22.78 16.088-19.345 29.4-41.51 38.875-65.594-33.83-12.332-56.635-37.653-52.938-63.5 3.697-25.846 32.665-43.772 68.594-46.125-2.36-25.944-8.774-50.663-18.906-73.874-32.612 15.117-66.66 13.145-82.282-7.687-15.696-20.944-7.252-53.86 16.688-81-19.52-16.352-42.248-29.447-66.625-39.032-12.332 33.828-37.657 56.66-63.5 52.968-25.846-3.693-43.744-32.696-46.095-68.625zm21.656 95.126c79.626 0 144.376 64.752 144.376 144.375 0 79.626-64.75 144.376-144.375 144.376-79.624 0-144.374-64.75-144.374-144.375 0-79.624 64.75-144.374 144.375-144.374zm0 18.688c-69.524 0-125.686 56.162-125.686 125.687 0 69.526 56.162 125.69 125.687 125.69 69.526 0 125.69-56.164 125.69-125.69 0-69.522-56.164-125.686-125.69-125.686zm.033 15.125c61.094 0 110.625 49.53 110.625 110.624 0 61.095-49.53 110.625-110.625 110.625s-110.625-49.53-110.625-110.626c0-61.095 49.53-110.625 110.625-110.625z" fill="#000" fill-opacity="1"></path></g></svg> \ No newline at end of file
diff --git a/images/die_black_pips.svg b/images/die_black_pips.svg
new file mode 100644
index 0000000..d641f28
--- /dev/null
+++ b/images/die_black_pips.svg
@@ -0,0 +1,37 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="336" height="56">
+<g fill="black">
+<g transform="translate(0 0)">
+<circle r="6" cx="28" cy="28"/>
+</g>
+<g transform="translate(56 0)">
+<circle r="6" cx="12" cy="12"/>
+<circle r="6" cx="44" cy="44"/>
+</g>
+<g transform="translate(112 0)">
+<circle r="6" cx="12" cy="44"/>
+<circle r="6" cx="44" cy="12"/>
+<circle r="6" cx="28" cy="28"/>
+</g>
+<g transform="translate(168 0)">
+<circle r="6" cx="12" cy="12"/>
+<circle r="6" cx="12" cy="44"/>
+<circle r="6" cx="44" cy="12"/>
+<circle r="6" cx="44" cy="44"/>
+</g>
+<g transform="translate(224 0)">
+<circle r="6" cx="12" cy="12"/>
+<circle r="6" cx="12" cy="44"/>
+<circle r="6" cx="44" cy="12"/>
+<circle r="6" cx="44" cy="44"/>
+<circle r="6" cx="28" cy="28"/>
+</g>
+<g transform="translate(280 0)">
+<circle r="6" cx="12" cy="12"/>
+<circle r="6" cx="12" cy="28"/>
+<circle r="6" cx="12" cy="44"/>
+<circle r="6" cx="44" cy="12"/>
+<circle r="6" cx="44" cy="28"/>
+<circle r="6" cx="44" cy="44"/>
+</g>
+</g>
+</svg>
diff --git a/images/earth-africa-europe.svg b/images/earth-africa-europe.svg
deleted file mode 100644
index 39a4868..0000000
--- a/images/earth-africa-europe.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><g class="" style="" transform="translate(0,0)"><path d="M256 32A224 224 0 0 0 32 256a224 224 0 0 0 224 224 224 224 0 0 0 223.672-217.45c-15.468 4.148-.306.22-16.467 4.51-9.1-2.965-28.42 10.264-29.197 10.264-1.756 0-14.65-49.66-14.65-49.66L381.08 208H368l-1.316 6.32 30.2 28.444-47.76 20.718-35.466-49.162-5.24 2.328 11.21 36.3 42.84 23.177-42.84 50.568 1.403 35.82-31.276 67.182-52.168-6.716-16-88.843-3.094-33.43-71.517-3.838-9.258-60.77 32.314-35.827 54.782-6.32 40.034 21.772 36.93-9.72c-1.112-18.374.05-12.54-1.112-18.374l-19.666-.7-1.053-10.184-5.97-2.107-2.81 12.64-9.48-.526-11.94-26.514-8.43 2.81 10.185 22.475-9.13 3.16-13.694-20.718-8.428-1.406-21.773 2.81-18.26 23.177-18.613 1.406-1.405-34.064 24.23-1.757 2.108-10.184-5.795-5.618-.174-3.69 16.182-7.94 11.56-2.944 19.665-6.848 6.32-7.375 3.512 7.375 22.474 2.81 8.78-9.13 5.97-24.582-6.673-2.81-11.238 16.857-8.43-9.834-11.586 14.75-14.4 2.458-.7-10.184 11.236-23.88 31.606-13.694 43.894-3.16 3.864 13.344s-4.916 13.344-5.97 13.695c-.138.045.428 1.754 1.464 4.565h31.195l14.047-11.59 29.484-9.138A224 224 0 0 0 256 32zM145.098 69.465l6.144 1.053s1.756 8.076.352 10.007c-1.405 1.932-10.885 7.903-10.885 7.903l-6.148-12.115 10.536-6.848zm41.086 11.588l8.252 19.49 3.337 16.68s-11.588 5.793-12.466 6.496c-.878.7-6.147-8.077-6.147-8.077l-1.93-17.91 2.81-15.1 6.144-1.58zm-12.116 22.474v16.155l-10.007 3.86-2.107-7.724 12.115-12.29zm189.104 238.618l-7.365 61.798-16.164 3.166s4.868-50.492 7.326-53.3l16.202-11.665z" fill="#000" fill-opacity="1"></path></g></svg> \ No newline at end of file
diff --git a/images/favicon_com.svg b/images/favicon_com.svg
new file mode 100644
index 0000000..9f9cc3b
--- /dev/null
+++ b/images/favicon_com.svg
@@ -0,0 +1,5 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="56.693" height="56.693">
+<path fill="#bf2329" stroke-width="1.33333" d="M56.693 49.135c0 4.157-3.402 7.558-7.558 7.558H7.559C3.403 56.693 0 53.292 0 49.135V7.56C0 3.403 3.403 0 7.559 0h41.576c4.156 0 7.558 3.403 7.558 7.56z"/>
+<path fill="#f14d3e" stroke-width="1.33333" d="m15.776 26.877-4.195-4.024 9.55-9.549 6.896 1.273-5.411 5.518S48.01 44.104 49.07 45.27s.069 2.412-.462 3.046c-.53.639-1.921 1.454-2.993.394-1.143-1.126-25.419-26.14-25.419-26.14Z"/>
+<path fill="#f14d3e" stroke-width="1.33333" d="M15.765 35.833s10.248 5.45 16.268 4.802c6.02-.65 11.714-3.5 11.47-14.482-.244-10.978-15.538-20.7-15.538-20.7s21.07 5.328 21.556 22.043c.408 13.96-8.052 19.199-16.592 18.792S16.496 38.76 16.496 38.76l-.65.57.023.046s.642 1.343.114 1.95c-1.006 1.16-1.939-.067-2.46.474-.52.538-1.572 4.027-3.17 5.596-1.596 1.567-3.029 2.192-4.104 1.655l-.424-.339c-.666-1-.221-2.5 1.138-4.276 1.361-1.777 4.693-3.25 5.164-3.833s-.86-1.36.166-2.497c.542-.598 1.951-.128 1.951-.128z"/>
+</svg>
diff --git a/images/favicon_dem.svg b/images/favicon_dem.svg
new file mode 100644
index 0000000..d91fcc7
--- /dev/null
+++ b/images/favicon_dem.svg
@@ -0,0 +1,39 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="56.693" height="56.693">
+<path fill="#397dc6" stroke-width="1.33333" d="M56.693 49.135c0 4.157-3.401 7.558-7.56 7.558H7.56c-4.159 0-7.56-3.401-7.56-7.558V7.56C0 3.403 3.401 0 7.56 0h41.573c4.159 0 7.56 3.403 7.56 7.56z"/>
+<path fill="#c9e7f6" d="M12.596 23.901c1.639 1.472 2.416 3.67 3.388 5.69.445.925 1.07 1.758 1.413 2.669-2.305.21-2.298 2.644-2.6 4.485-.36 2.218-2.225 3.042-2.906 4.956-.65 1.82 1.081 4.32 1.778 6.002.891 2.136 1.495 3.628 3.011 5.28a105 105 0 0 0 2.621 2.732c.267.269 22.207.226 22.088-.06-1.252-3.046-1.738-6.672-2.432-9.847-.445-2.043-1.148-4.388-2.261-6.273-1.168-1.98-2.559-3.516-3.364-5.728-1.484-4.078-2.361-8.171-2.93-12.38-.285-2.111-.091-4.215-.514-6.304-.415-2.051-.717-4.036-1.024-6.127-.148-1.019-.599-2.116-.844-3.11-.252-1.029-.244-2.2-.763-3.162-.966-1.796-3.573-1.921-4.641-.18-1.115 1.816-.088 4.136.141 6.02.256 2.103.69 4.113.714 6.277.02 1.902-.115 4.058.094 5.927.162 1.419 1.703 6.29-.33 7.019-1.944.696-4.043-5.71-5.12-6.88-1.446-1.576-2.592-3.17-3.896-4.872-.659-.86-1.704-1.495-2.375-2.374-.636-.833-1.057-1.742-1.69-2.556-1.19-1.526-2.586-3.532-4.771-2.912-3.268.93-1.066 3.027-.068 4.627 1.21 1.936 2.172 4.095 3.24 6.1 1.189 2.241 2.172 3.303 4.041 4.981"/>
+<path fill="none" stroke="#34699f" stroke-width=".9999974999999999" d="M12.596 23.901c1.639 1.472 2.416 3.67 3.388 5.69.445.925 1.07 1.758 1.413 2.669-2.305.21-2.298 2.644-2.6 4.485-.36 2.218-2.225 3.042-2.906 4.956-.65 1.82 1.081 4.32 1.778 6.002.891 2.136 1.495 3.628 3.011 5.28a105 105 0 0 0 2.621 2.732c.267.269 22.207.226 22.088-.06-1.252-3.046-1.738-6.672-2.432-9.847-.445-2.043-1.148-4.388-2.261-6.273-1.168-1.98-2.559-3.516-3.364-5.728-1.484-4.078-2.361-8.171-2.93-12.38-.285-2.111-.091-4.215-.514-6.304-.415-2.051-.717-4.036-1.024-6.127-.148-1.019-.599-2.116-.844-3.11-.252-1.029-.244-2.2-.763-3.162-.966-1.796-3.573-1.921-4.641-.18-1.115 1.816-.088 4.136.141 6.02.256 2.103.69 4.113.714 6.277.02 1.902-.115 4.058.094 5.927.162 1.419 1.703 6.29-.33 7.019-1.944.696-4.043-5.71-5.12-6.88-1.446-1.576-2.592-3.17-3.896-4.872-.659-.86-1.704-1.495-2.375-2.374-.636-.833-1.057-1.742-1.69-2.556-1.19-1.526-2.586-3.532-4.771-2.912-3.268.93-1.066 3.027-.068 4.627 1.21 1.936 2.172 4.095 3.24 6.1 1.189 2.241 2.172 3.303 4.041 4.981Z"/>
+<path fill="#c9e7f6" d="M22.067 43.815c.028.964 2.948 4.393 3.92 4.742.95.343 2.18-.334 2.734-1.09.762-1.034.252-1.574-.064-2.687"/>
+<path fill="none" stroke="#34699f" stroke-width=".9999974999999999" d="M22.067 43.815c.028.964 2.948 4.393 3.92 4.742.95.343 2.18-.334 2.734-1.09.762-1.034.252-1.574-.064-2.687"/>
+<path fill="#c9e7f6" d="M22.11 36.904c-1.137-2.36-2.629-4.552-4.99-4.643"/>
+<path fill="none" stroke="#34699f" stroke-width=".9999974999999999" d="M22.11 36.904c-1.137-2.36-2.629-4.552-4.99-4.643"/>
+<path fill="#c9e7f6" d="M17.435 39.92c-.864-.35-1.984-2.365-2.672-3.004"/>
+<path fill="none" stroke="#34699f" stroke-width=".9999974999999999" d="M17.435 39.92c-.864-.35-1.984-2.365-2.672-3.004"/>
+<path fill="#c9e7f6" d="M13.153 45.347c1.788.902 4.271 1.132 6.227 2.028 1.33.612 4.64 3.029 5.283.246"/>
+<path fill="none" stroke="#34699f" stroke-width=".9999974999999999" d="M13.153 45.347c1.788.902 4.271 1.132 6.227 2.028 1.33.612 4.64 3.029 5.283.246"/>
+<path fill="#c9e7f6" d="M26.685 48.64c-.194 1.553 1.607 5.475 3.056 6.033"/>
+<path fill="none" stroke="#34699f" stroke-width=".9999974999999999" d="M26.685 48.64c-.194 1.553 1.607 5.475 3.056 6.033"/>
+<path fill="#c9e7f6" d="M36.363 53.787c1.52-.763 1.7-3.222 1.734-4.663"/>
+<path fill="none" stroke="#34699f" stroke-width=".9999974999999999" d="M36.363 53.787c1.52-.763 1.7-3.222 1.734-4.663"/>
+<path fill="#c9e7f6" d="M24.767 44.97c.044-.105-.142-.3.06-.206.232 1.135.497 1.916 1.656 1.864 1.346-.06 1.734-1.053 1.373-1.921"/>
+<path fill="none" stroke="#34699f" stroke-width=".9999974999999999" d="M24.767 44.97c.044-.105-.142-.3.06-.206.232 1.135.497 1.916 1.656 1.864 1.346-.06 1.734-1.053 1.373-1.921"/>
+<path fill="#c9e7f6" d="M23.027 45.807c-.366.088-.774.366-1.094.548.378 1.145 1.726 1.873 2.794 1.082"/>
+<path fill="none" stroke="#34699f" stroke-width=".9999974999999999" d="M23.027 45.807c-.366.088-.774.366-1.094.548.378 1.145 1.726 1.873 2.794 1.082"/>
+<path fill="#c9e7f6" d="M9.147 16.643c.71-.547 1.516-.948 2.185-1.51"/>
+<path fill="none" stroke="#34699f" stroke-width=".9999974999999999" d="M9.147 16.643c.71-.547 1.516-.948 2.185-1.51"/>
+<path fill="#c9e7f6" d="M23.459 9.145c.205.456 3.172-.005 3.95-.062"/>
+<path fill="none" stroke="#34699f" stroke-width=".9999974999999999" d="M23.459 9.145c.205.456 3.172-.005 3.95-.062"/>
+<path fill="#c9e7f6" d="M24.967 15.467c.777.642 2.55.461 3.393.05"/>
+<path fill="none" stroke="#34699f" stroke-width=".9999974999999999" d="M24.967 15.467c.777.642 2.55.461 3.393.05"/>
+<path fill="#c9e7f6" d="M12.273 22.184c.827-.956 2.439-1.7 3.438-2.725"/>
+<path fill="none" stroke="#34699f" stroke-width=".9999974999999999" d="M12.273 22.184c.827-.956 2.439-1.7 3.438-2.725"/>
+<path fill="#c9e7f6" d="M15.327 48.59c-.05-.018-.378 0-.2-.058.706-.39 1.701-1.087 2.141-1.641"/>
+<path fill="none" stroke="#34699f" stroke-width=".9999974999999999" d="M15.327 48.59c-.05-.018-.378 0-.2-.058.706-.39 1.701-1.087 2.141-1.641"/>
+<path fill="#c9e7f6" d="M28.292 32.245c.01 1.31-.49 2.995-.867 4.248"/>
+<path fill="none" stroke="#34699f" stroke-width=".9999974999999999" d="M28.292 32.245c.01 1.31-.49 2.995-.867 4.248"/>
+<path fill="#c9e7f6" d="M35.592 39.455c3.513.042 1.235 6.358.215 6.176"/>
+<path fill="none" stroke="#34699f" stroke-width=".9999974999999999" d="M35.592 39.455c3.513.042 1.235 6.358.215 6.176"/>
+<path fill="#c9e7f6" d="M33.703 37.757c-1.046 1.09-4.423.055-5.642-.492-1.912-.86-3.79-1.188-5.872-.586-1.685.488-4.242 1.362-4.461 3.44-.233 2.222 2.476 3.273 4.197 3.726 3.288.87 6.608.776 9.867 1.724"/>
+<path fill="none" stroke="#34699f" stroke-width=".9999974999999999" d="M33.703 37.757c-1.046 1.09-4.423.055-5.642-.492-1.912-.86-3.79-1.188-5.872-.586-1.685.488-4.242 1.362-4.461 3.44-.233 2.222 2.476 3.273 4.197 3.726 3.288.87 6.608.776 9.867 1.724"/>
+<path fill="#c9e7f6" d="M0 0c-.251-1.043-.621-1.581-1.709-1.516-.864.051-1.969.639-1.608 1.67.739 2.116 4.618 1.012 2.745-1.349" transform="matrix(1.33333 0 0 -1.33333 23.719 40.57)"/>
+<path fill="none" stroke="#34699f" stroke-width=".75" d="M0 0c-.251-1.043-.621-1.581-1.709-1.516-.864.051-1.969.639-1.608 1.67.739 2.116 4.618 1.012 2.745-1.349" transform="matrix(1.33333 0 0 -1.33333 23.719 40.57)"/>
+</svg>
diff --git a/images/remove.png b/images/remove.png
deleted file mode 100644
index 1c5b028..0000000
--- a/images/remove.png
+++ /dev/null
Binary files differ
diff --git a/images/trash-can.svg b/images/trash-can.svg
new file mode 100644
index 0000000..7b8da5a
--- /dev/null
+++ b/images/trash-can.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 512 512"><path stroke-width="1.18459" d="M188.479 28.56v59.229H96.08v35.537h319.838V87.79h-92.398v-59.23ZM209.8 49.881H302.2v37.907H209.8zm-93.585 94.767L151.88 483.44h208.243l35.66-338.792zm73.845 15.85.758 10.637 18.954 265.348.761 10.632-21.27 1.52-.758-10.637-18.954-265.348-.761-10.633zm131.878 0 21.27 1.52-.763 10.635L323.493 438l-.758 10.638-21.27-1.521.761-10.634 18.954-265.348.758-10.637zm-76.6.734h21.322v286.67H245.34z"/></svg>
diff --git a/info/cards.html b/info/cards.html
new file mode 100644
index 0000000..81b808c
--- /dev/null
+++ b/info/cards.html
@@ -0,0 +1,201 @@
+<!DOCTYPE html>
+<html>
+<meta name="viewport" content="width=600">
+<title>1989 - Cards</title>
+<style>
+body {
+ background-color: slategray;
+}
+.list {
+ margin: 20px;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+ gap: 20px;
+}
+img {
+ border-radius: 16px;
+ box-shadow: 0 0 0 1px #444, 1px 2px 4px #0004;
+}
+</style>
+<body>
+
+<div class="list">
+<img src="../cards100/event_back.avif">
+<img src="../cards100/event_1.avif">
+<img src="../cards100/event_2.avif">
+<img src="../cards100/event_3.avif">
+<img src="../cards100/event_4.avif">
+<img src="../cards100/event_5.avif">
+<img src="../cards100/event_6.avif">
+<img src="../cards100/event_7.avif">
+<img src="../cards100/event_8.avif">
+<img src="../cards100/event_9.avif">
+<img src="../cards100/event_10.avif">
+<img src="../cards100/event_11.avif">
+<img src="../cards100/event_12.avif">
+<img src="../cards100/event_13.avif">
+<img src="../cards100/event_14.avif">
+<img src="../cards100/event_15.avif">
+<img src="../cards100/event_16.avif">
+<img src="../cards100/event_17.avif">
+<img src="../cards100/event_18.avif">
+<img src="../cards100/event_19.avif">
+<img src="../cards100/event_20.avif">
+<img src="../cards100/event_21.avif">
+<img src="../cards100/event_22.avif">
+<img src="../cards100/event_23.avif">
+<img src="../cards100/event_24.avif">
+<img src="../cards100/event_25.avif">
+<img src="../cards100/event_26.avif">
+<img src="../cards100/event_27.avif">
+<img src="../cards100/event_28.avif">
+<img src="../cards100/event_29.avif">
+<img src="../cards100/event_30.avif">
+<img src="../cards100/event_31.avif">
+<img src="../cards100/event_32.avif">
+<img src="../cards100/event_33.avif">
+<img src="../cards100/event_34.avif">
+<img src="../cards100/event_35.avif">
+<img src="../cards100/event_36.avif">
+<img src="../cards100/event_37.avif">
+<img src="../cards100/event_38.avif">
+<img src="../cards100/event_39.avif">
+<img src="../cards100/event_40.avif">
+</div>
+
+<div class="list">
+<img src="../cards100/event_back.avif">
+<img src="../cards100/event_41.avif">
+<img src="../cards100/event_42.avif">
+<img src="../cards100/event_43.avif">
+<img src="../cards100/event_44.avif">
+<img src="../cards100/event_45.avif">
+<img src="../cards100/event_46.avif">
+<img src="../cards100/event_47.avif">
+<img src="../cards100/event_48.avif">
+<img src="../cards100/event_49.avif">
+<img src="../cards100/event_50.avif">
+<img src="../cards100/event_51.avif">
+<img src="../cards100/event_52.avif">
+<img src="../cards100/event_53.avif">
+<img src="../cards100/event_54.avif">
+<img src="../cards100/event_55.avif">
+<img src="../cards100/event_56.avif">
+<img src="../cards100/event_57.avif">
+<img src="../cards100/event_58.avif">
+<img src="../cards100/event_59.avif">
+<img src="../cards100/event_60.avif">
+<img src="../cards100/event_61.avif">
+<img src="../cards100/event_62.avif">
+<img src="../cards100/event_63.avif">
+<img src="../cards100/event_64.avif">
+<img src="../cards100/event_65.avif">
+<img src="../cards100/event_66.avif">
+<img src="../cards100/event_67.avif">
+<img src="../cards100/event_68.avif">
+<img src="../cards100/event_69.avif">
+<img src="../cards100/event_70.avif">
+<img src="../cards100/event_71.avif">
+<img src="../cards100/event_72.avif">
+<img src="../cards100/event_73.avif">
+<img src="../cards100/event_74.avif">
+<img src="../cards100/event_75.avif">
+<img src="../cards100/event_76.avif">
+<img src="../cards100/event_77.avif">
+<img src="../cards100/event_78.avif">
+<img src="../cards100/event_79.avif">
+<img src="../cards100/event_80.avif">
+<img src="../cards100/event_81.avif">
+</div>
+
+<div class="list">
+<img src="../cards100/event_back.avif">
+<img src="../cards100/event_82.avif">
+<img src="../cards100/event_83.avif">
+<img src="../cards100/event_84.avif">
+<img src="../cards100/event_85.avif">
+<img src="../cards100/event_86.avif">
+<img src="../cards100/event_87.avif">
+<img src="../cards100/event_88.avif">
+<img src="../cards100/event_89.avif">
+<img src="../cards100/event_90.avif">
+<img src="../cards100/event_91.avif">
+<img src="../cards100/event_92.avif">
+<img src="../cards100/event_93.avif">
+<img src="../cards100/event_94.avif">
+<img src="../cards100/event_95.avif">
+<img src="../cards100/event_96.avif">
+<img src="../cards100/event_97.avif">
+<img src="../cards100/event_98.avif">
+<img src="../cards100/event_99.avif">
+<img src="../cards100/event_100.avif">
+<img src="../cards100/event_101.avif">
+<img src="../cards100/event_102.avif">
+<img src="../cards100/event_103.avif">
+<img src="../cards100/event_104.avif">
+<img src="../cards100/event_105.avif">
+<img src="../cards100/event_106.avif">
+<img src="../cards100/event_107.avif">
+<img src="../cards100/event_108.avif">
+<img src="../cards100/event_109.avif">
+<img src="../cards100/event_110.avif">
+</div>
+
+<div class="list">
+<img src="../cards75/power_back.avif">
+<img src="../cards75/power_1_6.avif">
+<img src="../cards75/power_1_6.avif">
+<img src="../cards75/power_1_6.avif">
+<img src="../cards75/power_1_6.avif">
+<img src="../cards75/power_1_6.avif">
+<img src="../cards75/power_1_6.avif">
+<img src="../cards75/power_7_8.avif">
+<img src="../cards75/power_7_8.avif">
+<img src="../cards75/power_9_10.avif">
+<img src="../cards75/power_9_10.avif">
+<img src="../cards75/power_11_14.avif">
+<img src="../cards75/power_11_14.avif">
+<img src="../cards75/power_11_14.avif">
+<img src="../cards75/power_11_14.avif">
+<img src="../cards75/power_15_18.avif">
+<img src="../cards75/power_15_18.avif">
+<img src="../cards75/power_15_18.avif">
+<img src="../cards75/power_15_18.avif">
+<img src="../cards75/power_19_20.avif">
+<img src="../cards75/power_19_20.avif">
+<img src="../cards75/power_21_22.avif">
+<img src="../cards75/power_21_22.avif">
+<img src="../cards75/power_23_26.avif">
+<img src="../cards75/power_23_26.avif">
+<img src="../cards75/power_23_26.avif">
+<img src="../cards75/power_23_26.avif">
+<img src="../cards75/power_27_30.avif">
+<img src="../cards75/power_27_30.avif">
+<img src="../cards75/power_27_30.avif">
+<img src="../cards75/power_27_30.avif">
+<img src="../cards75/power_31_33.avif">
+<img src="../cards75/power_31_33.avif">
+<img src="../cards75/power_31_33.avif">
+<img src="../cards75/power_34_36.avif">
+<img src="../cards75/power_34_36.avif">
+<img src="../cards75/power_34_36.avif">
+<img src="../cards75/power_37.avif">
+<img src="../cards75/power_38.avif">
+<img src="../cards75/power_39.avif">
+<img src="../cards75/power_40.avif">
+<img src="../cards75/power_41.avif">
+<img src="../cards75/power_42.avif">
+<img src="../cards75/power_43.avif">
+<img src="../cards75/power_44.avif">
+<img src="../cards75/power_45.avif">
+<img src="../cards75/power_46.avif">
+<img src="../cards75/power_47.avif">
+<img src="../cards75/power_48.avif">
+<img src="../cards75/power_49.avif">
+<img src="../cards75/power_50.avif">
+<img src="../cards75/power_51.avif">
+<img src="../cards75/power_52.avif">
+</div>
+
+</body>
diff --git a/map150.avif b/map150.avif
new file mode 100644
index 0000000..f0a738c
--- /dev/null
+++ b/map150.avif
Binary files differ
diff --git a/map150.jpg b/map150.jpg
new file mode 100644
index 0000000..0726d04
--- /dev/null
+++ b/map150.jpg
Binary files differ
diff --git a/map150.png b/map150.png
new file mode 100644
index 0000000..519f917
--- /dev/null
+++ b/map150.png
Binary files differ
diff --git a/map75.avif b/map75.avif
new file mode 100644
index 0000000..3f11728
--- /dev/null
+++ b/map75.avif
Binary files differ
diff --git a/map75.jpg b/map75.jpg
new file mode 100644
index 0000000..db34ab4
--- /dev/null
+++ b/map75.jpg
Binary files differ
diff --git a/map75.png b/map75.png
new file mode 100644
index 0000000..16e8039
--- /dev/null
+++ b/map75.png
Binary files differ
diff --git a/markers150/action_round_blue.png b/markers150/action_round_blue.png
new file mode 100644
index 0000000..2ab6ee6
--- /dev/null
+++ b/markers150/action_round_blue.png
Binary files differ
diff --git a/markers150/action_round_red.png b/markers150/action_round_red.png
new file mode 100644
index 0000000..7a23d51
--- /dev/null
+++ b/markers150/action_round_red.png
Binary files differ
diff --git a/markers150/cc1.png b/markers150/cc1.png
new file mode 100644
index 0000000..b066664
--- /dev/null
+++ b/markers150/cc1.png
Binary files differ
diff --git a/markers150/cc2.png b/markers150/cc2.png
new file mode 100644
index 0000000..d08a3ca
--- /dev/null
+++ b/markers150/cc2.png
Binary files differ
diff --git a/markers150/cc3.png b/markers150/cc3.png
new file mode 100644
index 0000000..f048a77
--- /dev/null
+++ b/markers150/cc3.png
Binary files differ
diff --git a/markers150/cc4.png b/markers150/cc4.png
new file mode 100644
index 0000000..d06eda7
--- /dev/null
+++ b/markers150/cc4.png
Binary files differ
diff --git a/markers150/cc5.png b/markers150/cc5.png
new file mode 100644
index 0000000..18beae4
--- /dev/null
+++ b/markers150/cc5.png
Binary files differ
diff --git a/markers150/cc6.png b/markers150/cc6.png
new file mode 100644
index 0000000..9d6bbf1
--- /dev/null
+++ b/markers150/cc6.png
Binary files differ
diff --git a/markers150/cc7.png b/markers150/cc7.png
new file mode 100644
index 0000000..7ffb6dd
--- /dev/null
+++ b/markers150/cc7.png
Binary files differ
diff --git a/markers150/cc8.png b/markers150/cc8.png
new file mode 100644
index 0000000..dc8e215
--- /dev/null
+++ b/markers150/cc8.png
Binary files differ
diff --git a/markers150/ci1.png b/markers150/ci1.png
new file mode 100644
index 0000000..df07eda
--- /dev/null
+++ b/markers150/ci1.png
Binary files differ
diff --git a/markers150/ci2.png b/markers150/ci2.png
new file mode 100644
index 0000000..e09141a
--- /dev/null
+++ b/markers150/ci2.png
Binary files differ
diff --git a/markers150/ci3.png b/markers150/ci3.png
new file mode 100644
index 0000000..801004c
--- /dev/null
+++ b/markers150/ci3.png
Binary files differ
diff --git a/markers150/ci4.png b/markers150/ci4.png
new file mode 100644
index 0000000..845ca2d
--- /dev/null
+++ b/markers150/ci4.png
Binary files differ
diff --git a/markers150/ci5.png b/markers150/ci5.png
new file mode 100644
index 0000000..a23d874
--- /dev/null
+++ b/markers150/ci5.png
Binary files differ
diff --git a/markers150/ci6.png b/markers150/ci6.png
new file mode 100644
index 0000000..4c0b78e
--- /dev/null
+++ b/markers150/ci6.png
Binary files differ
diff --git a/markers150/ci7.png b/markers150/ci7.png
new file mode 100644
index 0000000..6e3349b
--- /dev/null
+++ b/markers150/ci7.png
Binary files differ
diff --git a/markers150/ci8.png b/markers150/ci8.png
new file mode 100644
index 0000000..9e15dd3
--- /dev/null
+++ b/markers150/ci8.png
Binary files differ
diff --git a/markers150/dc1.png b/markers150/dc1.png
new file mode 100644
index 0000000..75c14ba
--- /dev/null
+++ b/markers150/dc1.png
Binary files differ
diff --git a/markers150/dc2.png b/markers150/dc2.png
new file mode 100644
index 0000000..17c18cb
--- /dev/null
+++ b/markers150/dc2.png
Binary files differ
diff --git a/markers150/dc3.png b/markers150/dc3.png
new file mode 100644
index 0000000..35b2a53
--- /dev/null
+++ b/markers150/dc3.png
Binary files differ
diff --git a/markers150/dc4.png b/markers150/dc4.png
new file mode 100644
index 0000000..9f7fb0d
--- /dev/null
+++ b/markers150/dc4.png
Binary files differ
diff --git a/markers150/dc5.png b/markers150/dc5.png
new file mode 100644
index 0000000..d2c3cfc
--- /dev/null
+++ b/markers150/dc5.png
Binary files differ
diff --git a/markers150/dc6.png b/markers150/dc6.png
new file mode 100644
index 0000000..0529d96
--- /dev/null
+++ b/markers150/dc6.png
Binary files differ
diff --git a/markers150/dc7.png b/markers150/dc7.png
new file mode 100644
index 0000000..af3169f
--- /dev/null
+++ b/markers150/dc7.png
Binary files differ
diff --git a/markers150/dc8.png b/markers150/dc8.png
new file mode 100644
index 0000000..c6386c8
--- /dev/null
+++ b/markers150/dc8.png
Binary files differ
diff --git a/markers150/di1.png b/markers150/di1.png
new file mode 100644
index 0000000..54cc37f
--- /dev/null
+++ b/markers150/di1.png
Binary files differ
diff --git a/markers150/di2.png b/markers150/di2.png
new file mode 100644
index 0000000..07a8d64
--- /dev/null
+++ b/markers150/di2.png
Binary files differ
diff --git a/markers150/di3.png b/markers150/di3.png
new file mode 100644
index 0000000..784d95f
--- /dev/null
+++ b/markers150/di3.png
Binary files differ
diff --git a/markers150/di4.png b/markers150/di4.png
new file mode 100644
index 0000000..41ca0c7
--- /dev/null
+++ b/markers150/di4.png
Binary files differ
diff --git a/markers150/di5.png b/markers150/di5.png
new file mode 100644
index 0000000..fe3d524
--- /dev/null
+++ b/markers150/di5.png
Binary files differ
diff --git a/markers150/di6.png b/markers150/di6.png
new file mode 100644
index 0000000..9b16c9e
--- /dev/null
+++ b/markers150/di6.png
Binary files differ
diff --git a/markers150/di7.png b/markers150/di7.png
new file mode 100644
index 0000000..07f6b9a
--- /dev/null
+++ b/markers150/di7.png
Binary files differ
diff --git a/markers150/di8.png b/markers150/di8.png
new file mode 100644
index 0000000..1febae2
--- /dev/null
+++ b/markers150/di8.png
Binary files differ
diff --git a/markers150/event_austria_hungary.png b/markers150/event_austria_hungary.png
new file mode 100644
index 0000000..c602b45
--- /dev/null
+++ b/markers150/event_austria_hungary.png
Binary files differ
diff --git a/markers150/event_eco_glasnost.png b/markers150/event_eco_glasnost.png
new file mode 100644
index 0000000..96c2626
--- /dev/null
+++ b/markers150/event_eco_glasnost.png
Binary files differ
diff --git a/markers150/event_elena.png b/markers150/event_elena.png
new file mode 100644
index 0000000..5fc979e
--- /dev/null
+++ b/markers150/event_elena.png
Binary files differ
diff --git a/markers150/event_foreign_currency.png b/markers150/event_foreign_currency.png
new file mode 100644
index 0000000..d15b9d8
--- /dev/null
+++ b/markers150/event_foreign_currency.png
Binary files differ
diff --git a/markers150/event_grenz_truppen.png b/markers150/event_grenz_truppen.png
new file mode 100644
index 0000000..87c1e7b
--- /dev/null
+++ b/markers150/event_grenz_truppen.png
Binary files differ
diff --git a/markers150/event_helsinki.png b/markers150/event_helsinki.png
new file mode 100644
index 0000000..bc492e5
--- /dev/null
+++ b/markers150/event_helsinki.png
Binary files differ
diff --git a/markers150/event_honecker.png b/markers150/event_honecker.png
new file mode 100644
index 0000000..10441d1
--- /dev/null
+++ b/markers150/event_honecker.png
Binary files differ
diff --git a/markers150/event_laszlo_tokes.png b/markers150/event_laszlo_tokes.png
new file mode 100644
index 0000000..7670260
--- /dev/null
+++ b/markers150/event_laszlo_tokes.png
Binary files differ
diff --git a/markers150/event_li_peng.png b/markers150/event_li_peng.png
new file mode 100644
index 0000000..cfa2a0c
--- /dev/null
+++ b/markers150/event_li_peng.png
Binary files differ
diff --git a/markers150/event_nye_party.png b/markers150/event_nye_party.png
new file mode 100644
index 0000000..c8cb309
--- /dev/null
+++ b/markers150/event_nye_party.png
Binary files differ
diff --git a/markers150/event_pres_visit.png b/markers150/event_pres_visit.png
new file mode 100644
index 0000000..679f98f
--- /dev/null
+++ b/markers150/event_pres_visit.png
Binary files differ
diff --git a/markers150/event_securitate.png b/markers150/event_securitate.png
new file mode 100644
index 0000000..58a0216
--- /dev/null
+++ b/markers150/event_securitate.png
Binary files differ
diff --git a/markers150/event_solidarity_legalized.png b/markers150/event_solidarity_legalized.png
new file mode 100644
index 0000000..fd54f11
--- /dev/null
+++ b/markers150/event_solidarity_legalized.png
Binary files differ
diff --git a/markers150/event_st_nicholas.png b/markers150/event_st_nicholas.png
new file mode 100644
index 0000000..211c89c
--- /dev/null
+++ b/markers150/event_st_nicholas.png
Binary files differ
diff --git a/markers150/event_stand_fast.png b/markers150/event_stand_fast.png
new file mode 100644
index 0000000..83bc3a4
--- /dev/null
+++ b/markers150/event_stand_fast.png
Binary files differ
diff --git a/markers150/event_systematization.png b/markers150/event_systematization.png
new file mode 100644
index 0000000..985e3df
--- /dev/null
+++ b/markers150/event_systematization.png
Binary files differ
diff --git a/markers150/event_the_wall.png b/markers150/event_the_wall.png
new file mode 100644
index 0000000..e1c9ec9
--- /dev/null
+++ b/markers150/event_the_wall.png
Binary files differ
diff --git a/markers150/event_tyrant.png b/markers150/event_tyrant.png
new file mode 100644
index 0000000..acf3859
--- /dev/null
+++ b/markers150/event_tyrant.png
Binary files differ
diff --git a/markers150/event_we_are_the_people.png b/markers150/event_we_are_the_people.png
new file mode 100644
index 0000000..b1df70b
--- /dev/null
+++ b/markers150/event_we_are_the_people.png
Binary files differ
diff --git a/markers150/ts_blue.png b/markers150/ts_blue.png
new file mode 100644
index 0000000..7a62a65
--- /dev/null
+++ b/markers150/ts_blue.png
Binary files differ
diff --git a/markers150/ts_blue_back.png b/markers150/ts_blue_back.png
new file mode 100644
index 0000000..6c8816e
--- /dev/null
+++ b/markers150/ts_blue_back.png
Binary files differ
diff --git a/markers150/ts_red.png b/markers150/ts_red.png
new file mode 100644
index 0000000..63279de
--- /dev/null
+++ b/markers150/ts_red.png
Binary files differ
diff --git a/markers150/ts_red_back.png b/markers150/ts_red_back.png
new file mode 100644
index 0000000..a97a9f4
--- /dev/null
+++ b/markers150/ts_red_back.png
Binary files differ
diff --git a/markers150/turn.png b/markers150/turn.png
new file mode 100644
index 0000000..22ec78d
--- /dev/null
+++ b/markers150/turn.png
Binary files differ
diff --git a/markers150/ussr_stability_track.png b/markers150/ussr_stability_track.png
new file mode 100644
index 0000000..5d3914f
--- /dev/null
+++ b/markers150/ussr_stability_track.png
Binary files differ
diff --git a/markers150/vp.png b/markers150/vp.png
new file mode 100644
index 0000000..2f0acf6
--- /dev/null
+++ b/markers150/vp.png
Binary files differ
diff --git a/markers75/action_round_blue.png b/markers75/action_round_blue.png
new file mode 100644
index 0000000..56f4280
--- /dev/null
+++ b/markers75/action_round_blue.png
Binary files differ
diff --git a/markers75/action_round_red.png b/markers75/action_round_red.png
new file mode 100644
index 0000000..66a2d12
--- /dev/null
+++ b/markers75/action_round_red.png
Binary files differ
diff --git a/markers75/cc1.png b/markers75/cc1.png
new file mode 100644
index 0000000..2b3fbec
--- /dev/null
+++ b/markers75/cc1.png
Binary files differ
diff --git a/markers75/cc2.png b/markers75/cc2.png
new file mode 100644
index 0000000..c3075cb
--- /dev/null
+++ b/markers75/cc2.png
Binary files differ
diff --git a/markers75/cc3.png b/markers75/cc3.png
new file mode 100644
index 0000000..41834ed
--- /dev/null
+++ b/markers75/cc3.png
Binary files differ
diff --git a/markers75/cc4.png b/markers75/cc4.png
new file mode 100644
index 0000000..f846108
--- /dev/null
+++ b/markers75/cc4.png
Binary files differ
diff --git a/markers75/cc5.png b/markers75/cc5.png
new file mode 100644
index 0000000..9d85631
--- /dev/null
+++ b/markers75/cc5.png
Binary files differ
diff --git a/markers75/cc6.png b/markers75/cc6.png
new file mode 100644
index 0000000..88ec980
--- /dev/null
+++ b/markers75/cc6.png
Binary files differ
diff --git a/markers75/cc7.png b/markers75/cc7.png
new file mode 100644
index 0000000..e2d3c6e
--- /dev/null
+++ b/markers75/cc7.png
Binary files differ
diff --git a/markers75/cc8.png b/markers75/cc8.png
new file mode 100644
index 0000000..53bf846
--- /dev/null
+++ b/markers75/cc8.png
Binary files differ
diff --git a/markers75/ci1.png b/markers75/ci1.png
new file mode 100644
index 0000000..51d682a
--- /dev/null
+++ b/markers75/ci1.png
Binary files differ
diff --git a/markers75/ci2.png b/markers75/ci2.png
new file mode 100644
index 0000000..b7c6b45
--- /dev/null
+++ b/markers75/ci2.png
Binary files differ
diff --git a/markers75/ci3.png b/markers75/ci3.png
new file mode 100644
index 0000000..5e18c21
--- /dev/null
+++ b/markers75/ci3.png
Binary files differ
diff --git a/markers75/ci4.png b/markers75/ci4.png
new file mode 100644
index 0000000..a75ffae
--- /dev/null
+++ b/markers75/ci4.png
Binary files differ
diff --git a/markers75/ci5.png b/markers75/ci5.png
new file mode 100644
index 0000000..e41c4cc
--- /dev/null
+++ b/markers75/ci5.png
Binary files differ
diff --git a/markers75/ci6.png b/markers75/ci6.png
new file mode 100644
index 0000000..35b68a6
--- /dev/null
+++ b/markers75/ci6.png
Binary files differ
diff --git a/markers75/ci7.png b/markers75/ci7.png
new file mode 100644
index 0000000..70329c5
--- /dev/null
+++ b/markers75/ci7.png
Binary files differ
diff --git a/markers75/ci8.png b/markers75/ci8.png
new file mode 100644
index 0000000..3f5b63d
--- /dev/null
+++ b/markers75/ci8.png
Binary files differ
diff --git a/markers75/dc1.png b/markers75/dc1.png
new file mode 100644
index 0000000..11cfc08
--- /dev/null
+++ b/markers75/dc1.png
Binary files differ
diff --git a/markers75/dc2.png b/markers75/dc2.png
new file mode 100644
index 0000000..935e68e
--- /dev/null
+++ b/markers75/dc2.png
Binary files differ
diff --git a/markers75/dc3.png b/markers75/dc3.png
new file mode 100644
index 0000000..c3f1ccf
--- /dev/null
+++ b/markers75/dc3.png
Binary files differ
diff --git a/markers75/dc4.png b/markers75/dc4.png
new file mode 100644
index 0000000..cb84692
--- /dev/null
+++ b/markers75/dc4.png
Binary files differ
diff --git a/markers75/dc5.png b/markers75/dc5.png
new file mode 100644
index 0000000..98c47ed
--- /dev/null
+++ b/markers75/dc5.png
Binary files differ
diff --git a/markers75/dc6.png b/markers75/dc6.png
new file mode 100644
index 0000000..c2b4926
--- /dev/null
+++ b/markers75/dc6.png
Binary files differ
diff --git a/markers75/dc7.png b/markers75/dc7.png
new file mode 100644
index 0000000..c8a8a0e
--- /dev/null
+++ b/markers75/dc7.png
Binary files differ
diff --git a/markers75/dc8.png b/markers75/dc8.png
new file mode 100644
index 0000000..5ce0325
--- /dev/null
+++ b/markers75/dc8.png
Binary files differ
diff --git a/markers75/di1.png b/markers75/di1.png
new file mode 100644
index 0000000..82554e5
--- /dev/null
+++ b/markers75/di1.png
Binary files differ
diff --git a/markers75/di2.png b/markers75/di2.png
new file mode 100644
index 0000000..f258382
--- /dev/null
+++ b/markers75/di2.png
Binary files differ
diff --git a/markers75/di3.png b/markers75/di3.png
new file mode 100644
index 0000000..15dd714
--- /dev/null
+++ b/markers75/di3.png
Binary files differ
diff --git a/markers75/di4.png b/markers75/di4.png
new file mode 100644
index 0000000..5bfaf95
--- /dev/null
+++ b/markers75/di4.png
Binary files differ
diff --git a/markers75/di5.png b/markers75/di5.png
new file mode 100644
index 0000000..0ca28da
--- /dev/null
+++ b/markers75/di5.png
Binary files differ
diff --git a/markers75/di6.png b/markers75/di6.png
new file mode 100644
index 0000000..699efe3
--- /dev/null
+++ b/markers75/di6.png
Binary files differ
diff --git a/markers75/di7.png b/markers75/di7.png
new file mode 100644
index 0000000..fa2a21d
--- /dev/null
+++ b/markers75/di7.png
Binary files differ
diff --git a/markers75/di8.png b/markers75/di8.png
new file mode 100644
index 0000000..055a95a
--- /dev/null
+++ b/markers75/di8.png
Binary files differ
diff --git a/markers75/event_austria_hungary.png b/markers75/event_austria_hungary.png
new file mode 100644
index 0000000..b60b337
--- /dev/null
+++ b/markers75/event_austria_hungary.png
Binary files differ
diff --git a/markers75/event_eco_glasnost.png b/markers75/event_eco_glasnost.png
new file mode 100644
index 0000000..cfcfb19
--- /dev/null
+++ b/markers75/event_eco_glasnost.png
Binary files differ
diff --git a/markers75/event_elena.png b/markers75/event_elena.png
new file mode 100644
index 0000000..f9fc450
--- /dev/null
+++ b/markers75/event_elena.png
Binary files differ
diff --git a/markers75/event_foreign_currency.png b/markers75/event_foreign_currency.png
new file mode 100644
index 0000000..f19435a
--- /dev/null
+++ b/markers75/event_foreign_currency.png
Binary files differ
diff --git a/markers75/event_grenz_truppen.png b/markers75/event_grenz_truppen.png
new file mode 100644
index 0000000..2bfe9b2
--- /dev/null
+++ b/markers75/event_grenz_truppen.png
Binary files differ
diff --git a/markers75/event_helsinki.png b/markers75/event_helsinki.png
new file mode 100644
index 0000000..18db1a7
--- /dev/null
+++ b/markers75/event_helsinki.png
Binary files differ
diff --git a/markers75/event_honecker.png b/markers75/event_honecker.png
new file mode 100644
index 0000000..72e2261
--- /dev/null
+++ b/markers75/event_honecker.png
Binary files differ
diff --git a/markers75/event_laszlo_tokes.png b/markers75/event_laszlo_tokes.png
new file mode 100644
index 0000000..33d5dfe
--- /dev/null
+++ b/markers75/event_laszlo_tokes.png
Binary files differ
diff --git a/markers75/event_li_peng.png b/markers75/event_li_peng.png
new file mode 100644
index 0000000..f864423
--- /dev/null
+++ b/markers75/event_li_peng.png
Binary files differ
diff --git a/markers75/event_nye_party.png b/markers75/event_nye_party.png
new file mode 100644
index 0000000..bf2ff1a
--- /dev/null
+++ b/markers75/event_nye_party.png
Binary files differ
diff --git a/markers75/event_pres_visit.png b/markers75/event_pres_visit.png
new file mode 100644
index 0000000..a80cff9
--- /dev/null
+++ b/markers75/event_pres_visit.png
Binary files differ
diff --git a/markers75/event_securitate.png b/markers75/event_securitate.png
new file mode 100644
index 0000000..516c1f5
--- /dev/null
+++ b/markers75/event_securitate.png
Binary files differ
diff --git a/markers75/event_solidarity_legalized.png b/markers75/event_solidarity_legalized.png
new file mode 100644
index 0000000..6ff8e69
--- /dev/null
+++ b/markers75/event_solidarity_legalized.png
Binary files differ
diff --git a/markers75/event_st_nicholas.png b/markers75/event_st_nicholas.png
new file mode 100644
index 0000000..43294f7
--- /dev/null
+++ b/markers75/event_st_nicholas.png
Binary files differ
diff --git a/markers75/event_stand_fast.png b/markers75/event_stand_fast.png
new file mode 100644
index 0000000..c51c758
--- /dev/null
+++ b/markers75/event_stand_fast.png
Binary files differ
diff --git a/markers75/event_systematization.png b/markers75/event_systematization.png
new file mode 100644
index 0000000..5ee1fc7
--- /dev/null
+++ b/markers75/event_systematization.png
Binary files differ
diff --git a/markers75/event_the_wall.png b/markers75/event_the_wall.png
new file mode 100644
index 0000000..0108f00
--- /dev/null
+++ b/markers75/event_the_wall.png
Binary files differ
diff --git a/markers75/event_tyrant.png b/markers75/event_tyrant.png
new file mode 100644
index 0000000..37807ce
--- /dev/null
+++ b/markers75/event_tyrant.png
Binary files differ
diff --git a/markers75/event_we_are_the_people.png b/markers75/event_we_are_the_people.png
new file mode 100644
index 0000000..afbde45
--- /dev/null
+++ b/markers75/event_we_are_the_people.png
Binary files differ
diff --git a/markers75/ts_blue.png b/markers75/ts_blue.png
new file mode 100644
index 0000000..2262d0c
--- /dev/null
+++ b/markers75/ts_blue.png
Binary files differ
diff --git a/markers75/ts_blue_back.png b/markers75/ts_blue_back.png
new file mode 100644
index 0000000..489b847
--- /dev/null
+++ b/markers75/ts_blue_back.png
Binary files differ
diff --git a/markers75/ts_red.png b/markers75/ts_red.png
new file mode 100644
index 0000000..ae690bc
--- /dev/null
+++ b/markers75/ts_red.png
Binary files differ
diff --git a/markers75/ts_red_back.png b/markers75/ts_red_back.png
new file mode 100644
index 0000000..001fb60
--- /dev/null
+++ b/markers75/ts_red_back.png
Binary files differ
diff --git a/markers75/turn.png b/markers75/turn.png
new file mode 100644
index 0000000..bf88f48
--- /dev/null
+++ b/markers75/turn.png
Binary files differ
diff --git a/markers75/ussr_stability_track.png b/markers75/ussr_stability_track.png
new file mode 100644
index 0000000..b7b88ea
--- /dev/null
+++ b/markers75/ussr_stability_track.png
Binary files differ
diff --git a/markers75/vp.png b/markers75/vp.png
new file mode 100644
index 0000000..1f4217b
--- /dev/null
+++ b/markers75/vp.png
Binary files differ
diff --git a/output.txt b/output.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/output.txt
diff --git a/play.css b/play.css
index 9171d3d..dc801f8 100644
--- a/play.css
+++ b/play.css
@@ -1,728 +1,452 @@
-main { background-color: dimgray; }
-header { background-color: silver; }
-header.your_turn { background-color: orange; }
-#role_Democrat { background-color: hsl(200, 80%, 80%); }
-#role_Communist { background-color: hsl(0, 80%, 80%); }
-#turn_info { background-color: white; }
-/*.aside_events {
- font-family: "Source Sans";
- font-style: normal;
- font-size: 16px;
- line-height: 1.5;
-}*/
-#deck_data {
- font-family: "Source Sans";
- font-style: normal;
- font-size: 16px;
- line-height: 1.5;
-}
-#deck_stat {padding-left: 5px; padding-bottom: 5px;}
-
-#tank {margin-right: 0;}
-
-#log { background-color: whitesmoke; }
-#log .h1 { font-weight: bold; padding-top:2px; padding-bottom:2px; text-align: center; }
-#log .h2 { padding-top:2px; padding-bottom:2px; text-align: center; }
-#log .h3 { text-align: center; }
-#log .h4 { text-decoration: underline; }
-#log .h5 { text-decoration: underline; }
-
-#log .h2 { background-color: hsl(0,0%,80%);}
-#log .h1 { background-color: hsl(0,0%,80%); }
-#log .h2.dem { background-color: hsl(200, 80%, 80%); }
-#log .h2.com { background-color: hsl(0, 80%, 80%); }
-#log .h3.democrat { background-color: hsl(210,30%,90%); }
-#log .h3.h2.communist { background-color: hsl(35,40%,90%); }
-
-#log div { padding-left: 20px; text-indent: -12px; }
-#log div.i { padding-left: 32px; text-indent: -12px; }
-#log div.ii { padding-left: 44px; text-indent: -12px; }
-
-
-#log .card_name { font-style: italic; }
-#log .card_name:hover { text-decoration: underline; }
-#log .space_tip:hover { cursor: pointer; text-decoration: underline; }
-
-/* Below currently not used
-#log .lord_tip:hover { cursor: pointer; text-decoration: underline; }
-
-#log .way_tip:hover { cursor: pointer; text-decoration: underline; } */
-
-.selected {
- cursor: pointer;
-}
-
-#log {
- font-variant-numeric: tabular-nums;
-}
-
-/* TOOLBAR */
-
-#toolbar {
- justify-content: space-evenly;
-}
-
-#prompt {
- display: flex;
- margin-left: auto;
-}
-
-#button {
- display: flex;
- margin-left: auto;
-}
-/* MAP */
-
-#map {
- margin: 0 auto ;
- position: relative;
- background-repeat: no-repeat;
- background-size: cover;
- width: 1275px; /* was 1275*/
- height: 2000px;
- /*border: solid black;*/
- overflow: clip;
- box-shadow: 0px 1px 10px #0008;
- /*z-index: 3;*/
-}
-
-#map { background-image: url(1989_map.jpg) }
-
-/* Containers to appear on hover*/
- #overlay {
- position: relative;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- /* background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent overlay */
- /* display: none;*/
- justify-content: center;
- align-items: center;
- text-align: left;
- }
-
-/* SPACES */
-
-.space-area {
- position: absolute;
- box-sizing: border-box;
- border: transparent red 2px;
-}
-
-/* PANELS AND HANDS */
-
-.panel {
- background-color: #555;
- display: inline-block;
-}
-
-.panel_header {
- background-color: #444;
- color: hsl(40, 60%, 90%);
- font-weight: bold;
- text-align: center;
- padding: 3px 1em;
-}
-
-.hide {
- display: none;
-}
-
-#events_panel, #played_card_panel, #table_panel {
- min-width: 200px;
- width: auto;
- /*display: inline-block;*/
- margin: 10px;
- border-radius: 5px;
-}
-
-#events {
- display: flex;
-}
-
-#discard_panel, #removed_panel {
- min-width: 200px;
- width: auto;
- display: inline-block;
- margin: 10px;
- border-radius: 5px;
-}
-
-#discard_panel.hide, #removed_panel.hide {
- display: none;
-}
-
-#hand_panel {
- margin: 10px;
- border-radius: 5px;
-}
-
-/* INFLUENCE MARKERS */
-
-.demInfl {
- position: absolute;
- box-sizing: border-box;
- bottom: 1px;
- left: 6px;
- height: 35px;
- width: 35px;
- border-radius: 5px;
-}
-
-.demInfl.controlled {
- background-image: url(images/US_blank.gif);
- background-size: contain;
-}
-
-
-.demInfl.uncontrolled {
- background-image: url(images/USd_blank.gif);
- background-size: contain;
-}
-
-.demInfl:hover {
- cursor: pointer;
-}
-
-.comInfl {
- position: absolute;
- box-sizing: border-box;
- bottom: 1px;
- right: 6px;
- height: 35px;
- width: 35px;
-}
-
-.comInfl:hover {
- cursor: pointer;
-}
-
-.comInfl.controlled {
- background-image: url(images/SV_blank.gif);
- background-size: contain;
-}
-
-
-.comInfl.uncontrolled {
- background-image: url(images/SVd_blank.gif);
- background-size: contain;
-}
-
-.demInflValue {
- position: absolute;
- box-sizing: border-box;
- font-family: 'Open Sans';
- font-size: 20px;
- font-weight: bold;
- top: 10px;
- left: 16px;
-}
-
-.demInflValue_10 {
- position: absolute;
- box-sizing: border-box;
- font-family: 'Open Sans';
- font-size: 20px;
- font-weight: bold;
- top: 10px;
- left: 10px;
-}
-
-.comInflValue {
- position: absolute;
- box-sizing: border-box;
- font-family: 'Open Sans';
- font-size: 20px;
- font-weight: bold;
- top: 12px;
- left: 74px;
-}
-
-.comInflValue_10 {
- position: absolute;
- box-sizing: border-box;
- font-family: 'Open Sans';
- font-size: 20px;
- font-weight: bold;
- top: 12px;
- left: 68px;
-}
-
-.comInflValue.controlled, .held {
- color: whitesmoke;
- text-shadow:
- 1px 1px 0 #c2272d, /* Right bottom */
- -1px 1px 0 #c2272d, /* Left bottom */
- 1px -1px 0 #c2272d, /* Right top */
- -1px -1px 0 #c2272d; /* Left top */
-}
-
-.comInflValue.uncontrolled {
- color: #c2272d;
- text-shadow:
- 1px 1px 0 #ffffff, /* Right bottom */
- -1px 1px 0 #ffffff, /* Left bottom */
- 1px -1px 0 #ffffff, /* Right top */
- -1px -1px 0 #ffffff; /* Left top */
-}
-
-.comInflValue_10.controlled, .held {
- color: whitesmoke;
- text-shadow:
- 1px 1px 0 #c2272d, /* Right bottom */
- -1px 1px 0 #c2272d, /* Left bottom */
- 1px -1px 0 #c2272d, /* Right top */
- -1px -1px 0 #c2272d; /* Left top */
-}
-
-.comInflValue_10.uncontrolled {
- color: #c2272d;
- text-shadow:
- 1px 1px 0 #ffffff, /* Right bottom */
- -1px 1px 0 #ffffff, /* Left bottom */
- 1px -1px 0 #ffffff, /* Right top */
- -1px -1px 0 #ffffff; /* Left top */
-}
-
-
-/* GAME MARKERS */
-
-.t0 {left: 511px}
-.t1 {left: 511px}
-.t2 {left: 553px}
-.t3 {left: 595px}
-.t4 {left: 637px}
-.t5 {left: 679px}
-.t6 {left: 721px}
-.t7 {left: 763px}
-.t8 {left: 805px}
-.t9 {left: 847px}
-.t10 {left: 889px}
-
-#turn-tracker {
- position:absolute;
- top: 65px;
- height: 35px;
- width: 36px;
- /*display: block;*/
-}
-
-.r0 {left: 554px}
-.r1 {left: 554px}
-.r2 {left: 596px}
-.r3 {left: 638px}
-.r4 {left: 680px}
-.r5 {left: 722px}
-.r6 {left: 764px}
-.r7 {left: 806px}
-.r8 {left: 848px}
-
-.dem-action-round-tracker { background-image: url(images/US_Action_Round.gif);}
-.com-action-round-tracker { background-image: url(images/SV_Action_Round.gif);}
-
-#action-round-tracker {
- position: absolute;
- top: 114px;
- height: 30px;
- width: 35px;
- background-size: cover;
-}
-
-
-
-#stability-track {
- position:absolute;
- left: 1085px;
- height: 35px;
- width: 35px;
-}
-
-.s0 {top: 853px}
-.s1 {top: 896px}
-.s2 {top: 939px}
-.s3 {top: 982px}
-.s4 {top: 1025px}
-
-
-.tst0 {left: 0}
-.tst1 {left: 38px}
-.tst2 {left: 93px}
-.tst3 {left: 148px}
-.tst4 {left: 203px}
-.tst5 {left: 258px}
-.tst6 {left: 313px}
-.tst7 {left: 368px}
-.tst8 {left: 436px}
-
-#dem-TST {
- position: absolute;
- top: 1680px;
- height: 35px;
- width: 35px;
-}
-
-#com-TST {
- position: absolute;
- top: 1782px;
- height: 35px;
- width: 35px;
-}
-
-.vp0 {top: 1913px;
-left: 660px}
-
-.vp-20, .vp-18, .vp-16, .vp-14, .vp-12, .vp-10, .vp-8, .vp-6, .vp-4, .vp-2, .vp1, .vp3, .vp5, .vp7, .vp9, .vp11, .vp13, .vp15, .vp17, .vp19 {top: 1889px}
-.vp-19, .vp-17, .vp-15, .vp-13, .vp-11, .vp-9, .vp-7, .vp-5, .vp-3, .vp-1, .vp2, .vp4, .vp6, .vp8, .vp10, .vp12, .vp14, .vp16, .vp18, .vp20 {top: 1938px}
-
-.vp-21 {top: 1912px; left: 117px}
-.vp21 {top: 1912px; left: 1182px}
-
-.vp-20 {left: 165px}
-.vp-19 {left: 189px}
-.vp-18 {left: 214px}
-.vp-17 {left: 238px}
-.vp-16 {left: 263px}
-.vp-15 {left: 287px}
-.vp-14 {left: 312px}
-.vp-13 {left: 336px}
-.vp-12 {left: 361px}
-.vp-11 {left: 385px}
-.vp-10 {left: 410px}
-.vp-9 {left: 434px}
-.vp-8 {left: 459px}
-.vp-7 {left: 483px}
-.vp-6 {left: 508px}
-.vp-5 {left: 532px}
-.vp-4 {left: 557px}
-.vp-3 {left: 581px}
-.vp-2 {left: 606px}
-.vp-1 {left: 630px}
-.vp1 {left: 692px}
-.vp2 {left: 717px}
-.vp3 {left: 741px}
-.vp4 {left: 766px}
-.vp5 {left: 790px}
-.vp6 {left: 815px}
-.vp7 {left: 839px}
-.vp8 {left: 864px}
-.vp9 {left: 888px}
-.vp10 {left: 913px}
-.vp11 {left: 937px}
-.vp12 {left: 962px}
-.vp13 {left: 986px}
-.vp14 {left: 1011px}
-.vp15 {left: 1035px}
-.vp16 {left: 1060px}
-.vp17 {left: 1084px}
-.vp18 {left: 1109px}
-.vp19 {left: 1133px}
-.vp20 {left: 1158px}
-
-#vp {
- position: absolute;
- height: 40px;
- width: 40px;
-}
-
-.marker {
- position: absolute;
- height: 30px;
- width: 30px;
-}
-
-.revolution {background-image: url(images/US_blank.gif); background-size: contain}
-.held {background-image: url(images/SV_blank.gif); background-size: contain}
-
-.germany {top: 127px; left: 439px}
-.poland { top: 232px; left: 934px}
-.czech {top: 494px; left: 362px}
-.hungary {top: 1041px; left: 813px}
-.romania {top: 1063px; left: 1012px}
-.bulgaria {top: 1578px; left: 720px}
-
-.times_held {
- position: absolute;
- font-family: 'Open Sans';
- font-size: 20px;
- font-weight: bold;
- top: -18px;
- left: 8px
-}
-
-.outlined_text {
- text-shadow:
- 1px 1px 0 #ffffff, /* Right bottom */
- -1px 1px 0 #ffffff, /* Left bottom */
- 1px -1px 0 #ffffff, /* Right top */
- -1px -1px 0 #ffffff; /* Left top */
-}
-
-/* ============= EVENT MARKERS ========== */
-
-.event-marker {
- display: none;
- position: absolute;
- height: 30px;
- width: 30px;
- transition: transform 0.3s ease;
-}
-
-.event-marker:hover {
- cursor: pointer;
- transform: scale(2);
- z-index: 1;
-}
-
-.event-marker.aside {
- border: solid black 1.5px;
- margin: 3px;
- position: relative;
-}
-
-#turn_info {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
-}
-
-#turn_info > div {
- display: flex;
- margin-bottom: 8px;
- gap: 4px;
-}
-
-#turn_info > img {
- display: block;
-
-}
-
-/*Solidarity legalised*/
-#event_2 {
- top: 216px;
- left: 612px;
-}
-
-/*Systematisation*/
-#event_69 {
- height: 65px;
- width: 65px;
-}
-
-/*The Tyrant is Gone*/
-#event_97 {
- height: 40px;
- width: 40px;
-}
-
-/*The Wall*/
-#event_9 {
- top: 143px;
- left: 170px;
-}
-
-
-/* =========== CARDS ================= */
-/*
-.playedCard {
- display: flex;
- margin: auto;
- height: 300px;
-}*/
-
-.hand_card {
- background-size: contain;
- height: 250px;
- margin: 10px;
- border-radius: 5px;
- transition: transform .3s ease 0.5s;
-}
-
-.hand_card:hover {
- cursor: pointer;
- /*transform: scale(1.75);*/
-}
-
-.zoom {
- transform: scale(1.75)
-}
-
-.power_card {
- background-size: contain;
- height: 250px;
- margin: 10px;
- border-radius: 5px;
-}
-
-.discard_card, .event_card {
- background-size: contain;
- height: 150px;
- padding: 5px;
- border-radius: 5px;
- transition: transform .3s ease;
-}
-
-.discard_card:hover, .event_card:hover {
- cursor: pointer;
- transform: scale(2);
-}
-
-.selected.space-area {
- background-color: #0002;
- outline: solid white 2px;
- /*box-shadow: 0 0 4px white; */
- border-radius: 10px 10px 0 0;
-}
-
-.space-area.tip {
- background-color: #ff08;
- outline: solid white 2px;
- box-shadow: 0 0 8px #ff08;
- border-radius: 10px 10px 0 0;
-}
-
-.selected.hand_card {
- outline: solid silver 3px;
- /*box-shadow: 0 0 4px white; */
- border-radius: 18px;
-}
-
-
-.selected.power_card {
- outline: solid silver 3px;
- /*box-shadow: 0 0 4px white; */
- border-radius: 18px;
-}
-
-/* =============== OTHER ===============*/
-#space-characteristics {display: none}
-
-/* =============== CARD IMAGES =========*/
-
-#tooltip {
- position: fixed;
- pointer-events: none;
- z-index: 600;
- right: 240px;
- top: 60px;
-}
-
-.card {
- background-size: cover;
- background-repeat: no-repeat;
- width: 250px;
- height: 350px;
- border-radius: 16px;
- box-shadow: 1px 2px 4px #0004;
-}
-
-.card_1 {background-image: url(cards/e1.gif)}
-.card_2 {background-image: url(cards/e2.gif)}
-.card_3 {background-image: url(cards/e3.gif)}
-.card_4 {background-image: url(cards/e4.gif)}
-.card_5 {background-image: url(cards/e5.gif)}
-.card_6 {background-image: url(cards/e6.gif)}
-.card_7 {background-image: url(cards/e7.gif)}
-.card_8 {background-image: url(cards/e8.gif)}
-.card_9 {background-image: url(cards/e9.gif)}
-.card_10 {background-image: url(cards/e10.gif)}
-.card_11 {background-image: url(cards/e11.gif)}
-.card_12 {background-image: url(cards/e12.gif)}
-.card_13 {background-image: url(cards/e13.gif)}
-.card_14 {background-image: url(cards/e14.gif)}
-.card_15 {background-image: url(cards/e15.gif)}
-.card_16 {background-image: url(cards/e16.gif)}
-.card_17 {background-image: url(cards/e17.gif)}
-.card_18 {background-image: url(cards/e18.gif)}
-.card_19 {background-image: url(cards/e19.gif)}
-.card_20 {background-image: url(cards/e20.gif)}
-.card_21 {background-image: url(cards/e21.gif)}
-.card_22 {background-image: url(cards/e22.gif)}
-.card_23 {background-image: url(cards/e23.gif)}
-.card_24 {background-image: url(cards/e24.gif)}
-.card_25 {background-image: url(cards/e25.gif)}
-.card_26 {background-image: url(cards/e26.gif)}
-.card_27 {background-image: url(cards/e27.gif)}
-.card_28 {background-image: url(cards/e28.gif)}
-.card_29 {background-image: url(cards/e29.gif)}
-.card_30 {background-image: url(cards/e30.gif)}
-.card_31 {background-image: url(cards/e31.gif)}
-.card_32 {background-image: url(cards/e32.gif)}
-.card_33 {background-image: url(cards/e33.gif)}
-.card_34 {background-image: url(cards/e34.gif)}
-.card_35 {background-image: url(cards/e35.gif)}
-.card_36 {background-image: url(cards/e36.gif)}
-.card_37 {background-image: url(cards/e37.gif)}
-.card_38 {background-image: url(cards/e38.gif)}
-.card_39 {background-image: url(cards/e39.gif)}
-.card_40 {background-image: url(cards/e40.gif)}
-.card_41 {background-image: url(cards/e41.gif)}
-.card_42 {background-image: url(cards/e42.gif)}
-.card_43 {background-image: url(cards/e43.gif)}
-.card_44 {background-image: url(cards/e44.gif)}
-.card_45 {background-image: url(cards/e45.gif)}
-.card_46 {background-image: url(cards/e46.gif)}
-.card_47 {background-image: url(cards/e47.gif)}
-.card_48 {background-image: url(cards/e48.gif)}
-.card_49 {background-image: url(cards/e49.gif)}
-.card_50 {background-image: url(cards/e50.gif)}
-.card_51 {background-image: url(cards/e51.gif)}
-.card_52 {background-image: url(cards/e52.gif)}
-.card_53 {background-image: url(cards/e53.gif)}
-.card_54 {background-image: url(cards/e54.gif)}
-.card_55 {background-image: url(cards/e55.gif)}
-.card_56 {background-image: url(cards/e56.gif)}
-.card_57 {background-image: url(cards/e57.gif)}
-.card_58 {background-image: url(cards/e58.gif)}
-.card_59 {background-image: url(cards/e59.gif)}
-.card_60 {background-image: url(cards/e60.gif)}
-.card_61 {background-image: url(cards/e61.gif)}
-.card_62 {background-image: url(cards/e62.gif)}
-.card_63 {background-image: url(cards/e63.gif)}
-.card_64 {background-image: url(cards/e64.gif)}
-.card_65 {background-image: url(cards/e65.gif)}
-.card_66 {background-image: url(cards/e66.gif)}
-.card_67 {background-image: url(cards/e67.gif)}
-.card_68 {background-image: url(cards/e68.gif)}
-.card_69 {background-image: url(cards/e69.gif)}
-.card_70 {background-image: url(cards/e70.gif)}
-.card_71 {background-image: url(cards/e71.gif)}
-.card_72 {background-image: url(cards/e72.gif)}
-.card_73 {background-image: url(cards/e73.gif)}
-.card_74 {background-image: url(cards/e74.gif)}
-.card_75 {background-image: url(cards/e75.gif)}
-.card_76 {background-image: url(cards/e76.gif)}
-.card_77 {background-image: url(cards/e77.gif)}
-.card_78 {background-image: url(cards/e78.gif)}
-.card_79 {background-image: url(cards/e79.gif)}
-.card_80 {background-image: url(cards/e80.gif)}
-.card_81 {background-image: url(cards/e81.gif)}
-.card_82 {background-image: url(cards/e82.gif)}
-.card_83 {background-image: url(cards/e83.gif)}
-.card_84 {background-image: url(cards/e84.gif)}
-.card_85 {background-image: url(cards/e85.gif)}
-.card_86 {background-image: url(cards/e86.gif)}
-.card_87 {background-image: url(cards/e87.gif)}
-.card_88 {background-image: url(cards/e88.gif)}
-.card_89 {background-image: url(cards/e89.gif)}
-.card_90 {background-image: url(cards/e90.gif)}
-.card_91 {background-image: url(cards/e91.gif)}
-.card_92 {background-image: url(cards/e92.gif)}
-.card_93 {background-image: url(cards/e93.gif)}
-.card_94 {background-image: url(cards/e94.gif)}
-.card_95 {background-image: url(cards/e95.gif)}
-.card_96 {background-image: url(cards/e96.gif)}
-.card_97 {background-image: url(cards/e97.gif)}
-.card_98 {background-image: url(cards/e98.gif)}
-.card_99 {background-image: url(cards/e99.gif)}
-.card_100 {background-image: url(cards/e100.gif)}
-.card_101 {background-image: url(cards/e101.gif)}
-.card_102 {background-image: url(cards/e102.gif)}
-.card_103 {background-image: url(cards/e103.gif)}
-.card_104 {background-image: url(cards/e104.gif)}
-.card_105 {background-image: url(cards/e105.gif)}
-.card_106 {background-image: url(cards/e106.gif)}
-.card_107 {background-image: url(cards/e107.gif)}
-.card_108 {background-image: url(cards/e108.gif)}
-.card_109 {background-image: url(cards/e109.gif)}
-.card_110 {background-image: url(cards/e110.gif)}
+main { background-color: slategray; }
+
+body.Democrat header.your_turn { background-color: hsl(206, 85%, 75%); }
+body.Communist header.your_turn { background-color: hsl(355, 70%, 75%); }
+
+#role_Democrat { background-color: hsl(206, 80%, 80%); }
+#role_Communist { background-color: hsl(355, 70%, 80%); }
+
+/* LOG */
+
+#log { font-variant-numeric: tabular-nums; }
+
+#log .die {
+ display: inline-block;
+ vertical-align: -3px;
+ width: 12px;
+ height: 12px;
+ background-size: 600% 100%;
+ background-repeat: no-repeat;
+ background-image: url(images/die_black_pips.svg);
+ background-color: #fff;
+ border: 1px solid #444;
+}
+
+#log .d0 { background-position: -100% 0 }
+#log .d1 { background-position: 0% 0; }
+#log .d2 { background-position: 20% 0; }
+#log .d3 { background-position: 40% 0; }
+#log .d4 { background-position: 60% 0; }
+#log .d5 { background-position: 80% 0; }
+#log .d6 { background-position: 100% 0; }
+
+#log .h1 { font-weight: bold; padding-top:2px; padding-bottom:2px; text-align: center; }
+#log .h2 { padding-top:2px; padding-bottom:2px; text-align: center; }
+#log .h3 { text-align: center; }
+#log .h4 { text-decoration: underline; }
+#log .h5 { text-decoration: underline; }
+
+#log { background-color: floralwhite }
+#log .h1 { background-color: tan }
+#log .h2 { background-color: wheat }
+#log .h3 { background-color: wheat }
+#log .h2.dem { background-color: hsl(206, 85%, 80%); }
+#log .h2.com { background-color: hsl(355, 70%, 80%); }
+
+#log div { padding-left: 20px; text-indent: -12px; }
+#log div.i { padding-left: 32px; text-indent: -12px; }
+#log div.ii { padding-left: 44px; text-indent: -12px; }
+
+#log .card_name { font-style: italic; }
+#log .card_name:hover { text-decoration: underline; }
+#log .space_tip:hover { cursor: pointer; text-decoration: underline; }
+
+/* MAP */
+
+#mapwrap {
+ width: 1650px;
+ height: 2550px;
+}
+
+#map {
+ width: 1650px;
+ height: 2550px;
+ background-size: 1650px 2550px;
+ box-shadow: 0px 1px 10px #0008;
+}
+
+#map { background-image: url("map75.avif") }
+@media (min-resolution: 97dpi) {
+ #map { background-image: url("map150.avif") }
+}
+
+/* SPACES */
+
+.space {
+ position: absolute;
+ box-sizing: border-box;
+ border: 4px solid transparent;
+}
+
+.space.action {
+ border-color: white;
+ box-shadow: 0 0 0 1px black, inset 0 0 0 1px black;
+}
+
+.space.East_Germany.action { border-color: white; }
+.space.Poland.action { border-color: yellow; }
+.space.Czechoslovakia.action { border-color: lightgreen; }
+.space.Hungary.action { border-color: gold; }
+.space.Romania.action { border-color: peachpuff; }
+.space.Bulgaria.action { border-color: palegreen; }
+
+.space.selected {
+ border-color: aqua;
+ box-shadow: 0 0 0 1px black, inset 0 0 0 1px black;
+}
+
+.space.tip {
+ border-color: lime;
+ box-shadow: 0 0 0 1px black, inset 0 0 0 1px black;
+}
+
+/* MARKERS */
+
+/* node tools/gencolors.js */
+.marker { background-color: #ffffff; border-color: #eeeeee #8a8a8a #8a8a8a #eeeeee; box-shadow: 0 0 0 1px #323232, 1px 2px 4px #0008; }
+.demInfl.ctl { background-color: #c4e2f6; border-color: #e6ffff #8ca8bb #8ca8bb #e6ffff; box-shadow: 0 0 0 1px #274050, 1px 2px 4px #0008; }
+.comInfl.ctl { background-color: #c1272d; border-color: #e74e4c #9c0009 #9c0009 #e74e4c; box-shadow: 0 0 0 1px #520000, 1px 2px 4px #0008; }
+#marker_action_round.dem { background-color: #147fc0; border-color: #44a3e6 #005c9b #005c9b #44a3e6; box-shadow: 0 0 0 1px #001a54, 1px 2px 4px #0008; }
+#marker_action_round.com { background-color: #c1272d; border-color: #e74e4c #9c0009 #9c0009 #e74e4c; box-shadow: 0 0 0 1px #520000, 1px 2px 4px #0008; }
+#marker_vp, #marker_turn { background-color: #fadb04; border-color: #ffff51 #c0a100 #c0a100 #ffff51; box-shadow: 0 0 0 1px #563600, 1px 2px 4px #0008; }
+#marker_com_tst { background-color: #f26649; border-color: #ff9273 #c2391c #c2391c #ff9273; box-shadow: 0 0 0 1px #640000, 1px 2px 4px #0008; }
+#marker_dem_tst { background-color: #c4e2f4; border-color: #e6ffff #8ca8ba #8ca8ba #e6ffff; box-shadow: 0 0 0 1px #27404f, 1px 2px 4px #0008; }
+
+#event_reminder_list {
+ position: absolute;
+ display: flex;
+ flex-wrap: wrap;
+ gap: 5px;
+ top: 1650px;
+ left: 600px;
+ width: 200px;
+}
+
+.marker {
+ position: absolute;
+ pointer-events: none;
+ width: 45px;
+ height: 45px;
+ border: 2px solid;
+ border-color: #eee #bbb #bbb #eee;
+ box-shadow: 0 0 0 1px #444;
+ transition-property: top, left;
+ transition-duration: 700ms;
+ transition-timing-function: ease;
+}
+
+.demInfl { background-color: #fff; }
+.comInfl { background-color: #fff; }
+.demInfl.ctl { background-color: #147fc0; }
+.comInfl.ctl { background-color: #c1272d; }
+
+.demInfl.v1 { background-image: url(markers75/di1.png) }
+.demInfl.v2 { background-image: url(markers75/di2.png) }
+.demInfl.v3 { background-image: url(markers75/di3.png) }
+.demInfl.v4 { background-image: url(markers75/di4.png) }
+.demInfl.v5 { background-image: url(markers75/di5.png) }
+.demInfl.v6 { background-image: url(markers75/di6.png) }
+.demInfl.v7 { background-image: url(markers75/di7.png) }
+.demInfl.v8 { background-image: url(markers75/di8.png) }
+.demInfl.ctl.v1 { background-image: url(markers75/dc1.png) }
+.demInfl.ctl.v2 { background-image: url(markers75/dc2.png) }
+.demInfl.ctl.v3 { background-image: url(markers75/dc3.png) }
+.demInfl.ctl.v4 { background-image: url(markers75/dc4.png) }
+.demInfl.ctl.v5 { background-image: url(markers75/dc5.png) }
+.demInfl.ctl.v6 { background-image: url(markers75/dc6.png) }
+.demInfl.ctl.v7 { background-image: url(markers75/dc7.png) }
+.demInfl.ctl.v8 { background-image: url(markers75/dc8.png) }
+
+.comInfl.v1 { background-image: url(markers75/ci1.png) }
+.comInfl.v2 { background-image: url(markers75/ci2.png) }
+.comInfl.v3 { background-image: url(markers75/ci3.png) }
+.comInfl.v4 { background-image: url(markers75/ci4.png) }
+.comInfl.v5 { background-image: url(markers75/ci5.png) }
+.comInfl.v6 { background-image: url(markers75/ci6.png) }
+.comInfl.v7 { background-image: url(markers75/ci7.png) }
+.comInfl.v8 { background-image: url(markers75/ci8.png) }
+.comInfl.ctl.v1 { background-image: url(markers75/cc1.png) }
+.comInfl.ctl.v2 { background-image: url(markers75/cc2.png) }
+.comInfl.ctl.v3 { background-image: url(markers75/cc3.png) }
+.comInfl.ctl.v4 { background-image: url(markers75/cc4.png) }
+.comInfl.ctl.v5 { background-image: url(markers75/cc5.png) }
+.comInfl.ctl.v6 { background-image: url(markers75/cc6.png) }
+.comInfl.ctl.v7 { background-image: url(markers75/cc7.png) }
+.comInfl.ctl.v8 { background-image: url(markers75/cc8.png) }
+
+#marker_turn { background-image: url(markers75/turn.png) }
+#marker_action_round.dem { background-image: url(markers75/action_round_blue.png) }
+#marker_action_round.com { background-image: url(markers75/action_round_red.png) }
+#marker_stability_track { background-image: url(markers75/ussr_stability_track.png) }
+#marker_dem_tst { background-image: url(markers75/ts_blue.png) }
+#marker_com_tst { background-image: url(markers75/ts_red.png) }
+#marker_vp { background-image: url(markers75/vp.png) }
+
+/* EVENT MARKERS */
+
+.marker.aside {
+ position: static;
+}
+
+#event_2 { background-image: url(markers75/event_solidarity_legalized.png) }
+#event_9 { background-image: url(markers75/event_the_wall.png) }
+#event_15 { background-image: url(markers75/event_honecker.png) }
+#event_24 { background-image: url(markers75/event_st_nicholas.png) }
+#event_26 { background-image: url(markers75/event_helsinki.png) }
+#event_39 { background-image: url(markers75/event_eco_glasnost.png) }
+#event_48 { background-image: url(markers75/event_we_are_the_people.png) }
+#event_49 { background-image: url(markers75/event_foreign_currency.png) }
+#event_53 { background-image: url(markers75/event_li_peng.png) }
+#event_58 { background-image: url(markers75/event_austria_hungary.png) }
+#event_59 { background-image: url(markers75/event_grenz_truppen.png) }
+#event_65 { background-image: url(markers75/event_pres_visit.png) }
+#event_69 { background-image: url(markers75/event_systematization.png) }
+#event_70 { background-image: url(markers75/event_securitate.png) }
+#event_73 { background-image: url(markers75/event_laszlo_tokes.png) }
+#event_97 { background-image: url(markers75/event_tyrant.png) }
+#event_100 { background-image: url(markers75/event_stand_fast.png) }
+#event_101 { background-image: url(markers75/event_elena.png) }
+#event_104 { background-image: url(markers75/event_nye_party.png) }
+
+/* Solidarity legalized */
+#event_2 { top: 265px; left: 778px; }
+
+/* The Wall */
+#event_9 { top: 175px; left: 216px; }
+
+/* Systematisation */
+#event_69 {height: 65px; width: 65px; background-size: cover;}
+
+/* CARD PANELS */
+
+.panel {
+ background-color: #607080;
+ max-width: 1650px;
+ margin: 24px auto;
+}
+
+.panel_header {
+ background-color: #506070;
+ color: white;
+ font-weight: bold;
+ padding: 3px;
+ text-align: center;
+}
+
+.panel_body {
+ margin-top: 3px;
+ display: flex;
+ flex-wrap: wrap;
+ padding: 16px;
+ gap: 16px;
+ min-height: 350px;
+}
+
+.panel_body.power {
+ min-height: 263px;
+}
+
+.panel.autohide:has(.panel_body:empty) {
+ display: none;
+}
+
+/* CARD IMAGES */
+
+#tooltip {
+ position: fixed;
+ pointer-events: none;
+ z-index: 600;
+ right: 240px;
+ top: 60px;
+}
+
+.card {
+ background-size: cover;
+ background-repeat: no-repeat;
+ background-color: #fffde9;
+ width: 250px;
+ height: 350px;
+ border-radius: 16px;
+ box-shadow: 0 0 0 1px #444, 1px 2px 4px #0004;
+}
+
+.power_card {
+ background-color: #093a5b;
+ width: 188px;
+ height: 263px;
+ border-radius: 12px;
+}
+
+.card.action {
+ box-shadow: 0 0 0 1px #444, 0 0 0 4px white;
+}
+
+.card.selected {
+ box-shadow: 0 0 0 1px #444, 0 0 0 4px yellow;
+}
+
+.card.event_0 { background-image: url(cards100/event_back.avif) }
+.card.event_1 { background-image: url(cards100/event_1.avif) }
+.card.event_2 { background-image: url(cards100/event_2.avif) }
+.card.event_3 { background-image: url(cards100/event_3.avif) }
+.card.event_4 { background-image: url(cards100/event_4.avif) }
+.card.event_5 { background-image: url(cards100/event_5.avif) }
+.card.event_6 { background-image: url(cards100/event_6.avif) }
+.card.event_7 { background-image: url(cards100/event_7.avif) }
+.card.event_8 { background-image: url(cards100/event_8.avif) }
+.card.event_9 { background-image: url(cards100/event_9.avif) }
+.card.event_10 { background-image: url(cards100/event_10.avif) }
+.card.event_11 { background-image: url(cards100/event_11.avif) }
+.card.event_12 { background-image: url(cards100/event_12.avif) }
+.card.event_13 { background-image: url(cards100/event_13.avif) }
+.card.event_14 { background-image: url(cards100/event_14.avif) }
+.card.event_15 { background-image: url(cards100/event_15.avif) }
+.card.event_16 { background-image: url(cards100/event_16.avif) }
+.card.event_17 { background-image: url(cards100/event_17.avif) }
+.card.event_18 { background-image: url(cards100/event_18.avif) }
+.card.event_19 { background-image: url(cards100/event_19.avif) }
+.card.event_20 { background-image: url(cards100/event_20.avif) }
+.card.event_21 { background-image: url(cards100/event_21.avif) }
+.card.event_22 { background-image: url(cards100/event_22.avif) }
+.card.event_23 { background-image: url(cards100/event_23.avif) }
+.card.event_24 { background-image: url(cards100/event_24.avif) }
+.card.event_25 { background-image: url(cards100/event_25.avif) }
+.card.event_26 { background-image: url(cards100/event_26.avif) }
+.card.event_27 { background-image: url(cards100/event_27.avif) }
+.card.event_28 { background-image: url(cards100/event_28.avif) }
+.card.event_29 { background-image: url(cards100/event_29.avif) }
+.card.event_30 { background-image: url(cards100/event_30.avif) }
+.card.event_31 { background-image: url(cards100/event_31.avif) }
+.card.event_32 { background-image: url(cards100/event_32.avif) }
+.card.event_33 { background-image: url(cards100/event_33.avif) }
+.card.event_34 { background-image: url(cards100/event_34.avif) }
+.card.event_35 { background-image: url(cards100/event_35.avif) }
+.card.event_36 { background-image: url(cards100/event_36.avif) }
+.card.event_37 { background-image: url(cards100/event_37.avif) }
+.card.event_38 { background-image: url(cards100/event_38.avif) }
+.card.event_39 { background-image: url(cards100/event_39.avif) }
+.card.event_40 { background-image: url(cards100/event_40.avif) }
+.card.event_41 { background-image: url(cards100/event_41.avif) }
+.card.event_42 { background-image: url(cards100/event_42.avif) }
+.card.event_43 { background-image: url(cards100/event_43.avif) }
+.card.event_44 { background-image: url(cards100/event_44.avif) }
+.card.event_45 { background-image: url(cards100/event_45.avif) }
+.card.event_46 { background-image: url(cards100/event_46.avif) }
+.card.event_47 { background-image: url(cards100/event_47.avif) }
+.card.event_48 { background-image: url(cards100/event_48.avif) }
+.card.event_49 { background-image: url(cards100/event_49.avif) }
+.card.event_50 { background-image: url(cards100/event_50.avif) }
+.card.event_51 { background-image: url(cards100/event_51.avif) }
+.card.event_52 { background-image: url(cards100/event_52.avif) }
+.card.event_53 { background-image: url(cards100/event_53.avif) }
+.card.event_54 { background-image: url(cards100/event_54.avif) }
+.card.event_55 { background-image: url(cards100/event_55.avif) }
+.card.event_56 { background-image: url(cards100/event_56.avif) }
+.card.event_57 { background-image: url(cards100/event_57.avif) }
+.card.event_58 { background-image: url(cards100/event_58.avif) }
+.card.event_59 { background-image: url(cards100/event_59.avif) }
+.card.event_60 { background-image: url(cards100/event_60.avif) }
+.card.event_61 { background-image: url(cards100/event_61.avif) }
+.card.event_62 { background-image: url(cards100/event_62.avif) }
+.card.event_63 { background-image: url(cards100/event_63.avif) }
+.card.event_64 { background-image: url(cards100/event_64.avif) }
+.card.event_65 { background-image: url(cards100/event_65.avif) }
+.card.event_66 { background-image: url(cards100/event_66.avif) }
+.card.event_67 { background-image: url(cards100/event_67.avif) }
+.card.event_68 { background-image: url(cards100/event_68.avif) }
+.card.event_69 { background-image: url(cards100/event_69.avif) }
+.card.event_70 { background-image: url(cards100/event_70.avif) }
+.card.event_71 { background-image: url(cards100/event_71.avif) }
+.card.event_72 { background-image: url(cards100/event_72.avif) }
+.card.event_73 { background-image: url(cards100/event_73.avif) }
+.card.event_74 { background-image: url(cards100/event_74.avif) }
+.card.event_75 { background-image: url(cards100/event_75.avif) }
+.card.event_76 { background-image: url(cards100/event_76.avif) }
+.card.event_77 { background-image: url(cards100/event_77.avif) }
+.card.event_78 { background-image: url(cards100/event_78.avif) }
+.card.event_79 { background-image: url(cards100/event_79.avif) }
+.card.event_80 { background-image: url(cards100/event_80.avif) }
+.card.event_81 { background-image: url(cards100/event_81.avif) }
+.card.event_82 { background-image: url(cards100/event_82.avif) }
+.card.event_83 { background-image: url(cards100/event_83.avif) }
+.card.event_84 { background-image: url(cards100/event_84.avif) }
+.card.event_85 { background-image: url(cards100/event_85.avif) }
+.card.event_86 { background-image: url(cards100/event_86.avif) }
+.card.event_87 { background-image: url(cards100/event_87.avif) }
+.card.event_88 { background-image: url(cards100/event_88.avif) }
+.card.event_89 { background-image: url(cards100/event_89.avif) }
+.card.event_90 { background-image: url(cards100/event_90.avif) }
+.card.event_91 { background-image: url(cards100/event_91.avif) }
+.card.event_92 { background-image: url(cards100/event_92.avif) }
+.card.event_93 { background-image: url(cards100/event_93.avif) }
+.card.event_94 { background-image: url(cards100/event_94.avif) }
+.card.event_95 { background-image: url(cards100/event_95.avif) }
+.card.event_96 { background-image: url(cards100/event_96.avif) }
+.card.event_97 { background-image: url(cards100/event_97.avif) }
+.card.event_98 { background-image: url(cards100/event_98.avif) }
+.card.event_99 { background-image: url(cards100/event_99.avif) }
+.card.event_100 { background-image: url(cards100/event_100.avif) }
+.card.event_101 { background-image: url(cards100/event_101.avif) }
+.card.event_102 { background-image: url(cards100/event_102.avif) }
+.card.event_103 { background-image: url(cards100/event_103.avif) }
+.card.event_104 { background-image: url(cards100/event_104.avif) }
+.card.event_105 { background-image: url(cards100/event_105.avif) }
+.card.event_106 { background-image: url(cards100/event_106.avif) }
+.card.event_107 { background-image: url(cards100/event_107.avif) }
+.card.event_108 { background-image: url(cards100/event_108.avif) }
+.card.event_109 { background-image: url(cards100/event_109.avif) }
+.card.event_110 { background-image: url(cards100/event_110.avif) }
+
+.card.power_0 { background-image: url(cards75/power_back.avif) }
+.card.power_1 { background-image: url(cards75/power_1_6.avif) }
+.card.power_2 { background-image: url(cards75/power_1_6.avif) }
+.card.power_3 { background-image: url(cards75/power_1_6.avif) }
+.card.power_4 { background-image: url(cards75/power_1_6.avif) }
+.card.power_5 { background-image: url(cards75/power_1_6.avif) }
+.card.power_6 { background-image: url(cards75/power_1_6.avif) }
+.card.power_7 { background-image: url(cards75/power_7_8.avif) }
+.card.power_8 { background-image: url(cards75/power_7_8.avif) }
+.card.power_9 { background-image: url(cards75/power_9_10.avif) }
+.card.power_10 { background-image: url(cards75/power_9_10.avif) }
+.card.power_11 { background-image: url(cards75/power_11_14.avif) }
+.card.power_12 { background-image: url(cards75/power_11_14.avif) }
+.card.power_13 { background-image: url(cards75/power_11_14.avif) }
+.card.power_14 { background-image: url(cards75/power_11_14.avif) }
+.card.power_15 { background-image: url(cards75/power_15_18.avif) }
+.card.power_16 { background-image: url(cards75/power_15_18.avif) }
+.card.power_17 { background-image: url(cards75/power_15_18.avif) }
+.card.power_18 { background-image: url(cards75/power_15_18.avif) }
+.card.power_19 { background-image: url(cards75/power_19_20.avif) }
+.card.power_20 { background-image: url(cards75/power_19_20.avif) }
+.card.power_21 { background-image: url(cards75/power_21_22.avif) }
+.card.power_22 { background-image: url(cards75/power_21_22.avif) }
+.card.power_23 { background-image: url(cards75/power_23_26.avif) }
+.card.power_24 { background-image: url(cards75/power_23_26.avif) }
+.card.power_25 { background-image: url(cards75/power_23_26.avif) }
+.card.power_26 { background-image: url(cards75/power_23_26.avif) }
+.card.power_27 { background-image: url(cards75/power_27_30.avif) }
+.card.power_28 { background-image: url(cards75/power_27_30.avif) }
+.card.power_29 { background-image: url(cards75/power_27_30.avif) }
+.card.power_30 { background-image: url(cards75/power_27_30.avif) }
+.card.power_31 { background-image: url(cards75/power_31_33.avif) }
+.card.power_32 { background-image: url(cards75/power_31_33.avif) }
+.card.power_33 { background-image: url(cards75/power_31_33.avif) }
+.card.power_34 { background-image: url(cards75/power_34_36.avif) }
+.card.power_35 { background-image: url(cards75/power_34_36.avif) }
+.card.power_36 { background-image: url(cards75/power_34_36.avif) }
+.card.power_37 { background-image: url(cards75/power_37.avif) }
+.card.power_38 { background-image: url(cards75/power_38.avif) }
+.card.power_39 { background-image: url(cards75/power_39.avif) }
+.card.power_40 { background-image: url(cards75/power_40.avif) }
+.card.power_41 { background-image: url(cards75/power_41.avif) }
+.card.power_42 { background-image: url(cards75/power_42.avif) }
+.card.power_43 { background-image: url(cards75/power_43.avif) }
+.card.power_44 { background-image: url(cards75/power_44.avif) }
+.card.power_45 { background-image: url(cards75/power_45.avif) }
+.card.power_46 { background-image: url(cards75/power_46.avif) }
+.card.power_47 { background-image: url(cards75/power_47.avif) }
+.card.power_48 { background-image: url(cards75/power_48.avif) }
+.card.power_49 { background-image: url(cards75/power_49.avif) }
+.card.power_50 { background-image: url(cards75/power_50.avif) }
+.card.power_51 { background-image: url(cards75/power_51.avif) }
+.card.power_52 { background-image: url(cards75/power_52.avif) } \ No newline at end of file
diff --git a/play.html b/play.html
index a9026e6..713bb8b 100644
--- a/play.html
+++ b/play.html
@@ -1,269 +1,133 @@
-<!DOCTYPE html>
-<!-- vim:set nowrap: -->
-<html lang="en">
-<head>
-<meta name="viewport" content="width=device-width, height=device-height, user-scalable=no, interactive-widget=resizes-content, viewport-fit=cover">
-<meta name="theme-color" content="#444">
-<meta charset="utf-8">
-<title>1989</title>
-<link rel="icon" href="favicon.png">
-<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap" rel="stylesheet">
-<link rel="stylesheet" href="/fonts/fonts.css">
-<link rel="stylesheet" href="/common/client.css">
-<link rel="stylesheet" href="play.css">
-<script defer src="/common/client.js"></script>
-<script defer src="data.js"></script>
-<!-- <script defer src="rules.js"></script> -->
-<script defer src="play.js"></script>
-
-</head>
-
-<body>
-<div id="tooltip" class="card hide"></div>
-
-<menu id="popup" class="popup">
- <li class="title">TITLE
- <li class="separator">
- <li data-action="card_event"><span>&#x1f3b4;</span> Event
- <li data-action="card_influence"><span>&#x2B50;</span> Place SPs
- <li data-action="card_support_check"><span>&#x1F4AA;</span> Support Check
- <li data-action="card_tst"><span><img id = "tank" src="images/tank2.png" style="width:20px; height: 30px; vertical-align: middle;"></span> Tiananmen Square Track
-</menu>
-
-<menu id="popup_opp_event" class="popup">
- <li class="title">TITLE
- <li class="separator">
- <li data-action="card_opp_event"><span>&#x1f3b4;</span> Resolve Opponent Event
- <li data-action="card_influence"><span>&#x2B50;</span> Place SPs
- <li data-action="card_support_check"><span>&#x1F4AA;</span> Support Check
- <li data-action="card_tst"><span><img src="images/tank1.png" style="width:16px; height: 16px; vertical-align: middle;"></span> Tiananmen Square Track
-</menu>
-
-<menu id="popup_ceh_check" class="popup">
- <li class="title">TITLE
- <li class="separator">
- <li data-action="card_ceh"><span>&#x1f3b4;</span> Play with Common European Home
- <li data-action="card_opp_event"><span>&#x1f3b4;</span> Resolve Opponent Event
- <li data-action="card_influence"><span>&#x2B50;</span> Place SPs
- <li data-action="card_support_check"><span>&#x1F4AA;</span> Support Check
- <li data-action="card_tst"><span>&#x1F6E4;</span> Tiananmen Square Track
-</menu>
-
-<menu id="popup_tst_7" class="popup">
- <li class="title">TITLE
- <li class="separator">
- <li data-action="card_tst_7"><span>&#x1f3b4;</span> Cancel Opponent Event
- <li data-action="card_opp_event"><span>&#x1f3b4;</span> Resolve Opponent Event
- <li data-action="card_influence"><span>&#x2B50;</span> Place SPs
- <li data-action="card_support_check"><span>&#x1F4AA;</span> Support Check
- <li data-action="card_tst"><span><img src="images/tank1.png" style="width:16px; height: 16px; vertical-align: middle;"></span> Tiananmen Square Track
-</menu>
-
-<menu id="popup_tst_8" class="popup">
- <li class="title">TITLE
- <li class="separator">
- <li data-action="card_tst_8"><span>&#x1f3b4;</span> Event and Operations
- <li data-action="card_event"><span>&#x1f3b4;</span> Event
- <li data-action="card_influence"><span>&#x2B50;</span> Place SPs
- <li data-action="card_support_check"><span>&#x1F4AA;</span> Support Check
- <li data-action="card_tst"><span><img src="images/tank1.png" style="width:16px; height: 16px; vertical-align: middle;"></span> Tiananmen Square Track
-</menu>
-
-<menu id="popup_tst_7_8" class="popup">
- <li class="title">TITLE
- <li class="separator">
- <li data-action="card_tst_7"><span>&#x1f3b4;</span> Cancel Opponent Event
- <li data-action="card_opp_event"><span>&#x1f3b4;</span> Resolve Opponent Event
- <li data-action="card_tst_8"><span>&#x1f3b4;</span> Event and Operations
- <li data-action="card_influence"><span>&#x2B50;</span> Place SPs
- <li data-action="card_support_check"><span>&#x1F4AA;</span> Support Check
- <li data-action="card_tst"><span><img src="images/tank1.png" style="width:16px; height: 16px; vertical-align: middle;"></span> Tiananmen Square Track
-</menu>
-
-<header>
- <div id="toolbar">
- <details>
- <summary><img src="images/cog.svg" width="50" height="50"></summary> <!-- Not sure why this is so big! -->
- <menu>
- <li>Rules of Play
- <li>Background Book
- <li>Reference Sheets
-
- </menu>
- </details>
- <button onclick="toggle_pieces()"><img src="images/earth-africa-europe.svg"></button>
- <button onclick="toggle_discard()"><img src="images/bin.png"></button>
- <button onclick="toggle_removed()"><img src="images/remove.png"></button>
- </div>
-</header>
-
-<aside>
- <div id="roles">
- <div class="role" id="role_Democrat">
- <div class="role_name">Democrat</div>
- <div class="role_stat" id="role_stat_dem">0 cards in hand</div>
- <div class="role_user">-</div>
- </div>
- <div class="role" id="role_Communist">
- <div class="role_name">Communist</div>
- <div class="role_stat" id="role_stat_com">0 cards in hand</div>
- <div class="role_user">-</div>
- </div>
- <div class="role" id="deck_data">
- <div class="deck_name" id="deck_stat">Strategy deck:</div>
- <div class="role_stat" id="deck_length">0 cards</div>
- </div>
- </div>
- <div id="log"></div>
-</aside>
-
-<main data-min-zoom="0.5" data-max-zoom = "2.0">
-
-<!-- MAP, EVENTS -->
-<section id="sec_map">
-
-<div class="map" id="map">
- <div id="pieces">
- <div id="overlay">
- <h2 id="space-characteristics"></h2>
- <img id="turn-tracker" class="hide" src="images/Turn.gif">
- <div class="us-action-round-tracker hide" id="action-round-tracker"></div>
- <img id="stability-track" class="hide" src="images/SV_Stability.gif">
- <img id="dem-TST" class="hide" src="images/US_Tiananmen_Square.gif">
- <img id="com-TST" class="hide" src="images/SV_Tiananmen_Square.gif">
- <img id="vp" class="hide" src="images/VP.gif">
- <div class="germany marker" id="East_Germany">
- <p class="times_held hide" id="East_Germany_times_held">1</p></div>
- <div class="poland marker" id="Poland">
- <p class="times_held hide" id="Poland_times_held">1</p></div>
- <div class="czech marker" id="Czechoslovakia">
- <p class="times_held hide" id="Czechoslovakia_times_held">1</p></div>
- <div class="hungary marker" id="Hungary">
- <p class="times_held hide" id="Hungary_times_held">1</p></div>
- <div class="romania marker" id="Romania">
- <p class="times_held hide" id="Romania_times_held">1</p></div>
- <div class="bulgaria marker" id="Bulgaria">
- <p class="times_held hide" id="Bulgaria_times_held">1</p></div>
-
- <!-- PERMANENT EVENT MARKERS ON THE BOARD -->
-
-
- <img id="event_2" class="event-marker" src = "images/Event_Marker_Solidarity_Leg.gif">
- <img id="event_69" class="event-marker" src="images/Event_Marker_Systematizatio.gif">
- <img id="event_97" class="event-marker" src="images/Event_Marker_The_Tyrant_Is_.gif">
- <img id="event_9" class="event-marker" src="images/Event_Marker_The_Wall.gif">
-
- </div>
- <div id="counters"></div>
- </div>
-</div>
-</section>
-
-
-<!-- EVENTS IN PLAY -->
-<section id = "sec_events">
- <div id="events_panel" class="panel hide">
- <div id="events_header" class="panel_header">Event Markers</div>
- <div id="events" class="panel_body">
- <img id="event_15" class="event-marker aside" src="images/Event_Marker_Honecker.gif">
- <img id="event_24" class="event-marker aside" src="images/Event_Marker_St_Nicholas.gif">
- <img id="event_26" class="event-marker aside" src="images/Event_Marker_Helsinki.gif">
- <img id="event_39" class="event-marker aside" src = "images/Event_Marker_Eco_Glasnost.gif">
- <img id="event_48" class="event-marker aside" src="images/Event_Marker_We_are_the_Peo.gif">
- <img id="event_49" class="event-marker aside" src="images/Event_Marker_Foreign_Curren.gif">
- <img id="event_53" class="event-marker aside" src="images/Event_Marker_Li_Peng_.gif">
- <img id="event_58" class="event-marker aside" src="images/Event_Marker_Austria_Hungar.gif">
- <img id="event_59" class="event-marker aside" src="images/Event_Marker_Grenz_Truppen.gif">
- <img id="event_65" class="event-marker aside" src="images/Event_Marker_Pres_Visit.gif">
- <img id="event_70" class="event-marker aside" src="images/Event_Marker_Securitate.gif">
- <img id="event_73" class="event-marker aside" src="images/Event_Marker_Laszlo.gif">
- <img id="event_100" class="event-marker aside" src="images/Event_Marker_Stand_Fast.gif">
- <img id="event_101" class="event-marker aside" src="images/Event_Marker_Elena.gif">
- <img id="event_104" class="event-marker aside" src="images/Event_Marker_NYE_Party.gif">
- </div>
- </div>
-</section>
-
-<!-- EVENTS ON THE TABLE -->
-<section id = "sec_table_cards">
- <div id="table_panel" class="panel hide">
- <div id="table_header" class="panel_header">Cards on the Table</div>
- <div id="table_cards" class="panel_body"></div>
- </div>
-</section>
-
-<!-- PLAYED CARD -->
-<section id="sec_played_card">
-<div id="played_card_panel" class="panel hide">
-<div id="played_card_header" class="panel_header">Played Card</div>
-<div id="played_card" class="panel_body"></div>
-</div>
-
-</section>
-
-<!-- DISCARD -->
-<section id = "sec_discard">
- <div id="discard_panel" class="panel">
- <div id="discard_header" class="panel_header">Discard</div>
- <div id="discard" class="panel_body"></div>
- </div>
-</section>
-
-<!-- PERMANENTLY REMOVED -->
-<section id = "sec_removed">
- <div id="removed_panel" class="panel hide">
- <div id="removed_header" class="panel_header">Permanently Removed Events</div>
- <div id="removed" class="panel_body"></div>
- </div>
-</section>
-
-<!-- POWERSTRUGGLE -->
-<section id = "sec_power">
- <div id="ceausescu_panel" class="panel hide">
- <div id="ceausescu_header" class="panel_header">Ceausescu Cards</div>
- <div id="ceausescu_hand" class="panel_body"></div>
- </div>
- <div id="power_panel" class="panel hide">
- <div id="power_header" class="panel_header">Power Struggle Hand</div>
- <div id="power_hand" class="panel_body"></div>
- </div>
-</section>
-
-
-
-<!-- OPPONENT HAND -->
-<section id="sec_opp_hand">
-
- <div id="opp_hand_panel" class="panel hide">
- <div id="opp_hand_header" class="panel_header">Opponent Hand</div>
- <div id="opp_hand" class="panel_body"></div>
- </div>
-
-</section>
-
-<!-- SAMIZDAT CARD -->
-<section id = "sec_samizdat">
- <div id="samizdat_panel" class="panel">
- <div id="samizdat_header" class="panel_header">Set aside card</div>
- <div id="samizdat_card" class="panel_body"></div>
- </div>
-</section>
-
-
-<!-- HAND -->
-<section id="sec_hand">
-
-<div id="hand_panel" class="panel hide">
- <div id="hand_header" class="panel_header">Hand</div>
- <div id="hand" class="panel_body"></div>
-</div>
-
-</section>
-
-</main>
-
-<footer id="status"></footer>
-
-
-
-</html>
+<!DOCTYPE html>
+<!-- vim:set nowrap: -->
+<html lang="en">
+<head>
+<meta name="viewport" content="width=device-width, height=device-height, user-scalable=no, interactive-widget=resizes-content, viewport-fit=cover">
+<meta name="theme-color" content="#444">
+<meta charset="utf-8">
+<title>1989</title>
+<link rel="icon" href="images/Hammer_and_sickle.svg">
+<link rel="stylesheet" href="/fonts/fonts.css">
+<link rel="stylesheet" href="/common/client.css">
+<link rel="stylesheet" href="play.css">
+<script defer src="/common/client.js"></script>
+<script defer src="data.js"></script>
+<script defer src="play.js"></script>
+</head>
+
+<body>
+
+<div id="tooltip" class="card hide"></div>
+
+<header>
+ <div id="toolbar">
+ <details>
+ <summary><img src="/images/cog.svg"></summary>
+ <menu>
+ <li><a target="_blank" href="/1989-dawn-of-freedom/info/rules.html">Rules of Play</a>
+ <li><a target="_blank" href="/1989-dawn-of-freedom/info/background.html">Background Book</a>
+ <li><a target="_blank" href="/1989-dawn-of-freedom/info/reference.html">Reference Sheets</a>
+ <li class="separator">
+ <li><a target="_blank" href="/1989-dawn-of-freedom/info/cards.html">Card Gallery</a>
+ </menu>
+ </details>
+ <details>
+ <summary><img src="images/trash-can.svg"></summary>
+ <menu>
+ <li id="show_removed_menu" onclick="toggle_removed()">Show/hide removed events
+ <li id="show_discard_menu" onclick="toggle_discard()">Show/hide discard
+ </menu>
+ </details>
+ </div>
+</header>
+
+<aside>
+ <div id="roles"></div>
+ <div id="turn_info"></div>
+ <div id="log"></div>
+</aside>
+
+<main>
+
+<div id="mapwrap">
+<div id="map">
+ <div id="spaces"></div>
+ <div id="markers">
+ <div id="marker_turn" class="marker" style="left: 653px; top: 79px;"></div>
+ <div id="marker_action_round" class="marker dem" style="left: 708px; top: 141px;"></div>
+ <div id="marker_stability_track" class="marker" style="left: 1380px; top: 1080px;"></div>
+ <div id="marker_dem_tst" class="marker" style="left: 52px; top: 2127px;"></div>
+ <div id="marker_com_tst" class="marker" style="left: 52px; top: 2256px;"></div>
+ <div id="marker_vp" class="marker" style="left: 846px; top: 2425px;"></div>
+
+ <!-- PERMANENT EVENT MARKERS ON THE BOARD -->
+ <div id="event_reminder_list"></div>
+ </div>
+</div>
+</div>
+
+<div id="played_card_panel" class="panel">
+ <div id="played_card_header" class="panel_header">Played Card</div>
+ <div id="played_card" class="panel_body"></div>
+</div>
+
+<div id="power_panel" class="autohide panel">
+ <div id="power_header" class="panel_header">Power Struggle Hand</div>
+ <div id="power_hand" class="panel_body power"></div>
+</div>
+
+<div id="ceausescu_panel" class="autohide panel">
+ <div id="ceausescu_header" class="panel_header">The Crowd Turns Against Ceausescu</div>
+ <div id="ceausescu_hand" class="panel_body power"></div>
+</div>
+
+<div id="securitate_panel" class="autohide panel">
+ <div id="securiate_header" class="panel_header">Securitate - Democrat Power Struggle Cards</div>
+ <div id="securitate" class="panel_body"></div>
+</div>
+
+<div id="power_discard_panel" class="autohide panel">
+ <div id="power_discard_header" class="panel_header">Power Struggle Discard</div>
+ <div id="power_discard" class="panel_body power"></div>
+</div>
+
+<div id="hand_panel" class="panel">
+ <div id="hand_header" class="panel_header">Hand</div>
+ <div id="hand" class="panel_body"></div>
+</div>
+
+<!-- OPPONENT HAND -->
+<div id="opp_hand_panel" class="autohide panel">
+ <div id="opp_hand_header" class="panel_header">Opponent Hand</div>
+ <div id="opp_hand" class="panel_body"></div>
+</div>
+
+<!-- SAMIZDAT CARD -->
+<div id="samizdat_panel" class="autohide panel">
+ <div id="samizdat_header" class="panel_header">Samizdat - Set Aside Card</div>
+ <div id="samizdat_card" class="panel_body"></div>
+</div>
+
+<!-- DISCARD -->
+<div id="discard_panel" class="panel hide">
+ <div id="discard_header" class="panel_header">Discard</div>
+ <div id="discard" class="panel_body"></div>
+</div>
+
+<!-- PERSISTENT EVENTS -->
+<div id="persistent_panel" class="panel">
+ <div id="persistent_header" class="panel_header">Persistent Events on the Table</div>
+ <div id="persistent" class="panel_body"></div>
+</div>
+
+<!-- PERMANENTLY REMOVED -->
+<div id="removed_panel" class="panel hide">
+ <div id="removed_header" class="panel_header">Permanently Removed Events</div>
+ <div id="removed" class="panel_body"></div>
+</div>
+
+</main>
+
+<footer id="status"></footer>
+
+</html> \ No newline at end of file
diff --git a/play.js b/play.js
index 7b18e6e..4b1edc6 100644
--- a/play.js
+++ b/play.js
@@ -1,890 +1,914 @@
-
-const seed = 'none'
-const scenario = 'standard'
-const options = 'none'
-//const rules = require("./rules")
-
-const last_card = 110
-const last_power_card = 52
-let hover_timeout
-const height = 65
-const width = 105
-const toolbar = document.getElementById('toolbar')
-const vpMarker = document.getElementById('vp')
-const counters = document.getElementById('counters')
-
-const countries= ['Poland', 'Hungary', 'East_Germany', 'Bulgaria', 'Czechoslovakia', 'Romania']
-
-/*const aside_events = [
- "honecker",
- "st_nicholas_church",
- "helsinki_final_act",
- "eco_glasnost",
- "we_are_the_people",
- "foreign_currency_debt_burden",
- "li_peng",
- "austria_hungary_border_reopened",
- "grenztruppen",
- "presidential_visit",
- "securitate",
- "laslzo_tokes",
- "stand_fast",
- "elena",
- "new_years_eve_party"
-]*/
-const board_events = [2, 9, 69, 97]
-const box_events = [ 15, 24, 26, 39, 48, 49, 53, 58, 59, 65, 70, 73, 100, 101, 104 ]
-let box_events_showing = false
-let show_discard = false
-
-const overlay = document.getElementById('overlay');
-const spaceNameElement = document.getElementById('space-name');
-const spaceCharacteristicsElement = document.getElementById('space-characteristics');
-
-
-// Event listener to track mouse movement over the map
- document.querySelector('.map').addEventListener('mousemove', function(event) {
- const x = event.offsetX; // X-coordinate of mouse relative to container
- const y = event.offsetY; // Y-coordinate of mouse relative to container
- spaceCharacteristicsElement.innerText = `X: ${x}, Y: ${y}`;
- })
-
-
- // Create map areas dynamically based on coordinates
-
- function create_ui() {
-
-// CREATE MAP
-
- spaces.forEach((space) => {
-
-
- if (space && space.box) {
-
- //CREATE SPACES
- const { x, y} = space.box;
- const spaceArea = document.createElement('div');
- spaceArea.classList.add('space-area', space.country)
- spaceArea.id=`space_${space.space_id}`;
- spaceArea.style.left = x + 'px';
- spaceArea.style.top = y + 'px';
- spaceArea.style.width = width + 'px';
- spaceArea.style.height = height + 'px';
- spaceArea.style.zIndex = 2;
- spaceArea.my_space = space.name_unique;
- spaceArea.addEventListener('mousedown', on_click_space);
-
- //CREATE DEMOCRATIC INFLUENCE MARKERS FOR EACH SPACE
- const dem_img = document.createElement('div')
- dem_img.classList.add('demInfl', space.country)
- dem_img.style.display = 'none'
- dem_img.id=`${space.name_unique}_demInfl`
- dem_img.style.zIndex = 1
- dem_img.my_space = space.name_unique;
- dem_img.addEventListener('mousedown', on_click_space);
- spaceArea.appendChild(dem_img)
-
- //CREATE DEMOCRATIC INFLUENCE VALUES
- const demInflValue = document.createElement('p')
- demInflValue.className='demInflValue'
- demInflValue.style.display = 'none'
- demInflValue.id=`${space.name_unique}_demInflValue`
- demInflValue.innerText=space.demInfl
- demInflValue.style.zIndex = 1
- demInflValue.my_space = space.name_unique;
- demInflValue.addEventListener('mousedown', on_click_space);
- spaceArea.appendChild(demInflValue)
-
- //CREATE COMMUNIST INFLUENCE MARKERS FOR EACH SPACE
- const com_img = document.createElement('div')
- com_img.className='comInfl'
- com_img.style.display='none'
- com_img.id=`${space.name_unique}_comInfl`
- com_img.style.zIndex = 1
- com_img.my_space = space.name_unique;
- com_img.addEventListener('mousedown', on_click_space);
- spaceArea.appendChild(com_img)
-
- //CREATE COMMUNIST INFLUENCE VALUES
- const comInflValue = document.createElement('p')
- comInflValue.className='comInflValue'
- comInflValue.style.display='none'
- comInflValue.id=`${space.name_unique}_comInflValue`
- comInflValue.innerText=space.comInfl
- comInflValue.style.zIndex = 1
- comInflValue.my_space = space.name_unique;
- comInflValue.addEventListener('mousedown', on_click_space);
- spaceArea.appendChild(comInflValue)
- //}
-
- counters.appendChild(spaceArea);
- }
- });
-
-// CREATE CARDS
-
- const is_mobile = window.matchMedia("(pointer: coarse)").matches
-
- for (let c = 1; c <= last_card; ++c) {
-
- const hand_card = document.createElement('img');
- hand_card.classList.add('hand_card')
- hand_card.id=`card_${c}`;
- hand_card.src = `cards/e${c}.gif`
- hand_card.my_card = c;
- hand_card.addEventListener('click', on_click_card);
-
- if(!is_mobile) {
- hand_card.addEventListener('mouseenter', () => {
- hover_timeout = setTimeout(() => {
- hand_card.classList.add('zoom');
- }, 500) })
- hand_card.addEventListener('mouseleave', () => {
- clearTimeout(hover_timeout);
- hand_card.classList.remove('zoom');
- });
- }
-
- ui.cards.push(hand_card);
- }
-
-
-
- for (let card of power_cards) {
- if (!card) continue;
- const power_card = document.createElement('img');
- power_card.classList.add('power_card');
- power_card.id = `power_card_${card.number}`;
- power_card.src = `cards_2/${card.url}.gif`;
- power_card.my_card = card.number;
- power_card.addEventListener('mousedown', on_click_card);
- ui.power_cards.push(power_card);
- }
-}
-
-// POP UP CARD MENU
-
-var card_action_menu = Array.from(document.getElementById("popup").querySelectorAll("li[data-action]")).map(e => e.dataset.action)
-
-console.log('card_action_menu', card_action_menu)
-
-function show_popup_menu(evt, menu_id, target_id, title) {
- let menu = document.getElementById(menu_id)
- console.log('show_popup_menu called with evt',evt, 'menu_id',menu_id, 'target_id', target_id, 'title', title)
-
- let show = false
- console.log(`menu.querySelectorAll("li")`, menu.querySelectorAll("li"))
- for (let item of menu.querySelectorAll("li")) {
- let action = item.dataset.action
- console.log('item', item, 'action', action)
- if (action) {
- //console.log('in if action')
- if (is_card_action(action, target_id)) {
- console.log('in is_card_action',)
- show = true
- item.classList.add("action")
- item.classList.remove("disabled")
- item.onclick = function () {
- send_action(action, target_id)
- hide_popup_menu()
- evt.stopPropagation()
- }
- } else {
- item.classList.remove("action")
- item.classList.add("disabled")
- item.onclick = null
- }
- }
- }
-
- if (show) {
- menu.onmouseleave = hide_popup_menu
- menu.style.display = "block"
- if (title) {
- let item = menu.querySelector("li.title")
- if (item) {
- item.onclick = hide_popup_menu
- item.textContent = title
- }
- }
-
- let w = menu.clientWidth
- let h = menu.clientHeight
- let x = Math.max(5, Math.min(evt.clientX - w / 2, window.innerWidth - w - 5))
- let y = Math.max(5, Math.min(evt.clientY - 12, window.innerHeight - h - 40))
- menu.style.left = x + "px"
- menu.style.top = y + "px"
-
- evt.stopPropagation()
- } else {
- menu.style.display = "none"
- }
-}
-
-function hide_popup_menu() {
- document.getElementById("popup").style.display = "none"
- document.getElementById("popup_ceh_check").style.display = "none"
- document.getElementById("popup_opp_event").style.display = "none"
- document.getElementById("popup_tst_7").style.display = "none"
- document.getElementById("popup_tst_8").style.display = "none"
- document.getElementById("popup_tst_7_8").style.display = "none"
-}
-
-
-function is_card_enabled(card) {
- if (view.actions) {
- if (card_action_menu.some(a => view.actions[a] && view.actions[a].includes(card)))
- return true
- if (view.actions.card_select && view.actions.card_select.includes(card))
- return true
- if (view.actions.card && view.actions.card.includes(card))
- return true
- }
- return false
-}
-
-// SUPPORTING FUNCTIONS
-
-function on_click_space(evt) {
- if (evt.button === 0) {
- const space = evt.target.my_space;
- //console.log('on_click_space_called with space:', space);
- if (send_action('infl', space)) {
- evt.stopPropagation();
- } else if (send_action('sc', space)) {
- //console.log('send_action with sc:', space);
- evt.stopPropagation();
- } else {
- // console.log('send_action failed for space:', space);
- }
- }
- //hide_popup_menu();
-}
-
-function on_click_card(evt) {
- const card = evt.target.my_card;
- console.log('on_click_card_called with card:', card);
- if (is_action('card', card)) {
- console.log('in action card')
- if (send_action('card', card)) {
- evt.stopPropagation();
- }
- }
- //First check for TST special powers
- else if (is_card_action('card_tst_7', card)) {
- if (is_card_action('card_tst_8', card)) {
- show_popup_menu(evt, "popup_tst_7_8", card, cards[card].name)
- } else {
- show_popup_menu(evt, "popup_tst_7", card, cards[card].name)
- }
- }
- else if (is_card_action('card_tst_8', card)) {
- show_popup_menu(evt, "popup_tst_8", card, cards[card].name)
- }
-
- //Check for Common European Home
- else if (is_card_action('card_ceh', card)) {
- show_popup_menu(evt, "popup_ceh_check", card, cards[card].name)
- } else if (is_card_action('card_opp_event', card)) {
- console.log('in action card_opp_event')
- show_popup_menu(evt, "popup_opp_event", card, cards[card].name)
- }
- else {
- console.log('in action card_my_event')
- show_popup_menu(evt, "popup", card, cards[card].name)
- }
-}
-
-function is_action(action) {
- //console.log('is_action called with: ', action)
- console.log('view.actions', view.actions)
- if (view.actions && view.actions[action])
- return true
- return false
-}
-
-function is_card_action(action, card) {
- console.log('is_card_action called with action', action, 'card', card)
- console.log('view.actions', view.actions, 'view.actions[action]', view.actions[action])
- if (view.actions && view.actions[action] && view.actions[action].includes(card))
- return true
- return false
-}
-
-function on_log(text) { // eslint-disable-line no-unused-vars
-
- let p = document.createElement("div")
-
-
-/*
- let last_text = last_log_entry ? last_log_entry.split(' ') : []
- console.log('last text', last_text, 'text', text.split(' ')[3])
- if (last_text[0] === 'Added' && last_text[4] === text.split(' ')[4]) {
- let new_influence = parseInt(last_text[1]) + 1
- new_text = `Added ${new_influence} influence in ${last_text[4]}`
- console.log('new_influence', new_influence, 'new_text', new_text)
- } */
-
-
- if (text.match(/^>/)) {
- text = text.substring(1)
- p.className = 'i'
- }
-
- text = text.replace(/_/g, ' ')
- text = text.replace(/C(\d+)/g, sub_card_name)
- text = text.replace(/P(\d+)/g, sub_power_card_name)
- text = text.replace(/V(\d+)/g, sub_power_card_value)
- text = text.replace(/%(\d+)/g, sub_space_name)
-
-
- if (text.match(/^\.h1/)) {
- text = text.substring(4)
- p.className = 'h1'
- }
- else if (text.match(/^\.h2d/)) {
- text = text.substring(5)
- p.className = 'h2 dem'
- }
- else if (text.match(/^\.h2c/)) {
- text = text.substring(5)
- p.className = 'h2 com'
- }
- else if (text.match(/^\.h2/)) {
- text = text.substring(4)
- p.className = 'h2'
- }
- else if (text.match(/^\.h3/)) {
- text = text.substring(4)
- p.className = 'h3'
- }
-
- //console.log('view.log', view.log)
- /*console.log('new text', text)
- if (last_log_entry_text) {
- console.log('log = text', last_log_entry_text === text)
- }
-
-*/
- p.innerHTML = text
- return p
-}
-
-let ui = {
- favicon: document.getElementById('favicon'),
- player: [
- document.getElementById("role_Democrat"),
- document.getElementById("role_Communist"),
- ],
- cards: [ null ],
- power_cards: [null],
- dem_hand_count: document.getElementById("role_stat_dem"),
- com_hand_count: document.getElementById("role_stat_com"),
- deck_length: document.getElementById("deck_length"),
- played_card: 0,
- table_panel: document.getElementById("table_panel"),
- hand_panel: document.getElementById("hand_panel"),
- turn: document.getElementById("turn-tracker"),
- round: document.getElementById("action-round-tracker"),
- stability: document.getElementById("stability-track"),
- dem_TST: document.getElementById("dem-TST"),
- com_TST: document.getElementById("com-TST"),
- vp: document.getElementById("vp"),
- spaces: document.getElementsByClassName("space-area")
-
-}
-
-
-function on_update() {
- //console.log('on_update called')
- //console.log('view.valid_spaces: ', view.valid_spaces)
- //console.log('view.actions: ', view.actions)
- //console.log('view.power_cards:', view.power_cards)
- document.querySelectorAll('[id^="space_"].selected').forEach(spaceElement => {spaceElement.classList.remove('selected');});
- document.getElementById("power_hand")?.querySelectorAll('.selected').forEach(cardElement => {cardElement.classList.remove('selected');});
- view.valid_spaces.forEach(space_id => {
- const spaceElementId = `space_${space_id}`;
- const spaceElement = document.getElementById(spaceElementId);
-
- if (spaceElement) {
- spaceElement.classList.add('selected');
- }
- });
-
- //Check influence values
-
- for (let i = 1; i < spaces.length; i ++) {
-
- const space = spaces[i]
- const demInfl = view.demInfl[i]
- const comInfl = view.comInfl[i]
- //console.log('piece', piece)
- //console.log('space', space)
- const dem_marker = document.getElementById(`${space.name_unique}_demInfl`);
- const dem_number = document.getElementById(`${space.name_unique}_demInflValue`);
- const com_marker = document.getElementById(`${space.name_unique}_comInfl`);
- const com_number = document.getElementById(`${space.name_unique}_comInflValue`);
-
- dem_number.innerText=demInfl
- if (demInfl > 0) {
- dem_marker.style.display = 'block';
- dem_number.style.display = 'block';
-
- if (demInfl > 9) {
- dem_number.classList.remove('demInflValue')
- dem_number.classList.add('demInflValue_10')
- } else {
- dem_number.classList.add('demInflValue')
- dem_number.classList.remove('demInflValue_10')
- }
-
- if(check_dem_control(demInfl, comInfl, space)){
- dem_marker.classList.add('controlled')
- dem_number.classList.add('outlined_text')
- dem_marker.classList.remove('uncontrolled')
- } else {
- dem_marker.classList.add('uncontrolled')
- dem_marker.classList.remove('controlled')
- dem_number.classList.remove('outlined_text')
- }
- } else {
- dem_marker.style.display = 'none';
- dem_number.style.display = 'none';
- }
- com_number.innerText=comInfl
- if (comInfl > 0) {
- com_marker.style.display = 'block';
- com_number.style.display = 'block';
-
- if (comInfl > 9) {
- com_number.classList.remove('comInflValue')
- com_number.classList.add('comInflValue_10')
- } else {
- com_number.classList.add('comInflValue')
- com_number.classList.remove('comInflValue_10')
- }
-
- if(check_com_control(demInfl, comInfl, space)){
- com_marker.classList.add('controlled')
- com_number.classList.add('controlled')
- com_marker.classList.remove('uncontrolled')
- com_number.classList.remove('uncontrolled')
- } else {
- com_marker.classList.add('uncontrolled')
- com_number.classList.add('uncontrolled')
- com_marker.classList.remove('controlled')
- com_number.classList.remove('controlled')
- }
- } else {
- com_marker.style.display = 'none';
- com_number.style.display = 'none';
- }
-
- }
-
-// UPDATE COUNTRY MARKERS
- for (let i = 0; i < countries.length; i++) {
- const country = countries[i];
- const marker = document.getElementById(country)
- const times_held = document.getElementById(`${country}_times_held`)
-
- if (view.revolutions[find_country_index(country)]) {
- marker.classList.add('revolution')
- marker.classList.remove('held')
- marker.style.display = 'block'
- times_held.classList.add('outlined_text')
- times_held.classList.remove('hide')
- } else if (view.times_held[find_country_index(country)] > 0 ) {
- //console.log('setting ', country)
- marker.classList.add('held')
- marker.style.display = 'block'
- times_held.classList.remove('hide')
- times_held.innerHTML = view.times_held[find_country_index(country)]
- }
- else {marker.style.display = 'none'}
- }
-
-// UPDATE ASIDE
- if (view.is_pwr_struggle) {
- ui.dem_hand_count.innerText = `${view.democrat_power_hand} Power cards`
- ui.com_hand_count.innerText = `${view.communist_power_hand} Power cards`
- } else{
- ui.dem_hand_count.innerText = `${view.democrat_hand} cards in hand`
- ui.com_hand_count.innerText = `${view.communist_hand} cards in hand`
- }
- ui.deck_length.innerText = `${view.strategy_deck} cards`
-
-// UPDATE HAND
- document.getElementById("hand").replaceChildren()
- document.getElementById("played_card").replaceChildren()
-
- if (view.hand.length && view.is_pwr_struggle === false) {
- document.getElementById("hand_panel").classList.remove("hide")
- for (let c of view.hand) {
- let card = ui.cards[c]
- document.getElementById("hand").appendChild(card);
- if (view.valid_cards.includes(c)) {
- card.classList.add('selected')
- } else {
- card.classList.remove('selected')
- }
- card.classList.remove('discard_card')
- }
- } else {
- document.getElementById("hand_panel").classList.add("hide")
- }
-
-// UPDATE DISCARD
-document.getElementById("discard").replaceChildren()
-if (!view.is_pwr_struggle) {
- for (let c of view.strategy_discard) {
- let discard_card = ui.cards[c]
- document.getElementById("discard").appendChild(discard_card)
- discard_card.classList.add('discard_card')
- discard_card.classList.remove('selected')
- }
-} else if (view.is_pwr_struggle) {
- for (let c of view.strategy_discard) {
- let discard_card = ui.power_cards[c]
- document.getElementById("discard").appendChild(discard_card)
- discard_card.classList.add('discard_card')
- discard_card.classList.remove('selected')
- }
-}
-
-// DISCARD FOR EVENTS
-console.log('view.discard',view.discard)
-if(view.discard) {
- //document.getElementById("discard").replaceChildren()
- document.getElementById("discard_panel").classList.remove("hide")
- for (let c of view.strategy_discard) {
- let discard_card = ui.cards[c]
- document.getElementById("discard").appendChild(discard_card)
- discard_card.classList.add('discard_card')
- if (view.valid_cards.includes(c)) {
- discard_card.classList.add('selected')
- } else {
- discard_card.classList.remove('selected')
- }
- }
-} else {
- if (!show_discard) {
- document.getElementById("discard_panel").classList.add("hide")
- }
-}
-
-// UPDATE PERMANENTLY REMOVED CARDS
-document.getElementById("removed").replaceChildren()
-for (let c of view.strategy_removed) {
- let discard_card = ui.cards[c]
- document.getElementById("removed").appendChild(discard_card)
- discard_card.classList.add('discard_card')
- discard_card.classList.remove('selected')
-}
-
-
-// PLAYED CARD PANEL
-if (view.played_card > 0) {
- document.getElementById("played_card_panel").classList.remove("hide")
- document.getElementById("played_card").appendChild(ui.cards[view.played_card]);
-} else {
- document.getElementById("played_card_panel").classList.add("hide")
-}
-
-// TABLE CARDS PANEL
-document.getElementById("table_cards").replaceChildren()
-if (view.table_cards.length > 0) {
- document.getElementById("table_panel").classList.remove("hide")
- for (let c of view.table_cards) {
- let card = ui.cards[c]
- document.getElementById("table_cards").appendChild(card);
- card.classList.remove("hand_card")
- card.classList.add('event_card');
- }
- } else {
- document.getElementById("table_panel").classList.add("hide")
-}
-
-// OPPONENT HAND
-document.getElementById("opp_hand").replaceChildren()
-if (!view.is_pwr_struggle) {
- if (view.show_opp_hand && view.opp_hand.length >0) {
- document.getElementById("opp_hand_panel").classList.remove("hide")
- for (let c of view.opp_hand) {
- let card = ui.cards[c]
- //console.log('power_card:', power_card)
- document.getElementById("opp_hand").appendChild(card);
- card.classList.remove('discard_card')
- }
- } else {
- document.getElementById("opp_hand_panel").classList.add("hide")
- }
-} else {
- if (view.show_opp_hand && view.opp_hand.length >0) {
- document.getElementById("opp_hand_panel").classList.remove("hide")
- for (let c of view.opp_hand) {
- let card = ui.power_cards[c]
- //console.log('power_card:', power_card)
- document.getElementById("opp_hand").appendChild(card);
- card.classList.remove('discard_card')
- }
- } else {
- document.getElementById("opp_hand_panel").classList.add("hide")
- }
-}
-
-// POWER STRUGGLE HAND
- document.getElementById("power_hand").replaceChildren()
-
- if (view.power_hand.length && view.is_pwr_struggle) {
- document.getElementById("power_panel").classList.remove("hide")
- for (let c of view.power_hand) {
- let power_card = ui.power_cards[c]
- document.getElementById("power_hand").appendChild(power_card);
- if (view.valid_cards.includes(c)) {
- power_card.classList.add('selected');
- }
- }
- } else {
- document.getElementById("power_panel").classList.add("hide")
- }
-
-// CEAUSESCU
-
-if (view.ceausescu_cards && view.ceausescu_cards.length > 0 && view.is_pwr_struggle === true) {
- document.getElementById("ceausescu_panel").classList.remove("hide")
- for (let c of view.ceausescu_cards) {
- let power_card = ui.power_cards[c]
- document.getElementById("ceausescu_hand").appendChild(power_card);
- }
-} else {
- document.getElementById("ceausescu_panel").classList.add("hide")
-}
-
-// SAMIZDAT CARD
-if (view.samizdat > 0 ) {
- let samizdat_card = ui.cards[view.samizdat]
- document.getElementById("samizdat_panel").classList.remove("hide")
- document.getElementById("samizdat_card").appendChild(samizdat_card)
-} else {
- document.getElementById("samizdat_panel").classList.add("hide")
-}
-
-// UPDATE BOARD MARKERS
- ui.turn.className = `t${view.turn}`
- if (view.round_player === 'Democrat') {
- ui.round.className = `dem-action-round-tracker r${view.round}`
- } else {
- ui.round.className = `com-action-round-tracker r${view.round}`
- }
- ui.stability.className = `s${view.stability}`
- ui.dem_TST.className = `tst${view.dem_tst}`
- ui.com_TST.className = `tst${view.com_tst}`
- if (view.vp >= -20 && view.vp <= 20) {
- ui.vp.className = `vp${view.vp}`
- } else if (view.vp > 20) {
- ui.vp.className = `vp21`
- } else if (view.vp < -20) {
- ui.vp.className = `vp-21`
- }
-
-//console.log('strategy discard: ', view.strategy_discard)
-//console.log('valid spaces: ', view.valid_spaces)
-
-//console.log('view.persistent_events', view.persistent_events)
-
-// UPDATE EVENT MARKERS ON THE BOARD
-
-for (let id of board_events) {
- let marker = document.getElementById(`event_${id}`)
- //console.log('event', id, marker)
- if (view.persistent_events.includes(id)) {
- marker.style.display = 'block'
- } else {
- marker.style.display = 'none'
- }
-}
-
-
-// UPDATE EVENT MARKERS BELOW THE BOARD
-
-for (let id of box_events) {
- let marker = document.getElementById(`event_${id}`)
- //console.log('event', id, marker)
- if (view.persistent_events.includes(id)) {
- marker.style.display = 'block'
- } else {
- marker.style.display = 'none'
- }
-}
-
-
-// CHECK WHETHER ANY EVENT MARKERS ARE SHOWING IN THE EVENTS BOX
-box_events_showing = false
-for (let id of box_events) {
- if (view.persistent_events.includes(id)) {
- box_events_showing = true;
- }
-/*
- //Special check for events which are not true/false
- if (view.persistent_events['foreign_currency_debt_burden'] !== '') {
- aside_events_showing = true
- }
- if (view.persistent_events['stand_fast'] !== '') {
- aside_events_showing = true
- }
- */
-}
-
-if (box_events_showing) {
- document.getElementById('events_panel').classList.remove("hide")
-} else {
- document.getElementById('events_panel').classList.add("hide")
-}
-
-let systematization = document.getElementById('event_69')
-if (view.persistent_events.includes(69)) {
- systematization.style.left = (spaces[view.systematization].box.x +20) + 'px';
- systematization.style.top = spaces[view.systematization].box.y + 'px';
-}
-
-let tyrant = document.getElementById('event_97')
-if (view.persistent_events.includes(97)) {
- tyrant.style.left = (spaces[view.the_tyrant_is_gone].box.x - 41) + 'px';
- tyrant.style.top = (spaces[view.the_tyrant_is_gone].box.y + 23) + 'px';
-} else {tyrant.style.display = 'none'}
-
- action_button("yes", "Yes")
- action_button("no", "No")
- action_button("start", "Start")
- action_button("check", "Check held cards")
- action_button("tst_7", "Cancel opponent event")
- action_button("tst_8", "Event and operations")
- action_button("end", "End Game")
- action_button("continue", "Continue playing")
- action_button("east_germany", "East Germany")
- action_button("poland", "Poland")
- action_button("czechoslovakia", "Czechoslovakia")
- action_button("hungary", "Hungary")
- action_button("romania", "Romania")
- action_button("bulgaria", "Bulgaria")
- action_button("extra", "Take action round")
- action_button("pass", "Pass")
- action_button("remove", "Remove SPs")
- action_button("add", "Add SPs")
- action_button("ops", "Operations")
- action_button("discard", "Discard")
- action_button("strike", "Strike")
- action_button("march", "March")
- action_button("rally", "Rally in the Square")
- action_button("petition", "Petition")
- action_button("bonus", "Calculate VP bonus")
- action_button("scoring", "Score country")
- action_button("retain", "Retain Power")
- action_button("surrender", "Surrender Power")
- action_button("take", "Take Power")
- action_button("concede", "Concede")
- action_button("struggle", "Begin power struggle")
- action_button("raise", "Raise the stakes")
- action_button("draw", "Draw cards")
- action_button("scoring", "Scoring")
- action_button("event", "Event")
- action_button("opp_event", "Resolve opponent event")
- action_button("influence", "Place SPs")
- action_button("support_check", "Support Checks")
- action_button("tst", "Tiananmen Square Track")
- action_button("roll", "Roll a die")
- action_button("done", "Done")
- action_button("undo", "Undo")
-
-console.log('view.strategy_deck', view.strategy_deck)
-}
-
-// =========================== LOG FUNCTIONS ==============================================
-
-function sub_card_name(match, p1) {
- let x = p1 | 0
- return `<span class="card_name" onmouseenter="on_focus_card_tip(${x})" onmouseleave="on_blur_card_tip()">${cards[x].name}</span>`
-}
-
-function sub_power_card_name(match, p1) {
- let x = p1 | 0
- return `<span class="card_name">${power_cards[x].name}</span>`
-}
-
-function sub_power_card_value(match, p1) {
- let x = p1 | 0
- return `<span class="card_name">${x}</span>`
-}
-
-function sub_space_name(match, p1) {
- let x = p1 | 0
- let id = spaces[x].space_id
- let name = spaces[x].name_unique
- return `<span class="space_tip" onmouseenter="on_focus_space_tip(${id})" onmouseleave="on_blur_space_tip(${id})" onclick="on_click_space_tip(${id})">${name}</span>`
-}
-
-function sub_die(match) {
- return die[match] || match
-}
-
-// =========================== VISUAL FUNCTIONS ==========================================#
-
-function on_focus_card_tip(card_number) {
- document.getElementById("tooltip").className = "card card_" + card_number
-}
-
-function on_blur_card_tip() {
- document.getElementById("tooltip").classList = "card hide"
-}
-
-function on_focus_space_tip(id) {
- space = document.getElementById(`space_${id}`)
- space.classList.add("tip")
-}
-
-function on_click_space_tip(id) {
- space = document.getElementById(`space_${id}`)
- scroll_into_view(space)
-}
-
-function on_blur_space_tip(id) {
- space = document.getElementById(`space_${id}`)
- space.classList.remove("tip")
-}
-
-function toggle_pieces() {
- document.getElementById("pieces").classList.toggle("hide")
-}
-
-
-function toggle_discard() {
- if (show_discard) {
- show_discard = false
- } else {
- show_discard = true
- }
- document.getElementById("discard_panel").classList.toggle("hide")
-}
-
-function toggle_removed() {
- document.getElementById("removed_panel").classList.toggle("hide")
-}
-
-function check_dem_control(demInfl, comInfl, space) {
- if ((demInfl - comInfl) >= space.stability) {
- return true
- } else{ false}
-}
-
-function check_com_control(demInfl, comInfl, space) {
- if ((comInfl - demInfl) >= space.stability) {
- return true
- } else{ false}
-}
-
-function find_country_index(country) {
- return countries.indexOf(country)
-}
-
-create_ui()
+"use strict"
+
+// vim:set foldmethod=marker:
+
+/* global view, roles, send_action, action_button, scroll_into_view */
+/* global spaces, cards, power_cards */
+
+// BEGIN CONST {{{
+
+// SPACES
+const S_SCHWERIN = 0
+const S_ROSTOCK = 1
+const S_BERLIN = 2
+const S_GERMAN_WRITERS = 3
+const S_WALTER_ULBRICHT_ACADEMY = 4
+const S_LUTHERAN_CHURCH = 5
+const S_MAGDEBURG = 6
+const S_HALLE = 7
+const S_LEIPZIG = 8
+const S_ERFURT = 9
+const S_KARL_MARX_STADT = 10
+const S_DRESDEN = 11
+const S_SZCZECIN = 12
+const S_GDANSK = 13
+const S_BYDGOSZCZ = 14
+const S_POZNAN = 15
+const S_WARSZAWA = 16
+const S_BIALYSTOK = 17
+const S_WROCLAW = 18
+const S_CATHOLIC_CHURCH_POLAND = 19
+const S_LODZ = 20
+const S_KATOWICE = 21
+const S_KRAKOW = 22
+const S_LUBLIN = 23
+const S_JAGIELLONIAN_UNIVERSITY = 24
+const S_POLISH_WRITERS = 25
+const S_PLZEN = 26
+const S_CESKE_BUDEJOVICE = 27
+const S_PRAHA = 28
+const S_CHARLES_UNIVERSITY = 29
+const S_CZECH_WRITERS = 30
+const S_BRNO = 31
+const S_OSTRAVA = 32
+const S_BRATISLAVA = 33
+const S_CATHOLIC_CHURCH_CZECHOSLOVAKIA = 34
+const S_PRESOV = 35
+const S_KOSICE = 36
+const S_CATHOLIC_CHURCH_HUNGARY = 37
+const S_GYOR = 38
+const S_TATABANYA = 39
+const S_MISKOLC = 40
+const S_DEBRECEN = 41
+const S_SZOMBATHELY = 42
+const S_SZEKESFEHERVAR = 43
+const S_BUDAPEST = 44
+const S_HUNGARIAN_WRITERS = 45
+const S_EOTVOS_LORAND_UNIVERSITY = 46
+const S_SZEGED = 47
+const S_PECS = 48
+const S_TIMISOARA = 49
+const S_CLUJ_NAPOCA = 50
+const S_TARGU_MURES = 51
+const S_IASI = 52
+const S_BABES_BOLYAI_UNIVERSITY = 53
+const S_ROMANIAN_WRITERS = 54
+const S_HARGHITA_COVASNA = 55
+const S_BRASOV = 56
+const S_ORTHODOX_CHURCH_ROMANIA = 57
+const S_PLOIESTI = 58
+const S_CRAIOVA = 59
+const S_BUCURESTI = 60
+const S_GALATI = 61
+const S_CONSTANTA = 62
+const S_PLEVEN = 63
+const S_ORTHODOX_CHURCH_BULGARIA = 64
+const S_RUSE = 65
+const S_SOFIA_UNIVERSITY = 66
+const S_SOFIA = 67
+const S_STARA_ZAGORA = 68
+const S_RAZGRAD = 69
+const S_BURGAS = 70
+const S_VARNA = 71
+const S_BULGARIAN_WRITERS = 72
+const S_PLOVDIV = 73
+const S_SLIVEN = 74
+
+// CARDS
+const C_LEGACY_OF_MARTIAL_LAW = 1
+const C_SOLIDARITY_LEGALIZED = 2
+const C_WALESA = 3
+const C_MICHNIK = 4
+const C_GENERAL_STRIKE = 5
+const C_BROUGHT_IN_FOR_QUESTIONING = 6
+const C_STATE_RUN_MEDIA = 7
+const C_PRUDENCE = 8
+const C_THE_WALL = 9
+const C_CULT_OF_PERSONALITY = 10
+const C_DISSIDENT_ARRESTED = 11
+const C_APPARATCHIKS = 12
+const C_STASI = 13
+const C_GORBACHEV_CHARMS_THE_WEST = 14
+const C_HONECKER = 15
+const C_NOMENKLATURA = 16
+const C_ROUNDTABLE_TALKS = 17
+const C_POSZGAY_DEFENDS_THE_REVOLUTION = 18
+const C_PAPAL_VISIT = 19
+const C_DEUTSCHE_MARKS = 20
+const C_COMMON_EUROPEAN_HOME = 21
+const C_POWER_STRUGGLE_POLAND = 22
+const C_POWER_STRUGGLE_HUNGARY = 23
+const C_ST_NICHOLAS_CHURCH = 24
+const C_PERESTROIKA = 25
+const C_HELSINKI_FINAL_ACT = 26
+const C_CONSUMERISM = 27
+const C_FACTORY_PARTY_CELLS = 28
+const C_JAN_PALACH_WEEK = 29
+const C_TEAR_GAS = 30
+const C_INTELLIGENTSIA = 31
+const C_PEASANT_PARTIES = 32
+const C_SAJUDIS = 33
+const C_FIDESZ = 34
+const C_HEAL_OUR_BLEEDING_WOUND = 35
+const C_DASH_FOR_THE_WEST = 36
+const C_NAGY_REBURIED = 37
+const C_THE_JULY_CONCEPT = 38
+const C_ECO_GLASNOST = 39
+const C_HUNGARIAN_DEMOCRATIC_FORUM = 40
+const C_CEAUSESCU = 41
+const C_POWER_STRUGGLE_EAST_GERMANY = 42
+const C_POWER_STRUGGLE_BULGARIA = 43
+const C_INFLATIONARY_CURRENCY = 44
+const C_SOVIET_TROOP_WITHDRAWALS = 45
+const C_GOODBYE_LENIN = 46
+const C_BULGARIAN_TURKS_EXPELLED = 47
+const C_WE_ARE_THE_PEOPLE = 48
+const C_FOREIGN_CURRENCY_DEBT_BURDEN = 49
+const C_THE_SINATRA_DOCTRINE = 50
+const C_40TH_ANNIVERSARY_CELEBRATION = 51
+const C_NORMALIZATION = 52
+const C_LI_PENG = 53
+const C_THE_CROWD_TURNS_AGAINST_CEAUSESCU = 54
+const C_POWER_STRUGGLE_CZECHOSLOVAKIA = 55
+const C_FOREIGN_TELEVISION = 56
+const C_CENTRAL_COMMITTEE_RESHUFFLE = 57
+const C_AUSTRIA_HUNGARY_BORDER_REOPENED = 58
+const C_GRENZTRUPPEN = 59
+const C_TOXIC_WASTE = 60
+const C_THE_MONDAY_DEMONSTRATIONS = 61
+const C_YAKOVLEV_COUNSELS_GORBACHEV = 62
+const C_GENSCHER = 63
+const C_LEGACY_OF_1968 = 64
+const C_PRESIDENTIAL_VISIT = 65
+const C_NEW_FORUM = 66
+const C_REFORMER_REHABILITATED = 67
+const C_KLAUS_AND_KOMAREK = 68
+const C_SYSTEMATIZATION = 69
+const C_SECURITATE = 70
+const C_KISS_OF_DEATH = 71
+const C_PEASANT_PARTIES_REVOLT = 72
+const C_LASZLO_TOKES = 73
+const C_FRG_EMBASSIES = 74
+const C_EXIT_VISAS = 75
+const C_WARSAW_PACT_SUMMIT = 76
+const C_SAMIZDAT = 77
+const C_WORKERS_REVOLT = 78
+const C_THE_THIRD_WAY = 79
+const C_NEPOTISM = 80
+const C_THE_BALTIC_WAY = 81
+const C_SPITZEL = 82
+const C_MODROW = 83
+const C_BREAKAWAY_BALTIC_REPUBLICS = 84
+const C_TANK_COLUMN_TANK_MAN = 85
+const C_THE_WALL_MUST_GO = 86
+const C_KOHL_PROPOSES_REUNIFICATION = 87
+const C_ADAMEC = 88
+const C_DOMINO_THEORY = 89
+const C_CIVIC_FORUM = 90
+const C_MY_FIRST_BANANA = 91
+const C_BETRAYAL = 92
+const C_SHOCK_THERAPY = 93
+const C_UNION_OF_DEMOCRATIC_FORCES = 94
+const C_POWER_STRUGGLE_ROMANIA = 95
+const C_THE_CHINESE_SOLUTION = 96
+const C_THE_TYRANT_IS_GONE = 97
+const C_POLITBURO_INTRIGUE = 98
+const C_LIGACHEV = 99
+const C_STAND_FAST = 100
+const C_ELENA = 101
+const C_NATIONAL_SALVATION_FRONT = 102
+const C_GOVERNMENT_RESIGNS = 103
+const C_NEW_YEARS_EVE_PARTY = 104
+const C_PUBLIC_AGAINST_VIOLENCE = 105
+const C_SOCIAL_DEMOCRATIC_PLATFORM_ADOPTED = 106
+const C_MASSACRE_IN_TIMISOARA = 107
+const C_ARMY_BACKS_REVOLUTION = 108
+const C_KREMLIN_COUP = 109
+const C_MALTA_SUMMIT = 110
+
+// END CONST }}}
+// BEGIN LAYOUT {{{
+var LAYOUT = {
+ "Babes-Bolyai University": [958,1529,127,75],
+ "Berlin": [329,148,127,75],
+ "Bialystok": [1202,436,127,76],
+ "Brasov": [1339,1556,127,75],
+ "Bratislava": [539,1013,127,76],
+ "Brno": [521,904,127,76],
+ "Bucuresti": [1186,1837,127,76],
+ "Budapest": [809,1249,127,76],
+ "Bulgarian Writers": [838,2192,127,76],
+ "Burgas": [1289,2152,127,76],
+ "Bydgoszcz": [872,388,127,76],
+ "Catholic Church, Czechoslovakia": [692,1010,127,75],
+ "Catholic Church, Hungary": [409,1126,127,76],
+ "Catholic Church, Poland": [802,558,127,75],
+ "Ceske Budejovice": [260,765,127,77],
+ "Charles University": [491,677,128,76],
+ "Cluj-Napoca": [970,1429,127,76],
+ "Constanta": [1443,1925,127,76],
+ "Craiova": [977,1793,127,76],
+ "Czech Writers": [573,773,127,76],
+ "Debrecen": [1000,1192,127,76],
+ "Dresden": [343,479,127,76],
+ "Eotvos Lorand University": [658,1314,127,76],
+ "Erfurt": [38,455,127,76],
+ "Galati": [1409,1778,127,76],
+ "Gdansk": [896,277,127,76],
+ "German Writers": [81,239,127,76],
+ "Gyor": [560,1129,127,76],
+ "Halle": [231,357,127,75],
+ "Harghita/Covasna": [1186,1560,127,75],
+ "Hungarian Writers": [452,1322,127,76],
+ "Iasi": [1369,1395,127,76],
+ "Jagiellonian University": [870,867,127,76],
+ "Karl-Marx-Stadt": [184,492,127,75],
+ "Katowice": [733,723,127,76],
+ "Kosice": [995,1037,127,76],
+ "Krakow": [911,761,127,76],
+ "Leipzig": [387,379,127,76],
+ "Lodz": [959,620,127,76],
+ "Lublin": [1124,754,127,76],
+ "Lutheran Church": [391,271,127,76],
+ "Magdeburg": [79,352,127,75],
+ "Miskolc": [851,1146,127,76],
+ "Orthodox Church, Bulgaria": [1130,1956,127,76],
+ "Orthodox Church, Romania": [1094,1700,127,76],
+ "Ostrava": [673,868,127,75],
+ "Pecs": [626,1406,127,75],
+ "Pleven": [979,1948,127,76],
+ "Ploiesti": [1356,1671,127,76],
+ "Plovdiv": [987,2209,127,75],
+ "Plzen": [211,615,127,76],
+ "Polish Writers": [1051,883,127,75],
+ "Poznan": [671,452,127,76],
+ "Praha": [412,782,127,75],
+ "Presov": [844,1010,127,75],
+ "Razgrad": [1219,2057,127,76],
+ "Romanian Writers": [947,1625,127,75],
+ "Rostock": [299,53,127,76],
+ "Ruse": [1277,1956,127,76],
+ "Schwerin": [148,86,127,76],
+ "Sliven": [1144,2251,127,75],
+ "Sofia": [983,2098,127,76],
+ "Sofia University": [828,2095,127,76],
+ "Stara Zagora": [1133,2153,127,75],
+ "Szczecin": [574,263,127,75],
+ "Szeged": [812,1364,127,76],
+ "Szekesfehervar": [571,1223,127,75],
+ "Szombathely": [410,1224,127,76],
+ "Targu Mures": [1169,1443,127,76],
+ "Tatabanya": [706,1126,127,75],
+ "Timisoara": [767,1531,127,76],
+ "Varna": [1387,2051,127,76],
+ "Walter Ulbricht Academy": [234,240,127,76],
+ "Warszawa": [1032,490,127,75],
+ "Wroclaw": [595,565,127,75],
+ "action_1": [708,143,48,44],
+ "action_8": [1080,143,47,43],
+ "country_bulgaria": [915,1999,46,41],
+ "country_czechoslovakia": [463,624,44,39],
+ "country_east_germany": [560,160,43,37],
+ "country_hungary": [1034,1319,44,39],
+ "country_poland": [1188,292,44,39],
+ "country_romania": [1287,1349,44,39],
+ "event_solidarity_legalized": [779,270,44,43],
+ "event_the_wall": [222,179,40,41],
+ "tst_com_1": [53,2257,47,47],
+ "tst_com_7": [469,2257,47,47],
+ "tst_com_8": [556,2257,47,47],
+ "tst_dem_1": [53,2128,47,47],
+ "tst_dem_7": [469,2128,47,47],
+ "tst_dem_8": [556,2128,47,47],
+ "turn_1": [655,81,47,48],
+ "turn_10": [1133,80,48,48],
+ "ussr_1": [1381,1080,48,48],
+ "ussr_2": [1381,1134,48,48],
+ "ussr_3": [1381,1188,48,48],
+ "ussr_4": [1381,1243,48,48],
+ "ussr_5": [1381,1297,48,48],
+ "vp_0": [843,2425,55,51],
+ "vp_1": [883,2395,55,50],
+ "vp_19": [1440,2395,55,50],
+ "vp_2": [913,2455,56,51],
+ "vp_20": [1471,2455,55,51],
+ "vp_neg_1": [803,2455,56,51],
+ "vp_neg_19": [246,2456,55,50],
+ "vp_neg_2": [772,2395,56,51],
+ "vp_neg_20": [215,2395,55,51],
+}
+// END LAYOUT }}}
+
+let action_register = []
+
+function register_action(target, action, id) {
+ target.my_action = action
+ target.my_id = id
+ target.onmousedown = on_click_action
+ action_register.push(target)
+}
+
+function is_action(action, arg) {
+ return !!(view.actions && view.actions[action] && view.actions[action].includes(arg))
+}
+
+function on_click_action(evt) {
+ if (evt.button === 0)
+ send_action(evt.target.my_action, evt.target.my_id)
+}
+
+const last_space = 74
+const last_card = 110
+const last_power_card = 52
+
+const board_events = [
+ C_SOLIDARITY_LEGALIZED,
+ C_THE_WALL,
+ C_SYSTEMATIZATION,
+ C_THE_TYRANT_IS_GONE
+]
+
+const box_events = [
+ C_HONECKER,
+ C_ST_NICHOLAS_CHURCH,
+ C_HELSINKI_FINAL_ACT,
+ C_ECO_GLASNOST,
+ C_WE_ARE_THE_PEOPLE,
+ C_FOREIGN_CURRENCY_DEBT_BURDEN,
+ C_LI_PENG,
+ C_AUSTRIA_HUNGARY_BORDER_REOPENED,
+ C_GRENZTRUPPEN,
+ C_PRESIDENTIAL_VISIT,
+ C_SECURITATE,
+ C_LASZLO_TOKES,
+ C_STAND_FAST,
+ C_ELENA,
+ C_NEW_YEARS_EVE_PARTY,
+]
+
+const ui = {
+ favicon: document.getElementById("favicon"),
+ turn_info: document.getElementById("turn_info"),
+
+ turn: document.getElementById("marker_turn"),
+ round: document.getElementById("marker_action_round"),
+ stability: document.getElementById("marker_stability_track"),
+ dem_tst: document.getElementById("marker_dem_tst"),
+ com_tst: document.getElementById("marker_com_tst"),
+ vp: document.getElementById("marker_vp"),
+
+ event_reminder_list: document.getElementById("event_reminder_list"),
+
+ played_card: document.getElementById("played_card"),
+ hand: document.getElementById("hand"),
+ power_hand: document.getElementById("power_hand"),
+ power_discard: document.getElementById("power_discard"),
+ opp_hand: document.getElementById("opp_hand"),
+ securitate: document.getElementById("securitate"),
+ discard: document.getElementById("discard"),
+ removed: document.getElementById("removed"),
+ persistent: document.getElementById("persistent"),
+
+ ceausescu_hand: document.getElementById("ceausescu_hand"),
+ samizdat_card: document.getElementById("samizdat_card"),
+}
+
+function create_country(id, name) {
+ let [ x, y, w, h ] = LAYOUT[name]
+ let xc = Math.round(x + w / 2)
+ let yc = Math.round(y + h / 2)
+
+ let e = document.createElement("div")
+ e.className = "marker demInfl"
+ e.style.left = xc - 25 + "px"
+ e.style.top = yc - 25 + "px"
+ ui.countries[id] = e
+ document.getElementById("markers").appendChild(e)
+}
+
+const INF_DX = 33
+const INF_DY = 10
+
+function create_ui() {
+ ui.layout_xy = []
+ ui.spaces = []
+ ui.dem_inf = []
+ ui.com_inf = []
+ ui.dem_inf2 = []
+ ui.com_inf2 = []
+ ui.dem_inf3 = []
+ ui.com_inf3 = []
+
+ for (let s = 0; s <= last_space; ++s) {
+ let info = spaces[s]
+ let [ x, y, w, h ] = LAYOUT[info.ascii_name]
+ let xc = Math.round(x + w / 2)
+ let yc = Math.round(y + h / 2)
+ x -= 6
+ y -= 6
+ w += 12
+ h += 12
+
+ ui.layout_xy[s] = [ xc, yc ]
+
+ let space_e = document.createElement("div")
+ register_action(space_e, "space", s)
+ space_e.className = "space " + info.country
+ space_e.style.left = x + "px"
+ space_e.style.top = y + "px"
+ space_e.style.width = w + "px"
+ space_e.style.height = h + "px"
+ ui.spaces[s] = space_e
+
+ let com_e = document.createElement("div")
+ com_e.className = "marker comInfl hide"
+ com_e.style.left = xc + 32 - 25 + "px"
+ com_e.style.top = yc + 12 - 25 + "px"
+ ui.com_inf[s] = com_e
+
+ let com_e2 = document.createElement("div")
+ com_e2.className = "marker comInfl hide"
+ com_e2.style.left = xc + 32 - 25 + INF_DX + "px"
+ com_e2.style.top = yc + 12 - 25 + INF_DY + "px"
+ ui.com_inf2[s] = com_e2
+
+ let com_e3 = document.createElement("div")
+ com_e3.className = "marker comInfl hide"
+ com_e3.style.left = xc + 32 - 25 + 5 + INF_DX + "px"
+ com_e3.style.top = yc + 12 - 25 + 5 + INF_DY + "px"
+ ui.com_inf3[s] = com_e3
+
+ let dem_e = document.createElement("div")
+ dem_e.className = "marker demInfl hide"
+ dem_e.style.left = xc - 32 - 25 + "px"
+ dem_e.style.top = yc + 12 - 25 + "px"
+ ui.dem_inf[s] = dem_e
+
+ let dem_e2 = document.createElement("div")
+ dem_e2.className = "marker demInfl hide"
+ dem_e2.style.left = xc - 32 - 25 - INF_DX + "px"
+ dem_e2.style.top = yc + 12 - 25 + INF_DY + "px"
+ ui.dem_inf2[s] = dem_e2
+
+ let dem_e3 = document.createElement("div")
+ dem_e3.className = "marker demInfl hide"
+ dem_e3.style.left = xc - 32 - 25 - 5 - INF_DX + "px"
+ dem_e3.style.top = yc + 12 - 25 + 5 + INF_DY + "px"
+ ui.dem_inf3[s] = dem_e3
+
+ document.getElementById("spaces").append(space_e)
+ document.getElementById("markers").appendChild(com_e)
+ document.getElementById("markers").appendChild(com_e2)
+ document.getElementById("markers").appendChild(com_e3)
+ document.getElementById("markers").appendChild(dem_e)
+ document.getElementById("markers").appendChild(dem_e2)
+ document.getElementById("markers").appendChild(dem_e3)
+ }
+
+ ui.cards = []
+ for (let c = 1; c <= last_card; ++c) {
+ const card_e = document.createElement("div")
+ register_action(card_e, "card", c)
+ card_e.className = "card event_" + c
+ ui.cards[c] = card_e
+ }
+
+ ui.power_cards = []
+ for (let c = 1; c <= last_power_card; ++c) {
+ const power_card_e = document.createElement("div")
+ register_action(power_card_e, "power_card", c)
+ power_card_e.className = "card power_card power_" + c
+ ui.power_cards[c] = power_card_e
+ }
+ ui.events = []
+ for (let id of box_events) {
+ ui.events[id] = document.createElement("div")
+ ui.events[id].id = "event_" + id
+ ui.events[id].className = "marker event aside"
+ }
+ for (let id of board_events) {
+ ui.events[id] = document.createElement("div")
+ ui.events[id].id = "event_" + id
+ ui.events[id].className = "marker event"
+ document.getElementById("markers").appendChild(ui.events[id])
+ }
+
+ ui.countries = []
+ create_country(0, "country_poland")
+ create_country(1, "country_hungary")
+ create_country(2, "country_east_germany")
+ create_country(3, "country_bulgaria")
+ create_country(4, "country_czechoslovakia")
+ create_country(5, "country_romania")
+}
+
+function layout_turn_marker() {
+ let x = 654 + 24 + (view.turn - 1) * 53
+ let y = 80 + 24
+ ui.turn.style.left = x - 25 + "px"
+ ui.turn.style.top = y - 25 + "px"
+}
+
+function layout_round_marker() {
+ let x = 709 + 24 + (view.round - 1) * 53
+ let y = 142 + 24
+ ui.round.style.left = x - 25 + "px"
+ ui.round.style.top = y - 25 + "px"
+ if (view.round_player === "Democrat")
+ // TODO: bit flag?
+ ui.round.className = "marker dem"
+ else
+ ui.round.className = "marker com"
+}
+
+function layout_stability_marker() {
+ let x = 24 + 1381
+ let y = 24 + 1081 + view.stability * 54
+ ui.stability.style.left = x - 25 + "px"
+ ui.stability.style.top = y - 25 + "px"
+}
+
+let TST_X = [ 0, 53, 53 + 69, 53 + 69 * 2, 53 + 69 * 3, 53 + 69 * 4, 53 + 69 * 5, 53 + 69 * 6, 556 ]
+let TST_Y = [ 2128, 2257 ]
+
+function layout_tst_marker(e, v, top) {
+ let x = TST_X[v] + 24
+ let y = TST_Y[top] + 24
+ e.style.left = x - 25 + "px"
+ e.style.top = y - 25 + "px"
+}
+
+function layout_vp_marker() {
+ let x, y
+
+ if (view.vp > 21) { view.vp = 21 }
+ if (view.vp < -21) { view.vp = -21 }
+ if (view.vp === 0) {
+ y = 2425 + 25
+ x = 843 + 28
+ } else if (view.vp === -21) {
+ y = 2424 + 25
+ x = 803 + 28 - 651
+ } else if (view.vp === 21) {
+ y = 2424 + 25
+ x = 883 + 28 + 651
+ } else if (view.vp < 0) {
+ if (view.vp & 1) {
+ y = 2456 + 25
+ x = 803 + 28 - ((-view.vp - 1) / 2) * 62
+ } else {
+ y = 2395 + 25
+ x = 772 + 28 - ((-view.vp - 2) / 2) * 62
+ }
+ } else if (view.vp > 0) {
+ if (view.vp & 1) {
+ y = 2396 + 25
+ x = 883 + 28 + ((view.vp - 1) / 2) * 62
+ } else {
+ y = 2455 + 25
+ x = 913 + 28 + ((view.vp - 2) / 2) * 62
+ }
+ }
+ ui.vp.style.left = x - 25 + "px"
+ ui.vp.style.top = y - 25 + "px"
+}
+
+function layout_country(id) {
+ for (let i = 0; i < 6; i++) {
+ // TODO: what number to display?
+ if (view.revolutions[id])
+ ui.countries[id].className = "marker demInfl ctl v" + view.times_held[id]
+ else if (view.times_held[id] > 0)
+ ui.countries[id].className = "marker comInfl ctl v" + view.times_held[id]
+ else
+ ui.countries[id].className = "marker hide"
+ }
+}
+
+function layout_inf_markers(cn, one, two, three, v, ctl) {
+ if (ctl)
+ cn += " ctl"
+ if (v > 16) {
+ one.className = cn + " v" + 8
+ two.className = cn + " v" + 8
+ three.className = cn + " v" + (v - 16)
+ }
+ else if (v > 8) {
+ one.className = cn + " v" + 8
+ two.className = cn + " v" + (v - 8)
+ three.className = "hide"
+ } else if (v > 0) {
+ one.className = cn + " v" + v
+ two.className = "hide"
+ three.className = "hide"
+ } else {
+ one.className = "hide"
+ two.className = "hide"
+ three.className = "hide"
+ }
+}
+
+function on_update() {
+ if (!ui.spaces)
+ create_ui()
+
+ // UPDATE PLAYER INFO
+
+ if (view.is_pwr_struggle) {
+ roles.Democrat.stat.textContent = `${view.democrat_power_hand} Power cards`
+ roles.Communist.stat.textContent = `${view.communist_power_hand} Power cards`
+ } else {
+ roles.Democrat.stat.textContent = `${view.democrat_hand} cards`
+ roles.Communist.stat.innerText = `${view.communist_hand} cards`
+ }
+
+ ui.turn_info.innerText = `Strategy deck: ${view.strategy_deck} cards`
+
+ // UPDATE TRACK MARKERS
+
+ layout_turn_marker()
+ layout_round_marker()
+ layout_stability_marker()
+ layout_vp_marker()
+ layout_tst_marker(ui.dem_tst, view.dem_tst, 0)
+ layout_tst_marker(ui.com_tst, view.com_tst, 1)
+
+ // UPDATE EVENT MARKERS ON THE BOARD
+
+ if (view.persistent_events.includes(C_SOLIDARITY_LEGALIZED))
+ ui.events[C_SOLIDARITY_LEGALIZED].style.display = "block"
+ else
+ ui.events[C_SOLIDARITY_LEGALIZED].style.display = "none"
+
+ if (view.persistent_events.includes(C_THE_WALL))
+ ui.events[C_THE_WALL].style.display = "block"
+ else
+ ui.events[C_THE_WALL].style.display = "none"
+
+ if (view.persistent_events.includes(C_SYSTEMATIZATION)) {
+ ui.events[C_SYSTEMATIZATION].style.display = "block"
+ ui.events[C_SYSTEMATIZATION].style.left = ui.layout_xy[view.systematization][0] - 25 + "px"
+ ui.events[C_SYSTEMATIZATION].style.top = ui.layout_xy[view.systematization][1] - 25 + "px"
+ } else {
+ ui.events[C_SYSTEMATIZATION].style.display = "none"
+ }
+
+ if (view.the_tyrant_is_gone) {
+ ui.events[C_THE_TYRANT_IS_GONE].style.display = "block"
+ ui.events[C_THE_TYRANT_IS_GONE].style.left = ui.layout_xy[view.the_tyrant_is_gone][0] - 25 + "px"
+ ui.events[C_THE_TYRANT_IS_GONE].style.top = ui.layout_xy[view.the_tyrant_is_gone][1] - 50 + "px"
+ } else {
+ ui.events[C_THE_TYRANT_IS_GONE].style.display = "none"
+ }
+
+ // EVENT REMINDER LIST
+
+ ui.event_reminder_list.replaceChildren()
+ for (let id of box_events)
+ if (view.persistent_events.includes(id))
+ ui.event_reminder_list.appendChild(ui.events[id])
+
+ // UPDATE INFLUENCE VALUES
+
+ for (let s = 0; s <= last_space; ++s) {
+ const demInfl = view.demInfl[s]
+ const comInfl = view.comInfl[s]
+ layout_inf_markers("marker demInfl", ui.dem_inf[s], ui.dem_inf2[s], ui.dem_inf3[s], demInfl, demInfl - comInfl >= spaces[s].stability)
+ layout_inf_markers("marker comInfl", ui.com_inf[s], ui.com_inf2[s], ui.com_inf3[s], comInfl, comInfl - demInfl >= spaces[s].stability)
+ }
+
+ // UPDATE COUNTRY MARKERS
+
+ for (let i = 0; i < 6; ++i)
+ layout_country(i)
+
+ // UPDATE CARD DISPLAYS
+
+ ui.samizdat_card.replaceChildren()
+ if (view.samizdat > 0)
+ ui.samizdat_card.appendChild(ui.cards[view.samizdat])
+
+ ui.hand.replaceChildren()
+ for (let c of view.hand)
+ ui.hand.appendChild(ui.cards[c])
+
+ ui.power_hand.replaceChildren()
+ if (view.power_hand)
+ for (let c of view.power_hand)
+ ui.power_hand.appendChild(ui.power_cards[c])
+
+ ui.power_discard.replaceChildren()
+ if (view.power_struggle_discard)
+ for (let c of view.power_struggle_discard)
+ ui.power_discard.appendChild(ui.power_cards[c])
+
+ ui.opp_hand.replaceChildren()
+ if (view.opp_hand)
+ for (let c of view.opp_hand)
+ ui.opp_hand.appendChild(ui.cards[c])
+
+ ui.securitate.replaceChildren()
+ if (view.opp_power_hand)
+ for (let c of view.opp_power_hand)
+ ui.securitate.appendChild(ui.power_cards[c])
+
+ ui.ceausescu_hand.replaceChildren()
+ if (view.ceausescu_cards)
+ for (let c of view.ceausescu_cards)
+ ui.ceausescu_hand.appendChild(ui.power_cards[c])
+
+ ui.discard.replaceChildren()
+ for (let c of view.strategy_discard)
+ ui.discard.appendChild(ui.cards[c])
+ if (view.discard)
+ document.getElementById("discard_panel").classList.remove("hide")
+ else
+ document.getElementById("discard_panel").classList.add("hide")
+
+ ui.removed.replaceChildren()
+ for (let c of view.strategy_removed)
+ ui.removed.appendChild(ui.cards[c])
+
+ ui.persistent.replaceChildren()
+ for (let c of view.persistent_events)
+ if (c < 111)
+ ui.persistent.appendChild(ui.cards[c])
+
+ ui.played_card.replaceChildren()
+ if (view.played_card > 0)
+ ui.played_card.appendChild(ui.cards[view.played_card])
+ if (view.power_card_1 > 0)
+ ui.played_card.appendChild(ui.power_cards[view.power_card_1])
+ if (view.power_card_2 > 0)
+ ui.played_card.appendChild(ui.power_cards[view.power_card_2])
+
+ for (let e of action_register)
+ e.classList.toggle("action", is_action(e.my_action, e.my_id))
+
+ for (let s = 0; s <= last_space; ++s)
+ ui.spaces[s].classList.toggle("selected", view.selected_space === s)
+
+ action_button("yes", "Yes")
+ action_button("no", "No")
+ action_button("start", "Start")
+ action_button("check", "Check held cards")
+ action_button("tst_7", "Cancel opponent event")
+ action_button("tst_8", "Event and operations")
+ action_button("end", "End Game")
+ action_button("continue", "Continue playing")
+ action_button("east_germany", "East Germany")
+ action_button("poland", "Poland")
+ action_button("czechoslovakia", "Czechoslovakia")
+ action_button("hungary", "Hungary")
+ action_button("romania", "Romania")
+ action_button("bulgaria", "Bulgaria")
+ action_button("extra", "Take action round")
+ action_button("pass", "Pass")
+ action_button("remove", "Remove SPs")
+ action_button("add", "Add SPs")
+ action_button("ops", "Operations")
+ action_button("discard", "Discard")
+ action_button("strike", "Strike")
+ action_button("march", "March")
+ action_button("rally", "Rally in the Square")
+ action_button("petition", "Petition")
+ action_button("bonus", "Calculate VP bonus")
+ action_button("scoring", "Score country")
+ action_button("surrender", "Surrender Power")
+ action_button("retain", "Retain Power")
+ action_button("take", "Take Power")
+ action_button("concede", "Concede")
+ action_button("struggle", "Begin power struggle")
+ action_button("raise", "Raise the stakes")
+ action_button("draw", "Draw")
+ action_button("scoring", "Scoring")
+ action_button("event", "Event")
+ action_button("opp_event", "Resolve opponent event")
+ action_button("influence", "Place SPs")
+ action_button("support_check", "Support Checks")
+ action_button("tst", "Tiananmen Square Track")
+ action_button("roll", "Roll a die")
+ action_button("done", "Done")
+ action_button("end_round", "End Round")
+ action_button("undo", "Undo")
+}
+
+// =========================== LOG FUNCTIONS ==============================================
+
+function sub_card_name(_match, p1) {
+ let x = p1 | 0
+ return `<span class="card_name" onmouseenter="on_focus_card_tip(${x})" onmouseleave="on_blur_card_tip()">${cards[x].name.replace("*", "")}</span>`
+}
+
+function sub_power_card_name(_match, p1) {
+ let x = p1 | 0
+ return `<span class="card_name" onmouseenter="on_focus_power_card_tip(${x})" onmouseleave="on_blur_power_card_tip()">${power_cards[x].name}</span>`
+}
+
+function sub_power_card_value(_match, p1) {
+ let x = p1 | 0
+ return `<span class="card_name">${x}</span>`
+}
+
+function sub_space_name(_match, p1) {
+ let id = p1 | 0
+ let name = spaces[id].name_unique
+ return `<span class="space_tip" onmouseenter="on_focus_space_tip(${id})" onmouseleave="on_blur_space_tip(${id})" onclick="on_click_space_tip(${id})">${name}</span>`
+}
+
+function sub_die(match) {
+ return die[match] || match
+}
+
+const die = {
+ D1: '<span class="die white d1"></span>',
+ D2: '<span class="die white d2"></span>',
+ D3: '<span class="die white d3"></span>',
+ D4: '<span class="die white d4"></span>',
+ D5: '<span class="die white d5"></span>',
+ D6: '<span class="die white d6"></span>',
+}
+
+function on_log(text) {
+ let p = document.createElement("div")
+
+ if (text.match(/^>/)) {
+ text = text.substring(1)
+ p.className = "i"
+ }
+
+ text = text.replace(/_/g, " ")
+ text = text.replace(/C(\d+)/g, sub_card_name)
+ text = text.replace(/P(\d+)/g, sub_power_card_name)
+ text = text.replace(/V(\d+)/g, sub_power_card_value)
+ text = text.replace(/%(\d+)/g, sub_space_name)
+ text = text.replace(/D[1-6]/g, sub_die)
+
+ if (text.match(/^\.h1/)) {
+ text = text.substring(4)
+ p.className = "h1"
+ } else if (text.match(/^\.h2d/)) {
+ text = text.substring(5)
+ p.className = "h2 dem"
+ } else if (text.match(/^\.h2c/)) {
+ text = text.substring(5)
+ p.className = "h2 com"
+ } else if (text.match(/^\.h2/)) {
+ text = text.substring(4)
+ p.className = "h2"
+ } else if (text.match(/^\.h3/)) {
+ text = text.substring(4)
+ p.className = "h3"
+ }
+
+ p.innerHTML = text
+ return p
+}
+
+// =========================== VISUAL FUNCTIONS ==========================================#
+
+function on_focus_card_tip(card_number) {
+ document.getElementById("tooltip").className = "card event_" + card_number
+}
+
+function on_blur_card_tip() {
+ document.getElementById("tooltip").classList = "card hide"
+}
+
+function on_focus_power_card_tip(card_number) {
+ document.getElementById("tooltip").className = "card power_" + card_number
+}
+
+function on_blur_power_card_tip() {
+ document.getElementById("tooltip").classList = "card hide"
+}
+
+function on_focus_space_tip(id) {
+ ui.spaces[id].classList.add("tip")
+}
+
+function on_blur_space_tip(id) {
+ ui.spaces[id].classList.remove("tip")
+}
+
+function on_click_space_tip(id) {
+ scroll_into_view(ui.spaces[id])
+}
+
+function toggle_discard() {
+ document.getElementById("discard_panel").classList.toggle("hide")
+}
+
+function toggle_removed() {
+ document.getElementById("removed_panel").classList.toggle("hide")
+}
diff --git a/rules.js b/rules.js
index 6a8501a..df304db 100644
--- a/rules.js
+++ b/rules.js
@@ -1,9657 +1,8917 @@
-//"use strict"
-
-const { spaces, cards, power_cards } = require("./data.js")
-
-var game, view, states = {}
-
-const DEM = "Democrat"
-const COM = "Communist"
-
-const first_strategy_card = 1
-const last_strategy_card = 110
-
-const dem_tst_req = [5, 5, 6, 6, 7, 8, 9, 10]
-const com_tst_req = [6, 6, 7, 7, 8, 7, 6, 5]
-const scoring_cards = [22, 23, 42, 43, 55, 95]
-const leader_cards = [37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48]
-const leaders = [1, 4, 5, 6, 7]
-const support_loss_roll = [0, 0, 1, 1, 2, 2, 3, 4]
-const vp_roll = [0, 0, 1, 1, 2, 2, 3, 4]
-const countries = ['Poland', 'Hungary', 'East_Germany', 'Bulgaria', 'Czechoslovakia', 'Romania']
-const elite_spaces = [12, 15, 27, 43, 51, 69]
-const all_power_cards = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52 ]
-const numberless_cards = [25, 26, 27, 28, 29, 30, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52]
-const auto_resolve_events = [5, 8, 9, 13, 17, 25, 26, 30, 35, 50, 53, 54, 58, 59, 62, 63, 65, 70, 72, 74, 99, 102, 108]
-const switch_events = [6, 20, 71]
-
-exports.scenarios = [ "Standard" ]
-
-exports.roles = [ DEM, COM ]
-
-// --- SET UP ---
-
-exports.setup = function (seed, scenario, options) {
- game = {
- seed: seed,
- log: [],
- undo: [],
- summary: [],
- active: null,
- state: "com_init",
- return: '',
- vm: null,
- vm_event: 0,
- vm_event_to_do: false,
- vm_infl_to_do: false,
-
- played_card: 0,
- table_cards: [],
- available_ops: 0,
- vm_available_ops: 0,
- valid_spaces: [],
- valid_cards: [],
-
- vp: 0,
- turn: 0,
- round: 0,
- round_player: COM,
- stability: 0,
- dem_tst_position: 0,
- com_tst_position: 0,
- dem_tst_attempted: 0,
- com_tst_attempted: 0,
- dem_tst_attempted_this_turn: 0,
- com_tst_attempted_this_turn: 0,
-
- demInfl: [],
- comInfl: [],
-
- strategy_deck: [],
- strategy_discard: [],
- discard: false,
- view_opp_hand: false,
- strategy_removed: [],
- persistent_events: [],
- power_struggle_deck: [],
- power_struggle_discard: [],
- dem_hand_limit: 8,
- com_hand_limit: 8,
- democrat_hand: [],
- communist_hand: [],
-
- pwr_struggle_in: [],
- is_pwr_struggle: false,
- dem_pwr_hand_limit: 0,
- com_pwr_hand_limit: 0,
- dem_pwr_hand: [],
- com_pwr_hand: [],
- raised_stakes_discard: 0,
- raised_stakes: 0,
- raised_stakes_round: 0,
- phase: 0,
- times_held: [0, 0, 0, 0, 0, 0],
- revolutions: [false, false, false, false, false, false],
- remove_opponent_infl: false,
- tactics_fails: '',
- }
-
- log_h1("1989 Dawn of Freedom")
-
- game.active = COM
- start_game()
-
- return game
-}
-
-function start_game() {
- //starting influence
-
- // Draw cards
- /* const card_numbers = cards.filter(card => card !== null && card !== undefined).map(card => card.number);
- console.log('card numbers: ', card_numbers) */
- game.strategy_deck = draw_deck(cards)
- reset_power()
-
- //Set starting influence
- spaces.forEach((space, index) => {
- if (space !== null) {
- game.demInfl[index] = space.demInfl
- game.comInfl[index] = space.comInfl
- }
- })
-
- //Set starting placement ops
- game.starting_infl = {
- com_starting_infl: 0,
- dem_starting_infl: 0
- },
-
- // Set variable event cards where event is playable at start of game
-
- game.playable_cards = [14, 15, 21, 70]
-
- //console.log('game.strategy_deck: ', game.strategy_deck[1])
- draw_cards(game.strategy_deck, game.democrat_hand, game.communist_hand, game.dem_hand_limit, game.com_hand_limit)
- //.log('game.strategy_deck: ', game.strategy_deck[1], 'democrat_hand:', game.democrat_hand)
-
- game.valid_spaces = valid_spaces_setup()
- game.available_ops = 2
- game.phase = 0
- log_h1("Place starting Support Points")
- log_side()
-}
-
-
-exports.view = function(state, player) {
- game = state
-
- view = {
- log: game.log,
- active: game.active,
- prompt: null,
- actions: null,
-
- played_card: game.played_card,
- table_cards: game.table_cards,
- valid_spaces: game.valid_spaces,
- valid_cards: game.valid_cards,
-
- demInfl: game.demInfl,
- comInfl: game.comInfl,
- turn: game.turn,
- round: game.round,
- round_player: game.round_player,
- vp: game.vp,
- stability: game.stability,
- dem_tst: game.dem_tst_position,
- com_tst: game.com_tst_position,
- persistent_events: game.persistent_events,
- systematization: game.systematization,
- the_tyrant_is_gone: game.the_tyrant_is_gone,
-
- strategy_deck: game.strategy_deck.length,
- strategy_removed: game.strategy_removed,
- discard: game.discard,
- show_opp_hand: game.view_opp_hand,
-
- democrat_hand: game.democrat_hand.length,
- communist_hand: game.communist_hand.length,
- democrat_power_hand: game.dem_pwr_hand.length,
- communist_power_hand: game.com_pwr_hand.length,
- ceausescu_cards: game.ceausescu_cards,
- is_pwr_struggle: game.is_pwr_struggle,
- times_held: game.times_held,
- revolutions: game.revolutions,
-
- hand: [],
- set_aside: [],
- pwr_hand: [],
-
-
- }
-
- if (game.is_pwr_struggle) {
- view.strategy_discard = game.power_struggle_discard
- } else {
- view.strategy_discard = game.strategy_discard
- }
-
- if (player === game.active && game.vm && game.vm.draw)
- view.drawn = game.vm.draw
-
- if (player === game.active) {
- if (game.selected_space > 0 ) {
- view.valid_spaces = [game.selected_space]
- } else {
- view.valid_spaces = game.valid_spaces
- }
- } else {
- view.valid_spaces = []
- }
-
- if (player === game.active) {
- view.valid_cards = game.valid_cards
- } else {
- view.valid_cards = []
- }
-
- if (player === DEM) {
- view.hand = game.democrat_hand
- if (game.communist_hand_red) {
- view.opp_hand = game.communist_hand_red
- }
- view.set_aside = game.democrat_set_aside /*Is this being used? */
- view.power_hand = game.dem_pwr_hand.sort((a, b) => a - b)
-
- } else if (player === COM) {
- view.hand = game.communist_hand
- view.opp_hand = game.dem_pwr_hand.sort((a, b) => a - b) /*Does the Communist ever see Democrat hand? */
- view.power_hand = game.com_pwr_hand.sort((a, b) => a - b)
- }
-
- if (game.active === DEM) {
- view.samizdat = game.samizdat_card
- }
-
- if (game.state === "game_over") {
- view.prompt = game.victory
- } else if (player === "Observer" || (game.active !== player && game.active !== "Both")) {
- if (states[game.state]) {
- let inactive = states[game.state].inactive
- if (typeof inactive === "function")
- view.prompt = `Waiting for ${game.active} ${inactive()}`
- else
- view.prompt = `Waiting for ${game.active} to ${inactive}`
- } else {
- view.prompt = "A Unknown state: " + game.state
- }
- } else {
- view.actions = {}
-
- if (states[game.state])
- states[game.state].prompt(player)
- else
- view.prompt = "B Unknown state: " + game.state
- if (view.actions.undo === undefined) {
- if (game.undo && game.undo.length > 0)
- view.actions.undo = 1
- else
- view.actions.undo = 0
- }
- }
-
- return view
-}
-
-
-// === ACTIONS ===========
-
-function gen_action(action, argument) {
-//console.log('gen_action called with ', action, ' and ', argument)
- if (argument === undefined) {
- //console.log('argument undefined')
- view.actions[action] = 1
- } else {
- if (!(action in view.actions)) {
- //console.log('push argument')
- view.actions[action] = []
- }
- view.actions[action].push(argument)
- }
- //console.log('view.actions: ', view.actions, 'view.actions[action]: ', view.actions[action])
-}
-
-function gen_action_infl(space){
- gen_action("infl", space)
-}
-
-function gen_action_card(card){
- gen_action("card", card)
-}
-
-function gen_action_sc(space){
- gen_action("sc", space)
-}
-
-function gen_action_scoring(){
- gen_action("scoring")
-}
-
-exports.action = function (state, player, action, arg) {
- //console.log('exports.action called with state:' , state, 'player:', player, 'action: ', action, 'arg: ', arg)
- game = state
- if (states[game.state] && action in states[game.state]) {
- states[game.state][action](arg, player)
- } else {
- if (action === "undo" && game.undo && game.undo.length > 0)
- pop_undo()
- else
- throw new Error("Invalid action: " + action)
- }
- return game
-}
-
-// ============= GAME STATES =======================
-
-states.com_init = {
- inactive: 'place starting SPs',
- prompt() {
- if (game.available_ops == 0) {
- view.prompt = 'Place starting SPs: done.';
- gen_action("done");
- return;
- } else if (game.starting_infl.dem_starting_infl === 2) {
- view.prompt = `Place your last ${pluralize(game.available_ops,'starting SP')}.`
- } else {
- view.prompt = `Place ${pluralize(game.available_ops,'starting SP')}.`
- }
- for (let space_id of game.valid_spaces) {
- if (space_id) {
- gen_action_infl(spaces[space_id].name_unique);
- }
- }
- },
- infl(space) {
- add_infl(space)
-
- },
- done() {
- if (game.summary.length > 0) {
- pop_summary()
- log_br()
- }
-
- game.starting_infl.com_starting_infl++
- if (game.starting_infl.com_starting_infl == 1){
- game.available_ops = 3
- game.state = 'dem_init'
- valid_spaces_setup()
- next_player()
- } else if (game.starting_infl.com_starting_infl == 2) {
- game.available_ops = 4
- game.state = 'dem_init'
- valid_spaces_setup()
- next_player()
- } else if (game.starting_infl.com_starting_infl == 3) {
- delete game.starting_infl
- game.state = 'start_game'
- }
- }
-}
-
-states.dem_init = {
- inactive: 'place starting SPs.',
- prompt() {
- if (game.available_ops == 0) {
- view.prompt = 'Place starting SPs: done.';
- gen_action("done");
- return;
- } else if (game.starting_infl.com_starting_infl === 2) {
- view.prompt = `Place your last ${pluralize(game.available_ops,'starting SP')}.`
- } else {
- view.prompt = `Place ${pluralize(game.available_ops,'starting SP')}.`
- }
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique);
- }
- },
- infl(space) {
- add_infl(space)
- },
-
- done() {
- if (game.summary.length > 0) {
- pop_summary()
- log_br()
- }
-
- game.starting_infl.dem_starting_infl++
- if (game.starting_infl.dem_starting_infl == 1){
- game.available_ops = 3
- } else if (game.starting_infl.dem_starting_infl == 2) {
- game.available_ops = 2
- }
- game.state = 'com_init'
- valid_spaces_setup()
- next_player()
- }
-}
-
-states.start_game = {
- inactive: 'start Turn 1.',
- prompt() {
- view.prompt = 'Start Turn 1.'
- gen_action('start')
- },
- start() {
- new_turn()
- clear_undo()
- game.state = 'choose_card'
- }
-}
-
-states.choose_card = {
- inactive: 'choose a card.',
- prompt() {
- /*if (game.played_card > 0) {
- game.state = 'play_card'
- view.prompt = 'Choose a card: done.'
- gen_action("done");
- return;
- } */
- if ((game.active===DEM && game.democrat_hand.length === 0) || game.active === COM && game.communist_hand.length === 0) {
- view.prompt = 'No cards remaining: you must pass.'
- gen_action('pass')
- } else {
- view.prompt = 'Play a card.'
- let available_cards
- if (game.active === DEM) {
- available_cards = game.democrat_hand
- } else {
- available_cards = game.communist_hand
- }
- for (let card of available_cards) {
- //gen_action('card_event', card)
-
- if (scoring_cards.includes(card)) {
- /*view.prompt = 'Play for:'*/
- gen_action('card_event', card)
- }
-
-
- //Check for Tiananmen Square Track awards special abilities
-
- if ((game.active === DEM && cards[card].side !== 'C' && game.dem_tst_position >= 7 && game.com_tst_position < 7 && !game.tst_7) || (game.active === COM && cards[card].side !== 'D' && game.com_tst_position >= 7 && game.dem_tst_position < 7 && !game.tst_7)){
- gen_action('card_tst_7', card)
- }
-
- console.log('game.tst_8', game.tst_8)
- if ((game.active === DEM && cards[card].side !== 'C' && game.dem_tst_position >= 8 && game.com_tst_position < 8 && !game.tst_8) || (game.active === COM && cards[card].side !== 'D' && game.com_tst_position >= 8 && game.dem_tst_position < 8 && !game.tst_8)){
- gen_action('card_tst_8', card)
- }
-
- // Check for Reformer Rehabilitated
-
- //console.log('game.active', game.active, 'game.playable_cards[67].playable', game.playable_cards[67].playable)
-
-
- if (card === 67 && game.playable_cards.includes(67)){
- if (game.active === DEM && (game.dem_tst_position > game.com_tst_position)) {
- gen_action('card_event', card)
- }
- if (game.active === COM && (game.dem_tst_position < game.com_tst_position)) {
- gen_action('card_event', card)
- }
- }
-
- //Continue with normal logic
-
- //Check if it is a card with an event which is always playable
-
- if (cards[card].playable) {
- get_events(card)
- }
-
- // Resolve cards with variable events (not Reformer)
-
- if (card !== 67 && game.playable_cards.includes(card)) {
- get_events(card)
- }
-
- //Actions for non-scoring cards
-
- if (!scoring_cards.includes(card)) {
- gen_action('card_influence', card)
- if (game.active === DEM && game.dem_tst_attempted_this_turn === 0 && game.dem_tst_position <=8 || game.active === COM && game.com_tst_attempted_this_turn === 0 && game.com_tst_position <= 8) {
- gen_action('card_tst', card)
- }
- gen_action('card_support_check', card)
- }
- }
- }
- },
- /*card_event(card) {
- push_undo()
- //Check if player is at risk of losing game due to held scoring card
- if (!scoring_cards.includes(card)) {
- let scoring_cards_count = count_scoring_cards()
-
- if (game.round !== 8 && scoring_cards_count >= (8-game.round)){
- game.temp = card
- game.state = 'confirm_card'
- return
- }
- }
- select_card(card)
- },*/
- pass() {
- log('No cards remaining. Passed')
- end_round()
- },
- card_event(card) {
- push_undo()
- select_card(card)
- console.log('played event, game.active', game.active, 'game.view_opp_hand', game.view_opp_hand)
- log_gap(`Played C${cards[game.played_card].number} for the event`)
- if (scoring_cards.includes(game.played_card)) {game.phase = 0}
- else {game.phase = 1}
- game.return = game.active
- if (switch_events.includes(game.played_card)) {next_player()}
- game.vm_event = game.played_card
- goto_vm(game.vm_event)
- },
- card_opp_event(card) {
- push_undo()
- select_card(card)
- log_gap(`Played C${cards[game.played_card].number} for the event`)
- game.phase = 1 /*Do I still need this?*/
- game.vm_infl_to_do = true
- game.return = game.active
- game.vm_event = game.played_card
- if (auto_resolve_events.includes(game.played_card) || switch_events.includes(game.played_card)) {
- goto_vm(game.vm_event)}
- else {
- next_player()
- log(`C${game.vm_event}`)
- goto_vm(game.vm_event)
- }
- },
- card_influence(card) {
- push_undo()
- select_card(card)
- log_gap(`Played C${cards[game.played_card].number} to place SPs`)
-
-
- // Check if Common European Home played for influence
- if (game.played_card === 21) {
- if (game.active === DEM) {
- game.vp --
- log('-1 VP')
- if (check_vp()) {
- return
- }
- } else {
- game.vp ++
- log('+1 VP')
- if (check_vp()) {
- return
- }
- }
- }
- // Check if card is opponent card with event that needs to be resolved
-
- if (cards[game.played_card].playable || game.playable_cards.includes(game.played_card)) {
- if ((game.active === DEM && cards[game.played_card].side === "C" ) || (game.active === COM && cards[game.played_card].side === "D")) {
- //game.phase = 1 /*Do I need this? */
- game.vm_event_to_do = true
- }
- }
-
- // If ABHR - Set AHBR tracker to true
- if (game.persistent_events.includes(58)) {
- game.austria_hungary_border_reopened_tracker = true
- }
- game.state='add_influence'
- valid_spaces_infl()
- },
- card_tst(card) {
- push_undo()
- select_card(card)
- log_gap(`Played C${cards[game.played_card].number} to the Tiananmen Square Track`)
- game.state='tiananmen_square_attempt'
- },
- card_support_check(card) {
- push_undo()
- select_card(card)
- log_gap(`Played C${cards[game.played_card].number} for support checks`)
-
- // Check if card is opponent card with event that needs to be resolved
- /*if (game.phase === 0 && game.active === DEM && cards[game.played_card].side === "C" && game.playable_cards[game.played_card].playable === 1 || game.phase === 0 && game.active === COM && cards[game.played_card].side === "D" && game.playable_cards[game.played_card].playable === 1 ) {
- game.vm_event_to_do = true
- }*/
-
- if (cards[game.played_card].playable || game.playable_cards.includes(game.played_card)) {
- if ((game.active === DEM && cards[game.played_card].side === "C" ) || (game.active === COM && cards[game.played_card].side === "D")) {
- game.vm_event_to_do = true
- }
- }
-
- game.available_ops = 2
- game.state='support_check_prep'
- valid_spaces_sc()
- },
- card_tst_7() {
- select_card(card)
- game.vm_infl_to_do = true
- game.tst_7 = true
- game.state = 'resolve_opponent_event'
- },
- card_tst_8(card) { /*Play card for ops and event */
- select_card(card)
- game.vm_event_to_do = true
- game.vm_infl_to_do = true
- game.tst_8 = true
- game.state = 'vm_tst_8'
- },
-
- /*done () {
- game.state = 'play_card'
- } */
-}
-
-states.confirm_card = {
- inactive: 'choose a card.',
- prompt() {
- let scoring_cards_count = count_scoring_cards()
- view.prompt = `${pluralize(scoring_cards_count,'scoring card')} in hand with ${pluralize(8-game.round,'turn')} remaining. Scoring cards may not be held. Continue?`
- gen_action('continue')
- },
- continue() {
- select_card(game.temp)
- }
-}
-
-states.play_card ={
- get inactive() {
- return `play ${clean_name(cards[game.played_card].name)}.`
- },
- prompt () {
- if (game.phase >= 1) {
- view.prompt = `${clean_name(cards[game.played_card].name)}: done.`
- gen_action('done')
- return
- }
-
- view.prompt = `Play ${clean_name(cards[game.played_card].name)} for:`
-
- if (scoring_cards.includes(game.played_card)) {
- /*view.prompt = 'Play for:'*/
- gen_action('event')
- return
- }
-
-
- //Check for Tiananmen Square Track awards special abilities
- if ((game.active === DEM && cards[game.played_card].side !== 'C' && game.dem_tst_position >= 8 && game.com_tst_position < 8 && !game.tst_8) || (game.active === COM && cards[game.played_card].side !== 'D' && game.com_tst_position >= 8 && game.dem_tst_position < 8 && !game.tst_8)){
- gen_action('tst_8')
- }
-
- // Check for Reformer Rehabilitated
-
- //console.log('game.active', game.active, 'game.playable_cards[67].playable', game.playable_cards[67].playable)
-
-
- if (game.played_card === 67 && game.playable_cards.includes(67)){
- if (game.active === DEM && (game.dem_tst_position > game.com_tst_position)) {
- gen_action('event')
- }
- if (game.active === COM && (game.dem_tst_position < game.com_tst_position)) {
- gen_action('event')
- }
- }
-
- //Continue with normal logic
-
- //Check if it is a card with an event which is always playable
-
- if (cards[game.played_card].playable) {
- get_events(game.played_card)
- }
-
- // Resolve cards with variable events (not Reformer)
-
- if (game.played_card !== 67 && game.playable_cards.includes(game.played_card)) {
- get_events(game.played_card)
- } /*
- if ((game.active === DEM && cards[game.played_card].side === 'D' && game.playable_cards[game.played_card].playable === 1) || (game.active === COM && cards[game.played_card].side === 'C' && game.playable_cards[game.played_card].playable ===1) || (cards[game.played_card].side === 'N'&& game.playable_cards[game.played_card].playable ===1)) {
- gen_action('event')
- } else if ((game.active === DEM && (cards[game.played_card].side === 'C' && game.playable_cards[game.played_card].playable ===1)) || game.active === COM && (cards[game.played_card].side === 'D' && game.playable_cards[game.played_card].playable ===1)) {
- gen_action('opp_event')
- } */
-
- gen_action('influence')
- if (game.active === DEM && game.dem_tst_attempted_this_turn === 0 && game.dem_tst_position <=8 || game.active === COM && game.com_tst_attempted_this_turn === 0 && game.com_tst_position <= 8) {
- gen_action('tst')
- }
- gen_action('support_check')
- },
- event() {
- push_undo()
- console.log('played event, game.active', game.active, 'game.view_opp_hand', game.view_opp_hand)
- log_gap(`Played C${cards[game.played_card].number} for the event`)
- if (scoring_cards.includes(game.played_card)) {game.phase = 0}
- else {game.phase = 1}
- game.return = game.active
- if (switch_events.includes(game.played_card)) {next_player()}
- game.vm_event = game.played_card
- goto_vm(game.vm_event)
- },
- opp_event() {
- push_undo()
- log_gap(`Played C${cards[game.played_card].number} for the event`)
- game.phase = 1 /*Do I still need this?*/
- game.vm_infl_to_do = true
- game.return = game.active
- game.vm_event = game.played_card
- if (auto_resolve_events.includes(game.played_card) || switch_events.includes(game.played_card)) {
- goto_vm(game.vm_event)}
- else {
- next_player()
- log(`C${game.vm_event}`)
- goto_vm(game.vm_event)
- }
- },
- influence() {
- push_undo()
- log_gap(`Played C${cards[game.played_card].number} to place SPs`)
-
-
- // Check if Common European Home played for influence
- if (game.played_card === 21) {
- if (game.active === DEM) {
- game.vp --
- log('-1 VP')
- if (check_vp()) {
- return
- }
- } else {
- game.vp ++
- log('+1 VP')
- if (check_vp()) {
- return
- }
- }
- }
- // Check if card is opponent card with event that needs to be resolved
-
- if (cards[game.played_card].playable || game.playable_cards.includes(game.played_card)) {
- if ((game.active === DEM && cards[game.played_card].side === "C" ) || (game.active === COM && cards[game.played_card].side === "D")) {
- //game.phase = 1 /*Do I need this? */
- game.vm_event_to_do = true
- }
- }
-
- // If ABHR - Set AHBR tracker to true
- if (game.persistent_events.includes(58)) {
- game.austria_hungary_border_reopened_tracker = true
- }
- game.state='add_influence'
- valid_spaces_infl()
- },
- tst() {
- push_undo()
- log_gap(`Played C${cards[game.played_card].number} to the Tiananmen Square Track`)
- game.state='tiananmen_square_attempt'
- },
- support_check() {
- push_undo()
- log_gap(`Played C${cards[game.played_card].number} for support checks`)
-
- // Check if card is opponent card with event that needs to be resolved
- /*if (game.phase === 0 && game.active === DEM && cards[game.played_card].side === "C" && game.playable_cards[game.played_card].playable === 1 || game.phase === 0 && game.active === COM && cards[game.played_card].side === "D" && game.playable_cards[game.played_card].playable === 1 ) {
- game.vm_event_to_do = true
- }*/
-
- if (cards[game.played_card].playable || game.playable_cards.includes(game.played_card)) {
- if ((game.active === DEM && cards[game.played_card].side === "C" ) || (game.active === COM && cards[game.played_card].side === "D")) {
- game.vm_event_to_do = true
- }
- }
-
-
-
- game.available_ops = 2
- game.state='support_check_prep'
- valid_spaces_sc()
- },
- tst_8() { /*Play card for ops and event */
- game.vm_event_to_do = true
- game.vm_infl_to_do = true
- game.tst_8 = true
- game.state = 'vm_tst_8'
- },
- done () {
- end_round()
- }
-
-}
-
-states.resolve_opponent_event = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- console.log('in resolve opponent event: discard', game.strategy_discard)
- if (game.vm_infl_to_do) {
- view.prompt = 'Event resolved. Choose to play card for:'
- gen_action('influence')
- gen_action('support_check')
- } else if (game.vm_event_to_do) {
- // Check for Tiananmen Square Track ability - play opponent card without triggering event
- if ((game.active === DEM && game.dem_tst_position >= 7 && game.com_tst_position < 7 && !game.tst_7) || (game.active === COM && game.com_tst_position >= 7 && game.dem_tst_position < 7 && !game.tst_7)){
- gen_action('tst_7')
- }
- view.prompt = `${clean_name(cards[game.played_card].name)}: you must resolve the opponent event.`
- gen_action('opp_event')
- } else {
- view.prompt = 'Event resolved. End the action round.'
- gen_action('done')
- }
- },
- influence(){
- push_undo()
- // If ABHR - Set AHBR tracker to true
- if (game.persistent_events.includes(58)) {
- game.austria_hungary_border_reopened_tracker = true
- }
- game.state = 'finish_add_infl'
- valid_spaces_infl()
- },
- support_check() {
- push_undo()
- game.available_ops = 2
- game.state = 'finish_support_check_prep'
- valid_spaces_sc()
- },
- opp_event() {
- game.vm_event_to_do = false
- game.return_state = 'resolve_opponent_event'
- if (auto_resolve_events.includes(game.played_card) || switch_events.includes(game.played_card)) {
- game.return = game.active
- log(`Played C${game.played_card} for the event`)
- goto_vm(game.played_card)}
- else {
- if (game.active === DEM) {
- game.return = COM
- } else {
- game.return = DEM
- }
- next_player()
- log(`C${game.played_card}`)
- goto_vm(game.played_card)
- }
- },
- tst_7() {
- push_undo()
- log('Event cancelled using Tiananmen Square Track Award')
- game.tst_7 = true
- game.vm_event_to_do = false
- },
- done() {
- /*if(game.round_player === COM && game.active === DEM) {
- log_h3('End of Communist Action Round')
- change_player()
- } */
- end_round()
- }
-}
-
-
-states.finish_add_infl = {
- inactive: 'add SPs.',
- prompt () {
- if (game.available_ops === 0) {
- view.prompt = 'Place SPs: done.'
- gen_action("done")
- return;
- }
-
- view.prompt = `Add SPs: ${game.available_ops} remaining`
-
- // Generate actions for valid spaces
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique)
- }
- },
- infl(space) {
- add_infl(space)
- },
- done() {
- if (game.summary.length > 0) {
- pop_summary()
- log_br()
- }
-
- end_round()
- }
-}
-
-states.finish_support_check_prep = {
- inactive: 'do support checks.',
- prompt () {
- if (game.available_ops === 0) {
- view.prompt = 'Support checks: done.'
- gen_action('done')
- //return
- } else {
- view.prompt = `Select a space. ${pluralize(game.available_ops, 'support check')} remaining.`
- for (let space_id of game.valid_spaces) {
- gen_action_sc(spaces[space_id].name_unique)
- }
- }
- },
- sc(space) {
- push_undo()
- game.selected_space = find_space_index(space)
- // Check for Austria-Hungary Border Reopened - check on first support check only
- //console.log('game.austria_hungary_border_reopened_checked', game.austria_hungary_border_reopened_checked)
- if (game.persistent_events.includes(58)){
- if (game.active === DEM && game.available_ops > 1) {
- //console.log('in ahb check, country, ', spaces[game.selected_space].country, 'ahb', 'austria_hungary_border_reopened'])
- if (spaces[game.selected_space].country === 'East_Germany' && game.persistent_events.includes(58) && game.active === DEM) {
- game.state = 'finish_austria_hungary_border_reopened_check'
- return
- }
- }
- }
- game.state = 'finish_do_support_check'
- },
- done () {
- end_round()
- }
-}
-
-states.finish_austria_hungary_border_reopened_check = {
- inactive: 'decide Austria-Hungary Border Reopened',
- prompt() {
- view.prompt = 'Austria-Hungary Border Reopened: will both support checks be in East Germany?'
- gen_action('yes')
- gen_action('no')
- },
- yes() {
- game.austria_hungary_border_reopened_tracker = true
- game.state = 'finish_do_support_check'
- },
- no() {
- game.state = 'finish_do_support_check'
- }
-}
-
-states.finish_do_support_check = {
- inactive: 'do support checks',
- prompt () {
- view.prompt = `Support check: ${spaces[game.selected_space].name_unique}. Roll a die.`
- gen_action('roll')
- },
- roll() {
- clear_undo()
- do_sc(spaces[game.selected_space].name_unique)
- game.available_ops--
- if (game.available_ops === 0) {
- game.valid_spaces = []
- }
- game.state = 'finish_support_check_prep'
- return
- }
-}
-
-states.add_influence = {
- inactive: 'add SPs.',
- prompt () {
- if (game.available_ops <= 0) {
- view.prompt = 'Place SPs: done.'
- gen_action("done")
- return
- }
-
- view.prompt = `Add SPs: ${game.available_ops} remaining.`
-
- // Generate actions for valid spaces
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique);
- }
- },
- infl(space) {
- add_infl(space)
- },
- done() {
- if (game.summary.length > 0) {
- pop_summary()
- log_br()
- }
-
- if(game.vm_event_to_do) {
- reset_austria_hungary_border_reopened()
- game.state = 'resolve_opponent_event'}
- else {
- end_round()}
- }
-}
-
-states.tiananmen_square_attempt = {
- inactive: 'do Tiananmen Square Attempt.',
- prompt () {
- view.prompt = 'Tiananmen Square Track attempt: Roll a die.'
- gen_action('roll')
- },
- roll() {
- clear_undo()
- do_tst_attempt ()
- }
-}
-
-states.tiananmen_square_attempt_success = {
- inactive: 'do Tiananmen Square Attempt.',
- prompt () {
- view.prompt = 'Tiananmen Square Track attempt successful.'
- gen_action('done')
- },
- done () {
- end_round()
- }
-}
-
-states.tiananmen_square_attempt_fail = {
- inactive: 'do Tiananmen Square Attempt.',
- prompt () {
- view.prompt = 'Tiananmen Square Track attempt failed.'
- gen_action('done')
- },
- done () {
- end_round()
- }
-}
-
-states.tst_goddess = {
- inactive: 'choose whether to discard a card.',
- prompt() {
- //if (game.phase === 0) {
- view.prompt = 'Tiananmen Square Track award: you may discard a non-Power Struggle Card and draw a replacement.'
- for (let card of game.valid_cards) {
- gen_action_card(card)
- }
- gen_action('pass')
- /*} else {
- view.prompt = 'Discard a card: done.'
- gen_action('done')
- }*/
- },
- card(card) {
- push_undo()
- discard(card)
- game.valid_cards = []
- game.state = 'tst_goddess_draw'
- //game.phase++
- /*if (game.active === DEM) {
- draw_cards(game.strategy_deck, game.democrat_hand, game.communist_hand, game.democrat_hand.length +1, game.communist_hand.length)
- } else {
- draw_cards(game.strategy_deck, game.democrat_hand, game.communist_hand, game.democrat_hand.length, game.communist_hand.length +1)
- }*/
- },
- pass() {
- log('Did not discard')
- log_h2("Action Round " + game.round)
- if (game.active === DEM) {
- next_player()
- } else {
- log_side()
- }
- if (game.persistent_events.includes(5)) {
- game.state = 'general_strike'
- } else {
- game.state = 'choose_card'
- }
- },
- done() {
-
- log_h2("Action Round " + game.round)
- if (game.active === DEM) {
- next_player()
- } else {
- log_side()
- }
- game.phase = 0
- if (game.persistent_events.includes(5)) {
- game.state = 'general_strike'
- } else {
- game.state = 'choose_card'
- }
- }
-}
-
-states.tst_goddess_draw = {
- inactive: 'choose whether to discard a card.',
- prompt() {
- view.prompt = 'Draw a replacement card.'
- gen_action('draw')
- },
- draw() {
- if (game.active === DEM) {
- draw_cards(game.strategy_deck, game.democrat_hand, game.communist_hand, game.democrat_hand.length +1, game.communist_hand.length)
- } else {
- draw_cards(game.strategy_deck, game.democrat_hand, game.communist_hand, game.democrat_hand.length, game.communist_hand.length +1)
- }
- log_h2("Action Round " + game.round)
- if (game.active === DEM) {
- next_player()
- } else {
- log_side()
- }
- game.phase = 0
- if (game.persistent_events.includes(5)) {
- game.state = 'general_strike'
- } else {
- game.state = 'choose_card'
- }
- }
-}
-
-
-
-states.support_check_prep = {
- inactive: 'do support checks',
- prompt () {
- if (game.available_ops === 0) {
- view.prompt = 'Support checks: done.'
- gen_action('done')
- //return
- }
- if (game.available_ops > 0) {
- view.prompt = `Select a space. ${pluralize(game.available_ops, 'support check')} remaining.`
-
- for (let space_id of game.valid_spaces) {
- gen_action_sc(spaces[space_id].name_unique)
- }
- }
- },
- sc(space) {
- push_undo()
- game.selected_space = find_space_index(space)
-
- // Check for Austria-Hungary Border Reopened - check on first support check only
- //console.log('game.austria_hungary_border_reopened_checked', game.austria_hungary_border_reopened_checked)
- if (game.persistent_events.includes(58)) {
- if (game.active === DEM && game.available_ops > 1) {
- if (spaces[game.selected_space].country === 'East_Germany' && game.persistent_events.includes(58) && game.active === DEM) {
- game.state = 'austria_hungary_border_reopened_check'
- return
- }
- //game.state = 'do_support_check'
- } /*else { */
- }
- game.state = 'do_support_check'
- console.log('game.state after space selected:', game.state)
- //}
- },
- done () {
- if (game.is_pwr_struggle) {/*Crowd Turns Against Ceausescu should be the only time you end up here during a power struggle */
- if (game.return !== game.active) {
- next_player()
- }
- game.state = 'raise_stakes_1'
- return
- }
-
- if (game.vm_event_to_do) {
- reset_austria_hungary_border_reopened()
- game.state = 'resolve_opponent_event'
- } else {
- end_round()
- }
- }
-}
-
-states.do_support_check = {
- inactive: 'do support checks.',
- prompt () {
- console.log('in do_support_check')
- view.prompt = `Support check: ${spaces[game.selected_space].name_unique}. Roll a die.`
- gen_action('roll')
- },
- roll() {
- clear_undo()
- do_sc(spaces[game.selected_space].name_unique)
- game.available_ops--
- if (game.available_ops === 0) {
- game.valid_spaces = []
- }
- game.state = 'support_check_prep'
- return
- }
-}
-
-states.austria_hungary_border_reopened_check = {
- inactive: 'decide Austria-Hungary Border Reopened',
- prompt() {
- view.prompt = 'Austria-Hungary Border Reopened: will both support checks be in East Germany?'
- gen_action('yes')
- gen_action('no')
- },
- yes() {
- game.austria_hungary_border_reopened_tracker = true
- game.state = 'do_support_check'
- },
- no() {
- game.state = 'do_support_check'
- }
-}
-
-//======================= POWER STRUGGLE ===============================
-
-states.draw_power_cards = {
- inactive: 'draw cards.',
- prompt() {
- view.prompt = 'Draw cards.'
- gen_action('draw')
- },
- draw() {
- push_undo()
- game.power_struggle_deck = [...all_power_cards]
- console.log('game.power_struggle_deck.length', game.power_struggle_deck.length)
- console.log('called draw cards, country', game.pwr_struggle_in, 'game.active', game.active, 'game.view_opp_hand', game.view_opp_hand)
- console.log('test3')
- let presence = check_presence(game.pwr_struggle_in)
- console.log('test2')
- if (presence.dem_spaces > 0) {
- game.dem_pwr_hand_limit = 6 + 2*(presence.dem_spaces - 1)
- } else {
- game.dem_pwr_hand_limit = 0
- }
- if (presence.com_spaces > 0 ) {
- game.com_pwr_hand_limit = 6 + 2*(presence.com_spaces - 1)
- } else {
- game.com_pwr_hand_limit = 0
- }
- // Events which affect cards drawn
- if (game.persistent_events.includes(17) && game.com_pwr_hand_limit >= 2) {
- log('Democrat receives 2 cards from Communist due to C17')
- game.dem_pwr_hand_limit += 2
- game.com_pwr_hand_limit -= 2
- discard_from_table(17)
- game.persistent_events = game.persistent_events.filter(n => n !== 17)
- }
-
- if (game.persistent_events.includes(72)) {
- let farmer_check
- for (let space of spaces) {
- if (space && space.country === game.pwr_struggle_in && space.socio === 3 && check_dem_control(space.space_id)) {
- farmer_check = true
- }
- }
- if (farmer_check && game.com_pwr_hand_limit > 0) {
- log('Democrat receives 1 cards from Communist due to C72')
- game.dem_pwr_hand_limit += 1
- game.com_pwr_hand_limit -= 1
- permanently_remove(72)
- game.persistent_events = game.persistent_events.filter(n => n !== 72)
- }
- }
-
- if (game.persistent_events.includes(102) && game.dem_pwr_hand_limit >=2 && (game.pwr_struggle_in === 'Romania' || game.pwr_struggle_in === 'Bulgaria')) {
- log('Communist receives 2 cards from Democrat due to C102')
- game.dem_pwr_hand_limit -= 2
- game.com_pwr_hand_limit += 2
- permanently_remove(102)
- game.persistent_events = game.persistent_events.filter(n => n !== 102)
- }
-
- //Draw Power Cards
- game.is_pwr_struggle = true
- console.log('game.dem_pwr_hand_limit', game.dem_pwr_hand_limit, 'game.com_pwr_hand_limit', game.com_pwr_hand_limit)
- draw_cards(game.power_struggle_deck, game.dem_pwr_hand, game.com_pwr_hand, game.dem_pwr_hand_limit, game.com_pwr_hand_limit)
- game.valid_cards = all_power_cards
-
- log(`Communist: ${game.com_pwr_hand.length} cards`)
- log(`Democrat: ${game.dem_pwr_hand.length} cards`)
-
- //Check if The Crowd Turns Against Ceausescu occurs
- if (game.table_cards.includes(54) && game.pwr_struggle_in === 'Romania') {
- console.log('draw cards: crowd subcheck, game.active', game.active)
- if (game.active === COM) {
- game.return = COM
- next_player()
- }
- log_h3('The Crowd Turns Against Ceausescu')
- game.persistent_events.push(54)
- game.state = 'the_crowd_turns_against_ceausescu_prep'
- } else {
- log_h2('Raise the Stakes')
- game.state = 'raise_stakes_1'
- console.log('game.state', game.state, 'game.active', game.active, 'game.view_opp_hand', game.view_opp_hand)
- }
- }
-}
-
-states.the_crowd_turns_against_ceausescu_prep = {
- get inactive() {
- return `resolve ${clean_name(cards[54].name)}.`
- },
- prompt() {
- view.prompt = 'The Crowd Turns Against Ceausescu: draw cards.'
- gen_action('draw')
- },
- draw() {
- game.ceausescu_cards = []
- draw_cards(game.power_struggle_deck, game.ceausescu_cards, game.com_pwr_hand, 15, game.com_pwr_hand.length)
- console.log('game.ceausescu_cards', game.ceausescu_cards)
- game.temp = game.ceausescu_cards.filter(card => card && card >=25 && card <= 30).length
- log(`Drew ${pluralize(game.temp, 'Rally in the Square')}.`)
- game.vm_available_ops = game.temp * 3
- game.state = 'vm_the_crowd_turns_against_ceausescu'
- }
-}
-
-states.vm_the_crowd_turns_against_ceausescu = {
- get inactive() {
- return `resolve ${clean_name(cards[54].name)}.`
- },
- prompt() {
- view.prompt = `You have ${game.vm_available_ops} operations points. Play for:`
- gen_action('influence')
- gen_action('support_check')
- },
- influence() {
- push_undo()
- delete game.ceausescu_cards
- valid_spaces_infl()
- game.valid_spaces = game.valid_spaces.filter(n => spaces[n].country === 'Romania')
- game.state = 'the_crowd_turns_against_ceausescu_infl' /* Send this to add_infl. Add check at end of add_infl similar to valid_spaces*/
- },
- support_check() {
- push_undo()
- delete game.ceausescu_cards
- valid_spaces_sc()
- game.available_ops = 2
- game.state = 'support_check_prep'
- }
-}
-
-states.the_crowd_turns_against_ceausescu_infl = {
- inactive: 'add SPs.',
- prompt () {
- if (game.vm_available_ops === 0)
- {
- view.prompt = 'Place SPs: done.';
- gen_action("done");
- return;
- }
-
- view.prompt = `Add SPs: ${game.vm_available_ops} remaining`
- for (let space of game.valid_spaces) {
- gen_action_infl(spaces[space].name_unique)
- }
- },
- infl(space) {
- vm_do_add_infl(space)
- },
- done() {
- if (game.summary.length > 0) {
- pop_summary()
- log_br()
- }
-
- if (game.return !== game.active) {
- next_player()
- }
- log_h2('Raise the Stakes')
- game.state = 'raise_stakes_1'
- }
-}
-
-states.raise_stakes_1 = {
- inactive: 'raise the stakes',
-
- prompt () {
- console.log('raise the stakes: game.played_power_card', game.played_power_card, 'game.active', game.active, 'game.view_opp_hand', game.view_opp_hand)
- if (game.raised_stakes_discard === 3) {
- view.prompt = 'Raise the stakes: done.'
- gen_action('done')
- } else {
- view.prompt = `Discard ${3-game.raised_stakes_discard} cards to raise the stakes.`
- if (game.raised_stakes_discard === 0) {
- gen_action('pass')
- }
- for (let card of game.valid_cards) {
- gen_action_card(card)
- }
- }
- },
- card(card) {
- push_undo()
- if (numberless_cards.includes(card)) {
- log(`Discarded: P${card}`)
- } else {
- log(`Discarded: P${card} V${power_cards[card].value}`)
- }
- discard(card)
-
- game.raised_stakes_discard ++
- if (game.raised_stakes_discard === 3) {
- game.raised_stakes++
- }
-
-
- },
- pass(){
- log('Did not raise the stakes')
- game.raised_stakes_discard = 0
- next_player()
- game.state = 'raise_stakes_2'
- },
- done () {
- log_gap('Raised the stakes')
- game.raised_stakes_discard = 0
- next_player()
- game.state = 'raise_stakes_2'
- }
-}
-
-states.raise_stakes_2 = {
- inactive: 'raise the stakes',
-
- prompt () {
-
- if (game.raised_stakes_discard === 3) {
- view.prompt = 'Raise the stakes: done.'
- gen_action('done')
- } else {
- view.prompt = `Discard ${3-game.raised_stakes_discard} cards to raise the stakes.`
- if (game.raised_stakes_discard === 0) {
- gen_action('pass')
- }
- for (let card of game.valid_cards) {
- gen_action_card(card)
- }
- }
- },
- card(card) {
- push_undo()
- if (numberless_cards.includes(card)) {
- log(`Discarded: P${card}`)
- } else {
- log(`Discarded: P${card} V${power_cards[card].value}`)
- }
- discard(card)
-
- game.raised_stakes_discard ++
- if (game.raised_stakes_discard === 3) {
- game.raised_stakes++
- }
-
- },
- pass() {
- log('Did not raise the stakes')
- game.raised_stakes_discard = 0
- game.valid_cards = []
- log_h2('Play Cards')
- next_player()
- game.state = 'begin_power_struggle'
- },
- done () {
- log_gap('Raised the stakes')
- game.raised_stakes_discard = 0
- game.valid_cards = []
- log_h2('Play Cards')
- next_player()
- game.state = 'begin_power_struggle'
- },
-}
-
-states.begin_power_struggle = {
- inactive: 'begin power struggle.',
- prompt() {
- view.prompt = 'Begin power struggle.'
- gen_action('struggle')
- },
- struggle () {
- do_valid_cards()
- game.state = 'power_struggle'
- }
-}
-
-states.power_struggle = {
- inactive: 'play a card.',
- prompt () {
- console.log('game.tactics_fails', game.tactics_fails)
- if (game.phase === 0) {
- if (game.valid_cards.length > 0) {
- view.prompt = "Play a card."
- for (let card of game.valid_cards) {
- gen_action_card(card)
- }
- } else if ( game.valid_cards.length === 0) {
- view.prompt = 'No valid cards. You must concede.'
- gen_action('concede')
- }
- }
- if (game.phase === 1) {
- if (game.valid_cards.length > 0) {
- view.prompt = `${power_cards[game.played_power_card].name} played. You must match or concede.`
- gen_action('concede')
- for (let card of game.valid_cards) {
- gen_action_card(card)
- }
- } else if (game.valid_cards.length === 0) {
- view.prompt = `${power_cards[game.played_power_card].name} played. You must concede.`
- gen_action('concede')
- }
- }
- else if (game.phase === 2) {
- view.prompt = 'You matched. Roll a die.'
- gen_action('roll')
- }
- else if (game.phase === 3) {
- view.prompt = 'Play leader as:'
- if (game.tactics_fails !== "Strike") {gen_action('strike')}
- if (game.tactics_fails !== "March") {gen_action('march')}
- if (game.tactics_fails !== "Rally in the Square") {gen_action('rally')}
- if (game.tactics_fails !== "Petition") {gen_action('petition')}
- }
- },
- card(card) {
- push_undo()
- discard(card)
- game.valid_cards=[]
- game.return_state = 'power_struggle'
- if (card === 52) {
- log_gap(`Played P52: P${power_cards[game.played_power_card].number} no longer playable`)
-
- } else {
- if (game.phase === 0 && leader_cards.includes(card)) {} /* Log nothing. Probably a better way to do this */
- else if (numberless_cards.includes(card)) {
- log_gap(`Played: P${card}`)
- } else {
- log_gap(`Played: P${card} V${power_cards[card].value}`)
- }
- }
- if (game.phase === 0) {
- if (card >= 37 && card <= 48) { /*When a leader is played */
- game.played_power_card = card
- game.phase = 3
- } else if (card === 49){ /*Scare Tactics */
- game.return = ''
- goto_vm(349) /*Can I combine these 3 into a single stage where you goto_vm(300 + card) ? */
- } else if (card === 50) { /*Support Surges */
- if (game.active === DEM) {
- game.return = COM
- } else {
- game.return = DEM
- }
- goto_vm(350)
- } else if (game.phase === 0 && card === 51) { /*Support Falters */
- next_player()
- goto_vm(351)
- } else {
- game.played_power_card = card
- game.phase = 1
- next_player()
- do_valid_cards()
- }
- } else if (game.phase === 1) {
- if (card === 52) {
- game.tactics_fails = power_cards[game.played_power_card].name
- game.phase = 0
- next_player()
- do_valid_cards()
- } else if (power_cards[game.played_power_card].value === 1) {
- log('Takes initiative')
- game.phase = 0
- do_valid_cards()
- } else {
- game.phase = 2
- }
- }
- },
- roll () {
- let roll = Math.floor(Math.random() * 6) + 1
- log(`Rolled a ${roll}`)
- if (roll >= power_cards[game.played_power_card].value) {
- log('Initiative roll successful')
- game.phase = 0
- do_valid_cards()
- } else {
- log(`Initiative roll failed. Required ${power_cards[game.played_power_card].value} or more`)
- game.phase = 0
- next_player()
- do_valid_cards()
- }
- },
- concede () {
- push_undo()
- log('Conceded')
- log_h2('Aftermath')
- log_h3('Support Loss')
- //if ((game.played_power_card >= 25 && game.played_power_card <= 30) || game.played_power_card === 53) {game.rally_win = 2}
- //if ((game.played_power_card >= 31 && game.played_power_card <= 36) || game.played_power_card === 54) {game.petition_win = 2}
- if (game.phase === 0) {
- game.played_power_card = 0 /*If conceded when held the initiative but had no playable cards, ignore the last played card */
- }
- game.phase = 0
- game.state = 'support_loss'
- },
- strike () {
- log(`Played: P${power_cards[game.played_power_card].number} as a Strike`)
- game.played_power_card = 9
- game.phase = 1
- next_player()
- do_valid_cards()
- },
- march () {
- log(`Played: P${power_cards[game.played_power_card].number} as a March`)
- game.played_power_card = 21
- game.phase = 1
- next_player()
- do_valid_cards()
- },
- rally () {
- log(`Played: P${power_cards[game.played_power_card].number} as a Rally in the Square`)
- game.played_power_card = 53
- game.phase = 1
- next_player()
- do_valid_cards()
- },
- petition () {
- log(`Played: P${power_cards[game.played_power_card].number} as a Petition`)
- game.played_power_card = 54
- game.phase = 1
- next_player()
- do_valid_cards()
- },
- /*draw () {
- if (game.active === DEM) {
- draw_cards(game.power_struggle_deck, game.dem_pwr_hand, game.com_pwr_hand, game.dem_pwr_hand.length+2, game.com_pwr_hand.length)
- } else {draw_cards(game.power_struggle_deck, game.dem_pwr_hand, game.com_pwr_hand, game.dem_pwr_hand.length, game.com_pwr_hand.length+2)}
- game.phase = 0
- next_player()
- do_valid_cards()
- },*/
- /*infl(space) {
- game.remove_opponent_infl = true
- remove_infl(space)
- game.phase = 6
- },
- discard () { /*Is this still needed?
- if (game.active === DEM) {discard_card(game.dem_pwr_hand)}
- else {discard_card(game.com_pwr_hand)}
- game.available_ops --
- }, */
- done () {
- if (game.phase === 7) { /*Is this ever called anymore? */
- game.phase = 0
- log_msg_gap('Takes initiative')
- do_valid_cards()
- } else {
- game.phase = 0
- next_player()
- do_valid_cards()
- }
- }
-}
-
-states.support_loss ={
- inactive: 'do Support Loss.',
- prompt () {
- console.log('game.played_power_card', game.played_power_card)
- if (game.phase === 0) {
- view.prompt = 'You lost the Power Struggle. Roll a die for Support Loss.'
- gen_action('roll')
- } else if (game.phase === 1 && game.available_ops > 0 && game.valid_spaces.length > 0) {
- view.prompt = `Support Loss: remove ${pluralize(game.available_ops,'SP')}.`
-
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique)
- }
- } else if (game.phase === 1 && game.available_ops === 0 ) {
- view.prompt = 'Support Loss: finished.'
- gen_action('done')
- } else if (game.phase === 1 && game.valid_spaces.length === 0) {
- view.prompt = 'Support Loss: no remaining SPs to remove.'
- gen_action('done')
- }
- },
- roll () {
- clear_undo()
- let roll = Math.floor(Math.random() * 6) + 1
- let rally_win = 0
- let petition_win = 0
- log(`Rolled a ${roll}`)
- if ((game.played_power_card >= 25 && game.played_power_card <= 30) || game.played_power_card === 53) { rally_win = 2}
- if ((game.played_power_card >= 31 && game.played_power_card <= 36) || game.played_power_card === 54) { petition_win = 2}
- let modified_roll = roll + game.raised_stakes + rally_win - petition_win
-
- // Roll modifiers
- if (game.active === COM && game.persistent_events.includes(62)) {
- log('+1 from C62')
- modified_roll ++
- }
-
- if (modified_roll < 0) {modified_roll = 0}
- else if (modified_roll > 7) {modified_roll = 7}
-
-
- if (game.raised_stakes !== 0) {
- log(`+${game.raised_stakes} from Raising the Stakes`)
- }
- if (rally_win !== 0) {
- log('+2 from winning on a P25')
- }
- if (petition_win !== 0) {
- log('-2 from winning on a P31')
- }
- if (modified_roll !== roll) {
- log(`Modified roll: ${modified_roll}`)
- }
- game.available_ops = support_loss_roll[modified_roll]
- if (game.available_ops === 0) {
- log('Does not remove SPs')
- }
- game.phase++
- valid_spaces_support_loss()
- },
- infl (space) {
- game.remove_opponent_infl = false /* Don't know why this is needed... */
- remove_infl(space)
- if (game.available_ops === 0 ) {
- game.valid_spaces = []
- }
- },
- done () {
- if (game.summary.length > 0) {
- pop_summary()
- log_br()
- }
- next_player()
- log_h3('Victory Point')
- game.phase = 0
- game.state = 'vp_roll'
- }
-}
-
-states.vp_roll = {
- inactive: 'do VP Roll',
- prompt () {
- if (game.phase === 0) {
- view.prompt = 'Roll a die for Victory.'
- gen_action('roll')
- } else if (game.phase === 1) {
- view.prompt = 'Take power.'
- gen_action('take')
- } else if (game.phase === 2) {
- view.prompt = 'Proceed to scoring.'
- gen_action('scoring')
- }
- },
- roll () {
- let roll = Math.floor(Math.random() * 6) + 1
- log(`Rolled a ${roll}`)
- let rally_win = 0
- let petition_win = 0
- if ((game.played_power_card >= 25 && game.played_power_card <= 30) || game.played_power_card === 53) {rally_win = 2}
- if ((game.played_power_card >= 31 && game.played_power_card <= 36) || game.played_power_card === 54) {petition_win = 2}
- let modified_roll = roll + game.raised_stakes + rally_win - petition_win
- if (game.active === DEM && game.persistent_events.includes(62)) {
- log('+1 from C62')
- modified_roll ++
- }
- if (modified_roll < 0) {modified_roll = 0}
- else if (modified_roll > 7) {modified_roll = 7}
-
- if (game.raised_stakes !== 0) {
- log(`+${game.raised_stakes} from Raising the Stakes`)
- }
- if (rally_win !== 0) {
- log('+2 from winning on a P25')
- }
- if (petition_win !== 0) {
- log('-2 from winning on a P31')
- }
- if (modified_roll !== roll) {
- log(`Modified roll: ${modified_roll}`)
- }
- let vp_change = vp_roll[modified_roll]
- if (game.active === DEM) {
- log(`+${vp_change} VP`)
- } else {
- log(`-${vp_change} VP`)
- }
- if (roll >= 4)
- console.log('VP before', game.vp)
- if (game.active === DEM) {game.vp += vp_change}
- else {game.vp -= vp_change}
- console.log('VP after', game.vp)
- if (game.active === DEM && modified_roll >= 4) {
- game.phase = 1
- } else {
- game.phase = 0
- if (game.active === DEM) {next_player()}
- game.state = 'choose_power'
- }
- },
- take () {
- push_undo()
- //Find name of scoring card
- let scoring_card = scoring_cards[countries.indexOf(game.pwr_struggle_in)]
- permanently_remove(scoring_card)
- take_power(game.pwr_struggle_in)
- game.phase = 2
- },
- scoring () {
- push_undo()
- log_h2('Scoring')
- score_country(game.pwr_struggle_in)
- game.state = 'finish_scoring'
- },
-}
-
-states.choose_power = {
- inactive: 'choose whether to remain in power.',
- prompt () {
- if (game.phase === 0) {
- view.prompt = 'Choose whether to remain in power.'
- gen_action('retain')
- gen_action('surrender')
- } else if (game.phase === 1) {
- view.prompt = 'Proceed to scoring.'
- gen_action('scoring')
- }
- },
- retain() {
- push_undo()
- retain_power(game.pwr_struggle_in)
- game.phase = 1
- },
- surrender () {
- push_undo()
- take_power(game.pwr_struggle_in)
- permanently_remove(game.played_card)
- game.phase = 1
- },
- scoring () {
- push_undo()
- score_country(game.pwr_struggle_in)
-
- //Check if The Tyrant is Gone occurs
- if (game.table_cards.includes(97) && game.pwr_struggle_in === 'Romania' && game.persistent_events.includes(54)) {
- game.return_state = 'finish_scoring'
- game.state = 'the_tyrant_is_gone'
- } else {
- game.state = 'finish_scoring'
- }
- }
-}
-/*
-states.score_country = {
- inactive: `score country`,
- prompt () {
- view.prompt = 'Scoring: done.'
- gen_action('done')
- },
- done () {
- reset_power()
- /*if (game.return !== game.active) {
- next_player()}
- game.state = 'finish_scoring'
- }
-}
-*/
-
-states.the_tyrant_is_gone ={
- inactive: 'resolve The Tyrant is Gone.',
- prompt() {
- view.prompt = 'Play The Tyrant is Gone for the event.'
- gen_action('event')
- },
- event() {
- if (game.active !== DEM) {
- next_player()
- }
- log_h3(`C97`)
- game.vm_event = 97
- goto_vm(game.vm_event)
- }
-}
-
-states.finish_scoring ={
- inactive: 'finish scoring.',
- prompt() {
- view.prompt = 'End power struggle.'
- gen_action('done')
- } ,
- done() {
- console.log('game.return_state', game.return_state)
- log('Power Struggle resolved') /*At this point log card dicarded or permanently removed? */
- if (game.persistent_events.includes(111)) {
- game.state = 'new_years_eve_party'
- return
- }
- if (check_vp()) {
- return
- }
- reset_power()
- end_round()
- }
-}
-
-// ======================================= END TURN STATES ==========================================
-
-states.end_turn_4_5_4 = {
- inactive: 'verify held cards.',
- prompt() {
- view.prompt = 'End Turn: verify held cards.'
- gen_action('check')
- },
- check() {
- log_h2('Verify held cards')
- const dem_has_scoring_card = game.democrat_hand.some(card => scoring_cards.includes(card))
- const com_has_scoring_card = game.communist_hand.some(card => scoring_cards.includes(card))
- if (!dem_has_scoring_card && !com_has_scoring_card) {
- log('No held scoring cards')
- }
-
- if (dem_has_scoring_card && com_has_scoring_card) {
- log('Both players have held scoring cards')
- game.state = 'game_end_tie'
- }
- else if (dem_has_scoring_card) {
- log('Democrat player has a held scoring card')
- goto_game_over(COM, `${COM} won by held scoring card!`)
- }
- else if (com_has_scoring_card) {
- log('Communist player has a held scoring card')
- goto_game_over(DEM, `${DEM} won by held scoring card!`)
- }
- else if (game.persistent_events.includes(104)) {
- log_h1(`New Year's Eve Party`)
- //Check if the Communist receives VP from The Tyrant is Gone
- if (game.persistent_events.includes(97)) {
- game.vp -= 2
- log(`Communist receives 2 VP from C97`)
- }
- game.persistent_events.push(111)
- game.state = 'new_years_eve_party'
- }
- else if(game.turn === 10) {
- clear_undo()
- log_h2('Final Scoring')
-
- //Check if the Communist receives VP from The Tyrant is Gone
- if (game.persistent_events.includes(97)) {
- game.vp -= 2
- log(`Communist receives 2 VP from C97`)
- }
- game.state = 'final_scoring_held'
-
- } else {
- game.return_state = ''
- new_turn()
- }
- }
-}
-
-states.final_scoring_held = {
- inactive: 'resolve final scoring.',
- prompt() {
- view.prompt = 'Final Scoring: Communist scores VP bonus for the number of countries they retain power.'
- gen_action('bonus')
- },
- bonus() {
- console.log('game.revolutions: ', game.revolutions)
- const held_countries = game.revolutions.filter(value => value === false).length
- let vp_gain = 4*held_countries
- log(`Communist holds ${held_countries} countries: -${vp_gain} VP`)
- game.vp -= 4*held_countries
- game.temp = {'East_Germany': false, 'Poland': false, 'Czechoslovakia': false, 'Hungary': false, 'Romania': false, 'Bulgaria': false}
- game.state = 'final_scoring'
- }
-}
-
-states.final_scoring = {
- inactive: 'score countries.',
- prompt() {
- if (game.temp['East_Germany'] && game.temp['Poland'] && game.temp['Czechoslovakia'] && game.temp['Hungary'] && game.temp['Romania'] && game.temp['Bulgaria']) {
- view.prompt = 'Country scoring: done.'
- gen_action('done')
- } else {
- view.prompt = 'Choose a country to score'
- if (!game.temp['East_Germany']) {gen_action('east_germany')}
- if (!game.temp['Poland']) {gen_action('poland')}
- if (!game.temp['Czechoslovakia']) {gen_action('czechoslovakia')}
- if (!game.temp['Hungary']) {gen_action('hungary')}
- if (!game.temp['Romania']) {gen_action('romania')}
- if (!game.temp['Bulgaria']) {gen_action('bulgaria')}
- }
- },
- east_germany() {
- score_country('East_Germany')
- game.temp['East_Germany'] = true
- },
- poland() {
- score_country('Poland')
- game.temp['Poland'] = true
- },
- czechoslovakia() {
- score_country('Czechoslovakia')
- game.temp['Czechoslovakia'] = true
- },
- hungary() {
- score_country('Hungary')
- game.temp['Hungary'] = true
- },
- romania() {
- score_country('Romania')
- game.temp['Romania'] = true
- },
- bulgaria() {
- score_country('Bulgaria')
- game.temp['Bulgaria'] = true
- },
- done() {
- delete game.temp
- if (game.vp > 0) {
- goto_game_over(DEM, `${DEM} wins on Victory Point Track!`)
- } else if (game.vp < 0) {
- goto_game_over(COM, `${COM} wins on Victory Point Track!`)
- } else if (game.vp === 0) {
- goto_game_over('', `The game is tied!`) /*Not sure what to pass for result */
- }
- }
-}
-
-states.game_over = {
- get inactive() {
- return game.victory
- },
- prompt() {
- view.prompt = game.victory
- },
-}
-
-// ========================== EVENT SPECIFIC STATES =================================
-
-states.general_strike = {
- inactive: 'discard a card.',
- prompt() {
- if (game.played_card === 0 ) {
- view.prompt = 'General Strike: you must discard a card or play a Scoring Card.'
- available_cards = game.communist_hand
- for (let card of available_cards) {
- gen_action_card(card)
- }
- } else if (game.phase >= 1) {
- view.prompt = 'General Strike: done.'
- gen_action('done')
- } else if (game.played_card > 0 ) {
- view.prompt = 'Roll a die.'
- gen_action('roll')
- }
- },
- card (card) {
- push_undo()
- game.played_card = card
- let find_card
- find_card = game.communist_hand.indexOf(card)
- game.communist_hand.splice(find_card, 1)
- game.available_ops = get_card_ops(card)
- if (scoring_cards.includes(card)) {
- game.vm_event = card
- log(`Played C${card} for the event`)
- game.return_state = 'general_strike'
- goto_vm(game.vm_event)
- } else {
- log(`Discarded C${cards[card].number}`)
- }
- },
- roll() {
- clear_undo()
- let roll = Math.floor(Math.random() * 6) + 1
- log(`Rolled a ${roll}`)
-
- log(`+${game.available_ops} from card ops`)
-
- let total = roll + game.available_ops
- log(`Modified total: ${total}`)
-
- if (total > 5) {
- log('The strike is over.')
- permanently_remove(5)
- game.persistent_events = game.persistent_events.filter(n => n !== 5)
- } else {
- log('The strike continues. Required 6 or more')
- }
- game.phase = 1
- },
- done () {
- end_round()
- }
-}
-
-states.honecker ={
- inactive: 'resolve Honecker.',
- prompt() {
- view.prompt = 'Honecker: you may take an extra action round.'
- gen_action('extra')
- gen_action('pass')
- },
- extra() {
- push_undo()
- game.round++
- game.round_player = COM
- game.persistent_events = game.persistent_events.filter(n => n !== 15)
- game.state = 'choose_card'
- },
- pass() {
- log('C15: passed')
- game.persistent_events = game.persistent_events.filter(n => n !== 15)
- end_round()
- }
-}
-
-states.new_years_eve_party = {
- get inactive() {
- return `resolve ${clean_name(cards[104].name)}.`
- },
- prompt() {
- if (!game.is_pwr_struggle) {
- view.prompt = `New Year's Eve Party: you may choose a country to have a final power struggle.`
- if (!game.revolutions[0]) {gen_action('poland')}
- if (!game.revolutions[1]) {gen_action('hungary')}
- if (!game.revolutions[2]) {gen_action('east_germany')}
- if (!game.revolutions[3]) {gen_action('bulgaria')}
- if (!game.revolutions[4]) {gen_action('czechoslovakia')}
- if (!game.revolutions[5]) {gen_action('romania')}
- gen_action('pass')
- } else {
- view.prompt = `New Year's Eve Party: done.`
- gen_action('end')
- }
- },
- east_germany() {
- push_undo()
- log('Chose to score East Germany')
- game.vm_event = 42
- goto_vm(42)
- },
- poland() {
- push_undo()
- log('Chose to score Poland')
- game.vm_event = 22
- goto_vm(22)
- },
- czechoslovakia() {
- push_undo()
- log('Chose to score Czechoslovakia')
- game.vm_event = 55
- goto_vm(55)
- },
- hungary() {
- push_undo()
- log('Chose to score Hungary')
- game.vm_event = 23
- goto_vm(23)
- },
- romania() {
- push_undo()
- log('Chose to score Romania')
- game.vm_event = 95
- goto_vm(95)
- },
- bulgaria () {
- push_undo()
- log('Chose to score Bulgaria')
- game.vm_event = 43
- goto_vm(43)
- },
- pass() {
- push_undo()
- log('No final power struggle')
- if (game.vp > 0) {
- goto_game_over(DEM, `C104: ${DEM} wins on Victory Point Track!`)
- } else if (game.vp < 0) {
- goto_game_over(COM, `C104: ${COM} wins on Victory Point Track!`)
- } else if (game.vp === 0) {
- goto_game_over('', `C104: The game is tied!`) /*Not sure what to pass for result */
- }
- },
- end() {
- if (game.vp > 0) {
- goto_game_over(DEM, `C104: ${DEM} wins on Victory Point Track!`)
- } else if (game.vp < 0) {
- goto_game_over(COM, `C104: ${COM} wins on Victory Point Track!`)
- } else if (game.vp === 0) {
- goto_game_over('', `C104: The game is tied!`) /*Not sure what to pass for result */
- }
- }
-}
-
-states.stasi_end_round = {
- inactive: 'choose next card due to Stasi.',
- prompt() {
- console.log('game.stasi_card', game.stasi_card)
- if (!game.stasi_card || game.stasi_card === 0 ) {
- let available_cards = game.democrat_hand
- if (available_cards.length === 0) {
- view.prompt = 'Stasi: no cards remaining.'
- gen_action('pass')
- return
- }
- view.prompt = 'Stasi: you must select your next card to play.'
-
- for (let card of available_cards) {
- gen_action_card(card)
- }
- } else {
- view.prompt = 'Stasi. Choose card: done.'
- gen_action('done')
- }
- },
- card(card) {
- push_undo()
- log_gap(`Stasi: selected C${cards[card].number}`)
- game.stasi_card = card
- },
- pass() {
- log('Stasi: Democrat has no remaining cards')
- game.stasi_card = 0
- end_stasi_choose_card()
- },
- done() {
- push_undo()
- if (game.stasi_card === 21) {
- game.state = 'stasi_confirm'
- } else {
- end_stasi_choose_card()
- }
- }
-}
-
-states.stasi_confirm = {
- inactive: 'choose next card due to Stasi.',
- prompt() {
- if (game.stasi_card === 21 ) {
- view.prompt = `If Common European Home selected, it must be played for Operations. Otherwise select the opponent's card instead.`
- gen_action('done')
- }
- },
- done() {
- game.playable_cards = game.playable_cards.filter( n => n !== 21)
- end_stasi_choose_card()
- }
-}
-
-states.stasi_play_card = {
- inactive: 'play a card.',
- prompt () { /*Should get rid of the play card 'done' prompt for consistency with general play */
- /*if (game.played_card > 0) {
- game.state = 'play_card'
- view.prompt = 'Play card: done.'
- gen_action("done");
- return;*/
- //} else
- if (game.stasi_card === 0) {
- view.prompt = 'Stasi: you must pass.'
- gen_action('pass')
- } else {
- view.prompt = `Stasi: you must play ${clean_name(cards[game.stasi_card].name)}.`
- /*let available_cards = [game.stasi_card]
- for (let card of available_cards) {
- gen_action_card(card)
- }*/
- let available_cards = [game.stasi_card]
-
- for (let card of available_cards) {
-
- if (scoring_cards.includes(card)) {
- /*view.prompt = 'Play for:'*/
- gen_action('card_event', card)
- return
- }
-
- //Check if Player has Common European Home in hand
- if (game.active === DEM) {
- if (game.democrat_hand.includes(21) && cards[card].side === "C" && card !== 21) {
- gen_action('card_ceh', card)
- }
- } else {
- if (game.communist_hand.includes(21) && cards[card].side === "D" && card !== 21) {
- gen_action('card_ceh', card)
- }
- }
-
- //Check for Tiananmen Square Track awards special abilities
- if ((game.active === DEM && cards[card].side !== 'C' && game.dem_tst_position >= 8 && game.com_tst_position < 8 && !game.tst_8) || (game.active === COM && cards[card].side !== 'D' && game.com_tst_position >= 8 && game.dem_tst_position < 8 && !game.tst_8)){
- gen_action('card_tst_8', card)
- }
-
- // Check for Reformer Rehabilitated
-
- //console.log('game.active', game.active, 'game.playable_cards[67].playable', game.playable_cards[67].playable)
-
-
- if (card === 67 && game.playable_cards.includes(67)){
- if (game.active === DEM && (game.dem_tst_position > game.com_tst_position)) {
- gen_action('card_event', card)
- }
- if (game.active === COM && (game.dem_tst_position < game.com_tst_position)) {
- gen_action('card_event', card)
- }
- }
-
- //Continue with normal logic
-
- //Check if it is a card with an event which is always playable. May not play Common European Home for event in Stasi
-
- if (cards[card].playable && card !== 21) {
- console.log('get events called normally for card', card)
- get_events(card)
- }
-
- // Resolve cards with variable events (not Reformer, not Common European Home in Stasi)
-
- if (card !== 67 && card !== 21 && game.playable_cards.includes(card)) {
- console.log('get events called variable for card', card)
- get_events(card)
- } /*
- if ((game.active === DEM && cards[game.played_card].side === 'D' && game.playable_cards[game.played_card].playable === 1) || (game.active === COM && cards[game.played_card].side === 'C' && game.playable_cards[game.played_card].playable ===1) || (cards[game.played_card].side === 'N'&& game.playable_cards[game.played_card].playable ===1)) {
- gen_action('event')
- } else if ((game.active === DEM && (cards[game.played_card].side === 'C' && game.playable_cards[game.played_card].playable ===1)) || game.active === COM && (cards[game.played_card].side === 'D' && game.playable_cards[game.played_card].playable ===1)) {
- gen_action('opp_event')
- } */
-
- gen_action('card_influence', card)
- if (game.active === DEM && game.dem_tst_attempted_this_turn === 0 && game.dem_tst_position <=8 || game.active === COM && game.com_tst_attempted_this_turn === 0 && game.com_tst_position <= 8) {
- gen_action('card_tst', card)
- }
- gen_action('card_support_check', card)
- }
- }
- },
- card(card) {
- push_undo()
- log_msg_gap(`Stasi: played C${card}`)
- game.played_card = card
- let find_card
- find_card = game.democrat_hand.indexOf(card);
- game.democrat_hand.splice(find_card, 1);
- game.available_ops = get_card_ops(card)
-
- game.stasi_card = 0
- if (game.democrat_hand.includes(21)) {
- game.state = 'stasi_resolve_common_european_home'
- } else {
- game.state = 'play_card'
- }
-
- },
- pass () {
- log('No cards remaining. Passed')
- end_round()
- },
- card_ceh(card) {
- push_undo()
- select_card(card)
- game.stasi_card = 0
- log(`${clean_name(cards[game.played_card].name)} played with Common European Home`)
- //silent_discard(21)
- game.vm_infl_to_do = true
- game.vm_event_to_do = false
- game.state = 'resolve_opponent_event'
- },
-
- card_event(card) {
- push_undo()
- select_card(card)
- game.stasi_card = 0
- console.log('played event, game.active', game.active, 'game.view_opp_hand', game.view_opp_hand)
- log_gap(`Played C${cards[game.played_card].number} for the event`)
- if (scoring_cards.includes(game.played_card)) {game.phase = 0}
- else {game.phase = 1}
- game.return = game.active
- if (switch_events.includes(game.played_card)) {next_player()}
- game.vm_event = game.played_card
- goto_vm(game.vm_event)
- },
- card_opp_event(card) {
- push_undo()
- select_card(card)
- game.stasi_card = 0
- log_gap(`Played C${cards[game.played_card].number} for the event`)
- game.phase = 1 /*Do I still need this?*/
- game.vm_infl_to_do = true
- game.return = game.active
- game.vm_event = game.played_card
- if (auto_resolve_events.includes(game.played_card) || switch_events.includes(game.played_card)) {
- goto_vm(game.vm_event)}
- else {
- next_player()
- log(`C${game.vm_event}`)
- goto_vm(game.vm_event)
- }
- },
- card_influence(card) {
- push_undo()
- select_card(card)
- game.stasi_card = 0
- log_gap(`Played C${cards[game.played_card].number} to place SPs`)
-
-
- // Check if Common European Home played for influence
- if (game.played_card === 21) {
- if (game.active === DEM) {
- game.vp --
- log('-1 VP')
- if (check_vp()) {
- return
- }
- } else {
- game.vp ++
- log('+1 VP')
- if (check_vp()) {
- return
- }
- }
- }
- // Check if card is opponent card with event that needs to be resolved
-
- if (cards[game.played_card].playable || game.playable_cards.includes(game.played_card)) {
- if ((game.active === DEM && cards[game.played_card].side === "C" ) || (game.active === COM && cards[game.played_card].side === "D")) {
- //game.phase = 1 /*Do I need this? */
- game.vm_event_to_do = true
- }
- }
-
- // If ABHR - Set AHBR tracker to true
- if (game.persistent_events.includes(58)) {
- game.austria_hungary_border_reopened_tracker = true
- }
- game.state='add_influence'
- valid_spaces_infl()
- },
- card_tst(card) {
- push_undo()
- select_card(card)
- game.stasi_card = 0
- log_gap(`Played C${cards[game.played_card].number} to the Tiananmen Square Track`)
- game.state='tiananmen_square_attempt'
- },
- card_support_check(card) {
- push_undo()
- select_card(card)
- log_gap(`Played C${cards[game.played_card].number} for support checks`)
-
- // Check if card is opponent card with event that needs to be resolved
- /*if (game.phase === 0 && game.active === DEM && cards[game.played_card].side === "C" && game.playable_cards[game.played_card].playable === 1 || game.phase === 0 && game.active === COM && cards[game.played_card].side === "D" && game.playable_cards[game.played_card].playable === 1 ) {
- game.vm_event_to_do = true
- }*/
-
- if (cards[game.played_card].playable || game.playable_cards.includes(game.played_card)) {
- if ((game.active === DEM && cards[game.played_card].side === "C" ) || (game.active === COM && cards[game.played_card].side === "D")) {
- game.vm_event_to_do = true
- }
- }
-
- game.available_ops = 2
- game.state='support_check_prep'
- valid_spaces_sc()
- },
- card_tst_8(card) { /*Play card for ops and event */
- select_card(card)
- game.vm_event_to_do = true
- game.vm_infl_to_do = true
- game.tst_8 = true
- game.state = 'vm_tst_8'
- },
- done () {
- game.stasi_card = 0
- if (game.democrat_hand.includes(21)) {
- game.state = 'stasi_resolve_common_european_home'
- } else {
- game.state = 'play_card'
- }
- }
-}
-
-states.stasi_resolve_common_european_home = {
- inactive: 'play a card.',
- prompt () {
- view.prompt = `Do you wish to play ${clean_name(cards[game.played_card].name)} with Common European Home?`
- gen_action('yes')
- gen_action('no')
- },
- yes() {
- log(`${clean_name(cards[game.played_card].name)}} played with Common European Home`)
- silent_discard(21)
- game.vm_infl_to_do = true
- game.vm_event_to_do = false
- game.state = 'resolve_opponent_event'
- },
- no() {
- game.state = 'play_card'
- }
-}
-
-
-// ==================== SUPPORTING STATE FUNCTIONS =============================
-
-
-function add_infl(space) {
- push_undo()
- console.log('adding infl to', space)
- const clicked_space = find_space_index(space)
- console.log('clicked_space', clicked_space)
- //console.log('at start, event', game.persistent_events['austria_hungary_border_reopened'], 'ahbr', game.austria_hungary_border_reopened, 'tracker', game.austria_hungary_border_reopened_tracker)
- //log(`Added 1 influence in %${clicked_space}`)
- log_summary(`Added £ SP in %${clicked_space}`)
-
- //If AHBR - check AHBR conditions
- if (game.persistent_events.includes(58)) {
- if (spaces[clicked_space].country !== 'East_Germany'){
- game.austria_hungary_border_reopened_tracker = false
- }
- }
-
- // Check Genscher
- if (game.persistent_events.includes(63) && game.active === DEM && spaces[clicked_space].country === 'East_Germany') {
- game.available_ops--
- log_summary(`(-1 op due to C63)`)
- } else if (check_opp_control(clicked_space)) {
- game.available_ops -= 2
- //Check if Austria Hungary Border Reopened was used to place last SP in a controlled space in East Germany. If so, game.available_op will be negative
- if (game.available_ops < 0) {
- log_summary(`(Used +1 op from C58)`)
- }
- } else {
- game.available_ops--
- }
-
- // Update influence values
- if (game.active === COM) {
- game.comInfl[clicked_space]++
- } else {
- game.demInfl[clicked_space]++
- }
-
- // Check whether spaces are controlled
- check_control_change(clicked_space)
-
- // Check Austria Hungary Border Reopened is true and condition has been met
- if (game.available_ops === 0 && game.active === DEM && game.persistent_events.includes(58) && game.austria_hungary_border_reopened_tracker) {
- game.available_ops ++
- log('+1 op from C58')
- game.austria_hungary_border_reopened_tracker = false
- game.valid_spaces = game.valid_spaces.filter(n => spaces[n].country === 'East_Germany')
- }
-
- // If only 1 IP remaining, may not place in opponent controlled spaces
-
- // Check for Genscher & Austria Hungary Border Reopened
-
- if (game.available_ops === 1) {
- //console.log(`in Genscher / AHBR check, game.persistent_events['genscher']`, game.persistent_events['genscher'])
- if (game.active === DEM) {
- if (game.persistent_events.includes(63) || (game.persistent_events.includes(58) && game.austria_hungary_border_reopened_tracker)) {
- console.log('in gensher subcheck - remove non-East German controlled ')
- game.valid_spaces = game.valid_spaces.filter(n => !(check_opp_control(n) && spaces[n].country !== 'East_Germany'))
- } else {
- console.log('remove all controlled spaces')
- game.valid_spaces = game.valid_spaces.filter(n => !check_opp_control(n))
- }
- } else {
- console.log('remove all dem controlled spaces')
- game.valid_spaces = game.valid_spaces.filter(n => !check_opp_control(n))
- }
- }
-
- //Clear valid spaces if no IP remaining.
- if (game.available_ops <= 0 ) {
- game.valid_spaces = []
- }
-}
-
-function remove_infl(space) {
- push_undo()
- const clicked_space = find_space_index(space)
- //log(`Removed 1 influence from %${clicked_space}.`)
- log_summary(`Removed £ SP from %${clicked_space}.`)
-
- if (game.remove_opponent_infl === true) {
- if (game.active === COM) {
- game.demInfl[clicked_space]--
- if (game.demInfl[clicked_space] === 0) {
- game.valid_spaces = game.valid_spaces.filter(id => id !== clicked_space);
- }
- } else {
- game.comInfl[clicked_space]--
- if (game.comInfl[clicked_space] === 0) {
- game.valid_spaces = game.valid_spaces.filter(id => id !== clicked_space);
- }
- }
- check_control_change(clicked_space)
-
- } else {
- if (game.active === COM) {
- game.comInfl[clicked_space]--
- if (game.comInfl[clicked_space] === 0) {
- game.valid_spaces = game.valid_spaces.filter(id => id !== clicked_space);
- }
- } else {
- game.demInfl[clicked_space]--
- if (game.demInfl[clicked_space] === 0) {
- game.valid_spaces = game.valid_spaces.filter(id => id !== clicked_space);
- }
- }
- check_control_change(clicked_space)
- }
- game.available_ops--
-}
-
-function do_sc(space) {
- clear_undo()
- let clicked_space = find_space_index(space)
- log_gap(`Support check: %${clicked_space}`)
-
- //Check Helsinki Final Act
-
- if (game.active === COM && game.persistent_events.includes(26) && (spaces[clicked_space].socio === 5 || spaces[clicked_space].socio === 6) ) {
- log('+1 VP from C26')
- game.vp ++
- if (check_vp()) {
- game.state = 'game.over'
- console.log('after check_vp, game.state', game.state)
- return
- }
- }
- console.log('continue support check, game.state', game.state)
- // Continue with Support Check Logic
-
- let roll = Math.floor(Math.random() * 6) + 1
- log(`Rolled a ${roll}`)
- console.log('game.vm_event', game.vm_event)
- console.log('game.is_pwr_struggle', game.is_pwr_struggle)
- /*
- //Check if support check is being done with game.played_card or a subsequent card (e.g. Common European Home, Dash for the West, etc)
- if (game.vm_event > 0) {
- roll+= cards[game.vm_event].ops
- log(`+${cards[game.vm_event].ops} from card ops`)
- }
- */
- // Check for the Crowd Turns Against Ceausescu
-
- //else
- if (game.is_pwr_struggle) {
- roll += game.vm_available_ops
- log(`+${game.vm_available_ops} from Ceausescu`)
- }
-
- // Check if in Tiananmen Square Track Award
-
- else if (game.state === 'vm_tst_6_sc') {
- roll += get_tst_6_ops()
- roll += 2
- log('+2 from Tiananmen Square Track award')
- }
- else {
- //let modifier = 0
- let card_ops = get_card_ops(this_card())
-
- roll += card_ops
- log(`+${card_ops} from card ops`)
- }
-
- if (game.support_check_modifier > 0) {
- roll += game.support_check_modifier
- log(`+${game.support_check_modifier} from event`)
- }
-
- // Events which modify SC rolls
- //Tear Gas
- if (game.active === COM && game.persistent_events.includes(30) && spaces[clicked_space].socio === 6) {
- roll ++
- log('+1 from C30')
- permanently_remove(30)
- game.persistent_events = game.persistent_events.filter(n => n !== 30)
- }
- //FRG Embassies
- if (game.active === DEM && spaces[clicked_space].region === 'Eastern Europe' && game.persistent_events.includes(74)) {
- roll++
- log('+1 from C74')
- }
- //GrenzTruppen
- if (game.active === DEM && spaces[clicked_space].country === 'East_Germany' && game.persistent_events.includes(59)) {
- roll--
- log('-1 from C59')
- }
- //Stand Fast
- if ((game.active === COM && game.stand_fast === DEM && check_dem_control(clicked_space)) || (game.active === DEM && game.stand_fast === COM && check_com_control(clicked_space))){
- roll--
- log('-1 from C100')
- }
- //Elena
- if (game.active === DEM && game.persistent_events.includes(101) && spaces[clicked_space].country === 'Romania') {
- roll--
- log('-1 from C101')
- }
- //Austria Hungary Border Reopened
- if (game.active === DEM && game.persistent_events.includes(58) && game.austria_hungary_border_reopened_tracker) {
- roll++
- log(`+1 from C58`)
- }
-
- // Continue with logic - check for adjacency
-
- // Events which affect adjacency - The Wall
-
- const adj = count_adj(space)
- console.log('adj', adj)
- if (game.active === COM && game.persistent_events.includes(9) && spaces[clicked_space].country === 'East_Germany') {
- log('No adjacency for Democrats due to C9')
- log('C9 no longer in effect')
- roll += adj.com_adj
- if (adj.com_adj > 0) {
- log(`+${adj.com_adj} from adjacent control`)
- }
- game.persistent_events = game.persistent_events.filter(n => n !== 9)
-
- // Standard adjacency
- } else {
- if (adj.dem_adj > 0 || adj.com_adj > 0 ){
- if (game.active === DEM) {
- roll += adj.dem_adj
- roll -= adj.com_adj
- if (adj.dem_adj > 0) {
- log(`+${adj.dem_adj} from adjacent control`)
- }
- if (adj.com_adj > 0) {
- log(`-${adj.com_adj} from adjacent opponent control`)
- }
- } else {
- roll += adj.com_adj
- roll -= adj.dem_adj
- if (adj.com_adj > 0) {
- log(`+${adj.com_adj} from adjacent control`)
- }
- if (adj.dem_adj > 0) {
- log(`-${adj.dem_adj} from adjacent opponent control`)
- }
- }
- }
-
- }
-
- // Support check calcs
- log(`Total support check strength: ${roll}`)
- const stability = spaces[find_space_index(space)].stability
- log(`Stability is ${stability}. Defence is ${stability*2}`)
- const change_infl = Math.max(0, roll - stability*2)
- if (change_infl > 0) {
- log_msg_gap(`${change_infl} point swing`)
- let clicked_space = find_space_index(space)
- if(game.active === DEM) {
- if (change_infl > game.comInfl[clicked_space]) {
- const residual = change_infl - game.comInfl[clicked_space]
- game.comInfl[clicked_space] = 0
- game.demInfl[clicked_space] += residual
- } else {
- game.comInfl[clicked_space] -= change_infl
- }
- if (game.comInfl[clicked_space] === 0) {
- game.valid_spaces = game.valid_spaces.filter(id => id !== clicked_space)
- }
- } else {
- if (change_infl > game.demInfl[clicked_space]) {
- const residual = change_infl - game.demInfl[clicked_space]
- game.demInfl[clicked_space] = 0
- game.comInfl[clicked_space] += residual
- } else {
- game.demInfl[clicked_space] -= change_infl
- }
- if (game.demInfl[clicked_space] === 0) {
- game.valid_spaces = game.valid_spaces.filter(id => id !== clicked_space)
- }
- }
- check_control_change(clicked_space)
-
- } else {
- log_msg_gap('No change in influence')
- }
- if (game.active === COM && game.persistent_events.includes(39) && spaces[clicked_space].space_id === 66) {
- log_msg_gap('+1 VP from C39')
- game.vp++
- if (check_vp()) {
- return
- }
- }
-
- // If Austria-Hungary Border Reopened used, all future support checks must be in East Germany
- if (game.persistent_events.includes(58)){
- if (game.austria_hungary_border_reopened_tracker) {
- game.valid_spaces = game.valid_spaces.filter(n => spaces[n].country === 'East_Germany')
- }
- }
- game.selected_space = 0
-
-}
-
-
-function valid_spaces_setup() {
- game.valid_spaces = []
- let valid_spaces_set = new Set();
- console.log('in vs setup, state', game.state)
- for (let i =1 ; i < 75 ; i++) {
- space = spaces[i]
-
- if (game.state === 'com_init') {
- infl = game.demInfl[i]
-
- if (infl === 0) {
- valid_spaces_set.add(space.space_id);
- }
- } else if (game.state === 'dem_init') {
- infl = game.comInfl[i]
- if (infl === 0) {
- valid_spaces_set.add(space.space_id);
- }
- }
- }
- // Convert the set to an array before returning
- game.valid_spaces = Array.from(valid_spaces_set);
- return game.valid_spaces;
-}
-
-function valid_spaces_sc() {
- let valid_spaces_set = new Set();
- console.log('valid spaces sc, persistent events', game.persistent_events)
-
- for (let i = 1 ; i < 75; i++) {
- space = spaces[i]
-
- if (game.active === DEM) {
- infl = game.comInfl[i]
- if (infl !== 0 ) {
- valid_spaces_set.add(space.space_id);
- }
- } else {
- infl = game.demInfl[i]
- if (infl !== 0 ) {
- // Check Solidarity Legalised
- if (game.persistent_events.includes(2) && space.space_id === 14) {continue}
-
- // Check Civic Forum
- if (game.persistent_events.includes(90) && space.space_id === 30) {continue}
-
- // Check We Are the People
- if (game.persistent_events.includes(48) && space.space_id === 9) {continue}
-
- //Check for Foreign Currency Debt Burden
- if (game.persistent_events.includes(49) && space.country === game.foreign_currency_debt_burden) {continue} {
-
- valid_spaces_set.add(space.space_id);
-
- }
- }
- }
- }
-
-
- // Convert the set to an array before returning
- game.valid_spaces = Array.from(valid_spaces_set);
-
- //Check for the Crown Turns Against Ceausescu
- if (game.is_pwr_struggle && game.pwr_struggle_in === 'Romania' && game.persistent_events.includes(54)) {
- game.valid_spaces = game.valid_spaces.filter(n => spaces[n].country === 'Romania')
- }
- return game.valid_spaces;
-}
-
-function valid_spaces_support_loss() {
- let valid_spaces_set = new Set();
- for (let i = 1; i < game.demInfl.length; i++) {
- //console.log('spaces.length', game.demInfl.length, 'i', i)
- space = spaces[i]
- if (game.active === DEM) {
- infl = game.demInfl[i]
- if (infl > 0 && space.country === game.pwr_struggle_in) {
- valid_spaces_set.add(space.space_id);
- }
- } else {
- infl = game.comInfl[i]
- if (infl > 0 && space.country === game.pwr_struggle_in) {
- valid_spaces_set.add(space.space_id);
- }
- }
- }
-
- // Convert the set to an array before returning
- game.valid_spaces = Array.from(valid_spaces_set);
- return game.valid_spaces;
-}
-/*
-function valid_spaces_support_falters() {
- let valid_spaces_set = new Set();
- if (game.active === DEM) {
- for (let piece of game.pieces) {
- if (!piece) continue
- let space = spaces.find(s => s && s.space_id === piece.space_id);
- if (space && piece.comInfl > 0 && space.country === game.pwr_struggle_in) {
- valid_spaces_set.add(space.space_id);
- }
- }
- } else {
- for (let piece of game.pieces) {
- if (!piece) continue
- let space = spaces.find(s => s && s.space_id === piece.space_id);
- if (space && piece.demInfl > 0 && space.country === game.pwr_struggle_in) {
- valid_spaces_set.add(space.space_id);
- }
- }
- }
- // Convert the set to an array before returning
- game.valid_spaces = Array.from(valid_spaces_set);
- return game.valid_spaces;
-}
- */
-
-function valid_spaces_infl() {
- /*if (game.state.startsWith('vm')) {
- console.log('valid_spaces_infl called from VM')
- } else {
- console.log('valid_spaces_infl called not from VM')
- }*/
- // Check if function is called from the VM or not, take relevant ops variable
- let ops = game.state.startsWith('vm') ? game.vm_available_ops : game.available_ops;
-
- let valid_spaces_set = new Set();
- // Iterate over all spaces to find the ones with the player's influence
- for (let i = 1; i < game.demInfl.length; i++) {
- //piece = game.pieces[i]
- space = spaces[i]
-
- let player_influence = game.active === COM ? game.comInfl[i] : game.demInfl[i];
-
- // If the piece has the player's influence, add it and its adjacent spaces to the set
- if (player_influence > 0) {
- valid_spaces_set.add(space.space_id);
-
- // Check adjacency information
- let adjacent_spaces = get_adjusted_adjacency(space.space_id)
-
- for (let adj_space_id of adjacent_spaces) {
- //console.log('adj_space_id', adj_space_id)
- if (adj_space_id) {
-
- const adj_piece = spaces[adj_space_id];
- //console.log('adjacent piece name', adj_piece.name_unique)
-
- // Check if the adjacent space is controlled by the opponent
- const opponent_control = check_opp_control(adj_piece.space_id)
- //console.log('controlled?', opponent_control)
-
- //Check for Genscher. Can always place in East Germany even with 1 op
- if (game.active === DEM && adj_piece.country === 'East_Germany' && game.persistent_events.includes(63)){
- // console.log('space added with genscher')
- valid_spaces_set.add(adj_piece.space_id)
- }
-
- // Otherwise, only add the adjacent space if the available_ops >= 2 or the space is not controlled by the opponent
- if (ops >= 2 || !opponent_control) {
- valid_spaces_set.add(adj_piece.space_id)
- }
- }
- }
- }
- }
- // Convert the set to an array before returning
- game.valid_spaces = Array.from(valid_spaces_set);
- return game.valid_spaces;
-}
-
-function valid_cards(player_hand, presence) {
- const valid_cards_set= new Set();
- if (game.phase === 0) {
- for (let c of player_hand) {
- let card = power_cards.find(card => card && card.number === c);
- if (card.number === 52) {continue} // Never add tactics fails
- if (card.name === game.tactics_fails) {continue} //Cannot play the suit of Tactics Fails
- if (card.socio === 0) {
- valid_cards_set.add(card.number);
- } else if (leaders.includes(card.socio) && presence[card.socio]) {
- valid_cards_set.add(card.number);
- }
- }
- } else if (game.phase === 1) {
- for (let c of player_hand) {
- let card = power_cards.find(card => card && card.number === c);
- if (card.name === power_cards[game.played_power_card].name) {
- valid_cards_set.add(card.number);
- } else if (leaders.includes(card.socio) && presence[card.socio]) {
- valid_cards_set.add(card.number);
- } else if (card.number === 52) {valid_cards_set.add(card.number)}
- }
- }
- game.valid_cards = Array.from(valid_cards_set);
- return game.valid_cards;
-}
-
-function do_valid_cards() {
- let presence = check_presence(game.pwr_struggle_in)
- if (game.active === DEM) {
- valid_cards(game.dem_pwr_hand, presence.dem_leaders)
-
- } else {
- valid_cards(game.com_pwr_hand, presence.com_leaders)}
-}
-
-function count_adj(name_unique) {
- const space = spaces[find_space_index(name_unique)]
- let dem_adj = 0
- let com_adj = 0
-
- let adjacent_spaces = get_adjusted_adjacency(space.space_id)
-
- for (let adj_space_id of adjacent_spaces) {
- if (adj_space_id) {
- const adj_piece = spaces.find(piece => piece && piece.space_id === adj_space_id);
- console.log('adj_piece.space_id', adj_piece.space_id, 'space', space)
- if (adj_piece && adj_piece.space_id !== space.space_id) {
- if (check_dem_control(adj_piece.space_id)) {
- console.log('added DEM space', spaces[adj_piece.space_id].name)
- dem_adj++
- }
- if (check_com_control(adj_piece.space_id)) {
- console.log('added COM space', spaces[adj_piece.space_id].name)
- com_adj++
- }
- }
- }
- }
- console.log('dem_adj: ', dem_adj, 'com_adj: ', com_adj)
- return {dem_adj, com_adj}
-}
-
-/*function count_adj_worker(space_id) {
- const space = spaces[space_id]
- let dem_adj = 0
- let com_adj = 0
-
- for (let adj_space_id of space.adjacent) {
- if (adj_space_id) {
- const adj_space = spaces[adj_space_id]
- if (adj_space && adj_space.socio === 4) {
- const adj_piece = game.pieces.find(piece => piece && piece.space_id === adj_space_id );
- if (adj_piece) {
- if (adj_piece.demCtrl === 1 ) {
- dem_adj++
- }
- if (adj_piece.comCtrl === 1 ) {
- com_adj++
- }
- }
- }
- }
- }
- return {dem_adj, com_adj}
-} */
-
-function check_control(space_id) {
- //console.log('in check control, space', spaces[space_id].name_unique)
- if ( (game.comInfl[space_id] - game.demInfl[space_id]) >= spaces[space_id].stability) {
- return true;
- } else if ((game.demInfl[space_id] - game.comInfl[space_id]) >= spaces[space_id].stability) {
- //console.log('true')
- return true;
- } else {
- //console.log('false')
- return false;
- }
-}
-
-function check_opp_control(space_id) {
- if (spaces[space_id].country === 'Romania') {
- //console.log('in check opp control, space', spaces[space_id].name_unique)
- }
- if (game.active === DEM && ((game.comInfl[space_id] - game.demInfl[space_id]) >= spaces[space_id].stability)) {
- if (spaces[space_id].country === 'Romania') {
- //console.log('control true')
- }
- return true;
- } else if (game.active === COM && ((game.demInfl[space_id] - game.comInfl[space_id]) >= spaces[space_id].stability)) {
- //console.log('true')
- return true;
- } else {
- //console.log('false')
- return false;
- }
-}
-
-function check_dem_control(space_id) {
- if ((game.demInfl[space_id] - game.comInfl[space_id]) >= spaces[space_id].stability) {
- return true;
- } else {
- return false;
- }
-}
-
-function check_com_control(space_id) {
- if ((game.comInfl[space_id] - game.demInfl[space_id]) >= spaces[space_id].stability) {
- return true;
- } else {
- return false;
- }
-}
-
-function do_tst_attempt() {
- let roll = Math.floor(Math.random() * 6) + 1;
- log(`Rolled a ${roll}`);
-
- roll += game.available_ops
- log(`+${game.available_ops} from card ops`)
-
- // TIANANMEN SQUARE MODIFIERS
-
- if (game.active === DEM && game.dem_tst_attempted === 1 || game.active === COM && game.com_tst_attempted === 1) {
- roll ++;
- log('+1 modifier from previous Tiananmen Square Track attempts')
- }
- if (game.active === DEM && game.dem_tst_position >= 1 && game.com_tst_position === 0) {
- roll ++
- log('+1 from TST award')
- }
- if (game.active === COM && game.com_tst_position >= 1 && game.dem_tst_position === 0) {
- roll ++
- log('+1 from TST award')
- }
- if ((game.active === DEM && cards[game.played_card].side === 'D') || (game.active === COM && cards[game.played_card].side === 'C')) {
- roll ++;
- log('+1 for playing own card');
- }
- if (game.active === COM && game.persistent_events.includes(53)) {
- roll ++
- log('+1 from C53')
- }
- log(`Modified die roll: ${roll}`)
-
- // TIANANMEN SQUARE ATTEMPT
- game.return = game.active
- game.return_state = 'tiananmen_square_attempt_success'
- if (game.active === DEM) {
- game.dem_tst_attempted_this_turn = 1
- if (roll >= dem_tst_req[game.dem_tst_position]) {
- log(`${dem_tst_req[game.dem_tst_position]} required: success`)
- game.dem_tst_position++
- game.dem_tst_attempted = 0
-
- //Check if they have reached box 7 or 8 first
- if (game.dem_tst_position === 7 && game.com_tst_position < 7) {
- game.tst_7 = false
- }
- if (game.dem_tst_position === 8 && game.com_tst_position < 8) {
- game.tst_8 = false
- }
-
- //Check if they have caught up to box 7 or 8
- if (game.dem_tst_position >= 7 && game.com_tst_position >= 7) {
- delete game.tst_7
- }
- if (game.dem_tst_position >= 8 && game.com_tst_position >= 8) {
- delete game.tst_8
- }
-
- //Check if TST events occur
- if (game.dem_tst_position === 3 && game.com_tst_position < 3) {goto_vm(203)}
- else if (game.dem_tst_position === 4 && game.com_tst_position < 4) {goto_vm(204)}
- else {game.state = 'tiananmen_square_attempt_success'}
- } else {
- log(`${dem_tst_req[game.dem_tst_position]} required: fail`)
- game.dem_tst_attempted = 1
- game.state = 'tiananmen_square_attempt_fail'
- }
- } else {
- game.com_tst_attempted_this_turn = 1
- if (roll >= com_tst_req[game.com_tst_position]) {
- log(`${com_tst_req[game.com_tst_position]} required: success`)
- game.com_tst_position++
- game.com_tst_attempted = 0
-
- //Check if they have reached box 7 or 8 first
- if (game.dem_tst_position === 7 && game.com_tst_position < 7) {
- game.tst_7 = false
- }
- if (game.dem_tst_position === 8 && game.com_tst_position < 8) {
- game.tst_8 = false
- }
-
- //Check if they have caught up to box 7 or 8
- if (game.dem_tst_position >= 7 && game.com_tst_position >= 7) {
- delete game.tst_7
- }
- if (game.dem_tst_position >= 8 && game.com_tst_position >= 8) {
- delete game.tst_8
- }
-
- //Check if TST events occur
- if (game.com_tst_position === 3 && game.dem_tst_position < 3) {goto_vm(203)}
- else if (game.com_tst_position === 4 && game.dem_tst_position < 4) {goto_vm(204)}
- else {game.state = 'tiananmen_square_attempt_success'}
- } else {
- log(`${com_tst_req[game.com_tst_position]} required: fail`)
- game.com_tst_attempted = 1
- game.state = 'tiananmen_square_attempt_fail'
- }
- }
-}
-
-function check_presence(country) {
-
- let dem_spaces = 0;
- let com_spaces = 0;
- let dem_battlegrounds = 0;
- let com_battlegrounds = 0;
- let dem_leaders = {1: false, 4: false, 5: false, 6: false, 7: false};
- let com_leaders = {1: false, 4: false, 5: false, 6: false, 7: false};
-
-
- for (let i = 1; i < spaces.length; i++) {
- let space = spaces[i]
- if (space.country === country) {
-
- if (check_dem_control(i)) {
- dem_spaces++;
- if (space.battleground === 1) {
- dem_battlegrounds++;
- }
- if (leaders.includes(space.socio)) {
- dem_leaders[space.socio] = true;
- }
- }
- if (check_com_control(i)) {
- com_spaces++;
- if (space.battleground === 1) {
- com_battlegrounds++;
- }
- if (leaders.includes(space.socio)) {
- com_leaders[space.socio] = true;
- }
- }
- }
- }
-
- // Determine domination
- let dem_domination = dem_battlegrounds > com_battlegrounds && dem_spaces > com_spaces && dem_spaces - dem_battlegrounds > 0;
- let com_domination = com_battlegrounds > dem_battlegrounds && com_spaces > dem_spaces && com_spaces - com_battlegrounds > 0;
-
- // Determine control
- let total_battlegrounds = battlegrounds(country);
- let dem_control = dem_battlegrounds === total_battlegrounds && dem_spaces > com_spaces;
- let com_control = com_battlegrounds === total_battlegrounds && com_spaces > dem_spaces;
-
- return {
- dem_spaces: dem_spaces,
- com_spaces: com_spaces,
- dem_battlegrounds: dem_battlegrounds,
- com_battlegrounds: com_battlegrounds,
- dem_domination: dem_domination,
- com_domination: com_domination,
- dem_control: dem_control,
- com_control: com_control,
- dem_leaders: dem_leaders,
- com_leaders: com_leaders
- };
-}
-
-function battlegrounds(country) {
- let battlegrounds = 0;
- if (country === "Hungary") {
- battlegrounds = 4
- } else if (country === "Bulgaria") {
- battlegrounds = 5
- } else {
- battlegrounds = 6
- }
- return battlegrounds;
-}
-
-function take_power(country) {
-
- log(`Democrat takes power in ${game.pwr_struggle_in}`)
- game.revolutions[find_country_index(country)] = true
- game.times_held[find_country_index(country)] = 1
-
-}
-
-function retain_power(country){
- game.times_held[find_country_index(country)]++
- let vp_gain = get_value(country)*game.times_held[find_country_index(country)]
- log(`Chooses to retain power`)
- log(`-${vp_gain} VP`)
- game.vp -= vp_gain
-}
-
-function score_country(country) {
- log_h3(`Scoring: ${country}`)
-
-//Get scoring values
- let value_presence = get_value(country)
- let value_domination = value_presence*2
- let value_control
- if (country !== "Hungary") {
- value_control = value_presence*3
- } else {
- value_control = 4
- }
-//Log for scoring
-
- let dem_vp = 0
- let com_vp = 0
- //Check for presence
- let presence = check_presence(country)
- console.log('presence: ', presence)
-
- //If one side has domination or control
- if (presence.dem_control || presence.dem_domination) {
- log(`Democrat:`)
- if (presence.dem_control) {
- log(`Control: +${value_control} VP`)
- dem_vp += value_control
- }
- else {
- log(`Domination: +${value_domination} VP`)
- dem_vp += value_domination
- }
- log(`Battlegrounds: +${presence.dem_battlegrounds} VP`)
- dem_vp += presence.dem_battlegrounds
- log(`Total: +${dem_vp} VP`)
-
- log_gap('Communist:')
- if (presence.com_spaces > 0) {
- log(`Presence: -${value_presence} VP`)
- com_vp -= value_presence
- if (presence.com_battlegrounds >0) {
- log(`Battlegrounds: -${presence.com_battlegrounds} VP`)
- com_vp -= presence.com_battlegrounds
- }
- log(`Total: ${com_vp} VP`)
- } else {
- log('No presence: 0 VP')
- }
-
- }
- else if (presence.com_control || presence.com_domination) {
- log('Communist:')
- if (presence.com_control) {
- log(`Control: -${value_control} VP`)
- com_vp -= value_control
- }
- else {
- log(`Domination: -${value_domination} VP`)
- com_vp -= value_domination
- }
- log(`Battlegrounds: -${presence.com_battlegrounds} VP`)
- com_vp -= presence.com_battlegrounds
- log(`Total: ${com_vp} VP`)
-
- log_gap('Democrat:')
- if (presence.dem_spaces > 0) {
- log(`Presence: +${value_presence} VP`)
- dem_vp += value_presence
- if (presence.dem_battlegrounds > 0) {
- log(`Battlegrounds: +${presence.dem_battlegrounds} VP`)
- dem_vp += presence.dem_battlegrounds
- }
- log (`Total: +${dem_vp} VP`)
- } else {
- log('No presence: 0 VP')
- }
-
- }
-
- //Otherwise, presence and battlegrounds
- else {
- log("No domination or control")
- log_gap(`Communist:`)
- if (presence.com_spaces > 0) {
- log(`Presence: -${value_presence} VP`)
- com_vp -= value_presence
- if (presence.com_battlegrounds > 0) {
- log(`Battlegrounds: -${presence.com_battlegrounds} VP`)
- com_vp -= presence.com_battlegrounds
- } else {
- log('No battlegrounds')
- }
- log(`Total: ${com_vp} VP`)
- } else {
- log('No presence: 0 VP')
- }
- log_gap('Democrat:')
- if (presence.dem_spaces > 0) {
- log(`Presence: +${value_presence} VP`)
- dem_vp += value_presence
- if (presence.dem_battlegrounds > 0) {
- log(`Battlegrounds: +${presence.dem_battlegrounds} VP`)
- dem_vp += presence.dem_battlegrounds
- } else {
- log('No battlegrounds')
- }
- log(`Total: +${dem_vp} VP`)
- } else {
- log('No presence: 0 VP')
- }
- }
-
-
-//Calculate change VP
- /*let dem_vp = 0
- if (presence.dem_spaces > 0) {dem_vp += value_presence}
- if (presence.dem_domination) {dem_vp += value_presence}
- if (presence.dem_control && country !== "Hungary") {
- dem_vp += value_control
- }
- else if (presence.dem_control && country === "Hungary") {dem_vp += 2}
- dem_vp += presence.dem_battlegrounds
-
- let com_vp = 0
- if (presence.com_spaces > 0) {com_vp += value_presence}
- if (presence.com_domination) {com_vp += value_presence}
- if (presence.com_control && country !== "Hungary") {com_vp += value_presence}
- else if (presence.com_control && country === "Hungary") {com_vp += 2}
- com_vp += presence.com_battlegrounds */
- let change_vp = dem_vp + com_vp
- game.vp += change_vp
- if (change_vp > 0 ) {
- log_gap(`Final change VP: +${change_vp} VP`)
- } else {
- log_gap(`Final change VP: ${change_vp} VP`)
- }
-}
-
-function get_value(country) {
- let value
- if (country === "East_Germany" || country === "Poland") {value = 3}
- else if (country === "Czechoslovakia" || country === "Romania") {value = 2}
- else value = 1
- return value
-}
-
-function permanently_remove(card) {
- console.log('card:', card)
- log_msg_gap(`C${cards[card].number} permanently removed`)
- remove_from_discard(card)
-
- /*let card_index = game.strategy_discard.indexOf(card)
- if (card_index !== -1) {
- console.log('sub 1 called')
- game.strategy_discard.splice(card_index, 1)
- }*/
- card_index = game.table_cards.indexOf(card)
- if (card_index !== -1) {
- console.log('sub 2 called')
- game.table_cards.splice(card_index, 1)
- }
- game.strategy_removed.push(card)
- console.log('game.strategy_removed', game.strategy_removed)
-}
-
-function check_vp() {
- if (game.vp >= 20) {
- goto_game_over(DEM, `${DEM} won an Automatic Victory!`)
- console.log('after goto_game_over, game.state', game.state)
- return true
- } else if(game.vp <= -20) {
- goto_game_over(COM, `${COM} won an Automatic Victory!`)
- return true
- }
- return false
-}
-
-function game_over() {
- if (game.vp >= 20 || game.vp <= -20) {
- return true
- } else { return false}
-}
-
-function goto_game_over(result, victory) {
- game.state = "game_over"
- game.active = "None"
- game.result = result
- game.victory = victory
- log_h1("Game Over")
- log(game.victory)
- console.log('game over, game.state', game.state)
- return
-
-}
-
-function reset_austria_hungary_border_reopened() {
- //game.austria_hungary_border_reopened_checked = false
- game.austria_hungary_border_reopened_tracker = false
-}
-
-function end_stasi_choose_card() {
- game.round_player = COM
- game.round ++
- log_h2(`Action Round ${game.round}`)
- next_player()
- game.valid_spaces = []
- if (game.persistent_events.includes(5)) {
- log_h3('C5')
- game.state = 'general_strike'
- } else {
- game.state = 'choose_card'
- }
-}
-
-function check_reformer() {
- if (game.dem_tst_position !== game.com_tst_position) {
- if (!game.playable_cards.includes(67)) {
- game.playable_cards.push(67)
- }
- } else {
- game.playable_cards = game.playable_cards.filter(n => n !== 67)
- }
-
-}
-
-function count_scoring_cards() {
- let scoring_check
- if (game.active === DEM) {
- scoring_check = game.democrat_hand.filter(card => scoring_cards.includes(card)).length
- } else {
- scoring_check = game.communist_hand.filter(card => scoring_cards.includes(card)).length
- }
- return scoring_check
-}
-
-function select_card(card){
- game.played_card = card
- game.temp = 0
- let find_card
- if (game.active === COM) {
- find_card = game.communist_hand.indexOf(card)
- game.communist_hand.splice(find_card, 1)
- } else {
- find_card = game.democrat_hand.indexOf(card)
- game.democrat_hand.splice(find_card, 1)
- }
- game.available_ops = get_card_ops(card)
-
- //Check Ligachev
- if (game.active === DEM && game.persistent_events.includes(99) && card !== 14) {
- log('-3 VP from C99')
- game.vp -= 3
- if (check_vp()) {
- return
- }
- game.persistent_events = game.persistent_events.filter(n => n !== 99)
- }
- game.state = 'play_card'
- console.log('game.state', game.state)
-}
-
-function find_event(card) {
- return variable_events.indexOf(card)
-}
-
-function get_events(card){
- if (cards[card].side === 'D') {
- if (game.active === DEM) {gen_action('card_event', card)}
- if (game.active === COM) {gen_action('card_opp_event', card)}
- }
- else if (cards[card].side === 'C') {
- if (game.active === COM) {gen_action('card_event', card)}
- if (game.active === DEM) {gen_action('card_opp_event', card)}
- } else {
- gen_action('card_event', card)
- }
-}
-
-function get_card_ops(card) {
- let ops = 0
-
- if (card) {
- ops = cards[card].ops
- }
- if (game.persistent_events.includes(25) && game.active === COM) {
- if(game.state === 'choose_card' || game.state === 'stasi_play_card') {
- log('+1 op from C25')
- }
- ops ++
- }
- if (game.persistent_events.includes(50) && game.active === DEM) {
- if(game.state === 'choose_card' || game.state === 'stasi_play_card' || game.state === 'vm_laszlo_tokes') {
- log('+1 op from C50')
- }
- ops ++
- }
-
- if ((game.active === DEM && game.dem_tst_position >= 2 && game.com_tst_position <= 1 && cards[card].ops === 1) || (game.active === COM && game.com_tst_position >=2 && game.dem_tst_position <= 1 && cards[card].ops === 1)) {
- if(game.state === 'choose_card' || game.state === 'stasi_play_card') {
- log('+1 op from Tiananmen Square Track')
- }
- ops ++
- }
-
- if ((game.active === DEM && game.prudence && game.prudence.DEM !== 0)) {
- if(game.state === 'choose_card' || game.state === 'stasi_play_card' || game.state === 'vm_laszlo_tokes') {
- if (ops > 2) {
- log(`${pluralize(game.prudence.DEM,'op')} from C8`)
- } else {
- if (ops > 1) {
- log(`-1 op from C8`)
- }
- }
- }
- ops += game.prudence.DEM
-
- if (ops < 1) {
- ops = 1
- }
- }
-
- if (game.active === COM && game.prudence && game.prudence.COM < 0) {
- if(game.state === 'choose_card') {
- if (ops > 2) {
- log(`${pluralize(game.prudence.COM,'op')} from C8`)
- } else if (ops > 1) {
- log(`-1 op from C8`)
- }
- }
- ops += game.prudence.COM
- if (ops < 1) {
- ops = 1
- }
- } return ops
-}
-
-function get_tst_6_ops() {
- let ops = 0
-
- if (game.persistent_events.includes(25) && game.active === COM) {
- log('+1 op from C25')
- ops ++
- }
- if (game.persistent_events.includes(50) && game.active === DEM) {
- log('+1 op from C50')
- ops ++
- }
-
- if ((game.active === DEM && game.prudence && game.prudence.DEM !== 0)) {
- if (ops > 0) {
- log(`${pluralize(game.prudence.DEM,'op')} from C8`)
- } else {
- log(`-1 op from C8`)
- }
-
- ops += game.prudence.DEM
-
- if (ops < -1) {
- ops = -1
- }
- }
-
- if (game.active === COM && game.prudence && game.prudence.COM < 0) {
-
- if (ops > 0) {
- log(`${pluralize(game.prudence.COM,'op')} from C8`)
- } else {
- log(`-1 op from C8`)
- }
-
- ops += game.prudence.COM
- if (ops < -1) {
- ops = -1
- }
- }
- return ops
-}
-
-
-// =========== MOVING THROUGH TURNS ============
-
-function end_round() {
- //Check if the game is over!
- if (game.state === 'game_over') {
- console.log('in end')
- return}
-
- //Check if the card has been removed or played to table, and if a card has been not been played. If not, discard.
- if (!game.strategy_removed.includes(game.played_card) && !game.table_cards.includes(game.played_card) && game.played_card > 0) {
- game.strategy_discard.push(game.played_card)
- }
-
- //Reset
- game.played_card = 0
- game.temp = 0
- game.vm_event = 0
- game.phase = 0
- game.remove_opponent_infl = false
- game.is_pwr_struggle = false
- game.vm_infl_to_do = false /*Can get rid of this and use game.return_state? */
- game.vm_event_to_do = false
- game.vm_active_country = ''
- game.return_state = ''
- game.discard = false
- game.return = ''
- game.valid_cards = []
- game.valid_spaces = []
- check_common_european_home()
- //game.playable_cards[find_event(21)] = true
- reset_austria_hungary_border_reopened() /*This should be redundant! */
-
-
- // Check for duplicate card entries
- let card_check
- if (game.samizdat_card > 0) {
- card_check = [...game.strategy_deck, ...game.strategy_discard, ...game.strategy_removed, ...game.table_cards, ...game.communist_hand, ... game.democrat_hand, game.samizdat_card];
- } else {
- card_check = [...game.strategy_deck, ...game.strategy_discard, ...game.strategy_removed, ...game.table_cards, ...game.communist_hand, ... game.democrat_hand];
- }
-
- function check_duplicates(array) {
- return new Set(array).size !== array.length;
- }
-
- function find_duplicates(array) {
- const duplicates = array.filter((item, index) => array.indexOf(item) !== index);
- return [...new Set(duplicates)];
- }
-
- console.log('game.strategy_deck', game.strategy_deck, 'game.strategy_discard', game.strategy_discard, 'game.strategy_removed', game.strategy_removed, 'game.table_cards', game.table_cards, 'game.communist_hand', game.communist_hand, 'game.democrat_hand', game.democrat_hand)
-
- if (check_duplicates(card_check)) {
- const duplicates = find_duplicates(card_check)
- console.log('discard', game.strategy_discard, 'removed', game.strategy_removed, 'game.table_cards', game.table_cards, 'com hand', game.communist_hand, 'dem hand', game.democrat_hand)
- throw new Error(`Duplicate cards detected: ${duplicates.join(', ')}`)
- }
- console.log('cards in game', card_check.length)
- card_check = card_check.sort((a, b) => a - b)
- console.log('cards in game', card_check)
- if (game.turn <= 3) {
- if (card_check.length !== 40) {
- throw new Error(`Wrong number of cards: ${card_check.length}`)
- }
- } else if (game.turn <=7) {
- if (card_check.length !== 81) {
- throw new Error(`Wrong number of cards: ${card_check.length}`)
- }
- } else if (card_check.length !== 110) {
- throw new Error(`Wrong number of cards: ${card_check.length}`)
- }
-
-
-
- console.log('game.dem_tst_position ', game.dem_tst_position , 'game.com_tst_position ', game.com_tst_position )
- //Check if the Reformer is playable
- check_reformer()
-
- // Check if last round and if so resolve end turn events
- if (game.round_player === DEM && game.round === 7) {
- if(game.persistent_events.includes(15)) {
- if (game.active !== COM) {
- next_player()
- }
- game.state = 'honecker'
- return
- }
- else if (game.dem_tst_position >= 6 && game.com_tst_position <= 5) {
- log_h2('Tiananmen Square Track Award')
- if (game.active !== DEM) {
- next_player()
- }
- game.return = game.active
- clear_undo()
- game.return_state = 'end_turn_4_5_4'
- goto_vm(206)
- return
- } else if (game.com_tst_position >= 6 && game.dem_tst_position <= 5) {
- log_h2('Tiananmen Square Track Award')
- if (game.active !== COM) {
- next_player()
- }
- game.return = game.active
- clear_undo()
- game.return_state = 'end_turn_4_5_4'
- goto_vm(206)
- return
- }
- else {
- clear_undo()
- game.state = 'end_turn_4_5_4'
- return
- }
- }
-
- // Resolve end action round
- //Stasi check
- if(game.round_player === COM && game.persistent_events.includes(13)) {
- game.round_player = DEM
- if (game.active !== DEM) {
- next_player()
- } else {
- log_h3('Democratic Action Round')
- log_h3('C13')
- }
- if (game.democrat_hand.includes(game.stasi_card)) {
- game.state = 'stasi_play_card'
- } else {
- game.stasi_card = 0
- game.state = 'choose_card'
- }
- return
- }
- //Check if in extra Action Round
- else if (game.round_player === COM && game.round === 8) {
- clear_undo()
- game.state = 'end_turn_4_5_4'
- return
- }
- //Normal round end
- else if (game.round_player===COM) {
- game.round_player = DEM
- if (game.active !== DEM) {
- next_player()
- } else {
- log_h3('Democratic Action Round')
- }
- game.state = 'choose_card'
- return
- }
- if (game.round_player === DEM) {
- console.log('checking stasi', game.persistent_events.includes(13))
- if(game.persistent_events.includes(13)) {
- console.log('stasi sub function')
- if (game.active !== DEM) {
- next_player()
- }
- game.state = 'stasi_end_round'
- return
- } else if(game.round_player === DEM && game.persistent_events.includes(5)){
- game.state = 'general_strike'
- game.round ++
- log_h2(`Action Round ${game.round}`)
- game.round_player = COM
- if (game.active !== COM) {
- next_player()
- }
- log_h3('C5')
- return
- } else {
- game.state = 'choose_card'
- game.round_player = COM
- game.round ++
- log_h2(`Action Round ${game.round}`)
- if (game.active !== COM) {
- next_player()
- }
- }
- }
- //game.state = 'choose_card' Does this do anything any more?
-}
-
-/*
-function end_turn(){
- /*End Turn sequence
- TST support check
- Verify held cards
- New Year's Eve Party
- Advance Turn Marker
-
-// CHECK FOR OPTIONAL SUPPORT CHECK
- if (game.dem_tst_position >=6 && game.com_tst_position <= 5) {
- if (game.active !== DEM) {
- next_player_()
- }
- game.state = 'tst_support_check'
- }
- if (game.com_tst_position >=6 && game.dem_tst_position <= 5) {
- if (game.active !== COM) {
- next_player_()
- }
- game.state = 'tst_support_check'
- }
-
-
-//CHECK HELD CARDS
-
-} */
-
-function new_turn() {
- clear_undo()
- game.turn ++
- game.round = 1
- game.valid_spaces=[]
- game.active = COM
- game.round_player = COM
- game.dem_tst_attempted_this_turn = 0
- game.com_tst_attempted_this_turn = 0
- if (game.tst_7) {game.tst_7 = false}
- if (game.tst_8) {game.tst_8 = false}
-
- //Remove events that only last one turn
- game.persistent_events = game.persistent_events.filter(n => n !== 25) /*Perestroika*/
- game.persistent_events = game.persistent_events.filter(n => n !== 50) /*Sinatra Doctrine*/
- game.persistent_events = game.persistent_events.filter(n => n !== 13) /*Stasi*/
- game.persistent_events = game.persistent_events.filter(n => n !== 15) /*Honecker*/
- delete game.prudence
- delete game.stasi_card
-
- //Austria Hungary Border Reopened
- if (game.persistent_events.includes(58)) {
- game.persistent_events = game.persistent_events.filter(n => n !== 58)
- delete game.austria_hungary_border_reopened_tracker
- log(`C58 no longer in effect`)
- //permanently_remove(58)
- }
- //Elena
- if (game.persistent_events.includes(101)) {
- game.persistent_events = game.persistent_events.filter(n => n !== 101)
- log(`C101 no longer in effect`)
- //permanently_remove(101)
- }
- //GrenzTruppen
- if (game.persistent_events.includes(59)) {
- game.persistent_events = game.persistent_events.filter(n => n !== 59)
- log(`C59 no longer in effect`)
- //permanently_remove(59)
- }
- //Foreign Currency Debt Burden
- if (game.persistent_events.includes(49)) {
- game.persistent_events = game.persistent_events.filter(n => n !== 49)
- delete game.foreign_currency_debt_burden
- log(`C49 no longer in effect`)
- //permanently_remove(49)
- }
- //FRG Embassies
- if (game.persistent_events.includes(74)) {
- game.persistent_events = game.persistent_events.filter(n => n !== 74)
- log(`C74 no longer in effect`)
- discard_from_table(74)
- permanently_remove(74)
- }
- //Genscher
- if (game.persistent_events.includes(63)) {
- game.persistent_events = game.persistent_events.filter(n => n !== 63)
- log(`C63 no longer in effect`)
- discard_from_table(63)
- permanently_remove(63)
- }
- //Stand Fast
- if (game.persistent_events.includes(100)) {
- game.persistent_events = game.persistent_events.filter(n => n !== 100)
- delete game.stand_fast
- log(`C100 no longer in effect`)
- //permanently_remove(100)
- }
-
- if (game.samizdat_card > 0 ) {
- game.democrat_hand.push(game.samizdat_card)
- delete game.samizdat_card
- }
-
- log_h1("Turn " + game.turn)
-
- if (game.turn === 4) {
- add_midyear()
- }
- if (game.turn === 8) {
- add_lateyear()
- }
- if (game.turn > 1) {
- if (game.persistent_events.includes(65)) {
- game.com_hand_limit = 7
- log('Communist draws 7 cards due to C65')
- //permanently_remove(65)
- game.persistent_events = game.persistent_events.filter(n => n !== 65)
- }
- console.log('deck', game.strategy_deck)
- console.log('game.com_hand_limit', game.com_hand_limit, 'communist hand before draw', game.communist_hand)
- draw_cards(game.strategy_deck, game.democrat_hand, game.communist_hand, game.dem_hand_limit, game.com_hand_limit)
- game.com_hand_limit = 8
- console.log('communist hand after draw', game.communist_hand)
-
- }
-
- //Check if TST effects need to be resolved
- if (game.dem_tst_position >=5 && game.com_tst_position <= 4) {
- log_h2('Tiananmen Square Track award')
- if(game.active !== DEM) { next_player() }
- for (let card of game.democrat_hand) {
- if (scoring_cards.includes(card)) continue
- game.valid_cards.push(card)
- }
- game.state = 'tst_goddess' /* Goddess only name of Democrat bonus, not Communist*/
- return
- }
- else if (game.com_tst_position >=5 && game.dem_tst_position <= 4) {
- log_h2('Tiananmen Square Track award')
- if(game.active !== COM) { next_player() }
- for (let card of game.communist_hand) {
- if (scoring_cards.includes(card)) continue
- game.valid_cards.push(card)
- }
- game.state = 'tst_goddess'
- } else {
- log_h2("Action Round " + game.round)
- log_side()
- //console.log('in start new AR call, game.active', game.active)
- if (game.persistent_events.includes(5)) {
- log_h3('C5')
- game.state = 'general_strike'
- }
- else {
- game.state = 'choose_card'
- }
- }
-}
-
-function next_player() {
- clear_undo()
- //console.log('next player called')
- if (game.active === DEM)
- game.active = COM
- else
- game.active = DEM
-
- log_side()
-}
-
-function change_player() {
- clear_undo()
- //console.log('next player called')
- if (game.active === DEM)
- game.active = COM
- else
- game.active = DEM
-}
-
-function find_space_index(name_unique) {
- return spaces.findIndex(space => space && space.name_unique === name_unique)
-}
-
-function find_country_index(country) {
- return countries.indexOf(country)
-}
-
-function draw_deck(deck) {
- return deck.filter(card => card && card.period === 1).map(card => card.number)
-}
-
-function draw_cards(deck, democrat_hand, communist_hand, dem_hand_limit, com_hand_limit) {
- //console.log('game.valid_cards at start of draw cards: ', game.valid_cards)
- let turn = 'communist'; // Start with the communist player
- //console.log('game.strategy_deck', game.strategy_deck)
- console.log('deck', deck, 'democrat_hand', democrat_hand, 'communist_hand', communist_hand, 'dem_hand_limit', dem_hand_limit, 'com_hand_limit', com_hand_limit)
- while (democrat_hand.length < dem_hand_limit || communist_hand.length < com_hand_limit) {
- //console.log('deck.length: ', deck.length)
- //console.log('discard.length', game.strategy_discard )
- if (deck.length === 0) {
- log_h3('--- Reshuffle ---')
-
- deck.push(...game.strategy_discard)
- game.strategy_discard = []
- }
-
- else if (turn === 'communist' && communist_hand.length < com_hand_limit) {
- communist_hand.push(draw_card(deck));
- //console.log('game.valid_cards after communist draw: ', JSON.stringify(game.valid_cards));
- turn = 'democrat';
- } else if(turn === 'communist' && communist_hand.length === com_hand_limit) {
- turn = 'democrat';
- }
- else if (turn === 'democrat' && democrat_hand.length < dem_hand_limit) {
- democrat_hand.push(draw_card(deck));
- //console.log('democrat_hand: ', democrat_hand)
-
- //console.log('game.valid_cards after democrat draw: ', JSON.stringify(game.valid_cards));
- turn = 'communist';
- }
- else if (turn === 'democrat' && democrat_hand.length === dem_hand_limit) {
- turn = 'communist';
- }
- }
-
- clear_undo()
-}
-
-function draw_card(deck) {
- //console.log('draw card called with:', deck)
- //console.log('game.strategy_deck before', game.strategy_deck)
- if (deck.length === 0) {
- log_h3('--- Reshuffle ---')
-
- deck.push(...game.strategy_discard)
- game.strategy_discard = []
- }
- const randomIndex = Math.floor(Math.random() * deck.length)
- //console.log('card chosen:', randomIndex)
- //console.log('game.strategy_deck after', game.strategy_deck)
- return deck.splice(randomIndex, 1)[0];
-}
-
-function discard(card) {
- //console.log('in discard(card)')
- let find_card
- if (!game.is_pwr_struggle) {
- if (game.active === COM) {
- find_card = game.communist_hand.indexOf(card)
- game.communist_hand.splice(find_card, 1)
- } else {
- find_card = game.democrat_hand.indexOf(card)
- game.democrat_hand.splice(find_card, 1)
- }
- game.strategy_discard.push(card)
- log(`Discarded C${cards[card].number}`)
-
- } else if (game.is_pwr_struggle) {
- if (game.active === COM) {
- find_card = game.com_pwr_hand.indexOf(card);
- game.com_pwr_hand.splice(find_card, 1);
- } else {
- find_card = game.dem_pwr_hand.indexOf(card);
- game.dem_pwr_hand.splice(find_card, 1);
- }
- game.power_struggle_discard.push(card)
- //log(`Discarded P${power_cards[card].number}`)
- }
-}
-function silent_discard(card) {
- //console.log('in discard(card)')
- let find_card
- if (!game.is_pwr_struggle) {
- if (game.active === COM) {
- find_card = game.communist_hand.indexOf(card)
- game.communist_hand.splice(find_card, 1)
- } else {
- find_card = game.democrat_hand.indexOf(card)
- game.democrat_hand.splice(find_card, 1)
- }
- game.strategy_discard.push(card)
-
- } else if (game.is_pwr_struggle) {
- if (game.active === COM) {
- find_card = game.com_pwr_hand.indexOf(card);
- game.com_pwr_hand.splice(find_card, 1);
- } else {
- find_card = game.dem_pwr_hand.indexOf(card);
- game.dem_pwr_hand.splice(find_card, 1);
- }
- game.power_struggle_discard.push(card)
- }
-}
-
-function remove_from_discard(card) {
- let card_index = game.strategy_discard.indexOf(card)
- if (card_index !== -1) {
- game.strategy_discard.splice(card_index, 1)
- }
-}
-
-function discard_card(hand) {
- //let find_card
- let card = Math.floor(Math.random()*hand.length)
- let discarded_card = hand.splice(card, 1)[0]
- if (game.is_pwr_struggle) {
- if (numberless_cards.includes(discarded_card)) {
- log_gap(`Discarded: P${discarded_card}`)
- } else {
- log_gap(`Discarded: P${discarded_card} V${power_cards[discarded_card].value}`)
- }
- } else {
- log(`Discarded C${cards[discarded_card].number}`)
- game.strategy_discard.push(discarded_card)
- }
- return discarded_card
-}
-
-function discard_from_table(card) {
- find_card = game.table_cards.indexOf(card)
- game.table_cards.splice(find_card, 1)
- game.strategy_discard.push(card)
-}
-
-
-function add_midyear() {
- const mid_year = cards.filter(card => card && card.period === 2).map(card => card.number);
- game.strategy_deck.push(...mid_year);
- log_h3('Mid-year cards added to draw deck')
-}
-
-
-function add_lateyear() {
- const late_year = cards.filter(card => card && card.period === 3).map(card => card.number)
- game.strategy_deck.push(...late_year)
- log_h3('Late-year cards added to draw deck')
-}
-
-function reset_power() {
- game.power_struggle_deck = []
- game.power_struggle_discard = []
- game.dem_pwr_hand = []
- game.com_pwr_hand = []
- game.phase = 1
- game.raised_stakes_round = 0
- game.raised_stakes = 0
- game.played_power_card = 0
- game.tactics_fails = ''
- game.view_opp_hand = false
-
- if (game.persistent_events.includes(72)){
- permanently_remove(72)
- game.table_cards = game.table_cards.filter(card => card !== 72)
- game.persistent_events = game.persistent_events.filter(n => n !== 72)
- }
- if (game.persistent_events.includes(62)) {
- permanently_remove(62)
- game.table_cards = game.table_cards.filter(card => card !== 62)
- game.persistent_events = game.persistent_events.filter(n => n !== 62)
- }
- if (game.persistent_events.includes(54) && game.pwr_struggle_in === 'Romania'){
- permanently_remove(54)
- //game.table_cards = game.table_cards.filter(card => card !== 54)
-
- }
- if (game.pwr_struggle_in === 'Romania' && game.persistent_events.includes(70)){
- //permanently_remove(70)
- //game.table_cards = game.table_cards.filter(card => card !== 70)
- game.persistent_events = game.persistent_events.filter(n => n !== 70)
- }
-}
-
-function check_control_change(space_id) {
- /*game.pieces[space_id].demCtrl = 0
- game.pieces[space_id].comCtrl = 0
-
- if ((game.demInfl[space_id] - game.comInfl[space_id]) >= game.pieces[space_id].stability) {
- game.pieces[space_id].demCtrl = 1
- }
- if ((game.comInfl[space_id] - game.demInfl[space_id]) >= game.pieces[space_id].stability) {
- game.pieces[space_id].comCtrl = 1
- }*/
-
- // Check if the Tyrant is Gone has been fulfilled
- console.log('check control change_player, game.the_tyrant_is_gone', game.the_tyrant_is_gone)
- //console.log('dem control', check_dem_control(game.the_tyrant_is_gone))
- if (game.the_tyrant_is_gone > 0 && check_dem_control(game.the_tyrant_is_gone)) {
- console.log('in tyrant')
- log('+2 VP from C97')
- game.vp += 2
- if (check_vp()) {
- return
- }
- game.persistent_events = game.persistent_events.filter(n => n !== 97)
- delete game.the_tyrant_is_gone
- }
-}
-
-function check_systematization() {
- // Check for Systematization - may not use this space
- if (game.systematization > 0) {
- game.valid_spaces = game.valid_spaces.filter(n => n !== game.systematization)
- }
-}
-
-function check_common_european_home() {
- if (!game.playable_cards.includes(21)) {
- game.playable_cards.push(21)
- }
-}
-
-function this_card() {
- return game.vm_event > 0 ? game.vm_event : game.played_card
-}
-/*
-function get_ops(card) {
- let ops = cards[card].ops
- if (game.active === COM) {
- //Check TST op bonus
- if (ops === 1 && game.com_tst_position >=2 && game.dem_tst_position <=1) {
- ops++
- }
- //Events that influence ops
- if (game.persistent_events.includes(25)) {
- ops++
- }
- if (game.prudence.COM && game.prudence.COM <0) {
- ops += game.prudence.COM
- }
-
- } else {
- //Check TST op bonus
- if (ops === 1 && game.dem_tst_position >=2 && game.com_tst_position <=1) {
- ops++
- }
- //Events that influence ops
- if (game.persistent_events.includes(50)) {
- ops++
- }
- if (game.prudence.DEM && game.prudence.DEM <0) {
- ops += game.prudence.DEM
- }
- }
- //Ops can never be less than one
- if (ops <1) { ops = 1 }
- return ops
-}
- */
-
-const pluralize = (count, noun, suffix = 's') =>
- `${count} ${noun}${Math.abs(count) !== 1 ? suffix : ''}`
-
-function clean_name(str) {
- if (str && str.slice(-1) === '*') {
- return str.slice(0, -1)
- } else {
- return str;
- }
-}
-
-function country_name(country) {
- return country.replace(/_/g, ' ')
-}
-
-// ======== LOG FUNCTIONS =============
-
-function log(msg) {
- game.log.push(msg)
-}
-
-function log_br() {
- if (game.log.length > 0 && game.log[game.log.length - 1] !== "")
- game.log.push("")
-}
-
-function logi(msg) {
- game.log.push(">" + msg)
-}
-
-function log_h1(msg) {
- log_br()
- log(".h1 " + msg)
- log_br()
-}
-
-function log_h2(msg) {
- log_br()
- log(".h2 " + msg)
- log_br()
-}
-
-function log_h3(msg) {
- log_br()
- log(".h3 " + msg)
-}
-
-function log_gap(msg) {
- log_br()
- game.log.push(msg)
-}
-
-function log_msg_gap(msg) {
- game.log.push(msg)
- log_br()
-}
-
-
-function log_side() {
- log_br()
- if (game.active === DEM)
- log(".h2d " + game.active)
- else
- log(".h2c " + game.active)
- log_br()
-}
-
-function log_sep() {
- log(".hr")
-}
-
-function log_action(msg) {
- log_br()
- log(msg)
-}
-
-// ============= SUMMARY FUNCTIONS =============
-
-function push_summary() {
- if (game.summary)
- throw "TOO MANY SUMMARIES"
- game.summary = []
-}
-
-function log_summary(msg) {
-
- if (msg.startsWith('Added') || msg.startsWith('Removed')) {
- for (let item of game.summary) {
- if (item[1] === msg) {
- item[0]++
- return
- }
- }
- }
- game.summary.push([1, msg])
-}
-
-function pop_summary() {
- console.log('summary', game.summary)
- if (game.summary.length > 0) {
- for (let [n, msg] of game.summary) {
- if (n > 1) {
- log(msg.replace("£ SP", `${n} SPs`));
- } else {
- log(msg.replace("£ SP", `${n} SP`));
- }
- }
- }
- game.summary = []
-}
-
-function log_summary_place(p) {
- let from = piece_space(p)
- if (from !== AVAILABLE)
- log_summary("% " + piece_name(p) + " from S" + from)
- else
- log_summary("% " + piece_name(p))
-}
-
-function log_summary_move_to_from(p, to) {
- log_summary("% " + piece_name(p) + " to S" + to + " from S" + piece_space(p))
-}
-
-function log_summary_remove(p) {
- log_summary("Removed % " + piece_name(p))
-}
-
-function log_summary_activated(p) {
- log_summary("Activated % " + piece_faction_name(p))
-}
-
-// ============ UNDO FUNCTIONS ==================
-
-function clear_undo() {
- if (game.undo.length > 0)
- game.undo = []
-}
-
-function push_undo() {
- let copy = {}
- for (let k in game) {
- let v = game[k]
- if (k === "undo")
- continue
- else if (k === "log")
- v = v.length
- else if (typeof v === "object" && v !== null)
- v = object_copy(v)
- copy[k] = v
- }
- game.undo.push(copy)
-}
-
-function pop_undo() {
- let save_log = game.log
- let save_undo = game.undo
- game = save_undo.pop()
- save_log.length = game.log
- game.log = save_log
- game.undo = save_undo
-}
-
-// Fast deep copy for objects without cycles
-function object_copy(original) {
- if (Array.isArray(original)) {
- let n = original.length
- let copy = new Array(n)
- for (let i = 0; i < n; ++i) {
- let v = original[i]
- if (typeof v === "object" && v !== null)
- copy[i] = object_copy(v)
- else
- copy[i] = v
- }
- return copy
- } else {
- let copy = {}
- for (let i in original) {
- let v = original[i]
- if (typeof v === "object" && v !== null)
- copy[i] = object_copy(v)
- else
- copy[i] = v
- }
- return copy
- }
-}
-
-
-/* =================== VM FUNCTIONS ========================== */
-
-function goto_vm(proc) {
- let old_vm = game.vm;
-
- game.state = "vm";
- game.vm = {
- prompt: 0,
- fp: proc,
- ip: 0,
- };
-
- if (old_vm) {
- game.vm.return_vm = old_vm;
- }
-
- vm_exec();
-}
-
-function vm_exec() {
- vm_inst(0)();
-}
-
-function vm_inst(a) {
- console.log('game.vm.fp', game.vm.fp, 'game.vm.ip', game.vm.ip)
- return CODE[game.vm.fp][game.vm.ip][a]
-}
-
-function vm_next() {
- game.vm.ip++;
- console.log('vm_next called, game.vm.ip', game.vm.ip)
- vm_exec();
-}
-
-function vm_operand(a) {
- let x = CODE[game.vm.fp][game.vm.ip][a]
- if (a > 0 && typeof x === "function")
- return x()
- return x
-}
-
-function vm_assert_argcount(n) {
- const argcount = CODE[game.vm.fp][game.vm.ip].length - 1
- if (argcount !== n)
- throw Error(`ASSERT Invalid number of arguments on event ${game.vm.fp}: ${argcount} instead of ${n}`)
-}
-
-function vm_log() {
- log(vm_operand(1));
- vm_next();
-}
-
-function vm_if() {
- console.log('game.temp', game.temp)
- console.log('vm_operand(1)', vm_operand(1))
- if (!vm_operand(1)) {
- let balance = 1
- while (balance > 0) {
- ++game.vm.ip
- switch (vm_operand(0)) {
- case vm_if:
- ++balance
- break
- case vm_endif:
- --balance
- break
- case vm_else:
- if (balance === 1)
- --balance
- break
- }
- if (game.vm.ip < 0 || game.vm.ip > CODE[game.vm.fp].length)
- throw "ERROR"
- }
- }
- vm_next()
-}
-
-function vm_else() {
- vm_goto(vm_endif, vm_if, 1, 1)
-}
-
-function vm_endif() {
- vm_next()
-}
-
-function vm_goto_step(step) {
- console.log('vm_goto_step called, target:', step)
- console.log('game.vm.ip', game.vp.ip)
- for (let i = game.vm.ip; i < CODE[game.vm.fp].length; i++) {
- console.log('i', i)
- console.log('step', CODE[game.vm.fp][i][0])
- if (CODE[game.vm.fp][i][0] === step) {
- game.vm.ip = i;
- vm_exec();
- return;
- }
- }
-
- console.log("ERROR: Target operation not found in the current procedure.");
-}
-
-
-function vm_goto(op, nop, dir, step) {
- console.log('vm_inst(0)', vm_inst(0), op, nop)
- console.log('vm_inst(0)', vm_inst(1), op, nop)
- let balance = 1
- while (balance > 0) {
- game.vm.ip += dir
- if (vm_inst(0) === op)
- --balance
- if (vm_inst(0) === nop)
- ++balance
- if (game.vm.ip < 0 || game.vm.ip > CODE[game.vm.fp].length)
- throw "ERROR"
- }
- game.vm.ip += step
- vm_exec()
-}
-
-function event_prompt(str) {
- //console.log('event_prompt called with', str)
- if (typeof str === "undefined")
- str = CODE[game.vm.fp][game.vm.prompt][1]
- if (typeof str === "function")
- str = str()
- //console.log('str:', str)
- if (!str) {
- str = ""
- }
- return str
-}
-
-function vm_prompt() {
- if (game.vm.prompt)
- game.vm._prompt = game.vm.prompt
- game.vm.prompt = game.vm.ip
- vm_next()
-}
-
-function pop_vm_prompt() {
- if (game.vm._prompt) {
- game.vm.prompt = game.vm._prompt
- delete game.vm._prompt
- } else {
- game.vm.prompt = 0
- }
-}
-
-function vm_return() {
-
- //Remove temporary vm variables
- delete game.support_check_modifier
- delete game.vm_max_infl
- delete game.vm_influence_added
- delete game.communist_hand_red
-
- game.vm_event = 0 /*Reset to 0 now that event has been completed. Hopefully this doesn't cause issues! */
- if (game.persistent_events.includes(58)) {
- reset_austria_hungary_border_reopened()
- }
-
- //game.view_opp_hand = false
- console.log('in vm_return, game.return:', game.return, 'game.return_state:', game.return_state, 'game.vm_infl_to_do', game.vm_infl_to_do, 'game.vm_event_to_do', game.vm_event_to_do)
- /*if (!game.vm_infl_to_do && !game.vm_event_to_do) {
- if (game.round_player !== game.active) {
- change_player()
- log_h2('End of Action Round')
- }
- end_round()
- return
- } /*Go direct to end round if card fully resolved */
- if (game.return !== game.active) {
- next_player()}
- if (game.return_state === 'power_struggle') {
- do_valid_cards()
- }
- if (game.return_state && game.return_state !== '') {
- game.state = game.return_state
- console.log( 'game.state', game.state)
- }
- else if (game.vm_infl_to_do) {game.state = 'resolve_opponent_event'} /*Can use game.return state for this? */
- else {game.state = "play_card"}
-}
-
-/* ================== VM ACTIONS =========================== */
-
-function vm_opp_hand_false() {
- game.view_opp_hand = false
- vm_next()
-}
-
-function vm_valid_spaces() {
- let space_1 = vm_operand(1)
- let space_2 = vm_operand(2)
- let space_3 = vm_operand(3)
- let space_4 = vm_operand(4)
- let space_5 = vm_operand(5)
- let space_6 = vm_operand(6)
- game.valid_spaces = [space_1, space_2, space_3, space_4, space_5, space_6]
- game.valid_spaces = game.valid_spaces.filter( n => n )
-
- // Check for Systematization - may not use this space
- check_systematization()
-
- vm_next()
-}
-
-function vm_valid_spaces_opponent () {
- let valid_spaces = []
- for (let i = 1; i < spaces.length; i++) {
- let space = spaces[i]
-
- if (game.active === DEM) {
- let infl = game.comInfl[i]
- if (infl > 0) {
- valid_spaces.push(space.space_id)
- }
- } else {
- infl = game.demInfl[i]
- if (infl > 0) {
- valid_spaces.push(space.space_id)
- }
- }
- }
- game.valid_spaces = valid_spaces
- console.log('game.valid_spaces', game.valid_spaces)
- vm_next()
-}
-
-function vm_valid_spaces_socio () {
- let valid_spaces = []
- for (let i = 1; i < spaces.length; i++) {
- let space = spaces[i]
-
- if (space.socio === vm_operand(1)) {
- valid_spaces.push(space.space_id)
- }
- }
- game.valid_spaces = valid_spaces
-
- // Check for Systematization - may not use this space
- if (game.systematization && game.systematization > 0) {
- game.valid_spaces = game.valid_spaces.filter(n => n !== game.systematization)
- }
- vm_next()
-}
-
-function vm_valid_spaces_opponent_socio () {
- let valid_spaces = []
- for (let i = 1; i < spaces.length; i++) {
- let space = spaces[i]
-
- if (game.active === DEM) {
- let infl = game.comInfl[i]
- if (infl > 0 && space.socio === vm_operand(1)) {
- valid_spaces.push(space.space_id)
- }
- } else {
- let infl = game.demInfl[i]
- if (infl > 0 && space.socio === vm_operand(1)) {
- valid_spaces.push(space.space_id)
- }
- }
- }
- game.valid_spaces = valid_spaces
- // Check for Systematization - may not use this space
- if (game.systematization && game.systematization > 0) {
- game.valid_spaces = game.valid_spaces.filter(n => n !== game.systematization)
- }
- vm_next()
-}
-
-function vm_valid_spaces_country () {
- let country
- if (vm_operand(1)) {country = vm_operand(1)}
- else {country = game.vm_active_country}
- for (let space of spaces) {
- if (!space) continue
- if (space.country === country) {
- game.valid_spaces.push(space.space_id);
- }
- }
- // Check for Systematization - may not use this space
- if (game.systematization && game.systematization > 0) {
- game.valid_spaces = game.valid_spaces.filter(n => n !== game.systematization)
- }
- vm_next()
-}
-
-function vm_valid_spaces_sc () {
- valid_spaces_sc()
- vm_next()
-}
-
-function vm_valid_spaces_country_opp () {
- let country = ''
-
- if (vm_operand(1)) {
- country = vm_operand(1) }
- else {
- country = game.vm_active_country
- }
- for (let space of spaces) {
- if (!space) continue
- if (game.active === DEM) {
- if (space.country === country && game.comInfl[space.space_id] >0) {
- game.valid_spaces.push(space.space_id);
- }
- } else {
- if (space.country === country && game.demInfl[space.space_id]>0) {
- game.valid_spaces.push(space.space_id);
- }
- }
- }
- vm_next()
-}
-
-function vm_valid_spaces_country_sc () {
- let valid_spaces = []
- let country = ''
- console.log('in vm_valid_spaces_country_sc')
- if (vm_operand(1)) {
- country = vm_operand(1) }
- else {
- country = game.vm_active_country
- }
- for (let space of spaces) {
- if (!space) continue
- if (game.active === DEM) {
- if (space.country === country && game.comInfl[space.space_id] >0) {
- valid_spaces.push(space.space_id);
- }
- } else {
- if (space.country === country && game.demInfl[space.space_id] >0) {
- //Check Solidarity Legalised
- if (game.persistent_events.includes(2) && space.space_id === 14) {continue}
-
- //Check Civic Forum
- if (game.persistent_events.includes(90) && space.space_id === 30) {continue}
-
- //Check We are the People
- if (game.persistent_events.includes(48) && space.space_id === 9) {continue}
- valid_spaces.push(space.space_id);
-
- //Check Foreign Currency Debt Burden
- if (game.persistent_events.includes(49) && space.country === game.foreign_currency_debt_burden) {continue}
- }
- }
- }
- game.valid_spaces = valid_spaces
-
- //Check for Foreign Currency Debt Burden
- /*if (game.persistent_events.includes(49) && game.active === COM) {
- game.valid_spaces = game.valid_spaces.filter(n => spaces[n].country !== game.foreign_currency_debt_burden)
- }*/
- vm_next()
-}
-
-function vm_valid_spaces_country_socio_2() {
- for (let space of spaces) {
- if (!space) continue
- if (space.space_id === game.systematization) continue
- if ((space.country === vm_operand(1) && space.socio === vm_operand(2)) || (space.country === vm_operand(1) && space.socio === vm_operand(3))) {
- game.valid_spaces.push(space.space_id);
- }
- }
- vm_next()
-}
-
-function vm_valid_spaces_region_socio() {
- let valid_spaces = []
- for (let space of spaces) {
- if (!space) continue
- if (space.space_id === game.systematization) continue
- if (space.region === vm_operand(1) && space.socio === vm_operand(2)) {
- valid_spaces.push(space.space_id);
- }
- }
- game.valid_spaces = valid_spaces
- vm_next()
-}
-
-function vm_valid_spaces_region_opp() {
- let valid_spaces = []
- for (let space of spaces) {
- if (!space) continue
- let s = space.space_id
- if ((game.active === DEM && space.region === vm_operand(1) && game.comInfl[s] > 0 ) || (game.active === COM && space.region === vm_operand(1) && game.demInfl[s] > 0 )) {
- valid_spaces.push(space.space_id);
- }
- }
- game.valid_spaces = valid_spaces
- vm_next()
-}
-
-function vm_valid_spaces_solidarity_legalised() {
- let valid_spaces = []
- for (let i = 1; i < spaces.length; i++) {
- let space = spaces[i]
- let uncontrolled = (!check_control(i) && !check_opp_control(i))
- if ((space.country === 'Poland' && uncontrolled && space.socio === 3) || (space.country === 'Poland' && uncontrolled && space.socio === 4)) {
- valid_spaces.push(space.space_id);
- }
- }
- game.valid_spaces = valid_spaces
- vm_next()
-}
-
-function vm_active_country () {
- game.valid_spaces = game.valid_spaces.filter(space_id => {
- let space = spaces.find(s => s && s.space_id === space_id);
- return space && space.country === game.vm_active_country;
- });
- vm_next()
-}
-
-function vm_take_control_prep() {
- game.vm_available_ops = vm_operand(1)
- game.state = 'vm_take_control'
- console.log('in vm_take_control_prep game.state', game.state)
-}
-
-function vm_take_control(space) {
- let clicked_space = find_space_index(space)
- if (game.active === DEM) {
- let current_infl = game.demInfl[clicked_space]
- let opponent_infl = game.comInfl[clicked_space]
- let stability = spaces[clicked_space].stability
-
- if ((current_infl - opponent_infl) < stability) {
- game.demInfl[clicked_space] += stability - current_infl + opponent_infl
- //game.pieces[clicked_space].demCtrl = 1
- //game.pieces[clicked_space].comCtrl = 0
- }
- } else if (game.active === COM) {
- let current_infl = game.comInfl[clicked_space]
- let opponent_infl = game.demInfl[clicked_space]
- let stability = spaces[clicked_space].stability
-
- if ((current_infl - opponent_infl) < stability) {
- game.comInfl[clicked_space] += stability - current_infl + opponent_infl
- //game.pieces[clicked_space].comCtrl = 1
- //game.pieces[clicked_space].demCtrl = 0
- }
- }
- game.valid_spaces = game.valid_spaces.filter(id => id !== clicked_space)
- log(`Took control of %${clicked_space}`)
-}
-
-
-function vm_do_add_infl(space) {
- push_undo()
- console.log('in vm_do_add_infl, space', space, 'ops', game.vm_available_ops, 'ahbr tracker', game.austria_hungary_border_reopened_tracker, 'ahbr in events', game.persistent_events.includes(58))
- const clicked_space = find_space_index(space)
-
- //log(`Added 1 influence in %${clicked_space}.`)
-
- log_summary(`Added £ SP in %${clicked_space}.`)
-
- //If AHBR - check AHBR condition
- if (game.persistent_events.includes(58)) {
- if (spaces[clicked_space].country !== 'East_Germany'){
- game.austria_hungary_border_reopened_tracker = false
- }
- }
-
- // Check Genscher
- if (game.persistent_events.includes(63) && game.active === DEM && spaces[clicked_space].country === 'East_Germany') {
- game.vm_available_ops--
- log_summary(`(-1 op due to C63)`)
- } else if (check_opp_control(clicked_space)) {
- game.vm_available_ops -= 2
- //Check if Austria Hungary Border Reopened was used to place last SP in a controlled space in East Germany. If so, game.vm_available_op will be negative
- if (game.vm_available_ops < 0) {
- log_summary(`(Used +1 op from C58)`)
- }
- } else {
- game.vm_available_ops--
- }
-
- // Update influence values
- if (game.active === COM) {
- game.comInfl[clicked_space]++
- } else {
- game.demInfl[clicked_space]++
- }
-
- // Check whether spaces are controlled
- check_control_change(clicked_space)
-
- console.log('before check, ahbr in events', game.persistent_events.includes(58), 'tracker', game.austria_hungary_border_reopened_tracker)
- // Check Austria Hungary Border Reopened is true and condition has been met
- if (game.vm_available_ops === 0 && game.active === DEM && game.persistent_events.includes(58) && game.austria_hungary_border_reopened_tracker) {
- console.log('in award extra op')
- game.vm_available_ops ++
- log('+1 Op from C58')
- game.austria_hungary_border_reopened_tracker = false
- game.valid_spaces = game.valid_spaces.filter(n => spaces[n].country === 'East_Germany')
- }
-
- // If only 1 IP remaining, may not place in opponent controlled spaces
-
- // Check for Genscher & Austria Hungary Border Reopened
-
- if (game.vm_available_ops === 1) {
-
- if (game.active === DEM) {
- //Check Genscher and AHBR
- if (game.persistent_events.includes(63) || (game.persistent_events.includes(58) && game.austria_hungary_border_reopened_tracker)) {
- console.log('in gensher subcheck - remove non-East German controlled ')
- game.valid_spaces = game.valid_spaces.filter(n => !(check_com_control(n) && spaces[n].country !== 'East_Germany'))
- } else {
- console.log('remove all controlled spaces')
- game.valid_spaces = game.valid_spaces.filter(n => !check_com_control(n))
- }
- } else {
- game.valid_spaces = game.valid_spaces.filter(n => !check_dem_control(n))
- }
- }
-
- //Clear valid spaces if no IP remaining.
- if (game.vm_available_ops <= 0 ) {
- game.valid_spaces = []
- }
-}
-
-function vm_do_add_infl_free(space) {
- push_undo()
- const clicked_space = find_space_index(space)
- //log(`Added 1 influence in %${clicked_space}.`)
-
- log_summary(`Added £ SP in %${clicked_space}.`)
-
- // Update influence values
- if (game.active === COM) {
- game.comInfl[clicked_space]++
- } else {
- game.demInfl[clicked_space]++
- }
- game.vm_available_ops--
- // Check whether spaces are controlled
- check_control_change(clicked_space)
-
-
- //console.log('game pieces:', game.pieces[clicked_space])
-}
-
-function vm_add_infl() {
- if (vm_operand(1)) {game.vm_available_ops = vm_operand(1)}
- game.state = 'vm_add_infl'
-}
-
-function vm_add_infl_free() {
- if (vm_operand(1)) {game.vm_available_ops = vm_operand(1)}
- game.state = 'vm_add_infl_free'
-}
-
-function vm_add_x_infl() {
- game.vm_available_ops = vm_operand(1)
- game.state = 'vm_add_x_infl'
-}
-
-function vm_do_add_x_infl(space) {
- push_undo()
- const clicked_space = find_space_index(space)
- log(`Added ${game.vm_available_ops} SPs in %${clicked_space}.`)
-
-
- if (game.active === COM) {
- game.comInfl[clicked_space] += game.vm_available_ops
- } else {
- game.demInfl[clicked_space] += game.vm_available_ops
- }
- check_control_change(clicked_space)
- game.vm_available_ops = 0
- game.valid_spaces = []
-}
-
-function vm_add_limited_infl() {
- game.vm_available_ops = vm_operand(1)
- game.vm_max_infl = vm_operand(2)
- game.state = 'vm_add_limited_infl'
-}
-
-function vm_do_add_limited_infl(space, max_infl) {
- push_undo()
- const clicked_space = find_space_index(space)
- //log(`Added 1 influence in %${clicked_space}.`)
-
- log_summary(`Added £ SP in %${clicked_space}.`)
- game.vm_available_ops --
-
- if (!game.vm_influence_added) {
- game.vm_influence_added = {};
- }
-
- if (!game.vm_influence_added[clicked_space]) {
- game.vm_influence_added[clicked_space] = 0;
- }
-
- if (game.active === COM) {
- game.comInfl[clicked_space] ++
- } else {
- game.demInfl[clicked_space] ++
- }
-
- game.vm_influence_added[clicked_space] ++
-
- //console.log('valid_spaces before update', game.valid_spaces)
- //console.log('influence added:', game.vm_influence_added[clicked_space], 'max infl', max_infl)
- if (game.vm_influence_added[clicked_space] === max_infl) {
- game.valid_spaces = game.valid_spaces.filter(id => id !== clicked_space);
- }
- check_control_change(clicked_space)
- if (game.vm_available_ops === 0) {game.valid_spaces = [] }
-}
-
-function vm_remove_infl() {
- game.vm_available_ops = vm_operand(1)
- game.state = 'vm_remove_infl'
-}
-
-function vm_remove_opp_infl() {
- game.vm_available_ops = vm_operand(1)
- game.remove_opponent_infl = true
- game.state = 'vm_remove_infl'
-}
-
-function vm_remove_x_opp_infl() {
- game.vm_available_ops = vm_operand(1)
- game.remove_opponent_infl = true
- game.state = 'vm_remove_x_infl'
-}
-
-function vm_do_remove_infl(space) {
- push_undo()
- const clicked_space = find_space_index(space)
- //log(`Removed 1 influence from %${clicked_space}.`)
- log_summary(`Removed £ SP from %${clicked_space}.`)
-
- if (!game.vm_influence_added) {
- game.vm_influence_added = {};
- }
-
- if (!game.vm_influence_added[clicked_space]) {
- game.vm_influence_added[clicked_space] = 0;
- }
- if (game.remove_opponent_infl === true) {
- if (game.active === COM) {
- game.demInfl[clicked_space]--
- if (game.demInfl[clicked_space] === 0) {
- game.valid_spaces = game.valid_spaces.filter(id => id !== clicked_space);
- }
- } else {
- game.comInfl[clicked_space]--
- if (game.comInfl[clicked_space] === 0) {
- game.valid_spaces = game.valid_spaces.filter(id => id !== clicked_space);
- }
- }
-
-
- } else {
- if (game.active === COM) {
- game.comInfl[clicked_space]--
- if (game.comInfl[clicked_space] === 0) {
- game.valid_spaces = game.valid_spaces.filter(id => id !== clicked_space);
- }
- } else {
- game.demInfl[clicked_space]--
- if (game.demInfl[clicked_space] === 0) {
- game.valid_spaces = game.valid_spaces.filter(id => id !== clicked_space);
- }
- }
- }
- check_control_change(clicked_space)
- game.vm_influence_added[clicked_space]++
- game.vm_available_ops--
- if (game.vm_available_ops===0) {game.valid_spaces = []}
-}
-
-function vm_do_remove_x_infl(space) {
- push_undo()
- const clicked_space = find_space_index(space)
-
- if (game.remove_opponent_infl) {
- if (game.active === COM) {
- if (game.demInfl[clicked_space] >= game.vm_available_ops) {
- game.demInfl[clicked_space] -= game.vm_available_ops
- } else {
- game.vm_available_ops = game.demInfl[clicked_space]
- game.demInfl[clicked_space] -= game.vm_available_ops
- }
- } else {
- if (game.comInfl[clicked_space] >= game.vm_available_ops) {
- game.comInfl[clicked_space] -= game.vm_available_ops
- } else {
- game.vm_available_ops = game.comInfl[clicked_space]
- game.comInfl[clicked_space] -= game.vm_available_ops
- }
- }
- } else {
- if (game.active === COM) {
- if (game.comInfl[clicked_space] >= game.vm_available_ops) {
- game.comInfl[clicked_space] -= game.vm_available_ops
- } else {
- game.vm_available_ops = game.comInfl[clicked_space]
- game.comInfl[clicked_space] -= game.vm_available_ops
- }
- } else {
- if (game.demInfl[clicked_space] >= game.vm_available_ops) {
- game.demInfl[clicked_space] -= game.vm_available_ops
- } else {
- game.vm_available_ops = game.demInfl[clicked_space]
- game.demInfl[clicked_space] -= game.vm_available_ops
- }
- }
- }
-
- log(`Removed ${game.vm_available_ops} SPs from %${clicked_space}`)
- check_control_change(clicked_space)
-
- game.vm_available_ops = 0
- game.valid_spaces = []
-}
-
-function vm_remove_limited_opp_infl() {
- game.vm_available_ops = vm_operand(1)
- game.vm_max_infl = vm_operand(2)
- game.remove_opponent_infl = true
- game.state = 'vm_remove_limited_infl'
-}
-
-function vm_do_remove_limited_infl(space, max_infl) {
- push_undo()
- const clicked_space = find_space_index(space)
- log(`Removed SP from %${clicked_space}.`)
- game.vm_available_ops --
-
-
- if (!game.vm_influence_added) {
- game.vm_influence_added = {};
- }
-
- if (!game.vm_influence_added[clicked_space]) {
- game.vm_influence_added[clicked_space] = 0;
- }
-
- if (game.active === COM) {
- game.demInfl[clicked_space] --
- if (game.demInfl[clicked_space] === 0) {
- game.valid_spaces = game.valid_spaces.filter(id => id !== clicked_space)
- }
- } else {
- game.comInfl[clicked_space] --
- if (game.comInfl[clicked_space] === 0) {
- game.valid_spaces = game.valid_spaces.filter(id => id !== clicked_space)
- }
- }
-
- game.vm_influence_added[clicked_space] ++
-
- if (game.vm_influence_added[clicked_space] === max_infl) {
- game.valid_spaces = game.valid_spaces.filter(id => id !== clicked_space);
- }
-
- check_control_change(clicked_space)
- if (game.vm_available_ops === 0) {game.valid_spaces = []}
-}
-
-function vm_remove_all_infl() {
- game.vm_available_ops = vm_operand(1)
- game.state = 'vm_remove_all_infl'
-}
-
-function vm_do_remove_all_infl(space) {
- push_undo()
- const clicked_space = find_space_index(space)
- log(`Removed all SP from %${clicked_space}.`)
-
- if (game.remove_opponent_infl === true) {
- if (game.active === COM) {
- game.demInfl[clicked_space] = 0
- } else {
- game.comInfl[clicked_space] = 0
- }
- check_control_change(clicked_space)
-
- } else {
- if (game.active === COM) {
- game.comInfl[clicked_space] = 0
- } else {
- game.demInfl[clicked_space] = 0
- }
- check_control_change(clicked_space)
- }
- game.vm_available_ops --
- game.valid_spaces = game.valid_spaces.filter(id => id !== clicked_space)
-}
-
-function vm_replace_all_infl(space_id) {
- if (game.active === DEM) {
- game.demInfl[space_id] += game.comInfl[space_id]
- game.comInfl[space_id] = 0
- } else {
- game.comInfl[space_id] += game.demInfl[space_id]
- game.demInfl[space_id] = 0
- }
- check_control_change(space_id)
-}
-
-function vm_1_support_check() {
- game.vm_available_ops = 1
- game.state = 'vm_1_support_check_prep'
-}
-
-function vm_support_check() {
- game.vm_available_ops = vm_operand(1)
- game.state = 'vm_support_check_prep'
-}
-
-function vm_support_check_modified() {
- game.vm_available_ops = vm_operand(1)
- game.support_check_modifier = vm_operand(2)
- game.state = 'vm_support_check_prep'
-}
-
-function vm_switch_infl(space){
- push_undo()
- let clicked_space = find_space_index(space)
- game.demInfl[clicked_space] -= game.vm_available_ops
- game.comInfl[clicked_space] += game.vm_available_ops
- log(`Replaced ${pluralize(game.vm_available_ops,'SP')} in ${spaces[clicked_space].name_unique}`)
- game.vm_available_ops = 0
- check_control_change(clicked_space)
-}
-
-/* ===================== EVENT SPECIFIC FUNCTIONS ========== */
-
-function vm_40th_anniversary_celebration() {
- if (game.vp < 0 ) {game.vm_available_ops = 4}
- else {game.vm_available_ops = 2}
- vm_next()
-}
-
-function vm_40th_anniversary_celebration_vp() {
- game.vp --
- log('-1VP')
- if (check_vp()) {
- return
- }
- vm_next()
-}
-
-function vm_adamec() {
- game.state = 'vm_adamec'
-}
-
-function vm_army_backs_revolution() {
- game.persistent_events = game.persistent_events.filter(n => n !== 70)
- game.playable_cards = game.playable_cards.filter(n => n !== 70)
- /*if (game.table_cards.includes(70)) {
- permanently_remove(70)
- }*/
- vm_next()
-}
-
-function vm_austria_hungary_border_reopened() {
- game.persistent_events.push(58)
- permanently_remove(58)
- game.austria_hungary_border_reopened_tracker = false
- //game.table_cards.push(58)
- //remove_from_discard(58)
- vm_next()
-}
-
-function vm_betrayal() {
- if (game.demInfl[58] > 0 ) { game.valid_spaces.push(58) }
- if (game.demInfl[65] >0 ) { game.valid_spaces.push(65) }
- game.vm_available_ops = Math.max(game.demInfl[58], game.demInfl[65])
- game.state = 'vm_switch_infl'
-}
-
-function vm_breakaway_baltic_republics() {
- log('+5 VP')
- game.vp += 5
- game.stability++
- if (check_vp()) {
- return
- }
- game.playable_cards.push(109)
- game.playable_cards = game.playable_cards.filter(n => n !== 14)
- if (!check_dem_control(56) && game.systematization !== 56) {game.valid_spaces.push(56)}
- if (!check_dem_control(70)) {game.valid_spaces.push(70)}
- vm_next()
-}
-
-function vm_brought_in_for_questioning() {
- if (game.active === COM) {
- game.active = DEM
- }
- //game.return = game.active
- console.log('in bifg, game.return', game.return)
- game.phase = 0
- game.state = 'vm_brought_in_for_questioning'
-}
-
-function vm_bulgarian_turks_expelled(){
- game.remove_opponent_infl = true
- game.vp -= 2
- log('-2VP')
- if (check_vp()) {
- return
- }
- if (game.demInfl[70] > 0) {game.valid_spaces = [70]}
- vm_next()
-}
-
-function vm_ceausescu() {
- let adj_cluj = false
- if (game.demInfl[50] > 0 ) {adj_cluj = true}
- if (game.demInfl[54] > 0 ) {adj_cluj = true}
- if (game.demInfl[58] > 0 ) {adj_cluj = true}
- if (game.demInfl[61] > 0 ) {adj_cluj = true}
-
- if (adj_cluj && game.comInfl[61]>0) {
- game.valid_spaces = [61]
- game.vm_available_ops = 1
- //next_player()
- game.remove_opponent_infl = false
- game.state = 'vm_remove_infl'
- }
- else {vm_next()}
-}
-
-function vm_central_committee_reshuffle() {
- game.state = 'vm_central_committee_reshuffle'
-}
-
-function vm_civic_forum() {
- log('+1 VP')
- game.vp++
- if (check_vp()) {
- return
- }
- game.persistent_events.push(90)
- if (check_dem_control(31)) {
- vm_next()
- } else {
- permanently_remove(90)
- vm_return()
- }
-}
-
-function vm_common_european_home() {
- let valid_cards = [];
- for (let c of cards) {
- //if (c === null) {continue}
- if (game.active === DEM) {
- if (c && c.side === 'C') {
- valid_cards.push(c.number)
- }
- } else {
- if (c && c.side === 'D') {
- valid_cards.push(c.number)
- }
- }
- }
- game.valid_cards = valid_cards
- game.state = 'vm_common_european_home_choose'
-}
-
-function vm_dash_for_the_west() {
- game.valid_cards = []
- for (let c of game.strategy_discard) {
- if (cards[c].side === 'D' && cards[c].remove === 1 && (cards[c].playable || game.playable_cards.includes(c))) {
- game.valid_cards.push(c)
- }
- }
- game.state = 'vm_dash_for_the_west'
-}
-
-function vm_deutsche_marks() {
- let max_value = 1;
- for (let c of game.democrat_hand) {
- if (cards[c].ops > max_value) {
- max_value = cards[c].ops
- }
- }
- let valid_cards = [];
- for (let c of game.democrat_hand) {
- if (cards[c].ops === max_value) {
- valid_cards.push(c);
- }
- }
- game.valid_cards = valid_cards
- game.state = 'vm_deutsche_marks_prep'
-}
-
-function vm_domino_theory() {
- game.discard = true
- for (let card of game.strategy_discard) {
- if (scoring_cards.includes(card)) {game.valid_cards.push(card) }
- }
- game.phase = 0
- game.state = 'vm_play_event_from_discard'
-}
-
-function vm_eco_glasnost() {
- game.persistent_events.push(39)
- permanently_remove(39)
- vm_next()
-}
-
-function vm_elena(){
- game.persistent_events.push(101)
- permanently_remove(101)
- //game.table_cards.push(101)
- //remove_from_discard(101)
- vm_next()
-}
-
-function vm_eliminate(space_id) {
- log(`Eliminated %${space_id}`)
- const adjacent_spaces = spaces[space_id].adjacent.filter(Number.isInteger);
-
- //console.log('adjacency before: Iasi', game.pieces[53].adjacent, 'Ploesti:', game.pieces[59].adjacent, 'Bucharesti:', game.pieces[61].adjacent)
-
- // Remove clicked_space from the adjacency lists of its adjacent spaces
- /* adjacent_spaces.forEach(s => {
- game.pieces[s].adjacent = spaces[s].adjacent.filter(id => id !== space_id);
- });
-
- //console.log('adjacency after: Iasi', game.pieces[53].adjacent, 'Ploesti:', game.pieces[59].adjacent, 'Bucharesti:', game.pieces[61].adjacent)
-
- // Connect adjacent spaces to each other
- // No longer used - spaces done dynamically
-/*
- for (let i = 0; i < adjacent_spaces.length; i++) {
- for (let j = i + 1; j < adjacent_spaces.length; j++) {
- console.log(' checking i,', spaces[adjacent_spaces[i]].name, 'j', spaces[adjacent_spaces[j]].name)
- if (!game.pieces[adjacent_spaces[i]].adjacent.includes(adjacent_spaces[j])) {
- game.pieces[adjacent_spaces[i]].adjacent.push(adjacent_spaces[j]);
- }
- if (!game.pieces[adjacent_spaces[j]].adjacent.includes(adjacent_spaces[i])) {
- game.pieces[adjacent_spaces[j]].adjacent.push(adjacent_spaces[i]);
- }
- }
- }
-
- console.log('adjacency after addition: Iasi', game.pieces[53].adjacent, 'Ploesti:', game.pieces[59].adjacent, 'Bucharesti:', game.pieces[61].adjacent)
- // Clear the adjacency list of the clicked space
- game.pieces[space_id].adjacent = [];
-*/
- // Eliminate the democrat influence and move the communist influence to Bucuresti
- game.demInfl[space_id] = 0
- game.comInfl[61] += game.comInfl[space_id]
- if (game.comInfl[space_id] > 0 ) {
- log(`${game.comInfl[space_id]} Communist SP relocated to Bucuresti`)
- }
- game.comInfl[space_id] = 0
-
- //Update control in the eliminated space and in Bucuresti
- check_control_change(space_id)
- check_control_change(61)
-
-}
-
-function get_adjusted_adjacency(space_id) {
- let adjacent_spaces = spaces[space_id].adjacent;
- if (adjacent_spaces.includes(game.systematization)) {
- //console.log('in get adjusted adjacency, systemization',game.systematization)
- //console.log('adjacent_spaces', adjacent_spaces)
- }
- if (game.systematization !== 0) {
- //console.log('in systematization check')
- let eliminated_space_id = game.systematization;
-
- return adjacent_spaces.map(adj_space_id => {
- if (adj_space_id === eliminated_space_id) {
- // Replace the eliminated space with its adjacencies
- //console.log('in map check, return', spaces[eliminated_space_id].adjacent)
- return spaces[eliminated_space_id].adjacent;
- }
- //console.log('2nd check, return', adj_space_id)
- return adj_space_id;
- }).flat(); // Flatten in case the eliminated space has multiple adjacencies
- }
- //console.log('final adjacent spaces', adjacent_spaces)
- return adjacent_spaces;
-}
-
-function vm_exit_visas() {
- game.state = 'vm_exit_visas'
-}
-
-function vm_foreign_currency_debt_burden() {
- log('+1VP')
- game.vp++
- if (check_vp()) {
- return
- }
- //game.table_cards.push(49)
- //remove_from_discard(49)
- game.persistent_events.push(49)
- game.state = 'vm_foreign_currency_debt_burden'
-}
-
-function vm_foreign_television() {
- for (let i = 1 ; i < spaces.length; i++) {
- if (i === 12) {continue} /*Does not apply to Dresden*/
- if (game.comInfl[i] > 0 ) {
- game.valid_spaces.push(i)
- }
- }
- vm_next()
-}
-function vm_frg_embassies() {
- game.persistent_events.push(74)
- game.table_cards.push(74)
- remove_from_discard(74)
- log('C74 in effect')
- vm_next()
-}
-
-function vm_general_strike() {
- game.persistent_events.push(5)
- game.table_cards.push(5)
- remove_from_discard(5)
- log('C5 in effect')
- vm_next()
-}
-
-function vm_genscher() {
- game.persistent_events.push(63)
- game.table_cards.push(63)
- remove_from_discard(63)
- log(`C63 in effect`)
- vm_next()
-}
-
-function vm_goodbye_lenin() {
- game.view_opp_hand = true
- game.communist_hand_red = []
- // Select Red cards to show
- for (let card of game.communist_hand) {
- console.log('checking card ', card, 'red', cards[card].red)
- if (cards[card].red) {
- game.communist_hand_red.push(card)
- }
- }
- //Check if these cards are playabl
- for (let card of game.communist_hand_red) {
- if (cards[card].playable || game.playable_cards.includes(card)) {
- game.valid_cards.push(card)
- }
- }
- game.state = 'vm_goodbye_lenin'
-}
-
-function vm_government_resigns() {
- for (let i = 1; i < spaces.length; i++) {
- let space = spaces[i]
- if (space.socio === 1 && game.comInfl[i] > 0 && !check_control(i)) {
- game.valid_spaces.push(i)
- }
- }
- game.remove_opponent_infl = true
- vm_next()
-}
-
-function vm_grenztruppen() {
- console.log('in grenztruppen - player active:', game.active)
- game.persistent_events.push(59)
- permanently_remove(59)
- //game.table_cards.push(59)
- //remove_from_discard(59)
- vm_next()
-}
-
-function vm_heal_our_bleeding_wounds() {
- let change_vp = 0
- if (game.turn <= 3) {change_vp = -3 }
- else if (game.turn <= 7) {change_vp = -1}
- else change_vp = 3
- if (change_vp >0) {
- log(`+${change_vp} VP`)
- } else {
- log(`-${change_vp} VP`)
- }
- game.vp += change_vp
- if (check_vp()) {
- return
- }
- vm_next()
-}
-
-function vm_helsinki_final_act() {
- game.persistent_events.push(26)
- vm_next()
-}
-
-function vm_honecker() {
- game.persistent_events.push(15)
- game.valid_cards = []
- for (let c of game.strategy_discard) {
- if (scoring_cards.includes(c)) {
- continue}
- else {
- game.valid_cards.push(c)
- }
- }
- game.discard = true
- game.state = 'vm_honecker'
-}
-
-function vm_inflationary_currency() {
- game.state = 'vm_inflationary_currency'
-}
-
-function vm_inflationary_currency_discard() {
- // This function starts with the player who is playing Inflationary Currency for the Event
- // Switch player and check the hand of their opponent to see if the have cards with ops > 3 to discard
- next_player()
- if (game.active === COM) {
- for (let card of game.communist_hand){
- if (get_card_ops(card) >= 3) {
- game.valid_cards.push(card)
- }
- }
- } else {
- for (let card of game.democrat_hand){
- if (get_cards_ops(card) >= 3) {
- game.valid_cards.push(card)
- }
- }
- }
- game.state = 'vm_inflationary_currency_discard'
-}
-
-function vm_kiss_of_death() {
- game.state = 'vm_kiss_of_death'
-}
-
-function vm_klaus_and_komarek() {
- if (game.comInfl[29] > 0 ) {game.valid_spaces = [29]}
- vm_next()
-}
-
-function vm_kohl_proposes_reunification() {
- log('+2 VP')
- game.vp += 2
- if (check_vp()) {
- return
- }
- if (game.persistent_events.includes(86)) {
- game.vm_event = 87
- game.state = 'vm_common_european_home_play'
- } else {
- permanently_remove(87)
- vm_return()
- }
-
-}
-
-function vm_kremlin_coup() {
- log('-3 VP')
- game.vp -= 3
- if (check_vp()) {
- return
- }
- game.support_check_modifier = 1
- //countries = ['Poland', 'Hungary', 'East_Germany', 'Bulgaria', 'Czechoslovakia', 'Romania']
- //revolutions: {'East_Germany': false, 'Poland': false, 'Czechoslovakia': false, 'Hungary': false, 'Romania': false, 'Bulgaria': false}
- game.temp = []
- countries.forEach(country => {
- if (!game.revolutions[find_country_index(country)]) {
- game.temp.push(country)
- }
- })
- console.log('game.temp', game.temp)
- game.state = 'vm_kremlin_coup_choose_country'
-}
-
-function vm_laszlo_tokes() {
- game.persistent_events.push(73)
- game.playable_cards.push(107)
- game.state = 'vm_laszlo_tokes'
-}
-
-function vm_legacy_of_martial_law() {
- game.vm_available_ops = 1
- game.state = 'vm_switch_infl'
-}
-
-function vm_legacy_of_1968() {
- for (let i = 1; i < spaces.length; i++) {
- let space = spaces[i]
- if ((!check_com_control(i) && space.country === 'Czechoslovakia')) {
- game.valid_spaces.push(space.space_id);
- }
- }
- vm_next()
-}
-
-function vm_li_peng() {
- game.persistent_events.push(53)
- //game.table_cards.push(53)
- remove_from_discard(53)
- vm_next()
-}
-
-function vm_ligachev() {
- game.persistent_events.push(99)
- vm_next()
-}
-
-function vm_malta_summit() {
- game.state = 'vm_malta_summit'
-}
-
-function vm_massacre_in_timisoara() {
- game.persistent_events = game.persistent_events.filter(n => n !== 73)
- vm_next()
-}
-
-function vm_modrow() {
- game.playable_cards.push(15)
- game.state = 'vm_modrow'
-}
-
-function vm_nagy_reburied(){
- if (game.comInfl[43] > 0) {
- game.valid_spaces.push(43)
- }
- vm_next()
-}
-
-function vm_national_salvation_front() {
- game.persistent_events.push(102)
- game.table_cards.push(102)
- remove_from_discard(102)
- vm_next()
-}
-
-function vm_nepotism() {
- game.state = 'vm_nepotism'
-}
-
-function vm_new_years_eve_party() {
- game.state = 'vm_new_years_eve_party'
-}
-
-function vm_nomenklatura() {
- game.state = 'vm_nomenklatura'
-}
-
-function vm_normalisation() {
- if (game.demInfl[27] >0) {game.valid_spaces.push(27)}
- if (game.demInfl[29] > 0) {game.valid_spaces.push(29)}
- game.remove_opponent_infl = true
- vm_next()
-}
-
-function vm_peasant_parties_revolt() {
- game.persistent_events.push(72)
- log_msg_gap('C72 in effect')
- game.table_cards.push(72)
- remove_from_discard(72)
- vm_next()
-}
-
-function vm_perestroika() {
- game.persistent_events.push(25)
- log_msg_gap('C25 in effect')
- permanently_remove(25)
- vm_next()
-}
-
-function vm_poszgay() {
- let valid_spaces = []
- for (let space of spaces) {
- if (space && space.country === 'Hungary' && !check_dem_control(space.space_id)) {
- valid_spaces.push(space.space_id);
- }
- }
- game.valid_spaces = valid_spaces
- vm_next()
-}
-
-function vm_power_struggle() {
- console.log('in vm_power_struggle. game.vm_event', game.vm_event, 'game.active', game.active, 'game.view_opp_hand', game.view_opp_hand)
- game.is_pwr_struggle = true
-
- /* TO DELETE?
- //Check if Power Struggle is because of an event
- */
-
- if (game.vm_event > 0) {
- console.log('vm_power_struggle, in game.vm_event check')
- game.pwr_struggle_in = countries[scoring_cards.indexOf(game.vm_event)]
- log_h2(`C${game.vm_event}`)
- }
-/*
- //Otherwise set Power Struggle country normally
- else {
- console.log('vm_power_struggle, country set normally')
- game.pwr_struggle_in = countries[scoring_cards.indexOf(game.played_card)]
- log_h2(`C${game.played_card}`)
- }*/
-
-
- //Check for Securitate
- if (game.pwr_struggle_in === 'Romania' && game.persistent_events.includes(70)) {
- console.log('in Securitate subcheck')
- log('C70: Democrat reveals Power Struggle cards')
- game.view_opp_hand = true
- }
- log_h2('Deal Cards')
- game.state = 'draw_power_cards'
- console.log('game.state',game.state)
-}
-
-function vm_presidential_visit() {
- game.persistent_events.push(65)
- //game.table_cards.push(65)
- //remove_from_discard(65)
- log_msg_gap('C65 in effect')
- vm_next()
-}
-
-function vm_prudence() {
- if (!game.prudence) {
- game.prudence = {DEM: 0, COM: 0}
- }
- if (game.active === DEM) {
- game.prudence.COM --
- log(`${game.prudence.COM} to Communist ops this turn`)
- } else {
- game.prudence.DEM --
- log(`${game.prudence.DEM} to Democrat ops this turn`)}
- vm_next()
-}
-
-function vm_public_against_violence() {
- game.valid_spaces = []
- if (game.comInfl[34] > 0 ) {game.valid_spaces.push(34)}
- vm_next()
-}
-
-function vm_reformer_rehabilitated () {
- permanently_remove(67)
- game.discard = true
- for (let card of game.strategy_discard) {
- if (card === game.played_card) continue
- if (game.table_cards.includes(card)) continue
- if (scoring_cards.includes(card)) continue
-
- game.valid_cards.push(card)
- }
- game.state = 'vm_play_event_from_discard'
-}
-
-function vm_roundtable_talks() {
- game.persistent_events.push(17)
- game.table_cards.push(17)
- remove_from_discard(17)
- log_msg_gap('C17 in effect')
- vm_next()
-}
-
-function vm_sajudis_check() {
- if (!check_dem_control(56)) {
- game.valid_spaces.push(56)
- }
- if (!check_dem_control(70)) {
- game.valid_spaces.push(70)
- }
- vm_next()
-}
-
-function vm_sajudis() {
- game.playable_cards.push(81)
- game.stability++
- log('+1 VP')
- game.vp++
- if (check_vp()) {
- return
- }
- vm_next()
-}
-
-function vm_samizdat() {
- game.state = 'vm_samizdat'
-}
-
-function vm_securitate() {
- game.persistent_events.push(70)
- permanently_remove(70)
- //game.table_cards.push(70)
- vm_next()
-}
-
-function vm_shock_therapy() {
- game.state = 'vm_shock_therapy'
-}
-
-function vm_social_democratic_platform_adopted() {
- game.state = 'vm_social_democratic_platform_adopted'
-}
-
-function vm_solidarity_legalised() {
- log_msg_gap(`C2 in effect`)
- game.playable_cards.push(3)
- game.persistent_events.push(2)
- console.log('game.persistent_events', game.persistent_events)
- vm_next()
-}
-
-function vm_st_nicholas_church () {
- game.persistent_events.push(24)
- game.playable_cards.push(61)
- permanently_remove(24)
- vm_next()
-}
-
-function vm_stasi() {
- log_msg_gap('C13 in effect')
- game.persistent_events.push(13)
- vm_next()
-}
-
-function vm_stand_fast() {
- game.persistent_events.push(100)
- if (game.active === DEM) {
- game.stand_fast = DEM
- } else {game.stand_fast = COM}
- //game.table_cards.push(100)
- vm_next()
-}
-
-function vm_systematization() {
- game.state = 'vm_systematization'
-}
-
-function vm_tank_column() {
- if (game.active === DEM) {
- game.dem_tst_position++
- game.dem_tst_attempted = 0
- } else {
- game.com_tst_position++
- game.com_tst_attempted = 0
- }
- vm_next()
-}
-
-function vm_tear_gas () {
- game.persistent_events.push(30)
- game.table_cards.push(30)
- remove_from_discard(30)
- log_msg_gap('C30 in effect')
- vm_next()
-}
-
-function vm_the_baltic_way() {
- game.playable_cards.push(84)
- game.stability++
- if (!check_dem_control(56) && game.systematization !== 56) {game.valid_spaces.push(56)}
- if (!check_dem_control(70) && game.systematization !== 70) {game.valid_spaces.push(70)}
- log('+3 VP')
- game.vp += 3
- if (check_vp()) {
- return
- }
- console.log('game.state', game.state)
- vm_next()
-}
-
-function vm_the_chinese_solution() {
- game.state = 'vm_the_chinese_solution'
-}
-
-function vm_the_crowd_turns_against_ceausescu() {
- game.table_cards.push(54)
- remove_from_discard(54)
- game.playable_cards.push(97)
- vm_next()
-}
-
-function vm_the_monday_demonstrations() {
- if (!check_dem_control(6)) {game.valid_spaces.push(6)}
- if (!check_dem_control(9)) {game.valid_spaces.push(9)}
- vm_next()
-}
-
-function vm_the_sinatra_doctrine() {
- game.persistent_events.push(50)
- log_msg_gap('C50 in effect')
- vm_next()
-}
-
-function vm_the_third_way() {
- log('-2VP')
- vm_next()
-}
-
-function vm_the_tyrant_is_gone() {
- game.valid_spaces = []
- for (let i = 1; i < spaces.length; i++) {
- let space = spaces[i]
- if (game.demInfl[i] === 0 && space.country === 'Romania') {
- if (space.space_id === game.systematization) {continue}
- game.valid_spaces.push(space.space_id)
- }
- }
- /*game.playable_cards[10].playable = 0
- game.playable_cards[41].playable = 0
- game.playable_cards[101].playable = 0
- game.playable_cards[107].playable = 0*/
- console.log('game.vm_event', game.vm_event, 'game.played_card', game.played_card)
- game.state = 'vm_the_tyrant_is_gone'
-}
-
-
-function vm_the_tyrant_is_gone_prep() {
- game.table_cards.push(97)
- remove_from_discard(97)
- vm_next()
-}
-
-function vm_the_wall () {
- game.persistent_events.push(9)
- //game.strategy_removed.push(9)
- //game.table_cards.push(9)
- log_msg_gap('C9 in effect')
- vm_next()
-}
-
-function vm_the_wall_must_go() {
- game.the_wall_must_go = {}
- game.the_wall_must_go['dem_wins'] = 0
- game.the_wall_must_go['com_wins'] = 0
- game.the_wall_must_go['dem_roll'] = 0
- game.the_wall_must_go['com_roll'] = 0
- game.state = 'vm_the_wall_must_go'
-}
-
-function vm_warsaw_pact_summit() {
- game.warsaw_pact_summit = true /*What does this do? */
- game.state = 'vm_warsaw_pact_summit'
-}
-
-function vm_we_are_the_people() {
- if (game.demInfl[6] > 0) {game.valid_spaces = [6]}
- game.persistent_events.push(48)
- if (!game.vm_influence_added) {
- game.vm_influence_added = {};
- }
- game.vm_influence_added[6] = 0
- game.vm_available_ops = 4
- game.state = 'vm_we_are_the_people_remove'
-}
-
-function vm_workers_revolt() {
- if (game.active === DEM) {
- for (let space of spaces) {
- if (!space) continue
- let country = space.country
- if (!game.revolutions[find_country_index(country)] && game.comInfl[space.space_id] > 0 && space.socio === 4) {
- game.valid_spaces.push(space.space_id);
- }
- }
- } else {
- for (let space of spaces) {
- if (!space) continue
- let country = space.country
- if (game.revolutions[find_country_index(country)] && game.demInfl[space.space_id] > 0 && space.socio === 4) {
- game.valid_spaces.push(space.space_id);
- }
- }
- }
- game.state = 'vm_workers_revolt'
-}
-
-function vm_yakovlev_counsels_gorbachev() {
- game.persistent_events.push(62)
- log_msg_gap('C62 in effect')
- game.table_cards.push(62)
- remove_from_discard(62)
- vm_next()
-}
-
-function vm_permanently_remove () {
- // Check if the event is being played as the result of another card, e.g. Dash for the West, is a card which should be removed, and which hasn't already been removed!
- if (game.vm_event !== 0 && cards[game.vm_event].remove === 1 && !game.strategy_removed.includes(game.vm_event)) {
- permanently_remove(game.vm_event)
- }
- if (cards[game.played_card].remove ===1 && !game.strategy_removed.includes(game.played_card)) {
- permanently_remove(game.played_card)
- } /*This means the card that called the event being played is also removed if relevant. Think this makes sense */
- vm_next()
-}
-
-function discarded_card() {
- return game.temp > 0
-}
-
-// =================== TIANANMEN SQUARE TRACK FUNCTIONS ====================
-
-function vm_tst_3() {
- log_gap('Tiananmen Square Track award')
- game.state = 'vm_tst_3_prep'
-}
-
-function vm_tst_4() {
- log_gap('Tiananmen Square Track award')
- game.vm_available_ops = 2
- game.remove_opponent_infl = true
- game.state = 'vm_tst_4'
-}
-function vm_tst_6() {
- log_h3('Tiananmen Square Track award')
- game.vm_available_ops = 1
- game.temp = 1 //Set temp to 1, so that Card 1 is called during the support check, which has 2 ops
- game.state = 'vm_tst_6'
-}
-
-function vm_tst_8() {
- game.state = 'vm_goodbye_lenin_ops' // Use this to resolve ops.
-}
-
-// ==================== POWER STRUGGLE FUNCTIONS ======================
-
-function vm_scare_tactics() {
- game.vm_active_country = game.pwr_struggle_in
- vm_next()
-}
-function vm_support_surges() {
- game.state = 'vm_support_surges'
-}
-
-function vm_support_falters() {
- game.vm_available_ops = 2
- game.return === game.active
- game.state = 'vm_support_falters'
-}
-
-function vm_kremlin_coup_elite() {
- game.valid_spaces=[]
- elite_spaces.forEach(space => {
- if (spaces[space].country === game.vm_active_country && !check_com_control(space)) {
- game.valid_spaces.push(space);
- }
- })
- game.state = 'vm_kremlin_coup_take_control'
-}
-
-/* ================== VM STATES ============================== */
-
-states.vm_take_control = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt () {
- console.log('game.vm_available_ops', game.vm_available_ops)
- if (game.vm_available_ops > 0 && game.valid_spaces.length === 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: all spaces controlled. Continue.`
- gen_action('done')
- } else if (game.vm_available_ops > 0 ) {
- view.prompt = `${clean_name(cards[this_card()].name)}: take control of ${event_prompt()}.`
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique);
- }
- } else {
- view.prompt = `${clean_name(cards[this_card()].name)}. Take control: done.`
- gen_action('done')
- }
- },
- infl(space) {
- push_undo()
- vm_take_control(space)
- game.vm_available_ops--
- if (game.vm_available_ops === 0) {
- vm_next()
- }
- },
- done() {
- vm_next()
- }
-}
-
-states.vm_add_infl = {
- inactive: 'add Support Points.',
- prompt () {
- console.log('in vm add infl')
- if (game.vm_available_ops > 0 && game.valid_spaces.length === 0 ) {
- view.prompt = 'No available spaces remaining. Add SPs: done.'
- gen_action('done')
- }
- else if (game.vm_available_ops > 0 ) {
- view.prompt = `${clean_name(cards[this_card()].name)}: add ${pluralize(game.vm_available_ops,'SP')}${event_prompt()}.`
-
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique)
- }
- } else {
- view.prompt = 'Add SP: done.'
- gen_action('done')
- }
- },
- infl(space) {
- vm_do_add_infl(space)
- },
- done () {
- if (game.summary.length > 0) {
- pop_summary()
- log_br()
- }
-
- game.vm_event_done = true
- vm_next()
- }
-}
-
-states.vm_add_infl_free = {
- get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}: add SPs.`
- },
- prompt () {
- if (game.vm_available_ops > 0 && game.valid_spaces.length === 0 ) {
- view.prompt = 'No available spaces remaining. Add SPs: done.'
- gen_action('done')
- }
- else if (game.vm_available_ops > 0 ) {
- view.prompt = `${clean_name(cards[this_card()].name)}: add ${game.vm_available_ops} SPs to ${event_prompt()}.`
-
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique);
- }
- } else {
- view.prompt = `${clean_name(cards[this_card()].name)}. Add influence: done.`
- gen_action('done')
- }
- },
- infl(space) {
- vm_do_add_infl_free(space)
- /*if (game.vm_available_ops === 0 ) {
-
- }*/
- },
- done () {
- game.valid_spaces = []
- game.vm_event_done = true
- if (game.summary.length > 0) {
- pop_summary()
- log_br()
- }
- vm_next()
- }
-}
-
-states.vm_add_x_infl = {
- get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}: add Support Points.`
- },
-// inactive: `resolve ${cards[this_card()].name}: add influence.`,
- prompt () {
- if (game.vm_available_ops > 0 ) {
- view.prompt = `${clean_name(cards[this_card()].name)}: Add ${game.vm_available_ops} SPs to ${event_prompt()}.`
-
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique)
- }
- } else {
- view.prompt = `${clean_name(cards[this_card()].name)}. Add influence: done.`
- gen_action('done')
- }
- },
- infl(space) {
- push_undo()
- vm_do_add_x_infl(space)
- //game.vm_event_done = true
- //vm_next()
- },
- done () {
- game.vm_event_done = true
- vm_next()
- }
-}
-
-states.vm_add_limited_infl = {
- get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}: add Support Points.`
- },
- prompt () {
- if (game.vm_available_ops > 0 && game.valid_spaces.length > 0) {
- if (game.vm_max_infl === 1) {
- view.prompt = `${clean_name(cards[this_card()].name)}: add ${pluralize(game.vm_max_infl,'SP')} ${event_prompt()}.`
- }
- else {
- view.prompt = `${clean_name(cards[this_card()].name)}: add ${pluralize(game.vm_available_ops,'SP')} to ${event_prompt()}.`
- }
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique);
- }
- } else {
- view.prompt = `${clean_name(cards[this_card()].name)}. Add SPs: done.`
- gen_action('done')
- }
- },
- infl(space) {
- vm_do_add_limited_infl(space, game.vm_max_infl)
- /*if (game.vm_available_ops === 0 || game.valid_spaces.length === 0) {
- game.vm_event_done = true
- if (game.summary.length > 0) {
- pop_summary()
- log_br()
- }
- vm_next()
- }*/
- /*if (game.vm_available_ops === 0 || game.valid_spaces.length === 0 ) {
- if (game.summary.length > 0) {
- pop_summary()
- log_br()
- }
- game.vm_event_done = true
- vm_next()
- }*/
- },
- done () {
- if (game.summary.length > 0) {
- pop_summary()
- log_br()
- }
- game.vm_event_done = true
- vm_next()
- }
-}
-
-states.vm_remove_infl = {
- inactive: 'remove Support Points.',
- prompt () {
- // Keep this so that there is an undo option in, e.g., Scare Tactics
- if (game.valid_spaces.length === 0 && game.vm_available_ops > 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: no further SPs to remove.`
- gen_action('done')
- return
- }
- if (game.vm_available_ops === 0 ) {
- view.prompt = `${clean_name(cards[this_card()].name)}. Remove SPs: done.`
- gen_action('done')
- return
- }
- if (game.remove_opponent_infl) {
- view.prompt = `${clean_name(cards[this_card()].name)}: remove ${pluralize(game.vm_available_ops, 'opponent SP')}${event_prompt()}.`
- }
- else {
- view.prompt = `${clean_name(cards[this_card()].name)}: remove ${pluralize(game.vm_available_ops,'SP')}${event_prompt()}.`
- }
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique);
- }
- },
- infl(space) {
- push_undo()
- vm_do_remove_infl(space)
- const clicked_space = find_space_index(space)
- game.vm_active_country = spaces[clicked_space].country
- /*if (game.vm_available_ops === 0 || game.valid_spaces.length === 0) {
- vm_next()
- }*/
- },
- done() {
- if (game.summary.length > 0) {
- pop_summary()
- log_br()
- }
- vm_next()
- }
-}
-
-
-states.vm_remove_x_infl = {
- get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}: remove SP from ${event_prompt()}.`
- },
- prompt () {
- if (game.valid_spaces.length === 0 && game.vm_available_ops > 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: no SPs to remove.`
- gen_action('done')
- } else if (game.vm_available_ops > 0) {
-
- view.prompt = `${clean_name(cards[this_card()].name)}: remove ${pluralize(game.vm_available_ops,'SP')} from ${event_prompt()}.`
-
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique);
- }
- } else {
- view.prompt = `${clean_name(cards[this_card()].name)}. Remove influence: done.`
- gen_action('done')
- }
- },
- infl(space) {
- vm_do_remove_x_infl(space)
- /*game.vm_event_done = true
- vm_next()*/
- },
- done () {
- game.vm_event_done = true
- vm_next()
- }
-}
-
-states.vm_remove_limited_infl = {
- inactive: 'remove SP.',
- prompt () {
- if (game.vm_available_ops > 0 && game.valid_spaces.length > 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: remove ${game.vm_available_ops} SP${event_prompt()}, no more than ${game.vm_max_infl} per space.`
-
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique);
- }
- } else if (game.valid_spaces.length === 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: no further SP to remove.`
- gen_action('done')
- }
- },
- infl(space) {
- vm_do_remove_limited_infl(space, game.vm_max_infl)
- /*if (game.vm_available_ops === 0) {
- game.vm_event_done = true
- } */
- },
- done () {
- game.vm_event_done = true
- if (game.summary.length > 0) {
- pop_summary()
- log_br()
- }
- vm_next()
- }
-}
-
-states.vm_remove_all_infl = {
- inactive: 'remove Support Points',
- prompt () {
- if (game.valid_spaces.length === 0 && game.vm_available_ops > 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: no SPs to remove.`
- gen_action('done')
- } else if (game.vm_available_ops > 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: remove all SPs from ${event_prompt()}.`
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique);
- }
- } else {
- view.prompt = `${clean_name(cards[this_card()].name)}. Remove SPs: done.`
- gen_action('done')
- }
- },
- infl(space) {
- vm_do_remove_all_infl(space)
- const clicked_space = find_space_index(space)
- game.vm_active_country = spaces[clicked_space].country
- /*if (game.vm_available_ops === 0 || game.valid_spaces.length === 0) {
- vm_next()
- }*/
- },
- done() {
- vm_next()
- }
-}
-
-states.vm_support_check_prep = {
- inactive: 'do support checks.',
- prompt () {
- console.log('in states.vm_support_check_prep, game.vm_available_ops: ', game.vm_available_ops)
- if (game.vm_available_ops === 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}. Support check: done.`
- gen_action('done')
- } else if (game.valid_spaces.length === 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: no valid targets for support check.`
- gen_action('done')
- } else {
- if (game.vm_available_ops > 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: ${event_prompt()}. ${pluralize(game.vm_available_ops, 'support check')} remaining.`
- }
- for (let space_id of game.valid_spaces) {
- if (!space_id) continue
- gen_action_sc(spaces[space_id].name_unique);
- }
- }
- },
- sc(space) {
- push_undo()
- game.selected_space = find_space_index(space)
-
- // Check for Austria-Hungary Border Reopened - check on first support check only
- //First check for Monday Demonstrations - support checks will always be in East Germany
- if (game.vm_event === 61 && game.persistent_events.includes(58)) {
- game.austria_hungary_border_reopened_tracker = true
- game.state = 'vm_do_support_check'
- return
- }
-
- //Then check Austria-Hungary Border Reopened normally
- //console.log('game.austria_hungary_border_reopened_checked', game.austria_hungary_border_reopened_checked)
- if (game.persistent_events.includes(58)) {
- if (game.active === DEM && game.vm_available_ops > 1) {
- if (spaces[game.selected_space].country === 'East_Germany' && game.persistent_events.includes(58) && game.active === DEM) {
- game.state = 'vm_austria_hungary_border_reopened_check'
- return
- }
- //game.state = 'do_support_check'
- } /*else { */
- }
- game.state = 'vm_do_support_check'
- },
- done () {
- game.vm_available_ops = 0
- vm_next ()
- }
-}
-
-states.vm_ceh_support_check_prep = {
- inactive: 'do support checks.',
- prompt () {
- if (game.vm_available_ops === 0) {
- view.prompt = 'Support checks: done.'
- gen_action('done')
- //return
- }
- if (game.vm_available_ops > 0) {
- view.prompt = `Select a space. ${pluralize(game.vm_available_ops, 'support check')} remaining.`
-
- for (let space_id of game.valid_spaces) {
- gen_action_sc(spaces[space_id].name_unique)
- }
- }
- },
- sc(space) {
- push_undo()
- game.selected_space = find_space_index(space)
-
- //Then check Austria-Hungary Border Reopened normally
- //console.log('game.austria_hungary_border_reopened_checked', game.austria_hungary_border_reopened_checked)
- if (game.persistent_events.includes(58)) {
- if (game.active === DEM && game.vm_available_ops > 1) {
- console.log('in ahb check, country, ', spaces[game.selected_space].country, 'ahb', game.persistent_events.includes(58))
- if (spaces[game.selected_space].country === 'East_Germany' && game.persistent_events.includes(58) && game.active === DEM) {
- game.state = 'vm_austria_hungary_border_reopened_check'
- return
- }
- //game.state = 'do_support_check'
- } /*else { */
- }
- game.state = 'vm_ceh_do_support_check'
- },
- done () {
- vm_next ()
- }
-}
-
-
-states.vm_ceh_do_support_check = {
- inactive: 'do support checks.',
- prompt () {
- view.prompt = `Support check: ${spaces[game.selected_space].name_unique}. Roll a die.`
- gen_action('roll')
- },
- roll() {
- clear_undo()
- do_sc(spaces[game.selected_space].name_unique)
-
- game.vm_available_ops--
- if (game.vm_available_ops === 0) {
- game.valid_spaces = []
- }
- game.state = 'vm_ceh_support_check_prep'
- return
- }
-}
-
-states.vm_austria_hungary_border_reopened_check = {
- inactive: 'decide Austria-Hungary Border Reopened',
- prompt() {
- view.prompt = 'Austria-Hungary Border Reopened: will all support checks be in East Germany?'
- gen_action('yes')
- gen_action('no')
- },
- yes() {
- game.austria_hungary_border_reopened_tracker = true
- game.state = 'vm_do_support_check'
- },
- no() {
- game.state = 'vm_do_support_check'
- }
-}
-
-states.vm_1_support_check_prep = {
- inactive: 'do support checks.',
- prompt () {
- if (game.vm_available_ops === 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}. Support check: done.`
- gen_action('done')
- } else if (game.valid_spaces.length === 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: no valid targets for support check.`
- gen_action('done')
- } else {
- view.prompt = `${clean_name(cards[this_card()].name)}: ${event_prompt()}.`
-
- for (let space_id of game.valid_spaces) {
- if (!space_id) continue
- gen_action_sc(spaces[space_id].name_unique);
- }
- }
- },
- sc(space) {
- push_undo()
- game.selected_space = find_space_index(space)
- game.state = 'vm_do_support_check'
- },
- done () {
- game.vm_available_ops = 0
- vm_next ()
- }
-}
-
-states.vm_do_support_check = {
- inactive: 'do support checks.',
- prompt () {
- view.prompt = `Support check: ${spaces[game.selected_space].name_unique}. Roll a die.`
- gen_action('roll')
- },
- roll() {
- clear_undo()
- do_sc(spaces[game.selected_space].name_unique)
- game.vm_available_ops--
- if (game.vm_available_ops === 0) {
- game.valid_spaces = []
- }
- game.state = 'vm_support_check_prep'
- return
- }
-}
-
-states.vm_tiananmen_square_attempt = {
- inactive: 'do Tiananmen Square',
- prompt () {
- if (game.active === DEM && game.dem_tst_attempted_this_turn > 0 || game.active === COM && game.com_tst_attempted_this_turn > 0) {
- view.prompt = 'Tiananmen Square Track attempt: done.'
- gen_action('done')
- return
- }
- view.prompt = 'Roll a die'
- gen_action('roll')
- },
- roll() {
- clear_undo()
- do_tst_attempt ()
- },
- done () {
- vm_next()
- }
-}
-
-//================================== EVENT SPECIFIC STATES ======================================
-
-states.vm_adamec = {
- get inactive() {
- return `resolve ${clean_name(cards[88].name)}.`
- },
- prompt() {
- view.prompt = 'Adamec: roll a die.'
- gen_action('roll')
- },
- roll() {
- clear_undo()
- let roll = Math.floor(Math.random() * 6) + 1
- log(`Rolled a ${roll}`)
- let worker_spaces = spaces.filter(space => space && space.country === 'Czechoslovakia' && space.socio === 4 && check_dem_control(space.space_id)).length
- if (worker_spaces > 0) {
- log(`-${worker_spaces} from Democrat controlled worker spaces`)
- roll -= worker_spaces
- }
- log(`Modified roll: ${roll}`)
- if (roll > 2) {
- log('Adamec succeeds')
- vm_next()
- return
- }
- log('Adamec fails: 3 or more required')
- permanently_remove(88)
- vm_return()
- }
-}
-
-states.vm_brought_in_for_questioning = {
- inactive: 'discard a card.',
- prompt() {
- if (game.phase === 1) {
- view.prompt = 'Discard a card: done.'
- gen_action('done')
- } else if (game.democrat_hand.length === 0) {
- view.prompt = 'Brought in for Questioning. No cards to discard.'
- gen_action('pass')
- } else {
- view.prompt = 'Brought in for Questioning: you must discard a random card.'
- gen_action('discard')
- }
- },
- discard() {
- game.vm_event = discard_card(game.democrat_hand)
- game.phase = 1
- if (cards[game.vm_event].side === 'C' && (cards[game.vm_event].playable || game.playable_cards.includes(game.vm_event))) {
- //game.return = game.active
- if (!game.vm_infl_to_do) {
- if(game.round_player === DEM) {
- game.return = COM
- } else {
- game.return = DEM
- }
- }
- console.log('BIFQ discard: game.return', game.return)
- if (!auto_resolve_events.includes(game.vm_event) && !switch_events.includes(game.vm_event)) {
- next_player()
- }
- goto_vm(game.vm_event)
- } else {
- game.return = DEM
- }
- },
- pass() {
- log('No cards to discard')
- vm_return()
- },
- done() {
- vm_return()
- }
-}
-
-states.vm_central_committee_reshuffle = {
- get inactive() {
- return `resolve ${clean_name(cards[57].name)}.`
- },
- prompt() {
- view.prompt = 'Choose a country to add SP.'
- if (!game.revolutions[0]) {gen_action('poland')}
- if (!game.revolutions[1]) {gen_action('hungary')}
- if (!game.revolutions[2]) {gen_action('east_germany')}
- if (!game.revolutions[3]) {gen_action('bulgaria')}
- if (!game.revolutions[4]) {gen_action('czechoslovakia')}
- if (!game.revolutions[5]) {gen_action('romania')}
- },
- east_germany() {
- game.vm_active_country = "East_Germany"
- log(`Chose ${country_name(game.vm_active_country)}`)
- game.valid_spaces = [1,2,3,4,5,6,7,8,9,10,11,12]
- vm_next()
- },
- poland() {
- game.vm_active_country = "Poland"
- log(`Chose ${country_name(game.vm_active_country)}`)
- game.valid_spaces = [13,14,15,16,17,18,19,20,21,22,23,24,25,26]
- vm_next()
- },
- czechoslovakia() {
- game.vm_active_country = "Czechoslovakia"
- log(`Chose ${country_name(game.vm_active_country)}`)
- game.valid_spaces = [27,28,29,30,31,32,33,34,35,36,37]
- vm_next()
- },
- hungary() {
- game.vm_active_country = "Hungary"
- log(`Chose ${country_name(game.vm_active_country)}`)
- game.valid_spaces = [38,39,40,41,42,43,44,45,46,47,48,49]
- vm_next()
- },
- romania() {
- game.vm_active_country = "Romania"
- log(`Chose ${country_name(game.vm_active_country)}`)
- game.valid_spaces = [50,51,52,53,54,55,56,57,58,59,60,61,62,63]
- game.valid_spaces = game.valid_spaces.filter(space => space !== game.systematization)
- vm_next()
- },
- bulgaria () {
- game.vm_active_country = "Bulgaria"
- log(`Chose ${country_name(game.vm_active_country)}`)
- game.valid_spaces = [64,65,66,67,68,69,70,71,72,73,74,75]
- vm_next()
- },
-
-}
-
-states.vm_common_european_home_choose = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- view.prompt = `Common European Home: play an opponent's card, event does not occur.`
- for (let card of game.valid_cards) {
- gen_action_card(card)
- }
- },
- card(card) {
- push_undo()
- log(`Played with C${cards[card].number}`)
- game.valid_cards = []
- silent_discard(card)
- game.vm_event = card
- game.state = 'vm_common_european_home_play'
- }
-}
-
-states.vm_common_european_home_play = {
- get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}.`
- },
- prompt() {
- view.prompt = `Play ${clean_name(cards[this_card()].name)} for:`
- gen_action('influence')
- gen_action('support_check')
- if (game.active === DEM && game.vm_event === 87 ) {
- return /*Special condition if card is actually Kohl Proposes Reunification*/
- }
- if (game.active === DEM && game.dem_tst_attempted_this_turn === 0 || game.active === COM && game.com_tst_attempted_this_turn === 0) {
- gen_action('tst')
- }
- },
- influence(){
- push_undo()
- game.vm_available_ops = cards[game.vm_event].ops
- valid_spaces_infl()
- // If ABHR - Set AHBR tracker to true
- if (game.persistent_events.includes(58)) {
- game.austria_hungary_border_reopened_tracker = true
- }
- game.state = 'vm_add_infl'
- },
- support_check() {
- push_undo()
- game.vm_available_ops = 2
- game.state = 'vm_ceh_support_check_prep'
- valid_spaces_sc()
- },
- tst() {
- game.state = 'vm_tiananmen_square_attempt'
- }
-}
-
-states.vm_dash_for_the_west = {
- get inactive() {
- return `resolve ${clean_name(cards[36].name)}.`
- },
- prompt() {
- /* if (game.phase === 1) {*/
- view.prompt = 'Dash for the West: roll a die'
- gen_action('roll')
- /*} else {
- view.prompt = 'Dash for the West: roll a die. Done.'
- gen_action('done')
- }*/
- },
- roll() {
- clear_undo()
- let roll = Math.floor(Math.random() * 6) + 1
- log(`Rolled a ${roll}`)
- let com_control = check_presence('East_Germany').com_spaces
-
- if (roll > com_control) {
- log(`Success. More than the ${com_control} Communist controlled spaces in East Germany`)
- log('+1 VP')
- game.vp++
- if (check_vp()) {
- return
- }
- game.discard = true
- game.state = 'vm_play_event_from_discard'
- } else {
- log(`Fail: more than a ${com_control} required`)
- //game.phase++
- vm_next()
- }
- },/*
- done() {
- vm_next()
- }*/
-}
-
-states.vm_play_event_from_discard = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- if (game.valid_cards.length === 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: no valid cards in discard.`
- gen_action('pass')
- } else if (game.temp === 0) {
- view.prompt = `${event_prompt()}.`
- for (let card of game.valid_cards) {
- gen_action('pass')
- gen_action_card(card)
- }
- } else {
- view.prompt = 'Choose a card: done.'
- gen_action('done')
- }
- },
- card(card) {
- push_undo()
- log(`Chose C${cards[card].number}`)
- game.vm_event = card
- game.vm_available_ops = cards[card].ops
- game.discard = false
- //game.return = game.active Does turning this off cause problems?
- console.log('card:', card)
- if (switch_events.includes(card)) {next_player()}
- goto_vm(card)
- },
- pass(){
- push_undo()
- if (game.valid_cards.length === 0) {
- log('No valid cards to choose')
- } else{
- log('Did not choose a card')
- }
- vm_next()
- },
- done(){
- game.discard = false
- vm_next()
- }
-}
-
-states.vm_deutsche_marks_prep = {
- inactive: 'choose a card.',
- prompt() {
- if (game.valid_cards.length === 0) {
- view.prompt = 'Deutsche Marks: no cards to give.'
- gen_action('pass')
- } else {
- view.prompt = 'Deutsche Marks: choose a card to give.'
- for (let card of game.valid_cards) {
- gen_action_card(card)
- }
- }
- },
- card(card) {
- push_undo()
- log(`Gave C${cards[card].number}`)
- game.valid_cards = []
- silent_discard(card)
- //next_player()
- game.state = 'vm_deutsche_marks_confirm'
- game.vm_event = card
- },
- pass() {
- vm_next()
- }
-}
-
-states.vm_deutsche_marks_confirm = {
- inactive: 'choose a card.',
- prompt() {
- view.prompt = `Deutsche Marks: gave ${cards[game.vm_event].name}.`
- gen_action('done')
- },
- done() {
- next_player()
- game.state = 'vm_deutsche_marks'
- }
-}
-
-states.vm_deutsche_marks = {
- get inactive() {
- return `resolve ${clean_name(cards[20].name)}.`
- },
- prompt() {
- if(cards[game.vm_event].side === 'C' && (cards[game.vm_event].playable || game.playable_cards.includes(game.vm_event))) {
- view.prompt = `Deutsche Marks: you must play ${clean_name(cards[this_card()].name)} for the event.`
- gen_action('event')
- } else {
- view.prompt = `Deutsche Marks: play ${clean_name(cards[this_card()].name)} for:`
- gen_action('influence')
- gen_action('support_check')
- if (game.com_tst_attempted_this_turn === 0) {
- gen_action('tst')
- }
- }
- },
- event() {
- log(`Played C${cards[game.vm_event].number} for the event`)
- console.log('game.active', game.active)
- if (!game.vm_infl_to_do) {
- game.return = game.active
- }
- console.log('DM Event played, game.return', game.return)
- goto_vm(game.vm_event)
- },
- influence() {
- push_undo()
- log(`Played C${cards[game.vm_event].number} to place SPs`)
- game.vm_available_ops = get_card_ops(game.vm_event)
-
- /*cards[game.vm_event].ops
- if (game.persistent_events.includes(25)) {game.vm_available_ops++ }
- if (game.prudence.COM && game.prudence.COM < 0 ) {
- game.vm_available_ops += game.prudence.COM
- }*/
- valid_spaces_infl()
- game.state = 'vm_add_infl'
- },
- support_check() {
- push_undo()
- log_gap(`Played C${cards[game.vm_event].number} for support checks`)
- game.vm_available_ops = 2
- game.state='vm_support_check_prep'
- valid_spaces_sc()
- },
- tst() {
- push_undo()
- log_gap(`Played C${cards[game.vm_event].number} to the Tiananmen Square Track`)
- game.state='vm_tiananmen_square_attempt'
- }
-}
-
-states.vm_exit_visas = {
- get inactive() {
- return `resolve ${clean_name(cards[75].name)}.`
- },
- prompt() {
- view.prompt = 'Exit Visas: you may discard cards from your hand and draw replacements.'
- for (let card of game.democrat_hand) {
- gen_action_card(card)
- }
- if (game.temp === 0) {
- gen_action('pass')
- } else {
- gen_action('done')
- }
- },
- card(card){
- push_undo()
- discard(card)
- game.temp++
- },
- pass() {
- push_undo()
- game.state = 'vm_exit_visas_finish'
- },
- done() {
- push_undo()
- game.state = 'vm_exit_visas_finish'
- }
-}
-
-states.vm_exit_visas_finish = {
- get inactive() {
- return `resolve ${clean_name(cards[75].name)}.`
- },
- prompt() {
- if (game.temp > 0 ) {
- view.prompt = 'Draw replacement cards.'
- gen_action('draw')
- } else {
- view.prompt = 'Exit Visas: done.'
- gen_action('done')
- }
- },
- draw() {
- clear_undo()
- draw_cards(game.strategy_deck, game.democrat_hand, game.communist_hand, game.democrat_hand.length + game.temp, game.communist_hand.length)
- game.temp = 0
- },
- done() {
- vm_next()
- }
-}
-
-states.vm_foreign_currency_debt_burden = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- view.prompt = 'Choose a country. The Communist may not make support checks there for the rest of the turn.'
- gen_action('east_germany')
- gen_action('poland')
- gen_action('czechoslovakia')
- gen_action('hungary')
- gen_action('bulgaria')
- },
- east_germany() {
- push_undo()
- game.foreign_currency_debt_burden = 'East_Germany'
- log('Selected East Germany')
- vm_next()
- },
- poland() {
- push_undo()
- game.foreign_currency_debt_burden = 'Poland'
- log('Selected Poland')
- vm_next()
- },
- czechoslovakia() {
- push_undo()
- game.foreign_currency_debt_burden = 'Czechoslovakia'
- log('Selected Czechoslovakia')
- vm_next()
- },
- hungary() {
- push_undo()
- game.foreign_currency_debt_burden = 'Hungary'
- log('Selected Hungary')
- vm_next()
- },
- bulgaria() {
- push_undo()
- game.foreign_currency_debt_burden = 'Bulgaria'
- log('Selected Bulgaria')
- vm_next()
- }
-}
-
-states.vm_goodbye_lenin = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- console.log('in vm_goodbye lenin')
- if (game.valid_cards.length > 0 ) {
- view.prompt = 'Choose a card to play for the event, or play Goodbye Lenin for operations'
- for (let card of game.valid_cards) {
- gen_action_card(card)
- gen_action('ops')
- }
- } else {
- view.prompt = 'Communist has no valid cards. Play Goodbye Lenin for operations.'
- gen_action('ops')
- }
- },
- card(card) {
- push_undo()
- log(`Chose to play C${card} for the event`)
- let card_index = game.communist_hand.indexOf(card)
- game.communist_hand.splice(card_index, 1)
- game.vm_event = card
- game.view_opp_hand = false
- goto_vm(card)
- },
- ops() {
- log('C46 played for operations')
- game.view_opp_hand = false
- game.state = 'vm_goodbye_lenin_ops'
- }
-}
-
-states.vm_goodbye_lenin_ops = {
- get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}.`
- },
- prompt() {
- view.prompt = `Play ${clean_name(cards[this_card()].name)} for:`
- gen_action('influence')
- gen_action('support_check')
- if ((game.active === DEM && game.dem_tst_attempted_this_turn === 0 ) || (game.active === COM && game.com_tst_attempted_this_turn === 0 )) {
- gen_action('tst')
- }
- },
- influence(){
- push_undo()
- game.vm_available_ops = get_card_ops(this_card())
- /*if (game.persistent_events.includes(50)) {
- log(`+1 from C50`)
- game.vm_available_ops++
- }*/
- console.log('goodbye lenin: influence selected')
- valid_spaces_infl()
-
- // If ABHR - Set AHBR tracker to true
- if (game.persistent_events.includes(58)) {
- game.austria_hungary_border_reopened_tracker = true
- }
- game.state = 'vm_add_infl'
- },
- support_check() {
- push_undo()
- game.vm_available_ops = 2
- game.state = 'vm_support_check_prep'
- valid_spaces_sc()
- },
- tst() {
- game.state = 'vm_tiananmen_square_attempt'
- }
-}
-
-states.vm_honecker = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- if (game.valid_cards.length === 0 && game.temp === 0) {
- view.prompt = 'Honecker: no valid cards to choose.'
- gen_action('done')
- } else
- if (game.temp === 0) {view.prompt = 'Honecker: choose a card to add to your hand.'
- for (let card of game.valid_cards) {
- gen_action_card(card)
- gen_action('pass')
- }
- } else {
- view.prompt = 'Honecker. Choose a card: done.'
- gen_action('done')
- }
- },
- card(card) {
- push_undo()
- game.valid_cards = []
- log(`Took C${cards[card].number} into hand`)
- game.temp = card
- let card_index = game.strategy_discard.indexOf(card)
- game.strategy_discard.splice(card_index, 1)
- game.communist_hand.push(card)
- console.log('removed after honecker', game.strategy_removed)
- },
- pass(){
- log('Did not take a card')
- vm_next()
- },
- done(){
- if (game.temp === 0) {
- log('Did not take a card')
- }
- game.discard = false
- vm_next()
- }
-
-}
-
-states.vm_inflationary_currency = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- console.log('game.revolutions', game.revolutions, 'length', game.revolutions.length)
- if (game.revolutions.every(n => n === false)) {
- view.prompt = 'Inflationary Currency: no countries to choose.'
- gen_action('pass')
- } else {
- view.prompt = 'Inflationary Currency: choose a country where your opponent has power.'
- if (game.active === DEM) {
- if (!game.revolutions[0]) {gen_action('poland')}
- if (!game.revolutions[1]) {gen_action('hungary')}
- if (!game.revolutions[2]) {gen_action('east_germany')}
- if (!game.revolutions[3]) {gen_action('bulgaria')}
- if (!game.revolutions[4]) {gen_action('czechoslovakia')}
- if (!game.revolutions[5]) {gen_action('romania')}
- } else {
- if (game.revolutions[0]) {gen_action('poland')}
- if (game.revolutions[1]) {gen_action('hungary')}
- if (game.revolutions[2]) {gen_action('east_germany')}
- if (game.revolutions[3]) {gen_action('bulgaria')}
- if (game.revolutions[4]) {gen_action('czechoslovakia')}
- if (game.revolutions[5]) {gen_action('romania')}
- }
- }
- },
- east_germany() {
- push_undo()
- game.vm_active_country = 'East_Germany'
- log(`Chose ${country_name(game.vm_active_country)}`)
- vm_next()
- },
- poland() {
- push_undo()
- game.vm_active_country = 'Poland'
- log(`Chose ${country_name(game.vm_active_country)}`)
- vm_next()
- },
- czechoslovakia() {
- push_undo()
- game.vm_active_country = 'Czechoslovakia'
- log(`Chose ${country_name(game.vm_active_country)}`)
- vm_next()
- },
- hungary() {
- push_undo()
- game.vm_active_country = 'Hungary'
- log(`Chose ${country_name(game.vm_active_country)}`)
- vm_next()
- },
- romania() {
- push_undo()
- game.vm_active_country = 'Romania'
- log(`Chose ${country_name(game.vm_active_country)}`)
- vm_next()
- },
- bulgaria () {
- push_undo()
- game.vm_active_country = 'Bulgaria'
- log(`Chose ${country_name(game.vm_active_country)}`)
- vm_next()
- },
- pass() {
- log('Passed')
- vm_return()
- }
-}
-
-states.vm_inflationary_currency_discard = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- if (game.valid_cards.length === 0 ) {
- view.prompt = 'Inflationary Currency: no valid cards to discard. You must pass.'
- gen_action('pass')
- } else if (game.temp === 0 ) {
- view.prompt = 'Inflationary Currency: you may discard a 3 op or higher value card to cancel the support check.'
- gen_action('pass')
- for (let card of game.valid_cards) {
- gen_action_card(card)
- }
- } else {
- view.prompt = 'Discard a card: done.'
- gen_action('done')
- }
- },
- card(card) {
- push_undo()
- discard(card)
- game.temp = card
- },
- pass() {
- log('Did not discard')
- next_player()
- game.vm_available_ops = 1
- vm_next()
- //game.state = 'vm_support_check_prep'
- },
- done() {
- if (!game.vm_infl_to_do) {
- if(game.round_player === DEM) {
- game.return = COM
- } else {
- game.return = DEM
- }
- }
- vm_next()
- }
-}
-
-
-states.vm_kiss_of_death = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- if (game.communist_hand.length === 0) {
- view.prompt = 'Kiss of Death. No cards to discard.'
- gen_action('pass')
- } else {
- view.prompt = 'Kiss of Death: you must randomly discard a card.'
- gen_action('discard')
- }
- },
- discard() {
- game.vm_event = discard_card(game.communist_hand)
- next_player()
- game.state = 'vm_kiss_of_death_finish'
- },
- pass() {
- log('No card to discard')
- vm_next()
- }
-}
-
-states.vm_kiss_of_death_finish = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- console.log('game.vm_event', game.vm_event)
- if (game.vm_event > 0 && game.vm_event !== 21 && (cards[game.vm_event].side === 'D' || cards[game.vm_event].side === 'N')) {
- view.prompt = `Play ${clean_name(cards[game.vm_event].name)} for the event.`
- console.log('kiss of death before event button: game.stategy_discard', game.strategy_discard)
- gen_action('event')
- } else {
- view.prompt = 'Event does not occur.'
- gen_action('done')
- }
- },
- event() {
- //game.return = game.active
- console.log('kiss of death event section, discard', game.strategy_discard)
- // Remove game.vm_event from the discard
- //game.strategy_discard = game.strategy_discard.filter(n => n !== game.vm_event)
- console.log('kiss of death event section 2, discard', game.strategy_discard)
-
- goto_vm(game.vm_event)
- },
- done() {
- vm_next()
- }
-}
-
-states.vm_kremlin_coup_choose_country = {
- get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}.`
- },
- prompt() {
- if (game.temp.length > 0) {
- view.prompt = 'Kremlin Coup! Select a country where the Communist retains power.'
- for (let country of countries) {
- console.log(`checking`, country)
- if (game.temp.includes(country)) {
- console.log('country in game.temp')
- gen_action(`${country.toLowerCase()}`)
- }
- }
- } else {
- view.prompt = 'Kremlin Coup! There are no countries where the Communist retains power.'
- gen_action('done')
- }
- },
- east_germany() {
- push_undo()
- game.vm_active_country = 'East_Germany'
- game.temp = game.temp.filter(country => country !== game.vm_active_country)
- log(`${country_name(game.vm_active_country)}:`)
- vm_kremlin_coup_elite()
- },
- poland() {
- push_undo()
- game.vm_active_country = 'Poland'
- log(`${country_name(game.vm_active_country)}:`)
- game.temp = game.temp.filter(country => country !== game.vm_active_country)
- vm_kremlin_coup_elite()
- },
- czechoslovakia() {
- push_undo()
- game.vm_active_country = 'Czechoslovakia'
- log(`${country_name(game.vm_active_country)}:`)
- game.temp = game.temp.filter(country => country !== game.vm_active_country)
- vm_kremlin_coup_elite()
- },
- hungary() {
- push_undo()
- game.vm_active_country = 'Hungary'
- log(`${country_name(game.vm_active_country)}:`)
- game.temp = game.temp.filter(country => country !== game.vm_active_country)
- vm_kremlin_coup_elite()
- },
- romania() {
- push_undo()
- game.vm_active_country = 'Romania'
- log(`${country_name(game.vm_active_country)}:`)
- game.temp = game.temp.filter(country => country !== game.vm_active_country)
- vm_kremlin_coup_elite()
- },
- bulgaria () {
- push_undo()
- game.vm_active_country = 'Bulgaria'
- log(`${country_name(game.vm_active_country)}:`)
- game.temp = game.temp.filter(country => country !== game.vm_active_country)
- vm_kremlin_coup_elite()
- },
- done() {
- game.temp = 0
- vm_next()
- }
-}
-
-states.vm_kremlin_coup_take_control = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- if (game.valid_spaces.length === 0){
- view.prompt = `Kremlin Coup! ${country_name(game.vm_active_country)}'s Elite space is already controlled.`
- gen_action('done')
- } else {
- view.prompt = `Kremlin Coup! Take control of the Elite space in ${country_name(game.vm_active_country)}.`
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique);
- }
- }
- },
- infl(space) {
- vm_take_control(space)
- if (game.vm_active_country === 'East_Germany') {game.selected_space = 3 }
- if (game.vm_active_country === 'Poland') {game.selected_space = 17}
- if (game.vm_active_country === 'Czechoslovakia') {game.selected_space = 29}
- if (game.vm_active_country === 'Hungary') {game.selected_space = 45}
- if (game.vm_active_country === 'Romania') {game.selected_space = 61}
- if (game.vm_active_country === 'Bulgaria') {game.selected_space = 68}
- game.state = 'vm_kremlin_coup_sc_prep'
- },
- done() {
- if (game.vm_active_country === 'East_Germany') {game.selected_space = 3 }
- if (game.vm_active_country === 'Poland') {game.selected_space = 17}
- if (game.vm_active_country === 'Czechoslovakia') {game.selected_space = 29}
- if (game.vm_active_country === 'Hungary') {game.selected_space = 45}
- if (game.vm_active_country === 'Romania') {game.selected_space = 61}
- if (game.vm_active_country === 'Bulgaria') {game.selected_space = 68}
- game.state = 'vm_kremlin_coup_sc_prep'
- }
-}
-
-states.vm_kremlin_coup_sc_prep = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- view.prompt = `Kremlin Coup! Conduct a support check in ${game.vm_active_country}'s Bureaucratic space.`
- gen_action_sc(spaces[game.selected_space].name_unique);
- },
- sc(space) {
- //game.selected_space = find_space_index(space)
- game.state = 'vm_kremlin_coup_sc'
- }
-}
-
-states.vm_kremlin_coup_sc = {
- inactive: 'do support checks',
- prompt () {
- view.prompt = `Support check: ${spaces[game.selected_space].name_unique}. Roll a die.`
- gen_action('roll')
- },
- roll() {
- clear_undo()
- do_sc(spaces[game.selected_space].name_unique)
- if (game.temp.length > 0 ){
- game.state = 'vm_kremlin_coup_choose_country'
- } else {
- game.state = 'vm_kremlin_coup_end'
- }
- }
-}
-
-states.vm_kremlin_coup_end = {
- get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}.`
- },
- prompt() {
- view.prompt = `${clean_name(cards[this_card()].name)}: done.`
- gen_action('done')
- },
- done() {
- vm_next()
- }
-}
-
-states.vm_laszlo_tokes = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- view.prompt = `Laszlo Tokes. Choose to:`
- gen_action('influence')
- gen_action('support_check')
- },
- influence(){
- push_undo()
- game.vm_available_ops = get_card_ops(73)
- valid_spaces_infl()
- game.valid_spaces = game.valid_spaces.filter(space_id => spaces[space_id].country === 'Romania')
- game.phase = 3
- vm_next()
- //game.state = 'vm_add_infl'
- },
- support_check() {
- push_undo()
- game.vm_available_ops = 2
- //game.state = 'vm_support_check_prep'
- valid_spaces_sc()
- game.valid_spaces = game.valid_spaces.filter(space_id => spaces[space_id].country === 'Romania')
- vm_next()
- }
-}
-
-states.vm_switch_infl = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- if (game.valid_spaces.length === 0) {
- view.prompt = `${clean_name(cards[this_card()].name)}: No SPs to remove.`
- gen_action('pass')
- } else {
- /*if (game.vm_available_ops > 0 ) {*/
- view.prompt = `${clean_name(cards[game.played_card].name)}: ${event_prompt()}.`
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique);
- }
- } /*else {
- view.prompt = 'Influence replaced.'
- gen_action('done')
- }*/
- },
- infl(space) {
- push_undo()
- vm_switch_infl(space)
- if (game.vm_available_ops === 0) {
- game.valid_spaces = []
- }
- vm_next()
- },
- pass() {
- vm_next()
- }
- /*done() {
- vm_next()
- }*/
-}
-
-states.vm_malta_summit = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- /*if (game.phase === 1) {*/
- view.prompt = 'Malta Summit: roll a die.'
- gen_action('roll')
- /*} else {
- view.prompt = 'Done.'
- gen_action('done')
- }*/
- },
- roll() {
- clear_undo()
- let roll = Math.floor(Math.random() * 6) + 1
- log(`Rolled a ${roll}`)
- if (game.stability > 0) {
- log(`+${game.stability} from USSR Stability Track`)
- log(`Modified roll: ${roll + game.stability}`)
- }
- if (roll + game.stability > 3) {
- log('Summit successful')
- game.vp += 3
- log('+3 VP')
- if (check_vp()) {
- return
- }
- if (game.comInfl[12] > 0 ) {game.valid_spaces.push(12)}
- if (game.comInfl[15] > 0 ) {game.valid_spaces.push(15)}
- if (game.comInfl[27] > 0 ) {game.valid_spaces.push(27)}
- if (game.comInfl[43] > 0 ) {game.valid_spaces.push(43)}
- if (game.comInfl[51] > 0 ) {game.valid_spaces.push(51)}
- if (game.comInfl[69] > 0 ) {game.valid_spaces.push(69)}
- //game.vm_available_ops = 5
- game.remove_opponent_infl = true
- vm_next()
- }
- else {
- log('Summit failed. Required 4 or more')
- //game.phase++
- vm_goto_step(vm_permanently_remove)
- }
- },
- /*done() {
- vm_next()
- }*/
-}
-
-states.vm_modrow = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- view.prompt = `Modrow: roll a die.`
- gen_action('roll')
- },
- roll(){
- clear_undo()
- let roll = Math.floor(Math.random() * 6) + 1
- let dem_spaces = spaces.filter(space => space && space.country === 'East_Germany' && check_dem_control(space.space_id)).length
- if (roll > dem_spaces) {
- log(`Rolled a ${roll}`)
- log(`Success. More than the ${dem_spaces} Democratically controlled spaces`)
- vm_next()
- } else {
- log(`Rolled a ${roll}`)
- log(`Fail. More than ${dem_spaces} required`)
- permanently_remove(83)
- vm_return()
- }
- }
-}
-
-states.vm_nepotism = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- //if (game.phase === 1 ) {
- view.prompt = 'Nepotism: roll a die.'
- gen_action('roll')
- /*} else {
- view.prompt = 'Roll a die: done.'
- gen_action('done')
- }*/
- },
- roll() {
- clear_undo()
- let roll = Math.floor(Math.random() * 6) + 1
- if (roll < 3) {
- log(`Rolled a ${roll}: adds 4 SPs`)
- game.vm_available_ops = 4}
- else if (roll < 5 ) {
- log(`Rolled a ${roll}: adds 3 SPs`)
- game.vm_available_ops = 3}
- else {
- log(`Rolled a ${roll}: adds 1 SP`)
- game.vm_available_ops = 1}
- //game.phase = 2
- vm_next()
- },
- /*done() {
- vm_next()
- }*/
-}
-
-states.vm_new_years_eve_party = {
- get inactive() {
- return `resolve ${clean_name(cards[104].name)}.`
- },
- prompt() {
- view.prompt = 'Choose whether the game ends at the end of this turn.'
- gen_action('end')
- gen_action('continue')
- },
- end() {
- push_undo()
- game.persistent_events.push(104)
- log('Chooses to end the game. There will be no final scoring')
- let power = game.revolutions.filter(value => value === false).length
- if (power > 3) {
- log(`Communist holds power in ${power} countries. -3 VP`)
- game.vp -= 3
- } else {
- log(`Communist holds power in ${power} countries. +3 VP`)
- game.vp += 3
- }
- if (check_vp()) {
- return
- }
- //game.table_cards.push(104)
- permanently_remove(104)
- vm_next()
- },
- continue() {
- log('Chooses to continue')
- permanently_remove(104)
- vm_next()
- }
-}
-
-states.vm_nomenklatura = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- view.prompt = 'Nomenklatura: choose to remove all Democratic SPs from Elite spaces or add 3 SPs to any Elite space(s).'
- gen_action('remove')
- gen_action('add')
- },
- remove() {
- push_undo()
- game.valid_spaces = []
- for (let i = 1; i < spaces.length; i++) {
- let space = spaces[i]
-
- if (space.socio === 1 && game.demInfl[i] > 0) {
- game.valid_spaces.push(space.space_id)
- }
- }
- game.vm_available_ops = game.valid_spaces.length
- game.remove_opponent_infl = true
- game.state = 'vm_nomenklatura_remove'
- },
- add() {
- push_undo()
- game.valid_spaces = []
- for (let space of spaces) {
- if (!space) continue
- if (space.socio === 1) {
- game.valid_spaces.push(space.space_id)
- }
- }
- game.vm_available_ops = 3
- game.state = 'vm_nomenklatura_add'
- }
-}
-
-states.vm_nomenklatura_remove = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- if (game.vm_available_ops === 0 || game.valid_spaces.length === 0 ) {
- view.prompt = 'Remove SPs: done.'
- gen_action('done')
- } else {
- view.prompt = 'Nomenklatura: remove all Democratic SPs from Elite spaces.'
-
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique);
- }
- }
- },
- infl(space) {
- push_undo()
- vm_do_remove_all_infl(space)
- if (game.vm_available_ops === 0) {
- vm_next()
- }
- },
- done() {
- vm_next()
- }
-}
-
-states.vm_nomenklatura_add = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- if (game.vm_available_ops === 0 || game.valid_spaces.length === 0 ) {
- view.prompt = 'Add SPs: done.'
- gen_action('done')
- } else {
- view.prompt = `Nomenklatura: add 3 SPs to any Elite space(s). ${pluralize(game.vm_available_ops, 'SP')} remaining.`
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique);
- }
- }
- },
- infl(space) {
- push_undo()
- vm_do_add_infl_free(space)
- if (game.vm_available_ops === 0 ) {game.valid_spaces = []}
- },
- done() {
- if (game.summary.length > 0) {
- pop_summary()
- log_br()
- }
- vm_next()
- }
-}
-
-states.vm_samizdat = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- view.prompt = 'Samizdat: you may set aside a card from your hand and draw a replacement.'
- for (let card of game.democrat_hand) {
- gen_action_card(card)
- }
- gen_action('pass')
- },
- card(card) {
- push_undo()
- game.samizdat_card = card
- game.democrat_hand = game.democrat_hand.filter(c => c !== card)
- log('Set aside a card')
- game.state = 'vm_samizdat_finish'
- },
- pass() {
- //if (game.samizdat_card > 0) {game.state = 'vm_samizdat_finish'}
- /*else { */
- log('Did not set aside a card')
- vm_next()
- //}
- }
-}
-
-states.vm_samizdat_finish = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- /*if (game.phase ) {
- view.prompt = 'Samizdat: done.'
- gen_action('done')
- } else {*/
- view.prompt = 'Draw a replacement card.'
- gen_action('draw')
- //}
- },
- draw() {
- clear_undo()
- game.democrat_hand.push(draw_card(game.strategy_deck))
- vm_next()
- //game.phase ++
- },
- /*done() {
- vm_next()
- }*/
-}
-
-states.vm_shock_therapy = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- if (game.vm_active_country === '' ) {
- view.prompt = 'Shock Therapy: choose a country where you hold Power:'
- if (game.revolutions[0]) {gen_action('poland')}
- if (game.revolutions[1]) {gen_action('hungary')}
- if (game.revolutions[2]) {gen_action('east_germany')}
- if (game.revolutions[3]) {gen_action('bulgaria')}
- if (game.revolutions[4]) {gen_action('czechoslovakia')}
- if (game.revolutions[5]) {gen_action('romania')}
- } else if (game.phase === 2) {
- view.prompt = 'Shock Therapy: done.'
- gen_action('done')
- } else {
- view.prompt = 'Shock Therapy: roll a die.'
- gen_action('roll')
- }
- },
- east_germany() {
- push_undo()
- game.vm_active_country = 'East_Germany'
- log(`Chose ${country_name(game.vm_active_country)}`)
- },
- poland() {
- push_undo()
- game.vm_active_country = 'Poland'
- log(`Chose ${country_name(game.vm_active_country)}`)
- },
- czechoslovakia() {
- push_undo()
- game.vm_active_country = 'Czechoslovakia'
- log(`Chose ${country_name(game.vm_active_country)}`)
- },
- hungary() {
- push_undo()
- game.vm_active_country = 'Hungary'
- log(`Chose ${country_name(game.vm_active_country)}`)
- },
- romania() {
- push_undo()
- game.vm_active_country = 'Romania'
- log(`Chose ${country_name(game.vm_active_country)}`)
- },
- bulgaria () {
- push_undo()
- game.vm_active_country = 'Bulgaria'
- log(`Chose ${country_name(game.vm_active_country)}`)
- },
- roll() {
- clear_undo()
- let roll = Math.floor(Math.random() * 6) + 1
- let worker_farmer = 0
- for (let space of spaces) {
- if (space && space.country === game.vm_active_country && check_com_control(space.space_id) && (space.socio === 3 || space.socio === 4)) {
- worker_farmer++
- }
- }
- log(`Rolled a ${roll}`)
- log(`-${worker_farmer} from Communist controlled Worker and Farmer spaces`)
- log(`Modified roll: ${roll - worker_farmer}`)
- if ((roll - worker_farmer) > 2) {
- log('C93 is successful. +3 VP')
- vm_next()
- } else {
- log('C93 is unsuccessful. Required 3 or more')
- game.phase++
- }
- },
- done() {
- permanently_remove(93)
- vm_return()
- }
-}
-
-states.vm_social_democratic_platform_adopted = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- view.prompt = 'Select a country where the Democrat holds Power.'
- if (game.revolutions[0]) {gen_action('poland')}
- if (game.revolutions[1]) {gen_action('hungary')}
- if (game.revolutions[2]) {gen_action('east_germany')}
- if (game.revolutions[3]) {gen_action('bulgaria')}
- if (game.revolutions[4]) {gen_action('czechoslovakia')}
- if (game.revolutions[5]) {gen_action('romania')}
- },
- east_germany() {
- push_undo()
- game.vm_active_country = 'East_Germany'
- log(`Selected ${country_name(game.vm_active_country)}`)
- vm_next()
- },
- poland() {
- push_undo()
- game.vm_active_country = 'Poland'
- log(`Selected ${country_name(game.vm_active_country)}`)
- vm_next()},
- czechoslovakia() {
- push_undo()
- game.vm_active_country = 'Czechoslovakia'
- log(`Selected ${country_name(game.vm_active_country)}`)
- vm_next()},
- hungary() {
- push_undo()
- game.vm_active_country = 'Hungary'
- log(`Selected ${country_name(game.vm_active_country)}`)
- vm_next()
- },
- romania() {
- push_undo()
- game.vm_active_country = 'Romania'
- log(`Selected ${country_name(game.vm_active_country)}`)
- vm_next()
- },
- bulgaria () {
- push_undo()
- game.vm_active_country = 'Bulgaria'
- log(`Selected ${country_name(game.vm_active_country)}`)
- vm_next()}
-}
-
-states.vm_systematization = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- /*if (game.systematization === 0) { */
- view.prompt = 'Systematization: eliminate a space in Romania.'
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique);
- }
- /*} else {
- view.prompt = 'Systematization: done.'
- gen_action('done')
- }*/
- },
- infl(space) {
- push_undo()
- vm_eliminate(find_space_index(space))
- game.valid_spaces = []
- game.systematization = find_space_index(space)
- game.persistent_events.push(69)
- vm_next()
- },
-/* done() {
- vm_next()
- } */
-}
-
-states.vm_the_chinese_solution = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- view.prompt = 'You may give up 3 VP to conduct support checks in a country where you hold power.'
- if (!game.revolutions[0]) {gen_action('poland')}
- if (!game.revolutions[1]) {gen_action('hungary')}
- if (!game.revolutions[2]) {gen_action('east_germany')}
- if (!game.revolutions[3]) {gen_action('bulgaria')}
- if (!game.revolutions[4]) {gen_action('czechoslovakia')}
- if (!game.revolutions[5]) {gen_action('romania')}
- gen_action('pass')
- },
- east_germany() {
- push_undo()
- game.vm_active_country = 'East_Germany'
- log(`Chose ${country_name(game.vm_active_country)}`)
- log('+3 VP')
- game.vp += 3
- if (check_vp()) {
- return
- }
- vm_next()
- },
- poland() {
- push_undo()
- game.vm_active_country = 'Poland'
- log(`Chose ${country_name(game.vm_active_country)}`)
- log('+3 VP')
- game.vp += 3
- if (check_vp()) {
- return
- }
- vm_next()
- },
- czechoslovakia() {
- push_undo()
- game.vm_active_country = 'Czechoslovakia'
- log(`Chose ${country_name(game.vm_active_country)}`)
- log('+3 VP')
- game.vp += 3
- if (check_vp()) {
- return
- }
- vm_next()
- },
- hungary() {
- push_undo()
- game.vm_active_country = 'Hungary'
- log(`Chose ${country_name(game.vm_active_country)}`)
- log('+3 VP')
- game.vp += 3
- if (check_vp()) {
- return
- }
- vm_next()
- },
- romania() {
- push_undo()
- game.vm_active_country = 'Romania'
- log(`Chose ${country_name(game.vm_active_country)}`)
- log('+3 VP')
- game.vp += 3
- if (check_vp()) {
- return
- }
- vm_next()
- },
- bulgaria () {
- push_undo()
- game.vm_active_country = 'Bulgaria'
- log(`Chose ${country_name(game.vm_active_country)}`)
- log('+3 VP')
- game.vp += 3
- if (check_vp()) {
- return
- }
- vm_next()
- },
- pass() {
- permanently_remove(96)
- vm_return()
- }
-}
-
-states.vm_the_tyrant_is_gone = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- if (!game.the_tyrant_is_gone) {
- view.prompt = 'The Tyrant is Gone: Select a space in Romania for the Ceausescus to flee to.'
- for (let space_id of game.valid_spaces) {
- if (!space_id) continue
- gen_action_infl(spaces[space_id].name_unique);
- }
- } else {
- view.prompt = 'Select a space: done.'
- gen_action('done')
- }
- },
- infl(space) {
- push_undo()
- log(`The Ceausescus flee to %${find_space_index(space)}`)
- game.the_tyrant_is_gone = find_space_index(space)
- game.persistent_events.push(97)
- },
- done () {
- vm_next()
- }
-}
-
-states.vm_the_wall_must_go = {
- get inactive() {
- return `resolve ${clean_name(cards[this_card()].name)}.`
- },
- prompt() {
- if (game.the_wall_must_go['dem_wins'] === 2 || game.the_wall_must_go['com_wins'] === 2) {
- view.prompt = 'The Wall Must Go! Done.'
- gen_action('done')
- } else {
- view.prompt = ('The Wall Must Go! Roll a die.')
- gen_action('roll')
- }
- },
- roll() {
- clear_undo()
- let attempt = game.the_wall_must_go['dem_wins'] + game.the_wall_must_go['com_wins']
- if (game.the_wall_must_go['dem_roll'] === 0 && game.the_wall_must_go['com_roll'] === 0) {
- log_h3(`Round ${attempt+1}`)
- }
-
- let roll = Math.floor(Math.random() * 6) + 1
- log(`Rolled a ${roll}`)
- if (game.active === DEM) {
- let controlled_spaces = spaces.filter(space => space && space.country === 'East_Germany' && check_dem_control(space.space_id)).length
- if (controlled_spaces > 0) {
- log(`+${controlled_spaces} from controlled spaces in East Germany`)
- log(`Modified roll: ${roll + controlled_spaces}`)
- roll += controlled_spaces
- }
- game.the_wall_must_go['dem_roll'] = roll
- } else {
- let controlled_spaces = spaces.filter(space => space && space.country === 'East_Germany' && check_com_control(space.space_id)).length
- if (controlled_spaces > 0) {
- log(`+${controlled_spaces} from controlled spaces in East Germany`)
- log(`Modified roll: ${roll + controlled_spaces}`)
- roll += controlled_spaces
- }
- game.the_wall_must_go['com_roll'] = roll
-
- }
- if (game.the_wall_must_go['dem_roll'] > 0 && game.the_wall_must_go['com_roll'] > 0) {
- if (game.the_wall_must_go['dem_roll'] > game.the_wall_must_go['com_roll'] ) {
- log('Democrat wins')
- game.the_wall_must_go['dem_wins']++
- } else if (game.the_wall_must_go['dem_roll'] === game.the_wall_must_go['com_roll'] ) {
- log('Tie. Re-roll')
- } else {
- log('Communist wins')
- game.the_wall_must_go['com_wins']++
- }
-
- log(`Democrat: ${game.the_wall_must_go['dem_wins']}, Communist: ${game.the_wall_must_go['com_wins']}`)
- }
- if (game.the_wall_must_go['dem_wins'] === 2) {
- log('The Democrat wins C86')
- return
- }
- if (game.the_wall_must_go['com_wins'] === 2) {
- log('The Communist wins C86')
- return
- }
- if (game.the_wall_must_go['dem_roll'] === 0 || game.the_wall_must_go['com_roll'] === 0) {
- next_player()
- } else {
- game.the_wall_must_go['dem_roll'] = 0
- game.the_wall_must_go['com_roll'] = 0
- }
- },
- done() {
- if (game.the_wall_must_go['dem_wins'] === 2) {
- game.persistent_events.push(86)
- log('+3 VP')
- game.vp += 3
- if (check_vp()) {
- return
- }
- for (let i = 1; i < spaces.length; i++) {
- let space = spaces[i]
- if (space.country === 'East_Germany' && game.comInfl[i] > 0){
- game.valid_spaces.push(space.space_id)
- }
- }
- if (!game.vm_infl_to_do) {
- if (game.round_player === DEM) {
- game.return = COM
- } else {
- game.return = DEM
- }
- }
- if (game.active === DEM) {next_player()}
- vm_next ()
- } else {
- permanently_remove(86)
- delete game.the_wall_must_go
- vm_return()
- }
- }
-}
-
-states.vm_warsaw_pact_summit = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- view.prompt = 'Choose to play for support checks or place SPs.'
- gen_action('influence')
- gen_action('support_check')
- },
- influence(){
- push_undo()
- for (let i = 1; i < spaces.length; i++) {
- let space = spaces[i]
- if (game.demInfl[i] === 0) {
- game.valid_spaces.push(space.space_id);
- }
- }
- game.vm_available_ops = 4
- game.phase = 3
- //game.state = 'vm_add_infl'
- vm_next()
- },
- support_check(){
- push_undo()
- for (let i = 1; i < spaces.length; i++) {
- let space = spaces[i]
- if (game.demInfl[i] > 0 && (space.socio === 5 || space.socio === 6)) {
- game.valid_spaces.push(space.space_id)
- }
- }
- game.vm_available_ops = 2
- //game.state = 'vm_support_check_prep'
- console.log('game.phase',game.phase)
- vm_next()
- }
-}
-
-states.vm_we_are_the_people_remove = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- if (game.demInfl[6] === 0) {
- view.prompt = '"We are the People!": no SPs to remove.'
- gen_action('done')
- } else if (game.vm_available_ops > 0 ) {
- view.prompt = '"We are the People!": remove up to 4 SPs from the Lutherian Church.'
- gen_action('done')
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique);
- }
- } else {
- view.prompt = 'Remove SPs: done.'
- gen_action('done')
- }
- },
- infl(space) {
- vm_do_remove_infl(space)
- },
- done() {
- if (game.summary.length > 0) {
- pop_summary()
- log_br()
- }
- if (!game.vm_influence_added[6]) {
- log('No SPs removed')
- vm_next()
- } else {
- game.valid_spaces = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
- game.state = 'vm_we_are_the_people_add'
- }
- }
-}
-states.vm_we_are_the_people_add = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- if (!game.vm_influence_added[6]) {
- view.prompt = '"We are the People!": done.'
- gen_action('done')
- return
- }
-
- view.prompt = `"We are the People!": you must add the ${pluralize(game.vm_influence_added[6],'SP')} to spaces in Germany.`
- gen_action('done')
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique);
- }
- },
- infl(space) {
- push_undo()
- vm_do_add_infl_free(space)
- game.vm_influence_added[6]--
- if (game.vm_influence_added[6] === 0 ) {game.valid_spaces = []}
- },
- done() {
- if (game.summary.length > 0) {
- pop_summary()
- log_br()
- }
- vm_next()
- }
-}
-
-states.vm_workers_revolt = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- view.prompt = 'Workers Revolt: select a Worker Space in a country your opponent has power.'
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique)
- }
- },
- infl(space) {
- game.selected_space = find_space_index(space)
- log(`Chose %${game.selected_space}`)
- game.state = 'vm_workers_revolt_finish'
- }
-}
-
-
-states.vm_workers_revolt_finish = {
- get inactive() {
- return `resolve ${clean_name(cards[game.played_card].name)}.`
- },
- prompt() {
- if (game.selected_space > 0) {
- view.prompt = `Target: ${spaces[game.selected_space].name_unique}. Roll a die.`
- gen_action('roll')
- } else {
- view.prompt = 'Workers Revolt: done.'
- gen_action('done')
- }
-
- },
- roll() {
- clear_undo()
- let roll = Math.floor(Math.random() * 6) + 1
- log(`Rolled a ${roll}`)
- let adj = count_adj(spaces[game.selected_space].name_unique)
- if (game.active === DEM) {
- log(`-${adj.com_adj} from opponent controlled spaces`)
- roll -= adj.com_adj
- } else {
- log(`-${adj.dem_adj} from opponent controlled spaces`)
- roll -= adj.dem_adj
- }
- log(`Modified roll: ${roll}`)
- if (roll >= 4) {
- log('Workers Revolt successful')
- vm_replace_all_infl(game.temp)
- } else {log('Workers Revolt fails. Required 4 or more')}
- game.selected_space = 0
- },
- done() {
- vm_next()
- }
-}
-
-// ==================== TIANANMEN SQUARE TRACK STATES =====================
-
-states.vm_tst_3_prep = {
- inactive: 'resolve Tiananmen Square Track award.',
- prompt() {
- view.prompt = 'Tiananmen Square Track award: draw 3 cards.'
- gen_action('draw')
- },
- draw() {
- if (game.active === DEM) {
- game.temp = game.democrat_hand.length
- draw_cards(game.strategy_deck, game.democrat_hand, game.communist_hand, game.democrat_hand.length + 3, game.communist_hand.length)
- game.valid_cards = [game.democrat_hand[game.temp], game.democrat_hand[game.temp + 1], game.democrat_hand[game.temp + 2]]
- } else {
- game.temp = game.communist_hand.length
- draw_cards(game.strategy_deck, game.democrat_hand, game.communist_hand, game.democrat_hand.length, game.communist_hand.length + 3)
- game.valid_cards = [game.communist_hand[game.temp], game.communist_hand[game.temp + 1], game.communist_hand[game.temp + 2]]
- }
- game.temp = 0
- game.state = 'vm_tst_3'
- }
-}
-
-states.vm_tst_3 = {
- inactive: 'resolve Tiananmen Square Track bonus.',
- prompt() {
- if (game.temp < 2) {
- view.prompt = `Discard 2 of the drawn cards`
- for (let card of game.valid_cards) {
- gen_action_card(card)
- }
- } else {
- view.prompt = 'Discard cards: done.'
- gen_action('done')
- }
- },
- card(card) {
- push_undo()
- discard(card)
- game.temp ++
- if (game.temp === 2) {
- game.valid_cards = []
- }
- },
- done() {
- vm_next()
- }
-}
-
-states.vm_tst_4 = {
- inactive: 'remove SPs',
- prompt () {
- if (game.vm_available_ops === 0 || game.valid_spaces.length === 0) {
- view.prompt = 'Remove SPs: done.'
- gen_action('done')
- return
- }
- view.prompt = 'Tiananmen Square Track award: select a space to remove SPs'
-
- for (let space_id of game.valid_spaces) {
- gen_action_infl(spaces[space_id].name_unique);
- }
- },
- infl(space) {
- vm_do_remove_infl(space)
- },
- done() {
- if (game.summary.length > 0) {
- pop_summary()
- log_br()
- }
- vm_next()
- }
-}
-
-states.vm_tst_6 = {
- inactive: 'make their free support check.',
- prompt() {
- if (game.vm_available_ops === 0) {
- view.prompt = 'Tiananmen Square Track award support check: done.'
- gen_action('done')
- return
- } else {
- view.prompt = 'Tiananmen Square Track award: you have a free 2 Ops support check.'
- for (let space_id of game.valid_spaces) {
- if (space_id) {
- gen_action_sc(spaces[space_id].name_unique);
- }
- }
- }
- },
- sc(space) {
- push_undo()
- game.selected_space = find_space_index(space)
- if (game.active === DEM && game.persistent_events.includes(58) && spaces[space].country === "East_Germany") {
- game.austria_hungary_border_reopened_tracker = true
- }
- game.state = 'vm_tst_6_sc'
- },
- done () {
- vm_next()
- }
-}
-
-states.vm_tst_6_sc = {
- inactive: 'do support check.',
- prompt () {
- view.prompt = `Support check: ${spaces[game.selected_space].name_unique}. Roll a die`
- gen_action('roll')
- },
- roll() {
- clear_undo()
- do_sc(spaces[game.selected_space].name_unique)
- game.vm_available_ops--
- game.valid_spaces = []
- game.state = 'vm_tst_6'
- return
- }
-}
-
-states.vm_tst_8 = {
- inactive: 'use Tiananmen Square Track award.',
- prompt() {
- if (game.vm_event_to_do && game.vm_infl_to_do) {
- view.prompt = 'Choose whether to play for event or operations first.'
- gen_action('event')
- gen_action('ops')
- }
- else if (!game.vm_event_to_do && game.vm_infl_to_do) {
- view.prompt = 'Event resolved. Use card for operations.'
- gen_action('ops')
- }
- else if (game.vm_event_to_do && !game.vm_infl_to_do) {
- view.prompt = 'Operations resolved. Use card for event.'
- gen_action('event')
- }
- else if (!game.vm_event_to_do && !game.vm_infl_to_do) {
- view.prompt = 'Event and operations: done.'
- gen_action('done')
- }
- },
- event() {
- push_undo()
- game.vm_event_to_do = false
- game.return_state = 'vm_tst_8'
- game.return = game.active
- game.vm_event = game.played_card
- goto_vm(game.vm_event)
- },
- ops() {
- push_undo()
- game.vm_infl_to_do = false
- game.return = game.active
- game.return_state = 'vm_tst_8'
- goto_vm(208)
- },
- done() {
- game.tst_8 = true
- end_round()
- }
-}
-
-
-states.vm_tst_8_ops = {
- inactive: 'play card for operations.',
- prompt() {
- view.prompt = `Play ${clean_name(cards[game.played_card].name)} for:`
- gen_action('influence')
- gen_action('support_check')
- if ((game.active === DEM && game.dem_tst_attempted_this_turn === 0 ) || (game.active === COM && game.com_tst_attempted_this_turn === 0 )) {
- gen_action('tst')
- }
- },
- influence(){
- push_undo()
- game.vm_available_ops = cards[game.played_card].ops
- valid_spaces_infl()
- // If ABHR - Set AHBR tracker to true
- if (game.persistent_events.includes(58)) {
- game.austria_hungary_border_reopened_tracker = true
- }
- game.state = 'vm_add_infl'
- },
- support_check() {
- push_undo()
- game.vm_available_ops = 2
- game.state = 'vm_support_check_prep'
- },
- tst() {
- game.state = 'vm_tiananmen_square_attempt'
- }
-}
-
-// ========================= POWER STRUGGLE STATES ========================
-
-states.vm_support_surges = {
- inactive: 'draw cards.',
- prompt() {
- view.prompt = 'Support Surges: draw 2 cards.'
- gen_action('draw')
- },
- draw() {
- if (game.active === DEM) {
- draw_cards(game.power_struggle_deck, game.dem_pwr_hand, game.com_pwr_hand, game.dem_pwr_hand.length+2, game.com_pwr_hand.length)
- } else {
- draw_cards(game.power_struggle_deck, game.dem_pwr_hand, game.com_pwr_hand, game.dem_pwr_hand.length, game.com_pwr_hand.length+2)
- }
- game.phase = 0
- log('Drew 2 cards')
- log('Surrenders initiative')
- vm_next()
- }
-}
-
-states.vm_support_falters = {
- inactive: 'discard cards.',
- prompt() {
- if ((game.active === DEM && game.dem_pwr_hand.length === 0) || (game.active === COM && game.com_pwr_hand.length === 0)) {
- view.prompt = 'Support Falters: no remaining cards to discard.'
- gen_action('pass')
- } else if (game.vm_available_ops > 0) {
- view.prompt = 'Support Falters: discard a card.'
- gen_action('discard')
- } else {
- view.prompt = 'Support Falters: done.'
- gen_action('done')
- }
- },
- discard() {
- console.log('game.com_pwr_hand', game.com_pwr_hand)
- if (game.active === DEM) {discard_card(game.dem_pwr_hand)}
- else {discard_card(game.com_pwr_hand)}
- game.vm_available_ops --
- },
- pass() {
- log_msg_gap('Takes initiative')
- game.return = game.active
- vm_next()
- },
- done() {
- log_msg_gap('Takes initiative')
- game.return = game.active
- vm_next()
- }
-}
-
-/* =================== EVENTS ================================ */
-
-// #region GENERATED EVENT CODE
-const CODE = []
-
-CODE[1] = [ // Legacy of Martial Law*
- [ vm_valid_spaces_country_opp, 'Poland' ],
- [ vm_prompt, 'replace 1 Democratic SP in Poland with a Communist SP' ],
- [ vm_legacy_of_martial_law ],
- [ vm_valid_spaces_country_sc, 'Poland' ],
- [ vm_prompt, 'make a Support Check in Poland' ],
- [ vm_1_support_check ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[2] = [ // Solidarity Legalised*
- [ vm_solidarity_legalised ],
- [ vm_valid_spaces_solidarity_legalised ],
- [ vm_prompt, 'to every uncontrolled Worker and Farmer space in Poland' ],
- [ vm_add_limited_infl, 9, 1 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[3] = [ // Walesa
- [ vm_valid_spaces_country, 'Poland' ],
- [ vm_prompt, 'any space(s) in Poland' ],
- [ vm_add_infl_free, 4 ],
- [ vm_valid_spaces_country_sc, 'Poland' ],
- [ vm_prompt, 'Make Support Checks in Poland' ],
- [ vm_support_check, 2 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[4] = [ // Michnik
- [ vm_valid_spaces, 26 ],
- [ vm_prompt, 'the Polish Intellectuals space' ],
- [ vm_add_x_infl, 3 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[5] = [ // General strike
- [ vm_general_strike ],
- [ vm_return ],
-]
-
-CODE[6] = [ // Brought in for Questioning
- [ vm_brought_in_for_questioning ],
- [ vm_return ],
-]
-
-CODE[7] = [ // State Run Media*
- [ vm_valid_spaces_opponent ],
- [ vm_remove_limited_opp_infl, 4, 2 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[8] = [ // Prudence
- [ vm_prudence ],
- [ vm_return ],
-]
-
-CODE[9] = [ // The Wall*
- [ vm_the_wall ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[10] = [ // Cult of Personality
- [ vm_if, ()=>!game.the_tyrant_is_gone ],
- [ vm_valid_spaces_country_socio_2, 'Romania', 3, 4 ],
- [ vm_prompt, 'Worker or Farmer spaces in Romania, no more than 2 per space' ],
- [ vm_add_limited_infl, 4, 2 ],
- [ vm_endif ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[11] = [ // Dissident arrested
- [ vm_valid_spaces_opponent_socio, 5 ],
- [ vm_prompt, 'any Intellectuals space' ],
- [ vm_remove_x_opp_infl, 2 ],
- [ vm_return ],
-]
-
-CODE[12] = [ // Apparatchicks
- [ vm_valid_spaces_socio, 2 ],
- [ vm_prompt, ' to any Bureaucratic space(s)' ],
- [ vm_add_infl_free, 3 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[13] = [ // Stasi
- [ vm_stasi ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[14] = [ // Gorbachev Charms the West
- [ vm_valid_spaces_opponent ],
- [ vm_remove_opp_infl, 2 ],
- [ vm_valid_spaces_sc ],
- [ vm_prompt, 'select a space for the Support Check' ],
- [ vm_1_support_check ],
- [ vm_return ],
-]
-
-CODE[15] = [ // Honecker
- [ vm_permanently_remove ],
- [ vm_honecker ],
- [ vm_return ],
-]
-
-CODE[16] = [ // Nomenklatura*
- [ vm_nomenklatura ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[17] = [ // Roundtable talks
- [ vm_roundtable_talks ],
- [ vm_return ],
-]
-
-CODE[18] = [ // Poszgay Defends the Revolution
- [ vm_poszgay ],
- [ vm_prompt, 'to 4 spaces in Hungary not under Democratic control' ],
- [ vm_add_limited_infl, 4, 1 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[19] = [ // Papal vist
- [ vm_valid_spaces, 20, 35, 38 ],
- [ vm_prompt, 'any Catholic Church space' ],
- [ vm_add_x_infl, 3 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[20] = [ // Deutsche Marks*
- [ vm_permanently_remove ],
- [ vm_deutsche_marks ],
- [ vm_return ],
-]
-
-CODE[21] = [ // Common European Home
- [ vm_common_european_home ],
- [ vm_return ],
-]
-
-CODE[22] = [ // Power Struggle - Poland
- [ vm_power_struggle ],
- [ vm_return ],
-]
-
-CODE[23] = [ // Power Struggle - Hungary
- [ vm_power_struggle ],
- [ vm_return ],
-]
-
-CODE[24] = [ // St Nicolas Church
- [ vm_valid_spaces, 6 ],
- [ vm_prompt, 'the Lutheran Church' ],
- [ vm_take_control_prep, 1 ],
- [ vm_st_nicholas_church ],
- [ vm_return ],
-]
-
-CODE[25] = [ // Perestroika
- [ vm_perestroika ],
- [ vm_return ],
-]
-
-CODE[26] = [ // Helsinki Final Act*
- [ vm_helsinki_final_act ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[27] = [ // Consumerism
- [ vm_valid_spaces_opponent_socio, 4 ],
- [ vm_prompt, ' from a Worker space' ],
- [ vm_remove_opp_infl, 1 ],
- [ vm_valid_spaces_opponent_socio, 4 ],
- [ vm_active_country ],
- [ vm_prompt, ()=>`make a support check in a Worker space in ${country_name(game.vm_active_country)}` ],
- [ vm_1_support_check ],
- [ vm_return ],
-]
-
-CODE[28] = [ // Factory Party Cells
- [ vm_valid_spaces_opponent_socio, 4 ],
- [ vm_prompt, ' from Worker spaces' ],
- [ vm_remove_limited_opp_infl, 3, 2 ],
- [ vm_return ],
-]
-
-CODE[29] = [ // Jan Palach Week*
- [ vm_valid_spaces, 30 ],
- [ vm_prompt, 'the Charles University space' ],
- [ vm_add_x_infl, 6 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[30] = [ // Tear Gas
- [ vm_tear_gas ],
- [ vm_return ],
-]
-
-CODE[31] = [ // Intelligentsia
- [ vm_valid_spaces, 4, 26, 31, 46, 55, 73 ],
- [ vm_prompt, 'Intellectual spaces, no more than 2 per space' ],
- [ vm_add_limited_infl, 4, 2 ],
- [ vm_return ],
-]
-
-CODE[32] = [ // Peasant Parties*
- [ vm_valid_spaces_socio, 3 ],
- [ vm_prompt, 'Farmer spaces, no more than 2 per space' ],
- [ vm_add_limited_infl, 4, 2 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[33] = [ // Sajudis*
- [ vm_sajudis_check ],
- [ vm_prompt, 'any Minorities space' ],
- [ vm_take_control_prep, 1 ],
- [ vm_sajudis ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[34] = [ // Fidesz*
- [ vm_valid_spaces, 47 ],
- [ vm_prompt, 'the Hungary students space' ],
- [ vm_add_x_infl, 5 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[35] = [ // Heal our Bleeding Wounds*
- [ vm_heal_our_bleeding_wounds ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[36] = [ // Dash for the West*
- [ vm_permanently_remove ],
- [ vm_prompt, 'Dash for the West: select any Democratic event with an asterix(*) from the discard pile. Event occurs immediately' ],
- [ vm_dash_for_the_west ],
- [ vm_return ],
-]
-
-CODE[37] = [ // Nagy Reburied*
- [ vm_nagy_reburied ],
- [ vm_prompt, 'the Hungary Elite space' ],
- [ vm_remove_all_infl, 1 ],
- [ vm_valid_spaces_country, 'Hungary' ],
- [ vm_prompt, 'Hungary, no more than 2 per space' ],
- [ vm_add_limited_infl, 4, 2 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[38] = [ // July Concept
- [ vm_valid_spaces_country, 'Bulgaria' ],
- [ vm_prompt, 'Bulgaria' ],
- [ vm_add_infl_free, 3 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[39] = [ // Eco-Glasnost*
- [ vm_valid_spaces, 66 ],
- [ vm_prompt, 'Ruse' ],
- [ vm_add_x_infl, 4 ],
- [ vm_eco_glasnost ],
- [ vm_return ],
-]
-
-CODE[40] = [ // Hungarian Democratic Forum
- [ vm_valid_spaces_country, 'Hungary' ],
- [ vm_prompt, 'Hungary' ],
- [ vm_add_infl_free, 3 ],
- [ vm_valid_spaces_country_sc, 'Hungary' ],
- [ vm_prompt, 'make a Support Check in Hungary' ],
- [ vm_1_support_check ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[41] = [ // Ceausescu*
- [ vm_if, ()=>!game.the_tyrant_is_gone ],
- [ vm_valid_spaces_country_opp, 'Romania' ],
- [ vm_prompt, ' from Romania' ],
- [ vm_remove_opp_infl, 3 ],
- [ vm_valid_spaces_country_sc, 'Romania' ],
- [ vm_prompt, 'make a support check in Romania' ],
- [ vm_1_support_check ],
- [ vm_prompt, ' from Bucharesti' ],
- [ vm_ceausescu ],
- [ vm_endif ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[42] = [ // Power Struggle - East Germany
- [ vm_power_struggle ],
- [ vm_return ],
-]
-
-CODE[43] = [ // Power Struggle - Bulgaria
- [ vm_power_struggle ],
- [ vm_return ],
-]
-
-CODE[44] = [ // Inflationary Currency
- [ vm_inflationary_currency ],
- [ vm_valid_spaces_country_opp ],
- [ vm_prompt, ()=>` from ${country_name(game.vm_active_country)}` ],
- [ vm_remove_opp_infl, 2 ],
- [ vm_inflationary_currency_discard ],
- [ vm_if, ()=>!discarded_card() ],
- [ vm_valid_spaces_country_sc ],
- [ vm_prompt, ()=>`make a Support Check in ${country_name(game.vm_active_country)}` ],
- [ vm_1_support_check ],
- [ vm_endif ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[45] = [ // Soviet Troop Withdrawals*
- [ vm_valid_spaces_region_opp, 'Eastern Europe' ],
- [ vm_prompt, ' from Eastern Europe' ],
- [ vm_remove_limited_opp_infl, 5, 2 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[46] = [ // Goodbye Lenin!*
- [ vm_goodbye_lenin ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[47] = [ // Bulgarian Turks Expelled*
- [ vm_bulgarian_turks_expelled ],
- [ vm_prompt, 'Razgrad' ],
- [ vm_remove_all_infl, 1 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[48] = [ // We are the People!*
- [ vm_we_are_the_people ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[49] = [ // Foreign Currency Debt Burden*
- [ vm_foreign_currency_debt_burden ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[50] = [ // The Sinatra Doctrine*
- [ vm_the_sinatra_doctrine ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[51] = [ // 40th Anniversary Celebration*
- [ vm_40th_anniversary_celebration ],
- [ vm_valid_spaces_country, 'East_Germany' ],
- [ vm_prompt, 'East Germany' ],
- [ vm_add_infl_free ],
- [ vm_40th_anniversary_celebration_vp ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[52] = [ // Normalisation
- [ vm_normalisation ],
- [ vm_prompt, 'the Czechoslovakia Elite and Bureaucrat Spaces' ],
- [ vm_remove_all_infl, 2 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[53] = [ // Li Peng*
- [ vm_li_peng ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[54] = [ // The Crowd Turns Against Ceausescu*
- [ vm_the_crowd_turns_against_ceausescu ],
- [ vm_return ],
-]
-
-CODE[55] = [ // Power Struggle - Czechoslovakia
- [ vm_power_struggle ],
- [ vm_return ],
-]
-
-CODE[56] = [ // Foreign Television
- [ vm_foreign_television ],
- [ vm_remove_limited_opp_infl, 4, 2 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[57] = [ // Central Committee Reshuffle*
- [ vm_central_committee_reshuffle ],
- [ vm_prompt, ()=>`${country_name(game.vm_active_country)}` ],
- [ vm_add_infl_free, 3 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[58] = [ // Austria-Hungary Border Reopened*
- [ vm_austria_hungary_border_reopened ],
- [ vm_return ],
-]
-
-CODE[59] = [ // GrenzTruppen*
- [ vm_grenztruppen ],
- [ vm_return ],
-]
-
-CODE[60] = [ // Toxic Waste*
- [ vm_valid_spaces_socio, 4 ],
- [ vm_prompt, 'any Worker space(s)' ],
- [ vm_add_infl_free, 3 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[61] = [ // The Monday Demonstrations*
- [ vm_the_monday_demonstrations ],
- [ vm_prompt, 'the Lutheran Church Space and Leipzig' ],
- [ vm_take_control_prep, 2 ],
- [ vm_valid_spaces_country_sc, 'East_Germany' ],
- [ vm_prompt, 'make 5 Support Checks in East Germany' ],
- [ vm_support_check, 5 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[62] = [ // Yakovlev Counsels Gorbachev*
- [ vm_yakovlev_counsels_gorbachev ],
- [ vm_return ],
-]
-
-CODE[63] = [ // Genscher*
- [ vm_genscher ],
- [ vm_return ],
-]
-
-CODE[64] = [ // Legacy of 1968*
- [ vm_legacy_of_1968 ],
- [ vm_prompt, 'all spaces in Czechoslovakia not controlled by the Communist Player' ],
- [ vm_add_limited_infl, 11, 1 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[65] = [ // Presidential Visit*
- [ vm_presidential_visit ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[66] = [ // New Forum
- [ vm_valid_spaces_country, 'East_Germany' ],
- [ vm_prompt, '3 spaces in East Germany' ],
- [ vm_add_limited_infl, 3, 1 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[67] = [ // Reformer Rehabilitated*
- [ vm_prompt, 'Reformer Rehabilitated: chose any non-scoring card in the discard pile. Event takes place immediately' ],
- [ vm_reformer_rehabilitated ],
- [ vm_return ],
-]
-
-CODE[68] = [ // Klaus and Komarek*
- [ vm_klaus_and_komarek ],
- [ vm_prompt, 'Prague' ],
- [ vm_remove_x_opp_infl, 2 ],
- [ vm_valid_spaces, 29 ],
- [ vm_add_x_infl, 2 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[69] = [ // Systematization*
- [ vm_valid_spaces_country, 'Romania' ],
- [ vm_systematization ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[70] = [ // Securitate*
- [ vm_securitate ],
- [ vm_return ],
-]
-
-CODE[71] = [ // Kiss of Death*
- [ vm_permanently_remove ],
- [ vm_kiss_of_death ],
- [ vm_return ],
-]
-
-CODE[72] = [ // Peasant Parties Revolt
- [ vm_peasant_parties_revolt ],
- [ vm_return ],
-]
-
-CODE[73] = [ // Laszlo Tokes*
- [ vm_valid_spaces, 50, 56 ],
- [ vm_prompt, 'in Timisoara and Harghita/Covasna' ],
- [ vm_add_limited_infl, 2, 1 ],
- [ vm_laszlo_tokes ],
- [ vm_if, ()=>game.phase === 3 ],
- [ vm_prompt, ' in Romania' ],
- [ vm_add_infl ],
- [ vm_else ],
- [ vm_prompt, 'make 2 Support Checks in Romania' ],
- [ vm_support_check, 2 ],
- [ vm_endif ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[74] = [ // FRG Embassies
- [ vm_frg_embassies ],
- [ vm_return ],
-]
-
-CODE[75] = [ // Exit Visas*
- [ vm_exit_visas ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[76] = [ // Warsaw Pact Summit
- [ vm_warsaw_pact_summit ],
- [ vm_if, ()=>game.phase === 3 ],
- [ vm_prompt, ' spaces with no Democratic SPs' ],
- [ vm_add_infl_free, 4 ],
- [ vm_else ],
- [ vm_prompt, 'Select a Student or Intellectual space' ],
- [ vm_valid_spaces_country_socio_2, 3,, 4 ],
- [ vm_support_check_modified, 2, 2 ],
- [ vm_endif ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[77] = [ // Samizdat
- [ vm_samizdat ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[78] = [ // Workers Revolt
- [ vm_workers_revolt ],
- [ vm_return ],
-]
-
-CODE[79] = [ // The Third Way*
- [ vm_the_third_way ],
- [ vm_valid_spaces, 4 ],
- [ vm_prompt, 'the East German Writers space' ],
- [ vm_add_x_infl, 3 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[80] = [ // Nepotism*
- [ vm_nepotism ],
- [ vm_valid_spaces_region_socio, 'Balkans', 4 ],
- [ vm_prompt, 'Worker spaces in the Balkans' ],
- [ vm_add_infl_free ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[81] = [ // The Baltic Way*
- [ vm_the_baltic_way ],
- [ vm_prompt, 'any Minorities space' ],
- [ vm_take_control_prep, 1 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[82] = [ // Spitzel*
- [ vm_valid_spaces_country_opp, 'East_Germany' ],
- [ vm_prompt, ' from East Germany' ],
- [ vm_remove_opp_infl, 2 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[83] = [ // Modrow*
- [ vm_modrow ],
- [ vm_valid_spaces_country, 'East_Germany' ],
- [ vm_prompt, 'East Germany' ],
- [ vm_add_limited_infl, 4, 2 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[84] = [ // Breakaway Baltic Republics*
- [ vm_breakaway_baltic_republics ],
- [ vm_prompt, 'any Minorities space' ],
- [ vm_take_control_prep, 1 ],
- [ vm_valid_spaces_sc ],
- [ vm_prompt, 'select a space for the support check' ],
- [ vm_1_support_check ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[85] = [ // Tank Column/Tank Man*
- [ vm_tank_column ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[86] = [ // The Wall Must Go!*
- [ vm_the_wall_must_go ],
- [ vm_remove_infl, 3 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[87] = [ // Kohl Proposes Reunification*
- [ vm_kohl_proposes_reunification ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[88] = [ // Adamec*
- [ vm_adamec ],
- [ vm_valid_spaces_country, 'Czechoslovakia' ],
- [ vm_prompt, 'Czechoslovakia' ],
- [ vm_add_limited_infl, 4, 2 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[89] = [ // Domino Theory*
- [ vm_prompt, 'Domino Theory: choose a Power Struggle card to play from the discard pile.' ],
- [ vm_domino_theory ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[90] = [ // Civic Forum*
- [ vm_valid_spaces_country, 'Czechoslovakia' ],
- [ vm_prompt, 'Czechoslovakia' ],
- [ vm_add_infl_free, 4 ],
- [ vm_civic_forum ],
- [ vm_valid_spaces_country_sc, 'Czechoslovakia' ],
- [ vm_prompt, 'Select a space in Czechoslovakia' ],
- [ vm_support_check, 2 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[91] = [ // My First Banana*
- [ vm_valid_spaces_country_opp, 'East_Germany' ],
- [ vm_prompt, ' from East Germany' ],
- [ vm_remove_opp_infl, 2 ],
- [ vm_valid_spaces_country_sc, 'East_Germany' ],
- [ vm_prompt, 'select a space in East Germany' ],
- [ vm_support_check, 2 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[92] = [ // Betrayal
- [ vm_prompt, 'choose any Orthodox Church space. Replace all Democratic SPs with Communist SPs' ],
- [ vm_betrayal ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[93] = [ // Shock Therapy*
- [ vm_shock_therapy ],
- [ vm_valid_spaces_country ],
- [ vm_prompt, ()=>` ${country_name(game.vm_active_country)}` ],
- [ vm_add_infl_free, 3 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[94] = [ // Union of Democratic Forces*
- [ vm_valid_spaces_country_opp, 'Bulgaria' ],
- [ vm_prompt, ' from Bulgaria' ],
- [ vm_remove_opp_infl, 4 ],
- [ vm_valid_spaces_country_sc, 'Bulgaria' ],
- [ vm_prompt, 'Make 2 Support Checks in Bulgaria' ],
- [ vm_support_check, 2 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[95] = [ // Power Struggle - Romania
- [ vm_power_struggle ],
- [ vm_return ],
-]
-
-CODE[96] = [ // The Chinese Solution*
- [ vm_the_chinese_solution ],
- [ vm_valid_spaces_country_sc ],
- [ vm_prompt, ()=>`Make 5 Support Checks in ${country_name(game.vm_active_country)}` ],
- [ vm_support_check_modified, 5, 3 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[97] = [ // The Tyrant is Gone*
- [ vm_if, ()=>game.persistent_events['the_crowd_turns_against_ceausescu'] ],
- [ vm_valid_spaces, 51 ],
- [ vm_prompt, 'the Romanian Elite Space' ],
- [ vm_remove_x_opp_infl, 4 ],
- [ vm_the_tyrant_is_gone ],
- [ vm_permanently_remove ],
- [ vm_else ],
- [ vm_the_tyrant_is_gone_prep ],
- [ vm_endif ],
- [ vm_return ],
-]
-
-CODE[98] = [ // Politburo Intrigue*
- [ vm_valid_spaces_country_opp, 'Bulgaria' ],
- [ vm_prompt, ' from Bulgaria' ],
- [ vm_remove_limited_opp_infl, 3, 2 ],
- [ vm_valid_spaces_country_sc, 'Bulgaria' ],
- [ vm_prompt, 'make a support check in Bulgaria' ],
- [ vm_1_support_check ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[99] = [ // Ligachev*
- [ vm_ligachev ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[100] = [ // Stand Fast*
- [ vm_stand_fast ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[101] = [ // Elena*
- [ vm_if, ()=>!game.the_tyrant_is_gone ],
- [ vm_valid_spaces, 51 ],
- [ vm_prompt, 'the Romania Elite Space' ],
- [ vm_add_x_infl, 2 ],
- [ vm_endif ],
- [ vm_elena ],
- [ vm_return ],
-]
-
-CODE[102] = [ // National Salvation Front*
- [ vm_national_salvation_front ],
- [ vm_return ],
-]
-
-CODE[103] = [ // Government Resigns*
- [ vm_government_resigns ],
- [ vm_prompt, 'any uncontrolled Elite space' ],
- [ vm_remove_all_infl, 1 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[104] = [ // New Year's Eve Party*
- [ vm_new_years_eve_party ],
- [ vm_return ],
-]
-
-CODE[105] = [ // Public Against Violence*
- [ vm_valid_spaces, 36, 37 ],
- [ vm_prompt, 'Kosice and Presov' ],
- [ vm_add_x_infl, 2 ],
- [ vm_valid_spaces, 36, 37 ],
- [ vm_add_x_infl, 2 ],
- [ vm_public_against_violence ],
- [ vm_prompt, 'Make a Support Check in Bratislava' ],
- [ vm_support_check_modified, 1, 2 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[106] = [ // Social Democratic Platform Adopted*
- [ vm_social_democratic_platform_adopted ],
- [ vm_valid_spaces_country ],
- [ vm_prompt, ()=>`${country_name(game.vm_active_country)}` ],
- [ vm_add_infl_free, 2 ],
- [ vm_valid_spaces_country_sc ],
- [ vm_prompt, ()=>`make a Support Check in ${country_name(game.vm_active_country)}` ],
- [ vm_1_support_check ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[107] = [ // Massacre in Timisoara*
- [ vm_if, ()=>!game.the_tyrant_is_gone ],
- [ vm_massacre_in_timisoara ],
- [ vm_valid_spaces_country_sc, 'Romania' ],
- [ vm_prompt, 'Make Support Checks in Romania' ],
- [ vm_support_check_modified, 2, 2 ],
- [ vm_endif ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[108] = [ // Army Backs Revolution*
- [ vm_army_backs_revolution ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[109] = [ // Kremlin Coup*
- [ vm_kremlin_coup ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-
-CODE[110] = [ // Malta Summit*
- [ vm_malta_summit ],
- [ vm_prompt, ' from Elite spaces' ],
- [ vm_remove_opp_infl, 5 ],
- [ vm_permanently_remove ],
- [ vm_return ],
-]
-// #endregion
-
-
-// ============= TIANANMEN SQUARE TRACK AWARDS ====================
-CODE[203] = [//Tiananmen Square space 3 award
- [vm_tst_3],
- [vm_return]
-]
-CODE[204] = [//Tiananmen Square space 4 award
- [vm_valid_spaces_opponent],
- [vm_tst_4],
- [vm_return]
-]
-CODE[206] = [//Tiananmen Square space 6
- [vm_valid_spaces_sc],
- [vm_tst_6],
- [vm_return]
-]
-CODE[208] = [//Tiananmen Square space 8 event
- [vm_tst_8],
- [vm_return]
-]
-
-// ============= POWER STRUGGLE WILDCARDS =========================
-
-CODE[349] = [//Scare Tactics
- [vm_scare_tactics],
- [vm_valid_spaces_country_opp],
- [vm_prompt, ()=>` from ${country_name(game.vm_active_country)}`],
- [vm_remove_opp_infl, 1],
- [vm_return]
-]
-CODE[350] = [//Support Surges
- [vm_support_surges],
- [vm_return]
-]
-CODE[351] = [//Support Falters
- [vm_support_falters],
- [vm_return]
-]
+"use strict"
+
+// vim:set foldmethod=marker:
+
+const { spaces, cards, power_cards } = require("./data.js")
+
+var game, view, states = {}
+
+const DEM = "Democrat"
+const COM = "Communist"
+
+const first_strategy_card = 1
+const last_strategy_card = 110
+
+// BEGIN CONSTANTS {{{
+
+// SPACES
+const S_SCHWERIN = 0
+const S_ROSTOCK = 1
+const S_BERLIN = 2
+const S_GERMAN_WRITERS = 3
+const S_WALTER_ULBRICHT_ACADEMY = 4
+const S_LUTHERAN_CHURCH = 5
+const S_MAGDEBURG = 6
+const S_HALLE = 7
+const S_LEIPZIG = 8
+const S_ERFURT = 9
+const S_KARL_MARX_STADT = 10
+const S_DRESDEN = 11
+const S_SZCZECIN = 12
+const S_GDANSK = 13
+const S_BYDGOSZCZ = 14
+const S_POZNAN = 15
+const S_WARSZAWA = 16
+const S_BIALYSTOK = 17
+const S_WROCLAW = 18
+const S_CATHOLIC_CHURCH_POLAND = 19
+const S_LODZ = 20
+const S_KATOWICE = 21
+const S_KRAKOW = 22
+const S_LUBLIN = 23
+const S_JAGIELLONIAN_UNIVERSITY = 24
+const S_POLISH_WRITERS = 25
+const S_PLZEN = 26
+const S_CESKE_BUDEJOVICE = 27
+const S_PRAHA = 28
+const S_CHARLES_UNIVERSITY = 29
+const S_CZECH_WRITERS = 30
+const S_BRNO = 31
+const S_OSTRAVA = 32
+const S_BRATISLAVA = 33
+const S_CATHOLIC_CHURCH_CZECHOSLOVAKIA = 34
+const S_PRESOV = 35
+const S_KOSICE = 36
+const S_CATHOLIC_CHURCH_HUNGARY = 37
+const S_GYOR = 38
+const S_TATABANYA = 39
+const S_MISKOLC = 40
+const S_DEBRECEN = 41
+const S_SZOMBATHELY = 42
+const S_SZEKESFEHERVAR = 43
+const S_BUDAPEST = 44
+const S_HUNGARIAN_WRITERS = 45
+const S_EOTVOS_LORAND_UNIVERSITY = 46
+const S_SZEGED = 47
+const S_PECS = 48
+const S_TIMISOARA = 49
+const S_CLUJ_NAPOCA = 50
+const S_TARGU_MURES = 51
+const S_IASI = 52
+const S_BABES_BOLYAI_UNIVERSITY = 53
+const S_ROMANIAN_WRITERS = 54
+const S_HARGHITA_COVASNA = 55
+const S_BRASOV = 56
+const S_ORTHODOX_CHURCH_ROMANIA = 57
+const S_PLOIESTI = 58
+const S_CRAIOVA = 59
+const S_BUCURESTI = 60
+const S_GALATI = 61
+const S_CONSTANTA = 62
+const S_PLEVEN = 63
+const S_ORTHODOX_CHURCH_BULGARIA = 64
+const S_RUSE = 65
+const S_SOFIA_UNIVERSITY = 66
+const S_SOFIA = 67
+const S_STARA_ZAGORA = 68
+const S_RAZGRAD = 69
+const S_BURGAS = 70
+const S_VARNA = 71
+const S_BULGARIAN_WRITERS = 72
+const S_PLOVDIV = 73
+const S_SLIVEN = 74
+
+// CARDS
+const C_LEGACY_OF_MARTIAL_LAW = 1
+const C_SOLIDARITY_LEGALIZED = 2
+const C_WALESA = 3
+const C_MICHNIK = 4
+const C_GENERAL_STRIKE = 5
+const C_BROUGHT_IN_FOR_QUESTIONING = 6
+const C_STATE_RUN_MEDIA = 7
+const C_PRUDENCE = 8
+const C_THE_WALL = 9
+const C_CULT_OF_PERSONALITY = 10
+const C_DISSIDENT_ARRESTED = 11
+const C_APPARATCHIKS = 12
+const C_STASI = 13
+const C_GORBACHEV_CHARMS_THE_WEST = 14
+const C_HONECKER = 15
+const C_NOMENKLATURA = 16
+const C_ROUNDTABLE_TALKS = 17
+const C_POSZGAY_DEFENDS_THE_REVOLUTION = 18
+const C_PAPAL_VISIT = 19
+const C_DEUTSCHE_MARKS = 20
+const C_COMMON_EUROPEAN_HOME = 21
+const C_POWER_STRUGGLE_POLAND = 22
+const C_POWER_STRUGGLE_HUNGARY = 23
+const C_ST_NICHOLAS_CHURCH = 24
+const C_PERESTROIKA = 25
+const C_HELSINKI_FINAL_ACT = 26
+const C_CONSUMERISM = 27
+const C_FACTORY_PARTY_CELLS = 28
+const C_JAN_PALACH_WEEK = 29
+const C_TEAR_GAS = 30
+const C_INTELLIGENTSIA = 31
+const C_PEASANT_PARTIES = 32
+const C_SAJUDIS = 33
+const C_FIDESZ = 34
+const C_HEAL_OUR_BLEEDING_WOUND = 35
+const C_DASH_FOR_THE_WEST = 36
+const C_NAGY_REBURIED = 37
+const C_THE_JULY_CONCEPT = 38
+const C_ECO_GLASNOST = 39
+const C_HUNGARIAN_DEMOCRATIC_FORUM = 40
+const C_CEAUSESCU = 41
+const C_POWER_STRUGGLE_EAST_GERMANY = 42
+const C_POWER_STRUGGLE_BULGARIA = 43
+const C_INFLATIONARY_CURRENCY = 44
+const C_SOVIET_TROOP_WITHDRAWALS = 45
+const C_GOODBYE_LENIN = 46
+const C_BULGARIAN_TURKS_EXPELLED = 47
+const C_WE_ARE_THE_PEOPLE = 48
+const C_FOREIGN_CURRENCY_DEBT_BURDEN = 49
+const C_THE_SINATRA_DOCTRINE = 50
+const C_40TH_ANNIVERSARY_CELEBRATION = 51
+const C_NORMALIZATION = 52
+const C_LI_PENG = 53
+const C_THE_CROWD_TURNS_AGAINST_CEAUSESCU = 54
+const C_POWER_STRUGGLE_CZECHOSLOVAKIA = 55
+const C_FOREIGN_TELEVISION = 56
+const C_CENTRAL_COMMITTEE_RESHUFFLE = 57
+const C_AUSTRIA_HUNGARY_BORDER_REOPENED = 58
+const C_GRENZTRUPPEN = 59
+const C_TOXIC_WASTE = 60
+const C_THE_MONDAY_DEMONSTRATIONS = 61
+const C_YAKOVLEV_COUNSELS_GORBACHEV = 62
+const C_GENSCHER = 63
+const C_LEGACY_OF_1968 = 64
+const C_PRESIDENTIAL_VISIT = 65
+const C_NEW_FORUM = 66
+const C_REFORMER_REHABILITATED = 67
+const C_KLAUS_AND_KOMAREK = 68
+const C_SYSTEMATIZATION = 69
+const C_SECURITATE = 70
+const C_KISS_OF_DEATH = 71
+const C_PEASANT_PARTIES_REVOLT = 72
+const C_LASZLO_TOKES = 73
+const C_FRG_EMBASSIES = 74
+const C_EXIT_VISAS = 75
+const C_WARSAW_PACT_SUMMIT = 76
+const C_SAMIZDAT = 77
+const C_WORKERS_REVOLT = 78
+const C_THE_THIRD_WAY = 79
+const C_NEPOTISM = 80
+const C_THE_BALTIC_WAY = 81
+const C_SPITZEL = 82
+const C_MODROW = 83
+const C_BREAKAWAY_BALTIC_REPUBLICS = 84
+const C_TANK_COLUMN_TANK_MAN = 85
+const C_THE_WALL_MUST_GO = 86
+const C_KOHL_PROPOSES_REUNIFICATION = 87
+const C_ADAMEC = 88
+const C_DOMINO_THEORY = 89
+const C_CIVIC_FORUM = 90
+const C_MY_FIRST_BANANA = 91
+const C_BETRAYAL = 92
+const C_SHOCK_THERAPY = 93
+const C_UNION_OF_DEMOCRATIC_FORCES = 94
+const C_POWER_STRUGGLE_ROMANIA = 95
+const C_THE_CHINESE_SOLUTION = 96
+const C_THE_TYRANT_IS_GONE = 97
+const C_POLITBURO_INTRIGUE = 98
+const C_LIGACHEV = 99
+const C_STAND_FAST = 100
+const C_ELENA = 101
+const C_NATIONAL_SALVATION_FRONT = 102
+const C_GOVERNMENT_RESIGNS = 103
+const C_NEW_YEARS_EVE_PARTY = 104
+const C_PUBLIC_AGAINST_VIOLENCE = 105
+const C_SOCIAL_DEMOCRATIC_PLATFORM_ADOPTED = 106
+const C_MASSACRE_IN_TIMISOARA = 107
+const C_ARMY_BACKS_REVOLUTION = 108
+const C_KREMLIN_COUP = 109
+const C_MALTA_SUMMIT = 110
+
+// END CONSTANTS }}}
+
+const dem_tst_req = [5, 5, 6, 6, 7, 8, 9, 10]
+const com_tst_req = [6, 6, 7, 7, 8, 7, 6, 5]
+const scoring_cards = [22, 23, 42, 43, 55, 95]
+const leader_cards = [37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48]
+const rallies = [1, 2, 3, 4, 5, 6]
+const petitions = [31, 32, 33, 34, 35, 36]
+const wildcards = [49, 50, 51, 52]
+const elite_leaders = [37, 38, 39, 40]
+const leaders = [1, 4, 5, 6, 7]
+const support_loss_roll = [0, 0, 1, 1, 2, 2, 3, 4]
+const vp_roll = [0, 0, 1, 1, 2, 2, 3, 4]
+const countries = ['Poland', 'Hungary', 'East_Germany', 'Bulgaria', 'Czechoslovakia', 'Romania']
+const elite_spaces = [11, 14, 26, 42, 50, 68]
+const all_power_cards = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52 ]
+const numberless_cards = [1, 2, 3, 4, 5, 6, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52 ]
+const auto_resolve_events = [5, 8, 9, 13, 17, 25, 26, 30, 35, 50, 53, 54, 58, 59, 62, 63, 65, 70, 72, 74, 86, 99, 102, 108]
+const switch_events = [6, 20, 71]
+const one_turn_events = [ 8, 13, 25, 50, 63, 74, 49, 58, 59, 100, 101 ]
+const dem_asterisks = [2, 3, 4, 5, 19, 24, 26, 29, 33, 34, 36, 39, 40, 45, 46, 48, 49, 50, 54, 56, 58, 60, 61, 62, 63, 64, 65, 66, 68, 71, 72, 73, 74, 75, 77, 81, 84, 86, 87, 89, 90, 91, 93, 94, 97, 103, 105, 108, 110]
+
+const PC_TACTIC_FAILS = 52
+const PC_SUPPORT_FALTERS = 49
+const THE_CROWD_TURNS_AGAINST_CEAUSESCU_OCCURRED = 540
+const THE_TYRANT_IS_GONE_OCCURRED = 970
+
+// COUNTRY CONSTANTS
+
+const S_EAST_GERMANY = [0,1,2,3,4,5,6,7,8,9,10,11]
+const S_POLAND = [12,13,14,15,16,17,18,19,20,21,22,23,24,25]
+const S_CZECHOSLOVAKIA = [26,27,28,29,30,31,32,33,34,35,36]
+const S_HUNGARY = [37,38,39,40,41,42,43,44,45,46,47,48]
+const S_ROMANIA = [49,50,51,52,53,54,55,56,57,58,59,60,61,62]
+const S_BULGARIA = [63,64,65,66,67,68,69,70,71,72,73,74]
+
+exports.scenarios = [ "Standard" ]
+
+exports.roles = [ DEM, COM ]
+
+// --- SET UP ---
+
+exports.setup = function (seed, scenario, options) {
+ game = {
+ seed: seed,
+ log: [],
+ undo: [],
+ summary: [],
+ active: null,
+ state: 'place_starting_infl',
+ state: 'place_starting_infl',
+ return: '',
+ vm: null,
+ vm_event: 0,
+
+ played_card: 0,
+ available_ops: 0,
+ vm_available_ops: 0,
+ valid_spaces: [],
+ valid_cards: [],
+
+ vp: 0,
+ turn: 0,
+ round: 0,
+ round_player: COM,
+ stability: 0,
+ dem_tst_position: 0,
+ com_tst_position: 0,
+ dem_tst_attempted: 0,
+ com_tst_attempted: 0,
+ dem_tst_attempted_this_turn: 0,
+ com_tst_attempted_this_turn: 0,
+
+ demInfl: [],
+ comInfl: [],
+
+ strategy_deck: [],
+ strategy_discard: [],
+ discard: false,
+ view_opp_hand: false,
+ strategy_removed: [],
+ persistent_events: [],
+ power_struggle_deck: [],
+ power_struggle_discard: [],
+ dem_hand_limit: 8,
+ com_hand_limit: 8,
+ democrat_hand: [],
+ communist_hand: [],
+
+ is_pwr_struggle: false,
+ dem_pwr_hand_limit: 0,
+ com_pwr_hand_limit: 0,
+ dem_pwr_hand: [],
+ com_pwr_hand: [],
+ times_held: [0, 0, 0, 0, 0, 0],
+ revolutions: [false, false, false, false, false, false],
+ }
+
+ log_h1("1989 Dawn of Freedom")
+ game.active = COM
+ start_game()
+ return game
+}
+
+function start_game() {
+ // Draw cards
+ game.strategy_deck = draw_deck()
+
+ //Set starting influence
+ spaces.forEach((space, index) => {
+ game.demInfl[index] = space.demInfl
+ game.comInfl[index] = space.comInfl
+ })
+
+ //Set starting placement ops
+ game.starting_infl = [2, 3, 3, 4, 2]
+ game.temp = 0
+
+ // Set variable event cards where event is playable at start of game
+
+ game.playable_cards = [C_THE_WALL, C_GORBACHEV_CHARMS_THE_WEST, C_HONECKER, C_COMMON_EUROPEAN_HOME, C_MALTA_SUMMIT]
+
+ draw_cards(game.strategy_deck, game.democrat_hand, game.communist_hand, game.dem_hand_limit, game.com_hand_limit)
+
+ valid_spaces_setup()
+ game.available_ops = 2
+ log_h1("Place starting Support Points")
+ log_side()
+}
+
+exports.view = function(state, player) {
+ game = state
+
+ view = {
+ log: game.log,
+ active: game.active,
+ prompt: null,
+ actions: null,
+
+ played_card: game.played_card,
+ valid_spaces: game.valid_spaces,
+ valid_cards: game.valid_cards,
+
+ demInfl: game.demInfl,
+ comInfl: game.comInfl,
+ turn: game.turn,
+ round: game.round,
+ round_player: game.round_player,
+ vp: game.vp,
+ stability: game.stability,
+ dem_tst: game.dem_tst_position,
+ com_tst: game.com_tst_position,
+ persistent_events: game.persistent_events,
+ systematization: game.systematization,
+ the_tyrant_is_gone: game.the_tyrant_is_gone,
+
+ strategy_deck: game.strategy_deck.length,
+ strategy_removed: game.strategy_removed,
+ discard: game.discard,
+ show_opp_hand: game.view_opp_hand, /* Is this still needed?*/
+
+ democrat_hand: game.democrat_hand.length,
+ communist_hand: game.communist_hand.length,
+ democrat_power_hand: game.dem_pwr_hand.length,
+ communist_power_hand: game.com_pwr_hand.length,
+ ceausescu_cards: game.ceausescu_cards,
+ is_pwr_struggle: game.is_pwr_struggle,
+ times_held: game.times_held,
+ revolutions: game.revolutions,
+
+ hand: [],
+ set_aside: [],
+ pwr_hand: [],
+ }
+
+ if (game.is_pwr_struggle) {
+ view.power_struggle_discard = game.power_struggle_discard
+ view.played_power_card = game.played_power_card
+ view.power_card_1 = game.power_card_1
+ view.power_card_2 = game.power_card_2
+ }
+ view.strategy_discard = game.strategy_discard
+
+
+ if (player === game.active && game.vm && game.vm.draw)
+ view.drawn = game.vm.draw
+
+ if (player === game.active) {
+ if (game.selected_space >= 0)
+ view.selected_space = game.selected_space
+ }
+
+ if (player === DEM) {
+ view.hand = game.democrat_hand
+ if (game.communist_hand_red) {
+ view.opp_hand = game.communist_hand_red
+ }
+ view.set_aside = game.democrat_set_aside /*Is this being used? */
+ view.power_hand = [...game.dem_pwr_hand].sort((a, b) => a - b)
+
+ } else if (player === COM) {
+ view.hand = game.communist_hand
+ if (game.opp_power_hand && game.pwr_struggle_in === 'Romania') {view.opp_power_hand = [...game.dem_pwr_hand].sort((a, b) => a - b) }
+ view.power_hand = [...game.com_pwr_hand].sort((a, b) => a - b)
+ }
+
+ if (player === DEM) {
+ view.samizdat = game.samizdat_card
+ }
+
+ if (game.state === "game_over") {
+ view.prompt = game.victory
+ } else if (player === "Observer" || (game.active !== player && game.active !== "Both")) {
+ if (states[game.state]) {
+ let inactive = states[game.state].inactive
+ if (typeof inactive === "function")
+ view.prompt = `Waiting for ${game.active} ${inactive()}`
+ else
+ view.prompt = `Waiting for ${game.active} to ${inactive}`
+ } else {
+ view.prompt = "A Unknown state: " + game.state
+ }
+ } else {
+ view.actions = {}
+
+ if (states[game.state])
+ states[game.state].prompt(player)
+ else
+ view.prompt = "B Unknown state: " + game.state
+ if (view.actions.undo === undefined) {
+ if (game.undo && game.undo.length > 0)
+ view.actions.undo = 1
+ else
+ view.actions.undo = 0
+ }
+ }
+ return view
+}
+
+// === ACTIONS ===========
+
+function gen_action(action, argument) {
+ if (argument === undefined) {
+ view.actions[action] = 1
+ } else {
+ if (!(action in view.actions)) {
+ view.actions[action] = []
+ }
+ view.actions[action].push(argument)
+ }
+}
+
+function gen_action_space(space){
+ gen_action("space", space)
+}
+
+function gen_action_card(card){
+ gen_action("card", card)
+}
+
+function gen_action_power_card(card){
+ gen_action("power_card", card)
+}
+
+exports.action = function (state, player, action, arg) {
+ game = state
+ if (states[game.state] && action in states[game.state]) {
+ states[game.state][action](arg, player)
+ } else {
+ if (action === "undo" && game.undo && game.undo.length > 0)
+ pop_undo()
+ else
+ throw new Error("Invalid action: " + action)
+ }
+ return game
+}
+
+// ============= GAME STATES =======================
+
+states.place_starting_infl = {
+ inactive: 'place starting SPs.',
+ prompt() {
+ if (game.temp === 4 && game.available_ops === 0 ) {
+ view.prompt = 'Place starting SPs: done. Start Turn 1.';
+ gen_action("start");
+ } else if (game.available_ops === 0) {
+ view.prompt = 'Place starting SPs: done.';
+ gen_action("done");
+ return;
+ } else if (game.temp > 2) {
+ view.prompt = `Place your last ${pluralize(game.available_ops,'starting SP')}.`
+ } else {
+ view.prompt = `Place ${pluralize(game.available_ops,'starting SP')}.`
+ }
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ },
+ space(space) {
+ add_infl(space, 'available_ops')
+ },
+ done() {
+ do_log_summary()
+ game.temp ++
+ game.available_ops = game.starting_infl[game.temp]
+ next_player()
+ valid_spaces_setup()
+ },
+ start() {
+ do_log_summary()
+ delete game.starting_infl
+ new_turn()
+ clear_undo()
+ game.state = 'choose_card'
+ }
+}
+
+states.choose_card = {
+ inactive: 'choose a card.',
+ prompt() {
+ if ((game.active===DEM && game.democrat_hand.length === 0) || game.active === COM && game.communist_hand.length === 0) {
+ view.prompt = 'No cards remaining: you must pass.'
+ gen_action('pass')
+ } else {
+ view.prompt = 'Choose a card.'
+ let available_cards
+ if (game.active === DEM) {
+ available_cards = game.democrat_hand
+ } else {
+ available_cards = game.communist_hand
+ }
+ for (let card of available_cards) {
+ gen_action_card(card)
+ }
+ }
+ },
+ card(card) {
+ push_undo()
+
+ //Check if player is at risk of losing game due to held scoring card
+ if (!scoring_cards.includes(card)) {
+ let scoring_cards_count = count_scoring_cards()
+
+ if (game.round !== 8 && scoring_cards_count >= (8-game.round)){
+ game.temp = card
+ game.state = 'confirm_card'
+ return
+ }
+ }
+ select_card(card)
+ },
+ pass() {
+ log('No cards remaining. Passed')
+ game.state = 'end_round'
+ }
+}
+
+states.confirm_card = {
+ inactive: 'choose a card.',
+ prompt() {
+ let scoring_cards_count = count_scoring_cards()
+ view.prompt = `${pluralize(scoring_cards_count,'scoring card')} in hand with ${pluralize(8-game.round,'Action Round')} remaining. Scoring cards may not be held. Continue?`
+ gen_action('continue')
+ },
+ continue() {
+ select_card(game.temp)
+ }
+}
+
+states.play_card ={
+ get inactive() {
+ return `play ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt () {
+ view.prompt = `Play ${clean_name(cards[game.played_card].name)} for:`
+
+ if (scoring_cards.includes(game.played_card)) {
+ gen_action('event')
+ return
+ }
+
+ // Check for Reformer Rehabilitated
+ if (game.played_card === C_REFORMER_REHABILITATED && game.playable_cards.includes(C_REFORMER_REHABILITATED)){
+ if (game.active === DEM && (game.dem_tst_position > game.com_tst_position)) {
+ gen_action('event')
+ }
+ if (game.active === COM && (game.dem_tst_position < game.com_tst_position)) {
+ gen_action('event')
+ }
+ }
+
+ //Check for events
+ if (event_is_playable(game.played_card)) {
+ if ((game.active === DEM && cards[game.played_card].side === 'C' && game.dem_tst_position >= 7 && game.com_tst_position < 7 && !game.tst_7) || (game.active === COM && cards[game.played_card].side === 'D' && game.com_tst_position >= 7 && game.dem_tst_position < 7 && !game.tst_7)){
+ gen_action('tst_7')
+ }
+ if ((game.active === DEM && cards[game.played_card].side !== 'C' && game.dem_tst_position >= 8 && game.com_tst_position < 8 && !game.tst_8) || (game.active === COM && cards[game.played_card].side !== 'D' && game.com_tst_position >= 8 && game.dem_tst_position < 8 && !game.tst_8)){
+ gen_action('tst_8')
+ }
+
+ //Continue with normal logic
+ get_events(game.played_card)
+ }
+
+ gen_action('influence')
+ gen_action('support_check')
+
+ if ((game.active === DEM && game.dem_tst_attempted_this_turn === 0 && game.dem_tst_position < 8 ) || (game.active === COM && game.com_tst_attempted_this_turn === 0 && game.com_tst_position < 8)) {
+ gen_action('tst')
+ }
+ },
+ event() {
+ push_undo()
+ log_gap(`Played C${game.played_card} for the event`)
+ game.vm_infl_to_do = false
+ game.return = game.active
+ if (switch_events.includes(game.played_card)) {next_player()}
+ game.vm_event = game.played_card
+ goto_vm(game.vm_event)
+ },
+ opp_event() {
+ push_undo()
+ log_gap(`Played C${game.played_card} for the event`)
+ game.vm_infl_to_do = true
+ game.return = game.active
+ game.vm_event = game.played_card
+ if (is_auto_resolve(game.played_card) || switch_events.includes(game.played_card)) {
+ goto_vm(game.vm_event)}
+ else {
+ next_player()
+ log(`C${game.vm_event}:`)
+ goto_vm(game.vm_event)
+ }
+ },
+ influence() {
+ push_undo()
+ log_gap(`Played C${game.played_card} to place SPs`)
+ finish_play_card()
+
+ // If ABHR - Set AHBR tracker to true
+ if (game.persistent_events.includes(58)) {
+ game.austria_hungary_border_reopened_tracker = true
+ }
+ game.state='add_influence'
+ valid_spaces_infl()
+ },
+ tst() {
+ push_undo()
+ log_gap(`Played C${game.played_card} to the Tiananmen Square Track`)
+ finish_play_card()
+ game.state='tiananmen_square_attempt'
+ },
+ support_check() {
+ push_undo()
+ log_gap(`Played C${game.played_card} for support checks`)
+ finish_play_card()
+ game.available_ops = 2
+ game.state='support_check_prep'
+ valid_spaces_sc()
+ },
+ tst_7() { /*Cancel opponent event */
+ push_undo()
+ log(`Played C${game.played_card}. Event cancelled using TST Award`)
+ game.tst_7 = true
+ game.vm_infl_to_do = true
+ game.state = 'resolve_opponent_event'
+ },
+ tst_8() { /*Play card for ops and event */
+ push_undo()
+ game.vm_event_to_do = true
+ game.vm_infl_to_do = true
+ game.tst_8 = true
+ log(`Played C${game.played_card} for event and operations`)
+ game.state = 'vm_tst_8'
+ },
+ end_round () {
+ end_round()
+ }
+}
+
+states.resolve_opponent_event = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ if (game.vm_infl_to_do) {
+ view.prompt = 'Event resolved. Choose to play card for:'
+ gen_action('influence')
+ gen_action('support_check')
+ } else if (game.vm_event_to_do) {
+ // Check for Tiananmen Square Track ability - play opponent card without triggering event
+ if ((game.active === DEM && game.dem_tst_position >= 7 && game.com_tst_position < 7 && !game.tst_7) || (game.active === COM && game.com_tst_position >= 7 && game.dem_tst_position < 7 && !game.tst_7)){
+ gen_action('tst_7')
+ }
+ view.prompt = `${clean_name(cards[game.played_card].name)}: you must resolve the opponent event.`
+ gen_action('opp_event')
+ } else {
+ view.prompt = 'Event resolved. End the action round.'
+ gen_action('end_round')
+ }
+ },
+ influence(){
+ push_undo()
+ // If ABHR - Set AHBR tracker to true
+ if (game.persistent_events.includes(58)) {
+ game.austria_hungary_border_reopened_tracker = true
+ }
+ game.state = 'add_influence'
+ valid_spaces_infl()
+ },
+ support_check() {
+ push_undo()
+ game.available_ops = 2
+ game.state = 'support_check_prep'
+ valid_spaces_sc()
+ },
+ opp_event() {
+ game.vm_event_to_do = false
+ game.return_state = 'resolve_opponent_event'
+ game.vm_event = game.played_card
+ log(`Played C${game.played_card} for the event`)
+ if (is_auto_resolve(game.played_card) || switch_events.includes(game.played_card)) {
+ game.return = game.active
+ goto_vm(game.vm_event)}
+ else {
+ if (game.active === DEM) {
+ game.return = COM
+ } else {
+ game.return = DEM
+ }
+ next_player()
+ log(`C${game.played_card}:`)
+ goto_vm(game.vm_event)
+ }
+ },
+ tst_7() {
+ push_undo()
+ log('Event cancelled using TST Award')
+ game.tst_7 = true
+ game.vm_event_to_do = false
+ },
+ end_round() {
+ push_undo()
+ end_round()
+ }
+}
+
+states.add_influence = {
+ inactive: 'add SPs.',
+ prompt () {
+ if (game.available_ops <= 0) {
+ view.prompt = 'Place SPs: done.'
+ if (!game.vm_event_to_do) {
+ gen_action("end_round")
+ } else {
+ gen_action('done')
+ }
+ } else {
+ view.prompt = `Add SPs: ${game.available_ops} remaining.`
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ }
+ },
+ space(space) {
+ add_infl(space, 'available_ops')
+ },
+ end_round() {
+ push_undo()
+ do_log_summary()
+ end_round()
+ },
+ done() {
+ do_log_summary()
+ reset_austria_hungary_border_reopened()
+ game.state = 'resolve_opponent_event'
+ }
+}
+
+states.tiananmen_square_attempt = {
+ inactive: 'do Tiananmen Square Attempt.',
+ prompt () {
+ view.prompt = 'Tiananmen Square Track attempt: Roll a die.'
+ gen_action('roll')
+ },
+ roll() {
+ clear_undo()
+ game.vm_event_to_do = false
+ do_tst_attempt ()
+ }
+}
+
+states.tiananmen_square_attempt_success = {
+ inactive: 'do Tiananmen Square Attempt.',
+ prompt () {
+ if (game.vm_event > 200) {
+ view.prompt = 'Tiananmen Square Track attempt successful. Go to TST Award.'
+ gen_action('done')
+ } else {
+ view.prompt = 'Tiananmen Square Track attempt successful.'
+ gen_action('end_round')
+ }
+
+ },
+ done () {
+ push_undo()
+ goto_vm(game.vm_event)
+ },
+ end_round () {
+ push_undo()
+ end_round()
+ }
+}
+
+states.tiananmen_square_attempt_fail = {
+ inactive: 'do Tiananmen Square Attempt.',
+ prompt () {
+ view.prompt = 'Tiananmen Square Track attempt failed.'
+ gen_action('end_round')
+ },
+ end_round () {
+ push_undo()
+ end_round()
+ }
+}
+
+states.tiananmen_square_attempt_done = {
+ inactive: 'do Tiananmen Square Attempt.',
+ prompt () {
+ view.prompt = 'Tiananmen Square Track attempt: done.'
+ gen_action('end_round')
+ },
+ end_round () {
+ end_round()
+ }
+}
+
+states.tst_goddess = {
+ inactive: 'choose whether to discard a card.',
+ prompt() {
+ view.prompt = 'Tiananmen Square Track award: you may discard a non-Power Struggle Card and draw a replacement.'
+ for (let card of game.valid_cards) {
+ gen_action_card(card)
+ }
+ gen_action('pass')
+ },
+ card(card) {
+ push_undo()
+ discard(card)
+ game.valid_cards = []
+ game.state = 'tst_goddess_draw'
+ },
+ pass() {
+ log('Did not discard')
+ end_goddess()
+ },
+}
+
+states.tst_goddess_draw = {
+ inactive: 'choose whether to discard a card.',
+ prompt() {
+ view.prompt = 'Draw a replacement card.'
+ gen_action('draw')
+ },
+ draw() {
+ if (game.active === DEM) {
+ draw_cards(game.strategy_deck, game.democrat_hand, game.communist_hand, game.democrat_hand.length +1, game.communist_hand.length)
+ } else {
+ draw_cards(game.strategy_deck, game.democrat_hand, game.communist_hand, game.democrat_hand.length, game.communist_hand.length +1)
+ }
+ end_goddess()
+ }
+}
+
+states.support_check_prep = {
+ inactive: 'do support checks',
+ prompt () {
+ if (game.available_ops === 0) {
+ if (game.is_pwr_struggle) {
+ view.prompt = 'The Crowd Turns Against Ceausescu. Support checks: done.'
+ gen_action('done')
+ } else if (!game.vm_event_to_do) {
+ view.prompt = 'Support checks: done.'
+ gen_action('end_round')
+ } else {
+ view.prompt = 'Support checks: done.'
+ gen_action('done')
+ }
+ } else if (game.available_ops > 0) {
+ view.prompt = `Select a space. ${pluralize(game.available_ops, 'support check')} remaining.`
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id)
+ }
+ }
+ },
+ space(space) {
+ push_undo()
+ game.selected_space = space
+
+ // Check for Austria-Hungary Border Reopened - check on first support check only
+ if (game.persistent_events.includes(58)) {
+ if (game.active === DEM && game.available_ops > 1) {
+ if (spaces[game.selected_space].country === 'East_Germany' && game.persistent_events.includes(58) && game.active === DEM) {
+ game.state = 'austria_hungary_border_reopened_check'
+ return
+ }
+ }
+ }
+
+ game.state = 'do_support_check'
+ },
+ end_round() {
+ push_undo()
+ end_round()
+ },
+ done() {
+ push_undo()
+ if (game.is_pwr_struggle) {/*Crowd Turns Against Ceausescu should be the only time you end up here during a power struggle */
+ if (game.return !== game.active) {
+ next_player()
+ }
+ log_h2('Raise the Stakes')
+ game.state = 'raise_stakes_1'
+ return
+ }
+ reset_austria_hungary_border_reopened()
+ game.state = 'resolve_opponent_event'
+ }
+}
+
+states.do_support_check = {
+ inactive: 'do support checks.',
+ prompt () {
+ view.prompt = `Support check: ${spaces[game.selected_space].name_unique}. Roll a die.`
+ gen_action('roll')
+ },
+ roll() {
+ clear_undo()
+ do_sc(game.selected_space)
+ game.available_ops--
+ if (game.available_ops === 0) {
+ game.valid_spaces = []
+ }
+ if (check_vp()) {
+ return
+ } else {
+ game.state = 'support_check_prep'
+ return
+ }
+ }
+}
+
+states.austria_hungary_border_reopened_check = {
+ inactive: 'decide Austria-Hungary Border Reopened.',
+ prompt() {
+ view.prompt = 'Austria-Hungary Border Reopened: will both support checks be in East Germany?'
+ gen_action('yes')
+ gen_action('no')
+ },
+ yes() {
+ game.austria_hungary_border_reopened_tracker = true
+ game.state = 'do_support_check'
+ },
+ no() {
+ game.state = 'do_support_check'
+ }
+}
+
+states.end_round = {
+ inactive: 'finish playing a card.',
+ prompt() {
+ view.prompt = 'End the Action Round.'
+ gen_action('end_round')
+ },
+ end_round() {
+ push_undo()
+ end_round()
+ }
+}
+
+//======================= POWER STRUGGLE ===============================
+
+states.draw_power_cards = {
+ inactive: 'draw cards.',
+ prompt() {
+ view.prompt = `${clean_name(cards[this_card()].name)}: draw cards.`
+ gen_action('draw')
+ },
+ draw() {
+ push_undo()
+ game.power_struggle_deck = [...all_power_cards]
+ let presence = check_presence(game.pwr_struggle_in)
+ if (presence.dem_spaces > 0) {
+ game.dem_pwr_hand_limit = 6 + 2*(presence.dem_spaces - 1)
+ } else {
+ game.dem_pwr_hand_limit = 0
+ }
+ if (presence.com_spaces > 0 ) {
+ game.com_pwr_hand_limit = 6 + 2*(presence.com_spaces - 1)
+ } else {
+ game.com_pwr_hand_limit = 0
+ }
+ // Events which affect cards drawn
+ if (game.persistent_events.includes(C_ROUNDTABLE_TALKS) && game.com_pwr_hand_limit >= 2) {
+ log(`Democrat receives 2 cards from Communist due to C${C_ROUNDTABLE_TALKS}`)
+ game.dem_pwr_hand_limit += 2
+ game.com_pwr_hand_limit -= 2
+ game.persistent_events = game.persistent_events.filter(n => n !== C_ROUNDTABLE_TALKS)
+ game.strategy_discard.push(C_ROUNDTABLE_TALKS)
+ }
+
+ if (game.persistent_events.includes(C_PEASANT_PARTIES_REVOLT)) {
+ let farmer_check
+ for (let space of spaces) {
+ if (space && space.country === game.pwr_struggle_in && space.socio === 3 && check_dem_control(space.space_id)) {
+ farmer_check = true
+ }
+ }
+ if (farmer_check && game.com_pwr_hand_limit > 0) {
+ log(`Democrat receives 1 cards from Communist due to C${C_PEASANT_PARTIES_REVOLT}`)
+ game.dem_pwr_hand_limit += 1
+ game.com_pwr_hand_limit -= 1
+ permanently_remove(C_PEASANT_PARTIES_REVOLT)
+ }
+ }
+
+ if (game.persistent_events.includes(C_NATIONAL_SALVATION_FRONT) && game.dem_pwr_hand_limit >=2 && (game.pwr_struggle_in === 'Romania' || game.pwr_struggle_in === 'Bulgaria')) {
+ log(`Communist receives 2 cards from Democrat due to C${C_NATIONAL_SALVATION_FRONT}`)
+ game.dem_pwr_hand_limit -= 2
+ game.com_pwr_hand_limit += 2
+ permanently_remove(C_NATIONAL_SALVATION_FRONT)
+ }
+
+ //Draw Power Cards
+ game.is_pwr_struggle = true
+ draw_cards(game.power_struggle_deck, game.dem_pwr_hand, game.com_pwr_hand, game.dem_pwr_hand_limit, game.com_pwr_hand_limit)
+ if (game.active === DEM) {
+ game.valid_cards = [...game.dem_pwr_hand]
+ } else {
+ game.valid_cards = [...game.com_pwr_hand]
+ }
+
+ log(`Communist: ${game.com_pwr_hand.length} cards`)
+ log(`Democrat: ${game.dem_pwr_hand.length} cards`)
+
+ //Check if The Crowd Turns Against Ceausescu occurs
+ if (game.persistent_events.includes(C_THE_CROWD_TURNS_AGAINST_CEAUSESCU) && !game.persistent_events.includes(THE_CROWD_TURNS_AGAINST_CEAUSESCU_OCCURRED) && game.pwr_struggle_in === 'Romania') {
+ if (game.active === COM) {
+ game.return = COM
+ next_player()
+ }
+ log_h3(`C${C_THE_CROWD_TURNS_AGAINST_CEAUSESCU}`)
+ game.persistent_events.push(THE_CROWD_TURNS_AGAINST_CEAUSESCU_OCCURRED)
+ game.state = 'the_crowd_turns_against_ceausescu_prep'
+ } else {
+ log_h2('Raise the Stakes')
+ game.state = 'raise_stakes_1'
+ }
+ }
+}
+
+states.the_crowd_turns_against_ceausescu_prep = {
+ get inactive() {
+ return `resolve ${clean_name(cards[C_THE_CROWD_TURNS_AGAINST_CEAUSESCU].name)}.`
+ },
+ prompt() {
+ view.prompt = 'The Crowd Turns Against Ceausescu: draw cards.'
+ gen_action('draw')
+ },
+ draw() {
+ game.ceausescu_cards = []
+ draw_cards(game.power_struggle_deck, game.ceausescu_cards, game.com_pwr_hand, 15, game.com_pwr_hand.length)
+ game.temp = game.ceausescu_cards.filter(card => rallies.includes(card)).length
+ log(`Drew ${pluralize(game.temp, 'Rally in the Square')}.`)
+ game.vm_available_ops = game.temp * 3
+ log(`Democrat takes a ${game.vm_available_ops} Op Action Round`)
+ game.state = 'vm_the_crowd_turns_against_ceausescu'
+ }
+}
+
+states.vm_the_crowd_turns_against_ceausescu = {
+ get inactive() {
+ return `resolve ${clean_name(cards[C_THE_CROWD_TURNS_AGAINST_CEAUSESCU].name)}.`
+ },
+ prompt() {
+ view.prompt = `You have ${game.vm_available_ops} operations points. Play for:`
+ gen_action('influence')
+ gen_action('support_check')
+ },
+ influence() {
+ push_undo()
+ delete game.ceausescu_cards
+ valid_spaces_infl()
+ game.valid_spaces = game.valid_spaces.filter(n => spaces[n].country === 'Romania')
+ game.state = 'the_crowd_turns_against_ceausescu_infl' /* Send this to add_infl. Add check at end of add_infl similar to valid_spaces*/
+ },
+ support_check() {
+ push_undo()
+ delete game.ceausescu_cards
+ valid_spaces_sc()
+ game.available_ops = 2
+ game.state = 'support_check_prep'
+ }
+}
+
+states.the_crowd_turns_against_ceausescu_infl = {
+ inactive: 'add SPs.',
+ prompt () {
+ if (game.vm_available_ops === 0)
+ {
+ view.prompt = 'Place SPs: done.';
+ gen_action("done");
+ return;
+ }
+
+ view.prompt = `Add SPs: ${game.vm_available_ops} remaining`
+ for (let space of game.valid_spaces) {
+ gen_action_space(space)
+ }
+ },
+ space(space) {
+ add_infl(space, 'vm_available_ops')
+ },
+ done() {
+ do_log_summary()
+ if (game.return !== game.active) {
+ next_player()
+ }
+ log_h2('Raise the Stakes')
+ game.state = 'raise_stakes_1'
+ }
+}
+
+states.raise_stakes_1 = {
+ inactive: 'raise the stakes.',
+ prompt () {
+ if ((game.active === DEM && game.dem_pwr_hand.length < 3) || (game.active === COM && game.com_pwr_hand.length < 3)) {
+ view.prompt = 'Raise the stakes: you must pass.'
+ gen_action('pass')
+ }
+ else if (game.raised_stakes_discard === 3) {
+ view.prompt = 'Raise the stakes: done.'
+ gen_action('done')
+ } else {
+ view.prompt = `Discard ${3-game.raised_stakes_discard} cards to raise the stakes.`
+ if (game.raised_stakes_discard === 0) {
+ gen_action('pass')
+ }
+ for (let card of game.valid_cards) {
+ gen_action_power_card(card)
+ }
+ }
+ },
+ power_card(card) {
+ push_undo()
+ if (numberless_cards.includes(card)) {
+ log(`Discarded: P${card}`)
+ } else {
+ log(`Discarded: P${card} V${power_cards[card].value}`)
+ }
+ discard(card)
+
+ game.raised_stakes_discard ++
+ if (game.raised_stakes_discard === 3) {
+ game.raised_stakes++
+ game.valid_cards = []
+ }
+ },
+ pass(){
+ log('Did not raise the stakes')
+ game.raised_stakes_discard = 0
+ next_player()
+ if (game.active === DEM) {
+ game.valid_cards = [...game.dem_pwr_hand]
+ } else {
+ game.valid_cards = [...game.com_pwr_hand]
+ }
+ game.state = 'raise_stakes_2'
+ },
+ done () {
+ log_gap('Raised the stakes')
+ game.raised_stakes_discard = 0
+ next_player()
+ if (game.active === DEM) {
+ game.valid_cards = [...game.dem_pwr_hand]
+ } else {
+ game.valid_cards = [...game.com_pwr_hand]
+ }
+ game.state = 'raise_stakes_2'
+ }
+}
+
+states.raise_stakes_2 = {
+ inactive: 'raise the stakes.',
+ prompt () {
+ if ((game.active === DEM && game.dem_pwr_hand.length < 3) || (game.active === COM && game.com_pwr_hand.length < 3)) {
+ view.prompt = 'Raise the stakes: you must pass.'
+ gen_action('pass')
+ return
+ }
+ if (game.raised_stakes_discard === 3) {
+ view.prompt = 'Raise the stakes: done.'
+ gen_action('done')
+ } else {
+ view.prompt = `Discard ${3-game.raised_stakes_discard} cards to raise the stakes.`
+ if (game.raised_stakes_discard === 0) {
+ gen_action('pass')
+ }
+ for (let card of game.valid_cards) {
+ gen_action_power_card(card)
+ }
+ }
+ },
+ power_card(card) {
+ push_undo()
+ if (numberless_cards.includes(card)) {
+ log(`Discarded: P${card}`)
+ } else {
+ log(`Discarded: P${card} V${power_cards[card].value}`)
+ }
+ discard(card)
+
+ game.raised_stakes_discard ++
+ if (game.raised_stakes_discard === 3) {
+ game.raised_stakes++
+ game.valid_cards = []
+ }
+ },
+ pass() {
+ log('Did not raise the stakes')
+ goto_struggle()
+ },
+ done () {
+ log_gap('Raised the stakes')
+ goto_struggle()
+ },
+}
+
+states.power_struggle = {
+ inactive: 'play a card.',
+ prompt () {
+ if (game.phase === 0) {
+ if (game.valid_cards.length > 0) {
+ view.prompt = "Play a card."
+ for (let card of game.valid_cards) {
+ gen_action_power_card(card)
+ }
+ } else if ( game.valid_cards.length === 0) {
+ view.prompt = 'No valid cards. You must concede.'
+ gen_action('concede')
+ }
+ }
+ if (game.phase === 1) {
+ let base_prompt = `${power_cards[game.played_power_card].name} played` + (leader_cards.includes(game.played_power_card) ? ` as a ${game.proxy_power_card}.` : ".")
+ if (game.valid_cards.length > 0) {
+ view.prompt = `${base_prompt} You must match or concede.`;
+ for (let card of game.valid_cards) {
+ gen_action_power_card(card);
+ }
+ } else {
+ view.prompt = `${base_prompt} You must concede.`;
+ }
+ gen_action('concede')
+ }
+ else if (game.phase === 2) {
+ view.prompt = 'You matched. Roll a die.'
+ gen_action('roll')
+ }
+ else if (game.phase === 3) {
+ view.prompt = 'Play leader as:'
+ if (game.tactics_fails !== "Strike") {gen_action('strike')}
+ if (game.tactics_fails !== "March") {gen_action('march')}
+ if (game.tactics_fails !== "Rally in the Square") {gen_action('rally')}
+ if (game.tactics_fails !== "Petition") {gen_action('petition')}
+ }
+ },
+ power_card(card) {
+ push_undo()
+ discard(card)
+ if (game.phase === 0) {
+ game.power_card_1 = card
+ delete game.power_card_2
+ }
+ if (game.phase === 1) {
+ game.power_card_2 = card
+ }
+ game.valid_cards=[]
+ game.return_state = 'power_struggle'
+ if (game.phase === 0) {delete game.proxy_power_card}
+ if (card === PC_TACTIC_FAILS) {
+ if (game.proxy_power_card) {
+ log_gap(`Played P${PC_TACTIC_FAILS}: ${game.proxy_power_card} no longer playable`)
+ } else {
+ log_gap(`Played P${PC_TACTIC_FAILS}: P${game.played_power_card} no longer playable`)
+ }
+ } else {
+ if (game.phase === 0 && leader_cards.includes(card)) {} /* Log nothing. Probably a better way to do this */
+ else if (numberless_cards.includes(card)) {
+ log_gap(`Played: P${card}`)
+ } else {
+ log_gap(`Played: P${card} V${power_cards[card].value}`)
+ }
+ }
+ if (game.phase === 0) {
+ if (leader_cards.includes(card)) {
+ game.played_power_card = card
+ game.phase = 3
+ } else if (card === 51){ /*Scare Tactics */
+ game.return = ''
+ goto_vm(351) /*Can I combine these 3 into a single stage where you goto_vm(300 + card) ? */
+ } else if (card === 50) { /*Support Surges */
+ if (game.active === DEM) {
+ game.return = COM
+ } else {
+ game.return = DEM
+ }
+ goto_vm(350)
+ } else if (game.phase === 0 && card === 49) { /*Support Falters */
+ next_player()
+ goto_vm(349)
+ } else {
+ game.played_power_card = card
+ game.phase = 1
+ next_player()
+ do_valid_cards()
+ }
+ } else if (game.phase === 1) {
+ if (card === PC_TACTIC_FAILS) {
+ if (game.proxy_power_card) {
+ game.tactics_fails = game.proxy_power_card
+ } else {
+ game.tactics_fails = power_cards[game.played_power_card].name
+ }
+ game.phase = 0
+ next_player()
+ do_valid_cards()
+ } else if (power_cards[game.played_power_card].value === 1) {
+ log('Takes initiative')
+ game.phase = 0
+ do_valid_cards()
+ } else {
+ game.phase = 2
+ }
+ }
+ },
+ roll () {
+ clear_undo()
+ let roll = roll_d6()
+ log(`Roll: D${roll}`)
+ if (roll >= power_cards[game.played_power_card].value) {
+ log('Initiative roll successful')
+ game.phase = 0
+ do_valid_cards()
+ } else {
+ log(`Initiative roll failed. Required ${power_cards[game.played_power_card].value} or more`)
+ game.phase = 0
+ next_player()
+ do_valid_cards()
+ }
+ },
+ concede () {
+ push_undo()
+ game.valid_cards = []
+ delete game.power_card_1
+ delete game.power_card_2
+ log('Conceded')
+ log_h2('Aftermath')
+ log_h3('Support Loss')
+ if (game.phase === 0) {
+ game.played_power_card = 0
+ game.proxy_power_card = 0 /*If conceded when held the initiative but had no playable cards, ignore the last played card */
+ }
+ game.phase = 0
+ game.state = 'support_loss'
+ },
+ strike () {
+ log(`Played: P${game.played_power_card} as a Strike`)
+ game.proxy_power_card = 'Strike'
+ game.phase = 1
+ next_player()
+ do_valid_cards()
+ },
+ march () {
+ log(`Played: P${game.played_power_card} as a March`)
+ game.proxy_power_card = 'March'
+ game.phase = 1
+ next_player()
+ do_valid_cards()
+ },
+ rally () {
+ log(`Played: P${game.played_power_card} as a Rally in the Square`)
+ game.proxy_power_card = 'Rally in the Square'
+ game.phase = 1
+ next_player()
+ do_valid_cards()
+ },
+ petition () {
+ log(`Played: P${game.played_power_card} as a Petition`)
+ game.proxy_power_card = 'Petition'
+ game.phase = 1
+ next_player()
+ do_valid_cards()
+ }
+}
+
+states.support_loss ={
+ inactive: 'do Support Loss.',
+ prompt () {
+ let ps_state = game.persistent_events.includes(111) ? "New Year's Eve Party" : "Power Struggle"
+ if (game.phase === 0) {
+ view.prompt = 'You lost the Power Struggle. Roll a die for Support Loss.'
+ gen_action('roll')
+ } else if (game.phase === 1 && game.available_ops > 0 && game.valid_spaces.length > 0) {
+ view.prompt = `${ps_state} - ${country_name(game.pwr_struggle_in)}. Support Loss: remove ${pluralize(game.available_ops,'SP')}.`
+
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id)
+ }
+ } else if (game.phase === 1 && game.available_ops === 0 ) {
+ view.prompt = `${ps_state} - ${country_name(game.pwr_struggle_in)}. Support Loss: finished.`
+ gen_action('done')
+ } else if (game.phase === 1 && game.valid_spaces.length === 0) {
+ view.prompt = `${ps_state} - ${country_name(game.pwr_struggle_in)}. Support Loss: no remaining SPs to remove.`
+ gen_action('done')
+ }
+ },
+ roll () {
+ game.available_ops = support_loss_roll[get_aftermath_roll()]
+ if (game.available_ops === 0) {
+ log('Does not remove SPs')
+ }
+ game.phase++
+ if (game.available_ops > 0) {
+ valid_spaces_support_loss()
+ }
+ },
+ space(space) {
+ game.remove_opponent_infl = false /* Don't know why this is needed... */
+ remove_infl(space, 'available_ops')
+ },
+ done () {
+ do_log_summary()
+ next_player()
+ log_h3('Victory Point')
+ game.phase = 0
+ game.state = 'vp_roll'
+ }
+}
+
+states.vp_roll = {
+ inactive: 'do VP Roll.',
+ prompt () {
+ let ps_state = game.persistent_events.includes(111) ? "New Year's Eve Party" : "Power Struggle"
+ if (game.phase === 0) {
+ view.prompt = `${ps_state} - ${country_name(game.pwr_struggle_in)}: roll a die for Victory.`
+ gen_action('roll')
+ } else if (game.phase === 1) {
+ view.prompt = `${ps_state} - ${country_name(game.pwr_struggle_in)}: take power.`
+ gen_action('take')
+ } else if (game.phase === 2) {
+ view.prompt = `${ps_state} - ${country_name(game.pwr_struggle_in)}: proceed to scoring.`
+ gen_action('scoring')
+ }
+ },
+ roll () {
+ let roll = get_aftermath_roll()
+ let vp_change = vp_roll[roll]
+ if (game.active === DEM) {
+ log(`+${vp_change} VP`)
+ } else {
+ log(`-${vp_change} VP`)
+ }
+ if (game.active === DEM) {game.vp += vp_change}
+ else {game.vp -= vp_change}
+ if (game.active === DEM && roll >= 4) {
+ game.phase = 1
+ } else {
+ game.phase = 0
+ if (game.active === DEM) {next_player()}
+ game.state = 'choose_power'
+ }
+ },
+ take () {
+ push_undo()
+ let scoring_card = scoring_cards[countries.indexOf(game.pwr_struggle_in)]
+ permanently_remove(scoring_card)
+ take_power(game.pwr_struggle_in)
+ game.phase = 2
+ },
+ scoring () {
+ push_undo()
+ log_h2('Scoring')
+ score_country(game.pwr_struggle_in)
+ resolve_tyrant()
+ },
+}
+
+states.choose_power = {
+ inactive: 'choose whether to remain in power.',
+ prompt () {
+ if (game.phase === 0) {
+ view.prompt = 'Choose whether to remain in power.'
+ gen_action('retain')
+ gen_action('surrender')
+ } else if (game.phase === 1) {
+ view.prompt = 'Proceed to scoring.'
+ gen_action('scoring')
+ }
+ },
+ retain() {
+ push_undo()
+ retain_power(game.pwr_struggle_in)
+ game.phase = 1
+ },
+ surrender () {
+ push_undo()
+ take_power(game.pwr_struggle_in)
+ permanently_remove(game.played_card)
+ game.phase = 1
+ },
+ scoring () {
+ push_undo()
+ score_country(game.pwr_struggle_in)
+ resolve_tyrant()
+ }
+}
+
+states.the_tyrant_is_gone ={
+ inactive: 'resolve The Tyrant is Gone.',
+ prompt() {
+ view.prompt = 'Play The Tyrant is Gone for the event.'
+ gen_action('event')
+ },
+ event() {
+ if (game.active !== DEM) {
+ next_player()
+ }
+ log_h3(`C${C_THE_TYRANT_IS_GONE}`)
+ game.vm_event = C_THE_TYRANT_IS_GONE
+ goto_vm(game.vm_event)
+ }
+}
+
+states.finish_scoring ={
+ inactive: 'finish scoring.',
+ prompt() {
+ view.prompt = 'End power struggle.'
+ gen_action('done')
+ } ,
+ done() {
+ log_msg_gap('Power Struggle resolved') /*At this point log card dicarded or permanently removed? */
+ if (game.persistent_events.includes(111)) {
+ game.state = 'new_years_eve_party'
+ return
+ }
+ if (check_vp()) {
+ return
+ }
+ reset_power()
+ end_round()
+ }
+}
+
+// ======================================= END TURN STATES ==========================================
+
+states.end_turn_4_5_4 = {
+ inactive: 'verify held cards.',
+ prompt() {
+ view.prompt = 'End Turn: verify held cards.'
+ gen_action('check')
+ },
+ check() {
+ log_h2('Verify held cards')
+ const dem_has_scoring_card = game.democrat_hand.some(card => scoring_cards.includes(card))
+ const com_has_scoring_card = game.communist_hand.some(card => scoring_cards.includes(card))
+ if (!dem_has_scoring_card && !com_has_scoring_card) {
+ log('No held scoring cards')
+ }
+
+ if (dem_has_scoring_card && com_has_scoring_card) {
+ log('Both players have held scoring cards')
+ goto_game_over('', `The game is tied due to held scoring cards!`)
+ }
+ else if (dem_has_scoring_card) {
+ log('Democrat player has a held scoring card')
+ goto_game_over(COM, `${COM} won by held scoring card!`)
+ }
+ else if (com_has_scoring_card) {
+ log('Communist player has a held scoring card')
+ goto_game_over(DEM, `${DEM} won by held scoring card!`)
+ }
+ else if (game.persistent_events.includes(C_NEW_YEARS_EVE_PARTY)) {
+ log_h1(`New Year's Eve Party`)
+ game.vm_event = 104
+ //Check if the Communist receives VP from The Tyrant is Gone
+ if (game.the_tyrant_is_gone && game.the_tyrant_is_gone > 0) {
+ game.vp -= 2
+ log(`Communist receives 2 VP from C97`)
+ }
+ game.persistent_events.push(111)
+ if (game.active !== DEM) {
+ next_player()
+ }
+ game.state = 'new_years_eve_party'
+ }
+ else if(game.turn === 10) {
+ clear_undo()
+ log_h2('Final Scoring')
+
+ //Check if the Communist receives VP from The Tyrant is Gone
+ if (game.the_tyrant_is_gone && game.the_tyrant_is_gone > 0) {
+ game.vp -= 2
+ log(`Communist receives 2 VP from C97`)
+ }
+ game.state = 'final_scoring_held'
+
+ } else {
+ new_turn()
+ }
+ }
+}
+
+states.final_scoring_held = {
+ inactive: 'resolve final scoring.',
+ prompt() {
+ view.prompt = 'Final Scoring: Communist scores VP bonus for the number of countries they retain power.'
+ gen_action('bonus')
+ },
+ bonus() {
+ push_undo()
+ const held_countries = game.revolutions.filter(value => value === false).length
+ let vp_gain = 4*held_countries
+ log(`Communist holds power in ${pluralize(held_countries, 'country', 's')}: -${vp_gain} VP`)
+ game.vp -= 4*held_countries
+ game.temp = {'East_Germany': false, 'Poland': false, 'Czechoslovakia': false, 'Hungary': false, 'Romania': false, 'Bulgaria': false}
+ game.state = 'final_scoring'
+ }
+}
+
+states.final_scoring = {
+ inactive: 'score countries.',
+ prompt() {
+ if (game.temp['East_Germany'] && game.temp['Poland'] && game.temp['Czechoslovakia'] && game.temp['Hungary'] && game.temp['Romania'] && game.temp['Bulgaria']) {
+ view.prompt = 'Final scoring: done.'
+ gen_action('end')
+ } else {
+ view.prompt = 'Choose a country to score:'
+ if (!game.temp['East_Germany']) {gen_action('east_germany')}
+ if (!game.temp['Poland']) {gen_action('poland')}
+ if (!game.temp['Czechoslovakia']) {gen_action('czechoslovakia')}
+ if (!game.temp['Hungary']) {gen_action('hungary')}
+ if (!game.temp['Romania']) {gen_action('romania')}
+ if (!game.temp['Bulgaria']) {gen_action('bulgaria')}
+ }
+ },
+ east_germany() {
+ score_country('East_Germany')
+ game.temp['East_Germany'] = true
+ },
+ poland() {
+ score_country('Poland')
+ game.temp['Poland'] = true
+ },
+ czechoslovakia() {
+ score_country('Czechoslovakia')
+ game.temp['Czechoslovakia'] = true
+ },
+ hungary() {
+ score_country('Hungary')
+ game.temp['Hungary'] = true
+ },
+ romania() {
+ score_country('Romania')
+ game.temp['Romania'] = true
+ },
+ bulgaria() {
+ score_country('Bulgaria')
+ game.temp['Bulgaria'] = true
+ },
+ end() {
+ delete game.temp
+ if (game.vp > 0) {
+ goto_game_over(DEM, `${DEM} wins on Victory Point Track!`)
+ } else if (game.vp < 0) {
+ goto_game_over(COM, `${COM} wins on Victory Point Track!`)
+ } else if (game.vp === 0) {
+ goto_game_over('', `The game is tied!`) /*Not sure what to pass for result */
+ }
+ }
+}
+
+states.game_over = {
+ get inactive() {
+ return game.victory
+ },
+ prompt() {
+ view.prompt = game.victory
+ },
+}
+
+// ========================== EVENT SPECIFIC STATES =================================
+
+states.general_strike = {
+ inactive: 'discard a card.',
+ prompt() {
+ if (game.played_card === 0 ) {
+ view.prompt = 'General Strike: you must discard a card or play a Scoring Card.'
+ game.communist_hand
+ for (let card of game.communist_hand) {
+ gen_action_card(card)
+ }
+ } else if (game.played_card > 0 ) {
+ view.prompt = 'General Strike: roll a die.'
+ gen_action('roll')
+ }
+ },
+ card (card) {
+ push_undo()
+ game.played_card = card
+ let find_card
+ find_card = game.communist_hand.indexOf(card)
+ game.communist_hand.splice(find_card, 1)
+ game.available_ops = get_card_ops(card)
+ if (scoring_cards.includes(card)) {
+ game.vm_event = card
+ log(`Played C${card} for the event`)
+ game.return_state = 'general_strike'
+ goto_vm(game.vm_event)
+ } else {
+ log(`Discarded C${card}`)
+ }
+ },
+ roll() {
+ clear_undo()
+ let roll = roll_d6()
+ log(`Roll: D${roll}`)
+ logi(`+${game.available_ops} ops`)
+ let total = roll + game.available_ops
+ log(`Modified roll: ${total}`)
+
+ if (total > 5) {
+ log('The strike is over.')
+ permanently_remove(C_GENERAL_STRIKE)
+ game.persistent_events = game.persistent_events.filter(n => n !== 5)
+ } else {
+ log('The strike continues. Required 6 or more')
+ }
+ game.state = 'end_round'
+ },
+}
+
+states.honecker ={
+ inactive: 'resolve Honecker.',
+ prompt() {
+ view.prompt = 'Honecker: you may take an extra action round.'
+ gen_action('extra')
+ gen_action('pass')
+ },
+ extra() {
+ push_undo()
+ game.round++
+ log(`Communist chooses to take an extra Action Round due to C${C_HONECKER}`)
+ log_h2(`Action Round ${game.round}`)
+ game.round_player = COM
+ permanently_remove(C_HONECKER)
+ if (game.persistent_events.includes(C_GENERAL_STRIKE)) {
+ game.state = 'general_strike'
+ } else {
+ game.state = 'choose_card'
+ }
+ },
+ pass() {
+ push_undo()
+ log(`C${C_HONECKER}: passed`)
+ permanently_remove(C_HONECKER)
+ game.state = 'end_round'
+ }
+}
+
+states.new_years_eve_party = {
+ get inactive() {
+ return `resolve ${clean_name(cards[104].name)}.`
+ },
+ prompt() {
+ if (!game.is_pwr_struggle) {
+ view.prompt = `New Year's Eve Party: you may choose a country to have a final power struggle.`
+ if (!game.revolutions[0]) {gen_action('poland')}
+ if (!game.revolutions[1]) {gen_action('hungary')}
+ if (!game.revolutions[2]) {gen_action('east_germany')}
+ if (!game.revolutions[3]) {gen_action('bulgaria')}
+ if (!game.revolutions[4]) {gen_action('czechoslovakia')}
+ if (!game.revolutions[5]) {gen_action('romania')}
+ gen_action('pass')
+ } else {
+ view.prompt = `New Year's Eve Party: done.`
+ gen_action('end')
+ }
+ },
+ east_germany() {
+ push_undo()
+ log('Chose to score East Germany')
+ game.vm_event = 42
+ goto_vm(42)
+ },
+ poland() {
+ push_undo()
+ log('Chose to score Poland')
+ game.vm_event = 22
+ goto_vm(22)
+ },
+ czechoslovakia() {
+ push_undo()
+ log('Chose to score Czechoslovakia')
+ game.vm_event = 55
+ goto_vm(55)
+ },
+ hungary() {
+ push_undo()
+ log('Chose to score Hungary')
+ game.vm_event = 23
+ goto_vm(23)
+ },
+ romania() {
+ push_undo()
+ log('Chose to score Romania')
+ game.vm_event = 95
+ goto_vm(95)
+ },
+ bulgaria () {
+ push_undo()
+ log('Chose to score Bulgaria')
+ game.vm_event = 43
+ goto_vm(43)
+ },
+ pass() {
+ push_undo()
+ log('No final power struggle')
+ if (game.vp > 0) {
+ goto_game_over(DEM, `New Year's Eve Party: ${DEM} wins on Victory Point Track!`)
+ } else if (game.vp < 0) {
+ goto_game_over(COM, `New Year's Eve Party: ${COM} wins on Victory Point Track!`)
+ } else if (game.vp === 0) {
+ goto_game_over('', `New Year's Eve Party: The game is tied!`) /*Not sure what to pass for result */
+ }
+ },
+ end() {
+ if (game.vp > 0) {
+ goto_game_over(DEM, `New Year's Eve Party: ${DEM} wins on Victory Point Track!`)
+ } else if (game.vp < 0) {
+ goto_game_over(COM, `New Year's Eve Party: ${COM} wins on Victory Point Track!`)
+ } else if (game.vp === 0) {
+ goto_game_over('', `New Year's Eve Party: The game is tied!`) /*Not sure what to pass for result */
+ }
+ }
+}
+
+states.stasi_end_round = {
+ inactive: 'choose next card due to Stasi.',
+ prompt() {
+ if (game.democrat_hand.length === 0) {
+ view.prompt = 'Stasi: no cards remaining.'
+ gen_action('pass')
+ return
+ }
+ view.prompt = 'Stasi: you must select your next card to play.'
+
+ for (let card of game.democrat_hand) {
+ gen_action_card(card)
+ }
+ },
+ card(card) {
+ push_undo()
+ log_gap(`Democrat selected C${card} as next card.`)
+ game.stasi_card = card
+ if (!scoring_cards.includes(card) && count_scoring_cards() >= (7-game.round)){
+ game.temp = card
+ game.state = 'stasi_confirm_scoring_card'
+ return
+ }
+ game.state = 'stasi_finish'
+ },
+ pass() {
+ log('Stasi: Democrat has no remaining cards')
+ game.stasi_card = 0
+ end_stasi_choose_card()
+ },
+}
+
+states.stasi_confirm_scoring_card = {
+ inactive: 'choose a card.',
+ prompt() {
+ view.prompt = `${pluralize(count_scoring_cards(),'scoring card')} in hand with ${pluralize(7-game.round,'Action Round')} remaining. Scoring cards may not be held. Continue?`
+ gen_action('continue')
+ },
+ continue() {
+ push_undo()
+ end_stasi_choose_card()
+ }
+}
+
+states.stasi_finish = {
+ inactive: 'choose next card due to Stasi.',
+ prompt() {
+ view.prompt = 'Stasi. Choose card: done.'
+ gen_action('done')
+ },
+ done() {
+ push_undo()
+ end_stasi_choose_card()
+ }
+}
+
+states.stasi_confirm = {
+ inactive: 'choose next card due to Stasi.',
+ prompt() {
+ view.prompt = `If Common European Home selected, it must be played for Operations. Otherwise select the opponent's card instead.`
+ gen_action('done')
+ },
+ done() {
+ game.playable_cards = game.playable_cards.filter( n => n !== C_COMMON_EUROPEAN_HOME)
+ end_stasi_choose_card()
+ }
+}
+
+states.stasi_play_card = {
+ inactive: 'play a card.',
+ prompt () {
+ if (game.democrat_hand.length === 0) {
+ view.prompt = 'Stasi: you must pass.'
+ gen_action('pass')
+ } else {
+ view.prompt = `Stasi: you must play ${clean_name(cards[game.stasi_card].name)}.`
+ gen_action_card(game.stasi_card)
+ }
+ },
+ card(card) {
+ push_undo()
+ game.played_card = card
+ let find_card
+ find_card = game.democrat_hand.indexOf(card);
+ game.democrat_hand.splice(find_card, 1);
+ game.available_ops = get_card_ops(card)
+
+ if (game.democrat_hand.includes(C_COMMON_EUROPEAN_HOME) && cards[card].side === "C") {
+ game.state = 'stasi_resolve_common_european_home'
+ } else {
+ game.state = 'play_card'
+ }
+ },
+ pass () {
+ log('No cards remaining. Passed')
+ //end_round()
+ game.state = 'end_round'
+ },
+ done () {
+ if (game.democrat_hand.includes(C_COMMON_EUROPEAN_HOME)) {
+ game.state = 'stasi_resolve_common_european_home'
+ } else {
+ game.state = 'play_card'
+ }
+ }
+}
+
+states.stasi_resolve_common_european_home = {
+ inactive: 'play a card.',
+ prompt () {
+ view.prompt = `Stasi: play ${clean_name(cards[game.played_card].name)} with Common European Home?`
+ gen_action('yes')
+ gen_action('no')
+ },
+ yes() {
+ log(`Played C${game.played_card} with Common European Home`)
+ silent_discard(C_COMMON_EUROPEAN_HOME)
+ game.vm_infl_to_do = true
+ game.vm_event_to_do = false
+ game.state = 'resolve_opponent_event'
+ },
+ no() {
+ game.state = 'play_card'
+ }
+}
+
+
+// ==================== SUPPORTING STATE FUNCTIONS =============================
+
+
+function add_infl(space, ops) {
+ push_undo()
+ log_summary(`Added £ SP in %${space}`)
+
+ //If AHBR - check AHBR conditions
+ if (game.persistent_events.includes(58)) {
+ if (spaces[space].country !== 'East_Germany'){
+ game.austria_hungary_border_reopened_tracker = false
+ }
+ }
+
+ // Check Genscher
+ if (game.persistent_events.includes(C_GENSCHER) && game.active === DEM && spaces[space].country === 'East_Germany' && check_com_control(space)) {
+ game[ops]--
+ log_summary(`(-1 op due to C${C_GENSCHER})`)
+ } else if (check_opp_control(space)) {
+ game[ops] -= 2
+ //Check if Austria Hungary Border Reopened was used to place last SP in a controlled space in East Germany. If so, game.available_op will be negative
+ if (game[ops] < 0) {
+ log_summary(`(Used +1 op from C${C_AUSTRIA_HUNGARY_BORDER_REOPENED})`)
+ }
+ } else {
+ game[ops]--
+ }
+
+ // Update influence values
+ if (game.active === COM) {
+ game.comInfl[space]++
+ } else {
+ game.demInfl[space]++
+ }
+ check_tyrant()
+
+ // Check Austria Hungary Border Reopened is true and condition has been met
+ if (game[ops] === 0 && game.active === DEM && game.persistent_events.includes(C_AUSTRIA_HUNGARY_BORDER_REOPENED) && game.austria_hungary_border_reopened_tracker) {
+ game[ops] ++
+ log('+1 op from C58')
+ game.austria_hungary_border_reopened_tracker = false
+ game.valid_spaces = game.valid_spaces.filter(n => spaces[n].country === 'East_Germany')
+ }
+
+ // If only 1 IP remaining, may not place in opponent controlled spaces
+
+ // Check for Genscher & Austria Hungary Border Reopened
+
+ if (game[ops] === 1) {
+ if (game.active === DEM) {
+ if (game.persistent_events.includes(63) || (game.persistent_events.includes(58) && game.austria_hungary_border_reopened_tracker)) {
+ game.valid_spaces = game.valid_spaces.filter(n => !(check_opp_control(n) && spaces[n].country !== 'East_Germany'))
+ } else {
+ game.valid_spaces = game.valid_spaces.filter(n => !check_opp_control(n))
+ }
+ } else {
+ game.valid_spaces = game.valid_spaces.filter(n => !check_opp_control(n))
+ }
+ }
+
+ //Clear valid spaces if no IP remaining.
+ if (game[ops] <= 0 ) {
+ game.valid_spaces = []
+ }
+}
+
+function remove_infl(space, ops) {
+ push_undo()
+ log_summary(`Removed £ SP from %${space}`)
+
+ if (game.remove_opponent_infl === true) {
+ if (game.active === COM) {
+ game.demInfl[space]--
+ if (game.demInfl[space] === 0) {
+ game.valid_spaces = game.valid_spaces.filter(id => id !== space);
+ }
+ } else {
+ game.comInfl[space]--
+ if (game.comInfl[space] === 0) {
+ game.valid_spaces = game.valid_spaces.filter(id => id !== space);
+ }
+ }
+ check_tyrant()
+
+ } else {
+ if (game.active === COM) {
+ game.comInfl[space]--
+ if (game.comInfl[space] === 0) {
+ game.valid_spaces = game.valid_spaces.filter(id => id !== space);
+ }
+ } else {
+ game.demInfl[space]--
+ if (game.demInfl[space] === 0) {
+ game.valid_spaces = game.valid_spaces.filter(id => id !== space);
+ }
+ }
+ check_tyrant()
+ }
+ game[ops]--
+ if (game.vm_influence_added && game.vm_influence_added[space] >= 0) {game.vm_influence_added[space]++}
+ if (game[ops]===0) {game.valid_spaces = []}
+}
+
+function do_sc(space) {
+ clear_undo()
+ let tear_gas_start = game.persistent_events.includes(C_TEAR_GAS)
+ let the_wall_start = game.persistent_events.includes(C_THE_WALL)
+ log_gap(`Support check: %${space}`)
+ let roll = roll_d6()
+
+ // Check for The Wall
+ if (game.active === COM && game.persistent_events.includes(C_THE_WALL) && spaces[space].country === 'East_Germany') {
+ logi(`No adjacency for Democrats due to C${C_THE_WALL}`)
+ log_gap(`Roll: D${roll}`)
+ }
+ // Continue with Support Check Logic
+ else { log(`Roll: D${roll}`) }
+
+ // Check for the Crowd Turns Against Ceausescu
+
+ if (game.is_pwr_struggle) {
+ roll += game.vm_available_ops
+ logi(`+${game.vm_available_ops} from Ceausescu`)
+ }
+
+ // Check if in Tiananmen Square Track Award
+
+ else if (game.state === 'vm_tst_6_sc') {
+ roll += get_tst_6_ops()
+ roll += 2
+ logi('+2 TST award')
+ }
+ else {
+ let card_ops = get_card_ops(this_card())
+ roll += card_ops
+ logi(`+${card_ops} from card ops`)
+ }
+
+ if (game.support_check_modifier > 0) {
+ roll += game.support_check_modifier
+ logi(`+${game.support_check_modifier} from event`)
+ }
+
+ // Events which modify SC rolls
+ if (game.active === COM && game.persistent_events.includes(C_TEAR_GAS) && spaces[space].socio === 6) {
+ roll ++
+ logi(`+1 from C${C_TEAR_GAS}`)
+ permanently_remove(C_TEAR_GAS)
+ game.persistent_events = game.persistent_events.filter(n => n !== C_TEAR_GAS)
+ }
+ if (game.active === DEM && spaces[space].region === 'Eastern Europe' && game.persistent_events.includes(C_FRG_EMBASSIES)) {
+ roll++
+ logi(`+1 from C${C_FRG_EMBASSIES}`)
+ }
+ if (game.active === DEM && spaces[space].country === 'East_Germany' && game.persistent_events.includes(C_GRENZTRUPPEN)) {
+ roll--
+ logi(`-1 from C${C_GRENZTRUPPEN}`)
+ }
+ if ((game.active === COM && game.stand_fast === DEM && check_dem_control(space)) || (game.active === DEM && game.stand_fast === COM && check_com_control(space))){
+ roll--
+ logi(`-1 from C${C_STAND_FAST}`)
+ }
+ if (game.active === DEM && game.persistent_events.includes(C_ELENA) && spaces[space].country === 'Romania') {
+ roll--
+ logi(`-1 from C${C_ELENA}`)
+ }
+ if (game.active === DEM && game.persistent_events.includes(C_AUSTRIA_HUNGARY_BORDER_REOPENED) && game.austria_hungary_border_reopened_tracker) {
+ roll++
+ logi(`+1 from C${C_AUSTRIA_HUNGARY_BORDER_REOPENED}`)
+ }
+
+ // Continue with logic - check for adjacency
+
+ // Events which affect adjacency - The Wall
+
+ const adj = count_adj(space)
+ if (game.active === COM && game.persistent_events.includes(C_THE_WALL) && spaces[space].country === 'East_Germany') {
+ roll += adj.com_adj
+ if (adj.com_adj > 0) {
+ logi(`+${adj.com_adj} adjacency`)
+ }
+ permanently_remove(C_THE_WALL)
+
+ // Standard adjacency
+ } else {
+ if (adj.dem_adj > 0 || adj.com_adj > 0 ){
+ if (game.active === DEM) {
+ roll += adj.dem_adj
+ roll -= adj.com_adj
+ if (adj.dem_adj > 0) {
+ logi(`+${adj.dem_adj} from adjacency`)
+ }
+ if (adj.com_adj > 0) {
+ logi(`-${adj.com_adj} from opponent adjacency`)
+ }
+ } else {
+ roll += adj.com_adj
+ roll -= adj.dem_adj
+ if (adj.com_adj > 0) {
+ logi(`+${adj.com_adj} from adjacency`)
+ }
+ if (adj.dem_adj > 0) {
+ logi(`-${adj.dem_adj} from opponent adjacency`)
+ }
+ }
+ }
+ }
+
+ // Support check calcs
+ log(`Modified roll: ${roll}`)
+ const stability = spaces[space].stability
+ logi(`-${stability*2} (stability * 2)`)
+ const change_infl = Math.max(0, roll - stability*2)
+ if (change_infl > 0) {
+ log_msg_gap(`Change influence: ${change_infl} SP`)
+ if(game.active === DEM) {
+ if (change_infl > game.comInfl[space]) {
+ const residual = change_infl - game.comInfl[space]
+ game.comInfl[space] = 0
+ game.demInfl[space] += residual
+ } else {
+ game.comInfl[space] -= change_infl
+ }
+ if (game.comInfl[space] === 0) {
+ game.valid_spaces = game.valid_spaces.filter(id => id !== space)
+ }
+ } else {
+ if (change_infl > game.demInfl[space]) {
+ const residual = change_infl - game.demInfl[space]
+ game.demInfl[space] = 0
+ game.comInfl[space] += residual
+ } else {
+ game.demInfl[space] -= change_infl
+ }
+ if (game.demInfl[space] === 0) {
+ game.valid_spaces = game.valid_spaces.filter(id => id !== space)
+ }
+ }
+ check_tyrant()
+
+ } else {
+ log_msg_gap('Change influence: 0 SP')
+ }
+ //Check VP awards
+ if (game.active === COM && game.persistent_events.includes(C_HELSINKI_FINAL_ACT) && (spaces[space].socio === 5 || spaces[space].socio === 6) ) {
+ log('+1 VP from C26')
+ game.vp ++
+ }
+ if (game.active === COM && game.persistent_events.includes(C_ECO_GLASNOST) && spaces[space].space_id === S_RUSE) {
+ log('+1 VP from C39')
+ game.vp++
+ }
+
+ //Check if Tear Gas or The Wall used
+ let tear_gas_end = game.persistent_events.includes(C_TEAR_GAS)
+ let the_wall_end = game.persistent_events.includes(C_THE_WALL)
+ if (tear_gas_start && !tear_gas_end) {
+ log(`C${C_TEAR_GAS} no longer in effect`)
+ }
+ if (the_wall_start && !the_wall_end) {
+ log(`C${C_THE_WALL} no longer in effect`)
+ }
+
+
+ // If Austria-Hungary Border Reopened used, all future support checks must be in East Germany
+ if (game.persistent_events.includes(C_AUSTRIA_HUNGARY_BORDER_REOPENED)){
+ if (game.austria_hungary_border_reopened_tracker) {
+ game.valid_spaces = game.valid_spaces.filter(n => spaces[n].country === 'East_Germany')
+ }
+ }
+ delete game.selected_space
+}
+
+function valid_spaces_setup() {
+ for (let i =0 ; i < spaces.length ; i++) {
+ let space = spaces[i]
+
+ if (game.active === COM) {
+ let infl = game.demInfl[i]
+
+ if (infl === 0) {
+ game.valid_spaces.push(space.space_id);
+ }
+ } else {
+ let infl = game.comInfl[i]
+ if (infl === 0) {
+ game.valid_spaces.push(space.space_id);
+ }
+ }
+ }
+}
+
+function valid_spaces_sc() {
+ let valid_spaces_set = new Set();
+
+ for (let i = 0 ; i < spaces.length; i++) {
+ let space = spaces[i]
+
+ if (game.active === DEM) {
+ let infl = game.comInfl[i]
+ if (infl !== 0 ) {
+ valid_spaces_set.add(space.space_id);
+ }
+ } else {
+ let infl = game.demInfl[i]
+ if (infl !== 0 ) {
+ // Check Events that block support checks in a given space
+ if (game.persistent_events.includes(C_SOLIDARITY_LEGALIZED) && space.space_id === S_GDANSK) {continue}
+ if (game.persistent_events.includes(C_WE_ARE_THE_PEOPLE) && space.space_id === S_LEIPZIG) {continue}
+ if (game.persistent_events.includes(C_FOREIGN_CURRENCY_DEBT_BURDEN) && space.country === game.foreign_currency_debt_burden) {continue}
+
+ valid_spaces_set.add(space.space_id);
+ }
+ }
+ }
+ game.valid_spaces = Array.from(valid_spaces_set);
+
+ //Check for the Crown Turns Against Ceausescu
+ if (game.is_pwr_struggle && game.pwr_struggle_in === 'Romania' && game.persistent_events.includes(C_THE_CROWD_TURNS_AGAINST_CEAUSESCU)) {
+ game.valid_spaces = game.valid_spaces.filter(n => spaces[n].country === 'Romania')
+ }
+ return game.valid_spaces;
+}
+
+function valid_spaces_support_loss() {
+ let valid_spaces_set = new Set();
+ for (let i = 0; i < game.demInfl.length; i++) {
+ let space = spaces[i]
+ if (game.active === DEM) {
+ let infl = game.demInfl[i]
+ if (infl > 0 && space.country === game.pwr_struggle_in) {
+ valid_spaces_set.add(space.space_id);
+ }
+ } else {
+ let infl = game.comInfl[i]
+ if (infl > 0 && space.country === game.pwr_struggle_in) {
+ valid_spaces_set.add(space.space_id);
+ }
+ }
+ }
+ game.valid_spaces = Array.from(valid_spaces_set);
+ return game.valid_spaces;
+}
+
+function valid_spaces_infl() {
+ // Check if function is called from the VM or not, take relevant ops variable
+ let ops = game.state.startsWith('vm') ? game.vm_available_ops : game.available_ops;
+
+ let valid_spaces_set = new Set();
+ for (let i = 0; i < game.demInfl.length; i++) {
+ let space = spaces[i]
+ let player_influence = game.active === COM ? game.comInfl[i] : game.demInfl[i];
+
+ // If the piece has the player's influence, add it and its adjacent spaces to the set
+ if (player_influence > 0) {
+ valid_spaces_set.add(space.space_id);
+ let adjacent_spaces = get_adjusted_adjacency(space.space_id)
+
+ for (let adj_space_id of adjacent_spaces) {
+ if (adj_space_id >= 0) {
+ const adj_piece = spaces[adj_space_id];
+
+ // Check if the adjacent space is controlled by the opponent
+ const opponent_control = check_opp_control(adj_piece.space_id)
+
+ //Check for Genscher. Can always place in East Germany even with 1 op
+ if (game.active === DEM && adj_piece.country === 'East_Germany' && game.persistent_events.includes(C_GENSCHER)){
+ valid_spaces_set.add(adj_piece.space_id)
+ }
+
+
+ // Otherwise, only add the adjacent space if the available_ops >= 2 or the space is not controlled by the opponent
+ if (ops >= 2 || !opponent_control) {
+ valid_spaces_set.add(adj_piece.space_id)
+ }
+ }
+ }
+ }
+ }
+ game.valid_spaces = Array.from(valid_spaces_set);
+ return game.valid_spaces;
+}
+
+function valid_cards(player_hand, presence) {
+ const valid_cards_set = new Set()
+ if (game.phase === 0) {
+
+ for (let c of player_hand) {
+ let card = power_cards[c]
+ // Never add tactics fails
+ if (c === PC_TACTIC_FAILS) {
+ continue
+ }
+ // Cannot play the suit of Tactics Fails
+ if (card.name === game.tactics_fails) {
+ continue
+ }
+
+
+ if (card.socio === 0) {
+ valid_cards_set.add(c)
+ } else if (leaders.includes(card.socio) && presence[card.socio]) {
+ valid_cards_set.add(c)
+ }
+ }
+ } else if (game.phase === 1) {
+ for (let c of player_hand) {
+ let card = power_cards[c]
+ if (!leader_cards.includes(c) && card.name === power_cards[game.played_power_card].name) {
+ valid_cards_set.add(c)
+ } else if (card.name === game.proxy_power_card) {
+ valid_cards_set.add(c)
+ } else if (leaders.includes(card.socio) && presence[card.socio]) {
+ valid_cards_set.add(c)
+ } else if (c === PC_TACTIC_FAILS) {
+ valid_cards_set.add(c)
+ }
+ }
+ }
+ game.valid_cards = Array.from(valid_cards_set)
+ return game.valid_cards
+}
+
+function do_valid_cards() {
+ let presence = check_presence(game.pwr_struggle_in)
+ if (game.active === DEM) {
+ valid_cards(game.dem_pwr_hand, presence.dem_leaders)
+ } else {
+ valid_cards(game.com_pwr_hand, presence.com_leaders)}
+}
+
+function count_adj(space_id) {
+ let dem_adj = 0
+ let com_adj = 0
+
+ let adjacent_spaces = get_adjusted_adjacency(space_id)
+ for (let adj_space_id of adjacent_spaces) {
+ if (check_dem_control(adj_space_id)) {
+ dem_adj++
+ }
+ if (check_com_control(adj_space_id)) {
+ com_adj++
+ }
+ }
+ return {dem_adj, com_adj}
+}
+
+function check_control(space_id) {
+ if ( (game.comInfl[space_id] - game.demInfl[space_id]) >= spaces[space_id].stability) {
+ return true;
+ } else if ((game.demInfl[space_id] - game.comInfl[space_id]) >= spaces[space_id].stability) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function check_opp_control(space_id) {
+ if (game.active === DEM && ((game.comInfl[space_id] - game.demInfl[space_id]) >= spaces[space_id].stability)) {
+ return true;
+ } else if (game.active === COM && ((game.demInfl[space_id] - game.comInfl[space_id]) >= spaces[space_id].stability)) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function check_dem_control(space_id) {
+ if ((game.demInfl[space_id] - game.comInfl[space_id]) >= spaces[space_id].stability) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function check_com_control(space_id) {
+ if ((game.comInfl[space_id] - game.demInfl[space_id]) >= spaces[space_id].stability) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function do_tst_attempt() {
+ let roll = roll_d6();
+ log(`Roll: D${roll}`);
+
+ roll += game.available_ops
+ logi(`+${game.available_ops} from card ops`)
+
+ // TIANANMEN SQUARE MODIFIERS
+
+ if (game.active === DEM && game.dem_tst_attempted === 1 || game.active === COM && game.com_tst_attempted === 1) {
+ roll ++;
+ logi('+1 from previous TST attempts')
+ }
+ if (game.active === DEM && game.dem_tst_position >= 1 && game.com_tst_position === 0) {
+ roll ++
+ logi('+1 from TST award')
+ }
+ if (game.active === COM && game.com_tst_position >= 1 && game.dem_tst_position === 0) {
+ roll ++
+ logi('+1 from TST award')
+ }
+ if ((game.active === DEM && cards[game.played_card].side === 'D') || (game.active === COM && cards[game.played_card].side === 'C')) {
+ roll ++;
+ logi('+1 for playing own card');
+ }
+ if (game.active === COM && game.persistent_events.includes(53)) {
+ roll ++
+ logi('+1 from C53')
+ }
+ log(`Modified roll: ${roll}`)
+
+ // TIANANMEN SQUARE ATTEMPT
+ game.return = game.active
+ game.return_state = 'tiananmen_square_attempt_done'
+ if (game.active === DEM) {
+ game.dem_tst_attempted_this_turn = 1
+ if (roll >= dem_tst_req[game.dem_tst_position]) {
+ log(`${dem_tst_req[game.dem_tst_position]} required: success`)
+ game.dem_tst_position++
+ game.dem_tst_attempted = 0
+
+ //Check if they have reached box 7 or 8 first
+ if (game.dem_tst_position === 7 && game.com_tst_position < 7) {
+ game.tst_7 = false
+ }
+ if (game.dem_tst_position === 8 && game.com_tst_position < 8) {
+ game.tst_8 = false
+ }
+
+ //Check if they have caught up to box 7 or 8
+ if (game.dem_tst_position >= 7 && game.com_tst_position >= 7) {
+ delete game.tst_7
+ }
+ if (game.dem_tst_position >= 8 && game.com_tst_position >= 8) {
+ delete game.tst_8
+ }
+
+ //Check if TST events occur
+ if (game.dem_tst_position === 3 && game.com_tst_position < 3) {game.vm_event = 203}
+ else if (game.dem_tst_position === 4 && game.com_tst_position < 4) {game.vm_event = 204}
+ game.state = 'tiananmen_square_attempt_success'
+ } else {
+ log(`${dem_tst_req[game.dem_tst_position]} required: fail`)
+ game.dem_tst_attempted = 1
+ game.state = 'tiananmen_square_attempt_fail'
+ }
+ } else {
+ game.com_tst_attempted_this_turn = 1
+ if (roll >= com_tst_req[game.com_tst_position]) {
+ log(`${com_tst_req[game.com_tst_position]} required: success`)
+ game.com_tst_position++
+ game.com_tst_attempted = 0
+
+ //Check if they have reached box 7 or 8 first
+ if (game.com_tst_position === 7 && game.dem_tst_position < 7) {
+ game.tst_7 = false
+ }
+ if (game.com_tst_position === 8 && game.dem_tst_position < 8) {
+ game.tst_8 = false
+ }
+
+ //Check if they have caught up to box 7 or 8
+ if (game.com_tst_position >= 7 && game.dem_tst_position >= 7) {
+ delete game.tst_7
+ }
+ if (game.com_tst_position >= 8 && game.dem_tst_position >= 8) {
+ delete game.tst_8
+ }
+
+ //Check if TST events occur
+ if (game.com_tst_position === 3 && game.dem_tst_position < 3) {game.vm_event = 203}
+ else if (game.com_tst_position === 4 && game.dem_tst_position < 4) {game.vm_event = 204}
+ game.state = 'tiananmen_square_attempt_success'
+ } else {
+ log(`${com_tst_req[game.com_tst_position]} required: fail`)
+ game.com_tst_attempted = 1
+ game.state = 'tiananmen_square_attempt_fail'
+ }
+ }
+}
+
+function check_presence(country) {
+
+ let dem_spaces = 0;
+ let com_spaces = 0;
+ let dem_battlegrounds = 0;
+ let com_battlegrounds = 0;
+ let dem_leaders = {1: false, 4: false, 5: false, 6: false, 7: false};
+ let com_leaders = {1: false, 4: false, 5: false, 6: false, 7: false};
+
+
+ for (let i = 0; i < spaces.length; i++) {
+ let space = spaces[i]
+ if (space.country === country) {
+
+ if (check_dem_control(i)) {
+ dem_spaces++;
+ if (space.battleground === 1) {
+ dem_battlegrounds++;
+ }
+ if (leaders.includes(space.socio)) {
+ dem_leaders[space.socio] = true;
+ }
+ }
+ if (check_com_control(i)) {
+ com_spaces++;
+ if (space.battleground === 1) {
+ com_battlegrounds++;
+ }
+ if (leaders.includes(space.socio)) {
+ com_leaders[space.socio] = true;
+ }
+ }
+ }
+ }
+
+ // Determine domination
+ let dem_domination = dem_battlegrounds > com_battlegrounds && dem_spaces > com_spaces && dem_spaces - dem_battlegrounds > 0;
+ let com_domination = com_battlegrounds > dem_battlegrounds && com_spaces > dem_spaces && com_spaces - com_battlegrounds > 0;
+
+ // Determine control
+ let total_battlegrounds = battlegrounds(country);
+ let dem_control = dem_battlegrounds === total_battlegrounds && dem_spaces > com_spaces;
+ let com_control = com_battlegrounds === total_battlegrounds && com_spaces > dem_spaces;
+
+ return {
+ dem_spaces: dem_spaces,
+ com_spaces: com_spaces,
+ dem_battlegrounds: dem_battlegrounds,
+ com_battlegrounds: com_battlegrounds,
+ dem_domination: dem_domination,
+ com_domination: com_domination,
+ dem_control: dem_control,
+ com_control: com_control,
+ dem_leaders: dem_leaders,
+ com_leaders: com_leaders
+ };
+}
+
+function battlegrounds(country) {
+ let battlegrounds = 0;
+ if (country === "Hungary") {
+ battlegrounds = 4
+ } else if (country === "Bulgaria") {
+ battlegrounds = 5
+ } else {
+ battlegrounds = 6
+ }
+ return battlegrounds;
+}
+
+function take_power(country) {
+ log(`Democrat takes power in ${game.pwr_struggle_in}`)
+ game.revolutions[find_country_index(country)] = true
+ game.times_held[find_country_index(country)] = 1
+}
+
+function retain_power(country){
+ game.times_held[find_country_index(country)]++
+ let vp_gain = get_value(country)*game.times_held[find_country_index(country)]
+ log(`Chooses to retain power`)
+ log(`-${vp_gain} VP`)
+ game.vp -= vp_gain
+}
+
+function score_country(country) {
+ log_h3(`Scoring: ${country}`)
+
+//Get scoring values
+ let value_presence = get_value(country)
+ let value_domination = value_presence*2
+ let value_control
+ if (country !== "Hungary") {
+ value_control = value_presence*3
+ } else {
+ value_control = 4
+ }
+
+ let dem_vp = 0
+ let com_vp = 0
+ //Check for presence
+ let presence = check_presence(country)
+
+ //If one side has domination or control
+ if (presence.dem_control || presence.dem_domination) {
+ log(`Democrat:`)
+ if (presence.dem_control) {
+ logi(`Control: +${value_control} VP`)
+ dem_vp += value_control
+ }
+ else {
+ logi(`Domination: +${value_domination} VP`)
+ dem_vp += value_domination
+ }
+ logi(`Battlegrounds: +${presence.dem_battlegrounds} VP`)
+ dem_vp += presence.dem_battlegrounds
+ log(`Total: +${dem_vp} VP`)
+
+ log_gap('Communist:')
+ if (presence.com_spaces > 0) {
+ logi(`Presence: -${value_presence} VP`)
+ com_vp -= value_presence
+ if (presence.com_battlegrounds >0) {
+ logi(`Battlegrounds: -${presence.com_battlegrounds} VP`)
+ com_vp -= presence.com_battlegrounds
+ }
+ log(`Total: ${com_vp} VP`)
+ } else {
+ log('No presence: 0 VP')
+ }
+ }
+ else if (presence.com_control || presence.com_domination) {
+ log('Communist:')
+ if (presence.com_control) {
+ logi(`Control: -${value_control} VP`)
+ com_vp -= value_control
+ }
+ else {
+ logi(`Domination: -${value_domination} VP`)
+ com_vp -= value_domination
+ }
+ logi(`Battlegrounds: -${presence.com_battlegrounds} VP`)
+ com_vp -= presence.com_battlegrounds
+ log(`Total: ${com_vp} VP`)
+
+ log_gap('Democrat:')
+ if (presence.dem_spaces > 0) {
+ logi(`Presence: +${value_presence} VP`)
+ dem_vp += value_presence
+ if (presence.dem_battlegrounds > 0) {
+ logi(`Battlegrounds: +${presence.dem_battlegrounds} VP`)
+ dem_vp += presence.dem_battlegrounds
+ }
+ log (`Total: +${dem_vp} VP`)
+ } else {
+ log('No presence: 0 VP')
+ }
+ }
+
+ //Otherwise, presence and battlegrounds
+ else {
+ log("No domination or control")
+ log_gap(`Communist:`)
+ if (presence.com_spaces > 0) {
+ logi(`Presence: -${value_presence} VP`)
+ com_vp -= value_presence
+ if (presence.com_battlegrounds > 0) {
+ logi(`Battlegrounds: -${presence.com_battlegrounds} VP`)
+ com_vp -= presence.com_battlegrounds
+ } else {
+ logi('No battlegrounds')
+ }
+ logi(`Total: ${com_vp} VP`)
+ } else {
+ logi('No presence: 0 VP')
+ }
+ log_gap('Democrat:')
+ if (presence.dem_spaces > 0) {
+ logi(`Presence: +${value_presence} VP`)
+ dem_vp += value_presence
+ if (presence.dem_battlegrounds > 0) {
+ logi(`Battlegrounds: +${presence.dem_battlegrounds} VP`)
+ dem_vp += presence.dem_battlegrounds
+ } else {
+ logi('No battlegrounds')
+ }
+ logi(`Total: +${dem_vp} VP`)
+ } else {
+ logi('No presence: 0 VP')
+ }
+ }
+
+//Calculate change VP
+ let change_vp = dem_vp + com_vp
+ game.vp += change_vp
+ if (change_vp > 0 ) {
+ log_gap(`Scoring: +${change_vp} VP`)
+ } else {
+ log_gap(`Scoring: ${change_vp} VP`)
+ }
+}
+
+function get_value(country) {
+ let value
+ if (country === "East_Germany" || country === "Poland") {value = 3}
+ else if (country === "Czechoslovakia" || country === "Romania") {value = 2}
+ else value = 1
+ return value
+}
+
+function get_end_infl_prompt() {
+ view.prompt = `${clean_name(cards[this_card()].name)}. Add SPs: done.`
+ if (!game.vm_infl_to_do) {
+ gen_action('end_round')
+ } else {
+ gen_action('done')
+ }
+}
+
+function get_aftermath_roll() {
+ clear_undo()
+ let roll = roll_d6()
+ log(`Roll: D${roll}`)
+ let rally_win = 0
+ let petition_win = 0
+ if (rallies.includes(game.played_power_card) || game.proxy_power_card === 'Rally in the Square') { rally_win = 2}
+ if (petitions.includes(game.played_power_card) || game.proxy_power_card === 'Petition') { petition_win = 2}
+ let modified_roll = roll + game.raised_stakes + rally_win - petition_win
+
+ // Special check for Yakovlev Counsels Gobachev. Applies only if Democrat wins, so only if Com is doing support loss and if Dem is doing VP roll
+ if (game.state === 'support_loss') {
+ if (game.active === COM && game.persistent_events.includes(C_YAKOVLEV_COUNSELS_GORBACHEV)) {
+ logi(`+1 from C${C_YAKOVLEV_COUNSELS_GORBACHEV}`)
+ modified_roll ++
+ }
+ } else {
+ if (game.active === DEM && game.persistent_events.includes(C_YAKOVLEV_COUNSELS_GORBACHEV)) {
+ logi(`+1 from C${C_YAKOVLEV_COUNSELS_GORBACHEV}`)
+ modified_roll ++
+ }
+ }
+ if (modified_roll < 0) {modified_roll = 0}
+ else if (modified_roll > 7) {modified_roll = 7}
+
+ if (game.raised_stakes !== 0) {
+ logi(`+${game.raised_stakes} from Raising the Stakes`)
+ }
+ if (rally_win !== 0) {
+ logi('+2 from winning on a P1')
+ }
+ if (petition_win !== 0) {
+ logi('-2 from winning on a P31')
+ }
+ if (modified_roll !== roll) {
+ log(`Modified roll: ${modified_roll}`)
+ }
+ return modified_roll
+}
+
+function add_to_persistent_events(card) {
+ game.persistent_events.push(card)
+ remove_from_discard(card)
+ //let silent_cards = [C_SYSTEMATIZATION, C_FOREIGN_CURRENCY_DEBT_BURDEN]
+ if (is_auto_resolve(card)) {log_gap(`C${card}:`)}
+}
+
+function permanently_remove(card) {
+ game.persistent_events = game.persistent_events.filter( c => c !== card)
+ remove_from_discard(card)
+ if (!game.strategy_removed.includes(card)) {
+ game.strategy_removed.push(card)
+ }
+}
+
+function check_vp() {
+ if (game.vp >= 20) {
+ goto_game_over(DEM, `${DEM} won an Automatic Victory!`)
+ return true
+ } else if(game.vp <= -20) {
+ goto_game_over(COM, `${COM} won an Automatic Victory!`)
+ return true
+ }
+ return false
+}
+
+function game_over() {
+ if (game.vp >= 20 || game.vp <= -20) {
+ return true
+ } else { return false}
+}
+
+function goto_game_over(result, victory) {
+ game.state = "game_over"
+ game.active = "None"
+ game.result = result
+ game.victory = victory
+ log_h1("Game Over")
+ log(game.victory)
+ return
+}
+
+function goto_struggle(){
+ game.raised_stakes_discard = 0
+ game.valid_cards = []
+ log_h2('Play Cards')
+ next_player()
+ game.state = 'power_struggle'
+ do_valid_cards()
+}
+
+function reset_austria_hungary_border_reopened() {
+ game.austria_hungary_border_reopened_tracker = false
+}
+
+function end_stasi_choose_card() {
+ if (game.stasi_card === C_COMMON_EUROPEAN_HOME) {
+ game.state = 'stasi_confirm'
+ } else {
+ game.round_player = COM
+ game.round ++
+ log_h2(`Action Round ${game.round}`)
+ next_player()
+ game.valid_spaces = []
+ if (game.persistent_events.includes(5)) {
+ log_h3('C5')
+ game.state = 'general_strike'
+ } else {
+ game.state = 'choose_card'
+ }
+ }
+}
+
+function end_goddess() {
+ game.return_state = ''
+ log_h2("Action Round " + game.round)
+ if (game.active === DEM) {
+ next_player()
+ } else {
+ log_side()
+ }
+ if (game.persistent_events.includes(5)) {
+ game.state = 'general_strike'
+ } else {
+ game.state = 'choose_card'
+ }
+}
+
+function check_reformer() { /*Is this function still used?*/
+ if (game.dem_tst_position !== game.com_tst_position) {
+ if (!game.playable_cards.includes(67)) {
+ game.playable_cards.push(67)
+ }
+ } else {
+ game.playable_cards = game.playable_cards.filter(n => n !== 67)
+ }
+}
+
+function count_scoring_cards() {
+ let scoring_check
+ if (game.active === DEM) {
+ scoring_check = game.democrat_hand.filter(card => scoring_cards.includes(card)).length
+ } else {
+ scoring_check = game.communist_hand.filter(card => scoring_cards.includes(card)).length
+ }
+ return scoring_check
+}
+
+function select_card(card){
+ game.played_card = card
+ game.temp = 0
+ let find_card
+ if (game.active === COM) {
+ find_card = game.communist_hand.indexOf(card)
+ game.communist_hand.splice(find_card, 1)
+ } else {
+ find_card = game.democrat_hand.indexOf(card)
+ game.democrat_hand.splice(find_card, 1)
+ }
+ game.available_ops = get_card_ops(card)
+
+ //Check Ligachev
+ if (game.active === DEM && game.persistent_events.includes(99) && card !== C_GORBACHEV_CHARMS_THE_WEST) {
+ log(`-3 VP from C${C_LIGACHEV}`)
+ game.vp -= 3
+ if (check_vp()) {
+ return
+ }
+ game.persistent_events = game.persistent_events.filter(n => n !== 99)
+ game.strategy_removed.push(C_LIGACHEV)
+ }
+ game.state = 'play_card'
+}
+
+function is_auto_resolve(card) {
+ let ceausecu_events = [10, 41, 69, 101, 107]
+ if (auto_resolve_events.includes(card)) {
+ return true
+ }
+ else if (card === C_THE_TYRANT_IS_GONE) {
+ if (game.persistent_events.includes(C_THE_CROWD_TURNS_AGAINST_CEAUSESCU)) {
+ return true
+ }
+ }
+ else if (ceausecu_events.includes(card) && game.persistent_events.includes(THE_TYRANT_IS_GONE_OCCURRED)) {
+ return true
+ }
+ else if (card === C_KOHL_PROPOSES_REUNIFICATION && !game.persistent_events.includes(C_THE_WALL_MUST_GO)) {
+ return true
+ }
+ else if (card === C_BROUGHT_IN_FOR_QUESTIONING && game.active === DEM) {
+ if (game.democrat_hand.length === 0) {
+ if (!game.state.startsWith('vm')) { logi('Democrat has no cards to discard') }
+ return true }
+ }
+ else if (card === C_DEUTSCHE_MARKS && game.active === DEM) {
+ if (game.democrat_hand.length === 0) {
+ if (!game.state.startsWith('vm')) { logi('Democrat has no cards to give') }
+ return true }
+ }
+ else if (card === C_KISS_OF_DEATH && game.active === COM) {
+ if (game.communist_hand.length === 0) {
+ if (!game.state.startsWith('vm')) { logi('Communist has no cards to discard') }
+ return true }
+ }
+ else if (card === C_DISSIDENT_ARRESTED && game.active === DEM) {
+ let dem_intellectual_infl = spaces.filter(space => space.socio === 5 && game.demInfl[space.space_id] > 0).length
+ if (dem_intellectual_infl === 0) {
+ if (!game.state.startsWith('vm')) { logi('No influence to remove') }
+ return true
+ }
+ } else if ((card === C_SAJUDIS || card === C_THE_BALTIC_WAY) && game.active === COM) {
+ if (game.systematization && game.systematization === S_HARGHITA_COVASNA ) {
+ if (check_dem_control(S_RAZGRAD)) {
+ if (!game.state.startsWith('vm')) { logi('Minorities spaces already controlled') }
+ return true
+ }
+ } else if (check_dem_control(S_RAZGRAD) && check_dem_control(S_HARGHITA_COVASNA)) {
+ if (!game.state.startsWith('vm')) { logi('Minorities spaces already controlled') }
+ return true
+ }
+ } else if (card === C_CEAUSESCU && game.active === DEM) {
+ let dem_romania_infl = spaces.filter(space => space.country === 'Romania' && game.demInfl[space.space_id] > 0).length
+ if (dem_romania_infl === 0) {
+ if (!game.state.startsWith('vm')) { logi('No influence to remove') }
+ return true
+ }
+ }
+ else if (card === C_WE_ARE_THE_PEOPLE && game.active === COM) {
+ if (game.demInfl[S_LUTHERAN_CHURCH] === 0) {
+ if (!game.state.startsWith('vm')) { logi('No influence to remove') }
+ return true
+ }
+ }
+ else if (card === C_BETRAYAL && game.active === DEM) {
+ if (!game.systematization === S_ORTHODOX_CHURCH_ROMANIA) {
+ if (game.demInfl[S_ORTHODOX_CHURCH_BULGARIA] === 0) {
+ if (!game.state.startsWith('vm')) { logi('No influence to remove') }
+ return true
+ }
+ } else if (game.demInfl[S_ORTHODOX_CHURCH_BULGARIA] === 0 && game.demInfl[S_ORTHODOX_CHURCH_ROMANIA] === 0) {
+ if (!game.state.startsWith('vm')) { logi('No influence to remove') }
+ return true
+ }
+ }
+ else if (card === C_GOVERNMENT_RESIGNS && game.active === COM) {
+ let uncontrolled_elites = spaces.filter( space => spaces[space.space_id].socio === 1 && game.comInfl[space.space_id] > 0 && !check_control(space.space_id)).length
+ if (uncontrolled_elites === 0) {
+ if (!game.state.startsWith('vm')) { logi('No uncontrolled Elite spaces') }
+ return true
+ }
+ } else if (card === C_ST_NICHOLAS_CHURCH && game.active === COM) {
+ if (check_dem_control(S_LUTHERAN_CHURCH)) {
+ if (!game.state.startsWith('vm')) { logi('Lutheran Church already controlled') }
+ return true
+ }
+ } else if (card === C_BULGARIAN_TURKS_EXPELLED && game.active === DEM) {
+ if (game.demInfl[S_RAZGRAD] === 0 ) {
+ if (!game.state.startsWith('vm')) { logi('No influence to remove') }
+ return true
+ }
+ } else if (card === C_NORMALIZATION && game.active === DEM) {
+ if (game.demInfl[S_PRAHA] === 0 && game.demInfl[S_PLZEN] === 0 ) {
+ if (!game.state.startsWith('vm')) { logi('No influence to remove') }
+ return true
+ }
+ } else if (card === C_DOMINO_THEORY) {
+ if (game.revolutions.filter(value => value === true).length < 2) {
+ return true
+ } else if (!scoring_cards.some(card => game.strategy_discard.includes(card))) {
+ return true
+ }
+ } else if (card === C_UNION_OF_DEMOCRATIC_FORCES && game.active === COM) {
+ let bulgarian_presence = spaces.filter(space => space.country === 'Bulgaria' && game.comInfl[space.space_id] > 0).length
+ if (bulgarian_presence === 0) {
+ if (!game.state.startsWith('vm')) { logi('No SPs to remove') }
+ return true
+ }
+ } else if (card === C_EXIT_VISAS && game.active === COM) {
+ if (game.democrat_hand.length === 0) {
+ if (!game.state.startsWith('vm')) { logi('Democrat has no cards to discard') }
+ return true
+ }
+ } else if (card === C_SAMIZDAT && game.active === COM) {
+ if (game.democrat_hand.length === 0) {
+ if (!game.state.startsWith('vm')) { logi('Democrat has no cards to set aside') }
+ return true
+ }
+ } else if (card === C_SPITZEL && game.active === DEM) {
+ let dem_germany_infl = spaces.filter(space => space.country === 'East_Germany' && game.demInfl[space.space_id] > 0).length
+ if (dem_germany_infl === 0) {
+ if (!game.state.startsWith('vm')) { logi('No influence to remove') }
+ return true
+ }
+ } else if (card === C_MY_FIRST_BANANA && game.active === COM) {
+ let com_germany_infl = spaces.filter(space => space.country === 'East_Germany' && game.comInfl[space.space_id] > 0).length
+ if (com_germany_infl === 0) {
+ if (!game.state.startsWith('vm')) { logi('No influence to remove') }
+ return true
+ }
+ } else if (card === C_POLITBURO_INTRIGUE && game.active === DEM) {
+ let dem_bulgaria_infl = spaces.filter(space => space.country === 'Bulgaria' && game.demInfl[space.space_id] > 0).length
+ if (dem_bulgaria_infl === 0) {
+ if (!game.state.startsWith('vm')) { logi('No influence to remove') }
+ return true
+ }
+ }
+ else {
+ return false
+ }
+}
+
+function get_events(card){
+ if (event_is_playable(card)) {
+ if (cards[card].side === 'D') {
+ if (game.active === DEM) {gen_action('event')}
+ if (game.active === COM) {gen_action('opp_event')}
+ }
+ else if (cards[card].side === 'C') {
+ if (game.active === COM) {gen_action('event')}
+ if (game.active === DEM) {gen_action('opp_event')}
+ }
+ else {
+ gen_action('event')
+ }
+ }
+}
+
+function event_is_playable(card) {
+ //Reformer never playable here
+ if (card === C_REFORMER_REHABILITATED) {
+ return false
+ }
+ //Check for Common European Home under Stasi
+ else if (game.stasi_card === C_COMMON_EUROPEAN_HOME && card === C_COMMON_EUROPEAN_HOME && game.active === DEM) {
+ return false
+ }
+ //Check for The Chinese Solution
+ else if (game.com_tst_position >= 7 && card === C_THE_CHINESE_SOLUTION) {
+ return true
+ }
+
+ //Check for Gorbachev Charms the West after Breakaway Baltic Republics
+ else if (card === C_GORBACHEV_CHARMS_THE_WEST && !game.playable_cards.includes(C_GORBACHEV_CHARMS_THE_WEST)) {
+ return false
+ }
+ //Then check normally
+ else if (game.playable_cards.includes(card)) {
+ return true
+ } else if (cards[card].playable) {
+ return true
+ } else {
+ return false
+ }
+}
+
+function get_card_ops(card) {
+ let ops = cards[card].ops
+ if (game.persistent_events.includes(C_PERESTROIKA) && game.active === COM) {
+ if(game.state === 'choose_card' || game.state === 'stasi_play_card' || game.state === 'vm_common_european_home_play' || game.state === 'general_strike') {
+ log(`+1 op from C${C_PERESTROIKA}`)
+ }
+ ops ++
+ }
+ if (game.persistent_events.includes(C_THE_SINATRA_DOCTRINE) && game.active === DEM) {
+ if(game.state === 'choose_card' || game.state === 'stasi_play_card' || game.state === 'vm_common_european_home_play' || game.state === 'vm_laszlo_tokes') {
+ log(`+1 op from C${C_THE_SINATRA_DOCTRINE}`)
+ }
+ ops ++
+ }
+
+ if ((game.active === DEM && game.dem_tst_position >= 2 && game.com_tst_position <= 1 && cards[card].ops === 1) || (game.active === COM && game.com_tst_position >=2 && game.dem_tst_position <= 1 && cards[card].ops === 1)) {
+ if(game.state === 'choose_card' || game.state === 'stasi_play_card' || game.state === 'vm_common_european_home_play') {
+ log('+1 op from Tiananmen Square Track')
+ }
+ ops ++
+ }
+
+ if ((game.active === DEM && game.prudence && game.prudence.DEM !== 0)) {
+ if(game.state === 'choose_card' || game.state === 'stasi_play_card' || game.state === 'vm_common_european_home_play' || game.state === 'vm_laszlo_tokes') {
+ if (ops > 2) {
+ log(`${pluralize(game.prudence.DEM,'op')} from C${C_PRUDENCE}`)
+ } else {
+ if (ops > 1) {
+ log(`-1 op from C${C_PRUDENCE}`)
+ }
+ }
+ }
+ ops += game.prudence.DEM
+
+ if (ops < 1) {
+ ops = 1
+ }
+ }
+
+ if (game.active === COM && game.prudence && game.prudence.COM < 0) {
+ if(game.state === 'choose_card' || game.state === 'general_strike' || game.state === 'vm_common_european_home_play') {
+ if (ops > 2) {
+ log(`${pluralize(game.prudence.COM,'op')} from C${C_PRUDENCE}`)
+ } else if (ops > 1) {
+ log(`-1 op from C${C_PRUDENCE}`)
+ }
+ }
+ ops += game.prudence.COM
+ if (ops < 1) {
+ ops = 1
+ }
+ } return ops
+}
+
+function get_tst_6_ops() {
+ let ops = 0
+ if (game.persistent_events.includes(C_PERESTROIKA) && game.active === COM) {
+ logi(`+1 op from C${C_PERESTROIKA}`)
+ ops ++
+ }
+ if (game.persistent_events.includes(C_THE_SINATRA_DOCTRINE) && game.active === DEM) {
+ logi(`+1 op from C${C_THE_SINATRA_DOCTRINE}`)
+ ops ++
+ }
+ if ((game.active === DEM && game.prudence && game.prudence.DEM !== 0)) {
+ if (ops > 0) {
+ log(`${pluralize(game.prudence.DEM,'op')} from C${C_PRUDENCE}`)
+ } else {
+ logi(`-1 op from C${C_PRUDENCE}`)
+ }
+ ops += game.prudence.DEM
+ if (ops < -1) {
+ ops = -1
+ }
+ }
+
+ if (game.active === COM && game.prudence && game.prudence.COM < 0) {
+ if (ops > 0) {
+ logi(`${pluralize(game.prudence.COM,'op')} from C${C_PRUDENCE}`)
+ } else {
+ logi(`-1 op from C${C_PRUDENCE}`)
+ }
+ ops += game.prudence.COM
+ if (ops < -1) {
+ ops = -1
+ }
+ }
+ return ops
+}
+
+function finish_play_card() {
+ // Check if Common European Home played for influence
+ if (game.played_card === C_COMMON_EUROPEAN_HOME) {
+ if (game.active === DEM) {
+ game.vp --
+ logi(`-1 VP for playing C${C_COMMON_EUROPEAN_HOME} for operations`)
+ } else {
+ game.vp ++
+ logi(`+1 VP for playing C${C_COMMON_EUROPEAN_HOME} for operations`)
+ }
+ if (check_vp()) {
+ return
+ }
+ }
+ // Check if card is opponent card with event that needs to be resolved
+
+ if (cards[game.played_card].playable || game.playable_cards.includes(game.played_card)) {
+ if ((game.active === DEM && cards[game.played_card].side === "C" ) || (game.active === COM && cards[game.played_card].side === "D")) {
+ game.vm_event_to_do = true
+ }
+ }
+}
+
+function finish_the_wall() {
+ if (game.the_wall_must_go['dem_wins'] === 2) {
+ game.persistent_events.push(C_THE_WALL_MUST_GO)
+ game.playable_cards = game.playable_cards.filter(card => card !== C_THE_WALL)
+ log('+3 VP')
+ game.vp += 3
+ if (check_vp()) {
+ return
+ }
+ for (let i = 0; i < spaces.length; i++) {
+ let space = spaces[i]
+ if (space.country === 'East_Germany' && game.comInfl[i] > 0){
+ game.valid_spaces.push(space.space_id)
+ }
+ }
+ if (game.active === DEM) {next_player()}
+ game.return = COM
+ vm_next ()
+ } else {
+ permanently_remove(C_THE_WALL_MUST_GO)
+ delete game.the_wall_must_go
+ if (game.vm_infl_to_do) {
+ game.return = COM
+ } else {
+ game.return = game.active
+ }
+ vm_return()
+ }
+}
+
+// =========== MOVING THROUGH TURNS ============
+
+function end_round() {
+ //Check if the game is over! WHY IS THIS NEEDED?
+ if (game.state === 'game_over') {
+ return}
+
+ //Check if the card needs to be discarded.
+ let discard_check = [...game.strategy_removed, ...game.persistent_events]
+ if (!discard_check.includes(game.played_card) && game.played_card > 0) {
+ game.strategy_discard.push(game.played_card)
+ }
+
+ //Reset
+ game.played_card = 0
+ delete game.temp
+ delete game.vm_event
+ delete game.phase
+ game.remove_opponent_infl = false
+ game.is_pwr_struggle = false
+ game.vm_infl_to_do = false /*Can get rid of this and use game.return_state? */
+ delete game.vm_event_to_do
+ delete game.vm_infl_to_do
+ delete game.vm_active_country
+ game.return_state = ''
+ game.discard = false
+ game.return = ''
+ game.valid_cards = []
+ game.valid_spaces = []
+ check_common_european_home()
+ reset_austria_hungary_border_reopened() /*This should be redundant! */
+
+ // Check for duplicate card entries
+ let card_check
+ if (game.samizdat_card > 0) {
+ card_check = [...game.strategy_deck, ...game.strategy_discard, ...game.strategy_removed, ...game.persistent_events, ...game.communist_hand, ... game.democrat_hand, game.samizdat_card];
+ } else {
+ card_check = [...game.strategy_deck, ...game.strategy_discard, ...game.strategy_removed, ...game.persistent_events, ...game.communist_hand, ... game.democrat_hand];
+ }
+ card_check = card_check.filter(card => card <= last_strategy_card)
+ function check_duplicates(array) {
+ return new Set(array).size !== array.length;
+ }
+
+ function find_duplicates(array) {
+ const duplicates = array.filter((item, index) => array.indexOf(item) !== index);
+ return [...new Set(duplicates)];
+ }
+
+ card_check = card_check.sort((a, b) => a - b)
+
+ if (check_duplicates(card_check)) {
+ console.log('duplicate cards: card check', card_check)
+ const duplicates = find_duplicates(card_check)
+ console.log('game.strategy_deck', game.strategy_deck, 'game.strategy_discard', game.strategy_discard, 'game.strategy_removed', game.strategy_removed, 'game.persistent_events', game.persistent_events, 'game.communist_hand', game.communist_hand, 'game.democrat_hand', game.democrat_hand)
+ throw new Error(`Duplicate cards detected: ${duplicates.join(', ')}`)
+ }
+
+ if (game.turn <= 3) {
+ if (card_check.length !== 40) {
+ console.log('wrong number of cards in game', card_check)
+ throw new Error(`Wrong number of cards: ${card_check.length}`)
+ }
+ } else if (game.turn <=7) {
+ if (card_check.length !== 81) {
+ console.log('wrong number of cards in game', card_check)
+ throw new Error(`Wrong number of cards: ${card_check.length}`)
+ }
+ } else if (card_check.length !== 110) {
+ console.log('Entire array:', JSON.stringify(card_check))
+ throw new Error(`Wrong number of cards: ${card_check.length}`)
+ }
+
+ //Check if the Reformer is playable
+ check_reformer()
+
+ // Check if last round and if so resolve end turn events
+ if (game.round_player === DEM && game.round === 7) {
+ if(game.persistent_events.includes(C_HONECKER)) {
+ if (game.active !== COM) {
+ next_player()
+ }
+ game.state = 'honecker'
+ return
+ }
+ else if (game.dem_tst_position >= 6 && game.com_tst_position <= 5) {
+ if (game.active !== DEM) {
+ next_player()
+ }
+ game.return = game.active
+ clear_undo()
+ game.return_state = 'end_turn_4_5_4'
+ goto_vm(206)
+ return
+ } else if (game.com_tst_position >= 6 && game.dem_tst_position <= 5) {
+ if (game.active !== COM) {
+ next_player()
+ }
+ game.return = game.active
+ clear_undo()
+ game.return_state = 'end_turn_4_5_4'
+ goto_vm(206)
+ return
+ }
+ else {
+ clear_undo()
+ game.state = 'end_turn_4_5_4'
+ return
+ }
+ }
+
+ // Resolve end action round
+ //Stasi check
+ if(game.round_player === COM && game.persistent_events.includes(C_STASI)) {
+ //If in Honecker, turn ends
+ if (game.round === 8) {
+ clear_undo()
+ game.state = 'end_turn_4_5_4'
+ return
+ }
+ //Otherwise go to Stasi
+ game.round_player = DEM
+ if (game.active !== DEM) {
+ next_player()
+ } else {
+ log_h3('Democratic Action Round')
+ }
+ if (game.democrat_hand.includes(game.stasi_card)) {
+ log_h3('C13')
+ game.state = 'stasi_play_card'
+ } else {
+ game.stasi_card = 0
+ game.state = 'choose_card'
+ }
+ return
+ }
+ //Check if in extra Action Round
+ else if (game.round_player === COM && game.round === 8) {
+ clear_undo()
+ game.state = 'end_turn_4_5_4'
+ return
+ }
+ //Normal round end
+ else if (game.round_player===COM) {
+ game.round_player = DEM
+ if (game.active !== DEM) {
+ next_player()
+ } else {
+ log_h3('Democratic Action Round')
+ }
+ game.state = 'choose_card'
+ return
+ }
+ if (game.round_player === DEM) {
+
+ if(game.persistent_events.includes(C_STASI)) {
+ if (game.active !== DEM) {
+ next_player()
+ }
+ log_h3('C13')
+ game.state = 'stasi_end_round'
+ return
+ } else if(game.round_player === DEM && game.persistent_events.includes(C_GENERAL_STRIKE)){
+ game.state = 'general_strike'
+ game.round ++
+ log_h2(`Action Round ${game.round}`)
+ game.round_player = COM
+ if (game.active !== COM) {
+ next_player()
+ }
+ log_h3('C5')
+ return
+ } else {
+ game.state = 'choose_card'
+ game.round_player = COM
+ game.round ++
+ log_h2(`Action Round ${game.round}`)
+ if (game.active !== COM) {
+ next_player()
+ }
+ }
+ }
+}
+
+function new_turn() {
+ clear_undo()
+ game.turn ++
+ game.round = 1
+ game.valid_spaces=[]
+ game.active = COM
+ game.round_player = COM
+ game.dem_tst_attempted_this_turn = 0
+ game.com_tst_attempted_this_turn = 0
+ if (game.tst_7) {game.tst_7 = false}
+ if (game.tst_8) {game.tst_8 = false}
+ delete game.selected_space
+
+ //Remove events that only last one turn
+
+ for (let e of one_turn_events) {
+ if (game.persistent_events.includes(e)) {
+ end_one_turn_event(e)
+ }
+ }
+ if (game.prudence) {
+ delete game.prudence
+ log_summary(`C${8}`)
+ }
+ if (game.summary.length > 0) {
+ log('No longer in effect:')
+ pop_summary_i()
+ log_br()
+ }
+ delete game.stasi_card
+ delete game.stand_fast
+
+ if (game.samizdat_card > 0 ) {
+ game.democrat_hand.push(game.samizdat_card)
+ delete game.samizdat_card
+ }
+
+ log_h1("Turn " + game.turn)
+
+ if (game.turn === 4) { add_midyear() }
+ if (game.turn === 8) { add_lateyear() }
+
+ if (game.turn > 1) {
+ if (game.persistent_events.includes(C_PRESIDENTIAL_VISIT)) {
+ game.com_hand_limit = 7
+ log('Communist draws 7 cards due to C65')
+ permanently_remove(C_PRESIDENTIAL_VISIT)
+ game.persistent_events = game.persistent_events.filter( card => card !== C_PRESIDENTIAL_VISIT)
+ }
+ draw_cards(game.strategy_deck, game.democrat_hand, game.communist_hand, game.dem_hand_limit, game.com_hand_limit)
+ game.com_hand_limit = 8
+ }
+
+ //Check if TST effects need to be resolved
+ if ((game.dem_tst_position >=5 && game.com_tst_position <= 4) || (game.com_tst_position >= 5 && game.dem_tst_position <= 4)) {
+ log_h2('Tiananmen Square Track Award')
+
+ if ((game.dem_tst_position >= 5 && game.com_tst_position <= 4 && game.active !== DEM) || (game.com_tst_position >= 5 && game.dem_tst_position <= 4 && game.active !== COM)) {
+ next_player()
+ }
+ let hand = game.dem_tst_position >=5 ? game.democrat_hand : game.communist_hand
+ for (let card of hand) {
+ if (scoring_cards.includes(card)) continue
+ game.valid_cards.push(card)
+ }
+ game.state = 'tst_goddess'
+ } else {
+ log_h2("Action Round " + game.round)
+ log_side()
+ if (game.persistent_events.includes(5)) {
+ log_h3('C5')
+ game.state = 'general_strike'
+ }
+ else {
+ game.state = 'choose_card'
+ }
+ }
+}
+
+function end_one_turn_event(event) {
+ game.persistent_events = game.persistent_events.filter(n => n !== event)
+ game.strategy_removed.push(event)
+ log_summary(`C${event}`)
+}
+
+function next_player() {
+ clear_undo()
+ if (game.active === DEM)
+ game.active = COM
+ else
+ game.active = DEM
+ log_side()
+}
+
+function change_player() {
+ clear_undo()
+ if (game.active === DEM)
+ game.active = COM
+ else
+ game.active = DEM
+}
+
+function random(range) {
+ return (game.seed = game.seed * 200105 % 34359738337) % range
+}
+
+function roll_d6() {
+ return random(6) + 1
+}
+
+function find_country_index(country) {
+ return countries.indexOf(country)
+}
+
+function draw_deck() {
+ let deck = []
+ for (let c = first_strategy_card; c <= last_strategy_card; ++c)
+ if (cards[c].period === 1)
+ deck.push(c)
+ return deck
+}
+
+function draw_cards(deck, democrat_hand, communist_hand, dem_hand_limit, com_hand_limit) {
+ //Start with the communist player
+ let turn = 'communist';
+ while (democrat_hand.length < dem_hand_limit || communist_hand.length < com_hand_limit) {
+ if (deck.length === 0) {
+ log_h3('--- Reshuffle ---')
+ deck.push(...game.strategy_discard)
+ game.strategy_discard = []
+ } else if (turn === 'communist' && communist_hand.length < com_hand_limit) {
+ communist_hand.push(draw_card(deck));
+ turn = 'democrat';
+ } else if(turn === 'communist' && communist_hand.length === com_hand_limit) {
+ turn = 'democrat';
+ }
+ else if (turn === 'democrat' && democrat_hand.length < dem_hand_limit) {
+ democrat_hand.push(draw_card(deck));
+ turn = 'communist';
+ }
+ else if (turn === 'democrat' && democrat_hand.length === dem_hand_limit) {
+ turn = 'communist';
+ }
+ }
+ clear_undo()
+}
+
+function draw_card(deck) {
+ if (deck.length === 0) {
+ log_h3('--- Reshuffle ---')
+ deck.push(...game.strategy_discard)
+ game.strategy_discard = []
+ }
+ const randomIndex = Math.floor(random(deck.length))
+ return deck.splice(randomIndex, 1)[0];
+}
+
+function discard(card) {
+ let find_card
+ if (!game.is_pwr_struggle) {
+ if (game.active === COM) {
+ find_card = game.communist_hand.indexOf(card)
+ game.communist_hand.splice(find_card, 1)
+ } else {
+ find_card = game.democrat_hand.indexOf(card)
+ game.democrat_hand.splice(find_card, 1)
+ }
+ if (!game.strategy_discard.includes(card)) {
+ game.strategy_discard.push(card)
+ log(`Discarded C${card}`)
+ }
+ } else if (game.is_pwr_struggle) {
+ if (game.active === COM) {
+ find_card = game.com_pwr_hand.indexOf(card);
+ game.com_pwr_hand.splice(find_card, 1);
+ } else {
+ find_card = game.dem_pwr_hand.indexOf(card);
+ game.dem_pwr_hand.splice(find_card, 1);
+ }
+ game.power_struggle_discard.push(card)
+ }
+}
+function silent_discard(card) {
+ let find_card
+ if (!game.is_pwr_struggle) {
+ if (game.active === COM) {
+ find_card = game.communist_hand.indexOf(card)
+ game.communist_hand.splice(find_card, 1)
+ } else {
+ find_card = game.democrat_hand.indexOf(card)
+ game.democrat_hand.splice(find_card, 1)
+ }
+ if (!game.strategy_discard.includes(card)) {
+ game.strategy_discard.push(card)
+ }
+ } else if (game.is_pwr_struggle) {
+ if (game.active === COM) {
+ find_card = game.com_pwr_hand.indexOf(card);
+ game.com_pwr_hand.splice(find_card, 1);
+ } else {
+ find_card = game.dem_pwr_hand.indexOf(card);
+ game.dem_pwr_hand.splice(find_card, 1);
+ }
+ game.power_struggle_discard.push(card)
+ }
+}
+
+function remove_from_discard(card) {
+ let card_index = game.strategy_discard.indexOf(card)
+ if (card_index !== -1) {
+ game.strategy_discard.splice(card_index, 1)
+ }
+}
+
+function discard_card(hand) {
+ let card = Math.floor(random(hand.length))
+ let discarded_card = hand.splice(card, 1)[0]
+ if (game.is_pwr_struggle) {
+ if (numberless_cards.includes(discarded_card)) {
+ logi(`Discarded: P${discarded_card}`)
+ } else {
+ logi(`Discarded: P${discarded_card} V${power_cards[discarded_card].value}`)
+ }
+ game.power_struggle_discard.push(discarded_card)
+ } else {
+ log(`Discarded C${discarded_card}`)
+ game.strategy_discard.push(discarded_card)
+ }
+ return discarded_card
+}
+
+function add_midyear() {
+ for (let c = first_strategy_card; c <= last_strategy_card; ++c)
+ if (cards[c].period === 2)
+ game.strategy_deck.push(c)
+ log_h3('Mid-year cards added to draw deck')
+}
+
+function add_lateyear() {
+ for (let c = first_strategy_card; c <= last_strategy_card; ++c)
+ if (cards[c].period === 3)
+ game.strategy_deck.push(c)
+ log_h3('Late-year cards added to draw deck')
+}
+
+function reset_power() {
+ game.power_struggle_deck = []
+ game.power_struggle_discard = []
+ game.dem_pwr_hand = []
+ game.com_pwr_hand = []
+ delete game.phase
+ delete game.raised_stakes_round
+ delete game.raised_stakes
+ delete game.raised_stakes_discard
+ delete game.played_power_card
+ delete game.tactics_fails
+ delete game.view_opp_power_hand
+
+ let scoring_events = [C_PEASANT_PARTIES_REVOLT, C_YAKOVLEV_COUNSELS_GORBACHEV, C_THE_CROWD_TURNS_AGAINST_CEAUSESCU]
+ for (let e of scoring_events ) {
+ if (e === C_THE_CROWD_TURNS_AGAINST_CEAUSESCU ) {
+ if (game.persistent_events.includes(e) && game.pwr_struggle_in === 'Romania') {
+ permanently_remove(e)
+ }
+ } else if (game.persistent_events.includes(e)) {
+ permanently_remove(e)
+ }
+ }
+}
+
+function check_tyrant() {
+ if (game.the_tyrant_is_gone > 0 && check_dem_control(game.the_tyrant_is_gone)) {
+ log('+2 VP from C97')
+ game.vp += 2
+ if (check_vp()) {
+ return
+ }
+ delete game.the_tyrant_is_gone
+ }
+}
+
+function resolve_tyrant() {
+ if (game.persistent_events.includes(C_THE_TYRANT_IS_GONE) && game.pwr_struggle_in === 'Romania' && game.persistent_events.includes(THE_CROWD_TURNS_AGAINST_CEAUSESCU_OCCURRED)) {
+ game.return_state = 'finish_scoring'
+ if (game.active !== DEM) {
+ next_player()
+ }
+ game.state = 'the_tyrant_is_gone'
+ } else {
+ game.state = 'finish_scoring'
+ }
+}
+
+function check_systematization() { /* Check for Systematization - may not use this space */
+ if (game.systematization > 0) {
+ game.valid_spaces = game.valid_spaces.filter(n => n !== game.systematization)
+ }
+}
+
+function check_common_european_home() {
+ if (!game.playable_cards.includes(C_COMMON_EUROPEAN_HOME)) {
+ game.playable_cards.push(C_COMMON_EUROPEAN_HOME)
+ }
+}
+
+function this_card() {
+ return game.vm_event > 0 ? game.vm_event : game.played_card
+}
+
+const pluralize = (count, noun, suffix = 's') => {
+ if (Math.abs(count) === 1) {
+ return `${count} ${noun}`
+ } else {
+ if (noun.endsWith('y') && !/[aeiou]y$/.test(noun)) {
+ noun = noun.slice(0, -1) + 'ie'
+ }
+ return `${count} ${noun}${suffix}`
+ }
+}
+
+function clean_name(str) {
+ if (str && str.slice(-1) === '*') {
+ return str.slice(0, -1)
+ } else {
+ return str;
+ }
+}
+
+function country_name(country) {
+ return country.replace(/_/g, ' ')
+}
+
+// ======== LOG FUNCTIONS =============
+
+function log(msg) {
+ game.log.push(msg)
+}
+
+function log_br() {
+ if (game.log.length > 0 && game.log[game.log.length - 1] !== "")
+ game.log.push("")
+}
+
+function logi(msg) {
+ game.log.push(">" + msg)
+}
+
+function log_h1(msg) {
+ log_br()
+ log(".h1 " + msg)
+ log_br()
+}
+
+function log_h2(msg) {
+ log_br()
+ log(".h2 " + msg)
+ log_br()
+}
+
+function log_h3(msg) {
+ log_br()
+ log(".h3 " + msg)
+}
+
+function log_gap(msg) {
+ log_br()
+ game.log.push(msg)
+}
+
+function log_msg_gap(msg) {
+ game.log.push(msg)
+ log_br()
+}
+
+
+function log_side() {
+ log_br()
+ if (game.active === DEM)
+ log(".h2d " + game.active)
+ else
+ log(".h2c " + game.active)
+ log_br()
+}
+
+function log_sep() {
+ log(".hr")
+}
+
+function log_action(msg) {
+ log_br()
+ log(msg)
+}
+
+// ============= SUMMARY FUNCTIONS =============
+
+function push_summary() {
+ if (game.summary)
+ throw "TOO MANY SUMMARIES"
+ game.summary = []
+}
+
+function log_summary(msg) {
+
+ if (msg.startsWith('Added') || msg.startsWith('Removed')) {
+ for (let item of game.summary) {
+ if (item[1] === msg) {
+ item[0]++
+ return
+ }
+ }
+ }
+ game.summary.push([1, msg])
+}
+
+function pop_summary() {
+ if (game.summary.length > 0) {
+ for (let [n, msg] of game.summary) {
+ if (n > 1) {
+ log(msg.replace("£ SP", `${n} SPs`));
+ } else {
+ log(msg.replace("£ SP", `${n} SP`));
+ }
+ }
+ }
+ game.summary = []
+}
+
+function pop_summary_i() {
+ if (game.summary.length > 0) {
+ for (let [n, msg] of game.summary) {
+ if (n > 1) {
+ logi(msg.replace("£ SP", `${n} SPs`));
+ } else {
+ logi(msg.replace("£ SP", `${n} SP`));
+ }
+ }
+ }
+ game.summary = []
+}
+
+function do_log_summary() {
+ if (game.summary.length > 0) {
+ pop_summary()
+ log_br()
+ }
+}
+
+// ============ UNDO FUNCTIONS ==================
+
+function clear_undo() {
+ if (game.undo.length > 0)
+ game.undo = []
+}
+
+function push_undo() {
+ let copy = {}
+ for (let k in game) {
+ let v = game[k]
+ if (k === "undo")
+ continue
+ else if (k === "log")
+ v = v.length
+ else if (typeof v === "object" && v !== null)
+ v = object_copy(v)
+ copy[k] = v
+ }
+ game.undo.push(copy)
+}
+
+function pop_undo() {
+ let save_log = game.log
+ let save_undo = game.undo
+ game = save_undo.pop()
+ save_log.length = game.log
+ game.log = save_log
+ game.undo = save_undo
+}
+
+// Fast deep copy for objects without cycles
+function object_copy(original) {
+ if (Array.isArray(original)) {
+ let n = original.length
+ let copy = new Array(n)
+ for (let i = 0; i < n; ++i) {
+ let v = original[i]
+ if (typeof v === "object" && v !== null)
+ copy[i] = object_copy(v)
+ else
+ copy[i] = v
+ }
+ return copy
+ } else {
+ let copy = {}
+ for (let i in original) {
+ let v = original[i]
+ if (typeof v === "object" && v !== null)
+ copy[i] = object_copy(v)
+ else
+ copy[i] = v
+ }
+ return copy
+ }
+}
+
+
+/* =================== VM FUNCTIONS ========================== */
+
+function goto_vm(proc) {
+ let old_vm = game.vm;
+
+ game.state = "vm";
+ game.vm = {
+ prompt: 0,
+ fp: proc,
+ ip: 0,
+ };
+
+ if (old_vm) {
+ game.vm.return_vm = old_vm;
+ }
+
+ vm_exec();
+}
+
+function vm_exec() {
+ vm_inst(0)();
+}
+
+function vm_inst(a) {
+ return CODE[game.vm.fp][game.vm.ip][a]
+}
+
+function vm_next() {
+ game.vm.ip++;
+ vm_exec();
+}
+
+function vm_logi(){
+ logi(vm_operand(1))
+ vm_next()
+}
+
+function vm_operand(a) {
+ let x = CODE[game.vm.fp][game.vm.ip][a]
+ if (a > 0 && typeof x === "function")
+ return x()
+ return x
+}
+
+function vm_if() {
+ if (!vm_operand(1)) {
+ let balance = 1
+ while (balance > 0) {
+ ++game.vm.ip
+ switch (vm_operand(0)) {
+ case vm_if:
+ ++balance
+ break
+ case vm_endif:
+ --balance
+ break
+ case vm_else:
+ if (balance === 1)
+ --balance
+ break
+ }
+ if (game.vm.ip < 0 || game.vm.ip > CODE[game.vm.fp].length)
+ throw "ERROR"
+ }
+ }
+ vm_next()
+}
+
+function vm_else() {
+ vm_goto(vm_endif, vm_if, 1, 1)
+}
+
+function vm_endif() {
+ vm_next()
+}
+
+function vm_goto_step(step) {
+ for (let i = game.vm.ip; i < CODE[game.vm.fp].length; i++) {
+ if (CODE[game.vm.fp][i][0] === step) {
+ game.vm.ip = i;
+ vm_exec();
+ return;
+ }
+ }
+
+ console.log("ERROR: Target operation not found in the current procedure.");
+}
+
+
+function vm_goto(op, nop, dir, step) {
+ let balance = 1
+ while (balance > 0) {
+ game.vm.ip += dir
+ if (vm_inst(0) === op)
+ --balance
+ if (vm_inst(0) === nop)
+ ++balance
+ if (game.vm.ip < 0 || game.vm.ip > CODE[game.vm.fp].length)
+ throw "ERROR"
+ }
+ game.vm.ip += step
+ vm_exec()
+}
+
+function event_prompt(str) {
+ if (typeof str === "undefined")
+ str = CODE[game.vm.fp][game.vm.prompt][1]
+ if (typeof str === "function")
+ str = str()
+ if (!str) {
+ str = ""
+ }
+ return str
+}
+
+function vm_prompt() {
+ if (game.vm.prompt)
+ game.vm._prompt = game.vm.prompt
+ game.vm.prompt = game.vm.ip
+ vm_next()
+}
+
+function vm_return() {
+ //Remove temporary vm variables
+ delete game.support_check_modifier
+ delete game.vm_max_infl
+ delete game.vm_influence_added
+ delete game.communist_hand_red
+ game.vm_event = 0 /*Reset to 0 now that event has been completed. Hopefully this doesn't cause issues! */
+ if (game.persistent_events.includes(C_AUSTRIA_HUNGARY_BORDER_REOPENED)) {
+ reset_austria_hungary_border_reopened()
+ }
+
+ //Check if end event state is needed
+ if (game.is_pwr_struggle || game.state === 'vm_tst_6' || game.return_state === 'tiananmen_square_attempt_done') {
+ vm_end_event()
+ }
+ //Check if auto-resolve opponent event
+ else if (is_auto_resolve(game.played_card) && ((cards[game.played_card].side === 'C' && game.active === DEM) || (cards[game.played_card].side === 'D' && game.active === COM) )) {
+ vm_end_event()
+ }
+ else {
+ game.state = 'vm_end_event'
+ }
+}
+
+function vm_end_event() {
+ if (game.return !== game.active) {
+ next_player()}
+ if (game.return_state === 'power_struggle') {
+ do_valid_cards()
+ }
+ if (game.return_state && game.return_state !== '') {
+ game.state = game.return_state
+ }
+ else if (game.vm_infl_to_do) {
+ game.state = 'resolve_opponent_event'}
+ else {
+ end_round()
+ }
+}
+
+/* ================== VM ACTIONS =========================== */
+
+function vm_valid_spaces() {
+ for (let i = 1; i <= 6; i++) {
+ let operand = vm_operand(i)
+ if (operand) {
+ let space = spaces.find(space => space.ascii_name === operand)
+ game.valid_spaces.push(space.space_id)
+ }
+ }
+ check_systematization();
+ vm_next();
+}
+
+function vm_valid_spaces_com() {
+ let operand = vm_operand(1)
+ let space = spaces.find(space => space.ascii_name === operand)
+ if (game.comInfl[space.space_id] >0) {
+ game.valid_spaces.push(space.space_id)
+ }
+ check_systematization();
+ vm_next();
+}
+
+function vm_valid_spaces_opponent () {
+ let valid_spaces = []
+ for (let i = 0; i < spaces.length; i++) {
+ let space = spaces[i]
+
+ if (game.active === DEM) {
+ let infl = game.comInfl[i]
+ if (infl > 0) {
+ valid_spaces.push(space.space_id)
+ }
+ } else {
+ let infl = game.demInfl[i]
+ if (infl > 0) {
+ valid_spaces.push(space.space_id)
+ }
+ }
+ }
+ game.valid_spaces = valid_spaces
+ vm_next()
+}
+
+function vm_valid_spaces_socio () {
+ let valid_spaces = []
+ for (let i = 0; i < spaces.length; i++) {
+ let space = spaces[i]
+ if (space.socio === vm_operand(1)) {
+ valid_spaces.push(space.space_id)
+ }
+ }
+ game.valid_spaces = valid_spaces
+ check_systematization()
+ vm_next()
+}
+
+function vm_valid_spaces_opponent_socio () {
+ let valid_spaces = []
+ for (let i = 0; i < spaces.length; i++) {
+ let space = spaces[i]
+ if (game.active === DEM) {
+ let infl = game.comInfl[i]
+ if (infl > 0 && space.socio === vm_operand(1)) {
+ valid_spaces.push(space.space_id)
+ }
+ } else {
+ let infl = game.demInfl[i]
+ if (infl > 0 && space.socio === vm_operand(1)) {
+ valid_spaces.push(space.space_id)
+ }
+ }
+ }
+ game.valid_spaces = valid_spaces
+ check_systematization()
+ vm_next()
+}
+
+function vm_valid_spaces_country () {
+ let country
+ if (vm_operand(1)) {country = vm_operand(1)}
+ else {country = game.vm_active_country}
+ for (let space of spaces) {
+ if (space.country === country) {
+ game.valid_spaces.push(space.space_id);
+ }
+ }
+ check_systematization()
+ vm_next()
+}
+
+function vm_valid_spaces_sc () {
+ valid_spaces_sc()
+ vm_next()
+}
+
+function vm_valid_spaces_country_opp () {
+ let country = ''
+ if (vm_operand(1)) {
+ country = vm_operand(1) }
+ else {
+ country = game.vm_active_country
+ }
+ for (let space of spaces) {
+ if (game.active === DEM) {
+ if (space.country === country && game.comInfl[space.space_id] >0) {
+ game.valid_spaces.push(space.space_id);
+ }
+ } else {
+ if (space.country === country && game.demInfl[space.space_id]>0) {
+ game.valid_spaces.push(space.space_id);
+ }
+ }
+ }
+ vm_next()
+}
+
+function vm_valid_spaces_country_sc () {
+ let active_country
+ if (vm_operand(1)) {
+ active_country = vm_operand(1) }
+ else {
+ active_country = game.vm_active_country
+ }
+ valid_spaces_sc()
+ game.valid_spaces = game.valid_spaces.filter( s => spaces[s].country === active_country)
+ vm_next()
+}
+
+function vm_valid_spaces_country_socio_2() {
+ for (let space of spaces) {
+ if (space.space_id === game.systematization) continue
+ if ((space.country === vm_operand(1) && space.socio === vm_operand(2)) || (space.country === vm_operand(1) && space.socio === vm_operand(3))) {
+ game.valid_spaces.push(space.space_id);
+ }
+ }
+ vm_next()
+}
+
+function vm_valid_spaces_region_socio() {
+ let valid_spaces = []
+ for (let space of spaces) {
+ if (space.space_id === game.systematization) continue
+ if (space.region === vm_operand(1) && space.socio === vm_operand(2)) {
+ valid_spaces.push(space.space_id);
+ }
+ }
+ game.valid_spaces = valid_spaces
+ vm_next()
+}
+
+function vm_valid_spaces_region_opp() {
+ let valid_spaces = []
+ for (let space of spaces) {
+ let s = space.space_id
+ if ((game.active === DEM && space.region === vm_operand(1) && game.comInfl[s] > 0 ) || (game.active === COM && space.region === vm_operand(1) && game.demInfl[s] > 0 )) {
+ valid_spaces.push(space.space_id);
+ }
+ }
+ game.valid_spaces = valid_spaces
+ vm_next()
+}
+
+function vm_valid_spaces_solidarity_legalised() {
+ let valid_spaces = []
+ for (let i = 0; i < spaces.length; i++) {
+ let space = spaces[i]
+ let uncontrolled = (!check_control(i) && !check_opp_control(i))
+ if ((space.country === 'Poland' && uncontrolled && space.socio === 3) || (space.country === 'Poland' && uncontrolled && space.socio === 4)) {
+ valid_spaces.push(space.space_id);
+ }
+ }
+ game.valid_spaces = valid_spaces
+ vm_next()
+}
+
+function vm_active_country () {
+ game.valid_spaces = game.valid_spaces.filter(space_id => spaces[space_id].country === game.vm_active_country)
+ vm_next()
+}
+
+function vm_take_control_prep() {
+ game.vm_available_ops = vm_operand(1)
+ game.state = 'vm_take_control'
+}
+
+function vm_take_control(space) {
+ if (game.active === DEM) {
+ let current_infl = game.demInfl[space]
+ let opponent_infl = game.comInfl[space]
+ let stability = spaces[space].stability
+
+ if ((current_infl - opponent_infl) < stability) {
+ game.demInfl[space] += stability - current_infl + opponent_infl
+ }
+ } else if (game.active === COM) {
+ let current_infl = game.comInfl[space]
+ let opponent_infl = game.demInfl[space]
+ let stability = spaces[space].stability
+
+ if ((current_infl - opponent_infl) < stability) {
+ game.comInfl[space] += stability - current_infl + opponent_infl
+ }
+ }
+ game.valid_spaces = game.valid_spaces.filter(id => id !== space)
+ log(`Took control of %${space}`)
+}
+
+function vm_do_add_infl_free(space) {
+ push_undo()
+ log_summary(`Added £ SP in %${space}.`)
+
+ // Update influence values
+ if (game.active === COM) {
+ game.comInfl[space]++
+ } else {
+ game.demInfl[space]++
+ }
+ game.vm_available_ops--
+ check_tyrant()
+}
+
+function vm_add_infl() {
+ if (vm_operand(1)) {game.vm_available_ops = vm_operand(1)}
+ game.state = 'vm_add_infl'
+}
+
+function vm_add_infl_free() {
+ if (vm_operand(1)) {game.vm_available_ops = vm_operand(1)}
+ game.state = 'vm_add_infl_free'
+}
+
+function vm_add_x_infl() {
+ game.vm_available_ops = vm_operand(1)
+ game.state = 'vm_add_x_infl'
+}
+
+function vm_do_add_x_infl(space) {
+ push_undo()
+ log(`Added ${game.vm_available_ops} SPs in %${space}.`)
+ if (game.active === COM) {
+ game.comInfl[space] += game.vm_available_ops
+ } else {
+ game.demInfl[space] += game.vm_available_ops
+ }
+ check_tyrant()
+ game.vm_available_ops = 0
+ game.valid_spaces = []
+}
+
+function vm_add_limited_infl() {
+ game.vm_available_ops = vm_operand(1)
+ game.vm_max_infl = vm_operand(2)
+ game.state = 'vm_add_limited_infl'
+}
+
+function vm_do_add_limited_infl(space, max_infl) {
+ push_undo()
+ log_summary(`Added £ SP in %${space}`)
+ game.vm_available_ops --
+
+ if (!game.vm_influence_added) {
+ game.vm_influence_added = {};
+ }
+
+ if (!game.vm_influence_added[space]) {
+ game.vm_influence_added[space] = 0;
+ }
+
+ if (game.active === COM) {
+ game.comInfl[space] ++
+ } else {
+ game.demInfl[space] ++
+ }
+
+ game.vm_influence_added[space] ++
+
+ if (game.vm_influence_added[space] === max_infl) {
+ game.valid_spaces = game.valid_spaces.filter(id => id !== space);
+ }
+ check_tyrant()
+ if (game.vm_available_ops === 0) {game.valid_spaces = [] }
+}
+
+function vm_remove_infl() {
+ game.vm_available_ops = vm_operand(1)
+ game.state = 'vm_remove_infl'
+}
+
+function vm_remove_opp_infl() {
+ game.vm_available_ops = vm_operand(1)
+ game.remove_opponent_infl = true
+ if (game.is_pwr_struggle) {
+ game.state = 'vm_scare_tactics'
+ } else {
+ game.state = 'vm_remove_infl'
+ }
+}
+
+function vm_remove_x_opp_infl() {
+ game.vm_available_ops = vm_operand(1)
+ game.remove_opponent_infl = true
+ game.state = 'vm_remove_x_infl'
+}
+
+function vm_do_remove_x_infl(space) {
+ push_undo()
+
+ if (game.remove_opponent_infl) {
+ if (game.active === COM) {
+ if (game.demInfl[space] >= game.vm_available_ops) {
+ game.demInfl[space] -= game.vm_available_ops
+ } else {
+ game.vm_available_ops = game.demInfl[space]
+ game.demInfl[space] -= game.vm_available_ops
+ }
+ } else {
+ if (game.comInfl[space] >= game.vm_available_ops) {
+ game.comInfl[space] -= game.vm_available_ops
+ } else {
+ game.vm_available_ops = game.comInfl[space]
+ game.comInfl[space] -= game.vm_available_ops
+ }
+ }
+ } else {
+ if (game.active === COM) {
+ if (game.comInfl[space] >= game.vm_available_ops) {
+ game.comInfl[space] -= game.vm_available_ops
+ } else {
+ game.vm_available_ops = game.comInfl[space]
+ game.comInfl[space] -= game.vm_available_ops
+ }
+ } else {
+ if (game.demInfl[space] >= game.vm_available_ops) {
+ game.demInfl[space] -= game.vm_available_ops
+ } else {
+ game.vm_available_ops = game.demInfl[space]
+ game.demInfl[space] -= game.vm_available_ops
+ }
+ }
+ }
+
+ log(`Removed ${game.vm_available_ops} SPs from %${space}`)
+ check_tyrant()
+ game.vm_available_ops = 0
+ game.valid_spaces = []
+}
+
+function vm_remove_limited_opp_infl() {
+ game.vm_available_ops = vm_operand(1)
+ game.vm_max_infl = vm_operand(2)
+ game.remove_opponent_infl = true
+ game.state = 'vm_remove_limited_infl'
+}
+
+function vm_do_remove_limited_infl(space, max_infl) {
+ push_undo()
+ log_summary(`Removed £ SP from %${space}.`)
+ game.vm_available_ops --
+
+ if (!game.vm_influence_added) {
+ game.vm_influence_added = {};
+ }
+
+ if (!game.vm_influence_added[space]) {
+ game.vm_influence_added[space] = 0;
+ }
+
+ if (game.active === COM) {
+ game.demInfl[space] --
+ if (game.demInfl[space] === 0) {
+ game.valid_spaces = game.valid_spaces.filter(id => id !== space)
+ }
+ } else {
+ game.comInfl[space] --
+ if (game.comInfl[space] === 0) {
+ game.valid_spaces = game.valid_spaces.filter(id => id !== space)
+ }
+ }
+
+ game.vm_influence_added[space] ++
+
+ if (game.vm_influence_added[space] === max_infl) {
+ game.valid_spaces = game.valid_spaces.filter(id => id !== space);
+ }
+
+ check_tyrant()
+ if (game.vm_available_ops === 0) {game.valid_spaces = []}
+}
+
+function vm_remove_all_infl() {
+ game.vm_available_ops = vm_operand(1)
+ game.state = 'vm_remove_all_infl'
+}
+
+function vm_do_remove_all_infl(space) {
+ push_undo()
+
+ if (game.remove_opponent_infl === true) {
+ if (game.active === COM) {
+ log(`Removed all Democratic SP from %${space}`)
+ game.demInfl[space] = 0
+ } else {
+ log(`Removed all Communist SP from %${space}`)
+ game.comInfl[space] = 0
+ }
+ check_tyrant()
+
+ } else {
+ if (game.active === COM) {
+ log(`Removed all Communist SP from %${space}`)
+ game.comInfl[space] = 0
+ } else {
+ log(`Removed all Democratic SP from %${space}`)
+ game.demInfl[space] = 0
+ }
+ check_tyrant()
+ }
+ game.vm_available_ops --
+ game.valid_spaces = game.valid_spaces.filter(id => id !== space)
+}
+
+function vm_replace_all_infl(space_id) {
+ if (game.active === DEM) {
+ game.demInfl[space_id] += game.comInfl[space_id]
+ log(`Replaced ${game.comInfl[space_id]} Communist SP in %${space_id} with Democratic SP`)
+ game.comInfl[space_id] = 0
+ } else {
+ game.comInfl[space_id] += game.demInfl[space_id]
+ log(`Replaced ${game.demInfl[space_id]} Democrat SP in %${space_id} with Communist SP`)
+ game.demInfl[space_id] = 0
+ }
+ check_tyrant()
+}
+
+function vm_1_support_check() {
+ game.vm_available_ops = 1
+ game.state = 'vm_1_support_check_prep'
+}
+
+function vm_support_check() {
+ game.vm_available_ops = vm_operand(1)
+ game.state = 'vm_support_check_prep'
+}
+
+function vm_support_check_modified() {
+ game.vm_available_ops = vm_operand(1)
+ game.support_check_modifier = vm_operand(2)
+ game.state = 'vm_support_check_prep'
+}
+
+function vm_switch_infl(id){
+ push_undo()
+ game.demInfl[id] -= game.vm_available_ops
+ game.comInfl[id] += game.vm_available_ops
+ log(`Replaced ${pluralize(game.vm_available_ops,'SP')} in %${id}`)
+ game.vm_available_ops = 0
+ check_tyrant()
+}
+
+/* ===================== EVENT SPECIFIC FUNCTIONS ========== */
+
+function vm_40th_anniversary_celebration() {
+ if (game.vp < 0 ) {game.vm_available_ops = 4}
+ else {game.vm_available_ops = 2}
+ vm_next()
+}
+
+function vm_40th_anniversary_celebration_vp() {
+ game.vp --
+ log('-1VP')
+ if (check_vp()) {
+ return
+ }
+ vm_next()
+}
+
+function vm_adamec() {
+ game.state = 'vm_adamec'
+}
+
+function vm_army_backs_revolution() {
+ if (game.persistent_events.includes(C_SECURITATE)) {
+ permanently_remove(C_SECURITATE)
+ }
+ add_to_persistent_events(C_ARMY_BACKS_REVOLUTION)
+ logi(`C${C_SECURITATE} no longer has any effect`)
+ vm_next()
+}
+
+function vm_army_block() {
+ permanently_remove(C_SECURITATE)
+ logi(`Has no effect after C${C_ARMY_BACKS_REVOLUTION}`)
+ vm_next()
+}
+
+function vm_austria_hungary_border_reopened() {
+ add_to_persistent_events(C_AUSTRIA_HUNGARY_BORDER_REOPENED)
+ logi(`For the remainder of the turn, cards played by the Democrat have +1 Ops value if all Operations Points are used in East Germany`)
+ game.austria_hungary_border_reopened_tracker = false
+ vm_next()
+}
+
+function vm_betrayal() {
+ if (game.demInfl[S_ORTHODOX_CHURCH_ROMANIA] > 0 ) { game.valid_spaces.push(S_ORTHODOX_CHURCH_ROMANIA) }
+ if (game.demInfl[S_ORTHODOX_CHURCH_BULGARIA] >0 ) { game.valid_spaces.push(S_ORTHODOX_CHURCH_BULGARIA) }
+ game.state = 'vm_switch_infl'
+}
+
+function vm_breakaway_baltic_republics() {
+ log('+5 VP')
+ game.vp += 5
+ game.stability++
+ if (check_vp()) {
+ return
+ }
+ game.playable_cards.push(C_KREMLIN_COUP)
+ game.playable_cards = game.playable_cards.filter(n => n !== C_GORBACHEV_CHARMS_THE_WEST)
+ if (!check_dem_control(S_HARGHITA_COVASNA) && game.systematization !== S_HARGHITA_COVASNA) {game.valid_spaces.push(S_HARGHITA_COVASNA)}
+ if (!check_dem_control(S_RAZGRAD)) {game.valid_spaces.push(S_RAZGRAD)}
+ vm_next()
+}
+
+function vm_brought_in_for_questioning() {
+ if (game.active === COM) {
+ game.active = DEM
+ }
+ game.phase = 0
+ game.state = 'vm_brought_in_for_questioning'
+}
+
+function vm_bulgarian_turks_expelled(){
+ game.remove_opponent_infl = true
+ game.vp -= 2
+ log('-2VP')
+ if (check_vp()) {
+ return
+ }
+ vm_next()
+}
+
+function vm_ceausescu() {
+ let adj_cluj = false
+
+ if (game.demInfl[S_TIMISOARA] > 0 ) {adj_cluj = true}
+ if (game.demInfl[S_BABES_BOLYAI_UNIVERSITY] > 0 ) {adj_cluj = true}
+ if (game.demInfl[S_ORTHODOX_CHURCH_ROMANIA] > 0 ) {adj_cluj = true}
+ if (game.demInfl[S_BUCURESTI] > 0 ) {adj_cluj = true}
+
+ if (adj_cluj && game.comInfl[S_BUCURESTI]>0) {
+ game.valid_spaces = [S_BUCURESTI]
+ game.vm_available_ops = 1
+ game.remove_opponent_infl = false
+ game.state = 'vm_remove_infl'
+ }
+ else {vm_next()}
+}
+
+function vm_central_committee_reshuffle() {
+ game.state = 'vm_central_committee_reshuffle'
+}
+
+function vm_civic_forum_prep() {
+ log('+1 VP')
+ game.vp++
+ if (check_vp()) {
+ return
+ }
+ vm_next()
+}
+
+function vm_civic_forum() {
+ if (check_dem_control(S_CZECH_WRITERS)) {
+ vm_next()
+ } else {
+ vm_return()
+ }
+}
+
+function vm_cluj_check(){
+ if (game.comInfl[S_CLUJ_NAPOCA] > 0 ) {
+ game.valid_spaces.push(S_CLUJ_NAPOCA)
+ }
+ vm_next()
+}
+
+function vm_common_european_home() {
+ if (game.active === DEM) {
+ for (let c of game.democrat_hand) {
+ if (cards[c].side === 'C') {
+ game.valid_cards.push(c)
+ }
+ }
+ } else {
+ for (let c of game.communist_hand) {
+ if (cards[c].side === 'D') {
+ game.valid_cards.push(c)
+ }
+ }
+ }
+ game.state = "vm_common_european_home_choose"
+}
+
+function vm_dash_for_the_west() {
+ game.valid_cards = []
+ for (let c of game.strategy_discard) {
+ if (cards[c].side === 'D' && cards[c].remove && (cards[c].playable || game.playable_cards.includes(c))) {
+ game.valid_cards.push(c)
+ }
+ }
+ game.state = 'vm_dash_for_the_west'
+}
+
+function vm_deutsche_marks() {
+ let max_value = 1;
+ for (let c of game.democrat_hand) {
+ if (cards[c].ops > max_value) {
+ max_value = cards[c].ops
+ }
+ }
+ let valid_cards = [];
+ for (let c of game.democrat_hand) {
+ if (cards[c].ops === max_value) {
+ valid_cards.push(c);
+ }
+ }
+ game.valid_cards = valid_cards
+ game.state = 'vm_deutsche_marks_prep'
+}
+
+function vm_domino_theory() {
+ game.discard = true
+ for (let card of game.strategy_discard) {
+ if (scoring_cards.includes(card)) {game.valid_cards.push(card) }
+ }
+ game.phase = 0
+ game.state = 'vm_play_event_from_discard'
+}
+
+function vm_domino_theory_pass() {
+ if (game.revolutions.filter(value => value === true).length < 2) {
+ logi('Democrat holds power in fewer than 2 countries')
+ } else if (!scoring_cards.some(card => game.strategy_discard.includes(card))) {
+ logi('No scoring cards in discard')
+ }
+ vm_next()
+}
+
+function vm_eco_glasnost() {
+ add_to_persistent_events(C_ECO_GLASNOST)
+ logi(`+1 VP for Communist support checks in Ruse for the rest of the game`)
+ vm_next()
+}
+
+function vm_elena(){
+ add_to_persistent_events(C_ELENA)
+ logi(`-1 modifier to Democratic Support checks in Romania for the rest of this turn`)
+ vm_next()
+}
+
+function vm_eliminate(space_id) { // Eliminate the democrat influence and move the communist influence to Bucuresti
+ log(`Eliminated %${space_id}`)
+ if (space_id === S_BUCURESTI) {
+ game.demInfl[space_id] = 0
+ game.comInfl[space_id] = 0
+ } else {
+ game.demInfl[space_id] = 0
+ game.comInfl[S_BUCURESTI] += game.comInfl[space_id]
+ if (game.comInfl[space_id] > 0 ) {
+ log(`${pluralize(game.comInfl[space_id],'Communist SP')} relocated to %${S_BUCURESTI}`)
+ }
+ game.comInfl[space_id] = 0
+ }
+}
+
+function get_adjusted_adjacency(space_id) {
+ let adjacent_spaces = spaces[space_id].adjacent;
+ if (adjacent_spaces.includes(game.systematization)) {
+ let eliminated_space_id = game.systematization;
+ adjacent_spaces = adjacent_spaces.map(adj_space_id => {
+ if (adj_space_id === eliminated_space_id) {
+ return spaces[eliminated_space_id].adjacent;
+ }
+ return adj_space_id;
+ }).flat(); // Flatten in case the eliminated space has multiple adjacencies
+ }
+ adjacent_spaces = adjacent_spaces.filter(s => s !== space_id)
+ return adjacent_spaces;
+}
+
+function vm_exit_visas() {
+ game.state = 'vm_exit_visas'
+}
+
+function vm_foreign_currency_debt_burden() {
+ log('+1VP')
+ game.vp++
+ if (check_vp()) {
+ return
+ }
+ add_to_persistent_events(C_FOREIGN_CURRENCY_DEBT_BURDEN)
+ game.state = 'vm_foreign_currency_debt_burden'
+}
+
+function vm_foreign_television() {
+ for (let i = 0 ; i < spaces.length; i++) {
+ if (i === S_DRESDEN) {continue} /*Does not apply to Dresden*/
+ if (game.comInfl[i] > 0 ) {
+ game.valid_spaces.push(i)
+ }
+ }
+ vm_next()
+}
+function vm_frg_embassies() {
+ add_to_persistent_events(C_FRG_EMBASSIES)
+ logi(`+1 modifier for Democratic Support Checks in Eastern Europe for the rest of this turn`)
+ vm_next()
+}
+
+function vm_general_strike() {
+ add_to_persistent_events(C_GENERAL_STRIKE)
+ logi(`Each Action Round the Communist must instead discard a card and roll a die until the modified die roll exceeds 5`)
+ vm_next()
+}
+
+function vm_genscher() {
+ add_to_persistent_events(C_GENSCHER)
+ logi(`Cancels +1 Ops cost to place Democratic SPs in Communist controlled spaces in East Germany for the rest of the turn`)
+ vm_next()
+}
+
+function vm_goodbye_lenin() {
+ game.view_opp_hand = true
+ game.communist_hand_red = []
+ // Select Red cards to show
+ for (let card of game.communist_hand) {
+ if (cards[card].red) {
+ game.communist_hand_red.push(card)
+ }
+ }
+ //Check if these cards are playable
+ for (let card of game.communist_hand_red) {
+ if (cards[card].playable || game.playable_cards.includes(card)) {
+ game.valid_cards.push(card)
+ }
+ }
+ game.state = 'vm_goodbye_lenin'
+}
+
+function vm_government_resigns() {
+ for (let i = 0; i < spaces.length; i++) {
+ let space = spaces[i]
+ if (space.socio === 1 && game.comInfl[i] > 0 && !check_control(i)) {
+ game.valid_spaces.push(i)
+ }
+ }
+ game.remove_opponent_infl = true
+ vm_next()
+}
+
+function vm_grenztruppen() {
+ add_to_persistent_events(C_GRENZTRUPPEN)
+ logi(`-1 modifier for Democratic Support Checks in East Germany for the rest of this turn`)
+ vm_next()
+}
+
+function vm_heal_our_bleeding_wounds() {
+ let change_vp = 0
+ if (game.turn <= 3) {change_vp = -3 }
+ else if (game.turn <= 7) {change_vp = -1}
+ else change_vp = 3
+ if (change_vp >0) {
+ log(`+${change_vp} VP`)
+ } else {
+ log(`-${change_vp} VP`)
+ }
+ game.vp += change_vp
+ if (check_vp()) {
+ return
+ }
+ vm_next()
+}
+
+function vm_helsinki_final_act() {
+ add_to_persistent_events(C_HELSINKI_FINAL_ACT)
+ logi(`+1 VP for every Support Check by the Communist Player in Student or Intellectual spaces for the rest of the game`)
+ vm_next()
+}
+
+function vm_honecker() {
+ add_to_persistent_events(C_HONECKER)
+ logi(`The Communist may take one extra Action Round this turn`)
+ game.valid_cards = []
+ for (let c of game.strategy_discard) {
+ if (scoring_cards.includes(c)) {
+ continue}
+ else {
+ game.valid_cards.push(c)
+ }
+ }
+ game.discard = true
+ game.state = 'vm_honecker'
+}
+
+function vm_inflationary_currency() {
+ game.state = 'vm_inflationary_currency'
+}
+
+function vm_inflationary_currency_discard() {
+ // This function starts with the player who is playing Inflationary Currency for the Event
+ // Switch player and check the hand of their opponent to see if the have cards with ops > 3 to discard
+ next_player()
+ if (game.active === COM) {
+ for (let card of game.communist_hand){
+ if (get_card_ops(card) >= 3) {
+ game.valid_cards.push(card)
+ }
+ }
+ } else {
+ for (let card of game.democrat_hand){
+ if (get_card_ops(card) >= 3) {
+ game.valid_cards.push(card)
+ }
+ }
+ }
+ game.state = 'vm_inflationary_currency_discard'
+}
+
+function vm_kiss_of_death() {
+ game.state = 'vm_kiss_of_death'
+}
+
+function vm_klaus_and_komarek() {
+ if (game.comInfl[S_PRAHA] > 0 ) {game.valid_spaces = [S_PRAHA]}
+ vm_next()
+}
+
+function vm_kohl_proposes_reunification_prep() {
+ log('+2 VP')
+ game.vp += 2
+ if (check_vp()) {
+ return
+ }
+ vm_next()
+}
+function vm_kohl_proposes_reunification() {
+ game.vm_event = C_KOHL_PROPOSES_REUNIFICATION
+ game.state = 'vm_common_european_home_play'
+}
+
+function vm_kremlin_coup() {
+ log('-3 VP')
+ game.vp -= 3
+ game.stability ++
+ if (check_vp()) {
+ return
+ }
+ game.support_check_modifier = 1
+ game.temp = []
+ countries.forEach(country => {
+ if (!game.revolutions[find_country_index(country)]) {
+ game.temp.push(country)
+ }
+ })
+ game.playable_cards = game.playable_cards.filter(c => c !== C_MALTA_SUMMIT)
+ game.state = 'vm_kremlin_coup_choose_country'
+}
+
+function vm_laszlo_tokes() {
+ add_to_persistent_events(C_LASZLO_TOKES)
+ logi(`Allows play of C${C_MASSACRE_IN_TIMISOARA}`)
+ game.playable_cards.push(C_MASSACRE_IN_TIMISOARA)
+ game.state = 'vm_laszlo_tokes'
+}
+
+function vm_legacy_of_martial_law() {
+ game.vm_available_ops = 1
+ game.state = 'vm_switch_infl'
+}
+
+function vm_legacy_of_1968() {
+ for (let i = 0; i < spaces.length; i++) {
+ let space = spaces[i]
+ if ((!check_com_control(i) && space.country === 'Czechoslovakia')) {
+ game.valid_spaces.push(space.space_id);
+ }
+ }
+ vm_next()
+}
+
+function vm_li_peng() {
+ add_to_persistent_events(C_LI_PENG)
+ logi(`+1 modifier to all Communist Tiananmen Square Track attempts for the rest of the game`)
+ vm_next()
+}
+
+function vm_ligachev() {
+ add_to_persistent_events(C_LIGACHEV)
+ logi(`-3VPs if the Democrat does not play C${C_GORBACHEV_CHARMS_THE_WEST} next Action Round`)
+ vm_next()
+}
+
+function vm_malta_summit() {
+ game.state = 'vm_malta_summit'
+}
+
+function vm_massacre_in_timisoara() {
+ game.persistent_events = game.persistent_events.filter(n => n !== C_LASZLO_TOKES)
+ game.strategy_removed.push(C_LASZLO_TOKES)
+ vm_next()
+}
+
+function vm_modrow() {
+ game.playable_cards = game.playable_cards.filter(n => n !== C_HONECKER)
+ add_to_persistent_events(C_MODROW)
+ logi(`Prevents play of C${C_HONECKER} for the event`)
+ game.state = 'vm_modrow'
+}
+
+function vm_nagy_reburied(){
+ if (game.comInfl[S_SZOMBATHELY] > 0) {
+ game.valid_spaces.push(S_SZOMBATHELY)
+ }
+ vm_next()
+}
+
+function vm_national_salvation_front() {
+ add_to_persistent_events(C_NATIONAL_SALVATION_FRONT)
+ logi(`In the next Power Struggle in the Balkans, the Communist draws 2 random Power Struggle cards from the Democrat hand`)
+ vm_next()
+}
+
+function vm_nepotism() {
+ game.state = 'vm_nepotism'
+}
+
+function vm_new_years_eve_party() {
+ game.state = 'vm_new_years_eve_party'
+}
+
+function vm_nomenklatura() {
+ game.state = 'vm_nomenklatura'
+}
+
+function vm_normalization() {
+ if (game.demInfl[S_PLZEN] >0) {game.valid_spaces.push(S_PLZEN)}
+ if (game.demInfl[S_PRAHA] > 0) {game.valid_spaces.push(S_PRAHA)}
+ game.remove_opponent_infl = true
+ vm_next()
+}
+
+function vm_peasant_parties_revolt() {
+ add_to_persistent_events(C_PEASANT_PARTIES_REVOLT)
+ logi(`In the next Power Stuggle, if the Democrat controls a Farmer space draw 1 Power Struggle card at random from the Communist hand`)
+ vm_next()
+}
+
+function vm_perestroika() {
+ add_to_persistent_events(C_PERESTROIKA)
+ logi(`+1 Ops value for cards played by the Communist for the rest of this turn`)
+ vm_next()
+}
+
+function vm_poszgay() {
+ let valid_spaces = []
+ for (let space of spaces) {
+ if (space && space.country === 'Hungary' && !check_dem_control(space.space_id)) {
+ valid_spaces.push(space.space_id);
+ }
+ }
+ game.valid_spaces = valid_spaces
+ vm_next()
+}
+
+function vm_power_struggle() {
+ game.is_pwr_struggle = true
+ game.phase = 0
+ game.raised_stakes = 0
+ game.raised_stakes_round = 0
+ game.raised_stakes_discard = 0
+ game.pwr_struggle_in = countries[scoring_cards.indexOf(game.vm_event)]
+ log_h2(`C${game.vm_event}`)
+
+ //Check for Securitate
+ if (game.pwr_struggle_in === 'Romania' && game.persistent_events.includes(C_SECURITATE)) {
+ log(`C${C_SECURITATE}: Democrat reveals Power Struggle cards`)
+ game.opp_power_hand = true
+ }
+ log_h2('Deal Cards')
+ game.state = 'draw_power_cards'
+}
+
+function vm_presidential_visit() {
+ add_to_persistent_events(C_PRESIDENTIAL_VISIT)
+ logi(`Communist hand size is reduced to 7 next turn`)
+ vm_next()
+}
+
+function vm_prudence() {
+ if (!game.prudence) {
+ game.prudence = {DEM: 0, COM: 0}
+ }
+ if (game.active === DEM) {
+ game.prudence.COM --
+ log(`${game.prudence.COM} to Communist Ops this turn`)
+ } else {
+ game.prudence.DEM --
+ log(`${game.prudence.DEM} to Democrat Ops this turn`)}
+ vm_next()
+}
+
+function vm_public_against_violence() {
+ game.valid_spaces = []
+ if (game.comInfl[S_BRATISLAVA] > 0 ) {game.valid_spaces.push(S_BRATISLAVA)}
+ vm_next()
+}
+
+function vm_reformer_rehabilitated () {
+ permanently_remove(C_REFORMER_REHABILITATED)
+ game.discard = true
+ for (let card of game.strategy_discard) {
+ if (!event_is_playable(card)) continue
+ if (card === game.played_card) continue
+ if (card === C_COMMON_EUROPEAN_HOME) continue
+ if (scoring_cards.includes(card)) continue
+
+ game.valid_cards.push(card)
+ }
+ game.state = 'vm_play_event_from_discard'
+}
+
+function vm_roundtable_talks() {
+ add_to_persistent_events(C_ROUNDTABLE_TALKS)
+ logi(`In the next Power Struggle the Democrat draws 2 random Power Struggle cards from the Communist hand`)
+ vm_next()
+}
+
+function vm_sajudis_check() {
+ if (!check_dem_control(S_RAZGRAD)) {
+ game.valid_spaces.push(S_RAZGRAD)
+ }
+ if (!check_dem_control(S_HARGHITA_COVASNA)) {
+ game.valid_spaces.push(S_HARGHITA_COVASNA)
+ }
+ vm_next()
+}
+
+function vm_sajudis() {
+ game.playable_cards.push(C_THE_BALTIC_WAY)
+ game.stability++
+ log('+1 VP')
+ game.vp++
+ if (check_vp()) {
+ return
+ }
+ log(`Allows play of C${C_THE_BALTIC_WAY} for the event`)
+ vm_next()
+}
+
+function vm_samizdat() {
+ game.state = 'vm_samizdat'
+}
+
+function vm_securitate() {
+ add_to_persistent_events(C_SECURITATE)
+ logi(`The Democrat must reveal their Power Struggle cards at the start of Power Struggles in Romania`)
+ vm_next()
+}
+
+function vm_shock_therapy() {
+ game.state = 'vm_shock_therapy'
+}
+
+function vm_social_democratic_platform_adopted() {
+ game.state = 'vm_social_democratic_platform_adopted'
+}
+
+function vm_solidarity_legalised() {
+ game.playable_cards.push(C_WALESA)
+ add_to_persistent_events(C_SOLIDARITY_LEGALIZED)
+ logi(`Allows play of C${C_WALESA}`)
+ vm_next()
+}
+
+function vm_st_nicholas_church () {
+ add_to_persistent_events(C_ST_NICHOLAS_CHURCH)
+ logi(`Allows play of C${C_THE_MONDAY_DEMONSTRATIONS}`)
+ game.playable_cards.push(C_THE_MONDAY_DEMONSTRATIONS)
+ vm_next()
+}
+
+function vm_stasi() {
+ add_to_persistent_events(C_STASI)
+ logi(`For the rest of this turn the Democrat must reveal the card they will play this Action Round before the Communist player plays a card`)
+ vm_next()
+}
+
+function vm_stand_fast() {
+ add_to_persistent_events(C_STAND_FAST)
+ if (game.active === DEM) {
+ logi(`-1 Modifier to Support Checks in Democratic controlled spaces for the rest of this turn`)
+ game.stand_fast = DEM
+ } else {
+ logi(`-1 Modifier to Support Checks in Communist controlled spaces for the rest of this turn`)
+ game.stand_fast = COM}
+ vm_next()
+}
+
+function vm_systematization() {
+ game.state = 'vm_systematization'
+}
+
+function vm_tank_column() {
+ if (game.active === DEM) {
+ game.dem_tst_position++
+ game.dem_tst_attempted = 0
+ } else {
+ game.com_tst_position++
+ game.com_tst_attempted = 0
+ }
+ // Check if TST Awards occur
+ if (game.active === DEM) {
+ if (game.dem_tst_position === 3 && game.com_tst_position < 3) {
+ game.vm_event = 203
+ goto_vm(game.vm_event)
+ return
+ }
+ else if (game.dem_tst_position === 4 && game.com_tst_position < 4) {
+ game.vm_event = 204
+ goto_vm(game.vm_event)
+ return
+ }
+
+ } else {
+ if (game.com_tst_position === 3 && game.dem_tst_position < 3) {
+ game.vm_event = 203
+ goto_vm(game.vm_event)
+ return
+ }
+ else if (game.com_tst_position === 4 && game.dem_tst_position < 4) {
+ game.vm_event = 204
+ goto_vm(game.vm_event)
+ return
+ }
+ }
+ vm_next()
+}
+
+function vm_tear_gas () {
+ add_to_persistent_events(C_TEAR_GAS)
+ logi(`+1 modifier to the next Communist Support Check in a Student space`)
+ vm_next()
+}
+
+function vm_the_baltic_way_prep() {
+ game.playable_cards.push(C_BREAKAWAY_BALTIC_REPUBLICS)
+ game.stability++
+ log('+3 VP')
+ game.vp += 3
+ if (check_vp()) {
+ return
+ }
+ log(`Allows play of C${C_BREAKAWAY_BALTIC_REPUBLICS} for the event`)
+ vm_next()
+}
+
+function vm_the_baltic_way() {
+ if (!check_dem_control(S_HARGHITA_COVASNA) && game.systematization !== S_HARGHITA_COVASNA) {game.valid_spaces.push(S_HARGHITA_COVASNA)}
+ if (!check_dem_control(S_RAZGRAD) ) {game.valid_spaces.push(S_RAZGRAD)}
+ vm_next()
+}
+
+function vm_the_chinese_solution() {
+ game.state = 'vm_the_chinese_solution'
+}
+
+function vm_the_crowd_turns_against_ceausescu() {
+ add_to_persistent_events(C_THE_CROWD_TURNS_AGAINST_CEAUSESCU)
+ logi(`Power Struggle: Romania. Democrat draws 15 Power Struggle cards and takes 1 Action Round using Ops 3 times the number of Rallies. Allows play of C${C_THE_TYRANT_IS_GONE}`)
+ game.playable_cards.push(C_THE_TYRANT_IS_GONE)
+ vm_next()
+}
+
+function vm_the_monday_demonstrations() {
+ if (!check_dem_control(S_LUTHERAN_CHURCH)) {game.valid_spaces.push(S_LUTHERAN_CHURCH)}
+ if (!check_dem_control(S_LEIPZIG)) {game.valid_spaces.push(S_LEIPZIG)}
+ vm_next()
+}
+
+function vm_the_sinatra_doctrine() {
+ add_to_persistent_events(C_THE_SINATRA_DOCTRINE)
+ logi(`+1 Ops value for cards played by the Democrat for the rest of this turn`)
+ vm_next()
+}
+
+function vm_the_third_way() {
+ log('-2VP')
+ game.vp -= 2
+ if (check_vp()) {
+ return
+ }
+ vm_next()
+}
+
+function vm_the_tyrant_is_gone() {
+ permanently_remove(C_THE_CROWD_TURNS_AGAINST_CEAUSESCU)
+ game.persistent_events.push(THE_TYRANT_IS_GONE_OCCURRED)
+ game.valid_spaces = []
+ for (let i = 0; i < spaces.length; i++) {
+ let space = spaces[i]
+ if (game.demInfl[i] === 0 && space.country === 'Romania') {
+ if (space.space_id === game.systematization) {continue}
+ game.valid_spaces.push(space.space_id)
+ }
+ }
+ game.state = 'vm_the_tyrant_is_gone'
+}
+
+function vm_the_tyrant_is_gone_prep() {
+ add_to_persistent_events(C_THE_TYRANT_IS_GONE)
+ logi(`After C${C_THE_CROWD_TURNS_AGAINST_CEAUSESCU} occurs, remove 4 Commuist SPs from the Romanian Elite space. The Democrats choose where the Ceausescus flee to`)
+ vm_next()
+}
+
+function vm_tyrant_block() {
+ logi(`Has no effect after C${C_THE_TYRANT_IS_GONE}`)
+ vm_next()
+}
+
+function vm_the_wall () {
+ add_to_persistent_events(C_THE_WALL)
+ logi(`Cancels the modifier for any Democratic controlled spaces for the next Communist Support Check in East Germany`)
+ vm_next()
+}
+
+function vm_the_wall_must_go() {
+ game.the_wall_must_go = {}
+ game.the_wall_must_go['dem_wins'] = 0
+ game.the_wall_must_go['com_wins'] = 0
+ game.the_wall_must_go['dem_roll'] = 0
+ game.the_wall_must_go['com_roll'] = 0
+ game.state = 'vm_the_wall_must_go'
+}
+
+function vm_warsaw_pact_summit() {
+ game.state = 'vm_warsaw_pact_summit'
+}
+
+function vm_we_are_the_people() {
+ if (game.demInfl[S_LUTHERAN_CHURCH] > 0) {game.valid_spaces = [S_LUTHERAN_CHURCH]}
+ add_to_persistent_events(C_WE_ARE_THE_PEOPLE)
+ logi(`The Communist may no longer make Support Checks in Leipzig`)
+ if (!game.vm_influence_added) {
+ game.vm_influence_added = {};
+ }
+ game.vm_influence_added[S_LUTHERAN_CHURCH] = 0
+ game.vm_available_ops = 4
+ game.state = 'vm_we_are_the_people_remove'
+}
+
+function vm_workers_revolt() {
+ if (game.active === DEM) {
+ for (let space of spaces) {
+ let country = space.country
+ if (!game.revolutions[find_country_index(country)] && game.comInfl[space.space_id] > 0 && space.socio === 4) {
+ game.valid_spaces.push(space.space_id);
+ }
+ }
+ } else {
+ for (let space of spaces) {
+ let country = space.country
+ if (game.revolutions[find_country_index(country)] && game.demInfl[space.space_id] > 0 && space.socio === 4) {
+ game.valid_spaces.push(space.space_id);
+ }
+ }
+ }
+ game.state = 'vm_workers_revolt'
+}
+
+function vm_yakovlev_counsels_gorbachev() {
+ add_to_persistent_events(C_YAKOVLEV_COUNSELS_GORBACHEV)
+ logi(`The Democrat receives a +1 modifier to the Support Loss and Victory Point die rolls if they wins the next Power Struggle`)
+ vm_next()
+}
+
+function vm_permanently_remove () {
+ // Check if the event is being played as the result of another card, e.g. Dash for the West, is a card which should be removed, and which hasn't already been removed!
+ if (game.vm_event !== 0 && cards[game.vm_event].remove && !game.strategy_removed.includes(game.vm_event)) {
+ permanently_remove(game.vm_event)
+ }
+ if (cards[game.played_card].remove && !game.strategy_removed.includes(game.played_card)) {
+ permanently_remove(game.played_card)
+ } /*This means the card that called the event being played is also removed if relevant. Think this makes sense */
+ vm_next()
+}
+
+function discarded_card() {
+ return game.temp > 0
+}
+
+// =================== TIANANMEN SQUARE TRACK FUNCTIONS ====================
+
+function vm_tst_3() {
+ log_gap('Tiananmen Square Track Award')
+ game.state = 'vm_tst_3_prep'
+}
+
+function vm_tst_4() {
+ log_gap('Tiananmen Square Track Award')
+ game.vm_available_ops = 2
+ game.remove_opponent_infl = true
+ game.state = 'vm_tst_4'
+}
+function vm_tst_6() {
+ log_h3('Tiananmen Square Track Award')
+ game.vm_available_ops = 1
+ game.temp = 1 //Set temp to 1, so that Card 1 is called during the support check, which has 2 ops
+ game.state = 'vm_tst_6'
+}
+
+function vm_tst_8() {
+ game.state = 'vm_goodbye_lenin_ops' // Use this to resolve ops.
+}
+
+// ==================== POWER STRUGGLE FUNCTIONS ======================
+
+function vm_scare_tactics() {
+ game.vm_active_country = game.pwr_struggle_in
+ vm_next()
+}
+function vm_support_surges() {
+ game.state = 'vm_support_surges_1'
+}
+
+function vm_support_falters() {
+ game.vm_available_ops = 2
+ game.return === game.active
+ log(`P${PC_SUPPORT_FALTERS}:`)
+ game.state = 'vm_support_falters'
+}
+
+function vm_kremlin_coup_elite() {
+ game.valid_spaces=[]
+ elite_spaces.forEach(space => {
+ if (spaces[space].country === game.vm_active_country && !check_com_control(space)) {
+ game.valid_spaces.push(space);
+ }
+ })
+ game.state = 'vm_kremlin_coup_take_control'
+}
+
+/* ================== VM STATES ============================== */
+
+states.vm_end_event = {
+ get inactive() {
+ return `resolve ${clean_name(cards[this_card()].name)}.`
+ },
+ prompt () {
+ view.prompt = `${clean_name(cards[this_card()].name)}: done.`
+ if (game.vm_infl_to_do || game.return_state === 'vm_tst_8') {
+ gen_action('done')
+ } else {
+ gen_action('end_round')
+ }
+ },
+ done() {
+ push_undo()
+ vm_end_event()
+ },
+ end_round() {
+ push_undo()
+ game.return_state = ''
+ vm_end_event()
+ }
+}
+
+states.vm_take_control = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt () {
+ if (game.vm_available_ops > 0 && game.valid_spaces.length === 0) {
+ view.prompt = `${clean_name(cards[this_card()].name)}: all spaces controlled. Continue.`
+ gen_action('done')
+ } else if (game.vm_available_ops > 0 ) {
+ view.prompt = `${clean_name(cards[this_card()].name)}: take control of ${event_prompt()}.`
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ } else {
+ view.prompt = `${clean_name(cards[this_card()].name)}. Take control: done.`
+ if (game.vm_infl_to_do) {
+ gen_action('done')
+ } else {
+ gen_action('end_round')
+ }
+ }
+ },
+ space(space) {
+ push_undo()
+ vm_take_control(space)
+ game.vm_available_ops--
+ if (game.vm_available_ops === 0) {
+ game.valid_spaces = []
+ vm_next()
+ }
+ },
+ done() {
+ push_undo()
+ vm_next()
+ },
+ end_round() {
+ push_undo()
+ vm_next()
+ }
+}
+
+states.vm_add_infl = {
+ inactive: 'add Support Points.',
+ prompt () {
+ if (game.vm_available_ops > 0 && game.valid_spaces.length === 0 ) {
+ view.prompt = `${clean_name(cards[this_card()].name)}. No available spaces remaining. Add SPs: done.`
+ gen_action('done')
+ }
+ else if (game.vm_available_ops > 0 ) {
+ view.prompt = `${clean_name(cards[this_card()].name)}: add ${pluralize(game.vm_available_ops,'SP')}${event_prompt()}.`
+
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id)
+ }
+ } else {
+ get_end_infl_prompt()
+ }
+ },
+ space(space) {
+ add_infl(space, 'vm_available_ops')
+ if (game.vm_available_ops === 0) {
+ game.valid_spaces = []
+ do_log_summary()
+ game.vm_event_done = true
+ vm_next()
+ }
+ },
+ done () {
+ push_undo()
+ do_log_summary()
+ game.vm_event_done = true
+ vm_next()
+ },
+ end_round() {
+ push_undo()
+ do_log_summary()
+ game.vm_event_done = true
+ vm_next()
+ }
+}
+
+states.vm_add_infl_free = {
+ get inactive() {
+ return `resolve ${clean_name(cards[this_card()].name)}: add SPs.`
+ },
+ prompt () {
+ if (game.vm_available_ops > 0 && game.valid_spaces.length === 0 ) {
+ view.prompt = `${clean_name(cards[this_card()].name)}. No available spaces remaining. Add SPs: done.`
+ gen_action('done')
+ } else if (game.vm_available_ops > 0 ) {
+ view.prompt = `${clean_name(cards[this_card()].name)}: add ${game.vm_available_ops} SPs to ${event_prompt()}.`
+
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ } else {
+ get_end_infl_prompt()
+ }
+ },
+ space(space) {
+ vm_do_add_infl_free(space)
+ if (game.vm_available_ops === 0) {
+ game.valid_spaces = []
+ do_log_summary()
+ game.vm_event_done = true
+ vm_next()
+ }
+ },
+ done () {
+ push_undo()
+ game.valid_spaces = []
+ game.vm_event_done = true
+ do_log_summary()
+ vm_next()
+ },
+ end_round () {
+ push_undo()
+ game.valid_spaces = []
+ game.vm_event_done = true
+ do_log_summary()
+ vm_next()
+ }
+}
+
+states.vm_add_x_infl = {
+ get inactive() {
+ return `resolve ${clean_name(cards[this_card()].name)}: add Support Points.`
+ },
+ prompt () {
+ if (game.vm_event === 101 && game.valid_spaces.length === 0) {
+ view.prompt = `${clean_name(cards[this_card()].name)}: the Romanian Elite space no longer exists.`
+ gen_action('done')
+ }
+ else if (game.vm_available_ops > 0 ) {
+ view.prompt = `${clean_name(cards[this_card()].name)}: Add ${game.vm_available_ops} SPs to ${event_prompt()}.`
+
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id)
+ }
+ }
+ },
+ space(space) {
+ push_undo()
+ vm_do_add_x_infl(space)
+ if (game.vm_available_ops === 0) {
+ game.vm_event_done = true
+ vm_next()
+ }
+ },
+ done () {
+ push_undo()
+ game.vm_event_done = true
+ vm_next()
+ }
+}
+
+states.vm_add_limited_infl = {
+ get inactive() {
+ return `resolve ${clean_name(cards[this_card()].name)}: add Support Points.`
+ },
+ prompt () {
+ if (game.vm_available_ops > 0 && game.valid_spaces.length > 0) {
+ if (game.vm_max_infl === 1) {
+ view.prompt = `${clean_name(cards[this_card()].name)}: add ${pluralize(game.vm_max_infl,'SP')} ${event_prompt()}.`
+ }
+ else {
+ view.prompt = `${clean_name(cards[this_card()].name)}: add ${pluralize(game.vm_available_ops,'SP')} to ${event_prompt()}.`
+ }
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ }
+ },
+ space(space) {
+ vm_do_add_limited_infl(space, game.vm_max_infl)
+ if (game.vm_available_ops === 0 || game.valid_spaces.length === 0) {
+ game.valid_spaces = []
+ do_log_summary()
+ game.vm_event_done = true
+ vm_next()
+ }
+ },
+}
+
+states.vm_remove_infl = {
+ inactive: 'remove Support Points.',
+ prompt () {
+ // Keep this so that there is an undo option in, e.g., Scare Tactics
+ if (game.valid_spaces.length === 0 && game.vm_available_ops > 0) {
+ view.prompt = `${clean_name(cards[this_card()].name)}: no further SPs to remove.`
+ gen_action('done')
+ return
+ }
+ if (game.vm_available_ops === 0 ) {
+ view.prompt = `${clean_name(cards[this_card()].name)}. Remove SPs: done.`
+ gen_action('done')
+ return
+ }
+ if (game.remove_opponent_infl) {
+ view.prompt = `${clean_name(cards[this_card()].name)}: remove ${pluralize(game.vm_available_ops, 'opponent SP')}${event_prompt()}.`
+ }
+ else {
+ view.prompt = `${clean_name(cards[this_card()].name)}: remove ${pluralize(game.vm_available_ops,'SP')}${event_prompt()}.`
+ }
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ },
+ space(space) {
+ remove_infl(space, 'vm_available_ops')
+ game.vm_active_country = spaces[space].country
+ let require_done = [C_INFLATIONARY_CURRENCY, C_THE_WALL_MUST_GO]
+ if (!require_done.includes(game.vm_event)) {
+ if (game.vm_available_ops === 0 ) {
+ do_log_summary()
+ vm_next()
+ }
+ }
+ },
+ done() {
+ if (game.summary.length > 0) {
+ pop_summary()
+ log_br()
+ } else {
+ log('No influence to remove')
+ }
+ vm_next()
+ }
+}
+
+
+states.vm_remove_x_infl = {
+ get inactive() {
+ return `resolve ${clean_name(cards[this_card()].name)}: remove SP from ${event_prompt()}.`
+ },
+ prompt () {
+ if (game.valid_spaces.length === 0 && game.vm_available_ops > 0) {
+ view.prompt = `${clean_name(cards[this_card()].name)}: no SPs to remove.`
+ gen_action('done')
+ } else if (game.vm_available_ops > 0) {
+
+ view.prompt = `${clean_name(cards[this_card()].name)}: remove ${pluralize(game.vm_available_ops,'SP')} from ${event_prompt()}.`
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ }
+ },
+ space(space) {
+ vm_do_remove_x_infl(space)
+ if (game.vm_available_ops === 0) {
+ game.vm_event_done = true
+ vm_next()
+ }
+ },
+ done () {
+ game.vm_event_done = true
+ vm_next()
+ }
+}
+
+states.vm_remove_limited_infl = {
+ inactive: 'remove SP.',
+ prompt () {
+ if (game.vm_available_ops > 0 && game.valid_spaces.length > 0) {
+ view.prompt = `${clean_name(cards[this_card()].name)}: remove ${pluralize(game.vm_available_ops,'SP')}${event_prompt()}, no more than ${game.vm_max_infl} per space.`
+
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ } else if (game.valid_spaces.length === 0 && game.vm_available_ops > 0) {
+ view.prompt = `${clean_name(cards[this_card()].name)}: no further SP to remove.`
+ gen_action('done')
+ }
+ },
+ space(space) {
+ vm_do_remove_limited_infl(space, game.vm_max_infl)
+ if (game.vm_available_ops === 0) {
+ game.vm_event_done = true
+ do_log_summary()
+ vm_next()
+ }
+ },
+ done () {
+ game.vm_event_done = true
+ do_log_summary()
+ vm_next()
+ }
+}
+
+states.vm_remove_all_infl = {
+ inactive: 'remove Support Points',
+ prompt () {
+ if (game.valid_spaces.length === 0 && game.vm_available_ops > 0) {
+ view.prompt = `${clean_name(cards[this_card()].name)}: no SPs to remove.`
+ gen_action('pass')
+ } else if (game.vm_available_ops > 0) {
+ view.prompt = `${clean_name(cards[this_card()].name)}: remove all SPs from ${event_prompt()}.`
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ }
+ },
+ space(space) {
+ vm_do_remove_all_infl(space)
+ game.vm_active_country = spaces[space].country
+ if (game.vm_available_ops === 0) {
+ vm_next()
+ }
+ },
+ pass() {
+ push_undo()
+ vm_next()
+ }
+}
+
+states.vm_support_check_prep = {
+ inactive: 'do support checks.',
+ prompt () {
+ if (game.valid_spaces.length === 0) {
+ view.prompt = `${clean_name(cards[this_card()].name)}: no valid targets for support check.`
+ gen_action('done')
+ } else {
+ view.prompt = `${clean_name(cards[this_card()].name)}: ${event_prompt()}. ${pluralize(game.vm_available_ops, 'support check')} remaining.`
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ }
+ },
+ space(space) {
+ push_undo()
+ game.selected_space = space
+
+ // Check for Austria-Hungary Border Reopened - check on first support check only
+ //First check for Monday Demonstrations - support checks will always be in East Germany
+ if (game.vm_event === C_THE_MONDAY_DEMONSTRATIONS && game.persistent_events.includes(C_AUSTRIA_HUNGARY_BORDER_REOPENED)) {
+ game.austria_hungary_border_reopened_tracker = true
+ game.state = 'vm_do_support_check'
+ return
+ }
+
+ //Then check Austria-Hungary Border Reopened normally
+ if (game.persistent_events.includes(C_AUSTRIA_HUNGARY_BORDER_REOPENED)) {
+ if (game.active === DEM && game.vm_available_ops > 1) {
+ if (spaces[game.selected_space].country === 'East_Germany' && game.persistent_events.includes(C_AUSTRIA_HUNGARY_BORDER_REOPENED) && game.active === DEM) {
+ game.state = 'vm_austria_hungary_border_reopened_check'
+ return
+ }
+ }
+ }
+ game.state = 'vm_do_support_check'
+ },
+ done () {
+ push_undo()
+ game.vm_available_ops = 0
+ vm_next ()
+ }
+}
+
+states.vm_ceh_support_check_prep = {
+ inactive: 'do support checks.',
+ prompt () {
+ if (game.vm_available_ops > 0) {
+ view.prompt = `Select a space. ${pluralize(game.vm_available_ops, 'support check')} remaining.`
+
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id)
+ }
+ }
+ },
+ space(space) {
+ push_undo()
+ game.selected_space = space
+
+ //Then check Austria-Hungary Border Reopened normally
+ if (game.persistent_events.includes(C_AUSTRIA_HUNGARY_BORDER_REOPENED)) {
+ if (game.active === DEM && game.vm_available_ops > 1) {
+ if (spaces[game.selected_space].country === 'East_Germany' && game.persistent_events.includes(58) && game.active === DEM) {
+ game.state = 'vm_austria_hungary_border_reopened_check'
+ return
+ }
+ }
+ }
+ game.state = 'vm_ceh_do_support_check'
+ },
+}
+
+
+states.vm_ceh_do_support_check = {
+ inactive: 'do support checks.',
+ prompt () {
+ view.prompt = `Support check: ${spaces[game.selected_space].name_unique}. Roll a die.`
+ gen_action('roll')
+ },
+ roll() {
+ clear_undo()
+ do_sc(game.selected_space)
+ game.vm_available_ops--
+ if (game.vm_available_ops === 0) {
+ game.valid_spaces = []
+ vm_next()
+ } else {
+ game.state = 'vm_ceh_support_check_prep'
+ return
+ }
+ }
+}
+
+states.vm_austria_hungary_border_reopened_check = {
+ inactive: 'decide Austria-Hungary Border Reopened',
+ prompt() {
+ view.prompt = 'Austria-Hungary Border Reopened: will all support checks be in East Germany?'
+ gen_action('yes')
+ gen_action('no')
+ },
+ yes() {
+ game.austria_hungary_border_reopened_tracker = true
+ game.state = 'vm_do_support_check'
+ },
+ no() {
+ game.state = 'vm_do_support_check'
+ }
+}
+
+states.vm_1_support_check_prep = {
+ inactive: 'do support checks.',
+ prompt () {
+ if (game.valid_spaces.length === 0) {
+ view.prompt = `${clean_name(cards[this_card()].name)}: no valid targets for support check.`
+ gen_action('done')
+ } else {
+ view.prompt = `${clean_name(cards[this_card()].name)}: ${event_prompt()}.`
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ }
+ },
+ space(space) {
+ push_undo()
+ game.selected_space = space
+ game.state = 'vm_do_support_check'
+ },
+ done () {
+ push_undo()
+ game.vm_available_ops = 0
+ vm_next ()
+ }
+}
+
+states.vm_do_support_check = {
+ inactive: 'do support checks.',
+ prompt () {
+ view.prompt = `Support check: ${spaces[game.selected_space].name_unique}. Roll a die.`
+ gen_action('roll')
+ },
+ roll() {
+ clear_undo()
+ do_sc(game.selected_space)
+ game.vm_available_ops--
+ if (check_vp()) {
+ return
+ } else if (game.vm_available_ops === 0) {
+ game.valid_spaces = []
+ vm_next()
+ return
+ } else {
+ game.state = 'vm_support_check_prep'
+ return
+ }
+ }
+}
+
+states.vm_tiananmen_square_attempt = {
+ inactive: 'do Tiananmen Square',
+ prompt () {
+ view.prompt = 'Tiananmen Square: roll a die'
+ gen_action('roll')
+ },
+ roll() {
+ clear_undo()
+ do_tst_attempt ()
+ },
+}
+
+//================================== EVENT SPECIFIC STATES ======================================
+
+states.vm_adamec = {
+ get inactive() {
+ return `resolve ${clean_name(cards[C_ADAMEC].name)}.`
+ },
+ prompt() {
+ view.prompt = 'Adamec: roll a die.'
+ gen_action('roll')
+ },
+ roll() {
+ clear_undo()
+ let roll = roll_d6()
+ log(`Roll: D${roll}`)
+ let worker_spaces = spaces.filter(space => space && space.country === 'Czechoslovakia' && space.socio === 4 && check_dem_control(space.space_id)).length
+ if (worker_spaces > 0) {
+ logi(`-${worker_spaces} from Democrat controlled worker spaces`)
+ roll -= worker_spaces
+ }
+ log(`Modified roll: ${Math.max(roll, 0)}`)
+ if (roll > 2) {
+ log_msg_gap('Adamec succeeds')
+ vm_next()
+ return
+ }
+ log('Adamec fails: 3 or more required')
+ permanently_remove(C_ADAMEC)
+ vm_return()
+ }
+}
+
+states.vm_brought_in_for_questioning = {
+ inactive: 'discard a card.',
+ prompt() {
+ if (game.democrat_hand.length === 0) {
+ view.prompt = 'Brought in for Questioning. No cards to discard.'
+ gen_action('pass')
+ } else {
+ view.prompt = 'Brought in for Questioning: you must discard a random card.'
+ gen_action('discard')
+ }
+ },
+ discard() {
+ clear_undo()
+ log(`C${C_BROUGHT_IN_FOR_QUESTIONING}:`)
+ game.vm_event = discard_card(game.democrat_hand)
+ game.phase = 1
+ if (cards[game.vm_event].side === 'C' && (cards[game.vm_event].playable || game.playable_cards.includes(game.vm_event))) {
+ if (!game.vm_infl_to_do) {
+ if(game.round_player === DEM) {
+ game.return = COM
+ } else {
+ game.return = DEM
+ }
+ }
+ if (!is_auto_resolve(game.vm_event) && !switch_events.includes(game.vm_event)) {
+ next_player()
+ }
+ log(`C${game.vm_event}:`)
+ goto_vm(game.vm_event)
+ } else {
+ logi('Event does not occur')
+ game.return = DEM
+ vm_return()
+ }
+ },
+ pass() {
+ log('No cards to discard')
+ vm_return()
+ },
+}
+
+states.vm_central_committee_reshuffle = {
+ get inactive() {
+ return `resolve ${clean_name(cards[C_CENTRAL_COMMITTEE_RESHUFFLE].name)}.`
+ },
+ prompt() {
+ if (game.revolutions.every(n => n === true)) {
+ view.prompt = 'Central Committee Reshuffle: no countries to choose.'
+ gen_action('pass')
+ } else {
+ view.prompt = 'Central Committee Reshuffle: choose a country to add SPs.'
+ if (!game.revolutions[0]) {gen_action('poland')}
+ if (!game.revolutions[1]) {gen_action('hungary')}
+ if (!game.revolutions[2]) {gen_action('east_germany')}
+ if (!game.revolutions[3]) {gen_action('bulgaria')}
+ if (!game.revolutions[4]) {gen_action('czechoslovakia')}
+ if (!game.revolutions[5]) {gen_action('romania')}
+ }
+ },
+ east_germany() {
+ push_undo()
+ game.vm_active_country = "East_Germany"
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ game.valid_spaces = [...S_EAST_GERMANY]
+ vm_next()
+ },
+ poland() {
+ push_undo()
+ game.vm_active_country = "Poland"
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ game.valid_spaces = [...S_POLAND]
+ vm_next()
+ },
+ czechoslovakia() {
+ push_undo()
+ game.vm_active_country = "Czechoslovakia"
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ game.valid_spaces = [...S_CZECHOSLOVAKIA]
+ vm_next()
+ },
+ hungary() {
+ push_undo()
+ game.vm_active_country = "Hungary"
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ game.valid_spaces = [...S_HUNGARY]
+ vm_next()
+ },
+ romania() {
+ push_undo()
+ game.vm_active_country = "Romania"
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ game.valid_spaces = [...S_ROMANIA]
+ game.valid_spaces = game.valid_spaces.filter(space => space !== game.systematization)
+ vm_next()
+ },
+ bulgaria () {
+ push_undo()
+ game.vm_active_country = "Bulgaria"
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ game.valid_spaces = [...S_BULGARIA]
+ vm_next()
+ },
+ pass() {
+ log('Passed')
+ vm_return()
+ }
+}
+
+states.vm_common_european_home_choose = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ view.prompt = `Common European Home: play an opponent's card, event does not occur.`
+ for (let card of game.valid_cards) {
+ gen_action_card(card)
+ }
+ },
+ card(card) {
+ push_undo()
+ game.valid_cards = []
+ silent_discard(card)
+ game.vm_event = card
+ game.state = 'vm_common_european_home_play'
+ }
+}
+
+states.vm_common_european_home_play = {
+ get inactive() {
+ return `resolve ${clean_name(cards[this_card()].name)}.`
+ },
+ prompt() {
+ view.prompt = `Play ${clean_name(cards[this_card()].name)} for:`
+ gen_action('influence')
+ gen_action('support_check')
+ if (game.active === DEM && game.vm_event === C_KOHL_PROPOSES_REUNIFICATION ) {
+ return /*Special condition if card is actually Kohl Proposes Reunification*/
+ }
+ },
+ influence(){
+ push_undo()
+ log_gap(`Played C${game.vm_event} to place SPs`)
+ game.vm_available_ops = get_card_ops(game.vm_event)
+ valid_spaces_infl()
+ // If ABHR - Set AHBR tracker to true
+ if (game.persistent_events.includes(C_AUSTRIA_HUNGARY_BORDER_REOPENED)) {
+ game.austria_hungary_border_reopened_tracker = true
+ }
+ game.state = 'vm_add_infl'
+ },
+ support_check() {
+ push_undo()
+ log_gap(`Played C${game.vm_event} for support checks`)
+ game.vm_available_ops = 2
+ game.state = 'vm_ceh_support_check_prep'
+ valid_spaces_sc()
+ },
+ tst() {
+ push_undo()
+ log_gap(`Played C${game.vm_event} to the Tiananmen Square Track`)
+ game.state = 'vm_tiananmen_square_attempt'
+ }
+}
+
+states.vm_dash_for_the_west = {
+ get inactive() {
+ return `resolve ${clean_name(cards[C_DASH_FOR_THE_WEST].name)}.`
+ },
+ prompt() {
+ view.prompt = 'Dash for the West: roll a die'
+ gen_action('roll')
+ },
+ roll() {
+ clear_undo()
+ let roll = roll_d6()
+ log(`Roll: D${roll}`)
+ let com_control = check_presence('East_Germany').com_spaces
+
+ if (roll > com_control) {
+ log(`Success. More than the ${com_control} Communist controlled spaces in East Germany`)
+ log('+1 VP')
+ game.vp++
+ if (check_vp()) {
+ return
+ }
+ game.discard = true
+ game.state = 'vm_play_event_from_discard'
+ } else {
+ log(`Fail: more than a ${com_control} required`)
+ vm_next()
+ }
+ },
+}
+
+states.vm_play_event_from_discard = {
+ get inactive() {
+ return `resolve ${clean_name(cards[this_card()].name)}.`
+ },
+ prompt() {
+ if (game.valid_cards.length === 0) {
+ view.prompt = `${clean_name(cards[this_card()].name)}: no valid cards in discard.`
+ gen_action('pass')
+ } else {
+ view.prompt = `${event_prompt()}.`
+ for (let card of game.valid_cards) {
+ gen_action('pass')
+ gen_action_card(card)
+ }
+ }
+ },
+ card(card) {
+ push_undo()
+ log(`C${this_card()}:`)
+ log(`Chose C${card}`)
+ game.vm_event = card
+ game.vm_available_ops = cards[card].ops
+ game.discard = false
+ if (switch_events.includes(card)) {next_player()}
+ goto_vm(card)
+ },
+ pass(){
+ push_undo()
+ if (game.valid_cards.length === 0) {
+ log('No valid cards to choose')
+ } else{
+ log('Did not choose a card')
+ }
+ vm_next()
+ },
+}
+
+states.vm_deutsche_marks_prep = {
+ inactive: 'choose a card.',
+ prompt() {
+ if (game.valid_cards.length === 0) {
+ view.prompt = 'Deutsche Marks: no cards to give.'
+ gen_action('pass')
+ } else {
+ view.prompt = 'Deutsche Marks: choose a card to give.'
+ for (let card of game.valid_cards) {
+ gen_action_card(card)
+ }
+ }
+ },
+ card(card) {
+ push_undo()
+ log(`Gave C${card}`)
+ game.valid_cards = []
+ silent_discard(card)
+ game.state = 'vm_deutsche_marks_confirm'
+ game.vm_event = card
+ },
+ pass() {
+ push_undo()
+ vm_next()
+ }
+}
+
+states.vm_deutsche_marks_confirm = {
+ inactive: 'choose a card.',
+ prompt() {
+ view.prompt = `Deutsche Marks: gave ${cards[game.vm_event].name}.`
+ gen_action('done')
+ },
+ done() {
+ if (cards[game.vm_event].side === "C" && (is_auto_resolve(game.vm_event) || switch_events.includes(game.vm_event))) {
+ goto_vm(game.vm_event)
+ } else {
+ next_player()
+ game.state = 'vm_deutsche_marks'
+ }
+ }
+}
+
+states.vm_deutsche_marks = {
+ get inactive() {
+ return `resolve ${clean_name(cards[C_DEUTSCHE_MARKS].name)}.`
+ },
+ prompt() {
+ if(cards[game.vm_event].side === 'C' && (cards[game.vm_event].playable || game.playable_cards.includes(game.vm_event))) {
+ view.prompt = `Deutsche Marks: you must play ${clean_name(cards[this_card()].name)} for the event.`
+ gen_action('event')
+ } else {
+ view.prompt = `Deutsche Marks: play ${clean_name(cards[this_card()].name)} for:`
+ gen_action('influence')
+ gen_action('support_check')
+ if (game.com_tst_attempted_this_turn === 0) {
+ gen_action('tst')
+ }
+ }
+ },
+ event() {
+ push_undo()
+ log(`Played C${game.vm_event} for the event`)
+ if (!game.vm_infl_to_do) {
+ game.return = game.active
+ }
+ goto_vm(game.vm_event)
+ },
+ influence() {
+ push_undo()
+ log(`Played C${game.vm_event} to place SPs`)
+ game.vm_available_ops = get_card_ops(game.vm_event)
+ valid_spaces_infl()
+ game.state = 'vm_add_infl'
+ },
+ support_check() {
+ push_undo()
+ log_gap(`Played C${game.vm_event} for support checks`)
+ game.vm_available_ops = 2
+ game.state='vm_support_check_prep'
+ valid_spaces_sc()
+ },
+ tst() {
+ push_undo()
+ log_gap(`Played C${game.vm_event} to the Tiananmen Square Track`)
+ game.state='vm_tiananmen_square_attempt'
+ }
+}
+
+states.vm_exit_visas = {
+ get inactive() {
+ return `resolve ${clean_name(cards[C_EXIT_VISAS].name)}.`
+ },
+ prompt() {
+ view.prompt = 'Exit Visas: you may discard cards from your hand and draw replacements.'
+ for (let card of game.democrat_hand) {
+ gen_action_card(card)
+ }
+ if (game.temp === 0) {
+ gen_action('pass')
+ } else {
+ gen_action('done')
+ }
+ },
+ card(card){
+ push_undo()
+ discard(card)
+ game.temp++
+ },
+ pass() {
+ push_undo()
+ log('Did not discard')
+ game.state = 'vm_exit_visas_finish'
+ },
+ done() {
+ push_undo()
+ game.state = 'vm_exit_visas_finish'
+ }
+}
+
+states.vm_exit_visas_finish = {
+ get inactive() {
+ return `resolve ${clean_name(cards[C_EXIT_VISAS].name)}.`
+ },
+ prompt() {
+ if (game.temp > 0 ) {
+ view.prompt = 'Exit Visas: draw replacement cards.'
+ gen_action('draw')
+ } else {
+ view.prompt = 'Exit Visas: done.'
+ gen_action('done')
+ }
+ },
+ draw() {
+ clear_undo()
+ draw_cards(game.strategy_deck, game.democrat_hand, game.communist_hand, game.democrat_hand.length + game.temp, game.communist_hand.length)
+ game.temp = 0
+ vm_next()
+ },
+ done() {
+ vm_next()
+ }
+}
+
+states.vm_foreign_currency_debt_burden = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ view.prompt = 'Choose a country. The Communist may not make support checks there for the rest of the turn.'
+ gen_action('east_germany')
+ gen_action('poland')
+ gen_action('czechoslovakia')
+ gen_action('hungary')
+ gen_action('bulgaria')
+ },
+ east_germany() {
+ push_undo()
+ game.foreign_currency_debt_burden = 'East_Germany'
+ log('Selected East Germany')
+ vm_next()
+ },
+ poland() {
+ push_undo()
+ game.foreign_currency_debt_burden = 'Poland'
+ log('Selected Poland')
+ vm_next()
+ },
+ czechoslovakia() {
+ push_undo()
+ game.foreign_currency_debt_burden = 'Czechoslovakia'
+ log('Selected Czechoslovakia')
+ vm_next()
+ },
+ hungary() {
+ push_undo()
+ game.foreign_currency_debt_burden = 'Hungary'
+ log('Selected Hungary')
+ vm_next()
+ },
+ bulgaria() {
+ push_undo()
+ game.foreign_currency_debt_burden = 'Bulgaria'
+ log('Selected Bulgaria')
+ vm_next()
+ }
+}
+
+states.vm_goodbye_lenin = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ if (game.valid_cards.length > 0 ) {
+ view.prompt = `Play a red event from your opponent's hand, or play Goodbye Lenin for operations.`
+ for (let card of game.valid_cards) {
+ gen_action_card(card)
+ gen_action('ops')
+ }
+ } else {
+ view.prompt = 'Communist has no red events. Play Goodbye Lenin for operations.'
+ gen_action('ops')
+ }
+ },
+ card(card) {
+ push_undo()
+ log(`Chose to play C${card} for the event`)
+ let card_index = game.communist_hand.indexOf(card)
+ game.communist_hand.splice(card_index, 1)
+ game.vm_event = card
+ game.view_opp_hand = false
+ goto_vm(card)
+ },
+ ops() {
+ push_undo()
+ if (game.valid_cards.length === 0) {
+ logi('No red events')
+ }
+ log('C46 played for operations')
+ game.view_opp_hand = false
+ game.state = 'vm_goodbye_lenin_ops'
+ }
+}
+
+states.vm_goodbye_lenin_ops = {
+ get inactive() {
+ return `resolve ${clean_name(cards[this_card()].name)}.`
+ },
+ prompt() {
+ view.prompt = `Play ${clean_name(cards[this_card()].name)} for:`
+ gen_action('influence')
+ gen_action('support_check')
+ if ((game.active === DEM && game.dem_tst_attempted_this_turn === 0 ) || (game.active === COM && game.com_tst_attempted_this_turn === 0 )) {
+ gen_action('tst')
+ }
+ },
+ influence(){
+ push_undo()
+ game.vm_available_ops = get_card_ops(this_card())
+ valid_spaces_infl()
+
+ // If ABHR - Set AHBR tracker to true
+ if (game.persistent_events.includes(58)) {
+ game.austria_hungary_border_reopened_tracker = true
+ }
+ game.state = 'vm_add_infl'
+ },
+ support_check() {
+ push_undo()
+ game.vm_available_ops = 2
+ game.state = 'vm_support_check_prep'
+ valid_spaces_sc()
+ },
+ tst() {
+ push_undo()
+ game.state = 'vm_tiananmen_square_attempt'
+ }
+}
+
+states.vm_honecker = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ if (game.valid_cards.length === 0 && game.temp === 0) {
+ view.prompt = 'Honecker: no valid cards to choose.'
+ gen_action('pass')
+ } else
+ if (game.temp === 0) {view.prompt = 'Honecker: choose a card to add to your hand.'
+ for (let card of game.valid_cards) {
+ gen_action_card(card)
+ gen_action('pass')
+ }
+ }
+ },
+ card(card) {
+ push_undo()
+ game.valid_cards = []
+ log(`Took C${card} into hand`)
+ game.temp = card
+ let card_index = game.strategy_discard.indexOf(card)
+ game.strategy_discard.splice(card_index, 1)
+ game.communist_hand.push(card)
+ vm_next()
+ },
+ pass(){
+ log('Did not take a card')
+ game.discard = false
+ vm_next()
+ },
+}
+
+states.vm_inflationary_currency = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ if ((game.active === COM && game.revolutions.every(n => n === false)) || (game.active === DEM && game.revolutions.every(n => n === true))) {
+ view.prompt = 'Inflationary Currency: no countries to choose.'
+ gen_action('pass')
+ } else {
+ view.prompt = 'Inflationary Currency: choose a country where your opponent has power.'
+ if (game.active === DEM) {
+ if (!game.revolutions[0]) {gen_action('poland')}
+ if (!game.revolutions[1]) {gen_action('hungary')}
+ if (!game.revolutions[2]) {gen_action('east_germany')}
+ if (!game.revolutions[3]) {gen_action('bulgaria')}
+ if (!game.revolutions[4]) {gen_action('czechoslovakia')}
+ if (!game.revolutions[5]) {gen_action('romania')}
+ } else {
+ if (game.revolutions[0]) {gen_action('poland')}
+ if (game.revolutions[1]) {gen_action('hungary')}
+ if (game.revolutions[2]) {gen_action('east_germany')}
+ if (game.revolutions[3]) {gen_action('bulgaria')}
+ if (game.revolutions[4]) {gen_action('czechoslovakia')}
+ if (game.revolutions[5]) {gen_action('romania')}
+ }
+ }
+ },
+ east_germany() {
+ push_undo()
+ game.vm_active_country = 'East_Germany'
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ vm_next()
+ },
+ poland() {
+ push_undo()
+ game.vm_active_country = 'Poland'
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ vm_next()
+ },
+ czechoslovakia() {
+ push_undo()
+ game.vm_active_country = 'Czechoslovakia'
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ vm_next()
+ },
+ hungary() {
+ push_undo()
+ game.vm_active_country = 'Hungary'
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ vm_next()
+ },
+ romania() {
+ push_undo()
+ game.vm_active_country = 'Romania'
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ vm_next()
+ },
+ bulgaria () {
+ push_undo()
+ game.vm_active_country = 'Bulgaria'
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ vm_next()
+ },
+ pass() {
+ log('Passed')
+ vm_return()
+ }
+}
+
+states.vm_inflationary_currency_discard = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ if (game.valid_cards.length === 0 ) {
+ view.prompt = 'Inflationary Currency: no valid cards to discard. You must pass.'
+ gen_action('pass')
+ } else {
+ view.prompt = 'Inflationary Currency: you may discard a 3 op or higher value card to cancel the support check.'
+ gen_action('pass')
+ for (let card of game.valid_cards) {
+ gen_action_card(card)
+ }
+ }
+ },
+ card(card) {
+ push_undo()
+ discard(card)
+ game.temp = card
+ if (!game.vm_infl_to_do) {
+ if(game.round_player === DEM) {
+ game.return = COM
+ } else {
+ game.return = DEM
+ }
+ }
+ vm_next()
+ },
+ pass() {
+ push_undo()
+ log('Did not discard')
+ next_player()
+ game.vm_available_ops = 1
+ vm_next()
+ },
+}
+
+
+states.vm_kiss_of_death = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ if (game.communist_hand.length === 0) {
+ view.prompt = 'Kiss of Death. No cards to discard.'
+ gen_action('pass')
+ } else {
+ view.prompt = 'Kiss of Death: you must randomly discard a card.'
+ gen_action('discard')
+ }
+ },
+ discard() {
+ clear_undo()
+ log(`C${C_KISS_OF_DEATH}:`)
+ game.vm_event = discard_card(game.communist_hand)
+ //Change player before checking if event is playable. Common European Home is not playable here
+ change_player()
+ // Special check for the Reformer Rehabilitated
+ if (game.vm_event === C_REFORMER_REHABILITATED && game.dem_tst_position > game.com_tst_position) {
+ log_side()
+ log(`C${game.vm_event}:`)
+ game.state = 'vm_kiss_of_death_finish'
+ } else if (cards[game.vm_event].side !== "C" && event_is_playable(game.vm_event) && game.vm_event !== C_COMMON_EUROPEAN_HOME) {
+ if (is_auto_resolve(game.vm_event)) {
+ change_player()
+ game.state = 'vm_kiss_of_death_finish'
+ } else {
+ log_side()
+ log(`C${game.vm_event}:`)
+ game.state = 'vm_kiss_of_death_finish'
+ }
+ } else {
+ change_player()
+ logi('Event does not occur')
+ vm_next()
+ }
+ },
+ pass() {
+ log('No card to discard')
+ vm_next()
+ }
+}
+
+states.vm_kiss_of_death_finish = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ view.prompt = `Play ${clean_name(cards[game.vm_event].name)} for the event.`
+ gen_action('event')
+ },
+ event() {
+ goto_vm(game.vm_event)
+ },
+}
+
+states.vm_kremlin_coup_choose_country = {
+ get inactive() {
+ return `resolve ${clean_name(cards[this_card()].name)}.`
+ },
+ prompt() {
+ if (game.temp.length > 0) {
+ view.prompt = 'Kremlin Coup! Select a country where the Communist retains power.'
+ for (let country of countries) {
+ if (game.temp.includes(country)) {
+ gen_action(`${country.toLowerCase()}`)
+ }
+ }
+ } else {
+ view.prompt = 'Kremlin Coup! There are no countries where the Communist retains power.'
+ gen_action('done')
+ }
+ },
+ east_germany() {
+ push_undo()
+ game.vm_active_country = 'East_Germany'
+ game.temp = game.temp.filter(country => country !== game.vm_active_country)
+ log(`${country_name(game.vm_active_country)}:`)
+ vm_kremlin_coup_elite()
+ },
+ poland() {
+ push_undo()
+ game.vm_active_country = 'Poland'
+ log(`${country_name(game.vm_active_country)}:`)
+ game.temp = game.temp.filter(country => country !== game.vm_active_country)
+ vm_kremlin_coup_elite()
+ },
+ czechoslovakia() {
+ push_undo()
+ game.vm_active_country = 'Czechoslovakia'
+ log(`${country_name(game.vm_active_country)}:`)
+ game.temp = game.temp.filter(country => country !== game.vm_active_country)
+ vm_kremlin_coup_elite()
+ },
+ hungary() {
+ push_undo()
+ game.vm_active_country = 'Hungary'
+ log(`${country_name(game.vm_active_country)}:`)
+ game.temp = game.temp.filter(country => country !== game.vm_active_country)
+ vm_kremlin_coup_elite()
+ },
+ romania() {
+ push_undo()
+ game.vm_active_country = 'Romania'
+ log(`${country_name(game.vm_active_country)}:`)
+ game.temp = game.temp.filter(country => country !== game.vm_active_country)
+ vm_kremlin_coup_elite()
+ },
+ bulgaria () {
+ push_undo()
+ game.vm_active_country = 'Bulgaria'
+ log(`${country_name(game.vm_active_country)}:`)
+ game.temp = game.temp.filter(country => country !== game.vm_active_country)
+ vm_kremlin_coup_elite()
+ },
+ done() {
+ game.temp = 0
+ vm_next()
+ }
+}
+
+states.vm_kremlin_coup_take_control = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ if (game.valid_spaces.includes(game.systematization)) {
+ view.prompt = `Kremlin Coup! ${country_name(game.vm_active_country)}'s Elite space no longer exists.`
+ gen_action('done')
+ }
+ else if (game.valid_spaces.length === 0){
+ view.prompt = `Kremlin Coup! ${country_name(game.vm_active_country)}'s Elite space is already controlled.`
+ gen_action('done')
+ } else {
+ view.prompt = `Kremlin Coup! Take control of the Elite space in ${country_name(game.vm_active_country)}.`
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ }
+ },
+ space(space) {
+ push_undo()
+ vm_take_control(space)
+ if (game.vm_active_country === 'East_Germany') {game.selected_space = S_BERLIN }
+ if (game.vm_active_country === 'Poland') {game.selected_space = S_WARSZAWA}
+ if (game.vm_active_country === 'Czechoslovakia') {game.selected_space = S_PRAHA}
+ if (game.vm_active_country === 'Hungary') {game.selected_space = S_BUDAPEST}
+ if (game.vm_active_country === 'Romania') {game.selected_space = S_BUCURESTI}
+ if (game.vm_active_country === 'Bulgaria') {game.selected_space = S_SOFIA}
+ game.state = 'vm_kremlin_coup_sc_prep'
+ },
+ done() {
+ push_undo()
+ if (game.vm_active_country === 'East_Germany') {game.selected_space = S_BERLIN }
+ if (game.vm_active_country === 'Poland') {game.selected_space = S_WARSZAWA}
+ if (game.vm_active_country === 'Czechoslovakia') {game.selected_space = S_PRAHA}
+ if (game.vm_active_country === 'Hungary') {game.selected_space = S_BUDAPEST}
+ if (game.vm_active_country === 'Romania') {game.selected_space = S_BUCURESTI}
+ if (game.vm_active_country === 'Bulgaria') {game.selected_space = S_SOFIA}
+ game.state = 'vm_kremlin_coup_sc_prep'
+ }
+}
+
+states.vm_kremlin_coup_sc_prep = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ view.prompt = `Kremlin Coup! Conduct a support check in ${country_name(game.vm_active_country)}'s Bureaucratic space.`
+ gen_action_space(game.selected_space);
+ },
+ space(space) {
+ push_undo()
+ game.state = 'vm_kremlin_coup_sc'
+ }
+}
+
+states.vm_kremlin_coup_sc = {
+ inactive: 'do support checks',
+ prompt () {
+ view.prompt = `Support check: ${spaces[game.selected_space].name_unique}. Roll a die.`
+ gen_action('roll')
+ },
+ roll() {
+ clear_undo()
+ do_sc(game.selected_space)
+ if (game.temp.length > 0 ){
+ game.state = 'vm_kremlin_coup_choose_country'
+ } else {
+ vm_next()
+ }
+ }
+}
+
+states.vm_laszlo_tokes = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ view.prompt = `Laszlo Tokes. Choose to:`
+ gen_action('influence')
+ gen_action('support_check')
+ },
+ influence(){
+ push_undo()
+ game.vm_available_ops = get_card_ops(C_LASZLO_TOKES)
+ valid_spaces_infl()
+ game.valid_spaces = game.valid_spaces.filter(space_id => spaces[space_id].country === 'Romania')
+ game.phase = 3
+ vm_next()
+ },
+ support_check() {
+ push_undo()
+ game.vm_available_ops = 2
+ valid_spaces_sc()
+ game.valid_spaces = game.valid_spaces.filter(space_id => spaces[space_id].country === 'Romania')
+ vm_next()
+ }
+}
+
+states.vm_switch_infl = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ if (game.valid_spaces.length === 0) {
+ view.prompt = `${clean_name(cards[this_card()].name)}: No SPs to remove.`
+ gen_action('pass')
+ } else {
+ view.prompt = `${clean_name(cards[game.played_card].name)}: ${event_prompt()}.`
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ }
+ },
+ space(space) {
+ push_undo()
+ if (game.vm_event === C_BETRAYAL) {
+ game.vm_available_ops = game.demInfl[space]
+ }
+ vm_switch_infl(space)
+ if (game.vm_available_ops === 0) {
+ game.valid_spaces = []
+ }
+ vm_next()
+ },
+ pass() {
+ vm_next()
+ }
+}
+
+states.vm_malta_summit = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ view.prompt = 'Malta Summit: roll a die.'
+ gen_action('roll')
+},
+ roll() {
+ clear_undo()
+ let roll = roll_d6()
+ log(`Roll: D${roll}`)
+ if (game.stability > 0) {
+ logi(`+${Math.min(game.stability, 3)} from USSR Stability Track`)
+ log(`Modified roll: ${roll + Math.min(game.stability, 3)}`)
+ }
+ if (roll + game.stability > 3) {
+ log('Summit successful')
+ game.vp += 3
+ log('+3 VP')
+ if (check_vp()) {
+ return
+ }
+ if (game.comInfl[S_DRESDEN] > 0 ) {game.valid_spaces.push(S_DRESDEN)}
+ if (game.comInfl[S_BYDGOSZCZ] > 0 ) {game.valid_spaces.push(S_BYDGOSZCZ)}
+ if (game.comInfl[S_PLZEN] > 0 ) {game.valid_spaces.push(S_PLZEN)}
+ if (game.comInfl[S_SZOMBATHELY] > 0 ) {game.valid_spaces.push(S_SZOMBATHELY)}
+ if (game.comInfl[S_CLUJ_NAPOCA] > 0 ) {game.valid_spaces.push(S_CLUJ_NAPOCA)}
+ if (game.comInfl[S_STARA_ZAGORA] > 0 ) {game.valid_spaces.push(S_STARA_ZAGORA)}
+ game.remove_opponent_infl = true
+ vm_next()
+ }
+ else {
+ log('Summit failed. Required 4 or more')
+ vm_return()
+ }
+ },
+}
+
+states.vm_modrow = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ view.prompt = `Modrow: roll a die.`
+ gen_action('roll')
+ },
+ roll(){
+ clear_undo()
+ let roll = roll_d6()
+ let dem_spaces = spaces.filter(space => space && space.country === 'East_Germany' && check_dem_control(space.space_id)).length
+ if (roll > dem_spaces) {
+ log(`Roll: D${roll}`)
+ log(`Success. More than the ${dem_spaces} Democratically controlled spaces`)
+ vm_next()
+ } else {
+ log(`Roll: D${roll}`)
+ log(`Fail. More than ${dem_spaces} required`)
+ permanently_remove(C_MODROW)
+ vm_return()
+ }
+ }
+}
+
+states.vm_nepotism = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ view.prompt = 'Nepotism: roll a die.'
+ gen_action('roll')
+ },
+ roll() {
+ clear_undo()
+ let roll = roll_d6()
+ if (roll < 3) {
+ log(`Roll: D${roll} adds 4 SPs`)
+ game.vm_available_ops = 4}
+ else if (roll < 5 ) {
+ log(`Roll: D${roll} adds 3 SPs`)
+ game.vm_available_ops = 3}
+ else {
+ log(`Roll: D${roll} adds 1 SP`)
+ game.vm_available_ops = 1}
+ vm_next()
+ },
+}
+
+states.vm_new_years_eve_party = {
+ get inactive() {
+ return `resolve ${clean_name(cards[C_NEW_YEARS_EVE_PARTY].name)}.`
+ },
+ prompt() {
+ view.prompt = 'Choose whether the game ends at the end of this turn.'
+ gen_action('end')
+ gen_action('continue')
+ },
+ end() {
+ push_undo()
+ game.persistent_events.push(C_NEW_YEARS_EVE_PARTY)
+ log('Chooses to end the game. There will be no final scoring')
+ let power = game.revolutions.filter(value => value === false).length
+ if (power > 3) {
+ log(`Communist holds power in ${pluralize(power, 'country', 's')}. -3 VP`)
+ game.vp -= 3
+ } else {
+ log(`Communist holds power in ${pluralize(power, 'country', 's')}. +3 VP`)
+ game.vp += 3
+ }
+ if (check_vp()) {
+ return
+ }
+ vm_next()
+ },
+ continue() {
+ push_undo()
+ log('Chooses to continue')
+ permanently_remove(C_NEW_YEARS_EVE_PARTY)
+ vm_next()
+ }
+}
+
+states.vm_nomenklatura = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ view.prompt = 'Nomenklatura: choose to remove all Democratic SPs from Elite spaces or add 3 SPs to any Elite space(s).'
+ gen_action('remove')
+ gen_action('add')
+ },
+ remove() {
+ push_undo()
+ game.valid_spaces = []
+ for (let i = 0; i < spaces.length; i++) {
+ let space = spaces[i]
+
+ if (space.socio === 1 && game.demInfl[i] > 0) {
+ game.valid_spaces.push(space.space_id)
+ }
+ }
+ game.vm_available_ops = game.valid_spaces.length
+ game.remove_opponent_infl = true
+ game.state = 'vm_nomenklatura_remove'
+ },
+ add() {
+ push_undo()
+ game.valid_spaces = []
+ for (let space of spaces) {
+ if (space.socio === 1) {
+ game.valid_spaces.push(space.space_id)
+ }
+ }
+ check_systematization()
+ game.vm_available_ops = 3
+ game.state = 'vm_nomenklatura_add'
+ }
+}
+
+states.vm_nomenklatura_remove = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ if (game.valid_spaces.length === 0 ) {
+ view.prompt = 'Nomenklatura. No SPs to remove: pass.'
+ gen_action('pass')
+ } else {
+ view.prompt = 'Nomenklatura: remove all Democratic SPs from Elite spaces.'
+
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ }
+ },
+ space(space) {
+ push_undo()
+ vm_do_remove_all_infl(space)
+ if (game.valid_spaces.length === 0) {
+ vm_next()
+ }
+ },
+ pass() {
+ push_undo()
+ vm_next()
+ }
+}
+
+states.vm_nomenklatura_add = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ view.prompt = `Nomenklatura: add 3 SPs to any Elite space(s). ${pluralize(game.vm_available_ops, 'SP')} remaining.`
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ },
+ space(space) {
+ vm_do_add_infl_free(space)
+ if (game.vm_available_ops === 0 ) {
+ game.valid_spaces = []
+ do_log_summary()
+ vm_next()
+ }
+ },
+}
+
+states.vm_samizdat = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ view.prompt = 'Samizdat: you may set aside a card from your hand and draw a replacement.'
+ for (let card of game.democrat_hand) {
+ gen_action_card(card)
+ }
+ gen_action('pass')
+ },
+ card(card) {
+ push_undo()
+ game.samizdat_card = card
+ game.democrat_hand = game.democrat_hand.filter(c => c !== card)
+ log('Set aside a card')
+ game.state = 'vm_samizdat_finish'
+ },
+ pass() {
+ push_undo()
+ log('Did not set aside a card')
+ vm_next()
+ }
+}
+
+states.vm_samizdat_finish = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ view.prompt = 'Draw a replacement card.'
+ gen_action('draw')
+ },
+ draw() {
+ clear_undo()
+ game.democrat_hand.push(draw_card(game.strategy_deck))
+ vm_next()
+ },
+}
+
+states.vm_shock_therapy = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ if (game.revolutions.every(n => n === false)) {
+ view.prompt = 'Shock Therapy: no countries to choose.'
+ gen_action('pass')
+ } else {
+ if (!game.vm_active_country || game.vm_active_country === '' ) {
+ view.prompt = 'Shock Therapy: choose a country where you hold Power:'
+ if (game.revolutions[0]) {gen_action('poland')}
+ if (game.revolutions[1]) {gen_action('hungary')}
+ if (game.revolutions[2]) {gen_action('east_germany')}
+ if (game.revolutions[3]) {gen_action('bulgaria')}
+ if (game.revolutions[4]) {gen_action('czechoslovakia')}
+ if (game.revolutions[5]) {gen_action('romania')}
+ }
+ else {
+ view.prompt = 'Shock Therapy: roll a die.'
+ gen_action('roll')
+ }
+ }
+ },
+ east_germany() {
+ push_undo()
+ game.vm_active_country = 'East_Germany'
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ },
+ poland() {
+ push_undo()
+ game.vm_active_country = 'Poland'
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ },
+ czechoslovakia() {
+ push_undo()
+ game.vm_active_country = 'Czechoslovakia'
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ },
+ hungary() {
+ push_undo()
+ game.vm_active_country = 'Hungary'
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ },
+ romania() {
+ push_undo()
+ game.vm_active_country = 'Romania'
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ },
+ bulgaria () {
+ push_undo()
+ game.vm_active_country = 'Bulgaria'
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ },
+ roll() {
+ clear_undo()
+ let roll = roll_d6()
+ let worker_farmer = 0
+ for (let space of spaces) {
+ if (space && space.country === game.vm_active_country && check_com_control(space.space_id) && (space.socio === 3 || space.socio === 4)) {
+ worker_farmer++
+ }
+ }
+ log(`Roll: D${roll}`)
+ logi(`-${worker_farmer} from Communist controlled Worker and Farmer spaces`)
+ log(`Modified roll: ${Math.max(roll - worker_farmer, 0)}`)
+ if ((roll - worker_farmer) > 2) {
+ log(`C${C_SHOCK_THERAPY} is successful. +3 VP`)
+ game.vp += 3
+ if (check_vp()) {
+ return
+ }
+ vm_next()
+ } else {
+ log('C93 is unsuccessful. Required 3 or more')
+ permanently_remove(C_SHOCK_THERAPY)
+ vm_return()
+ }
+ },
+ pass() {
+ log('Passed')
+ vm_return()
+ }
+}
+
+states.vm_social_democratic_platform_adopted = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ if (game.revolutions.every(n => n === false)) {
+ view.prompt = 'Social Democratic Platform Adopted: no countries to choose.'
+ gen_action('pass')
+ } else {
+ view.prompt = 'Select a country where the Democrat holds Power.'
+ if (game.revolutions[0]) {gen_action('poland')}
+ if (game.revolutions[1]) {gen_action('hungary')}
+ if (game.revolutions[2]) {gen_action('east_germany')}
+ if (game.revolutions[3]) {gen_action('bulgaria')}
+ if (game.revolutions[4]) {gen_action('czechoslovakia')}
+ if (game.revolutions[5]) {gen_action('romania')}
+ }
+ },
+ east_germany() {
+ push_undo()
+ game.vm_active_country = 'East_Germany'
+ log(`Selected ${country_name(game.vm_active_country)}`)
+ vm_next()
+ },
+ poland() {
+ push_undo()
+ game.vm_active_country = 'Poland'
+ log(`Selected ${country_name(game.vm_active_country)}`)
+ vm_next()
+ },
+ czechoslovakia() {
+ push_undo()
+ game.vm_active_country = 'Czechoslovakia'
+ log(`Selected ${country_name(game.vm_active_country)}`)
+ vm_next()
+ },
+ hungary() {
+ push_undo()
+ game.vm_active_country = 'Hungary'
+ log(`Selected ${country_name(game.vm_active_country)}`)
+ vm_next()
+ },
+ romania() {
+ push_undo()
+ game.vm_active_country = 'Romania'
+ log(`Selected ${country_name(game.vm_active_country)}`)
+ vm_next()
+ },
+ bulgaria () {
+ push_undo()
+ game.vm_active_country = 'Bulgaria'
+ log(`Selected ${country_name(game.vm_active_country)}`)
+ vm_next()
+ },
+ pass() {
+ log('Passed')
+ vm_return()
+ }
+}
+
+states.vm_systematization = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ view.prompt = 'Systematization: eliminate a space in Romania.'
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ },
+ space(space) {
+ push_undo()
+ vm_eliminate(space)
+ game.valid_spaces = []
+ game.systematization = space
+ add_to_persistent_events(C_SYSTEMATIZATION)
+ vm_next()
+ },
+}
+
+states.vm_the_chinese_solution = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ view.prompt = 'The Chinese Solution: you may give up 3 VP to conduct support checks in a country where you hold power.'
+ if (!game.revolutions[0]) {gen_action('poland')}
+ if (!game.revolutions[1]) {gen_action('hungary')}
+ if (!game.revolutions[2]) {gen_action('east_germany')}
+ if (!game.revolutions[3]) {gen_action('bulgaria')}
+ if (!game.revolutions[4]) {gen_action('czechoslovakia')}
+ if (!game.revolutions[5]) {gen_action('romania')}
+ gen_action('pass')
+ },
+ east_germany() {
+ push_undo()
+ game.vm_active_country = 'East_Germany'
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ log('+3 VP')
+ game.vp += 3
+ if (check_vp()) {
+ return
+ }
+ vm_next()
+ },
+ poland() {
+ push_undo()
+ game.vm_active_country = 'Poland'
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ log('+3 VP')
+ game.vp += 3
+ if (check_vp()) {
+ return
+ }
+ vm_next()
+ },
+ czechoslovakia() {
+ push_undo()
+ game.vm_active_country = 'Czechoslovakia'
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ log('+3 VP')
+ game.vp += 3
+ if (check_vp()) {
+ return
+ }
+ vm_next()
+ },
+ hungary() {
+ push_undo()
+ game.vm_active_country = 'Hungary'
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ log('+3 VP')
+ game.vp += 3
+ if (check_vp()) {
+ return
+ }
+ vm_next()
+ },
+ romania() {
+ push_undo()
+ game.vm_active_country = 'Romania'
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ log('+3 VP')
+ game.vp += 3
+ if (check_vp()) {
+ return
+ }
+ vm_next()
+ },
+ bulgaria () {
+ push_undo()
+ game.vm_active_country = 'Bulgaria'
+ log(`Chose ${country_name(game.vm_active_country)}`)
+ log('+3 VP')
+ game.vp += 3
+ if (check_vp()) {
+ return
+ }
+ vm_next()
+ },
+ pass() {
+ push_undo()
+ logi(`Chose not to conduct support checks`)
+ permanently_remove(C_THE_CHINESE_SOLUTION)
+ vm_return()
+ }
+}
+
+states.vm_the_tyrant_is_gone = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ if (!game.the_tyrant_is_gone) {
+ view.prompt = 'The Tyrant is Gone: Select a space in Romania for the Ceausescus to flee to.'
+ for (let space_id of game.valid_spaces) {
+ if (!space_id) continue
+ gen_action_space(space_id);
+ }
+ } else {
+ view.prompt = 'The Tyrant is Gone: done.'
+ gen_action('done')
+ }
+ },
+ space(space) {
+ push_undo()
+ log(`The Ceausescus flee to %${space}`)
+ game.the_tyrant_is_gone = space
+ game.valid_spaces = []
+ },
+ done () {
+ vm_next()
+ }
+}
+
+states.vm_the_wall_must_go = {
+ get inactive() {
+ return `resolve ${clean_name(cards[this_card()].name)}.`
+ },
+ prompt() {
+ view.prompt = ('The Wall Must Go! Roll a die.')
+ gen_action('roll')
+ },
+ roll() {
+ clear_undo()
+ let attempt = game.the_wall_must_go['dem_wins'] + game.the_wall_must_go['com_wins']
+ if (game.the_wall_must_go['dem_roll'] === 0 && game.the_wall_must_go['com_roll'] === 0) {
+ log_h3(`Round ${attempt+1}`)
+ }
+
+ let roll = roll_d6()
+ log(`Roll: D${roll}`)
+ if (game.active === DEM) {
+ let controlled_spaces = spaces.filter(space => space && space.country === 'East_Germany' && check_dem_control(space.space_id)).length
+ if (controlled_spaces > 0) {
+ logi(`+${controlled_spaces} from controlled spaces in East Germany`)
+ log(`Modified roll: ${roll + controlled_spaces}`)
+ roll += controlled_spaces
+ }
+ game.the_wall_must_go['dem_roll'] = roll
+ } else {
+ let controlled_spaces = spaces.filter(space => space && space.country === 'East_Germany' && check_com_control(space.space_id)).length
+ if (controlled_spaces > 0) {
+ logi(`+${controlled_spaces} from controlled spaces in East Germany`)
+ log(`Modified roll: ${roll + controlled_spaces}`)
+ roll += controlled_spaces
+ }
+ game.the_wall_must_go['com_roll'] = roll
+
+ }
+ if (game.the_wall_must_go['dem_roll'] > 0 && game.the_wall_must_go['com_roll'] > 0) {
+ if (game.the_wall_must_go['dem_roll'] > game.the_wall_must_go['com_roll'] ) {
+ log('Democrat wins')
+ game.the_wall_must_go['dem_wins']++
+ } else if (game.the_wall_must_go['dem_roll'] === game.the_wall_must_go['com_roll'] ) {
+ log('Tie. Re-roll')
+ } else {
+ log('Communist wins')
+ game.the_wall_must_go['com_wins']++
+ }
+
+ log(`Democrat: ${game.the_wall_must_go['dem_wins']}, Communist: ${game.the_wall_must_go['com_wins']}`)
+ }
+ if (game.the_wall_must_go['dem_wins'] === 2) {
+ log('The Democrat wins C86')
+ finish_the_wall()
+ return
+ }
+ if (game.the_wall_must_go['com_wins'] === 2) {
+ log('The Communist wins C86')
+ finish_the_wall()
+ return
+ }
+ if (game.the_wall_must_go['dem_roll'] === 0 || game.the_wall_must_go['com_roll'] === 0) {
+ next_player()
+ } else {
+ game.the_wall_must_go['dem_roll'] = 0
+ game.the_wall_must_go['com_roll'] = 0
+ }
+ },
+}
+
+states.vm_warsaw_pact_summit = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ view.prompt = 'Choose to play for support checks or place SPs.'
+ gen_action('influence')
+ gen_action('support_check')
+ },
+ influence(){
+ push_undo()
+ for (let i = 0; i < spaces.length; i++) {
+ let space = spaces[i]
+ if (game.demInfl[i] === 0) {
+ game.valid_spaces.push(space.space_id);
+ }
+ }
+ game.vm_available_ops = 4
+ game.phase = 3
+ vm_next()
+ },
+ support_check(){
+ push_undo()
+ for (let i = 0; i < spaces.length; i++) {
+ let space = spaces[i]
+ if (game.demInfl[i] > 0 && (space.socio === 5 || space.socio === 6)) {
+ game.valid_spaces.push(space.space_id)
+ }
+ }
+ game.vm_available_ops = 2
+ vm_next()
+ }
+}
+
+states.vm_we_are_the_people_remove = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ if (game.demInfl[S_LUTHERAN_CHURCH] === 0 && game.vm_available_ops > 0) {
+ view.prompt = '"We are the People!": no SPs to remove.'
+ gen_action('done')
+ } else if (game.vm_available_ops > 0 ) {
+ view.prompt = '"We are the People!": remove up to 4 SPs from the Lutherian Church.'
+ gen_action('done')
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ } else {
+ view.prompt = '"We are the People!" Remove SPs: done.'
+ gen_action('done')
+ }
+ },
+ space(space) {
+ remove_infl(space, 'vm_available_ops')
+ if (game.vm_influence_added[S_LUTHERAN_CHURCH] === 4) {
+ game.valid_spaces = [...S_EAST_GERMANY]
+ game.state = 'vm_we_are_the_people_add'
+ }
+ },
+ done() {
+ do_log_summary()
+ if (!game.vm_influence_added[S_LUTHERAN_CHURCH]) {
+ log('No SPs removed')
+ vm_next()
+ } else {
+ game.valid_spaces = [...S_EAST_GERMANY]
+ game.state = 'vm_we_are_the_people_add'
+ }
+ }
+}
+states.vm_we_are_the_people_add = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ view.prompt = `"We are the People!": you must add the ${pluralize(game.vm_influence_added[S_LUTHERAN_CHURCH],'SP')} to spaces in Germany.`
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ },
+ space(space) {
+ vm_do_add_infl_free(space)
+ game.vm_influence_added[S_LUTHERAN_CHURCH]--
+ if (game.vm_influence_added[S_LUTHERAN_CHURCH] === 0 ) {
+ game.valid_spaces = []
+ do_log_summary()
+ vm_next()
+ }
+ },
+}
+
+states.vm_workers_revolt = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ if (game.valid_spaces.length === 0 ) {
+ view.prompt = 'Workers Revolt: no valid spaces to select.'
+ gen_action('pass')
+ return
+ }
+ view.prompt = 'Workers Revolt: select a Worker Space in a country your opponent has power.'
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id)
+ }
+ },
+ pass() {
+ push_undo()
+ vm_next()
+ },
+ space(space) {
+ push_undo()
+ game.selected_space = space
+ log(`Chose %${game.selected_space}`)
+ game.state = 'vm_workers_revolt_finish'
+ }
+}
+
+states.vm_workers_revolt_finish = {
+ get inactive() {
+ return `resolve ${clean_name(cards[game.played_card].name)}.`
+ },
+ prompt() {
+ view.prompt = `Target: ${spaces[game.selected_space].name_unique}. Roll a die.`
+ gen_action('roll')
+ },
+ roll() {
+ clear_undo()
+ let roll = roll_d6()
+ log(`Roll: D${roll}`)
+ let adj = count_adj(game.selected_space)
+ if (game.active === DEM) {
+ logi(`-${adj.com_adj} from opponent controlled spaces`)
+ roll -= adj.com_adj
+ } else {
+ logi(`-${adj.dem_adj} from opponent controlled spaces`)
+ roll -= adj.dem_adj
+ }
+ log(`Modified roll: ${Math.max(roll, 0)}`)
+ if (roll >= 4) {
+ log('Workers Revolt successful')
+ vm_replace_all_infl(game.selected_space)
+ } else {log('Workers Revolt fails. Required 4 or more')}
+ delete game.selected_space
+ vm_next()
+ },
+}
+// ==================== TIANANMEN SQUARE TRACK STATES =====================
+
+states.vm_tst_3_prep = {
+ inactive: 'resolve Tiananmen Square Track award.',
+ prompt() {
+ view.prompt = 'Tiananmen Square Track award: draw 3 cards.'
+ gen_action('draw')
+ },
+ draw() {
+ if (game.active === DEM) {
+ game.temp = game.democrat_hand.length
+ draw_cards(game.strategy_deck, game.democrat_hand, game.communist_hand, game.democrat_hand.length + 3, game.communist_hand.length)
+ game.valid_cards = [game.democrat_hand[game.temp], game.democrat_hand[game.temp + 1], game.democrat_hand[game.temp + 2]]
+ } else {
+ game.temp = game.communist_hand.length
+ draw_cards(game.strategy_deck, game.democrat_hand, game.communist_hand, game.democrat_hand.length, game.communist_hand.length + 3)
+ game.valid_cards = [game.communist_hand[game.temp], game.communist_hand[game.temp + 1], game.communist_hand[game.temp + 2]]
+ }
+ game.temp = 0
+ game.state = 'vm_tst_3'
+ }
+}
+
+states.vm_tst_3 = {
+ inactive: 'resolve Tiananmen Square Track bonus.',
+ prompt() {
+ if (game.temp < 2) {
+ view.prompt = `Discard 2 of the drawn cards.`
+ for (let card of game.valid_cards) {
+ gen_action_card(card)
+ }
+ }
+ },
+ card(card) {
+ push_undo()
+ discard(card)
+ game.temp ++
+ if (game.temp === 2) {
+ game.valid_cards = []
+ vm_next()
+ }
+ },
+}
+
+states.vm_tst_4 = {
+ inactive: 'remove SPs',
+ prompt () {
+ if (game.vm_available_ops === 0 || game.valid_spaces.length === 0) {
+ view.prompt = 'Tiananmen Square Track award. Remove SPs: done.'
+ gen_action('done')
+ return
+ }
+ view.prompt = `Tiananmen Square Track award: remove ${pluralize(game.vm_available_ops,'SP')}.`
+
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ },
+ space(space) {
+ remove_infl(space, 'vm_available_ops')
+ if (game.vm_available_ops === 0) {
+ do_log_summary()
+ vm_next()
+ }
+ },
+ done() {
+ do_log_summary()
+ vm_next()
+ }
+}
+
+states.vm_tst_6 = {
+ inactive: 'make their free support check.',
+ prompt() {
+ view.prompt = 'Tiananmen Square Track award: you have a free 2 Ops support check.'
+ for (let space_id of game.valid_spaces) {
+ if (space_id) {
+ gen_action_space(space_id);
+ }
+ }
+ },
+ space(space) {
+ push_undo()
+ game.selected_space = space
+ if (game.active === DEM && game.persistent_events.includes(C_AUSTRIA_HUNGARY_BORDER_REOPENED) && spaces[space].country === "East_Germany") {
+ game.austria_hungary_border_reopened_tracker = true
+ }
+ game.state = 'vm_tst_6_sc'
+ },
+}
+
+states.vm_tst_6_sc = {
+ inactive: 'do support check.',
+ prompt () {
+ view.prompt = `Support check: ${spaces[game.selected_space].name_unique}. Roll a die`
+ gen_action('roll')
+ },
+ roll() {
+ clear_undo()
+ do_sc(game.selected_space)
+ game.vm_available_ops--
+ game.valid_spaces = []
+ game.state = 'vm_tst_6'
+ vm_next()
+ return
+ }
+}
+
+states.vm_tst_8 = {
+ inactive: 'use Tiananmen Square Track award.',
+ prompt() {
+ if (game.vm_event_to_do && game.vm_infl_to_do) {
+ view.prompt = 'Choose whether to play for event or operations first.'
+ gen_action('event')
+ gen_action('ops')
+ }
+ else if (!game.vm_event_to_do && game.vm_infl_to_do) {
+ view.prompt = 'Event resolved. Use card for operations.'
+ gen_action('ops')
+ }
+ else if (game.vm_event_to_do && !game.vm_infl_to_do) {
+ view.prompt = 'Operations resolved. Use card for event.'
+ gen_action('event')
+ }
+ else if (!game.vm_event_to_do && !game.vm_infl_to_do) {
+ view.prompt = 'Event and operations: done.'
+ gen_action('end_round')
+ }
+ },
+ event() {
+ push_undo()
+ log(`C${game.played_card}:`)
+ game.vm_event_to_do = false
+ game.return_state = 'vm_tst_8'
+ game.return = game.active
+ game.vm_event = game.played_card
+ goto_vm(game.vm_event)
+ },
+ ops() {
+ push_undo()
+ log('Operations')
+ game.vm_infl_to_do = false
+ game.return = game.active
+ game.return_state = 'vm_tst_8'
+ goto_vm(208)
+ },
+ end_round() {
+ push_undo()
+ game.tst_8 = true
+ end_round()
+ }
+}
+
+states.vm_tst_8_ops = {
+ inactive: 'play card for operations.',
+ prompt() {
+ view.prompt = `Play ${clean_name(cards[game.played_card].name)} for:`
+ gen_action('influence')
+ gen_action('support_check')
+ if ((game.active === DEM && game.dem_tst_attempted_this_turn === 0 ) || (game.active === COM && game.com_tst_attempted_this_turn === 0 )) {
+ gen_action('tst')
+ }
+ },
+ influence(){
+ push_undo()
+ game.vm_available_ops = cards[game.played_card].ops
+ valid_spaces_infl()
+ // If ABHR - Set AHBR tracker to true
+ if (game.persistent_events.includes(C_AUSTRIA_HUNGARY_BORDER_REOPENED)) {
+ game.austria_hungary_border_reopened_tracker = true
+ }
+ game.state = 'vm_add_infl'
+ },
+ support_check() {
+ push_undo()
+ game.vm_available_ops = 2
+ game.state = 'vm_support_check_prep'
+ },
+ tst() {
+ push_undo()
+ game.state = 'vm_tiananmen_square_attempt'
+ }
+}
+
+// ========================= POWER STRUGGLE STATES ========================
+
+states.vm_scare_tactics = {
+ inactive: 'remove a Support Point.',
+ prompt () {
+ if (game.valid_spaces.length === 0 && game.vm_available_ops > 0) {
+ view.prompt = `${clean_name(cards[this_card()].name)}: no SPs to remove.`
+ gen_action('done')
+ return
+ }
+ if (game.vm_available_ops === 0 ) {
+ view.prompt = `${clean_name(cards[this_card()].name)}. Remove SPs: done.`
+ gen_action('done')
+ return
+ }
+ view.prompt = `${clean_name(cards[this_card()].name)}: remove ${pluralize(game.vm_available_ops, 'opponent SP')}${event_prompt()}.`
+ for (let space_id of game.valid_spaces) {
+ gen_action_space(space_id);
+ }
+ },
+ space(space) {
+ push_undo()
+ remove_infl(space, 'vm_available_ops')
+ },
+ done() {
+ do_log_summary()
+ vm_next()
+ }
+}
+
+states.vm_support_surges_1 = {
+ inactive: 'draw cards.',
+ prompt() {
+ view.prompt = 'Support Surges: draw a card.'
+ gen_action('draw')
+ },
+ draw() {
+ if (game.active === DEM) {
+ draw_cards(game.power_struggle_deck, game.dem_pwr_hand, game.com_pwr_hand, game.dem_pwr_hand.length+1, game.com_pwr_hand.length)
+ game.temp = game.dem_pwr_hand[game.dem_pwr_hand.length-1]
+ } else {
+ draw_cards(game.power_struggle_deck, game.dem_pwr_hand, game.com_pwr_hand, game.dem_pwr_hand.length, game.com_pwr_hand.length+1)
+ game.temp = game.com_pwr_hand[game.com_pwr_hand.length-1]
+ }
+ game.state = 'vm_support_surges_2'
+ }
+}
+
+states.vm_support_surges_2 = {
+ inactive: 'draw cards.',
+ prompt() {
+ if (wildcards.includes(game.temp)) {
+ view.prompt = `Support Surges: you drew ${power_cards[game.temp].name}. Draw a second card.`
+ }
+ else if (elite_leaders.includes(game.temp)) {
+ view.prompt = `Support Surges: you drew an ${power_cards[game.temp].name}. Draw a second card.`
+ }
+ else if (numberless_cards.includes(game.temp)) {
+ view.prompt = `Support Surges: you drew a ${power_cards[game.temp].name}. Draw a second card.`
+ } else {
+ view.prompt = `Support Surges: you drew a ${power_cards[game.temp].name} ${power_cards[game.temp].value}. Draw a second card.`
+ }
+ gen_action('draw')
+ },
+ draw() {
+ if (game.active === DEM) {
+ draw_cards(game.power_struggle_deck, game.dem_pwr_hand, game.com_pwr_hand, game.dem_pwr_hand.length+1, game.com_pwr_hand.length)
+ game.temp = game.dem_pwr_hand[game.dem_pwr_hand.length - 1]
+ } else {
+ draw_cards(game.power_struggle_deck, game.dem_pwr_hand, game.com_pwr_hand, game.dem_pwr_hand.length, game.com_pwr_hand.length+1)
+ game.temp = game.com_pwr_hand[game.com_pwr_hand.length - 1]
+ }
+ game.state = 'vm_support_surges_3'
+ }
+}
+
+states.vm_support_surges_3 = {
+ inactive: 'draw cards.',
+ prompt() {
+ if (wildcards.includes(game.temp)) {
+ view.prompt = `Support Surges: you drew ${power_cards[game.temp].name}. Done.`
+ }
+ else if (elite_leaders.includes(game.temp)) {
+ view.prompt = `Support Surges: you drew an ${power_cards[game.temp].name}. Done.`
+ }
+ else if (numberless_cards.includes(game.temp)) {
+ view.prompt = `Support Surges: you drew a ${power_cards[game.temp].name}. Done.`
+ } else {
+ view.prompt = `Support Surges: you drew a ${power_cards[game.temp].name} ${power_cards[game.temp].value}. Done.`
+ }
+ gen_action('done')
+ },
+ done() {
+ game.phase = 0
+ delete game.temp
+ log('Drew 2 cards')
+ log('Surrenders initiative')
+ vm_next()
+ }
+}
+
+states.vm_support_falters = {
+ inactive: 'discard cards.',
+ prompt() {
+ if ((game.active === DEM && game.dem_pwr_hand.length === 0) || (game.active === COM && game.com_pwr_hand.length === 0)) {
+ view.prompt = 'Support Falters: no remaining cards to discard.'
+ gen_action('pass')
+ } else if (game.vm_available_ops > 0) {
+ view.prompt = 'Support Falters: discard a card.'
+ gen_action('discard')
+ } else {
+ view.prompt = 'Support Falters: done.'
+ gen_action('done')
+ }
+ },
+ discard() {
+ if (game.active === DEM) {discard_card(game.dem_pwr_hand)}
+ else {discard_card(game.com_pwr_hand)}
+ game.vm_available_ops --
+ },
+ pass() {
+ log_msg_gap('Takes initiative')
+ game.return = game.active
+ vm_next()
+ },
+ done() {
+ log_gap('Takes initiative')
+ game.return = game.active
+ vm_next()
+ }
+}
+
+/* =================== EVENTS ================================ */
+
+// #region GENERATED EVENT CODE
+const CODE = []
+
+CODE[1] = [ // Legacy of Martial Law*
+ [ vm_permanently_remove ],
+ [ vm_valid_spaces_country_opp, 'Poland' ],
+ [ vm_prompt, 'replace 1 Democratic SP in Poland with a Communist SP' ],
+ [ vm_legacy_of_martial_law ],
+ [ vm_valid_spaces_country_sc, 'Poland' ],
+ [ vm_prompt, 'make a Support Check in Poland' ],
+ [ vm_1_support_check ],
+ [ vm_return ],
+]
+
+CODE[2] = [ // Solidarity Legalised*
+ [ vm_solidarity_legalised ],
+ [ vm_valid_spaces_solidarity_legalised ],
+ [ vm_prompt, 'to every uncontrolled Worker and Farmer space in Poland' ],
+ [ vm_add_limited_infl, 9, 1 ],
+ [ vm_return ],
+]
+
+CODE[3] = [ // Walesa
+ [ vm_permanently_remove ],
+ [ vm_valid_spaces_country, 'Poland' ],
+ [ vm_prompt, 'any space(s) in Poland' ],
+ [ vm_add_infl_free, 4 ],
+ [ vm_valid_spaces_country_sc, 'Poland' ],
+ [ vm_prompt, 'make Support Checks in Poland' ],
+ [ vm_support_check, 2 ],
+ [ vm_return ],
+]
+
+CODE[4] = [ // Michnik
+ [ vm_permanently_remove ],
+ [ vm_valid_spaces, 'Polish Writers' ],
+ [ vm_prompt, 'the Polish Intellectuals space' ],
+ [ vm_add_x_infl, 3 ],
+ [ vm_return ],
+]
+
+CODE[5] = [ // General strike
+ [ vm_general_strike ],
+ [ vm_return ],
+]
+
+CODE[6] = [ // Brought in for Questioning
+ [ vm_if, ()=>!is_auto_resolve(C_BROUGHT_IN_FOR_QUESTIONING) ],
+ [ vm_brought_in_for_questioning ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[7] = [ // State Run Media*
+ [ vm_permanently_remove ],
+ [ vm_valid_spaces_opponent ],
+ [ vm_remove_limited_opp_infl, 4, 2 ],
+ [ vm_return ],
+]
+
+CODE[8] = [ // Prudence
+ [ vm_prudence ],
+ [ vm_return ],
+]
+
+CODE[9] = [ // The Wall*
+ [ vm_the_wall ],
+ [ vm_return ],
+]
+
+CODE[10] = [ // Cult of Personality
+ [ vm_permanently_remove ],
+ [ vm_if, ()=>!game.persistent_events.includes(THE_TYRANT_IS_GONE_OCCURRED) ],
+ [ vm_valid_spaces_country_socio_2, 'Romania', 3, 4 ],
+ [ vm_prompt, 'Worker or Farmer spaces in Romania, no more than 2 per space' ],
+ [ vm_add_limited_infl, 4, 2 ],
+ [ vm_else ],
+ [ vm_tyrant_block ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[11] = [ // Dissident arrested
+ [ vm_if, ()=>!is_auto_resolve(C_DISSIDENT_ARRESTED) ],
+ [ vm_valid_spaces_opponent_socio, 5 ],
+ [ vm_prompt, 'any Intellectuals space' ],
+ [ vm_remove_x_opp_infl, 2 ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[12] = [ // Apparatchicks
+ [ vm_permanently_remove ],
+ [ vm_valid_spaces_socio, 2 ],
+ [ vm_prompt, ' to any Bureaucratic space(s)' ],
+ [ vm_add_infl_free, 3 ],
+ [ vm_return ],
+]
+
+CODE[13] = [ // Stasi
+ [ vm_stasi ],
+ [ vm_return ],
+]
+
+CODE[14] = [ // Gorbachev Charms the West
+ [ vm_valid_spaces_opponent ],
+ [ vm_remove_opp_infl, 2 ],
+ [ vm_valid_spaces_sc ],
+ [ vm_prompt, 'select a space for the Support Check' ],
+ [ vm_1_support_check ],
+ [ vm_return ],
+]
+
+CODE[15] = [ // Honecker
+ [ vm_honecker ],
+ [ vm_return ],
+]
+
+CODE[16] = [ // Nomenklatura*
+ [ vm_permanently_remove ],
+ [ vm_nomenklatura ],
+ [ vm_return ],
+]
+
+CODE[17] = [ // Roundtable talks
+ [ vm_roundtable_talks ],
+ [ vm_return ],
+]
+
+CODE[18] = [ // Poszgay Defends the Revolution
+ [ vm_permanently_remove ],
+ [ vm_poszgay ],
+ [ vm_prompt, 'to 4 spaces in Hungary not under Democratic control' ],
+ [ vm_add_limited_infl, 4, 1 ],
+ [ vm_return ],
+]
+
+CODE[19] = [ // Papal vist
+ [ vm_permanently_remove ],
+ [ vm_valid_spaces, 'Catholic Church, Poland', 'Catholic Church, Czechoslovakia', 'Catholic Church, Hungary' ],
+ [ vm_prompt, 'any Catholic Church space' ],
+ [ vm_add_x_infl, 3 ],
+ [ vm_return ],
+]
+
+CODE[20] = [ // Deutsche Marks*
+ [ vm_permanently_remove ],
+ [ vm_if, ()=>!is_auto_resolve(C_DEUTSCHE_MARKS) ],
+ [ vm_deutsche_marks ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[21] = [ // Common European Home
+ [ vm_common_european_home ],
+ [ vm_return ],
+]
+
+CODE[22] = [ // Power Struggle - Poland
+ [ vm_power_struggle ],
+ [ vm_return ],
+]
+
+CODE[23] = [ // Power Struggle - Hungary
+ [ vm_power_struggle ],
+ [ vm_return ],
+]
+
+CODE[24] = [ // St Nicolas Church
+ [ vm_if, ()=>!check_dem_control(S_LUTHERAN_CHURCH) ],
+ [ vm_valid_spaces, 'Lutheran Church' ],
+ [ vm_prompt, 'the Lutheran Church' ],
+ [ vm_take_control_prep, 1 ],
+ [ vm_endif ],
+ [ vm_st_nicholas_church ],
+ [ vm_return ],
+]
+
+CODE[25] = [ // Perestroika
+ [ vm_perestroika ],
+ [ vm_return ],
+]
+
+CODE[26] = [ // Helsinki Final Act*
+ [ vm_helsinki_final_act ],
+ [ vm_return ],
+]
+
+CODE[27] = [ // Consumerism
+ [ vm_valid_spaces_opponent_socio, 4 ],
+ [ vm_prompt, ' from a Worker space' ],
+ [ vm_remove_opp_infl, 1 ],
+ [ vm_valid_spaces_opponent_socio, 4 ],
+ [ vm_active_country ],
+ [ vm_prompt, ()=>`make a support check in a Worker space in ${country_name(game.vm_active_country)}` ],
+ [ vm_1_support_check ],
+ [ vm_return ],
+]
+
+CODE[28] = [ // Factory Party Cells
+ [ vm_valid_spaces_opponent_socio, 4 ],
+ [ vm_prompt, ' from Worker spaces' ],
+ [ vm_remove_limited_opp_infl, 3, 2 ],
+ [ vm_return ],
+]
+
+CODE[29] = [ // Jan Palach Week*
+ [ vm_permanently_remove ],
+ [ vm_valid_spaces, 'Charles University' ],
+ [ vm_prompt, 'the Charles University space' ],
+ [ vm_add_x_infl, 6 ],
+ [ vm_return ],
+]
+
+CODE[30] = [ // Tear Gas
+ [ vm_tear_gas ],
+ [ vm_return ],
+]
+
+CODE[31] = [ // Intelligentsia
+ [ vm_valid_spaces_socio, 5 ],
+ [ vm_prompt, 'Intellectual spaces, no more than 2 per space' ],
+ [ vm_add_limited_infl, 4, 2 ],
+ [ vm_return ],
+]
+
+CODE[32] = [ // Peasant Parties*
+ [ vm_permanently_remove ],
+ [ vm_valid_spaces_socio, 3 ],
+ [ vm_prompt, 'Farmer spaces, no more than 2 per space' ],
+ [ vm_add_limited_infl, 4, 2 ],
+ [ vm_return ],
+]
+
+CODE[33] = [ // Sajudis*
+ [ vm_permanently_remove ],
+ [ vm_sajudis ],
+ [ vm_if, ()=>!is_auto_resolve(C_SAJUDIS) ],
+ [ vm_sajudis_check ],
+ [ vm_prompt, 'any Minorities space' ],
+ [ vm_take_control_prep, 1 ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[34] = [ // Fidesz*
+ [ vm_permanently_remove ],
+ [ vm_valid_spaces, 'Eotvos Lorand University' ],
+ [ vm_prompt, 'the Hungary students space' ],
+ [ vm_add_x_infl, 5 ],
+ [ vm_return ],
+]
+
+CODE[35] = [ // Heal our Bleeding Wounds*
+ [ vm_permanently_remove ],
+ [ vm_heal_our_bleeding_wounds ],
+ [ vm_return ],
+]
+
+CODE[36] = [ // Dash for the West*
+ [ vm_permanently_remove ],
+ [ vm_prompt, 'Dash for the West: select any Democratic Event with an asterix(*) from the discard pile. Event occurs immediately' ],
+ [ vm_dash_for_the_west ],
+ [ vm_return ],
+]
+
+CODE[37] = [ // Nagy Reburied*
+ [ vm_permanently_remove ],
+ [ vm_nagy_reburied ],
+ [ vm_prompt, 'the Hungary Elite space' ],
+ [ vm_remove_all_infl, 1 ],
+ [ vm_valid_spaces_country, 'Hungary' ],
+ [ vm_prompt, 'Hungary, no more than 2 per space' ],
+ [ vm_add_limited_infl, 4, 2 ],
+ [ vm_return ],
+]
+
+CODE[38] = [ // July Concept
+ [ vm_permanently_remove ],
+ [ vm_valid_spaces_country, 'Bulgaria' ],
+ [ vm_prompt, 'Bulgaria' ],
+ [ vm_add_infl_free, 3 ],
+ [ vm_return ],
+]
+
+CODE[39] = [ // Eco-Glasnost*
+ [ vm_valid_spaces, 'Ruse' ],
+ [ vm_prompt, 'Ruse' ],
+ [ vm_add_x_infl, 4 ],
+ [ vm_eco_glasnost ],
+ [ vm_return ],
+]
+
+CODE[40] = [ // Hungarian Democratic Forum
+ [ vm_permanently_remove ],
+ [ vm_valid_spaces_country, 'Hungary' ],
+ [ vm_prompt, 'Hungary' ],
+ [ vm_add_infl_free, 3 ],
+ [ vm_valid_spaces_country_sc, 'Hungary' ],
+ [ vm_prompt, 'make a Support Check in Hungary' ],
+ [ vm_1_support_check ],
+ [ vm_return ],
+]
+
+CODE[41] = [ // Ceausescu*
+ [ vm_permanently_remove ],
+ [ vm_if, ()=>game.persistent_events.includes(THE_TYRANT_IS_GONE_OCCURRED) ],
+ [ vm_tyrant_block ],
+ [ vm_else ],
+ [ vm_if, ()=>!is_auto_resolve(C_CEAUSESCU) ],
+ [ vm_valid_spaces_country_opp, 'Romania' ],
+ [ vm_prompt, ' from Romania' ],
+ [ vm_remove_opp_infl, 3 ],
+ [ vm_valid_spaces_country_sc, 'Romania' ],
+ [ vm_prompt, 'make a support check in Romania' ],
+ [ vm_1_support_check ],
+ [ vm_prompt, ' from Bucharesti' ],
+ [ vm_ceausescu ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[42] = [ // Power Struggle - East Germany
+ [ vm_power_struggle ],
+ [ vm_return ],
+]
+
+CODE[43] = [ // Power Struggle - Bulgaria
+ [ vm_power_struggle ],
+ [ vm_return ],
+]
+
+CODE[44] = [ // Inflationary Currency
+ [ vm_permanently_remove ],
+ [ vm_inflationary_currency ],
+ [ vm_valid_spaces_country_opp ],
+ [ vm_prompt, ()=>` from ${country_name(game.vm_active_country)}` ],
+ [ vm_remove_opp_infl, 2 ],
+ [ vm_inflationary_currency_discard ],
+ [ vm_if, ()=>!discarded_card() ],
+ [ vm_valid_spaces_country_sc ],
+ [ vm_prompt, ()=>`make a Support Check in ${country_name(game.vm_active_country)}` ],
+ [ vm_1_support_check ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[45] = [ // Soviet Troop Withdrawals*
+ [ vm_permanently_remove ],
+ [ vm_valid_spaces_region_opp, 'Eastern Europe' ],
+ [ vm_prompt, ' from Eastern Europe' ],
+ [ vm_remove_limited_opp_infl, 5, 2 ],
+ [ vm_return ],
+]
+
+CODE[46] = [ // Goodbye Lenin!*
+ [ vm_permanently_remove ],
+ [ vm_goodbye_lenin ],
+ [ vm_return ],
+]
+
+CODE[47] = [ // Bulgarian Turks Expelled*
+ [ vm_permanently_remove ],
+ [ vm_bulgarian_turks_expelled ],
+ [ vm_if, ()=>!is_auto_resolve(C_BULGARIAN_TURKS_EXPELLED) ],
+ [ vm_valid_spaces, 'Razgrad' ],
+ [ vm_prompt, 'Razgrad' ],
+ [ vm_remove_all_infl, 1 ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[48] = [ // We are the People!*
+ [ vm_if, ()=>!is_auto_resolve(C_WE_ARE_THE_PEOPLE) ],
+ [ vm_we_are_the_people ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[49] = [ // Foreign Currency Debt Burden*
+ [ vm_foreign_currency_debt_burden ],
+ [ vm_logi, ()=>`Communist cannot make Support Checks in ${country_name(game.foreign_currency_debt_burden)} for the rest of the turn` ],
+ [ vm_return ],
+]
+
+CODE[50] = [ // The Sinatra Doctrine*
+ [ vm_the_sinatra_doctrine ],
+ [ vm_return ],
+]
+
+CODE[51] = [ // 40th Anniversary Celebration*
+ [ vm_permanently_remove ],
+ [ vm_40th_anniversary_celebration ],
+ [ vm_valid_spaces_country, 'East_Germany' ],
+ [ vm_prompt, 'East Germany' ],
+ [ vm_add_infl_free ],
+ [ vm_40th_anniversary_celebration_vp ],
+ [ vm_return ],
+]
+
+CODE[52] = [ // Normalization
+ [ vm_permanently_remove ],
+ [ vm_if, ()=>!is_auto_resolve(C_NORMALIZATION) ],
+ [ vm_normalization ],
+ [ vm_prompt, 'the Czechoslovakia Elite and Bureaucrat Spaces' ],
+ [ vm_remove_all_infl, 2 ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[53] = [ // Li Peng*
+ [ vm_li_peng ],
+ [ vm_return ],
+]
+
+CODE[54] = [ // The Crowd Turns Against Ceausescu*
+ [ vm_the_crowd_turns_against_ceausescu ],
+ [ vm_return ],
+]
+
+CODE[55] = [ // Power Struggle - Czechoslovakia
+ [ vm_power_struggle ],
+ [ vm_return ],
+]
+
+CODE[56] = [ // Foreign Television
+ [ vm_permanently_remove ],
+ [ vm_foreign_television ],
+ [ vm_remove_limited_opp_infl, 4, 2 ],
+ [ vm_return ],
+]
+
+CODE[57] = [ // Central Committee Reshuffle*
+ [ vm_permanently_remove ],
+ [ vm_central_committee_reshuffle ],
+ [ vm_prompt, ()=>`${country_name(game.vm_active_country)}` ],
+ [ vm_add_infl_free, 3 ],
+ [ vm_return ],
+]
+
+CODE[58] = [ // Austria-Hungary Border Reopened*
+ [ vm_austria_hungary_border_reopened ],
+ [ vm_return ],
+]
+
+CODE[59] = [ // Grenztruppen*
+ [ vm_grenztruppen ],
+ [ vm_return ],
+]
+
+CODE[60] = [ // Toxic Waste*
+ [ vm_permanently_remove ],
+ [ vm_valid_spaces_socio, 4 ],
+ [ vm_prompt, 'any Worker space(s)' ],
+ [ vm_add_infl_free, 3 ],
+ [ vm_return ],
+]
+
+CODE[61] = [ // The Monday Demonstrations*
+ [ vm_permanently_remove ],
+ [ vm_the_monday_demonstrations ],
+ [ vm_prompt, 'the Lutheran Church Space and Leipzig' ],
+ [ vm_take_control_prep, 2 ],
+ [ vm_valid_spaces_country_sc, 'East_Germany' ],
+ [ vm_prompt, 'make 5 Support Checks in East Germany' ],
+ [ vm_support_check, 5 ],
+ [ vm_return ],
+]
+
+CODE[62] = [ // Yakovlev Counsels Gorbachev*
+ [ vm_yakovlev_counsels_gorbachev ],
+ [ vm_return ],
+]
+
+CODE[63] = [ // Genscher*
+ [ vm_genscher ],
+ [ vm_return ],
+]
+
+CODE[64] = [ // Legacy of 1968*
+ [ vm_permanently_remove ],
+ [ vm_legacy_of_1968 ],
+ [ vm_prompt, 'all spaces in Czechoslovakia not controlled by the Communist Player' ],
+ [ vm_add_limited_infl, 11, 1 ],
+ [ vm_return ],
+]
+
+CODE[65] = [ // Presidential Visit*
+ [ vm_presidential_visit ],
+ [ vm_return ],
+]
+
+CODE[66] = [ // New Forum
+ [ vm_permanently_remove ],
+ [ vm_valid_spaces_country, 'East_Germany' ],
+ [ vm_prompt, '3 spaces in East Germany' ],
+ [ vm_add_limited_infl, 3, 1 ],
+ [ vm_return ],
+]
+
+CODE[67] = [ // Reformer Rehabilitated*
+ [ vm_prompt, 'Reformer Rehabilitated: chose any non-scoring card in the discard pile. Event takes place immediately' ],
+ [ vm_reformer_rehabilitated ],
+ [ vm_return ],
+]
+
+CODE[68] = [ // Klaus and Komarek*
+ [ vm_permanently_remove ],
+ [ vm_klaus_and_komarek ],
+ [ vm_prompt, 'Prague' ],
+ [ vm_remove_x_opp_infl, 2 ],
+ [ vm_valid_spaces, 'Praha' ],
+ [ vm_add_x_infl, 2 ],
+ [ vm_return ],
+]
+
+CODE[69] = [ // Systematization*
+ [ vm_if, ()=>!game.persistent_events.includes(THE_TYRANT_IS_GONE_OCCURRED) ],
+ [ vm_valid_spaces_country, 'Romania' ],
+ [ vm_systematization ],
+ [ vm_else ],
+ [ vm_tyrant_block ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[70] = [ // Securitate*
+ [ vm_if, ()=>!game.persistent_events.includes(C_ARMY_BACKS_REVOLUTION) ],
+ [ vm_securitate ],
+ [ vm_else ],
+ [ vm_army_block ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[71] = [ // Kiss of Death*
+ [ vm_permanently_remove ],
+ [ vm_if, ()=>!is_auto_resolve(C_KISS_OF_DEATH) ],
+ [ vm_kiss_of_death ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[72] = [ // Peasant Parties Revolt
+ [ vm_peasant_parties_revolt ],
+ [ vm_return ],
+]
+
+CODE[73] = [ // Laszlo Tokes*
+ [ vm_valid_spaces, 'Timisoara', 'Harghita/Covasna' ],
+ [ vm_prompt, 'in Timisoara and Harghita/Covasna' ],
+ [ vm_add_limited_infl, 2, 1 ],
+ [ vm_laszlo_tokes ],
+ [ vm_if, ()=>game.phase === 3 ],
+ [ vm_prompt, ' in Romania' ],
+ [ vm_add_infl ],
+ [ vm_else ],
+ [ vm_prompt, 'make 2 Support Checks in Romania' ],
+ [ vm_support_check, 2 ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[74] = [ // FRG Embassies
+ [ vm_frg_embassies ],
+ [ vm_return ],
+]
+
+CODE[75] = [ // Exit Visas*
+ [ vm_permanently_remove ],
+ [ vm_if, ()=>!is_auto_resolve(C_EXIT_VISAS) ],
+ [ vm_exit_visas ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[76] = [ // Warsaw Pact Summit
+ [ vm_permanently_remove ],
+ [ vm_warsaw_pact_summit ],
+ [ vm_if, ()=>game.phase === 3 ],
+ [ vm_prompt, ' spaces with no Democratic SPs' ],
+ [ vm_add_infl_free, 4 ],
+ [ vm_else ],
+ [ vm_prompt, 'Select a Student or Intellectual space' ],
+ [ vm_valid_spaces_country_socio_2, 3, 4 ],
+ [ vm_support_check_modified, 2, 2 ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[77] = [ // Samizdat
+ [ vm_permanently_remove ],
+ [ vm_if, ()=>!is_auto_resolve(C_SAMIZDAT) ],
+ [ vm_samizdat ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[78] = [ // Workers Revolt
+ [ vm_workers_revolt ],
+ [ vm_return ],
+]
+
+CODE[79] = [ // The Third Way*
+ [ vm_permanently_remove ],
+ [ vm_the_third_way ],
+ [ vm_valid_spaces, 'German Writers' ],
+ [ vm_prompt, 'the East German Writers space' ],
+ [ vm_add_x_infl, 3 ],
+ [ vm_return ],
+]
+
+CODE[80] = [ // Nepotism*
+ [ vm_permanently_remove ],
+ [ vm_nepotism ],
+ [ vm_valid_spaces_region_socio, 'Balkans', 4 ],
+ [ vm_prompt, 'Worker spaces in the Balkans' ],
+ [ vm_add_infl_free ],
+ [ vm_return ],
+]
+
+CODE[81] = [ // The Baltic Way*
+ [ vm_permanently_remove ],
+ [ vm_the_baltic_way_prep ],
+ [ vm_if, ()=>!is_auto_resolve(C_THE_BALTIC_WAY) ],
+ [ vm_the_baltic_way ],
+ [ vm_prompt, 'any Minorities space' ],
+ [ vm_take_control_prep, 1 ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[82] = [ // Spitzel*
+ [ vm_permanently_remove ],
+ [ vm_if, ()=>!is_auto_resolve(C_SPITZEL) ],
+ [ vm_valid_spaces_country_opp, 'East_Germany' ],
+ [ vm_prompt, ' from East Germany' ],
+ [ vm_remove_opp_infl, 2 ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[83] = [ // Modrow*
+ [ vm_modrow ],
+ [ vm_valid_spaces_country, 'East_Germany' ],
+ [ vm_prompt, 'East Germany, no more than 2 per space' ],
+ [ vm_add_limited_infl, 4, 2 ],
+ [ vm_return ],
+]
+
+CODE[84] = [ // Breakaway Baltic Republics*
+ [ vm_permanently_remove ],
+ [ vm_breakaway_baltic_republics ],
+ [ vm_prompt, 'any Minorities space' ],
+ [ vm_take_control_prep, 1 ],
+ [ vm_valid_spaces_sc ],
+ [ vm_prompt, 'select a space for the support check' ],
+ [ vm_1_support_check ],
+ [ vm_return ],
+]
+
+CODE[85] = [ // Tank Column/Tank Man*
+ [ vm_permanently_remove ],
+ [ vm_tank_column ],
+ [ vm_return ],
+]
+
+CODE[86] = [ // The Wall Must Go!*
+ [ vm_the_wall_must_go ],
+ [ vm_remove_infl, 3 ],
+ [ vm_return ],
+]
+
+CODE[87] = [ // Kohl Proposes Reunification*
+ [ vm_permanently_remove ],
+ [ vm_kohl_proposes_reunification_prep ],
+ [ vm_if, ()=>!is_auto_resolve(C_KOHL_PROPOSES_REUNIFICATION) ],
+ [ vm_kohl_proposes_reunification ],
+ [ vm_else ],
+ [ vm_logi, ()=>`C${C_THE_WALL_MUST_GO} has not been successfully played for the event.` ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[88] = [ // Adamec*
+ [ vm_permanently_remove ],
+ [ vm_adamec ],
+ [ vm_valid_spaces_country, 'Czechoslovakia' ],
+ [ vm_prompt, 'Czechoslovakia' ],
+ [ vm_add_limited_infl, 4, 2 ],
+ [ vm_return ],
+]
+
+CODE[89] = [ // Domino Theory*
+ [ vm_permanently_remove ],
+ [ vm_if, ()=>!is_auto_resolve(C_DOMINO_THEORY) ],
+ [ vm_prompt, 'Domino Theory: choose a Power Struggle card to play from the discard pile' ],
+ [ vm_domino_theory ],
+ [ vm_else ],
+ [ vm_domino_theory_pass ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[90] = [ // Civic Forum*
+ [ vm_permanently_remove ],
+ [ vm_civic_forum_prep ],
+ [ vm_valid_spaces_country, 'Czechoslovakia' ],
+ [ vm_prompt, 'Czechoslovakia' ],
+ [ vm_add_infl_free, 4 ],
+ [ vm_civic_forum ],
+ [ vm_valid_spaces_country_sc, 'Czechoslovakia' ],
+ [ vm_prompt, 'Select a space in Czechoslovakia' ],
+ [ vm_support_check, 2 ],
+ [ vm_return ],
+]
+
+CODE[91] = [ // My First Banana*
+ [ vm_permanently_remove ],
+ [ vm_if, ()=>!is_auto_resolve(C_MY_FIRST_BANANA) ],
+ [ vm_valid_spaces_country_opp, 'East_Germany' ],
+ [ vm_prompt, ' from East Germany' ],
+ [ vm_remove_opp_infl, 2 ],
+ [ vm_valid_spaces_country_sc, 'East_Germany' ],
+ [ vm_prompt, 'select a space in East Germany' ],
+ [ vm_support_check, 2 ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[92] = [ // Betrayal
+ [ vm_permanently_remove ],
+ [ vm_if, ()=>!is_auto_resolve(C_BETRAYAL) ],
+ [ vm_prompt, 'choose any Orthodox Church space. Replace all Democratic SPs with Communist SPs' ],
+ [ vm_betrayal ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[93] = [ // Shock Therapy*
+ [ vm_permanently_remove ],
+ [ vm_shock_therapy ],
+ [ vm_valid_spaces_country ],
+ [ vm_prompt, ()=>` ${country_name(game.vm_active_country)}` ],
+ [ vm_add_infl_free, 3 ],
+ [ vm_return ],
+]
+
+CODE[94] = [ // Union of Democratic Forces*
+ [ vm_permanently_remove ],
+ [ vm_if, ()=>!is_auto_resolve(C_UNION_OF_DEMOCRATIC_FORCES) ],
+ [ vm_valid_spaces_country_opp, 'Bulgaria' ],
+ [ vm_prompt, ' from Bulgaria' ],
+ [ vm_remove_limited_opp_infl, 4, 2 ],
+ [ vm_valid_spaces_country_sc, 'Bulgaria' ],
+ [ vm_prompt, 'Make 2 Support Checks in Bulgaria' ],
+ [ vm_support_check, 2 ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[95] = [ // Power Struggle - Romania
+ [ vm_power_struggle ],
+ [ vm_return ],
+]
+
+CODE[96] = [ // The Chinese Solution*
+ [ vm_permanently_remove ],
+ [ vm_the_chinese_solution ],
+ [ vm_valid_spaces_country_sc ],
+ [ vm_prompt, ()=>`make 5 Support Checks in ${country_name(game.vm_active_country)}` ],
+ [ vm_support_check_modified, 5, 3 ],
+ [ vm_return ],
+]
+
+CODE[97] = [ // The Tyrant is Gone*
+ [ vm_if, ()=>game.persistent_events.includes(THE_CROWD_TURNS_AGAINST_CEAUSESCU_OCCURRED) ],
+ [ vm_cluj_check ],
+ [ vm_prompt, 'the Romanian Elite Space' ],
+ [ vm_remove_x_opp_infl, 4 ],
+ [ vm_the_tyrant_is_gone ],
+ [ vm_permanently_remove ],
+ [ vm_else ],
+ [ vm_the_tyrant_is_gone_prep ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[98] = [ // Politburo Intrigue*
+ [ vm_permanently_remove ],
+ [ vm_if, ()=>!is_auto_resolve(C_POLITBURO_INTRIGUE) ],
+ [ vm_valid_spaces_country_opp, 'Bulgaria' ],
+ [ vm_prompt, ' from Bulgaria' ],
+ [ vm_remove_limited_opp_infl, 3, 2 ],
+ [ vm_valid_spaces_country_sc, 'Bulgaria' ],
+ [ vm_prompt, 'make a support check in Bulgaria' ],
+ [ vm_1_support_check ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[99] = [ // Ligachev*
+ [ vm_ligachev ],
+ [ vm_return ],
+]
+
+CODE[100] = [ // Stand Fast*
+ [ vm_stand_fast ],
+ [ vm_return ],
+]
+
+CODE[101] = [ // Elena*
+ [ vm_if, ()=>!game.persistent_events.includes(THE_TYRANT_IS_GONE_OCCURRED) ],
+ [ vm_valid_spaces, 'Cluj-Napoca' ],
+ [ vm_prompt, 'the Romania Elite Space' ],
+ [ vm_add_x_infl, 2 ],
+ [ vm_elena ],
+ [ vm_else ],
+ [ vm_tyrant_block ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[102] = [ // National Salvation Front*
+ [ vm_national_salvation_front ],
+ [ vm_return ],
+]
+
+CODE[103] = [ // Government Resigns*
+ [ vm_permanently_remove ],
+ [ vm_if, ()=>!is_auto_resolve(C_GOVERNMENT_RESIGNS) ],
+ [ vm_government_resigns ],
+ [ vm_prompt, 'any uncontrolled Elite space' ],
+ [ vm_remove_all_infl, 1 ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[104] = [ // New Year's Eve Party*
+ [ vm_new_years_eve_party ],
+ [ vm_return ],
+]
+
+CODE[105] = [ // Public Against Violence*
+ [ vm_permanently_remove ],
+ [ vm_valid_spaces, 'Kosice' ],
+ [ vm_prompt, 'Kosice' ],
+ [ vm_add_x_infl, 2 ],
+ [ vm_valid_spaces, 'Presov' ],
+ [ vm_prompt, 'Presov' ],
+ [ vm_add_x_infl, 2 ],
+ [ vm_public_against_violence ],
+ [ vm_prompt, 'Make a Support Check in Bratislava' ],
+ [ vm_support_check_modified, 1, 2 ],
+ [ vm_return ],
+]
+
+CODE[106] = [ // Social Democratic Platform Adopted*
+ [ vm_permanently_remove ],
+ [ vm_social_democratic_platform_adopted ],
+ [ vm_valid_spaces_country ],
+ [ vm_prompt, ()=>`${country_name(game.vm_active_country)}` ],
+ [ vm_add_infl_free, 2 ],
+ [ vm_valid_spaces_country_sc ],
+ [ vm_prompt, ()=>`make a Support Check in ${country_name(game.vm_active_country)}` ],
+ [ vm_1_support_check ],
+ [ vm_return ],
+]
+
+CODE[107] = [ // Massacre in Timisoara*
+ [ vm_permanently_remove ],
+ [ vm_if, ()=>!game.persistent_events.includes(THE_TYRANT_IS_GONE_OCCURRED) ],
+ [ vm_massacre_in_timisoara ],
+ [ vm_valid_spaces_country_sc, 'Romania' ],
+ [ vm_prompt, 'Make Support Checks in Romania' ],
+ [ vm_support_check_modified, 2, 2 ],
+ [ vm_else ],
+ [ vm_tyrant_block ],
+ [ vm_endif ],
+ [ vm_return ],
+]
+
+CODE[108] = [ // Army Backs Revolution*
+ [ vm_army_backs_revolution ],
+ [ vm_return ],
+]
+
+CODE[109] = [ // Kremlin Coup*
+ [ vm_permanently_remove ],
+ [ vm_kremlin_coup ],
+ [ vm_return ],
+]
+
+CODE[110] = [ // Malta Summit*
+ [ vm_permanently_remove ],
+ [ vm_malta_summit ],
+ [ vm_prompt, ' from Elite spaces' ],
+ [ vm_remove_opp_infl, 5 ],
+ [ vm_return ],
+]
+
+CODE[203] = [ // Tiananmen Square space 3 award
+ [ vm_tst_3 ],
+ [ vm_return ],
+]
+
+CODE[204] = [ // Tiananmen Square space 4 award
+ [ vm_valid_spaces_opponent ],
+ [ vm_tst_4 ],
+ [ vm_return ],
+]
+
+CODE[206] = [ // Tiananmen Square space 6
+ [ vm_valid_spaces_sc ],
+ [ vm_tst_6 ],
+ [ vm_return ],
+]
+
+CODE[208] = [ // Tiananmen Square space 8 event
+ [ vm_tst_8 ],
+ [ vm_return ],
+]
+
+CODE[349] = [ // Support Falters
+ [ vm_support_falters ],
+ [ vm_return ],
+]
+
+CODE[350] = [ // Support Surges
+ [ vm_support_surges ],
+ [ vm_return ],
+]
+
+CODE[351] = [ // Scare Tactics
+ [ vm_scare_tactics ],
+ [ vm_valid_spaces_country_opp ],
+ [ vm_prompt, ()=>` from ${country_name(game.vm_active_country)}` ],
+ [ vm_remove_opp_infl, 1 ],
+ [ vm_return ],
+]
+// #endregion
diff --git a/server.code-workspace b/server.code-workspace
new file mode 100644
index 0000000..449c3b1
--- /dev/null
+++ b/server.code-workspace
@@ -0,0 +1,10 @@
+{
+ "folders": [
+ {
+ "path": "."
+ },
+ {
+ "path": "../.."
+ }
+ ]
+} \ No newline at end of file
diff --git a/thumbnail.png b/thumbnail.png
index b61c39a..28c5fc4 100644
--- a/thumbnail.png
+++ b/thumbnail.png
Binary files differ
diff --git a/tools/colors.js b/tools/colors.js
new file mode 100644
index 0000000..f8f7ace
--- /dev/null
+++ b/tools/colors.js
@@ -0,0 +1,110 @@
+"use strict"
+
+function rgb_from_any(color) {
+ switch (color.mode) {
+ case "rgb": return color
+ case "lrgb": return rgb_from_lrgb(color)
+ case "oklab": return rgb_from_oklab(color)
+ }
+}
+
+function lrgb_from_any(color) {
+ switch (color.mode) {
+ case "rgb": return lrgb_from_rgb(color)
+ case "lrgb": return color
+ case "oklab": return lrgb_from_oklab(color)
+ }
+}
+
+function oklab_from_any(color) {
+ switch (color.mode) {
+ case "rgb": return oklab_from_rgb(color)
+ case "lrgb": return oklab_from_lrgb(color)
+ case "oklab": return color
+ }
+}
+
+function format_hex(color) {
+ let {r, g, b} = rgb_from_any(color)
+ let adj = 1
+ r = Math.round(Math.max(0, Math.min(1, r)) * 255)
+ g = Math.round(Math.max(0, Math.min(1, g)) * 255)
+ b = Math.round(Math.max(0, Math.min(1, b)) * 255)
+ let x = (r << 16) | (g << 8) | b
+ return "#" + x.toString(16).padStart(6, "0")
+}
+
+function parse_hex(str) {
+ let x = parseInt(str.substring(1), 16)
+ return {
+ mode: "rgb",
+ r: ((x >> 16) & 255) / 255.0,
+ g: ((x >> 8) & 255) / 255.0,
+ b: ((x) & 255) / 255.0
+ }
+}
+
+function lrgb_from_rgb({ r, g, b }) {
+ function to_linear(c) {
+ let ac = Math.abs(c)
+ if (ac < 0.04045)
+ return c / 12.92
+ return (Math.sign(c) || 1) * Math.pow((ac + 0.055) / 1.055, 2.4)
+ }
+ return {
+ mode: "lrgb",
+ r: to_linear(r),
+ g: to_linear(g),
+ b: to_linear(b)
+ }
+}
+
+function rgb_from_lrgb({ r, g, b }) {
+ function from_linear(c) {
+ let ac = Math.abs(c)
+ if (ac > 0.0031308)
+ return (Math.sign(c) || 1) * (1.055 * Math.pow(ac, 1 / 2.4) - 0.055)
+ return c * 12.92
+ }
+ return {
+ mode: "rgb",
+ r: from_linear(r),
+ g: from_linear(g),
+ b: from_linear(b)
+ }
+}
+
+function oklab_from_lrgb({ r, g, b }) {
+ let L = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b)
+ let M = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b)
+ let S = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b)
+ return {
+ mode: "oklab",
+ l: 0.2104542553 * L + 0.793617785 * M - 0.0040720468 * S,
+ a: 1.9779984951 * L - 2.428592205 * M + 0.4505937099 * S,
+ b: 0.0259040371 * L + 0.7827717662 * M - 0.808675766 * S
+ }
+}
+
+function lrgb_from_oklab({ l, a, b }) {
+ let L = Math.pow(l + 0.3963377774 * a + 0.2158037573 * b, 3)
+ let M = Math.pow(l - 0.1055613458 * a - 0.0638541728 * b, 3)
+ let S = Math.pow(l - 0.0894841775 * a - 1.291485548 * b, 3)
+ return {
+ mode: "lrgb",
+ r: +4.0767416621 * L - 3.3077115913 * M + 0.2309699292 * S,
+ g: -1.2684380046 * L + 2.6097574011 * M - 0.3413193965 * S,
+ b: -0.0041960863 * L - 0.7034186147 * M + 1.707614701 * S
+ }
+}
+
+function oklab_from_rgb(rgb) {
+ return oklab_from_lrgb(lrgb_from_rgb(rgb))
+}
+
+function rgb_from_oklab(oklab) {
+ return rgb_from_lrgb(lrgb_from_oklab(oklab))
+}
+
+if (typeof module === "object")
+ module.exports = { format_hex, parse_hex, rgb_from_any, lrgb_from_any, oklab_from_any }
diff --git a/gencode.js b/tools/gencode.js
index 6e66a02..a46823f 100644
--- a/gencode.js
+++ b/tools/gencode.js
@@ -64,7 +64,6 @@ function emit(line) {
console.log("\t[ " + line.join(", ") + " ],")
}
-console.log("// #region GENERATED EVENT CODE")
console.log("const CODE = []")
let first = false
@@ -104,4 +103,3 @@ for (let line of fs.readFileSync("events.txt", "utf-8").split("\n")) {
emit(["return"])
console.log("]")
-console.log("// #endregion") \ No newline at end of file
diff --git a/tools/gencolors.js b/tools/gencolors.js
new file mode 100644
index 0000000..cff0fe2
--- /dev/null
+++ b/tools/gencolors.js
@@ -0,0 +1,78 @@
+const { parse_hex, format_hex, lrgb_from_any, rgb_from_any, oklab_from_any } = require("./colors.js")
+
+const white = "#ffffff"
+const black = "#000000"
+
+function lerp(a, b, n) {
+ return a + (b - a) * n
+}
+
+function blend(a, b, n) {
+ a = lrgb_from_any(parse_hex(a))
+ b = lrgb_from_any(parse_hex(b))
+ return format_hex({
+ mode: "lrgb",
+ r: lerp(a.r, b.r, n),
+ g: lerp(a.g, b.g, n),
+ b: lerp(a.b, b.b, n)
+ })
+}
+
+function multiply_luminance(hex, m) {
+ let oklab = oklab_from_any(parse_hex(hex))
+ oklab.l = Math.max(0, Math.min(1, oklab.l * m))
+ return format_hex(oklab)
+}
+
+function add_luminance(hex, m) {
+ let oklab = oklab_from_any(parse_hex(hex))
+ oklab.l = Math.max(0, Math.min(1, oklab.l + m))
+ return format_hex(oklab)
+}
+
+function make_3d_colors(base) {
+ return [
+ base,
+ multiply_luminance(base, 0.9),
+ multiply_luminance(base, 0.8),
+ multiply_luminance(base, 0.7),
+ multiply_luminance(base, 0.4)
+ ]
+}
+
+function make_2d_colors(base) {
+ return [
+ base,
+ multiply_luminance(base, 1.2),
+ multiply_luminance(base, 0.8),
+ multiply_luminance(base, 0.4)
+ ]
+}
+
+function make_2d_colors_add(base) {
+ return [
+ base,
+ add_luminance(base, 0.2),
+ add_luminance(base, -0.2),
+ add_luminance(base, -0.5),
+ ]
+}
+
+function print(x) {
+ console.log(x)
+}
+
+function gencss(color, sel) {
+ let [ bg, hi, lo, sh ] = make_2d_colors(color)
+ print(`${sel} { background-color: ${color}; border-color: ${hi} ${lo} ${lo} ${hi}; box-shadow: 0 0 0 1px ${sh}, 1px 2px 4px #0008; }`)
+}
+
+gencss("#bbbbbb", ".marker")
+gencss("#c4e2f6", ".demInfl.ctl")
+gencss("#c1272d", ".comInfl.ctl")
+gencss("#147fc0", "#marker_action_round.dem")
+gencss("#c1272d", "#marker_action_round.com")
+gencss("#fadb04", "#marker_vp, #marker_turn")
+gencss("#f26649", "#marker_com_tst")
+gencss("#c4e2f4", "#marker_dem_tst")
+
diff --git a/tools/genconst.js b/tools/genconst.js
new file mode 100644
index 0000000..a2b9235
--- /dev/null
+++ b/tools/genconst.js
@@ -0,0 +1,25 @@
+const data = require("../data.js")
+
+function clean_name(s) {
+ return s.toUpperCase()
+ .replace(" - ", "_")
+ .replace(/[ /-]/g, "_")
+ .replace(/[!,*"'.]/g, "")
+}
+
+console.log("")
+
+console.log("// SPACES")
+for (let s of data.spaces) {
+ console.log("const S_" + clean_name(s.ascii_name) + " = " + s.space_id)
+}
+
+console.log("")
+
+console.log("// CARDS")
+for (let c of data.cards) {
+ if (c)
+ console.log("const C_" + clean_name(c.name) + " = " + c.number)
+}
+
+console.log("")
diff --git a/tools/genlayout.js b/tools/genlayout.js
new file mode 100644
index 0000000..37f419d
--- /dev/null
+++ b/tools/genlayout.js
@@ -0,0 +1,37 @@
+const fs = require("fs")
+
+let boxes = []
+let mode, name, x, y, w, h
+
+function flush() {
+ if (mode === 'rect') {
+ boxes[name] = [ x |0, y |0, w |0, h |0 ]
+ }
+ x = y = w = h = 0
+ name = null
+}
+
+for (let line of fs.readFileSync("tools/layout.svg", "utf-8").split("\n")) {
+ line = line.trim()
+ if (line.startsWith("<rect")) {
+ flush()
+ mode = "rect"
+ x = y = w = h = 0
+ } else if (line.startsWith('x="'))
+ x = Math.round(Number(line.split('"')[1]))
+ else if (line.startsWith('y="'))
+ y = Math.round(Number(line.split('"')[1]))
+ else if (line.startsWith('width="'))
+ w = Math.round(Number(line.split('"')[1]))
+ else if (line.startsWith('height="'))
+ h = Math.round(Number(line.split('"')[1]))
+ else if (line.startsWith('inkscape:label="'))
+ name = line.split('"')[1]
+}
+
+flush()
+
+console.log("var LAYOUT = {")
+for (let key of Object.keys(boxes).sort())
+ console.log("\t\"" + key + "\": " + JSON.stringify(boxes[key]) + ",")
+console.log("}")
diff --git a/tools/layout.svg b/tools/layout.svg
new file mode 100644
index 0000000..36c6045
--- /dev/null
+++ b/tools/layout.svg
@@ -0,0 +1,920 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1650"
+ height="2550"
+ version="1.1"
+ id="svg6"
+ sodipodi:docname="layout.svg"
+ inkscape:version="1.0.2 (e86c870879, 2021-01-15)">
+ <metadata
+ id="metadata12">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs10" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="640"
+ inkscape:window-height="480"
+ id="namedview8"
+ showgrid="false"
+ inkscape:zoom="1"
+ inkscape:cx="1183.328"
+ inkscape:cy="683.50131"
+ inkscape:current-layer="svg6"
+ inkscape:snap-grids="true"
+ inkscape:document-rotation="0">
+ <inkscape:grid
+ type="xygrid"
+ id="grid14" />
+ </sodipodi:namedview>
+ <image
+ sodipodi:absref="/home/tor/src/rally/public/1989-dawn-of-freedom/map75.png"
+ xlink:href="../map75.png"
+ style="display:inline;opacity:1"
+ id="image2"
+ sodipodi:insensitive="true"
+ image-rendering="pixelated"
+ height="2550"
+ width="1650"
+ y="0"
+ x="0" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect16"
+ width="127"
+ height="76"
+ x="148"
+ y="86"
+ inkscape:label="Schwerin" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect18"
+ width="127"
+ height="76"
+ x="299"
+ y="53"
+ inkscape:label="Rostock" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect22"
+ width="127"
+ height="75"
+ x="329"
+ y="148"
+ inkscape:label="Berlin" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect26"
+ width="127"
+ height="76"
+ x="81"
+ y="239"
+ inkscape:label="German Writers" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect28"
+ width="127"
+ height="76"
+ x="234"
+ y="240"
+ inkscape:label="Walter Ulbricht Academy" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect30"
+ width="127"
+ height="76"
+ x="391"
+ y="271"
+ inkscape:label="Lutheran Church" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect32"
+ width="127"
+ height="75"
+ x="574"
+ y="263"
+ inkscape:label="Szczecin" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect36"
+ width="127"
+ height="76"
+ x="896"
+ y="277"
+ inkscape:label="Gdansk" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect38"
+ width="127"
+ height="75"
+ x="79"
+ y="352"
+ inkscape:label="Magdeburg" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect40"
+ width="127"
+ height="75"
+ x="231"
+ y="357"
+ inkscape:label="Halle" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect42"
+ width="127"
+ height="76"
+ x="38"
+ y="455"
+ inkscape:label="Erfurt" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect44"
+ width="127"
+ height="75"
+ x="184"
+ y="492"
+ inkscape:label="Karl-Marx-Stadt" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect46"
+ width="127"
+ height="76"
+ x="343"
+ y="479"
+ inkscape:label="Dresden" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect48"
+ width="127"
+ height="76"
+ x="211"
+ y="615"
+ inkscape:label="Plzen" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect50"
+ width="128"
+ height="76"
+ x="491"
+ y="677"
+ inkscape:label="Charles University" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect54"
+ width="127"
+ height="75"
+ x="595"
+ y="565"
+ inkscape:label="Wroclaw" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect56"
+ width="127"
+ height="75"
+ x="802"
+ y="558"
+ inkscape:label="Catholic Church, Poland" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect58"
+ width="127"
+ height="76"
+ x="959"
+ y="620"
+ inkscape:label="Lodz" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect60"
+ width="127"
+ height="75"
+ x="1032"
+ y="490"
+ inkscape:label="Warszawa" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect62"
+ width="127"
+ height="76"
+ x="671"
+ y="452"
+ inkscape:label="Poznan" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect67"
+ width="127"
+ height="76"
+ x="872"
+ y="388"
+ inkscape:label="Bydgoszcz" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect71"
+ width="127"
+ height="76"
+ x="1202"
+ y="436"
+ inkscape:label="Bialystok" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect75"
+ width="127"
+ height="77"
+ x="260"
+ y="765"
+ inkscape:label="Ceske Budejovice" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect77"
+ width="127"
+ height="75"
+ x="412"
+ y="782"
+ inkscape:label="Praha" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect79"
+ width="127"
+ height="76"
+ x="573"
+ y="773"
+ inkscape:label="Czech Writers" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect81"
+ width="127"
+ height="76"
+ x="733"
+ y="723"
+ inkscape:label="Katowice" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect83"
+ width="127"
+ height="76"
+ x="911"
+ y="761"
+ inkscape:label="Krakow" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect85"
+ width="127"
+ height="76"
+ x="1124"
+ y="754"
+ inkscape:label="Lublin" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect87"
+ width="127"
+ height="76"
+ x="870"
+ y="867"
+ inkscape:label="Jagiellonian University" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect89"
+ width="127"
+ height="75"
+ x="1051"
+ y="883"
+ inkscape:label="Polish Writers" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect91"
+ width="127"
+ height="75"
+ x="673"
+ y="868"
+ inkscape:label="Ostrava" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect97"
+ width="127"
+ height="76"
+ x="521"
+ y="904"
+ inkscape:label="Brno" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect99"
+ width="127"
+ height="76"
+ x="539"
+ y="1013"
+ inkscape:label="Bratislava" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect101"
+ width="127"
+ height="75"
+ x="692"
+ y="1010"
+ inkscape:label="Catholic Church, Czechoslovakia" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect103"
+ width="127"
+ height="75"
+ x="844"
+ y="1010"
+ inkscape:label="Presov" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect105"
+ width="127"
+ height="76"
+ x="995"
+ y="1037"
+ inkscape:label="Kosice" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect109"
+ width="127"
+ height="76"
+ x="409"
+ y="1126"
+ inkscape:label="Catholic Church, Hungary" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect111"
+ width="127"
+ height="76"
+ x="560"
+ y="1129"
+ inkscape:label="Gyor" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect113"
+ width="127"
+ height="75"
+ x="706"
+ y="1126"
+ inkscape:label="Tatabanya" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect115"
+ width="127"
+ height="76"
+ x="851"
+ y="1146"
+ inkscape:label="Miskolc" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect117"
+ width="127"
+ height="76"
+ x="1000"
+ y="1192"
+ inkscape:label="Debrecen" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect119"
+ width="127"
+ height="76"
+ x="410"
+ y="1224"
+ inkscape:label="Szombathely" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect121"
+ width="127"
+ height="75"
+ x="571"
+ y="1223"
+ inkscape:label="Szekesfehervar" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect123"
+ width="127"
+ height="76"
+ x="809"
+ y="1249"
+ inkscape:label="Budapest" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect129"
+ width="127"
+ height="76"
+ x="812"
+ y="1364"
+ inkscape:label="Szeged" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect131"
+ width="127"
+ height="76"
+ x="658"
+ y="1314"
+ inkscape:label="Eotvos Lorand University" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect133"
+ width="127"
+ height="76"
+ x="452"
+ y="1322"
+ inkscape:label="Hungarian Writers" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect135"
+ width="127"
+ height="75"
+ x="626"
+ y="1406"
+ inkscape:label="Pecs" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect137"
+ width="127"
+ height="76"
+ x="1369"
+ y="1395"
+ inkscape:label="Iasi" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect139"
+ width="127"
+ height="76"
+ x="1169"
+ y="1443"
+ inkscape:label="Targu Mures" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect141"
+ width="127"
+ height="76"
+ x="970"
+ y="1429"
+ inkscape:label="Cluj-Napoca" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect143"
+ width="127"
+ height="76"
+ x="767"
+ y="1531"
+ inkscape:label="Timisoara" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect145"
+ width="127"
+ height="75"
+ x="947"
+ y="1625"
+ inkscape:label="Romanian Writers" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect147"
+ width="127"
+ height="75"
+ x="958"
+ y="1529"
+ inkscape:label="Babes-Bolyai University" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect149"
+ width="127"
+ height="75"
+ x="1186"
+ y="1560"
+ inkscape:label="Harghita/Covasna" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect151"
+ width="127"
+ height="75"
+ x="1339"
+ y="1556"
+ inkscape:label="Brasov" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect153"
+ width="127"
+ height="76"
+ x="1356"
+ y="1671"
+ inkscape:label="Ploiesti" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect155"
+ width="127"
+ height="76"
+ x="1409"
+ y="1778"
+ inkscape:label="Galati" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect157"
+ width="127"
+ height="76"
+ x="1186"
+ y="1837"
+ inkscape:label="Bucuresti" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect159"
+ width="127"
+ height="76"
+ x="977"
+ y="1793"
+ inkscape:label="Craiova" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect161"
+ width="127"
+ height="76"
+ x="1094"
+ y="1700"
+ inkscape:label="Orthodox Church, Romania" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect163"
+ width="127"
+ height="76"
+ x="387"
+ y="379"
+ inkscape:label="Leipzig" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect165"
+ width="127"
+ height="76"
+ x="979"
+ y="1948"
+ inkscape:label="Pleven" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect167"
+ width="127"
+ height="76"
+ x="1130"
+ y="1956"
+ inkscape:label="Orthodox Church, Bulgaria" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect169"
+ width="127"
+ height="76"
+ x="1277"
+ y="1956"
+ inkscape:label="Ruse" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect171"
+ width="127"
+ height="76"
+ x="1443"
+ y="1925"
+ inkscape:label="Constanta" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect175"
+ width="127"
+ height="76"
+ x="828"
+ y="2095"
+ inkscape:label="Sofia University" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect177"
+ width="127"
+ height="76"
+ x="983"
+ y="2098"
+ inkscape:label="Sofia" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect179"
+ width="127"
+ height="75"
+ x="1133"
+ y="2153"
+ inkscape:label="Stara Zagora" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect181"
+ width="127"
+ height="76"
+ x="1289"
+ y="2152"
+ inkscape:label="Burgas" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect183"
+ width="127"
+ height="76"
+ x="1219"
+ y="2057"
+ inkscape:label="Razgrad" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect185"
+ width="127"
+ height="76"
+ x="1387"
+ y="2051"
+ inkscape:label="Varna" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect187"
+ width="127"
+ height="75"
+ x="1144"
+ y="2251"
+ inkscape:label="Sliven" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect189"
+ width="127"
+ height="75"
+ x="987"
+ y="2209"
+ inkscape:label="Plovdiv" />
+ <rect
+ style="display:inline;fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect191"
+ width="127"
+ height="76"
+ x="838"
+ y="2192"
+ inkscape:label="Bulgarian Writers" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect207"
+ width="48"
+ height="48"
+ x="1381"
+ y="1080"
+ inkscape:label="ussr_1" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect209"
+ width="48"
+ height="48"
+ x="1381"
+ y="1134"
+ inkscape:label="ussr_2" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect211"
+ width="48"
+ height="48"
+ x="1381"
+ y="1188"
+ inkscape:label="ussr_3" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect213"
+ width="48"
+ height="48"
+ x="1381"
+ y="1243"
+ inkscape:label="ussr_4" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect215"
+ width="48"
+ height="48"
+ x="1381"
+ y="1297"
+ inkscape:label="ussr_5" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect217"
+ width="47"
+ height="47"
+ x="53"
+ y="2128"
+ inkscape:label="tst_dem_1" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect229"
+ width="47"
+ height="47"
+ x="469"
+ y="2128"
+ inkscape:label="tst_dem_7" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect231"
+ width="47"
+ height="47"
+ x="556"
+ y="2128"
+ inkscape:label="tst_dem_8" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect236"
+ width="47"
+ height="47"
+ x="53"
+ y="2257"
+ inkscape:label="tst_com_1" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect248"
+ width="47"
+ height="47"
+ x="469"
+ y="2257"
+ inkscape:label="tst_com_7" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect250"
+ width="47"
+ height="47"
+ x="556"
+ y="2257"
+ inkscape:label="tst_com_8" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect252"
+ width="55"
+ height="51"
+ x="215"
+ y="2395"
+ inkscape:label="vp_neg_20" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect254"
+ width="55"
+ height="50"
+ x="246"
+ y="2456"
+ inkscape:label="vp_neg_19" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect256"
+ width="55"
+ height="51"
+ x="843"
+ y="2425"
+ inkscape:label="vp_0" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect258"
+ width="55"
+ height="50"
+ x="883"
+ y="2395"
+ inkscape:label="vp_1" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect260"
+ width="55"
+ height="50"
+ x="1440"
+ y="2395"
+ inkscape:label="vp_19" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect262"
+ width="55"
+ height="51"
+ x="1471"
+ y="2455"
+ inkscape:label="vp_20" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect264"
+ width="56"
+ height="51"
+ x="913"
+ y="2455"
+ inkscape:label="vp_2" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect266"
+ width="56"
+ height="51"
+ x="803"
+ y="2455"
+ inkscape:label="vp_neg_1" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect268"
+ width="56"
+ height="51"
+ x="772"
+ y="2395"
+ inkscape:label="vp_neg_2" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect24"
+ width="40"
+ height="41"
+ x="222"
+ y="179"
+ inkscape:label="event_the_wall" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect34"
+ width="44"
+ height="43"
+ x="779"
+ y="270"
+ inkscape:label="event_solidarity_legalized" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect193"
+ width="47"
+ height="48"
+ x="655"
+ y="81"
+ inkscape:label="turn_1" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect195"
+ width="48"
+ height="44"
+ x="708"
+ y="143"
+ inkscape:label="action_1" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect203"
+ width="48"
+ height="48"
+ x="1133"
+ y="80"
+ inkscape:label="turn_10" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect205"
+ width="47"
+ height="43"
+ x="1080"
+ y="143"
+ inkscape:label="action_8" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect52"
+ width="44"
+ height="39"
+ x="463"
+ y="624"
+ inkscape:label="country_czechoslovakia" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect69"
+ width="44"
+ height="39"
+ x="1188"
+ y="292"
+ inkscape:label="country_poland" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect73"
+ width="43"
+ height="37"
+ x="560"
+ y="160"
+ inkscape:label="country_east_germany" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect125"
+ width="44"
+ height="39"
+ x="1034"
+ y="1319"
+ inkscape:label="country_hungary" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect127"
+ width="44"
+ height="39"
+ x="1287"
+ y="1349"
+ inkscape:label="country_romania" />
+ <rect
+ style="fill:#00fff2;fill-opacity:0.566802;stroke-width:0.355276"
+ id="rect173"
+ width="46"
+ height="41"
+ x="915"
+ y="1999"
+ inkscape:label="country_bulgaria" />
+</svg>