Elemental Ghost v1 
                470
                     
             
                 | 
    
    
              ID:              138 
             Family ID:       
             Author:          Der_kleine_Tomy 
             Rarity:          uncommon 
             Element:         fire 
            
                 Attack Type:     Essence 
                 Attack Range:    950 
                 Attack CD:       2 
                 Damage:  838-838 
            
            
             Status:          Approved 
     | 
    
    
    
             
                            Specials:
                        +0.6% trigger chances/lvl
                     
                            Elemental Wrath
                        The Elemental Ghost has a 17.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.6% 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.175
                            
                                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() * 6, 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
                        
                     | 
            
             
                Toxic Acid Factory v1 
                480
                     
             
                 | 
    
    
              ID:              163 
             Family ID:       
             Author:          cedi 
             Rarity:          common 
             Element:         iron 
            
                 Attack Type:     Decay 
                 Attack Range:    800 
                 Attack CD:       1 
                 Damage:  223-243 
            
            
             Status:          Approved 
     | 
    
    
    
             Description: Careful, corrosive.  
                            Specials:
                        Bounce attack:
   3 targets
   -15% damage per bounce
                     
                            Acid Coating
                        Decreases the armor of damaged units by 2.4 for 3 seconds. Level Bonus: +0.096 armor reduction +0.12 seconds  | 
    
    
    
            Download
            
            
            
            
             Toggle Triggers Header     globals
        //@import
        BuffType cedi_acidarmor
    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
    call cedi_acidarmor.applyCustomTimed( tower, Event.getTarget(), 2400 + tower.getLevel() * 96, 3.0 + 0.12 * tower.getLevel() )
endfunction
                        
                     | 
            
             
                Shrine of Fortuity v1 
                480
                     
             
                 | 
    
    
              ID:              207 
             Family ID:       
             Author:          Neotopia 
             Rarity:          common 
             Element:         iron 
            
                 Attack Type:     Physical 
                 Attack Range:    800 
                 Attack CD:       1.5 
                 Damage:  1396-1415 
            
            
             Status:          Approved 
     | 
    
    
    
             Description: An old Shrine of an ancient religion. Numerous humans prayed on this, leading to immense power. Maybe you should pray!  
                            Warming Up
                        Each attack of this tower has a 50% chance to miss the target. Level Bonus: -0.6% miss chance  | 
    
    
    
            Download
            
            
            
            
             Toggle Triggers On Damage 
                            
                                ONDAMAGE_chance: 1
                            
                                ONDAMAGE_chanceLevelAdd: 0
                            
                             
                        
                        
                            function onDamage takes Tower tower returns nothing
    if tower.calcBadChance( 0.5 - tower.getLevel() * 0.006 ) then
        set Event.damage = 0
        call tower.getOwner().displayFloatingTextX("Miss",tower,255, 0, 0,255,0.05,0.0,2.0)
    endif
endfunction
                        
                     | 
            
             
                Upgraded Pocket Rocket v1 
                485
                     
             
                 | 
    
    
              ID:              546 
             Family ID:       
             Author:          Boekie 
             Rarity:          common 
             Element:         iron 
            
                 Attack Type:     Decay 
                 Attack Range:    700 
                 Attack CD:       1.65 
                 Damage:  711-754 
            
            
             Status:          Approved 
     | 
    
    
    
             Description: This tower attacks with rockets that deal splash damage and deal extra damage to mass.  
                            Specials:
                        Splash attack: 125 AoE: 55% damage +30% dmg to masses (+2%/lvl)  | 
    
    
    
            Download
            
            
             | 
            
             
                Circle of Storm v1 
                490
                     
             
                 | 
    
    
              ID:              314 
             Family ID:       
             Author:          SternBogen / Natac & girlfriend 
             Rarity:          uncommon 
             Element:         storm 
            
                 Attack Type:     Physical 
                 Attack Range:    1100 
                 Attack CD:       1.4 
                 Damage:  526-534 
            
            
             Status:          Approved 
     | 
    
    
    
             Description: Strong gusts of wind often linger around these ruins.  
                            Specials:
                        +70% dmg to air (+2%/lvl)  
                            Wind of Death
                        On attack this tower has a 24% chance to catch a ground, non-boss unit in a cyclone for 0.7 seconds, dealing 196 physical damage to all units in 300 AoE when it falls back down. Falling champions deal 25% more damage. Level Bonus: +20 damage +0.5% chance to catch  | 
    
    
    
            Download
            
            
            
            
             Toggle Triggers Header     globals
        //@import
        BuffType sternbogen_broken_wind
    endglobals
    
    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 Creep target = Event.getTarget()
    local real damage = 196 + 20 * tower.getLevel()
    local Buff b
    if (target.getSize() == SIZE_MASS or target.getSize() == SIZE_NORMAL or target.getSize() == SIZE_CHAMPION) then
        if(tower.calcChance(0.24 + (0.005 * tower.getLevel()))) then
            set b = target.getBuffOfType(sternbogen_broken_wind)
            if b != 0 then
                set damage = RMaxBJ(b.userReal3, damage)
            endif
            set b = sternbogen_broken_wind.applyCustomTimed(tower, target, tower.getLevel(), 0.7)
            if b != 0 then
                set b.userReal3 = damage
            endif
        endif
    endif 
