Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Story
import java.util.Scanner; public class Story { public static void main(String[] args) { boolean dead = false; Scanner story1 = new Scanner(System.in); Scanner option1 = new Scanner(System.in); Scanner optionB = new Scanner(System.in); Scanner optionBA = new Scanner(System.in); Scanner optionBB = new Scanner(System.in); Scanner optionBBA = new Scanner(System.in); Scanner optionBBAA = new Scanner(System.in); Scanner optionC = new Scanner(System.in); Scanner optionD = new Scanner(System.in); String start = story1.nextLine(); String room1 = option1.nextLine(); String roomB = optionB.nextLine(); String roomBA = optionBA.nextLine(); String roomBB = optionBB.nextLine(); String roomBBA = optionBBA.nextLine(); String roomBBAA = optionBBAA.nextLine(); String roomC = optionC.nextLine(); String roomD = optionD.nextLine(); System.out.println("Adventure Tower. Enter space to start."); if (start != " ") { System.out.println("Enter space to start."); } else { System.out.println("You are at the base of a tall old castle. You look up towards it wondering just how high the tower could possibly be. You see vines covering every inch of gray stone brick.You decide that this would be a great place to have your first adventure. You might even be able to spark up some charm with the villages back home. Without much thought you quickly rush through the big arch with your shield in your left hand and your sword in your right. You keep your bow on your back and your trusty dagger on your hip. As you reach just inside you feel a brick under you slowly move down and realize that it's a trap. A big wooden door slams down blocking the exit and there is no way out. You realize that you must go through the tower now."); System.out.println("Do you (A)look around the room, (B)stay put, or (C)use your sword and shield to feel for traps, or (D) Run as fast as you can across the room?"); if (room1 == "A") { System.out.println("You decide to look around the room. You start looking around the dark room but you step on another stone that sinks, then a dart flies across the room right into your head. You have died"); } if (room1 == "B") { System.out.println("You decide that staying put would be the safest. You stay in the dark for hours in the same spot on the floor. You start eating the rations that you brought in your bag. It feels like you have been there for days. All of a sudden the ground opens up below you and you fall down. You land on a hard stone ground. You look around and appear to be in some type of cell. You look around the cell and its all bad of stone and there are iron bars just close enough to where you can't slip through them. You then look past the bars down a long corridor. You look left and then right, but see no doors or any signs of life. You go around the entire cell and all you can find is a small straw bed and a bucket. You can find nothing to assist you."); System.out.println("Do you (A) yell for help, or (B) see if you can move any stones lose?"); if (roomB == "A") { System.out.println("You decide to yell for help. After about a solid five minutes of screaming for anyone you hear the sound of footsteps coming from down the right side of the hall. After about a minute a guard comes to your cage and says Looks like we got one! Then opens your cage and knocks you out. You wake up a few seconds later, but with shackles on your wrists. He then walks you down a long hallway. You arrive at a gigantic wooden door. He brings you through it into what looks to be a throne room. You see a man sitting on a large golden throne. The guard brings you up to him and pushes you to your knees. The man had gray hair and many wrinkles on his face. You look at his head and there is a large golden crown. You assume he is the king of this castle. He says I am the king of this great castle and you have been caught trespassing."); System.out.println(" You have a choice to make, You may either (A)take the punishment of death or (B)become my servant for 50 years. Now make your decision with haste."); if (roomBA == "A") { System.out.println("You have decided you would rather die than become his servant. The guard stands you up and takes you to a courtyard in the middle of the castle. You are then hanged. You have died."); } if (roomBA == "B") { System.out.println("You decide that life as a servant is better than death. You spend the next 40 years of your life breaking your back every day for the king. He then releases you as an old man and you go back home. You live the rest of your life peacefully. Congratulations, you have survived."); } } if (roomB == "B") { System.out.println("You have decided to see if any bricks around the room move. Just when you are on your last couple of bricks you push one and the whole wall moves revealing a secret passage. It leads down a long dirt hallway with torches lighting it. You wall for about ten minutes and then find a room. The room is about the same size as your cells. As soon as you take your first step in A metal door slams behind you. You look around and the room is completely empty, except there are two doors. There is a large wooden door to your left and a smaller metal door to your right."); System.out.println("Will you choose (A) the large wooden door, or (B) the small metal door?"); if (roomBB == "A") { System.out.println("You decide that the wooden door would be a better choice; you go up to it and open it. You then see the outside and you run out into it. You can't believe you have made it free. But you then realize you are surrounded by a forest and you can only see three paths."); System.out.println("Go down (A)the left path, (B) the center path, or (C) the right path?"); if (roomBBA == "A") { System.out.println("You decide to take the left path. You start to walk along it and you get a weird tingly feeling, but you decide to trek on.You keep walking and then come up with what looks to be an old rune. You curiosity gets a hold of you, and you go up and touch it. Then, a blinding flash blurs your vision and you feel as if your insides are being turned to the outside. After about thirty seconds of whiteness your vision starts to come back and you're in a completely white room and you hear over a loudspeaker Hello again and welcome to the Aperture Science computer aided Enrichment Center we hope your brief detention in the relaxation vault had been a pleasant one your specimen and we are now ready to begin the testing properly. You are still trying to gather yourself when you hear a human voice say GlaDOS back off, that's one of our guys. Then a pair of doors open out of nowhere and before you can see the face of the man that comes into the room you black out. You wake up and not much time has passed. You look around an appear to be in a hospital room."); System.out.print("Do you (A) Stay in bed and wait for someone to come and explain everything to you or (B) try to escape?"); if (roomBBAA == "A") { System.out.print(""); } if (roomBBAA == "B") { System.out.print(""); } } if (roomBBA == "B") { System.out.println("You decide to go down the center path and you walk along it for about twenty minutes. You then see a town in the distance. You decide to run up, but you see no one. You then decide to look around, but don't know where to start."); } if (roomBBA == "C") { System.out.println(""); } } if (roomBB == "B") { System.out.println("You decide that the small metal door looks the safest to go into. So you open it up and see a room no bigger than the one you're in right now so you walk in. As soon as you step in the metal door slams shut. You look at the door, but can find no handle. You are trapped. You run around the room in a panic searching every corner and do everything you can think of. You sit down and try to decide what to do next. You get hungry and go into your bag to look for some food but you realise that you had eaten it all before so you open your canteen and drink some water to try and satisfy your hunger. Hours and what feels like days go by and you are stuck. You are going crazy without food and your stomach is in unbearable pain. You just finish all of your water you had. You have no water or food now. You decide to go to sleep to get rid of the pain. But the pain is so bad you can't sleep, but all of a suddenly you start to feel very weak and tired. You lay down and notice your hair is starting to fall out. You then fall asleep, but never wake up. You have died."); } } if (room1 == "C") { System.out.println("You decide to use your sword and shield to look around. You go against the wall with your shield up and start walking along. You step on a stone that sinks and a dark fly across the room, but you block it with your shield. You go around the room lighting the torches to get a better view."); } if (room1 == "D") { System.out.print("You decide to run across the room. You get ready and then sprint as fast as you can across the room. You hear traps going off behind you, but keep running. You finally make it to the other side somehow alive. You look back and see darts, spikes, pits, and about 20 other traps all across the floors and walls."); } } } } } /*Every choice A - death BA - A - death BA - B - live BBAA - A - BBAA - B - BBA - B - BBA - C - BB - B - death C - D - */
run
|
edit
|
history
|
help
0
MockTest
Pascal's triangle
a
Custom Date Format
delete_xml_empty_tags
Rextester.Program.Main
linear search
Hssbddbsv
2
xddd