Files
foundryvtt-mgt2/templates/chat/roll.html

64 lines
2.6 KiB
HTML

<div class="mgt2-chat-roll">
<div class="mgt2-roll-header">
<span class="mgt2-roll-char-name">{{rollObjectName}}</span>
{{#if rollTypeName}}
<div class="mgt2-roll-meta">
<span class="mgt2-roll-type">{{rollTypeName}}</span>
{{#if rollDifficulty}}
<span class="mgt2-roll-sep"></span>
<span class="mgt2-roll-difficulty">{{rollDifficultyLabel}}</span>
{{/if}}
</div>
{{/if}}
</div>
{{#if rollMessage}}
<div class="mgt2-roll-modifier">{{rollMessage}}</div>
{{/if}}
{{#if rollModifiers}}
<div class="mgt2-roll-modifiers">
{{#each rollModifiers as |mod i|}}
<span class="mgt2-roll-mod-tag">{{mod}}</span>
{{/each}}
</div>
{{/if}}
<div class="dice-roll">
{{#if flavor}}
<div class="dice-flavor">{{flavor}}</div>
{{/if}}
<div class="dice-result">
<div class="dice-formula">{{formula}}</div>
{{{tooltip}}}
<h4 class="dice-total {{#if rollSuccess}}success{{else if rollFailure}}failure{{/if}}" {{#if rollBreakdown}}data-tooltip="{{rollBreakdown}}"{{/if}}>{{total}}</h4>
</div>
</div>
{{#if rollSuccess}}
<div class="mgt2-outcome is-success"><i class="fa-solid fa-check"></i> {{ localize 'MGT2.Chat.Roll.Success' }}</div>
{{else if rollFailure}}
<div class="mgt2-outcome is-failure"><i class="fa-solid fa-xmark"></i> {{ localize 'MGT2.Chat.Roll.Failure' }}</div>
{{/if}}
{{#if rollEffectStr}}
<div class="mgt2-effect {{#if rollSuccess}}is-success{{else}}is-failure{{/if}}">
{{ localize 'MGT2.Chat.Roll.Effect' }} <span class="mgt2-effect-value">{{rollEffectStr}}</span>
{{#if healingAmount}}<span class="mgt2-healing-amount">({{ localize 'MGT2.Healing.Heals' }} {{healingAmount}})</span>{{/if}}
{{#if surgeryDamageAmount}}<span class="mgt2-healing-amount">({{ localize 'MGT2.Healing.SurgeryDamage' }} {{surgeryDamageAmount}})</span>{{/if}}
</div>
{{/if}}
{{#if showButtons}}
<div class="mgt2-buttons">
{{#if hasDamage}}
<button data-action="damage" title="{{ localize 'MGT2.Chat.Roll.ApplyDamages' }}"><i class="fa-regular fa-heart-circle-minus"></i></button>
{{/if}}
{{#if showRollDamage}}
<button data-action="rollDamage">{{ localize 'MGT2.Chat.Roll.Damages' }}</button>
{{/if}}
{{#each cardButtons as |cardButton|}}
<button data-action="{{cardButton.action}}" title="{{cardButton.label}}">{{cardButton.label}}</button>
{{/each}}
</div>
{{/if}}
</div>