<?xml version="1.0" encoding="ISO-8859-1"?>
<document signature="Hero Lab Data">
  <thing id="fSorDraMg2" name="Dragon Magic" description="The elemental power of dragons flows through you, infusing your spells with draconic strength. Through force of will, you tap into the arcane might of dragons.{br}{b}Draconic Power{/b}: You gain a bonus to the damage rolls of arcane powers equal to your Strength modifier. The bonus increases to your Strength modifier +2 at 11th level and your Strength modifier +4 at 21st level.{br}{br}{b}Draconic Resilience{/b}: While you are not wearing heavy armor, you can use your Strength modifier in place of your Dexterity or Intelligence modifier to determine your AC.{br}{br}{b}Dragon Soul{/b}: Choose a damage type: acid, cold, fire, lightning, poison, or thunder. You gain resist 5 to that damage type. The resistance increases to 10 at 11th level and 15 at 21st level. Your arcane powers ignore any target&apos;s resistance to that damage type up to the value of your resistance.{br}{br}{b}Scales of the Dragon{/b}: The first time you become bloodied during an encounter, you gain a +2 bonus to AC until the end of the encounter." compset="BuildOpt" replaces="fSorDraMag">
    <fieldval field="usrCandid1" value="thingid.rsAcid | thingid.rsCold | thingid.rsFire | thingid.rsLightn | thingid.rsPoison | thingid.rsThunder"/>
    <tag group="BuildOpt" tag="fSorSpeSou" name="Spell Source" abbrev="Spell Source"/>
    <eval phase="Traits" priority="10000"><![CDATA[
      doneif (activated = 0)

      ~can use str/dex/int for AC if not in heavy armor
      perform hero.findchild[Armor,"Equipped.Equipped & ArmorCat.Heavy"].setfocus
      if (state.isfocus = 0) then
        perform hero.child[defAC].assign[LinkAttr.attrStr]
        endif

      var damage as number
      var resist as number
      if (hero.tagvalue[Level.?] <= 10) then
        damage = 0

         if (hero.childlives[ftImproDra]<>0) then
           resist = 7
         else
           resist = 5
         endif
      elseif (hero.tagvalue[Level.?] <= 20) then
        damage = 2
         if (hero.childlives[ftImproDra]<>0) then
           resist = 15
        else
        resist = 10
         endif
      else
        damage = 4
         if (hero.childlives[ftImproDra]<>0) then
           resist = 25
        else
        resist = 15
         endif
        endif
      damage += #attrbasebonus[attrStr]

      ~Armored Sorcerer feat
      if (hero.childlives[ftArmorSor] <> 0) then
        if (hero.haschild[Armor,"Equipped.Equipped & ArmorType.arLeathArm"] <> 0) then
          resist += 2
          endif
        endif

      ~+str to arcane power damage (+2 at 11, +4 at 21)
      foreach pick in hero from Power where "PowerSrc.Arcane"
        perform eachpick.field[pwDamBonus].modify[+,damage,""]
        nexteach

      ~resist 5/10/15
      perform field[usrChosen1].chosen.field[rsTotal].modify[+,resist,""]]]>
      <after name="Calc attrBonus"/>
      </eval>
    </thing>
  </document>
