<?xml version="1.0" encoding="ISO-8859-1"?>
<document signature="Hero Lab Data">
  <thing id="clsBerserk" name="Berserker" description="On the edge of civilization, far beyond the comfortable life within cities and towns, tribes of barbarian peoples maintain a simple yet primitive existence. Life for these people is not easy, and it is made more difficult because fey crossings commonly appear in their lands. As children, tribe members are taught about the perils of crossing into the Feywild, and about the monsters that emerge from that realm with malicious intent. Faced with this constant danger, the barbarians continually fight to maintain their way of life." compset="Class" uniqueness="unique">
    <comment>Sadly, the code for PowerSrc and possibly also ClassRole are used for Path/Destiny validation, and possibly other things. This means that we have to put in both blocks for each thing, even though it makes for some funny looking user information.</comment>
    <fieldval field="clsRoleTxt" value="Your skill and experience make you good at defending others, but when your rage surfaces, you become an aggressive attacker."/>
    <fieldval field="clsStartHP" value="15"/>
    <fieldval field="clsHPLev" value="6"/>
    <fieldval field="clsSurges" value="8"/>
    <fieldval field="clsSrcTxt" value=""/>
    <fieldval field="clsFort" value="2"/>
    <fieldval field="clsSkills" value="3"/>
    <usesource source="HeroFeywil"/>
    <tag group="KeyAbility" tag="attrStr"/>
    <tag group="PowerSrc" tag="Martial"/>
    <tag group="PowerSrc" tag="Primal"/>
    <tag group="KeyAbility" tag="attrCon"/>
    <tag group="ArmorProf" tag="apCloth"/>
    <tag group="ArmorProf" tag="apLeather"/>
    <tag group="ArmorProf" tag="apHide"/>
    <tag group="ArmorProf" tag="apShieldLg"/>
    <tag group="WpCatRqMel" tag="wcSimple"/>
    <tag group="WpCatRqMel" tag="wcMilitary"/>
    <tag group="KeyAbility" tag="attrDex"/>
    <tag group="ClassRole" tag="Defender"/>
    <tag group="ClassRole" tag="Striker"/>
    <tag group="Skill" tag="skAcrobati"/>
    <tag group="Skill" tag="skAthletic"/>
    <tag group="Skill" tag="skEnduranc"/>
    <tag group="Skill" tag="skHeal"/>
    <tag group="Skill" tag="skIntimida"/>
    <tag group="Skill" tag="skNature"/>
    <tag group="Skill" tag="skPercepti"/>
    <tag group="ClassName" tag="Barbarian"/>
    <tag group="Class" tag="clsBarbari"/>
    <bootstrap thing="fBerFury"></bootstrap>
    <bootstrap thing="fBerDef"></bootstrap>
    <bootstrap thing="fBerLand"></bootstrap>
    <bootstrap thing="fBerArid"></bootstrap>
    <bootstrap thing="fBerFroz"></bootstrap>
    <bootstrap thing="fBerTemp"></bootstrap>
    <bootstrap thing="fBerPois"></bootstrap>
    <bootstrap thing="pBbnVenGua"></bootstrap>
    </thing>
  <thing id="pwBerBas" name="Basic Melee" description="A basic melee attack. If Enraged, add the effect below.{br}{b}Effect{/b}: 1d8 extra damage.{br}Level 11: 2d8 extra damage.{br}Level 21: 3d8 extra damage." compset="Power">
    <fieldval field="pwTarget" value="One creature"/>
    <usesource source="HeroFeywil"/>
    <tag group="AttackType" tag="MeleeWep" name="Melee Weapon" abbrev="Melee Weapon"/>
    <tag group="AttackVs" tag="defAC" name="Armor Class" abbrev="AC"/>
    <tag group="Damage" tag="Weapon1" name="1[W]" abbrev="1[W]"/>
    <tag group="DamageAttr" tag="attrStr" name="Strength" abbrev="Strength"/>
    <tag group="PowerAcc" tag="Weapon" name="Weapon" abbrev="Weapon"/>
    <tag group="PowerType" tag="Feature"/>
    <tag group="PowerUse" tag="AtWill"/>
    <tag group="ActionType" tag="Standard" name="Standard Action" abbrev="Standard Action"/>
    <tag group="PowerClass" tag="clsBerserk"/>
    <tag group="Attack" tag="attrStr" name="Strength" abbrev="Strength"/>
    <eval phase="Traits" priority="10000"><![CDATA[
	perform hero.childfound[pwBasicMel].assign[Hide.Special]
		if (#level[] >= 21) then
			perform delete[Damage.Weapon1]
			perform assign[Damage.Weapon2]
		endif

		if (hero.childexists[ftIntelBla] <> 0) then
			if (#attrbonus[attrInt]>#attrbonus[attrStr]) then
				var attidstr as string
				attidstr = "attrInt"
				perform deletestr["DamageAttr.attrStr"]
				perform deletestr["Attack.attrStr"]
				perform assignstr["DamageAttr." & attidstr]
				perform assignstr["Attack." & attidstr]
			endif
		endif]]></eval>
    </thing>
  <thing id="fBerFury" name="Berserker Fury" description="When you use a barbarian primal attack power, you enter your Berserker Fury until the end of the encounter. Alternatively, you can use a minor action while you are bloodied to enter the fury. The fury has the following effects.{br}Your defender aura ends, if it was active, and you cannot use defender aura or vengeful guardian until the fury ends.{br}Some of your powers, such as your barbarian martial at-will attack powers, gain additional benefits, as noted in those powers.{br}Your melee basic attacks deal 1d8 extra damage. This extra damage increases to 2d8 at 11th level and 3d8 at 21st level." compset="ClassFeat">
    <bootstrap thing="pwBerBas"></bootstrap>
    </thing>
  <thing id="fBerDef" name="Defender Aura" description="You gain the defender aura power. When you enter your Berserker Fury, your defender aura ends if it is active, and you cannot use defender aura or vengeful guardian until the fury ends." compset="ClassFeat">
    <bootstrap thing="pFtrDefAur">
      <autotag group="User" tag="ClassOK"/>
      </bootstrap>
    </thing>
  <thing id="fBerLand" name="Heartland" description="You choose one of the following terrain types that best represents your heartland and gain its benefit." compset="ClassFeat">
    <fieldval field="usrCandid1" value="(component.BuildOpt) &amp; (BuildOpt.fBerLand)"/>
    </thing>
  <thing id="fBerArid" name="Arid Desert" description="While you are wearing cloth armor or no armor and not using a shield, you gain a +3 bonus to AC and a +2 bonus to Reflex.{br}At 4th level, you gain resist 5 fire. The resistance increases to 10 at 14th level and 15 at 24th level." compset="BuildOpt">
    <tag group="BuildOpt" tag="fBerLand"/>
    <eval phase="Traits" priority="10000"><![CDATA[
      doneif (activated = 0)
	  var armor as number
	  var shield as number
	  perform hero.findchild[Armor,"Equipped.Equipped & !ArmorType.arClothArm"].setfocus
	  armor = state.isfocus
	  perform hero.findchild[Shield,"Equipped.Equipped"].setfocus
	  shield = state.isfocus
      if (shield = 0) then
		if (armor = 0) then
			#traitmodify[defAC,trtBonus,3,""]
			#traitmodify[defRef,trtBonus,2,""]
		endif
      endif

      var resist as number
      if (hero.tagvalue[Level.?] <= 3) then
        resist = 0
      elseif (hero.tagvalue[Level.?] <= 13) then
        resist = 5
      elseif (hero.tagvalue[Level.?] <= 23) then
        resist = 10
      else
        resist = 15
        endif

      #traitmodify[rsFire,rsTotal,resist,""]]]>
      <after name="Calc attrBonus"/>
      </eval>
    </thing>
  <thing id="fBerFroz" name="Frozen Land" description="You gain a +1 bonus to Fortitude and Will.{br}At 4th level, you gain resist 5 cold. The resistance increases to 10 at 14th level and 15 at 24th level." compset="BuildOpt">
    <tag group="BuildOpt" tag="fBerLand"/>
    <eval phase="Traits" priority="10000"><![CDATA[
      doneif (activated = 0)

      var resist as number
      if (hero.tagvalue[Level.?] <= 3) then
        resist = 0
      elseif (hero.tagvalue[Level.?] <= 13) then
        resist = 5
      elseif (hero.tagvalue[Level.?] <= 23) then
        resist = 10
      else
        resist = 15
        endif

      #traitmodify[rsCold,rsTotal,resist,""]]]>
      <after name="Calc attrBonus"/>
      </eval>
    </thing>
  <thing id="fBerTemp" name="Temperate Land" description="While you are wielding a one-handed weapon and using a shield, you gain a +2 bonus to the damage rolls of any weapon attack you make with that weapon.{br}At 4th level, you gain a +1 bonus to speed while charging." compset="BuildOpt">
    <tag group="BuildOpt" tag="fBerLand"/>
    <eval phase="Traits" priority="10000"><![CDATA[
      doneif (activated = 0)
	  ~If no shield equipped, then no bonus.
	  ~If more than 1 shield then not valid.
	  doneif (hero.tagcount[Shield.?] <> 1)
	  ~Look at each weapon the hero has.
	  foreach pick in hero from WeapMelee
	  ~If it's not equipped as an off hand or both hand at all, continue.
	  if (eachpick.tagis[Helper.EqpOff] + eachpick.tagis[Helper.EqpBoth] = 0) then
		~If it then is also actually equipped on the main hand, continue.
		if (eachpick.tagis[Helper.EqpMain] = 1) then
			~Finally, it can't be a double sided weapon with just one side equipped or an unarmed strike.
			if (eachpick.tagis[WepProp.Double] + eachpick.tagis[WepGroup.wgUnarmed] < 1) then
				~Give the bonus to the weapon.
				perform eachpick.field[wpDamage].modify[+,2,""]
				endif
			endif
		endif
	  nexteach]]>
      <after name="Build option activated"/>
      </eval>
    </thing>
  <thing id="fBerPois" name="Poised Defender" description="While your defender aura is active and you&apos;re not wearing heavy armor, you gain a +2 bonus to AC. Note: This is bonus is not already included in your AC." compset="ClassFeat">
    <comment>It's not always active. My player assuming it is active and taking a penalty when it is inactive is non-standard. So I added additional verbage to the description to prevent that issue from recurring.</comment>
    </thing>
  </document>
