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

            [targs1] => Array
                (
                )

            [goldcost] => 2250
            [dice1] => 1
            [Missilespeed] => 1500
            [moveHeight] => 40
            [file] => Doodads\Outland\Props\Skull\Skull0.mdl
            [manaN] => 75
            [atkType1] => normal
            [weapTp1] => missile
            [acquire] => 1000
            [rangeN1] => 1000
            [upgrades] => Array
                (
                )

            [cool1] => 1.4
            [Ubertip] => This mystical crystal can link souls together.
            [green] => 100
            [regenMana] => 4
            [abilList] => Array
                (
                )

            [Name] => Crystal of Souls
            [Missileart] => Abilities\Weapons\GryphonRiderMissile\GryphonRiderMissile.mdl
            [Art] => ReplaceableTextures\CommandButtons\BTNUsedSoulGem.blp
            [buildingShadow] => Array
                (
                )

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

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

    [settings] => Array
        (
            [author] => Der_kleine_Tomy
            [element] => darkness
            [authorDisplay] => |c00ff0000Der_kleine_Tomy|r
            [alpha] => 255
            [balanceTip] => |cffFFFF00+2% |rbuff duration/lvl
            [rarity] => rare
            [version] => 1.0
            [abil_factor] => 0.00
        )

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => 3.75249
                    [y] => 14.1853
                    [z] => 0
                    [scale] => 0.33
                    [rot] => 6.03884
                    [file] => Doodads\Cinematic\EnergyFieldWall\EnergyFieldWall.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [1] => Array
                (
                    [x] => 0.747107
                    [y] => 5.92215
                    [z] => 0
                    [scale] => 0.33
                    [rot] => 0.942478
                    [file] => Doodads\Cinematic\EnergyFieldWall\EnergyFieldWall.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [2] => Array
                (
                    [x] => 1.00831
                    [y] => 5.6862
                    [z] => 0
                    [scale] => 1.2
                    [rot] => 3.80482
                    [file] => Abilities\Spells\Other\HowlOfTerror\HowlTarget.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [3] => Array
                (
                    [x] => -40.5786
                    [y] => -7.78414
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 3.9619
                    [file] => Doodads\Outland\Props\Skull\Skull1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [4] => Array
                (
                    [x] => 16.4948
                    [y] => -16.0205
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 2.6529
                    [file] => Doodads\Outland\Props\Skull\Skull1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [5] => Array
                (
                    [x] => 43.0101
                    [y] => 29.0634
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 5.09636
                    [file] => Doodads\Outland\Props\Skull\Skull1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [6] => Array
                (
                    [x] => 0.0000191686
                    [y] => 52.9249
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 2.9147
                    [file] => Doodads\Outland\Props\Skull\Skull1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [7] => Array
                (
                    [x] => -33.0286
                    [y] => 37.6763
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 1.43117
                    [file] => Doodads\Outland\Props\Skull\Skull1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [8] => Array
                (
                    [x] => -2.67754
                    [y] => -16.4937
                    [z] => 0
                    [scale] => 0.4
                    [rot] => 3.12414
                    [file] => Doodads\Icecrown\Rocks\Icecrown_Crystal\Icecrown_Crystal0.mdl
                    [red] => 255
                    [green] => 1
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [9] => Array
                (
                    [x] => -0.846712
                    [y] => 0.483832
                    [z] => 0
                    [scale] => 0.8
                    [rot] => 0.959931
                    [file] => Doodads\BlackCitadel\Props\RuneArt\RuneArt2.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

        )

    [dmgTable] => Array
        (
            [0] => Array
                (
                    [id] => MOD_BUFF_DURATION
                    [base] => 0
                    [add] => 0.02
                )

        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => On Tower Creation
                    [code] => set tower.userInt = 0 // Linked List (points to the first buff)
    set tower.userReal = 0.15
    set tower.userReal2 = 0.004
                    [values] => Array
                        (
                            [icon] => 
                            [visible] => false
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

            [1] => Array
                (
                    [name] => Header
                    [code] => globals
        //@import
        BuffType tomy_SoulLink
    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
                        (
                            [icon] => ReplaceableTextures\CommandButtons\BTNBanish.blp
                            [visible] => true
                            [name] => Soul Consumption
                            [short_explain] => Consumes the souls of enemies to increase the tower's experience.
                            [long_explain] => Whenever a unit under the effect of Soul Link dies, the Crystal of Souls consumes its soul granting |cffFFFF801|r experience to the tower.
                        )

                )

            [2] => Array
                (
                    [name] => Autocast
                    [code] => local Unit target = Event.getTarget()
    local integer level = tower.getLevel()
    local integer counter = 1
    local integer maxTargets = 3
    local Iterate iterator
    local Unit next
    local lightning array effects
    
    if level == 25 then
        set maxTargets = maxTargets + 2
    elseif level >= 15 then
        set maxTargets = maxTargets + 1
    endif
    
    set effects[0] = AddLightningEx("DRAL", false, tower.getX(), tower.getY(), tower.getZ(), target.getX(), target.getY(), target.getZ())
    if target.getBuffOfType(tomy_SoulLink) == 0 then
        call tomy_SoulLink.apply(tower, target, level)
    endif
    
    loop
        exitwhen counter == maxTargets
        set iterator = Iterate.overUnitsInRangeOfUnit(tower, TARGET_CREEPS, target, 700.0 )
        loop
            set next = iterator.next()
            exitwhen next == 0 or next.getBuffOfType(tomy_SoulLink) == 0
        endloop
        
        exitwhen next == 0
        
        if next != 0 then
            call iterator.destroy()
        endif
        
        call tomy_SoulLink.apply(tower, next, level)
        set effects[counter] = AddLightningEx("DRAL", false, GetUnitX(next.getUnit()), GetUnitY(next.getUnit()), GetUnitFlyHeight(next.getUnit()), GetUnitX(target.getUnit()), GetUnitY(target.getUnit()), GetUnitFlyHeight(target.getUnit()))
        set target = next
        set counter = counter + 1
    endloop
    
    call TriggerSleepAction(0.20)
    loop
        set counter = counter - 1
        exitwhen counter == -1
        call DestroyLightning(effects[counter])
        set effects[counter] = null // Not sure if this is needed
    endloop
                    [values] => Array
                        (
                            [caster_art] => 
                            [icon] => ReplaceableTextures\CommandButtons\BTNManaDrain.blp
                            [AUTOCAST_cooldown] => 4.0
                            [AUTOCAST_numBuffsBeforeIdle] => 1
                            [AUTOCAST_isExtended] => false
                            [long_explain] => Links |cffFFFF803|r enemies' souls together for |cffFFFF802.5|r seconds. If a linked unit takes damage all other linked units will take |cffFFFF8015%|r of this damage. This tower does not benefit from damage increasing items or oils.|n|n|cffFF8000Level Bonus:|r|n+|cffFFFF800.4%|r damage|n+|cffFFFF801|r target at level |cffFFFF8015|r and |cffFFFF8025|r
                            [AUTOCAST_autocastType] => AC_TYPE_ALWAYS_BUFF
                            [AUTOCAST_manacost] => 50
                            [AUTOCAST_range] => 1000.0
                            [AUTOCAST_buffType] => tomy_SoulLink
                            [name] => Soul Link
                            [AUTOCAST_targetSelf] => false
                            [short_explain] => Links enemies' souls together.
                            [AUTOCAST_targetType] => TARGET_TYPE_CREEPS
                            [target_art] => 
                            [AUTOCAST_autoRange] => 1000.0
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
        )

    [units] => Array
        (
        )

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

        )

)