summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data.js2
-rw-r--r--rules.js12
-rw-r--r--tools/gendata.js46
3 files changed, 30 insertions, 30 deletions
diff --git a/data.js b/data.js
index ffc6e20..0d77c95 100644
--- a/data.js
+++ b/data.js
@@ -1,2 +1,2 @@
-const data = {"locations":{"NONE":0,"DEPLOY":1,"ELIMINATED":2,"FRANCE":3,"TUNISIA":4,"MOROCCO":5,"I-1":6,"I-2":7,"I-3":8,"I-4":9,"CONSTANTINE":10,"II-1":11,"II-2":12,"II-3":13,"III-1":14,"III-2":15,"III-3":16,"ALGIERS":17,"IV-1":18,"IV-2":19,"ORAN":20,"V-1":21,"V-2":22,"V-3":23,"V-4":24,"V-5":25,"V-6":26,"V-7":27,"V-8":28,"VI-1":29,"VI-2":30},"areas":[{"loc":0,"id":"NONE","name":"None"},{"loc":1,"id":"DEPLOY","name":"Deployment"},{"loc":2,"id":"ELIMINATED","name":"Eliminated"},{"loc":3,"id":"FRANCE","name":"France","type":4,"zone":null},{"loc":4,"id":"TUNISIA","name":"Tunisia","type":4,"zone":"TUNISIA"},{"loc":5,"id":"MOROCCO","name":"Morocco","type":4,"zone":"MOROCCO"},{"loc":6,"id":"I-1","name":"Barika","type":1,"zone":"I"},{"loc":7,"id":"I-2","name":"Batna","type":3,"zone":"I"},{"loc":8,"id":"I-3","name":"Biskra","type":3,"zone":"I"},{"loc":9,"id":"I-4","name":"Tebessa","type":1,"zone":"I"},{"loc":10,"id":"CONSTANTINE","name":"Constantine","type":2,"zone":"II"},{"loc":11,"id":"II-1","name":"Setif","type":1,"zone":"II"},{"loc":12,"id":"II-2","name":"Philippeville","type":1,"zone":"II"},{"loc":13,"id":"II-3","name":"Souk Ahras","type":1,"zone":"II"},{"loc":14,"id":"III-1","name":"Tizi Ouzou","type":1,"zone":"III"},{"loc":15,"id":"III-2","name":"Bordj Bou Arreridj","type":1,"zone":"III"},{"loc":16,"id":"III-3","name":"Bougie","type":1,"zone":"III"},{"loc":17,"id":"ALGIERS","name":"Algiers","type":2,"zone":"IV"},{"loc":18,"id":"IV-1","name":"Medea","type":1,"zone":"IV"},{"loc":19,"id":"IV-2","name":"Orleansville","type":1,"zone":"IV"},{"loc":20,"id":"ORAN","name":"Oran","type":2,"zone":"V"},{"loc":21,"id":"V-1","name":"Mecheria","type":3,"zone":"V"},{"loc":22,"id":"V-2","name":"Tlemcen","type":1,"zone":"V"},{"loc":23,"id":"V-3","name":"Sidi Bel Abbes","type":1,"zone":"V"},{"loc":24,"id":"V-4","name":"Mostaganem","type":1,"zone":"V"},{"loc":25,"id":"V-5","name":"Saida","type":3,"zone":"V"},{"loc":26,"id":"V-6","name":"Mascara","type":3,"zone":"V"},{"loc":27,"id":"V-7","name":"Ain Sefra","type":3,"zone":"V"},{"loc":28,"id":"V-8","name":"Laghouat","type":3,"zone":"V"},{"loc":29,"id":"VI-1","name":"Sidi Aissa","type":3,"zone":"VI"},{"loc":30,"id":"VI-2","name":"Ain Qussera","type":1,"zone":"VI"}],"zone_areas":{"TUNISIA":[4],"MOROCCO":[5],"I":[6,7,8,9],"II":[10,11,12,13],"III":[14,15,16],"IV":[17,18,19],"V":[20,21,22,23,24,25,26,27,28],"VI":[29,30]},"adjecents":{"4":[7,8,9,13],"5":[21,22,27],"6":[11,15,29],"7":[4],"8":[4,28,29],"9":[4,11,12,13],"11":[6,9,15,16],"12":[9],"13":[4,9],"14":[18],"15":[6,11,18,29],"16":[11],"18":[14,15,29,30],"19":[24,30],"21":[5],"22":[5],"24":[19,30],"26":[30],"27":[5],"28":[8,29,30],"29":[6,8,15,18,28],"30":[18,19,24,26,28]},"units":[{"side":1,"type":0,"name":"French 2nd division","class":"fr_xx_2","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 4th division","class":"fr_xx_4","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 9th division","class":"fr_xx_9","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 12th division","class":"fr_xx_12","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 13th division","class":"fr_xx_13","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 14th division","class":"fr_xx_14","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 19th division","class":"fr_xx_19","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 20th division","class":"fr_xx_20","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 21th division","class":"fr_xx_21","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 29th division","class":"fr_xx_29","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 27th division","class":"fr_xx_27","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 5th division","class":"fr_xx_5","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 7th division","class":"fr_xx_7","evasion_contact":1,"firepower":25},{"side":1,"type":1,"name":"French brigade","class":"fr_x","evasion_contact":1,"firepower":6},{"side":1,"type":1,"name":"French brigade","class":"fr_x","evasion_contact":1,"firepower":6},{"side":1,"type":1,"name":"French brigade","class":"fr_x","evasion_contact":1,"firepower":6},{"side":1,"type":1,"name":"French brigade","class":"fr_x","evasion_contact":1,"firepower":6},{"side":1,"type":2,"name":"French elite brigade","class":"fr_elite_x_para","evasion_contact":2,"firepower":9},{"side":1,"type":2,"name":"French elite brigade","class":"fr_elite_x_para","evasion_contact":2,"firepower":9},{"side":1,"type":2,"name":"French elite brigade","class":"fr_elite_x_para","evasion_contact":2,"firepower":9},{"side":1,"type":2,"name":"French elite brigade","class":"fr_elite_x_inf","evasion_contact":2,"firepower":9},{"side":1,"type":2,"name":"French elite brigade","class":"fr_elite_x_marine","evasion_contact":2,"firepower":9},{"side":1,"type":2,"name":"French elite brigade","class":"fr_elite_x_marine","evasion_contact":2,"firepower":9},{"side":1,"type":2,"name":"French elite brigade","class":"fr_elite_x_marine","evasion_contact":2,"firepower":9},{"side":1,"type":3,"name":"Algerian brigade","class":"alg_x","evasion_contact":1,"firepower":5},{"side":1,"type":3,"name":"Algerian brigade","class":"alg_x","evasion_contact":1,"firepower":5},{"side":1,"type":3,"name":"Algerian brigade","class":"alg_x","evasion_contact":1,"firepower":5},{"side":1,"type":3,"name":"Algerian brigade","class":"alg_x","evasion_contact":1,"firepower":5},{"side":1,"type":3,"name":"Algerian brigade","class":"alg_x","evasion_contact":1,"firepower":5},{"side":1,"type":3,"name":"Algerian brigade","class":"alg_x","evasion_contact":1,"firepower":5},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3}]}
+const data = {"locations":{"NONE":0,"DEPLOY":1,"ELIMINATED":2,"FRANCE":3,"TUNISIA":4,"MOROCCO":5,"I-1":6,"I-2":7,"I-3":8,"I-4":9,"CONSTANTINE":10,"II-1":11,"II-2":12,"II-3":13,"III-1":14,"III-2":15,"III-3":16,"ALGIERS":17,"IV-1":18,"IV-2":19,"ORAN":20,"V-1":21,"V-2":22,"V-3":23,"V-4":24,"V-5":25,"V-6":26,"V-7":27,"V-8":28,"VI-1":29,"VI-2":30},"areas":[{"loc":0,"id":"NONE","name":"None"},{"loc":1,"id":"DEPLOY","name":"Deployment"},{"loc":2,"id":"ELIMINATED","name":"Eliminated"},{"loc":3,"id":"FRANCE","name":"France","type":4,"zone":null},{"loc":4,"id":"TUNISIA","name":"Tunisia","type":4,"zone":"TUNISIA"},{"loc":5,"id":"MOROCCO","name":"Morocco","type":4,"zone":"MOROCCO"},{"loc":6,"id":"I-1","name":"Barika","type":1,"zone":"I"},{"loc":7,"id":"I-2","name":"Batna","type":3,"zone":"I"},{"loc":8,"id":"I-3","name":"Biskra","type":3,"zone":"I"},{"loc":9,"id":"I-4","name":"Tebessa","type":1,"zone":"I"},{"loc":10,"id":"CONSTANTINE","name":"Constantine","type":2,"zone":"II"},{"loc":11,"id":"II-1","name":"Setif","type":1,"zone":"II"},{"loc":12,"id":"II-2","name":"Philippeville","type":1,"zone":"II"},{"loc":13,"id":"II-3","name":"Souk Ahras","type":1,"zone":"II"},{"loc":14,"id":"III-1","name":"Tizi Ouzou","type":1,"zone":"III"},{"loc":15,"id":"III-2","name":"Bordj Bou Arreridj","type":1,"zone":"III"},{"loc":16,"id":"III-3","name":"Bougie","type":1,"zone":"III"},{"loc":17,"id":"ALGIERS","name":"Algiers","type":2,"zone":"IV"},{"loc":18,"id":"IV-1","name":"Medea","type":1,"zone":"IV"},{"loc":19,"id":"IV-2","name":"Orleansville","type":1,"zone":"IV"},{"loc":20,"id":"ORAN","name":"Oran","type":2,"zone":"V"},{"loc":21,"id":"V-1","name":"Mecheria","type":3,"zone":"V"},{"loc":22,"id":"V-2","name":"Tlemcen","type":1,"zone":"V"},{"loc":23,"id":"V-3","name":"Sidi Bel Abbes","type":1,"zone":"V"},{"loc":24,"id":"V-4","name":"Mostaganem","type":1,"zone":"V"},{"loc":25,"id":"V-5","name":"Saida","type":3,"zone":"V"},{"loc":26,"id":"V-6","name":"Mascara","type":3,"zone":"V"},{"loc":27,"id":"V-7","name":"Ain Sefra","type":3,"zone":"V"},{"loc":28,"id":"V-8","name":"Laghouat","type":3,"zone":"V"},{"loc":29,"id":"VI-1","name":"Sidi Aissa","type":3,"zone":"VI"},{"loc":30,"id":"VI-2","name":"Ain Qussera","type":1,"zone":"VI"}],"zone_areas":{"TUNISIA":[4],"MOROCCO":[5],"I":[6,7,8,9],"II":[10,11,12,13],"III":[14,15,16],"IV":[17,18,19],"V":[20,21,22,23,24,25,26,27,28],"VI":[29,30]},"adjacents":{"4":[7,8,9,13],"5":[21,22,27],"6":[11,15,29],"7":[4],"8":[4,28,29],"9":[4,11,12,13],"11":[6,9,15,16],"12":[9],"13":[4,9],"14":[18],"15":[6,11,18,29],"16":[11],"18":[14,15,29,30],"19":[24,30],"21":[5],"22":[5],"24":[19,30],"26":[30],"27":[5],"28":[8,29,30],"29":[6,8,15,18,28],"30":[18,19,24,26,28]},"units":[{"side":1,"type":0,"name":"French 2nd division","class":"fr_xx_2","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 4th division","class":"fr_xx_4","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 9th division","class":"fr_xx_9","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 12th division","class":"fr_xx_12","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 13th division","class":"fr_xx_13","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 14th division","class":"fr_xx_14","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 19th division","class":"fr_xx_19","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 20th division","class":"fr_xx_20","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 21th division","class":"fr_xx_21","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 29th division","class":"fr_xx_29","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 27th division","class":"fr_xx_27","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 5th division","class":"fr_xx_5","evasion_contact":1,"firepower":25},{"side":1,"type":0,"name":"French 7th division","class":"fr_xx_7","evasion_contact":1,"firepower":25},{"side":1,"type":1,"name":"French brigade","class":"fr_x","evasion_contact":1,"firepower":6},{"side":1,"type":1,"name":"French brigade","class":"fr_x","evasion_contact":1,"firepower":6},{"side":1,"type":1,"name":"French brigade","class":"fr_x","evasion_contact":1,"firepower":6},{"side":1,"type":1,"name":"French brigade","class":"fr_x","evasion_contact":1,"firepower":6},{"side":1,"type":2,"name":"French elite brigade","class":"fr_elite_x_para","evasion_contact":2,"firepower":9},{"side":1,"type":2,"name":"French elite brigade","class":"fr_elite_x_para","evasion_contact":2,"firepower":9},{"side":1,"type":2,"name":"French elite brigade","class":"fr_elite_x_para","evasion_contact":2,"firepower":9},{"side":1,"type":2,"name":"French elite brigade","class":"fr_elite_x_inf","evasion_contact":2,"firepower":9},{"side":1,"type":2,"name":"French elite brigade","class":"fr_elite_x_marine","evasion_contact":2,"firepower":9},{"side":1,"type":2,"name":"French elite brigade","class":"fr_elite_x_marine","evasion_contact":2,"firepower":9},{"side":1,"type":2,"name":"French elite brigade","class":"fr_elite_x_marine","evasion_contact":2,"firepower":9},{"side":1,"type":3,"name":"Algerian brigade","class":"alg_x","evasion_contact":1,"firepower":5},{"side":1,"type":3,"name":"Algerian brigade","class":"alg_x","evasion_contact":1,"firepower":5},{"side":1,"type":3,"name":"Algerian brigade","class":"alg_x","evasion_contact":1,"firepower":5},{"side":1,"type":3,"name":"Algerian brigade","class":"alg_x","evasion_contact":1,"firepower":5},{"side":1,"type":3,"name":"Algerian brigade","class":"alg_x","evasion_contact":1,"firepower":5},{"side":1,"type":3,"name":"Algerian brigade","class":"alg_x","evasion_contact":1,"firepower":5},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":1,"type":4,"name":"Algerian Police","class":"alg_police","evasion_contact":2,"firepower":2},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":5,"name":"FLN Failek","class":"fln_failek","evasion_contact":2,"firepower":4},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":6,"name":"FLN Band","class":"fln_band","evasion_contact":3,"firepower":2},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":7,"name":"FLN Cadre","class":"fln_cadre","evasion_contact":4,"firepower":1},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3},{"side":0,"type":8,"name":"FLN Front","class":"fln_front","evasion_contact":3,"firepower":3}]}
if (typeof module !== 'undefined') module.exports = data
diff --git a/rules.js b/rules.js
index 3611d17..26e240b 100644
--- a/rules.js
+++ b/rules.js
@@ -87,7 +87,7 @@ var game = null
var view = null
const {
- areas, zone_areas, locations, units, adjecents
+ areas, zone_areas, locations, units, adjacents
} = require("./data.js")
var first_friendly_unit, last_friendly_unit
@@ -636,7 +636,7 @@ function can_cross_border(u) {
return false
let result = false
let loc = unit_loc(u)
- for_each_adjecent_map_area(loc, adj => {
+ for_each_adjacent_map_area(loc, adj => {
if (is_border_crossing(loc, adj))
result = true
})
@@ -875,9 +875,9 @@ function for_each_map_area_in_zone(z, fn) {
fn(i)
}
-function for_each_adjecent_map_area(x, fn) {
- if (x in adjecents) {
- for (let i of adjecents[x])
+function for_each_adjacent_map_area(x, fn) {
+ if (x in adjacents) {
+ for (let i of adjacents[x])
fn(i)
}
}
@@ -3355,7 +3355,7 @@ states.fln_move = {
// A unit may also move to an area in a wilaya adjacent to its current one (that is, the two share a land border),
// but the area moved to must be adjacent to at least one area in its current wilaya.
// Morocco and Tunisia are treated as single-area wilaya for this purpose.
- for_each_adjecent_map_area(to, adj => {
+ for_each_adjacent_map_area(to, adj => {
if (is_border_crossing(to, adj)) {
if (game.is_morocco_tunisia_independent)
gen_action_loc(adj)
diff --git a/tools/gendata.js b/tools/gendata.js
index e6dc4bc..aeaab80 100644
--- a/tools/gendata.js
+++ b/tools/gendata.js
@@ -67,46 +67,46 @@ def_area("V-8", "Laghouat", REMOTE, "V")
def_area("VI-1", "Sidi Aissa", REMOTE, "VI")
def_area("VI-2", "Ain Qussera", RURAL, "VI")
-let adjecents = {}
+let adjacents = {}
-function def_adjecent(id, neighbours) {
- function add_adjecent(from, to) {
+function def_adjacent(id, neighbours) {
+ function add_adjacent(from, to) {
const from_id = locations[from]
- if (!(from_id in adjecents)) {
- adjecents[from_id] = []
+ if (!(from_id in adjacents)) {
+ adjacents[from_id] = []
}
- adjecents[from_id].push(locations[to])
+ adjacents[from_id].push(locations[to])
}
for (const n of neighbours) {
- add_adjecent(id, n)
- add_adjecent(n, id)
+ add_adjacent(id, n)
+ add_adjacent(n, id)
}
}
-// only adjecent with neighbour zones are tracked, defined one way but they are bidirectional
-def_adjecent("TUNISIA", ["I-2", "I-3", "I-4", "II-3"])
-def_adjecent("MOROCCO", ["V-1", "V-2", "V-7"])
+// only adjacent with neighbour zones are tracked, defined one way but they are bidirectional
+def_adjacent("TUNISIA", ["I-2", "I-3", "I-4", "II-3"])
+def_adjacent("MOROCCO", ["V-1", "V-2", "V-7"])
-def_adjecent("I-1", ["II-1", "III-2", "VI-1"])
-def_adjecent("I-3", ["V-8", "VI-1"])
-def_adjecent("I-4", ["II-1", "II-2", "II-3"])
+def_adjacent("I-1", ["II-1", "III-2", "VI-1"])
+def_adjacent("I-3", ["V-8", "VI-1"])
+def_adjacent("I-4", ["II-1", "II-2", "II-3"])
-def_adjecent("II-1", ["III-2", "III-3"])
+def_adjacent("II-1", ["III-2", "III-3"])
-def_adjecent("III-1", ["IV-1"])
-def_adjecent("III-2", ["IV-1", "VI-1"])
+def_adjacent("III-1", ["IV-1"])
+def_adjacent("III-2", ["IV-1", "VI-1"])
-def_adjecent("IV-1", ["VI-1", "VI-2"])
-def_adjecent("IV-2", ["V-4", "VI-2"])
+def_adjacent("IV-1", ["VI-1", "VI-2"])
+def_adjacent("IV-2", ["V-4", "VI-2"])
-def_adjecent("V-4", ["VI-2"])
-def_adjecent("V-6", ["VI-2"])
-def_adjecent("V-8", ["VI-1", "VI-2"])
+def_adjacent("V-4", ["VI-2"])
+def_adjacent("V-6", ["VI-2"])
+def_adjacent("V-8", ["VI-1", "VI-2"])
data.locations = locations
data.areas = areas
data.zone_areas = zone_areas
-data.adjecents = adjecents
+data.adjacents = adjacents
let units = []