diff options
author | teisuru <31881306+teisuru@users.noreply.github.com> | 2023-08-31 16:29:20 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-12-10 18:16:55 +0100 |
commit | 1def1b2bb2b749bbf6e358875b6ebe1f8e7da8fb (patch) | |
tree | 13cad909137cbfb6931cf56118286b6fa56f3b7e | |
parent | dc71bfdbbcaa8f9ed27106e7d4711773f02612cf (diff) | |
download | plantagenet-1def1b2bb2b749bbf6e358875b6ebe1f8e7da8fb.tar.gz |
sail ways
-rw-r--r-- | data.js | 20 | ||||
-rw-r--r-- | rules.js | 7 | ||||
-rw-r--r-- | tools/gendata.js | 47 |
3 files changed, 67 insertions, 7 deletions
@@ -1,5 +1,23 @@ const data = { -seaports:[0,1,5,6,14,15,17,19,20,21,22,24,26,35,37,51,52,54,55,56,57,59,60], +seaports:[0,1,5,6,14,15,17,19,20,21,22,24,26,35,37,51,52,54,55,56,57,58,59,60], +exile_1:[55], +exile_2:[52], +exile_3:[54], +sea_1:[60], +sea_2:[58], +sea_3:[59], +port_1:[0,1,35,37,56,57], +port_2:[14,15,17,19,20,21,22,24,51], +port_3:[5,6,26], +way_exile_1:[0,1,35,37,55,56,57,60], +way_exile_2:[14,15,17,19,20,21,22,24,51,52,58], +way_exile_3:[5,6,26,54,59], +way_sea_1:[0,1,14,15,17,19,20,21,22,24,35,37,51,56,57,60], +way_sea_2:[0,1,5,6,14,15,17,19,20,21,22,24,26,35,37,51,56,57,58], +way_sea_3:[14,14,15,15,17,17,19,19,20,20,21,21,22,22,24,24,51,51,59], +way_port_1:[0,1,35,37,56,57,60], +way_port_2:[14,15,17,19,20,21,22,24,51,58], +way_port_3:[5,6,26,59], strongholds:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60], locales:[ {"name":"Bamburgh","type":"fortress","stronghold":1,"region":"North","ways":[[1,0]],"box":{"x":637,"y":300,"w":60,"h":45},"adjacent":[1],"adjacent_by_highway":[1],"adjacent_by_road":[],"adjacent_by_path":[],"highways":[[1,0]],"roads":[],"paths":[]}, @@ -3623,9 +3623,9 @@ states.sail = { let overflow_cart = 0 overflow_cart = (cart/2 - ships)*2 - if (overflow_prov <= 0 && overflow_cart <= 0) - { + if (overflow_prov <= 0 && overflow_cart <= 0) { view.prompt = `Sail: Select a destination Seaport.` + var port = data.locales[here] for (let to of data.seaports) { if (to === here) continue @@ -3651,9 +3651,6 @@ states.sail = { } } } - - - }, prov: drop_prov, cart: drop_cart, diff --git a/tools/gendata.js b/tools/gendata.js index 1260fac..b916056 100644 --- a/tools/gendata.js +++ b/tools/gendata.js @@ -715,8 +715,35 @@ road("Scarborough, York") road("York, Ravenspur") road("Ravenspur, Lincoln") +let way_sea_1 = ["North Sea", "Bamburgh", "Newcastle", "Scarborough", "Ravenspur", "Lynn", "Ipswich", "Dover", "Hastings", "Calais", "Arundel", "Southampton", "Dorchester", "Exeter", "Plymouth", "Truro"].map(name => locmap[name]).sort(cmpnum) +let way_sea_2 = ["Bristol","Pembroke","Harlech", "English Channel","Bamburgh", "Newcastle", "Scarborough", "Ravenspur", "Lynn", "Ipswich","Dover", "Hastings", "Calais", "Arundel", "Southampton", "Dorchester", "Exeter", "Plymouth", "Truro" ].map(name => locmap[name]).sort(cmpnum) +let way_sea_3 = ["Dover", "Hastings", "Calais", "Arundel", "Southampton", "Dorchester", "Exeter", "Plymouth", "Truro", "Dover", "Hastings", "Calais", "Arundel", "Southampton", "Dorchester", "Exeter", "Plymouth", "Truro","Irish Sea"].map(name => locmap[name]).sort(cmpnum) + +let way_exile_1 = ["Burgundy", "Bamburgh", "Newcastle", "Scarborough", "Ravenspur", "Lynn", "Ipswich", "North Sea"].map(name => locmap[name]).sort(cmpnum) +let way_exile_2 = ["France", "English Channel", "Dover", "Hastings", "Calais", "Arundel", "Southampton", "Dorchester", "Exeter", "Plymouth", "Truro"].map(name => locmap[name]).sort(cmpnum) +let way_exile_3 = ["Ireland", "Irish Sea", "Bristol","Pembroke","Harlech"].map(name => locmap[name]).sort(cmpnum) + +let way_port_1 = ["Bamburgh", "Newcastle", "Scarborough", "Ravenspur", "Lynn", "Ipswich", "North Sea"].map(name => locmap[name]).sort(cmpnum) +let way_port_2 = ["Dover", "Hastings", "Calais", "Arundel", "Southampton", "Dorchester", "Exeter", "Plymouth", "Truro", "English Channel"].map(name => locmap[name]).sort(cmpnum) +let way_port_3 = ["Bristol","Pembroke","Harlech", "Irish Sea"].map(name => locmap[name]).sort(cmpnum) + + + +let sea_1 = ["North Sea"].map(name => locmap[name]).sort(cmpnum) +let sea_2 = ["English Channel"].map(name => locmap[name]).sort(cmpnum) +let sea_3 = ["Irish Sea"].map(name => locmap[name]).sort(cmpnum) + +let exile_1 = ["Burgundy"].map(name => locmap[name]).sort(cmpnum) +let exile_2 = ["France"].map(name => locmap[name]).sort(cmpnum) +let exile_3 = ["Ireland"].map(name => locmap[name]).sort(cmpnum) + +let port_1 = ["Bamburgh", "Newcastle", "Scarborough", "Ravenspur", "Lynn", "Ipswich"].map(name => locmap[name]).sort(cmpnum) +let port_2 = ["Dover", "Hastings", "Calais", "Arundel", "Southampton", "Dorchester", "Exeter", "Plymouth", "Truro"].map(name => locmap[name]).sort(cmpnum) +let port_3 = ["Bristol","Pembroke","Harlech"].map(name => locmap[name]).sort(cmpnum) + + let seaports = [ - "Bamburgh", "Newcastle", "Scarborough", "Ravenspur", "Lynn", "Ipswich", "North Sea", "Burgundy", "Dover", "Hastings", "Calais", "France", "Arundel", "Southampton","Dorchester","Exeter","Plymouth","Truro","Bristol","Pembroke","Harlech", "Ireland", "Irish Sea" + "English Channel", "Bamburgh", "Newcastle", "Scarborough", "Ravenspur", "Lynn", "Ipswich", "North Sea", "Burgundy", "Dover", "Hastings", "Calais", "France", "Arundel", "Southampton","Dorchester","Exeter","Plymouth","Truro","Bristol","Pembroke","Harlech", "Ireland", "Irish Sea" ].map(name => locmap[name]).sort(cmpnum) function dumplist(name, list) { @@ -1673,6 +1700,24 @@ vassal(0, "Hastings", "none", 0, "Hastings") print("const data = {") print("seaports:" + JSON.stringify(seaports) + ",") +print("exile_1:" + JSON.stringify(exile_1) + ",") +print("exile_2:" + JSON.stringify(exile_2) + ",") +print("exile_3:" + JSON.stringify(exile_3) + ",") +print("sea_1:" + JSON.stringify(sea_1) + ",") +print("sea_2:" + JSON.stringify(sea_2) + ",") +print("sea_3:" + JSON.stringify(sea_3) + ",") +print("port_1:" + JSON.stringify(port_1) + ",") +print("port_2:" + JSON.stringify(port_2) + ",") +print("port_3:" + JSON.stringify(port_3) + ",") +print("way_exile_1:" + JSON.stringify(way_exile_1) + ",") +print("way_exile_2:" + JSON.stringify(way_exile_2) + ",") +print("way_exile_3:" + JSON.stringify(way_exile_3) + ",") +print("way_sea_1:" + JSON.stringify(way_sea_1) + ",") +print("way_sea_2:" + JSON.stringify(way_sea_2) + ",") +print("way_sea_3:" + JSON.stringify(way_sea_3) + ",") +print("way_port_1:" + JSON.stringify(way_port_1) + ",") +print("way_port_2:" + JSON.stringify(way_port_2) + ",") +print("way_port_3:" + JSON.stringify(way_port_3) + ",") print("strongholds:" + JSON.stringify(strongholds) + ",") dumplist("locales", locales) dumplist("ways", ways) |