Skink v1
150
ID:
254
Family ID:
Author:
cedi
Rarity:
uncommon
Element:
nature
Attack Type:
Decay
Attack Range:
800
Attack CD:
1
Damage:
28-34
Abil. Factor:
0.4
Status:
Approved

Description:

It likes to hug people.

Latest Upload Comment:

Restored from 1.10
Poisonous Skin
This and any towers in 200 range gain a poisonous attack. The poison deals 3 spell damage per second for 5 seconds. The effect stacks and is attack speed and range adjusted.

Level Bonus:
+0.12 spell damage per second
Download

Toggle Triggers

Header

            globals
        //@export
        BuffType cedi_skinkA //Aura
        //@export
        BuffType cedi_skinkB //Buff
    endglobals
    
    function poisenskin takes Buff B returns nothing
        local Tower C = B.getCaster()
        local Tower T = B.getBuffedUnit()
        local Unit U = Event.getTarget()
        local Buff P = U.getBuffOfType( cedi_skinkB )
        local real dmg = ( C.userReal + C.userReal2 * C.getLevel() ) * T.getCurrentAttackspeed() / ( T.getRange() / 800.00 ) 
        
        if P != 0 then
            if P.getCaster().getUID() == P.userInt then
                call P.refreshDuration()
                set P.userReal = P.userReal + dmg
            else
                set dmg = P.userReal + dmg
                call P.removeBuff()
                set P = cedi_skinkB.apply( C, U, C.getLevel() )
                set P.userInt = C.getUID()
                set P.userReal = dmg
            endif
        else
            set P = cedi_skinkB.apply( C, U, C.getLevel() )
            set P.userInt = C.getUID()
            set P.userReal = dmg
        endif
    endfunction
    
    function dot takes Buff B returns nothing
        local Tower T = B.getCaster()
        call T.doSpellDamage( B.getBuffedUnit(), B.userReal, T.calcSpellCritNoBonus() )
        call DestroyEffect( AddSpecialEffectTarget( "Abilities\\Spells\\NightElf\\CorrosiveBreath\\ChimaeraAcidTargetArt.mdl", T.getUnit(), "head" ) )
    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 cedi_skinkA = BuffType.createAuraEffectType( true )
        call cedi_skinkA.setBuffIcon( '@@0@@' )
        call cedi_skinkA.addEventOnAttack( poisenskin, 1.0, 0.0 )
        
        set cedi_skinkB = BuffType.create( 5.00, 0.0, false )
        call cedi_skinkB.setBuffIcon( '@@1@@' )
        call cedi_skinkB.addPeriodicEvent( dot, 1.0 )
    endfunction
        

On Tower Creation

function onCreate takes Tower tower returns nothing
            
set tower.userReal = 3
    set tower.userReal2 = 0.12
        
endfunction

Tower Aura

AURA_powerAdd: 1 AURA_auraEffect: cedi_skinkA AURA_levelAdd: 1 AURA_power: 0 AURA_targetType: TARGET_TYPE_TOWERS AURA_targetSelf: true AURA_level: 0 AURA_auraRange: 200