Afflicted Obelisk v1
300
ID:
121
Family ID:
Author:
SirCoqaLot.
Rarity:
uncommon
Element:
nature
Attack Type:
Essence
Attack Range:
1000
Attack CD:
1.2
Damage:
136-236
Abil. Factor:
0.55
Status:
Approved

Description:

Something might hatch here soon...ish

Latest Upload Comment:

Restored from 1.10
Slumbering Parasite
On attack this tower injects an ancient parasite into its target, which surfaces after 3 seconds dealing this tower's attackdamage as Decay damage to the target. Each parasite increases the creep's vulnerability to Nature towers by 2.5%.

Level Bonus:
+0.05% Nature vulnerability
Download

Toggle Triggers

Header

    globals
    //@export
    BuffType dummy_obelisk_debuff
    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
    set dummy_obelisk_debuff = BuffType.create(0,0,true)
    call dummy_obelisk_debuff.setBuffIcon('@@0@@')
    endfunction

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 level = tower.getLevel()
    
    call dummy_obelisk_debuff.applyCustomTimed(tower,target,0,3/tower.getProp_BuffDuration()) // applying the dummy buff to show the effect on the unot
    call target.modifyProperty(MOD_DMG_FROM_NATURE,0.025+level*0.0005) // mod property 
    
    call TriggerSleepAction(3.0)    // 3 seconds before the parasite surfaces again
    
    if target.getUID() == id then 
        call tower.doCustomAttackDamage(target,tower.getCurrentAttackDamageWithBonus(),tower.calcAttackMulticrit(0,0,0),AttackType.DECAY) //do the dmg
        call SFXAtUnit("Objects\\Spawnmodels\\Undead\\CryptFiendEggsack\\CryptFiendEggsack.mdl",target.getUnit()) //effekt
        call target.modifyProperty(MOD_DMG_FROM_NATURE,-0.025-level*0.0005) // end the modification
    endif
    
endfunction