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

            [targs1] => Array
                (
                )

            [goldcost] => 2300
            [weapsOn] => 1
            [dice1] => 1
            [Missilespeed] => 1000
            [file] => units\creeps\Owlbear\Owlbear.mdl
            [atkType1] => normal
            [modelScale] => 0.7
            [weapTp1] => missile
            [acquire] => 900
            [rangeN1] => 900
            [upgrades] => Array
                (
                )

            [cool1] => 2
            [Ubertip] => Strong spell damage tower which gets stronger with experience. Can even damage immune units with it's spells.
            [abilList] => @@0@@
            [Name] => Owl of Wisdom
            [Missileart] => Abilities\Weapons\IllidanMissile\IllidanMissile.mdl
            [Art] => ReplaceableTextures\CommandButtons\BTNOwlBear.blp
            [buildingShadow] => Array
                (
                )

            [turnRate] => 0.3
            [sides1] => 1
            [uberSplat] => OSMA
            [auto] => Array
                (
                )

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

    [settings] => Array
        (
            [author] => Der_kleine_Tomy
            [element] => astral
            [authorDisplay] => |c00ff0000Der_kleine_Tomy|r
            [alpha] => 255
            [balanceTip] => |cffFFFF005%|r spell crit chance (|cffFFFF00+0.15%|r/lvl)|n|cffFFFF00+1% |rspell damage/lvl
            [rarity] => unique
            [version] => 1.0
            [abil_factor] => 0.30
        )

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => 45.4338
                    [y] => -25.7758
                    [z] => 32
                    [scale] => 0.4
                    [rot] => 4.11898
                    [file] => Doodads\Cinematic\GlowingRunes\GlowingRunes3.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [1] => Array
                (
                    [x] => 10.3169
                    [y] => -42.9703
                    [z] => 0
                    [scale] => 0.37
                    [rot] => 4.03171
                    [file] => Doodads\Ruins\Props\RuinsTrash\RuinsTrash1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [2] => Array
                (
                    [x] => -46.6972
                    [y] => 23.8658
                    [z] => 0
                    [scale] => 0.6
                    [rot] => 5.57411
                    [file] => Doodads\Ruins\Props\LibraryShelf\LibraryShelf0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [3] => Array
                (
                    [x] => 41.1827
                    [y] => 23.0169
                    [z] => 0
                    [scale] => 0.6
                    [rot] => 4.20347
                    [file] => Doodads\Ruins\Props\LibraryShelf\LibraryShelf0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [4] => Array
                (
                    [x] => -35.6484
                    [y] => 1.95927
                    [z] => 0
                    [scale] => 0.37
                    [rot] => 4.86947
                    [file] => Doodads\Ruins\Props\RuinsTrash\RuinsTrash1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [5] => Array
                (
                    [x] => 4.8757
                    [y] => 47.9887
                    [z] => 89.6
                    [scale] => 0.3
                    [rot] => 4.57752
                    [file] => units\nightelf\OwlSCOUT\OwlSCOUT.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [6] => Array
                (
                    [x] => -37.3009
                    [y] => 2.89444
                    [z] => 102.4
                    [scale] => 0.3
                    [rot] => 4.99947
                    [file] => units\nightelf\OwlSCOUT\OwlSCOUT.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [7] => Array
                (
                    [x] => 38.9679
                    [y] => -12.6989
                    [z] => 96
                    [scale] => 0.3
                    [rot] => 4.3006
                    [file] => units\nightelf\OwlSCOUT\OwlSCOUT.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [8] => Array
                (
                    [x] => -3.10137
                    [y] => -10.4939
                    [z] => 0
                    [scale] => 0.37
                    [rot] => 4.66003
                    [file] => Doodads\Ruins\Props\RuinsTrash\RuinsTrash1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [9] => Array
                (
                    [x] => 44.2959
                    [y] => -22.7443
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 3.89569
                    [file] => Doodads\Ruins\Props\RuinsPillar\RuinsPillar3.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [10] => Array
                (
                    [x] => -33.0703
                    [y] => -29.5478
                    [z] => 0
                    [scale] => 0.37
                    [rot] => 3.21141
                    [file] => Doodads\Ruins\Props\RuinsTrash\RuinsTrash1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [11] => Array
                (
                    [x] => -50.3199
                    [y] => -26.5317
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 5.47416
                    [file] => Doodads\Ruins\Props\RuinsPillar\RuinsPillar3.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [12] => Array
                (
                    [x] => 3.05901
                    [y] => -31.0513
                    [z] => 0
                    [scale] => 0.37
                    [rot] => 2.61799
                    [file] => Doodads\Ruins\Props\RuinsTrash\RuinsTrash1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [13] => Array
                (
                    [x] => -38.5758
                    [y] => -5.84806
                    [z] => 0
                    [scale] => 0.37
                    [rot] => 0.226893
                    [file] => Doodads\Ruins\Props\RuinsTrash\RuinsTrash1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [14] => Array
                (
                    [x] => -50.4187
                    [y] => -27.2558
                    [z] => 32
                    [scale] => 0.4
                    [rot] => 4.11898
                    [file] => Doodads\Cinematic\GlowingRunes\GlowingRunes3.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [15] => Array
                (
                    [x] => -7.00278
                    [y] => 29.1198
                    [z] => 0
                    [scale] => 0.37
                    [rot] => 3.56047
                    [file] => Doodads\Ruins\Props\RuinsTrash\RuinsTrash1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [16] => Array
                (
                    [x] => 28.7392
                    [y] => 0.391508
                    [z] => 0
                    [scale] => 0.37
                    [rot] => 2.18166
                    [file] => Doodads\Ruins\Props\RuinsTrash\RuinsTrash1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [17] => Array
                (
                    [x] => 36.2176
                    [y] => -0.391327
                    [z] => 0
                    [scale] => 0.37
                    [rot] => 5.67232
                    [file] => Doodads\Ruins\Props\RuinsTrash\RuinsTrash1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

        )

    [dmgTable] => Array
        (
            [0] => Array
                (
                    [id] => MOD_SPELL_CRIT_CHANCE
                    [base] => 0.0375
                    [add] => 0.0015
                )

            [1] => Array
                (
                    [id] => MOD_SPELL_DAMAGE_DEALT
                    [base] => 0
                    [add] => 0.01
                )

        )

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

                )

            [1] => Array
                (
                    [name] => Header
                    [code] => globals
    //@export
      ProjectileType tomy_energyballPT
    endglobals
    
    private function Tomy_Energyball_Damage takes Projectile p, Unit target returns nothing
        local Tower tower = p.userInt
        local real damage
        local real immunedamage
  
        // Owl of Wisdom
        if tower.userInt == 1 then
            set damage = 4500.0 + RMinBJ(tower.getExp() * 2.25, tower.getOwner().getTeam().getLevel() * 150.0)
            set immunedamage = (10.0 + 0.4 * tower.getLevel()) / 100
        else // Ancient Owl of Wisdom
            set damage = 6500.0 + RMinBJ(tower.getExp() * 3.25, tower.getOwner().getTeam().getLevel() * 150.0)
            set immunedamage = (15.0 + 0.6 * tower.getLevel()) / 100
        endif
      
        if not target.isImmune() then
            call tower.doSpellDamageAoEUnit(target, 100 + (1* tower.getLevel()),damage, tower.calcSpellCritNoBonus(),0)
        else
            call tower.doAttackDamageAoEUnit(target,100 + (1* tower.getLevel()) ,damage * immunedamage * tower.getProp_SpellDmgDealt(), tower.calcSpellCritNoBonus(), 0)
        endif
  
        call Effect.createColored("Units\\NightElf\\Wisp\\WispExplode.mdl",p.x,p.y,p.z,0,0.70,0,0,255,255).setLifetime(1.0)	
    endfunction
    
 
    function Tomy_Energyball_Start takes Unit target, Tower tower returns nothing
        set Projectile.createFromUnitToUnit(tomy_energyballPT, tower, 0, 0, tower, target, true, false, false).userInt = tower 
    endfunction
    

    
    //Do not remove or rename this function!
    //Put your initialization tasks here, this function will be called on map init
    private function init takes nothing returns nothing
        set tomy_energyballPT = ProjectileType.create("Abilities\\Spells\\Undead\\DarkSummoning\\DarkSummonMissile.mdl", 5.0, 950.0)
        call tomy_energyballPT.enableHoming(ProjectileTargetEvent.Tomy_Energyball_Damage, 0.0)
    endfunction
                    [values] => Array
                        (
                            [icon] => 
                            [visible] => false
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

            [2] => Array
                (
                    [name] => Periodic
                    [code] => local Unit target
    local Iterate it = Iterate.overUnitsInRangeOfCaster(tower,TARGET_CREEPS,900)
   
    loop
        set target = it.next()
        exitwhen target == 0
        if tower.calcChance(0.10+0.002*tower.getLevel()) then
            call Tomy_Energyball_Start(target, tower)
        endif 
    endloop
                    [values] => Array
                        (
                            [icon] => ReplaceableTextures\CommandButtons\BTNNeutralManaShield.blp
                            [visible] => true
                            [PERIODIC_period] => 5.0
                            [name] => Energy Aura
                            [short_explain] => Has a chance to cast Energyball on creeps every few seconds.
                            [long_explain] => Every |cffFFFF805|r seconds, for each creep in |cffFFFF80900|r range the Owl of Wisdom has a |cffFFFF8010%|r chance to cast Energyball on it.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+0.2%|r chance
                        )

                )

            [3] => Array
                (
                    [name] => On Attack
                    [code] => call Tomy_Energyball_Start(Event.getTarget(), tower)
                    [values] => Array
                        (
                            [icon] => ReplaceableTextures\CommandButtons\BTNWispSplode.blp
                            [visible] => true
                            [name] => Energyball
                            [short_explain] => The Owl has a chance to deal additional spell damage on attack.
                            [ONATTACK_chance] => 0.25
                            [ONATTACK_chanceLevelAdd] => 0.004
                            [long_explain] => The Owl of Wisdom has a |cffFFFF8025%|r chance on attack to cast Energyball on the attacked creep. The Energyball deals |cffFFFF804500 + [2.25x Towerexp]|r spell damage in a |cffFFFF80100|r AoE around the attacked creep. The experience bonus cannot exceed |cffFFFF80[150x current wave]|r damage.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+1|r AoE|n|cffFFFF80+0.4%|r chance
                        )

                )

        )

    [abilities] => Array
        (
            [0] => Array
                (
                    [id] => @@0@@
                    [derivedFrom] => Assk
                    [oeValues] => Array
                        (
                            [Name] => Weak Spots
                            [Art] => ReplaceableTextures\CommandButtons\BTNScout.blp
                            [DataC1] => 0
                            [Requires] => Array
                                (
                                )

                            [Ubertip] => The Owl of Wisdom is able to find weak spots even on magic immune units. It's Energyball deals |cffFFFF8010%|r of its spell damage as energy damage to immune units.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+0.4%|r damage
                            [targs1] => Array
                                (
                                )

                            [Tip] => Weak Spots
                            [DataE1] => 0
                            [Unubertip] => The Owl of Wisdom is able to deal a part of its spell damage to immune units.
                            [DataA1] => 0
                            [DataB1] => 0
                            [DataD1] => 0
                        )

                )

        )

    [buffs] => Array
        (
        )

    [units] => Array
        (
        )

    [references] => Array
        (
            [0] => Array
                (
                    [export] => true
                    [category] => global
                    [typ] => ProjectileType
                    [name] => tomy_energyballPT
                )

        )

)