summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-11-14 01:00:21 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 13:02:37 +0100
commitaac59e22580aae1bfdfc7c1712599a06b47fd34b (patch)
tree5d8a3573d896a391f410a88240830dde0b703fc1 /tools
parentb58d9ffdcb67564d751ad5a3206744be527063ee (diff)
downloadnevsky-aac59e22580aae1bfdfc7c1712599a06b47fd34b.tar.gz
More rules.
Diffstat (limited to 'tools')
-rw-r--r--tools/gendata.js31
1 files changed, 20 insertions, 11 deletions
diff --git a/tools/gendata.js b/tools/gendata.js
index d72e43b..54da50a 100644
--- a/tools/gendata.js
+++ b/tools/gendata.js
@@ -94,18 +94,18 @@ var trackways = []
const scale = 1
const vp_map = {
- archbishopric: 3,
+ novgorod: 3,
city: 2,
fort: 1,
bishopric: 2,
castle: 1,
traderoute: 1,
- town: 0.5,
- region: 0.5,
+ town: 0,
+ region: 0,
}
const wall_map = {
- archbishopric: 3,
+ novgorod: 3,
city: 3,
fort: 3,
traderoute: 0,
@@ -115,6 +115,9 @@ const wall_map = {
region: 0,
}
+let conquerable = []
+let strongholds = []
+
function defloc(region, stronghold, type, name) {
let [x, y, w, h] = boxes[name]
x = Math.round(x * scale)
@@ -124,6 +127,10 @@ function defloc(region, stronghold, type, name) {
locmap[name] = locales.length
let vp = vp_map[type]
let walls = wall_map[type]
+ if (vp > 0)
+ conquerable.push(locales.length)
+ if (stronghold > 0)
+ strongholds.push(locales.length)
locales.push({ name, type, stronghold, walls, vp, region, ways: [], box: { x, y, w, h } })
}
@@ -174,7 +181,7 @@ defloc("Crusader Livonia", 0, "region", "Tolowa")
defloc("Crusader Livonia", 0, "region", "Ugaunia")
defloc("Crusader Livonia", 0, "region", "Waiga")
-defloc("Novgorodan Rus", 3, "archbishopric", "Novgorod")
+defloc("Novgorodan Rus", 3, "novgorod", "Novgorod")
defloc("Novgorodan Rus", 3, "city", "Ladoga")
defloc("Novgorodan Rus", 3, "city", "Pskov")
defloc("Novgorodan Rus", 3, "city", "Rusa")
@@ -622,9 +629,9 @@ arts_of_war_event("T15", "Mindaugas")
arts_of_war_event("T16", "Famine")
arts_of_war_event("T17", "Dietrich von GrĂ¼ningen")
arts_of_war_event("T18", "Swedish Crusade")
-arts_of_war_event("TNo", "No Event")
-arts_of_war_event("TNo", "No Event")
-arts_of_war_event("TNo", "No Event")
+arts_of_war_event("T0", "No Event")
+arts_of_war_event("T0", "No Event")
+arts_of_war_event("T0", "No Event")
arts_of_war_capability("T1", "Treaty of Stensby", [ "Heinrich", "Knud & Abel" ])
arts_of_war_capability("T2", "Raiders", "any")
@@ -663,9 +670,9 @@ arts_of_war_event("R15", "Death of the Pope")
arts_of_war_event("R16", "Tempest")
arts_of_war_event("R17", "Dietrich von GrĂ¼ningen")
arts_of_war_event("R18", "Bountiful Harvest")
-arts_of_war_event("RNo", "No Event")
-arts_of_war_event("RNo", "No Event")
-arts_of_war_event("RNo", "No Event")
+arts_of_war_event("R0", "No Event")
+arts_of_war_event("R0", "No Event")
+arts_of_war_event("R0", "No Event")
arts_of_war_capability("R1", "Luchniki", [ "Vladislav", "Karelians", "Gavrilo", "Domash" ])
arts_of_war_capability("R2", "Luchniki", [ "Vladislav", "Karelians", "Gavrilo", "Domash" ])
@@ -803,6 +810,8 @@ script.push("montage -mode concatenate -tile 2x " + vassal_service.Russian.join(
print("const data = {")
print("seaports:" + JSON.stringify(seaports) + ",")
+print("conquerable:" + JSON.stringify(conquerable) + ",")
+print("strongholds:" + JSON.stringify(strongholds) + ",")
dumplist("locales", locales)
dumplist("ways", ways)
dumplist("lords", lords)