mods/heroesdata.stormmod/base.stormdata/ai/tlvlongboat.aitree

tlvlongboat.aitree
<?xml version="1.0" encoding="us-ascii"?>
<tree>
  <include file="AI/SummonedMinionAttackOwnerTarget.aitree" />
  <mod id="00000000746F6F52">
    <insertChild id="565CAD780A7C3DC8" before="" />
    <insertChild id="15DE0F3080DFE63F" after="565CAD780A7C3DC8" />
  </mod>
  <mod id="0B37000004036871">
    <removeChild id="290B003260587548" />
  </mod>
  <node name="Mortar" type="AbilityUsable" id="565CAD780A7C3DC8">
    <property name="Ability" valueSource="literal" value="LostVikingsLongboatRaidMortar" />
    <insertChild id="9FCE2C2C6BC5C999" />
  </node>
  <node name="" type="And" id="9FCE2C2C6BC5C999">
    <variable name="LongBoatRaidMortarRange" type="Number" valueSource="lookup" value="Abil,LostVikingsLongboatRaidMortar,Range" />
    <variable name="LongBoatRaidMortarAOE" type="Number" value="2.5" />
    <insertChild id="9B0E99710085C04A" />
    <insertChild id="FC74084699BCAB52" />
  </node>
  <node name="Find Hero" type="FindBestAOEPoint" id="F8A945DFBBE74B82">
    <property name="MaxTargetDistance" valueSource="variable" value="LongBoatRaidMortarRange" />
    <property name="MinTargets" valueSource="literal" value="1" />
    <property name="AOERadius" valueSource="variable" value="LongBoatRaidMortarAOE" />
    <property name="OutputTarget" value="AttackTargetPoint" />
    <property name="MaxBestTargetOffset" valueSource="literal" value="1" />
    <property name="TargetTypes" valueSource="literal" value="" />
    <property name="RequiredTypes" valueSource="literal" value="Enemy,Heroic" />
    <property name="LifeFractionFactor" valueSource="literal" value="10" />
  </node>
  <node name="Use Abil" type="Ability" id="FC74084699BCAB52">
    <property name="Ability" valueSource="literal" value="LostVikingsLongboatRaidMortar" />
    <property name="TargetPoint" valueSource="variable" value="AttackTargetPoint" />
  </node>
  <node name="" type="Or" id="9B0E99710085C04A">
    <insertChild id="F8A945DFBBE74B82" />
    <insertChild id="B4C0230CCFF7897D" />
  </node>
  <node name="Find Hero" type="FindBestAOEPoint" id="B4C0230CCFF7897D">
    <property name="MaxTargetDistance" valueSource="variable" value="LongBoatRaidMortarRange" />
    <property name="MinTargets" valueSource="literal" value="1" />
    <property name="AOERadius" valueSource="variable" value="LongBoatRaidMortarAOE" />
    <property name="OutputTarget" value="AttackTargetPoint" />
    <property name="MaxBestTargetOffset" valueSource="literal" value="1" />
    <property name="TargetTypes" valueSource="literal" value="Tower,Minion,Merc,Structure,Heroic,MapBoss,MapCreature,AITargetableStructure" />
    <property name="RequiredTypes" valueSource="literal" value="Enemy" />
    <property name="LifeFractionFactor" valueSource="literal" value="10" />
  </node>
  <node name="Find Low Hero" type="FindBestTarget" id="B466BA1AE86F55B8">
    <property name="OutputTarget" value="LongBoatTargetHero" />
    <property name="MaxTargetDistance" valueSource="literal" value="15" />
    <property name="TargetTypes" valueSource="literal" value="Heroic" />
    <property name="RequiredTypes" valueSource="literal" value="Enemy" />
    <property name="MaxLifeFraction" valueSource="literal" value="0.3" />
    <property name="LifeFractionFactor" valueSource="literal" value="5" />
    <property name="AddUnitRadiusToMaxTargetDistance" valueSource="intrinsic" value="Self" />
  </node>
  <node name="Calculate Distance" type="UnitDistance" id="BAFACAA9B0C14828">
    <property name="Unit" valueSource="intrinsic" value="Self" />
    <property name="Point" valueSource="variable" value="LongBoatTargetHero" />
    <property name="OutputDistance" value="DistanceToTargetHero" />
    <property name="MinRange" valueSource="literal" value="15" />
    <insertChild id="B1C31A06DE4ADFB1" />
  </node>
  <node name="" type="IfElse" id="B1C31A06DE4ADFB1">
    <insertChild id="6DF21CFAA8A909A6" />
    <insertChild id="4E11B0EE34F46E0A" />
    <insertChild id="F43CA8A5ADD8CB73" />
  </node>
  <node name="Target Close" type="CompareNumber" id="6DF21CFAA8A909A6">
    <property name="Comparison" valueSource="literal" value="LT" />
    <property name="LeftHandSide" valueSource="variable" value="DistanceToTargetHero" />
    <property name="RightHandSide" valueSource="literal" value="4" />
  </node>
  <node name="Goto Safe Position" type="HeroMoveToPoint" id="4E11B0EE34F46E0A">
    <property name="TargetPosition" valueSource="intrinsic" value="SafePos" />
  </node>
  <node name="Target Close" type="CompareNumber" id="F43CA8A5ADD8CB73">
    <property name="Comparison" valueSource="literal" value="GT" />
    <property name="LeftHandSide" valueSource="variable" value="DistanceToTargetHero" />
    <property name="RightHandSide" valueSource="literal" value="7" />
    <insertChild id="7028DC4F36EBF688" />
  </node>
  <node name="Self &gt; 50%" type="LifeFraction" id="7028DC4F36EBF688">
    <property name="Target" valueSource="intrinsic" value="Self" />
    <property name="LifeFraction" valueSource="literal" value="0.5" />
    <insertChild id="6A8DDE148F0E1FEF" />
  </node>
  <node name="&lt; 3 Enemy Heroes Near" type="UnitCount" id="6A8DDE148F0E1FEF">
    <property name="Comparison" valueSource="literal" value="LT" />
    <property name="TargetCount" valueSource="literal" value="3" />
    <property name="TargetTypes" valueSource="literal" value="Heroic" />
    <property name="ExcludeTypes" valueSource="literal" value="Enemy,Missile,Stasis,Dead,Invulnerable,Benign" />
    <property name="MaxTargetDistance" valueSource="literal" value="15" />
    <property name="MinLifeFraction" valueSource="literal" value="0.2" />
    <insertChild id="6052773045855476" />
  </node>
  <node name="Go to Target" type="HeroMoveToPoint" id="6052773045855476">
    <property name="TargetPosition" valueSource="variable" value="LongBoatTargetHero" />
  </node>
  <node name="" type="Or" id="D73E93A2303708A9">
    <insertChild id="B466BA1AE86F55B8" />
    <insertChild id="1B2830F9F4696C9C" />
  </node>
  <node name="" type="And" id="15DE0F3080DFE63F">
    <variable name="LongBoatTargetHero" type="Unit" />
    <variable name="DistanceToTargetHero" type="Number" />
    <insertChild id="D73E93A2303708A9" />
    <insertChild id="BAFACAA9B0C14828" />
  </node>
  <node name="Find Closest Hero" type="FindBestTarget" id="1B2830F9F4696C9C">
    <property name="OutputTarget" value="LongBoatTargetHero" />
    <property name="MaxTargetDistance" valueSource="literal" value="15" />
    <property name="TargetTypes" valueSource="literal" value="Heroic" />
    <property name="RequiredTypes" valueSource="literal" value="Enemy" />
    <property name="DistanceFactor" valueSource="literal" value="5" />
    <property name="AddUnitRadiusToMaxTargetDistance" valueSource="intrinsic" value="Self" />
  </node>
</tree>