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

Improper/inequivalent Parsing of Dice Modifiers #5767

Closed
aaclayton opened this issue Aug 23, 2021 · 2 comments
Closed

Improper/inequivalent Parsing of Dice Modifiers #5767

aaclayton opened this issue Aug 23, 2021 · 2 comments
Assignees
Labels
bug Functionality which is not working as intended dice Issues related to dice rolling and the Dice system

Comments

@aaclayton
Copy link
Contributor

Originally in GitLab by @tmun

Environment Details

  • Foundry VTT Version: 0.8.9
  • Operating System: Windows/Linux (Ubuntu)
  • How Are You Using Foundry: Native Application (Electron)/Firefox
  • Which Game System: PF2e Development/PF2e Release (Confirmed in SWNR by Spice_King)
  • Modules Enabled?: No

Issue Description

The following rolls should be equivalent: /r 3d20ddh, /r 3d20d1dh, /r 3d20dldh, /r 3d20dl1dh, /r 3d20dhdl, /r 3d20dh1dl,/r 3d20k2kl, and /r 3d20kh2kl

Of those rolls, any in the format d#dn# do not resolve (3d20dldh and 3d20dhdl - they resolve as 3d20d) but the dice modifiers page says that d and dl are equivalent.

image

@aaclayton
Copy link
Contributor Author

I think I may be a bit confused here about which are the bugs and which are correct.

  • 3d20ddh - dropped 3 (lowest), dropped 19 (highest), result 16 = CORRECT
  • 3d20d1dh - dropped 7 (lowest), dropped 13 (highest), result 10 = CORRECT
  • 3d20dldh - dropped 4 (lowest), did not drop highest, result [19,16] = INCORRECT
  • 3d20dhdl - did not drop highest, dropped 1 (lowest), result [12,14] = INCORRECT
  • 3d20k2kl - kept highest 2 (11, 4), kept lowest (4), result 4 = CORRECT

So it looks like there is a problem here, but that problem doesn't map directly to your comment of:

Of those rolls, any in the format d#dn# do not resolve (3d20dldh and 3d20dhdl - they resolve as 3d20d) but the dice modifiers page says that d and dl are equivalent.

Are we on the same page?

@aaclayton
Copy link
Contributor Author

Originally in GitLab by @tmun

Yes. I was trying to figure out a good way to write it. It was late. But that's correct. It seems like when parsing when the roll parser hits a d and then an l or an h character and the character following it is not a digit it ignores everything that follows in that Dice Term.

@Fyorl Fyorl self-assigned this Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality which is not working as intended dice Issues related to dice rolling and the Dice system
Projects
No open projects
Status: No status
Development

No branches or pull requests

2 participants