Skip to content

Commit

Permalink
Fix parsing roll result with adv/disadv and no mods
Browse files Browse the repository at this point in the history
Fixes #1101
  • Loading branch information
kakaroto committed Apr 25, 2024
1 parent 483f9b2 commit b6d6d79
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/dndbeyond/base/digital-dice.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ class DigitalDice {
const result = results.shift();
if (result.match(/\([0-9,]+\)/)) {
rolls = result.slice(1, -1).split(",").map(r => ({roll: parseInt(r)}));
// Don't try to parse the result of the results as if we had just parsed the first dice roll
i += rolls.length - 1;
if (mod === "kh1") {
let max = 0;
for (let r of rolls) {
Expand Down

0 comments on commit b6d6d79

Please sign in to comment.