Charged Obelisk v1
1700
ID:
54
Family ID:
Author:
Boekie
Rarity:
unique
Element:
storm
Attack Type:
Energy
Attack Range:
1200
Attack CD:
1.5
Damage:
748-748
Abil. Factor:
0.3
Status:
Approved

Description:

This tower uses its lightning powers to help its allies.

Latest Upload Comment:

Restored from 1.10
Specials:
+0.04 mana regen/lvl
Charge
Applies a buff to target tower which lasts 10 seconds, it increases the attack speed of the tower by 25%. Every second this buff will grant an additional 5% bonus attackspeed.

Level Bonus:
+0.6% base attackspeed
+0.1% bonus attackspeed
Electric Field
On every attack this tower shocks a creep in 1000 range. This shock deals 1000 spelldamage and stuns for 0.2 seconds, the spelldamage has 20% bonus chance to crit. The stun does not work on bosses! 

Level Bonus:
+40 spelldamage
+0.4% bonus crit chance
Download

Toggle Triggers

Autocast

caster_art: AUTOCAST_cooldown: 5 AUTOCAST_numBuffsBeforeIdle: 3 AUTOCAST_isExtended: false AUTOCAST_autocastType: AC_TYPE_OFFENSIVE_BUFF AUTOCAST_manacost: 20 AUTOCAST_range: 1200 AUTOCAST_buffType: boekie_chargeBuff AUTOCAST_targetSelf: true AUTOCAST_targetType: TARGET_TYPE_TOWERS target_art: AUTOCAST_autoRange: 1200
private function onAutocast takes Tower tower returns nothing
call boekie_chargeBuff.apply(tower,Event.getTarget(),tower.getLevel()*6)
endfunction

Header

    globals
    BuffType boekie_chargeBuff 
    endglobals
    
    function boekie_charge takes Buff b returns nothing  
        local Tower caster = b.getCaster()
        local Unit target = b.getBuffedUnit() 
        local integer newLevel = b.getLevel() + 50 + caster.getLevel()
        local real duration = b.getRemainingDuration()
        
        call boekie_chargeBuff.applyCustomTimed(caster,target,newLevel,duration).setRemainingDuration(duration)
        
    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
    local Modifier m = Modifier.create() 
       
    set boekie_chargeBuff = BuffType.create( 10.00, 0.0, true )  
    call boekie_chargeBuff.setBuffIcon( '@@0@@' )  
    call m.addModification( MOD_ATTACKSPEED, 0.25, 0.001 )  
    call boekie_chargeBuff.setBuffModifier( m ) 
    call boekie_chargeBuff.addPeriodicEvent(EventHandler.boekie_charge,1)
    
    
    endfunction

On Attack

ONATTACK_chance: 1.0 ONATTACK_chanceLevelAdd: 0.0
function onAttack takes Tower tower returns nothing
    local Iterate inRange 
    local real numResults=0.0 
    local Unit result 
    local Unit next 
    local integer lvl = tower.getLevel()  
    set inRange=Iterate.overUnitsInRangeOfCaster(tower,TARGET_CREEPS,1000) 

    loop 
        set next=inRange.next() 
        exitwhen next==0 
        set numResults=numResults+1.0 

        if GetRandomReal(0.0,1.0)<=1.0/numResults then 
            set result=next 
        endif 
    endloop 

    if numResults>0.5 then 
        call tower.doSpellDamage(result,1000+(lvl*40),tower.calcSpellCrit(0.20+(lvl*0.004),0))
        
        if result.getSize() < SIZE_BOSS then
            call cb_stun.applyOnlyTimed(tower,result,0.2)
        endif
        
        call SFXAtUnit("Abilities\\Weapons\\Bolt\\BoltImpact.mdl",result.getUnit()) 
    endif
endfunction