Senior Member
Join Date: Nov 2011
Location: South Riding, VA
Posts: 841
|
I need to modify a class's effective ability score for spellcasting but only for those classes that use Wisdom. I have tried the following:
Code:
foreach pick in hero from BaseClHelp where "SplAttr.aWIS" eachpick.field[cBonSplInc].value += field[trkUser].value nexteach |
#1 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
SplAttr is an override tag, if it isn't present, then the class uses a linkage. I think you'll have to foreach through all classes, and check within the foreach whether it has a SplAttr tag, or failing that check the spellattr linkage before doing your thing.
|
#2 |
Senior Member
Join Date: Nov 2011
Location: South Riding, VA
Posts: 841
|
Ok. How would I go about checking linkage[spellattr] that is it linked to a particular ability score? The wiki does not have pick linkages entered yet. :/
|
#3 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Something like this?
Code:
var dothething as number foreach thing in Class where WHATEVER dothething = 0 ~ Look for picks with the correct spellcasting if (eachpick.tagis[SplAttr.aWIS] <> 0) then dothething = 1 elseif (eachpick.islinkage[spellattr] <> 0) then if (eachpick.linkage[spellattr].tagis[IsAttr.aWIS] <> 0) then dothething = 1 endif endif ~ Do we do the thing? if (dothething <> 0) then ~ Do stuff endif nexteach |
#4 |
Senior Member
Join Date: Nov 2011
Location: South Riding, VA
Posts: 841
|
Ah ok! The IsAttr.X tag is what I needed to know.
Thanks! |
#5 |
|
|