Added results section

This commit is contained in:
WBHarry 2026-03-14 15:28:28 +01:00
parent 099b79c5f5
commit cd152e5c2e
4 changed files with 79 additions and 16 deletions

View file

@ -687,8 +687,7 @@
"chatMessageRollTitle": "Roll", "chatMessageRollTitle": "Roll",
"hints": { "hints": {
"completeRolls": "Set up and complete the rolls for the characters", "completeRolls": "Set up and complete the rolls for the characters",
"selectRoll": "Select which roll value to be used for the Tagteam", "selectRoll": "Select which roll value to be used for the Tagteam"
"totalDamage": "Total Damage: {damage}"
} }
}, },
"TokenConfig": { "TokenConfig": {
@ -2328,6 +2327,10 @@
"rerolled": "Rerolled", "rerolled": "Rerolled",
"rerollThing": "Reroll {thing}", "rerollThing": "Reroll {thing}",
"resource": "Resource", "resource": "Resource",
"result": {
"single": "Result",
"plural": "Results"
},
"roll": "Roll", "roll": "Roll",
"rollAll": "Roll All", "rollAll": "Roll All",
"rollDamage": "Roll Damage", "rollDamage": "Roll Damage",

View file

@ -115,6 +115,7 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
}, []); }, []);
const damage = data.rollData?.options?.damage; const damage = data.rollData?.options?.damage;
partContext.hasDamage |= Boolean(damage);
const critHitPointsDamage = await this.getCriticalDamage(damage); const critHitPointsDamage = await this.getCriticalDamage(damage);
partContext.members[actorId] = { partContext.members[actorId] = {

View file

@ -159,20 +159,54 @@
} }
} }
.results-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
border: 2px solid light-dark(@dark-blue, @golden);
border-radius: 6px;
padding: 8px 10px;
.result-container-label {
font-size: var(--font-size-24);
font-weight: bold;
}
.results-inner-container {
display: flex;
justify-content: space-between;
gap: 8px;
width: 100%;
.result-section-label {
font-size: var(--font-size-20);
}
.hint {
text-align: center;
}
.result-container {
width: 100%;
text-align: center;
.result-info {
display: flex;
gap: 8px;
align-items: center;
justify-content: center;
}
}
}
}
.finish-container { .finish-container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 16px; gap: 16px;
text-align: center; text-align: center;
.damage-info {
font-size: var(--font-size-20);
}
.hint {
height: 18px;
}
button { button {
flex: 1; flex: 1;
} }

View file

@ -93,13 +93,38 @@
</fieldset> </fieldset>
{{/each}} {{/each}}
</div> </div>
<div class="results-container">
<span class="result-container-label">{{localize "DAGGERHEART.GENERAL.result.plural"}}</span>
<div class="results-inner-container">
{{#if hintText}}
<div class="hint">{{localize hintText}}</div>
{{else}}
{{#if joinedRoll.rollData}}
<div class="result-container">
<span class="result-section-label">{{localize "DAGGERHEART.GENERAL.dualityRoll"}}</span>
<div class="result-info">
<div>{{localize "DAGGERHEART.GENERAL.withThing" thing=joinedRoll.rollData.options.roll.result.label}}</div>
<div class="damage-info">{{joinedRoll.rollData.options.roll.total}}</div>
</div>
</div>
{{/if}}
{{#if hasDamage}}
<div class="result-container">
<span class="result-section-label">{{localize "DAGGERHEART.GENERAL.damage"}}</span>
{{#each joinedRoll.rollData.options.damage as |damage key|}}
<div class="result-info">
<div>{{localize (concat "DAGGERHEART.CONFIG.HealingType." key ".name")}}</div>
<div class="damage-info">{{damage.total}}</div>
</div>
{{/each}}
</div>
{{/if}}
{{/if}}
</div>
</div>
<div class="finish-container"> <div class="finish-container">
{{#if joinedRoll}}
{{#each joinedRoll.rollData.options.damage as |damage key|}}
<div class="damage-info">{{localize "DAGGERHEART.APPLICATIONS.TagTeamSelect.hints.totalDamage" damage=damage.total}}</div>
{{/each}}
{{/if}}
<div class="hint">{{localize hintText}}</div>
<button type="button" data-action="finishRoll" {{#if hintText}}disabled{{/if}}>{{localize "Finish Tagteam Roll"}}</button> <button type="button" data-action="finishRoll" {{#if hintText}}disabled{{/if}}>{{localize "Finish Tagteam Roll"}}</button>
</div> </div>
</div> </div>