Fire Star v1
3000
ID:
374
Family ID:
Author:
cedi
Rarity:
unique
Element:
fire
Attack Type:
Elemental
Attack Range:
1000
Attack CD:
2
Damage:
900-900
Status:
Approved

Description:

The fire star, a war machine created by the mightiest fire lords to defend the old palace.
Burning Barrage:
Attacks up to 14 targets at once.
Burn!
When this tower damages a creep it will ignite and take the towers damage as attack damage every 2 seconds. The buff slows movement speed by 5%, lasts 2.5 seconds and stacks. Each stack increases the damage by 5% and the slow by 1%.

Level Bonus:
+4% initial damage
+0.2% damage per stack
Double the Trouble
When this tower damages a creep it has a 12.5% chance to launch an additional projectile that deals the same damage as a normal attack.

Level Bonus:
+0.5% chance
Download

Toggle Triggers

Header

    globals
        ProjectileType PT
        BuffType BT
    endglobals
    
    function refresh takes Buff B returns nothing
        set B.userReal = B.userReal + 0.05 + 0.002 * B.getCaster().getLevel()
    endfunction
    
    function periodic takes Buff B returns nothing
        local Tower T = B.getCaster()

        call T.doAttackDamage( B.getBuffedUnit(), T.getCurrentAttackDamageWithBonus() * B.userReal, T.calcAttackMulticrit(0,0,0))
    endfunction
    
    function Hit takes Projectile p, Unit t returns nothing
        local Tower T = p.getCaster()
        local Buff B
        local integer i
        set B = t.getBuffOfType( BT )
        if ( B != 0 ) then
            set i = B.getPower() + 1
            set B = BT.applyCustomPower( T, t, 1, i )
        else
            set i = 0
            set B = BT.applyCustomPower( T, t, 1, i )
            set B.userReal = 1.00 + 0.04 * T.getLevel()
        endif
        call T.doAttackDamage( t, T.getCurrentAttackDamageWithBonus(), T.calcAttackMulticrit(0,0,0))
    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 PT = ProjectileType.create( "Abilities\\Weapons\\LordofFlameMissile\\LordofFlameMissile.mdl", 7.00, 1000.00 )
        call PT.enableHoming( Hit, 0.00 )
        
        set BT = BuffType.create( 2.5, 0.00, false )
        call BT.setBuffIcon( '@@1@@' )
        call m.addModification( MOD_MOVESPEED, -0.05, -0.01 )
        call BT.setBuffModifier( m )
        call BT.setEventOnRefresh( refresh )
        call BT.addPeriodicEvent( periodic, 2.00 )
    endfunction

On Damage

ONDAMAGE_chance: 1.00 ONDAMAGE_chanceLevelAdd: 0.00
function onDamage takes Tower tower returns nothing
    local Buff B
    local integer i
    set B = Event.getTarget().getBuffOfType( BT )
    if ( B != 0 ) then
        set i = B.getPower() + 1
        set B = BT.applyCustomPower( tower, Event.getTarget(), 1, i )
    else
        set i = 0
        set B = BT.applyCustomPower( tower, Event.getTarget(), 1, i )
        set B.userReal = 1.00 + 0.04 * tower.getLevel()
    endif
    
    if tower.calcChance( 0.125 + tower.getLevel() * 0.005 ) then
        //Double the trouble
        call Projectile.createFromUnitToUnit( PT, tower, 1.00, 1, tower, Event.getTarget(), true, false, false )
    endif
endfunction
Militia Blockpost v1
3000
ID:
420
Family ID:
Author:
ShyGnome
Rarity:
uncommon
Element:
iron
Attack Type:
Physical
Attack Range:
850
Attack CD:
0.7
Damage:
853-853
Status:
Approved

Description:

