Inflamed Stone v1
1000
ID:
241
Family ID:
Author:
SirCoqaLot.
Rarity:
rare
Element:
fire
Attack Type:
Magic
Attack Range:
850
Attack CD:
1
Damage:
1-192
Mana:
40
Mana regen:
5
Status:
Unapproved

Description:

Advanced tower that will critical strike if it is has enough mana.
Specials:
+2% mana regen/lvl
Spellfire
This tower treats all spell modifiers as attack bonuses, with an 84% bonus gain of stated effect. This is recalculated before every attack. 

Level Bonus:
+3.36% bonus gain
Spellfire Projectiles
If this tower has at least 20 mana when it attacks, it will pay all its mana to proc a critical strike. 20 Mana is used to grant the critical strike and every further point of mana spent grants 8% more critical damage to that attack. 

Level Bonus:
-.2 Mana needed
Download

Toggle Triggers

Header

    globals

    //@export
    BuffType spellFlameDamage
    
    //@export
    BuffType spellFlameCritDamage

    //@export
    BuffType spellFlameCritChance
    
    endglobals
    
    //@export
    function addAttackStats takes Tower tower returns nothing 
        local integer lvl = tower.getLevel()
    local real spellBonuses = .84*100+100
    local real spellLevel = .0336*100
        //Just grab the current spell damage
    //Add attackdamage equal to that amount.
    //It should be a buff though.
    
    call spellFlameDamage.apply(tower, tower,R2I((tower.getProp_SpellDmgDealt())*(spellBonuses+spellLevel*lvl)))
    call spellFlameCritDamage.apply(tower, tower,R2I((tower.getProp_SpellCritDamage())*(spellBonuses+spellLevel*lvl)))
    call spellFlameCritChance.apply(tower, tower,R2I((tower.getProp_SpellCritChance())*(spellBonuses+spellLevel*lvl)))

    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 spellFlameDamage = BuffType.create(-1,0,false)
    call m.addModification(MOD_DAMAGE_ADD_PERC, 0.000, 0.01)
    call spellFlameDamage.setBuffModifier(m)

    
    set m = Modifier.create()
        call m.addModification( MOD_ATK_CRIT_CHANCE, 0.000, 0.01 )
        set spellFlameCritChance = BuffType.create(-1,0,false)
    call spellFlameCritChance.setBuffModifier(m)
    

    set m = Modifier.create()
    call m.addModification( MOD_ATK_CRIT_DAMAGE, 0.000, 0.01 )
    set spellFlameCritDamage= BuffType.create(-1,0,false)
        call spellFlameCritDamage.setBuffModifier(m)

    endfunction       

On Attack

ONATTACK_chance: 1.0 ONATTACK_chanceLevelAdd: 0.0
function onAttack takes Tower tower returns nothing
    local real mana = GetUnitState(tower.getUnit(),UNIT_STATE_MANA)
    call addAttackStats (tower)
    if mana >= (20 - 0.2*tower.getLevel()) then
        call tower.subtractMana(mana, false) 
        call tower.addCustomAttackCrit((mana - (20 - 0.2*tower.getLevel())) *0.08+tower.getProp_AtkCritDamage())
    endif
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing

endfunction
Green Thunder v1
1000
ID:
263
Family ID:
Author:
drol
Rarity:
rare
Element:
storm
Attack Type:
Energy
Attack Range:
1200
Attack CD:
2
Damage:
763-1062
Mana:
65
Mana regen:
0
Status:
Approved

Description:

This tower gains mana by attacking and can use it to gain an attackspeed boost.
Specials:
+20% dmg to magical
Lightning Surge
Increases the attackspeed of this tower by 150% for the next 5 attacks. The surge fades after 8 seconds.

Level Bonus:
+2% attackspeed
+1 attack per 5 levels

AC_TYPE_OFFENSIVE_IMMEDIATE
 60, 1200 range, 6s cooldown
Mana Feed
Attacks restore 4 mana to the tower and increase spell crit chance by 7.5%.

Hint: Mana regeneration increases mana gained.

Level Bonus:
+0.15% spell crit chance
Lightning Burst
Grants a 12.5% chance to deal 25 times current mana as spell damage on attack.
Resets the bonus spell crit of 'Mana Feed'.

Level Bonus:
+0.5% chance
Download

Toggle Triggers

Autocast

caster_art: AUTOCAST_cooldown: 6 AUTOCAST_numBuffsBeforeIdle: 0 AUTOCAST_isExtended: false AUTOCAST_autocastType: AC_TYPE_OFFENSIVE_IMMEDIATE AUTOCAST_manacost: 60 AUTOCAST_range: 1200 AUTOCAST_buffType: 0 AUTOCAST_targetSelf: false AUTOCAST_targetType: 0 target_art: AUTOCAST_autoRange: 1200
private function onAutocast takes Tower tower returns nothing
    
    set tower.userInt = 5 + tower.getLevel() / 5
    call drol_surge.apply(tower,tower,tower.getLevel()+25)
endfunction

Header

    globals
    //@import
    BuffType drol_surge
    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 towerUnit = tower.getUnit()
  local real mana = GetUnitState(towerUnit, UNIT_STATE_MANA)
  
  call SetUnitState(towerUnit , UNIT_STATE_MANA, mana + 4 * (1. + tower.getProp_ManaRegPercBonus()))
  
  call tower.modifyProperty(MOD_SPELL_CRIT_CHANCE, 0.075+(tower.getLevel()*0.0015))
  set tower.userReal = tower.userReal + 0.075 + (tower.getLevel()*0.0015)
  set towerUnit = null
endfunction

On Damage

ONDAMAGE_chance: 0.125 ONDAMAGE_chanceLevelAdd: 0.005
function onDamage takes Tower tower returns nothing
    local Effect targetEffect 
    local Creep creep = Event.getTarget()
    
    if not creep.isImmune() then
    
        set targetEffect = Effect.createScaled("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl", GetUnitX(creep.getUnit()), GetUnitY(creep.getUnit()), 0, 0, 1.8)
        call targetEffect.setLifetime(1.0)
        call tower.doSpellDamage(creep, GetUnitState(tower.getUnit(), UNIT_STATE_MANA) * 25,tower.calcSpellCritNoBonus())
        call tower.modifyProperty(MOD_SPELL_CRIT_CHANCE, -(tower.userReal))
        set tower.userReal = 0.0
    
    endif
    
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    set tower.userReal = 0.0
    set tower.userInt = 0
    
endfunction
Sea Turtle v1
1000
ID:
282
Family ID:
Author:
i_mOck_death
Rarity:
rare
Element:
ice
Attack Type:
Energy
Attack Range:
900
Attack CD:
0.8
Damage:
1-1
Mana:
1600
Mana regen:
0
Status:
Approved

Description:

Become one with water. Become a turtle.
Specials:
+64 mana/lvl
Splash
Every attack the turtle restores 64 mana. Mana regeneration will increase mana restored. Mana degeneration will not decrease mana restored below 64.

Level Bonus:
+2.56 mana restored
Aqua Breath
This tower deals Energy damage equal to its mana.
Cold Blooded
Every second this tower loses 1.75% of its max mana.
Download

Toggle Triggers

On Attack

ONATTACK_chance: 1.0 ONATTACK_chanceLevelAdd: 0.0
function onAttack takes Tower tower returns nothing
            
local unit towerUnit = tower.getUnit()
    local real mana = GetUnitState(towerUnit, UNIT_STATE_MANA)
  
    if tower.getProp_ManaRegPercBonus() > 0 then
        call SetUnitState(towerUnit , UNIT_STATE_MANA, mana + (64+tower.getLevel()*2.56) * (1. + tower.getProp_ManaRegPercBonus()))
    else
        call SetUnitState(towerUnit , UNIT_STATE_MANA, mana + (64))
    endif
    set towerUnit = null
        
endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
            
local Unit creep = Event.getTarget()
    call tower.doAttackDamage(creep, GetUnitState(tower.getUnit(), UNIT_STATE_MANA),tower.calcAttackMulticrit(0.0,0.0,0))
        
endfunction

Periodic

PERIODIC_period: 1
function periodic takes Tower tower returns nothing
            
call tower.subtractMana(GetUnitState(tower.getUnit(), UNIT_STATE_MAX_MANA)*.0175, false)
        
endfunction
Inexperienced Huntress v1
1000
ID:
338
Family ID:
Author:
cedi
Rarity:
rare
Element:
nature
Attack Type:
Physical
Attack Range:
800
Attack CD:
1.8
Damage:
937-937
Status:
Approved

Description:

After having to forfeit her belief in Elune she seeked support from the dark and forbidden arts.
Specials:
Bounce attack:
   4 targets
   -25% damage per bounce
+2.4% attackspeed/lvl
Shadow Glaive
Whenever this tower attacks it has a 20% chance to gain 200% attackspeed until the next attack. The next attack will also crit for sure and deal 25% more crit damage.

Level Bonus:
+1% crit damage
+8% attack speed
+0.8% chance
Star Glaive
Whenever this tower damages a creep there is a 25% chance to deal an additional 25% of the attack's damage as spell damage.

Level Bonus:
+0.4% chance
+1% attack damage as spell damage
Download

Toggle Triggers

Header

    globals
        //@export
        BuffType cedi_shadowgleve
    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 mod = Modifier.create()
        call mod.addModification( MOD_ATTACKSPEED, 2.0, 0.08 )
        
        set cedi_shadowgleve = BuffType.create( 99.0, 0.0, true )
        call cedi_shadowgleve.setBuffIcon( '@@0@@' )
        call cedi_shadowgleve.setBuffModifier( mod )
    endfunction

On Attack

ONATTACK_chance: 1.0 ONATTACK_chanceLevelAdd: 0.0
function onAttack takes Tower tower returns nothing
    local Buff B = tower.getBuffOfType( cedi_shadowgleve )
    
    if B != 0 then
        call tower.addModifiedAttackCrit( 0.00, 1.25 + tower.getLevel() / 100.0 )
        call B.removeBuff()
    endif
    
    if tower.calcChance( 0.2 + tower.getLevel() * 0.008 ) then
        call cedi_shadowgleve.apply( tower, tower, tower.getLevel() )
    endif
endfunction

On Damage

ONDAMAGE_chance: 0.25 ONDAMAGE_chanceLevelAdd: 0.004
function onDamage takes Tower tower returns nothing
    local real r = Event.damage * ( 0.25 + 0.01 * tower.getLevel() ) //( 800.00 + tower.getLevel() * 32.0 )
    call tower.doSpellDamage( Event.getTarget(), r, tower.calcSpellCritNoBonus() )
    //call cb_stun.applyOnlyTimed( tower, Event.getTarget(), 0.25 )
    call SFXOnUnit( "Abilities\\Spells\\NightElf\\Starfall\\StarfallTarget.mdl", Event.getTarget().getUnit(), "origin" )
endfunction
Afflicted Monument v1
1000
ID:
360
Family ID:
Author:
SirCoqaLot.
Rarity:
uncommon
Element:
nature
Attack Type:
Essence
Attack Range:
1000
Attack CD:
1.17
Damage:
523-623
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%.

Level Bonus:
+0.06% 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.03+level*0.0006) // 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.03-level*0.0006) // end the modification
    endif
endfunction
Icy Core v1
1000
ID:
562
Family ID:
Author:
geX
Rarity:
rare
Element:
ice
Attack Type:
Elemental
Attack Range:
1000
Attack CD:
1.5
Damage:
974-1138
Status:
Approved

Description:

Aura Tower with a frost slow aura
Frost Aura - Aura
Slows movementspeed of enemies in 800 range by 15%. 

Level Bonus:
+0.4% slow
Download

Toggle Triggers

Header

    globals
        //@export
        BuffType gex_frost_aura
    endglobals
    

    private function init takes nothing returns nothing
        local Modifier m = Modifier.create()
        set gex_frost_aura = BuffType.createAuraEffectType(false)
        call m.addModification(MOD_MOVESPEED,0.0,-0.001)
        call gex_frost_aura.setBuffModifier(m)
        call gex_frost_aura.setStackingGroup("frost_aura")
        call gex_frost_aura.setBuffIcon('@@0@@')
    endfunction

Tower Aura

AURA_auraEffect: gex_frost_aura AURA_power: 150 AURA_level: 150 AURA_auraRange: 800 AURA_targetType: TARGET_TYPE_CREEPS AURA_levelAdd: 4 AURA_powerAdd: 4 AURA_targetSelf: false
Healing Monument v1
1000
ID:
627
Family ID:
Author:
SirCoqaLot.
Rarity:
uncommon
Element:
astral
Attack Type:
Elemental
Attack Range:
1000
Attack CD:
1.5
Damage:
2614-2676
Status:
Approved

Description:

Basic tower that can't hold back its holy powers for long.
Grace
55% of the damage done by this tower will be revoked over 3 seconds. Does not affect immune targets.

Level Bonus:
 -0.52% of the damage healed. 
+1 second needed to heal at level 15 and 25
Download

Toggle Triggers

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 loopnr = tower.userInt
local integer healing = R2I(Event.damage*(0.55-tower.getLevel()*0.0052))

if not target.isImmune() then
    set healing = R2I(healing/loopnr)
    loop
        exitwhen loopnr == 0
        call TriggerSleepAction(1.0)
        if target.getUID() == id then
            call SetUnitState(target.getUnit(),UNIT_STATE_LIFE,GetUnitState(target.getUnit(),UNIT_STATE_LIFE)+healing)
            call SFXAtUnit("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",target.getUnit())
            call tower.getOwner().displayFloatingTextX("+"+I2S(healing),target,0, 255, 0,255,0.05,0.0,2.0)
        endif
        set loopnr = loopnr - 1
    endloop
endif
endfunction

On Level Up

function onLevelUp takes Tower tower returns nothing
    local integer level = tower.getLevel()
    if level < 15 then
        set tower.userInt = 3
    elseif level < 25 then
        set tower.userInt = 4
    else 
        set tower.userInt = 5
    endif
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    local integer level = tower.getLevel()
    if level < 15 then
        set tower.userInt = 3
    elseif level < 25 then
        set tower.userInt = 4
    else 
        set tower.userInt = 5
    endif
endfunction