From bd832e6bb275ac07e74e3963179defe49e7505dd Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 2 Apr 2023 15:19:42 +0200 Subject: Box outline for both shaded and unshaded events. --- data.js | 2 +- play.css | 88 ++++++++++++++++++++++++++++++++------------------------ play.html | 12 ++++---- play.js | 15 +++++++--- rules.js | 3 +- tools/gendata.js | 77 ++++++++++++++++++++++++++++++++++++++++++++++++- 6 files changed, 147 insertions(+), 50 deletions(-) diff --git a/data.js b/data.js index 0f432b3..3962c0f 100644 --- a/data.js +++ b/data.js @@ -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":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"],"card_lines":[0,3,3,3,3,4,4,3,2,3,4,3,4,3,3,3,2,4,4,0,4,4,4,4,4,4,4,4,4,4,3,3,2,4,4,4,0,4,3,3,4,3,4,3,3,4,0,4,4,3,4,4,4,0,0,4,4,4,3,4,4,4,3,0,3,0,4,4,3,0,4,4,4],"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":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"],"card_unshaded_lines":[0,3,2,3,3,3,3,3,2,2,2,2,3,3,3,3,4,3,3,0,3,3,3,3,3,2,3,3,3,3,4,3,4,3,3,3,0,4,4,2,3,3,3,4,4,3,0,3,3,3,3,3,3,0,4,3,3,3,3,3,3,3,3,0,4,0,3,2,3,0,3,3,3],"card_shaded_lines":[0,3,3,3,3,4,4,3,2,3,4,3,4,3,3,3,2,4,4,0,4,4,4,4,4,4,4,4,4,4,3,3,2,4,4,4,0,4,3,3,4,3,4,3,3,4,0,4,4,3,4,4,4,0,0,4,4,4,3,4,4,4,3,0,3,0,4,4,3,0,4,4,4],"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 diff --git a/play.css b/play.css index dfa753b..49696a2 100644 --- a/play.css +++ b/play.css @@ -315,7 +315,8 @@ path.tip { stroke: yellow; } display: flex; flex-wrap: wrap; justify-content: center; - gap: 24px; + gap: 18px; + padding: 0 18px; max-width: 1614px; margin: 36px auto; } @@ -351,56 +352,69 @@ path.tip { stroke: yellow; } } #this_card { position: relative; } -#shaded_event { +#shaded_event, #unshaded_event { display: none; } +#shaded_event.action, #unshaded_event.action { display: block; } + +#this_card.c #shaded_event { border-top-color: transparent; } +#this_card.c #unshaded_event { border-image: radial-gradient(100px 30px at bottom, transparent 65%, white) 3 } + +#unshaded_event { position: absolute; box-sizing: border-box; + //border-radius: 8px; + border: 3px solid white; + left: 13px; + right: 13px; + top: 186px; } + #shaded_event { + position: absolute; + box-sizing: border-box; + //border-radius: 8px; + border: 3px solid white; left: 19px; - width: 210px; + right: 19px; bottom: 23px; - border-radius: 6px; -} -#shaded_event.action { - border: 3px solid white; } -#this_card.n4c #shaded_event { height: 83px; border-top-color: transparent; } -#this_card.n3c #shaded_event { height: 73px; border-top-color: transparent; } -#this_card.n4 #shaded_event { height: 82px; } -#this_card.n3 #shaded_event { height: 67px; } -#this_card.n2 #shaded_event { height: 56px; } -#this_card.n0 #shaded_event { display: none; } +#this_card.u2 #unshaded_event { height: 45px; } +#this_card.u3 #unshaded_event { height: 60px; } +#this_card.u4 #unshaded_event { height: 77px; } -/* OPTION: tiny cards on map - +#this_card.card_8 #unshaded_event { top: 212px; } +#this_card.card_25 #unshaded_event { top: 201px; } +#this_card.card_37 #unshaded_event { top: 168px; height: 78px; } -#card_panel { - position: absolute; - top: 82px; - left: 500px; - width: 714px; - margin: 0; -} +#this_card.s2 #shaded_event { height: 56px; } +#this_card.s3 #shaded_event { height: 65px; } +#this_card.s4 #shaded_event { height: 82px; } -.card { - width: 186px; - height: 261px; - border-radius: 12px; -} +#this_card.s3.u4 #shaded_event { height: 67px; } +#this_card.s3.card_14 #shaded_event { height: 71px; } +#this_card.s3.card_15 #shaded_event { height: 71px; } +#this_card.s3.card_31 #shaded_event { height: 68px; } +#this_card.s3.card_38 #shaded_event { height: 65px; } +#this_card.s3.card_49 #shaded_event { height: 68px; } +#this_card.s3.card_58 #shaded_event { height: 67px; } +#this_card.s3.card_62 #shaded_event { height: 67px; } +#this_card.s3.card_68 #shaded_event { height: 67px; } -#shaded_event { - left: 13px; - width: 159px; - bottom: 16px; -} +#this_card.s3.u4 #unshaded_event { height: 75px; } +#this_card.s3.card_38 #unshaded_event { height: 77px; } + +#this_card.s3.c #unshaded_event { height: 69px; } +#this_card.s3.c #shaded_event { height: 73px; } +#this_card.s4.c #shaded_event { height: 83px; } + +#this_card.card_9.c #unshaded_event { top: 204px; height: 51px; } +#this_card.card_10.c #unshaded_event { height: 59px; } +#this_card.card_11.c #unshaded_event { top: 200px; height: 55px; } -#this_card.n4c #shaded_event { height: 64px; border-top-color: transparent; } -#this_card.n3c #shaded_event { height: 57px; border-top-color: transparent; } -#this_card.n4 #shaded_event { height: 64px; } -#this_card.n3 #shaded_event { height: 51px; } -#this_card.n2 #shaded_event { height: 44px; } -*/ +/* shaded box is off-center on card 61 */ +#this_card.card_61 #shaded_event { left: 16px; right: 23px; } +#this_card.card_61 #unshaded_event { left: 10px; right: 17px; } .card.card_back{background-image:url(cards.1x/card_back.jpg)} .card.card_1{background-image:url(cards.1x/card_01.jpg)} diff --git a/play.html b/play.html index 2d65096..d1c4e2f 100644 --- a/play.html +++ b/play.html @@ -96,6 +96,12 @@
+
+
+
+
+
+
@@ -183,12 +189,6 @@
-
-
-
-
-
-
diff --git a/play.js b/play.js index 1951523..3a81923 100644 --- a/play.js +++ b/play.js @@ -111,6 +111,7 @@ let ui = { next_card: document.getElementById("next_card"), this_card: document.getElementById("this_card"), shaded_event: document.getElementById("shaded_event"), + unshaded_event: document.getElementById("unshaded_event"), deck_size: document.getElementById("deck_size"), tokens: { aid: document.getElementById("token_aid"), @@ -319,6 +320,7 @@ function on_blur_event() { function init_ui() { register_action(ui.this_card, "event", undefined) + register_action(ui.unshaded_event, "unshaded", undefined) register_action(ui.shaded_event, "shaded", undefined) register_action(ui.tokens.aid, "aid", undefined) register_action(ui.resources[GOVT], "resources", GOVT) @@ -800,6 +802,13 @@ function layout_shipments(s, list, xc, yc) { } } +function make_card_class_name(c) { + if (set_has([1,2,3,7,9,10,11,13], view.deck[0])) + return "card card_" + c + " u" + data.card_unshaded_lines[c] + " s" + data.card_shaded_lines[c] + " c" + else + return "card card_" + c + " u" + data.card_unshaded_lines[c] + " s" + data.card_shaded_lines[c] +} + function on_update() { switch (player) { case "Government": ui.favicon.href = "images/icon_govt.png"; break @@ -865,15 +874,13 @@ function on_update() { ui.tokens.propaganda.style.left = "1029px" } - if (set_has([1,2,3,7,9,10,11,13], view.deck[0])) - ui.this_card.className = "card card_" + view.deck[0] + " n" + data.card_lines[view.deck[0]] + "c" - else - ui.this_card.className = "card card_" + view.deck[0] + " n" + data.card_lines[view.deck[0]] + ui.this_card.className = make_card_class_name(view.deck[0]) ui.next_card.className = "card card_" + view.deck[1] ui.deck_size.textContent = view.deck[2] ui.this_card.classList.toggle("action", !!(view.actions && view.actions.event === 1)) ui.shaded_event.classList.toggle("action", !!(view.actions && view.actions.shaded === 1)) + ui.unshaded_event.classList.toggle("action", !!(view.actions && view.actions.unshaded === 1)) layout_sop() layout_score() diff --git a/rules.js b/rules.js index 519c9f3..8db6256 100644 --- a/rules.js +++ b/rules.js @@ -2041,6 +2041,7 @@ states.eligible = { attack: goto_attack, terror: goto_terror, event() { goto_event(0) }, + unshaded() { goto_event(0) }, shaded() { goto_event(1) }, pass: goto_pass, } @@ -2095,7 +2096,7 @@ function gen_any_event() { if (set_has(single_events, this_card())) { view.actions.event = 1 } else { - view.actions.event = 1 + view.actions.unshaded = 1 view.actions.shaded = 1 } } diff --git a/tools/gendata.js b/tools/gendata.js index e22a7ff..f28a134 100644 --- a/tools/gendata.js +++ b/tools/gendata.js @@ -218,6 +218,80 @@ flavor("74. Propaganda!", "", "") flavor("75. Propaganda!", "", "") flavor("76. Propaganda!", "", "") +let unshaded_lines = [0] +unshaded_lines[1] = 3 +unshaded_lines[2] = 2 +unshaded_lines[3] = 3 +unshaded_lines[4] = 3 +unshaded_lines[5] = 3 +unshaded_lines[6] = 3 +unshaded_lines[7] = 3 +unshaded_lines[8] = 2 +unshaded_lines[9] = 2 +unshaded_lines[10] = 2 +unshaded_lines[11] = 2 +unshaded_lines[12] = 3 +unshaded_lines[13] = 3 +unshaded_lines[14] = 3 +unshaded_lines[15] = 3 +unshaded_lines[16] = 4 +unshaded_lines[17] = 3 +unshaded_lines[18] = 3 +unshaded_lines[19] = 0 +unshaded_lines[20] = 3 +unshaded_lines[21] = 3 +unshaded_lines[22] = 3 +unshaded_lines[23] = 3 +unshaded_lines[24] = 3 +unshaded_lines[25] = 2 +unshaded_lines[26] = 3 +unshaded_lines[27] = 3 +unshaded_lines[28] = 3 +unshaded_lines[29] = 3 +unshaded_lines[30] = 4 +unshaded_lines[31] = 3 +unshaded_lines[32] = 4 +unshaded_lines[33] = 3 +unshaded_lines[34] = 3 +unshaded_lines[35] = 3 +unshaded_lines[36] = 0 +unshaded_lines[37] = 4 +unshaded_lines[38] = 4 +unshaded_lines[39] = 2 +unshaded_lines[40] = 3 +unshaded_lines[41] = 3 +unshaded_lines[42] = 3 +unshaded_lines[43] = 4 +unshaded_lines[44] = 4 +unshaded_lines[45] = 3 +unshaded_lines[46] = 0 +unshaded_lines[47] = 3 +unshaded_lines[48] = 3 +unshaded_lines[49] = 3 +unshaded_lines[50] = 3 +unshaded_lines[51] = 3 +unshaded_lines[52] = 3 +unshaded_lines[53] = 0 +unshaded_lines[54] = 0 +unshaded_lines[55] = 3 +unshaded_lines[56] = 3 +unshaded_lines[57] = 3 +unshaded_lines[58] = 3 +unshaded_lines[59] = 3 +unshaded_lines[60] = 3 +unshaded_lines[61] = 3 +unshaded_lines[62] = 3 +unshaded_lines[63] = 0 +unshaded_lines[64] = 4 +unshaded_lines[65] = 0 +unshaded_lines[66] = 3 +unshaded_lines[67] = 2 +unshaded_lines[68] = 3 +unshaded_lines[69] = 0 +unshaded_lines[70] = 3 +unshaded_lines[71] = 3 +unshaded_lines[72] = 3 + let shaded_lines = [0] shaded_lines[1] = 3 shaded_lines[2] = 3 @@ -551,7 +625,8 @@ data.card_order = card_order data.card_title = card_title data.card_flavor = card_flavor data.card_flavor_shaded = card_flavor_shaded -data.card_lines = shaded_lines +data.card_unshaded_lines = unshaded_lines +data.card_shaded_lines = shaded_lines data.space_name = space_name data.spaces = spaces -- cgit v1.2.3