Astral Rift v1
3000
ID:
46
Family ID:
Author:
i_mOck_death
Rarity:
unique
Element:
astral
Attack Type:
Energy
Attack Range:
750
Attack CD:
1.5
Damage:
2151-2151
Mana:
180
Mana regen:
2.5
Status:
Approved

Description:

A powerful vortex with the ability to move things through space itself.
Spacial Rift
Whenever this tower damages a creep it has a 10% chance to move that creep back by 175 units. Upon triggering there is a further 15% chance that all creeps in 175 AoE of the target will also be moved back 175 units. Costs 30 mana. Chance is halved for bosses.  The original target and creeps around it will get startled and become slowed by 30% for 2 seconds in a 250 AoE.  

Level Bonus:
+0.4% chance to move creep
+1 units moved 
+1 slow and unit move AoE
+1% slow
Presence of the Rift - Aura
The Astral Rift's presence is so powerful that it damages creeps equal to 200% of their movement speed every second in an area of 750.

Level Bonus:
+16% damage increase
Download

Toggle Triggers

Header

    globals
        BuffType mOck_AstralRift
        BuffType mOck_AstralRift_Slow
    endglobals
    
    //Do not remove or rename this function!
    //Put your initialization tasks here, this function will be called on map init
    function SPDamage takes Buff b returns nothing
        local Creep c = b.getBuffedUnit()
        local Tower t = b.getCaster()
        call t.doSpellDamage(c,GetUnitMoveSpeed(c.getUnit())*((t.getLevel()*.16)+2),t.calcSpellCritNoBonus())
    endfunction
    
    private function init takes nothing returns nothing
        local Modifier Bmod = Modifier.create()
    
        set mOck_AstralRift_Slow = BuffType.create(2,0,false)
        set mOck_AstralRift = BuffType.createAuraEffectType(false)
        
        call mOck_AstralRift.addPeriodicEvent(EventHandler.SPDamage, 1.00 )
        call Bmod.addModification(MOD_MOVESPEED,-.3,-.01)
        call mOck_AstralRift_Slow.setBuffModifier(Bmod)
        call mOck_AstralRift.setStackingGroup("rift_aura")
        call mOck_AstralRift.setBuffIcon('@@0@@')
        call mOck_AstralRift_Slow.setBuffIcon('@@1@@')
    endfunction

On Damage

ONDAMAGE_chance: .10 ONDAMAGE_chanceLevelAdd: 0.004
function onDamage takes Tower tower returns nothing
    local Creep target = Event.getTarget()
    local Creep creep
    local integer level = tower.getLevel()
    local real facing
    local real newX
    local real newY
    local Iterate it

    if (target.getSize() < SIZE_BOSS or GetRandomInt(0,1) == 1) and tower.subtractMana(30,false) == 30 then
        call Effect.createScaled("Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCaster.mdl", tower.getX()-16, tower.getY()-16, 10, 0, 30).setLifetime(1)
        //Move the creep(s).
        call Effect.createSimple("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl",target.getX(),target.getY()).destroy()
        set facing = GetUnitFacing(target.getUnit()) - 180
        if tower.calcChance(0.15) then
            //Move all units around the target.
            set it = Iterate.overUnitsInRangeOfUnit(tower, TARGET_CREEPS, target, 175.0 + level)
            loop 
                set creep = it.next()
                exitwhen creep == 0
                set newX = creep.getX() + (175+level) * Cos(facing * bj_DEGTORAD)
                set newY = creep.getY() + (175+level) * Sin(facing * bj_DEGTORAD)
                call creep.moveToPoint(newX,newY,true)
            endloop
        else
            //Move target only.
            set newX = target.getX() + (175+level) * Cos(facing * bj_DEGTORAD)
            set newY = target.getY() + (175+level) * Sin(facing * bj_DEGTORAD)
            call target.moveToPoint(newX,newY,true)
        endif
        //Apply slow
        call Effect.create("Abilities\\Spells\\Other\\Silence\\SilenceAreaBirth.mdl", target.getX(), target.getY(), 50, 0).setLifetime(1)
        set it = Iterate.overUnitsInRangeOfUnit(tower, TARGET_CREEPS, target, 250 + level)
        loop 
            set creep = it.next()
            exitwhen creep == 0
            call mOck_AstralRift_Slow.apply(tower, creep, level)
        endloop
    endif
endfunction

Tower Aura

AURA_auraEffect: mOck_AstralRift AURA_power: 0 AURA_level: 0 AURA_auraRange: 750 AURA_targetType: TARGET_TYPE_CREEPS AURA_levelAdd: 1 AURA_powerAdd: 1 AURA_targetSelf: false
Mud Golem v1
3000
ID:
47
Family ID:
Author:
SirCoqaLot.
Rarity:
unique
Element:
nature
Attack Type:
Decay
Attack Range:
750
Attack CD:
2.2
Damage:
2327-2734
Status:
Approved

Description:

Advanced nature tower that will deal damage in an AoE around itself and will slow damaged targets. Also gives nearby towers a chance to deal damage and slow targets in an AoE around iteself.
Specials:
Attacks GROUND only
Ground Smash
On damage this tower deals 4300 decay damage to all creeps in 750 range around it, slowing them by 60%  for 0.5 seconds.

Hint: The damage of this ability is improved by spell damage.

Level Bonus:
+230 damage 
+0.012 seconds slow duration 
+50 range at level 25.
Earthquake Aura - Aura
Towers in 150 range around the Mud Golem have a 3% attackspeed adjusted chance on attack to trigger Ground Smash.

Level Bonus:
+0.04% chance
Download

Toggle Triggers

Header

    globals
    BuffType sir_golem_slow
    BuffType sir_golem_aura
    endglobals
    
    
    function smash takes Tower tower returns nothing
    local integer level = tower.getLevel()
    local Iterate i
    local Creep u
    
     if level == 25 then
            set i = Iterate.overUnitsInRangeOfCaster(tower,TARGET_TYPE_CREEPS,800)
        else
            set i = Iterate.overUnitsInRangeOfCaster(tower,TARGET_TYPE_CREEPS,750)
      endif
   
        loop
            set u = i.next()
            exitwhen u == 0
            if u.getSize() != SIZE_AIR then
                call sir_golem_slow.applyCustomTimed(tower,u,600,0.5+level*0.012)
                call tower.doAttackDamage(u,(4300+level*230)*tower.getProp_SpellDmgDealt(),tower.calcSpellCritNoBonus())
            endif
        endloop
    
    endfunction
      
    private function aoeOnAtk takes Buff b returns nothing
    local Tower tower = b.getCaster()
    local Tower buffed = b.getBuffedUnit()
    
    if buffed.calcChance((0.03+0.0004*tower.getLevel())*buffed.getBaseAttackspeed()) then
        call smash(tower)
    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() 
    call m.addModification(MOD_MOVESPEED,0,-0.001) 
    set sir_golem_slow = BuffType.create(0,0,false) // apply custom timed  
    set sir_golem_aura = BuffType.createAuraEffectType(true)
    call sir_golem_slow.setBuffIcon('@@0@@')
    call sir_golem_aura.setBuffIcon('@@1@@')
    call sir_golem_slow.setBuffModifier(m) 
    call sir_golem_slow.setStackingGroup("sirGolemSlow")
    call sir_golem_aura.addEventOnAttack(EventHandler.aoeOnAtk,1,0)
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    call smash(tower)   
endfunction

Tower Aura

AURA_auraEffect: sir_golem_aura AURA_power: 0 AURA_level: 0 AURA_auraRange: 150 AURA_targetType: TARGET_TYPE_TOWERS AURA_levelAdd: 0 AURA_powerAdd: 0 AURA_targetSelf: true
Lunar Defender v1
3000
ID:
51
Family ID:
Author:
SirCoqaLot.
Rarity:
uncommon
Element:
astral
Attack Type:
Energy
Attack Range:
1200
Attack CD:
2
Damage:
1350-1370
Status:
Approved

Description:

The spirit of a watcher left to look over the ruins.
Lunar Grace
Smites a target creep dealing 2500 spelldamage to it. There is a 12.5% chance to empower the smite with lunar energy dealing 2500 additional spell damage, stunning the target for 0.3 seconds and making it receive 24% more damage from spells for 2.5 seconds.

Level Bonus:
+100 inital and chanced spell damage 
+0.5% chance 
+1000 initial damage at level 15 
+6% spell damage received at level 15 
+0.1 seconds stun at level 25

AC_TYPE_OFFENSIVE_UNIT
 0, 1200 range, 2s cooldown
Download

Toggle Triggers

Autocast

