Array
(
    [scriptVersion] => 7
    [oeValues] => Array
        (
            [RngBuff1] => 250
            [MissileHoming] => 1
            [Upgrade] => Array
                (
                )

            [targs1] => Array
                (
                )

            [customTeamColor] => 1
            [goldcost] => 700
            [weapsOn] => 1
            [castbsw] => 0.15
            [dice1] => 1
            [castpt] => 0.5
            [Missilespeed] => 1150
            [moveHeight] => 57
            [file] => units\orc\Shaman\Shaman.mdl
            [manaN] => 20
            [dmgpt1] => 0.43
            [atkType1] => chaos
            [modelScale] => 0.6
            [weapTp1] => missile
            [Missilearc] => 0.15
            [acquire] => 900
            [rangeN1] => 900
            [upgrades] => Array
                (
                )

            [teamColor] => 0
            [cool1] => 1.5
            [Ubertip] => A mighty tribal sorcerer.
            [green] => 100
            [regenMana] => 1
            [abilList] => Array
                (
                )

            [Name] => Shaman
            [Missileart] => Abilities\Weapons\IllidanMissile\IllidanMissile.mdl
            [launchY] => 20
            [Art] => ReplaceableTextures\CommandButtons\BTNShaman.blp
            [buildingShadow] => Array
                (
                )

            [turnRate] => 0.9
            [blue] => 100
            [sides1] => 1
            [uberSplat] => OSMA
            [auto] => Array
                (
                )

            [dmgplus1] => 461
            [bldtm] => 1
        )

    [settings] => Array
        (
            [author] => His_Shadow
            [element] => fire
            [authorDisplay] => |cFF8A5300His_Shadow|r
            [alpha] => 255
            [balanceTip] => |cffFFFF0015%|r crit chance
            [rarity] => rare
            [version] => 1.0
            [abil_factor] => 0.40
        )

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => -22.1797
                    [y] => 13.1061
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 2.46091
                    [file] => Doodads\Terrain\RockChunks\RockChunks2.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [1] => Array
                (
                    [x] => 24.5792
                    [y] => 6.33502
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 5.79449
                    [file] => Doodads\Terrain\RockChunks\RockChunks2.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [2] => Array
                (
                    [x] => -8.48035
                    [y] => -27.0064
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 3.92699
                    [file] => Doodads\Terrain\RockChunks\RockChunks2.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [3] => Array
                (
                    [x] => 31.5877
                    [y] => 48.7183
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 1.27409
                    [file] => Doodads\Outland\Plants\Outland_Plant\Outland_Plant6.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [4] => Array
                (
                    [x] => 48.6836
                    [y] => 29.1304
                    [z] => 19.2
                    [scale] => 0.3
                    [rot] => 0.994838
                    [file] => Doodads\Outland\Plants\Outland_Plant\Outland_Plant6.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [5] => Array
                (
                    [x] => 15.9213
                    [y] => 40.7256
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 4.04916
                    [file] => Doodads\Outland\Plants\Outland_Plant\Outland_Plant6.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [6] => Array
                (
                    [x] => -34.7473
                    [y] => 48.3272
                    [z] => 19.2
                    [scale] => 0.3
                    [rot] => 4.62512
                    [file] => Doodads\Outland\Plants\Outland_Plant\Outland_Plant6.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [7] => Array
                (
                    [x] => -21.766
                    [y] => -46.4571
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 1.88496
                    [file] => Doodads\Outland\Plants\Outland_Plant\Outland_Plant3.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [8] => Array
                (
                    [x] => -47.5323
                    [y] => 11.0152
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 3.40339
                    [file] => Doodads\Outland\Plants\Outland_Plant\Outland_Plant3.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [9] => Array
                (
                    [x] => 51.8461
                    [y] => -43.1693
                    [z] => 0.000000953674
                    [scale] => 0.1
                    [rot] => 4.07815
                    [file] => Units\Creeps\Archnathidpurple\Archnathidpurple.mdl
                    [red] => 255
                    [green] => 150
                    [blue] => 100
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [10] => Array
                (
                    [x] => 43.0574
                    [y] => -17.7831
                    [z] => 0
                    [scale] => 0.5
                    [rot] => 3.7001
                    [file] => Doodads\Outland\Plants\Outland_Plant\Outland_Plant3.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [11] => Array
                (
                    [x] => 31.1793
                    [y] => -62.4187
                    [z] => 0
                    [scale] => 0.8
                    [rot] => 4.95674
                    [file] => Doodads\LordaeronSummer\Props\TorchHumanOmni\TorchHumanOmni.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

        )

    [dmgTable] => Array
        (
            [0] => Array
                (
                    [id] => MOD_ATK_CRIT_CHANCE
                    [base] => 0.1375
                    [add] => 0
                )

        )

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

                )

            [1] => Array
                (
                    [name] => Header
                    [code] => globals
    //@export
    BuffType HS_bloodlust_buff
    //@export
    BuffType HS_bloody_exp_aura
endglobals
    
    //Do not remove or rename this function!
    //Put your initialization tasks here, this function will be called on map init
    
private function crit_exp takes Buff B returns nothing 

local Tower caster = B.getCaster()
local Tower tower = B.getBuffedUnit()
local integer ratio = caster.getLevel()/5+caster.userInt

if tower.getNumberOfCrits() > 0 and (tower.getLevel() < ratio or tower == caster) then 
  call tower.addExp(1*tower.getBaseAttackspeed()*(800.0/tower.getRange()))            
endif 
endfunction
    
private function init takes nothing returns nothing
        local Modifier m = Modifier.create()
        local Modifier n = Modifier.create()
        
        set HS_bloodlust_buff = BuffType.create( 5.00, 0.12, true )
        call HS_bloodlust_buff.setBuffIcon( '@@1@@' )
        call m.addModification(MOD_ATTACKSPEED,0.0,0.001) 
        call m.addModification(MOD_ATK_CRIT_DAMAGE,0.15,0.002)
        call HS_bloodlust_buff.setBuffModifier( m )
        
        set HS_bloody_exp_aura = BuffType.createAuraEffectType(true)
        call HS_bloody_exp_aura.addEventOnDamage(crit_exp, 1.0, 0.0 )
        call HS_bloody_exp_aura.setBuffModifier(n)
        call HS_bloody_exp_aura.setBuffIcon('@@0@@')	
endfunction
                    [values] => Array
                        (
                            [icon] => 
                            [visible] => false
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

            [2] => Array
                (
                    [name] => Autocast
                    [code] => local integer level  = tower.getLevel()
call HS_bloodlust_buff.applyCustomTimed(tower,Event.getTarget(), 150 + level * 2, 5 + 0.12*level)
                    [values] => Array
                        (
                            [caster_art] => 
                            [icon] => ReplaceableTextures\CommandButtons\BTNBloodLust.blp
                            [AUTOCAST_cooldown] => 5.0
                            [AUTOCAST_numBuffsBeforeIdle] => 1
                            [AUTOCAST_isExtended] => false
                            [long_explain] => The Shaman makes a friendly tower lust for blood, increasing its crit damage by |cffFFFF80x0.45|r and attackspeed by |cffFFFF8015%|r for |cffFFFF805|r seconds. |n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+x0.004|r crit damage|n|cffFFFF80+0.2%|r attackspeed|n|cffFFFF80+0.12|r seconds duration
                            [AUTOCAST_autocastType] => AC_TYPE_OFFENSIVE_BUFF
                            [AUTOCAST_manacost] => 15
                            [AUTOCAST_range] => 500.0
                            [AUTOCAST_buffType] => HS_bloodlust_buff
                            [name] => Bloodlust
                            [AUTOCAST_targetSelf] => true
                            [short_explain] => Increases crit damage and attackspeed of the target.
                            [AUTOCAST_targetType] => TARGET_TYPE_TOWERS
                            [target_art] => Abilities\Spells\Orc\Bloodlust\BloodlustTarget.mdl
                            [AUTOCAST_autoRange] => 500.0
                        )

                )

            [3] => Array
                (
                    [name] => Tower Aura
                    [code] => Array
                        (
                        )

                    [values] => Array
                        (
                            [icon] => ReplaceableTextures\CommandButtons\BTNHealingWard.blp
                            [visible] => true
                            [AURA_auraEffect] => HS_bloody_exp_aura
                            [AURA_power] => 1
                            [long_explain] => Every tower below |cffFFFF8010|r level in |cffFFFF80250|r range receives |cffFFFF801|r experience every time it crits. The amount of experience gained is base attackspeed and range adjusted. Level cap does not affect the Shaman himself.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+1|r level cap every |cffFFFF805|r levels
                            [AURA_level] => 1
                            [AURA_auraRange] => 250
                            [AURA_targetType] => TARGET_TYPE_TOWERS
                            [AURA_levelAdd] => 0
                            [AURA_powerAdd] => 0
                            [name] => Bloody Experience
                            [AURA_targetSelf] => true
                            [short_explain] => Towers affected by this aura receive experience every time they make a critical hit. |cffFFFF80250|r AoE.
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
            [0] => Array
                (
                    [id] => @@0@@
                    [derivedFrom] => BHfs
                    [oeValues] => Array
                        (
                            [Bufftip] => Bloody Experience
                            [Buffubertip] => This tower gains experience as it spills blood.
                            [Targetattachcount] => 1
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNHealingWard.blp
                            [TargetArt] => Array
                                (
                                )

                            [EditorName] => Bloody Experience
                        )

                )

            [1] => Array
                (
                    [id] => @@1@@
                    [derivedFrom] => BHfs
                    [oeValues] => Array
                        (
                            [Targetattach1] => hand,right
                            [Bufftip] => Bloodlust
                            [Targetattach] => hand,left
                            [Buffubertip] => This tower has increased crit damage and attackspeed.
                            [Targetattachcount] => 2
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNBloodLust.blp
                            [TargetArt] => Abilities\Spells\Orc\Bloodlust\BloodlustSpecial.mdl,Abilities\Spells\Orc\Bloodlust\BloodlustTarget.mdl
                            [EditorName] => Bloodlust
                            [Spelldetail] => 2
                        )

                )

        )

    [units] => Array
        (
        )

    [references] => Array
        (
            [0] => Array
                (
                    [export] => true
                    [category] => global
                    [typ] => BuffType
                    [name] => HS_bloodlust_buff
                )

            [1] => Array
                (
                    [export] => true
                    [category] => global
                    [typ] => BuffType
                    [name] => HS_bloody_exp_aura
                )

        )

)