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

            [Art] => ReplaceableTextures\CommandButtons\BTNSpell_frost_frozenorb.blp
            [bldtm] => 1
            [dmgplus1] => 159
            [goldcost] => 150
            [unitSound] => ElvenGuardTower
            [sides1] => 7
            [Missilearc] => 0.15
            [manaN] => 45
            [acquire] => 800
            [upgrades] => Array
                (
                )

            [Upgrade] => Array
                (
                )

            [Name] => Chilled Orb of Frost
            [weapTp1] => missile
            [file] => .mdl
            [uberSplat] => YTDN
            [Missileart] => Abilities\Spells\Other\FrostBolt\FrostBoltMissile.mdl
            [Missilespeed] => 1500
            [dice1] => 1
            [RngBuff1] => 250
            [regenMana] => 2
            [green] => 155
            [modelScale] => 0.1
            [rangeN1] => 800
            [atkType1] => normal
            [cool1] => 2
            [Ubertip] => Stillness made manifest, the eerie silence is unnerving.
            [scaleBull] => 0
            [blue] => 1
            [abilList] => Array
                (
                )

            [buildingShadow] => Array
                (
                )

            [targs1] => Array
                (
                )

            [weapsOn] => 1
        )

    [settings] => Array
        (
            [balanceTip] => |cffFFFF00+0.1 |rmana regen/lvl
            [abil_factor] => 0.45
            [author] => Ashbringer
            [alpha] => 255
            [authorDisplay] => |cffff6600Ashbringer|r
            [element] => ice
            [rarity] => uncommon
        )

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => -24.3225
                    [y] => -25.0356
                    [z] => -6.4
                    [scale] => 0.2
                    [rot] => 0.785398
                    [file] => Doodads\Cityscape\Props\City_Oblisk\City_Oblisk.mdl
                    [red] => 15
                    [green] => 25
                    [blue] => 65
                    [alpha] => 255
                    [pitch] => -0.5
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [1] => Array
                (
                    [x] => 25.3926
                    [y] => 24.4963
                    [z] => -6.4
                    [scale] => 0.2
                    [rot] => 3.92699
                    [file] => Doodads\Cityscape\Props\City_Oblisk\City_Oblisk.mdl
                    [red] => 15
                    [green] => 25
                    [blue] => 65
                    [alpha] => 255
                    [pitch] => -0.5
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [2] => Array
                (
                    [x] => -24.4758
                    [y] => 23.8547
                    [z] => -6.4
                    [scale] => 0.2
                    [rot] => 5.49779
                    [file] => Doodads\Cityscape\Props\City_Oblisk\City_Oblisk.mdl
                    [red] => 15
                    [green] => 25
                    [blue] => 65
                    [alpha] => 255
                    [pitch] => -0.5
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [3] => Array
                (
                    [x] => 25.7701
                    [y] => -25.7718
                    [z] => -6.4
                    [scale] => 0.2
                    [rot] => 2.3562
                    [file] => Doodads\Cityscape\Props\City_Oblisk\City_Oblisk.mdl
                    [red] => 15
                    [green] => 25
                    [blue] => 65
                    [alpha] => 255
                    [pitch] => -0.5
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [4] => Array
                (
                    [x] => -0.485614
                    [y] => -14.259
                    [z] => 6.4
                    [scale] => 0.1
                    [rot] => 1.57075
                    [file] => war3mapImported\City_ColumnSemiCircle2.mdl
                    [red] => 15
                    [green] => 25
                    [blue] => 65
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [5] => Array
                (
                    [x] => 0.194226
                    [y] => 14.3311
                    [z] => 6.4
                    [scale] => 0.1
                    [rot] => 4.71239
                    [file] => war3mapImported\City_ColumnSemiCircle2.mdl
                    [red] => 15
                    [green] => 25
                    [blue] => 65
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [6] => Array
                (
                    [x] => -10.5373
                    [y] => -11.208
                    [z] => -6.4
                    [scale] => 0.18
                    [rot] => 3.92699
                    [file] => Doodads\Cityscape\Structures\City_LowWall_TallEndCap\City_LowWall_TallEndCap.mdl
                    [red] => 45
                    [green] => 45
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [7] => Array
                (
                    [x] => 11.2631
                    [y] => -11.2733
                    [z] => -6.4
                    [scale] => 0.18
                    [rot] => 5.49779
                    [file] => Doodads\Cityscape\Structures\City_LowWall_TallEndCap\City_LowWall_TallEndCap.mdl
                    [red] => 45
                    [green] => 45
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [8] => Array
                (
                    [x] => 11.5098
                    [y] => 10.2376
                    [z] => -6.4
                    [scale] => 0.18
                    [rot] => 0.785398
                    [file] => Doodads\Cityscape\Structures\City_LowWall_TallEndCap\City_LowWall_TallEndCap.mdl
                    [red] => 45
                    [green] => 45
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [9] => Array
                (
                    [x] => -10.3142
                    [y] => 10.2921
                    [z] => -6.4
                    [scale] => 0.18
                    [rot] => 2.3562
                    [file] => Doodads\Cityscape\Structures\City_LowWall_TallEndCap\City_LowWall_TallEndCap.mdl
                    [red] => 45
                    [green] => 45
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [10] => Array
                (
                    [x] => 6.85604
                    [y] => 5.77277
                    [z] => 6.4
                    [scale] => 0.18
                    [rot] => 0.785398
                    [file] => Doodads\Cityscape\Structures\City_LowWall_TallEndCap\City_LowWall_TallEndCap.mdl
                    [red] => 45
                    [green] => 45
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [11] => Array
                (
                    [x] => 7.25208
                    [y] => -6.9029
                    [z] => 6.4
                    [scale] => 0.18
                    [rot] => 5.49779
                    [file] => Doodads\Cityscape\Structures\City_LowWall_TallEndCap\City_LowWall_TallEndCap.mdl
                    [red] => 45
                    [green] => 45
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [12] => Array
                (
                    [x] => -6.49626
                    [y] => -7.19523
                    [z] => 6.4
                    [scale] => 0.18
                    [rot] => 3.92699
                    [file] => Doodads\Cityscape\Structures\City_LowWall_TallEndCap\City_LowWall_TallEndCap.mdl
                    [red] => 45
                    [green] => 45
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [13] => Array
                (
                    [x] => -6.80326
                    [y] => 6.14506
                    [z] => 6.4
                    [scale] => 0.18
                    [rot] => 2.3562
                    [file] => Doodads\Cityscape\Structures\City_LowWall_TallEndCap\City_LowWall_TallEndCap.mdl
                    [red] => 45
                    [green] => 45
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [14] => Array
                (
                    [x] => -0.0822486
                    [y] => -2.13763
                    [z] => 0
                    [scale] => 0.22
                    [rot] => 0
                    [file] => Doodads\Icecrown\Props\IceCrownObelisk\IceCrownObelisk1.mdl
                    [red] => 25
                    [green] => 25
                    [blue] => 25
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [15] => Array
                (
                    [x] => -0.0252522
                    [y] => 4.88167
                    [z] => 25.6
                    [scale] => 0.45
                    [rot] => 4.71239
                    [file] => war3mapImported\OrbofFrost.mdl
                    [red] => 155
                    [green] => 155
                    [blue] => 155
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [16] => Array
                (
                    [x] => -0.101309
                    [y] => 0.0753978
                    [z] => -19.2
                    [scale] => 1.55
                    [rot] => 2.84489
                    [file] => Abilities\Spells\Other\GeneralAuraTarget\GeneralAuraTarget.mdl
                    [red] => 35
                    [green] => 65
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [17] => Array
                (
                    [x] => -0.14271
                    [y] => 0.0725878
                    [z] => 0
                    [scale] => 0.9
                    [rot] => 2.84489
                    [file] => Abilities\Spells\Other\GeneralAuraTarget\GeneralAuraTarget.mdl
                    [red] => 35
                    [green] => 65
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

        )

    [dmgTable] => Array
        (
            [0] => Array
                (
                    [id] => MOD_MANA_REGEN
                    [base] => 0
                    [add] => 0.1
                )

        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => Header
                    [code] => globals
        //@export
        BuffType ashbringer_orboffrost_buff
        BuffType ashbringer_orboffrost_dot
    endglobals

    function ashbringer_orboffrost_ondamage takes Buff b returns nothing
        local Tower tower = b.getBuffedUnit()
        local Unit target = Event.getTarget()
        local Buff dot = target.getBuffOfType(ashbringer_orboffrost_dot)
        
        if dot != 0 then
            set dot.userReal = dot.userReal + (b.userReal * tower.getCurrentAttackDamageWithBonus() * tower.getProp_BuffDuration())
        else
            set dot = ashbringer_orboffrost_dot.apply(tower, target, tower.getLevel())
            set dot.userReal = b.userReal * tower.getCurrentAttackDamageWithBonus() * tower.getProp_BuffDuration()
        endif
        set dot.userInt = R2I(6 * tower.getProp_BuffDuration())
    endfunction
    
    function ashbringer_orboffrost_tick takes Buff b returns nothing
        local Tower tower = b.getCaster()
        local Unit target = b.getBuffedUnit()
        
        if b.userInt > 0 and b.userReal > 0 then
            call tower.doCustomAttackDamage(target, b.userReal / b.userInt, tower.calcAttackMulticrit(0, 0, 0), AttackType.ENERGY)
            call Effect.createSimpleOnUnit("Abilities\\Spells\\Items\\AIob\\AIobSpecialArt.mdl", target, "chest").destroy()
            set b.userReal = b.userReal - (b.userReal / b.userInt)
            set b.userInt = b.userInt - 1
            if b.userInt == 0 then
                call b.removeBuff()
            endif
        else
            call b.removeBuff()
        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
        local Modifier mod = Modifier.create()
        set ashbringer_orboffrost_buff = BuffType.create(5, 0.2, true)
        call ashbringer_orboffrost_buff.setBuffIcon('@@0@@')
        call ashbringer_orboffrost_buff.addEventOnDamage(ashbringer_orboffrost_ondamage, 1, 0)
        call mod.addModification(MOD_ATK_CRIT_CHANCE, 0.0, 0.0001)
        call ashbringer_orboffrost_buff.setBuffModifier(mod)
        
        set ashbringer_orboffrost_dot = BuffType.create(-1, 0, false)
        call ashbringer_orboffrost_dot.setBuffIcon('@@1@@')
        call ashbringer_orboffrost_dot.addPeriodicEvent(ashbringer_orboffrost_tick, 1)
	endfunction
                    [values] => Array
                        (
                            [visible] => false
                            [icon] => 
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

            [1] => Array
                (
                    [name] => Autocast
                    [code] => set ashbringer_orboffrost_buff.applyAdvanced(tower, Event.getTarget(), tower.getLevel(), R2I((0.025 + (tower.getLevel() * 0.001)) / 0.0001), 5 + (tower.getLevel() * 0.2)).userReal = 0.1 + (tower.getLevel() * 0.004)
                    [values] => Array
                        (
                            [AUTOCAST_cooldown] => 3
                            [AUTOCAST_autoRange] => 500
                            [AUTOCAST_manacost] => 30
                            [icon] => ReplaceableTextures\CommandButtons\BTNSpell_frost_frozenorb.blp
                            [AUTOCAST_range] => 500
                            [AUTOCAST_targetType] => TARGET_TYPE_TOWERS
                            [AUTOCAST_numBuffsBeforeIdle] => 1
                            [caster_art] => 
                            [long_explain] => Imbues a targeted tower for |cffFFFF805|r seconds, increasing crit chance by |cffFFFF802.5%|r and causing attacks to deal an additional |cffFFFF8010%|r of attack damage as |cff00FFFFEnergy|r damage over |cffFFFF806|r seconds. The damage over time can accumulate.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+0.1%|r crit chance|n|cffFFFF80+0.4%|r attack damage|n|cffFFFF80+0.2|r seconds buff duration
                            [target_art] => 
                            [AUTOCAST_autocastType] => AC_TYPE_ALWAYS_BUFF
                            [AUTOCAST_buffType] => ashbringer_orboffrost_buff
                            [AUTOCAST_isExtended] => false
                            [name] => Frostburn Enchantment
                            [AUTOCAST_targetSelf] => true
                            [short_explain] => Increases the crit chance of a target tower and causes its attacks to deal additional |cff00FFFFEnergy|r damage over time.
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
            [0] => Array
                (
                    [id] => @@0@@
                    [derivedFrom] => BHfs
                    [oeValues] => Array
                        (
                            [Targetattach] => weapon
                            [EditorName] => Frostburn Enchant
                            [Buffubertip] => Attacks deal additional Energy damage over time.
                            [TargetArt] => Abilities\Spells\Items\AIob\AIobTarget.mdl
                            [Targetattachcount] => 1
                            [Bufftip] => Frostburn Enchant
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNSpell_frost_frozenorb.blp
                        )

                )

            [1] => Array
                (
                    [id] => @@1@@
                    [derivedFrom] => BHfs
                    [oeValues] => Array
                        (
                            [Targetattach] => chest
                            [EditorName] => Frostburn
                            [Buffubertip] => Taking Energy damage over time.
                            [TargetArt] => Abilities\Spells\Items\AIob\AIobTarget.mdl
                            [Targetattachcount] => 1
                            [Bufftip] => Frostburn
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNSpell_frost_frozenorb.blp
                        )

                )

        )

    [units] => Array
        (
        )

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

        )

    [lightning] => Array
        (
        )

)