morepurplemorebetter / MPMBs-Character-Record-Sheet

MorePurpleMoreBetter's D&D 5e Character Record Sheet
https://www.flapkan.com
GNU General Public License v3.0
372 stars 352 forks source link

Not REALLY an issue | Level Based Damage for a feature #26

Closed arrrrik closed 6 years ago

arrrrik commented 6 years ago

I'm creating a custom class .js for the Middle Finger of Vecna bomber and I can't find a great example of how to write the atkCalc so that the bomb damage die goes up at levels 4, 8, 11, 15, and 18.

Right now I have calcChanges : { atkCalc : ["if (WeaponName === 'bomb' && classes.known.mfov-alchemist.level >= 4) { output.die = output.die.replace('2d10'); }; ", ""] }

Do I add more "atkCalc" lines? or would it go in the one I already have? Thanks!

morepurplemorebetter commented 6 years ago

Just like any JSON object, if you multiple atkCalc attributes, the code will only used the last one, because you can't have multiple attributes with the same name.

See the Monk's martial art for an example of using a scaling damage die: https://github.com/morepurplemorebetter/MPMBs-Character-Record-Sheet/blob/master/_variables/ListsClasses.js#L563