ds4/src/templates/actor/partials/combat-values.hbs

31 lines
1.2 KiB
Handlebars
Raw Normal View History

{{!-- ======================================================================== --}}
{{!-- INLINE PARTIAL DEFINITIONS --}}
{{!-- ======================================================================== --}}
{{!--
!-- Render a combat value.
!--
!-- @param combat-value-key: The key of the combat value
!-- @param combat-value-data: The data for the attribute
--}}
{{#*inline "combat-value"}}
<div class="combat-value-with-formula">
<div class="combat-value {{combat-value-key}}"><span class="combat-value-total">{{combat-value-data.total}}</span>
</div>
<div class="combat-value-formula flexrow"><input type="number" name="data.combatValues.{{combat-value-key}}.base"
value='{{combat-value-data.base}}' data-dtype="Number" /><input type="number"
name="data.combatValues.{{combat-value-key}}.mod" value='{{combat-value-data.mod}}' data-dtype="Number" />
</div>
</div>
{{/inline}}
{{!-- ======================================================================== --}}
<div class="combat-values flexrow flex-between">
{{#each config.combatValues as |combat-value-label combat-value-key|}}
{{> combat-value combat-value-key=combat-value-key combat-value-data=(lookup ../data.combatValues
combat-value-key)}}
{{/each}}
</div>