mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 15:03:37 +02:00
.
This commit is contained in:
parent
2664979823
commit
686c660e86
3 changed files with 26 additions and 6 deletions
|
|
@ -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 });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue