Files
fvtt-adventures-with-emmy/templates/roll-dialog.hbs
T

82 lines
2.9 KiB
Handlebars
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<form class="awemmy-roll-dialog">
{{!-- Attribute name + modifier breakdown --}}
<div class="roll-header">
<span class="roll-attr-name">{{attrLabel}}</span>
<span class="roll-formula-summary">
<span id="awe-dice-expr">1d20</span>
{{#if (gt modifier 0)}} + {{modifier}}{{else if (lt modifier 0)}} {{abs modifier}}{{/if}}
{{#if (gt attributeBonus 0)}} + <em>{{attributeBonus}}</em>{{else if (lt attributeBonus 0)}} <em>{{abs attributeBonus}}</em>{{/if}}
</span>
</div>
{{!-- Attribute persistent bonus/penalty (read-only if non-zero) --}}
{{#if attributeBonus}}
<div class="dialog-row hint-row">
<span class="hint-label">{{localize "AWEMMY.Roll.AttributeBonus"}}</span>
<span class="hint-value {{#if (gt attributeBonus 0)}}positive{{else}}negative{{/if}}">
{{#if (gt attributeBonus 0)}}+{{/if}}{{attributeBonus}}
</span>
</div>
{{/if}}
{{!-- Roll twice --}}
<div class="dialog-row">
<label for="awe-roll-twice">{{localize "AWEMMY.Roll.RollTwice"}}</label>
<select id="awe-roll-twice" name="rollTwice">
<option value="">{{localize "AWEMMY.Roll.Normal"}}</option>
<option value="higher">{{localize "AWEMMY.Roll.TakeHigher"}}</option>
<option value="lower">{{localize "AWEMMY.Roll.TakeLower"}}</option>
</select>
</div>
{{!-- Situational bonus / penalty --}}
<div class="dialog-row">
<label for="awe-bonus">{{localize "AWEMMY.Roll.SituationalBonus"}}</label>
<select id="awe-bonus" name="bonus">
{{#each bonusChoices}}
<option value="{{this.value}}"{{#if this.selected}} selected{{/if}}>{{this.label}}</option>
{{/each}}
</select>
</div>
{{!-- Knowledge bonus (field items) --}}
{{#if knowledgeBonuses.length}}
<div class="dialog-row">
<label for="awe-knowledge">{{localize "AWEMMY.Roll.KnowledgeBonus"}}</label>
<select id="awe-knowledge" name="knowledgeBonus">
<option value="0">—</option>
{{#each knowledgeBonuses}}
<option value="{{this.bonus}}">{{this.label}} (+{{this.bonus}})</option>
{{/each}}
</select>
</div>
{{/if}}
{{!-- DC --}}
<div class="dialog-row">
<label for="awe-dc">{{localize "AWEMMY.Roll.DC"}}</label>
<select id="awe-dc" name="dc">
{{#each dcChoices}}
<option value="{{this.value}}"{{#if this.selected}} selected{{/if}}>{{this.label}}</option>
{{/each}}
</select>
</div>
{{!-- Formula preview --}}
<div class="dialog-row formula-preview">
<span class="formula-label">{{localize "AWEMMY.Roll.Formula"}}</span>
<span class="formula-text" id="awe-formula-preview">1d20 + {{totalMod}}</span>
</div>
{{!-- Roll visibility --}}
<div class="dialog-row">
<label for="awe-visibility">{{localize "AWEMMY.Roll.Visibility"}}</label>
<select id="awe-visibility" name="visibility">
{{selectOptions rollModes selected=visibility localize=true}}
</select>
</div>
</form>