Fully Grown Tuskar v1
2900
ID:
144
Family ID:
Author:
Palandu
Rarity:
uncommon
Element:
ice
Attack Type:
Elemental
Attack Range:
900
Attack CD:
1.9
Damage:
4918-4918
Status:
Approved

Description:

Still uses childish tactics.
Specials:
+12% dmg to champions (+0.8%/lvl)
+15% dmg to bosses (+1.4%/lvl)
-20% dmg to air
Vicious Snow Ball
Throws a fast snowball on attack at the target's head when it's not facing this tower. But the snowball only has a 20% chance to hit, where it hits is decided by the angle of attack.

Temple Crusher : If it hits side-on, does 120% of its attack damage as spell damage and a 1 second stun.

Knockdown : If it hits the back of the head, does 40% of its attack damage as spell damage and a 0.8 second stun.

Level Bonus:
+1.4% chance to hit.
Download

Toggle Triggers

Header

    globals
        //@import
        ProjectileType billy_SnowBall
    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 Unit u = Event.getTarget()
        local real facingDelta
        local real unitToTowerVector = Atan2(tower.getY() - u.getY(), tower.getX() - u.getX())*bj_RADTODEG
        local Projectile p
        
        if (unitToTowerVector < 0) then
           set unitToTowerVector = unitToTowerVector + 360
        endif
        
        set facingDelta = unitToTowerVector - GetUnitFacing(u.getUnit()) 
        
        if (facingDelta < 0) then               
            set facingDelta = facingDelta + 360
        endif
        
        if (facingDelta > 180) then
            set facingDelta = 360 - facingDelta
        endif
        
        if facingDelta >=80 then   //launch
            set p = Projectile.createFromUnitToUnit(billy_SnowBall, tower, 100, 0, tower, Event.getTarget(), true, false, true)
            call p.setScale(1.8)
            if facingDelta <=100 then   //temple shot
                set p.userInt2=1
                set p.userReal=tower.getCurrentAttackDamageWithBonus()*1.2
                set p.userReal2=1.0
            else                        //back of the head
                set p.userInt2=2
                set p.userReal=tower.getCurrentAttackDamageWithBonus()*0.4
                set p.userReal2=0.8            
            endif
            
            //decide hit/miss
            if tower.calcChance(0.20+(1.4*I2R(tower.getLevel())/100)) then
                set p.userInt = 1 //hit
            else
                set p.userInt = 0 //miss
            endif
        endif
endfunction
Adored Brazier v1
2900
ID:
281
Family ID:
Author:
SirCoqaLot.
Rarity:
uncommon
Element:
fire
Attack Type:
Elemental
Attack Range:
865
Attack CD:
0.7
Damage:
1278-1358
Status:
Approved

Description:

Basic tower with high attackspeed and a multicritchance.
Specials:
15% crit chance (+1.5%/lvl)
x1.7 crit damage (+x0.03/lvl)
2 x multicrit
Download
The Council of Demons v1
2900
ID:
295
Family ID:
Author:
DaveMatthews
Rarity:
unique
Element:
darkness
Attack Type:
Magic
Attack Range:
850
Attack CD:
1
Damage:
1335-1335
Mana:
100
Mana regen:
2
Status:
Approved

Description:

Every 1000 years, the most powerful demons meet in a council.
Impenetrable Darkness
Shrouds an enemy in darkness, slowing it by 40% for 5 seconds and reducing the damage it takes from attacks by 95%. The affected unit takes 1000 spell damage per second and additional spell damage equal to 75% of the damage it received during the effect when the buff expires. This damage can't be a critical hit. 

Level Bonus:
+40 damage per second 
+1% damage on expire 
+0.8% slow

AC_TYPE_OFFENSIVE_BUFF
 90, 850 range, 8s cooldown
Maledict
Whenever this tower damages a unit, it has a 20% chance to increase the damage that unit receives from spells by 20% for 5 seconds. Every time the buffed unit is targeted by a spell this tower deals additional spell damage equal to 3 times the caster goldcost to it. 

Level Bonus:
+0.4% chance 
+0.6% spell damage received
Demonic Edict - Aura
Whenever a tower in 400 range casts a spell on a creep, this tower fires a projectile from the casting unit to its current target, dealing [2 x caster goldcost x spell cd] spell damage. The casting tower also has its mana regeneration increased by 100% for 3 seconds. 

Level Bonus:
+2% mana regeneration
Download

Toggle Triggers

Autocast

AUTOCAST_cooldown: 8 AUTOCAST_autoRange: 850 AUTOCAST_manacost: 90 AUTOCAST_range: 850 AUTOCAST_targetType: TARGET_TYPE_CREEPS AUTOCAST_numBuffsBeforeIdle: 1 caster_art: target_art: Abilities\Weapons\AvengerMissile\AvengerMissile.mdl AUTOCAST_autocastType: AC_TYPE_OFFENSIVE_BUFF AUTOCAST_buffType: dave_cod AUTOCAST_isExtended: false AUTOCAST_targetSelf: false
private function onAutocast takes Tower tower returns nothing
    set dave_cod.apply(tower,Event.getTarget(),tower.getLevel()).userReal = 0
endfunction

Header

    globals
    BuffType dave_cod
    BuffType dave_maledict
    BuffType dave_demonic_pray
    BuffType dave_demonic_mana
    ProjectileType dave_pray_projectile
    endglobals
    
     function dot takes Buff b returns nothing
         local Tower T = b.getCaster()
         local integer level = T.getLevel()
         call T.doSpellDamage(b.getBuffedUnit(), 1000+(40*level), T.calcSpellCritNoBonus())
     endfunction
     
     function damageStore takes Buff b returns nothing
        set b.userReal = b.userReal + Event.damage
     endfunction
     
     function damage takes Buff b returns nothing
         local Tower T = b.getCaster()
         local integer level = T.getLevel()
         local Unit target = b.getBuffedUnit()
         local real final = b.userReal*(0.75+(0.01*level))
         
         call T.doSpellDamage(target, final, 1)
         call SFXAtUnit("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl", target.getUnit())
         call T.getTeam().displayFloatingText(I2S(R2I(final)), target,50,50,50) 
     endfunction
     
     function maledicted takes Buff b returns nothing
         local Tower tower = b.getCaster()
         local Tower caster = Event.getTarget()
         local Unit target = b.getBuffedUnit()
         local integer gold = caster.getGoldcost()
         
         if not target.isImmune() then
            call tower.doSpellDamage(target,3*gold,tower.calcSpellCritNoBonus())
            call SFXAtUnit("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl", target.getUnit())
         endif
     endfunction
     
     function pray takes Buff b returns nothing
        local Tower tower = b.getCaster()
        local Tower caster = b.getBuffedUnit()
        local Unit target = Event.getTarget()
        local Projectile p
        local integer gold = caster.getGoldcost()
        local real cd = Event.getAutocastType().getCooldown()
     
        if target.isACreep() then
            call SFXAtUnit("Abilities\\Spells\\Undead\\Sleep\\SleepSpecialArt.mdl", caster.getUnit())
            set p = Projectile.createFromUnitToUnit(dave_pray_projectile, tower, cd*gold, 1, caster, target, true, false, true)
            call dave_demonic_mana.apply(tower, caster, tower.getLevel())
        endif
     endfunction
     
     function prayHit takes Projectile p, Unit creep returns nothing
        local Tower tower = p.getCaster()
        call tower.doSpellDamage(creep,2,tower.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
        local Modifier m = Modifier.create()
        local Modifier n = Modifier.create()
        local Modifier o = Modifier.create()
        
        set dave_cod = BuffType.create(5,0,false)
        call dave_cod.setBuffModifier(n)
        call n.addModification(MOD_MOVESPEED,-0.4,-0.006)
        call n.addModification(MOD_ATK_DAMAGE_RECEIVED,-0.95,0)
        call dave_cod.setBuffIcon( '@@0@@' )
        call dave_cod.addPeriodicEvent(dot,1.0)
        call dave_cod.addEventOnDamaged(EventHandler.damageStore,1,0)
        call dave_cod.setEventOnExpire(EventHandler.damage)
        
        set dave_maledict = BuffType.create(5,0,false)
        call dave_maledict.setBuffModifier(m)
        call m.addModification(MOD_SPELL_DAMAGE_RECEIVED,0.2,0.006)
        call dave_maledict.setBuffIcon('@@1@@')
        call dave_maledict.addEventOnSpellTarget(maledicted)
        
        set dave_demonic_mana = BuffType.create(3,0,true)
        call dave_demonic_mana.setBuffModifier(o)
        call o.addModification(MOD_MANA_REGEN_PERC,1,0.02)
        call dave_demonic_mana.setBuffIcon('@@3@@')
        
        set dave_demonic_pray = BuffType.createAuraEffectType(true)
        call dave_demonic_pray.setBuffIcon('@@2@@')
        call dave_demonic_pray.addEventOnSpellCast(EventHandler.pray)
        
        set dave_pray_projectile = ProjectileType.create("Abilities\\Weapons\\DemonHunterMissile\\DemonHunterMissile.mdl",4,1300)
        call dave_pray_projectile.enableHoming(ProjectileTargetEvent.prayHit,0)
         
    endfunction

On Damage

ONDAMAGE_chance: 0.2 ONDAMAGE_chanceLevelAdd: 0.004
function onDamage takes Tower tower returns nothing
 local Creep creep = Event.getTarget()
 local integer level = tower.getLevel()
 
 call dave_maledict.apply(tower, creep, level)
endfunction

Tower Aura

AURA_powerAdd: 0 AURA_auraEffect: dave_demonic_pray AURA_levelAdd: 0 AURA_power: 1 AURA_targetType: TARGET_TYPE_TOWERS AURA_targetSelf: true AURA_level: 1 AURA_auraRange: 400
Forest Protectress v1
2900
ID:
386
Family ID:
Author:
cedi
Rarity:
unique
Element:
nature
Attack Type:
Physical
Attack Range:
900
Attack CD:
2.2
Damage:
2896-2896
Status:
Approved

Description:

The Forest Protectress is a mighty ancient figther. With the powers to melt with the surrounding landscape. Sometime ago, she lost faith in her god Elune and broke the connection. Because of this she lost some of her strength.
Specials:
+6% damage/lvl
Protectress's Wrath
Each attack has a [seconds since last attack x 5]% chance to deal an extra 50% attack damage to all units in 250 range around the target. The maximum chance is 75%. Slows all damaged units by 50% for 1.5 seconds. Increased attackspeed decreases time needed to gain a charge.

Level Bonus:
+2% damage
+0.04 seconds
Meld with the Forest
The Protectress gains 18% additional attack damage for each second she doesn't attack. There is a maximum of 12 seconds. On attack the bonus disappears. Increased attackspeed decreases the time needed to gain a charge.

Level Bonus:
+1% damage per second
Strike the Unprepared - Aura
Increases the attack critical chance of towers in 175 range by 0.25% for each 1% hp the attacked creep has left.

Level Bonus:
+0.01% attack crit chance
Download

Toggle Triggers

Header

    globals
        BuffType BT
        BuffType AURA
    endglobals
    
    function startAura takes Buff B returns nothing
        set B.userReal = 0.0
    endfunction
    
    function attack takes Buff B returns nothing
        local Tower T = B.getBuffedUnit()
        local Unit U = Event.getTarget()
        local real r = GetUnitState( U.getUnit(), UNIT_STATE_LIFE ) / GetUnitState( U.getUnit(), UNIT_STATE_MAX_LIFE )
        set r = r * ( 0.25 + B.getCaster().getLevel() * 0.01 )
        
        call T.modifyProperty( MOD_ATK_CRIT_CHANCE, -B.userReal )
        call T.modifyProperty( MOD_ATK_CRIT_CHANCE, r )
        
        set B.userReal = r
    endfunction
    
    function end takes Buff B returns nothing
        call B.getBuffedUnit().modifyProperty( MOD_ATK_CRIT_CHANCE, -B.userReal )
    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 BT = BuffType.create( 1.5, 0.04, true )
        call m.addModification( MOD_MOVESPEED, -0.50, 0.00 )
        call BT.setBuffIcon( '@@0@@' )
        call BT.setBuffModifier( m )
        
        set AURA = BuffType.createAuraEffectType( true )
        call AURA.setBuffIcon( '@@1@@' )
        call AURA.addEventOnCreate( startAura )
        call AURA.addEventOnAttack( attack, 1.0, 0.0 )
        call AURA.addEventOnCleanup( end )
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    local Iterate I
    local Unit U
    if ( tower.calcChance( 0.05 * tower.userInt ) ) then
        set I = Iterate.overUnitsInRangeOfUnit( tower, TARGET_TYPE_CREEPS, Event.getTarget(), 250.00 )
        call SFXAtUnit( "Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl", Event.getTarget().getUnit() )
        call tower.doAttackDamageAoEUnit( Event.getTarget(), 250.00, tower.getCurrentAttackDamageWithBonus() * ( 0.5 + 0.02 * tower.getLevel() ), tower.calcAttackMulticrit(0,0,0), 0.00 )
        loop
            set U = I.next()
            exitwhen U == 0
            call BT.apply( tower, Event.getTarget(), tower.getLevel() )
        endloop
    endif
    call SetUnitVertexColor( tower.getUnit(), 255, 255, 255, 255 )
    call tower.modifyProperty( MOD_DAMAGE_ADD_PERC, -tower.userReal2 )
    set tower.userReal2 = 0.00
    set tower.userInt = 0
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    set tower.userInt = 0
    set tower.userReal2 = 0.00
endfunction

Periodic

PERIODIC_period: 1.00
function periodic takes Tower tower returns nothing
    local integer i = tower.getLevel()
    local PeriodicEvent P = Event.getCurrentPeriodicEvent()
    local real r = tower.getCurrentAttackspeed() / 2.2
    
    if tower.userInt < 12 then
        set tower.userInt = tower.userInt + 1
        call SetUnitVertexColor( tower.getUnit(), 255, 255, 255, 255 - 15 * tower.userInt )
        call tower.modifyProperty( MOD_DAMAGE_ADD_PERC, 0.18 + i * 0.01 )
        set tower.userReal2 = tower.userReal2 + 0.18 + i * 0.01
    endif
    
    call P.enableAdvanced( r, false )
endfunction

Tower Aura

AURA_powerAdd: 1 AURA_auraEffect: AURA AURA_levelAdd: 1 AURA_power: 0 AURA_targetType: TARGET_TYPE_TOWERS AURA_targetSelf: true AURA_level: 0 AURA_auraRange: 175
Elder Polar Bear v1
2950
ID:
10
Family ID:
Author:
SirCoqaLot.
Rarity:
uncommon
Element:
ice
Attack Type:
Elemental
Attack Range:
900
Attack CD:
1.3
Damage:
2127-2227
Status:
Approved

Description:

Fast tower that is focused on dealing damage while cooling itself down.
Specials:
Splash attack:
   300 AoE: 35% damage
Cold Feet
On attack this tower cools down decreasing its attackspeed by 5% and increasing the damage it deals by 30%. The cold lasts for 6 seconds and stacks up to 10 times. 

Level Bonus:
-1% attackspeed reduction at level 15 and 25
Download

Toggle Triggers

Header

    globals
    //@import
    BuffType sir_frost_furbolg
    //@import
    BuffType sir_frost_furbolg2
    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 power = 30
    set tower.userInt = IMinBJ(tower.userInt + 1, 10)

    if tower.getLevel() < 15 then
        set power = 50
    elseif tower.getLevel() < 25 then
        set power = 40
    endif
    call sir_frost_furbolg.applyAdvanced(tower,tower,tower.userInt,tower.userInt*power,6.0)
    call sir_frost_furbolg2.applyAdvanced(tower,tower,tower.userInt,tower.userInt*300,6.0)
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    set tower.userInt = 0
endfunction
Bug City v1
3000
ID:
27
Family ID:
Author:
Majildian
Rarity:
uncommon
Element:
darkness
Attack Type:
Physical
Attack Range:
725
Attack CD:
1.5
Damage:
3818-3917
Status:
Approved

Description:

A huge colony of bugs.
Swarm of Bugs
On kill, produces bugs that increase the base damage of this tower by 30. The damage gain decreases by 1 for every 6 productions, down to a minimum of 1.

Number of produced bugs is retained through upgrade and applied with the upgrade's values. Replacing a tower from a different family will produce bugs from 60% of its total kills.
Download

Toggle Triggers

On Kill

function onKill takes Tower tower returns nothing
    call tower.modifyProperty(MOD_DAMAGE_BASE,IMaxBJ(30 - tower.userInt/6,1))
    set tower.userInt = tower.userInt+1
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    local Tower prev = Event.getPrecedingTower()
    local integer N
    local integer mults
    if prev != 0 then
        if prev.getFamily() == tower.getFamily() then
            set tower.userInt  = prev.userInt
        else
            set tower.userInt  = R2I(prev.getKills()*0.6)
        endif
    
        //sadly, using inlined constants gives us things like 6-1 and 6+0.5 instead of 5 and 6.5
        set mults = tower.userInt /6 //full growth multiples in all kills
        if mults >= 30 then //mults until minimum of 1
            set mults = 30-1
        endif
        
        //Since the equation is linear:
        //[Average growth over N] * N + remaining growth * (total kills - N)
        set N = mults*6
        set N = R2I((30 + 0.5-mults/2.0)*N) + (tower.userInt-N)*(30-mults)
        call tower.modifyProperty(MOD_DAMAGE_BASE,N)
    else
        //if no predecessor, initialize with zeros
        set tower.userInt = 0 //counted kills
    endif
endfunction
Monolith of Chaos v1
3000
ID:
36
Family ID:
Author:
cedi
Rarity:
unique
Element:
darkness
Attack Type:
Decay
Attack Range:
750
Attack CD:
0.8
Damage:
1589-1589
Status:
Approved

Description:

An old relict from the time of the first war against the burning legion. It brings pure chaos to everthing around it.
Specials:
+25% dmg to humanoids (+1%/lvl)
Chaos
All creeps that come in 750 range around this tower have a 45% chance to lose 100% of their armor for 3 seconds. The armor reduction is halved for Bosses and Challenges.

Level Bonus:
+0.1 seconds
+0.4% chance
Download

Toggle Triggers

Header

    globals
        BuffType cedi_MoC
    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 cedi_MoC = BuffType.create( 3.00, 0.1, false )
        call cedi_MoC.setBuffIcon( '@@0@@' )
        call m.addModification( MOD_ARMOR_PERC, -1.00, 0.50 )
        call cedi_MoC.setBuffModifier( m )
    endfunction

On Unit Comes In Range

UNITINRANGE_targetType: TARGET_TYPE_CREEPS UNITINRANGE_range: 750
function onUnitInRange takes Tower tower returns nothing
    local Unit U = Event.getTarget()
    local integer i = tower.getLevel()
    if tower.calcChance( 0.45 + i * 0.004 ) then
        if ( U.getSize() < SIZE_BOSS ) then
            call cedi_MoC.applyCustomTimed( tower, U, 0, 3.00 + 0.1 * i )
        else
            call cedi_MoC.applyCustomTimed( tower, U, 1, 3.00 + 0.1 * i )
        endif
    endif
endfunction