diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-07-05 12:43:23 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-16 19:19:39 +0100 |
commit | c75625d5c4b898bbb67a60344663d93b05ba4458 (patch) | |
tree | 32f87de39cd8c05ec5d69728cb5f91805b531410 /data.js | |
parent | c776ac14de2c86385421138af0c1267340e6a26d (diff) | |
download | crusader-rex-c75625d5c4b898bbb67a60344663d93b05ba4458.tar.gz |
crusader: Remove dead code and other ESLint fixes.
Diffstat (limited to 'data.js')
-rw-r--r-- | data.js | 31 |
1 files changed, 14 insertions, 17 deletions
@@ -35,11 +35,11 @@ const ROADS = {}; const SHIELDS = { Antioch: [ "Bohemond", "Templars", "Turcopoles" ], - Latakia: [ "Bohemond" ], - "Sa\xf4ne": [ "Josselin" ], - Margat: [ "Hospitallers" ], - Krak: [ "Hospitallers" ], - Tartus: [ "Templars" ], + Latakia: [ "Bohemond" ], + "Sa\xf4ne": [ "Josselin" ], + Margat: [ "Hospitallers" ], + Krak: [ "Hospitallers" ], + Tartus: [ "Templars" ], Tripoli: [ "Bohemond", "Raymond" ], Beirut: [ "Turcopoles", "King Guy" ], Sidon: [ "Reynald (Sidon)" ], @@ -49,7 +49,6 @@ const SHIELDS = { Tiberias: [ "Turcopoles", "Raymond" ], Baisan: [ "Hospitallers" ], Caesarea: [ "Walter" ], - Baisan: [ "Hospitallers" ], Nablus: [ "Balian" ], Amman: [ "Templars" ], Jaffa: [ "King Guy" ], @@ -137,17 +136,15 @@ const TOWNS = { const PORTS = []; (function () { - let r = 1, c = 1; - let nomads = { Arabs: 1, Turks: 1, Kurds: 1 } function army(rc, owner, name, home, move, steps, combat, order, plural) { let id = name; - if (order == 'Military Orders' || order == 'Pilgrims' || order == 'Turcopoles') + if (order === 'Military Orders' || order === 'Pilgrims' || order === 'Turcopoles') id = home + " " + name; - if (order == 'Nomads') + if (order === 'Nomads') id += " " + nomads[name]++; - if (name == 'Reynald' || name == 'Raymond') + if (name === 'Reynald' || name === 'Raymond') id += " (" + home + ")"; if (id in BLOCKS) throw Error("Name clash: " + id + " order:"+order + " " + JSON.stringify(nomads)); @@ -248,19 +245,19 @@ const PORTS = []; saracen(97, "Arabs", "Egypt", 3, 4, "B1", "Nomads", 1); saracen(87, "Arabs", "Egypt", 3, 4, "B1", "Nomads", 1); - function town(axis, major, minor, wrap, region, name, rating, type) { + function town(axis, major_align, minor_align, wrap, region, name, rating, type) { TOWNS[name].region = region; TOWNS[name].rating = rating; - if (type == 'port' || type == 'fortified-port') + if (type === 'port' || type === 'fortified-port') TOWNS[name].port = true; - if (type == 'fortified-port') + if (type === 'fortified-port') TOWNS[name].fortified_port = true; if (TOWNS[name].port) PORTS.push(name); TOWNS[name].exits = []; TOWNS[name].layout_axis = axis; - TOWNS[name].layout_major = 1-major; - TOWNS[name].layout_minor = 1-minor; + TOWNS[name].layout_major = 1 - major_align; + TOWNS[name].layout_minor = 1 - minor_align; TOWNS[name].wrap = wrap; } @@ -443,5 +440,5 @@ const PORTS = []; // TODO: seats and alternate seats })(); -if (typeof module != 'undefined') +if (typeof module !== 'undefined') module.exports = { CARDS, BLOCKS, TOWNS, PORTS, ROADS, SHIELDS } |