Fixed so that dice css uses specific results.denomation if available

This commit is contained in:
WBHarry 2026-07-06 16:00:49 +02:00
parent de0d4ef9b4
commit e25cf0c4cd
3 changed files with 26 additions and 2 deletions

View file

@ -39,7 +39,7 @@
{{#unless discarded}}
<div class="roll-die{{#unless @../first}} has-plus{{/unless}}">
<div
class="dice reroll-button {{../dice}}"
class="dice reroll-button {{ifThen denomination denomination ../dice}}"
data-die-index="0" data-type="damage" data-damage-type="{{@../../../key}}" data-part="{{@../../key}}" data-dice="{{@../key}}" data-result="{{@key}}"
>
{{#if hasRerolls}}<i class="fa-solid fa-dice dice-rerolled" data-tooltip="{{localize "DAGGERHEART.GENERAL.rerolled"}}"></i>{{/if}}

View file

@ -84,8 +84,13 @@
{{else}}
{{#each roll.dice}}
{{#each results}}
{{debug this}}
<div class="roll-die {{#unless (or @../first discarded)}} has-plus{{/unless}}">
<div class="dice {{../denomination}}{{#if discarded}} discarded{{else}}{{#if (and @../first ../../roll.advantage.type)}}{{#if (eq ../../roll.advantage.type 1)}} color-adv{{else}} color-dis{{/if}}{{/if}}{{#if success}} color-adv{{/if}}{{/if}}">
<div class="
dice
{{ifThen denomination denomination ../denomination}}
{{#if discarded}} discarded{{else}}{{#if (and @../first ../../roll.advantage.type)}}{{#if (eq ../../roll.advantage.type 1)}} color-adv{{else}} color-dis{{/if}}{{/if}}{{#if success}} color-adv{{/if}}{{/if}}
">
{{result}}
</div>
</div>