Mighty Elemental Ghost v1
1900
ID:
136
Family ID:
Author:
Der_kleine_Tomy
Rarity:
uncommon
Element:
fire
Attack Type:
Essence
Attack Range:
950
Attack CD:
2
Damage:
3225-3225
Status:
Approved

Description:

A mysterious Ghost, which deals different damage types.
Specials:
+0.8% trigger chances/lvl
Elemental Wrath
The Elemental Ghost has a 22.5% chance to unleash it's wrath on attack, increasing its trigger chance by 15% for 5 seconds. Cannot retrigger during Elemental Wrath.

Level Bonus:
+0.1 seconds duration
+0.8% trigger chance increase
Mimic
The Ghost's attacks are varied, and its damage type will either be good or bad against its target. Trigger chance adjusts the good/bad attacks to be better.
Download

Toggle Triggers

Header

    globals
        //@import
        BuffType tomy_ElementalWrath
    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: 0.225 ONATTACK_chanceLevelAdd: 0.0
function onAttack takes Tower tower returns nothing
    if tower.getBuffOfType(tomy_ElementalWrath) == 0 then
        call tomy_ElementalWrath.applyCustomTimed(tower, tower, 150 + tower.getLevel() * 8, 5.0 + 0.1 * tower.getLevel())
    endif
endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
 
    local Creep target = Event.getTarget()
    local boolean immune = target.isImmune()
    local boolean sif = target.getArmorType() == ARMOR_SIF
    local boolean zod = target.getArmorType() == ARMOR_ZOD
    local integer level = tower.getLevel()
    local real damageadd
    local real posDamageTypes = 3
  
    if immune then
        set posDamageTypes = 2
    endif
  
    if GetRandomInt(1, 100) > 50 then
        if sif or zod then
            set damageadd = 1.00
        elseif tower.calcChance(1.00/posDamageTypes) then
            set damageadd = 1.80
        elseif not immune and tower.calcChance(1.00/(posDamageTypes - 1)) then
            set damageadd = 1.50
        else
            set damageadd = 1.20
        endif
    else
        if zod then
            set damageadd = 0.90
        elseif sif then
            if not immune or (immune and tower.calcChance(0.50)) then
                set damageadd = 0.40
            else
                set damageadd = 0.00
            endif
        elseif tower.calcChance(1.00/(6.00-posDamageTypes)) then
            set damageadd = 1.00
        elseif tower.calcChance(1.00/(6.00-(posDamageTypes + 1))) then
            set damageadd = 0.90
        elseif not immune or (immune and tower.calcChance(1.00/(6.00-(posDamageTypes + 2)))) then
            set damageadd = 0.60
        else
            set damageadd = 0.00
        endif
    endif
  
    set Event.damage = Event.damage * damageadd
    if damageadd > 1.00 then
        call tower.getOwner().displaySmallFloatingText(formatFloat(damageadd,2), tower, 0, 255, 0, 40)
    elseif damageadd < 1.00 then
        call tower.getOwner().displaySmallFloatingText(formatFloat(damageadd,2), tower, 255, 0, 0, 40)
    else
        call tower.getOwner().displaySmallFloatingText(formatFloat(damageadd,2), tower, 255, 255, 255, 40)
    endif
endfunction
Frenzied Zealot v1
1900
ID:
194
Family ID:
Author:
dzk87
Rarity:
rare
Element:
storm
Attack Type:
Physical
Attack Range:
875
Attack CD:
2
Damage:
3798-4065
Status:
Approved

Description:

Driven by zealotry, this unit is exceptionally good in physical combat.
Lightning Shield
As the zealot gets pumped up debuff durations are reduced by 8% with each stack of Zeal.
Zeal
Each attack works the Zealot into a greater frenzy, increasing his attack speed by 3% from each tower in 175 range. These towers have their attack speed slowed by 3%. Both effects stack up to 5 times and last 2.5 seconds. The attack speed amount reduces slightly with more towers.
Only towers that cost 750 gold or more are affected by this.

