• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Applying a tag expression

Bob G

Well-known member
I have this tag expression:
Code:
hero.tagexpr[BaseArmTyp.Light | BaseArmTyp.Medium] <> 0
and I want to apply it to a foreach loop so that it applies a reduction of armor check penalty for each pick that is true.
Code:
foreach pick in hero from BaseArmor where (tag expression is true) 
eachpick.field[arArmorChk].value += 1
        nexteach

What's the correct syntax that makes this work?
 
foreach pick in hero from BaseArmor where "BaseArmTyp.Light | BaseArmType.Medium"


Also, do you want BaseArmType, and not ArmorClass? It would depend on whether Mithral Full Plate counts for this - that armor will have BaseArmType.Heavy and ArmorClass.Medium - HL tracks both the adjusted and base armor types, because there's some things that test one and some that test the other.
 
foreach pick in hero from BaseArmor where "BaseArmTyp.Light | BaseArmType.Medium"


Also, do you want BaseArmType, and not ArmorClass? It would depend on whether Mithral Full Plate counts for this - that armor will have BaseArmType.Heavy and ArmorClass.Medium - HL tracks both the adjusted and base armor types, because there's some things that test one and some that test the other.

Thanks for that Mathias, I wouldn't have caught that differentiation. ArmorClass is what I want.
 
Back
Top