summaryrefslogtreecommitdiff
path: root/events.txt
blob: 454572a807b89ba913a6ce8f8791b74cfb04f543 (plain)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
# TODO: has_available_piece and can_stack_piece helpers for place/replace/move space/piece loops
# TODO: can_place_available(s, faction, type)

# TODO: disallow picking spaces with no effect (must remove if able)

EVENT 1
	log "1 Civic Action space each Support Phase requires Govt Control and any cube."
	capability

SHADED 1
	log "Civic Action requires at least 2 Troops and 2 Police."
	shaded_capability

EVENT 2
	log "Sweep costs 1 Resource per space."
	capability

SHADED 2
	log "Sweep Operations may target only 1 space per card."
	shaded_capability

EVENT 3
	log "Assault costs 1 Resource per space."
	capability

SHADED 3
	log "Assault Operations may target only 1 space per card."
	shaded_capability

EVENT 4
	prompt "Select unsabotaged pipelines."
	space 3 is_unsabotaged_pipeline(s)
		auto_resources GOVT (2*data.spaces[game.vm.s].econ)
	endspace

SHADED 4
	prompt "Sabotage the 3 pipelines with highest value and no cubes."
	space 3 is_highest_value_pipeline_without_cubes(s)
		sabotage
	endspace

EVENT 5
	prompt "Place Police onto Pipelines."
	space 1 is_pipeline(s)
		auto_place GOVT POLICE
		mark_space
	endspace
	space 1 is_pipeline(s)
		auto_place GOVT POLICE
		mark_space
	endspace
	space 1 is_pipeline(s)
		auto_place GOVT POLICE
		mark_space
	endspace
	space 1 is_pipeline(s)
		auto_place GOVT POLICE
		mark_space
	endspace
	space 1 is_pipeline(s)
		auto_place GOVT POLICE
		mark_space
	endspace
	space 1 is_pipeline(s)
		auto_place GOVT POLICE
		mark_space
	endspace
	prompt "Flip N Guerrillas there or adjacent to Active."
	piece 3 is_any_guerrilla(p) && is_underground(p) && is_with_or_adjacent_to_mark(s, game.vm.m)
		activate
	endpiece

SHADED 5
	prompt "Shift space adjacent to a 3-Econ LoC by 2 levels toward Active Opposition."
	space 1 is_adjacent_to_3econ_loc(s)
		shift_opposition
		shift_opposition
	endspace

EVENT 6
	prompt "Select Opposition or Neutral Departments adjacent to Sabotage."
	space 2 (!is_support(s) && is_adjacent_to_support(s))
		set_passive_support
	endspace

SHADED 6
	prompt "Sabotage a pipeline."
	space 1 is_pipeline(s)
		sabotage
	endspace
	prompt "Shift an Adjacent Department."
	space 1 is_pop(s) && is_dept(s) && is_adjacent(s, game.vm.s)
		shift_opposition
	endspace

EVENT 7
	log "Each Sabotage phase, Govt may remove 1-3 Terror or Sabotage."
	capability

SHADED 7
	log "Sabotage phase - Sabotage LoCs with any Guerrillas equal to cubes."
	shaded_capability

EVENT 8
	current GOVT
	free_air_strike
	free_air_strike
	free_air_strike

SHADED 8
	resources GOVT -9

EVENT 9
	log "Assault treats Mountain as City."
	capability

SHADED 9
	log "Assault in Mountain removes only 1 piece for 4 Troops."
	shaded_capability

EVENT 10
	log "Air Lift moves any number of Troops."
	capability

SHADED 10
	log "Air Lift moves only 1 Troops cube."
	shaded_capability

EVENT 11
	log "1 Police may enter each Sweep space."
	capability

SHADED 11
	log "Operation Activates Guerrillas via Troops or Police, not both."
	shaded_capability

EVENT 12
	resources GOVT (Math.min(game.aid,20))
	aid 10

SHADED 12
	log "No Air Strike or Activation by Patrlo until next Propaganda."
	momentum

EVENT 13
	log "Patrol conducts a free Assault in each LoC."
	capability

SHADED 13
	log "Patrols do not conduct a free Assault."
	shaded_capability

EVENT 14
	current GOVT
	space 1 is_dept(s) && !is_farc_zone(s)
		auto_place GOVT BASE
		auto_place GOVT TROOPS
		auto_place GOVT TROOPS
		auto_place GOVT TROOPS
	endspace

SHADED 14
	space 1 is_dept(s)
		piece 1 is_piece_in_event_space(p) && is_govt_base(p)
			remove
		endpiece
		piece 1 is_piece_in_event_space(p) && (is_troops(p) || is_police(p))
			remove
		endpiece
	endspace

EVENT 15
	roll
	resources GOVT (game.vm.die*4)

SHADED 15
	space 1 is_city() && (is_neutral(s) || is_passive_support(s))
		set_passive_opposition
	endspace

EVENT 16
	prompt "Select each Mountain Department."
	space 0 is_mountain(s)
		auto_resources (faction_with_most_pieces(game.vm.s)) 5
	endspace

SHADED 16
	resources GOVT -10

EVENT 17
	resources GOVT (Math.min(game.aid,20))
	aid 6

SHADED 17
	log "No Sweep or Assault in Depts until next Propaganda."
	momentum

EVENT 18
	resources GOVT (Math.min(game.aid,20))
	aid 20

SHADED 18
	resources GOVT -6
	roll
	aid (-game.vm.die)

EVENT 19
	if game.current === GOVT
		# TODO: can_sweep || can_assault
		space 0 has_cube(s) && has_enemy_piece(s)
			free_sweep_assault
		endspace
	else
		# TODO: can_attack || can_terror
		space 0 has_piece(s, game.current, GUERRILLA)
			free_attack_terror
		endspace
	endif

EVENT 20
	current GOVT
	piece_undo_opt 6 is_farc_guerrilla(p)
		space_no_undo 1 is_adjacent(s, piece_space(game.vm.p))
			move
		endspace
	endpiece

SHADED 20
	current FARC
	free_march
	piece_undo_opt 3 is_farc_guerrilla(p) && is_active(p)
		underground
	endpiece

EVENT 21
	resources FARC -6
	piece_undo 1 is_farc_base(p)
		remove
	endpiece

SHADED 21
	resources FARC 6
	space 1 (is_city(s) || is_dept(s)) && can_stack_base(s)
		auto_place FARC BASE
	endspace

EVENT 22
	space 1 is_opposition(s)
		set_neutral
	endspace

SHADED 22
	log "May Agitate also in up to 3 spaces with FARC piece and no Govt Control."
	momentum

EVENT 23
	space 1 is_dept(s)
		piece 0 is_piece_in_event_space(p) && is_any_guerrilla(p) && is_underground(p)
			activate
		endpiece
		piece 0 is_piece_in_event_space(p) && is_cartels_base(p)
			remove
		endpiece
	endspace

SHADED 23
	current GOVT
	piece_undo 3 is_troops(p)
		remove
	endpiece
	ineligible GOVT
	ineligible FARC

EVENT 24
	space 1 is_city(s)
		set_active_support
	endspace
	ineligible FARC

SHADED 24
	space 1 has_farc_piece(s)
		piece 2 is_piece_in_event_space(p) && is_troops(p)
			remove
		endpiece
	endspace
	space 1 is_city(s) && is_support(s)
		set_neutral
	endspace

EVENT 25
	space 1 is_mountain(s)
		piece 0 is_piece_in_event_space(p) && is_farc_piece(p)
			remove
		endpiece
	endspace

SHADED 25
	space 1 s === ANTIOQUIA || (is_dept(s) && is_adjacent(ANTIOQUIA, s))
		place FARC [BASE,GUERRILLA]
		place FARC [BASE,GUERRILLA]
		place FARC [BASE,GUERRILLA]
	endspace

EVENT 26
	current CARTELS
	space 0 has_cartels_guerrilla(s) && has_farc_piece(s)
		free_attack
	endspace

SHADED 26
	prompt "Transfer 6 Resources from Cartels to FARC for each space with CB and FG."
	space 0 has_cartels_base(s) && has_farc_guerrilla(s)
		transfer CARTELS FARC 6
	endspace

EVENT 27
	current GOVT
	free_govt_special_activity
	free_govt_special_activity
	free_govt_special_activity

SHADED 27
	log "Until next Propaganda, no Govt Special Activities where Guerrilla."
	momentum

EVENT 28
	space 1 is_next_to_venezuela(s)
		piece_opt 3 is_piece_in_event_space(p) && is_insurgent_piece(p)
			remove
		endpiece
	endspace

SHADED 28
	space 1 is_dept(s) && is_next_to_venezuela(s) && can_stack_base(s)
		auto_place FARC BASE
	endspace
	space 0 is_loc(s) && is_adjacent(CUCUTA, s) && is_empty(s)
		sabotage
	endspace

EVENT 29
	current GOVT
	space 1 has_farc_piece(s) && has_govt_piece(s)
		piece 0 is_piece_in_event_space(p) && is_farc_guerrilla(p) && is_underground(p)
			activate
		endpiece
		free_assault
	endspace

SHADED 29
	current [FARC,AUC]
	piece_undo 2 is_piece(p, game.current, GUERRILLA) && has_enemy_piece(s)
		free_ambush
		underground
	endpiece

EVENT 30
	space 1 is_farc_zone(s)
		remove_farc_zone
		piece 1 is_piece_in_event_space(p) && is_farc_base(p)
			remove
		endpiece
	endspace

SHADED 30
	current GOVT
	place_farc_zone

EVENT 31
	space 2 is_city(s)
		shift_support
	endspace
	space 1 is_dept(s)
		shift_support
	endspace

SHADED 31
	space 3 is_passive_opposition(s)
		set_active_opposition
	endspace

EVENT 32
	space 2 is_neutral(s) || is_passive_opposition(s)
		set_passive_support
	endspace

SHADED 32
	resources FARC 12

EVENT 33
	space 1 is_next_to_ecuador(s)
		piece_opt 3 is_piece_in_event_space(p) && is_insurgent_piece(p)
			remove
		endpiece
	endspace

SHADED 33
	capability
	space 1 s === ECUADOR
		place (game.current) [BASE,GUERRILLA,TROOPS,POLICE]
		place (game.current) [BASE,GUERRILLA,TROOPS,POLICE]
	endspace

EVENT 34
	# -1 = all insurgent factions
	resources -1 -5

SHADED 34
	current [FARC,AUC,CARTELS]
	space 1 is_zero_pop_dept(s)
		auto_place (game.current) GUERRILLA
		auto_place (game.current) GUERRILLA
		auto_place (game.current) BASE
	endspace

EVENT 35
	space 1 is_dept(s)
		piece 0 is_piece_in_event_space(p) && is_cartels_base(p)
			remove
			auto_place GOVT POLICE
		endpiece
	endspace
	aid 3

SHADED 35
	space 1 is_dept(s) && has_cartels_base(s)
		shift_opposition
		shift_opposition
	endspace

EVENT 36
	eligible (game.current)
	asm game.vm.m = game.current
	current GOVT
	place_farc_zone
	asm game.current = game.vm.m
	prompt "Shift adjacent spaces toward Active Support."
	space 2 is_pop(s) && !is_active_support(s) && is_adjacent(game.vm.farc_zone, s)
		shift_support
	endspace

EVENT 37
	current GOVT
	space 0 has_cube(s) && has_farc_piece(s)
		free_sweep_assault_farc
	endspace

SHADED 37
	current AUC
	free_march
	space 1 set_has(game.vm.m, s) && has_underground_guerrilla(s, AUC)
		piece 1 is_piece_in_event_space(p) && is_auc_guerrilla(p) && is_underground(p)
			free_ambush
		endpiece
	endspace

