Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Problem with exploding kept dice #23

Closed
Rimhollow opened this issue Jan 8, 2017 · 8 comments
Closed

Problem with exploding kept dice #23

Rimhollow opened this issue Jan 8, 2017 · 8 comments

Comments

@Rimhollow
Copy link

Combining exploding dice and kept dice doesn't work the way I would expect. Extra dice rolled as a result of explosion aren't added to the "parent" die, but counted as separate keepable dice. e.g. if I do 2d6!k1, and one die rolls a 6 and explodes with a 4, I'd expect the final result to be 10, but instead it's 6.

I don't know if there are any systems that use that specific combination of mechanics, but I discovered the issue while I was trying to make Savage Worlds rolls work. :)

@ArtemGr
Copy link
Owner

ArtemGr commented Jan 8, 2017

The order of the ops matter. They are evaluated left-to-right. How about "/r 2d6k1!"?
It keeps the highest dice and then explodes it when it's high.
2d6k1! = (6+6+5) = 11
2d6k1! = (2+6+3) = 9

@Rimhollow
Copy link
Author

Rimhollow commented Jan 12, 2017

Ah, cool, hadn't thought of order of operations.

There's still a potential quirk there, though: If 2d6k1! came up with two 6s on the initial roll, I would expect it to explode both dice and then keep whichever chain ended up highest, rather than explode one die and discard the other. That's not a feature I particularly require, but it seems worth pointing out.

@rjdejonghe
Copy link

I tried this and and doesn't seem to work as in your example. For mine, it rolled 2, exploded the 6, then kept the two best of ALL the rolls (I would expect it to keep just the 6, then explode it, giving a total of 7 and killing the 5) - here's the exact output:
2d6k1! = (6+5+2) = 11

In your posted example it behaves how I expected.
2d6k1! = (6+6+5) = 11

Was there some change made?

@ArtemGr
Copy link
Owner

ArtemGr commented Feb 11, 2017

Sorry, missed your question.
I shall test this further.

@ArtemGr
Copy link
Owner

ArtemGr commented Feb 13, 2017

Okay, I see what's going on there.
The order of operations and the logic are perfectly sound. What throws us off is the placement.

Here's an example. I'm checking "2d6k1!" in a unit test that always rolls 6, 5 and 2 for me.

  1. 2d6 rolls to 6, 5.
    Result: (6+5).
  2. k1 counts 5 off.
    Result: (6+5).
  3. ! explodes the remaining six, adding two. But it places the two directly after the exploded six!
    Result: (6+2+5).

Placing the explosion directly after exployee seemed logical at the time.

@ArtemGr
Copy link
Owner

ArtemGr commented Feb 13, 2017

Fixed. Explosions are placed at the end now, which seems to be the expected behaviour.

@ArtemGr ArtemGr closed this as completed Feb 13, 2017
@rjdejonghe
Copy link

rjdejonghe commented Feb 13, 2017 via email

@ArtemGr
Copy link
Owner

ArtemGr commented Oct 13, 2019

Reverted this per #71 but added italics to differentiate the explosion from the original face.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants