Fixed crit damage

This commit is contained in:
WBHarry 2026-03-15 22:11:41 +01:00
parent 42144acfe4
commit 98a28ac7b9
8 changed files with 46 additions and 35 deletions

View file

@ -0,0 +1,25 @@
{{#each damage as |damage key|}}
<div class="roll-data {{#if isCritical}}critical{{/if}}">
<div class="duality-label">
<span>{{localize (concat "DAGGERHEART.CONFIG.HealingType." key ".name")}}:</span>
<span>{{damage.total}}</span>
</div>
{{#each damage.parts as |part|}}
<div class="roll-dice-container">
{{#each part.dice as |dice index|}}
<a class="roll-dice" data-action="rerollDamageDice" data-member-key="{{@../../../key}}" data-damage-key="{{@../../key}}" data-part="{{@../index}}" data-dice="{{index}}">
<span class="dice-label">{{dice.total}}</span>
<img src="{{concat "systems/daggerheart/assets/icons/dice/hope/" dice.dice ".svg"}}" />
</a>
{{#unless @last}}
<span class="roll-operator">+</span>
{{/unless}}
{{/each}}
{{#if part.modifierTotal}}
<span class="roll-operator">{{#if (gte part.modifierTotal 0)}}+{{else}}-{{/if}}</span>
<span class="roll-value">{{positive part.modifierTotal}}</span>
{{/if}}
</div>
{{/each}}
</div>
{{/each}}

View file

@ -107,31 +107,11 @@
</div>
</span>
{{#if damage}}
{{#each damage as |damage key|}}
<div class="roll-data {{#if ../useCritDamage}}critical{{/if}}">
<div class="duality-label">
<span>{{localize (concat "DAGGERHEART.CONFIG.HealingType." key ".name")}}:</span>
<span>{{#if ../useCritDamage}}{{lookup (lookup ../critDamage key) 'total'}}{{else}}{{damage.total}}{{/if}}</span>
</div>
{{#each damage.parts as |part|}}
<div class="roll-dice-container">
{{#each part.dice as |dice index|}}
<a class="roll-dice" data-action="rerollDamageDice" data-member-key="{{@../../../key}}" data-damage-key="{{@../../key}}" data-part="{{@../index}}" data-dice="{{index}}">
<span class="dice-label">{{dice.total}}</span>
<img src="{{concat "systems/daggerheart/assets/icons/dice/hope/" dice.dice ".svg"}}" />
</a>
{{#unless @last}}
<span class="roll-operator">+</span>
{{/unless}}
{{/each}}
{{#if part.modifierTotal}}
<span class="roll-operator">{{#if (gte part.modifierTotal 0)}}+{{else}}-{{/if}}</span>
<span class="roll-value">{{positive part.modifierTotal}}</span>
{{/if}}
</div>
{{/each}}
</div>
{{/each}}
{{#if useCritDamage}}
{{> "systems/daggerheart/templates/dialogs/tagTeamDialog/parts/tagTeamDamageParts.hbs" damage=critDamage isCritical=true }}
{{else}}
{{> "systems/daggerheart/templates/dialogs/tagTeamDialog/parts/tagTeamDamageParts.hbs" damage=damage }}
{{/if}}
{{else}}
<span class="hint">{{localize "DAGGERHEART.APPLICATIONS.TagTeamSelect.makeYourRoll"}}</span>
{{/if}}