• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Bonus Spell Feat

RavenX

Well-known member
I am looking at converting an old Feat from 3.5, this feat treats a spellcaster's primary ability score as 2 higher than it is for the purpose of determining bonus spells per day, how would I implement this in a Script?
 
Then it'll be a bit more complicated, probably. First give the feat a chooser to pick the class it applies to. Then the eval script might go something along these lines, probably in PostAttr:

perform field[usrChosen1].chosen.setfocus

~ First get the value of the attribute this class uses, add 2, and convert it to the modifier
var bonusspell as number
bonusspell = focus.field[cSplAttVal].value + 2
bonusspell = round((bonusspell -10)/2, 0, -1)

~ To handle modifiers higher than 9 you'll have to subtract from bonusspell in increments of 9. It loops around like that, right? Or do you get more than 1 bonus spell of a particular level before hitting a +10 modifier? If so, more complex still. Not near my pdfs atm, so I'll let you check on that.

~ Now go to the array value for that spell level, if it has spells > 0, then add 1 more.
if (focus.field[cMemMax].arrayvalue[bonusspell] > 0) then
focus.field[cMemMax].arrayvalue[bonusspell] += 1
endif

~ Do the same for cCastMax
if (focus.field[cCastMax].arrayvalue[bonusspell] > 0) then
focus.field[cCastMax].arrayvalue[bonusspell] += 1
endif




As always, the above is not tested by me, you'll probably have to fiddle with it, but if you can't figure out how to make it work, tell me what's giving you trouble and I'll try to help out further.
 
Back
Top