diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-11-19 15:57:35 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 13:02:37 +0100 |
commit | 9f4f9fa375afb5212d30809543ccd60d3d7058cf (patch) | |
tree | f4c35d9ef61c517d85c1f6749fd2e31c8e96d501 /tools/gendata.js | |
parent | 799a18a9f6d90bb8aa2466863a0f7a31cc61eb05 (diff) | |
download | nevsky-9f4f9fa375afb5212d30809543ccd60d3d7058cf.tar.gz |
Add "this_lord" to capabilities. Add timing info to events.
Diffstat (limited to 'tools/gendata.js')
-rw-r--r-- | tools/gendata.js | 161 |
1 files changed, 81 insertions, 80 deletions
diff --git a/tools/gendata.js b/tools/gendata.js index 54da50a..3b5ece1 100644 --- a/tools/gendata.js +++ b/tools/gendata.js @@ -590,14 +590,15 @@ let cards = [] function cmpnum(a,b) { return a - b } -function arts_of_war_event(name, event) { - let c = { name, event, capability: null, lords: null } +function arts_of_war_event(name, event, when) { + let c = { name, event, when, capability: null, this_lord: false, lords: null } cards.push(c) AOW[name] = c } -function arts_of_war_capability(name, capability, lord_names) { +function arts_of_war_capability(name, capability, this_lord, lord_names) { AOW[name].capability = capability + AOW[name].this_lord = this_lord if (lord_names === "ALL") { AOW[name].lords = null } @@ -611,87 +612,87 @@ function arts_of_war_capability(name, capability, lord_names) { } } -arts_of_war_event("T1", "Grand Prince") -arts_of_war_event("T2", "Torzhok") -arts_of_war_event("T3", "Vodian Treachery") -arts_of_war_event("T4", "Bridge") -arts_of_war_event("T5", "Marsh") -arts_of_war_event("T6", "Ambush") -arts_of_war_event("T7", "Tverdilo") -arts_of_war_event("T8", "Teutonic Fervor") -arts_of_war_event("T9", "Hill") -arts_of_war_event("T10", "Field Organ") -arts_of_war_event("T11", "Pope Gregory") -arts_of_war_event("T12", "Khan Baty") -arts_of_war_event("T13", "Heinrich Sees the Curia") -arts_of_war_event("T14", "Bountiful Harvest") -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("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") -arts_of_war_capability("T3", "Converts", "any") -arts_of_war_capability("T4", "Balistarii", "any") -arts_of_war_capability("T5", "Balistarii", "any") -arts_of_war_capability("T6", "Balistarii", "any") -arts_of_war_capability("T7", "Warrior Monks", [ "Andreas", "Rudolf" ]) -arts_of_war_capability("T8", "Hillforts", "ALL") -arts_of_war_capability("T9", "Halbbrüder", [ "Andreas", "Rudolf" ]) -arts_of_war_capability("T10", "Halbbrüder", [ "Andreas", "Rudolf" ]) -arts_of_war_capability("T11", "Crusade", [ "Andreas", "Rudolf" ]) -arts_of_war_capability("T12", "Ordensburgen", "ALL") -arts_of_war_capability("T13", "William of Modena", "ALL") -arts_of_war_capability("T14", "Trebuchets", "any") -arts_of_war_capability("T15", "Warrior Monks", [ "Andreas", "Rudolf" ]) -arts_of_war_capability("T16", "Ransom", "ALL") -arts_of_war_capability("T17", "Stonemasons", "any") -arts_of_war_capability("T18", "Cogs", [ "Heinrich", "Knud & Abel", "Andreas" ]) - -arts_of_war_event("R1", "Bridge") -arts_of_war_event("R2", "Marsh") -arts_of_war_event("R3", "Pogost") -arts_of_war_event("R4", "Raven's Rock") -arts_of_war_event("R5", "Hill") -arts_of_war_event("R6", "Ambush") -arts_of_war_event("R7", "Famine") -arts_of_war_event("R8", "Prince of Polotsk") -arts_of_war_event("R9", "Osilian Revolt") -arts_of_war_event("R10", "Batu Khan") -arts_of_war_event("R11", "Valdemar") -arts_of_war_event("R12", "Mindaugas") -arts_of_war_event("R13", "Pelgui") -arts_of_war_event("R14", "Prussian Revolt") -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("T1", "Grand Prince", "now") +arts_of_war_event("T2", "Torzhok", "now") +arts_of_war_event("T3", "Vodian Treachery", "hold") +arts_of_war_event("T4", "Bridge", "hold") +arts_of_war_event("T5", "Marsh", "hold") +arts_of_war_event("T6", "Ambush", "hold") +arts_of_war_event("T7", "Tverdilo", "hold") +arts_of_war_event("T8", "Teutonic Fervor", "hold") +arts_of_war_event("T9", "Hill", "hold") +arts_of_war_event("T10", "Field Organ", "hold") +arts_of_war_event("T11", "Pope Gregory", "now") +arts_of_war_event("T12", "Khan Baty", "now") +arts_of_war_event("T13", "Heinrich Sees the Curia", "hold") +arts_of_war_event("T14", "Bountiful Harvest", "now") +arts_of_war_event("T15", "Mindaugas", "now") +arts_of_war_event("T16", "Famine", "this_campaign") +arts_of_war_event("T17", "Dietrich von Grüningen", "hold") +arts_of_war_event("T18", "Swedish Crusade", "now") +arts_of_war_event("T0", "No Event", "now") +arts_of_war_event("T0", "No Event", "now") +arts_of_war_event("T0", "No Event", "now") + +arts_of_war_capability("T1", "Treaty of Stensby", false, [ "Heinrich", "Knud & Abel" ]) +arts_of_war_capability("T2", "Raiders", true, "any") +arts_of_war_capability("T3", "Converts", true, "any") +arts_of_war_capability("T4", "Balistarii", true, "any") +arts_of_war_capability("T5", "Balistarii", true, "any") +arts_of_war_capability("T6", "Balistarii", true, "any") +arts_of_war_capability("T7", "Warrior Monks", true, [ "Andreas", "Rudolf" ]) +arts_of_war_capability("T8", "Hillforts", false, "ALL") +arts_of_war_capability("T9", "Halbbrüder", true, [ "Andreas", "Rudolf" ]) +arts_of_war_capability("T10", "Halbbrüder", true, [ "Andreas", "Rudolf" ]) +arts_of_war_capability("T11", "Crusade", false, [ "Andreas", "Rudolf" ]) +arts_of_war_capability("T12", "Ordensburgen", false, "ALL") +arts_of_war_capability("T13", "William of Modena", false, "ALL") +arts_of_war_capability("T14", "Trebuchets", true, "any") +arts_of_war_capability("T15", "Warrior Monks", false, [ "Andreas", "Rudolf" ]) +arts_of_war_capability("T16", "Ransom", false, "ALL") +arts_of_war_capability("T17", "Stonemasons", true, "any") +arts_of_war_capability("T18", "Cogs", true, [ "Heinrich", "Knud & Abel", "Andreas" ]) + +arts_of_war_event("R1", "Bridge", "hold") +arts_of_war_event("R2", "Marsh", "hold") +arts_of_war_event("R3", "Pogost", "hold") +arts_of_war_event("R4", "Raven's Rock", "hold") +arts_of_war_event("R5", "Hill", "hold") +arts_of_war_event("R6", "Ambush", "hold") +arts_of_war_event("R7", "Famine", "this_campaign") +arts_of_war_event("R8", "Prince of Polotsk", "hold") +arts_of_war_event("R9", "Osilian Revolt", "now") +arts_of_war_event("R10", "Batu Khan", "now") +arts_of_war_event("R11", "Valdemar", "this_levy") +arts_of_war_event("R12", "Mindaugas", "now") +arts_of_war_event("R13", "Pelgui", "hold") +arts_of_war_event("R14", "Prussian Revolt", "now") +arts_of_war_event("R15", "Death of the Pope", "this_levy") +arts_of_war_event("R16", "Tempest", "now") +arts_of_war_event("R17", "Dietrich von Grüningen", "this_levy") +arts_of_war_event("R18", "Bountiful Harvest", "now") 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" ]) -arts_of_war_capability("R3", "Streltsy", [ "Aleksandr", "Andrey", "Domash", "Gavrilo", "Vladislav" ]) // NOT Karelians -arts_of_war_capability("R4", "Smerdi", "ALL") -arts_of_war_capability("R5", "Druzhina", [ "Aleksandr", "Andrey", "Gavrilo" ]) -arts_of_war_capability("R6", "Druzhina", [ "Aleksandr", "Andrey", "Gavrilo" ]) -arts_of_war_capability("R7", "Ransom", "ALL") -arts_of_war_capability("R8", "Black Sea Trade", "ALL") -arts_of_war_capability("R9", "Baltic Sea Trade", "ALL") -arts_of_war_capability("R10", "Steppe Warriors", [ "Aleksandr", "Andrey" ]) -arts_of_war_capability("R11", "House of Suzdal", [ "Aleksandr", "Andrey" ]) -arts_of_war_capability("R12", "Raiders", "any") -arts_of_war_capability("R13", "Streltsy", [ "Aleksandr", "Andrey", "Domash", "Gavrilo", "Vladislav" ]) // NOT Karelians -arts_of_war_capability("R14", "Raiders", "any") -arts_of_war_capability("R15", "Archbishopric", "any") -arts_of_war_capability("R16", "Lodya", "any") -arts_of_war_capability("R17", "Veliky Knyaz", "any") -arts_of_war_capability("R18", "Stone Kremlin", "any") +arts_of_war_capability("R1", "Luchniki", true, [ "Vladislav", "Karelians", "Gavrilo", "Domash" ]) +arts_of_war_capability("R2", "Luchniki", true, [ "Vladislav", "Karelians", "Gavrilo", "Domash" ]) +arts_of_war_capability("R3", "Streltsy", true, [ "Aleksandr", "Andrey", "Domash", "Gavrilo", "Vladislav" ]) // NOT Karelians +arts_of_war_capability("R4", "Smerdi", false, "ALL") +arts_of_war_capability("R5", "Druzhina", true, [ "Aleksandr", "Andrey", "Gavrilo" ]) +arts_of_war_capability("R6", "Druzhina", true, [ "Aleksandr", "Andrey", "Gavrilo" ]) +arts_of_war_capability("R7", "Ransom", false, "ALL") +arts_of_war_capability("R8", "Black Sea Trade", false, "ALL") +arts_of_war_capability("R9", "Baltic Sea Trade", false, "ALL") +arts_of_war_capability("R10", "Steppe Warriors", false, [ "Aleksandr", "Andrey" ]) +arts_of_war_capability("R11", "House of Suzdal", true, [ "Aleksandr", "Andrey" ]) +arts_of_war_capability("R12", "Raiders", true, "any") +arts_of_war_capability("R13", "Streltsy", true, [ "Aleksandr", "Andrey", "Domash", "Gavrilo", "Vladislav" ]) // NOT Karelians +arts_of_war_capability("R14", "Raiders", true, "any") +arts_of_war_capability("R15", "Archbishopric", false, "any") +arts_of_war_capability("R16", "Lodya", true, "any") +arts_of_war_capability("R17", "Veliky Knyaz", true, "any") +arts_of_war_capability("R18", "Stone Kremlin", true, "any") let vassals = [] for (let lord of lords) |