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

            [Art] => ReplaceableTextures\CommandButtons\BTNMedivh.blp
            [turnRate] => 2
            [dmgplus1] => 1434
            [bldtm] => 1
            [goldcost] => 1100
            [sides1] => 1
            [manaN] => 75
            [acquire] => 1000
            [upgrades] => Array
                (
                )

            [Upgrade] => Array
                (
                )

            [Name] => Enchanting Scholar
            [weapTp1] => missile
            [MissileHoming] => 1
            [file] => units\creeps\Medivh\Medivh.mdl
            [uberSplat] => YTDG
            [Missileart] => Abilities\Weapons\DragonHawkMissile\DragonHawkMissile.mdl
            [Missilespeed] => 900
            [dice1] => 1
            [RngBuff1] => 250
            [regenMana] => 4
            [modelScale] => 0.6
            [rangeN1] => 1000
            [atkType1] => magic
            [cool1] => 2
            [Ubertip] => Impart knowledge, offer advice, inspire others.
            [abilList] => Array
                (
                )

            [moveHeight] => 7.5
            [buildingShadow] => Array
                (
                )

            [targs1] => Array
                (
                )

            [weapsOn] => 1
        )

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

            [abil_factor] => 0.60
            [author] => Moppy
            [alpha] => 255
            [authorDisplay] => |c006969FFMoppy|r
            [version] => 1.0
            [element] => arcane
            [rarity] => rare
        )

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => 0.220997
                    [y] => -0.23779
                    [z] => -147.2
                    [scale] => 1.5
                    [rot] => 0
                    [file] => Doodads\Ruins\Props\RuinsPillar\RuinsPillar2.mdl
                    [red] => 50
                    [green] => 50
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [1] => Array
                (
                    [x] => 0.040273
                    [y] => 0.00796415
                    [z] => 0
                    [scale] => 0.8
                    [rot] => 4.71239
                    [file] => buildings\other\CircleOfPower\CircleOfPower.mdl
                    [red] => 75
                    [green] => 75
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [2] => Array
                (
                    [x] => -42.985
                    [y] => 0.0175689
                    [z] => -57.6
                    [scale] => 0.42
                    [rot] => 4.71239
                    [file] => Doodads\Cityscape\Structures\City_LowWall_TallEndCap\City_LowWall_TallEndCap.mdl
                    [red] => 60
                    [green] => 60
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [3] => Array
                (
                    [x] => 0.242089
                    [y] => -43.2835
                    [z] => -57.6
                    [scale] => 0.42
                    [rot] => 4.71239
                    [file] => Doodads\Cityscape\Structures\City_LowWall_TallEndCap\City_LowWall_TallEndCap.mdl
                    [red] => 60
                    [green] => 60
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [4] => Array
                (
                    [x] => 42.5569
                    [y] => -47.7649
                    [z] => -57.6
                    [scale] => 0.3
                    [rot] => 5.49779
                    [file] => Doodads\Cityscape\Props\City_Oblisk\City_Oblisk.mdl
                    [red] => 75
                    [green] => 75
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [5] => Array
                (
                    [x] => -42.0015
                    [y] => -47.7587
                    [z] => -57.6
                    [scale] => 0.3
                    [rot] => 5.49779
                    [file] => Doodads\Cityscape\Props\City_Oblisk\City_Oblisk.mdl
                    [red] => 75
                    [green] => 75
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [6] => Array
                (
                    [x] => 0.492295
                    [y] => 45.3909
                    [z] => -19.2
                    [scale] => 0.3
                    [rot] => 4.71239
                    [file] => Doodads\Cityscape\Props\City_Oblisk\City_Oblisk.mdl
                    [red] => 75
                    [green] => 75
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [7] => Array
                (
                    [x] => 22.8734
                    [y] => 41.5442
                    [z] => -38.4
                    [scale] => 0.3
                    [rot] => 4.31969
                    [file] => Doodads\Cityscape\Props\City_Oblisk\City_Oblisk.mdl
                    [red] => 75
                    [green] => 75
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [8] => Array
                (
                    [x] => -21.3146
                    [y] => 41.967
                    [z] => -38.4
                    [scale] => 0.3
                    [rot] => 5.10509
                    [file] => Doodads\Cityscape\Props\City_Oblisk\City_Oblisk.mdl
                    [red] => 75
                    [green] => 75
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [9] => Array
                (
                    [x] => 42.6307
                    [y] => 29.3974
                    [z] => -57.6
                    [scale] => 0.3
                    [rot] => 5.49779
                    [file] => Doodads\Cityscape\Props\City_Oblisk\City_Oblisk.mdl
                    [red] => 75
                    [green] => 75
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [10] => Array
                (
                    [x] => 43.4803
                    [y] => 0.3355
                    [z] => -57.6
                    [scale] => 0.42
                    [rot] => 4.71239
                    [file] => Doodads\Cityscape\Structures\City_LowWall_TallEndCap\City_LowWall_TallEndCap.mdl
                    [red] => 60
                    [green] => 60
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [11] => Array
                (
                    [x] => -41.9277
                    [y] => 29.4036
                    [z] => -57.6
                    [scale] => 0.3
                    [rot] => 5.49779
                    [file] => Doodads\Cityscape\Props\City_Oblisk\City_Oblisk.mdl
                    [red] => 75
                    [green] => 75
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [12] => Array
                (
                    [x] => -43.3135
                    [y] => -48.7264
                    [z] => 38.4
                    [scale] => 0.7
                    [rot] => 4.71239
                    [file] => Abilities\Weapons\VengeanceMissile\VengeanceMissile.mdl
                    [red] => 90
                    [green] => 75
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [13] => Array
                (
                    [x] => 41.0316
                    [y] => -49.064
                    [z] => 38.4
                    [scale] => 0.7
                    [rot] => 4.71239
                    [file] => Abilities\Weapons\VengeanceMissile\VengeanceMissile.mdl
                    [red] => 90
                    [green] => 75
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [14] => Array
                (
                    [x] => -1.12373
                    [y] => 45.3484
                    [z] => 76.8
                    [scale] => 0.7
                    [rot] => 4.71239
                    [file] => Abilities\Weapons\VengeanceMissile\VengeanceMissile.mdl
                    [red] => 90
                    [green] => 75
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

        )

    [dmgTable] => Array
        (
        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => Header
                    [code] => globals
        //@export
        BuffType moppy_arcaneflux_aura
        //@export
        BuffType moppy_guidance_buff
    endglobals
    
    //Do not remove or rename this function!
    //Put your initialization tasks here, this function will be called on map init      
    private function MoppySpellDmgOnAutocast takes Buff b returns nothing
        local Unit creep = Event.getTarget()
        local Tower c = b.getCaster()
        local Tower t = b.getBuffedUnit()
        if creep != 0 then
            if creep.getUID() >= 0 and creep.isACreep() then
                call t.doSpellDamage(creep, (c.userInt + (c.getLevel() * c.userInt2)) * (Event.getAutocastType().getCooldown() - 0.1), t.calcSpellCritNoBonus())
                call Lightning.createFromPointToUnit("ZAP4", t.getX(), t.getY(), 50, creep).setLifetime(0.2)
            endif
        endif
    endfunction
    
    
    private function init takes nothing returns nothing
        local Modifier m = Modifier.create()
            set moppy_arcaneflux_aura = BuffType.createAuraEffectType(true)
            call m.addModification(MOD_MANA_PERC, 0.00, 0.001)
            call moppy_arcaneflux_aura.setBuffModifier(m)
            call moppy_arcaneflux_aura.addEventOnSpellCast(MoppySpellDmgOnAutocast)
            call moppy_arcaneflux_aura.setBuffIcon('@@0@@')
            
            set m = Modifier.create()
            set moppy_guidance_buff = BuffType.create(10.0, 0.0, true)
            call m.addModification(MOD_TRIGGER_CHANCES, 0.0, 0.001)
            call m.addModification(MOD_BUFF_DURATION, 0.0, 0.001)            
            call moppy_guidance_buff.setBuffIcon('@@1@@')
            call moppy_guidance_buff.setBuffModifier(m)
	endfunction
                    [values] => Array
                        (
                            [visible] => false
                            [icon] => 
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

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

                    [values] => Array
                        (
                            [AURA_powerAdd] => 4
                            [visible] => true
                            [AURA_auraEffect] => moppy_arcaneflux_aura
                            [AURA_levelAdd] => 1
                            [AURA_power] => 100
                            [icon] => ReplaceableTextures\CommandButtons\BTNPurge.blp
                            [AURA_targetType] => TARGET_TYPE_TOWERS
                            [long_explain] => Increases max mana of towers in |cffffff80400|r range by |cffffff8010%|r and makes their active abilities that target enemies additionally deal |cffffff80[300 spell damage * ability cooldown]|r.|n|n|cffFF8000Level Bonus:|r|n|cffffff80+0.4%|r max mana|n|cffffff80+6|r spell damage
                            [AURA_targetSelf] => true
                            [name] => Arcane Flux
                            [AURA_level] => 0
                            [short_explain] => Increases max mana of towers in range and makes their active abilities that target enemies additionally deal spell damage.
                            [AURA_auraRange] => 400
                        )

                )

            [2] => Array
                (
                    [name] => Autocast
                    [code] => call moppy_guidance_buff.applyCustomPower(tower, Event.getTarget(), tower.getLevel(), 100 + tower.getLevel() * 4)
                    [values] => Array
                        (
                            [AUTOCAST_cooldown] => 2
                            [AUTOCAST_autoRange] => 500
                            [AUTOCAST_manacost] => 60
                            [icon] => ReplaceableTextures\CommandButtons\BTNDevotion.blp
                            [AUTOCAST_range] => 500
                            [AUTOCAST_targetType] => TARGET_TYPE_TOWERS
                            [AUTOCAST_numBuffsBeforeIdle] => 0
                            [caster_art] => 
                            [long_explain] => Increases trigger chance and buff duration of target tower by |cffFFFF8010%|r. Lasts |cffFFFF8010|r seconds.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+0.4%|r trigger chance and buff duration
                            [target_art] => Abilities\Spells\Items\AIem\AIemTarget.mdl
                            [AUTOCAST_autocastType] => AC_TYPE_ALWAYS_BUFF
                            [AUTOCAST_buffType] => moppy_guidance_buff
                            [AUTOCAST_isExtended] => false
                            [name] => Guidance
                            [AUTOCAST_targetSelf] => true
                            [short_explain] => Increases trigger chance and buff duration of target tower.
                        )

                )

            [3] => Array
                (
                    [name] => On Tower Creation
                    [code] => set tower.userInt = 300
    set tower.userInt2 = 6
    call AddUnitAnimationProperties(tower.getUnit(), "stand alternate", false)
                    [values] => Array
                        (
                            [visible] => false
                            [icon] => 
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
            [0] => Array
                (
                    [id] => @@0@@
                    [derivedFrom] => BHab
                    [oeValues] => Array
                        (
                            [EditorName] => Arcane Flux
                            [Buffubertip] => Max mana increased and active abilities that target creeps additionally deal spell damage.
                            [TargetArt] => Array
                                (
                                )

                            [Bufftip] => Arcane Flux
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNPurge.blp
                        )

                )

            [1] => Array
                (
                    [id] => @@1@@
                    [derivedFrom] => BHab
                    [oeValues] => Array
                        (
                            [EditorName] => Guidance
                            [Buffubertip] => Trigger chance and buff duration increased.
                            [TargetArt] => Array
                                (
                                )

                            [Bufftip] => Guidance
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNDevotion.blp
                        )

                )

        )

    [units] => Array
        (
        )

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

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

        )

    [lightning] => Array
        (
        )

)