EVENT 38
	space_opt 3 (has_cube(s) || is_support(s)) && has_active_guerrilla(s, AUC)
		piece 0 is_piece_in_event_space(p) && is_active_guerrilla(p, AUC)
			remove
		endpiece
	endspace

SHADED 38
	space 0 has_cube(s) || is_support(s)
		piece 0 is_piece_in_event_space(p) && is_active_guerrilla(p, AUC)
			underground
		endpiece
	endspace

EVENT 39
	prompt "Place Police into each of 6 Departments."
	# TODO: can_place
	space 6 is_dept(s) && !is_farc_zone(s)
		auto_place GOVT POLICE
	endspace

SHADED 39
	# UPTO
	prompt "In up to 3 Depts, replace 1 Police with AUC Guerrilla."
	space_opt 3 is_dept(s) && has_police(s)
		piece 1 is_piece_in_event_space(p) && is_police(p)
			remove
			auto_place AUC GUERRILLA
		endpiece
	endspace

EVENT 40
	prompt "Replace 3 AUC Guerrillas with Police."
	piece_undo 3 is_auc_guerrilla(p)
		set_piece_space
		remove
		auto_place GOVT POLICE
	endpiece

SHADED 40
	space 1 is_dept(s) && has_auc_piece(s) && has_cube(s)
		prompt "Move all cubes to any Cities."
		piece_no_undo 0 is_piece_in_event_space(p) && is_cube(p)
			save_space
			space_no_undo 1 is_city(s)
				move
			endspace
			restore_space
		endpiece
	endspace
	prompt "Place AUC pieces in Cities."
	space 2 is_city(s)
		place AUC [BASE,GUERRILLA]
	endspace

EVENT 41
	resources AUC -6
	space 1 has_auc_piece(s)
		piece 0 is_piece_in_event_space(p) && is_auc_piece(p)
			remove
		endpiece
	endspace

SHADED 41
	prompt "Select each space with AUC and Cartels pieces."
	space 0 has_auc_piece(s) && has_cartels_piece(s)
		auto_resources AUC 3
	endspace

EVENT 42
	space 2 is_neutral(s)
		set_passive_support
	endspace
	resources GOVT 3

SHADED 42
	log (`No Sweep or Assault against ${faction_name[game.current]} until next Propaganda.`)
	asm game.senado = game.current
	momentum

EVENT 43
	space 1 is_dept(s) && has_troops(s)
		terror
		terror
		piece 0 is_piece_in_event_space(p) && is_farc_base(p)
			remove
		endpiece
	endspace

SHADED 43
	space 1 is_dept(s) && has_troops(s)
		terror
		terror
	endspace
	aid -9

EVENT 44
	space 1 is_city(s) && !is_opposition(s)
		set_active_support
	endspace
	resources GOVT 3

SHADED 44
	space 1 is_city(s) && is_support(s)
		set_neutral
	endspace
	resources GOVT -3

EVENT 45
	space 0 has_cube(s) && has_terror(s)
		shift_support
	endspace

SHADED 45
	prompt "Select each space with AUC pieces."
	space 0 has_auc_piece(s)
		aid -1
	endspace
	roll
	resources GOVT (-game.vm.die)

EVENT 46
	current [FARC,AUC,CARTELS]
	prompt "Execute free Terror with any Guerrilla."
	space 1 has_piece(s, game.current, GUERRILLA)
		piece 1 is_piece_in_event_space(p) && is_piece(p, game.current, GUERRILLA)
			free_terror
			terror
			terror_aid_cut
		endpiece
		prompt "Remove enemy pieces."
		piece 2 is_piece_in_event_space(p) && is_enemy_piece(p)
			remove
		endpiece
		if is_pop(game.vm.s)
			set_passive_support_or_passive_opposition
		endif
	endspace

EVENT 47
	piece 0 is_auc_guerrilla(p) && is_underground(p)
		activate
	endpiece
	space 0 has_police(s) && has_auc_piece(s)
		free_assault_auc
	endpiece

SHADED 47
	current AUC
	set_space CUCUTA
	prompt "Place AUC Guerrillas in Cúcuta."
	space 1 s === CUCUTA
		auto_place AUC GUERRILLA
		auto_place AUC GUERRILLA
		prompt "Execute free Terror in Cúcuta."
		piece 1 is_piece_in_event_space(p) && is_auc_guerrilla(p) && is_underground(p)
			free_terror
			terror_aid_cut
		endpiece
	endspace
	prompt "Flip any AUC Guerrillas Underground."
	piece 2 is_auc_guerrilla(p) && is_active(p)
		underground
	endpiece

EVENT 48
	prompt "Remove Opposition or FARC Base adjacent to 3-Econ pipeline."
	select_space_or_piece (s)=>(is_opposition(s)&&is_adjacent_to_3econ_pipeline(s)) (p,s)=>(is_farc_base(p)&&is_adjacent_to_3econ_pipeline(s))
	if game.vm.p >= 0
		remove
	endif
	if game.vm.s >= 0
		shift_support
	endif

SHADED 48
	space 2 s !== BOGOTA && is_city(s)
		shift_opposition
	endspace

EVENT 49
	remove_permanently AUC GUERRILLA
	remove_permanently AUC GUERRILLA
	remove_permanently AUC GUERRILLA

SHADED 49
	space 1 is_dept(s)
		auto_place AUC GUERRILLA
		auto_place AUC BASE
	endspace

EVENT 50
	# UPTO
	current GOVT
	space 1 is_dept(s) && !is_farc_zone(s)
		auto_place GOVT POLICE
	endspace
	space_opt 1 is_dept(s) && !is_farc_zone(s)
		auto_place GOVT POLICE
	endspace
	space_opt 1 is_dept(s) && !is_farc_zone(s)
		auto_place GOVT POLICE
	endspace

SHADED 50
	# TODO: remove 2 / replace 2 / remove 1 + replace 1 ?
	piece 2 is_police(p)
		set_piece_space
		remove
		place_opt AUC GUERRILLA
	endpiece

EVENT 51
	if is_any_pipeline_sabotaged()
		prompt "Remove all Pipeline Sabotage."
		space 0 is_pipeline(s) && has_sabotage(s)
			remove_sabotage
		endspace
		return
	endif
	resources GOVT 12

SHADED 51
	prompt "Sabotage Pipelines with or adjacent to FARC Guerrillas."
	space 3 is_pipeline(s) && is_with_or_adjacent_to_farc_guerrilla(s)
		sabotage
	endspace

EVENT 52
	space 2 is_city(s) || is_mountain(s)
		shift_support
	endspace

SHADED 52
	space 1 has_auc_piece(s) && can_stack_base(s)
		auto_place AUC BASE
	endspace
	resources AUC (count_pieces_on_map(AUC,BASE))

EVENT 53
	current [FARC,AUC,CARTELS]
	prompt "Select Departments to move Guerrillas between."
	space 2 is_dept(s)
		mark_space
	endspace
	prompt "Move Guerrillas between Departments."
	piece 2 is_any_guerrilla(p) && (s === game.vm.m[0] || s === game.vm.m[1])
		if piece_space(game.vm.p) === game.vm.m[0]
			set_space (game.vm.m[1])
		else
			set_space (game.vm.m[0])
		endif
		move
		underground
	endpiece

EVENT 54
	# UPTO
	piece_opt 2 is_any_guerrilla(p)
		set_piece_space
		remove
		if piece_faction(game.vm.p) === FARC
			place_opt [AUC,CARTELS] GUERRILLA
		endif
		if piece_faction(game.vm.p) === AUC
			place_opt [FARC,CARTELS] GUERRILLA
		endif
		if piece_faction(game.vm.p) === CARTELS
			place_opt [FARC,AUC] GUERRILLA
		endif
	endpiece

EVENT 55
	shipment 2 true
		remove_shipment
	endpiece
	prompt "Remove N Cartels Guerrillas."
	piece 5 is_cartels_guerrilla(p)
		remove
	endpiece
	aid 3

