Adapt healing

This commit is contained in:
Dapoolp 2025-07-19 15:10:56 +02:00
parent 92feddce1b
commit 3186378872
12 changed files with 95 additions and 87 deletions

View file

@ -1,43 +1,41 @@
<fieldset class="action-category">
<legend class="action-category-label" data-action="toggleSection" data-section="effects">
<div>Healing</div>
<fieldset class="one-column">
<legend>
{{localize "DAGGERHEART.GENERAL.healing"}}
</legend>
<div class="action-category-data open">
<fieldset>
{{formField fields.type value=source.type name="healing.type" localize=true}}
{{#if (and (not @root.isNPC) @root.hasRoll)}}
{{formField fields.resultBased value=source.resultBased name="healing.resultBased" localize=true}}
{{/if}}
{{#if (and (not @root.isNPC) @root.hasRoll source.resultBased)}}
<fieldset>
<legend>
<div>With Hope</div>
</legend>
{{> formula fields=fields.value.fields source=source.value target="value"}}
</fieldset>
<fieldset>
<legend>
<div>With Fear</div>
</legend>
{{> formula fields=fields.valueAlt.fields source=source.valueAlt target="valueAlt"}}
</fieldset>
{{else}}
{{#if (and (not @root.isNPC) @root.hasRoll)}}
{{formField fields.resultBased value=source.resultBased name="healing.resultBased" localize=true classes="checkbox"}}
{{/if}}
{{#if (and (not @root.isNPC) @root.hasRoll source.resultBased)}}
<div class="nest-inputs">
<fieldset class="one-column">
<legend>
<div>With Hope</div>
</legend>
{{> formula fields=fields.value.fields source=source.value target="value"}}
{{/if}}
</fieldset>
</div>
</fieldset>
<fieldset class="one-column">
<legend>
<div>With Fear</div>
</legend>
{{> formula fields=fields.valueAlt.fields source=source.valueAlt target="valueAlt"}}
</fieldset>
</div>
{{else}}
{{> formula fields=fields.value.fields source=source.value target="value"}}
{{/if}}
{{formField fields.applyTo value=source.type name="healing.applyTo" localize=true}}
</fieldset>
{{#*inline "formula"}}
<div class="multi-display">
{{formField fields.custom.fields.enabled value=source.custom.enabled name=(concat "healing." target ".custom.enabled")}}
{{#if source.custom.enabled}}
{{formField fields.custom.fields.formula value=source.custom.formula name=(concat "healing." target ".custom.formula") localize=true}}
{{else}}
{{formField fields.custom.fields.enabled value=source.custom.enabled name=(concat "healing." target ".custom.enabled") classes="checkbox"}}
{{#if source.custom.enabled}}
{{formField fields.custom.fields.formula value=source.custom.formula name=(concat "healing." target ".custom.formula") localize=true}}
{{else}}
<div class="nest-inputs">
{{formField fields.multiplier value=source.multiplier name=(concat "healing." target ".multiplier") localize=true}}
{{formField fields.dice value=source.dice name=(concat "healing." target ".dice")}}
{{formField fields.bonus value=source.bonus name=(concat "healing." target ".bonus") localize=true}}
{{/if}}
</div>
</div>
{{/if}}
{{/inline}}

View file

@ -5,7 +5,6 @@
{{#each @root.formula}}
<div class="damage-formula">
<span class="damage-resource"><b>Formula:</b> {{roll.formula}}</span>
{{!-- <span>{{localize (concat 'CONFIG.DH.GENERAL.healingTypes.' applyTo '.label')}}</span> --}}
<span class="damage-details">
{{#with (lookup @root.config.GENERAL.healingTypes applyTo)}}
{{localize label}}

View file

@ -1,27 +1,31 @@
<div class="dice-roll daggerheart chat roll" data-action="expandRoll">
<div class="dice-flavor">{{title}}</div>
<div class="dice-result">
<div class="dice-formula">{{roll.formula}}</div>
<div class="dice-tooltip">
<div class="wrapper">
<section class="tooltip-part">
{{#each roll.dice}}
<div class="dice">
<header class="part-header flexrow">
<span class="part-formula">{{formula}}</span>
<span class="part-total">{{total}}</span>
</header>
<ol class="dice-rolls">
{{#each results}}
<li class="roll die {{../denomination}} min">{{result}}</li>
{{/each}}
</ol>
</div>
{{#each roll as | resource index | }}
<div class="dice-formula">{{resource.formula}}</div>
<div class="dice-tooltip">
<div class="wrapper">
{{#each resource.parts}}
<section class="tooltip-part">
<div class="dice">
<header class="part-header flexrow">
<span class="part-formula">{{formula}}</span>
<span class="part-total">{{total}}</span>
</header>
<ol class="dice-rolls">
{{#each dice}}
{{#each results}}
<li class="roll die {{../dice}} min">{{result}}</li>
{{/each}}
{{/each}}
</ol>
</div>
</section>
{{/each}}
</section>
</div>
</div>
</div>
<div class="dice-total">{{roll.total}}</div>
<div class="dice-total">{{resource.total}}</div>
{{/each}}
<div class="flexrow">
<button class="healing-button"><span>{{localize "DAGGERHEART.UI.Chat.healingRoll.heal"}}</span></button>
</div>

View file

@ -1,5 +1,4 @@
<div class="dice-roll daggerheart chat roll" data-action="expandRoll">
{{log damage}}
{{#unless noTitle}}<div class="dice-flavor">{{damage.title}}</div>{{/unless}}
<div class="dice-result">
{{#each damage.roll as | roll index | }}