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);
|
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;
|
||||||
|
|
|
||||||
|
|
@ -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}}
|
<div class="roll-die has-plus">
|
||||||
{{#unless discarded}}
|
<label></label>
|
||||||
<div class="roll-die has-plus">
|
<div class="dice {{this.denomination}}">{{this.total}}</div>
|
||||||
<label></label>
|
</div>
|
||||||
<div class="dice {{../dice}}">{{result}}</div>
|
|
||||||
</div>
|
|
||||||
{{/unless}}
|
|
||||||
{{/each}}
|
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#each roll.dice}}
|
{{#each roll.dice}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue