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

Add dice "reroll" (r) notation #10

Open
Vlek opened this issue Oct 25, 2020 · 2 comments
Open

Add dice "reroll" (r) notation #10

Vlek opened this issue Oct 25, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request
Projects
Milestone

Comments

@Vlek
Copy link
Owner

Vlek commented Oct 25, 2020

Add the ability to denote that a dice should be rerolled under certain conditions:

(Dice) R/r [number]

4d6r1 - Roll 4 d6 dice, reroll a die once if it lands on 1

4d6R1 - Roll 4 d6 dice, reroll a die every time if it lands on 1

Considerations:
1d1R1 could be an infinite loop. Must either have this as an error case or simply return 1 as the only possibility.

@Vlek Vlek added the enhancement New feature or request label Oct 25, 2020
@Vlek Vlek added this to the 3.0 milestone Oct 25, 2020
@Vlek Vlek self-assigned this Oct 25, 2020
@Vlek Vlek changed the title Add dice "reroll" (R) notation Add dice "reroll" (r) notation Oct 26, 2020
@Vlek
Copy link
Owner Author

Vlek commented Oct 26, 2020

What if we want to re-roll if it's the case that it lands on one of a couple of different numbers? We could do a list: (Dice) R/r [number] or (Dice) R/r [ (number) [, number] ]

@Vlek Vlek added this to To do in Roll 3.0 Feb 9, 2021
@Vlek
Copy link
Owner Author

Vlek commented Feb 21, 2022

If it's the case that we get something like 1d1r where it's an infinite loop, it needs to simply return 1 in that case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant