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); }
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; } }
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; } }
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 Blue_Potion(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 Bow(this, GetRandomLocation(random)); } else if (!CheckPlayerInventory("Blue Potion")) { WeaponInRoom = new Blue_Potion(this, GetRandomLocation(random)); } break; case 5: Enemies = new List <Enemy>() { new Bat(this, GetRandomLocation(random)), new Ghoul(this, GetRandomLocation(random)), }; WeaponInRoom = new Red_Potion(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 Red_Potion(this, GetRandomLocation(random)); } else if (!CheckPlayerInventory("Red Potion")) { WeaponInRoom = new Red_Potion(this, GetRandomLocation(random)); } break; default: EndGame(); break; } }
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; } }