Style the fate message based on Hope/Fear colors.

This commit is contained in:
Chris Ryan 2025-12-08 22:06:21 +10:00
parent a11a2d4e30
commit 01c1d8fa15
2 changed files with 31 additions and 1 deletions

View file

@ -89,6 +89,12 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
}
if (this.type === 'fateRoll') {
html.classList.add('fate');
if (this.system.roll?.fate.fateDie == 'Hope') {
html.classList.add('hope');
}
if (this.system.roll?.fate.fateDie == 'Fear') {
html.classList.add('fear');
}
}
const autoExpandRoll = game.settings.get(

View file

@ -14,6 +14,7 @@
color: @dark;
}
&.fate,
&.duality {
background-image: url(../assets/parchments/dh-parchment-dark.png);
@ -66,6 +67,7 @@
}
}
&.fate,
&.critical {
--text-color: @chat-purple;
--bg-color: @chat-purple-40;
@ -80,7 +82,7 @@
}
}
&:not(.duality) {
&:not(.duality .fate) {
.font-20 {
color: @dark;
}
@ -172,6 +174,28 @@
}
}
&.fate {
&.hope {
--text-color: @golden;
--bg-color: @golden-40;
.message-header,
.message-content {
background-color: @golden-bg;
}
}
&.fear {
--text-color: @chat-blue;
--bg-color: @chat-blue-40;
.message-header,
.message-content {
background-color: @chat-blue-bg;
}
}
}
&.duality {
&.hope {
--text-color: @golden;