SHADED 55
	prompt "Shift N spaces with Cartels pieces 1 level toward Active Opposition."
	space 3 has_cartels_piece(s) && !is_active_opposition(s)
		shift_opposition
	endspace

EVENT 56
	transfer CARTELS GOVT 15

SHADED 56
	piece 0 is_cartels_piece(p) && is_city(s)
		auto_resources CARTELS 2
	endpiece
	space 2 is_city(s) && can_stack_base(s)
		auto_place CARTELS BASE
	endspace

EVENT 57
	prompt "Replace Cartels pieces with Police."
	piece_opt 3 is_cartels_piece(p)
		set_piece_space
		remove
		auto_place GOVT POLICE
	endpiece

SHADED 57
	prompt "In 2 spaces replace 1 Police with any Cartels piece."
	space 2 has_police(s)
		piece 1 is_piece_in_event_space(p) && is_police(p)
			remove
			place CARTELS [BASE,GUERRILLA]
		endpiece
	endspace

EVENT 58
	resources CARTELS -6
	piece 0 is_cartels_guerrilla(p)
		remove
	endpiece

SHADED 58
	current CARTELS
	prompt "Relocate up to 4 Police to any spaces."
	piece_opt 4 is_police(p)
		space 1 is_space(s)
			move
		endspace
	endpiece

EVENT 59
	current GOVT
	piece 0 is_cartels_guerrilla(p) && is_underground(p)
		activate
	endpiece
	space 0 can_assault(s, CARTELS)
		free_assault_cartels
	endspace

SHADED 59
	current CARTELS
	prompt "Flip all Cartels Guerrillas underground."
	piece 0 is_cartels_guerrilla(p) && is_active(p)
		underground
	endpiece
	prompt "Relocate Cartels Guerrillas anywhere."
	piece_opt 3 is_cartels_guerrilla(p)
		space 1 is_space(s)
			move
		endspace
	endpiece

EVENT 60
	space 2 has_cartels_piece(s) && ((is_city(s) && (game.vm.ss.length === 0 || is_city(game.vm.ss[0]))) || (is_dept(s) && game.vm.ss.length === 0))
		piece 0 is_piece_in_event_space(p) && is_cartels_piece(p)
			remove
		endpiece
	endspace
	resources GOVT 6

SHADED 60
	current CARTELS
	space 2 is_city(s) && can_stack_base(s)
		auto_place CARTELS BASE
	endspace
	# TODO: can_bribe
	space 1 is_space(s)
		free_bribe
	endspace

EVENT 61
	space 1 is_city(s)
		piece 0 is_piece_in_event_space(p) && is_cartels_piece(p)
			remove
		endpiece
	endspace
	resources CARTELS -6

SHADED 61
	space 3 !has_cartels_piece(s) && can_stack_base(s)
		auto_place CARTELS BASE
	endspace

EVENT 62
	piece_opt 3 is_insurgent_piece(p) && is_zero_pop_forest(s)
		remove
	endpiece

SHADED 62
	space 3 s === GUAINIA || s === VAUPES || s === AMAZONAS
		auto_place CARTELS BASE
	endspace

EVENT 63
	current CARTELS
	space 0 has_cartels_guerrilla(s)
		piece 0 is_piece_in_event_space(p) && is_cartels_guerrilla(p) && count_pieces(s, CARTELS, GUERRILLA) > 1
			remove
		endpiece
		piece 1 is_piece_in_event_space(p) && is_cartels_guerrilla(p)
			free_terror
		endpiece
	endspace
	terror_aid_cut
	ineligible CARTELS

EVENT 64
	prompt "Place Shipments with FARC Guerrillas."
	piece 2 is_farc_guerrilla(p) && has_cartels_base(s) && has_available_shipment()
		place_shipment
	endpiece

