From 4de9d42ee38dc13efd987f23dfa57bb3227c921a Mon Sep 17 00:00:00 2001 From: Gesina Schwalbe Date: Sat, 9 Jan 2021 18:25:30 +0100 Subject: [PATCH] added spell cooldownDuration and more localization --- src/lang/en.json | 12 +++++++++--- src/module/config.ts | 35 ++++++++++++++++++++++++----------- src/module/ds4.ts | 6 ++++++ src/module/item/item-data.ts | 1 + src/template.json | 4 ++++ 5 files changed, 44 insertions(+), 14 deletions(-) diff --git a/src/lang/en.json b/src/lang/en.json index c0235a56..8e047af4 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -77,7 +77,7 @@ "DS4.SpellType": "Spell Type", "DS4.SpellTypeSpellcasting": "Spellcasting", "DS4.SpellTypeTargetedSpell": "Targeted Spell", - "DS4.SpellCategory": "Spell Category", + "DS4.SpellCategory": "Category", "DS4.SpellCategoryHealing": "Healing", "DS4.SpellCategoryFire": "Fire", "DS4.SpellCategoryIce": "Ice", @@ -85,6 +85,12 @@ "DS4.SpellCategoryDarkness": "Darkness", "DS4.SpellCategoryMindAffecting": "Mind Affecting", "DS4.SpellCategoryElectricity": "Electricity", + "DS4.SpellBonus": "Spell Bonus", + "DS4.SpellMaxDistance": "Range", + "DS4.SpellEffectRadius": "Radius", + "DS4.SpellDuration": "Duration", + "DS4.SpellCooldownDuration": "Cooldown", + "DS4.SpellScrollPriceGold": "Scroll Price (Gold)", "DS4.AttributeBody": "Body", "DS4.AttributeMobility": "Mobility", "DS4.AttributeMind": "Mind", @@ -100,8 +106,8 @@ "DS4.CombatValuesMovement": "Movement", "DS4.CombatValuesMeleeAttack": "Melee Attack", "DS4.CombatValuesRangedAttack": "Ranged Attack", - "DS4.CombatValuesSpellcasting": "Spellcasting", - "DS4.CombatValuesTargetedSpellcasting": "Targeted Spellcasting", + "DS4.CombatValuesSpellcasting": "Normal", + "DS4.CombatValuesTargetedSpellcasting": "Targeted", "DS4.BaseInfoRace": "Race", "DS4.BaseInfoClass": "Class", "DS4.BaseInfoHeroClass": "Hero Class", diff --git a/src/module/config.ts b/src/module/config.ts index 88053370..5ce89295 100644 --- a/src/module/config.ts +++ b/src/module/config.ts @@ -97,12 +97,12 @@ export const DS4 = { plate: "DS4.ArmorMaterialTypePlateAbbr", }, - spellType: { + spellTypes: { spellcasting: "DS4.SpellTypeSpellcasting", targetedSpell: "DS4.SpellTypeTargetedSpell", }, - spellCategory: { + spellCategories: { healing: "DS4.SpellCategoryHealing", fire: "DS4.SpellCategoryFire", ice: "DS4.SpellCategoryIce", @@ -206,28 +206,41 @@ export const DS4 = { }, /** - * Define translations for available units + * Define translations for available distance units */ - units: { + distanceUnits: { + meter: "DS4.UnitMeters", + kilometer: "DS4.UnitKilometers", + custom: "DS4.UnitCustom", + }, + /** + * Define abbreviations for available distance units + */ + distanceUnitsAbbr: { + meter: "DS4.UnitMetersAbbr", + kilometer: "DS4.UnitKilometersAbbr", + custom: "DS4.UnitCustomAbbr", + }, + + /** + * Define translations for available distance units + */ + temporalUnits: { rounds: "DS4.UnitRounds", minutes: "DS4.UnitMinutes", hours: "DS4.UnitHours", - days: "DS4.UnitHours", - meter: "DS4.UnitMeters", - kilometer: "DS4.UnitKilometers", + days: "DS4.UnitDays", custom: "DS4.UnitCustom", }, /** * Define abbreviations for available units */ - unitsAbbr: { + temporalUnitsAbbr: { rounds: "DS4.UnitRoundsAbbr", minutes: "DS4.UnitMinutesAbbr", hours: "DS4.UnitHoursAbbr", - days: "DS4.UnitHoursAbbr", - meter: "DS4.UnitMetersAbbr", - kilometer: "DS4.UnitKilometersAbbr", + days: "DS4.UnitDaysAbbr", custom: "DS4.UnitCustomAbbr", }, }; diff --git a/src/module/ds4.ts b/src/module/ds4.ts index a9d46ac2..738912f4 100644 --- a/src/module/ds4.ts +++ b/src/module/ds4.ts @@ -76,6 +76,8 @@ Hooks.once("setup", function () { "armorMaterialTypes", "armorMaterialTypesAbbr", "armorMaterialTypes", + "spellTypes", + "spellCategories", "attributes", "traits", "combatValues", @@ -83,6 +85,10 @@ Hooks.once("setup", function () { "progression", "language", "profile", + "temporalUnits", + "temporalUnitsAbbr", + "distanceUnits", + "distanceUnitsAbbr", ]; // Exclude some from sorting where the default order matters diff --git a/src/module/item/item-data.ts b/src/module/item/item-data.ts index e5be9081..aa779163 100644 --- a/src/module/item/item-data.ts +++ b/src/module/item/item-data.ts @@ -49,6 +49,7 @@ interface DS4Spell extends DS4ItemBase, DS4ItemEquipable { maxDistance: UnitData; effectRadius: UnitData; duration: UnitData; + cooldownDuration: UnitData; scrollPrice: number; } diff --git a/src/template.json b/src/template.json index 17d2ceca..0d723909 100644 --- a/src/template.json +++ b/src/template.json @@ -194,6 +194,10 @@ "value": "", "unit": "custom" }, + "cooldownDuration": { + "value": "", + "unit": "custom" + }, "scrollPrice": 0 } }