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

            [Art] => ReplaceableTextures\CommandButtons\BTNMilitia.blp
            [turnRate] => 3
            [dmgplus1] => 212
            [bldtm] => 1
            [unitSound] => Peasant
            [goldcost] => 750
            [sides1] => 1
            [acquire] => 800
            [upgrades] => Array
                (
                )

            [Upgrade] => Array
                (
                )

            [Name] => Militia Outpost
            [weapTp1] => missile
            [MissileHoming] => 1
            [file] => units\human\Militia\Militia.mdl
            [Missileart] => Abilities\Weapons\Axe\AxeMissile.mdl
            [Missilespeed] => 1500
            [dice1] => 1
            [RngBuff1] => 250
            [modelScale] => 0.4
            [rangeN1] => 850
            [atkType1] => siege
            [cool1] => 0.7
            [Ubertip] => Militia guardians rain axes at the heads of the enemies. However, they are not very accurate, and afraid of undead and large creeps.
            [abilList] => Array
                (
                )

            [buildingShadow] => Array
                (
                )

            [targs1] => Array
                (
                )

            [weapsOn] => 1
        )

    [settings] => Array
        (
            [balanceTip] => |cffFFFF00-20% |rdmg to bosses (|cffFFFF00+0.7%|r/lvl)|n|cffFFFF00-20% |rdmg to undead (|cffFFFF00+0.5%|r/lvl)|n|cffFFFF00+20% |rdmg to nature (|cffFFFF00+0.5%|r/lvl)
            [abil_factor] => 0.433
            [author] => ShyGnome
            [alpha] => 255
            [authorDisplay] => ShyGnome
            [version] => 1.0
            [element] => iron
            [rarity] => uncommon
        )

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => 27.5581
                    [y] => 31.9675
                    [z] => 0
                    [scale] => 0.35
                    [rot] => 3.94444
                    [file] => units\human\Militia\Militia.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [1] => Array
                (
                    [x] => -10.194
                    [y] => 45.4619
                    [z] => 0
                    [scale] => 0.4
                    [rot] => 0.453786
                    [file] => Doodads\LordaeronSummer\Terrain\Crates\Crates1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [2] => Array
                (
                    [x] => -54.7094
                    [y] => -3.23724
                    [z] => 76.8
                    [scale] => 0.4
                    [rot] => 5.51524
                    [file] => units\human\Militia\Militia.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [3] => Array
                (
                    [x] => -37.5108
                    [y] => -45.7924
                    [z] => 0
                    [scale] => 0.4
                    [rot] => 2.6529
                    [file] => Doodads\LordaeronSummer\Terrain\Crates\Crates1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [4] => Array
                (
                    [x] => -34.2908
                    [y] => 34.9275
                    [z] => 0
                    [scale] => 0.55
                    [rot] => 3.80482
                    [file] => Doodads\LordaeronSummer\Terrain\Crates\Crates0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [5] => Array
                (
                    [x] => 57.5878
                    [y] => 5.41962
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 5.23599
                    [file] => buildings\human\HumanTower\HumanTower.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => true
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [6] => Array
                (
                    [x] => -55.3469
                    [y] => 0.0320212
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 5.23599
                    [file] => buildings\human\HumanTower\HumanTower.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => true
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [7] => Array
                (
                    [x] => 58.2595
                    [y] => -0.585226
                    [z] => 76.8
                    [scale] => 0.37
                    [rot] => 4.17134
                    [file] => units\human\Militia\Militia.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [8] => Array
                (
                    [x] => 32.1108
                    [y] => -31.8585
                    [z] => 0
                    [scale] => 0.4
                    [rot] => 5.39307
                    [file] => Doodads\LordaeronSummer\Terrain\Crates\Crates1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [9] => Array
                (
                    [x] => 11.7878
                    [y] => -50.7263
                    [z] => 0
                    [scale] => 0.4
                    [rot] => 3.92699
                    [file] => Doodads\LordaeronSummer\Terrain\Crates\Crates1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [10] => Array
                (
                    [x] => -15.8249
                    [y] => -47.9905
                    [z] => 0
                    [scale] => 0.4
                    [rot] => 3.07178
                    [file] => Doodads\LordaeronSummer\Terrain\Crates\Crates0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [11] => Array
                (
                    [x] => 52.8892
                    [y] => 40.2185
                    [z] => 0
                    [scale] => 0.4
                    [rot] => 1.62316
                    [file] => Doodads\LordaeronSummer\Terrain\Crates\Crates0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [12] => Array
                (
                    [x] => 23.814
                    [y] => 52.9536
                    [z] => 0
                    [scale] => 0.4
                    [rot] => 5.2709
                    [file] => Doodads\LordaeronSummer\Terrain\Crates\Crates0.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

        )

    [dmgTable] => Array
        (
            [0] => Array
                (
                    [id] => MOD_DMG_TO_BOSS
                    [base] => -0.2
                    [add] => 0.007
                )

            [1] => Array
                (
                    [id] => MOD_DMG_TO_UNDEAD
                    [base] => -0.2
                    [add] => 0.005
                )

            [2] => Array
                (
                    [id] => MOD_DMG_TO_NATURE
                    [base] => 0.2
                    [add] => 0.005
                )

        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => On Attack
                    [code] => local integer attacks = 2
    local boolean add = false
    local Unit maintarget = Event.getTarget()
    local Unit target
    local Iterate it = Iterate.overUnitsInRangeOfUnit(tower,TARGET_TYPE_CREEPS,maintarget,450)
    local real sidearc = 0.20
    local boolean itDestroyed = false
 
    if tower.getLevel() >= 15 then
        set attacks = attacks + 1
    endif

    if tower.getLevel() >= 25 then
        set attacks = attacks + 1
    endif
    
    loop
        exitwhen attacks == 0 // Exit when all attacks are fired
        
        // If the Iterate is not destroyed, get the next target
        if not itDestroyed then
            set target = it.next()
        
            // If there are no more targets
            if target == 0 then
                set itDestroyed = true // Iterate is destroyed (auto destroy)
                set target = maintarget // target is the maintarget now
            endif
        endif
  
        // If there are no more units, shoot at the maintarget (itDestroyed). If there are units then don't shoot at the maintarget
        if itDestroyed or target != maintarget then
            call Projectile.createBezierInterpolationFromUnitToUnit(MilitiaAxe,tower,0,0,tower,target,0,sidearc,0,true).setScale(0.40)
            set attacks = attacks - 1
            set sidearc = -sidearc
            if add then
                set sidearc = sidearc + 0.20
            endif
            set add = not add
        endif

    endloop
 
    // If the Iterate is not destroyed yet, destroy it
    if not itDestroyed then
        call it.destroy()
    endif
                    [values] => Array
                        (
                            [visible] => true
                            [icon] => ReplaceableTextures\CommandButtons\BTNFanOfKnives.blp
                            [name] => Hail of Axes
                            [short_explain] => Attacks multiple enemies at once with a chance to miss.
                            [ONATTACK_chance] => 1.0
                            [ONATTACK_chanceLevelAdd] => 0.0
                            [long_explain] => Militia guardians throw axes to up to |cffFFFF803|r enemies at once, but each attack has |cffFFFF8033%|r chance to miss.  If there are less creeps than attacks, the remaining axes will hit the main target.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80-1.1%|r chance to miss|n|cffFFFF80+1|r target at levels |cffFFFF8015|r and |cffFFFF8025|r
                        )

                )

            [1] => Array
                (
                    [name] => Header
                    [code] => globals
      //@import
      ProjectileType MilitiaAxe
   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
   endfunction
                    [values] => Array
                        (
                            [visible] => false
                            [icon] => 
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

            [2] => Array
                (
                    [name] => On Damage
                    [code] => if tower.calcBadChance(0.33-0.011*tower.getLevel()) then
        set Event.damage = 0
        call tower.getOwner().displayFloatingTextX("Miss",tower,255, 0, 0,255,0.05,0.0,2.0)
    endif
                    [values] => Array
                        (
                            [ONDAMAGE_chance] => 1.0
                            [visible] => false
                            [icon] => 
                            [name] => 
                            [short_explain] => 
                            [ONDAMAGE_chanceLevelAdd] => 0.0
                            [long_explain] => 
                        )

                )

            [3] => Array
                (
                    [name] => On Tower Creation
                    [code] => set tower.userInt = 2 // Save the family member (1 = first member)
    set tower.userInt2 = 0 // Used to save the buff (double linked list)
                    [values] => Array
                        (
                            [visible] => false
                            [icon] => 
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
        )

    [units] => Array
        (
        )

    [references] => Array
        (
            [0] => Array
                (
                    [export] => false
                    [category] => global
                    [typ] => ProjectileType
                    [name] => MilitiaAxe
                )

        )

)