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

Rerolls? #42

Open
Xaelias opened this issue Jul 18, 2018 · 5 comments
Open

Rerolls? #42

Xaelias opened this issue Jul 18, 2018 · 5 comments

Comments

@Xaelias
Copy link

Xaelias commented Jul 18, 2018

Hey,

I was wondering if there was an option I didn't find, or maybe a plan to add reroll supports?
Something like:
/roll 4d6r<2
Which would roll 4d6 and reroll all 1s and 2s.
And maybe something like /roll 4d6r1r4 to reroll 1s and 4s ?

Thanks!

@Xaelias
Copy link
Author

Xaelias commented Jul 18, 2018

(I'm actually willing to add the functionality, I'm just not sure how to run the program/test it outside of slack. My Go experience is basically none :-D )

@Newtim
Copy link

Newtim commented Jul 18, 2018 via email

@arkie
Copy link
Collaborator

arkie commented Jul 19, 2018

I'm not sure there's a good way to allow chaining (i.e. r1r4) as the parsing is currently done via regex, but I'd be happy to weigh in further if you all want to take a swing - my guess is that it would resemble keep in demarkation of which rolls are discarded?

The roll tests should be pretty simple, although I'd image the formatting would also need to change - feel free to give it a go though!

@BlackVegetable
Copy link

If you add some contribution guidelines, I might be willing to give implementation a shot.

@UncleTallest
Copy link

Not promising anything as I know jack about Go, but I'm looking at this now for what it's worth.

Seems to me the most common use case is for rolling stats and then rerolling any 1s (I've seen folks reroll 2s as well). I'm unsure if we need to parse a set number (1), an above/below number (<2), or both; since different folks will have different requirements. Once I get further in and know it works I'll send a pull request.

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

5 participants