Village Witch v1
150
ID:
183
Family ID:
Author:
cedi
Rarity:
uncommon
Element:
darkness
Attack Type:
Essence
Attack Range:
1100
Attack CD:
1.6
Damage:
135-135
Abil. Factor:
0.6
Status:
Approved

Description:

A Small young witch...

Latest Upload Comment:

Restored from 1.10
Specials:
+1 mana/lvl
+0.1 mana regen/lvl
Love Potion
The witch throws a bottle of love potion on the target, slowing it by 25% and increasing its item drop chance by 20%. The potion lasts 7 seconds.

Level Bonus:
+0.375% slow
+0.3% Item drop chance
Soul Split
When the witch attacks, it has a 30% chance to deal 50 spell damage to its target, increasing the witch's attackspeed by 10% and decreasing the chance to trigger this spell by 10%. These effects last 10 seconds and stack. If the target is under the influence of a Love Potion, the attackspeed bonus, the damage and the duration of this spell are doubled.

Level Bonus:
+2 spell damage
Download

Toggle Triggers

Autocast

caster_art: AUTOCAST_cooldown: 3.00 AUTOCAST_numBuffsBeforeIdle: 1 AUTOCAST_isExtended: false AUTOCAST_autocastType: AC_TYPE_OFFENSIVE_BUFF AUTOCAST_manacost: 25 AUTOCAST_range: 1100.00 AUTOCAST_buffType: cedi_LovePotion AUTOCAST_targetSelf: false AUTOCAST_targetType: TARGET_TYPE_CREEPS target_art: AUTOCAST_autoRange: 1100.00
private function onAutocast takes Tower tower returns nothing
    set Projectile.createFromUnitToUnit( cedi_LoveMissile, tower, 1.00, tower.calcSpellCritNoBonus(), tower, Event.getTarget(), true, false, false ).userInt = 200 + tower.getLevel() * 3
endfunction

Header

    globals
        //@export
        BuffType cedi_LovePotion
        //@export
        BuffType cedi_SoulBuff
        //@export
        ProjectileType cedi_LoveMissile
    endglobals
    
    function cedi_Love takes Projectile p, Unit target returns nothing
        local Unit tower = p.getCaster()
        call cedi_LovePotion.apply( tower, target, p.userInt )
    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 mod = Modifier.create()  
        
        set cedi_LovePotion = BuffType.create( 7.00, 0.00, false ) 
        call cedi_LovePotion.setBuffModifier(mod) 
        call mod.addModification(MOD_ITEM_CHANCE_ON_DEATH,0.00,0.001)
        call mod.addModification(MOD_MOVESPEED,-0.00,-0.00125)
        call cedi_LovePotion.setBuffIcon( '@@0@@' )
        
        set cedi_SoulBuff = BuffType.create( 10.00, 0.00, true )
        call cedi_SoulBuff.setBuffIcon( '@@1@@' )
        
        set cedi_LoveMissile = ProjectileType.create( "Abilities\\Spells\\Other\\AcidBomb\\BottleMissile.mdl", 999.99, 1100.00 )
        call cedi_LoveMissile.enableHoming( cedi_Love, 0.00 )
    endfunction

On Damage

ONDAMAGE_chance: 1.0 ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
    local real multipler = 1.00
    local integer UID = tower.getUID()
    if tower.calcChance( tower.userReal / 100.00 ) then
        if Event.getTarget().getBuffOfType( cedi_LovePotion ) != 0 then
            set multipler = 2.00
            call tower.getOwner().displayFloatingTextX( "Double", tower, 255, 0, 0, 255, 64.00, 1.00, 2.00 )
        endif
        call SFXAtUnit("Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl", tower.getUnit())
        call tower.doSpellDamage( Event.getTarget(), (50 + 2 * tower.getLevel() ) * multipler, tower.calcSpellCritNoBonus() )
        call cedi_SoulBuff.applyCustomTimed( tower, tower, 1, 10 * multipler )
        set tower.userReal = tower.userReal - 10.00 //* multipler
        call tower.modifyProperty( MOD_ATTACKSPEED, 0.10 * multipler ) 
        
        call TriggerSleepAction( 10.00 * multipler )
        if tower.getUID() == UID then
            call tower.modifyProperty( MOD_ATTACKSPEED, -0.10 * multipler ) 
            set tower.userReal = tower.userReal + 10.00 //* multipler
        endif
    endif
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    set tower.userReal = 30.00
endfunction