示例#1
0
        public static List <Weapon> GetMightyWeaps(int amount)
        {
            List <Weapon> mightyWeaps = new List <Weapon>();
            Random        rdm         = new Random();

            for (int count = 0; count < amount; count++)
            {
                int i = rdm.Next(0, 3);
                mightyWeaps.Add(WeaponFactory.ForgeMightyWeap(i));
            }
            return(mightyWeaps);
        }
示例#2
0
        public static List <Weapon> GetKnives(int amount)
        {
            List <Weapon> knives = new List <Weapon>();
            Random        rdm    = new Random();

            for (int count = 0; count < amount; count++)
            {
                int i = rdm.Next(0, 3);
                knives.Add(WeaponFactory.ForgeKnife(i));
            }
            return(knives);
        }
示例#3
0
        public static List <Weapon> GetFlails(int amount)
        {
            List <Weapon> flails = new List <Weapon>();
            Random        rdm    = new Random();

            for (int count = 0; count < amount; count++)
            {
                int i = rdm.Next(0, 3);
                flails.Add(WeaponFactory.ForgeFlail(i));
            }
            return(flails);
        }
示例#4
0
        public static List <Weapon> GetFistWeps(int amount)
        {
            List <Weapon> fistWeapons = new List <Weapon>();
            Random        rdm         = new Random();

            for (int count = 0; count < amount; count++)
            {
                int i = rdm.Next(0, 3);
                fistWeapons.Add(WeaponFactory.ForgeFistWeap(i));
            }
            return(fistWeapons);
        }
示例#5
0
        public static List <Weapon> GetDaggers(int amount)
        {
            List <Weapon> daggers = new List <Weapon>();
            Random        rdm     = new Random();

            for (int count = 0; count < amount; count++)
            {
                int i = rdm.Next(0, 3);
                daggers.Add(WeaponFactory.ForgeDagger(i));
            }
            return(daggers);
        }
示例#6
0
        public static List <Weapon> GetSwords(int amount)
        {
            List <Weapon> swords = new List <Weapon>();
            Random        rdm    = new Random();

            for (int count = 0; count < amount; count++)
            {
                int i = rdm.Next(0, 3);
                swords.Add(WeaponFactory.ForgeSword(i));
            }
            return(swords);
        }
示例#7
0
        static void Main(string[] args)
        {
            List <Weapons.Weapon> weapons = new List <Weapons.Weapon>();
            WeaponFactory         factory = new WeaponFactory();

            Weapons.Weapon wep1 = factory.Create(EWeaponType.twohandaxe, ERarityType.normal, "Axe of Bear instinct");
            Weapons.Weapon wep2 = factory.Create(EWeaponType.throwingaxe, ERarityType.magic, "Flesh Tearer");
            Weapons.Weapon wep3 = factory.Create(EWeaponType.twohandaxe, ERarityType.rare, "Bullova");
            Weapons.Weapon wep4 = factory.Create(EWeaponType.throwingaxe, ERarityType.rare, "Adze");
            weapons.Add(wep1);
            weapons.Add(wep2);
            weapons.Add(wep3);
            weapons.Add(wep4);
            foreach (Weapons.Weapon weapon in weapons)
            {
                Console.WriteLine(weapon.ToString());
            }
            Console.ReadLine();
        }