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 #213

Closed
Zireael07 opened this issue Apr 14, 2021 · 3 comments
Closed

Rerolls #213

Zireael07 opened this issue Apr 14, 2021 · 3 comments

Comments

@Zireael07
Copy link

Is your feature request related to a problem? Please describe.
I can't find a way to request a reroll.

Describe the solution you'd like
a reroll modifier. This would, incidentally, allow solving #205 because people would be able to combine that modifier with any logic they want, i.e. reroll and drop the original, reroll and add to original, reroll twice and pick higher (known as advantage) etc. etc.

Describe alternatives you've considered
Some kind of arcane trickery with ifs and requesting 2d6-1d6?

Additional context
Add any other context or screenshots about the feature request here.

@GreenImp
Copy link
Collaborator

I think that some of what you're after is already possible:

Re-roll and drop the original:

You can use the re-roll modifier for this.

This will only keep the last re-rolled value, and has a flag to tell it to only re-roll once; ro.

From the docs:

// roll 1 d6 and re-roll if the result is 1 (and again each time a 1 is rolled)
d6r

// roll 1 d6 and re-roll if the result is 1. Don't re-roll again, even if the second roll is also a 1
d6ro

2d6r=5   // re-roll on any rolls equal to 5
2d6ro>4  // re-roll once on any roll greater than 4
4d10r<=3 // re-roll on any roll less than or equal to 3

Re-roll and add to original

Unless I'm misunderstanding, I think this can be achieved with the exploding modifier.

It will re-roll, but also retain the previous rolls as well. You can also compound the rolls into a single value if necessary.

From the docs:

// exploding re-rolls the dice
2d6!: [4, 6!, 6!, 2] = 18

// compounding combines the re-rolled dice
2d6!!: [4, 14!!] = 18

Re-roll twice and pick higher

I'm not entirely certain what you need here. Are you wanting it so that you roll a die (Let's say a d6), and you then re-roll it two times, and pick the highest of the three rolls, or just the two re-rolls?
Are you needing to only re-roll under certain circumstances (e.g. a roll less than 3)?

There is the keep modifier, which may do some of what you're after, in combination with the exploding modifier, but I'm not certain.

Because the explode modifier runs before the drop modifier, you could do something like:

// roll a d6, explode if less than 3, and only keep the highest roll
d6!<3k1: [2!d, 6] = 6

But this doesn't limit the amount of times the die will explode, so it could do so more than 2 times.

If you're just wanting to roll 3 of the same die and keep the highest, you can do:

// roll three d6 and keep the highest roll
3d6k1: [2d, 5, 4d] = 5 

@Zireael07
Copy link
Author

Oh, thanks, I must have missed the existence of the re-roll modifier when reading through examples.

@GreenImp
Copy link
Collaborator

No worries, there's a lot there! Let me know if it isn't what you're expecting.

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

No branches or pull requests

2 participants