Wooden Trap v1
50
ID:
325
Family ID:
Author:
Boekie
Rarity:
uncommon
Element:
iron
Attack Type:
Physical
Attack Range:
950
Attack CD:
1.3
Damage:
38-38
Status:
Approved

Description:

This trap is used to capture beasts but it works on other stuff too.
Activate Trap
Every 15 seconds this tower traps 3 creeps in 950 range, dealing 70 spelldamage and stunning them for 0.5 seconds.

Level Bonus:
+3 spelldamage 
-0.2 seconds cooldown
Download

Toggle Triggers

Header

    globals
    endglobals
    
    //@export
    function trap takes Tower tower, real cooldown, real baseDamage, real damageAdd, real stunDuration, integer maxTargets returns nothing
        local integer lvl = tower.getLevel()
        local Iterate it = Iterate.overUnitsInRangeOfCaster(tower,TARGET_CREEPS,950)
        local Unit next = it.nextRandom()
        local integer numTargets = 0

        loop
            exitwhen next == 0
            set numTargets = numTargets + 1
            call cb_stun.applyOnlyTimed(tower, next, stunDuration) 
            call tower.doSpellDamage(next,baseDamage+lvl*damageAdd,tower.calcSpellCritNoBonus())
            call SFXAtUnit("Abilities\\Spells\\Orc\\ReinforcedTrollBurrow\\ReinforcedTrollBurrowTarget.mdl",next.getUnit())
            exitwhen numTargets >= maxTargets
            set next = it.nextRandom()
        endloop
        
        if next != 0 then 
            call it.destroy()
        endif
        
        if numTargets > 0 then
            call Event.getCurrentPeriodicEvent().enableAdvanced(cooldown - lvl*0.2, false) //Trapping successful; go into cooldown.
        else
            call Event.getCurrentPeriodicEvent().enableAdvanced(2, false) //Nothing trapped; go into a shorter cooldown.
        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
    endfunction

Periodic

PERIODIC_period: 2
function periodic takes Tower tower returns nothing
    call trap(tower, 15, 70, 3, 0.5, 3)
endfunction
Advanced Wooden Trap v1
200
ID:
623
Family ID:
Author:
Boekie
Rarity:
uncommon
Element:
iron
Attack Type:
Physical
Attack Range:
950
Attack CD:
1.3
Damage:
141-141
Status:
Approved

Description:

This trap is used to capture beasts but it works on other stuff too.
Activate Trap
Every 14 seconds this tower traps 3  creeps in 950 range, dealing 270 spelldamage and stunning them for 0.75 seconds.

Level Bonus:
+15 spelldamage 
-0.2 seconds cooldown
Download

Toggle Triggers

Header

    globals
    endglobals
    
    //@import
    function trap takes Tower tower, real cooldown, real baseDamage, real damageAdd, real stunDuration, integer maxTargets 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

Periodic

PERIODIC_period: 2
function periodic takes Tower tower returns nothing
    call trap(tower, 14, 270, 15, 0.75, 3)
endfunction
Iron Trap v1
650
ID:
624
Family ID:
Author:
Boekie
Rarity:
uncommon
Element:
iron
Attack Type:
Physical
Attack Range:
950
Attack CD:
1.3
Damage:
441-441
Status:
Approved

Description:

This trap is used to capture beasts but it works on other stuff too.
Activate Trap
Every 13 seconds this tower traps 4 creeps in 950 range, dealing 650 spelldamage and stunning them for 1 second.

Level Bonus:
+33 spelldamage 
-0.2 seconds cooldown
Download

Toggle Triggers

Header

    globals
    endglobals
    
    //@import
    function trap takes Tower tower, real cooldown, real baseDamage, real damageAdd, real stunDuration, integer maxTargets 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

Periodic

PERIODIC_period: 2
function periodic takes Tower tower returns nothing
    call trap(tower, 13, 650, 33, 1, 4)
endfunction
Advanced Iron Trap v1
1500
ID:
625
Family ID:
Author:
Boekie
Rarity:
uncommon
Element:
iron
Attack Type:
Physical
Attack Range:
950
Attack CD:
1.3
Damage:
942-942
Status:
Approved

Description:

This trap is used to capture beasts but it works on other stuff too.
Activate Trap
Every 12 seconds this tower traps 4 creeps in 950 range, dealing 1500 spelldamage and stunning them for 1.25 seconds.

Level Bonus:
+75 spelldamage 
-0.2 seconds cooldown
Download

Toggle Triggers

Header

    globals
    endglobals
    
    //@import
    function trap takes Tower tower, real cooldown, real baseDamage, real damageAdd, real stunDuration, integer maxTargets 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

Periodic

PERIODIC_period: 2
function periodic takes Tower tower returns nothing
    call trap(tower, 12, 1500, 75, 1.25, 4)
endfunction
Steel Trap v1
2500
ID:
626
Family ID:
Author:
Boekie
Rarity:
uncommon
Element:
iron
Attack Type:
Physical
Attack Range:
950
Attack CD:
1.3
Damage:
1409-1409
Status:
Approved

Description:

This trap is used to capture beasts but it works on other stuff too.
Activate Trap
Every 11 seconds this tower traps 5 creeps in 950 range, dealing 2000 spelldamage and stunning them for 1.5 seconds.

Level Bonus:
+100 spelldamage 
-0.2 seconds cooldown
Download

Toggle Triggers

Header

    globals
    endglobals
    
    //@import
    function trap takes Tower tower, real cooldown, real baseDamage, real damageAdd, real stunDuration, integer maxTargets 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

Periodic

PERIODIC_period: 2
function periodic takes Tower tower returns nothing
    call trap(tower, 11, 2000, 100, 1.5, 5)
endfunction