Gnoll Thunder Mage v1
950
ID:
328
Family ID:
Author:
cedi
Rarity:
rare
Element:
storm
Attack Type:
Energy
Attack Range:
1200
Attack CD:
0.75
Damage:
111-111
Abil. Factor:
0.20
Status:
Approved

Description:

Gnollssss!

Latest Upload Comment:

Restored from 1.10
Thunder Shock
Deals [1450 + (435 x amount of player towers)] spell damage to a target creep. This ability has a 25% chance to recast itself when cast. Maximum of 1 extra cast.

Level Bonus:
+58 base spelldamage
+17.4 spelldamage per player tower
+1 extra cast at levels 15 and 25
Download

Toggle Triggers

Autocast

caster_art: Abilities\Spells\Orc\Purge\PurgeBuffTarget.mdl AUTOCAST_cooldown: 3.0 AUTOCAST_numBuffsBeforeIdle: 1 AUTOCAST_isExtended: false AUTOCAST_autocastType: AC_TYPE_OFFENSIVE_UNIT AUTOCAST_manacost: 12 AUTOCAST_range: 1200.00 AUTOCAST_buffType: 0 AUTOCAST_targetSelf: true AUTOCAST_targetType: TARGET_TYPE_CREEPS target_art: Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl AUTOCAST_autoRange: 1200.00
private function onAutocast takes Tower tower returns nothing
    local Unit U = Event.getTarget()
    local integer lvl = tower.getLevel()
    local integer i = tower.userInt
    local Iterate I
    local boolean b
    call tower.doSpellDamage( U, 1450.00 + 58.00 * lvl + ( 435.00 + 17.4 * lvl ) * tower.getOwner().getNumTowers(), tower.calcSpellCritNoBonus() )
    if tower.calcChance( 0.25 ) then
        call tower.getOwner().displaySmallFloatingText( "MULTICAST!", tower, 0, 255, 0, 0.00 )
        loop
            exitwhen i <= 0
            set I = Iterate.overUnitsInRangeOfCaster( tower, TARGET_CREEPS, 1200.00 )
            set b = true
            loop
                if i <= 0 then
                    //enough hits
                    call I.destroy()
                    exitwhen true
                endif
                set U = I.next()
                if U == 0 and b then
                    //no units near
                    return
                endif
                set b = false
                exitwhen U == 0
                call SFXAtUnit( "Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl", U.getUnit() )
                call tower.doSpellDamage( U, 1450.00 + 58.00 * lvl + ( 435.00 + 17.4 * lvl ) * tower.getOwner().getNumTowers(), tower.calcSpellCritNoBonus() )
                set i = i - 1
            endloop
        endloop
    endif
endfunction

Header

    globals
        MultiboardValues MBV
    endglobals
    
    //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 MBV = MultiboardValues.create( 1 )
        call MBV.setKey( 0, "Thunder Shock Dmg" )
    endfunction

On Level Up

function onLevelUp takes Tower tower returns nothing
    local integer lvl = tower.getLevel()
    if lvl < 15 then
        set tower.userInt = 1
    elseif lvl >= 15 and lvl < 25 then
        set tower.userInt = 2
    elseif lvl == 25 then
        set tower.userInt = 3
    endif
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    local integer lvl = tower.getLevel()
    if lvl < 15 then
        set tower.userInt = 1
    elseif lvl >= 15 and lvl < 25 then
        set tower.userInt = 2
    elseif lvl == 25 then
        set tower.userInt = 3
    endif
endfunction

On Tower Details

function onTowerDetails takes Tower tower returns MultiboardValues
    local real r = 1450.00 + 58.00 * tower.getLevel() + ( 435.00 + 17.4 * tower.getLevel() ) * tower.getOwner().getNumTowers()
    call MBV.setValue( 0, R2S( r ) )
    return MBV
endfunction