This commit is contained in:
WBHarry 2026-03-30 21:05:00 +02:00
parent a6500f6801
commit bf5a6d2a4d
2 changed files with 10 additions and 9 deletions

View file

@ -67,6 +67,11 @@ export default class DualityRoll extends D20Roll {
this._advantageNumber = Number(value);
}
get extraDice() {
const { DualityDie, AdvantageDie, DisadvantageDie } = game.system.api.dice.diceTypes;
return this.dice.filter(x => ![DualityDie, AdvantageDie, DisadvantageDie].some(die => x instanceof die));
}
/* This isn't fullproof, but trying to cover parathetical situations is ridiculously complex */
get modifierTotal() {
let modifierTotal = 0;

View file

@ -79,15 +79,11 @@
<div class="dice {{roll.rally.dice}}">{{roll.rally.value}}</div>
</div>
{{/if}}
{{#each roll.extra}}
{{#each results}}
{{#unless discarded}}
<div class="roll-die has-plus">
<label></label>
<div class="dice {{../dice}}">{{result}}</div>
</div>
{{/unless}}
{{/each}}
{{#each roll.extraDice}}
<div class="roll-die has-plus">
<label></label>
<div class="dice {{this.denomination}}">{{this.total}}</div>
</div>
{{/each}}
{{else}}
{{#each roll.dice}}