Blaster Staff v1
60
lvl: 0

ID:

218

Author:

cedi

Rarity:

uncommon

Status:

Approved

Description:

A gift from the owner of a castle.

Latest Upload Comment:

Restored from 1.10
Blasting Attack
The staff launches a magical missile each second which deals 60 spelldamage. The staff has a range of 1000.
Download

Toggle Triggers

Header

goldcost: 0
    globals
        ProjectileType PT
    endglobals
    
    function Collision takes Projectile P, Unit targ returns nothing
        call P.getCaster().doSpellDamage( targ, 60.00, P.getCaster().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 PT = ProjectileType.create( "Abilities\\Weapons\\DruidoftheTalonMissile\\DruidoftheTalonMissile.mdl", 4.00, 1400.00 )
        call PT.enableHoming( Collision, 0.00 )
    endfunction

Periodic

PERIODIC_period: 1.00 goldcost: 60
function periodic takes Item itm returns nothing
    local Unit U = itm.getCarrier()
    local Iterate I = Iterate.overUnitsInRangeOfUnit( U, TARGET_CREEPS, U, 1000.00 )
    local Unit T = I.next()
    if T != 0 then
        call Projectile.createFromUnitToUnit( PT, U, 1.00, U.calcSpellCritNoBonus(), U, T, true, false, false )
        call I.destroy()
    endif
endfunction