This repository has been archived on 2024-05-29. You can view files and clone it, but cannot push or open issues or pull requests.
fvtt-warhero/templates/partial-actor-stat-block.html
2023-02-27 22:04:03 +01:00

61 lines
2.4 KiB
HTML

<li class="item flexrow list-item item-stat-roll" data-attr-key="{{key}}">
<span class="{{fieldClass}}" name="{{key}}">
<h4 class="{{fieldClass}}">
{{#if roll}}
<i class="fa-solid fa-dice-d20"></i><a class="roll-this stat-margin" data-type="{{path}}" data-key="{{key}}">{{localize stat.label}}</a>
{{else}}
{{localize stat.label}}
{{/if}}
</h4>
</span>
{{#if (eq style "dropdown")}}
<select class="item-field-label-short" type="text" name="system.{{path}}.{{key}}.value" value="{{stat.value}}"
data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select stat.value}}
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
{{/select}}
</select>
{{/if}}
{{#if (eq style "edit")}}
<input type="text" class="item-field-label-short " {{#if disabled}}disabled{{/if}} name="system.{{path}}.{{key}}.value" value="{{stat.value}}" data-dtype="Number"/>
{{#if hasmax}}
<input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.max" value="{{stat.max}}" data-dtype="Number"/>
{{/if}}
{{#if hasuse}}
<input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.nbuse" value="{{stat.nbuse}}" data-dtype="Number"/>
<input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.maxuse" value="{{stat.maxuse}}" data-dtype="Number"/>
{{/if}}
{{/if}}
{{#if hassave}}
<span class="item-field-label-medium" name="{{key}}">
<h4 class="item-field-label-medium">
<i class="fa-solid fa-dice-d20"></i>
<a class="roll-save stat-margin" data-type="{{path}}" data-key="{{key}}">
{{localize (concat "WH.ui.save" key)}}
</a>
</h4>
</span>
<input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.save" value="{{stat.save}}" data-dtype="Number"/>
{{/if}}
{{#if islevel}}
<span class="item-field-label-short" name="{{key}}">
<h4 class="item-field-label-short">{{localize "WH.ui.level"}}
</h4>
</span>
<input type="text" disabled class="item-field-label-short " value="{{stat.level}}" data-dtype="Number"/>
{{/if}}
</li>