Healing Obelisk v1
300
ID:
587
Family ID:
Author:
SirCoqaLot.
Rarity:
uncommon
Element:
astral
Attack Type:
Elemental
Attack Range:
1000
Attack CD:
1.5
Damage:
674-736
Abil. Factor:
1.6
Status:
Approved

Description:

Basic tower that can't hold back its holy powers for long.

Latest Upload Comment:

Restored from 1.10
Grace
50% of the damage done by this tower will be revoked over 3 seconds. Does not affect immune targets.

Level Bonus:
 -0.4% 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.5-tower.getLevel()*0.004))

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