diff --git a/system/scripts/dice/roll.js b/system/scripts/dice/roll.js index 8361f11..a2d6b47 100644 --- a/system/scripts/dice/roll.js +++ b/system/scripts/dice/roll.js @@ -113,9 +113,18 @@ export class RollL5r5e extends Roll { summary.totalBonus = Math.max(0, summary.totalSuccess - this.l5r5e.difficulty); if (!this.l5r5e.keepLimit) { + // count ring die + skill assistance this.l5r5e.keepLimit = this.dice.reduce((acc, term) => (term instanceof game.l5r5e.RingDie ? acc + term.number : acc), 0) + Math.max(0, this.l5r5e.skillAssistance); + + // if only bulk skill dice, count the skill dice + if (!this.l5r5e.keepLimit) { + this.l5r5e.keepLimit = this.dice.reduce( + (acc, term) => (term instanceof game.l5r5e.AbilityDie ? acc + term.number : acc), + 0 + ); + } } }