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

            [targs1] => Array
                (
                )

            [goldcost] => 3000
            [weapsOn] => 1
            [dice1] => 1
            [Missilespeed] => 1500
            [file] => buildings\nightelf\AltarOfElders\AltarOfElders.mdl
            [atkType1] => chaos
            [modelScale] => 0.4
            [weapTp1] => missile
            [Missilearc] => 0.25
            [acquire] => 875
            [rangeN1] => 875
            [upgrades] => Array
                (
                )

            [cool1] => 2.5
            [Ubertip] => This sacred altar can control the growth of plants.
            [abilList] => Array
                (
                )

            [launchZ] => 40
            [Name] => Sacred Altar
            [Missileart] => Abilities\Weapons\ProcMissile\ProcMissile.mdl
            [Art] => ReplaceableTextures\CommandButtons\BTNAltarOfElders.blp
            [buildingShadow] => Array
                (
                )

            [sides1] => 1
            [uberSplat] => ESMB
            [auto] => Array
                (
                )

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

    [settings] => Array
        (
            [author] => Boekie
            [element] => nature
            [authorDisplay] => |cff00CD00Boekie|r
            [alpha] => 255
            [balanceTip] => Array
                (
                )

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

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => 13.5494
                    [y] => -19.7138
                    [z] => 0
                    [scale] => 0.7
                    [rot] => 5.18363
                    [file] => Doodads\Ruins\Plants\Ruins_Flower\Ruins_Flower4.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [1] => Array
                (
                    [x] => -33.8217
                    [y] => 5.69916
                    [z] => 0
                    [scale] => 0.7
                    [rot] => 2.80998
                    [file] => Doodads\Ruins\Plants\Ruins_Flower\Ruins_Flower4.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [2] => Array
                (
                    [x] => -10.7041
                    [y] => -52.4342
                    [z] => 0
                    [scale] => 0.7
                    [rot] => 5.47779
                    [file] => Doodads\Ruins\Plants\Ruins_Flower\Ruins_Flower4.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [3] => Array
                (
                    [x] => 40.9395
                    [y] => -9.4331
                    [z] => 0
                    [scale] => 0.7
                    [rot] => 0.139626
                    [file] => Doodads\Ruins\Plants\Ruins_Flower\Ruins_Flower4.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [4] => Array
                (
                    [x] => -44.5071
                    [y] => -40.3063
                    [z] => 0
                    [scale] => 0.7
                    [rot] => 3.26377
                    [file] => Doodads\Ruins\Plants\Ruins_Flower\Ruins_Flower4.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [5] => Array
                (
                    [x] => -54.4315
                    [y] => -15.6776
                    [z] => 0.000000953674
                    [scale] => 0.7
                    [rot] => 5.77704
                    [file] => Doodads\Ruins\Plants\Ruins_Flower\Ruins_Flower4.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [6] => Array
                (
                    [x] => -17.1958
                    [y] => 43.1397
                    [z] => 0
                    [scale] => 0.7
                    [rot] => 3.87463
                    [file] => Doodads\Ruins\Plants\Ruins_Flower\Ruins_Flower4.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [7] => Array
                (
                    [x] => -35.93
                    [y] => -27.2915
                    [z] => -19.2
                    [scale] => 0.7
                    [rot] => 5.65487
                    [file] => Doodads\Ruins\Plants\Ruins_Flower\Ruins_Flower0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [8] => Array
                (
                    [x] => 44.5946
                    [y] => 15.9032
                    [z] => 0
                    [scale] => 0.7
                    [rot] => 4.31096
                    [file] => Doodads\Ruins\Plants\Ruins_Flower\Ruins_Flower0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [9] => Array
                (
                    [x] => -38.4225
                    [y] => 27.4951
                    [z] => -19.2
                    [scale] => 0.7
                    [rot] => 5.93412
                    [file] => Doodads\Ruins\Plants\Ruins_Flower\Ruins_Flower0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [10] => Array
                (
                    [x] => 0.0000212193
                    [y] => -47.5877
                    [z] => 0
                    [scale] => 0.27
                    [rot] => 0.820305
                    [file] => Doodads\Ashenvale\Props\AshenLogAngled\AshenLogAngled.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [11] => Array
                (
                    [x] => -24.703
                    [y] => -52.4151
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 2.51327
                    [file] => Doodads\Ashenvale\Plants\AshenShrooms\AshenShrooms1.mdl
                    [red] => 250
                    [green] => 150
                    [blue] => 1
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [12] => Array
                (
                    [x] => 7.181
                    [y] => -59.6158
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 2.3911
                    [file] => Doodads\Ashenvale\Plants\AshenShrooms\AshenShrooms1.mdl
                    [red] => 250
                    [green] => 150
                    [blue] => 1
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [13] => Array
                (
                    [x] => 25.6609
                    [y] => -50.4189
                    [z] => 19.2
                    [scale] => 0.3
                    [rot] => 1.8326
                    [file] => Doodads\Ashenvale\Plants\AshenShrooms\AshenShrooms1.mdl
                    [red] => 250
                    [green] => 150
                    [blue] => 1
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [14] => Array
                (
                    [x] => -49.7466
                    [y] => -3.21016
                    [z] => 44.8
                    [scale] => 0.3
                    [rot] => 4.95236
                    [file] => Doodads\Outland\Plants\Outland_Plant\Outland_Plant4.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [15] => Array
                (
                    [x] => 50.1877
                    [y] => -18.1655
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 0.401426
                    [file] => Doodads\Outland\Plants\Outland_Plant\Outland_Plant4.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [16] => Array
                (
                    [x] => -11.4432
                    [y] => -29.2918
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 5.63741
                    [file] => Doodads\Outland\Plants\Outland_Plant\Outland_Plant4.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [17] => Array
                (
                    [x] => 9.52379
                    [y] => 40.6541
                    [z] => 0
                    [scale] => 0.2
                    [rot] => 3.49562
                    [file] => Doodads\Ruins\Plants\RuinsTreeDoodad\RuinsTreeDoodad3.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [18] => Array
                (
                    [x] => -21.8903
                    [y] => 42.7062
                    [z] => -12.8
                    [scale] => 0.2
                    [rot] => 1.43117
                    [file] => Doodads\Ruins\Plants\RuinsTreeDoodad\RuinsTreeDoodad3.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [19] => Array
                (
                    [x] => 27.8994
                    [y] => 35.7695
                    [z] => -6.4
                    [scale] => 0.2
                    [rot] => 1.39626
                    [file] => Doodads\Ruins\Plants\RuinsTreeDoodad\RuinsTreeDoodad3.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [20] => Array
                (
                    [x] => 4.58943
                    [y] => 10.8387
                    [z] => 32
                    [scale] => 0.7
                    [rot] => 5.5676
                    [file] => Abilities\Spells\NightElf\FaerieFire\FaerieFireTarget.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

        )

    [dmgTable] => Array
        (
        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => Header
                    [code] => globals
    BuffType boekie_entangle_buff
    BuffType boekie_entangle_aura 
    endglobals
    
    function entangle takes Buff b returns nothing  
        local Tower  caster = b.getCaster()  
        local Tower  tower = b.getBuffedUnit() 
        local Creep target = Event.getTarget()
        
        if caster.calcChance((0.10+(0.002*caster.getLevel()))*tower.getBaseAttackspeed()) then 
            if target.getSize() < SIZE_BOSS and target.getSize() != SIZE_AIR then
                call boekie_entangle_buff.apply(caster, target, caster.getLevel()) 
            endif
        endif       
    endfunction 
    
    function entangleDamage takes Buff b returns nothing  
        local Tower t = b.getCaster()  
        local Creep c = b.getBuffedUnit()
        call t.doSpellDamage(c, 700 + 35 * b.getLevel(), t.calcSpellCritNoBonus())
    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 boekie_entangle_buff = BuffType.createDuplicate(cb_stun, 1.2, 0, false)
        call boekie_entangle_buff.setBuffIcon('@@0@@') 
        call boekie_entangle_buff.addPeriodicEvent(entangleDamage, 1.0)
        set boekie_entangle_aura = BuffType.createAuraEffectType(true)
        call boekie_entangle_aura.setStackingGroup("entangle_aura")
        call boekie_entangle_aura.setBuffIcon('@@1@@') 
        call boekie_entangle_aura.addEventOnAttack(entangle,  1.0, 0.0) 
	endfunction
                    [values] => Array
                        (
                            [icon] => 
                            [visible] => false
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

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

                    [values] => Array
                        (
                            [icon] => ReplaceableTextures\CommandButtons\BTNRejuvenation.blp
                            [visible] => true
                            [AURA_auraEffect] => boekie_entangle_aura
                            [AURA_power] => 0
                            [AURA_level] => 0
                            [long_explain] => All towers in |cffFFFF80175|r range will receive a gift of nature. When a gifted tower attacks a creep there is a |cffFFFF8010%|r attackspeed adjusted chance to entangle that creep for |cffFFFF801.2|r seconds, dealing |cffFFFF80700|r damage per second. Does not work on air units or bosses!|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+0.2|r% chance |n|cffFFFF80+35|r additional damage
                            [AURA_auraRange] => 175
                            [AURA_targetType] => TARGET_TYPE_TOWERS
                            [AURA_levelAdd] => 1
                            [AURA_powerAdd] => 1
                            [name] => Gift of Nature
                            [AURA_targetSelf] => true
                            [short_explain] => Grants nearby allied towers the power of nature.
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
            [0] => Array
                (
                    [id] => @@0@@
                    [derivedFrom] => BEer
                    [oeValues] => Array
                        (
                            [Bufftip] => Entangled
                            [Buffubertip] => This unit is entangled; it cannot move.
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNEntanglingRoots.blp
                        )

                )

            [1] => Array
                (
                    [id] => @@1@@
                    [derivedFrom] => BHab
                    [oeValues] => Array
                        (
                            [Bufftip] => Gift of Nature
                            [Buffubertip] => This tower has received a gift of nature; its attacks have a chance to entangle the enemy.
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNRejuvenation.blp
                            [EditorName] => Gift of Nature
                        )

                )

        )

    [units] => Array
        (
        )

    [references] => Array
        (
        )

)