Exemplo n.º 1
0
        /// <summary>
        /// Adds an effect to the player.
        /// </summary>
        /// <returns>True if the effect is successfully applied, else false</returns>
        public bool ApplyEffect(Effect effect)
        {
            if (effect is IStackable && HasEffect(effect) > 0)
            {
                Effect e = Effects.FindEffect(effect);
                e.AddStack(effect.StackSize);
            }
            else
            {
                Effects.Add(effect);
                effect.OnApply(this);
            }


            return(true);
        }