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

Fix -H and -L rolls #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

luccasclezar
Copy link

I noticed this package is not maintained anymore, but I'm using it now so I thought to contribute by fixing these errors. 🙂

  • More than two dices didn't work when using -L or -H
    Expressions like "10d10-L" summed some of the values instead of returning the lowest of all values.

  • L and H were inverted
    When the results were [1, 2], -L returned 2 and -H returned 1.

- More than two dices didn't work
- L and H were inverted
@comigor
Copy link
Owner

comigor commented Oct 9, 2022

Hey @luccasclezar, how are you doing?

This package was based on an old version of JS' rpg-dice-roller package. They used simplified modifiers like -L and -H, which are not common nowadays but could be read as "remove lowest roll" and "remove highest roll" respectively (and could be replaced by nowadays dl1 and dh1, respectively).

If you'd like to properly implement those notations (probably following the up-to-date version of that original package, I can review them and ship on a manjor version of this lib (given there is tests reflecting the new behavior).

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

Successfully merging this pull request may close these issues.

None yet

2 participants