Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   Associating a school with a spell adjustment and tracing the source of a bootstrap (http://forums.wolflair.com/showthread.php?t=60323)

Redcap's Corner March 7th, 2018 09:04 PM

Associating a school with a spell adjustment and tracing the source of a bootstrap
 
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?


All times are GMT -8. The time now is 01:57 AM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.