This commit is contained in:
WBHarry 2026-02-23 23:12:12 +01:00
parent 340abbc98c
commit ef128b88eb
19 changed files with 80 additions and 203 deletions

View file

@ -15,8 +15,8 @@
{{localize (concat 'DAGGERHEART.CONFIG.Traits.' item.system.attack.roll.trait '.short')}}
{{localize (concat 'DAGGERHEART.CONFIG.Range.' item.system.attack.range '.short')}}
<span> - </span>
{{item.system.attack.damage.parts.0.value.dice}}{{#if item.system.attack.damage.parts.0.value.bonus}} + {{item.system.attack.damage.parts.0.value.bonus}}{{/if}}
{{#each item.system.attack.damage.parts.0.type as | type | }}
{{item.system.attack.damage.parts.hitPoints.value.dice}}{{#if item.system.attack.damage.parts.hitPoints.value.bonus}} + {{item.system.attack.damage.parts.hitPoints.value.bonus}}{{/if}}
{{#each item.system.attack.damage.parts.hitPoints.type as | type | }}
{{#with (lookup @root.config.GENERAL.damageTypes type)}}
<i class="fa-solid {{icon}}"></i>
{{/with}}
@ -31,9 +31,9 @@
{{localize (concat 'DAGGERHEART.CONFIG.Range.' item.system.attack.range '.name')}}
</div>
<div class="tag">
{{item.system.attack.damage.parts.0.value.dice}}{{#if item.system.attack.damage.parts.0.value.bonus}} + {{item.system.attack.damage.parts.0.value.bonus}}{{/if}}
{{item.system.attack.damage.parts.hitPoints.value.dice}}{{#if item.system.attack.damage.parts.hitPoints.value.bonus}} + {{item.system.attack.damage.parts.hitPoints.value.bonus}}{{/if}}
(
{{#each item.system.attack.damage.parts.0.type}}
{{#each item.system.attack.damage.parts.hitPoints.type}}
{{localize (concat 'DAGGERHEART.CONFIG.DamageType.' this '.abbreviation')}}
{{/each}}
)

View file

@ -14,13 +14,13 @@
<span>-</span>
{{localize (concat 'DAGGERHEART.CONFIG.Range.' source.system.attack.range '.name')}}
<span>-</span>
{{#if source.system.attack.damage.parts.0.value.custom.enabled}}
{{#if source.system.attack.damage.parts.hitPoints.value.custom.enabled}}
{{localize "DAGGERHEART.GENERAL.custom"}}
{{else}}
{{source.system.attack.damage.parts.0.value.dice}}{{#if source.system.attack.damage.parts.0.value.bonus}} + {{source.system.attack.damage.parts.0.value.bonus}}{{/if}}
{{source.system.attack.damage.parts.hitPoints.value.dice}}{{#if source.system.attack.damage.parts.hitPoints.value.bonus}} + {{source.system.attack.damage.parts.hitPoints.value.bonus}}{{/if}}
{{/if}}
(
{{#each source.system.attack.damage.parts.0.type}}
{{#each source.system.attack.damage.parts.hitPoints.type}}
{{localize (concat 'DAGGERHEART.CONFIG.DamageType.' this '.abbreviation')}}
{{/each}}
)

View file

@ -19,25 +19,25 @@
<fieldset class="two-columns">
{{#with systemFields.attack.fields.damage.fields.parts.element.fields as | fields | }}
{{#with (lookup ../document.system.attack.damage.parts 0) as | source | }}
<legend>{{localize "DAGGERHEART.GENERAL.damage"}}</legend>
<span>{{localize "DAGGERHEART.ACTIONS.Config.general.customFormula"}}</span>
{{formInput fields.value.fields.custom.fields.enabled value=source.value.custom.enabled name="system.attack.damage.parts.0.value.custom.enabled"}}
{{#if source.value.custom.enabled}}
<span>{{localize "DAGGERHEART.ACTIONS.Config.general.formula"}}</span>
{{formInput fields.value.fields.custom.fields.formula value=source.value.custom.formula name="system.attack.damage.parts.0.value.custom.formula"}}
{{else}}
<span>{{localize "DAGGERHEART.GENERAL.Dice.single"}}</span>
{{formInput fields.value.fields.dice value=source.value.dice name="system.attack.damage.parts.0.value.dice"}}
<span>{{localize "DAGGERHEART.GENERAL.bonus"}}</span>
{{formInput fields.value.fields.bonus value=source.value.bonus name="system.attack.damage.parts.0.value.bonus" localize=true}}
{{/if}}
<span>{{localize "DAGGERHEART.GENERAL.type"}}</span>
{{formInput fields.type value=source.type name="system.attack.damage.parts.0.type" localize=true}}
<span>{{localize "DAGGERHEART.CONFIG.DamageType.direct.name"}}</span>
{{formInput @root.systemFields.attack.fields.damage.fields.direct value=@root.document.system.attack.damage.direct name="system.attack.damage.direct" localize=true}}
<input type="hidden" name="system.attack.damage.parts.0.value.multiplier" value="{{source.value.multiplier}}">
{{/with}}
{{#with ../document.system.attack.damage.parts.hitPoints as | source | }}
<legend>{{localize "DAGGERHEART.GENERAL.damage"}}</legend>
<span>{{localize "DAGGERHEART.ACTIONS.Config.general.customFormula"}}</span>
{{formInput fields.value.fields.custom.fields.enabled value=source.value.custom.enabled name="system.attack.damage.parts.hitPoints.value.custom.enabled"}}
{{#if source.value.custom.enabled}}
<span>{{localize "DAGGERHEART.ACTIONS.Config.general.formula"}}</span>
{{formInput fields.value.fields.custom.fields.formula value=source.value.custom.formula name="system.attack.damage.parts.hitPoints.value.custom.formula"}}
{{else}}
<span>{{localize "DAGGERHEART.GENERAL.Dice.single"}}</span>
{{formInput fields.value.fields.dice value=source.value.dice name="system.attack.damage.parts.hitPoints.value.dice"}}
<span>{{localize "DAGGERHEART.GENERAL.bonus"}}</span>
{{formInput fields.value.fields.bonus value=source.value.bonus name="system.attack.damage.parts.hitPoints.value.bonus" localize=true}}
{{/if}}
<span>{{localize "DAGGERHEART.GENERAL.type"}}</span>
{{formInput fields.type value=source.type name="system.attack.damage.parts.hitPoints.type" localize=true}}
<span>{{localize "DAGGERHEART.CONFIG.DamageType.direct.name"}}</span>
{{formInput @root.systemFields.attack.fields.damage.fields.direct value=@root.document.system.attack.damage.direct name="system.attack.damage.direct" localize=true}}
<input type="hidden" name="system.attack.damage.parts.hitPoints.value.multiplier" value="{{source.value.multiplier}}">
{{/with}}
{{/with}}
</fieldset>
<fieldset class="two-columns">