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); 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 */ /* This isn't fullproof, but trying to cover parathetical situations is ridiculously complex */
get modifierTotal() { get modifierTotal() {
let modifierTotal = 0; let modifierTotal = 0;

View file

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