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

            [targs1] => Array
                (
                )

            [goldcost] => 3200
            [weapsOn] => 1
            [dice1] => 1
            [Missilespeed] => 1000
            [moveHeight] => 75
            [file] => Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
            [atkType1] => normal
            [weapTp1] => missile
            [acquire] => 950
            [rangeN1] => 950
            [upgrades] => Array
                (
                )

            [cool1] => 2
            [Ubertip] => A field which is able to gather energy from spells.
            [abilList] => @@0@@
            [launchZ] => 0
            [Name] => Spell Harvester
            [Missileart] => Abilities\Weapons\VoidWalkerMissile\VoidWalkerMissile.mdl
            [Art] => ReplaceableTextures\CommandButtons\BTNNagaWeaponUp1.blp
            [buildingShadow] => Array
                (
                )

            [turnRate] => 0.5
            [sides1] => 1
            [auto] => Array
                (
                )

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

    [settings] => Array
        (
            [author] => cedi
            [element] => storm
            [authorDisplay] => DreamStrider
            [alpha] => 255
            [balanceTip] => Array
                (
                )

            [rarity] => rare
            [version] => 1.0
            [abil_factor] => 0.3
        )

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => -34.3696
                    [y] => 2.64808
                    [z] => 0
                    [scale] => 0.1
                    [rot] => 3.92699
                    [file] => Doodads\Cityscape\Structures\Archway45\Archway45.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [1] => Array
                (
                    [x] => -24.7025
                    [y] => 27.5736
                    [z] => 0
                    [scale] => 0.1
                    [rot] => 3.14159
                    [file] => Doodads\Cityscape\Structures\Archway45\Archway45.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [2] => Array
                (
                    [x] => 1.4721
                    [y] => -33.5159
                    [z] => 0
                    [scale] => 0.1
                    [rot] => 5.49779
                    [file] => Doodads\Cityscape\Structures\Archway45\Archway45.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [3] => Array
                (
                    [x] => 36.5401
                    [y] => 2.36485
                    [z] => 0
                    [scale] => 0.1
                    [rot] => 3.92699
                    [file] => Doodads\Cityscape\Structures\Archway45\Archway45.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [4] => Array
                (
                    [x] => 2.04719
                    [y] => 38.2214
                    [z] => 0
                    [scale] => 0.1
                    [rot] => 5.49779
                    [file] => Doodads\Cityscape\Structures\Archway45\Archway45.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [5] => Array
                (
                    [x] => 24.9182
                    [y] => -23.2284
                    [z] => 0
                    [scale] => 0.1
                    [rot] => 3.14159
                    [file] => Doodads\Cityscape\Structures\Archway45\Archway45.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [6] => Array
                (
                    [x] => 25.9673
                    [y] => 27.3551
                    [z] => 0
                    [scale] => 0.1
                    [rot] => 1.5708
                    [file] => Doodads\Cityscape\Structures\Archway45\Archway45.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [7] => Array
                (
                    [x] => -24.9893
                    [y] => -24.2168
                    [z] => 0
                    [scale] => 0.1
                    [rot] => 4.71239
                    [file] => Doodads\Cityscape\Structures\Archway45\Archway45.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [8] => Array
                (
                    [x] => 36.4714
                    [y] => 2.81361
                    [z] => 32
                    [scale] => 0.1
                    [rot] => 3.92699
                    [file] => Doodads\Cityscape\Structures\Archway45\Archway45.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [9] => Array
                (
                    [x] => 1.97855
                    [y] => 38.6702
                    [z] => 32
                    [scale] => 0.1
                    [rot] => 5.49779
                    [file] => Doodads\Cityscape\Structures\Archway45\Archway45.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [10] => Array
                (
                    [x] => 1.40346
                    [y] => -33.0671
                    [z] => 32
                    [scale] => 0.1
                    [rot] => 5.49779
                    [file] => Doodads\Cityscape\Structures\Archway45\Archway45.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [11] => Array
                (
                    [x] => -34.4382
                    [y] => 3.09684
                    [z] => 32
                    [scale] => 0.1
                    [rot] => 3.92699
                    [file] => Doodads\Cityscape\Structures\Archway45\Archway45.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [12] => Array
                (
                    [x] => -24.7711
                    [y] => 28.0224
                    [z] => 32
                    [scale] => 0.1
                    [rot] => 3.14159
                    [file] => Doodads\Cityscape\Structures\Archway45\Archway45.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [13] => Array
                (
                    [x] => 24.8495
                    [y] => -22.7797
                    [z] => 32
                    [scale] => 0.1
                    [rot] => 3.14159
                    [file] => Doodads\Cityscape\Structures\Archway45\Archway45.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [14] => Array
                (
                    [x] => 25.8986
                    [y] => 27.8039
                    [z] => 32
                    [scale] => 0.1
                    [rot] => 1.5708
                    [file] => Doodads\Cityscape\Structures\Archway45\Archway45.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [15] => Array
                (
                    [x] => -25.0579
                    [y] => -23.7681
                    [z] => 32
                    [scale] => 0.1
                    [rot] => 4.71239
                    [file] => Doodads\Cityscape\Structures\Archway45\Archway45.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 = 2 //second member
                    [values] => Array
                        (
                            [icon] => 
                            [visible] => false
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

            [1] => Array
                (
                    [name] => On Tower Details
                    [code] => local Buff B = tower.getBuffOfType(cedi_spellInc)
    local integer lvl = 0
    if B != 0 then
        set lvl = IMinBJ(B.getLevel() + 1,20+tower.getLevel()/5*2)
    endif
    call cedi_spellCollectorMBValues.setValue(0, I2S(lvl))
    return cedi_spellCollectorMBValues
                    [values] => Array
                        (
                            [0] => Array
                                (
                                    [_value] => 0
                                    [typ] => string
                                )

                        )

                )

            [2] => Array
                (
                    [name] => Header
                    [code] => globals
        //@import
        ProjectileType cedi_spellCPT
        //@import
        BuffType cedi_spellGathering
        //@import
        BuffType cedi_spellInc
        //@import
        MultiboardValues cedi_spellCollectorMBValues
    endglobals
    
    function Launch takes nothing returns nothing
        local timer t = GetExpiredTimer()
        local Tower tower = GetTimerData( t )
        local real chance = 0.075 + 0.003 * tower.getLevel()
        local real crit = 0.15 + 0.006 * tower.getLevel()
        local Projectile P
        local Unit T = tower.userInt3
        
        if T == 0 then
            call ReleaseTimer( t )
            set t = null
            return
        endif
        
        if tower.userInt2 >= tower.userReal then
            call ReleaseTimer( t )
            set t = null
            return
        endif
        
        set P = Projectile.createBezierInterpolationFromUnitToUnit( cedi_spellCPT, tower, 1.0, tower.calcSpellCritNoBonus(), tower, T, GetRandomReal( 0.25, 0.45 ), GetRandomReal( -0.3, 0.3 ), 0.0, true )
        set P.userReal = chance * tower.userInt2
        set P.userReal2 = crit * tower.userInt2
        set P.z = 75.0
        
        set tower.userInt2 = tower.userInt2 + 1
        
        set t = null
    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
	endfunction
                    [values] => Array
                        (
                            [icon] => 
                            [visible] => false
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

            [3] => Array
                (
                    [name] => On Attack
                    [code] => //local real chance = 0.075 + 0.003 * tower.getLevel()
    //local real crit = 0.15 + 0.006 * tower.getLevel()
    //local integer i = 0
    local Buff B = tower.getBuffOfType( cedi_spellInc )
    local integer max = 1
    //local Projectile P
    local Unit T = Event.getTarget()
    local real r
    local timer t = NewTimer()
    
    if B != 0 then
        set max = IMinBJ(B.getLevel() + 1,20+tower.getLevel()/5*2)
    endif
    
    set r = tower.getCurrentAttackspeed() / max
    
    if r > 0.2 then
        set r = 0.2
    endif
    
    set tower.userReal = max
    set tower.userInt2 = 0 //i
    set tower.userInt3 = T 
    
    call SetTimerData( t, tower )
    call TimerStart( t, r, true, function Launch )
    
    //loop
    //    exitwhen i >= max
    //    exitwhen T == 0
    //    set P = Projectile.createFromUnitToUnit( cedi_spellCPT, tower, 1.0, tower.calcSpellCritNoBonus(), tower, T, true, false, false )
    //    set P.userReal = chance * i
    //    set P.userReal2 = crit * i
    //    set P.z = 50.0
    //    set i = i + 1
    //    call TriggerSleepAction( 0.1 )
    //endloop
                    [values] => Array
                        (
                            [icon] => ReplaceableTextures\CommandButtons\BTNControlMagic.blp
                            [visible] => true
                            [name] => Magical Barrage
                            [short_explain] => Whenever this tower attacks it has a chance to launch some magical missiles. The missiles deal spell damage with increased spell crit chance and damage for each consecutive missile.
                            [ONATTACK_chance] => 0.2
                            [ONATTACK_chanceLevelAdd] => 0.008
                            [long_explain] => Whenever this tower attacks it has a |cffFFFF8020%|r chance to launch a magical missile. Whenever a tower in |cffFFFF80650|r range casts a spell, the amount of missiles on attack is increased by |cffFFFF801|r for a duration equal to the casting tower's ability's cooldown. The Spell Harvester can shoot up to |cffFFFF8020|r missiles per attack. Each missile deals |cffFFFF804000|r spell damage. Each additional missile has |cffFFFF807.5%|r higher crit chance and |cffFFFF8015%|r higher crit damage than the previous one.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+0.8%|r chance|n|cffFFFF80+160|r spell damage|n|cffFFFF80+0.3%|r spell crit chance|n|cffFFFF80+0.6%|r spell crit damage|n|cffFFFF80+2|r max missiles every |cffFFFF805|r levels
                        )

                )

            [4] => Array
                (
                    [name] => Tower Aura
                    [code] => Array
                        (
                        )

                    [values] => Array
                        (
                            [icon] => 
                            [visible] => false
                            [AURA_auraEffect] => cedi_spellGathering
                            [AURA_power] => 0
                            [long_explain] => 
                            [AURA_level] => 0
                            [AURA_auraRange] => 650.0
                            [AURA_targetType] => TARGET_TYPE_TOWERS
                            [AURA_levelAdd] => 2
                            [AURA_powerAdd] => 2
                            [name] => Magical Barrage
                            [AURA_targetSelf] => true
                            [short_explain] => 
                        )

                )

        )

    [abilities] => Array
        (
            [0] => Array
                (
                    [id] => @@0@@
                    [derivedFrom] => Alit
                    [oeValues] => Array
                        (
                            [Art] => Array
                                (
                                )

                            [targs1] => ground,enemies,air
                            [Unubertip] => -HIDE-
                        )

                )

        )

    [buffs] => Array
        (
        )

    [units] => Array
        (
        )

    [references] => Array
        (
            [0] => Array
                (
                    [export] => false
                    [category] => global
                    [typ] => ProjectileType
                    [name] => cedi_spellCPT
                )

            [1] => Array
                (
                    [export] => false
                    [category] => global
                    [typ] => BuffType
                    [name] => cedi_spellGathering
                )

            [2] => Array
                (
                    [export] => false
                    [category] => global
                    [typ] => BuffType
                    [name] => cedi_spellInc
                )

            [3] => Array
                (
                    [export] => false
                    [category] => global
                    [typ] => MultiboardValues
                    [name] => cedi_spellCollectorMBValues
                )

        )

)