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

'1dc' roll terms erroneously mapped to '1d2' in item derivedDamage labels #2281

Closed
jmmerchant opened this issue May 14, 2023 · 1 comment
Closed
Labels
bug Functionality which is not working as intended ui User interface related features or bugs
Milestone

Comments

@jmmerchant
Copy link

This is purely a cosmetic issue and doesn't affect rolling. If you add one or more '1dc' terms in the damage formula for an item, the 'derivedDamage' labels shown in the description tab of that item will instead contain '1d2' (or 'nd2' for n terms). This is incorrect as '1dc' is equivalent to '1d2 - 1' and not '1d2' despite having two faces.

Anyway, this happens with zero enabled modules, v. 2.1.5 of the dnd5e system, and v. 10.291 of Foundry.

1dc
1d2
labels

@Fyorl Fyorl added bug Functionality which is not working as intended ui User interface related features or bugs labels Jun 12, 2023
@Fyorl Fyorl added this to the D&D5E 2.3.0 milestone Jun 12, 2023
@Fyorl Fyorl modified the milestones: D&D5E 2.3.0, D&D5E 2.4.0 Aug 9, 2023
@Hoppyhob
Copy link
Contributor

I can work on this one.

Hoppyhob added a commit to Hoppyhob/dnd5e that referenced this issue Oct 15, 2023
Closes foundryvtt#2281
There was an issue in _simplifyDiceTerms where a Coin was reduced to its operator and number of faces, then assumed to be a die when passed back out. This ended up turning a coin into a die 2 and combining it with any other die 2s in the Dice Terms.
This was fixed by using a c for the faces value if the DiceTerm is Coin and returning a DiceTerm of Coin, instead of Die, if the face value is c .
(any DiceTerm other than Coin should default to using the number of faces and return as a Die DiceTerm)
Hoppyhob added a commit to Hoppyhob/dnd5e that referenced this issue Oct 15, 2023
Closes foundryvtt#2281
There was an issue in _simplifyDiceTerms where a Coin was reduced to its operator and number of faces, then assumed to be a die when passed back out. This ended up turning a coin into a die 2 and combining it with any other die 2s in the Dice Terms.
This was fixed by using a c for the faces value if the DiceTerm is Coin and returning a DiceTerm of Coin, instead of Die, if the face value is c .
(any DiceTerm other than Coin should default to using the number of faces and return as a Die DiceTerm)
Hoppyhob added a commit to Hoppyhob/dnd5e that referenced this issue Oct 15, 2023
Closes foundryvtt#2281
There was an issue in _simplifyDiceTerms where a Coin was reduced to its operator and number of faces, then assumed to be a die when passed back out. This ended up turning a coin into a die 2 and combining it with any other die 2s in the Dice Terms.
This was fixed by using a c for the faces value if the DiceTerm is Coin and returning a DiceTerm of Coin, instead of Die, if the face value is c.
(Any DiceTerm other than Coin should default to using the number of faces and return as a Die DiceTerm)
Fyorl pushed a commit that referenced this issue Oct 19, 2023
Co-authored-by: Kim Mantas <kim.mantas@gmail.com>
Closes #2281
@Fyorl Fyorl closed this as completed Oct 19, 2023
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 ui User interface related features or bugs
Projects
None yet
Development

No branches or pull requests

3 participants