io0000_spdd/items/weapon/curses/Exhausting.cs
using watabou.utils;
using spdd.actors;
using spdd.actors.buffs;
using spdd.sprites;

namespace spdd.items.weapon.curses
{
    public class Exhausting : Weapon.Enchantment
    {
        private static ItemSprite.Glowing BLACK = new ItemSprite.Glowing(new Color(0x00, 0x00, 0x00, 0xFF));

        public override int Proc(Weapon weapon, Character attacker, Character defender, int damage)
        {
            if (attacker == Dungeon.hero && Rnd.Int(15) == 0)
            {
                Buff.Affect<Weakness>(attacker, Rnd.NormalIntRange(5, 20));
            }

            return damage;
        }

        public override bool Curse()
        {
            return true;
        }

        public override ItemSprite.Glowing Glowing()
        {
            return BLACK;
        }
    }
}