View Single Post
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old January 3rd, 2018, 11:17 AM
I've successfully modified the Human/Half-Elf Shaman FC bonus to select 1 cleric spell and add it to the known spells to filter out Words of Power. However, it would be nice if it also filtered out previously selected spells. Here is what I have now. I'm running it in a mechanic script so I don't have to edit the 2 picks directly, which is the point of the loop:

Quote:
~ Check for all Human or Half-Elf Shaman favored class selections and update the dropdown
foreach pick in Hero from FavClass where "thingid.fcShaHuman | thingid.fcShaHElf"
~generate the expression saying what spells we're able to search for
~we're looking for spells that are cleric spells but not shman spells and are of a level we can cast
~ Valdacil: but we need to filter out Word of Power
eachpick.field[usrCandid1].text = "component.BaseSpell & !component.BaseWord & sClass.cHelpClr & !sClass.cHelpSha & (val:sLevel.? < " & hero.childfound[cHelpSha].field[cMaxSpLev].value & ")"
nexteach
I know that once a spell is added, the hero gets a tag KnowSpell.? where ? is the tag of the spell selected. My question is whether the usrCandid1 can be modified above to filter out spells the hero already knows.
Valdacil is offline   #1 Reply With Quote