Phantom v2
125
ID:
83
Family ID:
Author:
drol
Rarity:
uncommon
Element:
storm
Attack Type:
Magic
Attack Range:
900
Attack CD:
1.5
Damage:
148-148
Abil. Factor:
0.75
Status:
Approved

Description:

Only seen above the highest clouds, this rare creature sears the sky.

Latest Upload Comment:

test
Specials:
+0.1 mana regen/lvl
Wind Shear
Increases the attackspeed of a tower in 300 range by 10% and gives it a 25% attackspeed adjusted chance to cast a chain of lightning which deals 100 initial spelldamage and hits up to 3 targets dealing 25% less damage each bounce. Effect lasts for 5 seconds.

Level Bonus:
+1% attackspeed
+4 spelldamage
+1 target at level 20
+0.1 sec duration
Download

Toggle Triggers

Autocast

AUTOCAST_cooldown: 3 AUTOCAST_numBuffsBeforeIdle: 1 AUTOCAST_isExtended: false AUTOCAST_autocastType: AC_TYPE_ALWAYS_BUFF AUTOCAST_manacost: 15 AUTOCAST_range: 300 AUTOCAST_buffType: drol_phantomBuff AUTOCAST_targetSelf: true AUTOCAST_targetType: TARGET_TYPE_TOWERS AUTOCAST_autoRange: 300 caster_art: target_art: Abilities\Spells\Items\AIlm\AIlmTarget.mdl
private function onAutocast takes Tower tower returns nothing
            
set drol_phantomBuff.apply(tower, Event.getTarget(), tower.getLevel()).userReal = tower.getLevel()
        
endfunction

Header

            globals
    
        //@export
        BuffType drol_phantomBuff
        //@export
        Cast drol_phantomCast
        //@export
        Cast drol_phantomCast2
    
    endglobals
    
    //Casts chain lightning on attack
    function phantomAttack takes Buff b returns nothing
        local Tower twr = b.getBuffedUnit()
        if b.getCaster().getLevel() < 20 then
            if twr.calcChance( 0.25 * twr.getBaseAttackspeed()) then
                call drol_phantomCast.targetCastFromCaster(twr, Event.getTarget(), 1. + b.userReal * 0.04, twr.calcSpellCritNoBonus())
            endif
        else
            if twr.calcChance( 0.25 * twr.getBaseAttackspeed()) then
                call drol_phantomCast2.targetCastFromCaster(twr, Event.getTarget(), 1. + b.userReal * 0.04, twr.calcSpellCritNoBonus())
            endif
        endif
    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()
        call m.addModification(MOD_ATTACKSPEED, 0.1, 0.01)
        
        set drol_phantomBuff = BuffType.create( 5.0, 0.1, true)
        
        call drol_phantomBuff.setBuffModifier(m)
        
        call drol_phantomBuff.setBuffIcon('@@2@@')
        
        call drol_phantomBuff.addEventOnAttack( phantomAttack, 1., 0.)
        
        set drol_phantomCast = Cast.create('@@0@@', "chainlightning", 5.0)
        call drol_phantomCast.setSourceHeight(40.0)
        
        set drol_phantomCast2 = Cast.create('@@1@@', "chainlightning", 5.0)
        call drol_phantomCast2.setSourceHeight(40.0)
    
    endfunction