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 Bow(this, GetRandomLocation(random)); } else { if (!CheckPlayerInventory("Blue Potion")) { WeaponInRoom = new BluePotion(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 Mace(this, GetRandomLocation(random)); } else { if (!CheckPlayerInventory("Red Potion")) { WeaponInRoom = new RedPotion(this, GetRandomLocation(random)); } } break; default: 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 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")) { if (_isUsedBluePotion) { 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")) { if (_isUsedRedPotion) { 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 = 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 Bow(this, GetRandomLocation(random)); } else if (!CheckPlayerInventory("Blue Potion")) { WeaponInRoom = new BluePotion(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 Mace(this, GetRandomLocation(random)); } else if (!CheckPlayerInventory("Red Potion")) { WeaponInRoom = new RedPotion(this, GetRandomLocation(random)); } break; default: DialogResult result = MessageBox.Show("Congratulations! You beat the game!", "The End", MessageBoxButtons.OK); Debug.WriteLine(level); if (result == DialogResult.OK) { Application.Exit(); } break; } }
/// <summary> /// Takes care of setting up the levels /// </summary> /// <param name="random"></param> 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 Bow(this, GetRandomLocation(random)); } else if (!CheckPlayerInventory("Blue Potion")) { WeaponInRoom = new BluePotion(this, GetRandomLocation(random)); } else { WeaponInRoom = null; } 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 Mace(this, GetRandomLocation(random)); } else if (!CheckPlayerInventory("Red Potion")) { WeaponInRoom = new RedPotion(this, GetRandomLocation(random)); } else { WeaponInRoom = null; } break; case 8: MessageBox.Show("You completed the game!"); Application.Exit(); break; } }
public void NewLevel(Random random) { level++; switch (level) { case 1: Enemies = new List <Enemy>() { new Bat(this, GetRandomLoction(random)) }; WeaponInRoom = new Sword(this, GetRandomLoction(random)); break; case 4: Enemies = new List <Enemy>() { new Ghost(this, GetRandomLoction(random)) }; WeaponInRoom = new BluePotion(this, GetRandomLoction(random)); break; case 3: Enemies = new List <Enemy>() { new Ghoul(this, GetRandomLoction(random)) }; WeaponInRoom = new Bow(this, GetRandomLoction(random)); break; case 2: Enemies = new List <Enemy>() { new Bat(this, GetRandomLoction(random)), new Ghost(this, GetRandomLoction(random)) }; if (!WeaponInRoom.PickedUp) { WeaponInRoom = new Bow(this, GetRandomLoction(random)); } else if (!CheckPlayerInventory("Blue Potion")) { WeaponInRoom = new BluePotion(this, GetRandomLoction(random)); } break; case 5: Enemies = new List <Enemy>() { new Bat(this, GetRandomLoction(random)), new Ghoul(this, GetRandomLoction(random)) }; WeaponInRoom = new RedPotion(this, GetRandomLoction(random)); break; case 6: Enemies = new List <Enemy>() { new Ghost(this, GetRandomLoction(random)), new Ghoul(this, GetRandomLoction(random)) }; WeaponInRoom = new Mace(this, GetRandomLoction(random)); break; case 7: Enemies = new List <Enemy>() { new Bat(this, GetRandomLoction(random)), new Ghost(this, GetRandomLoction(random)), new Ghoul(this, GetRandomLoction(random)) }; if (!WeaponInRoom.PickedUp) { WeaponInRoom = new Mace(this, GetRandomLoction(random)); } else if (!CheckPlayerInventory("Red Potion")) { WeaponInRoom = new RedPotion(this, GetRandomLoction(random)); } break; case 8: Application.Exit(); break; } }
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)) }; WeaponInRoom = new Bow(this, GetRandomLocation(random)); break; case 4: Enemies = new List <Enemy>() { new Ghost(this, GetRandomLocation(random)), new Bat(this, GetRandomLocation(random)) }; if (player.Weapons.Contains("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 (player.Weapons.Contains("Mace")) { WeaponInRoom = new RedPotion(this, GetRandomLocation(random)); } else { WeaponInRoom = new Mace(this, GetRandomLocation(random)); } break; default: MessageBox.Show("Congrats! You've beaten the game!"); return(false); } return(true); }
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.Add(new Ghost(this, GetRandomLocation(random))); WeaponInRoom = new Sword(this, GetRandomLocation(random)); WeaponInRoom = new BluePotion(this, GetRandomLocation(random)); break; case 3: Enemies.Clear(); Enemies.Add(new Gnoul(this, GetRandomLocation(random))); WeaponInRoom = new Bow(this, GetRandomLocation(random)); break; case 4: Enemies.Clear(); Enemies.Add(new Bat(this, GetRandomLocation(random))); Enemies.Add(new Ghost(this, GetRandomLocation(random))); if (!PlayerWeapons.Contains("Bow")) { WeaponInRoom = new Bow(this, GetRandomLocation(random)); } else if (!PlayerWeapons.Contains("Blue Potion")) { WeaponInRoom = new BluePotion(this, GetRandomLocation(random)); } break; case 5: Enemies.Clear(); Enemies.Add(new Bat(this, GetRandomLocation(random))); Enemies.Add(new Gnoul(this, GetRandomLocation(random))); WeaponInRoom = new RedPotion(this, GetRandomLocation(random)); break; case 6: Enemies.Clear(); Enemies.Add(new Ghost(this, GetRandomLocation(random))); Enemies.Add(new Gnoul(this, GetRandomLocation(random))); WeaponInRoom = new Mace(this, GetRandomLocation(random)); break; case 7: Enemies.Clear(); Enemies.Add(new Bat(this, GetRandomLocation(random))); Enemies.Add(new Ghost(this, GetRandomLocation(random))); Enemies.Add(new Gnoul(this, GetRandomLocation(random))); if (!PlayerWeapons.Contains("Mace")) { WeaponInRoom = new Mace(this, GetRandomLocation(random)); } else if (!PlayerWeapons.Contains("Red Potion")) { WeaponInRoom = new RedPotion(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 = 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)) }; if (!PlayerWeapons.Contains("Bomb")) { WeaponInRoom = new Bomb(this, GetRandomLocation(random)); } else { WeaponInRoom = new Bow(this, GetRandomLocation(random)); } break; case 4: Enemies = new List <Enemy>() { new Bat(this, GetRandomLocation(random)), new Ghost(this, GetRandomLocation(random)) }; if (!PlayerWeapons.Contains("Bow")) { WeaponInRoom = new Bow(this, GetRandomLocation(random)); } else if (!PlayerWeapons.Contains("Blue Potion")) { WeaponInRoom = new BluePotion(this, GetRandomLocation(random)); } else { WeaponInRoom = new Bomb(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 (!PlayerWeapons.Contains("Mace")) { WeaponInRoom = new Mace(this, GetRandomLocation(random)); } else if (!PlayerWeapons.Contains("Red Potion")) { WeaponInRoom = new RedPotion(this, GetRandomLocation(random)); } break; default: Environment.Exit(0); 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 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 (!player.Weapons.Contains("Bow")) { WeaponInRoom = new Bow(this, GetRandomLocation(random)); } else if (!player.Weapons.Contains("BluePotion")) { WeaponInRoom = new BluePotion(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 (!player.Weapons.Contains("Mace")) { WeaponInRoom = new Mace(this, GetRandomLocation(random)); } else if (!player.Weapons.Contains("RedPotion")) { WeaponInRoom = new RedPotion(this, GetRandomLocation(random)); } break; case 8: MessageBox.Show("You have completed the quest!"); System.Environment.Exit(0); break; } }