added type definitions and translations for spells

This commit is contained in:
Gesina Schwalbe 2021-01-09 14:09:21 +01:00
parent 85d4384a3c
commit 090aeab75f
4 changed files with 117 additions and 1 deletions

View file

@ -36,6 +36,8 @@
"DS4.ItemTypeArmorPlural": "Armor",
"DS4.ItemTypeShield": "Shield",
"DS4.ItemTypeShieldPlural": "Shields",
"DS4.ItemTypeSpell": "Spell",
"DS4.ItemTypeSpellPlural": "Spells",
"DS4.ItemTypeTrinket": "Trinket",
"DS4.ItemTypeTrinketPlural": "Trinkets",
"DS4.ItemTypeEquipment": "Equipment",
@ -72,6 +74,17 @@
"DS4.ArmorMaterialTypeChainAbbr": "Chain",
"DS4.ArmorMaterialTypePlate": "Plate",
"DS4.ArmorMaterialTypePlateAbbr": "Plate",
"DS4.SpellType": "Spell Type",
"DS4.SpellTypeSpellcasting": "Spellcasting",
"DS4.SpellTypeTargetedSpell": "Targeted Spell",
"DS4.SpellCategory": "Spell Category",
"DS4.SpellCategoryHealing": "Healing",
"DS4.SpellCategoryFire": "Fire",
"DS4.SpellCategoryIce": "Ice",
"DS4.SpellCategoryLight": "Light",
"DS4.SpellCategoryDarkness": "Darkness",
"DS4.SpellCategoryMindAffecting": "Mind Affecting",
"DS4.SpellCategoryElectricity": "Electricity",
"DS4.AttributeBody": "Body",
"DS4.AttributeMobility": "Mobility",
"DS4.AttributeMind": "Mind",
@ -115,5 +128,19 @@
"DS4.ProfileSpecialCharacteristics": "Special Characteristics",
"DS4.WarningManageActiveEffectOnOwnedItem": "Managing Active Effects within an Owned Item is not currently supported and will be added in a subsequent update.",
"DS4.ErrorDiceCritOverlap": "There's an overlap between Fumbles and Coups",
"DS4.ErrorExplodingRecursionLimitExceeded": "Maximum recursion depth for exploding dice roll exceeded"
"DS4.ErrorExplodingRecursionLimitExceeded": "Maximum recursion depth for exploding dice roll exceeded",
"DS4.UnitRounds": "Rounds",
"DS4.UnitRoundsAbbr": "rnd",
"DS4.UnitMinutes": "Minutes",
"DS4.UnitMinutesAbbr": "min",
"DS4.UnitHours": "Hours",
"DS4.UnitHoursAbbr": "h",
"DS4.UnitDays": "Days",
"DS4.UnitDaysAbbr": "d",
"DS4.UnitMeters": "Meters",
"DS4.UnitMetersAbbr": "m",
"DS4.UnitKilometers": "Kilometers",
"DS4.UnitKilometersAbbr": "km",
"DS4.UnitCustom": "Custom",
"DS4.UnitCustomAbbr": "-"
}

View file

@ -46,6 +46,7 @@ export const DS4 = {
weapon: "DS4.ItemTypeWeapon",
armor: "DS4.ItemTypeArmor",
shield: "DS4.ItemTypeShield",
spell: "DS4.ItemTypeSpell",
trinket: "DS4.ItemTypeTrinket",
equipment: "DS4.ItemTypeEquipment",
talent: "DS4.ItemTypeTalent",
@ -96,6 +97,21 @@ export const DS4 = {
plate: "DS4.ArmorMaterialTypePlateAbbr",
},
spellType: {
spellcasting: "DS4.SpellTypeSpellcasting",
targetedSpell: "DS4.SpellTypeTargetedSpell",
},
spellCategory: {
healing: "DS4.SpellCategoryHealing",
fire: "DS4.SpellCategoryFire",
ice: "DS4.SpellCategoryIce",
light: "DS4.SpellCategoryLight",
darkness: "DS4.SpellCategoryDarkness",
mindAffecting: "DS4.SpellCategoryMindAffecting",
electricity: "DS4.SpellCategoryElectricity",
},
/**
* Define the set of attributes a character has
*/
@ -188,4 +204,30 @@ export const DS4 = {
eyeColor: "String",
specialCharacteristics: "String",
},
/**
* Define translations for available units
*/
units: {
rounds: "DS4.UnitRounds",
minutes: "DS4.UnitMinutes",
hours: "DS4.UnitHours",
days: "DS4.UnitHours",
meter: "DS4.UnitMeters",
kilometer: "DS4.UnitKilometers",
custom: "DS4.UnitCustom",
},
/**
* Define abbreviations for available units
*/
unitsAbbr: {
rounds: "DS4.UnitRoundsAbbr",
minutes: "DS4.UnitMinutesAbbr",
hours: "DS4.UnitHoursAbbr",
days: "DS4.UnitHoursAbbr",
meter: "DS4.UnitMetersAbbr",
kilometer: "DS4.UnitKilometersAbbr",
custom: "DS4.UnitCustomAbbr",
},
};

View file

@ -4,6 +4,7 @@ export type DS4ItemDataType =
| DS4Weapon
| DS4Armor
| DS4Shield
| DS4Spell
| DS4Trinket
| DS4Equipment
| DS4Talent
@ -32,6 +33,25 @@ interface DS4TalentRank extends ModifiableData<number> {
max: number;
}
interface DS4Spell extends DS4ItemBase, DS4ItemEquipable {
spellType: "spellcasting" | "targetedSpell";
bonus: string;
spellCategory:
| "healing"
| "fire"
| "ice"
| "light"
| "darkness"
| "mindAffecting"
| "electricity"
| "none"
| "unset";
maxDistance: UnitData<DistanceUnit>;
effectRadius: UnitData<DistanceUnit>;
duration: UnitData<TemporalUnit>;
scrollPrice: number;
}
interface DS4Shield extends DS4ItemBase, DS4ItemPhysical, DS4ItemEquipable, DS4ItemProtective {}
interface DS4Trinket extends DS4ItemBase, DS4ItemPhysical, DS4ItemEquipable {}
interface DS4Equipment extends DS4ItemBase, DS4ItemPhysical {}
@ -62,3 +82,10 @@ interface DS4ItemEquipable {
interface DS4ItemProtective {
armorValue: number;
}
interface UnitData<UnitType> {
value: string;
unit: UnitType;
}
type TemporalUnit = "rounds" | "minutes" | "hours" | "days" | "custom";
type DistanceUnit = "meter" | "kilometer" | "custom";

View file

@ -115,6 +115,7 @@
"weapon",
"armor",
"shield",
"spell",
"trinket",
"equipment",
"talent",
@ -175,6 +176,25 @@
},
"alphabet": {
"templates": ["base"]
},
"spell": {
"templates": ["base", "equipable"],
"spellType": "spellcasting",
"bonus": "",
"spellCategory": "unset",
"maxDistance": {
"value": "",
"unit": "meter"
},
"effectRadius": {
"value": "",
"unit": "meter"
},
"duration": {
"value": "",
"unit": "custom"
},
"scrollPrice": 0
}
}
}