Militia guardians rain axes at the heads of the enemies. However, they are not very accurate, and afraid of undead and large creeps. Not that it matters, because none will pass beyond this Blockpost.
Specials:
-20% dmg to bosses (+0.9%/lvl)
-20% dmg to undead (+0.7%/lvl)
+20% dmg to nature (+0.7%/lvl)
Hail of Axes
Militia guardians throw axes to up to 3 enemies at once, but each attack has 33% chance to miss.  If there are less creeps than attacks, the remaining axes will hit the main target.

Level Bonus:
-1.2% chance to miss
+1 target at levels 15 and 25
Download

Toggle Triggers

Header

   globals
      //@import
      ProjectileType MilitiaAxe
   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 integer attacks = 2
    local boolean add = false
    local Unit maintarget = Event.getTarget()
    local Unit target
    local Iterate it = Iterate.overUnitsInRangeOfUnit(tower,TARGET_TYPE_CREEPS,maintarget,450)
    local real sidearc = 0.20
    local boolean itDestroyed = false
 
    if tower.getLevel() >= 15 then
        set attacks = attacks + 1
    endif

    if tower.getLevel() >= 25 then
        set attacks = attacks + 1
    endif
    
    loop
        exitwhen attacks == 0 // Exit when all attacks are fired
        
        // If the Iterate is not destroyed, get the next target
        if not itDestroyed then
            set target = it.next()
        
            // If there are no more targets
            if target == 0 then
                set itDestroyed = true // Iterate is destroyed (auto destroy)
                set target = maintarget // target is the maintarget now
            endif
        endif
  
        // If there are no more units, shoot at the maintarget (itDestroyed). If there are units then don't shoot at the maintarget
        if itDestroyed or target != maintarget then
            call Projectile.createBezierInterpolationFromUnitToUnit(MilitiaAxe,tower,0,0,tower,target,0,sidearc,0,true).setScale(0.40)
            set attacks = attacks - 1
            set sidearc = -sidearc
            if add then
                set sidearc = sidearc + 0.20
            endif
            set add = not add
        endif

    endloop
 
    // If the Iterate is not destroyed yet, destroy it
    if not itDestroyed then
        call it.destroy()
    endif  
endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    if tower.calcBadChance(0.33-0.012*tower.getLevel()) then
        set Event.damage = 0
        call tower.getOwner().displayFloatingTextX("Miss",tower,255, 0, 0,255,0.05,0.0,2.0)
    endif
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    set tower.userInt = 4 // Save the family member (1 = first member)
    set tower.userInt2 = 0 // Used to save the buff (double linked list)
endfunction
Cruel Inferno v1
3000
ID:
467
Family ID:
Author:
Boekie
Rarity:
rare
Element:
fire
Attack Type:
Decay
Attack Range:
900
Attack CD:
1.5
Damage:
3501-3501
Status:
Approved

Description:

An aura tower which gives towers a bonus crit chance.
Fire of Fury - Aura
Increases crit chance of towers in 300 range by 10%. 

Level Bonus:
+0.4% chance
Download

Toggle Triggers

Header

    globals     
    
    BuffType boekie_crit_aura  
    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
    
        local Modifier m = Modifier.create()
        set boekie_crit_aura = BuffType.createAuraEffectType(true)
        call m.addModification(MOD_ATK_CRIT_CHANCE,0.10,0.004)
        call boekie_crit_aura.setBuffModifier(m)
        call boekie_crit_aura.setStackingGroup("crit_aura")
        call boekie_crit_aura.setBuffIcon('@@0@@')
    
    endfunction

Tower Aura

AURA_auraEffect: boekie_crit_aura AURA_power: 0 AURA_level: 0 AURA_auraRange: 300 AURA_targetType: TARGET_TYPE_TOWERS AURA_levelAdd: 1 AURA_powerAdd: 1 AURA_targetSelf: true
Monkey Boogie Palm v1
3000
ID:
531
Family ID:
Author:
cedi
Rarity:
rare
Element:
nature
Attack Type:
Physical
Attack Range:
825
Attack CD:
3
Damage:
1-1
Status:
Approved

Description:

