Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roll dice with drop lowest outputs dropped die as sum #12

Open
jeremy-w opened this issue Apr 17, 2024 · 3 comments
Open

Roll dice with drop lowest outputs dropped die as sum #12

jeremy-w opened this issue Apr 17, 2024 · 3 comments

Comments

@jeremy-w
Copy link
Contributor

Reported in Discord:

4d6x: [2,2,6 ~~ 1] = 1 (I'd expect 10 here, as I want it to drop the lowest, not tell me the number it dropped)

4d6X: [4,3,3 ~~ 6] = 6 (here I'd expect it to also print 10, having dropped the highest, not tell me the one it dropped)

4d6: [6,6,1,3] = 16 (gives me the total I was expecting)

And no, I didn't hit delete 🙂

@jeremy-w
Copy link
Contributor Author

pretty sure this is a bug in the dice lib itself. I think they copy-pasted the K/k keep logic a bit too closely, and are summing the wrong cluster of dice for the X/x drop handling. I'll see about filing a bug and then later a PR as time allows. recommend using keep as a workaround in the meantime.

@jeremy-w
Copy link
Contributor Author

Filed fionafibration/py-rolldice#11. This looks like a one-line fix, so I'll see about throwing up a PR later this weekend.

@jeremy-w
Copy link
Contributor Author

PR opened: fionafibration/py-rolldice#12

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

No branches or pull requests

1 participant