Descent.Model.Player.Figure.HeroStuff.Equipment.Equipment C# (CSharp) Method

Equipment() public method

Initializes a new instance of the Equipment class.
public Equipment ( int id, string name, EquipmentType type, EAttackType attackType, EquipmentRarity rarity, int buyPrice, List surgeAbilities, int hands, List abilities, List dice ) : System.Collections.Generic
id int /// The unique id of the equipment ///
name string /// The name of the equipment ///
type EquipmentType /// The equipments type ///
attackType EAttackType /// The attack type of the equipment ///
rarity EquipmentRarity /// The rarity of the equipment ///
buyPrice int /// The buy price of the equipment /// This is 0 if the equipments rarity is not common ///
surgeAbilities List /// The surge abilities, if the equipment is a weapon ///
hands int /// The number of hands it takes to wield, if the equipment is a weapon ///
abilities List /// The abilities that the equipment have ///
dice List /// The dice that the equipment has ///
return System.Collections.Generic
        public Equipment(int id, string name, EquipmentType type, EAttackType attackType, EquipmentRarity rarity, int buyPrice, List<SurgeAbility> surgeAbilities, int hands, List<Ability> abilities, List<Dice> dice)
        {
            Contract.Requires(surgeAbilities != null);
            Contract.Requires(abilities != null);
            this.id = id;
            this.name = name;
            this.type = type;
            this.attackType = attackType;
            this.rarity = rarity;
            this.buyPrice = rarity == EquipmentRarity.Common ? buyPrice : 0;
            this.surgeAbilities = surgeAbilities;
            this.hands = hands;
            this.abilities = abilities;
            this.dice = dice ?? new List<Dice>();
            tapped = false;
        }