summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-12-25 19:08:30 +0100
committerTor Andersson <tor@ccxvii.net>2022-12-26 01:03:31 +0100
commitb90061cc9ca2ce29e33a2e6e8347e7ae727f97bd (patch)
treed4381d166b44491783673271699e3b000e147509
parent024f4746cd777655a0ed6816bdf6b97601e94c26 (diff)
downloadrommel-in-the-desert-b90061cc9ca2ce29e33a2e6e8347e7ae727f97bd.tar.gz
Follow 2004 edition map layout more strictly.
Don't show hexsides for out-of-play hexes. Add west exit area for allied player. Remove new edition marsh.
-rw-r--r--data.js8
-rw-r--r--map.svg12
-rw-r--r--play.html1
-rw-r--r--play.js13
-rw-r--r--rules.js37
-rw-r--r--tools/gendata.js27
6 files changed, 56 insertions, 42 deletions
diff --git a/data.js b/data.js
index e15ca8f..580fb65 100644
--- a/data.js
+++ b/data.js
@@ -1,10 +1,10 @@
// DON'T EDIT - AUTOGENERATED
-const all_hexes = [7,8,9,10,30,31,32,33,34,35,36,37,38,39,40,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,148,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,203,204,205,213]
-const hex_exists = [0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0]
+const all_hexes = [7,8,9,10,30,31,32,33,34,35,36,37,38,39,40,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,147,148,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,203,204,205,213]
+const hex_exists = [0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0]
const hex_road = [0,0,0,0,0,0,0,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,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0,0,0,0,0,0,0,0,0,0,0,0,0]
-const hex_name = {"4":"Malta","7":"El Garib","8":"Cyrene","9":"El Gubba","10":"Derna","30":"Tocra","31":"Barce","32":"Marawa","33":"Wadi Cuff","34":"Derna SW","35":"Gazala","36":"Acroma","37":"Tobruk","38":"Belhamed","39":"Gambut","40":"Bardia","47":"Exited","48":"Return for Refit","49":"Alexandria Queue","54":"Benghazi","55":"Er Regima","56":"Charruba","57":"Mechili W","58":"Mechili","59":"Rotonda Segnali","60":"Sidi Mufta","61":"Bir Harmat","62":"El Adem","63":"Sidi Rezegh","64":"Ft. Capuzzo","65":"Sollum","66":"Buq Buq","67":"Sidi Barrani","68":"Mersa Matruh W","69":"Mersa Matruh","70":"Fuka","71":"El Daba","72":"El Alamein","73":"El Hamam","74":"Alexandria","78":"Ghemines","79":"Skeleidima","80":"Msus","81":"Msus E","82":"Mechili SW","83":"Tengeder","84":"Tengeder E","85":"Bir Hacheim","86":"Retma","87":"Bir Gubi","88":"Gabr Saleh","89":"Sidi Omar","90":"Bir Habata","91":"Sofafi","92":"Bir el Kenayis W","93":"Bir el Kenayis","94":"Bir Khalda","95":"Fuka SE","96":"El Alamein SW","97":"Alam Halfa","98":"Alexandria SW","99":"Map Edge","102":"Return for Refit","103":"Beda Fomm","104":"Antelat","105":"Msus SE","106":"Ben Gania","107":"Tengeder SW","108":"Tengeder SE","109":"Bir Hacheim SW","110":"Bir Hacheim SE","111":"Bir Gubi SW","112":"Ft. Maddalena W","113":"Ft. Maddalena","114":"Ft. Maddalena E","115":"Bir Khamsa","116":"Bir el Qatrani","117":"Bir el Kenayis SW","118":"Bir el Kenayis SE","119":"Western Desert","120":"El Himeimat W","121":"El Himeimat","122":"El Himeimat E","123":"Alexandria SW SE","127":"El Agheila Queue","128":"Agedabia","129":"Jebel el Matar","130":"Haraga","131":"Haraga E","132":"Libya","133":"Jalo Oasis Trail","134":"Libya","135":"Libya","136":"Libya","137":"Ft. Maddalena SW","138":"Ft. Maddalena SE","139":"Bir Khamsa SW","140":"Bir Khamsa SE","141":"Bir Fuad","142":"Bir Fuad E","143":"Western Desert","144":"Western Desert","148":"Map Edge","151":"El Agheila","152":"Mersa Brega","153":"El Haseiat","154":"Haraga SW","155":"Haraga SE","156":"Libya","157":"Jalo Oasis Trail","158":"Libya","159":"Libya","160":"Libya","161":"Libya","162":"Jarabub Oasis NW","163":"Jarabub Oasis NE","164":"Siwa Oasis NE NW","165":"Bir Fuad SW","166":"Bir Fuad SE","167":"Western Desert","176":"Maaten Giofer","177":"Maaten Giofer E","178":"Sahaba","179":"Jalo Oasis NW","180":"Jalo Oasis NE","181":"Jalo Oasis Trail","182":"Libya Trail","183":"Libya Trail","184":"Libya Trail","185":"Libya Trail","186":"Jarabub Oasis W","187":"Jarabub Oasis","188":"Jarabub Oasis E","189":"Siwa Oasis NE","190":"Western Desert","191":"Western Desert","197":"Map Edge","203":"Jalo Oasis W","204":"Jalo Oasis","205":"Jalo Oasis E","213":"Siwa Oasis"}
+const side_limit = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0,1,0,1,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,1,0,1,1,0,0,0,0,0,0,0,1,2,2,2,1,1,0,1,2,2,2,2,2,2,2,0,0,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,1,0,2,1,0,0,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,0,1,2,0,0,2,0,2,2,0,0,2,0,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2,2,0,0,0,0,0,0,0,0,0,1,2,0,2,2,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,2,0,0,0,0,0,0,0,0,0,2,2,0,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2,2,0,0,2,2,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,0,1,0,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,2,0,0,2,2,0,2,0,0,2,0,0,2,0,2,2,0,0,2,0,0,2,0,0,2,0,0,2,0,0,2,0,0,2,2,0,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
+const hex_name = {"4":"Malta","7":"El Garib","8":"Cyrene","9":"El Gubba","10":"Derna","30":"Tocra","31":"Barce","32":"Marawa","33":"Wadi Cuff","34":"Derna SW","35":"Gazala","36":"Acroma","37":"Tobruk","38":"Belhamed","39":"Gambut","40":"Bardia","47":"Exited","48":"Return for Refit","49":"Alexandria Queue","53":"Exited","54":"Benghazi","55":"Er Regima","56":"Charruba","57":"Mechili W","58":"Mechili","59":"Rotonda Segnali","60":"Sidi Mufta","61":"Bir Harmat","62":"El Adem","63":"Sidi Rezegh","64":"Ft. Capuzzo","65":"Sollum","66":"Buq Buq","67":"Sidi Barrani","68":"Mersa Matruh W","69":"Mersa Matruh","70":"Fuka","71":"El Daba","72":"El Alamein","73":"El Hamam","74":"Alexandria","78":"Ghemines","79":"Skeleidima","80":"Msus","81":"Msus E","82":"Mechili SW","83":"Tengeder","84":"Tengeder E","85":"Bir Hacheim","86":"Retma","87":"Bir Gubi","88":"Gabr Saleh","89":"Sidi Omar","90":"Bir Habata","91":"Sofafi","92":"Bir el Kenayis W","93":"Bir el Kenayis","94":"Bir Khalda","95":"Fuka SE","96":"El Alamein SW","97":"Alam Halfa","98":"Alexandria SW","99":"Map Edge","102":"Return for Refit","103":"Beda Fomm","104":"Antelat","105":"Msus SE","106":"Ben Gania","107":"Tengeder SW","108":"Tengeder SE","109":"Bir Hacheim SW","110":"Bir Hacheim SE","111":"Bir Gubi SW","112":"Ft. Maddalena W","113":"Ft. Maddalena","114":"Ft. Maddalena E","115":"Bir Khamsa","116":"Bir el Qatrani","117":"Bir el Kenayis SW","118":"Bir el Kenayis SE","119":"Western Desert","120":"El Himeimat W","121":"El Himeimat","122":"El Himeimat E","123":"Alexandria SW SE","127":"El Agheila Queue","128":"Agedabia","129":"Jebel el Matar","130":"Haraga","131":"Haraga E","132":"Libya","133":"Jalo Oasis Trail","134":"Libya","135":"Libya","136":"Libya","137":"Ft. Maddalena SW","138":"Ft. Maddalena SE","139":"Bir Khamsa SW","140":"Bir Khamsa SE","141":"Bir Fuad","142":"Bir Fuad E","143":"Western Desert","144":"Western Desert","145":"Qattara Depression","146":"Qattara Depression","147":"Qattara Depression","148":"Map Edge","151":"El Agheila","152":"Mersa Brega","153":"El Haseiat","154":"Haraga SW","155":"Haraga SE","156":"Libya","157":"Jalo Oasis Trail","158":"Libya","159":"Libya","160":"Libya","161":"Libya","162":"Jarabub Oasis NW","163":"Jarabub Oasis NE","164":"Siwa Oasis NE NW","165":"Bir Fuad SW","166":"Bir Fuad SE","167":"Western Desert","175":"Map Edge","176":"Maaten Giofer","177":"Maaten Giofer E","178":"Sahaba","179":"Jalo Oasis NW","180":"Jalo Oasis NE","181":"Jalo Oasis Trail","182":"Libya Trail","183":"Libya Trail","184":"Libya Trail","185":"Libya Trail","186":"Jarabub Oasis W","187":"Jarabub Oasis","188":"Jarabub Oasis E","189":"Siwa Oasis NE","190":"Western Desert","191":"Western Desert","197":"Map Edge","203":"Jalo Oasis W","204":"Jalo Oasis","205":"Jalo Oasis E","213":"Siwa Oasis"}
const regions = {"Libya":[7,8,9,10,30,31,32,33,34,35,36,37,38,39,40,54,55,56,57,58,59,60,61,62,63,64,78,79,80,81,82,83,84,85,86,87,88,103,104,105,106,107,108,109,110,111,112,113,128,129,130,131,132,133,134,135,136,137,138,151,152,153,154,155,156,157,158,159,160,161,162,176,177,178,179,180,181,182,183,184,185,186,187,200,201,202,203,204,205,206,207,208,209,210,211],"Egypt":[65,66,67,68,69,70,71,72,73,74,89,90,91,92,93,94,95,96,97,98,114,115,116,117,118,119,120,121,122,123,139,140,141,142,143,144,163,164,165,166,167,188,189,190,191,212,213,214,215],"East Line":[36,37,38,39,40,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,85,86,87,88,89,90,91,92,93,94,95,96,97,98,112,113,114,115,116,117,118,119,120,121,122,123,137,138,139,140,141,142,143,144,162,163,164,165,166,167,187,188,189,190,191],"West Line":[7,8,9,10,30,31,32,33,34,35,54,55,56,57,58,59,78,79,80,81,82,83,103,104,105,106,107,128,129,130,151,152]}
const unit_name = ["Ari","Lit","Tri","Cen","Fas","Bre","Fol","Pav","Tre","Bol","Sav","Pis","Sab","Ita","15/33","21/3","90/580","15/8","21/5","15/115","21/104","90/155","90/346","90/sv288","90/200","90/361","164/382+433","Ram","164/125","88mm/A","88mm/B","50mm","76mm","/104","7","Sher/A","Sher/B","Grant","Matilda/A","Matilda/B","/1AT","1/2","1/22","7/7","10/8","/32AT","7/4","8/24","8/9","10/23","2/3","1/201G","7/22G","7/SG","1/SG","2/SG","44/131+133","51H/152","51H/154","70/14+16","70/23","44/132","6#/B","2#","6#/A","Priest","/B","/C","/D","/A","/Tob","4IN/7m","4IN/3m","10IN/161m","5IN/9+10","10IN/21+25","4IN/11","4IN/5","5IN/29","8IN/18","1SA","1SA/2+5","1SA/1","1SA/3","2SA/4+6","9AU/20","9AU/24","9AU/26","7AU/18","2NZ/4","2NZ/5","2NZ/6","FF/2","/Pol"]
const unit_appearance = ["S",11,7,19,17,"S","M","S","S","S","S",19,7,"S",3,"S",5,5,"S",3,"S",3,11,11,7,5,"M","M","M",3,11,5,17,7,4,18,20,12,"T",4,4,10,8,2,16,8,4,20,20,16,"S",10,"T","T",10,"S",16,18,18,"S","S",16,18,6,12,18,14,18,20,8,"T",2,"S",14,14,14,2,2,10,14,8,6,6,8,8,"S",16,16,"T",6,6,6,14,"T"]
diff --git a/map.svg b/map.svg
index 093646d..72dd3e9 100644
--- a/map.svg
+++ b/map.svg
@@ -142,7 +142,6 @@
<g id="marshes" fill="url(#texture_marsh)">
<path id="sabkha_el_segira1" d="M120 734c-5 4-5 5-4 10 1 4 0 9-1 16l-1 7c1 1 3 2 6 1h9c3 0 5-1 8-4l3-8c2-8 2-9-1-14-3-6-4-7-9-9-5-1-7-1-10 1z" />
<path id="sabkha_el_segira2" d="M235 743l-4 2c-3 2-6 4-10 4-3 1-4 1-5 4-2 3-5 6-8 7l-8 1c-3-1-6-4-8-8l-4-4h-12l-1 5c1 6 0 9-3 14l-2 4c0 2 2 4 6 5s6 3 10 8c2 2 3 2 8 0l5-2 7 3c3 2 4 2 7 1 2-1 5-4 6-8 2-5 5-7 10-9l6-3 7-13-3-11h-4z" />
-<path id="sabkah_al_akhariyah" d="M52 778c-1 0-3 3-4 7-1 7-1 7 2 12 4 7 4 9 1 13-1 2-1 3 1 6 1 5 1 8-2 11-2 2-2 3-1 8 4 15 4 18 1 26-3 10-3 10-2 11 1 2 4 2 9 1 3-2 4-2 8-2l6 2 6 6c2 4 5 5 9 3 5-3 10-2 15 3 3 2 4 3 7 2l25-2c12 0 13-1 15-6l5-10 7-3h3l6-6 7-6 6-3c5-1 7-2 7-3s-5-6-8-7c-3-2-10-4-12-3-1 0-2 1-2 3-2 5-5 7-13 9-5 1-6 2-11 5-4 4-7 5-13 7l-9 3-5 2c-2 0-5-1-7-4-4-3-6-4-16-7-11-4-14-5-16-7-2-4-2-6 1-12l4-8-2-1c-7-4-8-8-8-30l-1-14h-4l-3 2c-3 1-7-2-9-6-1-2-2-3-3-2z" />
<path id="sabkha_el_jeneinen" d="M415 840c-2 2-2 5-2 7l4 5 7 6c5 5 6 6 9 7 2 0 3 1 6 4s6 5 12 7c3 1 4 2 6 5l2 3 8 1 7-1 2 2c3 2 5 2 6-1 1-2 0-4-1-8l-1-6-1-4-4-1-5-1-4-5-4-10-5-2h-11l-6-1h-8c-2 0-5 0-8-3l-7-4h-2z" />
<!--
<path id="sabkha_el_jeneinen_old" d="M445 831l-7 2c-8 1-11 4-11 7v7c-2 5-1 6 3 10 3 2 5 6 7 9l6 9 4 5 2 1c3 1 3 1 4-1 2-2 3-2 5 0l5 2 7 2 9 2c4 0 5 0 7-2s2-3 2-6c-1-4-1-5-6-8-2-3-5-4-5-4-3 0-7-5-8-9-1-2-1-4 1-9l1-7c0-3-2-4-8-5l-8-3c-3-3-8-3-10-2z" />
@@ -337,8 +336,6 @@
<text font-size="10" x="145" y="742">EL SEGIRA</text>
<text font-size="10" x="453" y="828">SABKHA</text>
<text font-size="10" x="443" y="840">EL JENEINEN</text>
-<text font-size="10" x="82" y="840">SABKHA</text>
-<text font-size="10" x="82" y="852">AL AKHARIYAH</text>
<text text-anchor="end" font-size="13" x="888" y="202">Gazala</text>
@@ -355,9 +352,6 @@
<text text-anchor="end" font-size="10" x="812" y="159">Tmimi</text>
<text text-anchor="end" font-size="10" x="1000" y="216">Acroma</text>
<text text-anchor="end" font-size="10" x="2400" y="500">El Himeimat</text>
-<!--
-<text text-anchor="end" font-size="10" x="2405" y="511">(Hill)</text>
--->
<text text-anchor="end" font-size="10" x="2400" y="309">El Alamein</text>
<text text-anchor="end" font-size="10" x="1335" y="395">Gabr Saleh</text>
<text text-anchor="end" font-size="10" x="566" y="515">Ben Gania</text>
@@ -370,9 +364,6 @@
<text text-anchor="end" font-size="13" x="2000" y="284">Matruh</text>
<text text-anchor="end" font-size="10" x="485" y="164">Marawa</text>
-<!--
-<text font-size="9" x="148" y="391">Solluch</text>
--->
<text font-size="9" x="201" y="388">Solluch</text>
<text font-size="9" x="209" y="398">Pass</text>
<text font-size="9" x="1500" y="326">Halfaya</text>
@@ -424,9 +415,6 @@
<text font-size="13" x="237" y="640">Agedabia</text>
<text font-size="13" x="358" y="173">Barce</text>
<text font-size="13" x="547" y="89">Cyrene</text>
-<!--
-<text font-size="9" x="576" y="156">Slonta</text>
--->
</g>
</g>
diff --git a/play.html b/play.html
index 7261280..14d9f8c 100644
--- a/play.html
+++ b/play.html
@@ -732,7 +732,6 @@ svg #lines line.axis_supply.allied_supply {
<path fill="#5d8ec1" d="M0 0h2672v988H0z"/>
<path fill="#d6c4a9" d="M551 30c-35 15-67 40-107 45-34 12-59 39-92 52-44 24-82 58-121 89-25 18-49 40-64 67-12 27-33 52-33 81 6 51 16 98 41 144 15 24 15 53 26 78 0 43-32 72-61 99-45 26-90 70-144 63-25-14-15 15-17 31v238h2728V212c-28 3-48 16-78 13-18 27-45 12-60 31-17-3-47 24-71 30-32 19-72 24-106 3-29-18-64-8-95-18-30 5-61 11-93 19-24 4-39-34-64-5-32 19-67-16-77-22-27 15-56-7-79-9-33 4-67 11-100 17-35 0-70-3-104-8-36-12-75-8-109 6-24 9-49 13-73 23-27 5-101 22-96-19 7-34-30-38-30-68 3-27-28-32-48-30-31-18-47 0-76-1-21-3-56 4-81-6-24-6-39 20-65 10-21-3-51 6-68-5-13-7-7-18-36-13-9-1-24 3-31 0-23-9-51-12-74 0-28 3-55 22-81 4-35-13 2 44-24 7-18 2-26-25-43-26-14 11-30-7-27-25 11 14 11-15-2-19 4-22-6-33-30-29-27-4-49-16-72-18-30-11-70-19-93-18-26 16-46 2-70-6Zm330 118c-7 5 13 8 0 0z"/>
<path fill="#aeae7b" d="M557 40c-34 11-63 40-102 38-30 8-52 38-83 49-13 11 1 27-4 39 25 22 6 59-21 72 4 37-22 59-28 90-17 10-51 43-9 37 23-21 62 10 79-3 8-28 44 30 52-6 17-17 49-15 56-42 29-16 66-3 95 6 25 33 26-24 36-39 2-26 56-67 67-31 25 11 53 6 76-8 30-17 40-55 26-84-1-22-17-53-46-48-2-18-18-18-18-36-23 5-39-10-49 0-17-13-46-19-70-27-10 4-36 43-31 13 25-15-16-20-26-20Zm92 24c11 0 2 3-6-1z"/>
-<path fill="#939874" d="M120 734c-21 21 6 53 20 22 6-11-7-30-20-22zM235 743c-20 11-34 25-52 6-23 2-9 49 15 34 18 11 32-13 43-26 2-4 0-16-6-14ZM52 778c-5 29 4 60-4 92 19 2 37 10 57 17 15-4 40 5 46-14l31-22c18-11-24-19-28-1-25 22-51 16-77-1 7-21-6-45-8-65-9 6-11-2-17-6ZM415 840c-4 23 34 28 44 44 17 6 31-2 18-18-15 0-12-25-29-18-13 0-22-3-33-8Z"/>
<path fill="#c4ab8b" d="M2429 528c-37 4-68 31-101 3-38-4-76 20-99 48-25 3-40 8-42 35-24 26-70 27-101 27-36 27-17 70-19 105-17 11-34 13-53 23-1 22-12 46-4 68-16 35-57 25-73 58-2 18 11 35 6 55 19 20 44 29 68 38h160c28-9 3-42 32-50-21-35 51-54 5-80-2-29-4-58 30-68 29-21-30-34-45-45-12-23-6-33 16-47 11-29 56-6 58-46 13-27 56-13 53-43 2-30 29-34 51-48 24 3 52 24 68 0 27-20 46 13 59 17 36-41-45-46-69-50z"/>
</svg>
<!-- END INSERT MAP FILE -->
diff --git a/play.js b/play.js
index 9dad9ff..56802ce 100644
--- a/play.js
+++ b/play.js
@@ -8,11 +8,11 @@ const sqrt = Math.sqrt
// refit and queue hexes
const MALTA = 4
-const hex_special = [ 47, 48, 49, 102, 127, MALTA ]
+const hex_special = [ 47, 48, 49, 53, 102, 127, MALTA ]
const unit_count = 94
-const EXIT_HEXES = [ 99, 148, 197 ] // [ 99, 123, 148 ] //, 172, 197 ]
+const EXIT_HEXES = [ 99, 148, 175 ]
const REFIT_HEXES = [ 48, 102 ]
const BENGHAZI = 54
@@ -607,7 +607,8 @@ function build_hexes() {
for (let s = 0; s < 3; ++s) {
let next_id = hex_id + hexnext[s]
let side_id = hex_id * 3 + s
- add_line(ui.hex_x[hex_id], ui.hex_y[hex_id], s, side_id)
+ if (hex_exists[hex_id] || hex_exists[next_id])
+ add_line(ui.hex_x[hex_id], ui.hex_y[hex_id], s, side_id)
if (hex_exists[hex_id] && hex_exists[next_id])
add_path(ui.hex_x[hex_id], ui.hex_y[hex_id], ui.hex_x[next_id], ui.hex_y[next_id], side_id)
}
@@ -891,8 +892,10 @@ function update_map() {
ui.hexes[hex].classList.toggle("axis_control", is_hex_axis_controlled(hex))
ui.hexes[hex].classList.toggle("allied_control", is_hex_allied_controlled(hex))
for (let s = 0; s < 3; ++s) {
- ui.sides[hex*3+s].classList.toggle("axis_control", is_side_axis_controlled(hex*3+s))
- ui.sides[hex*3+s].classList.toggle("allied_control", is_side_allied_controlled(hex*3+s))
+ if (ui.sides[hex*3+s]) {
+ ui.sides[hex*3+s].classList.toggle("axis_control", is_side_axis_controlled(hex*3+s))
+ ui.sides[hex*3+s].classList.toggle("allied_control", is_side_allied_controlled(hex*3+s))
+ }
}
}
}
diff --git a/rules.js b/rules.js
index 08e38c0..7e5fc7a 100644
--- a/rules.js
+++ b/rules.js
@@ -907,6 +907,11 @@ function for_each_axis_unit_on_map(fn) {
fn(u)
}
+function for_each_allied_unit(fn) {
+ for (let u = first_allied_unit; u <= last_allied_unit; ++u)
+ fn(u)
+}
+
function for_each_allied_unit_on_map(fn) {
for (let u = first_allied_unit; u <= last_allied_unit; ++u)
if (is_map_hex(unit_hex(u)))
@@ -6350,8 +6355,10 @@ states.axis_player_initiative = {
// === VICTORY CHECK ===
-const EXIT_EAST_EDGE = [ 99, 148, 197 ]
+const EXIT_EAST_EDGE = [ 99, 148 ]
+const EXIT_WEST_EDGE = [ 175 ]
const EXIT_EAST = 47
+const EXIT_WEST = 53
function check_sudden_death_victory() {
// Supplied units that move beyond the map "edge" exit the map.
@@ -6366,22 +6373,48 @@ function check_sudden_death_victory() {
})
}
+ for (let x of EXIT_WEST_EDGE) {
+ for_each_allied_unit(u => {
+ if (unit_hex(u) === x && is_unit_supplied(u)) {
+ log(`Exited the west map edge.`)
+ set_unit_hex(u, EXIT_WEST)
+ }
+ })
+ }
+
let axis_exited = 0
for_each_axis_unit(u => {
if (unit_hex(u) === EXIT_EAST)
axis_exited++
})
- if (is_axis_hex(ALEXANDRIA) || axis_exited >= 3) {
+ let allied_exited = 0
+ for_each_allied_unit(u => {
+ if (unit_hex(u) === EXIT_WEST)
+ allied_exited++
+ })
+
+ if (is_axis_hex(ALEXANDRIA)) {
log_br()
log("Axis captured Alexandria!")
return goto_game_over(AXIS, "Axis Strategic Victory!")
}
+ if (axis_exited >= 3) {
+ log_br()
+ log("Axis exited three supplied units!")
+ return goto_game_over(AXIS, "Axis Strategic Victory!")
+ }
+
if (is_allied_hex(EL_AGHEILA)) {
log_br()
log("Allied captured El Agheila!")
return goto_game_over(ALLIED, "Allied Strategic Victory!")
}
+ if (is_allied_hex(EL_AGHEILA) || allied_exited >= 3) {
+ log_br()
+ log("Allied exited three supplied units!")
+ return goto_game_over(ALLIED, "Allied Strategic Victory!")
+ }
return false
}
diff --git a/tools/gendata.js b/tools/gendata.js
index 492e7f2..8ee858a 100644
--- a/tools/gendata.js
+++ b/tools/gendata.js
@@ -216,22 +216,13 @@ def_offmap(0,6);
def_offmap(11,29);
def_offmap(41,53);
def_offmap(75,77);
-// def_offmap(99,102);
def_offmap(100,102); // 99 is exit hex
def_offmap(124,127);
-// def_offmap(148,150);
def_offmap(149,150); // 148 is exit hex
-def_offmap(173,175);
+def_offmap(173,174);
def_offmap(197,199);
-// def_offmap(198,199); // 197 is exit hex
def_offmap(222,224);
-// show spines
-// def_offmap(175,175, 1);
-// def_offmap(99,99, 1);
-// def_offmap(148,148, 1);
-// def_offmap(197,197, 1);
-
// depression
def_offmap(168,168);
def_offmap(168,168);
@@ -244,15 +235,8 @@ def_offmap(200,202);
def_offmap(206,212);
def_offmap(214,221);
-// Terrain chart hexes
-// def_offmap(145,146);
-// def_offmap(168,172);
-// def_offmap(192,196);
-// def_offmap(216,221);
-
// Qattara Depression and east of it
-// def_offmap(145,148);
-def_offmap(145,147);
+def_offmap(145,146);
def_offmap(168,172);
def_offmap(192,196);
def_offmap(216,221);
@@ -378,13 +362,20 @@ hex_name = {
99: "Map Edge",
148: "Map Edge",
197: "Map Edge",
+ 175: "Map Edge",
+
4: "Malta",
47: "Exited",
+ 53: "Exited",
48: "Return for Refit",
49: "Alexandria Queue",
102: "Return for Refit",
127: "El Agheila Queue",
+ 145: "Qattara Depression",
+ 146: "Qattara Depression",
+ 147: "Qattara Depression",
+
164: "Siwa Oasis NE NW",
123: "Alexandria SW SE",
}