[Fix] 1.6.0 Roundup (#1581)

* Fixed sceneEnvironments possibly being undfined

* Fixed companion

* Removed Ferocity trigger
This commit is contained in:
WBHarry 2026-01-25 17:07:25 +01:00 committed by GitHub
parent f1ebb7d1e1
commit bae9470a4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 3 additions and 11 deletions

View file

@ -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);

View file

@ -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':

View file

@ -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);

View file

@ -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": {