caster_art: AUTOCAST_cooldown: 2 AUTOCAST_numBuffsBeforeIdle: 0 AUTOCAST_isExtended: true AUTOCAST_autocastType: AC_TYPE_OFFENSIVE_UNIT AUTOCAST_manacost: 0 AUTOCAST_range: 1200 AUTOCAST_buffType: 0 AUTOCAST_targetSelf: false AUTOCAST_targetType: 0 target_art: Abilities\Spells\Items\AIil\AIilTarget.mdl AUTOCAST_autoRange: 1200
private function onAutocast takes Tower tower returns nothing
local integer level = tower.getLevel()
local Unit target = Event.getTarget()
    if level < 15 then
        call tower.doSpellDamage(target,2500+level*100,tower.calcSpellCritNoBonus())
    else
        call tower.doSpellDamage(target,3500+level*100,tower.calcSpellCritNoBonus())
    endif
    
    if tower.calcChance(0.125 + level * 0.005) == true then
            call tower.doSpellDamage(target,2500 + level * 1000,tower.calcSpellCritNoBonus())
            if level < 25 then
                call cb_stun.applyOnlyTimed(tower,target,0.3)
            else
                call cb_stun.applyOnlyTimed(tower,target,0.4)
            endif
            if level < 15 then
                call sir_moonp_buff.applyAdvanced(tower,target,0,240,2.5)
            else
                call sir_moonp_buff.applyAdvanced(tower,target,0,300,2.5)
            endif
        endif
    
endfunction

Header

    globals
    //@import
    BuffType sir_moonp_buff
    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
Hero of Light v1
3000
ID:
86
Family ID:
Author:
i_mOck_death
Rarity:
rare
Element:
astral
Attack Type:
Elemental
Attack Range:
900
Attack CD:
1
Damage:
1036-1036
Status:
Approved

Description:

Rare Astral tower with a chance on each attack to create a wave of light that damages enemies.
Ain Soph Aur
This tower has a 25% chance on every attack to create a shockwave of light that starts at the targeted creep and travels 500 units behind that creep dealing 3000 spell damage to all creeps in its path.

Level Bonus:
+1% chance
+150 damage
Aura of Light - Aura
Towers in 300 range deal 25% more damage to undead creeps.

Level Bonus:
+1% damage
Download

Toggle Triggers

Header

    globals
        Cast Swave
        //@import
        BuffType mOck_Warrioroflight
    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 Swave = Cast.create('@@0@@', "carrionswarm", 1)
    endfunction

On Attack

ONATTACK_chance: .25 ONATTACK_chanceLevelAdd: .01
function onAttack takes Tower tower returns nothing
local unit creep = Event.getTarget().getUnit()
local integer level = tower.getLevel()
local real facing = GetUnitFacing(creep) - 180
local real x = GetUnitX(creep) + (50) * Cos(facing * bj_DEGTORAD)
local real y = GetUnitY(creep) + (50) * Sin(facing * bj_DEGTORAD)
call Effect.createSimple("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",GetUnitX(creep),GetUnitY(creep)).destroy()
call Swave.pointCastFromUnitOnPoint(tower,Event.getTarget(),x, y,1.0+(.05*level), tower.calcSpellCritNoBonus())

set creep = null
endfunction

Tower Aura

AURA_auraEffect: mOck_Warrioroflight AURA_power: 250 AURA_level: 250 AURA_auraRange: 300 AURA_targetType: TARGET_TYPE_TOWERS AURA_levelAdd: 10 AURA_powerAdd: 10 AURA_targetSelf: true
Lightning Eye v1
3000
ID:
167
Family ID:
Author:
i_mOck_death
Rarity:
unique
Element:
storm
Attack Type:
Energy
Attack Range:
800
Attack CD:
1.5
Damage:
1757-1757
Mana:
200
Mana regen:
4
Status:
Approved

Description:

Whatever you do, do not make eye contact.
Specials:
-10% dmg to bosses
Glare
The Eye launches a forked lightning on every attack at the cost of 40 mana. The forked lightning deals 500 plus 1.5% of the original target's current health as spell damage. The forked lightning hits up to 3 creeps.

Level Bonus:
+120 spell damage
Static Field - Aura
Towers within 350 range of this tower have their damage increased by 20% when attacking immune creeps.

Level Bonus:
+1% damage
Download

Toggle Triggers

Header

    globals
        Cast Swave
        BuffType mOck_staticField
    endglobals
    
    function staticP takes Buff b returns nothing
        local Tower  tower = b.getCaster()  
        local Tower  towero = b.getBuffedUnit() 
        local Unit target = Event.getTarget()
        
        if target.isImmune() then
            set Event.damage = Event.damage*(1.2+.01*tower.getLevel())
        endif
            
    endfunction

    private function init takes nothing returns nothing
        set Swave = Cast.create('@@0@@',"forkedlightning",1)
        set mOck_staticField = BuffType.createAuraEffectType(true)
        call mOck_staticField.setBuffIcon('@@1@@') 
        call mOck_staticField.addEventOnDamage(staticP,1.0, 0.0) 
    endfunction

On Attack

ONATTACK_chance: 1.0 ONATTACK_chanceLevelAdd: 0.0
function onAttack takes Tower tower returns nothing
    local Creep creep = Event.getTarget()
    local unit toweru= tower.getUnit()
    local unit creepu = creep.getUnit()
    local real life = GetUnitState(creepu,UNIT_STATE_LIFE)
    local real mp = GetUnitState(toweru,UNIT_STATE_MANA)
    local integer level = tower.getLevel()

    if mp >= 40 then
        call SetUnitState(toweru , UNIT_STATE_MANA, mp-40)
        call Swave.targetCastFromCaster(tower,creep,(500+level*120)+(life*(.015)),tower.calcSpellCritNoBonus())
    endif
    
    set toweru = null
    set creepu = null
    
endfunction

Tower Aura

AURA_auraEffect: mOck_staticField AURA_power: 0 AURA_level: 0 AURA_auraRange: 350 AURA_targetType: TARGET_TYPE_TOWERS AURA_levelAdd: 1 AURA_powerAdd: 1 AURA_targetSelf: true
Breeding Adult Spider v1
3000
ID:
176
Family ID:
Author:
D1000
Rarity:
uncommon
Element:
nature
Attack Type:
Essence
Attack Range:
825
Attack CD:
1.2
Damage:
1532-1541
Status:
Unapproved

Description:

Ah..A grown up examplar! But it appears that it doesn´t want to get disturbed.
Specials:
-30% dmg to nature
+10% dmg to orcs
+20% dmg to humanoids
Poisonous Spittle
Units damaged by the spider become infected and receive 750 spell damage per second for 5 seconds. Further attacks on the same unit will increase the potency of the infection, stacking the damage and refreshing duration. Limit of 5 stacks. The highest stack amount of any spider that has infected a unit will be used.

Level Bonus:
+37.5 damage per second
+0.05 second duration
+1 stack every 5 levels
Download

Toggle Triggers

Header

    globals
        //@import
        BuffType D1000_Spider_Poison
        //@import
        EventTypeList D1000_Spider_Apply
    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 Tower Creation

function onCreate takes Tower tower returns nothing
    call tower.addEventList(D1000_Spider_Apply)
    set tower.userInt = 750
    set tower.userReal = 37.5
    set tower.userInt2 = 3750
    set tower.userReal2 = 187.5
    set tower.userInt3 = 5
    set tower.userReal3 = 0.05
endfunction
Fanatical Zealot v1
3000
ID:
195
Family ID:
Author:
dzk87
Rarity:
rare
Element:
storm
Attack Type:
Physical
Attack Range:
875
Attack CD:
2
Damage:
5767-6219
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 10% with each stack of Zeal.
Zeal
Each attack works the Zealot into a greater frenzy, increasing his attack speed by 4% from each tower in 175 range. These towers have their attack speed slowed by 4%. 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 1200 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 8% of this tower's attack damage won't be reduced by armor resistances. This effect stacks up to 5 times.

Level Bonus:
+0.32% 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() >= 1200 then
            set leechCounter = leechCounter + 1
        endif 
    endloop
    
    if leechCounter == 0 then
        return
    endif
    
    set leechPower = 420 - 20*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() >= 1200 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(), 135, 0, 0.70) 
                    call Effect(b.userInt2).noDeathAnimation()
                endif
            endif 
        endif
        
        call storm_zealot_shield.apply(tower, tower, 1000 * b.userInt) 
    else 
        set b = storm_zealot_shield.apply(tower, tower, 1000)
        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.08 + 0.0032*tower.getLevel()) * phaseWound.userInt
    
    if Event.damage < damageBase then 
        set Event.damage = damageBase*totalArmorPierce + Event.damage*(1.-totalArmorPierce) 
    endif 
endfunction