diff --git a/module/dice/die/dualityDie.mjs b/module/dice/die/dualityDie.mjs index 90288704..e9deb77f 100644 --- a/module/dice/die/dualityDie.mjs +++ b/module/dice/die/dualityDie.mjs @@ -35,8 +35,19 @@ export default class DualityDie extends foundry.dice.terms.Die { await super.reroll(modifier, options); if (options?.liveRoll) { + /* Can't currently test since DiceSoNice is not v14. Might need to set the appearance earlier if a roll is triggered by super.reroll */ if (game.modules.get('dice-so-nice')?.active) { - /* Dice Customization for the roll */ + const diceSoNiceRoll = { + _evaluated: true, + dice: [this], + options: { appearance: {} } + }; + + const preset = await getDiceSoNicePreset(diceSoNice[key], faces); + diceSoNiceRoll.dice[0].options.appearance = preset.appearance; + diceSoNiceRoll.dice[0].options.modelFile = preset.modelFile; + + await game.dice3d.showForRoll(diceSoNiceRoll, game.user, true); } else { foundry.audio.AudioHelper.play({ src: CONFIG.sounds.dice }); } diff --git a/styles/less/ui/chat/chat.less b/styles/less/ui/chat/chat.less index e9ef9147..db6dceb9 100644 --- a/styles/less/ui/chat/chat.less +++ b/styles/less/ui/chat/chat.less @@ -384,6 +384,15 @@ justify-content: center; width: 15px; } + &.has-minus:before { + content: '-'; + font-size: var(--font-size-20); + grid-area: c; + display: flex; + align-items: center; + justify-content: center; + width: 15px; + } } } diff --git a/templates/ui/chat/parts/roll-part.hbs b/templates/ui/chat/parts/roll-part.hbs index 9a94a786..b823b270 100644 --- a/templates/ui/chat/parts/roll-part.hbs +++ b/templates/ui/chat/parts/roll-part.hbs @@ -62,14 +62,14 @@ {{roll.dFear.total}} - {{#if roll.advantage.type}} -
- {{#if (eq roll.advantage.type 1)}} + {{#if roll.dAdvantage}} +
+ {{#if roll.hasAdvantage}} -
{{roll.advantage.value}}
+
{{roll.dAdvantage.total}}
{{else}} -
{{roll.advantage.value}}
+
{{roll.dAdvantage.total}}
{{/if}}
{{/if}}