mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-21 18:09:54 +02:00
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
* Initial rework * Removed unneeded method * Removed outcommented code * Added migration * Fixed DamageActions * Semi-corrected reroll of one of multiple results on a die * Code improvement * Added aseDie.rerollResult method to specifically reroll a specific result die in a grouping * TagTeamDialog somewhat working * Added migration for TagTeamData * Fix for mean tagTeamDialog.finish * . * Improved migration * Internalised ChatDamageData.prepareRolls to its own constructor * Moved DamageTypes to roll.options * TagTeamDialog fixes to accomodate new flat damage.types structure * Changed so all default rolls become BaseRolls to access convenience functions and getters * . * Fixed so that party.tagTeam now uses a declared damageRollData(ChatDamageData) field. rollData.options.damage is retired. * Critical damage fixes * Corrected TagTeamDialog rerender logic when selecting a roll * Fixed so that DamageTypes are retained and joined together throughout TagTeamDialog * Removed some remaining types.<>.roll references * [Rework] Damage and Damage Resource split (#2094) * Changed the label of ActionSheet damage.resources to Mark Resources * Fix assigning includeBase * Localize add resource * Maybe simplify API * Fix onRollSimple * Handle erroring action update differently --------- Co-authored-by: Carlos Fernandez <cfern1990@gmail.com>
88 lines
No EOL
4 KiB
Handlebars
88 lines
No EOL
4 KiB
Handlebars
<div class="roll-part damage-section dice-roll" data-action="expandRoll"{{#unless damage.active}} hidden{{/unless}}>
|
|
<div class="roll-part-header">
|
|
<div>
|
|
{{#if hasHealing}}
|
|
<span>{{localize "DAGGERHEART.ACTIONS.TYPES.healing.name"}}</span>
|
|
{{else}}
|
|
<span>{{localize (ifThen roll.isCritical "DAGGERHEART.ACTIONS.TYPES.damage.critical" "DAGGERHEART.ACTIONS.TYPES.damage.name")}}</span>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
<div class="roll-part-extra on-reduced">
|
|
<div class="wrapper">
|
|
{{#if damage.main}}
|
|
{{> formula roll=damage.main label=(localize "DAGGERHEART.GENERAL.damage") }}
|
|
{{/if}}
|
|
{{#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'))) }}
|
|
{{/each}}
|
|
</div>
|
|
</div>
|
|
<div class="roll-part-content dice-result">
|
|
<div class="dice-tooltip">
|
|
<div class="wrapper">
|
|
{{#if damage.main}}
|
|
{{> damage label=(localize "DAGGERHEART.GENERAL.damage") roll=damage.main isDirect=isDirect }}
|
|
{{/if}}
|
|
|
|
{{#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
|
|
}}
|
|
{{/each}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{#*inline "formula"}}
|
|
<div class="roll-formula">{{label}}: {{roll.total}}</div>
|
|
{{/inline}}
|
|
|
|
{{#*inline "damage"}}
|
|
<fieldset>
|
|
<legend>
|
|
{{label}}
|
|
<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>
|
|
{{#if (and (not @root.hasHealing) roll.options.damageTypes.length)}}
|
|
<label class="roll-part-header"><span>
|
|
{{#each roll.options.damageTypes}}
|
|
{{localize (concat 'DAGGERHEART.CONFIG.ArmorFeature.' this '.name')}}
|
|
{{#unless @last}}/{{/unless}}
|
|
{{/each}}
|
|
<div class="roll-formula">{{roll.total}}</div></span></label>
|
|
{{/if}}
|
|
<div class="roll-dice">
|
|
{{#if roll.dice.length}}
|
|
{{#each roll.dice}}
|
|
{{#each results}}
|
|
{{#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}}
|
|
>
|
|
{{#if hasRerolls}}<i class="fa-solid fa-dice dice-rerolled" data-tooltip="{{localize "DAGGERHEART.GENERAL.rerolled"}}"></i>{{/if}}
|
|
{{result}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
{{/each}}
|
|
{{/each}}
|
|
|
|
{{#if roll.modifierTotal}}
|
|
<div class="roll-die{{#if (gt roll.modifierTotal 0)}} has-plus{{/if}}">
|
|
<div class="font-20">{{roll.modifierTotal}}</div>
|
|
</div>
|
|
{{/if}}
|
|
{{else}}
|
|
<div class="roll-die">
|
|
<div class="font-20">{{roll.total}}</div>
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
</fieldset>
|
|
{{/inline}} |