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 more functionality for D20 dice notation #17

Open
TechnologyClassroom opened this issue Oct 12, 2020 · 0 comments
Open

Add more functionality for D20 dice notation #17

TechnologyClassroom opened this issue Oct 12, 2020 · 0 comments

Comments

@TechnologyClassroom
Copy link
Owner

roll.py can take an argument for the number of sides that a die has.

How it currently works: To roll a twenty sided die (D20), you pass the argument like roll(20) to see what the result is. To roll a six sided die (D6), you pass the argument like roll(6) to see what the result is.

In D20 systems that are not Midnight Riders, you commonly need to roll several dice and add a modifier.

The notation to roll eight dice with six sides would be 8D6. The notation to roll four dice with ten sides would be 4D10. The D could also be lower-case such as 4d10.

There is also sometimes a modifier which is a basic math operation such as addition, subtraction, multiplication, or division. The notation to roll three dice with eight sides with additional 4 would be 3D8+4 or 3D8 + 4.

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

1 participant