<?xml version="1.0" encoding="ISO-8859-1"?>
<document signature="Hero Lab Data">
  <thing id="ftRodExpA" name="Rod Expertise" description="{b}Benefit{/b}: With This You gain a +1 feat bonus to implement attack rolls that you make with a rod. When you hold a rod, you gain a +1 shield bonus to AC and Reflex. The bonus to attack rolls increases to +2 at 11th level and +3 at 21st level." compset="Feat">
    <usesource source="PlEsForKin" parent="Supplement" name="Heroes of the Forgotten Kingdoms"/>
    <tag group="Tier" tag="Heroic" name="Heroic Tier" abbrev="Heroic Tier"/>
    <tag group="ChooseSrc1" tag="Thing" name="All Things" abbrev="All Things"/>
    <eval phase="Setup" priority="1000"><![CDATA[
      ~work out what our attack bonus should be
      var bonus as number
      if (hero.tagvalue[Level.?] < 11) then
        bonus = 1
      elseif (hero.tagvalue[Level.?] < 21) then
        bonus = 2
      else
        bonus = 3
        endif

      ~add an appropriate number of 'attack bonus' tags to all implements of
      ~the appropriate type
      var isfound as number
      foreach pick in hero where "EquipIndex.? & ImplemType.itRod"
        var i as number
        isfound = 1
        for i = 1 to bonus
          perform eachpick.assign[Helper.AttBonus]
          next
        nexteach

      ~if we found an equipped rod, add our shield bonus
      if (isfound <> 0) then
        #traitmodify[defAC,trtShield,1,""]
        #traitmodify[defRef,trtShield,1,""]
        endif]]></eval>
    </thing>
  </document>
