Ymir v1
3800
ID:
372
Family ID:
Author:
IamanEvilMan
Rarity:
unique
Element:
ice
Attack Type:
Elemental
Attack Range:
900
Attack CD:
1.5
Damage:
2300-2300
Status:
Approved

Description:

From the flesh of Ymir, king of the Jötanr, gods fashioned the mortal realms. Born of venom dripped into the frozen waters of Elivágar, Ymir was exiled to the lonely wastes of Ginnungagap where he mastered Icy powers.
Specials:
Splash attack:
   400 AoE: 25% damage
+10% damage/lvl
Wrath of Ymir
When Ymir damages a creep, there is a 20% chance that he deals an additional 10% of his attack damage as spell damage and slows the target by an amount equal to the percent of its remaining hitpoints for 2 seconds. 

Level Bonus:
+0.4% chance 
+0.6% damage
Blood of Ymir
When a creep comes in 900 range of Ymir, he debuffs the creep for 6 seconds, increasing vulnerability to Ice towers by 25%. 

Level Bonus:
+0.08 seconds duration
+0.4% vulnerability
Flesh of Ymir - Aura
The ancient Flesh of Ymir grants him -25% debuff duration. 

Level Bonus:
-0.6% debuff duration
Download

Toggle Triggers

Header

globals
    BuffType IamAnEvilMan_Blood_of_Ymir 
    BuffType IamAnEvilMan_Flesh_of_Ymir
    BuffType IamAnEvilMan_Wrath_of_Ymir
    MultiboardValues EvilManValues
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()
    call m.addModification(MOD_DMG_FROM_ICE, 0.25, 0.004) 
    set IamAnEvilMan_Blood_of_Ymir = BuffType.create( 6.00, 0.08, false )
    call IamAnEvilMan_Blood_of_Ymir.setBuffModifier(m)
    call IamAnEvilMan_Blood_of_Ymir.setStackingGroup("IamAnEvilMan_Blood_of_Ymir")
    call IamAnEvilMan_Blood_of_Ymir.setBuffIcon('@@0@@')
   
    set m = Modifier.create()
    call m.addModification(MOD_DEBUFF_DURATION,-0.25,-0.006)
    set IamAnEvilMan_Flesh_of_Ymir = BuffType.createAuraEffectType(true)
    call IamAnEvilMan_Flesh_of_Ymir.setBuffModifier(m)
    call IamAnEvilMan_Flesh_of_Ymir.setStackingGroup("IamAnEvilMan_Flesh_of_Ymir")
    call IamAnEvilMan_Flesh_of_Ymir.setBuffIcon('@@1@@')
    
    set m = Modifier.create()
    call m.addModification(MOD_MOVESPEED,-1,0.001) 
    set IamAnEvilMan_Wrath_of_Ymir=BuffType.create(0,0,false) 
    call IamAnEvilMan_Wrath_of_Ymir.setBuffModifier(m)     
    call IamAnEvilMan_Wrath_of_Ymir.setBuffIcon('@@2@@')  

    set EvilManValues = MultiboardValues.create(1)
    call EvilManValues.setKey(0, "Wrath Spelldamage")
    
endfunction

On Damage

ONDAMAGE_chance: .20 ONDAMAGE_chanceLevelAdd: 0.004
function onDamage takes Tower tower returns nothing
    
    local Creep target = Event.getTarget()
    local integer slow_power = 1000-R2I(target.getLifePercent()*1000) //slow becomes less powerful with every cast
    local real Wrath_Dmg = tower.getCurrentAttackDamageWithBonus() * (.1 + .006*tower.getLevel())
    
    call tower.doSpellDamage(target, Wrath_Dmg, tower.calcSpellCritNoBonus())
    call IamAnEvilMan_Wrath_of_Ymir.applyCustomTimed(tower, target, slow_power, 2.0)
    call SFXAtUnit("Abilities\\Weapons\\ZigguratFrostMissile\\ZigguratFrostMissile.mdl", target.getUnit())
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    //This allows Ymir to turn and face his foes
    call AddUnitAnimationProperties(tower.getUnit(), "stand alternate", false)
    //Ymir only gains Base Damage if he kills a unit under the effects of his debuff, so previous kills do not count
    set tower.userInt = 0
    
    
    
endfunction

On Tower Details

goldcost: 0
function onTowerDetails takes Tower tower returns MultiboardValues
    local real Wrath_Dmg = tower.getCurrentAttackDamageWithBonus() * (.1 + .006*tower.getLevel())

    call EvilManValues.setValue(0, I2S(R2I(Wrath_Dmg)))
    return EvilManValues    
    
endfunction

On Unit Comes In Range

UNITINRANGE_targetType: TARGET_TYPE_CREEPS UNITINRANGE_range: 900
function onUnitInRange takes Tower tower returns nothing
    call IamAnEvilMan_Blood_of_Ymir.apply(tower, Event.getTarget(), tower.getLevel())
endfunction

Tower Aura

AURA_auraEffect: IamAnEvilMan_Flesh_of_Ymir AURA_power: 0 AURA_level: 0 AURA_auraRange: 0.00 AURA_targetType: TARGET_TYPE_TOWERS AURA_levelAdd: 1 AURA_powerAdd: 1 AURA_targetSelf: true