Energy Junction v1
500
ID:
99
Family ID:
Author:
SirCoqalot.
Rarity:
uncommon
Element:
iron
Attack Type:
Energy
Attack Range:
500
Attack CD:
0.7
Damage:
455-455
Mana:
20
Mana regen:
1
Status:
Approved

Description:

Support tower which only attacks air. Buffs other units attackspeed and adds some spell and normal damage.
Specials:
Attacks AIR only
Jolt
Buffs a tower in 500 range for 10 seconds increasing its attackspeed by 20%. The buffed tower deals 150 attack damage and 150 spell damage on attack multiplied with its base attackspeed. 

Level Bonus:
+6 attack and spell damage 
+0.2% attackspeed

AC_TYPE_ALWAYS_BUFF
 15, 500 range, 8s cooldown
Download

Toggle Triggers

Autocast

AUTOCAST_cooldown: 8 AUTOCAST_autoRange: 500 AUTOCAST_manacost: 15 AUTOCAST_range: 500 AUTOCAST_targetType: TARGET_TYPE_TOWERS AUTOCAST_numBuffsBeforeIdle: 0 caster_art: target_art: AUTOCAST_autocastType: AC_TYPE_ALWAYS_BUFF AUTOCAST_buffType: sir_junction_buff AUTOCAST_isExtended: false AUTOCAST_targetSelf: true
private function onAutocast takes Tower tower returns nothing

endfunction

Header

    globals
        //@export
        BuffType sir_junction_buff
    endglobals
    
    function junctionOnCreate takes Buff b returns nothing
        local Tower tower = b.getCaster()
        local Tower buffee = b.getBuffedUnit()
        set b.userInt = 0
        if tower != buffee then
            set b.userInt = Lightning.createFromPointToUnit("CLPB", tower.getX(), tower.getY(), tower.getZ() - 60, buffee)
        endif
        //Add & save attackspeed
        set b.userReal = tower.userReal + tower.userReal2 * tower.getLevel()
        call buffee.modifyProperty(MOD_ATTACKSPEED, b.userReal)
    endfunction
    
    function junctionOnDamage takes Buff b returns nothing
        local Tower caster = b.getCaster()
        local Tower buffee = b.getBuffedUnit()
        local Creep creep  = Event.getTarget()
        local real damage = caster.userReal3 * (1 + caster.getLevel() / 25.0) * buffee.getBaseAttackspeed()
        
        call buffee.doSpellDamage(creep, damage, buffee.calcSpellCritNoBonus())
        call buffee.doAttackDamage(creep, damage, buffee.calcAttackMulticrit(0,0,0))
        call SFXAtUnit("Abilities\\Spells\\Orc\\Purge\\PurgeBuffTarget.mdl", creep.getUnit())
    endfunction
    
    function junctionOnCleanup takes Buff b returns nothing
        if b.userInt != 0 then
            call Lightning(b.userInt).destroy()
        endif
        call b.getBuffedUnit().modifyProperty(MOD_ATTACKSPEED, -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
        set sir_junction_buff = BuffType.create(10,0,true)
        call sir_junction_buff.setBuffIcon('@@0@@')
        call sir_junction_buff.addEventOnCreate(EventHandler.junctionOnCreate)
        call sir_junction_buff.addEventOnAttack(EventHandler.junctionOnDamage,1.0,0.0)
        call sir_junction_buff.addEventOnCleanup(EventHandler.junctionOnCleanup)
    endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    set tower.userReal = 0.2 //base attackspeed boost
    set tower.userReal2 = 0.002 //attackspeed boost add
    set tower.userReal3 = 150.0 //base dmg & spelldmg per attack (/25 for level bonus)
endfunction

On Tower Destruction

function onDestruct takes Tower tower returns nothing
    //Kill all buffs made by this tower in aoe, so that all lightnings get removed
    local Iterate it = Iterate.overUnitsInRangeOfCaster(tower, TARGET_TOWERS, 500)
    local Tower cur = it.next()
    local Buff b
    
    loop
        exitwhen cur == 0
        set b = cur.getBuffOfType(sir_junction_buff)
        if b != 0 then
            if b.getCaster() == tower then
                call b.removeBuff()
            endif
        endif
        set cur = it.next()
    endloop
endfunction
Energy Crossing v1
1300
ID:
177
Family ID:
Author:
SirCoqalot.
Rarity:
uncommon
Element:
iron
Attack Type:
Energy
Attack Range:
500
Attack CD:
0.7
Damage:
1182-1182
Mana:
20
Mana regen:
1
Status:
Approved

Description:

Support tower which only attacks air. Buffs other units attackspeed and adds some spell and normal damage.
Specials:
Attacks AIR only
Jolt
Buffs a tower in 500 range for 10 seconds increasing its attackspeed by 25%. The buffed tower deals 320 attack damage and 320 spell damage on attack multiplied with its base attackspeed. 

Level Bonus:
+12.8 attack and spell damage 
+0.4% attackspeed

AC_TYPE_ALWAYS_BUFF
 15, 500 range, 6s cooldown
Download

Toggle Triggers

Autocast

caster_art: AUTOCAST_cooldown: 6 AUTOCAST_numBuffsBeforeIdle: 0 AUTOCAST_isExtended: false AUTOCAST_autocastType: AC_TYPE_ALWAYS_BUFF AUTOCAST_manacost: 15 AUTOCAST_range: 500 AUTOCAST_buffType: sir_junction_buff AUTOCAST_targetSelf: true AUTOCAST_targetType: TARGET_TYPE_TOWERS target_art: AUTOCAST_autoRange: 500
private function onAutocast takes Tower tower returns nothing

endfunction

Header

    globals
        //@import
        BuffType sir_junction_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

On Tower Creation

function onCreate takes Tower tower returns nothing
    set tower.userReal = 0.25 //base attackspeed boost
    set tower.userReal2 = 0.004 //attackspeed boost add
    set tower.userReal3 = 320.0 //base dmg & spelldmg per attack (/25 for level bonus)
endfunction

On Tower Destruction

function onDestruct takes Tower tower returns nothing
    //Kill all buffs made by this tower in aoe, so that all lightnings get removed
    local Iterate it = Iterate.overUnitsInRangeOfCaster(tower, TARGET_TOWERS, 500)
    local Tower cur = it.next()
    local Buff b
    
    loop
        exitwhen cur == 0
        set b = cur.getBuffOfType(sir_junction_buff)
        if b != 0 then
            if b.getCaster() == tower then
                call b.removeBuff()
            endif
        endif
        set cur = it.next()
    endloop
endfunction
Energy Magnifier v1
2100
ID:
178
Family ID:
Author:
SirCoqalot.
Rarity:
uncommon
Element:
iron
Attack Type:
Energy
Attack Range:
500
Attack CD:
0.7
Damage:
1910-1910
Mana:
20
Mana regen:
1
Status:
Approved

Description:

Support tower which only attacks air. Buffs other units attackspeed and adds some spell and normal damage.
Specials:
Attacks AIR only
Jolt
Buffs a tower in 500 range for 10 seconds increasing its attackspeed by 32%. The buffed tower deals 500 attack damage and 500 spell damage on attack multiplied with its base attackspeed. 

Level Bonus:
+20 attack and spell damage 
+0.52% attackspeed

AC_TYPE_ALWAYS_BUFF
 15, 500 range, 4s cooldown
Download

Toggle Triggers

Autocast

caster_art: AUTOCAST_cooldown: 4 AUTOCAST_numBuffsBeforeIdle: 0 AUTOCAST_isExtended: false AUTOCAST_autocastType: AC_TYPE_ALWAYS_BUFF AUTOCAST_manacost: 15 AUTOCAST_range: 500 AUTOCAST_buffType: sir_junction_buff AUTOCAST_targetSelf: true AUTOCAST_targetType: TARGET_TYPE_TOWERS target_art: AUTOCAST_autoRange: 500
private function onAutocast takes Tower tower returns nothing

endfunction

Header

    globals
        //@import
        BuffType sir_junction_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

On Tower Creation

function onCreate takes Tower tower returns nothing
    set tower.userReal = 0.32 //base attackspeed boost
    set tower.userReal2 = 0.0052 //attackspeed boost add
    set tower.userReal3 = 500.0 //base dmg & spelldmg per attack (/25 for level bonus)
endfunction

On Tower Destruction

function onDestruct takes Tower tower returns nothing
    //Kill all buffs made by this tower in aoe, so that all lightnings get removed
    local Iterate it = Iterate.overUnitsInRangeOfCaster(tower, TARGET_TOWERS, 500)
    local Tower cur = it.next()
    local Buff b
    
    loop
        exitwhen cur == 0
        set b = cur.getBuffOfType(sir_junction_buff)
        if b != 0 then
            if b.getCaster() == tower then
                call b.removeBuff()
            endif
        endif
        set cur = it.next()
    endloop
endfunction