mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Feature/336 damage targeted resources (#376)
* Unify healing & damage * create DHResourceData * Damages parts roll * h * ChatMessage & takeDamage updates * Adapt healing * No, there was not a console.log !
This commit is contained in:
parent
26376b49db
commit
7cbbb3168e
25 changed files with 415 additions and 232 deletions
|
|
@ -22,7 +22,12 @@
|
|||
{{formField ../fields.value.fields.bonus value=dmg.value.bonus name=(concat ../path "damage.parts." index ".value.bonus") localize=true classes="inline-child"}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{formField ../fields.type value=dmg.type name=(concat ../path "damage.parts." index ".type") localize=true}}
|
||||
<div class="nest-inputs">
|
||||
{{formField ../fields.applyTo value=dmg.applyTo name=(concat ../path "damage.parts." realIndex ".applyTo") localize=true}}
|
||||
{{#if (eq dmg.applyTo 'hitPoints')}}
|
||||
{{formField ../fields.type value=dmg.type name=(concat ../path "damage.parts." index ".type") localize=true}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if ../horde}}
|
||||
<fieldset class="one-column">
|
||||
<legend>{{localize "DAGGERHEART.ACTORS.Adversary.hordeDamage"}}</legend>
|
||||
|
|
@ -56,7 +61,12 @@
|
|||
{{> formula fields=../../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" realIndex=realIndex}}
|
||||
</fieldset>
|
||||
{{/if}}
|
||||
{{formField ../../fields.type value=dmg.type name=(concat "damage.parts." realIndex ".type") localize=true}}
|
||||
<div class="nest-inputs">
|
||||
{{formField ../../fields.applyTo value=dmg.applyTo name=(concat "damage.parts." realIndex ".applyTo") localize=true}}
|
||||
{{#if (eq dmg.applyTo 'hitPoints')}}
|
||||
{{formField ../../fields.type value=dmg.type name=(concat "damage.parts." realIndex ".type") localize=true}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<input type="hidden" name="damage.parts.{{realIndex}}.base" value="{{dmg.base}}">
|
||||
</fieldset>
|
||||
{{#unless dmg.base}}<div class="fas fa-trash" data-action="removeDamage" data-index="{{realIndex}}"></div>{{/unless}}
|
||||
|
|
|
|||
|
|
@ -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}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue