mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-05 20:34:15 +02:00
Lift definition of alt outcomes up one step
This commit is contained in:
parent
f607e8dfa4
commit
1ffde09568
7 changed files with 71 additions and 63 deletions
|
|
@ -38,15 +38,15 @@
|
|||
<div class="nest-inputs">
|
||||
<fieldset class="one-column">
|
||||
<legend>{{localize "DAGGERHEART.GENERAL.withThing" thing=(localize "DAGGERHEART.GENERAL.hope")}}</legend>
|
||||
{{> formula fields=../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" key=dmg.applyTo path=../path outcomePath=../outcomePath}}
|
||||
{{> formula fields=../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" key=dmg.applyTo path=../path basePath=../basePath}}
|
||||
</fieldset>
|
||||
<fieldset class="one-column">
|
||||
<legend>{{localize "DAGGERHEART.GENERAL.withThing" thing=(localize "DAGGERHEART.GENERAL.fear")}}</legend>
|
||||
{{> formula fields=../fields.valueAlt.fields type=../fields.type dmg=dmg source=dmg.valueAlt target="valueAlt" key=dmg.applyTo path=../path outcomePath=../outcomePath}}
|
||||
{{> formula fields=../fields.valueAlt.fields type=../fields.type dmg=dmg source=dmg.valueAlt target="valueAlt" key=dmg.applyTo path=../path basePath=../basePath}}
|
||||
</fieldset>
|
||||
</div>
|
||||
{{else}}
|
||||
{{> formula fields=../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" key=dmg.applyTo path=../path outcomePath=../outcomePath}}
|
||||
{{> formula fields=../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" key=dmg.applyTo path=../path basePath=../basePath}}
|
||||
{{/if}}
|
||||
|
||||
{{#if (and (eq dmg.applyTo 'hitPoints') (ne @root.source.type 'healing'))}}
|
||||
|
|
@ -72,21 +72,21 @@
|
|||
|
||||
{{#*inline "formula"}}
|
||||
{{#unless dmg.base}}
|
||||
{{formField fields.custom.fields.enabled value=source.custom.enabled name=(concat path outcomePath ".parts." key "." target ".custom.enabled") classes="checkbox" localize=true}}
|
||||
{{formField fields.custom.fields.enabled value=source.custom.enabled name=(concat path basePath ".parts." key "." target ".custom.enabled") classes="checkbox" localize=true}}
|
||||
{{/unless}}
|
||||
{{#if source.custom.enabled}}
|
||||
{{formField fields.custom.fields.formula value=source.custom.formula name=(concat path outcomePath ".parts." key "." target ".custom.formula") localize=true}}
|
||||
{{formField fields.custom.fields.formula value=source.custom.formula name=(concat path basePath ".parts." key "." target ".custom.formula") localize=true}}
|
||||
{{else}}
|
||||
<div class="nest-inputs">
|
||||
{{#unless @root.isNPC}}
|
||||
{{formField fields.multiplier value=source.multiplier name=(concat path outcomePath ".parts." key "." target ".multiplier") localize=true}}
|
||||
{{formField fields.multiplier value=source.multiplier name=(concat path basePath ".parts." key "." target ".multiplier") localize=true}}
|
||||
{{/unless}}
|
||||
{{#if (eq source.multiplier 'flat')}}{{formField fields.flatMultiplier value=source.flatMultiplier name=(concat path outcomePath ".parts." key "." target ".flatMultiplier") localize=true }}{{/if}}
|
||||
{{formField fields.dice value=source.dice name=(concat path outcomePath ".parts." key "." target ".dice") localize=true}}
|
||||
{{formField fields.bonus value=source.bonus name=(concat path outcomePath ".parts." key "." target ".bonus") localize=true}}
|
||||
{{#if (eq source.multiplier 'flat')}}{{formField fields.flatMultiplier value=source.flatMultiplier name=(concat path basePath ".parts." key "." target ".flatMultiplier") localize=true }}{{/if}}
|
||||
{{formField fields.dice value=source.dice name=(concat path basePath ".parts." key "." target ".dice") localize=true}}
|
||||
{{formField fields.bonus value=source.bonus name=(concat path basePath ".parts." key "." target ".bonus") localize=true}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if @root.isNPC}}
|
||||
<input type="hidden" name="{{concat path outcomePath ".parts.{{key}}.{{target}}.multiplier"}}" value="flat">
|
||||
<input type="hidden" name="{{concat path basePath ".parts.{{key}}.{{target}}.multiplier"}}" value="flat">
|
||||
{{/if}}
|
||||
{{/inline}}
|
||||
|
|
@ -21,14 +21,15 @@
|
|||
data-group="outcomes"
|
||||
data-tab="{{tab.id}}"
|
||||
>
|
||||
{{#if ../fields.damage}}
|
||||
{{#if (eq tab.id 'default')}}
|
||||
{{> 'systems/daggerheart/templates/actionTypes/damage.hbs' fields=../fields.damage.fields.parts.element.fields source=../source.damage baseFields=../fields.damage.fields outcome=tab.id outcomePath="damage" isDefaultDamage="true" }}
|
||||
{{else}}
|
||||
{{#with (lookup ../fields.damage.fields.altOutcomes.fields tab.id) as |field|}}
|
||||
{{> 'systems/daggerheart/templates/actionTypes/damage.hbs' fields=field.fields.parts.element.fields source=(lookup ../../source.damage.altOutcomes ../id) baseFields=field.fields outcome=../id outcomePath=(concat "damage.altOutcomes." tab.id) }}
|
||||
{{/with }}
|
||||
{{/if}}
|
||||
{{#if tab.fields.damage}}
|
||||
{{> 'systems/daggerheart/templates/actionTypes/damage.hbs'
|
||||
outcome=tab.id
|
||||
fields=tab.fields.damage.fields.parts.element.fields
|
||||
source=tab.source.damage
|
||||
baseFields=tab.fields.damage.fields
|
||||
isDefaultDamage="true"
|
||||
basePath=(tab.getBasePath "damage")
|
||||
}}
|
||||
{{/if}}
|
||||
|
||||
</section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue