/
etc/
lib/
src/Abilities/
src/Abilities/Skills/
src/Abilities/Spells/
src/Abilities/Spells/Enums/
src/Affects/
src/ArtheaConsole/
src/ArtheaConsole/Properties/
src/ArtheaGUI/Properties/
src/Clans/Enums/
src/Commands/Communication/
src/Commands/ItemCommands/
src/Connections/
src/Connections/Colors/
src/Connections/Enums/
src/Connections/Players/
src/Connections/Players/Enums/
src/Continents/
src/Continents/Areas/
src/Continents/Areas/Characters/
src/Continents/Areas/Characters/Enums/
src/Continents/Areas/Items/
src/Continents/Areas/Items/Enums/
src/Continents/Areas/Rooms/
src/Continents/Areas/Rooms/Enums/
src/Continents/Areas/Rooms/Exits/
src/Creation/
src/Creation/Attributes/
src/Creation/Interfaces/
src/Database/
src/Database/Interfaces/
src/Environment/
src/Properties/
src/Scripts/Enums/
src/Scripts/Interfaces/
#region Arthea License

/***********************************************************************
*  Arthea MUD by R. Jennings (2007)      http://arthea.googlecode.com/ *
*  By using this code you comply with the Artistic and GPLv2 Licenses. *
***********************************************************************/

#endregion

using Arthea.Affects;
using Arthea.Connections.Players;
using Arthea.Continents.Areas.Characters.Enums;
using Arthea.Creation;
using Arthea.Environment;
using Arthea.Interfaces;

namespace Arthea.Races
{
    /// <summary>
    /// Implementation of a race.
    /// </summary>
    public abstract class Race : CustomEditType
    {
        #region [rgn] Fields (4)

        private AffectList affects;
        private string description;
        private string name;
        private Size size;

        #endregion [rgn]

        #region [rgn] Constructors (2)

        /// <summary>
        /// Initializes a new instance of the <see cref="Race"/> class.
        /// </summary>
        /// <param name="name">The name.</param>
        public Race(string name)
        {
            this.name = name;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Race"/> class.
        /// </summary>
        public Race()
        {
        }

        #endregion [rgn]

        #region [rgn] Properties (4)

        /// <summary>
        /// Gets or sets the affects.
        /// </summary>
        /// <value>The affects.</value>
        public AffectList Affects
        {
            get { return affects; }
            set { affects = value; }
        }

        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>The description.</value>
        public string Description
        {
            get { return description; }
            set { description = value; }
        }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        /// <summary>
        /// Gets or sets the size.
        /// </summary>
        /// <value>The size.</value>
        public Size Size
        {
            get { return size; }
            set { size = value; }
        }

        #endregion [rgn]

        #region CustomEditType Members

        /// <summary>
        /// Customs the edit.
        /// </summary>
        /// <param name="player">The player.</param>
        /// <param name="editer">The editer.</param>
        /// <param name="argument">The argument.</param>
        public virtual void CustomEdit(Player player, OlcField editer, String argument)
        {
            Race race = Lists.Races.FindName(argument);

            if (race == null)
            {
                player.WriteLine("No such race.");
                return;
            }

            editer.Set(race);

            player.WriteLine("Race set to {0}", race.Name);
        }

        #endregion
    }
}