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

            [Art] => ReplaceableTextures\CommandButtons\BTNPurge.blp
            [dmgplus1] => 72
            [bldtm] => 1
            [goldcost] => 200
            [sides1] => 1
            [acquire] => 900
            [upgrades] => Array
                (
                )

            [Upgrade] => Array
                (
                )

            [Name] => Stormfield Generator
            [weapTp1] => msplash
            [MissileHoming] => 1
            [file] => .mdl
            [Missileart] => Abilities\Spells\Orc\LightningBolt\LightningBoltMissile.mdl
            [Missilespeed] => 1600
            [dice1] => 1
            [RngBuff1] => 250
            [modelScale] => 0.1
            [rangeN1] => 900
            [atkType1] => magic
            [cool1] => 1.3
            [Ubertip] => Generates controlled cataclysm fragments.
            [scaleBull] => 0
            [abilList] => Array
                (
                )

            [buildingShadow] => Array
                (
                )

            [targs1] => Array
                (
                )

            [weapsOn] => 1
        )

    [settings] => Array
        (
            [balanceTip] => |cffCCFF00Splash attack:|n   |cffFFFF00175|r AoE: |cff00FF00100%|r damage|r
            [abil_factor] => 0.4
            [author] => Ashbringer
            [alpha] => 0
            [authorDisplay] => |cffff6600Ashbringer|r
            [version] => 1.0
            [element] => storm
            [rarity] => uncommon
        )

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => 0.287265
                    [y] => 0.491576
                    [z] => 25.6
                    [scale] => 1
                    [rot] => 4.71239
                    [file] => Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -4.71
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [1] => Array
                (
                    [x] => 0.917425
                    [y] => 4.10829
                    [z] => 32
                    [scale] => 0.9
                    [rot] => 0
                    [file] => Abilities\Spells\Items\AIlb\AIlbTarget.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [2] => Array
                (
                    [x] => 1.02274
                    [y] => 3.20333
                    [z] => 19.2
                    [scale] => 1.3
                    [rot] => 4.71239
                    [file] => Abilities\Spells\Other\GeneralAuraTarget\GeneralAuraTarget.mdl
                    [red] => 1
                    [green] => 1
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [3] => Array
                (
                    [x] => -0.0804962
                    [y] => 0.0676566
                    [z] => -19.2
                    [scale] => 1.7
                    [rot] => 5.3058
                    [file] => Abilities\Spells\Other\GeneralAuraTarget\GeneralAuraTarget.mdl
                    [red] => 1
                    [green] => 1
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [4] => Array
                (
                    [x] => -0.435861
                    [y] => -13.021
                    [z] => -12.8
                    [scale] => 0.1
                    [rot] => 1.5708
                    [file] => Doodads\Cityscape\Structures\City_ColumnSemiCircle\City_ColumnSemiCircle.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [5] => Array
                (
                    [x] => 0.357966
                    [y] => 15.7318
                    [z] => -12.8
                    [scale] => 0.1
                    [rot] => 4.71239
                    [file] => Doodads\Cityscape\Structures\City_ColumnSemiCircle\City_ColumnSemiCircle.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [6] => Array
                (
                    [x] => -0.148344
                    [y] => 0.199712
                    [z] => 0
                    [scale] => 0.11
                    [rot] => 2.3562
                    [file] => Doodads\Cityscape\Structures\Archway1\Archway1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [7] => Array
                (
                    [x] => -0.0763133
                    [y] => 0.846242
                    [z] => 0
                    [scale] => 0.11
                    [rot] => 0.785398
                    [file] => Doodads\Cityscape\Structures\Archway1\Archway1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [8] => Array
                (
                    [x] => -0.297862
                    [y] => -8.16974
                    [z] => 6.4
                    [scale] => 0.1
                    [rot] => 1.5708
                    [file] => Doodads\Cityscape\Structures\Archway1\Archway1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1.57
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [9] => Array
                (
                    [x] => 0.387533
                    [y] => 10.4651
                    [z] => 6.4
                    [scale] => 0.1
                    [rot] => 4.71239
                    [file] => Doodads\Cityscape\Structures\Archway1\Archway1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1.57
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [10] => Array
                (
                    [x] => 10.3624
                    [y] => 0.836575
                    [z] => 6.4
                    [scale] => 0.1
                    [rot] => 3.14159
                    [file] => Doodads\Cityscape\Structures\Archway1\Archway1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1.57
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [11] => Array
                (
                    [x] => -10.9145
                    [y] => 1.18478
                    [z] => 6.4
                    [scale] => 0.1
                    [rot] => 0
                    [file] => Doodads\Cityscape\Structures\Archway1\Archway1.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1.57
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

        )

    [dmgTable] => Array
        (
        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => On Attack
                    [code] => call ashbringer_stormfield_onAttack(tower, Event.getTarget(), 125 + (tower.getLevel() * 5))
                    [values] => Array
                        (
                            [visible] => true
                            [icon] => ReplaceableTextures\CommandButtons\BTNLightningShield.blp
                            [name] => Stormfield
                            [short_explain] => Attacks have a chance to create an area that slows and deals spell damage over time.
                            [ONATTACK_chance] => 0.1
                            [ONATTACK_chanceLevelAdd] => 0.004
                            [long_explain] => Attacks have a |cffffff8010%|r chance to create an electrical field with |cffffff80250|r area of effect and lasts |cffffff803|r seconds. Enemies within the field take |cffffff80125|r spell damage per second and are slowed by |cffffff8020%|r.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+0.4%|r chance|n|cffFFFF80+5|r damage|n|cffFFFF80+0.8%|r slow
                        )

                )

            [1] => Array
                (
                    [name] => Header
                    [code] => globals
        BuffType ashbringer_stormfield_buff
        Cast ashbringer_stormfield_cast
    endglobals
    
    //@export
    function ashbringer_stormfield_onAttack takes Tower tower, Creep target, real damage returns nothing
        local real target_x = target.getX()
        local real target_y = target.getY()
        
        call Effect.createScaled("Abilities\\Weapons\\ChimaeraLightningMissile\\ChimaeraLightningMissile.mdl", target_x, target_y, 0, 270, 2.25).destroy()
        call ashbringer_stormfield_cast.pointCastFromCasterOnPoint(tower, target_x, target_y, damage, tower.calcSpellCritNoBonus())
    endfunction
    
    function ashbringer_stormfield_hit takes DummyUnit u returns nothing
        call Effect.createSimpleOnUnit("Abilities\\Spells\\Items\\AIlb\\AIlbSpecialArt.mdl", Event.getTarget(), "chest").destroy()
        call ashbringer_stormfield_buff.applyOnlyTimed(u.getCaster(), Event.getTarget(), 1.50)
    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_stormfield_buff = BuffType.create(0.0, 0.0, false)
        call mod.addModification(MOD_MOVESPEED, -0.2, -0.008)
        call ashbringer_stormfield_buff.setBuffModifier(mod)
        call ashbringer_stormfield_buff.setStackingGroup("ashbringer_stormfield")
        call ashbringer_stormfield_buff.setBuffIcon('@@4@@')
        
        set ashbringer_stormfield_cast = Cast.create('@@0@@', "blizzard", 4.00)
        call ashbringer_stormfield_cast.setDamageEvent(EventHandler.ashbringer_stormfield_hit)
    endfunction
                    [values] => Array
                        (
                            [visible] => false
                            [icon] => 
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

        )

    [abilities] => Array
        (
            [0] => Array
                (
                    [id] => @@0@@
                    [derivedFrom] => AHbz
                    [oeValues] => Array
                        (
                            [Cost1] => 0
                            [Rng1] => 99999
                            [EfctID1] => @@2@@
                            [DataD1] => 0
                            [Art] => ReplaceableTextures\CommandButtons\BTNBlizzard.blp
                            [DataF1] => 99999
                            [hero] => 0
                            [DataA1] => 3
                            [BuffID1] => @@3@@,@@1@@
                            [Cool1] => 1
                            [Area1] => 250
                            [DataC1] => 8
                            [DataB1] => 1
                            [Name] => Stormfield
                            [levels] => 1
                        )

                )

        )

    [buffs] => Array
        (
            [0] => Array
                (
                    [id] => @@1@@
                    [derivedFrom] => BHbz
                    [oeValues] => Array
                        (
                            [EditorName] => Stormfield (Caster)
                            [Buffart] => Array
                                (
                                )

                        )

                )

            [1] => Array
                (
                    [id] => @@2@@
                    [derivedFrom] => XHbz
                    [oeValues] => Array
                        (
                            [EditorName] => Stormfield (Effect)
                            [Effectsoundlooped] => Array
                                (
                                )

                            [EffectArt] => Abilities\Weapons\Bolt\BoltImpact.mdl
                            [Effectsound] => Array
                                (
                                )

                            [Buffart] => Array
                                (
                                )

                        )

                )

            [2] => Array
                (
                    [id] => @@3@@
                    [derivedFrom] => BHbd
                    [oeValues] => Array
                        (
                            [Buffubertip] => This unit is being damaged and slowed by Stormfield.
                            [TargetArt] => Array
                                (
                                )

                            [Bufftip] => Stormfield
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNLightningShield.blp
                        )

                )

            [3] => Array
                (
                    [id] => @@4@@
                    [derivedFrom] => Binf
                    [oeValues] => Array
                        (
                            [Targetattach] => origin
                            [Buffubertip] => This unit is being damaged and slowed by Stormfield.
                            [TargetArt] => Abilities\Spells\Orc\Purge\PurgeBuffTarget.mdl
                            [Bufftip] => Stormfield
                            [EditorSuffix] => (youtd buff)
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNLightningShield.blp
                        )

                )

        )

    [units] => Array
        (
        )

    [references] => Array
        (
        )

    [lightning] => Array
        (
        )

)