endfunction
                        
                     | 
            
             
                Mana-Touched Drake v1 
                500
                     
             
                 | 
    
    
              ID:              3 
             Family ID:       
             Author:          SirCoqaLot. 
             Rarity:          rare 
             Element:         astral 
            
                 Attack Type:     Elemental 
                 Attack Range:    950 
                 Attack CD:       3 
                 Damage:  509-609 
            
            
                 Mana:     250 
                
                     Mana regen:     12.5 
                
            
             Status:          Approved 
     | 
    
    
    
             Description: Playful Faerie-Dragon that uses mana to its advantage.  
                            Specials:
                        +1 mana regen/lvl
                     
                            Unstable Energies
                        This tower has a 28% chance on damage to release a powerful energy blast, dealing [current mana x 8] Elemental damage to the target, but consuming 75% of its own current mana. Level Bonus: +0.48% chance -1% current mana consumed  
                            Mana Distortion Field - Aura
                        Towers in 200 range burn 2 mana on attack, costing the drake 7 mana. The mana burned and spent is attackspeed and range adjusted and the tower deals 50 spelldamage per mana point burned. Level Bonus: +4 spelldamage per mana point burned  | 
    
    
    
            Download
            
            
            
            
             Toggle Triggers Header             globals
    //@export
    BuffType sir_drake_aura
    endglobals
    
    function drake_aura_manaburn takes Buff b returns nothing
    
    local Tower tower = b.getBuffedUnit()
    local Unit target = Event.getTarget()
    local Unit caster = b.getCaster()
    local unit targetunit = target.getUnit()
    local integer level = caster.getLevel()
    local real manadrained
    local real speed = tower.getBaseAttackspeed()*800/tower.getRange()
    
    
    if GetUnitState(targetunit,UNIT_STATE_MANA) > 0 and caster.subtractMana(caster.userReal*speed,false) > 0 then // drain mana at drake and check if the target and the drake have enough mana
        set manadrained = target.subtractMana((b.getLevel()/100.0)*speed,true) // drain mana set value
        call tower.doSpellDamage(target,manadrained*b.getPower(),tower.calcSpellCritNoBonus()) // deal damaage = value
        call SFXAtUnit("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayDamage.mdl",targetunit) // spawn effect
    endif
    set targetunit = null // cleanup
    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 sir_drake_aura = BuffType.createAuraEffectType(true)
    call sir_drake_aura.setBuffIcon('@@0@@')
    call sir_drake_aura.addEventOnAttack(drake_aura_manaburn,1,0)
    endfunction
        
                        
                    On Damage 
                            
                                ONDAMAGE_chance: 0.28
                            
                                ONDAMAGE_chanceLevelAdd: 0.0048
                            
                             
                        
                        
                            function onDamage takes Tower tower returns nothing
            
local unit towerunit = tower.getUnit()
    local integer level = tower.getLevel()
    
    call tower.doAttackDamage(Event.getTarget(),8 * GetUnitState(towerunit,UNIT_STATE_MANA),tower.calcAttackMulticrit(0,0,0)) //deal the damage
    call tower.subtractMana(GetUnitState(towerunit,UNIT_STATE_MANA)*(0.75-0.01*tower.getLevel()),true)//drain the mana
    call SFXAtUnit("Abilities\\Spells\\Items\\AIma\\AImaTarget.mdl",Event.getTarget().getUnit())// add some fancy effect
    set towerunit = null
        
endfunction
                        
                    On Tower Creation function onCreate takes Tower tower returns nothing
            
set tower.userReal = 7
        
endfunction
                        
                    Tower Aura 
                            
                                AURA_powerAdd: 4
                            
                                AURA_auraEffect: sir_drake_aura
                            
                                AURA_levelAdd: 0
                            
                                AURA_power: 50
                            
                                AURA_targetType: TARGET_TYPE_TOWERS
                            
                                AURA_targetSelf: false
                            
                                AURA_level: 200
                            
                                AURA_auraRange: 200
                            
                             
                        
                        
                                        
        
                        
                     | 
            
             
                Ice Mine v1 
                500
                     
             
                 | 
    
    
              ID:              29 
             Family ID:       
             Author:          Velex 
             Rarity:          uncommon 
             Element:         ice 
            
                 Attack Type:     Elemental 
                 Attack Range:    700 
                 Attack CD:       2 
                 Damage:  921-922 
            
            
             Status:          Approved 
     | 
    
    
    
             Description: Tower with a chance to cast an ice nova.  
                            Ice Nova
                        Damaged targets have a 20% chance to get blasted by an ice nova, dealing 500 damage and slowing units in 300 range by 9% for 3 seconds. Has a 30% bonus chance to crit. Level Bonus: +0.4% chance +25 damage  | 
    
    
    
            Download
            
            
            
            
             Toggle Triggers Header globals 
//@import
BuffType Maj_iceNovaSlow
endglobals
//The init function
private function init takes nothing returns nothing
endfunction
                        
                    On Damage 
                            
                                ONDAMAGE_chance: .2
                            
                                ONDAMAGE_chanceLevelAdd: 0.004
                            
                             
                        
                        
                            function onDamage takes Tower tower returns nothing
local Unit targ = Event.getTarget()
local Iterate it = Iterate.overUnitsInRangeOfUnit(tower,TARGET_TYPE_CREEPS,targ,300)
local Unit next
loop
    set next = it.next()
    exitwhen next == 0
    call Maj_iceNovaSlow.applyCustomTimed(tower, next, 90, 3.0)
endloop
call tower.doSpellDamageAoEUnit(targ,300,500+(tower.getLevel()*25),tower.calcSpellCrit(0.3,0.0),0)
call SFXAtUnit("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl", targ.getUnit())
endfunction
                        
                     | 
Description: