bol/templates/actor/parts/tabs/actor-stats.hbs

80 lines
4.7 KiB
Handlebars
Raw Normal View History

<div class="attributes flexrow">
{{#each data.attributes as |attribute id|}}
<div class="attribute stat flex1 flex-group-center {{key}}">
<label class="stat-label"><a class="rollable" data-roll-type="attribute" data-roll="2d6+@attributes.{{key}}.value" data-adv="0" data-key="{{key}}">{{localize label}}</a></label><br/>
<input class="stat-value rounded" type="text" name="data.attributes.{{key}}.value" value="{{numberFormat value decimals=0 sign=true}}" data-dtype="Number"/><br/>
2022-03-20 23:17:52 +01:00
<span class="stat-roll rollable" title="2d6" data-roll-type="attribute" data-roll="2d6+@attributes.{{key}}.value" data-adv="0" data-key="{{key}}">
<i class="darkgreen fas fa-dice"></i>
</span>
<span class="tooltip-container">
<span class="stat-roll rollable" title="XP" data-roll-type="attributexp" data-key="{{key}}">
<i class="xp-next fas fa-arrow-up"></i></span>
<span class="tooltiptext">
{{#if (eq value -1)}}
2 XP
{{else}}
{{add value (add value 1)}} XP
{{/if}}
</span>
</span>
</div>
{{/each}}
</div>
<hr/>
<div class="aptitudes flexrow">
{{#each data.aptitudes as |aptitude id|}}
<div class="aptitude stat flex1 flex-group-center">
<label class="stat-label"><a class="rollable" data-roll-type="aptitude" data-roll="2d6+@aptitudes.{{key}}.value" data-adv="0" data-key="{{key}}">{{localize label}}</a></label><br/>
<input class="stat-value rounded-border" type="text" name="data.aptitudes.{{key}}.value" value="{{numberFormat value decimals=0 sign=true}}" data-dtype="Number"/><br/>
2022-03-20 23:17:52 +01:00
<span class="stat-roll rollable" title="2d6" data-roll-type="aptitude" data-roll="2d6+@aptitudes.{{key}}.value" data-adv="0" data-key="{{key}}">
<i class="darkgreen fas fa-dice"></i>
</span>
<span class="tooltip-container">
<span class="stat-roll rollable" title="XP" data-roll-type="aptitudexp" data-key="{{key}}">
<i class="xp-next fas fa-arrow-up"></i></span>
<span class="tooltiptext">
{{#if (eq value -1)}}
1 XP
{{else}}
{{add value 2}} XP
{{/if}}
</span>
</span>
</div>
{{/each}}
</div>
<hr/>
<div class="resources flexrow">
2022-01-08 23:28:16 +01:00
{{#each resources as |resource id|}}
2022-01-23 09:25:09 +01:00
{{#if (eq resource.key "alchemypoints")}}
{{#if @root.isAlchemist}}
<div class="resource stat flex1 flex-group-center">
<label class="stat-label">{{localize label}}</label><br/>
2022-05-11 19:29:32 +02:00
<input class="stat-value resources-value" type="text" name="data.resources.{{key}}.value" value="{{numberFormat value decimals=0 sign=false}}" data-dtype="Number"/>
2022-01-08 23:28:16 +01:00
{{#if (eq @root.data.type 'player')}}
2022-05-11 19:29:32 +02:00
{{#if (exists bonus)}}
<span class="flexrow"><label class="stat-max bonus-text">Bonus</label><input class="resource-bonus resources-value" type="text" name="data.resources.{{key}}.bonus" value="{{numberFormat bonus decimals=0 sign=false}}" data-dtype="Number"/></span>
{else}
<span class="flexrow"><label class="stat-max resources-value">&nbsp;</label><input class="resource-bonus resources-novalue" type="text" value="" disabled></span>
{{/if}}
2022-01-08 22:48:04 +01:00
{{/if}}
2022-05-11 19:29:32 +02:00
<input class="resources-value" type="text" name="data.resources.{{key}}.max" value="{{numberFormat max decimals=0 sign=false}}" data-dtype="Number"/>
</div>
2022-01-23 09:25:09 +01:00
{{/if}}
{{else}}
<div class="resource stat flex1 flex-group-center">
<label class="stat-label">{{localize label}}</label><br/>
2022-05-11 19:29:32 +02:00
<input class="stat-value resources-value" type="text" name="data.resources.{{key}}.value" value="{{numberFormat value decimals=0 sign=false}}" data-dtype="Number"/>
2022-01-23 09:25:09 +01:00
{{#if (eq @root.data.type 'player')}}
2022-05-11 19:29:32 +02:00
{{#if (exists bonus)}}
<span class="flexrow"><label class="stat-max bonus-text">Bonus</label><input class="resource-bonus resources-value" type="text" name="data.resources.{{key}}.bonus" value="{{numberFormat bonus decimals=0 sign=false}}" data-dtype="Number"/></span>
{{else}}
<span class="flexrow"><label class="stat-max">&nbsp;</label><input class="resource-bonus resources-novalue" type="text" value="" disabled></span>
{{/if}}
2022-01-23 09:25:09 +01:00
{{/if}}
2022-05-11 19:29:32 +02:00
<input class="resources-value" type="text" name="data.resources.{{key}}.max" value="{{numberFormat max decimals=0 sign=false}}" data-dtype="Number"/>
2022-01-23 09:25:09 +01:00
</div>
{{/if}}
{{/each}}
</div>