Esempio n. 1
0
        static private void EnterLegendaryRoom(Player p1)
        {
            Console.WriteLine("You enter the Legendary Room and you found the Legendary Sword.");
            Weapon w1 = new LegendarySword();

            Weapon.AddWeapon(p1, w1);
            LegendaryRoom = 0;
        }
Esempio n. 2
0
        // D > S > MW > MS > LS > LeS

        static public void CreateRandomWeapon(Player p1, Monster m1)
        {
            int y = RandomInt(1001);
            int ChanceLegendarySword = Convert.ToInt32(LegendarySword.ChanceOfLooting * 10);
            int ChanceLeechSword     = Convert.ToInt32(LeechSword.ChanceOfLooting * 10) + ChanceLegendarySword;
            int ChanceMagicSword     = MagicSword.ChanceOfLooting * 10 + ChanceLeechSword;
            int ChanceMagicWand      = MagicWand.ChanceOfLooting * 10 + ChanceMagicSword;
            int ChanceSword          = Sword.ChanceOfLooting * 10 + ChanceMagicWand;
            int ChanceDague          = Dague.ChanceOfLooting * 10 + ChanceSword;

            if (m1 != null)
            {
                ChanceMagicWand      += m1.ChanceOfLoot * 10;
                ChanceSword          += m1.ChanceOfLoot * 10;
                ChanceDague          += m1.ChanceOfLoot * 10;
                ChanceLeechSword     += m1.ChanceOfLoot * 10;
                ChanceMagicSword     += m1.ChanceOfLoot * 10;
                ChanceLegendarySword += m1.ChanceOfLoot * 10;
            }
            //Console.WriteLine("y: {0}, LegendarySword: {1}. ChanceLeechSword: {3}. ChanceTrap: {2}. ChanceMonster: {4}.", y, LegendarySword, ChanceLeechSword, ChanceNothing, ChanceMonster);
            if (y < ChanceLegendarySword)
            {
                Weapon w1 = new LegendarySword();
                AddWeapon(p1, w1);
                return;
            }
            else if (y < ChanceLeechSword)
            {
                Weapon w1 = new LeechSword();
                AddWeapon(p1, w1);
                return;
            }
            else if (y < ChanceMagicSword)
            {
                Weapon w1 = new MagicSword();
                AddWeapon(p1, w1);
                return;
            }
            else if (y < ChanceMagicWand)
            {
                Weapon w1 = new MagicWand();
                AddWeapon(p1, w1);
                return;
            }
            else if (y < ChanceSword)
            {
                Weapon w1 = new Sword();
                AddWeapon(p1, w1);
                return;
            }
            else if (y < ChanceDague)
            {
                Weapon w1 = new Dague();
                AddWeapon(p1, w1);
                return;
            }
        }