diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-03-18 01:09:33 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-05-03 18:48:16 +0200 |
commit | a25493b00cbf46b7e25306ba32ab41b54e9a2279 (patch) | |
tree | a7e1f264ec1d1433908003f20a3b2290ecd61762 | |
parent | ab7f13b30af38ab6b91a106552f572c56efbb8db (diff) | |
download | andean-abyss-a25493b00cbf46b7e25306ba32ab41b54e9a2279.tar.gz |
More events.
-rw-r--r-- | data.js | 2 | ||||
-rw-r--r-- | play.css | 1 | ||||
-rw-r--r-- | play.js | 4 | ||||
-rw-r--r-- | rules.js | 295 | ||||
-rw-r--r-- | tools/events.txt | 22 | ||||
-rw-r--r-- | tools/gendata.js | 2 |
6 files changed, 240 insertions, 86 deletions
@@ -1,2 +1,2 @@ -const data = {"first_space":0,"first_pop":0,"first_city":0,"last_city":10,"first_dept":11,"last_pop":22,"last_dept":26,"first_foreign":27,"last_foreign":28,"first_loc":29,"last_loc":46,"last_space":46,"coastal_spaces":[11,12,13,17],"card_order":[null,[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,3,2],[0,1,3,2],[0,1,3,2],[0,2,1,3],[0,2,1,3],[0,2,1,3],[0,2,3,1],[0,2,3,1],[0,2,3,1],[0,3,1,2],[0,3,1,2],[0,3,1,2],[0,3,2,1],[0,3,2,1],[0,3,2,1],[1,0,2,3],[1,0,2,3],[1,0,2,3],[1,0,3,2],[1,0,3,2],[1,0,3,2],[1,2,0,3],[1,2,0,3],[1,2,0,3],[1,2,3,0],[1,2,3,0],[1,2,3,0],[1,3,0,2],[1,3,0,2],[1,3,0,2],[1,3,2,0],[1,3,2,0],[1,3,2,0],[2,0,1,3],[2,0,1,3],[2,0,1,3],[2,0,3,1],[2,0,3,1],[2,0,3,1],[2,1,0,3],[2,1,0,3],[2,1,0,3],[2,1,3,0],[2,1,3,0],[2,1,3,0],[2,3,0,1],[2,3,0,1],[2,3,0,1],[2,3,1,0],[2,3,1,0],[2,3,1,0],[3,0,1,2],[3,0,1,2],[3,0,1,2],[3,0,2,1],[3,0,2,1],[3,0,2,1],[3,1,0,2],[3,1,0,2],[3,1,0,2],[3,1,2,0],[3,1,2,0],[3,1,2,0],[3,2,0,1],[3,2,0,1],[3,2,0,1],[3,2,1,0],[3,2,1,0],[3,2,1,0],[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,2,3]],"card_title":[null,"1st Division","Ospina & Mora","Tapias","Caño Limón - Coveñas","Occidental & Ecopetrol","Oil Spill","7th Special Forces","Fuerza Aérea Colombiana","High Mountain Battalions","Blackhawks","National Defense & Security Council","Plan Colombia","Plan Meteoro","Tres Esquinas","War Tax","Coffee Prices","Madrid Donors","NSPD-18","General Offensive","Mono Jojoy","Raúl Reyes","Alfonso Cano","DoD Contractors","Operación Jaque","Ejército de Liberación Nacional","Gramaje","Misil Antiaéreo","Hugo Chávez","Kill Zone","Peace Commission","Betancourt","Secuestrados","Sucumbíos","Airdropped AKs","Crop Substitution","Zona de Convivencia","Former Military","National Coordination Center","Soldados Campesinos","Demobilization","Mancuso","Senado & Cámara","Calima Front","Colombia Nueva","Los Derechos Humanos","Limpieza","Pinto & del Rosario","Unión Sindical Obrera","Bloques","Carabineros","Pipeline Repairs","Castaño","Criminal Air Force","Deserters & Defectors","DEA Agents","Drogas La Rebaja","Op Millennium","General Serrano","Salcedo","The Chess Player","Air Bridge","Amazonía","Narco-War","Cocaine Labs","Poppies","Tingo María","Mexican Traffickers","Narco-Subs","Riverines & Fast Boats","Ayahuasca Tourism","Darién","Sicarios","Propaganda!","Propaganda!","Propaganda!","Propaganda!"],"card_flavor":[null,"Jointness","COIN experts take charge","CO tightens civil-military bonds","Profitable pipeline","Oil company security","Rebels blamed","Infrastructure protection training","COIN strike aircraft","Elites guard high-altitude corridors","US helos delivered","Military-police jointness","US \"War on Drugs\"","Transport protection units","Forward base","Defense budget shot in the arm","They're up","Aid conference generous","US \"War on Terror\" takes on FARC",null,"KIA puts FARC in disarray","FARC Deputy killed","FARC leader killed in military strike","US provides aircrew","Dramatic hostage rescue","ELN and FARC jockey","FARC protection rejected","FARC MANPADs deemed a myth","Caracas controls border","Army sniffs out FARC trap","FARC accused in Commissioner's killing","Sympathy for famous hostage","Fed up with hostage-taking","Ecuadoran buffer zone","Insurgents scammed by Russian criminals","Government initiative","ELN gets its DMZ","Ties that bind","New command fights paramilitaries","Local forces platoons","Negotiated reintegration","AUC No.2 extradited","Unity behind Presidential war policy","Suspect leftists massacred","Anti-corruption campaign","Officers disciplined","Ruthless elimination","Human rights investigators","AUC targets oil labor organizers","Militias defy Castaño","National police field forces","Speedy patching","AUC leader's memoir a best seller","Insurgent access to small aircraft",null,"Law enforcement assistance","Cali cartel's drugstore chain seized","Colombian-US strike at Bernal syndicate","National Police hammer cartels","Cartel informant","Kingpin strategy scores","Peruvian coca supply controlled","Brasília's Op Cobra blocks border","Rival syndicates go for the throat","FARC taps suppliers","Growers and Government eradication focus on heroin source","Coca crop fails","Major shipment busted en route","Submersibles seized",null,"Eco-tourism helps trade balance","Arms traffic interdicted","Hired drug guns unreliable"],"card_flavor_shaded":[null,"Service parochialism","COIN strategy eludes Army","Civil-military rivalries fester","Pipeline draws attacks","Industry thought exploitative","Multinationals make mess","US training ineffective","Budget diverted to expensive jets","Equipment not delivered","Delivery of US helos delayed","Military-police rivalry","US aid focuses on drug war","Transport security deemphasized","Base overrun","Middle class resents cost of war","They're down","EU aid focuses on reconstruction","US focused on Mid-East and South Asia",null,"Military strategist","FARC Deputy channels foreign support","Ideologue","Plane down - hostage search and evasion","Hostage rescue goes awry","ELN and FARC coordinate ops","Schedule of fees","MANPADs feared","Caracas aids rebels","Tactics lure enemy in","Peace bid","Hostage negotiations forum for FARC","Ransoming highly profitable","Cross-border war","Covert weapons delivery","FARC proposals lauded",null,"Ex-officers advise paramilitaries","Sympathizers alert AUC","Local forces augment autodefensas","Talks a ruse, fighters recycled","AUC drug lord","Insurgent sympathies","Brutality blamed on Army","Political campaign divisive","International human rights cartel",null,"Prosecutors killed","Labor backs FARC","Independent militias join AUC","National police corruption","Security concerns hinder maintenance","Charismatic AUC political leader",null,null,"Más Yanquis","Retail empire","Investigation penetrated","Officials on cartel payroll","Cali cartel security chief","Cali's Gilberto Rodríguez Orejuela expands empire","Colombian coca growers fill Peruvian void","Jungle landing strips",null,"Well-oiled industry",null,"Hearty coca variety","New routes to US market","Littoral stealth",null,"Eco-tourists taken","Border sanctuary","Unemployed ready to work for syndicates"],"space_name":["Bogotá","Cali","Medellín","Bucaramanga","Ibagué","Santa Marta","Cartagena","Cúcuta","Neiva","Pasto","Sincelejo","Atlántico","Chocó","Nariño","Meta West","Guaviare","Putumayo","Cesar","Antioquia","Santander","Huila","Arauca","Meta East","Vichada","Guainía","Vaupés","Amazonas","Ecuador","Panamá","Santa Marta / Cartagena","Cali / Pasto","Neiva / Pasto","Bogotá / San José","Pasto / Tumaco","Cali / Buenaventura","Cartagena / Sincelejo","Sincelejo / Medellín","Medellín / Ibagué","Ibagué / Cali","Bucaramanga / Ibagué / Bogotá","Bogotá / Neiva","Cúcuta / Arauca","Bogotá / Yopal","Santa Marta / Ayacucho","Bucaramanga / Ayacucho","Sincelejo / Ayacucho","Cúcuta / Ayacucho"],"spaces":[{"type":"city","id":"Bogota","pop":8,"adjacent":[14,19,20,22,32,39,40,42]},{"type":"city","id":"Cali","pop":3,"adjacent":[12,13,20,30,34,38]},{"type":"city","id":"Medellin","pop":3,"adjacent":[12,18,36,37]},{"type":"city","id":"Bucaramanga","pop":2,"adjacent":[18,19,39,44]},{"type":"city","id":"Ibague","pop":2,"adjacent":[12,18,20,37,38,39]},{"type":"city","id":"Santa Marta","pop":2,"adjacent":[11,17,29,43]},{"type":"city","id":"Cartagena","pop":1,"adjacent":[11,29,35]},{"type":"city","id":"Cucuta","pop":1,"adjacent":[19,41,46]},{"type":"city","id":"Neiva","pop":1,"adjacent":[14,16,20,31,40]},{"type":"city","id":"Pasto","pop":1,"adjacent":[13,16,20,27,30,31,33]},{"type":"city","id":"Sincelejo","pop":1,"adjacent":[11,12,18,35,36,45]},{"type":"forest","id":"Atlantico","pop":1,"adjacent":[5,6,10,17,18,19,29,35,43,44,45,46]},{"type":"forest","id":"Choco","pop":1,"adjacent":[1,2,4,10,13,18,20,28,34,36,37,38]},{"type":"forest","id":"Narino","pop":1,"adjacent":[1,9,12,20,27,30,33,34]},{"type":"forest","id":"Meta West","pop":1,"adjacent":[0,8,15,16,20,22,32,40]},{"type":"forest","id":"Guaviare","pop":1,"adjacent":[14,16,22,23,24,25,32]},{"type":"forest","id":"Putumayo","pop":1,"adjacent":[8,9,14,15,20,25,26,27,31]},{"type":"mountain","id":"Cesar","pop":1,"adjacent":[5,11,18,19,43,44,45,46]},{"type":"mountain","id":"Antioquia","pop":2,"adjacent":[2,3,4,10,11,12,17,19,20,36,37,39,43,44,45,46]},{"type":"mountain","id":"Santander","pop":2,"adjacent":[0,3,7,11,17,18,20,21,22,39,41,42,43,44,45,46]},{"type":"mountain","id":"Huila","pop":2,"adjacent":[0,1,4,8,9,12,13,14,16,18,19,30,31,38,39,40]},{"type":"grassland","id":"Arauca","pop":1,"adjacent":[19,22,23,41,42]},{"type":"grassland","id":"Meta East","pop":1,"adjacent":[0,14,15,19,21,23,32,42]},{"type":"grassland","id":"Vichada","pop":0,"adjacent":[15,21,22,24]},{"type":"forest","id":"Guainia","pop":0,"adjacent":[15,23,25]},{"type":"forest","id":"Vaupes","pop":0,"adjacent":[15,16,24,26]},{"type":"forest","id":"Amazonas","pop":0,"adjacent":[16,25]},{"type":"foreign","id":"Ecuador","pop":0,"adjacent":[9,13,16,33]},{"type":"foreign","id":"Panama","pop":0,"adjacent":[12]},{"type":"road","id":"Santa Marta / Cartagena","econ":1,"adjacent":[5,6,11]},{"type":"road","id":"Cali / Pasto","econ":1,"adjacent":[1,9,13,20]},{"type":"road","id":"Neiva / Pasto","econ":1,"adjacent":[8,9,16,20]},{"type":"road","id":"Bogota / San Jose","econ":1,"adjacent":[0,14,15,22]},{"type":"road","id":"Pasto / Tumaco","econ":1,"adjacent":[9,13,27]},{"type":"pipeline","id":"Cali / Buenaventura","econ":1,"adjacent":[1,12,13]},{"type":"pipeline","id":"Cartagena / Sincelejo","econ":1,"adjacent":[6,10,11]},{"type":"pipeline","id":"Sincelejo / Medellin","econ":2,"adjacent":[2,10,12,18]},{"type":"pipeline","id":"Medellin / Ibague","econ":1,"adjacent":[2,4,12,18]},{"type":"pipeline","id":"Ibague / Cali","econ":1,"adjacent":[1,4,12,20]},{"type":"pipeline","id":"Bucaramanga / Ibague / Bogota","econ":2,"adjacent":[0,3,4,18,19,20]},{"type":"pipeline","id":"Bogota / Neiva","econ":2,"adjacent":[0,8,14,20]},{"type":"pipeline","id":"Cucuta / Arauca","econ":3,"adjacent":[7,19,21,21]},{"type":"pipeline","id":"Bogota / Yopal","econ":2,"adjacent":[0,19,21,22]},{"type":"pipeline","id":"Santa Marta / Ayacucho","econ":2,"adjacent":[5,11,17,18,19,44,45,46]},{"type":"pipeline","id":"Bucaramanga / Ayacucho","econ":2,"adjacent":[3,11,17,18,19,43,45,46]},{"type":"pipeline","id":"Sincelejo / Ayacucho","econ":3,"adjacent":[10,11,17,18,19,43,44,46]},{"type":"pipeline","id":"Cucuta / Ayacucho","econ":3,"adjacent":[7,11,17,18,19,43,44,45]}],"adjacent_patrol":[[32,39,40,42],[30,34,38],[36,37],[39,44],[37,38,39],[29,43],[29,35],[41,46],[31,40],[30,31,33],[35,36,45],[5,6,10,29,35,43,44,45,46],[1,2,4,10,34,36,37,38],[1,9,30,33,34],[0,8,32,40],[32],[8,9,31],[5,43,44,45,46],[2,3,4,10,36,37,39,43,44,45,46],[0,3,7,39,41,42,43,44,45,46],[0,1,4,8,9,30,31,38,39,40],[41,42],[0,32,42],[],[],[],[],[9,33],[],[5,6],[1,9],[8,9],[0],[9],[1],[6,10],[2,10],[2,4],[1,4],[0,3,4],[0,8],[7],[0],[5,44,45,46],[3,43,45,46],[10,43,44,46],[7,43,44,45]],"first_piece":[[0,3,3,33,0],[63,72],[102,108],[126,141]],"last_piece":[[2,2,32,62,-1],[71,101],[107,125],[140,152]]} +const data = {"first_space":0,"first_pop":0,"first_city":0,"last_city":10,"first_dept":11,"last_pop":22,"last_dept":26,"first_foreign":27,"last_foreign":28,"first_loc":29,"last_loc":46,"last_space":46,"card_order":[null,[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,3,2],[0,1,3,2],[0,1,3,2],[0,2,1,3],[0,2,1,3],[0,2,1,3],[0,2,3,1],[0,2,3,1],[0,2,3,1],[0,3,1,2],[0,3,1,2],[0,3,1,2],[0,3,2,1],[0,3,2,1],[0,3,2,1],[1,0,2,3],[1,0,2,3],[1,0,2,3],[1,0,3,2],[1,0,3,2],[1,0,3,2],[1,2,0,3],[1,2,0,3],[1,2,0,3],[1,2,3,0],[1,2,3,0],[1,2,3,0],[1,3,0,2],[1,3,0,2],[1,3,0,2],[1,3,2,0],[1,3,2,0],[1,3,2,0],[2,0,1,3],[2,0,1,3],[2,0,1,3],[2,0,3,1],[2,0,3,1],[2,0,3,1],[2,1,0,3],[2,1,0,3],[2,1,0,3],[2,1,3,0],[2,1,3,0],[2,1,3,0],[2,3,0,1],[2,3,0,1],[2,3,0,1],[2,3,1,0],[2,3,1,0],[2,3,1,0],[3,0,1,2],[3,0,1,2],[3,0,1,2],[3,0,2,1],[3,0,2,1],[3,0,2,1],[3,1,0,2],[3,1,0,2],[3,1,0,2],[3,1,2,0],[3,1,2,0],[3,1,2,0],[3,2,0,1],[3,2,0,1],[3,2,0,1],[3,2,1,0],[3,2,1,0],[3,2,1,0],[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,2,3]],"card_title":[null,"1st Division","Ospina & Mora","Tapias","Caño Limón - Coveñas","Occidental & Ecopetrol","Oil Spill","7th Special Forces","Fuerza Aérea Colombiana","High Mountain Battalions","Blackhawks","National Defense & Security Council","Plan Colombia","Plan Meteoro","Tres Esquinas","War Tax","Coffee Prices","Madrid Donors","NSPD-18","General Offensive","Mono Jojoy","Raúl Reyes","Alfonso Cano","DoD Contractors","Operación Jaque","Ejército de Liberación Nacional","Gramaje","Misil Antiaéreo","Hugo Chávez","Kill Zone","Peace Commission","Betancourt","Secuestrados","Sucumbíos","Airdropped AKs","Crop Substitution","Zona de Convivencia","Former Military","National Coordination Center","Soldados Campesinos","Demobilization","Mancuso","Senado & Cámara","Calima Front","Colombia Nueva","Los Derechos Humanos","Limpieza","Pinto & del Rosario","Unión Sindical Obrera","Bloques","Carabineros","Pipeline Repairs","Castaño","Criminal Air Force","Deserters & Defectors","DEA Agents","Drogas La Rebaja","Op Millennium","General Serrano","Salcedo","The Chess Player","Air Bridge","Amazonía","Narco-War","Cocaine Labs","Poppies","Tingo María","Mexican Traffickers","Narco-Subs","Riverines & Fast Boats","Ayahuasca Tourism","Darién","Sicarios","Propaganda!","Propaganda!","Propaganda!","Propaganda!"],"card_flavor":[null,"Jointness","COIN experts take charge","CO tightens civil-military bonds","Profitable pipeline","Oil company security","Rebels blamed","Infrastructure protection training","COIN strike aircraft","Elites guard high-altitude corridors","US helos delivered","Military-police jointness","US \"War on Drugs\"","Transport protection units","Forward base","Defense budget shot in the arm","They're up","Aid conference generous","US \"War on Terror\" takes on FARC",null,"KIA puts FARC in disarray","FARC Deputy killed","FARC leader killed in military strike","US provides aircrew","Dramatic hostage rescue","ELN and FARC jockey","FARC protection rejected","FARC MANPADs deemed a myth","Caracas controls border","Army sniffs out FARC trap","FARC accused in Commissioner's killing","Sympathy for famous hostage","Fed up with hostage-taking","Ecuadoran buffer zone","Insurgents scammed by Russian criminals","Government initiative","ELN gets its DMZ","Ties that bind","New command fights paramilitaries","Local forces platoons","Negotiated reintegration","AUC No.2 extradited","Unity behind Presidential war policy","Suspect leftists massacred","Anti-corruption campaign","Officers disciplined","Ruthless elimination","Human rights investigators","AUC targets oil labor organizers","Militias defy Castaño","National police field forces","Speedy patching","AUC leader's memoir a best seller","Insurgent access to small aircraft",null,"Law enforcement assistance","Cali cartel's drugstore chain seized","Colombian-US strike at Bernal syndicate","National Police hammer cartels","Cartel informant","Kingpin strategy scores","Peruvian coca supply controlled","Brasília's Op Cobra blocks border","Rival syndicates go for the throat","FARC taps suppliers","Growers and Government eradication focus on heroin source","Coca crop fails","Major shipment busted en route","Submersibles seized",null,"Eco-tourism helps trade balance","Arms traffic interdicted","Hired drug guns unreliable"],"card_flavor_shaded":[null,"Service parochialism","COIN strategy eludes Army","Civil-military rivalries fester","Pipeline draws attacks","Industry thought exploitative","Multinationals make mess","US training ineffective","Budget diverted to expensive jets","Equipment not delivered","Delivery of US helos delayed","Military-police rivalry","US aid focuses on drug war","Transport security deemphasized","Base overrun","Middle class resents cost of war","They're down","EU aid focuses on reconstruction","US focused on Mid-East and South Asia",null,"Military strategist","FARC Deputy channels foreign support","Ideologue","Plane down - hostage search and evasion","Hostage rescue goes awry","ELN and FARC coordinate ops","Schedule of fees","MANPADs feared","Caracas aids rebels","Tactics lure enemy in","Peace bid","Hostage negotiations forum for FARC","Ransoming highly profitable","Cross-border war","Covert weapons delivery","FARC proposals lauded",null,"Ex-officers advise paramilitaries","Sympathizers alert AUC","Local forces augment autodefensas","Talks a ruse, fighters recycled","AUC drug lord","Insurgent sympathies","Brutality blamed on Army","Political campaign divisive","International human rights cartel",null,"Prosecutors killed","Labor backs FARC","Independent militias join AUC","National police corruption","Security concerns hinder maintenance","Charismatic AUC political leader",null,null,"Más Yanquis","Retail empire","Investigation penetrated","Officials on cartel payroll","Cali cartel security chief","Cali's Gilberto Rodríguez Orejuela expands empire","Colombian coca growers fill Peruvian void","Jungle landing strips",null,"Well-oiled industry",null,"Hearty coca variety","New routes to US market","Littoral stealth",null,"Eco-tourists taken","Border sanctuary","Unemployed ready to work for syndicates"],"space_name":["Bogotá","Cali","Medellín","Bucaramanga","Ibagué","Santa Marta","Cartagena","Cúcuta","Neiva","Pasto","Sincelejo","Atlántico","Chocó","Nariño","Meta West","Guaviare","Putumayo","Cesar","Antioquia","Santander","Huila","Arauca","Meta East","Vichada","Guainía","Vaupés","Amazonas","Ecuador","Panamá","Santa Marta / Cartagena","Cali / Pasto","Neiva / Pasto","Bogotá / San José","Pasto / Tumaco","Cali / Buenaventura","Cartagena / Sincelejo","Sincelejo / Medellín","Medellín / Ibagué","Ibagué / Cali","Bucaramanga / Ibagué / Bogotá","Bogotá / Neiva","Cúcuta / Arauca","Bogotá / Yopal","Santa Marta / Ayacucho","Bucaramanga / Ayacucho","Sincelejo / Ayacucho","Cúcuta / Ayacucho"],"spaces":[{"type":"city","id":"Bogota","pop":8,"adjacent":[14,19,20,22,32,39,40,42]},{"type":"city","id":"Cali","pop":3,"adjacent":[12,13,20,30,34,38]},{"type":"city","id":"Medellin","pop":3,"adjacent":[12,18,36,37]},{"type":"city","id":"Bucaramanga","pop":2,"adjacent":[18,19,39,44]},{"type":"city","id":"Ibague","pop":2,"adjacent":[12,18,20,37,38,39]},{"type":"city","id":"Santa Marta","pop":2,"adjacent":[11,17,29,43]},{"type":"city","id":"Cartagena","pop":1,"adjacent":[11,29,35]},{"type":"city","id":"Cucuta","pop":1,"adjacent":[19,41,46]},{"type":"city","id":"Neiva","pop":1,"adjacent":[14,16,20,31,40]},{"type":"city","id":"Pasto","pop":1,"adjacent":[13,16,20,27,30,31,33]},{"type":"city","id":"Sincelejo","pop":1,"adjacent":[11,12,18,35,36,45]},{"type":"forest","id":"Atlantico","pop":1,"adjacent":[5,6,10,17,18,19,29,35,43,44,45,46]},{"type":"forest","id":"Choco","pop":1,"adjacent":[1,2,4,10,13,18,20,28,34,36,37,38]},{"type":"forest","id":"Narino","pop":1,"adjacent":[1,9,12,20,27,30,33,34]},{"type":"forest","id":"Meta West","pop":1,"adjacent":[0,8,15,16,20,22,32,40]},{"type":"forest","id":"Guaviare","pop":1,"adjacent":[14,16,22,23,24,25,32]},{"type":"forest","id":"Putumayo","pop":1,"adjacent":[8,9,14,15,20,25,26,27,31]},{"type":"mountain","id":"Cesar","pop":1,"adjacent":[5,11,18,19,43,44,45,46]},{"type":"mountain","id":"Antioquia","pop":2,"adjacent":[2,3,4,10,11,12,17,19,20,36,37,39,43,44,45,46]},{"type":"mountain","id":"Santander","pop":2,"adjacent":[0,3,7,11,17,18,20,21,22,39,41,42,43,44,45,46]},{"type":"mountain","id":"Huila","pop":2,"adjacent":[0,1,4,8,9,12,13,14,16,18,19,30,31,38,39,40]},{"type":"grassland","id":"Arauca","pop":1,"adjacent":[19,22,23,41,42]},{"type":"grassland","id":"Meta East","pop":1,"adjacent":[0,14,15,19,21,23,32,42]},{"type":"grassland","id":"Vichada","pop":0,"adjacent":[15,21,22,24]},{"type":"forest","id":"Guainia","pop":0,"adjacent":[15,23,25]},{"type":"forest","id":"Vaupes","pop":0,"adjacent":[15,16,24,26]},{"type":"forest","id":"Amazonas","pop":0,"adjacent":[16,25]},{"type":"foreign","id":"Ecuador","pop":0,"adjacent":[9,13,16,33]},{"type":"foreign","id":"Panama","pop":0,"adjacent":[12]},{"type":"road","id":"Santa Marta / Cartagena","econ":1,"adjacent":[5,6,11]},{"type":"road","id":"Cali / Pasto","econ":1,"adjacent":[1,9,13,20]},{"type":"road","id":"Neiva / Pasto","econ":1,"adjacent":[8,9,16,20]},{"type":"road","id":"Bogota / San Jose","econ":1,"adjacent":[0,14,15,22]},{"type":"road","id":"Pasto / Tumaco","econ":1,"adjacent":[9,13,27]},{"type":"pipeline","id":"Cali / Buenaventura","econ":1,"adjacent":[1,12,13]},{"type":"pipeline","id":"Cartagena / Sincelejo","econ":1,"adjacent":[6,10,11]},{"type":"pipeline","id":"Sincelejo / Medellin","econ":2,"adjacent":[2,10,12,18]},{"type":"pipeline","id":"Medellin / Ibague","econ":1,"adjacent":[2,4,12,18]},{"type":"pipeline","id":"Ibague / Cali","econ":1,"adjacent":[1,4,12,20]},{"type":"pipeline","id":"Bucaramanga / Ibague / Bogota","econ":2,"adjacent":[0,3,4,18,19,20]},{"type":"pipeline","id":"Bogota / Neiva","econ":2,"adjacent":[0,8,14,20]},{"type":"pipeline","id":"Cucuta / Arauca","econ":3,"adjacent":[7,19,21,21]},{"type":"pipeline","id":"Bogota / Yopal","econ":2,"adjacent":[0,19,21,22]},{"type":"pipeline","id":"Santa Marta / Ayacucho","econ":2,"adjacent":[5,11,17,18,19,44,45,46]},{"type":"pipeline","id":"Bucaramanga / Ayacucho","econ":2,"adjacent":[3,11,17,18,19,43,45,46]},{"type":"pipeline","id":"Sincelejo / Ayacucho","econ":3,"adjacent":[10,11,17,18,19,43,44,46]},{"type":"pipeline","id":"Cucuta / Ayacucho","econ":3,"adjacent":[7,11,17,18,19,43,44,45]}],"adjacent_patrol":[[32,39,40,42],[30,34,38],[36,37],[39,44],[37,38,39],[29,43],[29,35],[41,46],[31,40],[30,31,33],[35,36,45],[5,6,10,29,35,43,44,45,46],[1,2,4,10,34,36,37,38],[1,9,30,33,34],[0,8,32,40],[32],[8,9,31],[5,43,44,45,46],[2,3,4,10,36,37,39,43,44,45,46],[0,3,7,39,41,42,43,44,45,46],[0,1,4,8,9,30,31,38,39,40],[41,42],[0,32,42],[],[],[],[],[9,33],[],[5,6],[1,9],[8,9],[0],[9],[1],[6,10],[2,10],[2,4],[1,4],[0,3,4],[0,8],[7],[0],[5,44,45,46],[3,43,45,46],[10,43,44,46],[7,43,44,45]],"first_piece":[[0,3,3,33,0],[63,72],[102,108],[126,141]],"last_piece":[[2,2,32,62,-1],[71,101],[107,125],[140,152]]} if (typeof module !== 'undefined') module.exports = data @@ -90,6 +90,7 @@ path.tip { stroke: yellow; } gap: 4px; } #insurgent_momentum { + pointer-events: none; display: flex; flex-wrap: wrap; gap: 17px; @@ -1054,6 +1054,10 @@ function on_update() { action_button("event", "Event") action_button("limop", "LimOp") + action_button("farc", "FARC") + action_button("auc", "AUC") + action_button("cartels", "Cartels") + action_button("end_activity", "End Activity") action_button("end_operation", "End Op") action_button("end_event", "End Event") @@ -8,6 +8,8 @@ // TODO: for (s = ... last_space) to for_each_space (including/excluding foreign countries depending on events) // TODO: how granular undo (one at start of each space, each step, or each piece?) +// TODO: event can_place_base - allow window for removing own base to make space? + let states = {} let game = null let view = null @@ -65,7 +67,14 @@ const BASE = 0 const GUERRILLA = 1 const TROOPS = 2 const POLICE = 3 -const CUBE = 4 + +const piece_type_name = [ "Base", "Guerrilla", "Troops", "Police" ] +const piece_name = [ + [ "Govt Base", null, "Troops", "Police" ], + [ "FARC Base", "FARC Guerrilla" ], + [ "AUC Base", "AUC Guerrilla" ], + [ "Cartels Base", "Cartels Guerrilla" ], +] const space_name = data.space_name @@ -281,6 +290,7 @@ exports.setup = function (seed, scenario, options) { setup_deck(4, 0, 15) } + //game.deck[0] = 34 log("DECK " + game.deck.join(", ")) update_control() @@ -479,18 +489,42 @@ function is_faction_guerrilla(p, faction) { return p >= first_piece[faction][GUERRILLA] && p <= last_piece[faction][GUERRILLA] } +function is_farc_base(p) { + return p >= first_piece[FARC][BASE] && p <= last_piece[FARC][BASE] +} + function is_farc_guerrilla(p) { return p >= first_piece[FARC][GUERRILLA] && p <= last_piece[FARC][GUERRILLA] } +function is_farc_piece(p) { + return is_farc_base(p) || is_farc_guerrilla(p) +} + +function is_auc_base(p) { + return p >= first_piece[AUC][BASE] && p <= last_piece[AUC][BASE] +} + function is_auc_guerrilla(p) { return p >= first_piece[AUC][GUERRILLA] && p <= last_piece[AUC][GUERRILLA] } +function is_auc_piece(p) { + return is_auc_base(p) || is_auc_guerrilla(p) +} + +function is_cartels_base(p) { + return p >= first_piece[CARTELS][BASE] && p <= last_piece[CARTELS][BASE] +} + function is_cartels_guerrilla(p) { return p >= first_piece[CARTELS][GUERRILLA] && p <= last_piece[CARTELS][GUERRILLA] } +function is_cartels_piece(p) { + return is_cartels_base(p) || is_cartels_guerrilla(p) +} + function is_base(p) { if (p >= first_piece[GOVT][BASE] && p <= last_piece[GOVT][BASE]) return true @@ -779,6 +813,10 @@ function is_guerrilla(p) { return false } +function is_insurgent_piece(p) { + return is_farc_piece(p) || is_auc_piece(p) || is_cartels_piece(p) +} + function is_underground(p) { for (let faction = 1; faction < 4; ++faction) { let p0 = first_piece[faction][GUERRILLA] @@ -994,18 +1032,6 @@ function has_cartels_base(s) { return has_piece(s, CARTELS, BASE) } -function is_cartels_base(p) { - return p >= first_piece[CARTELS][BASE] && p <= last_piece[CARTELS][BASE] -} - -function is_cartels_guerrilla(p) { - return p >= first_piece[CARTELS][GUERRILLA] && p <= last_piece[CARTELS][GUERRILLA] -} - -function is_cartels_piece(p) { - return is_cartels_base(p) || is_cartels_guerrilla(p) -} - function has_farc_guerrilla(s) { return has_piece(s, FARC, GUERRILLA) } @@ -2324,7 +2350,7 @@ states.patrol = { if (game.pieces[p] >= 0 && !set_has(game.op.pieces, p)) gen_action_piece(p) }) - + } else { gen_action_piece(game.op.who) gen_patrol_move(game.pieces[game.op.who]) @@ -2384,7 +2410,7 @@ states.patrol_activate = { gen_underground_guerrillas(s, CARTELS) } } - + if (did_maximum_damage(game.op.targeted)) view.actions.next = 1 else @@ -3572,7 +3598,6 @@ states.eradicate_shift = { view.prompt = `Eradicate: Place available FARC Guerrilla in ${space_name[game.sa.where]}.` gen_piece_in_space(AVAILABLE, FARC, GUERRILLA) } - }, space(s) { push_undo() @@ -4222,7 +4247,7 @@ function execute_event() { if (UNSHADED_START[c] >= 0) { goto_vm(UNSHADED_START[c]) - return + return } log("TODO") @@ -4244,7 +4269,7 @@ function execute_unshaded_event() { if (UNSHADED_START[c] >= 0) { goto_vm(UNSHADED_START[c]) - return + return } log("TODO") @@ -4282,7 +4307,7 @@ function execute_shaded_event() { if (SHADED_START[c] >= 0) { goto_vm(SHADED_START[c]) - return + return } log("TODO") @@ -4291,6 +4316,10 @@ function execute_shaded_event() { // === EVENT VM === +function is_piece_in_event_space(p) { + return game.pieces[p] === game.vm.s +} + function goto_vm(start) { game.state = "vm" game.vm = { @@ -4300,6 +4329,7 @@ function goto_vm(start) { pp: [], p: 0, die: 0, + opt: 0, } vm_exec() } @@ -4331,6 +4361,19 @@ function vm_endevent() { game.state = "vm_endevent" } +states.vm_endevent = { + prompt() { + view.prompt = "Event: All done." + view.actions.end_event = 1 + }, + end_event: resume_event_card, +} + +function vm_optional() { + game.vm.opt = 1 + vm_next() +} + function vm_space() { if (can_vm_space()) { game.state = "vm_space" @@ -4359,6 +4402,12 @@ states.vm_space = { prompt() { let n = CODE[game.vm.pc][1] let f = CODE[game.vm.pc][2] + if (n === 0) + view.prompt = "Select each space." + else if (n === 1) + view.prompt = "Select one space." + else + view.prompt = `Select ${n} spaces.` for (let s = first_space; s <= last_space; ++s) if (!set_has(game.vm.ss, s) && f(s)) gen_action_space(s) @@ -4395,10 +4444,17 @@ states.vm_piece = { prompt() { let n = CODE[game.vm.pc][1] let f = CODE[game.vm.pc][2] - view.prompt = "Select piece." + if (n === 0) + view.prompt = "Select each piece." + else if (n === 1) + view.prompt = "Select one piece." + else + view.prompt = `Select ${n} pieces.` for (let p = all_first_piece; p <= all_last_piece; ++p) if (game.pieces[p] >= 0 && !set_has(game.vm.pp, p) && f(p, game.pieces[p])) gen_action_piece(p) + if (game.vm.opt) + view.actions.end_event = 1 }, piece(p) { push_undo() @@ -4406,6 +4462,7 @@ states.vm_piece = { game.vm.p = p vm_next() }, + end_event: resume_event_card, } function vm_endpiece() { @@ -4416,18 +4473,98 @@ function vm_transfer() { game.state = "vm_transfer" } +states.vm_transfer = { + prompt() { + let from = vm_operand(1) + let to = vm_operand(2) + let n = vm_operand(3) + view.prompt = `Transfer ${n} resources from ${faction_name[from]} to ${faction_name[to]}.` + gen_action_resources(from) + }, + resources(_) { + let from = vm_operand(1) + let to = vm_operand(2) + let n = vm_operand(3) + transfer_resources(from, to, n) + vm_next() + }, +} + +function vm_autoresources() { + let f = vm_operand(1) + let n = vm_operand(2) + add_resources(f, n) + vm_next() +} + function vm_resources() { game.state = "vm_resources" } +states.vm_resources = { + prompt() { + let f = vm_operand(1) + let n = vm_operand(2) + if (f >= 0) { + view.prompt = `Add ${n} resources to ${faction_name[f]}.` + gen_action_resources(f) + } else { + view.prompt = `Add ${n} resources to an Insurgent Faction.` + gen_action_resources(FARC) + gen_action_resources(AUC) + gen_action_resources(CARTELS) + } + }, + resources(f) { + let n = vm_operand(2) + add_resources(f, n) + vm_next() + }, +} + function vm_aid() { game.state = "vm_aid" } +states.vm_aid = { + prompt() { + let n = vm_operand(1) + view.prompt = `Add ${n} aid.` + view.actions.aid = 1 + }, + aid() { + push_undo() + let n = vm_operand(1) + add_aid(n) + vm_next() + }, +} + function vm_select_insurgent() { game.state = "vm_select_insurgent" } +states.vm_select_insurgent = { + prompt() { + view.prompt = "Select an Insurgent Faction." + view.actions.farc = 1 + view.actions.auc = 1 + view.actions.cartels = 1 + }, + farc() { + game.current = FARC + vm_next() + }, + auc() { + game.current = AUC + vm_next() + }, + cartels() { + game.current = CARTELS + vm_next() + }, +} + function vm_place() { if (can_vm_place()) game.state = "vm_place" @@ -4449,7 +4586,7 @@ states.vm_place = { prompt() { let faction = vm_operand(1) let type = vm_operand(2) - view.prompt = `Place piece in ${space_name[game.vm.s]}.` + view.prompt = `Place ${piece_name[faction][type]} in ${space_name[game.vm.s]}.` gen_place_piece(game.vm.s, faction, type) }, piece(p) { @@ -4466,8 +4603,40 @@ function vm_place_any() { vm_next() } -function vm_remove_shipment() { - game.state = "vm_remove_shipment" +function can_vm_place_any() { + let faction = vm_operand(1) + if (game.current === faction) + return true + if (faction === GOVT) + return ( + (has_piece(AVAILABLE, GOVT, BASE) && can_place_base(game.vm.s)) || + has_piece(AVAILABLE, GOVT, TROOPS) || + has_piece(AVAILABLE, GOVT, POLICE) + ) + return ( + (has_piece(AVAILABLE, faction, BASE) && can_place_base(game.vm.s)) || + has_piece(AVAILABLE, faction, GUERRILLA) + ) +} + +states.vm_place_any = { + prompt() { + let faction = vm_operand(1) + view.prompt = `Place any piece in ${space_name[game.vm.s]}.` + if (can_place_base(game.vm.s)) + gen_place_piece(game.vm.s, faction, BASE) + if (faction === GOVT) { + gen_place_piece(game.vm.s, faction, TROOPS) + gen_place_piece(game.vm.s, faction, POLICE) + } else { + gen_place_piece(game.vm.s, faction, GUERRILLA) + } + }, + piece(p) { + place_piece(p, game.vm.s) + update_control() + vm_next() + }, } function vm_remove() { @@ -4476,16 +4645,18 @@ function vm_remove() { vm_next() } -function vm_remove_or_end() { - game.state = "vm_remove_or_end" -} - function vm_activate() { - game.state = "vm_activate" + set_active(game.vm.p) + vm_next() } function vm_underground() { - game.state = "vm_underground" + set_underground(game.vm.p) + vm_next() +} + +function vm_remove_or_end() { + game.state = "vm_remove_or_end" } function vm_set_active_support() { @@ -4553,43 +4724,8 @@ function vm_roll() { vm_next() } -states.vm_resources = { - prompt() { - let f = vm_operand(1) - let n = vm_operand(2) - view.prompt = `Add ${n} resources to ${faction_name[f]}.` - gen_action_resources(f) - }, - resources(f) { - push_undo() - let n = vm_operand(2) - add_resources(f, n) - vm_next() - }, -} - -states.vm_aid = { - prompt() { - let n = vm_operand(1) - view.prompt = `Add ${n} aid.` - view.actions.aid = 1 - }, - aid() { - push_undo() - let n = vm_operand(1) - add_aid(n) - vm_next() - }, -} - -states.vm_endevent = { - prompt() { - view.prompt = "Event: All done." - view.actions.end_event = 1 - }, - end_event() { - resume_event_card() - }, +function vm_remove_shipment() { + game.state = "vm_remove_shipment" } // === GAME OVER === @@ -5057,6 +5193,7 @@ function map_delete(map, item) { // === GENERATED EVENT CODE === // :r !python3 tools/gencode.py + const CODE = [ // EVENT 4 [ vm_space, 3, (s)=>is_unsabotaged_pipeline(s) ], @@ -5128,9 +5265,10 @@ const CODE = [ [ vm_endspace ], [ vm_endevent ], // EVENT 28 + [ vm_optional ], [ vm_space, 1, (s)=>is_next_to_venezuela(s) ], [ vm_piece, 3, (p,s)=>is_piece_in_event_space(p) && is_insurgent_piece(p) ], - [ vm_remove_or_end ], + [ vm_remove ], [ vm_endpiece ], [ vm_endspace ], [ vm_endevent ], @@ -5148,12 +5286,16 @@ const CODE = [ [ vm_endspace ], [ vm_endevent ], // EVENT 33 + [ vm_optional ], [ vm_space, 1, (s)=>is_next_to_ecuador(s) ], [ vm_piece, 3, (p,s)=>is_piece_in_event_space(p) && is_insurgent_piece(p) ], - [ vm_remove_or_end ], + [ vm_remove ], [ vm_endpiece ], [ vm_endspace ], [ vm_endevent ], + // EVENT 34 + [ vm_resources, -1, -5 ], + [ vm_endevent ], // EVENT 38 [ vm_space, 3, (s)=>has_cubes(s) || is_support(s) ], [ vm_piece, 0, (p,s)=>is_piece_in_event_space(p) && is_auc_guerrilla(p) && is_active(p) ], @@ -5182,7 +5324,8 @@ const CODE = [ [ vm_endevent ], // EVENT 43 [ vm_space, 1, (s)=>is_dept(s) && has_troops(s) ], - [ vm_terror, 2 ], + [ vm_terror ], + [ vm_terror ], [ vm_piece, 0, (p,s)=>is_piece_in_event_space(p) && is_farc_base(p) ], [ vm_remove ], [ vm_endpiece ], @@ -5242,8 +5385,9 @@ const CODE = [ [ vm_resources, CARTELS, -6 ], [ vm_endevent ], // EVENT 62 + [ vm_optional ], [ vm_piece, 3, (p,s)=>is_insurgent_piece(p) && is_zero_pop_forest(s) ], - [ vm_remove_or_end ], + [ vm_remove ], [ vm_endpiece ], [ vm_endevent ], // EVENT 66 @@ -5316,12 +5460,12 @@ const CODE = [ [ vm_remove ], [ vm_endpiece ], [ vm_endspace ], - [ vm_space, 1, (s)=>is_support(s) ], + [ vm_space, 1, (s)=>is_city(s) && is_support(s) ], [ vm_set_neutral ], [ vm_endspace ], [ vm_endevent ], // SHADED 25 - [ vm_space, 1, (s)=>s === ANTIOQUIA || set_has(data.spaces[ANTIOQUIA].adjacent, s) ], + [ vm_space, 1, (s)=>s === ANTIOQUIA || (is_dept(s) && set_has(data.spaces[ANTIOQUIA].adjacent, s)) ], [ vm_place_any, FARC ], [ vm_place_any, FARC ], [ vm_place_any, FARC ], @@ -5382,7 +5526,8 @@ const CODE = [ [ vm_endevent ], // SHADED 43 [ vm_space, 1, (s)=>is_dept(s) && has_troosps(s) ], - [ vm_terror, 2 ], + [ vm_terror ], + [ vm_terror ], [ vm_endspace ], [ vm_aid, -9 ], [ vm_endevent ], @@ -5471,5 +5616,5 @@ const CODE = [ [ vm_endspace ], [ vm_endevent ], ] -const UNSHADED_START = [-1,-1,-1,-1,0,-1,4,-1,-1,-1,-1,-1,8,-1,11,19,-1,22,25,-1,-1,28,33,37,46,51,-1,-1,57,-1,-1,63,70,74,-1,-1,-1,-1,80,86,-1,90,97,102,109,114,-1,-1,-1,-1,118,-1,129,-1,-1,133,140,-1,142,-1,-1,147,154,-1,-1,-1,158,162,-1,-1,164,-1] -const SHADED_START = [-1,-1,-1,-1,168,172,-1,-1,177,-1,-1,-1,-1,-1,179,188,192,-1,194,-1,-1,198,-1,203,210,219,225,-1,229,-1,-1,236,240,242,247,254,-1,-1,259,-1,-1,265,-1,269,274,279,-1,-1,285,289,-1,294,298,-1,-1,305,309,-1,-1,-1,-1,316,320,-1,324,-1,331,-1,335,-1,-1,339] +const SHADED_START = [-1,-1,-1,-1,174,178,-1,-1,183,-1,-1,-1,-1,-1,185,194,198,-1,200,-1,-1,204,-1,209,216,225,231,-1,235,-1,-1,242,246,248,253,260,-1,-1,265,-1,-1,271,-1,275,281,286,-1,-1,292,296,-1,301,305,-1,-1,312,316,-1,-1,-1,-1,323,327,-1,331,-1,338,-1,342,-1,-1,346] +const UNSHADED_START = [-1,-1,-1,-1,0,-1,4,-1,-1,-1,-1,-1,8,-1,11,19,-1,22,25,-1,-1,28,33,37,46,51,-1,-1,57,-1,-1,64,71,75,82,-1,-1,-1,84,90,-1,94,101,106,114,119,-1,-1,-1,-1,123,-1,134,-1,-1,138,145,-1,147,-1,-1,152,159,-1,-1,-1,164,168,-1,-1,170,-1] diff --git a/tools/events.txt b/tools/events.txt index 2746b21..7911665 100644 --- a/tools/events.txt +++ b/tools/events.txt @@ -194,15 +194,17 @@ EVENT 25 endpiece endspace EVENT 28 + optional space 1 is_next_to_venezuela(s) piece 3 is_piece_in_event_space(p) && is_insurgent_piece(p) - remove_or_end + remove endpiece endspace EVENT 33 + optional space 1 is_next_to_ecuador(s) piece 3 is_piece_in_event_space(p) && is_insurgent_piece(p) - remove_or_end + remove endpiece endspace @@ -222,6 +224,8 @@ SHADED 38 EVENT 41 resources AUC -6 + # TODO + # space 1 has_auc_piece(s) space 1 true piece 0 is_piece_in_event_space(p) && is_auc_piece(p) remove @@ -243,8 +247,9 @@ EVENT 61 resources CARTELS -6 EVENT 62 + optional piece 3 is_insurgent_piece(p) && is_zero_pop_forest(s) - remove_or_end + remove endpiece EVENT 66 @@ -268,7 +273,7 @@ SHADED 24 remove endpiece endspace - space 1 is_support(s) + space 1 is_city(s) && is_support(s) set_neutral endspace @@ -343,7 +348,7 @@ SHADED 49 endspace SHADED 25 - space 1 s === ANTIOQUIA || set_has(data.spaces[ANTIOQUIA].adjacent, s) + space 1 s === ANTIOQUIA || (is_dept(s) && set_has(data.spaces[ANTIOQUIA].adjacent, s)) place_any FARC place_any FARC place_any FARC @@ -400,6 +405,9 @@ SHADED 28 sabotage endspace +EVENT 34 + resources -1 -5 + SHADED 34 select_insurgent space 1 is_zero_pop_dept(s) @@ -639,6 +647,4 @@ EVENT 16 select faction with most pieces (ties GOVT) resources faction 5 -EVENT 34 - select_insurgent - resources (game.current) -5 + diff --git a/tools/gendata.js b/tools/gendata.js index 0878d11..f417f12 100644 --- a/tools/gendata.js +++ b/tools/gendata.js @@ -473,8 +473,6 @@ adjacent("Vaupés", "Guaviare") adjacent("Amazonas", "Vaupés") adjacent("Amazonas", "Putumayo") -data.coastal_spaces = [ "Cesar", "Atlántico", "Chocó", "Nariño" ].map(n=>space_name.indexOf(n)).sort((a,b)=>a-b) - for (let i = 0; i < spaces.length; ++i) { spaces[i].adjacent.sort((a,b)=>a-b) } |