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

Min roll #33

Merged
merged 3 commits into from
Feb 12, 2021
Merged

Min roll #33

merged 3 commits into from
Feb 12, 2021

Conversation

Vlek
Copy link
Owner

@Vlek Vlek commented Feb 12, 2021

feat: Added the ability to specify that the dice should return their minimum possible value.
fix: Fixed issue with percentage chances for dice where the number was supplied as a float.
test: Added further testing to ensure minimum flag works and the fix for float num_dice was corrected.

Closes issues #15, #32

vlek added 3 commits February 11, 2021 11:55
test: Added tests for minimum dice roll flag.

While working on the minimum dice roll flag, I found that there
are a few tests that do not have properly set minimums. Worse yet,
the dice roller does not appear to handle <float>d<int> cases well
it seems and is giving values lower than the minimum that it should.
test: Added further tests to ensure float num_dice values work.

We had an issue where, if num_dice was given as a float, we were
making changes to all dice rolls instead of the last one that we
needed to make which was causing our rolls to not have the correct
percentage chances. This has been corrected and the fractional handler
will only be applied at the end after all other rolls have been made.
@Vlek Vlek added bug Something isn't working enhancement New feature or request labels Feb 12, 2021
@Vlek Vlek added this to the 3.0 milestone Feb 12, 2021
@Vlek Vlek self-assigned this Feb 12, 2021
@Vlek Vlek merged commit 147583e into master Feb 12, 2021
@Vlek Vlek deleted the min_roll branch February 12, 2021 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant