Array
(
    [scriptVersion] => 8
    [oeValues] => Array
        (
            [auto] => Array
                (
                )

            [Art] => ReplaceableTextures\CommandButtons\BTNBanditMage.blp
            [turnRate] => 3
            [dmgplus1] => 416
            [bldtm] => 1
            [goldcost] => 2500
            [sides1] => 1
            [manaN] => 100
            [acquire] => 900
            [upgrades] => Array
                (
                )

            [Upgrade] => Array
                (
                )

            [Name] => Ascended Elementalist
            [weapTp1] => missile
            [MissileHoming] => 1
            [file] => units\creeps\HumanMage\HumanMage.mdl
            [uberSplat] => YTDG
            [Missilespeed] => 3000
            [dice1] => 1
            [RngBuff1] => 250
            [regenMana] => 1
            [modelScale] => 0.7
            [rangeN1] => 900
            [atkType1] => magic
            [cool1] => 2
            [Ubertip] => Let all who live stand in awe of him.
            [abilList] => Array
                (
                )

            [moveHeight] => 20
            [buildingShadow] => Array
                (
                )

            [targs1] => Array
                (
                )

            [weapsOn] => 1
        )

    [settings] => Array
        (
            [balanceTip] => Array
                (
                )

            [abil_factor] => 0.075
            [author] => Kel-Thuzad, Moppy
            [alpha] => 255
            [authorDisplay] => |cFFFFA500Kel-Thuzad|r, |c006969FFMoppy|r
            [version] => 1.0
            [element] => arcane
            [rarity] => uncommon
        )

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => 40.8932
                    [y] => 39.2735
                    [z] => 0
                    [scale] => 0.16
                    [rot] => 0.785398
                    [file] => doodads\cinematic\IcecrownObelisk\IcecrownObelisk.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => alternate
                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [1] => Array
                (
                    [x] => -37.4957
                    [y] => -42.4177
                    [z] => 0
                    [scale] => 0.16
                    [rot] => 0.785398
                    [file] => doodads\cinematic\IcecrownObelisk\IcecrownObelisk.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => alternate
                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [2] => Array
                (
                    [x] => -46.8114
                    [y] => -53.2083
                    [z] => 0
                    [scale] => 0.35
                    [rot] => 3.14159
                    [file] => Doodads\Outland\Rocks\RubbleRock\RubbleRock0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [3] => Array
                (
                    [x] => -31.0011
                    [y] => -41.1009
                    [z] => 0
                    [scale] => 0.35
                    [rot] => 0.000000476837
                    [file] => Doodads\Outland\Rocks\RubbleRock\RubbleRock0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [4] => Array
                (
                    [x] => 40.6107
                    [y] => 39.3482
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 4.71239
                    [file] => Doodads\Icecrown\Water\IceEdge\IceEdge2.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [5] => Array
                (
                    [x] => 22.1938
                    [y] => 51.6925
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 0.349066
                    [file] => Doodads\Icecrown\Rocks\IceBlock\IceBlock0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [6] => Array
                (
                    [x] => 29.9318
                    [y] => 30.1503
                    [z] => 0
                    [scale] => 0.2
                    [rot] => 0.349066
                    [file] => Doodads\Icecrown\Rocks\IceBlock\IceBlock0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [7] => Array
                (
                    [x] => -38.1054
                    [y] => -41.6838
                    [z] => 76.8
                    [scale] => 0.5
                    [rot] => 1.5708
                    [file] => Abilities\Spells\Items\AIfb\AIfbTarget.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [8] => Array
                (
                    [x] => 39.3493
                    [y] => 50.5483
                    [z] => 0
                    [scale] => 0.35
                    [rot] => 3.49066
                    [file] => Doodads\Icecrown\Rocks\IceBlock\IceBlock0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [9] => Array
                (
                    [x] => 41.0848
                    [y] => 35.6175
                    [z] => 76.8
                    [scale] => 0.5
                    [rot] => 1.5708
                    [file] => Abilities\Spells\Items\AIob\AIobTarget.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [10] => Array
                (
                    [x] => 43.047
                    [y] => -42.3661
                    [z] => 0
                    [scale] => 0.16
                    [rot] => 0.785398
                    [file] => doodads\cinematic\IcecrownObelisk\IcecrownObelisk.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => alternate
                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [11] => Array
                (
                    [x] => 42.6276
                    [y] => -41.804
                    [z] => 0
                    [scale] => 0.175
                    [rot] => 5.49779
                    [file] => Doodads\Barrens\Rocks\Crator\Crator0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [12] => Array
                (
                    [x] => 42.78
                    [y] => -44.1739
                    [z] => 83.2
                    [scale] => 0.25
                    [rot] => 1.5708
                    [file] => Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [13] => Array
                (
                    [x] => -36.845
                    [y] => 34.6375
                    [z] => 0
                    [scale] => 0.16
                    [rot] => 0.785398
                    [file] => doodads\cinematic\IcecrownObelisk\IcecrownObelisk.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => alternate
                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [14] => Array
                (
                    [x] => -36.2871
                    [y] => 33.6925
                    [z] => 0
                    [scale] => 0.275
                    [rot] => 1.5708
                    [file] => Abilities\Spells\Other\Tornado\TornadoElementalSmall.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => alternate
                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [15] => Array
                (
                    [x] => -36.7975
                    [y] => 34.3302
                    [z] => 76.8
                    [scale] => 0.5
                    [rot] => 1.5708
                    [file] => Abilities\Spells\Items\AIlb\AIlbTarget.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [16] => Array
                (
                    [x] => -0.138886
                    [y] => 1.56715
                    [z] => -38.4
                    [scale] => 0.45
                    [rot] => 0.471239
                    [file] => Doodads\Cityscape\Props\FountainRuined\FountainRuined.mdl
                    [red] => 30
                    [green] => 45
                    [blue] => 65
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [17] => Array
                (
                    [x] => 0.368957
                    [y] => -0.188897
                    [z] => -57.6
                    [scale] => 0.525
                    [rot] => 0.471239
                    [file] => Doodads\Cityscape\Props\FountainRuined\FountainRuined.mdl
                    [red] => 30
                    [green] => 45
                    [blue] => 65
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

        )

    [dmgTable] => Array
        (
        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => On Attack
                    [code] => local integer randomSpellID=GetRandomInt(1,10) //RandomSpell
    local Creep c = Event.getTarget()
    local Unit u
    local integer count = 0 //counter for lightnings
    local Iterate it
    if randomSpellID<4 then //FireBlast 
        if tower.userInt2 == 1 then 
            set tower.userInt = tower.userInt + 1 
        else
            set tower.userInt = 1
            set tower.userInt2 = 1
        endif
        call SFXAtUnit("Abilities\\Spells\\Other\\Incinerate\\FireLordDeathExplode.mdl",c.getUnit()) //BANG!!
        call tower.doSpellDamageAoEUnit(c,300,(3000+tower.getLevel()*60)*(1+((0.5+tower.getLevel()*0.01)*(tower.userInt-1))),tower.calcSpellCritNoBonus(),0)
    elseif randomSpellID<7 then //Aftershock
        if tower.userInt2 == 2 then 
            set tower.userInt = tower.userInt + 1 
        else
            set tower.userInt = 1
            set tower.userInt2 = 2
        endif
        call SFXAtUnit("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl",c.getUnit()) //just a pretty SFX
        call cb_stun.applyOnlyTimed(tower,c,0.7+tower.getLevel()*0.02 )
        call tower.doSpellDamage(c,6000*(1+((0.5+tower.getLevel()*0.01)*(tower.userInt-1))),tower.calcSpellCritNoBonus())
    elseif randomSpellID<9 then //FrostNova
        if tower.userInt2 == 3 then 
            set tower.userInt = tower.userInt + 1 
        else
            set tower.userInt = 1
            set tower.userInt2 = 3
        endif
        set it = Iterate.overUnitsInRangeOfUnit(tower,TARGET_CREEPS,c,300)
        loop //slow
            set u = it.next()
            exitwhen u == 0 
            call KelSlow.applyCustomTimed(tower,u,150,4) //slow
        endloop
        call SFXAtUnit("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",c.getUnit()) //sfx
        call SFXAtUnit("Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathMissile.mdl",c.getUnit()) //sfx
        call tower.doSpellDamageAoEUnit(c,300,(2000+tower.getLevel()*80)*(1+((0.5+tower.getLevel()*0.01)*(tower.userInt-1))),tower.calcSpellCritNoBonus(),0)
    else //Lightning Burst
        if tower.userInt2 == 4 then 
            set tower.userInt = tower.userInt + 1 
        else
            set tower.userInt = 1
            set tower.userInt2 = 4
        endif
        set it = Iterate.overUnitsInRangeOfCaster(tower,TARGET_CREEPS,900)
        loop //SFX+lightnings
            set u = it.next()
            set count = count+1
            exitwhen count == 7 or u == 0 //"count" is number of lightnings to create
            call SFXAtUnit("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",u.getUnit()) //SFX+sound on unit
            call tower.doSpellDamage(u,(3000+tower.getLevel()*60)*(1+((0.5+tower.getLevel()*0.01)*(tower.userInt-1))),tower.calcSpellCritNoBonus()) //damage
            call Lightning.createFromUnitToUnit("CLPB", tower, u).setLifetime(0.15) //lightning itself
        endloop
        if u != 0 then
            call it.destroy()
        endif
    endif
                    [values] => Array
                        (
                            [visible] => true
                            [icon] => ReplaceableTextures\CommandButtons\BTNDizzy.blp
                            [name] => Elemental Chaos
                            [short_explain] => Casts a random spell on attack
                            [ONATTACK_chance] => 1.0
                            [ONATTACK_chanceLevelAdd] => 0.0
                            [long_explain] => Casts one of the following spells on attack: |n|n|cffFF8000Fire Blast:|r |cffFFFF8030%|r chance, |cffFFFF80300|r AoE, |cffFFFF803000|r damage|n|cffFF8000Frost Nova:|r |cffFFFF8020%|r chance, |cffFFFF80300|r AoE, |cffFFFF802000|r damage, |cffFFFF8015%|r slow for |cffFFFF804|r seconds|n|cffFF8000Aftershock:|r |cffFFFF8030%|r chance, |cffFFFF806000|r damage, |cffFFFF800.7|r seconds stun|n|cffFF8000Lightning Burst:|r |cffFFFF8020%|r chance, |cffFFFF803000|r damage, affects |cffFFFF806|r random targets in |cffFFFF80900|r range |n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+60|r damage (Fire Blast)|n|cffFFFF80+80|r damage (Frost Nova)|n|cffFFFF80+0.02|r seconds stun (Aftershock)|n|cffFFFF80+60|r damage (Lightning Burst)
                        )

                )

            [1] => Array
                (
                    [name] => Header
                    [code] => globals
        //@import
        BuffType KelSlow
    endglobals
    
    //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
	endfunction
                    [values] => Array
                        (
                            [visible] => true
                            [icon] => ReplaceableTextures\CommandButtons\BTNSpiritLink.blp
                            [name] => Elemental Fury
                            [short_explain] => Consecutive casts of the same spell will deal more damage
                            [long_explain] => Consecutive casts of the same spell will deal |cffFFFF8050%|r more damage.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+1%|r damage
                        )

                )

            [2] => Array
                (
                    [name] => On Tower Creation
                    [code] => set tower.userInt=0 //Stores how many consecutive times last spell was cast
    set tower.userInt2=0 //Stores which spell was last cast
                    [values] => Array
                        (
                            [visible] => false
                            [icon] => 
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
        )

    [units] => Array
        (
        )

    [references] => Array
        (
            [0] => Array
                (
                    [export] => false
                    [category] => global
                    [typ] => BuffType
                    [name] => KelSlow
                )

        )

    [lightning] => Array
        (
        )

)