Fix HP and other derivated values not computed anymore
All checks were successful
Release Creation / build (release) Successful in 2m57s

This commit is contained in:
2025-08-10 19:33:28 +02:00
parent 4edbc9b618
commit 264a5c7a4c
8 changed files with 31 additions and 28 deletions

View File

@@ -109,7 +109,7 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS
);
// Merge skillsColumns in a single flat array
skillsColumns = skillsColumns.flat().filter(Boolean);
console.log("Skills columns:", skillsColumns);
//DEBUG : console.log("Skills columns:", skillsColumns);
context.skills = skillsColumns
}
break

View File

@@ -140,13 +140,16 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData
if (!this.san.breakingPointReached && this.san.value <= this.san.breakingPoint) {
updates[`system.san.breakingPointReached`] = true
this.san.breakingPointReached = true // Force local update to true
let w = game.users.find(u => u.character?.name === this.parent?.name)
if (w) {
ChatMessage.create({
content: `<p>${game.i18n.format("CTHULHUETERNAL.Label.breakingPointReached", { bp: this.san.breakingPoint, san: this.san.value })}</p>`,
speaker: ChatMessage.getSpeaker({ actor: this.parent }),
// Get the user id of the actor owner
whisper: [game.users.find(u => u.character?.name === this.parent?.name).id ]
whisper: [w.id]
})
}
}
// Unconsciousness management
if (!this.hp.unconscious && this.hp.value <= 2) {

Binary file not shown.

Binary file not shown.

Binary file not shown.