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

Usages Calc on Racial Feature #11

Closed mouse0270 closed 7 years ago

mouse0270 commented 7 years ago

When using usagescalc on a racial feature, it just displays the text and not the actual calculation.

features : {
    "primal bite fire" : {
        name : "Primal Bite (Fire)",
        source : ["P", 72],
        minlevel : 1,
        usages : "Constitution modifier per ",
        usagescalc : "event.value = Math.max(1, tDoc.getField(\"Con Mod\").value);",
        description : "\n I can make a bite attack that deals 1d6 fire damage.",
        additional : ["1d6", "1d6", "1d6", "1d6", "1d6", "2d6", "2d6", "2d6", "2d6", "2d6", "3d6", "3d6", "3d6", "3d6", "3d6", "4d6", "4d6", "4d6", "4d6", "4d6"],
        recovery : "short rest",
        action : ["bonus action", ""]
    }
}

In the uses column it shows (Constitution modifier)

mouse0270 commented 7 years ago

So it appears after looking though your code, that the usagescalc is a class only feature. :(

morepurplemorebetter commented 7 years ago

I have made it possible to use usagescalc with racial features now as well, with the latest update. However, the racial features and class features still differ greatly in what you can do with them, just FYI.