2021-06-26 22:02:00 +02:00
|
|
|
{{!--
|
|
|
|
SPDX-FileCopyrightText: 2021 Johannes Loher
|
|
|
|
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
|
|
|
|
|
|
|
SPDX-License-Identifier: MIT
|
|
|
|
--}}
|
|
|
|
|
2021-01-09 23:39:35 +01:00
|
|
|
{{!-- ======================================================================== --}}
|
|
|
|
{{!-- INLINE PARTIAL DEFINITIONS --}}
|
|
|
|
{{!-- ======================================================================== --}}
|
|
|
|
|
2021-01-16 23:47:05 +01:00
|
|
|
{{!--
|
|
|
|
!-- Base template to display a value with unit.
|
2021-01-09 23:39:35 +01:00
|
|
|
!-- @param unitDatum: the object to display; must have a value and a unit attribute
|
2021-02-26 01:08:55 +01:00
|
|
|
!-- @param titleKey: The key of the localized title to use.
|
2021-01-16 23:47:05 +01:00
|
|
|
!-- @param unitNames: mapping of allowed unitDatum.unit values to localized unit name
|
|
|
|
!-- @param unitAbbrs: mapping of allowed unitDatum.unit values to unit abbreviation
|
2021-01-09 23:39:35 +01:00
|
|
|
--}}
|
2021-01-16 23:47:05 +01:00
|
|
|
{{#*inline "unit"}}
|
2021-02-26 01:08:55 +01:00
|
|
|
<div title="{{localize titleKey}} [{{lookup unitNames unitDatum.unit}}]">
|
2021-01-16 23:47:05 +01:00
|
|
|
{{#if unitDatum.value }}
|
2021-01-24 11:06:07 +01:00
|
|
|
{{unitDatum.value}} {{lookup unitAbbrs unitDatum.unit}}
|
2021-01-16 23:47:05 +01:00
|
|
|
{{else}}-{{/if}}
|
2021-01-09 23:39:35 +01:00
|
|
|
</div>
|
|
|
|
{{/inline}}
|
2021-02-26 01:08:55 +01:00
|
|
|
|
2021-02-20 22:41:33 +01:00
|
|
|
{{!--
|
2022-02-14 00:58:23 +01:00
|
|
|
!-- Two templates based on the "unit" template for displaying values with unit.
|
2021-01-16 23:47:05 +01:00
|
|
|
!-- Both accept a `config` object holding the unitNames and unitAbbr instead of
|
|
|
|
!-- directly handing over the latter two.
|
2021-02-26 01:08:55 +01:00
|
|
|
!-- @param titleKey: The key of the localized title to use.
|
2021-01-16 23:47:05 +01:00
|
|
|
--}}
|
|
|
|
{{#*inline "temporalUnit"}}
|
2021-02-20 22:41:33 +01:00
|
|
|
{{> unit unitNames=config.i18n.temporalUnits unitAbbrs=config.i18n.temporalUnitsAbbr unitDatum=unitDatum
|
2021-02-26 01:08:55 +01:00
|
|
|
titleKey=titleKey}}
|
2021-01-16 23:47:05 +01:00
|
|
|
{{/inline}}
|
2021-01-09 23:39:35 +01:00
|
|
|
|
|
|
|
{{#*inline "distanceUnit"}}
|
2021-02-20 22:41:33 +01:00
|
|
|
{{> unit unitNames=config.i18n.distanceUnits unitAbbrs=config.i18n.distanceUnitsAbbr unitDatum=unitDatum
|
2021-02-26 01:08:55 +01:00
|
|
|
titleKey=titleKey}}
|
2021-01-09 23:39:35 +01:00
|
|
|
{{/inline}}
|
|
|
|
|
|
|
|
|
|
|
|
{{!-- ======================================================================== --}}
|
|
|
|
|
|
|
|
|
2022-01-21 03:22:17 +01:00
|
|
|
<div class="ds4-sheet-tab tab spells" data-group="primary" data-tab="spells">
|
2021-02-26 01:38:53 +01:00
|
|
|
{{#unless (isEmpty itemsByType.spell)}}
|
2021-07-23 01:11:42 +02:00
|
|
|
<ol class="ds4-embedded-document-list ds4-embedded-document-list--spell item-list">
|
2021-11-06 01:41:31 +01:00
|
|
|
{{#> systems/ds4/templates/sheets/actor/components/item-list-header.hbs isEquipable=true hideDescription=true
|
|
|
|
type='spell'}}
|
2021-02-25 23:30:45 +01:00
|
|
|
{{!-- spell type --}}
|
2022-11-21 03:00:46 +01:00
|
|
|
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="system.spellType"
|
2021-11-06 01:41:31 +01:00
|
|
|
title="{{localize 'DS4.SortBySpellType'}}">{{localize 'DS4.SpellTypeAbbr'}}</div>
|
2021-02-26 01:08:55 +01:00
|
|
|
|
2022-11-04 21:08:23 +01:00
|
|
|
{{!-- spell modifier --}}
|
2022-11-21 03:00:46 +01:00
|
|
|
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="system.spellModifier.complex"
|
|
|
|
data-data-path2="system.spellModifier.numerical" title="{{localize 'DS4.SortBySpellModifier'}}">{{localize
|
2022-11-04 21:08:23 +01:00
|
|
|
'DS4.SpellModifierAbbr'}}</div>
|
2021-02-26 01:08:55 +01:00
|
|
|
|
2021-02-25 23:30:45 +01:00
|
|
|
{{!-- max. distance --}}
|
2022-02-14 00:58:23 +01:00
|
|
|
<div title="{{localize 'DS4.SpellDistance'}}"><i class="fas fa-ruler"></i></div>
|
2021-02-26 01:08:55 +01:00
|
|
|
|
2021-02-25 23:30:45 +01:00
|
|
|
{{!-- duration --}}
|
|
|
|
<div title="{{localize 'DS4.SpellDuration'}}"><i class="far fa-clock"></i></div>
|
2021-02-26 01:08:55 +01:00
|
|
|
|
2021-02-25 23:30:45 +01:00
|
|
|
{{!-- cooldown duration --}}
|
2022-02-14 00:58:23 +01:00
|
|
|
<div title="{{localize 'DS4.CooldownDuration'}}"><i class="fas fa-hourglass-half"></i></div>
|
2021-04-13 21:40:52 +02:00
|
|
|
{{/systems/ds4/templates/sheets/actor/components/item-list-header.hbs}}
|
2021-11-06 01:41:31 +01:00
|
|
|
|
2023-06-25 23:55:08 +02:00
|
|
|
{{#each itemsByType.spell as |item id|}}
|
|
|
|
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs item=item isEquipable=true
|
2021-02-26 01:08:55 +01:00
|
|
|
hideDescription=true}}
|
|
|
|
{{!-- spell type --}}
|
2021-11-06 01:41:31 +01:00
|
|
|
<img class="ds4-embedded-document-list__image"
|
2023-06-25 23:55:08 +02:00
|
|
|
src="{{lookup @root/config.icons.spellTypes item.system.spellType}}"
|
|
|
|
title="{{lookup @root/config.i18n.spellTypes item.system.spellType}}" />
|
2021-02-26 01:08:55 +01:00
|
|
|
|
2022-11-04 21:08:23 +01:00
|
|
|
{{!-- spell modifier --}}
|
2023-06-25 23:55:08 +02:00
|
|
|
<div title="{{localize 'DS4.SpellModifier'}}">{{#if (eq item.system.spellModifier.complex
|
|
|
|
'')}}{{item.system.spellModifier.numerical}}{{else}}{{item.system.spellModifier.complex}}{{/if}}
|
|
|
|
</div>
|
2021-02-26 01:08:55 +01:00
|
|
|
|
|
|
|
{{!-- max. distance --}}
|
2023-06-25 23:55:08 +02:00
|
|
|
{{> distanceUnit titleKey='DS4.SpellDistance' unitDatum=item.system.maxDistance
|
2022-02-14 00:58:23 +01:00
|
|
|
config=@root/config}}
|
2021-02-26 01:08:55 +01:00
|
|
|
|
|
|
|
{{!-- duration --}}
|
2023-06-25 23:55:08 +02:00
|
|
|
{{> temporalUnit titleKey='DS4.SpellDuration' unitDatum=item.system.duration config=@root/config}}
|
2021-02-26 01:08:55 +01:00
|
|
|
|
|
|
|
{{!-- cooldown duration --}}
|
2022-02-14 00:58:23 +01:00
|
|
|
<div title="{{localize 'DS4.CooldownDuration'}}">{{lookup @root/config.i18n.cooldownDurations
|
2023-06-25 23:55:08 +02:00
|
|
|
item.system.cooldownDuration}}</div>
|
2022-02-14 00:58:23 +01:00
|
|
|
|
2021-04-13 21:40:52 +02:00
|
|
|
{{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}}
|
2021-01-09 23:39:35 +01:00
|
|
|
{{/each}}
|
|
|
|
</ol>
|
2021-02-26 01:38:53 +01:00
|
|
|
{{/unless}}
|
2022-01-21 03:22:17 +01:00
|
|
|
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle'
|
2021-07-22 02:02:35 +02:00
|
|
|
documentType='item' type='spell'}}
|
2021-02-20 22:41:33 +01:00
|
|
|
</div>
|