Array
(
    [scriptVersion] => 7
    [oeValues] => Array
        (
            [RngBuff1] => 350
            [scaleBull] => 0
            [Upgrade] => Array
                (
                )

            [targs1] => Array
                (
                )

            [goldcost] => 3500
            [weapsOn] => 1
            [dice1] => 1
            [damageLoss1] => 0.7
            [Missilespeed] => 900
            [targCount1] => 3
            [file] => .mdl
            [manaN] => 1200
            [atkType1] => normal
            [weapTp1] => mbounce
            [acquire] => 800
            [upgrades] => Array
                (
                )

            [rangeN1] => 1600
            [cool1] => 1.1
            [Ubertip] => Converts energy into pure destruction!
            [Farea1] => 750
            [regenMana] => 20
            [abilList] => Array
                (
                )

            [launchZ] => 130
            [Missileart] => Abilities\Spells\Human\ManaFlare\ManaFlareTarget.mdl
            [Name] => Ancient Energy Converter
            [Art] => ReplaceableTextures\CommandButtons\BTNControlMagic.blp
            [buildingShadow] => Array
                (
                )

            [sides1] => 2401
            [auto] => Array
                (
                )

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

    [settings] => Array
        (
            [author] => geX
            [element] => storm
            [authorDisplay] => geX
            [balanceTip] => |cffCCFF00Bounce attack:|n   |cffFFFF003|r targets|n   |cffFFFF00-70%|r damage per bounce|n|cffFFFF00+25 |rmana/lvl
            [rarity] => unique
            [version] => 1.0
            [abil_factor] => 0.55
        )

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => -2.3861
                    [y] => -45.0071
                    [z] => 0
                    [scale] => 0.8
                    [rot] => 5.49779
                    [file] => Doodads\Cityscape\Structures\City_ColumnSingle2_Ruined\City_ColumnSingle2_Ruined.mdl
                    [red] => 200
                    [green] => 200
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [1] => Array
                (
                    [x] => -41.341
                    [y] => 28.0525
                    [z] => 0
                    [scale] => 0.8
                    [rot] => 3.40339
                    [file] => Doodads\Cityscape\Structures\City_ColumnSingle2_Ruined\City_ColumnSingle2_Ruined.mdl
                    [red] => 200
                    [green] => 200
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [2] => Array
                (
                    [x] => 43.201
                    [y] => 22.7324
                    [z] => 0
                    [scale] => 0.8
                    [rot] => 1.309
                    [file] => Doodads\Cityscape\Structures\City_ColumnSingle2_Ruined\City_ColumnSingle2_Ruined.mdl
                    [red] => 200
                    [green] => 200
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [3] => Array
                (
                    [x] => -27.1659
                    [y] => 1.59492
                    [z] => 0
                    [scale] => 0.2
                    [rot] => 0.0272271
                    [file] => Doodads\Cityscape\Structures\City_ColumnSemiCircle\City_ColumnSemiCircle.mdl
                    [red] => 200
                    [green] => 200
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [4] => Array
                (
                    [x] => 28.3924
                    [y] => 2.06332
                    [z] => 0
                    [scale] => 0.2
                    [rot] => 3.14439
                    [file] => Doodads\Cityscape\Structures\City_ColumnSemiCircle\City_ColumnSemiCircle.mdl
                    [red] => 200
                    [green] => 200
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [5] => Array
                (
                    [x] => -0.013995
                    [y] => 1.91776
                    [z] => 83.2
                    [scale] => 4.2
                    [rot] => 2.55185
                    [file] => Abilities\Spells\Human\ManaFlare\ManaFlareTarget.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [6] => Array
                (
                    [x] => 1.90006
                    [y] => 0.836892
                    [z] => 25.6
                    [scale] => 1.2
                    [rot] => 5.39307
                    [file] => Abilities\Spells\Orc\LightningShield\LightningShieldTarget.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

        )

    [dmgTable] => Array
        (
            [0] => Array
                (
                    [id] => MOD_MANA
                    [base] => 0
                    [add] => 25
                )

        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => Header
                    [code] => globals
        Cast lightCast
        ProjectileType myProj
        TargetType myTargType
    endglobals
    
    function damageStun takes DummyUnit d returns nothing
        call cb_stun.applyOnlyTimed(d.getCaster(),Event.getTarget(),0.8)
    endfunction
    
    function periodicLightning takes Projectile p returns nothing
        local Iterate it
        local Unit u
        local Unit caster = p.getCaster()
        if caster.calcChance(0.25) then
            set it = it.overUnitsInRange(caster,myTargType,p.x,p.y,650.0)
            set u = it.next()
            if u != 0 then
                call lightCast.targetCastFromPoint(caster, u,p.x,p.y,p.getDmgRatio(),p.getCritRatio())
                call it.destroy()
            endif
        endif
    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 lightCast = Cast.create('@@1@@',"chainlightning",5.0)
        call lightCast.setDamageEvent(damageStun)
        call lightCast.setSourceHeight(80.0)
        set myProj = ProjectileType.create("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareTarget.mdl",12.0,250.0)
        call myProj.enablePeriodic(periodicLightning,1.0)
        set myTargType = TargetType.create(TARGET_TYPE_CREEPS)
    endfunction
                    [values] => Array
                        (
                            [icon] => 
                            [visible] => false
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

            [1] => Array
                (
                    [name] => Autocast
                    [code] => local integer level = tower.getLevel()
        local integer numProjectiles = 3 + level/5
        local integer i = numProjectiles
        local Projectile p
        local real x = tower.getX()
        local real y = tower.getY()
        
        //Rotate either left or right
        call myProj.setStartRotation(1.2 * (GetRandomInt(0,1)*2-1.0))
        
        //Spawn projectiles
        loop
            set i = i - 1
            set p = Projectile.create(myProj,tower,1.0+level*0.05,tower.calcSpellCritNoBonus(),x,y,80.0,i*360.0/numProjectiles)
            call p.setScale(2.0)
            call p.addAbility('@@0@@')
            exitwhen i < 1
        endloop
                    [values] => Array
                        (
                            [caster_art] => Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
                            [icon] => ReplaceableTextures\CommandButtons\BTNControlMagic.blp
                            [AUTOCAST_cooldown] => 12.0
                            [AUTOCAST_numBuffsBeforeIdle] => 0
                            [AUTOCAST_isExtended] => true
                            [long_explain] => Spawns |cffFFFF803|r orbs that last |cffFFFF8012|r seconds flying around the Converter. Each orb deals  |cffFFFF801500|r damage per second to random units in |cffFFFF80650|r range.|nAdditionally, the orbs have a |cffFFFF8025%|r chance every second to cast a chainlightining that deals |cffFFFF801500|r initial damage and hits up to |cffFFFF804|r targets dealing |cffFFFF8025%|r less damage with each bounce.|nUnits hit by the chainlightning are stunned for |cffFFFF800.8|r seconds.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+75|r orb damage|n|cffFFFF80+1|r orb spawned per |cffFFFF805|r levels
                            [AUTOCAST_autocastType] => AC_TYPE_OFFENSIVE_IMMEDIATE
                            [AUTOCAST_manacost] => 1200
                            [AUTOCAST_range] => 0.0
                            [AUTOCAST_buffType] => 0
                            [name] => Energy Conversion
                            [AUTOCAST_targetSelf] => false
                            [short_explain] => Converts the saved energy to orbs that damage nearby enemies and shoot stunning chain lightnings onto them.
                            [AUTOCAST_targetType] => 0
                            [target_art] => 
                            [AUTOCAST_autoRange] => 650.0
                        )

                )

        )

    [abilities] => Array
        (
            [0] => Array
                (
                    [id] => @@0@@
                    [derivedFrom] => Apxf
                    [oeValues] => Array
                        (
                            [Missileart] => Abilities\Weapons\SpiritOfVengeanceMissile\SpiritOfVengeanceMissile.mdl
                            [Art] => ReplaceableTextures\CommandButtons\BTNMarkOfFire.blp
                            [Cool1] => 0.33
                            [HeroDur1] => 0.01
                            [Dur1] => 0.01
                            [DataA1] => 500
                            [DataB1] => 0
                            [BuffID1] => @@2@@
                            [Area1] => 650
                        )

                )

            [1] => Array
                (
                    [id] => @@1@@
                    [derivedFrom] => ACcl
                    [oeValues] => Array
                        (
                            [Art] => ReplaceableTextures\CommandButtons\BTNChainLightning.blp
                            [targs1] => air,enemies,ground,neutral
                            [Rng1] => 3000
                            [Cost1] => 0
                            [DataA1] => 1500
                            [Area1] => 800
                        )

                )

        )

    [buffs] => Array
        (
            [0] => Array
                (
                    [id] => @@2@@
                    [derivedFrom] => Bpxf
                    [oeValues] => Array
                        (
                            [Bufftip] => Orbed!
                            [Buffubertip] => This unit is hit by an energy orb
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNOrbOfLightning.blp
                            [TargetArt] => Array
                                (
                                )

                        )

                )

        )

    [units] => Array
        (
        )

    [references] => Array
        (
        )

)