Fall, fall, fall, little nuts, right on the heads of the little noobs...
Specials:
+50% dmg to orcs (+1%/lvl)
+40% dmg to humanoids (+1%/lvl)
Coconut Rain
Each time this tower attacks there is a chance to drop multiple coconuts. The chance to drop a coconut is 100% for the 1st one and after each coconut the chance is decreased by 17%. Each coconut deals 2600 spelldamage in 190 AoE and stuns for 0.5 seconds. Hit units are immune to the stun of this ability for the next 1.5 seconds.

Level Bonus:
+260 damage
Download

Toggle Triggers

Header

    globals
        ProjectileType cedi_Coco
        //@import
        BuffType cedi_Coco_Buff
    endglobals
    
    function cedi_Coco_Impact takes Projectile p returns nothing
        local Unit target
        local Unit caster = p.getCaster()
        local Iterate I = Iterate.overUnitsInRange( caster, TARGET_CREEPS, p.x, p.y, 190.00 )
        local real dmg = 2600.00 + I2R( caster.getLevel() ) * 260.00 
        call DestroyEffect( AddSpecialEffect( "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl", p.x, p.y ) )
        loop
            set target = I.next()
            exitwhen target == 0
            call caster.doSpellDamage( target, dmg, caster.calcSpellCritNoBonus() )
            if ( target.getBuffOfType( cedi_Coco_Buff ) == 0 ) then
                call cb_stun.applyOnlyTimed( caster, target, 0.5 )
                call cedi_Coco_Buff.applyOnlyTimed( caster, target, 1.5 )
            endif
        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
        set cedi_Coco = ProjectileType.create( "abilities\\weapons\\catapult\\catapultmissile.mdl", 4.00, 0.00 )
        call cedi_Coco.enablePhysics( 0, cedi_Coco_Impact, -15.00, 0, 1.00 )
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    local real chance = 1.00
    local integer casts = 0
    local Unit u = Event.getTarget()
    local Projectile p
    local real x = u.getX()
    local real y = u.getY()
    local real range
    local real angle
    loop
        if tower.calcChance( chance ) then
            set casts = casts + 1
            set chance = chance * 0.83
        else
            exitwhen true
        endif
    endloop
    loop
        exitwhen casts <= 0
        set range = GetRandomReal( 0.00, 300.00 )
        set angle = GetRandomReal( 0.00, 360.00 ) * bj_DEGTORAD
        set p = Projectile.create( cedi_Coco, tower, 1.00, tower.calcSpellCritNoBonus(), x + Cos( angle ) * range, y + Sin( angle ) * range, 1000.00, 0.00 )
        call p.setScale( 0.30 )
        call p.setGravity( GetRandomReal( 1.00, 1.50 ) )
        set casts = casts - 1
    endloop
endfunction
Icy Flower v1
3000
ID:
543
Family ID:
Author:
geX
Rarity:
rare
Element:
ice
Attack Type:
Elemental
Attack Range:
1000
Attack CD:
1.5
Damage:
3275-3769
Status:
Approved

Description:

Superior Aura Tower with a strong frost slow aura
Frost Aura - Aura
Slows movementspeed of enemies in 1100 range by 25%. 

Level Bonus:
+0.6% slow
Download

Toggle Triggers

Header

    globals
        //@import
        BuffType gex_frost_aura
    endglobals
    

    private function init takes nothing returns nothing
    endfunction

Tower Aura

AURA_auraEffect: gex_frost_aura AURA_power: 250 AURA_level: 250 AURA_auraRange: 1100 AURA_targetType: TARGET_TYPE_CREEPS AURA_levelAdd: 6 AURA_powerAdd: 6 AURA_targetSelf: false
Storm Coil v1
3000
ID:
576
Family ID:
Author:
SirCoqaLot.
Rarity:
unique
Element:
storm
Attack Type:
Energy
Attack Range:
1000
Attack CD:
4
Damage:
3270-3270
Mana:
50
Mana regen:
1
Status:
Approved

