Haunted Manor Story
/*
- Unit 3 - Lesson 1 - Simple Ifs
*/
import java.util.Scanner;
class U3_L1_template
{
public static void hauntedHouse(Scanner scan)
{
System.out.println("\nYou see three doors:");
System.out.println("1. A door with burned and brutalized edges, as if it fought with flames.");
System.out.println("2. A door crawling with maggots and falling apart, as if neglected for a long time.");
System.out.println("3. A door muffling labored breathing and the sounds of someone's who has given up on the hope of help a long time ago.");
System.out.println("Which door do you choose? Door 1, Door 2, or Door 3?");
int choice = scan.nextInt();
if (choice == 1)
{
incerationRoom(scan);
}
//else if (choice == 2){
//pastghostsRoom(scan);}
// else if (choice == 3){
//tortureRoom(scan);}
else
{
System.out.println("You attempt to leave, only to realize you're trapped. You end up dying from starvation and the feeling of receiving phantom ailments from those who haunt the manor grounds.");
}}
public static void incerationRoom(Scanner scan){
System.out.println("\nYou open the door cautiously only to find a burning hot room inside. An invisible force, one that makes you feel almost possessed, forces you inside and locks the door behind you.");
System.out.println("Do you want to:");
System.out.println("1. Try to find a way to lower the temperature");
System.out.println("2. Wander to try to find an exit");
System.out.println("3. Ignore the heat as best as possible and approach the source of the extreme heat");
int choice = scan.nextInt();
if (choice == 1)
{
System.out.println("You feel around for a thermostat or any form of temperature control on the wall, failing to find anything. You end up passing out from exhaustion and quick onset heatstroke, dying in your unconscious state.");
}
else if (choice == 2)
{
System.out.println("You wander almost aimlessly, finding nothing worthwhile. You end up giving up, slouching against the wall and letting the heat take your life.");
}
else if (choice == 3)
{
System.out.println("You press forward, unable to fully ignore your intense, almost lethal feeling, sweating. You find a fire raging out of control with a ghost trapped inside it, screaming herself hoarse. Not realizing the being is a phantom you act quick, diving forward to take them out of the fire. Once you're both out, she stops screaming and thanks you, saying \n "You freed me from the ***** the master of this manor condemned me to. Thanks to you, his harshness upon me has ended. I wish to help you escape, so the door out of this room, out of my informal casket, is in front of you. I wish you well, kind stranger, I hope you make it out of this manor alive. I hope you die a more loving death than I." She points to a distant door frame in front of you before dissipating, leaving you alone. As you get closer to the door, more of the heat leaves you, until it is as if a fire never raged in the room at all. You open the door and exit to the corridor, thankful to be done with that room.");
U3_L1_template.pastghostsRoom(scan);
}
else
{
System.out.println("The fire, and now angry, poltergeist approach you quickly, punishing you for your hesitation. You succumb to the flames and the pain inflicted by the spirit, dying and turning to ashes and bone scraps there.");
}
}
public static void pastghostsRoom(Scanner scan)
{
System.out.println("\nYou enter the room to find a ghost in front of you. Their eyes are covered with a blindfold yet they seem to have perfect vision still, because they look directly at you as you enter and speak;\n "I ask you this: Who is most affected by your greatest regret? Your greatest regret being your selfish actions to neglect the safety of others and being behind that car wheel, driving angry and inebriated, unable to truly focus on the road in front of you? You, or those who died that day?");
String answer = scan.next();
while (!answer.equalsIgnoreCase("Those who died that day"))
{
System.out.println("The ghost looks at you, judging your answer harshly. \n"Your selfishness, your desperate need to avoid accountability and guilt has led you to the wrong answer." \n He then uses a shard of glass, covered in blood, mimicking rust on metal, and punctures you through the heart. You die, all due to being unable to truly see who the victims of your actions are. Not you, but those bystanders affected unwillingly and unnecessarily.");
}
answer = scan.next();
{
System.out.println("Good, your guilt from that day has caused you to reflect and repent. You may exit this room, this manor unharmed now, using the now unlocked door in front of you. I wish you safe travels away from these evil grounds.");
U3_L1_template.tortureRoom(scan);
}
}
public static void tortureRoom(Scanner scan)
{
System.out.println("\nYou enter the room and are immediately manhandled by a sad looking brute. They tie you to a table and being to use an assortment of torture devices on you. What do you do to escape this room?");
System.out.println("Do you want to:");
System.out.println("1. Try to fight back, attempting to break the binds and free yourself.");
System.out.println("2. Play dead to see if he'll stop torturing you and leave, giving you a chance to escape.");
System.out.println("3. Talk to the brute and attempt to appeal to him; try to convince him to free you.");
int option = scan.nextInt();
if (option == 1)
{
System.out.println("You struggle against the brute and the restraints, but the effort is useless. The torture and blood loss drains your energy, leading you to die on the table.");
}
else if (option == 2)
{
System.out.println("As you lay there taking the shallowest breaths to play dead as well as possible, you hear the brute burst into tears, wailing over your loss. You're able to tell the master of the manor used to force this from him in life and now he is doomed to continue in death lest someone break the pattern. As you're about to open your eyes, he plunges his hand into your chest, using one of your ribs to stab you in the heart. You promptly die.");
}
else if (option == 3)
{
System.out.println("As you speak to the brute, he reveals his master's evil ways. He tells you about how his master would make him slowly torture and kill any number of innocent people in a day. You tell him the master is dead and that there will be no consequence to him letting you go. He believes you, untying you and leading you to the door out, dissipating in front of your eyes, finally able to rest in peace.");
System.out.println("You successfully escape the manor, a whisper at the back of your mind wondering who the terrible master of the manor was. Yet, you push forward, wanting to forget this day for the rest of your life.");
}
else
{
System.out.println("The torture continues, leading you to die of blood loss and pain.");
}
}
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
System.out.println("Welcome to my Haunted Manor!");
System.out.println("You step into a creepy old mansion on Halloween night.");
System.out.println("Your goal is to make it out... ALIVE!");
//start adventure
hauntedHouse(scan);
scan.close();
}
}