vttred / ose

Old-School Essentials – Foundry VTT Edition
https://ose.vtt.red
GNU General Public License v3.0
96 stars 57 forks source link

fix: no longer add zeroes to rolls #405

Closed anthonyronda closed 1 year ago

anthonyronda commented 1 year ago

Fixes #385.

I'm pretty proud of this one! Rather than place a bandaid, I did some refactoring that I think makes for an overall cleaner rollAttack() function :)

Why did I only minimally touch rollDamage()? I can't figure out where this function is actually used. I think it's used nowhere? It will be useful for enhancements such as #332 so I left it in place for now.

anthonyronda commented 1 year ago

The arrow function is at the top because that's where ESLint told me to put it The huge JSDoc is there because I wanted to write a comment for the out-of-context arrow function... then made it a JSDoc... then felt I needed one for the original method I was refactoring...