Ejemplo n.º 1
0
        public bool NewLevel(Random random)
        {
            level++;
            switch (level)
            {
            case 1:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)),
                };
                WeaponInRoom = new Sword(this, GetRandomLocation(random));
                break;

            case 2:
                Enemies = new List <Enemy>()
                {
                    new Ghost(this, GetRandomLocation(random)),
                };
                WeaponInRoom = new BluePotion(this, GetRandomLocation(random));
                break;

            case 3:
                Enemies = new List <Enemy>()
                {
                    new Ghoul(this, GetRandomLocation(random)),
                };
                break;

            case 4:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)),
                    new Ghost(this, GetRandomLocation(random)),
                };
                WeaponInRoom = new Bow(this, GetRandomLocation(random));
                break;

            case 5:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)),
                    new Ghoul(this, GetRandomLocation(random)),
                };
                WeaponInRoom = new RedPotion(this, GetRandomLocation(random));
                break;

            case 6:
                Enemies = new List <Enemy>()
                {
                    new Ghost(this, GetRandomLocation(random)),
                    new Ghoul(this, GetRandomLocation(random)),
                };
                WeaponInRoom = new Mace(this, GetRandomLocation(random));
                break;

            case 7:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)),
                    new Ghost(this, GetRandomLocation(random)),
                    new Ghoul(this, GetRandomLocation(random)),
                };
                WeaponInRoom = new Mace(this, GetRandomLocation(random));
                break;

            case 8:
                return(true);
            }
            return(false);
        }
Ejemplo n.º 2
0
        public void NewLevel(Random random)
        {
            level++;
            switch (level)
            {
            case 1:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random))
                };
                WeaponInRoom = new Sword(this, GetRandomLocation(random));
                break;

            case 2:
                Enemies = new List <Enemy>()
                {
                    new Ghost(this, GetRandomLocation(random))
                };
                WeaponInRoom = new BluePotion(this, GetRandomLocation(random));
                break;

            case 3:
                Enemies = new List <Enemy>()
                {
                    new Ghoul(this, GetRandomLocation(random))
                };
                WeaponInRoom = new Bow(this, GetRandomLocation(random));
                break;

            case 4:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)), new Ghost(this, GetRandomLocation(random))
                };
                if (CheckPlayerInventory(Bow))
                {
                    WeaponInRoom = new BluePotion(this, GetRandomLocation(random));
                }
                else
                {
                    WeaponInRoom = new Bow(this, GetRandomLocation(random));
                }
                break;

            case 5:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)), new Ghoul(this, GetRandomLocation(random))
                };
                WeaponInRoom = new RedPotion(this, GetRandomLocation(random));
                break;

            case 6:
                Enemies = new List <Enemy>()
                {
                    new Ghost(this, GetRandomLocation(random)), new Ghoul(this, GetRandomLocation(random))
                };
                WeaponInRoom = new Mace(this, GetRandomLocation(random));
                break;

            case 7:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)), new Ghost(this, GetRandomLocation(random)), new Ghoul(this, GetRandomLocation(random))
                };
                if (CheckPlayerInventory(Mace))
                {
                    WeaponInRoom = new RedPotion(this, GetRandomLocation(random));
                }
                else
                {
                    WeaponInRoom = new Mace(this, GetRandomLocation(random));
                }
                break;

            case 8:
                Application.Exit();
                break;
            }
        }
Ejemplo n.º 3
0
        public void NewLevel(Random random)
        {
            level++;
            switch (level)
            {
            case 1:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)),
                };
                WeaponInRoom = new Sword(this, GetRandomLocation(random));
                break;

            case 2:
                Enemies = new List <Enemy>()
                {
                    new Ghost(this, GetRandomLocation(random))
                };
                WeaponInRoom = new BluePotion(this, GetRandomLocation(random));
                break;

            case 3:
                Enemies = new List <Enemy>()
                {
                    new Ghoul(this, GetRandomLocation(random))
                };
                WeaponInRoom = new Axe(this, GetRandomLocation(random));
                break;

            case 4:
                Enemies = new List <Enemy>()
                {
                    new Ghost(this, GetRandomLocation(random)),
                    new Bat(this, GetRandomLocation(random))
                };
                if (!ChekPlayerInventory("Axe"))
                {
                    WeaponInRoom = new Axe(this, GetRandomLocation(random));
                }
                else if (!ChekPlayerInventory("Blue potion"))
                {
                    WeaponInRoom = new BluePotion(this, GetRandomLocation(random));
                }
                break;

            case 5:
                Enemies = new List <Enemy>()
                {
                    new Ghoul(this, GetRandomLocation(random)),
                    new Bat(this, GetRandomLocation(random))
                };
                WeaponInRoom = new RedPotion(this, GetRandomLocation(random));
                break;

            case 6:
                Enemies = new List <Enemy>()
                {
                    new Ghoul(this, GetRandomLocation(random)),
                    new Ghost(this, GetRandomLocation(random))
                };
                WeaponInRoom = new Mace(this, GetRandomLocation(random));
                break;

            case 7:
                Enemies = new List <Enemy>()
                {
                    new Ghost(this, GetRandomLocation(random)),
                    new Bat(this, GetRandomLocation(random)), new Ghoul(this, GetRandomLocation(random))
                };
                if (!ChekPlayerInventory("Mace"))
                {
                    WeaponInRoom = new Mace(this, GetRandomLocation(random));
                }
                else if (!ChekPlayerInventory("Red potion"))
                {
                    WeaponInRoom = new RedPotion(this, GetRandomLocation(random));
                }
                break;

            default: level = 0; break;
            }
        }
