diff --git a/module/data/fields/action/damageField.mjs b/module/data/fields/action/damageField.mjs index 7703d2a5..4edc2533 100644 --- a/module/data/fields/action/damageField.mjs +++ b/module/data/fields/action/damageField.mjs @@ -283,17 +283,6 @@ export class DHResourceData extends foundry.abstract.DataModel { static defineSchema() { return { base: new fields.BooleanField({ initial: false, readonly: true, label: 'Base' }), - type: new fields.SetField( - new fields.StringField({ - choices: CONFIG.DH.GENERAL.damageTypes, - initial: 'physical', - nullable: false, - required: true - }), - { - label: game.i18n.localize('DAGGERHEART.GENERAL.type') - } - ), applyTo: new fields.StringField({ choices: CONFIG.DH.GENERAL.healingTypes, required: true, @@ -325,7 +314,18 @@ export class DHDamageData extends DHResourceData { choices: CONFIG.DH.GENERAL.groupAttackRange, blank: true, label: 'DAGGERHEART.ACTIONS.Settings.groupAttack.label' - }) + }), + type: new fields.SetField( + new fields.StringField({ + choices: CONFIG.DH.GENERAL.damageTypes, + initial: 'physical', + nullable: false, + required: true + }), + { + label: game.i18n.localize('DAGGERHEART.GENERAL.type') + } + ) }; } } diff --git a/templates/actionTypes/damage.hbs b/templates/actionTypes/damage.hbs index 995f8949..88786850 100644 --- a/templates/actionTypes/damage.hbs +++ b/templates/actionTypes/damage.hbs @@ -25,6 +25,9 @@ {{/if}} {{> damageData data=source.main fields=fields.main.fields basePath=(concat path "damage.main")}} + {{#if (ne @root.source.type 'healing')}} + {{formField fields.main.fields.type value=source.main.type name=(concat path "damage.main.type") localize=true}} + {{/if}} {{/if}} @@ -33,8 +36,6 @@ {{localize "DAGGERHEART.GENERAL.Resource.plural"}} {{#unless (eq path 'system.attack.')}}{{/unless}} - - {{!-- Handlebars uses Symbol.Iterator to produce index|key. This isn't compatible with our parts object, so we instead use applyTo, which is the same value --}} {{#each source.resources as |dmg key|}}
@@ -90,10 +91,6 @@ {{> formula fields=fields.value.fields type=fields.type dmg=data source=data.value basePath=basePath target="value" key=data.applyTo path=../path}} {{/if}} - {{#if (ne @root.source.type 'healing')}} - {{formField fields.type value=data.type name=(concat basePath ".type") localize=true}} - {{/if}} - {{#if ../horde}}
{{localize "DAGGERHEART.ACTORS.Adversary.hordeDamage"}}