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

            [Art] => ReplaceableTextures\CommandButtons\BTNBlackCitadel.blp
            [dmgplus1] => 633
            [bldtm] => 1
            [goldcost] => 1000
            [unitSound] => Necropolis
            [sides1] => 51
            [Missilearc] => 0.15
            [launchZ] => 30
            [acquire] => 800
            [upgrades] => Array
                (
                )

            [Upgrade] => Array
                (
                )

            [Name] => Hall of Souls
            [weapTp1] => missile
            [MissileHoming] => 1
            [file] => buildings\undead\Necropolis\Necropolis.mdl
            [uberSplat] => OSMA
            [Missileart] => Abilities\Weapons\ZigguratMissile\ZigguratMissile.mdl
            [Missilespeed] => 1500
            [dice1] => 1
            [RngBuff1] => 250
            [animProps] => work
            [modelScale] => 0.3
            [rangeN1] => 800
            [atkType1] => hero
            [cool1] => 1.4
            [Ubertip] => The last place of all already fallen souls, seeking for their last revenge.
            [abilList] => Array
                (
                )

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

            [targs1] => Array
                (
                )

            [weapsOn] => 1
        )

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

            [abil_factor] => 0.4
            [author] => Natac
            [alpha] => 255
            [authorDisplay] => Natac
            [version] => 1.0
            [element] => darkness
            [rarity] => rare
        )

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => -29.9247
                    [y] => 32.6364
                    [z] => 0
                    [scale] => 0.4
                    [rot] => 3.67629
                    [file] => Doodads\Northrend\Plants\North_Thorns\North_Thorns4.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [1] => Array
                (
                    [x] => -30.7796
                    [y] => -48.5312
                    [z] => 0
                    [scale] => 0.25
                    [rot] => 5.35816
                    [file] => Doodads\Northrend\Props\NorthrendTombstone\NorthrendTombstone0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [2] => Array
                (
                    [x] => 40.1038
                    [y] => 5.51518
                    [z] => 0
                    [scale] => 0.4
                    [rot] => 5.48724
                    [file] => Doodads\Northrend\Plants\North_Thorns\North_Thorns4.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [3] => Array
                (
                    [x] => -53.5186
                    [y] => -15.6855
                    [z] => 0
                    [scale] => 0.25
                    [rot] => 5.18159
                    [file] => Doodads\Northrend\Props\NorthrendTombstone\NorthrendTombstone2.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [4] => Array
                (
                    [x] => -5.10116
                    [y] => -50.4853
                    [z] => 0
                    [scale] => 0.4
                    [rot] => 4.7473
                    [file] => Doodads\Northrend\Plants\North_Thorns\North_Thorns4.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [5] => Array
                (
                    [x] => 52.584
                    [y] => 18.392
                    [z] => 0
                    [scale] => 0.25
                    [rot] => 5.18159
                    [file] => Doodads\Northrend\Props\NorthrendTombstone\NorthrendTombstone2.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [6] => Array
                (
                    [x] => -36.6272
                    [y] => 48.3317
                    [z] => 0
                    [scale] => 0.25
                    [rot] => 5.18159
                    [file] => Doodads\Northrend\Props\NorthrendTombstone\NorthrendTombstone2.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [7] => Array
                (
                    [x] => 54.6624
                    [y] => -47.4701
                    [z] => 0
                    [scale] => 0.25
                    [rot] => 5.35816
                    [file] => Doodads\Northrend\Props\NorthrendTombstone\NorthrendTombstone0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [8] => Array
                (
                    [x] => 10.6471
                    [y] => -15.606
                    [z] => 0
                    [scale] => 0.25
                    [rot] => 5.35816
                    [file] => Doodads\Northrend\Props\NorthrendTombstone\NorthrendTombstone0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [9] => Array
                (
                    [x] => 10.5703
                    [y] => 48.4088
                    [z] => 0
                    [scale] => 0.25
                    [rot] => 5.35816
                    [file] => Doodads\Northrend\Props\NorthrendTombstone\NorthrendTombstone0.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
        //@export
        BuffType natac_revengeOfSouls_Buff
    endglobals
    
    function setFamID takes Buff b returns nothing
        set b.userInt = Tower(b.getCaster()).getFamily()
    endfunction
    
    function increaseDamageAndExp takes Buff b returns nothing
        local Iterate it = Iterate.overUnitsInRangeOfCaster(b.getBuffedUnit(), TARGET_TOWERS, 1000)
        local Tower loopUnit
        local real loopSoulBonus
        
        call SFXAtUnit("Abilities\\Spells\\Items\\AIso\\AIsoTarget.mdl", b.getBuffedUnit().getUnit())
        loop
            set loopUnit = it.next()
            exitwhen loopUnit == 0
            if(loopUnit.getFamily() == b.userInt) then
                set loopSoulBonus = loopUnit.userReal + (loopUnit.getLevel() * loopUnit.userReal2)
                set loopUnit.userReal3 = loopUnit.userReal3 + loopSoulBonus
                call loopUnit.modifyProperty(MOD_DAMAGE_ADD, loopSoulBonus) //Modify damage
                call loopUnit.addExp(loopUnit.userInt) // Add exp
            endif
        endloop
    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  natac_revengeOfSouls_Buff = BuffType.createAuraEffectType(false)
        call natac_revengeOfSouls_Buff.setBuffIcon('@@0@@')
        call natac_revengeOfSouls_Buff.addEventOnCreate(EventHandler.setFamID)
        call natac_revengeOfSouls_Buff.addEventOnDeath(EventHandler.increaseDamageAndExp)
	endfunction
                    [values] => Array
                        (
                            [visible] => true
                            [icon] => ReplaceableTextures\CommandButtons\BTNAnimateDead.blp
                            [name] => Revenge of Souls
                            [short_explain] => Every creep that dies nearby permanently increases this tower's damage and grants it experience.
                            [long_explain] => This tower gains |cFFFFFF806|r permanent bonus damage and |cFFFFFF801|r experience every time a creep in |cFFFFFF801000|r range dies.|n|n|cffFF8000Level Bonus:|r|n|cFFFFFF80+0.3|r damage per kill
                        )

                )

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

                    [values] => Array
                        (
                            [AURA_powerAdd] => 0
                            [visible] => false
                            [AURA_auraEffect] => natac_revengeOfSouls_Buff
                            [AURA_levelAdd] => 0
                            [AURA_power] => 1
                            [icon] => 
                            [AURA_targetType] => TARGET_TYPE_CREEPS
                            [long_explain] => 
                            [AURA_targetSelf] => false
                            [name] => 
                            [AURA_level] => 1
                            [short_explain] => 
                            [AURA_auraRange] => 1000
                        )

                )

            [2] => Array
                (
                    [name] => On Tower Creation
                    [code] => local Tower preceding = Event.getPrecedingTower()
    local real  soulBonus
    
    set tower.userInt   = 1
    set tower.userReal  = 6
    set tower.userReal2 = 0.3   
    
    if(preceding != 0 and preceding.getFamily() == tower.getFamily()) then
        set  soulBonus       = preceding.userReal3
        set  tower.userReal3 = soulBonus
        call tower.modifyProperty(MOD_DAMAGE_ADD, soulBonus)
    else
        set   tower.userReal3  = 0.0 //Damage bonus from souls
    endif
                    [values] => Array
                        (
                            [visible] => false
                            [icon] => 
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
            [0] => Array
                (
                    [id] => @@0@@
                    [derivedFrom] => BUsl
                    [oeValues] => Array
                        (
                            [Targetattach] => origin
                            [Effectsoundlooped] => Array
                                (
                                )

                            [Buffubertip] => Nearby Towers of Souls will gain attackdamage and experience when this creep dies.
                            [TargetArt] => Array
                                (
                                )

                            [Bufftip] => Revenge of Souls
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNAnimateDead.blp
                        )

                )

        )

    [units] => Array
        (
        )

    [references] => Array
        (
            [0] => Array
                (
                    [export] => true
                    [category] => global
                    [typ] => BuffType
                    [name] => natac_revengeOfSouls_Buff
                )

        )

)