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

            [Art] => ReplaceableTextures\CommandButtons\BTNMetamorphosis.blp
            [turnRate] => 3
            [dmgplus1] => 4522
            [bldtm] => 1
            [unitSound] => IllidanMorphed
            [goldcost] => 3600
            [sides1] => 1
            [manaN] => 100
            [Attachmentlinkprops] => alternate
            [launchZ] => 90
            [acquire] => 900
            [upgrades] => Array
                (
                )

            [Upgrade] => Array
                (
                )

            [launchY] => 20
            [Name] => The Demon Within
            [weapTp1] => missile
            [file] => units\nightelf\EvilIllidan\IllidanEvil.mdl
            [MissileHoming] => 1
            [uberSplat] => YTDB
            [Missileart] => war3mapImported\SpiritOfVengeanceMissileBlackRed.mdl
            [dice1] => 1
            [Boneprops] => alternate
            [Attachmentanimprops] => alternate
            [animProps] => ready,alternate
            [modelScale] => 0.45
            [rangeN1] => 900
            [atkType1] => chaos
            [cool1] => 1.7
            [Ubertip] => Once a stoic demon hunter, he was consumed by his inner demon and became a living embodiment of rage.
            [scaleBull] => 0
            [abilList] => Array
                (
                )

            [moveHeight] => 30
            [customTeamColor] => 1
            [buildingShadow] => Array
                (
                )

            [targs1] => Array
                (
                )

            [weapsOn] => 1
            [teamColor] => 0
        )

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

            [abil_factor] => 0.6
            [author] => Ashbringer
            [alpha] => 255
            [authorDisplay] => |cffFF6600Ashbringer|r
            [version] => 1.0
            [element] => darkness
            [rarity] => unique
        )

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => -0.216584
                    [y] => 0.415799
                    [z] => -6.4
                    [scale] => 0.8
                    [rot] => 4.71414
                    [file] => Doodads\Outland\Props\Grate\Grate1.mdl
                    [red] => 255
                    [green] => 1
                    [blue] => 1
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [1] => Array
                (
                    [x] => -0.626105
                    [y] => 25.0517
                    [z] => 19.2
                    [scale] => 1
                    [rot] => 4.71239
                    [file] => Abilities\Spells\Orc\Purge\PurgeBuffTarget.mdl
                    [red] => 255
                    [green] => 1
                    [blue] => 1
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [2] => Array
                (
                    [x] => -30.9333
                    [y] => -15.995
                    [z] => -12.8
                    [scale] => 0.25
                    [rot] => 3.90001
                    [file] => Doodads\Icecrown\Rocks\Icecrown_Crystal\Icecrown_Crystal1.mdl
                    [red] => 255
                    [green] => 1
                    [blue] => 1
                    [alpha] => 255
                    [pitch] => -0.5
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [3] => Array
                (
                    [x] => -0.00685011
                    [y] => -0.00324424
                    [z] => -25.6
                    [scale] => 2.1
                    [rot] => 5.61996
                    [file] => war3mapImported\GeneralAuraTargetWhite.mdl
                    [red] => 255
                    [green] => 1
                    [blue] => 1
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [4] => Array
                (
                    [x] => 27.9446
                    [y] => -13.2203
                    [z] => -12.8
                    [scale] => 0.25
                    [rot] => 5.94072
                    [file] => Doodads\Icecrown\Rocks\Icecrown_Crystal\Icecrown_Crystal1.mdl
                    [red] => 255
                    [green] => 1
                    [blue] => 1
                    [alpha] => 255
                    [pitch] => -0.5
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [5] => Array
                (
                    [x] => -1.90165
                    [y] => -33.8562
                    [z] => -12.8
                    [scale] => 0.25
                    [rot] => 4.76947
                    [file] => Doodads\Icecrown\Rocks\Icecrown_Crystal\Icecrown_Crystal1.mdl
                    [red] => 255
                    [green] => 1
                    [blue] => 1
                    [alpha] => 255
                    [pitch] => -0.5
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [6] => Array
                (
                    [x] => 24.5591
                    [y] => 19.0098
                    [z] => -12.8
                    [scale] => 0.25
                    [rot] => 0.952533
                    [file] => Doodads\Icecrown\Rocks\Icecrown_Crystal\Icecrown_Crystal1.mdl
                    [red] => 255
                    [green] => 1
                    [blue] => 1
                    [alpha] => 255
                    [pitch] => -0.5
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [7] => Array
                (
                    [x] => -20.1232
                    [y] => 22.2696
                    [z] => -12.8
                    [scale] => 0.25
                    [rot] => 2.78202
                    [file] => Doodads\Icecrown\Rocks\Icecrown_Crystal\Icecrown_Crystal1.mdl
                    [red] => 255
                    [green] => 1
                    [blue] => 1
                    [alpha] => 255
                    [pitch] => -0.5
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [8] => Array
                (
                    [x] => -5.50372
                    [y] => 26.4419
                    [z] => -12.8
                    [scale] => 0.25
                    [rot] => 1.78592
                    [file] => Doodads\Icecrown\Rocks\Icecrown_Crystal\Icecrown_Crystal1.mdl
                    [red] => 255
                    [green] => 1
                    [blue] => 1
                    [alpha] => 255
                    [pitch] => -0.5
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

        )

    [dmgTable] => Array
        (
        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => On Attack
                    [code] => local Buff b = tower.getBuffOfType(ashbringer_unbridled_buff)
    local real mana_perc
    
    if b == 0 then
        set mana_perc = GetUnitState(tower.getUnit(), UNIT_STATE_MANA) / GetUnitState(tower.getUnit(), UNIT_STATE_MAX_MANA)
        if tower.calcChance(0.1 * mana_perc) then
            call ashbringer_unbridled_buff.apply(tower, tower, tower.getLevel())
            call tower.subtractManaPerc(1.0, true)
            call Effect.createSimpleAtUnit("Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl", tower).destroy()
        endif
    endif
                    [values] => Array
                        (
                            [visible] => false
                            [icon] => 
                            [name] => Demonic Rampage
                            [short_explain] => 
                            [ONATTACK_chance] => 1.0
                            [ONATTACK_chanceLevelAdd] => 0.0
                            [long_explain] => 
                        )

                )

            [1] => Array
                (
                    [name] => Header
                    [code] => globals
        BuffType ashbringer_unbridled_buff
    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
        local Modifier mod = Modifier.create()
        
        set ashbringer_unbridled_buff=BuffType.create(5.0, 0.0, true)
        call ashbringer_unbridled_buff.setBuffIcon('@@0@@')
        
        call mod.addModification(MOD_ATTACKSPEED, 0.3, 0.012)
        call mod.addModification(MOD_ATK_CRIT_CHANCE, 0.15, 0.006)
        call mod.addModification(MOD_ATK_CRIT_DAMAGE, 0.75, 0.03)
        call mod.addModification(MOD_MULTICRIT_COUNT, 1, 0.0)
        
        call ashbringer_unbridled_buff.setBuffModifier(mod)
	endfunction
                    [values] => Array
                        (
                            [visible] => false
                            [icon] => 
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

            [2] => Array
                (
                    [name] => On Damage
                    [code] => if tower.getBuffOfType(ashbringer_unbridled_buff) != 0 then
        set Event.damage = Event.damage * 2
    else
        set Event.damage = Event.damage * (1 + (GetUnitState(tower.getUnit(), UNIT_STATE_MANA) / GetUnitState(tower.getUnit(), UNIT_STATE_MAX_MANA)))
    endif
    
    if Event.isAttackDamageCritical() then
        call tower.addManaPerc(0.04 * 2)
    else
        call tower.addManaPerc(0.04)
    endif
                    [values] => Array
                        (
                            [ONDAMAGE_chance] => 1.0
                            [visible] => true
                            [icon] => ReplaceableTextures\CommandButtons\BTNSRShamanisticRage.blp
                            [name] => Unbridled Rage
                            [short_explain] => Attacks have a chance based on rage to greatly empower attacks briefly.
                            [ONDAMAGE_chanceLevelAdd] => 0.0
                            [long_explain] => Attacks have up to |cffFFFF8010%|r chance based on current mana to remove all mana and empower the tower with the following for |cffFFFF805|r seconds:|n|cffFFFF80+30%|r attack speed|n|cffFFFF80+15%|r crit chance|n|cffFFFF80+x0.75|r crit damage|n|cffFFFF80+1|r Multicrit|n|cffFFFF80+|rCount as having maximum mana|n|nCannot trigger while already active.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+1.2%|r attack speed|n|cffFFFF80+0.6%|r crit chance|n|cffFFFF80+x0.03|r crit damage
                        )

                )

            [3] => Array
                (
                    [name] => Periodic
                    [code] => call tower.subtractMana(GetUnitState(tower.getUnit(), UNIT_STATE_MANA) * 0.1, true)
                    [values] => Array
                        (
                            [visible] => true
                            [PERIODIC_period] => 1.0
                            [icon] => ReplaceableTextures\CommandButtons\BTNUnholyFrenzy.blp
                            [name] => Embodiment of Rage
                            [short_explain] => The tower deals more damage based on mana. Generates mana on attack but loses mana over time.
                            [long_explain] => The tower's mana represents the amount of Rage the tower has, dealing |cffFFFF801%|r more damage with attacks per |cffFFFF801%|r current mana. Attacks generate |cffFFFF804%|r of maximum mana on hit, doubled for critical strikes. However, the tower loses |cffFFFF8010%|r of current mana per second.
                        )

                )

            [4] => Array
                (
                    [name] => On Tower Creation
                    [code] => call SetUnitColor(tower.getUnit(), ConvertPlayerColor(0))
    //call Effect.createSimpleOnUnit("Abilities\\Spells\\Orc\\Bloodlust\\BloodlustTarget.mdl", tower, "hand, left")
    //call Effect.createSimpleOnUnit("Abilities\\Spells\\Orc\\Bloodlust\\BloodlustTarget.mdl", tower, "hand, right")
                    [values] => Array
                        (
                            [visible] => false
                            [icon] => 
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
            [0] => Array
                (
                    [id] => @@0@@
                    [derivedFrom] => BHtc
                    [oeValues] => Array
                        (
                            [Targetattach] => hand,left
                            [Targetattach1] => hand,right
                            [Buffubertip] => Increased attack stats.
                            [TargetArt] => Abilities\Spells\Orc\Bloodlust\BloodlustTarget.mdl,Abilities\Spells\Orc\Bloodlust\BloodlustSpecial.mdl
                            [Bufftip] => Unbridled Rage
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNSRShamanisticRage.blp
                        )

                )

        )

    [units] => Array
        (
        )

    [references] => Array
        (
        )

    [lightning] => Array
        (
        )

)