Array
(
    [scriptVersion] => 8
    [oeValues] => Array
        (
            [Ubertip] => Can you guess what aeon it is?
            [Art] => ReplaceableTextures\CommandButtons\BTNStormBolt.blp
            [abilList] => Array
                (
                )

            [Name] => Ancient Hammer of Aeons
        )

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

            [goldcost] => 1900
            [author] => Ashbringer
            [authorDisplay] => |cffff6600Ashbringer|r
            [version] => 1.0
            [rarity] => unique
        )

    [dmgTable] => Array
        (
        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => On Attack
                    [code] => local Tower tower = itm.getCarrier()
    local Unit creep = Event.getTarget()
    local Projectile p
    local real angle
    local real tower_x = tower.getX()
    local real tower_y = tower.getY()
    
    set p = Projectile.create(ashbringer_hammer_missile, tower, 0, 0, tower_x, tower_y+100, 40, 180)
    call p.setScale(1.4)
    set p.userReal = tower_x
    set p.userReal2 = tower_y
    set p.userInt = 0
                    [values] => Array
                        (
                            [explain] => Attacks have a |cffffff8010%|r chance to release a hammer that spirals outward from the tower. The hammer lasts for  |cffffff8012|r seconds and deals |cffffff80200%|r of attack damage as |cffC0C0C0Physical|r damage to enemies in its path.
                            [visible] => true
                            [goldcost] => 1900
                            [name] => Hammer Time!
                            [ONATTACK_chance] => 0.1
                            [ONATTACK_chanceLevelAdd] => 0.0
                        )

                )

            [1] => Array
                (
                    [name] => Header
                    [code] => globals
        ProjectileType ashbringer_hammer_missile
    endglobals
    
    public function ashbringer_hammer_hit takes Projectile p, Creep creep returns nothing 
        local Tower tower = p.getCaster()
        
        call tower.doCustomAttackDamage(creep, tower.getCurrentAttackDamageWithBonus()*2, tower.calcAttackMulticrit(0, 0, 0), AttackType.PHYSICAL)
        call Effect.createSimpleOnUnit("Abilities\\Weapons\\GryphonRiderMissile\\GryphonRiderMissile.mdl", creep, "chest").destroy()
    endfunction
    
    public function ashbringer_hammer_update takes Projectile p returns nothing
        local real radius = SquareRoot((p.userReal - p.x) * (p.userReal - p.x) + (p.userReal2 - p.y) * (p.userReal2 - p.y))
        local real circumference = bj_PI * radius * 2
        local real seconds = circumference / (p.speed)
        local real turning = 360 / seconds / 25
        local real angle = bj_RADTODEG * Atan2(p.y - p.userReal2, p.x - p.userReal) + 90
        
        if radius>140 then
            if angle < 0 then
                set angle = angle + 360
            elseif angle > 360 then
                set angle = angle - 360
            endif
            set p.rotation = turning - 0.04
            set p.direction = angle
        endif
    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_hammer_missile = ProjectileType.create("Abilities\\Weapons\\GryphonRiderMissile\\GryphonRiderMissile.mdl", 12, 1400)
        call ashbringer_hammer_missile.enablePeriodic(ProjectileEvent.ashbringer_hammer_update, 0.2)
        call ashbringer_hammer_missile.enableCollision(ProjectileTargetEvent.ashbringer_hammer_hit, 90, TARGET_TYPE_CREEPS, false)
        call ashbringer_hammer_missile.setStartRotation(14.4)
	endfunction
                    [values] => Array
                        (
                            [explain] => 
                            [visible] => false
                            [goldcost] => 0
                            [name] => 
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
        )

    [units] => Array
        (
        )

    [references] => Array
        (
        )

)