SHADED 64
	prompt "Select each Cartels Base in a City."
	piece 0 is_cartels_base(p) && is_city(s)
		auto_resources CARTELS 2
	endpiece
	prompt "Select each Cartels Base in a Dept."
	piece 0 is_cartels_base(p) && is_dept(s)
		auto_resources CARTELS 1
	endpiece

EVENT 65
	space 1 is_mountain(s)
		place_or_remove_shipment
		place_or_remove_insurgent_base
	endspace

EVENT 66
	piece 3 is_cartels_base(p) && is_forest(s)
		remove
	endpiece

SHADED 66
	space 0 is_forest(s) && has_cartels_base(s) && can_stack_base(s)
		auto_place CARTELS BASE
	endspace

EVENT 67
	resources CARTELS -20

SHADED 67
	log "This Resources phase, Cartels add Resources equal to 4 x Bases."
	momentum

EVENT 68
	prompt "Remove 2 Cartels pieces or up to 2 Shipments in coastal spaces."
	select_shipment_or_cartels_piece_in_coastal_space
	if game.vm.p >= 0
		remove
		piece 1 is_coastal_space(s) && is_cartels_piece(p)
			remove
		endpiece
	endif
	if game.vm.sh >= 0
		remove_shipment
		shipment_opt 1 is_coastal_space(s)
			remove_shipment
		endshipment
	endif

SHADED 68
	prompt "Select each Cartels piece in coastal spaces."
	piece 0 is_cartels_piece(p) && is_coastal_space(s)
		auto_resources CARTELS 2
	endpiece

EVENT 69
	prompt "Select source space."
	if game.current === GOVT
		space 1 has_cube(s)
			mark_space
		endspace
	else
		space 1 has_piece(s, game.current, GUERRILLA)
			mark_space
		endspace
	endif
	prompt "Select destination space."
	if game.current === GOVT
		space 1 (s !== game.vm.m[0]) && !is_farc_zone(s) && is_within_adjacent_depts(s, game.vm.m[0], 3)
			prompt "Move cubes to destination."
			piece_opt 0 (s === game.vm.m[0]) && is_cube(p)
				move
			endpiece
			# TODO: free sweep move or only flip?
			free_train_sweep_assault
		endspace
	else
		space 1 (s !== game.vm.m[0]) && is_within_adjacent_depts(s, game.vm.m[0], 3)
			prompt "Move Guerrillas to destination."
			piece_opt 0 console.log("CHECK",p,s) || ((s === game.vm.m[0]) && is_piece(p, game.current, GUERRILLA))
				move
			endpiece
			free_rally_attack_terror
		endspace
	endif

EVENT 70
	prompt "Select each Forest without Guerrillas."
	space_no_undo 0 is_forest(s) && !has_any_guerrilla(s)
		auto_resources GOVT 6
	endspace

SHADED 70
	current [FARC,AUC,CARTELS]
	space 0 is_forest(s) && has_piece(s, game.current, GUERRILLA)
		piece 1 is_piece_in_event_space(p) && is_piece(p, game.current, GUERRILLA)
			free_terror
			auto_resources (game.current) 3
		endpiece
	endspace
	terror_aid_cut

EVENT 71
	prompt "Remove a Guerrilla from Chocó."
	set_space CHOCO
	piece 1 is_any_guerrilla(p) && s === CHOCO
		remove
		resources (piece_faction(game.vm.p)) -5
	endpiece

SHADED 71
	capability
	space 1 s === PANAMA
		place (game.current) BASE
		place_opt (game.current) BASE
	endspace

EVENT 72
	space 2 has_cartels_guerrilla(s)
		piece 0 is_piece_in_event_space(p) && is_cartels_guerrilla(p)
			remove
			place [FARC,AUC] GUERRILLA
		endpiece
	endspace

SHADED 72
	prompt "Place all available Cartels Guerrillas into spaces with Cartels Bases."
	if count_pieces_on_map(CARTELS, BASE) > 0
		while has_piece(AVAILABLE, CARTELS, GUERRILLA)
			space 1 has_cartels_base(s)
				auto_place CARTELS GUERRILLA
			endspace
		endwhile
	endif