Array
(
    [scriptVersion] => 8
    [oeValues] => Array
        (
            [Ubertip] => Heals the wicked, harms the righteous.
            [Art] => ReplaceableTextures\CommandButtons\BTNDarkRitual.blp
            [abilList] => Array
                (
                )

            [Name] => Defiling Gloves
        )

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

            [goldcost] => 950
            [author] => Moppy
            [authorDisplay] => |c006969FFMoppy|r
            [version] => 1.0
            [rarity] => rare
        )

    [dmgTable] => Array
        (
        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => On Attack
                    [code] => local Tower t = itm.getCarrier()
        if t.calcChance(0.125 * t.getBaseAttackspeed()) then
            call moppy_defile_cast.targetCastFromCaster(t, Event.getTarget(), 1, t.calcSpellCritNoBonus())
        endif
                    [values] => Array
                        (
                            [explain] => The carrier has a |cffFFFF8012.5%|r attack speed adjusted chance on attack to unleash a defiling stream of corruption. Deals |cffFFFF801000|r spell damage and bounces |cffFFFF803|r times. Each bounce reduces damage dealt by |cffFFFF8025%|r. Nature and humanoid creeps also get stunned for |cffFFFF801|r second and then get slowed by |cffFFFF8015%|r for |cffFFFF802|r seconds.
                            [visible] => true
                            [goldcost] => 950
                            [name] => Defile
                            [ONATTACK_chance] => 1.0
                            [ONATTACK_chanceLevelAdd] => 0.0
                        )

                )

            [1] => Array
                (
                    [name] => Header
                    [code] => globals
        Cast moppy_defile_cast
        BuffType moppy_defile_slow
        BuffType moppy_cb_stun_duplicate
    endglobals
    
    function moppy_defile_slow_debuff takes Buff b returns nothing
        local Unit t = b.getCaster()
        local Unit c = b.getBuffedUnit()
            call moppy_defile_slow.apply(t, c, 1)
    endfunction
    
    function moppy_defile_cast_debuff takes DummyUnit d returns nothing
        local Unit c = Event.getTarget()
        local Unit t = d.getCaster()
        local real buffDur = t.getProp_BuffDuration()
            if c.getCategory() == 2 or c.getCategory() == 4 then
                call moppy_cb_stun_duplicate.applyOnlyTimed(t, c, 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 moppy_defile_slow = BuffType.create(2.0, 0.0, false)
        call m.addModification(MOD_MOVESPEED, -0.15, 0.0)
        call moppy_defile_slow.setBuffModifier(m)
        call moppy_defile_slow.setBuffIcon('@@1@@')
        
        set moppy_cb_stun_duplicate = BuffType.createDuplicate(cb_stun, 1.0, 0.0, false)
        call moppy_cb_stun_duplicate.setEventOnExpire(moppy_defile_slow_debuff)
        
        set moppy_defile_cast = Cast.create('@@0@@', "chainlightning", 5.0)
        call moppy_defile_cast.setDamageEvent(moppy_defile_cast_debuff)
	endfunction
                    [values] => Array
                        (
                            [explain] => 
                            [visible] => false
                            [goldcost] => 0
                            [name] => 
                        )

                )

        )

    [abilities] => Array
        (
            [0] => Array
                (
                    [id] => @@0@@
                    [derivedFrom] => ACcl
                    [oeValues] => Array
                        (
                            [Art] => ReplaceableTextures\CommandButtons\BTNDarkRitual.blp
                            [TargetArt] => Abilities\Weapons\IllidanMissile\IllidanMissile.mdl
                            [LightningEffect] => GZAP
                            [Missileart] => Abilities\Weapons\AvengerMissile\AvengerMissile.mdl
                            [DataA1] => 1000
                            [Name] => Defile
                        )

                )

        )

    [buffs] => Array
        (
            [0] => Array
                (
                    [id] => @@1@@
                    [derivedFrom] => BNab
                    [oeValues] => Array
                        (
                            [Targetattach] => origin
                            [EditorName] => Defile
                            [Buffubertip] => Slowed.
                            [TargetArt] => Abilities\Spells\Human\slow\slowtarget.mdl
                            [Bufftip] => Defile
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNDarkRitual.blp
                        )

                )

        )

    [units] => Array
        (
        )

    [references] => Array
        (
        )

)