Rolisteam/DiceParser

Exploding dice seem to ignore Reroll setting

tessellizard opened this issue · 2 comments

Got this roll result just now:
[7d10R1k6e10 (11 [10 1] 9 6 6 4 3 2)]

If I'm understanding the syntax right, R1 normally rerolls a die until the result is not a 1. However, the die rolled as a result of the explosion on the 10 rolled a 1 and kept that value.

Hi!

There is something strange with your command.

11 [10 1] is the result of e10 at the end

The process of the command:

step 1/ 7d10 => rolled values: [2 1 3 10 4 9 6]

step 2 / R1 => resulting values: [2 6 3 10 4 9 6] (1 is now a 6)

step 3/ k6 => sorting and 6 betters : 10 9 6 6 4 3 2 => the 2 is marked as unselected (not visible on discord because color are shitty)

step 4/ e10 => 11 [10 1] 9 6 6 4 3 2

Hm, okay - I didn't realize the order of the options mattered, since the help doc doesn't seem to mention it. Trying to adapt a Google Sheets formula, originally written for Sidekick, that generates these roll commands. It looks like shifting the e10 to just after the d10 does get the behavior I want, which is a pretty easy fix. Thanks for the explanation. =)