Living Volcano v1
3600
ID:
468
Family ID:
Author:
Kricz
Rarity:
unique
Element:
fire
Attack Type:
Decay
Attack Range:
1100
Attack CD:
1.8
Damage:
1771-1771
Status:
Approved

Description:

An ancient volcano that has lived for thousands of years. The heat radiating from its lava can be felt from kilometers away.
Specials:
+45% dmg to nature (+2%/lvl)
+7.5% damage/lvl
+1.5% spell damage/lvl
Heat Stroke
Whenever a creep dies while under the effect of Heat Aura, there is a 40% chance that it will explode, dealing 4500 damage in 300 AoE. 

Level Bonus: 
+100 damage
Lava Attack
Has a 25% chance on attack to throw a burning lava ball towards the target's location, dealing 3500 damage to creeps in 300 AoE. 

Level Bonus: 
+5 AoE 
+100 damage
Heat Aura - Aura
Burns every enemy in 700 range, making them lose 3% of their current life every second.
Download

Toggle Triggers

Header

    globals 
        ProjectileType Kricz_LV_M
        BuffType Kricz_LV_HA
    endglobals
    
    function ragingHeatDamage takes Buff b returns nothing 
        local Creep creep = b.getBuffedUnit()  
        local Tower tower = b.getCaster()
        local unit u = creep.getUnit() 
        local real life = GetWidgetLife(u)
        local real dmg = life * 0.03 * tower.getDamageToCategory(creep.getCategory())
        //Gex meant it is okay so...
        if life < 2. then
            call tower.killInstantly(creep)
        else
            call SetWidgetLife(u, life - dmg)
        endif
        set u = null
    endfunction 
    
    function heatStroke takes Buff b returns nothing
        local Tower tower = b.getCaster()
        local Creep creep = b.getBuffedUnit()
        if tower.calcChance(0.4) then
            call SFXAtUnit("Abilities\\Spells\\Other\\Incinerate\\FireLordDeathExplode.mdl",creep.getUnit())
            call tower.doSpellDamageAoEUnit(creep, 300, 4500 + tower.getLevel() * 100, tower.calcSpellCritNoBonus(), 0.33)
        endif
    endfunction
    
    function LavaAttackMissileEnd takes Projectile p returns nothing
        local Unit c = p.getCaster()        
        call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl", p.x, p.y))
        call c.doSpellDamageAoE(p.x, p.y, p.userReal, p.userReal2, c.calcSpellCritNoBonus(), 0.25)             
    endfunction 
    
    private function init takes nothing returns nothing
        local Modifier HAM = Modifier.create() 
        set Kricz_LV_M = ProjectileType.create("Abilities\\Weapons\\BallsOfFireMissile\\BallsOfFireMissile.mdl", 1.5, 650)
        call Kricz_LV_M.setEventOnCleanup(ProjectileEvent.LavaAttackMissileEnd)
        
        set Kricz_LV_HA = BuffType.createAuraEffectType(false) 
        call Kricz_LV_HA.setBuffModifier(HAM)
        call Kricz_LV_HA.addPeriodicEvent(EventHandler.ragingHeatDamage, 1.0) 
        call Kricz_LV_HA.addEventOnDeath(EventHandler.heatStroke) 
        call Kricz_LV_HA.setStackingGroup("KRICZ_LV_DMG_AURA") 
        call Kricz_LV_HA.setBuffIcon('@@0@@') 
    endfunction 

On Attack

ONATTACK_chance: 0.25 ONATTACK_chanceLevelAdd: 0.0
function onAttack takes Tower tower returns nothing
    local Unit u = Event.getTarget()
    local integer lvl = tower.getLevel()
    local real AoE = 300 + 5 * lvl
    local real dmg = 3500. + lvl * 100 
    local Projectile p

    set p = Projectile.createLinearInterpolationFromUnitToPoint(Kricz_LV_M, tower, 1., tower.calcSpellCritNoBonus(), tower, u.getX(), u.getY(), 0., 0.45)
    set p.userReal = AoE
    set p.userReal2 = dmg
endfunction

Tower Aura

AURA_auraEffect: Kricz_LV_HA AURA_power: 1 AURA_level: 0 AURA_auraRange: 700 AURA_targetType: TARGET_TYPE_CREEPS AURA_levelAdd: 1 AURA_powerAdd: 1 AURA_targetSelf: false