mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
Begin damage
This commit is contained in:
parent
7cc92d153b
commit
1c90024a5d
11 changed files with 159 additions and 104 deletions
|
|
@ -9,15 +9,26 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
|
|||
|
||||
/* We can change to fully implementing the renderHTML function if needed, instead of augmenting it. */
|
||||
const html = await super.renderHTML();
|
||||
|
||||
console.log(this.system)
|
||||
if (
|
||||
this.type === 'dualityRoll'
|
||||
) {
|
||||
html.classList.add('duality');
|
||||
const dualityResult = this.system.dualityResult;
|
||||
if (dualityResult === DHDualityRoll.dualityResult.hope) html.classList.add('hope');
|
||||
/* const dualityResult = this.system.dualityResult; */
|
||||
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 (dualityResult === DHDualityRoll.dualityResult.hope) html.classList.add('hope');
|
||||
else if (dualityResult === DHDualityRoll.dualityResult.fear) html.classList.add('fear');
|
||||
else html.classList.add('critical');
|
||||
else html.classList.add('critical'); */
|
||||
}
|
||||
|
||||
return html;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue