Array
(
    [scriptVersion] => 7
    [oeValues] => Array
        (
            [RngBuff1] => 250
            [MissileHoming] => 1
            [Upgrade] => Array
                (
                )

            [targs1] => Array
                (
                )

            [goldcost] => 3600
            [weapsOn] => 1
            [launchSwimZ] => 30
            [dice1] => 1
            [Missilespeed] => 1500
            [moveHeight] => 10
            [file] => Units\Creeps\HeroFlameLord\HeroFlameLord.mdl
            [dmgpt1] => 0.5
            [modelScale] => 0.8
            [atkType1] => hero
            [weapTp1] => missile
            [acquire] => 1100
            [rangeN1] => 1100
            [upgrades] => Array
                (
                )

            [cool1] => 1.8
            [Ubertip] => An ancient volcano that has lived for thousands of years. The heat radiating from its lava can be felt from kilometers away.
            [backSw1] => 0.54
            [impactSwimZ] => 30
            [abilList] => Array
                (
                )

            [launchZ] => 130
            [Name] => Living Volcano
            [Missileart] => Abilities\Weapons\LordofFlameMissile\LordofFlameMissile.mdl
            [launchY] => 100
            [launchX] => -12
            [Art] => ReplaceableTextures\CommandButtons\BTNHeroAvatarOfFlame.blp
            [buildingShadow] => Array
                (
                )

            [turnRate] => 0.4
            [unitSound] => HeroFireLord
            [sides1] => 1
            [uberSplat] => OSMA
            [auto] => Array
                (
                )

            [dmgplus1] => 1770
            [bldtm] => 1
        )

    [settings] => Array
        (
            [author] => Kricz
            [element] => fire
            [authorDisplay] => |cff0A50A5Kricz|r
            [alpha] => 255
            [balanceTip] => |cffFFFF00+45% |rdmg to nature (|cffFFFF00+2%|r/lvl)|n|cffFFFF00+7.5% |rdamage/lvl|n|cffFFFF00+1.5% |rspell damage/lvl
            [rarity] => unique
            [version] => 1.0
            [abil_factor] => 0.25
        )

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => -1.71731
                    [y] => 12.7642
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 4.71239
                    [file] => Abilities\Spells\Other\Volcano\Volcano.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [1] => Array
                (
                    [x] => -26.0776
                    [y] => -38.4086
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 3.99819
                    [file] => Doodads\LordaeronSummer\Props\SkullPile\SkullPile1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [2] => Array
                (
                    [x] => 44.3364
                    [y] => -35.2035
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 4.74433
                    [file] => Doodads\LordaeronSummer\Props\SkullPile\SkullPile1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [3] => Array
                (
                    [x] => 14.8055
                    [y] => -34.2092
                    [z] => 0.000000953674
                    [scale] => 0.55
                    [rot] => 5.51699
                    [file] => Doodads\Dungeon\Rocks\DungeonRock\DungeonRock9.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [4] => Array
                (
                    [x] => 57.995
                    [y] => -6.53275
                    [z] => 0
                    [scale] => 0.25
                    [rot] => 0.469609
                    [file] => Doodads\Dungeon\Rocks\DungeonRock\DungeonRock9.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [5] => Array
                (
                    [x] => -11.0162
                    [y] => 2.72474
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 4.13833
                    [file] => Doodads\Dungeon\Rocks\DungeonRock\DungeonRock9.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [6] => Array
                (
                    [x] => 4.4489
                    [y] => 6.36826
                    [z] => 0
                    [scale] => 1.2
                    [rot] => 3.10669
                    [file] => Abilities\Spells\Items\AIfb\AIfbTarget.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [7] => Array
                (
                    [x] => -0.877875
                    [y] => 7.2373
                    [z] => 0
                    [scale] => 1.2
                    [rot] => 2.04204
                    [file] => Abilities\Spells\Items\AIfb\AIfbTarget.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [8] => Array
                (
                    [x] => 3.57806
                    [y] => 18.4443
                    [z] => -12.8
                    [scale] => 1.1
                    [rot] => 1.52175
                    [file] => Doodads\Dungeon\Props\Chain\Chain0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 1.56
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [9] => Array
                (
                    [x] => -6.42889
                    [y] => 0.731979
                    [z] => -12.8
                    [scale] => 1.1
                    [rot] => 4.61666
                    [file] => Doodads\Dungeon\Props\Chain\Chain0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 1.56
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [10] => Array
                (
                    [x] => 32.0474
                    [y] => 48.0007
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 5.51699
                    [file] => Doodads\Dungeon\Rocks\DungeonRock\DungeonRock9.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [11] => Array
                (
                    [x] => -25.8959
                    [y] => 32.5535
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 2.61243
                    [file] => Doodads\Dungeon\Rocks\DungeonRock\DungeonRock9.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [12] => Array
                (
                    [x] => -25.247
                    [y] => -45.1623
                    [z] => 0
                    [scale] => 0.8
                    [rot] => 2.75762
                    [file] => Abilities\Spells\Human\FlameStrike\FlameStrikeEmbers.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [13] => Array
                (
                    [x] => 48.0511
                    [y] => -4.20959
                    [z] => 0
                    [scale] => 0.8
                    [rot] => 2.75762
                    [file] => Abilities\Spells\Human\FlameStrike\FlameStrikeEmbers.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [14] => Array
                (
                    [x] => -1.4509
                    [y] => 12.5809
                    [z] => 0
                    [scale] => 1.2
                    [rot] => 2.75762
                    [file] => Abilities\Spells\Human\FlameStrike\FlameStrikeEmbers.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [15] => Array
                (
                    [x] => 27.3733
                    [y] => -32.2456
                    [z] => 0
                    [scale] => 0.8
                    [rot] => 2.75762
                    [file] => Abilities\Spells\Human\FlameStrike\FlameStrikeEmbers.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [16] => Array
                (
                    [x] => -47.1751
                    [y] => 3.54983
                    [z] => 0
                    [scale] => 0.8
                    [rot] => 2.75762
                    [file] => Abilities\Spells\Human\FlameStrike\FlameStrikeEmbers.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [17] => Array
                (
                    [x] => -4.59192
                    [y] => 49.6576
                    [z] => 0
                    [scale] => 0.8
                    [rot] => 2.75762
                    [file] => Abilities\Spells\Human\FlameStrike\FlameStrikeEmbers.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [18] => Array
                (
                    [x] => 3.79657
                    [y] => -14.9371
                    [z] => 0
                    [scale] => 1
                    [rot] => 3.64774
                    [file] => Abilities\Spells\Orc\CommandAura\CommandAura.mdl
                    [red] => 255
                    [green] => 50
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

        )

    [dmgTable] => Array
        (
            [0] => Array
                (
                    [id] => MOD_DMG_TO_NATURE
                    [base] => 0.45
                    [add] => 0.02
                )

            [1] => Array
                (
                    [id] => MOD_DAMAGE_BASE_PERC
                    [base] => 0
                    [add] => 0.075
                )

            [2] => Array
                (
                    [id] => MOD_SPELL_DAMAGE_DEALT
                    [base] => 0
                    [add] => 0.015
                )

        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => Header
                    [code] => 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
                    [values] => Array
                        (
                            [icon] => ReplaceableTextures\CommandButtons\BTNMarkOfFire.blp
                            [visible] => true
                            [name] => Heat Stroke
                            [short_explain] => Whenever a creep affected by Heat Aura dies, it has a chance to explode.
                            [long_explain] => Whenever a creep dies while under the effect of Heat Aura, there is a |cffFFFF8040%|r chance that it will explode, dealing |cffFFFF804500|r damage in |cffFFFF80300|r AoE. |n|n|cffFF8000Level Bonus:|r |n|cffFFFF80+100|r damage
                        )

                )

            [1] => Array
                (
                    [name] => On Attack
                    [code] => 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
                    [values] => Array
                        (
                            [icon] => ReplaceableTextures\CommandButtons\BTNFireRocks.blp
                            [visible] => true
                            [name] => Lava Attack
                            [short_explain] => Has a chance on attack to throw a lava ball towards the target location, dealing damage on impact.
                            [ONATTACK_chance] => 0.25
                            [ONATTACK_chanceLevelAdd] => 0.0
                            [long_explain] => Has a |cffFFFF8025%|r chance on attack to throw a burning lava ball towards the target's location, dealing |cffFFFF803500|r damage to creeps in |cffFFFF80300|r AoE. |n|n|cffFF8000Level Bonus:|r |n|cffFFFF80+5|r AoE |n|cffFFFF80+100|r damage
                        )

                )

            [2] => Array
                (
                    [name] => Tower Aura
                    [code] => Array
                        (
                        )

                    [values] => Array
                        (
                            [icon] => ReplaceableTextures\CommandButtons\BTNWallOfFire.blp
                            [visible] => true
                            [AURA_auraEffect] => Kricz_LV_HA
                            [AURA_power] => 1
                            [long_explain] => Burns every enemy in |cffFFFF80700|r range, making them lose |cffFFFF803%|r of their current life every second.
                            [AURA_level] => 0
                            [AURA_auraRange] => 700
                            [AURA_targetType] => TARGET_TYPE_CREEPS
                            [AURA_levelAdd] => 1
                            [AURA_powerAdd] => 1
                            [name] => Heat Aura
                            [AURA_targetSelf] => false
                            [short_explain] => Burns every enemy in 700 range, making them lose 3% of their current life per second.
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
            [0] => Array
                (
                    [id] => @@0@@
                    [derivedFrom] => Basl
                    [oeValues] => Array
                        (
                            [Bufftip] => Heat Aura
                            [EditorSuffix] => Array
                                (
                                )

                            [Buffubertip] => This unit is under the effect of Heat Aura. It will lose health with every second and has a chance to explode when it dies.
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNWallOfFire.blp
                            [TargetArt] => Abilities\Spells\Other\BreathOfFire\BreathOfFireDamage.mdl
                            [EditorName] => Heat Aura
                        )

                )

        )

    [units] => Array
        (
        )

    [references] => Array
        (
        )

)