Junior Member
Join Date: Sep 2014
Location: Chicago, IL
Posts: 14
|
Background of Issue
I'm writing several spell adjustments that bootstrap weapons (similar to Flameblade), and then based on either choices on the adjustment or other attributes, pushes bonuses and/or tags to the bootstraped weapon. Challenge is that (and this occurs with the current implementation of Flame Blade) when you add multiple instances of the spell adjustment, multiple items are bootstrapped, but the evaluation scripts (for both instances of the spell adjustment) always modify the first instance of the boot strapped item. In a the case of Flameblade, if I add two instances of the adjustment, each with a +5 pAdjust, the first Flameblade weapon gets a +10 damage bonus, and the second gets a +0. Question So, my question is: "Is there a way, in an eval script, to travel specifically to or restrict choices to only things bootstraped by the eval scripts parent?" |
#1 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Yes, everything that is added to a character has a uniquindex. So if your script is iterating through all the weapon copies it can check their root's unique index and compare it to its own unique index to know if it is the correct copy. Here is an example we use for building a statblock name.
Code:
~ Warpriest blessings are also specially built, since they incorporate ~ the names of their sub-abilities. elseif (tagis[abCategory.WaPBless] <> 0) then foreach pick in hero from BaseClSpec where "Helper.ShowSpec & !Helper.SpcDisable" if (eachpick.root.uniqindex = uniqindex) then field[sbName].text = splice(field[sbName].text, eachpick.field[thingname].text, ", ") perform eachpick.assign[Hide.Statblock] endif nexteach field[sbName].text = replace(field[thingname].text, " Blessing", "", 1) & ": " & field[sbName].text done endif |
#2 |
|
|