[Feature] ComboDice Modifier (#2061)

This commit is contained in:
WBHarry 2026-07-22 12:17:25 +02:00 committed by GitHub
parent 7aa4101889
commit b7f03f7a2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 208 additions and 19 deletions

View file

@ -25,11 +25,11 @@
{{> damage label=(localize "DAGGERHEART.GENERAL.damage") roll=damage.main isDirect=isDirect }}
{{/if}}
{{#each damage.resources as | roll index | }}
{{#each damage.resources as |roll index| }}
{{> damage
label=(ifThen ../hasHealing (localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.name')) (localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.inChatRoll')))
roll=roll
isResource=true
resource=index
}}
{{/each}}
</div>
@ -57,13 +57,13 @@
{{/if}}
<div class="roll-dice">
{{#if roll.dice.length}}
{{#each roll.dice}}
{{#each results}}
{{#each roll.dice as |dice diceKey|}}
{{#each results as |dieResult resultKey|}}
{{#if active}}
<div class="roll-die{{#unless @../first}} has-plus{{/unless}}">
<div
class="dice reroll-button {{../denomination}}"
data-type="damage" data-damage-type="{{@../../key}}" data-dice="{{@../key}}" data-result="{{@key}}" {{#if ../../isResource}}data-is-resource="true"{{/if}}
class="dice reroll-button {{coalesce dieResult.denomination dice.denomination}}"
data-type="damage" data-dice="{{diceKey}}" data-result="{{resultKey}}" {{#if ../../resource}}data-damage-type="{{../../resource}}" data-is-resource="true"{{/if}}
>
{{#if hasRerolls}}<i class="fa-solid fa-dice dice-rerolled" data-tooltip="{{localize "DAGGERHEART.GENERAL.rerolled"}}"></i>{{/if}}
{{result}}

View file

@ -82,10 +82,14 @@
</div>
{{/each}}
{{else}}
{{#each roll.dice}}
{{#each results}}
{{#each roll.dice as |dice|}}
{{#each results as |dieResult|}}
<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
{{coalesce dieResult.denomination 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}}
">
{{result}}
</div>
</div>