Level Bonus:
+1 max stack per 5 levels
Phase Blade
Each attack on the same creep penetrates deeper through its armor. Per attack 6% of this tower's attack damage won't be reduced by armor resistances. This effect stacks up to 5 times.

Level Bonus:
+0.24% damage per stack
Download

Toggle Triggers

Header

    globals
        //@import
        BuffType storm_zealot_fury
        //@import 
        BuffType storm_zealot_wound
        //@import
        BuffType storm_zealot_slow
        //@import
        BuffType storm_zealot_shield
    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
    local Tower u
    local Iterate it = Iterate.overUnitsInRangeOfCaster(tower, TARGET_TOWERS, 175.0)
    local integer leechCounter = 0
    local integer leechPower
    local integer maxStacks = 5 + tower.getLevel()/5
 
    loop 
        set u = it.next()
        exitwhen u == 0 
        if u != tower and u.getGoldcost() >= 750 then
            set leechCounter = leechCounter + 1
        endif 
    endloop
    
    if leechCounter == 0 then
        return
    endif
    
    set leechPower = 315 - 15*leechCounter
 
    set it = Iterate.overUnitsInRangeOfCaster(tower, TARGET_TOWERS, 175.0)
    
    // Slows all towers in 175 range
    loop 
        set u = it.next()
        exitwhen u == 0 
        if u != tower and u.getGoldcost() >= 750 then
            set b = u.getBuffOfType(storm_zealot_slow)
            if b != 0 then
                set b.userInt = IMinBJ(b.userInt + 1, maxStacks)
                call storm_zealot_slow.applyCustomPower(tower, u, b.userInt, leechPower*b.userInt)
            else
                set storm_zealot_slow.applyCustomPower(tower, u, 1, leechPower).userInt = 1
            endif
        endif 
    endloop

    set leechPower = leechPower * leechCounter //in a way that's the per stack base
    set b = tower.getBuffOfType(storm_zealot_fury)
    
    //now apply zeal
    if b != 0 then
        call storm_zealot_fury.apply(tower, tower, IMinBJ(leechPower + b.getLevel(), leechPower * maxStacks))
    else
        call storm_zealot_fury.apply(tower, tower, leechPower) //used normal apply so power = level
    endif
    
    set b = tower.getBuffOfType(storm_zealot_shield)
    
   if b != 0 then
        if b.userInt < maxStacks then 
            set b.userInt = b.userInt + 1 
            if b.userInt == maxStacks then 
                if b.userInt2 == 0 then
                    set b.userInt2 = Effect.createScaled("Abilities\\Spells\\Human\\ManaShield\\ManaShieldCaster.mdl", tower.getX(), tower.getY(), 140, 0, 0.69) 
                    call Effect(b.userInt2).noDeathAnimation()
                endif
            endif 
        endif
        
        call storm_zealot_shield.apply(tower, tower, 800 * b.userInt) 
    else 
        set b = storm_zealot_shield.apply(tower, tower, 800)
        set b.userInt = 1
        set b.userInt2 = 0
    endif
endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    local Creep target = Event.getTarget()
    local Buff phaseWound = target.getBuffOfType(storm_zealot_wound) 
    local real damageBase = Event.damage
    local real totalArmorPierce
    local real temp = AttackType.PHYSICAL.getDamageAgainst(target.getArmorType()) 

    if Event.isSpellDamage() or not Event.isMainTarget() then
        return
    endif
    
    //first check+upgrade the wound level
    if phaseWound == 0 then
        set phaseWound = storm_zealot_wound.apply(tower, target, 1)
        set phaseWound.userInt = 1 //stack counter
        set phaseWound.userInt2 = tower.getUID()
    else
        if phaseWound.userInt2 != tower.getUID() then
            return
        endif
        set phaseWound.userInt = IMinBJ(5, phaseWound.userInt + 1)
        call phaseWound.refreshDuration()
    endif
        
    if temp > 0.001 and temp < 1. then //ignoring armor type "resistance" not weakness :P 
        set damageBase = damageBase / temp 
    endif 
    
    set temp = 1 - target.getCurrentArmorDamageReduction()
    
     if temp > 0.001 and temp < 1. then 
        set damageBase = damageBase / temp 
    endif 
    
    set totalArmorPierce = (0.06 + 0.0024*tower.getLevel()) * phaseWound.userInt
    
    if Event.damage < damageBase then 
        set Event.damage = damageBase*totalArmorPierce + Event.damage*(1.-totalArmorPierce) 
    endif 
endfunction
Adult Northern Troll v1
1900
ID:
250
Family ID:
Author:
DaveMatthews
Rarity:
rare
Element:
ice
Attack Type:
Elemental
Attack Range:
800
Attack CD:
2
Damage:
3697-3697
Status:
Approved

Description:

Wanders in the cold northern lands, looking for preys.
Specials:
+15% dmg to orcs (+0.3%/lvl)
+15% dmg to humanoids (+0.3%/lvl)
Ice Smashing Axe
On attack this tower has a 15% chance to throw a giant axe. The axe shatters all the buffs from its target and deals 25% of the tower's attack damage as elemental damage for each buff purged. If more than 5 buffs are removed the enemy is also stunned for 1.5 seconds (0.75 on bosses). The axe is so heavy that its wielder's attack speed is slowed by 30% for 3 seconds after throwing it. 

Level Bonus:
+0.5% damage per buff 
-0.4% attack speed reduction
Ice Coated Axes
This tower deals 0.65% bonus damage for every 1% movement speed the target is missing. 

Level Bonus:
+0.025% damage
Download

Toggle Triggers

Header

    globals
        //@import
        BuffType dave_fatigue
        //@import
        ProjectileType dave_axe
    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: 0.15 ONATTACK_chanceLevelAdd: 0.0
function onAttack takes Tower tower returns nothing
    local Projectile p
    local Unit creep = Event.getTarget()
    local integer level = tower.getLevel()

    set p = Projectile.createLinearInterpolationFromUnitToUnit(dave_axe, tower,1,1, tower, creep, 0.2, true)
    set p.userReal = 0.25+0.005*level
    call p.setScale(1.5)
    call dave_fatigue.apply(tower,tower,level)
endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    local Creep creep = Event.getTarget()
    local integer level= tower.getLevel()
    local real speed = creep.getBaseMovespeed()
    local real currentSpeed = creep.getCurrentMovespeed()
    local real slow
    local real damage
    if currentSpeed < speed then
        set slow = (speed - currentSpeed) / speed
        set damage = Event.damage*slow*(0.65+0.025*level)
        set Event.damage = Event.damage+damage
        call tower.getOwner().displaySmallFloatingText("+"+I2S(R2I(damage)),creep,100,100,255,0)
    endif
endfunction
Nightmarish Bat v1
1900
ID:
260
Family ID:
Author:
DaveMatthews
Rarity:
rare
Element:
darkness
Attack Type:
Decay
Attack Range:
900
Attack CD:
1.2
Damage:
1861-1861
Mana:
50
Mana regen:
1.5
Status:
Approved

Description:

Like a bat out of hell I'll be gone when the morning comes!
Engulfing Darkness
This tower engulfs itself in darkness, gaining power as if it's night for 5 seconds.

AC_TYPE_OFFENSIVE_BUFF
 45, 0 range, 6s cooldown
Bat Swarm
This tower has a 15% chance on attack to release a swarm of bats, dealing 1650 spell damage at nighttime or 550 spell damage at daytime to all enemies in a cone. The cone grows from a 100 AoE radius at the start to a 300 AoE radius at the end. 

Level Bonus:
+0.2% chance 
+45 damage during night 
+15 damage during day
Creature of the Night
This tower deals 150% damage during nighttime and 50% damage during daytime. 

Level Bonus:
+0.6% damage during night 
+0.3% damage during day
Download

Toggle Triggers

Autocast

caster_art: Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl AUTOCAST_cooldown: 6 AUTOCAST_numBuffsBeforeIdle: 1 AUTOCAST_isExtended: false AUTOCAST_autocastType: AC_TYPE_OFFENSIVE_BUFF AUTOCAST_manacost: 45 AUTOCAST_range: 0 AUTOCAST_buffType: dave_darkness AUTOCAST_targetSelf: true AUTOCAST_targetType: TARGET_TYPE_TOWERS target_art: AUTOCAST_autoRange: 0
private function onAutocast takes Tower tower returns nothing
call dave_darkness.apply(tower,tower,tower.getLevel())
endfunction

Header

    globals
    //@import
    BuffType dave_darkness
    //@import
    Cast dave_bats
    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: 0.15 ONATTACK_chanceLevelAdd: 0.002
function onAttack takes Tower tower returns nothing
local real time = GetFloatGameState(GAME_STATE_TIME_OF_DAY)
local integer level = tower.getLevel()

if time >= 18.00 or time < 6.00 or tower.getBuffOfType(dave_darkness)!=0 then
   call dave_bats.targetCastFromCaster(tower, Event.getTarget(), 1650+(45*level), tower.calcSpellCritNoBonus())
else
   call dave_bats.targetCastFromCaster(tower, Event.getTarget(), 550+(15*level), tower.calcSpellCritNoBonus())
endif
endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
local real time = GetFloatGameState(GAME_STATE_TIME_OF_DAY)
local integer level = tower.getLevel()

if time >= 18.00 or time < 6.00 or tower.getBuffOfType(dave_darkness)!=0 then
   set Event.damage = Event.damage*(1.5+0.006*level)
else
   set Event.damage = Event.damage*(0.5+0.003*level)
endif
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
call AddUnitAnimationProperties(tower.getUnit(), "stand alternate", false)
endfunction
Gnoll Lightning Caller v1
1900
ID:
326
Family ID:
Author:
cedi
Rarity:
rare
Element:
storm
Attack Type:
Energy
Attack Range:
1200
Attack CD:
0.75
Damage:
222-222
Mana:
20
Mana regen:
1
Status:
Approved

Description:

Gnollssss!
Thunder Shock
Deals [2900 + (870 x amount of player towers)] spell damage to a target creep. This ability has a 25% chance to recast itself when cast. Maximum of 1 extra cast.

Level Bonus:
+116 base spelldamage
+34.8 spelldamage per player tower
+1 extra cast at levels 15 and 25

AC_TYPE_OFFENSIVE_UNIT
 12, 1200.00 range, 3.0s cooldown
Download

Toggle Triggers

Autocast

caster_art: Abilities\Spells\Orc\Purge\PurgeBuffTarget.mdl AUTOCAST_cooldown: 3.0 AUTOCAST_numBuffsBeforeIdle: 1 AUTOCAST_isExtended: false AUTOCAST_autocastType: AC_TYPE_OFFENSIVE_UNIT AUTOCAST_manacost: 12 AUTOCAST_range: 1200.00 AUTOCAST_buffType: 0 AUTOCAST_targetSelf: true AUTOCAST_targetType: TARGET_TYPE_CREEPS target_art: Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl AUTOCAST_autoRange: 1200.00
private function onAutocast takes Tower tower returns nothing
    local Unit U = Event.getTarget()
    local integer lvl = tower.getLevel()
    local integer i = tower.userInt
    local Iterate I
    local boolean b
    call tower.doSpellDamage( U, 2900.00 + 116.00 * lvl + ( 870.00 + 34.8 * lvl ) * tower.getOwner().getNumTowers(), tower.calcSpellCritNoBonus() )
    if tower.calcChance( 0.25 ) then
        call tower.getOwner().displaySmallFloatingText( "MULTICAST!", tower, 0, 255, 0, 0.00 )
        loop
            exitwhen i <= 0
            set I = Iterate.overUnitsInRangeOfCaster( tower, TARGET_CREEPS, 1200.00 )
            set b = true
            loop
                if i <= 0 then
                    //enough hits
                    call I.destroy()
                    exitwhen true
                endif
                set U = I.next()
                if U == 0 and b then
                    //no units near
                    return
                endif
                set b = false
                exitwhen U == 0
                call SFXAtUnit( "Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl", U.getUnit() )
                call tower.doSpellDamage( U, 2900.00 + 116.00 * lvl + ( 870.00 + 34.8 * lvl ) * tower.getOwner().getNumTowers(), tower.calcSpellCritNoBonus() )
                set i = i - 1
            endloop
        endloop
    endif
endfunction

Header

    globals
        MultiboardValues MBV
    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
        set MBV = MultiboardValues.create( 1 )
        call MBV.setKey( 0, "Thunder Shock Dmg" )
    endfunction

On Level Up

function onLevelUp takes Tower tower returns nothing
    local integer lvl = tower.getLevel()
    if lvl < 15 then
        set tower.userInt = 1
    elseif lvl >= 15 and lvl < 25 then
        set tower.userInt = 2
    elseif lvl == 25 then
        set tower.userInt = 3
    endif
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    local integer lvl = tower.getLevel()
    if lvl < 15 then
        set tower.userInt = 1
    elseif lvl >= 15 and lvl < 25 then
        set tower.userInt = 2
    elseif lvl == 25 then
        set tower.userInt = 3
    endif
endfunction

On Tower Details

function onTowerDetails takes Tower tower returns MultiboardValues
    local real r = 2900.00 + 116.00 * tower.getLevel() + ( 870.00 + 34.8 * tower.getLevel() ) * tower.getOwner().getNumTowers()
    call MBV.setValue( 0, R2S( r ) )
    return MBV
endfunction
Afflicted Altar v1
1900
ID:
361
Family ID:
Author:
SirCoqaLot.
Rarity:
uncommon
Element:
nature
Attack Type:
Essence
Attack Range:
1000
Attack CD:
1.13
Damage:
944-1044
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 3.5%.

Level Bonus:
+0.07% 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.035+level*0.0007) // 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.035-level*0.0007) // end the modification
    endif
endfunction
Elder Jungle Stalker v1
1900
ID:
549
Family ID:
Author:
Boekie
Rarity:
rare
Element:
nature
Attack Type:
Physical
Attack Range:
850
Attack CD:
1.1
Damage:
1300-1399
Status:
Approved

Description:

This tower becomes enraged when it kills a unit and also gets stronger with every critical hit.
Specials:
17.5% crit chance (+0.5%/lvl)
Feral Aggression
On every critical hit this tower gains +0.3% bonus damage. This bonus is permanent and has a maximum of 225% bonus damage.
Bloodthirst
Whenever this tower kills a unit it becomes enraged, gaining +125% attackspeed for 4 seconds. Cannot retrigger while active!

Level Bonus:
+0.05 sec duration
+1% attackspeed
Download

Toggle Triggers

Header

    globals
        //@import
        BuffType boekie_rage_buff
        //@import
        MultiboardValues boekie_jungle_stalker_values
    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 real damageBonus

    if Event.isAttackDamageCritical() and tower.userReal <= 2.25 then 
        set tower.userReal = tower.userReal + 0.003
        call tower.modifyProperty(MOD_DAMAGE_ADD_PERC, 0.003)
    endif
endfunction

On Kill

function onKill takes Tower tower returns nothing
    local integer lvl = tower.getLevel() 
    if tower.getBuffOfType(boekie_rage_buff) == 0 then  
        call boekie_rage_buff.applyCustomTimed(tower, tower, 25+lvl, 4.0+0.05*lvl)
    endif
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    local Tower preceding = Event.getPrecedingTower()  
    local real damageBonus 

    if(preceding.getFamily() == tower.getFamily()) then  
        set damageBonus = preceding.userReal 
        set tower.userReal = damageBonus 
        call tower.modifyProperty(MOD_DAMAGE_ADD_PERC, damageBonus)  
    else  
        set tower.userReal = 0.0 //Damage bonus  
    endif 
endfunction

On Tower Details

function onTowerDetails takes Tower tower returns MultiboardValues
    call boekie_jungle_stalker_values.setValue(0, formatPercent(tower.userReal, 1))
    return boekie_jungle_stalker_values
endfunction