mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
.
This commit is contained in:
parent
a6500f6801
commit
bf5a6d2a4d
2 changed files with 10 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -79,15 +79,11 @@
|
|||
<div class="dice {{roll.rally.dice}}">{{roll.rally.value}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#each roll.extra}}
|
||||
{{#each results}}
|
||||
{{#unless discarded}}
|
||||
{{#each roll.extraDice}}
|
||||
<div class="roll-die has-plus">
|
||||
<label></label>
|
||||
<div class="dice {{../dice}}">{{result}}</div>
|
||||
<div class="dice {{this.denomination}}">{{this.total}}</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
{{else}}
|
||||
{{#each roll.dice}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue