I am working on a template that removes racial abilities (such as the Dwarf's Sturdy ability or an Elf's Immunity to Sleep), and I've hit a snag. This is what I have at the moment:
Code:
var race as string
var srchxpr as string
perform hero.findchild[BaseRace].setfocus
race = focus.idstring
srchxpr = "SpecSource." & race
debug srchxpr
foreach pick in hero from BaseSpec where srchxpr
perform eachpick.delete[Helper.ShowSpec]
nexteach
The problem I'm running into is that the race variable is returning a value that doesn't really help. For example, if my character is an Elf, its returning Elf2. This results in none of the racial abilities being removed because all of them use the tag SpecSource.Elf not SpecSource.Elf2. Is there another way to find the race, perhaps using the Race.? tags?