mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
* Fixed reroll correcting automation hope/fear/stress * Fixed advantage/disadvantage reroll counting on d20s
209 lines
No EOL
12 KiB
Handlebars
209 lines
No EOL
12 KiB
Handlebars
<div class="dice-roll daggerheart chat roll" data-action="expandRoll">
|
|
<div class="dice-flavor" data-action="expandRoll">{{title}}</div>
|
|
<div class="duality-modifiers" data-action="expandRoll">
|
|
{{#each roll.modifiers}}
|
|
<div class="duality-modifier">
|
|
{{localize label}} {{#if (gte value 0)}}+{{/if}}{{value}}
|
|
</div>
|
|
{{/each}}
|
|
{{#if (eq roll.advantage.type 1)}}
|
|
<div class="duality-modifier">
|
|
{{localize "DAGGERHEART.GENERAL.Advantage.full"}}
|
|
</div>
|
|
{{/if}}
|
|
{{#if (eq roll.advantage.type -1)}}
|
|
<div class="duality-modifier">
|
|
{{localize "DAGGERHEART.GENERAL.Disadvantage.full"}}
|
|
</div>
|
|
{{/if}}
|
|
{{#if roll.rally.dice}}
|
|
<div class="duality-modifier">
|
|
{{localize "DAGGERHEART.CLASS.Feature.rallyDice"}} {{roll.rally.dice}}
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
<div class="dice-result">
|
|
<div class="dice-formula" data-action="expandRoll">{{roll.formula}}</div>
|
|
<div class="dice-tooltip">
|
|
<div class="wrapper">
|
|
<section class="tooltip-part">
|
|
<div class="dice" data-action="expandRoll">
|
|
<header class="part-header flexrow">
|
|
<span class="part-formula">
|
|
<span>1{{roll.hope.dice}}</span>
|
|
|
|
|
<span>1{{roll.fear.dice}}</span>
|
|
</span>
|
|
<span class="part-total">{{roll.result.total}}</span>
|
|
</header>
|
|
<div class="flexrow">
|
|
<ol class="dice-rolls duality">
|
|
<li class="roll die {{roll.hope.dice}}">
|
|
<div class="dice-container">
|
|
<div class="dice-title">{{localize "DAGGERHEART.GENERAL.hope"}}</div>
|
|
{{#if roll.hope.rerolled.any}}<i class="fa-solid fa-dice dice-rerolled" title="{{localize "DAGGERHEART.UI.Tooltip.diceIsRerolled" times=roll.hope.rerolled.rerolls.length}}"></i>{{/if}}
|
|
<div class="dice-inner-container hope" data-tooltip="{{localize "DAGGERHEART.GENERAL.rerollThing" thing=(localize "DAGGERHEART.GENERAL.hope")}}">
|
|
<button type="checkbox" class="reroll-button" data-die-index="0" data-type="hope">
|
|
<div class="dice-wrapper">
|
|
<img class="dice" src="../icons/svg/{{roll.hope.dice}}-grey.svg"/>
|
|
</div>
|
|
<div class="dice-value">{{roll.hope.value}}</div>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li class="roll die {{roll.fear.dice}}">
|
|
<div class="dice-container">
|
|
<div class="dice-title">{{localize "DAGGERHEART.GENERAL.fear"}}</div>
|
|
{{#if roll.fear.rerolled.any}}<i class="fa-solid fa-dice dice-rerolled" title="{{localize "DAGGERHEART.UI.Tooltip.diceIsRerolled" times=roll.fear.rerolled.rerolls.length}}"></i>{{/if}}
|
|
<div class="dice-inner-container fear" data-tooltip="{{localize "DAGGERHEART.GENERAL.rerollThing" thing=(localize "DAGGERHEART.GENERAL.fear")}}">
|
|
<button type="checkbox" class="reroll-button" data-die-index="2" data-type="fear">
|
|
<div class="dice-wrapper">
|
|
<img class="dice" src="../icons/svg/{{roll.fear.dice}}-grey.svg"/>
|
|
</div>
|
|
<div class="dice-value">{{roll.fear.value}}</div>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
{{#if roll.advantage.type}}
|
|
<div class="dice" data-action="expandRoll">
|
|
<header class="part-header flexrow">
|
|
<span class="part-formula">
|
|
<span>1{{roll.advantage.dice}}</span>
|
|
</span>
|
|
<span class="part-total">{{roll.advantage.value}}</span>
|
|
</header>
|
|
<div class="flexrow">
|
|
<ol class="dice-rolls">
|
|
<li class="roll die {{roll.advantage.dice}}">
|
|
<div class="dice-container">
|
|
<div class="dice-inner-container {{#if (eq roll.advantage.type 1)}}advantage{{else}}disadvantage{{/if}}">
|
|
<div class="dice-wrapper">
|
|
<img class="dice" src="../icons/svg/{{roll.advantage.dice}}-grey.svg"/>
|
|
</div>
|
|
<div class="dice-value">{{roll.advantage.value}}</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
{{#if roll.rally.dice}}
|
|
<div class="dice">
|
|
<header class="part-header flexrow">
|
|
<span class="part-formula">
|
|
<span>1{{roll.rally.dice}}</span>
|
|
</span>
|
|
<span class="part-total">{{roll.rally.value}}</span>
|
|
</header>
|
|
<div class="flexrow">
|
|
<ol class="dice-rolls">
|
|
<li class="roll die {{roll.rally.dice}}">
|
|
<div class="dice-container">
|
|
<div class="dice-inner-container">
|
|
<div class="dice-wrapper">
|
|
<img class="dice" src="../icons/svg/{{roll.rally.dice}}-grey.svg"/>
|
|
</div>
|
|
<div class="dice-value">{{roll.rally.value}}</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
{{#each roll.extra as | extra | }}
|
|
<div class="dice" data-action="expandRoll">
|
|
<header class="part-header flexrow">
|
|
<span class="part-formula">
|
|
<span>1{{extra.dice}}</span>
|
|
</span>
|
|
<span class="part-total">{{extra.value}}</span>
|
|
</header>
|
|
<div class="flexrow">
|
|
<ol class="dice-rolls">
|
|
<li class="roll die {{extra.dice}}">
|
|
<div class="dice-container">
|
|
<div class="dice-inner-container">
|
|
<div class="dice-wrapper">
|
|
<img class="dice" src="../icons/svg/{{extra.dice}}-grey.svg"/>
|
|
</div>
|
|
<div class="dice-value">{{extra.value}}</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
{{/each}}
|
|
{{#if roll.modifierTotal}}<div class="duality-modifier">{{#if (gt roll.modifierTotal 0)}}+{{/if}}{{roll.modifierTotal}}</div>{{/if}}
|
|
</section>
|
|
</div>
|
|
</div>
|
|
<div class="dice-total duality {{#if (eq roll.result.duality 1)}}hope{{else}}{{#if (eq roll.result.duality -1)}}fear{{else}}critical{{/if}}{{/if}}">
|
|
<div class="dice-total-label">
|
|
{{#unless (eq _source.roll.success undefined)}}
|
|
{{#if _source.roll.success}}
|
|
{{localize "DAGGERHEART.GENERAL.success"}} {{localize "DAGGERHEART.GENERAL.withThing" thing=roll.result.label}}
|
|
{{else}}
|
|
{{localize "DAGGERHEART.GENERAL.failure"}} {{localize "DAGGERHEART.GENERAL.withThing" thing=roll.result.label}}
|
|
{{/if}}
|
|
{{else}}
|
|
{{roll.result.label}}
|
|
{{/unless}}
|
|
</div>
|
|
<div class="dice-total-value">
|
|
{{roll.total}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<fieldset class="dice-roll daggerheart chat roll expanded{{#unless damage.roll}} hidden{{/unless}}" data-action="expandRoll">
|
|
<legend class="dice-flavor">{{localize "DAGGERHEART.GENERAL.damage"}}</legend>
|
|
<div class="dice-result">
|
|
<div class="dice-tooltip">
|
|
<div class="wrapper">
|
|
{{> 'systems/daggerheart/templates/ui/chat/parts/damage-chat.hbs' damage=damage noTitle=true}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
{{> 'systems/daggerheart/templates/ui/chat/parts/target-chat.hbs'}}
|
|
<div class="dice-roll daggerheart chat roll">
|
|
<div class="dice-result">
|
|
<div class="dice-actions{{#unless (or hasDamage hasHealing)}} duality-alone{{/unless}}">
|
|
{{#if hasDamage}}
|
|
{{#if damage.roll}}
|
|
<button class="duality-action damage-button" data-target-hit="true" data-value="{{roll.total}}"><span>{{localize "DAGGERHEART.UI.Chat.damageRoll.dealDamage"}}</span></button>
|
|
{{else}}
|
|
<button class="duality-action duality-action-damage" data-value="{{roll.total}}"><span>{{localize "DAGGERHEART.UI.Chat.attackRoll.rollDamage"}}</span></button>
|
|
{{/if}}
|
|
{{else}}
|
|
{{#if hasHealing}}
|
|
<button class="duality-action duality-action-healing" data-value="{{roll.total}}"><span>{{localize "DAGGERHEART.UI.Chat.attackRoll.rollHealing"}}</span></button>
|
|
{{/if}}
|
|
{{/if}}
|
|
{{#if hasEffect}}
|
|
<button class="duality-action{{#if (or hasDamage hasHealing)}} duality-action-effect{{/if}}" data-value="{{roll.total}}"><span>{{localize "DAGGERHEART.UI.Chat.attackRoll.applyEffect"}}</span></button>
|
|
{{/if}}
|
|
<div class="duality-result">
|
|
<div>{{roll.total}}
|
|
{{#if (eq roll.result.duality 1)}}
|
|
{{localize "DAGGERHEART.GENERAL.withThing" thing=(localize "DAGGERHEART.GENERAL.hope")}}
|
|
{{else}}
|
|
{{#if (eq roll.result.duality -1)}}
|
|
{{localize "DAGGERHEART.GENERAL.withThing" thing=(localize "DAGGERHEART.GENERAL.fear")}}
|
|
{{else}}
|
|
{{localize "DAGGERHEART.GENERAL.criticalSuccess"}}
|
|
{{/if}}
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> |