ds4/src/templates/sheets/item/spell-sheet.hbs

90 lines
4.5 KiB
Handlebars

{{!-- ======================================================================== --}}
{{!-- INLINE PARTIAL DEFINITIONS --}}
{{!-- ======================================================================== --}}
{{#*inline "unitDatum" }}
<div class="side-property">
<label>{{localize localizeString}}</label>
<div class="unit-data-pair">
<input class="item-num-val" type="text" data-dtype="String" name="data.{{property}}.value"
value="{{lookup (lookup data property) 'value'}}" />
<select name="data.{{property}}.unit" data-type="String">
{{#select (lookup (lookup data property) 'unit')}}
{{#if (eq unitType 'temporal')}}
{{#each (lookup config.i18n 'temporalUnitsAbbr') as |value key|}}<option value="{{key}}">{{value}}</option>
{{/each}}
{{else}}
{{#each (lookup config.i18n 'distanceUnitsAbbr') as |value key|}}<option value="{{key}}">{{value}}</option>
{{/each}}
{{/if}}
{{/select}}
</select>
</div>
</div>
{{/inline}}
{{!-- ======================================================================== --}}
<form class="{{cssClass}}" autocomplete="off">
{{#> systems/ds4/templates/sheets/item/components/sheet-header.hbs}}
<div class="grid basic-properties">
<div class="basic-property">
<label for="data.spellType">{{localize "DS4.SpellType"}}</label>
<select id="data.spellType" name="data.spellType" data-type="String">
{{#select data.spellType}}
{{#each config.i18n.spellTypes as |value key|}}
<option value="{{key}}">{{value}}</option>
{{/each}}
{{/select}}
</select>
</div>
<div class="basic-property">
<label for="data.bonus">{{localize "DS4.SpellBonus"}}</label>
<input id="data.bonus" type="text" name="data.bonus" value="{{data.bonus}}" data-dtype="String" />
</div>
</div>
{{/systems/ds4/templates/sheets/item/components/sheet-header.hbs}}
{{!-- Common Item body --}}
{{#> systems/ds4/templates/sheets/item/components/body.hbs}}
<div class="side-property">
<label for="data.spellCategory">{{localize "DS4.SpellCategory"}}</label>
<select id="data.spellCategory" name="data.spellCategory" data-type="String">
{{#select data.spellCategory}}
{{#each config.i18n.spellCategories as |value key|}}
<option value="{{key}}">{{value}}</option>
{{/each}}
{{/select}}
</select>
</div>
{{> 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'
}}
<div class="side-property" title="{{localize 'DS4.SpellMinimumLevelsHealer'}}">
<label for="data.minimumLevels.healer">{{localize "DS4.SpellMinimumLevelsHealerAbbr"}}</label>
<input type="number" min="0" step="1" data-dtype="Number" name="data.minimumLevels.healer"
id="data.minimumLevels.healer" value="{{data.minimumLevels.healer}}" />
</div>
<div class="side-property" title="{{localize 'DS4.SpellMinimumLevelsWizard'}}">
<label for="data.minimumLevels.wizard">{{localize "DS4.SpellMinimumLevelsWizardAbbr"}}</label>
<input type="number" min="0" step="1" data-dtype="Number" name="data.minimumLevels.wizard"
id="data.minimumLevels.wizard" value="{{data.minimumLevels.wizard}}" />
</div>
<div class="side-property" title="{{localize 'DS4.SpellMinimumLevelsSorcerer'}}">
<label for="data.minimumLevels.sorcerer">{{localize "DS4.SpellMinimumLevelsSorcererAbbr"}}</label>
<input type="number" min="0" step="1" data-dtype="Number" name="data.minimumLevels.sorcerer"
id="data.minimumLevels.sorcerer" value="{{data.minimumLevels.sorcerer}}" />
</div>
<div class="side-property">
<label for="data.scrollPrice">{{localize "DS4.SpellScrollPriceGold"}}</label>
<input type="number" min="0" max="9999" step="0.01" data-dtype="Number" name="data.scrollPrice"
id="data.scrollPrice" value="{{data.scrollPrice}}" />
</div>
{{/systems/ds4/templates/sheets/item/components/body.hbs}}
</form>