Array
(
    [scriptVersion] => 8
    [oeValues] => Array
        (
            [auto] => Array
                (
                )

            [Art] => ReplaceableTextures\CommandButtons\BTNLavaBurst.blp
            [dmgplus1] => 236
            [bldtm] => 1
            [goldcost] => 175
            [sides1] => 1
            [Missilearc] => 0.3
            [launchZ] => 100
            [acquire] => 850
            [upgrades] => Array
                (
                )

            [Upgrade] => Array
                (
                )

            [Name] => Cinder Peak
            [weapTp1] => msplash
            [file] => .mdl
            [Harea1] => 200
            [uberSplat] => YTDC
            [Missilespeed] => 1700
            [Missileart] => Abilities\Spells\Other\Volcano\VolcanoMissile.mdl
            [dice1] => 1
            [RngBuff1] => 500
            [Hfact1] => 0.3
            [modelScale] => 0.1
            [rangeN1] => 850
            [atkType1] => pierce
            [cool1] => 2
            [Ubertip] => A living summit of flame, growing hotter and more destructive as the fire within awakens.
            [abilList] => Array
                (
                )

            [buildingShadow] => Array
                (
                )

            [targs1] => Array
                (
                )

            [weapsOn] => 1
        )

    [settings] => Array
        (
            [balanceTip] => |cffCCFF00Splash attack:|n   |cffFFFF00200|r AoE: |cffFFFF0030%|r damage|r
            [abil_factor] => 0.68
            [author] => Moppy
            [alpha] => 255
            [authorDisplay] => |c006969FFMoppy|r
            [version] => 1.0
            [element] => fire
            [rarity] => uncommon
        )

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => 0.222549
                    [y] => 1.01505
                    [z] => -19.2
                    [scale] => 0.75
                    [rot] => 4.71239
                    [file] => Doodads\Outland\Props\Grate\Grate1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [1] => Array
                (
                    [x] => 1.60266
                    [y] => -11.9302
                    [z] => -6.4
                    [scale] => 0.7
                    [rot] => 4.71239
                    [file] => Doodads\Dungeon\Rocks\DungeonRock\DungeonRock2.mdl
                    [red] => 185
                    [green] => 125
                    [blue] => 55
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [2] => Array
                (
                    [x] => -3.41683
                    [y] => 0.210976
                    [z] => -19.2
                    [scale] => 0.3
                    [rot] => 3.92699
                    [file] => Doodads\Outland\Rocks\Outland_Spires\Outland_Spires2.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [3] => Array
                (
                    [x] => -17.5066
                    [y] => -4.6433
                    [z] => -32
                    [scale] => 0.5
                    [rot] => 0.785398
                    [file] => Doodads\Dungeon\Rocks\DungeonRock\DungeonRock2.mdl
                    [red] => 185
                    [green] => 125
                    [blue] => 55
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [4] => Array
                (
                    [x] => -5.04588
                    [y] => -24.6447
                    [z] => -19.2
                    [scale] => 0.3
                    [rot] => 0
                    [file] => Doodads\Dungeon\Rocks\DungeonRock\DungeonRock2.mdl
                    [red] => 185
                    [green] => 125
                    [blue] => 55
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [5] => Array
                (
                    [x] => 16.6542
                    [y] => -18.1295
                    [z] => -25.6
                    [scale] => 0.4
                    [rot] => 0
                    [file] => Doodads\Dungeon\Rocks\DungeonRock\DungeonRock2.mdl
                    [red] => 185
                    [green] => 125
                    [blue] => 55
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [6] => Array
                (
                    [x] => -7.36481
                    [y] => -16.4021
                    [z] => -25.6
                    [scale] => 0.2
                    [rot] => 4.71239
                    [file] => Doodads\Outland\Rocks\Outland_Spires\Outland_Spires5.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [7] => Array
                (
                    [x] => 9.13126
                    [y] => -0.296137
                    [z] => -25.6
                    [scale] => 0.5
                    [rot] => 3.14159
                    [file] => Doodads\Dungeon\Rocks\DungeonRock\DungeonRock2.mdl
                    [red] => 185
                    [green] => 125
                    [blue] => 55
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [8] => Array
                (
                    [x] => -5.15542
                    [y] => 11.915
                    [z] => -25.6
                    [scale] => 0.5
                    [rot] => 5.23599
                    [file] => Doodads\Dungeon\Rocks\DungeonRock\DungeonRock2.mdl
                    [red] => 185
                    [green] => 125
                    [blue] => 55
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [9] => Array
                (
                    [x] => -37.7551
                    [y] => 15.26
                    [z] => -19.2
                    [scale] => 0.4
                    [rot] => 2.61799
                    [file] => Doodads\Dungeon\Rocks\DungeonRock\DungeonRock2.mdl
                    [red] => 185
                    [green] => 125
                    [blue] => 55
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [10] => Array
                (
                    [x] => 0.437166
                    [y] => -1.31521
                    [z] => -19.2
                    [scale] => 1.7
                    [rot] => 2.28638
                    [file] => war3mapImported\GeneralAuraTargetWhite.mdl
                    [red] => 255
                    [green] => 125
                    [blue] => 1
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

        )

    [dmgTable] => Array
        (
        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => On Attack
                    [code] => call moppy_volcanic_eruption_attack(tower, Event.getTarget())
                    [values] => Array
                        (
                            [visible] => true
                            [icon] => ReplaceableTextures\CommandButtons\BTNVolcano.blp
                            [name] => Volcanic Barrage
                            [short_explain] => On attack, there is a chance to fire additional projectiles at random enemies in range.
                            [ONATTACK_chance] => 0.2
                            [ONATTACK_chanceLevelAdd] => 0.004
                            [long_explain] => On attack, there is a |cffFFFF8020%|r chance to fire |cffFFFF802|r additional projectiles at random enemies in range. A single enemy may be hit by multiple projectiles.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+0.4%|r chance
                        )

                )

            [1] => Array
                (
                    [name] => Header
                    [code] => globals
    ProjectileType moppy_volcanic_eruption_shot
    endglobals
    
    function moppy_volcanic_eruption_projectile takes Projectile p returns nothing
        local Tower t = p.getCaster()
        local Unit c = p.userInt
        local Unit mainTarget = c
        local Iterate i = Iterate.overUnitsInRangeOfUnit(t, TARGET_TYPE_CREEPS, c, 200)        
        loop
            set c = i.next()
            exitwhen c == 0
                if c == mainTarget then
                    call t.doAttackDamage(c, t.getCurrentAttackDamageWithBonus(), t.calcAttackMulticrit(0.0, 0.0, 0))
                else
                    call t.doAttackDamage(c, t.getCurrentAttackDamageWithBonus() * 0.3, t.calcAttackMulticrit(0.0, 0.0, 0))
                endif
        endloop
    endfunction
    
    //@export
    function moppy_volcanic_eruption_attack takes Tower tower, Unit target returns nothing
        local Iterate i = Iterate.overUnitsInRangeOfCaster(tower, TARGET_TYPE_CREEPS, 850)
        local Unit array targets
        local Unit next
        local integer count = 0
        local integer shots = tower.userInt
        local real delay = 0.12 - (shots * 0.01)
        local Projectile p
    
        set targets[0] = target
            loop
                set next = i.next()
                exitwhen next == 0
                    if next != target then
                        set count = count + 1
                        set targets[count] = next
                    endif
            endloop

            loop
                exitwhen shots == 0
                set target = targets[GetRandomInt(0, count)]
                if target.getUID() != -1 then
                    call TriggerSleepAction(delay)
                    set p = Projectile.createLinearInterpolationFromUnitToUnit(moppy_volcanic_eruption_shot, tower, 1, 0, tower, target, 0.3, false)
                    set p.userInt = target
                endif
                set shots = shots - 1
            endloop
    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 moppy_volcanic_eruption_shot = ProjectileType.create("Abilities\\Spells\\Other\\Volcano\\VolcanoMissile.mdl", 4, 1700)
        call moppy_volcanic_eruption_shot.setEventOnCleanup(moppy_volcanic_eruption_projectile)
	endfunction
                    [values] => Array
                        (
                            [visible] => false
                            [icon] => 
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

            [2] => Array
                (
                    [name] => On Tower Creation
                    [code] => set tower.userInt = 2
                    [values] => Array
                        (
                            [visible] => false
                            [icon] => 
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
        )

    [units] => Array
        (
        )

    [references] => Array
        (
        )

    [lightning] => Array
        (
        )

)