Unforgiving Crypt v1
3400
ID:
173
Family ID:
Author:
eMoo
Rarity:
rare
Element:
darkness
Attack Type:
Decay
Attack Range:
1000
Attack CD:
1.95
Damage:
3586-3586
Status:
Approved

Description:

A combination of decaying body parts and the presence of an unfathomable evil create a pillar of darkness within this crypt to form a reliable attack and the ability to explode corpses.
Corpse Explosion
Explodes a corpse within 1000 range of the tower, causing enemies in 300 range of the corpse to take 20% more damage from darkness towers and move 20% slower for 8 seconds. 5 second cooldown. Doesn't affect Air.

Level Bonus:
+0.6% slow and damage taken
+0.25 seconds duration
Critical Mass
Has a 30% chance on attack to shoot an extra projectile. For each projectile shot after the initial one, there is a 39% chance to shoot an extra projectile. There is a maximum of 14 projectiles fired per attack.

Level Bonus:
 +0.3% initial chance
 +0.6% extra chance
Download

Toggle Triggers

Header

    globals
    //@import
    EventTypeList Top_Corpse_explode
    endglobals
    
    //@import
    function burstFire takes Tower tower, real chance, Creep target, real z returns nothing
    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
    endfunction

On Attack

ONATTACK_chance: 0.3 ONATTACK_chanceLevelAdd: 0.003
function onAttack takes Tower tower returns nothing
    call burstFire(tower, 0.39+tower.getLevel()*0.006,Event.getTarget(),200)
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
call tower.addEventList(Top_Corpse_explode)
set tower.userInt = 200 //This will be the base+level damage.
set tower.userInt2 = 200 //Base damage.
set tower.userInt3 = 6 //Level up damage.
endfunction
Arcane Storm v1
3400
ID:
436
Family ID:
Author:
Ashbringer
Rarity:
unique
Element:
storm
Attack Type:
Energy
Attack Range:
1200
Attack CD:
1.5
Damage:
998-998
Mana:
150
Mana regen:
0
Status:
Approved

Description:

Chaotic magical energy that primes enemies for disintegration.
Surge
The tower's main attacks have a 1% chance per Attraction stack on the target to send a surge of energy that deals 200% of attack damage to the target and then attempts to jump from enemy to enemy within 750 range of the original target. At each enemy, the chance to jump is calculated based on the next target's Attraction stacks. Can only hit each target once and benefits from Mana Storm's damage bonus.

Level Bonus:
+0.02% chance per stack
+4% attack damage
Arcane Attraction
Attacks apply a stack of Attraction on hit and generate 1 mana per stack on each target. Can only gain mana once per target hit on each attack. When an enemy dies, all stacks of Attraction on it will distribute evenly to nearby targets within 500 range and deal 20% attack damage per stack transferred. Attraction lasts indefinitely.

Level Bonus:
+10 range
+0.4% attack damage per stack
Mana Storm
Attacks hit up to 2 additional enemies within attack range and consume all mana to deal [mana consumed]% increased damage. Mana Storm gains an additional attack for every 75 mana consumed. If at least 100 mana is consumed, the tower's multicrit is increased by 3 for 2 seconds. If there are less creeps than attacks, the remaining attacks will hit the main target.

Level Bonus:
-1 mana per extra attack
Download

Toggle Triggers

Header

    globals
        BuffType ashbringer_attraction_buff
        BuffType ashbringer_manastorm_buff
        Cast ashbringer_surge_cast
        Cast ashbringer_manastorm_cast
    endglobals
    
    function ashbringer_attraction_apply takes Tower tower, Creep target, integer stacks returns integer
        local Buff b
        local integer i
        
        if stacks<1 then
            set stacks = 1
        endif
        set b = target.getBuffOfType(ashbringer_attraction_buff)
        if ( b != 0 ) then
            set i = b.getPower() + stacks
            call ashbringer_attraction_buff.applyCustomPower(tower, target, 1, i)
        else
            set i = 1
            call ashbringer_attraction_buff.applyCustomPower(tower, target, 1, i)
        endif
        
        return i
    endfunction
    
    function ashbringer_attraction_ondeath takes Buff b returns nothing
        local Tower tower = b.getCaster()
        local Creep target = b.getBuffedUnit()
        local Iterate i = Iterate.overUnitsInRangeOfUnit(tower, TARGET_TYPE_CREEPS, target, 500 + (tower.getLevel() * 10))
        local integer count = i.count()
        local Creep next
        local integer stacks = b.getPower()
        local integer stacks_spare = 0
        local integer stacks_each = 0
        local integer applied = 0
        local real damage_per_stack = tower.getCurrentAttackDamageWithBonus() * (0.2 + (tower.getLevel() * 0.004))
        
        if stacks < count then
            set stacks_spare = stacks
        else
            set stacks_spare = ModuloInteger(stacks, count)
            set stacks_each = (stacks - stacks_spare) / count
        endif
        
        set next = i.next()
        loop
            exitwhen next==0
            if stacks_spare>0 then
                set applied = stacks_each + 1
                set stacks_spare = stacks_spare - 1
            else
                set applied = stacks_each
            endif
            call ashbringer_attraction_apply(tower, next, applied)
            call tower.doAttackDamage(next, applied * damage_per_stack, tower.calcAttackMulticrit(0,0,0))
            call Effect.createSimpleOnUnit("Abilities\\Spells\\Human\\Feedback\\ArcaneTowerAttack.mdl", next, "origin").destroy()
            set next = i.next()
        endloop
    endfunction
    
    function ashbringer_surge_start takes Tower tower, Creep target, real mana returns nothing
        local Buff b
        local Iterate i = Iterate.overUnitsInRangeOfUnit(tower, TARGET_TYPE_CREEPS, target, 750)
        local Unit next = i.next()
        local real damage = tower.getCurrentAttackDamageWithBonus() * (2.0 + (tower.getLevel() * 0.04)) * (1 + (mana/100))
        local real chance_per_stack = 0.01 + (tower.getLevel() * S2R("disintegrate_chance_pl"))
        local Unit prev = target
        local boolean jump = true
        
        call ashbringer_surge_cast.targetCastFromCaster(tower, target, 0.0, 0.0)
        call tower.doAttackDamage(target, damage, tower.calcAttackMulticrit(0,0,0))
        
        loop
            exitwhen next==0
            if next == target then
            else
                set b = next.getBuffOfType(ashbringer_attraction_buff)
                
                if b!=0 then
                    if tower.calcChance(I2R(b.getPower())*chance_per_stack) then
                        call ashbringer_surge_cast.targetCastFromCaster(prev, next, 0.0, 0.0)
                        call tower.doAttackDamage(next, damage, tower.calcAttackMulticrit(0,0,0))
                        set prev = next
                    endif
                endif
            endif
            
            set next = i.next()
        endloop
    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 ashbringer_manastorm_modifier = Modifier.create()
    
        set  ashbringer_attraction_buff = BuffType.create(-1, 0, false)
        call ashbringer_attraction_buff.setBuffIcon('@@3@@')
        call ashbringer_attraction_buff.addEventOnDeath(ashbringer_attraction_ondeath)
        
        set ashbringer_manastorm_buff=BuffType.create(2.0, 0.0, true)
        call ashbringer_manastorm_modifier.addModification(MOD_MULTICRIT_COUNT, 3, 0)
        call ashbringer_manastorm_buff.setBuffIcon('@@2@@')
        call ashbringer_manastorm_buff.setBuffModifier(ashbringer_manastorm_modifier)
        
        set ashbringer_surge_cast = Cast.create('@@0@@',"chainlightning",1.0)
        call ashbringer_surge_cast.setSourceHeight(90.0)
        
        set ashbringer_manastorm_cast = Cast.create('@@1@@',"chainlightning",1.0)
        call ashbringer_manastorm_cast.setSourceHeight(90.0)
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    local Buff b
    local Unit main_target = Event.getTarget()
    local real chance_per_stack = 0.01 + (tower.getLevel() * S2R("disintegrate_chance_pl"))
    local Unit target
    local real mana = GetUnitState(tower.getUnit(), UNIT_STATE_MANA)
    local real extra_per = 75 - (tower.getLevel() * 1)
    local integer extra_attacks = 2 + R2I((mana - ModuloReal(mana, extra_per)) / extra_per)
    local real original_damage = Event.damage
    local real damage = original_damage * (1 + (mana/100))
    local Iterate i = Iterate.overUnitsInRangeOfCaster(tower, TARGET_TYPE_CREEPS, tower.getRange())
    local boolean iterate_destroyed = false
    local Effect e
    local integer stacks = 0
    local integer total_stacks = 0
    
    set Event.damage = damage
    call tower.subtractMana(mana, true)
    
    if mana>=100 then
        call ashbringer_manastorm_buff.apply(tower, tower, 1)
        call Effect.createColored("Doodads\\Cinematic\\Lightningbolt\\Lightningbolt.mdl", tower.getX(), tower.getY(), 0.0, 270.0, 1.3, 255, 90, 255, 255).setLifetime(0.3)
    endif
    
    loop
        exitwhen extra_attacks == 0
        
        if not iterate_destroyed then
            set target = i.nextRandom()

            if target == 0 then
                set iterate_destroyed = true
                set target = main_target
            endif
        endif
  
        if iterate_destroyed or target != main_target then
            
            set stacks = ashbringer_attraction_apply(tower, target, 1)
            
            if target != main_target then
                call ashbringer_manastorm_cast.targetCastFromCaster(tower, target, 0.0, 0.0)
                set total_stacks = total_stacks + stacks
            endif
            
            call tower.doAttackDamage(target, damage, tower.calcAttackMulticrit(0,0,0))
            
            set extra_attacks = extra_attacks - 1
        endif
    endloop
 
    if not iterate_destroyed then
        call i.destroy()
    endif
    
    call ashbringer_manastorm_cast.targetCastFromCaster(tower, main_target, 0.0, 0.0)
    set stacks = ashbringer_attraction_apply(tower, main_target, 1)
    set total_stacks = total_stacks + stacks
    
    if tower.calcChance(I2R(stacks)*chance_per_stack) then
        call ashbringer_surge_start(tower, main_target, mana)
    endif
    
    call tower.addMana(total_stacks)
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing

endfunction
Nuclear Missile Launcher v1
3400
ID:
596
Family ID:
Author:
Natac
Rarity:
unique
Element:
iron
Attack Type:
Essence
Attack Range:
2400
Attack CD:
10
Damage:
17777-17778
Status:
Approved

Description:

Pure manmade destruction.
Specials:
Attacks GROUND only
Splash attack:
   400 AoE: 100% damage
   500 AoE: 75% damage
   600 AoE: 50% damage
Download

Toggle Triggers

Header

    globals
        BuffType natac_LauncherTarget_Buff
        
        //@export
        BuffType natac_cooldownBar_BuffType //COOLDOWN BAR: Buff
        
        //COOLDOWN BAR: Globals 
        hashtable natac_cooldown_map = InitHashtable()
        
        string  BAR_TEXT = "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||" // x 60
        integer TIMER        = 0
        integer TEXT_TAG     = 1
        integer BAR          = 2
        integer CURRENT_STEP = 3
        integer TIMER_PERIOD = 4
        // COOLDOWN BAR: End Globals
    endglobals
    
    // === COOLDOWN BAR: Code ===
    // Used to have a cool bar that is showing the time left until the towers cooldown is ready.
    // This function decreases the bar every time a step is over (=the timer expires)
    function oneStepDone takes nothing returns nothing
        local timer   stepTimer   = GetExpiredTimer() 
        local integer stepTimerId = GetHandleId(stepTimer) // The timers id, needed for the hash map
        local texttag bar         = LoadTextTagHandle(natac_cooldown_map, stepTimerId, BAR) // Get the floating text ifself
        local integer currentStep = LoadInteger(natac_cooldown_map, stepTimerId, CURRENT_STEP) + 1 
        local real    colorFactor = currentStep * 0.033 // This factor is used to change the red and green of the bar
        
        if(currentStep < 30) then // Time left: shorten the bar
            call SetTextTagText(bar, SubString(BAR_TEXT, 0, R2I(60-(currentStep*2))), 0.023) // Shorten bar
            call SetTextTagColor(bar, IMinBJ(R2I((1-colorFactor)*510),255), IMinBJ(R2I(colorFactor*510),255), 0, 170) // Fade bar color from red to green
            call SaveInteger(natac_cooldown_map, stepTimerId, CURRENT_STEP, currentStep) // Increase step count
            call TimerStart(stepTimer, LoadReal(natac_cooldown_map, stepTimerId, TIMER_PERIOD), false, function oneStepDone) // Start timer again
        else // Cooldown is ready: Clean up
            call DestroyTextTag(bar)
            call ReleaseTimer(stepTimer)
            
            call RemoveSavedHandle(natac_cooldown_map, stepTimerId, BAR) 
            call RemoveSavedInteger(natac_cooldown_map, stepTimerId, CURRENT_STEP)
            call RemoveSavedReal(natac_cooldown_map, stepTimerId, TIMER_PERIOD)
        endif
        set stepTimer = null
        set bar = null
    endfunction
    
    // Used to have a cool bar that is showing the time left until the towers cooldown is ready.
    // This function shows the bar and starts the timer for the first step
    function onAttack_StartFirstSequence takes Buff b returns nothing
        local texttag bar         = CreateTextTag() // This becomes the bar
        local timer   stepTimer   = NewTimer()   // A timer, expiring everytime the next step will be done
        local integer stepTimerId = GetHandleId(stepTimer)
        local Tower   tower       = b.getBuffedUnit()
        local real    stepPeriod  = tower.getCurrentAttackspeed() / 30 // The time between 2 steps
        local real    offset      = 60 * 0.45 // The offset to center the bar above the unit
    
        call SetTextTagText(bar, BAR_TEXT, 0.023)
        call SetTextTagPermanent(bar, false)
        call SetTextTagColor(bar, 255, 0, 0, 170) // Create bar with some transparency
        call SetTextTagPos(bar, tower.getX()-offset, tower.getY(), 150) // Center bar above the unit
    
        call SaveTextTagHandle(natac_cooldown_map, stepTimerId, BAR, bar) // Store the bar itself
        call SaveInteger(natac_cooldown_map, stepTimerId, CURRENT_STEP, 0) // Store the current step (we start here, so its 0)
        call SaveReal(natac_cooldown_map, stepTimerId, TIMER_PERIOD, stepPeriod) // Store the time between 2 steps
    
        call TimerStart(stepTimer, stepPeriod, false, function oneStepDone) // Start timer
        set bar = null
        set stepTimer = null
    endfunction
    // === COOLDOWN BAR: End Code ===
    
    
    
    // === Nuclear Missle Launcher - Code ===
    function initalizeTargetCounter takes Buff b returns nothing
        set b.userInt = 0
    endfunction
    
    function increaseTargetCounter takes Buff b returns nothing
        set b.userInt = b.userInt + 1
    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  natac_LauncherTarget_Buff = BuffType.create(-1.0, 0.0, false)
        call natac_LauncherTarget_Buff.setBuffIcon('@@0@@')
        call natac_LauncherTarget_Buff.addEventOnCreate(EventHandler.initalizeTargetCounter)
        call natac_LauncherTarget_Buff.setEventOnRefresh(EventHandler.increaseTargetCounter)
        
        // COOLDOWN BAR: Initialize Buff
        set  natac_cooldownBar_BuffType = BuffType.create(-1.0, 0, true)
        call natac_cooldownBar_BuffType.addEventOnAttack(EventHandler.onAttack_StartFirstSequence, 1.0, 0.0)
        // COOLDOWN BAR: End Initialize Buff
    endfunction

On Attack

ONATTACK_chance: 1.0 ONATTACK_chanceLevelAdd: 0.0
function onAttack takes Tower tower returns nothing
    call natac_LauncherTarget_Buff.apply(tower, Event.getTarget(), tower.getLevel())
endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    local Unit     target     = Event.getTarget()
    local Buff     targetBuff
    local Effect   targetEffect
    
    if(Event.isMainTarget()) then
        set  targetEffect = Effect.createAnimatedScaled("Abilities\\Weapons\\Mortar\\MortarMissile.mdl",target.getX(),target.getY(),0.0,0,3.0)
        call targetEffect.setAnimationSpeed(0.5)
        call targetEffect.setLifetime(0.05)
        
        set targetBuff = target.getBuffOfType(natac_LauncherTarget_Buff)
        if(targetBuff != 0 and targetBuff.userInt <= 0) then
            call  targetBuff.removeBuff()
        else
            set targetBuff.userInt = targetBuff.userInt - 1 
        endif
    endif
    call  SFXOnUnit("Abilities\\Spells\\Other\\AcidBomb\\BottleMissile.mdl", target.getUnit(), "origin")
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    call natac_cooldownBar_BuffType.apply(tower, tower, 1)
endfunction
Grab-O-Bot v1
3500
ID:
34
Family ID:
Author:
cedi
Rarity:
unique
Element:
iron
Attack Type:
Decay
Attack Range:
900
Attack CD:
0.4
Damage:
659-659
Mana:
100
Mana regen:
2.5
Status:
Approved

Description:

When you think it looks very fragile, you're right. But its also a devastating machine.
Specials:
Splash attack:
   75 AoE: 100% damage
   100 AoE: 66% damage
   125 AoE: 33% damage
Shock
Slams all creeps in 250 AoE around the target, dealing 1250 spell damage and stunning for 2 seconds.

Level Bonus:
+185 damage

AC_TYPE_OFFENSIVE_UNIT
 50, 900.00 range, 15.00s cooldown
Grapple
Each time the bot attacks there is an 8% it will grab the target, holding it in place for 2.5 seconds. The duration is reduced to 0.9 seconds for champions and bosses.

Level Bonus:
+0.32% chance
Download

Toggle Triggers

Autocast

caster_art: AUTOCAST_cooldown: 15.00 AUTOCAST_numBuffsBeforeIdle: 1 AUTOCAST_isExtended: false AUTOCAST_autocastType: AC_TYPE_OFFENSIVE_UNIT AUTOCAST_manacost: 50 AUTOCAST_range: 900.00 AUTOCAST_buffType: 0 AUTOCAST_targetSelf: true AUTOCAST_targetType: TARGET_TYPE_CREEPS target_art: AUTOCAST_autoRange: 900.00
private function onAutocast takes Tower tower returns nothing
    local Unit U = Event.getTarget()
    local Iterate I = Iterate.overUnitsInRangeOfUnit( tower, TARGET_CREEPS, U, 250.00 )
    call Effect.createSimpleAtUnit("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl", U).destroy()
    call tower.doSpellDamageAoEUnit(U, 250.00, 1250.00 + 185.00 * I2R(tower.getLevel()), tower.calcSpellCritNoBonus(), 0.5)
    loop
        set U = I.next()
        exitwhen U == 0
        call cb_stun.applyOnlyTimed(tower, U, 2.00)
    endloop
endfunction

Header

    globals
        BuffType BT
    endglobals
    
    function starta takes Buff B returns nothing
        local Lightning li
        local Unit t = B.getBuffedUnit()
        local Unit c = B.getCaster()
        set li = Lightning.createFromPointToPoint("LEAS", c.getX(), c.getY(), c.getZ() + 100.0, t.getX(), t.getY(), t.getZ())
        set B.userInt = li
    endfunction
    
    function end takes Buff B returns nothing
        local Lightning li = B.userInt
        local Creep c = B.getBuffedUnit()
        call li.destroy()
        call c.reorder()
    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 BT = BuffType.createDuplicate(cb_stun, 2.5, 0.0, false)
        call BT.setBuffIcon('@@0@@')
        call BT.addEventOnCreate(starta)
        call BT.addEventOnCleanup(end)
    endfunction

On Attack

ONATTACK_chance: 0.08 ONATTACK_chanceLevelAdd: 0.0032
function onAttack takes Tower tower returns nothing
    if Event.getTarget().getSize() >= SIZE_CHAMPION then
        call BT.applyOnlyTimed(tower, Event.getTarget(), 0.9)
    else
        call BT.applyOnlyTimed(tower, Event.getTarget(), 2.5)
    endif
endfunction
Golden Queen v1
3500
ID:
40
Family ID:
Author:
SirCoqaLot.
Rarity:
rare
Element:
iron
Attack Type:
Physical
Attack Range:
875
Attack CD:
1.35
Damage:
2557-2637
Status:
Approved

Description:

Rare tower with a chance to turn lesser creeps into gold instantly. Gains additional gold for each kill and will do more damage the more gold you have.
Specials:
+40% bounty collected (+1.6%/lvl)
Transmute
This tower has a 5% chance on attack to turn a non boss, non champion target into 18 bonus gold immediately. 

Level Bonus:
 +0.04%chance
Gold Greed
On attack this tower deals [44 x squareroot (current gold)] spell damage to its target.
Download

Toggle Triggers

Header

    globals  
    //@import
    MultiboardValues Sir_gold_bonus
    endglobals 
    
    private function init takes nothing returns nothing
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    
    local Unit creep = Event.getTarget()
    set tower.userReal = 44.0*Pow(GetPlayerState(tower.getOwner().getThePlayer(), PLAYER_STATE_RESOURCE_GOLD),0.5)
    if not creep.isImmune() then
        if creep.getSize() < SIZE_CHAMPION and tower.calcChance(0.05+tower.getLevel()*0.0004) then
            call SFXAtUnit("Abilities\\Spells\\Other\\Transmute\\PileofGold.mdl",creep.getUnit())
            call tower.killInstantly(creep)
            call tower.getOwner().giveGold(18,tower.getUnit(), true, true)
        else
            call tower.doSpellDamage(creep,tower.userReal,tower.calcSpellCritNoBonus())   
            call tower.getOwner().displayFloatingTextX(I2S(R2I(tower.getProp_SpellDmgDealt()*tower.userReal)),creep,255, 200, 0,255,0.05,0.0,2.0)
        endif
    endif
endfunction

On Tower Details

function onTowerDetails takes Tower tower returns MultiboardValues
    set tower.userReal = tower.getProp_SpellDmgDealt()*44.0*Pow(GetPlayerState(tower.getOwner().getThePlayer(), PLAYER_STATE_RESOURCE_GOLD),0.5) 
    call Sir_gold_bonus.setValue(0,I2S(R2I(tower.userReal)))
    return Sir_gold_bonus
endfunction
Nortrom the Silencer v1
3500
ID:
101
Family ID:
Author:
i_mOck_death
Rarity:
unique
Element:
astral
Attack Type:
Physical
Attack Range:
800
Attack CD:
3
Damage:
7063-7063
Mana:
400
Mana regen:
6
Status:
Approved

Description:

Shh...Silence is Golden...
Glaives of Wisdom
Every attack an extra glaive is shot out at the cost of 40 mana. This glaive deals physical damage equal to Nortrom's attack damage and targets the creep with the least health in Nortrom's attack range.
Last Word
If Nortrom attacks a silenced creep, then he does 20% more damage. This affects Glaives of Wisdom as well.

Level Bonus:
+3.2% damage
Curse of the Silent
Every 7 seconds creeps within 800 range of Nortrom are silenced for 2 seconds.

Level Bonus:
+0.04 silence duration
Global Silence - Aura
All towers within 350 range of Nortrom have a 3% attackspeed adjusted chance to silence targeted creeps for 1 second. Duration is halved against bosses.

Level Bonus:
+0.08% chance
+0.04 silence duration
Download

Toggle Triggers

Header

    globals
        ProjectileType glaive_of_wisdom
        BuffType global_silence
    endglobals
    
    function glaive_hit takes Projectile p,Unit creep returns nothing
        local Tower tower = p.getCaster() 
        local real damage = tower.getCurrentAttackDamageWithBonus()
        if creep.isSilenced() == true then
            set damage = damage * (1.2+tower.getLevel()*.032)
            call Effect.createScaled("Abilities\\Spells\\Human\\Feedback\\SpellBreakerAttack.mdl", GetUnitX(creep.getUnit()), GetUnitY(creep.getUnit()), 30, 0, 2).destroy()
        endif
        call tower.doAttackDamage(creep,damage,tower.calcAttackMulticrit(0,0,0))
    endfunction
     
    function silence takes Buff b returns nothing
        local Tower tower = b.getCaster()  
        local Tower towero = b.getBuffedUnit() 
        local Creep target = Event.getTarget()
        
        if tower.calcChance((0.03+(0.0008*tower.getLevel()))*towero.getBaseAttackspeed()) then
            if target.getSize() == SIZE_BOSS then
                call cb_silence.applyOnlyTimed(tower,target,.5+tower.getLevel()*.02)
            else
                call cb_silence.applyOnlyTimed(tower,target,1+tower.getLevel()*.04)
            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
        set glaive_of_wisdom = ProjectileType.createInterpolate("Abilities\\Weapons\\BloodElfSpellThiefMISSILE\\BloodElfSpellThiefMISSILE.mdl",1000)
        call glaive_of_wisdom.setEventOnInterpolationFinished(ProjectileTargetEvent.glaive_hit)
        
        set global_silence = BuffType.createAuraEffectType(true)
        call global_silence.setBuffIcon('@@0@@') 
        call global_silence.addEventOnAttack(silence,1.0, 0.0) 
    endfunction

On Attack

ONATTACK_chance: 1.0 ONATTACK_chanceLevelAdd: 0.0
function onAttack takes Tower tower returns nothing
    local Creep target = Event.getTarget()
    local Creep next
    local Iterate it
    if tower.subtractMana(40, false) == 40 then
        set it = Iterate.overUnitsInRangeOfCaster(tower, TARGET_CREEPS, 800)
        loop
            set next=it.next()
            exitwhen next==0
            if GetUnitState(next.getUnit(),UNIT_STATE_LIFE) < GetUnitState(target.getUnit(),UNIT_STATE_LIFE) then
                set target = next
            endif
        endloop
        call Projectile.createLinearInterpolationFromUnitToUnit(glaive_of_wisdom,tower,1,1,tower,target,0,true).setScale(.5)
    endif
endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    local Creep creep = Event.getTarget()
    local unit c = creep.getUnit()
    if creep.isSilenced() == true then
        set Event.damage = Event.damage * (1.2+tower.getLevel()*.032)
        call Effect.createScaled("Abilities\\Spells\\Human\\Feedback\\SpellBreakerAttack.mdl", GetUnitX(c), GetUnitY(c), 30, 0, 2).destroy()
    endif
    set c = null
endfunction

Periodic

PERIODIC_period: 7
function periodic takes Tower tower returns nothing
    local Creep next
    local Iterate it = Iterate.overUnitsInRangeOfCaster(tower, TARGET_TYPE_CREEPS, 800)
    loop
        set next=it.next()
        exitwhen next==0
        call cb_silence.applyOnlyTimed(tower,next,2+tower.getLevel()*.04)
    endloop
endfunction

Tower Aura

AURA_powerAdd: 1 AURA_auraEffect: global_silence AURA_levelAdd: 1 AURA_power: 0 AURA_targetType: TARGET_TYPE_TOWERS AURA_targetSelf: true AURA_level: 0 AURA_auraRange: 350
Genis Sage v1
3500
ID:
131
Family ID:
Author:
i_mOck_death
Rarity:
unique
Element:
ice
Attack Type:
Energy
Attack Range:
900
Attack CD:
1.5
Damage:
1892-1892
Mana:
200
Mana regen:
3
Status:
Approved

Description:

Powerful mage who is adept in using the water magics.
Speed Cast
Whenever Genis uses one of his abilities, he has a 15% chance to increase his trigger chances and his attackspeed by 25% for 3.5 seconds. This ability does not stack, but can be retriggered.

Level Bonus:
+1% trigger chance
+1% attackspeed
+0.1 seconds
Aqua Edge
Each attack Genis has a 20% chance to launch 3 blades of water in front of him at different angles. Each blade deals 1500 damage to each creep it passes through. Costs 15 mana.

Level Bonus:
+0.6% chance
+150 damage
Spread
Whenever Genis damages a creep, he has a 10% chance to lift creeps up for 0.8 seconds in a 250 AoE around the damaged creep. Each creep is also dealt 3000 spell damage. Costs 40 mana.

Level Bonus:
+0.2% chance
+200 spell damage
Magic Boost
Every 7 seconds Genis has a 30% chance to increase the spell damage of all towers within 350 range of him by 20% for 3 seconds. Costs 10 mana.

Level Bonus:
+1% spell damage
Download

Toggle Triggers

