summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--events.txt55
-rw-r--r--rules.js30
2 files changed, 65 insertions, 20 deletions
diff --git a/events.txt b/events.txt
index 9a695b5..f4414bc 100644
--- a/events.txt
+++ b/events.txt
@@ -7,12 +7,14 @@
# Notes on difficult events:
#
-# 5.1.3 - must place/remove multiple pieces base if able
-# 14, shaded 14, shaded 34, shaded 49
-# 30 remove farc zone and remove farc base
-# 43 place terror and remove farc base
-# 65 (place or remove shipment) and (place or remove insurgent base)
-# TODO: shaded 24 (2 troops)
+# 5.1.3 - must do max possible
+# event 14, shaded 14, shaded 34, shaded 49 - place base and N troops/guerrillas
+# shaded 24 - remove 2 troops
+# event 30 - remove farc zone and remove farc base
+# event 43 - place terror and remove farc base
+# event 65 - (place or remove shipment) and (place or remove insurgent base)
+# shaded 50 - remove/replace 2 police (TODO)
+# event 54 - remove/replace 2 guerrillas (TODO)
#
# Replace pieces - may only remove when unable to place available piece (check stacking if piece is available)
# 35, shaded 39, 40, shaded 50, 54, 57, shaded 57, 72
@@ -153,8 +155,8 @@ SHADED 13
EVENT 14
current GOVT
- prompt "Place 1 Base and 3 Troops into any Department."
# 5.1.3 - place base if possible!
+ prompt "Place 1 Base and 3 Troops into any Department."
space 1 is_dept(s) && can_place_piece(s, GOVT, BASE)
auto_place GOVT BASE
auto_place GOVT TROOPS
@@ -162,6 +164,7 @@ EVENT 14
auto_place GOVT TROOPS
return
endspace
+ prompt "Place 1 Base and 3 Troops into any Department."
space 1 is_dept(s) && can_stack_any(s, GOVT)
auto_place GOVT BASE
auto_place GOVT TROOPS
@@ -170,8 +173,8 @@ EVENT 14
endspace
SHADED 14
- prompt "Remove 1 Government Base and 1 cube from a Department."
# 5.1.3 - remove both base and cube if possible
+ prompt "Remove 1 Government Base and 1 cube from a Department."
space 1 is_dept(s) && ( has_govt_base(s) && has_cube(s) )
prompt "Remove 1 Government Base."
piece 1 is_piece_in_event_space(p) && is_govt_base(p)
@@ -183,6 +186,7 @@ SHADED 14
endpiece
return
endspace
+ prompt "Remove 1 Government Base and 1 cube from a Department."
space 1 is_dept(s) && ( has_govt_base(s) || has_cube(s) )
prompt "Remove 1 Government Base."
piece 1 is_piece_in_event_space(p) && is_govt_base(p)
@@ -192,7 +196,6 @@ SHADED 14
piece 1 is_piece_in_event_space(p) && is_cube(p)
remove
endpiece
- return
endspace
EVENT 15
@@ -316,8 +319,22 @@ EVENT 24
ineligible FARC
SHADED 24
+ # 5.1.3 - 2 troops priority
+ prompt "Remove 2 Troops from a space with FARC pieces."
+ space 1 has_farc_piece(s) && count_pieces(s, GOVT, TROOPS) >= 2
+ prompt "Remove 2 Troops."
+ piece 2 is_piece_in_event_space(p) && is_troops(p)
+ remove
+ endpiece
+ save_space
+ prompt "Shift a City with Support to Neutral."
+ space 1 is_city(s) && is_support(s)
+ set_neutral
+ endspace
+ restore_space
+ return
+ endspace
prompt "Remove 2 Troops from a space with FARC pieces."
- # TODO: 5.1.3 - 2 troops priority
space 1 has_farc_piece(s) && has_troops(s)
prompt "Remove 2 Troops."
piece 2 is_piece_in_event_space(p) && is_troops(p)
@@ -329,6 +346,7 @@ SHADED 24
set_neutral
endspace
+
EVENT 25
prompt "Remove all FARC pieces from 1 Mountain."
space 1 is_mountain(s) && has_faction_piece(s, FARC)
@@ -415,8 +433,8 @@ SHADED 29
endspace
EVENT 30
- prompt "Remove 1 FARC Zone and 1 FARC Base there."
# 5.1.3 - remove both farc zone and farc base if possible
+ prompt "Remove 1 FARC Zone and 1 FARC Base there."
space 1 is_farc_zone(s) && has_farc_base(s)
remove_farc_zone
prompt "Remove 1 FARC Base."
@@ -425,6 +443,7 @@ EVENT 30
endpiece
return
endspace
+ prompt "Remove 1 FARC Zone and 1 FARC Base there."
space 1 is_farc_zone(s)
remove_farc_zone
endspace
@@ -488,14 +507,15 @@ EVENT 34
SHADED 34
current FARC_AUC_CARTELS
- prompt "Place 2 Guerrillas and 1 Base into a 0 Population Department."
# 5.1.3 - place base if possible
+ prompt "Place 2 Guerrillas and 1 Base into a 0 Population Department."
space 1 is_zero_pop_dept(s) && can_place_piece(s, game.current, BASE)
auto_place (game.current) BASE
auto_place (game.current) GUERRILLA
auto_place (game.current) GUERRILLA
return
endspace
+ prompt "Place 2 Guerrillas and 1 Base into a 0 Population Department."
space 1 is_zero_pop_dept(s) && can_stack_any(s, game.current)
auto_place (game.current) BASE
auto_place (game.current) GUERRILLA
@@ -639,8 +659,8 @@ SHADED 42
momentum MOM_SENADO_CAMARA
EVENT 43
- prompt "Place 2 Terror and remove all FARC Bases from a Department with Troops."
# 5.1.3 - farc bases if possible
+ prompt "Place 2 Terror and remove all FARC Bases from a Department with Troops."
space 1 is_dept(s) && has_troops(s) && has_farc_base(s)
terror
terror
@@ -650,6 +670,7 @@ EVENT 43
endpiece
return
endspace
+ prompt "Place 2 Terror and remove all FARC Bases from a Department with Troops."
space 1 is_dept(s) && has_troops(s)
terror
terror
@@ -765,13 +786,14 @@ EVENT 49
remove_permanently AUC GUERRILLA
SHADED 49
- prompt "Place an AUC Guerrilla and Base in any Department."
# 5.1.3 - place base if possible
+ prompt "Place an AUC Guerrilla and Base in any Department."
space 1 is_dept(s) && can_place_piece(s, AUC, BASE)
auto_place AUC BASE
auto_place AUC GUERRILLA
return
endspace
+ prompt "Place an AUC Guerrilla and Base in any Department."
space 1 is_dept(s) && can_stack_any(s, AUC)
auto_place AUC BASE
auto_place AUC GUERRILLA
@@ -790,6 +812,7 @@ EVENT 50
SHADED 50
# Note: strictly remove or replace (see event 54)
+ # TODO: 5.1.3 - spaces with 2 police first!
prompt "Remove any 2 Police or replace them with available AUC Guerrillas."
piece_undo 1 is_police(p)
set_piece_space
@@ -879,6 +902,7 @@ EVENT 53
EVENT 54
# Note: strictly remove or replace (see shaded 50)
+ # TODO: 5.1.3 - spaces with 2 guerrillas first!
prompt "Remove up to 2 Guerrillas or replace them with with another Faction's Guerrillas."
piece_undo 1 is_any_guerrilla(p)
set_piece_space
@@ -1082,13 +1106,14 @@ SHADED 64
endpiece
EVENT 65
- prompt "Place or remove 1 Shipment and Insurgent Base in any Mountain Department."
# 5.1.3 - do both shipment and base if possible
+ prompt "Place or remove 1 Shipment and Insurgent Base in any Mountain Department."
space 1 is_mountain(s) && ( can_place_or_remove_shipment(s) && can_place_or_remove_insurgent_base(s) )
place_or_remove_shipment
place_or_remove_insurgent_base
return
endspace
+ prompt "Place or remove 1 Shipment and Insurgent Base in any Mountain Department."
space 1 is_mountain(s) && ( can_place_or_remove_shipment(s) || can_place_or_remove_insurgent_base(s) )
place_or_remove_shipment
place_or_remove_insurgent_base
diff --git a/rules.js b/rules.js
index b762d96..e031c4d 100644
--- a/rules.js
+++ b/rules.js
@@ -307,8 +307,8 @@ exports.setup = function (seed, scenario, options) {
game.deck.push(i)
}
-// game.deck[0] =
-// /* TEST */ 36
+ game.deck[0] =
+ /* TEST */ 24
log("DECK " + game.deck.join(", "))
update_control()
@@ -7430,6 +7430,7 @@ const CODE = [
[ vm_auto_place, false, 0, GOVT, TROOPS ],
[ vm_return ],
[ vm_endspace ],
+ [ vm_prompt, "Place 1 Base and 3 Troops into any Department." ],
[ vm_space, true, 1, 1, (s)=>is_dept(s) && can_stack_any(s, GOVT) ],
[ vm_auto_place, false, 0, GOVT, BASE ],
[ vm_auto_place, false, 0, GOVT, TROOPS ],
@@ -7450,6 +7451,7 @@ const CODE = [
[ vm_endpiece ],
[ vm_return ],
[ vm_endspace ],
+ [ vm_prompt, "Remove 1 Government Base and 1 cube from a Department." ],
[ vm_space, true, 1, 1, (s)=>is_dept(s) && ( has_govt_base(s) || has_cube(s) ) ],
[ vm_prompt, "Remove 1 Government Base." ],
[ vm_piece, false, 1, 1, (p,s)=>is_piece_in_event_space(p) && is_govt_base(p) ],
@@ -7459,7 +7461,6 @@ const CODE = [
[ vm_piece, false, 1, 1, (p,s)=>is_piece_in_event_space(p) && is_cube(p) ],
[ vm_remove ],
[ vm_endpiece ],
- [ vm_return ],
[ vm_endspace ],
[ vm_return ],
// EVENT 15
@@ -7584,6 +7585,20 @@ const CODE = [
[ vm_return ],
// SHADED 24
[ vm_prompt, "Remove 2 Troops from a space with FARC pieces." ],
+ [ vm_space, true, 1, 1, (s)=>has_farc_piece(s) && count_pieces(s, GOVT, TROOPS) >= 2 ],
+ [ vm_prompt, "Remove 2 Troops." ],
+ [ vm_piece, false, 2, 2, (p,s)=>is_piece_in_event_space(p) && is_troops(p) ],
+ [ vm_remove ],
+ [ vm_endpiece ],
+ [ vm_save_space ],
+ [ vm_prompt, "Shift a City with Support to Neutral." ],
+ [ vm_space, true, 1, 1, (s)=>is_city(s) && is_support(s) ],
+ [ vm_set_neutral ],
+ [ vm_endspace ],
+ [ vm_restore_space ],
+ [ vm_return ],
+ [ vm_endspace ],
+ [ vm_prompt, "Remove 2 Troops from a space with FARC pieces." ],
[ vm_space, true, 1, 1, (s)=>has_farc_piece(s) && has_troops(s) ],
[ vm_prompt, "Remove 2 Troops." ],
[ vm_piece, false, 2, 2, (p,s)=>is_piece_in_event_space(p) && is_troops(p) ],
@@ -7687,6 +7702,7 @@ const CODE = [
[ vm_endpiece ],
[ vm_return ],
[ vm_endspace ],
+ [ vm_prompt, "Remove 1 FARC Zone and 1 FARC Base there." ],
[ vm_space, true, 1, 1, (s)=>is_farc_zone(s) ],
[ vm_remove_farc_zone ],
[ vm_endspace ],
@@ -7754,6 +7770,7 @@ const CODE = [
[ vm_auto_place, false, 0, ()=>(game.current), GUERRILLA ],
[ vm_return ],
[ vm_endspace ],
+ [ vm_prompt, "Place 2 Guerrillas and 1 Base into a 0 Population Department." ],
[ vm_space, true, 1, 1, (s)=>is_zero_pop_dept(s) && can_stack_any(s, game.current) ],
[ vm_auto_place, false, 0, ()=>(game.current), BASE ],
[ vm_auto_place, false, 0, ()=>(game.current), GUERRILLA ],
@@ -7907,6 +7924,7 @@ const CODE = [
[ vm_endpiece ],
[ vm_return ],
[ vm_endspace ],
+ [ vm_prompt, "Place 2 Terror and remove all FARC Bases from a Department with Troops." ],
[ vm_space, true, 1, 1, (s)=>is_dept(s) && has_troops(s) ],
[ vm_terror ],
[ vm_terror ],
@@ -8026,6 +8044,7 @@ const CODE = [
[ vm_auto_place, false, 0, AUC, GUERRILLA ],
[ vm_return ],
[ vm_endspace ],
+ [ vm_prompt, "Place an AUC Guerrilla and Base in any Department." ],
[ vm_space, true, 1, 1, (s)=>is_dept(s) && can_stack_any(s, AUC) ],
[ vm_auto_place, false, 0, AUC, BASE ],
[ vm_auto_place, false, 0, AUC, GUERRILLA ],
@@ -8337,6 +8356,7 @@ const CODE = [
[ vm_place_or_remove_insurgent_base ],
[ vm_return ],
[ vm_endspace ],
+ [ vm_prompt, "Place or remove 1 Shipment and Insurgent Base in any Mountain Department." ],
[ vm_space, true, 1, 1, (s)=>is_mountain(s) && ( can_place_or_remove_shipment(s) || can_place_or_remove_insurgent_base(s) ) ],
[ vm_place_or_remove_shipment ],
[ vm_place_or_remove_insurgent_base ],
@@ -8475,5 +8495,5 @@ const CODE = [
[ vm_endif ],
[ vm_return ],
]
-const UCODE = [0,1,7,13,19,29,47,62,68,75,81,87,93,99,105,145,153,160,166,173,185,201,213,221,241,259,274,285,293,310,331,347,361,368,388,404,420,430,446,462,476,501,515,525,547,559,575,592,617,631,647,679,693,711,739,761,776,787,804,819,842,861,875,885,900,919,930,940,945,967,994,1010,1030]
-const SCODE = [0,4,10,16,24,41,52,65,73,78,84,90,96,102,121,148,158,163,169,0,194,207,218,233,247,267,280,290,301,320,344,356,366,375,390,414,0,436,454,467,484,510,521,540,553,564,0,601,626,636,657,688,698,0,0,771,778,795,810,829,851,870,880,0,910,0,935,942,962,0,999,1017,1039]
+const UCODE = [0,1,7,13,19,29,47,62,68,75,81,87,93,99,105,146,154,161,167,174,186,202,214,222,242,274,289,300,308,325,346,363,377,384,404,421,437,447,463,479,493,518,532,542,565,577,593,610,635,649,666,698,712,730,758,780,795,806,823,838,861,880,894,904,919,938,950,960,965,987,1014,1030,1050]
+const SCODE = [0,4,10,16,24,41,52,65,73,78,84,90,96,102,122,149,159,164,170,0,195,208,219,234,248,282,295,305,316,335,360,372,382,391,406,431,0,453,471,484,501,527,538,558,571,582,0,619,644,654,676,707,717,0,0,790,797,814,829,848,870,889,899,0,929,0,955,962,982,0,1019,1037,1059]