• 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

Help with eval rule

mbran01

Well-known member
I am trying to add an eval rule that tests the greater spell focus feat to ensure that it matches the school of specialization. So that if you are an enchanter then you should also choose enchantment as your greater spell focus. This is what I have but it doesn't seem to work. Any help would be appreciated. It should be noted that the first part does work, but everything after that does not.

Code:
      validif (field[cTotalLev].value <= 2)

      if (hero.tagis[SecSchAllw.Abjur] <> 0) then
          validif (hero.tagis[sSchlGrFoc.Abjur] <> 0)
      elseif (hero.tagis[SecSchAllw.Conjur] <> 0) then
          validif (hero.tagis[sSchlGrFoc.Conjur] <> 0)
      elseif (hero.tagis[SecSchAllw.Divination] <> 0) then
          validif (hero.tagis[sSchlGrFoc.Divination] <> 0)
      elseif (hero.tagis[SecSchAllw.Enchant] <> 0) then
          validif (hero.tagis[sSchlGrFoc.Enchant] <> 0)
      elseif (hero.tagis[SecSchAllw.Evocation] <> 0) then
          validif (hero.tagis[sSchlGrFoc.Evocation] <> 0)
      elseif (hero.tagis[SecSchAllw.Illusion] <> 0) then
          validif (hero.tagis[sSchlGrFoc.Illusion] <> 0)
      elseif (hero.tagis[SecSchAllw.Necromancy] <> 0) then
          validif (hero.tagis[sSchlGrFoc.Necromancy] <> 0)
      elseif (hero.tagis[SecSchAllw.Transmutat] <> 0) then
          validif (hero.tagis[sSchlGrFoc.Transmutat] <> 0)
      endif
 
I'd check for the Ability tag of the School specialization custom ability, then for the validifs check on the spell school things for the Broadcast.SpellGrFoc


Code:
      validif (field[cTotalLev].value <= 2)

      if (hero.tagis[Ability.wsAbjur] <> 0) then
          validif (hero.child[ssAbjur].tagis[Broadcast.SpellGrFoc] <> 0)

AND SO ON
      endif
 
Last edited:
Back
Top