This commit is contained in:
WBHarry 2026-03-30 19:00:26 +02:00
parent 2664979823
commit 686c660e86
3 changed files with 26 additions and 6 deletions

View file

@ -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 });
}

View file

@ -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;
}
}
}

View file

@ -62,14 +62,14 @@
{{roll.dFear.total}}
</div>
</div>
{{#if roll.advantage.type}}
<div class="roll-die has-plus">
{{#if (eq roll.advantage.type 1)}}
{{#if roll.dAdvantage}}
<div class="roll-die {{#if roll.hasAdvantage}}has-plus{{else}}has-minus{{/if}}">
{{#if roll.hasAdvantage}}
<label>{{localize "DAGGERHEART.GENERAL.Advantage.short"}}</label>
<div class="dice {{roll.advantage.dice}} color-adv">{{roll.advantage.value}}</div>
<div class="dice {{roll.dAdavantage.denomination}} color-adv">{{roll.dAdvantage.total}}</div>
{{else}}
<label>{{localize "DAGGERHEART.GENERAL.Disadvantage.short"}}</label>
<div class="dice {{roll.advantage.dice}} color-dis">{{roll.advantage.value}}</div>
<div class="dice {{roll.dAdvantage.denomination}} color-dis">{{roll.dAdvantage.total}}</div>
{{/if}}
</div>
{{/if}}