From bae9470a4fbf3f9fd16b8ba7215ba7ac8bef44c7 Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Sun, 25 Jan 2026 17:07:25 +0100 Subject: [PATCH] [Fix] 1.6.0 Roundup (#1581) * Fixed sceneEnvironments possibly being undfined * Fixed companion * Removed Ferocity trigger --- module/data/actor/character.mjs | 2 -- module/data/actor/companion.mjs | 2 +- module/documents/scene.mjs | 2 +- .../domains/domainCard_Ferocity_jSQsSP61CX4MhSN7.json | 8 +------- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/module/data/actor/character.mjs b/module/data/actor/character.mjs index e8da2e10..bf6e83c0 100644 --- a/module/data/actor/character.mjs +++ b/module/data/actor/character.mjs @@ -682,8 +682,6 @@ export default class DhCharacter extends BaseDataActor { } } } - - this.companion.system.attack.roll.bonus = this.traits.instinct.value; } this.resources.hope.value = Math.min(baseHope, this.resources.hope.max); diff --git a/module/data/actor/companion.mjs b/module/data/actor/companion.mjs index a2cb5db3..1c25b48c 100644 --- a/module/data/actor/companion.mjs +++ b/module/data/actor/companion.mjs @@ -131,7 +131,7 @@ export default class DhCompanion extends BaseDataActor { if (selection.data[0] === 'damage') { this.attack.damage.parts[0].value.dice = adjustDice(this.attack.damage.parts[0].value.dice); } else { - this.attack.range = adjustRange(this.attack.range); + this.attack.range = adjustRange(this.attack.range).id; } break; case 'stress': diff --git a/module/documents/scene.mjs b/module/documents/scene.mjs index 9e2a3f5b..1c2faa34 100644 --- a/module/documents/scene.mjs +++ b/module/documents/scene.mjs @@ -57,7 +57,7 @@ export default class DhScene extends Scene { if (changes.flags?.daggerheart) { if (this._source.flags.daggerheart) { - const unregisterTriggerData = this._source.flags.daggerheart.sceneEnvironments.reduce( + const unregisterTriggerData = (this._source.flags.daggerheart.sceneEnvironments ?? []).reduce( (acc, env) => { if (!changes.flags.daggerheart.sceneEnvironments.includes(env)) acc.sceneEnvironments.push(env); diff --git a/src/packs/domains/domainCard_Ferocity_jSQsSP61CX4MhSN7.json b/src/packs/domains/domainCard_Ferocity_jSQsSP61CX4MhSN7.json index 78593c62..94f0912f 100644 --- a/src/packs/domains/domainCard_Ferocity_jSQsSP61CX4MhSN7.json +++ b/src/packs/domains/domainCard_Ferocity_jSQsSP61CX4MhSN7.json @@ -41,13 +41,7 @@ "name": "Spend Hope", "img": "icons/skills/melee/maneuver-sword-katana-yellow.webp", "range": "", - "triggers": [ - { - "trigger": "postDamageReduction", - "triggeringActorType": "other", - "command": "/* Check if sufficient hope */\nif (this.actor.system.resources.hope.value < 2) return;\n\n/* Check if hit point damage was dealt */\nconst hpDamage = damageUpdates.find(u => u.key === CONFIG.DH.GENERAL.healingTypes.hitPoints.id);\nif (hpDamage.value < 0) return;\n\n/* Dialog to give player choice */\nconst confirmed = await foundry.applications.api.DialogV2.confirm({\n window: { title: this.item?.name ?? '' },\n content: game.i18n.format('DAGGERHEART.CONFIG.Triggers.triggerTexts.ferocityContent', { bonus: hpDamage.value }),\n});\n\nif (!confirmed) return;\n\n/* Create the effect */\nthis.actor.createEmbeddedDocuments('ActiveEffect', [{\n name: this.item.name,\n img: 'icons/skills/melee/maneuver-sword-katana-yellow.webp',\n description: game.i18n.format('DAGGERHEART.CONFIG.Triggers.triggerTexts.ferocityEffectDescription', { bonus: hpDamage.value }),\n changes: [{ key: 'system.evasion', mode: 2, value: hpDamage.value }]\n}]);\n\n/* Update hope */\nreturn { updates: [{ \n originActor: this.actor, \n updates: [{\n key: CONFIG.DH.GENERAL.healingTypes.hope.id,\n value: -2,\n total: 2\n }] \n}]}" - } - ] + "triggers": [] } }, "attribution": {