View Single Post
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old February 19th, 2020, 11:02 AM
This is truly awesome coding, you've got a pretty good glimpse at playing with spells there.

I have a suggestion for the Community Pack - like Eldritch Knights are supposed to only be able to pick abjuration/evocation spells initially (at least till level 8). You could add something like the following to enforce that by modifying the code you posted:

Code:
doneif (tagis[Helper.ShowSpec] = 0)
doneif (tagis[Helper.Disable] <> 0)

~ Once we're 8th level and above we can remove the restriction on spells
~ We could probably do some counting of the sSchool tags to enforce 
~ that at most we have 4 non Abjuration/Evocation spells but 

doneif (#levelcount[Fighter] > 7)

~ Otherwise we modify the spell lists.

var spell as string
var known as string 

~ fetch spell expressions from the initial lists
spell = "((" & hero.childfound[cHelpFtr].field[cSpKnoExpr].text & ")"
known = "((" & hero.childfound[cHelpFtr].field[cSpellExpr].text & ")"

~ Narrow down to abjuration and evocation only
spell &= " & (sSchool.Abjur|sSchool.Evocation))"
known &= " & (sSchool.Abjur|sSchool.Evocation))"

~ push out the new lists
hero.childfound[cHelpFtr].field[cSpKnoExpr].text = spell
hero.childfound[cHelpFtr].field[cSpellExpr].text = known
hero.childfound[cHelpFtr].field[cSplBkExpr].text = known
dungeonguru is offline   #6 Reply With Quote