I am working on a monster that casts spells as a sorcerer but is limited to the Illusion and Necromancy schools as well as the spells from the Evil domain. I have tried the following script:
but it doesn't work. All the sorcerer spells are still showing up on the creature's racial spell list.
Code:
Final Phase/10000
~ only allow Sor spells from the Illusion and Necromancy schools and the Evil domain
foreach pick in hero from BaseSpell where "!(sSchool.Illusion | sSchool.Necromancy) & sClass.cHelpSor"
perform eachpick.assign[Hide.Spell]
nexteach
but it doesn't work. All the sorcerer spells are still showing up on the creature's racial spell list.