Fixes for direct damage and simplification

This commit is contained in:
Carlos Fernandez 2026-07-18 17:15:21 -04:00
parent a88031e279
commit 2eaef15060

View file

@ -11,7 +11,7 @@
<div class="roll-part-extra on-reduced"> <div class="roll-part-extra on-reduced">
<div class="wrapper"> <div class="wrapper">
{{#if damage.main}} {{#if damage.main}}
{{> formula roll=damage.main label=(ifThen hasHealing (localize "DAGGERHEART.GENERAL.healing") (localize "DAGGERHEART.GENERAL.damage")) }} {{> formula roll=damage.main label=(localize "DAGGERHEART.GENERAL.damage") }}
{{/if}} {{/if}}
{{#each damage.resources as | roll index | }} {{#each damage.resources as | roll index | }}
{{> formula roll=roll label=(ifThen ../hasHealing (localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.name')) (localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.inChatRoll'))) }} {{> formula roll=roll label=(ifThen ../hasHealing (localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.name')) (localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.inChatRoll'))) }}
@ -22,18 +22,13 @@
<div class="dice-tooltip"> <div class="dice-tooltip">
<div class="wrapper"> <div class="wrapper">
{{#if damage.main}} {{#if damage.main}}
{{> damage {{> damage label=(localize "DAGGERHEART.GENERAL.damage") roll=damage.main isDirect=isDirect }}
label=(ifThen hasHealing (localize "DAGGERHEART.GENERAL.healing") (localize "DAGGERHEART.GENERAL.damage"))
roll=damage.main
index=0
}}
{{/if}} {{/if}}
{{#each damage.resources as | roll index | }} {{#each damage.resources as | roll index | }}
{{> damage {{> damage
label=(ifThen ../hasHealing (localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.name')) (localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.inChatRoll'))) label=(ifThen ../hasHealing (localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.name')) (localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.inChatRoll')))
roll=roll roll=roll
index=index
isResource=true isResource=true
}} }}
{{/each}} {{/each}}
@ -50,7 +45,7 @@
<fieldset> <fieldset>
<legend> <legend>
{{label}} {{label}}
<div class="roll-formula">{{localize "DAGGERHEART.GENERAL.total"}}: {{roll.total}}</div>{{#if (and (eq index "hitPoints") ../isDirect)}} <div class="roll-formula">{{localize "DAGGERHEART.CONFIG.DamageType.direct.short"}}</div>{{/if}} <div class="roll-formula">{{localize "DAGGERHEART.GENERAL.total"}}: {{roll.total}}</div>{{#if isDirect}} <div class="roll-formula">{{localize "DAGGERHEART.CONFIG.DamageType.direct.short"}}</div>{{/if}}
</legend> </legend>
{{#if (and (not @root.hasHealing) roll.options.damageTypes.length)}} {{#if (and (not @root.hasHealing) roll.options.damageTypes.length)}}
<label class="roll-part-header"><span> <label class="roll-part-header"><span>