Description:

Strong storm tower that creates a magnetic surge beneath a target dealing damage as it moves. Deals more damage and slows the further away the target is.
Magnetic Surge
This tower creates a magnetic surge at its target's current location. The creep will suffer spell damage equal to 4 times the distance to the spot where the surge was created every 0.4 seconds. This effect lasts 4 seconds. 

Level Bonus:
+2% spell damage 
+0.1 seconds duration

AC_TYPE_OFFENSIVE_BUFF
 40, 1000 range, 4s cooldown
Overload
On attack this tower deals [distance to the target x 12] energy damage, modified by its attack damage and slows the target for 1.5 seconds. The further away the target is, the more it will be slowed down. The maximum slow of 30% can only be reached, if the target has the maximum distance to the tower.
Energetic Field - Aura
Units in 1000 range around this tower are dealt up to 20% bonus damage by Storm towers. The further away creeps are from tower, the more damage is dealt. 

Level Bonus:
+0.6% maximum damage
Download

Toggle Triggers

Autocast

AUTOCAST_cooldown: 4 AUTOCAST_autoRange: 1000 AUTOCAST_manacost: 40 AUTOCAST_range: 1000 AUTOCAST_targetType: TARGET_TYPE_CREEPS AUTOCAST_numBuffsBeforeIdle: 1 caster_art: target_art: AUTOCAST_autocastType: AC_TYPE_OFFENSIVE_BUFF AUTOCAST_buffType: 0 AUTOCAST_isExtended: false AUTOCAST_targetSelf: false
private function onAutocast takes Tower tower returns nothing
    local Unit creep = Event.getTarget()
    local Buff b = sir_tesla_debuff.applyAdvanced(tower,creep,0,0,4.0+tower.getLevel()*0.1)
    set b.userReal = GetUnitX(creep.getUnit())
    set b.userReal2= GetUnitY(creep.getUnit())
endfunction

Header

    globals
    BuffType sir_tesla_debuff
    BuffType sir_tesla_slow 
    BuffType sir_tesla_aura
    endglobals
    
    
    public function sirTeslaPeriodic takes Buff b returns nothing
        local Unit target = b.getBuffedUnit()
        local Tower tower = b.getCaster()
        local real x1 = GetUnitX(target.getUnit())
        local real y1 = GetUnitY(target.getUnit())
        local real originx = b.userReal
        local real originy = b.userReal2
        call tower.doSpellDamage(target,4*SquareRoot((originx - x1)*(originx - x1) + (originy - y1)*(originy - y1))*(1 + tower.getLevel()*0.02),tower.calcSpellCritNoBonus())
        call tower.getOwner().displayFloatingTextX(I2S(R2I(4*SquareRoot((originx - x1)*(originx - x1) + (originy - y1)*(originy - y1))*(1 + tower.getLevel()*0.02))),target,150, 150, 255,255,0.05,0.0,2.0)
        call SFXAtUnit("Abilities\\Spells\\Items\\AIlb\\AIlbSpecialArt.mdl",target.getUnit())
    endfunction
    
    function sir_tesla_event takes Buff b returns nothing
        local Tower tower = b.getCaster()
        local Unit creep = b.getBuffedUnit()
        local real tx = tower.getX()
        local real ty = tower.getY()
        local real dx = creep.getX()-tx
        local real dy = creep.getY()-ty
        local real range = SquareRoot(dx * dx + dy * dy)
        
        if Element.STORM == Event.getTarget().getCategory() then
            set Event.damage = Event.damage * (range * (0.00020+tower.getLevel()*0.000006) + 1)
        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()
    set sir_tesla_slow = BuffType.create(0,0,false)
    call sir_tesla_slow.setBuffIcon('@@1@@')
    call m.addModification(MOD_MOVESPEED,0,-0.0001)
    call sir_tesla_slow.setBuffModifier(m) 
    set sir_tesla_debuff = BuffType.create(0,0,false)
    call sir_tesla_debuff.setBuffIcon('@@0@@')
    call sir_tesla_debuff.setStackingGroup("sir_tesla_debuff")
    call sir_tesla_debuff.addPeriodicEvent(sirTeslaPeriodic,0.4) 
    set sir_tesla_aura = BuffType.createAuraEffectType(false)
    call sir_tesla_aura.addEventOnDamaged(sir_tesla_event,1,0)
    call sir_tesla_aura.setBuffIcon('@@2@@')
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    local Unit target = Event.getTarget()
    local real tx = tower.getX()
    local real ty = tower.getY()
    local real dx = target.getX()-tx
    local real dy = target.getY()-ty
    local real range = SquareRoot(dx * dx + dy * dy)
    local real damage = (R2I(range)*12.0)*tower.getCurrentAttackDamageWithBonus()/tower.getBaseDamage()
    call tower.doAttackDamage(target,R2I(damage),tower.calcAttackMulticrit(0,0,0))
    call tower.getOwner().displayFloatingTextX(I2S(R2I(damage)),target,255, 200, 0,255,0.05,0.0,2.0)
    call sir_tesla_slow.applyAdvanced(tower,target,0,R2I(range*3),1.5)
