Fixed advantage/disadvantage

This commit is contained in:
WBHarry 2026-03-30 20:58:13 +02:00
parent 686c660e86
commit a6500f6801
8 changed files with 51 additions and 37 deletions

View file

@ -53,14 +53,14 @@
{{#if @root.advantage}}
{{#if (eq @root.advantage 1)}}
<div class="dice-option">
<img class="dice-icon" src="{{concat 'systems/daggerheart/assets/icons/dice/adv/' @root.roll.dAdvantage.denomination '.svg'}}" alt="">
<img class="dice-icon" src="{{concat 'systems/daggerheart/assets/icons/dice/adv/d' @root.roll.advantageFaces '.svg'}}" alt="">
<div class="dice-select">
<span class="label">{{localize "DAGGERHEART.GENERAL.Advantage.full"}}</span>
</div>
</div>
{{else if (eq @root.advantage -1)}}
<div class="dice-option">
<img class="dice-icon" src="{{concat 'systems/daggerheart/assets/icons/dice/disadv/' @root.roll.dAdvantage.denomination '.svg'}}" alt="">
<img class="dice-icon" src="{{concat 'systems/daggerheart/assets/icons/dice/disadv/d' @root.roll.advantageFaces '.svg'}}" alt="">
<div class="dice-select">
<span class="label">{{localize "DAGGERHEART.GENERAL.Disadvantage.full"}}</span>
</div>
@ -158,7 +158,7 @@
{{/times}}
</select>
<select name="roll.dice.advantageFaces"{{#unless advantage}} disabled{{/unless}}>
{{selectOptions diceOptions selected=@root.roll.dAdvantage.denomination}}
{{selectOptions diceOptions selected=(concat 'd' @root.roll.advantageFaces)}}
</select>
</div>
{{#if abilities}}

View file

@ -63,14 +63,14 @@
</div>
</div>
{{#if roll.dAdvantage}}
<div class="roll-die {{#if roll.hasAdvantage}}has-plus{{else}}has-minus{{/if}}">
{{#if roll.hasAdvantage}}
<label>{{localize "DAGGERHEART.GENERAL.Advantage.short"}}</label>
<div class="dice {{roll.dAdavantage.denomination}} color-adv">{{roll.dAdvantage.total}}</div>
{{else}}
<label>{{localize "DAGGERHEART.GENERAL.Disadvantage.short"}}</label>
<div class="dice {{roll.dAdvantage.denomination}} color-dis">{{roll.dAdvantage.total}}</div>
{{/if}}
<div class="roll-die has-plus">
<label>{{localize "DAGGERHEART.GENERAL.Advantage.short"}}</label>
<div class="dice {{roll.dAdvantage.denomination}} color-adv">{{roll.dAdvantage.total}}</div>
</div>
{{else if roll.dDisadvantage}}
<div class="roll-die has-minus">
<label>{{localize "DAGGERHEART.GENERAL.Disadvantage.short"}}</label>
<div class="dice {{roll.dDisadvantage.denomination}} color-dis">{{roll.dDisadvantage.total}}</div>
</div>
{{/if}}
{{#if roll.rally.dice}}