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

            [targs1] => Array
                (
                )

            [customTeamColor] => 1
            [goldcost] => 3000
            [weapsOn] => 1
            [dice1] => 1
            [Missilespeed] => 1800
            [impactZ] => 140
            [moveHeight] => 140
            [file] => units\other\DranaiWhite\DranaiWhite.mdl
            [dmgpt1] => 0.49
            [atkType1] => siege
            [modelScale] => 0.88
            [weapTp1] => missile
            [Missilearc] => 0.05
            [acquire] => 875
            [rangeN1] => 875
            [upgrades] => Array
                (
                )

            [cool1] => 2
            [Ubertip] => Driven by zealotry, this unit is exceptionally good in physical combat.
            [backSw1] => 0.48
            [abilList] => Array
                (
                )

            [Name] => Fanatical Zealot
            [Missileart] => Abilities\Weapons\GargoyleMissile\GargoyleMissile.mdl
            [Art] => ReplaceableTextures\CommandButtons\BTNDranaiAkama.blp
            [buildingShadow] => Array
                (
                )

            [unitSound] => Draenei
            [turnRate] => 0.7
            [sides1] => 453
            [uberSplat] => OSMA
            [auto] => Array
                (
                )

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

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

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

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => 40.0846
                    [y] => 38.1948
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 3.10669
                    [file] => Doodads\Cityscape\Props\City_Oblisk\City_Oblisk.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [1] => Array
                (
                    [x] => -40.1183
                    [y] => 48.4536
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 3.10669
                    [file] => Doodads\Cityscape\Props\City_Oblisk\City_Oblisk.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [2] => Array
                (
                    [x] => 35.6497
                    [y] => -34.5184
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 3.10669
                    [file] => Doodads\Cityscape\Props\City_Oblisk\City_Oblisk.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [3] => Array
                (
                    [x] => 0.97876
                    [y] => 1.6326
                    [z] => -12.8
                    [scale] => 1.15
                    [rot] => 3.38594
                    [file] => Doodads\Cityscape\Props\CrystalLamp\CrystalLamp.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [4] => Array
                (
                    [x] => -1.02718
                    [y] => 23.5147
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 3.10669
                    [file] => Doodads\Cityscape\Props\City_Oblisk\City_Oblisk.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [5] => Array
                (
                    [x] => -34.0226
                    [y] => -36.7946
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 3.10669
                    [file] => Doodads\Cityscape\Props\City_Oblisk\City_Oblisk.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [6] => Array
                (
                    [x] => 21.8613
                    [y] => -14.259
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 2.54818
                    [file] => Doodads\Icecrown\Rocks\Icecrown_Crystal\Icecrown_Crystal3.mdl
                    [red] => 255
                    [green] => 100
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [7] => Array
                (
                    [x] => -21.4585
                    [y] => 39.3248
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 1.39626
                    [file] => Doodads\Icecrown\Rocks\Icecrown_Crystal\Icecrown_Crystal3.mdl
                    [red] => 255
                    [green] => 100
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [8] => Array
                (
                    [x] => -24.5111
                    [y] => -10.1091
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 2.54818
                    [file] => Doodads\Icecrown\Rocks\Icecrown_Crystal\Icecrown_Crystal3.mdl
                    [red] => 255
                    [green] => 100
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [9] => Array
                (
                    [x] => -45.9317
                    [y] => 6.59911
                    [z] => 0
                    [scale] => 0.7
                    [rot] => 0.279253
                    [file] => Doodads\Cityscape\Props\CrystalLamp\CrystalLamp.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [10] => Array
                (
                    [x] => 41.3221
                    [y] => 3.09495
                    [z] => 0
                    [scale] => 0.7
                    [rot] => 0.418879
                    [file] => Doodads\Cityscape\Props\CrystalLamp\CrystalLamp.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [11] => Array
                (
                    [x] => 15.2645
                    [y] => 17.1731
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 3.10669
                    [file] => Doodads\Cityscape\Props\City_Oblisk\City_Oblisk.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [12] => Array
                (
                    [x] => -14.1413
                    [y] => 18.6659
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 3.10669
                    [file] => Doodads\Cityscape\Props\City_Oblisk\City_Oblisk.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [13] => Array
                (
                    [x] => -3.28899
                    [y] => -1.20585
                    [z] => 0
                    [scale] => 0.45
                    [rot] => 2.28638
                    [file] => Doodads\Cityscape\Props\CrystalShield\CrystalShield.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [14] => Array
                (
                    [x] => 5.33639
                    [y] => 2.08449
                    [z] => 70.4
                    [scale] => 1.95
                    [rot] => 5.41052
                    [file] => Abilities\Weapons\FarseerMissile\FarseerMissile.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 Damage
                    [code] => local Creep target = Event.getTarget()
    local Buff phaseWound = target.getBuffOfType(storm_zealot_wound) 
    local real damageBase = Event.damage
    local real totalArmorPierce
    local real temp = AttackType.PHYSICAL.getDamageAgainst(target.getArmorType()) 

    if Event.isSpellDamage() or not Event.isMainTarget() then
        return
    endif
    
    //first check+upgrade the wound level
    if phaseWound == 0 then
        set phaseWound = storm_zealot_wound.apply(tower, target, 1)
        set phaseWound.userInt = 1 //stack counter
        set phaseWound.userInt2 = tower.getUID()
    else
        if phaseWound.userInt2 != tower.getUID() then
            return
        endif
        set phaseWound.userInt = IMinBJ(5, phaseWound.userInt + 1)
        call phaseWound.refreshDuration()
    endif
        
    if temp > 0.001 and temp < 1. then //ignoring armor type "resistance" not weakness :P 
        set damageBase = damageBase / temp 
    endif 
    
    set temp = 1 - target.getCurrentArmorDamageReduction()
    
     if temp > 0.001 and temp < 1. then 
        set damageBase = damageBase / temp 
    endif 

    set totalArmorPierce = (0.08 + 0.0032*tower.getLevel()) * phaseWound.userInt
    
    if Event.damage < damageBase then 
        set Event.damage = damageBase*totalArmorPierce + Event.damage*(1.-totalArmorPierce) 
    endif
                    [values] => Array
                        (
                            [ONDAMAGE_chance] => 1.0
                            [icon] => ReplaceableTextures\CommandButtons\BTNWhirlwind.blp
                            [visible] => true
                            [name] => Phase Blade
                            [short_explain] => Each attack on the same creep increases the damage versus that creep, this effect stacks.
                            [ONDAMAGE_chanceLevelAdd] => 0.0
                            [long_explain] => Each attack on the same creep penetrates deeper through its armor. Per attack |cffFFFF808%|r of this tower's attack damage won't be reduced by armor resistances. This effect stacks up to |cffFFFF805|r times.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+0.32%|r damage per stack
                        )

                )

            [1] => Array
                (
                    [name] => Header
                    [code] => globals
        //@import
        BuffType storm_zealot_fury
        //@import 
        BuffType storm_zealot_wound
        //@import
        BuffType storm_zealot_slow
        //@import
        BuffType storm_zealot_shield
    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\BTNLightningShield.blp
                            [visible] => true
                            [name] => Lightning Shield
                            [short_explain] => Debuff durations get reduced with each stack of Zeal.
                            [long_explain] => As the zealot gets pumped up debuff durations are reduced by |cffFFFF8010%|r with each stack of Zeal.
                        )

                )

            [2] => Array
                (
                    [name] => On Attack
                    [code] => local Buff b
    local Tower u
    local Iterate it = Iterate.overUnitsInRangeOfCaster(tower, TARGET_TOWERS, 175.0)
    local integer leechCounter = 0
    local integer leechPower
    local integer maxStacks = 5 + tower.getLevel()/5
 
    loop 
        set u = it.next()
        exitwhen u == 0 
        if u != tower and u.getGoldcost() >= 1200 then
            set leechCounter = leechCounter + 1
        endif 
    endloop
    
    if leechCounter == 0 then
        return
    endif
    
    set leechPower = 420 - 20*leechCounter
 
    set it = Iterate.overUnitsInRangeOfCaster(tower, TARGET_TOWERS, 175.0)
    
    // Slows all towers in 175 range
    loop 
        set u = it.next()
        exitwhen u == 0 
        if u != tower and u.getGoldcost() >= 1200 then
            set b = u.getBuffOfType(storm_zealot_slow)
            if b != 0 then
                set b.userInt = IMinBJ(b.userInt + 1, maxStacks)
                call storm_zealot_slow.applyCustomPower(tower, u, b.userInt, leechPower*b.userInt)
            else
                set storm_zealot_slow.applyCustomPower(tower, u, 1, leechPower).userInt = 1
            endif
        endif 
    endloop

    set leechPower = leechPower * leechCounter //in a way that's the per stack base
    set b = tower.getBuffOfType(storm_zealot_fury)
    
    //now apply zeal
    if b != 0 then
        call storm_zealot_fury.apply(tower, tower, IMinBJ(leechPower + b.getLevel(), leechPower * maxStacks))
    else
        call storm_zealot_fury.apply(tower, tower, leechPower) //used normal apply so power = level
    endif
    
    set b = tower.getBuffOfType(storm_zealot_shield)
    
   if b != 0 then
        if b.userInt < maxStacks then 
            set b.userInt = b.userInt + 1 
            if b.userInt == maxStacks then
                if b.userInt2 == 0 then
                    set b.userInt2 = Effect.createScaled("Abilities\\Spells\\Human\\ManaShield\\ManaShieldCaster.mdl", tower.getX(), tower.getY(), 135, 0, 0.70) 
                    call Effect(b.userInt2).noDeathAnimation()
                endif
            endif 
        endif
        
        call storm_zealot_shield.apply(tower, tower, 1000 * b.userInt) 
    else 
        set b = storm_zealot_shield.apply(tower, tower, 1000)
        set b.userInt = 1
        set b.userInt2 = 0
    endif
                    [values] => Array
                        (
                            [icon] => ReplaceableTextures\CommandButtons\BTNControlMagic.blp
                            [visible] => true
                            [name] => Zeal
                            [short_explain] => Each attack works the Zealot into a greater frenzy, increasing his attack speed but slowing the towers around him. This effect stacks.
                            [ONATTACK_chance] => 1.0
                            [ONATTACK_chanceLevelAdd] => 0.0
                            [long_explain] => Each attack works the Zealot into a greater frenzy, increasing his attack speed by |cffFFFF804%|r from each tower in |cffFFFF80175|r range. These towers have their attack speed slowed by |cffFFFF804%|r. Both effects stack up to |cffFFFF805|r times and last |cffFFFF802.5|r seconds. The attack speed amount reduces slightly with more towers.|nOnly towers that cost |cffFFFF801200|r gold or more are affected by this.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+1|r max stack per |cffFFFF805|r levels
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
        )

    [units] => Array
        (
        )

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

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

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

            [3] => Array
                (
                    [export] => false
                    [category] => global
                    [typ] => BuffType
                    [name] => storm_zealot_shield
                )

        )

)