public static void UseBed(string useCommand) { if (useCommand == "USE BED") { if (Player.PlayerLocation == 'S') { if (!Player.CheckInventory("KEY")) { MenuText.TypeLine("You climb into the rough bed and notice something inside the pillow... A "); MenuText.ChangeTextColor("KEY", ConsoleColor.Red); MenuText.TypeLine("?\n"); System.Threading.Thread.Sleep(500); MenuText.TypeLine("You put it in your bag.\n"); Player.inventory.Add("KEY"); } else if (Player.CheckInventory("KEY")) { MenuText.TypeLine("You climb into the rough bed, and remember finding the "); MenuText.ChangeTextColor("KEY", ConsoleColor.Red); MenuText.TypeLine(" inside the pillow.\n"); System.Threading.Thread.Sleep(500); MenuText.TypeLine("There's nothing else to find here.\n"); } } else { MenuText.TypeLine("You are not close enough to the "); MenuText.ChangeTextColor("BED", ConsoleColor.Red); MenuText.TypeLine(" to use it.\n"); } } }
public static void UseKey(string useCommand) { if (useCommand == "USE KEY") { if (!Player.CheckInventory("KEY")) { MenuText.TypeLine("You dont have a "); MenuText.ChangeTextColor("KEY", ConsoleColor.Red); MenuText.TypeLine(".\n"); } else if (Player.CheckInventory("KEY") && !(Player.PlayerLocation == 'E')) { MenuText.TypeLine("There is no reason to use a "); MenuText.ChangeTextColor("KEY", ConsoleColor.Red); MenuText.TypeLine(" here.\n"); } else if (Player.PlayerLocation == 'E' && (useCommand == "USE KEY" && Player.CheckInventory("KEY") && !Player.CheckInventory("MAGIC BOOK"))) { MenuText.TypeLine("You unlock the "); MenuText.ChangeTextColor("SECRET COMPARTMENT", ConsoleColor.Red); MenuText.TypeLine(" with a *click*.\n"); System.Threading.Thread.Sleep(500); MenuText.TypeLine("Inside, you find a "); MenuText.ChangeTextColor("MAGIC BOOK", ConsoleColor.Red); MenuText.TypeLine(". \n"); System.Threading.Thread.Sleep(500); MenuText.TypeLine("You take it.\n"); Player.inventory.Add("MAGIC BOOK"); } else if (Player.PlayerLocation == 'E' && (useCommand == "USE KEY" && Player.CheckInventory("KEY") && Player.CheckInventory("MAGIC BOOK"))) { MenuText.TypeLine("You have already unlocked the "); MenuText.ChangeTextColor("SECRET COMPARTMENT", ConsoleColor.Red); MenuText.TypeLine(" and found the "); MenuText.ChangeTextColor("MAGIC BOOK", ConsoleColor.Red); MenuText.TypeLine(".\n"); } } }