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

            [targs1] => Array
                (
                )

            [goldcost] => 500
            [weapsOn] => 1
            [dice1] => 1
            [Missilespeed] => 5000
            [moveHeight] => 0.15
            [file] => .mdl
            [manaN] => 65
            [atkType1] => normal
            [modelScale] => 0.2
            [weapTp1] => missile
            [Missilearc] => 0.15
            [acquire] => 1200
            [rangeN1] => 1200
            [upgrades] => Array
                (
                )

            [cool1] => 2
            [Ubertip] => This tower gains mana by attacking and can use it to gain an attackspeed boost.
            [abilList] => @@0@@
            [Name] => Green Lightning
            [Missileart] => Abilities\Weapons\ChimaeraLightningMissile\ChimaeraLightningMissile.mdl
            [Art] => ReplaceableTextures\CommandButtons\BTNCrystalBall.blp
            [red] => 50
            [buildingShadow] => Array
                (
                )

            [blue] => 50
            [unitSound] => Array
                (
                )

            [sides1] => 150
            [auto] => Array
                (
                )

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

    [settings] => Array
        (
            [author] => drol
            [element] => storm
            [authorDisplay] => |cffcc6600drol|r
            [alpha] => 255
            [balanceTip] => |cffFFFF00+20% |rdmg to magical
            [rarity] => rare
            [version] => 1.0
            [abil_factor] => 0.59
        )

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => -11.1588
                    [y] => -9.5713
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 5.49779
                    [file] => Doodads\Cityscape\Structures\City_ColumnSingle1_Ruined\City_ColumnSingle1_Ruined.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [1] => Array
                (
                    [x] => 11.2317
                    [y] => 6.67092
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 2.3562
                    [file] => Doodads\Cityscape\Structures\City_ColumnSingle1_Ruined\City_ColumnSingle1_Ruined.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [2] => Array
                (
                    [x] => -8.62788
                    [y] => 9.43218
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 3.92699
                    [file] => Doodads\Cityscape\Structures\City_ColumnSingle1_Ruined\City_ColumnSingle1_Ruined.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [3] => Array
                (
                    [x] => 8.86447
                    [y] => -11.4887
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 0.785398
                    [file] => Doodads\Cityscape\Structures\City_ColumnSingle1_Ruined\City_ColumnSingle1_Ruined.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [4] => Array
                (
                    [x] => 36.7307
                    [y] => 2.47745
                    [z] => 57.6
                    [scale] => 0.7
                    [rot] => 3.20215
                    [file] => Abilities\Spells\Orc\LightningShield\LightningShieldTarget.mdl
                    [red] => 50
                    [green] => 255
                    [blue] => 50
                    [alpha] => 255
                    [pitch] => -1.47
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [5] => Array
                (
                    [x] => -0.448506
                    [y] => 37.988
                    [z] => 57.6
                    [scale] => 0.7
                    [rot] => 4.79966
                    [file] => Abilities\Spells\Orc\LightningShield\LightningShieldTarget.mdl
                    [red] => 50
                    [green] => 255
                    [blue] => 50
                    [alpha] => 255
                    [pitch] => -1.47
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [6] => Array
                (
                    [x] => -0.498249
                    [y] => 2.74161
                    [z] => 57.6
                    [scale] => 1
                    [rot] => 3.52557
                    [file] => Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
                    [red] => 50
                    [green] => 255
                    [blue] => 50
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

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

                    [aniSpeed] => 50
                )

            [8] => Array
                (
                    [x] => -1.92997
                    [y] => -27.678
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 5.49779
                    [file] => Doodads\Cityscape\Structures\City_ColumnSingle2_Ruined\City_ColumnSingle2_Ruined.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [9] => Array
                (
                    [x] => 0.432771
                    [y] => 26.2605
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 2.3562
                    [file] => Doodads\Cityscape\Structures\City_ColumnSingle2_Ruined\City_ColumnSingle2_Ruined.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [10] => Array
                (
                    [x] => -26.2605
                    [y] => -2.57555
                    [z] => 0
                    [scale] => 0.3
                    [rot] => 3.92699
                    [file] => Doodads\Cityscape\Structures\City_ColumnSingle2_Ruined\City_ColumnSingle2_Ruined.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [11] => Array
                (
                    [x] => -2.16311
                    [y] => 6.3442
                    [z] => 0.000000953674
                    [scale] => 0.15
                    [rot] => 4.71239
                    [file] => Doodads\Cityscape\Structures\City_ColumnSemiCircle\City_ColumnSemiCircle.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1.57
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [12] => Array
                (
                    [x] => -2.39234
                    [y] => -1.56772
                    [z] => 0.000000953674
                    [scale] => 0.15
                    [rot] => 1.5708
                    [file] => Doodads\Cityscape\Structures\City_ColumnSemiCircle\City_ColumnSemiCircle.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1.57
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [13] => Array
                (
                    [x] => 2.05873
                    [y] => 1.93767
                    [z] => 0.000000953674
                    [scale] => 0.15
                    [rot] => 3.14159
                    [file] => Doodads\Cityscape\Structures\City_ColumnSemiCircle\City_ColumnSemiCircle.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1.57
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

            [14] => Array
                (
                    [x] => -5.19052
                    [y] => 1.9377
                    [z] => 0.000000953674
                    [scale] => 0.15
                    [rot] => 0
                    [file] => Doodads\Cityscape\Structures\City_ColumnSemiCircle\City_ColumnSemiCircle.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1.57
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                )

        )

    [dmgTable] => Array
        (
            [0] => Array
                (
                    [id] => MOD_DMG_TO_MAGIC
                    [base] => 0.2
                    [add] => 0
                )

        )

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

                )

            [1] => Array
                (
                    [name] => On Damage
                    [code] => local Effect targetEffect 
    local Creep creep = Event.getTarget()
    
    if not creep.isImmune() then
    
        set targetEffect = Effect.createScaled("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl", GetUnitX(creep.getUnit()), GetUnitY(creep.getUnit()), 0, 0, 1.8)
        call targetEffect.setLifetime(1.0)
        call tower.doSpellDamage(creep, GetUnitState(tower.getUnit(), UNIT_STATE_MANA) * 15,tower.calcSpellCritNoBonus())
        call tower.modifyProperty(MOD_SPELL_CRIT_CHANCE, -(tower.userReal))
        set tower.userReal = 0.0
    
    endif
                    [values] => Array
                        (
                            [ONDAMAGE_chance] => 0.125
                            [icon] => ReplaceableTextures\CommandButtons\BTNHeartOfSearinox.blp
                            [visible] => true
                            [name] => Lightning Burst
                            [short_explain] => Grants a chance to deal extra spelldamage on attack, resets the spell crit bonus of Mana Feed.
                            [ONDAMAGE_chanceLevelAdd] => 0.005
                            [long_explain] => Grants a |cffFFFF8012.5%|r chance to deal |cffFFFF8015|r times current mana as spell damage on attack.|nResets the bonus spell crit of 'Mana Feed'.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+0.5%|r chance
                        )

                )

            [2] => Array
                (
                    [name] => Header
                    [code] => globals
    //@export
    BuffType drol_surge
    endglobals
    
    function surge takes Buff b returns nothing
        local Unit caster = b.getCaster() 
        if (caster.userInt < 1) then
            call b.removeBuff()
        else
            set caster.userInt = caster.userInt - 1
        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 m = Modifier.create()
        set   drol_surge = BuffType.create(8,0,true)
        call  m.addModification(MOD_ATTACKSPEED, 1.0 , 0.02)
        call  drol_surge.setBuffModifier(m)
        call  drol_surge.setBuffIcon('@@1@@')
        call  drol_surge.addEventOnAttack(surge,1,0)
    
	endfunction
                    [values] => Array
                        (
                            [icon] => 
                            [visible] => false
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

            [3] => Array
                (
                    [name] => Autocast
                    [code] => set tower.userInt = 5 + tower.getLevel() / 5
    call drol_surge.apply(tower,tower,tower.getLevel())
                    [values] => Array
                        (
                            [caster_art] => 
                            [icon] => ReplaceableTextures\CommandButtons\BTNOrbOfDeath.blp
                            [AUTOCAST_cooldown] => 6
                            [AUTOCAST_numBuffsBeforeIdle] => 0
                            [AUTOCAST_isExtended] => false
                            [long_explain] => Increases the attackspeed of this tower by |cffFFFF80100%|r for the next |cffFFFF805|r attacks. The surge fades after |cffFFFF808|r seconds.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+2%|r attackspeed|n|cffFFFF80+1|r attack per |cffFFFF805|r levels
                            [AUTOCAST_autocastType] => AC_TYPE_OFFENSIVE_IMMEDIATE
                            [AUTOCAST_manacost] => 60
                            [AUTOCAST_range] => 1200
                            [AUTOCAST_buffType] => 0
                            [name] => Lightning Surge
                            [AUTOCAST_targetSelf] => false
                            [short_explain] => Increases attackspeed for the next few attacks.
                            [AUTOCAST_targetType] => 0
                            [target_art] => 
                            [AUTOCAST_autoRange] => 1200
                        )

                )

            [4] => Array
                (
                    [name] => On Attack
                    [code] => local unit towerUnit = tower.getUnit()
  local real mana = GetUnitState(towerUnit, UNIT_STATE_MANA)
  
  call SetUnitState(towerUnit , UNIT_STATE_MANA, mana + 4 * (1. + tower.getProp_ManaRegPercBonus()))
  
  call tower.modifyProperty(MOD_SPELL_CRIT_CHANCE, 0.05+(tower.getLevel()*0.001))
  set tower.userReal = tower.userReal + 0.05 + (tower.getLevel()*0.001)
  set towerUnit = null
                    [values] => Array
                        (
                            [icon] => ReplaceableTextures\CommandButtons\BTNReplenishHealth.blp
                            [visible] => true
                            [name] => Mana Feed
                            [short_explain] => This tower gains mana and increased spell crit chance by attacking.
                            [ONATTACK_chance] => 1.0
                            [ONATTACK_chanceLevelAdd] => 0.0
                            [long_explain] => Attacks restore |cffFFFF804|r mana to the tower and increase spell crit chance by |cffFFFF805%|r.|n|n|cffFFFF80Hint:|r Mana regeneration increases mana gained.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+0.1%|r spell crit chance
                        )

                )

        )

    [abilities] => Array
        (
            [0] => Array
                (
                    [id] => @@0@@
                    [derivedFrom] => Alit
                    [oeValues] => Array
                        (
                            [Name] => Green Lightning Attack
                            [Art] => Array
                                (
                                )

                            [Ubertip] => -HIDE-
                            [Missilespeed] => 5000
                            [Untip] => -HIDE-
                            [Tip] => -HIDE-
                            [TargetArt] => Abilities\Spells\Human\ManaFlare\ManaFlareBoltImpact.mdl
                            [Unubertip] => -HIDE-
                            [DataA1] => 0.1
                            [LightningEffect] => MFPB
                        )

                )

        )

    [buffs] => Array
        (
            [0] => Array
                (
                    [id] => @@1@@
                    [derivedFrom] => BHab
                    [oeValues] => Array
                        (
                            [Bufftip] => Lightning Surge
                            [Buffubertip] => Attackspeed has been increased for the next few attacks.
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNOrbOfDeath.blp
                            [TargetArt] => Abilities\Spells\NightElf\Taunt\TauntCaster.mdl
                        )

                )

        )

    [units] => Array
        (
        )

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

        )

)