using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Framework.StatSystem
{
    /// <summary>
    /// An object that holds a number whos value is usually uncertain. The value should be 
    /// based on a 'base value' which is modified by <see cref="Modifierlike"/> objects.
    /// </summary>
    public interface ModifiableVariable
    {
        /// <summary>
        /// Adds a modifier to this variable.
        /// </summary>
        /// <param name="modifier">The modifier.</param>
        void AddModifier(Modifierlike modifier);

        /// <summary>
        /// Removes a modifier from this variable.
        /// </summary>
        /// <param name="modifier">The modifier.</param>
        void RemoveModifier(Modifierlike modifier);

        /// <summary>
        /// Removes a modifier from this variable by type and strength.
        /// </summary>
        /// <typeparam name="ModifierType">The type of the odifier type.</typeparam>
        /// <param name="value">The value.</param>
        void RemoveModifier<ModifierType>(float strength) where ModifierType : Modifierlike;

        /// <summary>
        /// Returns the current modifiers applied to this variable.
        /// </summary>
        /// <returns></returns>
        List<Modifierlike> GetModifiers();

        /// <summary>
        /// Gets the value of this variable with modifications applied. 
        /// </summary>
        /// <returns></returns>
        float GetValue();

        /// <summary>
        /// Gets the current mid calculation value of this variable, should only be used for
        /// modifier processing.
        /// </summary>
        /// <returns></returns>
        float GetCurrentValue();

        /// <summary>
        /// Gets the base value of this variable before modifications have been applied.
        /// </summary>
        /// <returns></returns>
        float GetBaseValue();
    }
}
