From 516928f92be81cb646d98a85d216c56b5e2acd2a Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Sat, 2 May 2026 22:02:57 +0200 Subject: [PATCH] Fixed a data path error in character._preUpdate when scars are changed by an update (#1856) --- module/data/actor/character.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/data/actor/character.mjs b/module/data/actor/character.mjs index d42f2f64..a1cd13e8 100644 --- a/module/data/actor/character.mjs +++ b/module/data/actor/character.mjs @@ -836,10 +836,10 @@ export default class DhCharacter extends DhCreature { /* Scars can alter the amount of current hope */ if (changes.system?.scars) { - const diff = this.system.scars - changes.system.scars; - const newHopeMax = this.system.resources.hope.max + diff; - const newHopeValue = Math.min(newHopeMax, this.system.resources.hope.value); - if (newHopeValue != this.system.resources.hope.value) { + const diff = this.scars - changes.system.scars; + const newHopeMax = this.resources.hope.max + diff; + const newHopeValue = Math.min(newHopeMax, this.resources.hope.value); + if (newHopeValue != this.resources.hope.value) { if (!changes.system.resources.hope) changes.system.resources.hope = { value: 0 }; changes.system.resources.hope = {