Princess of Light v1
1700
ID:
561
Family ID:
Author:
Boekie
Rarity:
rare
Element:
astral
Attack Type:
Magic
Attack Range:
1000
Attack CD:
1.5
Damage:
1989-1989
Mana:
30
Mana regen:
1.5
Status:
Approved

Description:

This tower is able to extract experience from creeps and energy from spells.
Specials:
+2 mana/lvl
Extract Experience
Casts a buff on a creep. Towers that damage this creep have a 33% chance to extract 1 experience. Buff lasts 10 seconds or until 10 extractions occur.

Level Bonus:
+0.05 experience
+1 extraction

AC_TYPE_OFFENSIVE_BUFF
 20, 1000 range, 5s cooldown
Channel Energy
Whenever this tower is hit by a friendly spell, the caster of that spell will be granted 1 experience and this tower will gain 15% bonus damage for 10 seconds. This effect stacks up to 15 times, but new stacks will not refresh the duration of olds ones.

Level Bonus:
+0.5% damage 
+0.1 seconds duration
Download

Toggle Triggers

Autocast

caster_art: AUTOCAST_cooldown: 5 AUTOCAST_numBuffsBeforeIdle: 3 AUTOCAST_isExtended: false AUTOCAST_autocastType: AC_TYPE_OFFENSIVE_BUFF AUTOCAST_manacost: 20 AUTOCAST_range: 1000 AUTOCAST_buffType: boekie_expGain_buff AUTOCAST_targetSelf: false AUTOCAST_targetType: TARGET_TYPE_CREEPS target_art: AUTOCAST_autoRange: 1000
private function onAutocast takes Tower tower returns nothing
    local integer level = tower.getLevel()
    set boekie_expGain_buff.apply(tower,Event.getTarget(),level).userInt = 10 + level
endfunction

Header

    globals
        //@export
        BuffType boekie_expGain_buff
        //@export
        BuffType boekie_lightSpeed_buff
    endglobals
        
    private function addExpToAttacker takes Buff b returns nothing
        if b.userInt > 0 then
            set b.userInt = b.userInt - 1
            call Event.getTarget().addExp(1.0 + (b.getLevel() * 0.05))
        else
            call b.removeBuff()
        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()
        
        set boekie_expGain_buff = BuffType.create(10.0,0.0,true)
        call boekie_expGain_buff.addEventOnDamaged(addExpToAttacker,0.33,0.0)  
        call boekie_expGain_buff.setBuffIcon('@@0@@')
        
        call m.addModification(MOD_DAMAGE_ADD_PERC,0.0,0.005) 
        set boekie_lightSpeed_buff = BuffType.create(-1,0,true)
        call boekie_lightSpeed_buff.setBuffModifier(m) 
        call boekie_lightSpeed_buff.setBuffIcon('@@1@@')
    endfunction

On Spell Target

function onSpellTarget takes Tower tower returns nothing
    local Unit caster = Event.getTarget()
    local Buff b = tower.getBuffOfType(boekie_lightSpeed_buff)
    local integer twrLevel = tower.getLevel()
    local integer UID = tower.getUID()
    local integer bonusDmg = 30 + twrLevel //each point = 0.5% dmg bonus

    if caster.isATower() then
        call caster.addExp(1) 
        if b == 0 then
            set boekie_lightSpeed_buff.apply(tower, tower, bonusDmg).userInt = 1
        else
            if b.userInt >= 15 then
                return //already at max stacks. ABORT!
            endif
            set b.userInt = b.userInt + 1
            call b.setPower(b.getPower() + bonusDmg)
        endif
        call TriggerSleepAction(10 + 0.01 * twrLevel)
        if tower.getUID() == UID then //make sure tower still alive
            set b = tower.getBuffOfType(boekie_lightSpeed_buff)
            if b != 0 then //make sure buff hasn't been purged or something
                if b.userInt <= 1 then
                    call b.removeBuff()
                else
                    set b.userInt = b.userInt - 1
                    call b.setPower(b.getPower() - bonusDmg)
                endif
            endif
        endif
    endif
endfunction
Queen of Light v1
3100
ID:
168
Family ID:
Author:
Boekie
Rarity:
rare
Element:
astral
Attack Type:
Magic
Attack Range:
1000
Attack CD:
1.5
Damage:
3389-3389
Mana:
30
Mana regen:
1.5
Status:
Approved

Description:

This tower is able to extract experience from creeps and energy from spells.
Specials:
+2 mana/lvl
Extract Experience
Casts a buff on a creep. Towers that damage this creep have a 33% chance to extract 2 experience. Buff lasts 10 seconds or until 10 extractions occur.

Level Bonus:
+0.1 experience
+1 extraction

AC_TYPE_OFFENSIVE_BUFF
 20, 1000 range, 5s cooldown
Channel Energy
Whenever this tower is hit by a friendly spell, the caster of that spell will be granted 2 experience and this tower will gain 20% bonus damage for 12 seconds. This effect stacks up to 15 times, but new stacks will not refresh the duration of olds ones.

Level Bonus:
+0.5% damage 
+0.1 seconds duration
Download

Toggle Triggers

Autocast

caster_art: AUTOCAST_cooldown: 5 AUTOCAST_numBuffsBeforeIdle: 3 AUTOCAST_isExtended: false AUTOCAST_autocastType: AC_TYPE_OFFENSIVE_BUFF AUTOCAST_manacost: 20 AUTOCAST_range: 1000 AUTOCAST_buffType: boekie_expGain_buff AUTOCAST_targetSelf: false AUTOCAST_targetType: TARGET_TYPE_CREEPS target_art: AUTOCAST_autoRange: 1000
private function onAutocast takes Tower tower returns nothing
    local integer level = tower.getLevel()
    set boekie_expGain_buff.apply(tower,Event.getTarget(),level*2 + 20).userInt = 10 + level
endfunction

Header

    globals
        //@import
        BuffType boekie_expGain_buff
        //@import
        BuffType boekie_lightSpeed_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 Spell Target

function onSpellTarget takes Tower tower returns nothing
    local Unit caster = Event.getTarget()
    local Buff b = tower.getBuffOfType(boekie_lightSpeed_buff)
    local integer twrLevel = tower.getLevel()
    local integer UID = tower.getUID()
    local integer bonusDmg = 40 + twrLevel //each point = 0.5% dmg bonus

    if caster.isATower() then
        call caster.addExp(2) 
        if b == 0 then
            set boekie_lightSpeed_buff.apply(tower, tower, bonusDmg).userInt = 1
        else
            if b.userInt >= 15 then
                return //already at max stacks. ABORT!
            endif
            set b.userInt = b.userInt + 1
            call b.setPower(b.getPower() + bonusDmg)
        endif
        call TriggerSleepAction(12 + 0.01 * twrLevel)
        if tower.getUID() == UID then //make sure tower still alive
            set b = tower.getBuffOfType(boekie_lightSpeed_buff)
            if b != 0 then //make sure buff hasn't been purged or something
                if b.userInt <= 1 then
                    call b.removeBuff()
                else
                    set b.userInt = b.userInt - 1
                    call b.setPower(b.getPower() - bonusDmg)
                endif
            endif
        endif
    endif
endfunction