From ef4d37d72508ecb9e0f66f23882becfdb42401cf Mon Sep 17 00:00:00 2001 From: Chris Ryan <73275196+chrisryan10@users.noreply.github.com> Date: Sat, 30 Aug 2025 11:47:08 +1000 Subject: [PATCH 1/2] typo fixes (#1121) Co-authored-by: Chris Ryan --- .../adversary_Acid_Burrower_89yAh30vaNQOALlz.json | 12 ++++++------ ...ary_Greater_Earth_Elemental_dsfB3YhoL5SudvS2.json | 12 ++++++------ .../adversary_Huge_Green_Ooze_6hbqmxDXFOzZJDk4.json | 12 ++++++------ .../adversary_Tiny_Green_Ooze_aLkLFuVoKz2NLoBK.json | 12 ++++++------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/packs/adversaries/adversary_Acid_Burrower_89yAh30vaNQOALlz.json b/src/packs/adversaries/adversary_Acid_Burrower_89yAh30vaNQOALlz.json index e226f013..90c5950e 100644 --- a/src/packs/adversaries/adversary_Acid_Burrower_89yAh30vaNQOALlz.json +++ b/src/packs/adversaries/adversary_Acid_Burrower_89yAh30vaNQOALlz.json @@ -434,14 +434,14 @@ "_id": "UpFsnlbZkyvM2Ftv", "img": "icons/magic/acid/projectile-smoke-glowing.webp", "system": { - "description": "

Make an attack against all targets in front of the Burrower within Close range. Targets the Burrower succeeds against take 2d6 physical damage and must mark an Armor Slot without receiving its benefi ts (they can still use armor to reduce the damage). If they can’t mark an Armor Slot, they must mark an additional HP and you gain a Fear.

@Template[type:inFront|range:c]

", + "description": "

Make an attack against all targets in front of the Burrower within Close range. Targets the Burrower succeeds against take 2d6 physical damage and must mark an Armor Slot without receiving its benefits (they can still use armor to reduce the damage). If they can’t mark an Armor Slot, they must mark an additional HP and you gain a Fear.

@Template[type:inFront|range:c]

", "resource": null, "actions": { "yd10HwK6Wa3OEvv2": { "type": "attack", "_id": "yd10HwK6Wa3OEvv2", "systemPath": "actions", - "description": "

Make an attack against all targets in front of the Burrower within Close range. Targets the Burrower succeeds against take 2d6 physical damage and must mark an Armor Slot without receiving its benefi ts (they can still use armor to reduce the damage). If they can’t mark an Armor Slot, they must mark an additional HP and you gain a Fear.

@Template[type:inFront|range:c]

", + "description": "

Make an attack against all targets in front of the Burrower within Close range. Targets the Burrower succeeds against take 2d6 physical damage and must mark an Armor Slot without receiving its benefits (they can still use armor to reduce the damage). If they can’t mark an Armor Slot, they must mark an additional HP and you gain a Fear.

@Template[type:inFront|range:c]

", "chatDisplay": true, "actionType": "action", "cost": [], @@ -553,11 +553,11 @@ "compendiumSource": null, "duplicateSource": null, "exportSource": null, - "coreVersion": "13.346", + "coreVersion": "13.348", "systemId": "daggerheart", - "systemVersion": "0.0.1", - "lastModifiedBy": "MQSznptE5yLT7kj8", - "modifiedTime": 1754143653876 + "systemVersion": "1.1.2", + "lastModifiedBy": "mdk78Q6pOyHh6aBg", + "modifiedTime": 1756510879809 }, "_key": "!actors.items!89yAh30vaNQOALlz.UpFsnlbZkyvM2Ftv" }, diff --git a/src/packs/adversaries/adversary_Greater_Earth_Elemental_dsfB3YhoL5SudvS2.json b/src/packs/adversaries/adversary_Greater_Earth_Elemental_dsfB3YhoL5SudvS2.json index e519b193..d4554bf9 100644 --- a/src/packs/adversaries/adversary_Greater_Earth_Elemental_dsfB3YhoL5SudvS2.json +++ b/src/packs/adversaries/adversary_Greater_Earth_Elemental_dsfB3YhoL5SudvS2.json @@ -264,14 +264,14 @@ "name": "Crushing Blows", "type": "feature", "system": { - "description": "

When the Elemental makes a successful attack, the target must mark an Armor Slot without receiving its benefi ts (they can still use armor to reduce the damage). If they can’t mark an Armor Slot, they must mark an additional HP.

", + "description": "

When the Elemental makes a successful attack, the target must mark an Armor Slot without receiving its benefits (they can still use armor to reduce the damage). If they can’t mark an Armor Slot, they must mark an additional HP.

", "resource": null, "actions": { "0sXciTiPc30v8czv": { "type": "damage", "_id": "0sXciTiPc30v8czv", "systemPath": "actions", - "description": "

When the Elemental makes a successful attack, the target must mark an Armor Slot without receiving its benefi ts (they can still use armor to reduce the damage). If they can’t mark an Armor Slot, they must mark an additional HP.

", + "description": "

When the Elemental makes a successful attack, the target must mark an Armor Slot without receiving its benefits (they can still use armor to reduce the damage). If they can’t mark an Armor Slot, they must mark an additional HP.

", "chatDisplay": true, "actionType": "action", "cost": [], @@ -337,12 +337,12 @@ "compendiumSource": null, "duplicateSource": null, "exportSource": null, - "coreVersion": "13.346", + "coreVersion": "13.348", "systemId": "daggerheart", - "systemVersion": "0.0.1", + "systemVersion": "1.1.2", "createdTime": 1754127683751, - "modifiedTime": 1754127795809, - "lastModifiedBy": "MQSznptE5yLT7kj8" + "modifiedTime": 1756511006257, + "lastModifiedBy": "mdk78Q6pOyHh6aBg" }, "_key": "!actors.items!dsfB3YhoL5SudvS2.NnCkXIuATO0s3tSR" }, diff --git a/src/packs/adversaries/adversary_Huge_Green_Ooze_6hbqmxDXFOzZJDk4.json b/src/packs/adversaries/adversary_Huge_Green_Ooze_6hbqmxDXFOzZJDk4.json index af630cdd..6a986acd 100644 --- a/src/packs/adversaries/adversary_Huge_Green_Ooze_6hbqmxDXFOzZJDk4.json +++ b/src/packs/adversaries/adversary_Huge_Green_Ooze_6hbqmxDXFOzZJDk4.json @@ -270,14 +270,14 @@ "name": "Acidic Form", "type": "feature", "system": { - "description": "

When the Ooze makes a successful attack, the target must mark an Armor Slot without receiving its benefi ts (they can still use armor to reduce the damage). If they can’t mark an Armor Slot, they must mark an additional HP.

", + "description": "

When the Ooze makes a successful attack, the target must mark an Armor Slot without receiving its benefits (they can still use armor to reduce the damage). If they can’t mark an Armor Slot, they must mark an additional HP.

", "resource": null, "actions": { "gtT2oHSyZg9OHHJD": { "type": "damage", "_id": "gtT2oHSyZg9OHHJD", "systemPath": "actions", - "description": "

When the Ooze makes a successful attack, the target must mark an Armor Slot without receiving its benefi ts (they can still use armor to reduce the damage). If they can’t mark an Armor Slot, they must mark an additional HP.

", + "description": "

When the Ooze makes a successful attack, the target must mark an Armor Slot without receiving its benefits (they can still use armor to reduce the damage). If they can’t mark an Armor Slot, they must mark an additional HP.

", "chatDisplay": true, "actionType": "action", "cost": [], @@ -343,12 +343,12 @@ "compendiumSource": null, "duplicateSource": null, "exportSource": null, - "coreVersion": "13.346", + "coreVersion": "13.348", "systemId": "daggerheart", - "systemVersion": "0.0.1", + "systemVersion": "1.1.2", "createdTime": 1754129153649, - "modifiedTime": 1754129204931, - "lastModifiedBy": "MQSznptE5yLT7kj8" + "modifiedTime": 1756510982337, + "lastModifiedBy": "mdk78Q6pOyHh6aBg" }, "_key": "!actors.items!6hbqmxDXFOzZJDk4.BQsVuuwFYByKwesR" }, diff --git a/src/packs/adversaries/adversary_Tiny_Green_Ooze_aLkLFuVoKz2NLoBK.json b/src/packs/adversaries/adversary_Tiny_Green_Ooze_aLkLFuVoKz2NLoBK.json index be94d1bd..06227cd5 100644 --- a/src/packs/adversaries/adversary_Tiny_Green_Ooze_aLkLFuVoKz2NLoBK.json +++ b/src/packs/adversaries/adversary_Tiny_Green_Ooze_aLkLFuVoKz2NLoBK.json @@ -224,14 +224,14 @@ "_id": "WpOh5kHHx7lcTvEY", "img": "icons/magic/acid/dissolve-drip-droplet-smoke.webp", "system": { - "description": "

When the Ooze makes a successful attack, the target must mark an Armor Slot without receiving its benefi ts (they can still use armor to reduce the damage). If they can’t mark an Armor Slot, they must mark an additional HP.

", + "description": "

When the Ooze makes a successful attack, the target must mark an Armor Slot without receiving its benefits (they can still use armor to reduce the damage). If they can’t mark an Armor Slot, they must mark an additional HP.

", "resource": null, "actions": { "HfK0u0c7NRppuF1Q": { "type": "damage", "_id": "HfK0u0c7NRppuF1Q", "systemPath": "actions", - "description": "

When the Ooze makes a successful attack, the target must mark an Armor Slot without receiving its benefi ts (they can still use armor to reduce the damage). If they can’t mark an Armor Slot, they must mark an additional HP.

", + "description": "

When the Ooze makes a successful attack, the target must mark an Armor Slot without receiving its benefits (they can still use armor to reduce the damage). If they can’t mark an Armor Slot, they must mark an additional HP.

", "chatDisplay": true, "actionType": "action", "cost": [], @@ -296,12 +296,12 @@ "compendiumSource": null, "duplicateSource": null, "exportSource": null, - "coreVersion": "13.346", + "coreVersion": "13.348", "systemId": "daggerheart", - "systemVersion": "0.0.1", + "systemVersion": "1.1.2", "createdTime": 1754055148507, - "modifiedTime": 1754145130460, - "lastModifiedBy": "MQSznptE5yLT7kj8" + "modifiedTime": 1756510967769, + "lastModifiedBy": "mdk78Q6pOyHh6aBg" }, "_key": "!actors.items!aLkLFuVoKz2NLoBK.WpOh5kHHx7lcTvEY" } From 31238113c994c5c0aa81af25aa8de6333db3ad6b Mon Sep 17 00:00:00 2001 From: Dapoulp <74197441+Dapoulp@users.noreply.github.com> Date: Sat, 30 Aug 2025 17:44:16 +0200 Subject: [PATCH 2/2] Fix/1116 fix action nullable fields (#1117) * Temp ActionField attack type missing * Move missing attack type to getModel * Damage/Healing fields nullable fix * Fix TargetField null value * Other fixes * Fix Action type to be not nullable --- module/data/action/baseAction.mjs | 3 ++- module/data/fields/action/damageField.mjs | 12 ++++++++++-- module/data/fields/action/rollField.mjs | 12 +++++++++--- module/data/fields/action/saveField.mjs | 4 +++- module/data/fields/action/targetField.mjs | 3 ++- 5 files changed, 26 insertions(+), 8 deletions(-) diff --git a/module/data/action/baseAction.mjs b/module/data/action/baseAction.mjs index 2f5935da..7ea7331a 100644 --- a/module/data/action/baseAction.mjs +++ b/module/data/action/baseAction.mjs @@ -32,7 +32,8 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel actionType: new fields.StringField({ choices: CONFIG.DH.ITEM.actionTypes, initial: 'action', - nullable: true + nullable: false, + required: true }) }; diff --git a/module/data/fields/action/damageField.mjs b/module/data/fields/action/damageField.mjs index 810b6e76..e870e229 100644 --- a/module/data/fields/action/damageField.mjs +++ b/module/data/fields/action/damageField.mjs @@ -22,10 +22,18 @@ export class DHActionDiceData extends foundry.abstract.DataModel { multiplier: new fields.StringField({ choices: CONFIG.DH.GENERAL.multiplierTypes, initial: 'prof', - label: 'Multiplier' + label: 'Multiplier', + nullable: false, + required: true }), flatMultiplier: new fields.NumberField({ nullable: true, initial: 1, label: 'Flat Multiplier' }), - dice: new fields.StringField({ choices: CONFIG.DH.GENERAL.diceTypes, initial: 'd6', label: 'Dice' }), + dice: new fields.StringField({ + choices: CONFIG.DH.GENERAL.diceTypes, + initial: 'd6', + label: 'Dice', + nullable: false, + required: true + }), bonus: new fields.NumberField({ nullable: true, initial: null, label: 'Bonus' }), custom: new fields.SchemaField({ enabled: new fields.BooleanField({ label: 'Custom Formula' }), diff --git a/module/data/fields/action/rollField.mjs b/module/data/fields/action/rollField.mjs index a4df2a9e..07a113d3 100644 --- a/module/data/fields/action/rollField.mjs +++ b/module/data/fields/action/rollField.mjs @@ -10,13 +10,17 @@ export class DHActionRollData extends foundry.abstract.DataModel { bonus: new fields.NumberField({ nullable: true, initial: null, integer: true }), advState: new fields.StringField({ choices: CONFIG.DH.ACTIONS.advantageState, - initial: 'neutral' + initial: 'neutral', + nullable: false, + required: true }), diceRolling: new fields.SchemaField({ multiplier: new fields.StringField({ choices: CONFIG.DH.GENERAL.diceSetNumbers, initial: 'prof', - label: 'DAGGERHEART.ACTIONS.RollField.diceRolling.multiplier' + label: 'DAGGERHEART.ACTIONS.RollField.diceRolling.multiplier', + nullable: false, + required: true }), flatMultiplier: new fields.NumberField({ nullable: true, @@ -26,7 +30,9 @@ export class DHActionRollData extends foundry.abstract.DataModel { dice: new fields.StringField({ choices: CONFIG.DH.GENERAL.diceTypes, initial: CONFIG.DH.GENERAL.diceTypes.d6, - label: 'DAGGERHEART.ACTIONS.RollField.diceRolling.dice' + label: 'DAGGERHEART.ACTIONS.RollField.diceRolling.dice', + nullable: false, + required: true }), compare: new fields.StringField({ choices: CONFIG.DH.ACTIONS.diceCompare, diff --git a/module/data/fields/action/saveField.mjs b/module/data/fields/action/saveField.mjs index e93a82a9..23378e05 100644 --- a/module/data/fields/action/saveField.mjs +++ b/module/data/fields/action/saveField.mjs @@ -11,7 +11,9 @@ export default class SaveField extends fields.SchemaField { difficulty: new fields.NumberField({ nullable: true, initial: null, integer: true, min: 0 }), damageMod: new fields.StringField({ initial: CONFIG.DH.ACTIONS.damageOnSave.none.id, - choices: CONFIG.DH.ACTIONS.damageOnSave + choices: CONFIG.DH.ACTIONS.damageOnSave, + nullable: false, + required: true }) }; super(saveFields, options, context); diff --git a/module/data/fields/action/targetField.mjs b/module/data/fields/action/targetField.mjs index bfb01db9..9dbf1ed9 100644 --- a/module/data/fields/action/targetField.mjs +++ b/module/data/fields/action/targetField.mjs @@ -6,7 +6,8 @@ export default class TargetField extends fields.SchemaField { type: new fields.StringField({ choices: CONFIG.DH.GENERAL.targetTypes, initial: CONFIG.DH.GENERAL.targetTypes.any.id, - nullable: true + nullable: true, + blank: true }), amount: new fields.NumberField({ nullable: true, initial: null, integer: true, min: 0 }) };