endfunction

Tower Aura

AURA_powerAdd: 0 AURA_auraEffect: sir_tesla_aura AURA_levelAdd: 0 AURA_power: 0 AURA_targetType: TARGET_TYPE_CREEPS AURA_targetSelf: true AURA_level: 0 AURA_auraRange: 1000
Sacred Altar v1
3000
ID:
607
Family ID:
Author:
Boekie
Rarity:
unique
Element:
nature
Attack Type:
Essence
Attack Range:
875
Attack CD:
2.5
Damage:
3052-3052
Status:
Approved

Description:

This sacred altar can control the growth of plants.
Gift of Nature - Aura
All towers in 175 range will receive a gift of nature. When a gifted tower attacks a creep there is a 10% attackspeed adjusted chance to entangle that creep for 1.2 seconds, dealing 700 damage per second. Does not work on air units or bosses!

Level Bonus:
+0.2% chance 
+35 additional damage
Download

Toggle Triggers

Header

    globals
    BuffType boekie_entangle_buff
    BuffType boekie_entangle_aura 
    endglobals
    
    function entangle takes Buff b returns nothing  
        local Tower  caster = b.getCaster()  
        local Tower  tower = b.getBuffedUnit() 
        local Creep target = Event.getTarget()
        
        if caster.calcChance((0.10+(0.002*caster.getLevel()))*tower.getBaseAttackspeed()) then 
            if target.getSize() < SIZE_BOSS and target.getSize() != SIZE_AIR then
                call boekie_entangle_buff.apply(caster, target, caster.getLevel()) 
            endif
        endif       
    endfunction 
    
    function entangleDamage takes Buff b returns nothing  
        local Tower t = b.getCaster()  
        local Creep c = b.getBuffedUnit()
        call t.doSpellDamage(c, 700 + 35 * b.getLevel(), t.calcSpellCritNoBonus())
    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 boekie_entangle_buff = BuffType.createDuplicate(cb_stun, 1.2, 0, false)
        call boekie_entangle_buff.setBuffIcon('@@0@@') 
        call boekie_entangle_buff.addPeriodicEvent(entangleDamage, 1.0)
        set boekie_entangle_aura = BuffType.createAuraEffectType(true)
        call boekie_entangle_aura.setStackingGroup("entangle_aura")
        call boekie_entangle_aura.setBuffIcon('@@1@@') 
        call boekie_entangle_aura.addEventOnAttack(entangle,  1.0, 0.0) 
    endfunction

Tower Aura

AURA_auraEffect: boekie_entangle_aura AURA_power: 0 AURA_level: 0 AURA_auraRange: 175 AURA_targetType: TARGET_TYPE_TOWERS AURA_levelAdd: 1 AURA_powerAdd: 1 AURA_targetSelf: true