Enhance roll result colors

This commit is contained in:
2025-01-07 22:22:15 +01:00
parent 44842ff655
commit adb4923d00
12 changed files with 119 additions and 67 deletions

View File

@ -28,6 +28,19 @@ export default class CthulhuEternalActor extends Actor {
return super.create(data, options);
}
_onUpdate(changed, options, userId) {
// DEBUG : console.log("CthulhuEternalActor.update", changed, options, userId)
if ( changed?.system?.wp?.exhausted) {
ChatMessage.create({
user: userId,
speaker: { alias: this.name },
rollMode: "selfroll",
content: game.i18n.localize("CTHULHUETERNAL.ChatMessage.exhausted"),
type: CONST.CHAT_MESSAGE_STYLES.OTHER
})
}
return super._onUpdate(changed, options, userId)
}
async _preCreate(data, options, user) {
await super._preCreate(data, options, user)