mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-22 02:19:54 +02:00
Fixed TagTeamDialog damage rendering and verified rerolls
This commit is contained in:
parent
a88031e279
commit
85314e6852
2 changed files with 15 additions and 5 deletions
|
|
@ -569,9 +569,11 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
|
|||
|
||||
const basePath = `system.tagTeam.members.${memberKey}.damageRollData`;
|
||||
const updatePath = isResource ? `${basePath}.resources.${damageKey}` : `${basePath}.main`;
|
||||
const updateValue = isResource ?
|
||||
memberData.damageRollData.resources[damageKey] : memberData.damageRollData.main;
|
||||
this.updatePartyData(
|
||||
{
|
||||
[updatePath]: memberData.damageRollData.types[damageKey].toJSON()
|
||||
[updatePath]: updateValue.toJSON()
|
||||
},
|
||||
this.getUpdatingParts(button)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,15 @@
|
|||
{{#each damage.types as |roll key|}}
|
||||
{{#if damage.main}}
|
||||
{{> damage roll=damage.main label=(localize "DAGGERHEART.GENERAL.damage") memberKey=key}}
|
||||
{{/if}}
|
||||
|
||||
{{#each damage.resources as |roll key|}}
|
||||
{{> damage roll=roll label=(localize (concat "DAGGERHEART.CONFIG.HealingType." key ".name")) memberKey=../key isResource="true" }}
|
||||
{{/each}}
|
||||
|
||||
{{#*inline "damage"}}
|
||||
<div class="roll-data {{#if isCritical}}critical{{/if}}">
|
||||
<div class="duality-label">
|
||||
<span>{{localize (concat "DAGGERHEART.CONFIG.HealingType." key ".name")}}:</span>
|
||||
<span>{{label}}:</span>
|
||||
<span>{{roll.total}}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -9,7 +17,7 @@
|
|||
{{#each roll.dice}}
|
||||
{{#each results as |result index|}}
|
||||
{{#if result.active}}
|
||||
<a class="roll-dice" data-action="rerollDamageDice" data-member-key="{{../../../key}}" data-damage-key="{{@../../key}}" data-dice-index="{{@../key}}" data-result-index="{{index}}">
|
||||
<a class="roll-dice" data-action="rerollDamageDice" data-member-key="{{../../memberKey}}" data-damage-key="{{@../../key}}" {{#if ../../isResource}}data-is-resource="true"{{/if}} data-dice-index="{{@../key}}" data-result-index="{{index}}">
|
||||
<span class="dice-label">{{result.result}}</span>
|
||||
<img src="{{concat "systems/daggerheart/assets/icons/dice/hope/" ../denomination ".svg"}}" />
|
||||
</a>
|
||||
|
|
@ -25,4 +33,4 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/inline}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue