Skip to content

Commit

Permalink
Merge pull request #196 from sasquach45932/master
Browse files Browse the repository at this point in the history
Chat card tooltip tweak
  • Loading branch information
ClipplerBlood authored Aug 29, 2024
2 parents b3f3337 + 64770d6 commit a886562
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/module/chat/base-messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@ export function formatDice(diceRoll) {
if (pooldie.discarded) {
pushDice(diceData, pooldie.result, faces, '#777')
} else {
pushDice(diceData, pooldie.result, faces, 'white')
let color = 'white'
if (diceRoll._formula.includes('d6kh') && faces === 6) {
let operator = diceRoll.terms[diceRoll.terms.length - 2].operator
if (operator === '+') color = '#006400'
if (operator === '-') color = '#a22223'
}
pushDice(diceData, pooldie.result, faces, color)
}
})
// eslint-disable-next-line no-undef
Expand Down

0 comments on commit a886562

Please sign in to comment.