Fixed so that scars are applied to hope.max during derived data prep (#1673)

This commit is contained in:
WBHarry 2026-02-22 14:10:06 +01:00 committed by GitHub
parent ca434d33f1
commit 9296b8fcc2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -670,7 +670,7 @@ export default class DhCharacter extends DhCreature {
}; };
const globalHopeMax = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).maxHope; const globalHopeMax = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).maxHope;
this.resources.hope.max = globalHopeMax - this.scars; this.resources.hope.max = globalHopeMax;
this.resources.hitPoints.max += this.class.value?.system?.hitPoints ?? 0; this.resources.hitPoints.max += this.class.value?.system?.hitPoints ?? 0;
/* Companion Related Data */ /* Companion Related Data */
@ -694,6 +694,7 @@ export default class DhCharacter extends DhCreature {
} }
} }
this.resources.hope.max -= this.scars;
this.resources.hope.value = Math.min(baseHope, this.resources.hope.max); this.resources.hope.value = Math.min(baseHope, this.resources.hope.max);
this.attack.roll.trait = this.rules.attack.roll.trait ?? this.attack.roll.trait; this.attack.roll.trait = this.rules.attack.roll.trait ?? this.attack.roll.trait;