Пример #1
0
        private void AddWeaponInRoom(Random random)
        {
            switch (Level)
            {
            case 1:
                WeaponsInRoom.Add(new Sword(this, GetRandomLocation(random)));
                break;

            case 2:
                WeaponsInRoom.Add(new BluePotion(this, GetRandomLocation(random)));
                break;

            case 3:
                WeaponsInRoom.Add(new Bow(this, GetRandomLocation(random)));
                break;

            case 4:
                if (CheckPlayerInventory("Bow"))
                {
                    if (!CheckPlayerInventory("Blue Potion"))
                    {
                        WeaponsInRoom.Add(new BluePotion(this, GetRandomLocation(random)));
                    }
                }
                else
                {
                    WeaponsInRoom.Add(new Bow(this, GetRandomLocation(random)));
                }
                break;

            case 5:
                WeaponsInRoom.Add(new RedPotion(this, GetRandomLocation(random)));
                break;

            case 6:
                WeaponsInRoom.Add(new Mace(this, GetRandomLocation(random)));
                break;

            case 7:
                if (!CheckPlayerInventory("Mace"))
                {
                    WeaponsInRoom.Add(new Mace(this, GetRandomLocation(random)));
                }
                break;

            default:
                break;
            }
        }
Пример #2
0
        public void NewLevel(Random random)
        {
            Level++;
            if (Level != 1)
            {
                MessageBox.Show($"레벨업!! : {Level} 랩");
            }
            Enemies.Clear();
            WeaponsInRoom.Clear();

            AddEnemyInRoom(random);
            AddWeaponInRoom(random);

            if (Level == 8)
            {
                if (MessageBox.Show("축하합니다. 만랩이 되었어요! 게임을 종료합니다") == DialogResult.OK)
                {
                    Application.Exit();
                }
            }
        }
Пример #3
0
 public void AcquireWeapon(Weapon weapon)
 {
     player.AcquireWeapon(weapon);
     //WeaponsInRoom.Find((e) => (weapon.Name == e.Name)).PickUpWeapon();
     WeaponsInRoom.Remove(weapon);
 }