Array
(
    [scriptVersion] => 7
    [oeValues] => Array
        (
            [RngBuff1] => 250
            [MissileHoming] => 1
            [Upgrade] => Array
                (
                )

            [targs1] => Array
                (
                )

            [goldcost] => 3100
            [weapsOn] => 1
            [dice1] => 1
            [Missilespeed] => 1500
            [file] => Units\Creeps\SeaElemental\SeaElemental.mdl
            [atkType1] => chaos
            [dmgpt1] => 0.4
            [modelScale] => 0.6
            [weapTp1] => missile
            [acquire] => 900
            [rangeN1] => 900
            [upgrades] => Array
                (
                )

            [cool1] => 1.5
            [Ubertip] => His adaptive nature makes him very versatile.
            [backSw1] => 0.77
            [abilList] => Array
                (
                )

            [Name] => Morphling
            [Missileart] => Abilities\Weapons\SeaElementalMissile\SeaElementalMissile.mdl
            [Art] => ReplaceableTextures\CommandButtons\BTNSeaElemental.blp
            [red] => 200
            [buildingShadow] => Array
                (
                )

            [turnRate] => 3
            [unitSound] => WaterElemental
            [blue] => 200
            [sides1] => 1
            [uberSplat] => OSMA
            [auto] => Array
                (
                )

            [dmgplus1] => 3909
            [bldtm] => 1
        )

    [settings] => Array
        (
            [author] => DaveMatthews
            [element] => nature
            [authorDisplay] => DaveMatthews
            [alpha] => 255
            [balanceTip] => Array
                (
                )

            [rarity] => unique
            [version] => 1.0
            [abil_factor] => 0.7
        )

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => -52.2398
                    [y] => -13.0979
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 2.61799
                    [file] => Doodads\Dungeon\Props\DungeonObilisk\DungeonObilisk.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [1] => Array
                (
                    [x] => 1.94361
                    [y] => -62.143
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 2.61799
                    [file] => Doodads\Dungeon\Props\DungeonObilisk\DungeonObilisk.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [2] => Array
                (
                    [x] => 52.2829
                    [y] => -11.8602
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 2.61799
                    [file] => Doodads\Dungeon\Props\DungeonObilisk\DungeonObilisk.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [3] => Array
                (
                    [x] => 1.88508
                    [y] => 41.4967
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 2.61799
                    [file] => Doodads\Dungeon\Props\DungeonObilisk\DungeonObilisk.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [4] => Array
                (
                    [x] => -40.9784
                    [y] => -56.3342
                    [z] => 0
                    [scale] => 0.2
                    [rot] => 3.83973
                    [file] => Doodads\Terrain\CliffDoodad\Waterfall\Waterfall.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [5] => Array
                (
                    [x] => -42.8936
                    [y] => 36.0398
                    [z] => 0
                    [scale] => 0.2
                    [rot] => 2.26893
                    [file] => Doodads\Terrain\CliffDoodad\Waterfall\Waterfall.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [6] => Array
                (
                    [x] => 44.1398
                    [y] => -58.5185
                    [z] => 0
                    [scale] => 0.2
                    [rot] => 5.41052
                    [file] => Doodads\Terrain\CliffDoodad\Waterfall\Waterfall.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [7] => Array
                (
                    [x] => 51.8738
                    [y] => 34.4379
                    [z] => 0
                    [scale] => 0.2
                    [rot] => 0.698132
                    [file] => Doodads\Terrain\CliffDoodad\Waterfall\Waterfall.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [8] => Array
                (
                    [x] => 29.6219
                    [y] => 12.0491
                    [z] => 0
                    [scale] => 0.1
                    [rot] => 3.14159
                    [file] => Doodads\Dungeon\Terrain\DungeonPorticulisGate45\DungeonPorticulisGate45.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [9] => Array
                (
                    [x] => -23.4735
                    [y] => 10.7716
                    [z] => 0
                    [scale] => 0.1
                    [rot] => 1.5708
                    [file] => Doodads\Dungeon\Terrain\DungeonPorticulisGate45\DungeonPorticulisGate45.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [10] => Array
                (
                    [x] => 27.6061
                    [y] => -41.0114
                    [z] => 0
                    [scale] => 0.1
                    [rot] => 1.5708
                    [file] => Doodads\Dungeon\Terrain\DungeonPorticulisGate45\DungeonPorticulisGate45.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [11] => Array
                (
                    [x] => -22.6764
                    [y] => -41.0114
                    [z] => 0
                    [scale] => 0.1
                    [rot] => 3.14159
                    [file] => Doodads\Dungeon\Terrain\DungeonPorticulisGate45\DungeonPorticulisGate45.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

        )

    [dmgTable] => Array
        (
        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => On Tower Creation
                    [code] => set tower.userInt = 0
                    [values] => Array
                        (
                            [icon] => 
                            [visible] => false
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

            [1] => Array
                (
                    [name] => On Damage
                    [code] => local integer level = tower.getLevel()
local Iterate i
local Projectile p
local integer count = 0
local Unit next
local Buff bd = tower.getBuffOfType(dave_morph_damage)
local Buff bs = tower.getBuffOfType(dave_morph_speed)
local ProjectileType pt = 0
local real scale = 1.0

if bd != 0 and bd.getLevel()>=25 then
  set pt = dave_morph_strike_damage
  set scale = 1.6
  if tower.userInt < 500 then
     call tower.modifyProperty(MOD_DAMAGE_BASE_PERC, 0.002)
     call tower.modifyProperty(MOD_ATTACKSPEED, 0.001)
     set tower.userInt = tower.userInt + 1
  endif
elseif bs != 0 and bs.getLevel()>=25 then
  set pt = dave_morph_strike_speed
  if tower.userInt < 500 then
     call tower.modifyProperty(MOD_ATTACKSPEED, 0.002)
     call tower.modifyProperty(MOD_DAMAGE_BASE_PERC, 0.001)
     set tower.userInt = tower.userInt + 1
  endif
endif

if pt != 0 then
  set i = Iterate.overUnitsInRangeOfCaster(tower,TARGET_CREEPS,900)
  loop
    set next=i.next()
    set count=count+1
    exitwhen next==0 or count==4
    set p = Projectile.createFromUnitToUnit(pt,tower,1,1, tower, next, true, false, false)
    call p.setScale(scale)
  endloop
  if next != 0 then
    call i.destroy()
  endif
endif
                    [values] => Array
                        (
                            [ONDAMAGE_chance] => 0.2
                            [icon] => ReplaceableTextures\CommandButtons\BTNBanish.blp
                            [visible] => true
                            [name] => Morphling Strike
                            [short_explain] => Has a chance to launch projectiles that damage or slow the targets.
                            [ONDAMAGE_chanceLevelAdd] => 0.006
                            [long_explain] => Every time this tower damages a unit, it has a |cffFFFF8020%|r chance to launch |cffFFFF803|r projectiles to random creeps in |cffFFFF80900|r range, dealing |cffFFFF802000|r spell damage to them. On impact, if "Morph: Might" has at least |cffFFFF8025|r stacks, the projectiles deal additional spell damage equal to |cffFFFF8025%|r of the tower's damage per second for |cffFFFF805|r seconds; if "Morph: Swiftness" has at least |cffFFFF8025|r stacks, they slow the targets by |cffFFFF8020%|r and increase the damage they receive from nature by |cffFFFF8015%|r for |cffFFFF808|r seconds. |n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+60|r damage |r|n|cffFFFF80+0.8%|r damage per second |r|n|cffFFFF80+0.4%|r slow |r|n|cffFFFF80+0.2%|r damage from nature |r|n|cffFFFF80+0.6%|r chance
                        )

                )

            [2] => Array
                (
                    [name] => On Tower Details
                    [code] => local Buff d = tower.getBuffOfType(dave_morph_damage)
local integer bufflevelD = 0
local Buff s = tower.getBuffOfType(dave_morph_speed)
local integer bufflevelS = 0

if d != 0 then
   set bufflevelD = d.getLevel()
   call dave_absorb_MultiboardValue.setValue(1,I2S(bufflevelD))
endif

if s != 0 then
   set bufflevelS = s.getLevel()
   call dave_absorb_MultiboardValue.setValue(1,I2S(bufflevelS))
endif

call dave_absorb_MultiboardValue.setValue(0,I2S(tower.userInt))
return dave_absorb_MultiboardValue
                    [values] => Array
                        (
                            [0] => Array
                                (
                                    [_value] => 0
                                    [typ] => string
                                )

                        )

                )

            [3] => Array
                (
                    [name] => Header
                    [code] => globals
    BuffType dave_morph_damage
    BuffType dave_morph_speed
    BuffType dave_morph_slow
    BuffType dave_morph_adapt
    BuffType dave_morph_dot
    ProjectileType dave_morph_strike_damage
    ProjectileType dave_morph_strike_speed 
    MultiboardValues dave_absorb_MultiboardValue
    endglobals
    
    function morphSpeedHit takes Projectile p, Unit creep returns nothing
    local Tower tower = p.getCaster()
    local integer level= tower.getLevel()
    
    call tower.doSpellDamage(creep,2000+(60*level), tower.calcSpellCritNoBonus())
    call dave_morph_slow.apply(tower, creep, level)
    endfunction
    
    function morphDamageHit takes Projectile p, Unit creep returns nothing
    local Tower tower = p.getCaster()
    local integer level= tower.getLevel()
    
    call tower.doSpellDamage(creep,2000+(60*level), tower.calcSpellCritNoBonus())
    call dave_morph_dot.apply(tower, creep, level)
    endfunction
    
    function dot takes Buff b returns nothing
    local Tower tower = b.getCaster()
    local integer level= tower.getLevel()
    call tower.doSpellDamage(b.getBuffedUnit(), tower.getCurrentAttackDamageWithBonus()*(0.25+0.008*level),tower.calcSpellCritNoBonus())
    endfunction    

    private function init takes nothing returns nothing
    local Modifier m = Modifier.create()
    local Modifier n = Modifier.create()
    local Modifier o = Modifier.create()
    
    set dave_morph_damage = BuffType.create(-1,0,true)
    call dave_morph_damage.setBuffModifier(m)
    call m.addModification(MOD_DAMAGE_BASE_PERC,0.0,0.02)
    call m.addModification(MOD_ATTACKSPEED,0.0,-0.02)
    call dave_morph_damage.setBuffIcon( '@@1@@' )
    
    set dave_morph_speed = BuffType.create(-1,0,true)
    call dave_morph_speed.setBuffModifier(n)
    call n.addModification(MOD_DAMAGE_BASE_PERC,0.0,-0.02)
    call n.addModification(MOD_ATTACKSPEED,0.0,0.02)
    call dave_morph_speed.setBuffIcon( '@@0@@' )
    
    set dave_morph_adapt = BuffType.create(-1,0,true)
    call dave_morph_adapt.setBuffIcon( '@@2@@' )
    
    set dave_morph_dot = BuffType.create(5,0,false)
    call dave_morph_dot.setBuffIcon( '@@4@@' )
    call dave_morph_dot.addPeriodicEvent(EventHandler.dot,1)
    
    set dave_morph_slow = BuffType.create(8,0.1,false)
    call dave_morph_slow.setBuffModifier(o)
    call o.addModification(MOD_MOVESPEED,-0.2,-0.004)
    call o.addModification(MOD_DMG_FROM_NATURE,0.15,0.002)
    call dave_morph_slow.setBuffIcon( '@@3@@' )
    
    set dave_morph_strike_damage = ProjectileType.create("Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl",4,800)
    call dave_morph_strike_damage.enableHoming(ProjectileTargetEvent.morphDamageHit,0)
    
    set dave_morph_strike_speed = ProjectileType.create("Abilities\\Weapons\\ChimaeraAcidMissile\\ChimaeraAcidMissile.mdl",4,800)
    call dave_morph_strike_speed.enableHoming(ProjectileTargetEvent.morphSpeedHit,0)
    
    set dave_absorb_MultiboardValue = MultiboardValues.create(2)
    call dave_absorb_MultiboardValue.setKey(0,"Evolve")
    call dave_absorb_MultiboardValue.setKey(1,"Morph level")
	endfunction
                    [values] => Array
                        (
                            [icon] => 
                            [visible] => false
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

            [4] => Array
                (
                    [name] => Autocast
                    [code] => local Buff b = tower.getBuffOfType(dave_morph_damage)
local integer bufflevel = b.getLevel()

if tower.getBuffOfType(dave_morph_damage)==0 then
   if tower.getBuffOfType(dave_morph_speed)!=0 then
     call tower.getBuffOfType(dave_morph_speed).removeBuff()
   endif
   call dave_morph_damage.apply(tower, tower, bufflevel)
endif
                    [values] => Array
                        (
                            [caster_art] => 
                            [icon] => ReplaceableTextures\CommandButtons\BTNReplenishMana.blp
                            [AUTOCAST_cooldown] => 1
                            [AUTOCAST_numBuffsBeforeIdle] => 1
                            [AUTOCAST_isExtended] => false
                            [long_explain] => Activates "Morph: Might". As long as this buff is on this tower gains |cffFFFF802%|r base damage and loses |cffFFFF802%|r attack speed on every attack, up to a maximum of |cffFFFF8050|r times. Removes "Morph: Swiftness" and resets its bonus when activated.
                            [AUTOCAST_autocastType] => AC_TYPE_NOAC_IMMEDIATE
                            [AUTOCAST_manacost] => 0
                            [AUTOCAST_range] => 0
                            [AUTOCAST_buffType] => dave_morph_damage
                            [name] => Morph: Might
                            [AUTOCAST_targetSelf] => true
                            [short_explain] => Increases damage and reduces attack speed.
                            [AUTOCAST_targetType] => TARGET_TYPE_TOWERS
                            [target_art] => 
                            [AUTOCAST_autoRange] => 0
                        )

                )

            [5] => Array
                (
                    [name] => Autocast
                    [code] => local Buff b = tower.getBuffOfType(dave_morph_speed)
local integer bufflevel = b.getLevel()

if tower.getBuffOfType(dave_morph_speed)==0 then
   if tower.getBuffOfType(dave_morph_damage)!=0 then
      call tower.getBuffOfType(dave_morph_damage).removeBuff()
   endif
   call dave_morph_speed.apply(tower, tower, bufflevel)
endif
                    [values] => Array
                        (
                            [caster_art] => 
                            [icon] => ReplaceableTextures\CommandButtons\BTNReplenishHealth.blp
                            [AUTOCAST_cooldown] => 1
                            [AUTOCAST_numBuffsBeforeIdle] => 1
                            [AUTOCAST_isExtended] => false
                            [long_explain] => Activates "Morph: Swiftness". As long as this buff is on this tower gains |cffFFFF802%|r attack speed and loses |cffFFFF802%|r base damage on every attack, up to a maximum of |cffFFFF8050|r times. Removes "Morph: Might" and resets its bonus when activated.
                            [AUTOCAST_autocastType] => AC_TYPE_NOAC_IMMEDIATE
                            [AUTOCAST_manacost] => 0
                            [AUTOCAST_range] => 0
                            [AUTOCAST_buffType] => dave_morph_speed
                            [name] => Morph: Swiftness
                            [AUTOCAST_targetSelf] => true
                            [short_explain] => Increases attack speed and reduces damage.
                            [AUTOCAST_targetType] => TARGET_TYPE_TOWERS
                            [target_art] => 
                            [AUTOCAST_autoRange] => 0
                        )

                )

            [6] => Array
                (
                    [name] => Autocast
                    [code] => local Buff b = tower.getBuffOfType(dave_morph_adapt)
local integer bufflevel = b.getLevel()

if tower.getBuffOfType(dave_morph_adapt)==0 then
   call dave_morph_adapt.apply(tower, tower, bufflevel)
elseif tower.getBuffOfType(dave_morph_adapt)!=0 then
   call tower.getBuffOfType(dave_morph_adapt).removeBuff()
endif
                    [values] => Array
                        (
                            [caster_art] => 
                            [icon] => ReplaceableTextures\CommandButtons\BTNRejuvenation.blp
                            [AUTOCAST_cooldown] => 1
                            [AUTOCAST_numBuffsBeforeIdle] => 1
                            [AUTOCAST_isExtended] => false
                            [long_explain] => Stops the effect of morphs, leaving the current buff on the tower. Using the spell again removes Adapt.
                            [AUTOCAST_autocastType] => AC_TYPE_NOAC_IMMEDIATE
                            [AUTOCAST_manacost] => 0
                            [AUTOCAST_range] => 0
                            [AUTOCAST_buffType] => dave_morph_adapt
                            [name] => Adapt
                            [AUTOCAST_targetSelf] => true
                            [short_explain] => Stops the effect of morphs.
                            [AUTOCAST_targetType] => TARGET_TYPE_TOWERS
                            [target_art] => 
                            [AUTOCAST_autoRange] => 0
                        )

                )

            [7] => Array
                (
                    [name] => On Attack
                    [code] => local Buff bd = tower.getBuffOfType(dave_morph_damage)
local Buff bs = tower.getBuffOfType(dave_morph_speed)

if tower.getBuffOfType(dave_morph_adapt)==0 then
   if bd!=0 and bd.getLevel()<50 then
       call dave_morph_damage.apply(tower, tower, bd.getLevel()+1)
   elseif bs!=0 and bs.getLevel()<50 then
       call dave_morph_speed.apply(tower, tower, bs.getLevel()+1)
   endif
endif
                    [values] => Array
                        (
                            [icon] => ReplaceableTextures\CommandButtons\BTNSpiritOfVengeance.blp
                            [visible] => true
                            [name] => Evolve
                            [short_explain] => Gains bonus damage or attack speed on morphling strike cast.
                            [ONATTACK_chance] => 1.0
                            [ONATTACK_chanceLevelAdd] => 0.0
                            [long_explain] => Every time it casts Morphling Strike, this tower permanently gains |cffFFFF800.2%|r base damage and |cffFFFF800.1%|r attack speed if "Morph: Might" has at least |cffFFFF8025|r stacks, or |cffFFFF800.2%|r attack speed and |cffFFFF800.1%|r base damage if "Morph: Swiftness" has at least |cffFFFF8025|r stacks.  Can evolve a maximum of |cffFFFF80500|r times.
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
            [0] => Array
                (
                    [id] => @@0@@
                    [derivedFrom] => Bslo
                    [oeValues] => Array
                        (
                            [Bufftip] => Swiftness
                            [Buffubertip] => This tower gains attack speed and loses damage on attack.
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNReplenishHealth.blp
                            [TargetArt] => Array
                                (
                                )

                        )

                )

            [1] => Array
                (
                    [id] => @@1@@
                    [derivedFrom] => Bslo
                    [oeValues] => Array
                        (
                            [Bufftip] => Might
                            [Buffubertip] => This tower gains damage and loses attack speed on attack.
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNReplenishMana.blp
                            [TargetArt] => Array
                                (
                                )

                        )

                )

            [2] => Array
                (
                    [id] => @@2@@
                    [derivedFrom] => Bslo
                    [oeValues] => Array
                        (
                            [Bufftip] => Adapt
                            [Buffubertip] => Cancels the effect of morphs.
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNRejuvenation.blp
                            [TargetArt] => Array
                                (
                                )

                        )

                )

            [3] => Array
                (
                    [id] => @@3@@
                    [derivedFrom] => Bslo
                    [oeValues] => Array
                        (
                            [Bufftip] => Morphling Strike
                            [Targetattach] => chest
                            [Buffubertip] => This unit is slowed and takes more damage from nature.
                            [Targetattachcount] => 1
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNBanish.blp
                            [TargetArt] => Abilities\Spells\Other\AcidBomb\BottleImpact.mdl
                        )

                )

            [4] => Array
                (
                    [id] => @@4@@
                    [derivedFrom] => Bslo
                    [oeValues] => Array
                        (
                            [Bufftip] => Morphling Strike
                            [Targetattach] => chest
                            [Buffubertip] => This unit is taking spell damage over time.
                            [Targetattachcount] => 1
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNBanish.blp
                            [TargetArt] => Abilities\Weapons\SpiritOfVengeanceMissile\SpiritOfVengeanceMissile.mdl
                        )

                )

        )

    [units] => Array
        (
        )

    [references] => Array
        (
        )

)