Array
(
    [scriptVersion] => 7
    [oeValues] => Array
        (
            [Name] => Lucky Gem
            [Art] => ReplaceableTextures\CommandButtons\BTNPhilosophersStone.blp
            [Ubertip] => This gem gives the tower random effects.
            [abilList] => Array
                (
                )

        )

    [settings] => Array
        (
            [author] => Boekie
            [authorDisplay] => |cff00CD00Boekie|r
            [balanceTip] => Array
                (
                )

            [rarity] => unique
            [goldcost] => 550
            [version] => 1.0
        )

    [dmgTable] => Array
        (
        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => On Damage
                    [code] => local Unit target = Event.getTarget() 
local integer a = GetRandomInt(0,4) 
local Tower tower = itm.getCarrier()
local real speed = tower.getBaseAttackspeed()

if tower.calcChance(0.20*speed) and Event.isMainTarget()==true then 

if a < 1 then 
call cb_stun.applyOnlyTimed(tower,target,0.5) 
call tower.getOwner().displaySmallFloatingText("Stun!",tower,255, 165, 0,30) 
elseif a < 2 then 
call boekie_gem_slow.applyCustomTimed(tower,target,100,3) 
call tower.getOwner().displaySmallFloatingText("Slow!",tower,255, 165, 0,30)
elseif a < 3 then 
call tower.getOwner().giveGold( 10,tower.getUnit(), true, true) 
call tower.getOwner().displaySmallFloatingText("Gold!",tower,255, 165, 0,30)
elseif a < 4 then 
call tower.addExp(1.0) 
call tower.getOwner().displaySmallFloatingText("Exp!",tower,255, 165, 0,30)
elseif a < 5 then 
call boekie_gem_armor.applyCustomTimed(tower,target,5,3) 
call tower.getOwner().displaySmallFloatingText("Armor!",tower,255, 165, 0,30)
endif 

endif
                    [values] => Array
                        (
                            [ONDAMAGE_chance] => 1.00
                            [visible] => true
                            [name] => Luck!
                            [goldcost] => 550
                            [ONDAMAGE_chanceLevelAdd] => 0.0
                            [explain] => The carrier of this item has a |cffFFFF8020%|r attackspeed adjusted chance to get a random effect on damage: |n Gain |cffFFFF801|r experience |n Gain |cffFFFF8010|r gold |n Stun for |cffFFFF800.5|r seconds |n Slow by |cffFFFF8010%|r for |cffFFFF803|r seconds. |n Decrease armor by |cffFFFF805|r for |cffFFFF803|r seconds.
                        )

                )

            [1] => Array
                (
                    [name] => Header
                    [code] => globals
    BuffType boekie_gem_slow 
    BuffType boekie_gem_armor
    endglobals
    
    //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() 
    local Modifier k = Modifier.create()
    call m.addModification(MOD_MOVESPEED,0,-0.001) 
    set boekie_gem_slow = BuffType.create(0,0,false) // apply custom timed  
    call boekie_gem_slow.setBuffIcon('@@0@@')  
    call boekie_gem_slow.setBuffModifier(m) 
    call boekie_gem_slow.setStackingGroup("boekieGemSlow") 
    
    call k.addModification(MOD_ARMOR,0,-1) 
    set boekie_gem_armor = BuffType.create(0,0,false) // apply custom timed  
    call boekie_gem_armor.setBuffIcon('@@1@@')  
    call boekie_gem_armor.setBuffModifier(k) 
    call boekie_gem_armor.setStackingGroup("boekieGemArmor")
	endfunction
                    [values] => Array
                        (
                            [visible] => false
                            [name] => 
                            [goldcost] => 0
                            [explain] => 
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
            [0] => Array
                (
                    [id] => @@0@@
                    [derivedFrom] => Bcri
                    [oeValues] => Array
                        (
                            [Bufftip] => Gem Slow
                            [Buffubertip] => This unit is slowed by a lucky gem.
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNPhilosophersStone.blp
                            [EditorName] => Gem Slow
                        )

                )

            [1] => Array
                (
                    [id] => @@1@@
                    [derivedFrom] => BIcb
                    [oeValues] => Array
                        (
                            [Bufftip] => Gem Armor
                            [Buffubertip] => This unit's armor is decreased by a lucky gem.
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNPhilosophersStone.blp
                            [TargetArt] => Abilities\Spells\NightElf\FaerieFire\FaerieFireTarget.mdl
                            [EditorName] => Gem Armor
                        )

                )

        )

    [units] => Array
        (
        )

    [references] => Array
        (
        )

)