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 random number generation to simulate dice rolls #337

Closed
lhannest opened this issue Mar 5, 2022 · 1 comment · Fixed by #504
Closed

Add random number generation to simulate dice rolls #337

lhannest opened this issue Mar 5, 2022 · 1 comment · Fixed by #504
Assignees

Comments

@lhannest
Copy link

lhannest commented Mar 5, 2022

For example, I'm looking at the page for young brass dragons: https://open5e.com/monsters/young-brass-dragon

It would be nice if any text that describes dice rolls would be a hyperlink (bold and red would look nice) that when clicked perform and display the roll by generating a random number.

For example, the STR 19 +4 when clicked would generate a random 1d20 + 4.
The Perception +6 would generate a random 1d20 + 6.
The +7 to hit when clicked would generate a random 1d20 + 7.
The 2d6 + 4 when clicked would generate a random 2d6 + 4.

Probably you could automatically create a random number generating link for any any regex match of \d+d\d+( \+ \d)?.

@calumbell
Copy link
Contributor

I have some time this week, i'll take a look at getting this implemented!

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

Successfully merging a pull request may close this issue.

2 participants