Timevault v1
2300
ID:
37
Family ID:
Author:
SirCoqa/TrinkaLot.
Rarity:
unique
Element:
astral
Attack Type:
Magic
Attack Range:
850
Attack CD:
6
Damage:
13589-13688
Abil. Factor:
0.6
Status:
Approved

Description:

Unique Tower that is able to backtrack creeps in time and changes timelines to benefit other towers by increasing their triggerchances.

Latest Upload Comment:

Restored from 1.10
Time Travel
Damaged targets will be teleported 3 seconds back in time after 3 seconds delay. Has a 20% chance to teleport bosses, all others will be always teleported. 

Level Bonus:
 +0.5% chance for bosses
Timesurge
Increases triggerchance of towers in 600 range by 30%.

Level Bonus:
+0.6% chance
Download

Toggle Triggers

Header

    globals
         //@export
        BuffType sir_trigger_aura
    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 m = Modifier.create()
            set sir_trigger_aura = BuffType.createAuraEffectType(true)
            call m.addModification(MOD_TRIGGER_CHANCES,0.00,0.001)
            call sir_trigger_aura.setBuffModifier(m)
            call sir_trigger_aura.setBuffIcon('@@0@@')
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
 local Creep target = Event.getTarget()
 local real sirX
 local real sirY
 local integer sirId
 local unit creep
 local effect e
    if target.getSize() < SIZE_BOSS or tower.calcChance(0.20+tower.getLevel()*0.005) then
        set sirId = target.getUID()
        set creep = target.getUnit()
        set sirX = GetUnitX(creep)
        set sirY = GetUnitY(creep)
        set e = AddSpecialEffectTarget("Abilities\\Spells\\Other\\Drain\\ManaDrainTarget.mdl",creep,"origin")
        call TriggerSleepAction(3.0)
        call DestroyEffect(e)
        set e = null
        if target.getUID() == sirId then
            call SetUnitX(creep, sirX)
            call SetUnitY(creep, sirY)
            call SFXAtUnit("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl",creep)
        endif
    endif
    set creep = null
endfunction

Tower Aura

AURA_auraEffect: sir_trigger_aura AURA_power: 300 AURA_level: 300 AURA_auraRange: 600 AURA_targetType: TARGET_TYPE_TOWERS AURA_levelAdd: 6 AURA_powerAdd: 6 AURA_targetSelf: false