mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
[V14] Message Rolls Rework (#1757)
* Basic rework to the roll data in messages * . * Fixed advantage/disadvantage * . * . * Fixed TagTeamDialog * Reuse getter in faces setter * Simplify fate roll type css class * Add more caution to the dualityRoll fromData function * Apply suggestion from @CarlosFdez * Compute modifiers using deterministic terms (#1758) --------- Co-authored-by: Carlos Fernandez <cfern1990@gmail.com> Co-authored-by: Carlos Fernandez <CarlosFdez@users.noreply.github.com>
This commit is contained in:
parent
dbd5ef8bb0
commit
f156b12d79
20 changed files with 267 additions and 249 deletions
|
|
@ -7,7 +7,7 @@
|
|||
<span>{{localize "DAGGERHEART.GENERAL.criticalShort"}}</span>
|
||||
{{else}}
|
||||
{{#if (and roll.result (not (eq roll.type "reaction")))}}
|
||||
<span>{{localize "DAGGERHEART.GENERAL.withThing" thing=roll.result.label}}</span>
|
||||
<span>{{localize "DAGGERHEART.GENERAL.withThing" thing=roll.totalLabel}}</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</span>
|
||||
|
|
@ -29,48 +29,48 @@
|
|||
<div class="dice-tooltip">
|
||||
<div class="wrapper">
|
||||
<div class="roll-dice">
|
||||
{{#if roll.fate}}
|
||||
{{#if (eq roll.fate.fateDie "Hope")}}
|
||||
{{#if roll.fateDie}}
|
||||
{{#if (eq roll.fateDie "Hope")}}
|
||||
<div class="roll-die">
|
||||
<label>{{localize "DAGGERHEART.GENERAL.hope"}}</label>
|
||||
<div class="dice {{roll.fate.dice}} color-hope" data-die-index="0" data-type="hope">
|
||||
{{roll.fate.value}}
|
||||
<div class="dice {{roll.dHope.denomination}} color-hope" data-die-index="0" data-type="hope">
|
||||
{{roll.dHope.total}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if (eq roll.fate.fateDie "Fear")}}
|
||||
{{#if (eq roll.fateDie "Fear")}}
|
||||
<div class="roll-die">
|
||||
<label>{{localize "DAGGERHEART.GENERAL.fear"}}</label>
|
||||
<div class="dice {{roll.fate.dice}} color-fear" data-die-index="0" data-type="fear">
|
||||
{{roll.fate.value}}
|
||||
<div class="dice {{roll.dFear.denomination}} color-fear" data-die-index="0" data-type="fear">
|
||||
{{roll.dFear.total}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#if roll.hope}}
|
||||
{{#if roll.dHope}}
|
||||
<div class="roll-die">
|
||||
<label>{{localize "DAGGERHEART.GENERAL.hope"}}</label>
|
||||
<div class="dice {{roll.hope.dice}} color-hope reroll-button" data-die-index="0" data-type="hope" data-tooltip="{{localize "DAGGERHEART.GENERAL.rerollThing" thing=(localize "DAGGERHEART.GENERAL.hope")}}">
|
||||
{{#if roll.hope.rerolled.any}}<i class="fa-solid fa-dice dice-rerolled" data-tooltip="{{localize "DAGGERHEART.UI.Tooltip.diceIsRerolled" times=roll.hope.rerolled.rerolls.length}}"></i>{{/if}}
|
||||
{{roll.hope.value}}
|
||||
<div class="dice {{roll.dHope.denomination}} color-hope reroll-button" data-die-index="0" data-type="hope" data-tooltip="{{localize "DAGGERHEART.GENERAL.rerollThing" thing=(localize "DAGGERHEART.GENERAL.hope")}}">
|
||||
{{#if roll.dHopehope.rerolled.any}}<i class="fa-solid fa-dice dice-rerolled" data-tooltip="{{localize "DAGGERHEART.UI.Tooltip.diceIsRerolled" times=roll.dHope.rerolled.rerolls.length}}"></i>{{/if}}
|
||||
{{roll.dHope.total}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="roll-die has-plus">
|
||||
<label>{{localize "DAGGERHEART.GENERAL.fear"}}</label>
|
||||
<div class="dice {{roll.fear.dice}} color-fear reroll-button" data-die-index="2" data-type="fear" style="--svg-folder: 'fear';" data-tooltip="{{localize "DAGGERHEART.GENERAL.rerollThing" thing=(localize "DAGGERHEART.GENERAL.fear")}}">
|
||||
{{#if roll.fear.rerolled.any}}<i class="fa-solid fa-dice dice-rerolled" data-tooltip="{{localize "DAGGERHEART.UI.Tooltip.diceIsRerolled" times=roll.fear.rerolled.rerolls.length}}"></i>{{/if}}
|
||||
{{roll.fear.value}}
|
||||
<div class="dice {{roll.dFear.denomination}} color-fear reroll-button" data-die-index="1" data-type="fear" style="--svg-folder: 'fear';" data-tooltip="{{localize "DAGGERHEART.GENERAL.rerollThing" thing=(localize "DAGGERHEART.GENERAL.fear")}}">
|
||||
{{#if roll.dFear.rerolled.any}}<i class="fa-solid fa-dice dice-rerolled" data-tooltip="{{localize "DAGGERHEART.UI.Tooltip.diceIsRerolled" times=roll.dFear.rerolled.rerolls.length}}"></i>{{/if}}
|
||||
{{roll.dFear.total}}
|
||||
</div>
|
||||
</div>
|
||||
{{#if roll.advantage.type}}
|
||||
{{#if roll.dAdvantage}}
|
||||
<div class="roll-die has-plus">
|
||||
{{#if (eq roll.advantage.type 1)}}
|
||||
<label>{{localize "DAGGERHEART.GENERAL.Advantage.short"}}</label>
|
||||
<div class="dice {{roll.advantage.dice}} color-adv">{{roll.advantage.value}}</div>
|
||||
{{else}}
|
||||
<label>{{localize "DAGGERHEART.GENERAL.Disadvantage.short"}}</label>
|
||||
<div class="dice {{roll.advantage.dice}} color-dis">{{roll.advantage.value}}</div>
|
||||
{{/if}}
|
||||
<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}}
|
||||
|
|
@ -79,15 +79,11 @@
|
|||
<div class="dice {{roll.rally.dice}}">{{roll.rally.value}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#each roll.extra}}
|
||||
{{#each results}}
|
||||
{{#unless discarded}}
|
||||
<div class="roll-die has-plus">
|
||||
<label></label>
|
||||
<div class="dice {{../dice}}">{{result}}</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
{{#each roll.extraDice}}
|
||||
<div class="roll-die has-plus">
|
||||
<label></label>
|
||||
<div class="dice {{this.denomination}}">{{this.total}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{else}}
|
||||
{{#each roll.dice}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue