diff --git a/src/lang/de.json b/src/lang/de.json index d5e4d4f7..2b719286 100644 --- a/src/lang/de.json +++ b/src/lang/de.json @@ -1,12 +1,15 @@ { "DS4.UserInteractionAddItem": "Neu", + "DS4.UserInteractionEditItem": "Bearbeiten", + "DS4.UserInteractionDeleteItem": "Löschen", "DS4.NotOwned": "Nicht besessen", - "DS4.HeadingDescription": "Beschreibung", + "DS4.HeadingBiography": "Biografie", "DS4.HeadingDetails": "Details", "DS4.HeadingEffects": "Effekte", "DS4.HeadingInventory": "Inventar", "DS4.HeadingProfile": "Profil", "DS4.HeadingTalents": "Talente & Fähigkeiten", + "DS4.HeadingSpells": "Zaubersprüche", "DS4.AttackType": "Angriffs Typ", "DS4.AttackTypeAbbr": "AT", "DS4.WeaponBonus": "Waffen Bonus", @@ -16,11 +19,13 @@ "DS4.AttackTypeMelee": "Schlagen", "DS4.AttackTypeRanged": "Schießen", "DS4.AttackTypeMeleeRanged": "Schlagen + Schießen", + "DS4.Description": "Beschreibung", "DS4.Quantity": "Menge", "DS4.PriceGold": "Preis (Gold)", "DS4.StorageLocation": "Wo gelagert", "DS4.ItemEquipped": "Ausgerüstet", - "DS4.ItemOwner": "Eigentümer", + "DS4.ItemEquippedAbbr": "A", + "DS4.ItemOwner": "Besitzer", "DS4.ItemAvailability": "Verfügbarkeit", "DS4.ItemAvailabilityHamlet": "Dorf", "DS4.ItemAvailabilityVilage": "Kleinstadt", @@ -36,6 +41,8 @@ "DS4.ItemTypeArmorPlural": "Panzerungen", "DS4.ItemTypeShield": "Schild", "DS4.ItemTypeShieldPlural": "Schilde", + "DS4.ItemTypeSpell": "Zauberspruch", + "DS4.ItemTypeSpellPlural": "Zaubersprüche", "DS4.ItemTypeTrinket": "Schmuckstück", "DS4.ItemTypeTrinketPlural": "Schmuckstücke", "DS4.ItemTypeEquipment": "Ausrüstung", @@ -72,6 +79,25 @@ "DS4.ArmorMaterialTypeChainAbbr": "Ketten", "DS4.ArmorMaterialTypePlate": "Platten", "DS4.ArmorMaterialTypePlateAbbr": "Platten", + "DS4.SpellType": "Zauberspruchtyp", + "DS4.SpellTypeAbbr": "T", + "DS4.SpellTypeSpellcasting": "Zaubern", + "DS4.SpellTypeTargetedSpellcasting": "Zielzaubern", + "DS4.SpellCategory": "Kategorie", + "DS4.SpellCategoryHealing": "Heilung", + "DS4.SpellCategoryFire": "Feuer", + "DS4.SpellCategoryIce": "Eis", + "DS4.SpellCategoryLight": "Licht", + "DS4.SpellCategoryDarkness": "Schatten", + "DS4.SpellCategoryMindAffecting": "Geistensbeeinflussend", + "DS4.SpellCategoryElectricity": "Elektrizität", + "DS4.SpellBonus": "Zauberbonus", + "DS4.SpellBonusAbbr": "ZB", + "DS4.SpellMaxDistance": "Reichweite", + "DS4.SpellEffectRadius": "Effektradius", + "DS4.SpellDuration": "Wirkdauer", + "DS4.SpellCooldownDuration": "Abklingzeit", + "DS4.SpellScrollPriceGold": "Schriftrollenpreis (Gold)", "DS4.AttributeBody": "Körper", "DS4.AttributeMobility": "Agilität", "DS4.AttributeMind": "Geist", @@ -115,5 +141,19 @@ "DS4.ProfileSpecialCharacteristics": "Besondere Eigenschaften", "DS4.WarningManageActiveEffectOnOwnedItem": "Das Verwalten von aktiven Effekten innerhalb eines besessen Items wird derzeit nicht unterstützt und wird in einem nachfolgenden Update hinzugefügt.", "DS4.ErrorDiceCritOverlap": "Es gibt eine Überlappung zwischen Patzern und Immersiegen.", - "DS4.ErrorExplodingRecursionLimitExceeded": "Die maximale Rekursionstiefe für slayende Würfelwürfe wurde überschritten." + "DS4.ErrorExplodingRecursionLimitExceeded": "Die maximale Rekursionstiefe für slayende Würfelwürfe wurde überschritten.", + "DS4.UnitRounds": "Runden", + "DS4.UnitRoundsAbbr": "Rnd", + "DS4.UnitMinutes": "Minuten", + "DS4.UnitMinutesAbbr": "min", + "DS4.UnitHours": "Stunden", + "DS4.UnitHoursAbbr": "h", + "DS4.UnitDays": "Tage", + "DS4.UnitDaysAbbr": "d", + "DS4.UnitMeters": "Meter", + "DS4.UnitMetersAbbr": "m", + "DS4.UnitKilometers": "Kilometer", + "DS4.UnitKilometersAbbr": "km", + "DS4.UnitCustom": "individuell", + "DS4.UnitCustomAbbr": " " } diff --git a/src/lang/en.json b/src/lang/en.json index 4f79f7ef..e6136a0f 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -1,12 +1,15 @@ { "DS4.UserInteractionAddItem": "Add item", + "DS4.UserInteractionEditItem": "Edit item", + "DS4.UserInteractionDeleteItem": "Delete item", "DS4.NotOwned": "No owner", - "DS4.HeadingDescription": "Description", + "DS4.HeadingBiography": "Biography", "DS4.HeadingDetails": "Details", "DS4.HeadingEffects": "Effects", "DS4.HeadingInventory": "Inventory", "DS4.HeadingProfile": "Profile", "DS4.HeadingTalents": "Talents & Abilities", + "DS4.HeadingSpells": "Spells", "DS4.AttackType": "Attack Type", "DS4.AttackTypeAbbr": "AT", "DS4.WeaponBonus": "Weapon Bonus", @@ -16,10 +19,12 @@ "DS4.AttackTypeMelee": "Melee", "DS4.AttackTypeRanged": "Ranged", "DS4.AttackTypeMeleeRanged": "Melee / Ranged", + "DS4.Description": "Description", "DS4.Quantity": "Quantity", "DS4.PriceGold": "Price (Gold)", "DS4.StorageLocation": "Stored at", "DS4.ItemEquipped": "Equipped", + "DS4.ItemEquippedAbbr": "E", "DS4.ItemOwner": "Owner", "DS4.ItemAvailability": "Availability", "DS4.ItemAvailabilityHamlet": "Hamlet", @@ -36,6 +41,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 +79,25 @@ "DS4.ArmorMaterialTypeChainAbbr": "Chain", "DS4.ArmorMaterialTypePlate": "Plate", "DS4.ArmorMaterialTypePlateAbbr": "Plate", + "DS4.SpellType": "Spell Type", + "DS4.SpellTypeAbbr": "T", + "DS4.SpellTypeSpellcasting": "Spellcasting", + "DS4.SpellTypeTargetedSpellcasting": "Targeted Spellcasting", + "DS4.SpellCategory": "Category", + "DS4.SpellCategoryHealing": "Healing", + "DS4.SpellCategoryFire": "Fire", + "DS4.SpellCategoryIce": "Ice", + "DS4.SpellCategoryLight": "Light", + "DS4.SpellCategoryDarkness": "Darkness", + "DS4.SpellCategoryMindAffecting": "Mind Affecting", + "DS4.SpellCategoryElectricity": "Electricity", + "DS4.SpellBonus": "Spell Bonus", + "DS4.SpellBonusAbbr": "SB", + "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", @@ -115,5 +141,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 Unit", + "DS4.UnitCustomAbbr": " " } diff --git a/src/module/actor/actor-sheet.ts b/src/module/actor/actor-sheet.ts index 978b7c6c..ca14fd0d 100644 --- a/src/module/actor/actor-sheet.ts +++ b/src/module/actor/actor-sheet.ts @@ -32,7 +32,7 @@ export class DS4ActorSheet extends ActorSheet { max: number; } +interface DS4Spell extends DS4ItemBase, DS4ItemEquipable { + spellType: "spellcasting" | "targetedSpellcasting"; + bonus: string; + spellCategory: + | "healing" + | "fire" + | "ice" + | "light" + | "darkness" + | "mindAffecting" + | "electricity" + | "none" + | "unset"; + maxDistance: UnitData; + effectRadius: UnitData; + duration: UnitData; + cooldownDuration: UnitData; + scrollPrice: number; +} + interface DS4Shield extends DS4ItemBase, DS4ItemPhysical, DS4ItemEquipable, DS4ItemProtective {} interface DS4Trinket extends DS4ItemBase, DS4ItemPhysical, DS4ItemEquipable {} interface DS4Equipment extends DS4ItemBase, DS4ItemPhysical {} @@ -62,3 +83,10 @@ interface DS4ItemEquipable { interface DS4ItemProtective { armorValue: number; } + +interface UnitData { + value: string; + unit: UnitType; +} +type TemporalUnit = "rounds" | "minutes" | "hours" | "days" | "custom"; +type DistanceUnit = "meter" | "kilometer" | "custom"; diff --git a/src/scss/components/_description.scss b/src/scss/components/_description.scss index cc4c1322..767fb516 100644 --- a/src/scss/components/_description.scss +++ b/src/scss/components/_description.scss @@ -9,12 +9,13 @@ .side-property { margin: 2px 0; display: grid; - grid-template-columns: minmax(30%, auto) auto; + grid-template-columns: 40% auto; justify-content: left; label { line-height: $default-input-height; font-weight: bold; + padding-right: 3pt; } input, @@ -30,6 +31,17 @@ height: 100%; margin: 0px; } + + .unit-data-pair { + display: flex; + flex-direction: row; + select { + width: 4em; + } + input { + max-width: 7em; + } + } } } diff --git a/src/template.json b/src/template.json index eee8acee..0d723909 100644 --- a/src/template.json +++ b/src/template.json @@ -115,6 +115,7 @@ "weapon", "armor", "shield", + "spell", "trinket", "equipment", "talent", @@ -175,6 +176,29 @@ }, "alphabet": { "templates": ["base"] + }, + "spell": { + "templates": ["base", "equipable"], + "spellType": "spellcasting", + "bonus": "", + "spellCategory": "unset", + "maxDistance": { + "value": "", + "unit": "meter" + }, + "effectRadius": { + "value": "", + "unit": "meter" + }, + "duration": { + "value": "", + "unit": "custom" + }, + "cooldownDuration": { + "value": "", + "unit": "custom" + }, + "scrollPrice": 0 } } } diff --git a/src/templates/actor/actor-sheet.hbs b/src/templates/actor/actor-sheet.hbs index 8e3e5f54..6763e440 100644 --- a/src/templates/actor/actor-sheet.hbs +++ b/src/templates/actor/actor-sheet.hbs @@ -58,26 +58,30 @@ {{!-- Sheet Tab Navigation --}} {{!-- Sheet Body --}}
- {{!-- Biography Tab --}} -
- {{editor content=data.biography target="data.biography" button=true owner=owner editable=editable}} -
+ {{!-- Items Tab --}} + {{> systems/ds4/templates/actor/partials/items-overview.hbs}} - {{! Profile Tab --}} - {{> systems/ds4/templates/actor/partials/profile.hbs}} + {{!-- Spells Tab --}} + {{> systems/ds4/templates/actor/partials/spells-overview.hbs}} {{!-- Talents Tab --}} {{> systems/ds4/templates/actor/partials/talents-overview.hbs}} - {{!-- Items Tab --}} - {{> systems/ds4/templates/actor/partials/items-overview.hbs}} + {{! Profile Tab --}} + {{> systems/ds4/templates/actor/partials/profile.hbs}} + + {{!-- Biography Tab --}} +
+ {{editor content=data.biography target="data.biography" button=true owner=owner editable=editable}} +
\ No newline at end of file diff --git a/src/templates/actor/partials/items-overview.hbs b/src/templates/actor/partials/items-overview.hbs index 676a9bfc..4dbd269b 100644 --- a/src/templates/actor/partials/items-overview.hbs +++ b/src/templates/actor/partials/items-overview.hbs @@ -37,7 +37,7 @@
  • {{!-- equipped --}} {{#if (ne dataType 'equipment')}} -
    E
    +
    {{localize 'DS4.ItemEquippedAbbr'}}
    {{/if}} {{!-- image --}}
    @@ -48,7 +48,7 @@ {{!-- item type specifics --}} {{> @partial-block }} {{!-- description --}} -
    {{localize 'DS4.HeadingDescription'}}
    +
    {{localize 'DS4.Description'}}
    {{!-- add button --}} {{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }}
  • @@ -78,10 +78,10 @@ {{!-- amount --}} + data-property="data.quantity" title="{{localize 'DS4.Quantity'}}" /> {{!-- name --}} + data-property="name" title="{{localize 'DS4.ItemName'}}" /> {{!-- item type specifics --}} {{> @partial-block}} {{!-- description --}} diff --git a/src/templates/actor/partials/spells-overview.hbs b/src/templates/actor/partials/spells-overview.hbs new file mode 100644 index 00000000..5338955c --- /dev/null +++ b/src/templates/actor/partials/spells-overview.hbs @@ -0,0 +1,86 @@ +{{!-- ======================================================================== --}} +{{!-- INLINE PARTIAL DEFINITIONS --}} +{{!-- ======================================================================== --}} + + +{{!-- +!-- Two templates for displaying values with unit. +!-- @param unitDatum: the object to display; must have a value and a unit attribute +!-- @param localizationString +!-- @param config: the config object +--}} +{{#*inline "temporalUnit"}} +
    + {{unitDatum.value}}{{lookup config.temporalUnitsAbbr unitDatum.unit}} +
    +{{/inline}} + +{{#*inline "distanceUnit"}} +
    + {{unitDatum.value}}{{lookup config.distanceUnitsAbbr unitDatum.unit}} +
    +{{/inline}} + + +{{!-- ======================================================================== --}} + + +
    +
      +
    1. + {{!-- equipped --}} +
      {{localize 'DS4.ItemEquippedAbbr'}}
      + {{!-- image --}} +
      + {{!-- name --}} +
      {{localize 'DS4.ItemName'}}
      + {{!-- spell type --}} +
      {{localize 'DS4.SpellTypeAbbr'}}
      + {{!-- spell bonus --}} +
      {{localize 'DS4.SpellBonusAbbr'}}
      + {{!-- max. distance --}} +
      + {{!-- duration --}} +
      + {{!-- cooldown duration --}} +
      + {{!-- description --}} + {{!--
      {{localize 'DS4.Description'}}
      --}} + {{!-- add button --}} + {{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='spell' }} +
    2. + {{#each itemsByType.spell as |item id|}} +
    3. + + {{!-- image --}} +
      + +
      + {{!-- name --}} + + {{!-- spell type --}} +
      + +
      + {{!-- spell bonus --}} + + {{!-- max. distance --}} + {{> distanceUnit localizationString='DS4.SpellMaxDistance' unitDatum=item.data.data.maxDistance config=../config}} + {{!-- duration --}} + {{> temporalUnit localizationString='DS4.SpellDuration' unitDatum=item.data.data.duration config=../config}} + {{!-- cooldown duration --}} + {{> temporalUnit localizationString='DS4.SpellCooldownDuration' unitDatum=item.data.data.cooldownDuration config=../config}} + {{!-- description --}} + {{!--
      {{{item.data.data.description}}}
      --}} + {{!-- control buttons --}} + {{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }} +
    4. + {{/each}} +
    +
    \ No newline at end of file diff --git a/src/templates/actor/partials/talents-overview.hbs b/src/templates/actor/partials/talents-overview.hbs index f4a06005..8ef93113 100644 --- a/src/templates/actor/partials/talents-overview.hbs +++ b/src/templates/actor/partials/talents-overview.hbs @@ -1,8 +1,6 @@ {{!-- ======================================================================== --}} {{!-- INLINE PARTIAL DEFINITIONS --}} {{!-- ======================================================================== --}} -{{!-- TODO: remove duplicate add and delete button definition --}} - {{!-- @@ -110,7 +108,7 @@ {{!-- name --}}
    {{localize 'DS4.ItemName'}}
    {{!-- description --}} -
    {{localize 'DS4.HeadingDescription'}}
    +
    {{localize 'DS4.Description'}}
    {{!-- add button --}} {{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }} @@ -132,7 +130,7 @@ {{!-- rank info --}}
    {{localize 'DS4.TalentRank'}}
    {{!-- description --}} -
    {{localize 'DS4.HeadingDescription'}}
    +
    {{localize 'DS4.Description'}}
    {{!-- add button --}} {{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='talent' }} diff --git a/src/templates/item/alphabet-sheet.hbs b/src/templates/item/alphabet-sheet.hbs index cfd63f9e..5aabb9aa 100644 --- a/src/templates/item/alphabet-sheet.hbs +++ b/src/templates/item/alphabet-sheet.hbs @@ -3,6 +3,6 @@ {{/systems/ds4/templates/item/partials/sheet-header.hbs}} {{!-- Common Item body --}} - {{> systems/ds4/templates/item/partials/body.hbs}} + {{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}} \ No newline at end of file diff --git a/src/templates/item/armor-sheet.hbs b/src/templates/item/armor-sheet.hbs index 1a2a14bf..5fd59feb 100644 --- a/src/templates/item/armor-sheet.hbs +++ b/src/templates/item/armor-sheet.hbs @@ -12,7 +12,7 @@
    - + -
    -
    - - -
    + + +
    + + +
    + \ No newline at end of file diff --git a/src/templates/item/racialAbility-sheet.hbs b/src/templates/item/racialAbility-sheet.hbs index 40771481..e69b5fc5 100644 --- a/src/templates/item/racialAbility-sheet.hbs +++ b/src/templates/item/racialAbility-sheet.hbs @@ -3,6 +3,6 @@ {{/systems/ds4/templates/item/partials/sheet-header.hbs}} {{!-- Common Item body --}} - {{> systems/ds4/templates/item/partials/body.hbs}} + {{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}} diff --git a/src/templates/item/shield-sheet.hbs b/src/templates/item/shield-sheet.hbs index 1c1092c3..4ef9c9f9 100644 --- a/src/templates/item/shield-sheet.hbs +++ b/src/templates/item/shield-sheet.hbs @@ -10,5 +10,5 @@ {{/systems/ds4/templates/item/partials/sheet-header.hbs}} {{!-- Common Item body --}} - {{> systems/ds4/templates/item/partials/body.hbs}} + {{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}} \ No newline at end of file diff --git a/src/templates/item/spell-sheet.hbs b/src/templates/item/spell-sheet.hbs new file mode 100644 index 00000000..5f2c7a28 --- /dev/null +++ b/src/templates/item/spell-sheet.hbs @@ -0,0 +1,72 @@ +{{!-- ======================================================================== --}} +{{!-- INLINE PARTIAL DEFINITIONS --}} +{{!-- ======================================================================== --}} + + +{{#*inline "unitDatum" }} +
    + +
    + + +
    +
    +{{/inline}} + + +{{!-- ======================================================================== --}} + + +
    + {{#> systems/ds4/templates/item/partials/sheet-header.hbs}} +
    +
    + + +
    +
    + + +
    +
    + {{/systems/ds4/templates/item/partials/sheet-header.hbs}} + + {{!-- Common Item body --}} + {{#> systems/ds4/templates/item/partials/body.hbs}} +
    + + +
    + {{> unitDatum data=data property='maxDistance' localizeString='DS4.SpellMaxDistance' unitType='distance' }} + {{> unitDatum data=data property='effectRadius' localizeString='DS4.SpellEffectRadius' unitType='distance' }} + {{> unitDatum data=data property='duration' localizeString='DS4.SpellDuration' unitType='temporal' }} + {{> unitDatum data=data property='cooldownDuration' localizeString='DS4.SpellCooldownDuration' unitType='temporal' }} +
    + + +
    + {{/systems/ds4/templates/item/partials/body.hbs}} + +
    diff --git a/src/templates/item/talent-sheet.hbs b/src/templates/item/talent-sheet.hbs index 1611beea..22257d81 100644 --- a/src/templates/item/talent-sheet.hbs +++ b/src/templates/item/talent-sheet.hbs @@ -27,6 +27,6 @@ {{/systems/ds4/templates/item/partials/sheet-header.hbs}} {{!-- Common Item body --}} - {{> systems/ds4/templates/item/partials/body.hbs}} + {{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}} diff --git a/src/templates/item/trinket-sheet.hbs b/src/templates/item/trinket-sheet.hbs index 3fa5d4a9..bbd66400 100644 --- a/src/templates/item/trinket-sheet.hbs +++ b/src/templates/item/trinket-sheet.hbs @@ -3,5 +3,5 @@ {{/systems/ds4/templates/item/partials/sheet-header.hbs}} {{!-- Common Item body --}} - {{> systems/ds4/templates/item/partials/body.hbs}} + {{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}} \ No newline at end of file diff --git a/src/templates/item/weapon-sheet.hbs b/src/templates/item/weapon-sheet.hbs index 69145376..b92bf97f 100644 --- a/src/templates/item/weapon-sheet.hbs +++ b/src/templates/item/weapon-sheet.hbs @@ -25,5 +25,5 @@ {{/systems/ds4/templates/item/partials/sheet-header.hbs}} {{!-- Common Item body --}} - {{> systems/ds4/templates/item/partials/body.hbs}} + {{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}} \ No newline at end of file