Magic Accumulator v1
3000
ID:
334
Family ID:
Author:
tolleder
Rarity:
rare
Element:
astral
Attack Type:
Magic
Attack Range:
800
Attack CD:
3
Damage:
4933-4933
Mana:
350
Mana regen:
2
Status:
Approved

Description:

A rare tower which can store magic energy for later use.
Specials:
+10 mana/lvl
Accumulator Overload
The tower attacks creeps in a range of 1200 every 0.2 seconds till all mana is gone. Each attack (or try to attack) costs 10 mana, deals 1800 spelldamage and applies Faerie Fire.

Level Bonus:
+72 damage

AC_TYPE_OFFENSIVE_IMMEDIATE
 100, 1200 range, 20.0s cooldown
Faerie Fire
A creep hit by one of this tower's shots takes 20% extra damage from spells and debuffs last 30% longer for 9 seconds.

Level Bonus:
+0.8% extra spell damage
+1% extra debuff duration
+0.3 seconds Faerie Fire duration
Download

Toggle Triggers

Autocast

caster_art: AUTOCAST_cooldown: 20.0 AUTOCAST_numBuffsBeforeIdle: 0 AUTOCAST_isExtended: false AUTOCAST_autocastType: AC_TYPE_OFFENSIVE_IMMEDIATE AUTOCAST_manacost: 100 AUTOCAST_range: 1200 AUTOCAST_buffType: 0 AUTOCAST_targetSelf: false AUTOCAST_targetType: 0 target_art: AUTOCAST_autoRange: 800
private function onAutocast takes Tower tower returns nothing
    local unit towerUnit=tower.getUnit()
    local PeriodicEvent pE
    call SetUnitState(towerUnit,UNIT_STATE_MANA,GetUnitState(towerUnit,UNIT_STATE_MANA)+100)
    if tower.userInt!=0 then
        set pE=tower.userInt
        call pE.enable()
    endif
    set towerUnit = null
endfunction

Header

    globals
        BuffType slowAndDamage
        ProjectileType pT
    endglobals
    
    public function hit takes Projectile p, Unit creep returns nothing
        local Tower tower=p.getCaster()
        call tower.doSpellDamage(creep,tower.getLevel()*72+1800,tower.calcSpellCritNoBonus())
        call slowAndDamage.applyCustomPower(tower,creep,3*tower.getLevel()+52,tower.getLevel())
    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 sWeakeness=Modifier.create()
        call sWeakeness.addModification(MOD_SPELL_DAMAGE_RECEIVED,0.20,0.008)
        call sWeakeness.addModification(MOD_DEBUFF_DURATION,0.30,0.01)
        
        set slowAndDamage=BuffType.create(9,0.3,false)
        call slowAndDamage.setBuffIcon('@@0@@')
        call slowAndDamage.setBuffModifier(sWeakeness)
        call slowAndDamage.setStackingGroup("MagicBattery")
        
        set pT=ProjectileType.create("Abilities\\Weapons\\ProcMissile\\ProcMissile.mdl",10.0,1200.0)        
        call pT.enableHoming(ProjectileTargetEvent.hit,0.0)
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    call slowAndDamage.applyCustomPower(tower,Event.getTarget(),3*tower.getLevel()+52,tower.getLevel())
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    set tower.userInt=0
    call SetUnitState(tower.getUnit(),UNIT_STATE_MANA,0)
endfunction

Periodic

PERIODIC_period: 0.2
function periodic takes Tower tower returns nothing
    local unit towerUnit=tower.getUnit()
    local Iterate inRange
    local real numResults=0.0
    local Unit result
    local Unit next
    local Projectile p
    local PeriodicEvent pE
    
    if GetUnitState(towerUnit,UNIT_STATE_MANA)>10 then
        //Random creep in range
        set inRange=Iterate.overUnitsInRangeOfCaster(tower,TARGET_CREEPS,1200)
        loop
            set next=inRange.next()
            exitwhen next==0
            
            set numResults=numResults+1.0 
            if GetRandomReal(0.0,1.0)<=1.0/numResults then
                set result=next
            endif
        endloop
        
        if numResults>0.5 then
            if GetRandomReal(0.0,3.0)<=2.0 then
                if GetRandomReal(0.0,2.0)<=1.0 then
                    set p= Projectile.createFromPointToUnit(pT,tower,1.0,1.0,GetUnitX(towerUnit)+1.0,GetUnitY(towerUnit)+2.0,154.0,result,true,false,false)
                else
                    set p= Projectile.createFromPointToUnit(pT,tower,1.0,1.0,GetUnitX(towerUnit)-49.0,GetUnitY(towerUnit)+43.0,109.0,result,true,false,false)
                endif
            else
                set p= Projectile.createFromPointToUnit(pT,tower,1.0,1.0,GetUnitX(towerUnit)+52.0,GetUnitY(towerUnit)-52.0,109.0,result,true,false,false)
            endif
            call p.setScale(0.5)
        endif
        
        
        //Manacost
        call SetUnitState(towerUnit,UNIT_STATE_MANA,GetUnitState(towerUnit,UNIT_STATE_MANA)-10)
    else
        set pE=Event.getCurrentPeriodicEvent()
        set tower.userInt=pE
        call pE.disable()
    endif
    set towerUnit = null
endfunction
Master Huntress v1
3000
ID:
340
Family ID:
Author:
cedi
Rarity:
rare
Element:
nature
Attack Type:
Physical
Attack Range:
800
Attack CD:
1.8
Damage:
2409-2409
Status:
Approved

Description:

After having to forfeit her belief in Elune she seeked support from the dark and forbidden arts.
Specials:
Bounce attack:
   4 targets
   -25% damage per bounce
+2.4% attackspeed/lvl
Shadow Glaive
Whenever this tower attacks it has a 20% chance to gain 200% attackspeed until the next attack. The next attack will also crit for sure and deal 75% more crit damage.

Level Bonus:
+3% crit damage
+8% attack speed
+0.8% chance
Star Glaive
Whenever this tower damages a creep there is a 25% chance to deal additional 45% of the attack's damage as spell damage.

Level Bonus:
+0.4% chance
+1% attack damage as spell damage
Download

Toggle Triggers

Header

    globals
        //@import
        BuffType cedi_shadowgleve
    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
    endfunction

On Attack

ONATTACK_chance: 1.0 ONATTACK_chanceLevelAdd: 0.0
function onAttack takes Tower tower returns nothing
    local Buff B = tower.getBuffOfType( cedi_shadowgleve )
    
    if B != 0 then
        call tower.addModifiedAttackCrit( 0.00, 1.75 + tower.getLevel() * 3 / 100.0 )
        call B.removeBuff()
    endif
    
    if tower.calcChance( 0.2 + tower.getLevel() * 0.008 ) then
        call cedi_shadowgleve.apply( tower, tower, tower.getLevel() )
    endif
endfunction

On Damage

ONDAMAGE_chance: 0.25 ONDAMAGE_chanceLevelAdd: 0.004
function onDamage takes Tower tower returns nothing
    local real r = Event.damage * ( 0.45 + 0.01 * tower.getLevel() ) //( 2400.00 + tower.getLevel() * 96.0 ) +
    call tower.doSpellDamage( Event.getTarget(), r, tower.calcSpellCritNoBonus() )
    //call cb_stun.applyOnlyTimed( tower, Event.getTarget(), 0.45 )
    call SFXOnUnit( "Abilities\\Spells\\NightElf\\Starfall\\StarfallTarget.mdl", Event.getTarget().getUnit(), "origin" )
endfunction
Dark Accumulator v1
3000
ID:
347
Family ID:
Author:
tolleder
Rarity:
rare
Element:
darkness
Attack Type:
Decay
Attack Range:
800
Attack CD:
3
Damage:
4933-4933
Mana:
350
Mana regen:
2
Status:
Approved

Description:

A tower which can store dark energy for later use.
Specials:
+10 mana/lvl
Accumulator Overload
The tower attacks creeps in a range of 1200 every 0.2 seconds till all mana is gone. Each attack (or try to attack) costs 10 mana, deals 1800 points damage and applies corruption.

Level Bonus:
+72 damage

AC_TYPE_OFFENSIVE_IMMEDIATE
 100, 1200 range, 20.0s cooldown
Corruption
A corrupted creep takes 30% extra damage from attacks and 15% extra damage from spells for 9 seconds

Level Bonus:
+1.2% damage from attacks
+0.6% damage from spells
+0.3 seconds duration
Download

Toggle Triggers

Autocast

caster_art: AUTOCAST_cooldown: 20.0 AUTOCAST_numBuffsBeforeIdle: 0 AUTOCAST_isExtended: false AUTOCAST_autocastType: AC_TYPE_OFFENSIVE_IMMEDIATE AUTOCAST_manacost: 100 AUTOCAST_range: 1200 AUTOCAST_buffType: 0 AUTOCAST_targetSelf: false AUTOCAST_targetType: 0 target_art: AUTOCAST_autoRange: 800
private function onAutocast takes Tower tower returns nothing
    local unit towerUnit=tower.getUnit()
    local PeriodicEvent pE
    call SetUnitState(towerUnit,UNIT_STATE_MANA,GetUnitState(towerUnit,UNIT_STATE_MANA)+100)
    if tower.userInt!=0 then
        set pE=tower.userInt
        call pE.enable()
    endif
    set towerUnit = null
endfunction

Header

    globals
        BuffType slowAndDamage
        ProjectileType pT
    endglobals
    
    public function hit takes Projectile p, Unit creep returns nothing
        local Tower tower=p.getCaster()
        call tower.doSpellDamage(creep,tower.getLevel()*72+1800,tower.calcSpellCritNoBonus())
        call slowAndDamage.applyCustomPower(tower,creep,3*tower.getLevel()+52,tower.getLevel())
    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 moreDmg=Modifier.create()
        call moreDmg.addModification(MOD_SPELL_DAMAGE_RECEIVED,0.15,0.006)
        call moreDmg.addModification(MOD_ATK_DAMAGE_RECEIVED,0.30,0.012)
        
        set slowAndDamage=BuffType.create(9,0.3,false)
        call slowAndDamage.setBuffIcon('@@0@@')
        call slowAndDamage.setBuffModifier(moreDmg)
        call slowAndDamage.setStackingGroup("DarkBattery")
        
        set pT=ProjectileType.create("Abilities\\Spells\\Items\\OrbCorruption\\OrbCorruptionMissile.mdl",10.0,1200.0)        
        call pT.enableHoming(ProjectileTargetEvent.hit,0.0)
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    call slowAndDamage.applyCustomPower(tower,Event.getTarget(),3*tower.getLevel()+52,tower.getLevel())
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    set tower.userInt=0
    call SetUnitState(tower.getUnit(),UNIT_STATE_MANA,0)
endfunction

Periodic

PERIODIC_period: 0.2
function periodic takes Tower tower returns nothing
    local unit towerUnit=tower.getUnit()
    local Iterate inRange
    local real numResults=0.0
    local Unit result
    local Unit next
    local Projectile p
    local PeriodicEvent pE
    
    if GetUnitState(towerUnit,UNIT_STATE_MANA)>10 then
        //Random creep in range
        set inRange=Iterate.overUnitsInRangeOfCaster(tower,TARGET_CREEPS,1200)
        loop
            set next=inRange.next()
            exitwhen next==0
            
            set numResults=numResults+1.0 
            if GetRandomReal(0.0,1.0)<=1.0/numResults then
                set result=next
            endif
        endloop
        
        if numResults>0.5 then
            if GetRandomReal(0.0,3.0)<=2.0 then
                if GetRandomReal(0.0,2.0)<=1.0 then
                    set p= Projectile.createFromPointToUnit(pT,tower,1.0,1.0,GetUnitX(towerUnit)+35.0,GetUnitY(towerUnit)-12.0,179.0,result,true,false,false)
                else
                    set p= Projectile.createFromPointToUnit(pT,tower,1.0,1.0,GetUnitX(towerUnit)+30.0,GetUnitY(towerUnit)+39.0,141.0,result,true,false,false)
                endif
            else
                set p= Projectile.createFromPointToUnit(pT,tower,1.0,1.0,GetUnitX(towerUnit)-16.0,GetUnitY(towerUnit)+13.0,141.0,result,true,false,false)
            endif
            call p.setScale(0.5)
        endif
        
        //Manacost
        call SetUnitState(towerUnit,UNIT_STATE_MANA,GetUnitState(towerUnit,UNIT_STATE_MANA)-10)
    else
        set pE=Event.getCurrentPeriodicEvent()
        set tower.userInt=pE
        call pE.disable()
    endif
    set towerUnit = null
endfunction
Poison Accumulator v1
3000
ID:
350
Family ID:
Author:
tolleder
Rarity:
rare
Element:
nature
Attack Type:
Decay
Attack Range:
800
Attack CD:
3
Damage:
4933-4933
Mana:
350
Mana regen:
2
Status:
Approved

Description:

A rare tower which can store poison for later use.
Specials:
+10 mana/lvl
Accumulator Overload
The tower attacks creeps in a range of 1200 every 0.2 seconds till all mana is gone. Each attack (or try to attack) costs 10 mana, deals 1800 damage and applies poison.

Level Bonus:
+72 damage

AC_TYPE_OFFENSIVE_IMMEDIATE
 100, 1200 range, 20.0s cooldown
Poison
An infected creep takes 600 spelldamage every second for 9 seconds and is slowed by 10%.

Level Bonus:
+20 poison damage
+0.3 seconds poison duration
+0.4% slow
Download

Toggle Triggers

Autocast

caster_art: AUTOCAST_cooldown: 20.0 AUTOCAST_numBuffsBeforeIdle: 0 AUTOCAST_isExtended: false AUTOCAST_autocastType: AC_TYPE_OFFENSIVE_IMMEDIATE AUTOCAST_manacost: 100 AUTOCAST_range: 1200 AUTOCAST_buffType: 0 AUTOCAST_targetSelf: false AUTOCAST_targetType: 0 target_art: AUTOCAST_autoRange: 800
private function onAutocast takes Tower tower returns nothing
    local unit towerUnit=tower.getUnit()
    local PeriodicEvent pE
    call SetUnitState(towerUnit,UNIT_STATE_MANA,GetUnitState(towerUnit,UNIT_STATE_MANA)+100)
    if tower.userInt!=0 then
        set pE=tower.userInt
        call pE.enable()
    endif
    set towerUnit = null
endfunction

Header

    globals
        BuffType slowAndDamage
        ProjectileType pT
    endglobals
    
    public function damagePeriodic takes Buff b returns nothing //Poisondamage
        local Tower tower=b.getCaster()
        call tower.doSpellDamage(b.getBuffedUnit(),b.getPower()*20+600,tower.calcSpellCritNoBonus())
    endfunction
       
    public function hit takes Projectile p, Unit creep returns nothing
        local Tower tower=p.getCaster()
        call tower.doSpellDamage(creep,tower.getLevel()*72+1800,tower.calcSpellCritNoBonus())
        call slowAndDamage.applyCustomPower(tower,creep,3*tower.getLevel()+60,tower.getLevel())
    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 slow=Modifier.create()
        call slow.addModification(MOD_MOVESPEED,-0.10,-0.004)
        
        set slowAndDamage=BuffType.create(9,0.3,false)
        call slowAndDamage.setBuffIcon('@@0@@')
        call slowAndDamage.addPeriodicEvent(EventHandler.damagePeriodic,1.0)
        call slowAndDamage.setBuffModifier(slow)
        call slowAndDamage.setStackingGroup("PoisonBattery")
        
        set pT=ProjectileType.create("Abilities\\Spells\\Items\\OrbVenom\\OrbVenomMissile.mdl",10.0,1200.0)        
        call pT.enableHoming(ProjectileTargetEvent.hit,0.0)
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    call slowAndDamage.applyCustomPower(tower,Event.getTarget(),3*tower.getLevel()+60,tower.getLevel())
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    set tower.userInt=0
    call SetUnitState(tower.getUnit(),UNIT_STATE_MANA,0)
endfunction

Periodic

PERIODIC_period: 0.2
function periodic takes Tower tower returns nothing
    local unit towerUnit=tower.getUnit()
    local Iterate inRange
    local real numResults=0.0
    local Unit result
    local Unit next
    local Projectile p
    local PeriodicEvent pE
    
    if GetUnitState(towerUnit,UNIT_STATE_MANA)>10 then
        //Random creep in range
        set inRange=Iterate.overUnitsInRangeOfCaster(tower,TARGET_CREEPS,1200)
        loop
            set next=inRange.next()
            exitwhen next==0
            
            set numResults=numResults+1.0 
            if GetRandomReal(0.0,1.0)<=1.0/numResults then
                set result=next
            endif
        endloop
        
        if numResults>0.5 then
            if GetRandomReal(0.0,3.0)<=2.0 then
                if GetRandomReal(0.0,2.0)<=1.0 then
                    set p= Projectile.createFromPointToUnit(pT,tower,1.0,1.0,GetUnitX(towerUnit)+42.0,GetUnitY(towerUnit),83.0,result,true,false,false)
                else
                    set p= Projectile.createFromPointToUnit(pT,tower,1.0,1.0,GetUnitX(towerUnit)-19.0,GetUnitY(towerUnit)-10.0,147.0,result,true,false,false)
                endif
            else
                set p= Projectile.createFromPointToUnit(pT,tower,1.0,1.0,GetUnitX(towerUnit)+7.0,GetUnitY(towerUnit)+23.0,102.0,result,true,false,false)
            endif
            call p.setScale(0.5)
        endif
        
        
        //Manacost
        call SetUnitState(towerUnit,UNIT_STATE_MANA,GetUnitState(towerUnit,UNIT_STATE_MANA)-10)
    else
        set pE=Event.getCurrentPeriodicEvent()
        set tower.userInt=pE
        call pE.disable()
    endif
    set towerUnit = null
endfunction
Fire Accumulator v1
3000
ID:
353
Family ID:
Author:
tolleder
Rarity:
rare
Element:
fire
Attack Type:
Elemental
Attack Range:
800
Attack CD:
3
Damage:
4933-4933
Mana:
350
Mana regen:
2
Status:
Approved

Description:

A tower which can store fire for later use.
Specials:
+10 mana/lvl
Accumulator Overload
The tower attacks creeps in a range of 1200 every 0.2 seconds till all mana is gone. Each attack (or try to attack) costs 10 mana, deals 1800 points damage and incinerates the target.

Level Bonus:
+72 damage

AC_TYPE_OFFENSIVE_IMMEDIATE
 100, 1200 range, 20.0s cooldown
Incinerate
This tower's attacks set the target on fire. A burning creep takes 15% more damage from Fire towers and receives 800 spelldamage every second for 9 seconds

Level Bonus:
+32 damage
+0.3 seconds duration
Download

Toggle Triggers

Autocast

caster_art: AUTOCAST_cooldown: 20.0 AUTOCAST_numBuffsBeforeIdle: 0 AUTOCAST_isExtended: false AUTOCAST_autocastType: AC_TYPE_OFFENSIVE_IMMEDIATE AUTOCAST_manacost: 100 AUTOCAST_range: 1200 AUTOCAST_buffType: 0 AUTOCAST_targetSelf: false AUTOCAST_targetType: 0 target_art: AUTOCAST_autoRange: 800
private function onAutocast takes Tower tower returns nothing
    local unit towerUnit=tower.getUnit()
    local PeriodicEvent pE
    call SetUnitState(towerUnit,UNIT_STATE_MANA,GetUnitState(towerUnit,UNIT_STATE_MANA)+100)
    if tower.userInt!=0 then
        set pE=tower.userInt
        call pE.enable()
    endif
    set towerUnit = null
endfunction

Header

    globals
        BuffType slowAndDamage
        ProjectileType pT
    endglobals
    
    public function damagePeriodic takes Buff b returns nothing //Poisondamage
        local Tower tower=b.getCaster()
        call tower.doSpellDamage(b.getBuffedUnit(),b.getPower()*32+800,tower.calcSpellCritNoBonus())
    endfunction
       
    public function hit takes Projectile p, Unit creep returns nothing
        local Tower tower=p.getCaster()
        call tower.doSpellDamage(creep,tower.getLevel()*72+1800,tower.calcSpellCritNoBonus())
        call slowAndDamage.applyCustomPower(tower,creep,tower.getLevel()+52,tower.getLevel())
    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()
        set slowAndDamage=BuffType.create(9,0.3,false)
            // new fire weakening
        call m.addModification(MOD_DMG_FROM_FIRE, 15/100.0, 0)
        call slowAndDamage.setBuffModifier(m)
            // end new fire
        call slowAndDamage.setBuffIcon('@@0@@')
        call slowAndDamage.addPeriodicEvent(EventHandler.damagePeriodic,1.0)
        call slowAndDamage.setStackingGroup("FireBattery")
        

        set pT=ProjectileType.create("Abilities\\Weapons\\FireBallMissile\\FireBallMissile.mdl",10.0,1200.0)        
        call pT.enableHoming(ProjectileTargetEvent.hit,0.0)
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    call slowAndDamage.applyCustomPower(tower,Event.getTarget(),tower.getLevel()+52,tower.getLevel())
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    set tower.userInt=0
    call SetUnitState(tower.getUnit(),UNIT_STATE_MANA,0)
endfunction

Periodic

PERIODIC_period: 0.2
function periodic takes Tower tower returns nothing
    local unit towerUnit=tower.getUnit()
    local Iterate inRange
    local real numResults=0.0
    local Unit result
    local Unit next
    local Projectile p
    local PeriodicEvent pE
    
    if GetUnitState(towerUnit,UNIT_STATE_MANA)>10 then
        //Random creep in range
        set inRange=Iterate.overUnitsInRangeOfCaster(tower,TARGET_CREEPS,1200)
        loop
            set next=inRange.next()
            exitwhen next==0
            
            set numResults=numResults+1.0 
            if GetRandomReal(0.0,1.0)<=1.0/numResults then
                set result=next
            endif
        endloop
        
        if numResults>0.5 then
            if GetRandomReal(0.0,3.0)<=2.0 then
                if GetRandomReal(0.0,2.0)<=1.0 then
                    set p= Projectile.createFromPointToUnit(pT,tower,1.0,1.0,GetUnitX(towerUnit)-45.0,GetUnitY(towerUnit),217.0,result,true,false,false)
                else
                    set p= Projectile.createFromPointToUnit(pT,tower,1.0,1.0,GetUnitX(towerUnit)+28.0,GetUnitY(towerUnit)+10.0,166.0,result,true,false,false)
                endif
            else
                set p= Projectile.createFromPointToUnit(pT,tower,1.0,1.0,GetUnitX(towerUnit)+40.0,GetUnitY(towerUnit)-46.0,108.0,result,true,false,false)
            endif
            call p.setScale(0.5)
        endif
                            
        //Manacost
        call SetUnitState(towerUnit,UNIT_STATE_MANA,GetUnitState(towerUnit,UNIT_STATE_MANA)-10)
    else
        set pE=Event.getCurrentPeriodicEvent()
        set tower.userInt=pE
        call pE.disable()
    endif
    set towerUnit = null
endfunction
Storm Accumulator v1
3000
ID:
359
Family ID:
Author:
tolleder
Rarity:
rare
Element:
storm
Attack Type:
Energy
Attack Range:
800
Attack CD:
3
Damage:
4933-4933
Mana:
350
Mana regen:
2
Status:
Approved

Description:

A rare tower which can store electricity for later use.
Specials:
+10 mana/lvl
Accumulator Overload
The tower attacks creeps in a range of 1200 every 0.2 seconds till all mana is gone. Each attack (or try to attack) costs 10 mana, deals 1800 spelldamage and electrifies the target.

Level Bonus:
+72 damage

AC_TYPE_OFFENSIVE_IMMEDIATE
 100, 1200 range, 20.0s cooldown
Electrify
The Storm Accumulator's projectiles electrify their target for 9 seconds. Every time an electrified creep is damaged by an attack or spell it has a chance of 20% to take 120% extra damage. 

Level Bonus:
+0.3% chance
+2.4% damage
+0.3 seconds duration
Download

Toggle Triggers

Autocast

caster_art: AUTOCAST_cooldown: 20.0 AUTOCAST_numBuffsBeforeIdle: 0 AUTOCAST_isExtended: false AUTOCAST_autocastType: AC_TYPE_OFFENSIVE_IMMEDIATE AUTOCAST_manacost: 100 AUTOCAST_range: 1200 AUTOCAST_buffType: 0 AUTOCAST_targetSelf: false AUTOCAST_targetType: 0 target_art: AUTOCAST_autoRange: 800
private function onAutocast takes Tower tower returns nothing
    local unit towerUnit=tower.getUnit()
    local PeriodicEvent pE
    call SetUnitState(towerUnit,UNIT_STATE_MANA,GetUnitState(towerUnit,UNIT_STATE_MANA)+100)
    if tower.userInt!=0 then
        set pE=tower.userInt
        call pE.enable()
    endif
    set towerUnit = null
endfunction

Header

    globals
        //@import
        BuffType Tolleder_StormBat_bT
        //@import
        ProjectileType Tolleder_StormBat_pT
    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
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    local integer towerLevel=tower.getLevel()
    //call slowAndDamage.apply(tower,Event.getTarget(),tower.getLevel())
    set Tolleder_StormBat_bT.applyCustomPower(tower,Event.getTarget(),R2I(1000.*(1.2+0.024*I2R(towerLevel))*(0.2+0.003*I2R(towerLevel))),towerLevel).userReal=1.2+0.024*I2R(towerLevel)+1.
    
    
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    set tower.userInt=0
    call SetUnitState(tower.getUnit(),UNIT_STATE_MANA,0)
endfunction

Periodic

PERIODIC_period: 0.2
function periodic takes Tower tower returns nothing
    local unit towerUnit=tower.getUnit()
    local Iterate inRange
    local real numResults=0.0
    local Unit result
    local Unit next
    local Projectile p
    local PeriodicEvent pE
    
    if GetUnitState(towerUnit,UNIT_STATE_MANA)>10 then
        //Random creep in range
        set inRange=Iterate.overUnitsInRangeOfCaster(tower,TARGET_CREEPS,1200)
        loop
            set next=inRange.next()
            exitwhen next==0
            
            set numResults=numResults+1.0 
            if GetRandomReal(0.0,1.0)<=1.0/numResults then
                set result=next
            endif
        endloop
        
        if numResults>0.5 then
            set p= Projectile.createFromPointToUnit(Tolleder_StormBat_pT,tower,1.0,1.0,GetUnitX(towerUnit)+3.0,GetUnitY(towerUnit)-6.0,160.0,result,true,false,false)
            set p.userReal=tower.getLevel()*72+1800
            set p.userReal2=1.2+0.024*I2R(tower.getLevel())
            
            call p.setScale(0.5)
        endif
        
        
        //Manacost
        call SetUnitState(towerUnit,UNIT_STATE_MANA,GetUnitState(towerUnit,UNIT_STATE_MANA)-10)
    else
        set pE=Event.getCurrentPeriodicEvent()
        set tower.userInt=pE
        call pE.disable()
    endif
    set towerUnit = null
endfunction
Afflicted Shrine v1
3000
ID:
362
Family ID:
Author:
SirCoqaLot.
Rarity:
uncommon
Element:
nature
Attack Type:
Essence
Attack Range:
1000
Attack CD:
1.1
Damage:
1393-1493
Status:
Approved

Description:

Something might hatch here soon...ish
Slumbering Parasite
On attack this tower injects an ancient parasite into its target, which surfaces after 3 seconds dealing this tower's attackdamage as Decay damage to the target. Each parasite increases the creep's vulnerability to Nature towers by 4%.

Level Bonus:
+0.08% Nature vulnerability
Download

Toggle Triggers

Header

    globals
    //@import
    BuffType dummy_obelisk_debuff
    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
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
     local Unit target = Event.getTarget()
    local integer id = target.getUID()
    local integer level = tower.getLevel()
    
    call dummy_obelisk_debuff.applyCustomTimed(tower,target,0,3/tower.getProp_BuffDuration()) // applying the dummy buff to show the effect on the unot
    call target.modifyProperty(MOD_DMG_FROM_NATURE,0.04+level*0.0008) // mod property 
    
    call TriggerSleepAction(3.0)    // 3 seconds before the parasite surfaces again
    
    if target.getUID() == id then 
        call tower.doCustomAttackDamage(target,tower.getCurrentAttackDamageWithBonus(),tower.calcAttackMulticrit(0,0,0),AttackType.DECAY) //do the dmg
        call SFXAtUnit("Objects\\Spawnmodels\\Undead\\CryptFiendEggsack\\CryptFiendEggsack.mdl",target.getUnit()) //effekt
        call target.modifyProperty(MOD_DMG_FROM_NATURE,-0.04-level*0.0008) // end the modification
    endif
endfunction