Header

    globals
        Cast mOck_Aedge
        BuffType mOck_spread
        BuffType mOck_speedcast
        BuffType mOck_mboost
    endglobals
    
    function spread_up takes Buff b returns nothing
        local Creep creep = b.getBuffedUnit()
        call creep.adjustHeight(300,(300/(.4*b.getCaster().getProp_BuffDuration()))*creep.getProp_DebuffDuration())
    endfunction
    
    function spread_down takes Buff b returns nothing
        local Creep creep = b.getBuffedUnit()
        call creep.adjustHeight(-300,(300/(.4*b.getCaster().getProp_BuffDuration()))*creep.getProp_DebuffDuration())
    endfunction
    
    function speedcast takes Tower t returns nothing
        if t.calcChance(.15) then
            call mOck_speedcast.apply(t,t,t.getLevel())
        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()
        local Modifier b = Modifier.create()
        
        set mOck_speedcast = BuffType.create(3.5,.1,true)
        call m.addModification(MOD_TRIGGER_CHANCES,.25,.01)
        call m.addModification(MOD_ATTACKSPEED,.25,.01)
        call mOck_speedcast.setBuffModifier(m)
        call mOck_speedcast.setBuffIcon('@@1@@')
        
        set mOck_mboost = BuffType.create(3,0,true)
        call b.addModification(MOD_SPELL_DAMAGE_DEALT,.2,.01)
        call mOck_mboost.setBuffModifier(b)
        call mOck_mboost.setBuffIcon('@@2@@')
        
        set mOck_spread = BuffType.createDuplicate(cb_stun,.8,0,false)
        call mOck_spread.addEventOnCreate(spread_up)
        call mOck_spread.addEventOnCleanup(spread_down)
        
        set mOck_Aedge = Cast.create('@@0@@', "carrionswarm",1)
    endfunction

On Attack

ONATTACK_chance: 0.2 ONATTACK_chanceLevelAdd: 0.006
function onAttack takes Tower tower returns nothing
    local Unit target = Event.getTarget()
    local integer level = tower.getLevel()
    local real x2 = target.getX()
    local real y2 = target.getY()
    local real x = tower.getX()
    local real y = tower.getY()
    local real facing =  bj_RADTODEG * Atan2(y2-y, x2-x)
    local real angle = -20
    
    if tower.subtractMana(15, false) == 15 then
        loop
            exitwhen angle > 20
            call mOck_Aedge.pointCastFromCasterOnPoint(tower,x+25 * Cos((facing+angle) * bj_DEGTORAD),y+25 * Sin((facing+angle) * bj_DEGTORAD),1500+(level*150),tower.calcSpellCritNoBonus())
            set angle = angle + 20
        endloop
        call speedcast(tower)
    endif
endfunction

On Damage

ONDAMAGE_chance: .10 ONDAMAGE_chanceLevelAdd: 0.002
function onDamage takes Tower tower returns nothing
    local integer level = tower.getLevel()
    local Unit creep = Event.getTarget()
    local Unit next
    local Iterate it  
    local real crit 
    
    if tower.subtractMana(40, false) == 40 then
        set it = Iterate.overUnitsInRangeOfUnit(tower,TARGET_CREEPS,creep,250)
        call SFXAtUnit("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",creep.getUnit())
        set crit = tower.calcSpellCritNoBonus()
        loop
            set next = it.next()
            exitwhen next == 0
            call tower.doSpellDamage(next,3000+(200*level),crit)
            call mOck_spread.apply(tower,next,0)
        endloop
        call speedcast(tower)
    endif
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    call AddUnitAnimationProperties(tower.getUnit(), "stand alternate", false)
endfunction

Periodic

PERIODIC_period: 7
function periodic takes Tower tower returns nothing
    local integer level = tower.getLevel() 
    local Tower next
    local Iterate it

    if tower.calcChance(.3) and tower.subtractMana(40, false) == 40 then
        set it = Iterate.overUnitsInRangeOfCaster(tower,TARGET_TOWERS,350)
        loop
            set next = it.next()
            exitwhen next == 0
            call mOck_mboost.apply(tower,next,level)
        endloop
        call speedcast(tower)
    endif
endfunction