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

            [Art] => ReplaceableTextures\CommandButtons\BTNFrostTower.blp
            [dmgplus1] => 1235
            [bldtm] => 1
            [goldcost] => 1900
            [sides1] => 1
            [manaN] => 100
            [launchZ] => 120
            [acquire] => 900
            [upgrades] => Array
                (
                )

            [Upgrade] => Array
                (
                )

            [Name] => Mind Allocator
            [weapTp1] => missile
            [MissileHoming] => 1
            [file] => .mdl
            [uberSplat] => YTDG
            [Missileart] => Abilities\Spells\Undead\OrbOfDeath\AnnihilationMissile.mdl
            [Missilespeed] => 1000
            [dice1] => 1
            [RngBuff1] => 250
            [regenMana] => 10
            [green] => 100
            [modelScale] => 0.1
            [rangeN1] => 900
            [atkType1] => magic
            [cool1] => 1.75
            [Ubertip] => A relic infused with the wisdom of past magicians, allowing their knowledge to be directly imprinted into the mind, enhancing magical prowess.
            [abilList] => Array
                (
                )

            [buildingShadow] => Array
                (
                )

            [targs1] => Array
                (
                )

            [weapsOn] => 1
        )

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

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

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => 0.298558
                    [y] => 0.490776
                    [z] => -6.4
                    [scale] => 0.384
                    [rot] => 1.5708
                    [file] => Doodads\Cityscape\Props\FountainRuined\FountainRuined.mdl
                    [red] => 50
                    [green] => 25
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [1] => Array
                (
                    [x] => -1.43736
                    [y] => -25.7574
                    [z] => 0
                    [scale] => 0.15
                    [rot] => 1.5708
                    [file] => Doodads\Cityscape\Structures\Archway1\Archway1.mdl
                    [red] => 50
                    [green] => 25
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1.57
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [2] => Array
                (
                    [x] => 44.992
                    [y] => -45.0313
                    [z] => -44.8
                    [scale] => 0.24
                    [rot] => 2.3562
                    [file] => war3mapImported\Square_Column.mdl
                    [red] => 100
                    [green] => 1
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -0.3
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [3] => Array
                (
                    [x] => -44.9616
                    [y] => -44.926
                    [z] => -44.8
                    [scale] => 0.24
                    [rot] => 0.785398
                    [file] => war3mapImported\Square_Column.mdl
                    [red] => 100
                    [green] => 1
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -0.3
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [4] => Array
                (
                    [x] => 44.9616
                    [y] => 44.7292
                    [z] => -44.8
                    [scale] => 0.24
                    [rot] => 3.92699
                    [file] => war3mapImported\Square_Column.mdl
                    [red] => 100
                    [green] => 1
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -0.3
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [5] => Array
                (
                    [x] => -44.7939
                    [y] => 44.7303
                    [z] => -44.8
                    [scale] => 0.24
                    [rot] => 5.49779
                    [file] => war3mapImported\Square_Column.mdl
                    [red] => 100
                    [green] => 1
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -0.3
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [6] => Array
                (
                    [x] => 0.811795
                    [y] => -5.09534
                    [z] => 70.4
                    [scale] => 0.6
                    [rot] => 1.5708
                    [file] => Objects\InventoryItems\CrystalShard\CrystalShard.mdl
                    [red] => 100
                    [green] => 125
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => true
                    [animation] => Array
                        (
                        )

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

            [7] => Array
                (
                    [x] => 1.44772
                    [y] => -3.06831
                    [z] => 76.8
                    [scale] => 0.5
                    [rot] => 1.5708
                    [file] => Abilities\Spells\Human\ManaShield\ManaShieldCaster.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => true
                    [animation] => Array
                        (
                        )

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

            [8] => Array
                (
                    [x] => 0.0613235
                    [y] => 26.5813
                    [z] => 0
                    [scale] => 0.15
                    [rot] => 4.71239
                    [file] => Doodads\Cityscape\Structures\Archway1\Archway1.mdl
                    [red] => 50
                    [green] => 25
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1.57
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [9] => Array
                (
                    [x] => -0.263916
                    [y] => 18.7092
                    [z] => 25.6
                    [scale] => 0.12
                    [rot] => 4.71239
                    [file] => Doodads\Cityscape\Structures\Archway1\Archway1.mdl
                    [red] => 50
                    [green] => 25
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1.57
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [10] => Array
                (
                    [x] => -1.1962
                    [y] => -18.3822
                    [z] => 25.6
                    [scale] => 0.12
                    [rot] => 1.5708
                    [file] => Doodads\Cityscape\Structures\Archway1\Archway1.mdl
                    [red] => 50
                    [green] => 25
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1.57
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [11] => Array
                (
                    [x] => 0.55333
                    [y] => 13.8141
                    [z] => 51.2
                    [scale] => 0.09
                    [rot] => 4.71239
                    [file] => Doodads\Cityscape\Structures\Archway1\Archway1.mdl
                    [red] => 50
                    [green] => 25
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1.57
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [12] => Array
                (
                    [x] => -0.252548
                    [y] => -13.4507
                    [z] => 51.2
                    [scale] => 0.09
                    [rot] => 1.5708
                    [file] => Doodads\Cityscape\Structures\Archway1\Archway1.mdl
                    [red] => 50
                    [green] => 25
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1.57
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [13] => Array
                (
                    [x] => 0.0507591
                    [y] => 0.131968
                    [z] => -12.8
                    [scale] => 0.225
                    [rot] => 1.5708
                    [file] => war3mapImported\Square_Column.mdl
                    [red] => 100
                    [green] => 1
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [14] => Array
                (
                    [x] => -0.260942
                    [y] => -57.5398
                    [z] => -44.8
                    [scale] => 0.24
                    [rot] => 1.5708
                    [file] => war3mapImported\Square_Column.mdl
                    [red] => 100
                    [green] => 1
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -0.3
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [15] => Array
                (
                    [x] => -0.100313
                    [y] => 57.5464
                    [z] => -44.8
                    [scale] => 0.24
                    [rot] => 4.71239
                    [file] => war3mapImported\Square_Column.mdl
                    [red] => 100
                    [green] => 1
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -0.3
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [16] => Array
                (
                    [x] => -0.360184
                    [y] => 24.0939
                    [z] => 51.2
                    [scale] => 0.135
                    [rot] => 4.71239
                    [file] => Doodads\Cityscape\Structures\Archway1\Archway1.mdl
                    [red] => 50
                    [green] => 25
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1.57
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [17] => Array
                (
                    [x] => -1.37355
                    [y] => -23.6688
                    [z] => 51.2
                    [scale] => 0.135
                    [rot] => 1.5708
                    [file] => Doodads\Cityscape\Structures\Archway1\Archway1.mdl
                    [red] => 50
                    [green] => 25
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -1.57
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [18] => Array
                (
                    [x] => 2.58412
                    [y] => -1.09529
                    [z] => 70.4
                    [scale] => 0.15
                    [rot] => 3.14159
                    [file] => war3mapImported\Square_Column.mdl
                    [red] => 100
                    [green] => 1
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -0.78
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [19] => Array
                (
                    [x] => -2.98516
                    [y] => -0.980501
                    [z] => 70.4
                    [scale] => 0.15
                    [rot] => 0
                    [file] => war3mapImported\Square_Column.mdl
                    [red] => 100
                    [green] => 1
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -0.78
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [20] => Array
                (
                    [x] => 41.0482
                    [y] => -1.05725
                    [z] => 108.8
                    [scale] => 0.15
                    [rot] => 3.14159
                    [file] => war3mapImported\Square_Column.mdl
                    [red] => 100
                    [green] => 1
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -0.78
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

            [21] => Array
                (
                    [x] => -41.2034
                    [y] => -1.08194
                    [z] => 108.8
                    [scale] => 0.15
                    [rot] => 0
                    [file] => war3mapImported\Square_Column.mdl
                    [red] => 100
                    [green] => 1
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => -0.78
                    [advanced] => false
                    [animation] => Array
                        (
                        )

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

        )

    [dmgTable] => Array
        (
        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => Header
                    [code] => globals
        BuffType moppy_mind_allocator_buff
        BuffType moppy_mind_allocator_debuff
    endglobals
    
    //Do not remove or rename this function!
    //Put your initialization tasks here, this function will be called on map init
    
    function moppy_cognitive_imprint_create takes Buff b returns nothing
        local Tower t = b.getCaster()
        local Tower a = b.getBuffedUnit()
    
        set b.userInt = MOD_DAMAGE_ADD_PERC
        set b.userReal = RMaxBJ(0.0, (b.getBuffedUnit().getProp_SpellDmgDealt() - 1.00) * (0.25 + (b.getCaster().getLevel() * 0.01))) // no attack damage loss if spell damage is below 100%
        call a.modifyProperty(b.userInt, b.userReal)
    endfunction
    
    function moppy_cognitive_imprint_cleanup takes Buff b returns nothing
        local Tower a = b.getBuffedUnit()
        call a.modifyProperty(b.userInt, -b.userReal)
    endfunction
    
    function moppy_cognitive_imprint_update takes Buff b returns nothing
        call moppy_cognitive_imprint_cleanup(b)
        call moppy_cognitive_imprint_create(b)
    endfunction
    
    private function init takes nothing returns nothing
        local Modifier m = Modifier.create()
        local Modifier s = Modifier.create()
        
            set moppy_mind_allocator_buff = BuffType.create (10.0, 0.0, true)
            call m.addModification(MOD_SPELL_DAMAGE_DEALT,0.15, 0.006)
            call m.addModification(MOD_TRIGGER_CHANCES,0.15, 0.006)
            call moppy_mind_allocator_buff.addEventOnCreate(moppy_cognitive_imprint_create)
            call moppy_mind_allocator_buff.addPeriodicEvent(moppy_cognitive_imprint_update, 5.0)
            call moppy_mind_allocator_buff.addEventOnCleanup(moppy_cognitive_imprint_cleanup)
            call moppy_mind_allocator_buff.setBuffModifier(m)
            call moppy_mind_allocator_buff.setBuffIcon('@@0@@')
            
            set moppy_mind_allocator_debuff = BuffType.create (5.0, 0.0, false)
            call s.addModification(MOD_SPELL_DAMAGE_RECEIVED, 0.10, 0.004)
            call s.addModification(MOD_ARMOR_PERC, -0.10, -0.004)
            call moppy_mind_allocator_debuff.setBuffModifier(s)
            call moppy_mind_allocator_debuff.setBuffIcon('@@1@@')
    endfunction
                    [values] => Array
                        (
                            [visible] => false
                            [icon] => 
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

            [1] => Array
                (
                    [name] => On Damage
                    [code] => call moppy_mind_allocator_debuff.apply(tower, Event.getTarget(), tower.getLevel())
                    [values] => Array
                        (
                            [ONDAMAGE_chance] => 0.125
                            [visible] => true
                            [icon] => ReplaceableTextures\CommandButtons\BTNUsedSoulGem.blp
                            [name] => Sundering Inscription
                            [short_explain] => The tower has a chance on hit to reduce the target's armor and spell resistance.
                            [ONDAMAGE_chanceLevelAdd] => 0.005
                            [long_explain] => The tower has a |cffffff8012.5%|r chance on hit to both reduce the target's armor and spell resistance by |cffffff8010%|r. Lasts |cffffff805|r seconds.|n|n|cffFF8000Level Bonus:|r|n|cffffff80+0.5%|r chance|n|cffffff80+0.4%|r reduced armor and spell resistance
                        )

                )

            [2] => Array
                (
                    [name] => Autocast
                    [code] => Array
                        (
                        )

                    [values] => Array
                        (
                            [AUTOCAST_cooldown] => 5
                            [AUTOCAST_autoRange] => 900
                            [AUTOCAST_manacost] => 80
                            [icon] => ReplaceableTextures\CommandButtons\BTNCharm.blp
                            [AUTOCAST_range] => 900
                            [AUTOCAST_targetType] => TARGET_TYPE_TOWERS
                            [AUTOCAST_numBuffsBeforeIdle] => 1
                            [caster_art] => 
                            [long_explain] => Increases target tower's spell damage and trigger chances by |cffffff8015%|r, and its attack damage based on |cffffff8025%|r of its total bonus spell damage. Lasts |cffffff8010|r seconds.|n|n|cffFF8000Level Bonus:|r|n|cffffff80+0.6%|r spell damage|n|cffffff80+0.6%|r trigger chances|n|cffffff80+1%|r of bonus spell damage turned into attack damage
                            [target_art] => Abilities\Spells\Items\AIim\AIimTarget.mdl
                            [AUTOCAST_autocastType] => AC_TYPE_ALWAYS_BUFF
                            [AUTOCAST_buffType] => moppy_mind_allocator_buff
                            [AUTOCAST_isExtended] => false
                            [name] => Cognitive Imprint
                            [AUTOCAST_targetSelf] => true
                            [short_explain] => Increases target tower's spell damage and trigger chances, and its attack damage based on its bonus spell damage.
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
            [0] => Array
                (
                    [id] => @@0@@
                    [derivedFrom] => BNbr
                    [oeValues] => Array
                        (
                            [Targetattach] => Array
                                (
                                )

                            [EditorName] => Cognitive Imprint
                            [Buffubertip] => Increased spell damage and trigger chances. Deals bonus attack damage based on its bonus spell damage.
                            [TargetArt] => Array
                                (
                                )

                            [Bufftip] => Cognitive Imprint
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNCharm.blp
                        )

                )

            [1] => Array
                (
                    [id] => @@1@@
                    [derivedFrom] => BNab
                    [oeValues] => Array
                        (
                            [EditorName] => Volatile Inscription
                            [Buffubertip] => Armor and spell resistance reduced.
                            [TargetArt] => Abilities\Spells\Undead\Cripple\CrippleTarget.mdl
                            [Bufftip] => Volatile Inscription
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNUsedSoulGem.blp
                        )

                )

        )

    [units] => Array
        (
        )

    [references] => Array
        (
        )

    [lightning] => Array
        (
        )

)