diff --git a/module/applications/sheets-configs/action-base-config.mjs b/module/applications/sheets-configs/action-base-config.mjs index c4729fbf..7396894f 100644 --- a/module/applications/sheets-configs/action-base-config.mjs +++ b/module/applications/sheets-configs/action-base-config.mjs @@ -316,7 +316,8 @@ export default class DHActionBaseConfig extends DaggerheartSheet(ApplicationV2) const callback = (_, button) => { const data = this.action.toObject(); const type = choices[button.form.elements.type.value].value; - const part = game.system.api.fields.ActionFields.DamageField.getDefaultDamagePart(type); + const part = this.action.schema.fields.damage.fields.parts.element.getInitialValue(); + part.applyTo = type; data.damage.parts[type] = part; this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) }); }; diff --git a/module/data/fields/action/damageField.mjs b/module/data/fields/action/damageField.mjs index 8fa7d6e6..b7ef852e 100644 --- a/module/data/fields/action/damageField.mjs +++ b/module/data/fields/action/damageField.mjs @@ -23,33 +23,6 @@ export default class DamageField extends fields.SchemaField { super(damageFields, options, context); } - static getDefaultDamagePart(applyTo) { - return { - applyTo: applyTo, - base: false, - resultBased: false, - type: 'physical', - value: { - dice: 'd6', - multiplier: 'prof', - flatMultiplier: 1, - custom: { - enabled: false, - formula: '' - } - }, - valueAlt: { - dice: 'd6', - multiplier: 'prof', - flatMultiplier: 1, - custom: { - enabled: false, - formula: '' - } - } - }; - } - /** * Roll Damage/Healing Action Workflow part. * Must be called within Action context or similar.