Ejemplo n.º 4
0
        public void NewLevel(Random random)
        {
            _level++;
            switch (_level)
            {
            case 1:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random))
                };
                WeaponInRoom = new Sword(this, GetRandomLocation(random));
                break;

            case 2:
                Enemies.Clear();
                Enemies = new List <Enemy>()
                {
                    new Ghost(this, GetRandomLocation(random))
                };
                WeaponInRoom = new BluePotion(this, GetRandomLocation(random));
                break;

            case 3:
                Enemies.Clear();
                Enemies = new List <Enemy>()
                {
                    new Ghoul(this, GetRandomLocation(random))
                };
                WeaponInRoom = new Bow(this, GetRandomLocation(random));
                break;

            case 4:
                Enemies.Clear();
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)), new Ghost(this, GetRandomLocation(random))
                };
                if (CheckPlayerInventory("Bow"))
                {
                    if (!CheckPlayerInventory("Blue Potion") || (CheckPlayerInventory("Blue Potion") && _player.CheckPotionUsed("Blue Potion")))
                    {
                        WeaponInRoom = new BluePotion(this, GetRandomLocation(random));
                    }
                }
                else
                {
                    WeaponInRoom = new Bow(this, GetRandomLocation(random));
                }
                break;

            case 5:
                Enemies.Clear();
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)), new Ghoul(this, GetRandomLocation(random))
                };
                WeaponInRoom = new RedPotion(this, GetRandomLocation(random));
                break;

            case 6:
                Enemies.Clear();
                Enemies = new List <Enemy>()
                {
                    new Ghost(this, GetRandomLocation(random)), new Ghoul(this, GetRandomLocation(random))
                };
                WeaponInRoom = new Mace(this, GetRandomLocation(random));
                break;

            case 7:
                Enemies.Clear();
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)), new Ghost(this, GetRandomLocation(random)), new Ghoul(this, GetRandomLocation(random))
                };
                WeaponInRoom = null;
                if (CheckPlayerInventory("Mace"))
                {
                    if (!CheckPlayerInventory("Red Potion") || (CheckPlayerInventory("Red Potion") && _player.CheckPotionUsed("Red Potion")))
                    {
                        WeaponInRoom = new RedPotion(this, GetRandomLocation(random));
                    }
                }
                else
                {
                    WeaponInRoom = new Mace(this, GetRandomLocation(random));
                }
                break;

            case 8:
                Enemies.Clear();
                Application.Exit();
                break;
            }
        }
Ejemplo n.º 5
0
        public void NewLevel(Random random)
        {
            level++;
            switch (level)
            {
            case 1:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random))
                };
                WeaponInRoom = new Sword(this, GetRandomLocation(random));
                break;

            case 2:
                Enemies = new List <Enemy>()
                {
                    new Ghost(this, GetRandomLocation(random))
                };
                if (!CheckPlayerEquipment("Blue Potion"))
                {
                    WeaponInRoom = new BluePotion(this, GetRandomLocation(random));
                }
                break;

            case 3:
                Enemies = new List <Enemy>()
                {
                    new Ghoul(this, GetRandomLocation(random))
                };
                WeaponInRoom = new Bow(this, GetRandomLocation(random));
                break;

            case 4:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)),
                    new Ghost(this, GetRandomLocation(random))
                };
                if (CheckPlayerEquipment("Bow"))
                {
                    if (!CheckPlayerEquipment("Blue Potion"))
                    {
                        WeaponInRoom = new BluePotion(this, GetRandomLocation(random));
                    }
                }
                else
                {
                    WeaponInRoom = new Bow(this, GetRandomLocation(random));
                }
                break;

            case 5:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)),
                    new Ghoul(this, GetRandomLocation(random))
                };
                WeaponInRoom = new RedPotion(this, GetRandomLocation(random));
                break;

            case 6:
                Enemies = new List <Enemy>()
                {
                    new Ghost(this, GetRandomLocation(random)),
                    new Ghoul(this, GetRandomLocation(random))
                };
                WeaponInRoom = new Mace(this, GetRandomLocation(random));
                break;

            case 7:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)),
                    new Ghost(this, GetRandomLocation(random)),
                    new Ghoul(this, GetRandomLocation(random))
                };
                if (CheckPlayerEquipment("Mace"))
                {
                    WeaponInRoom = new RedPotion(this, GetRandomLocation(random));
                }
                else
                {
                    WeaponInRoom = new Mace(this, GetRandomLocation(random));
                }
                break;

            case 8:
                MessageBox.Show("Gratulation! U Won");
                Application.Exit();
                break;
            }
        }