Array
(
    [scriptVersion] => 8
    [oeValues] => Array
        (
            [Ubertip] => It isn't raining.
            [Art] => ReplaceableTextures\CommandButtons\BTNInfernal.blp
            [abilList] => Array
                (
                )

            [Name] => Evil Pet Rock
        )

    [settings] => Array
        (
            [balanceTip] => Array
                (
                )

            [goldcost] => 1800
            [author] => Ashbringer
            [authorDisplay] => |cffFF6600Ashbringer|r
            [version] => 1.0
            [rarity] => unique
        )

    [dmgTable] => Array
        (
        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => On Item Drop
                    [code] => local Effect e
    
    if itm.userInt != -1 then
        set e = itm.userInt
        call e.destroy()
        set itm.userInt = -1
    endif
                    [values] => Array
                        (
                            [explain] => 
                            [visible] => false
                            [goldcost] => 0
                            [name] => 
                        )

                )

            [1] => Array
                (
                    [name] => Header
                    [code] => globals
        ProjectileType ashbringer_evilpetrock_missile
    endglobals
    
    function ashbringer_evilpetrock_hit takes Projectile p, Creep c returns nothing
        local Tower t = p.getCaster()
        
        call t.doSpellDamage(c, p.userReal, t.calcSpellCritNoBonus())
    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
        set ashbringer_evilpetrock_missile = ProjectileType.create("Abilities\\Weapons\\DemonHunterMissile\\DemonHunterMissile.mdl", 5.0, 1300)
        call ashbringer_evilpetrock_missile.enableHoming(ashbringer_evilpetrock_hit, 0.0)
	endfunction
                    [values] => Array
                        (
                            [explain] => 
                            [visible] => false
                            [goldcost] => 0
                            [name] => 
                        )

                )

            [2] => Array
                (
                    [name] => On Item Pickup
                    [code] => set itm.userInt = -1
                    [values] => Array
                        (
                            [explain] => 
                            [visible] => false
                            [goldcost] => 0
                            [name] => 
                        )

                )

            [3] => Array
                (
                    [name] => Periodic
                    [code] => local Tower tower = itm.getCarrier()
    local Effect e = itm.userInt
    local Iterate i = Iterate.overUnitsInRange(tower, TARGET_TYPE_CREEPS, e.userReal, e.userReal2, 500)
    local Unit next
    local Unit random
    local real angle
    local real distance
    local real damage = 100 + (tower.getLevel() * 4)
    
    if itm.userInt != -1 then
        set e.userInt = e.userInt - 1
        loop
            set next = i.nextRandom()
            exitwhen next == 0
            set distance = DistanceBetweenPoints(Location(e.userReal, e.userReal2), GetUnitLoc(next.getUnit()))
            if distance <= 200 then
                call tower.doSpellDamage(next, damage, tower.calcSpellCritNoBonus())
                call Effect.createSimpleOnUnit("Abilities\\Spells\\NightElf\\Immolation\\ImmolationDamage.mdl", next, "chest").destroy()
            endif
            if e.userInt <= 0 then
                set e.userInt = 1
                set angle = bj_RADTODEG * Atan2(next.getY() - e.userReal2, next.getX() - e.userReal)
                call e.setFacing(angle)
                call e.setAnimation("attack")
                call e.queueAnimation("stand")
                set Projectile.createFromPointToUnit(ashbringer_evilpetrock_missile, tower, 0.0, 0.0, e.userReal, e.userReal2, 50, next, true, false, false).userReal = damage * 10
            endif
        endloop
    endif
                    [values] => Array
                        (
                            [explain] => 
                            [visible] => false
                            [goldcost] => 0
                            [PERIODIC_period] => 1
                            [name] => 
                        )

                )

            [4] => Array
                (
                    [name] => Autocast
                    [code] => local Tower tower = itm.getCarrier()
    local Effect e
    local real x = GetSpellTargetX() // + GetRandomReal(-60, 60)
    local real y = GetSpellTargetY() // + GetRandomReal(-60, 60)
    
    if itm.userInt != -1 then
        set e = itm.userInt
        call e.destroy()
        set itm.userInt = -1
    endif
    call Effect.createSimple("Units\\Demon\\Infernal\\InfernalBirth.mdl", x, y).setLifetime(3.0)
    call TriggerSleepAction(0.7)
    
    set e = Effect.createAnimatedScaled("units\\demon\\Infernal\\Infernal", x, y, 0, 270, 0.5)
    call e.setAnimation("birth")
    call e.queueAnimation("stand")
    set e.userInt = 2
    set e.userReal = x
    set e.userReal2 = y
    set itm.userInt = e
                    [values] => Array
                        (
                            [explain] => Call down an Infernal at the target location, where it will stay. Attacks a nearby enemy every second for |cffFFFF801000|r spell damage. Burns adjacent enemies every second for |cffFFFF8090%|r less spell damage.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+40|r spell damage
                            [AUTOCAST_cooldown] => 60
                            [AUTOCAST_autoRange] => 0
                            [AUTOCAST_manacost] => 0
                            [goldcost] => 1800
                            [AUTOCAST_range] => 700
                            [AUTOCAST_targetType] => 0
                            [AUTOCAST_numBuffsBeforeIdle] => 0
                            [caster_art] => 
                            [target_art] => 
                            [AUTOCAST_autocastType] => AC_TYPE_NOAC_POINT
                            [AUTOCAST_buffType] => 0
                            [AUTOCAST_isExtended] => false
                            [name] => Infernal
                            [AUTOCAST_targetSelf] => false
                        )

                )

            [5] => Array
                (
                    [name] => On Item Destruction
                    [code] => local Effect e
    
    if itm.userInt != -1 then
        set e = itm.userInt
        call e.destroy()
    endif
                    [values] => Array
                        (
                            [explain] => 
                            [visible] => false
                            [goldcost] => 0
                            [name] => 
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
        )

    [units] => Array
        (
        )

    [references] => Array
        (
        )

)