Exemple #1
0
        public override string ToString()
        {
            string str = "";

            int cost = 0;

            foreach (Weapon arme in Weapons)
            {
                str += arme + ", ";
                if (CostOverrides.Any(s => s.WeaponId == arme.Id))
                {
                    cost += CostOverrides.First(s => s.WeaponId == arme.Id).Cost;
                }
                else
                {
                    cost += arme.Cost;
                }
            }

            if (str.Length > 2)
            {
                str = str.Substring(0, str.Length - 2);
            }

            if (cost > 0)
            {
                str += " (+" + cost + ")";
            }

            return(str);
        }
Exemple #2
0
        public WarGearCombination Copy()
        {
            WarGearCombination conf = new WarGearCombination();

            conf.Weapons.AddRange(Weapons);
            CostOverrides.AddRange(CostOverrides);
            return(conf);
        }