-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Support arbitarily sided dice #239
Comments
This was actually partially discussed here #229 (comment)
But with no conclusion. I think what you're suggesting seems like a further enhancement of that suggestion. |
When implemented properly it could also be used to create multichoice rolls. For example to roll a random item from multiple tables (such as loot in D&D) you could do |
Basing this off the examples on AnyDice, and how MathJS handles ranges, I think a reasonable syntax would be: // roll a die with values between n1 and n2 inclusive
d{n1...n2}
// Same as above
d{n1:n2}}
// Same as above, but with specifying an optional step value
d{n1:s:n2}}
// roll a die with the specific values
d{n1, n2, n3} For example: // Roll a dice with a minimum value of 1 and a maximum of 6 (Same as `d6`)
d{1..6}
// Same as above
d{1:6}
// Roll a dice with a minimum of -1 and a maximum of 1 (A Fudge die)
d{-1..1}
// Same as above
d{-1:1}
// Roll a dice with a minimum of -0.5 and a maximum of 10.5, with a step of .25
d{-0.5:0.25:10.5}}
// Roll a die with specific values
d{2, 3, 3, 4} We can't currently support die notation as a value (e.g. |
Also, supporting none numbers sides, something like : 2d[blue, red, green] might return blue, green or red, red In those case, I only see {cp} = working. For example 2d[blue, red, green]=green, or maybe something 2d[blue, red, green]double will give 1 is twice the same value appear. |
Is your feature request related to a problem? Please describe.
AnyDice supports arbitarily sided dice with syntax
d{1,2,4,8}
these are often handy, for example when you need some weirder values for "coin flips" e.g.d10 * d{1,1,2}
would bed10
multiplied by two 1/3 of the time.Describe alternatives you've considered
Very generic tool but in reality not needed that often. might allow the internals to change how e.g. fudge and exploding dice work.
The text was updated successfully, but these errors were encountered: