Fix for v14
Release Creation / build (release) Successful in 48s

This commit is contained in:
2026-04-28 07:52:18 +02:00
parent bb6a6248f2
commit e26db56585
29 changed files with 99 additions and 75 deletions
+6 -1
View File
@@ -42,6 +42,12 @@ export default class CthulhuEternalActor extends Actor {
type: CONST.CHAT_MESSAGE_STYLES.OTHER
})
}
if (this.type === "protagonist" && changed?.system?.hp !== undefined) {
const hp = this.system.hp
this.toggleStatusEffect("dead", { active: !!hp.dead })
this.toggleStatusEffect("unconscious", { active: !!hp.unconscious && !hp.dead })
this.toggleStatusEffect("stun", { active: !!hp.stunned && !hp.dead && !hp.unconscious })
}
return super._onUpdate(changed, options, userId)
}
@@ -69,7 +75,6 @@ export default class CthulhuEternalActor extends Actor {
if (this.system.hp.value !== hp) {
this.update({ "system.hp.value": hp })
}
console.log("Applying wounds", { woundData, totalArmor, effectiveWounds })
// Chat message for GM only
if (game.user.isGM) {
let armorText = totalArmor > 0 ? game.i18n.format("CTHULHUETERNAL.Chat.armorAbsorbed", { armor: totalArmor }) : game.i18n.localize("CTHULHUETERNAL.Chat.noArmor")