I have a custom ability for which the user selects a type of natural attack, and which subsequently increases the damage die for any attack of that type that comes from a transmutation spell effect. This is tricky for two reasons:
1) It cares where the attack comes from, which isn't always easy to pinpoint in easily referable ways with Hero Lab.
2) Spell effects in Hero Lab are granted by adjustments, and not from the spells themselves. These adjustments don't know any details about the spell, just its effect.
Here's my first attempt:
http://forums.wolflair.com/editpost....tpost&p=264010
Code:
var favattack as string
var spellid as string
favattack = field[usrChosen1].chosen.tagids[IsWeapon.?,"|"]
foreach pick in hero from BaseNatWep where "favattack"
if (eachpick.root.tagis[Helper.AdjSpell] <> 0) then
spellid = eachpick.root.idstring
foreach thing from BaseSpell where "spellid"
if (eachthing.tagis[sSchool.Transmutat] <> 0) then
perform eachpick.assign[Helper.DamageUp]
endif
nexteach
endif
nexteach
Hero Lab doesn't like my attempt to use "foreach" with things instead of picks, but I'm not sure how else to pull the school from a spell that may or may not be a pick at the moment. In either case, I'm also doubtful my use of idstring is going to work. Is the root of the natural attack even going to be an adjustment if the spell is a polymorph effect? Or do I need to look for the gizmo at that point? Anyone have thoughts on where to go from here?