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
Abil. Factor:
.45
Status:
Approved

Description:

Shh...Silence is Golden...

Latest Upload Comment:

Restored from 1.10
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
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