mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-19 16:24:06 +01:00
Fix damage & healing roll
This commit is contained in:
parent
57f19c41cd
commit
a25dbb462c
19 changed files with 200 additions and 60 deletions
|
|
@ -8,7 +8,7 @@
|
|||
<input name="uses.enabled" type="checkbox"{{#if uses.enabled}} checked{{/if}}>
|
||||
<label for="uses.enabled">Uses</label>
|
||||
</div>
|
||||
</div>{{log @root}}
|
||||
</div>
|
||||
<label class="modifier-label">{{uses.value}}/{{formulaValue uses.max @root.rollConfig.data}}</label>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
<div class="roll-buttons">
|
||||
{{#if hasDamage}}
|
||||
{{#if damage.roll}}
|
||||
{{#unless (empty damage)}}
|
||||
<button class="duality-action damage-button">{{localize "DAGGERHEART.UI.Chat.damageRoll.dealDamage"}}</button>
|
||||
{{else}}
|
||||
<button class="duality-action duality-action-damage">{{localize "DAGGERHEART.UI.Chat.attackRoll.rollDamage"}}</button>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{#if hasHealing}}
|
||||
{{#if damage.roll}}
|
||||
{{#unless (empty damage)}}
|
||||
<button class="duality-action damage-button">{{localize "DAGGERHEART.UI.Chat.healingRoll.applyHealing"}}</button>
|
||||
{{else}}
|
||||
<button class="duality-action duality-action-damage">{{localize "DAGGERHEART.UI.Chat.attackRoll.rollHealing"}}</button>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{#if hasEffect}}<button>{{localize "DAGGERHEART.UI.Chat.attackRoll.applyEffect"}}</button>{{/if}}
|
||||
</div>
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
<div class="roll-part damage-section dice-roll" data-action="expandRoll">
|
||||
<div class="roll-part damage-section dice-roll" data-action="expandRoll">{{log this}}
|
||||
<div class="roll-part-header"><div><span>Damage</span></div></div>
|
||||
<div class="roll-part-extra on-reduced">
|
||||
<div class="wrapper">
|
||||
{{#each damage.roll as | roll index | }}
|
||||
{{#each damage as | roll index | }}
|
||||
<div class="roll-formula">{{localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.name')}}: {{total}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
<div class="roll-part-content dice-result">
|
||||
<div class="dice-tooltip">
|
||||
<div class="wrapper">
|
||||
{{#each damage.roll as | roll index | }}
|
||||
{{#each damage as | roll index | }}
|
||||
<fieldset>
|
||||
<legend>
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.name')}} <div class="roll-formula">{{localize "DAGGERHEART.GENERAL.total"}}: {{roll.total}}</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
<div class="roll-part roll-section">
|
||||
<div class="roll-part-header"><span>{{title}}</span></div>
|
||||
<div class="roll-part-content">
|
||||
<div class="roll-result-container">
|
||||
<span class="roll-result-value">{{roll.total}}</span>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,20 @@
|
|||
<div class="roll-part target-section dice-roll" data-action="expandRoll">
|
||||
<div class="roll-part-header"><div><span>Target</span></div></div>
|
||||
{{#if targets.length}}
|
||||
{{#if (and targets.length (or hasRoll (and hasSave pendingSaves)))}}{{log this}}
|
||||
<div class="roll-part-extra on-reduced">
|
||||
<div class="wrapper">
|
||||
<div class="target-hit-status">{{targetShort.hit}} {{#if (gt targetShort.hit 1)}}{{localize "DAGGERHEART.GENERAL.hit.single"}}{{else}}{{localize "DAGGERHEART.GENERAL.hit.plural"}}{{/if}}</div>
|
||||
<div class="target-hit-status is-miss">{{targetShort.miss}} {{#if (gt targetShort.miss 1)}}{{localize "DAGGERHEART.GENERAL.miss.single"}}{{else}}{{localize "DAGGERHEART.GENERAL.miss.plural"}}{{/if}}</div>
|
||||
{{#if hasRoll}}
|
||||
<div class="target-hit-status">{{targetShort.hit}} {{#if (gt targetShort.hit 1)}}{{localize "DAGGERHEART.GENERAL.hit.single"}}{{else}}{{localize "DAGGERHEART.GENERAL.hit.plural"}}{{/if}}</div>
|
||||
<div class="target-hit-status is-miss">{{targetShort.miss}} {{#if (gt targetShort.miss 1)}}{{localize "DAGGERHEART.GENERAL.miss.single"}}{{else}}{{localize "DAGGERHEART.GENERAL.miss.plural"}}{{/if}}</div>
|
||||
{{/if}}
|
||||
{{#if (and hasSave pendingSaves)}}<div class="target-pending-saves{{#if hasRoll}} is-absolute{{/if}}" data-tooltip="{{localize "DAGGERHEART.UI.Tooltip.pendingSaves"}}" data-tooltip-direction="UP"><i class="fa-solid fa-shield fa-lg fa-beat"></i></div>{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="roll-part-content dice-result">
|
||||
<div class="dice-tooltip">
|
||||
<div class="wrapper">
|
||||
{{#if targetSelection}}
|
||||
{{#if targets.length}}
|
||||
<div class="target-selector">
|
||||
<div class="roll-part-header"><div></div></div>
|
||||
<div class="target-choice">
|
||||
|
|
@ -21,13 +24,13 @@
|
|||
<div class="roll-part-header"><div></div></div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if roll.hasSave}}<div class="roll-part-extra">Reaction Roll All Targets<i class="fa-solid fa-shield fa-lg"></i></div>{{/if}}
|
||||
{{#if (and hasSave @root.targetSelection pendingSaves)}}<div class="roll-part-extra roll-all-save-button">Reaction Roll All Targets<i class="fa-solid fa-shield fa-lg"></i></div>{{/if}}
|
||||
{{#each currentTargets}}
|
||||
<div class="roll-target" data-token="{{id}}">
|
||||
<img class="target-img" src="{{img}}">
|
||||
<div class="target-data">
|
||||
<div class="target-name">{{name}}</div>
|
||||
{{#if ../targetSelection}}
|
||||
{{#if (and ../targetSelection ../hasRoll)}}
|
||||
<div class="target-hit-status {{#if hit}}is-hit{{else}}is-miss{{/if}}">
|
||||
{{#if hit}}
|
||||
{{localize "DAGGERHEART.GENERAL.hit.single"}}
|
||||
|
|
@ -37,7 +40,11 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if ../roll.hasSave}}<i class="fa-solid fa-shield fa-lg"></i>{{/if}}
|
||||
{{#if (and ../hasSave hit @root.targetSelection)}}
|
||||
<div class="target-save{{#if saved.result includeZero=true}} is-rolled{{/if}}" data-perm-id="{{actorId}}">
|
||||
<i class="fa-solid {{#if saved.result includeZero=true}}{{#if saved.success}}fa-check{{else}}fa-xmark{{/if}}{{else}}fa-shield{{/if}} fa-lg"></i>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{else}}
|
||||
<i>{{localize "DAGGERHEART.GENERAL.noTarget"}}</i>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<div class="chat-roll">{{log this}}
|
||||
<div class="chat-roll">
|
||||
<div class="roll-part-header"><span>{{title}}</span></div>
|
||||
{{#if hasRoll}}{{> 'systems/daggerheart/templates/ui/chat/parts/roll-part.hbs'}}{{/if}}
|
||||
{{#if (and damage.roll (or hasDamage hasHealing))}}{{> 'systems/daggerheart/templates/ui/chat/parts/damage-part.hbs'}}{{/if}}
|
||||
{{> 'systems/daggerheart/templates/ui/chat/parts/target-part.hbs'}}
|
||||
{{#if (and (not (empty damage)) (or hasDamage hasHealing))}}{{> 'systems/daggerheart/templates/ui/chat/parts/damage-part.hbs'}}{{/if}}
|
||||
{{#if hasTarget}}{{> 'systems/daggerheart/templates/ui/chat/parts/target-part.hbs'}}{{/if}}
|
||||
<div class="roll-part-header"><div></div></div>
|
||||
</div>
|
||||
{{> 'systems/daggerheart/templates/ui/chat/parts/button-part.hbs'}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue