Basic rework to the roll data in messages

This commit is contained in:
WBHarry 2026-03-30 18:51:29 +02:00
parent e2b13d6717
commit 2664979823
15 changed files with 199 additions and 226 deletions

View file

@ -1,4 +1,4 @@
import { emitAsGM, GMUpdateEvent, RefreshType, socketEvent } from '../systemRegistration/socket.mjs';
import { emitAsGM, GMUpdateEvent } from '../systemRegistration/socket.mjs';
export default class DhpChatMessage extends foundry.documents.ChatMessage {
targetHook = null;
@ -78,17 +78,9 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
if (this.isContentVisible) {
if (this.type === 'dualityRoll') {
html.classList.add('duality');
switch (this.system.roll?.result?.duality) {
case 1:
html.classList.add('hope');
break;
case -1:
html.classList.add('fear');
break;
default:
html.classList.add('critical');
break;
}
if (this.system.roll.withHope) html.classList.add('hope');
else if (this.system.roll.withFear) html.classList.add('fear');
else html.classList.add('critical');
}
if (this.type === 'fateRoll') {
html.classList.add('fate');