Hall of Souls v1
1000
ID:
633
Family ID:
Author:
Natac
Rarity:
rare
Element:
darkness
Attack Type:
Decay
Attack Range:
800
Attack CD:
1.4
Damage:
634-684
Abil. Factor:
0.4
Status:
Approved

Description:

The last place of all already fallen souls, seeking for their last revenge.

Latest Upload Comment:

Restored from 1.10
Revenge of Souls
This tower gains 6 permanent bonus damage and 1 experience every time a creep in 1000 range dies.

Level Bonus:
+0.3 damage per kill
Download

Toggle Triggers

Header

    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

On Tower Creation

function onCreate takes Tower tower returns nothing
    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
    
    
endfunction

Tower Aura

AURA_powerAdd: 0 AURA_auraEffect: natac_revengeOfSouls_Buff AURA_levelAdd: 0 AURA_power: 1 AURA_targetType: TARGET_TYPE_CREEPS AURA_targetSelf: false AURA_level: 1 AURA_auraRange: 1000