Project #1 Choose Your Own Slightly Longer Adventure
Code
///Name: Ian Grant
///Period:5
///Project Name: Choose Your Own Slightly Longer Adventure
///File Name:ChooseLongAdv.java
///11/5/15
import java.util.Scanner;
public class ChooseLongAdv
{
public static void main(String[] args)
{
Scanner stuff=new Scanner(System.in);
String c1,c2,c3,c4;
System.out.println("Welcome to Ian's adventure!");
System.out.println("You are in a thick forest at night. You run into the rare man-eating squirrel. Also it's bigger than a breadbox");
System.out.println("Would you like to stand and \"fight\", \"run\" screaming into the forest or use your extodinary \"diplomatic\" skillz?");
c1=stuff.next();
if (c1.equals("fight"))
{
System.out.println("You have gained the trait brave!");
System.out.println("You circle around the squrriel looking for a opening.");
System.out.println("Except, the squrriel does boxing as a hobby and is a expert fighter. It's not looking good would you like to keep \"fighting\" or \"run\" away?");
c2=stuff.next();
if (c2.equals("run"))
{
System.out.println("You have lost the trait of brave and gained the trait Craven.");
System.out.println("The squirrel is also a part-time marrathon runner. Would you like to keep \"running\" or try to \"reason\" with it.");
c3=stuff.next();
if (c3.equals("running"))
{
System.out.println("You trip on a rock and become dinner for the man-eating squrriel");
}
else if(c3.equals("reason"))
{
System.out.println("The squirrel doesn't understand English. Good try though, you become it's next meal.");
}
}
else if (c2.equals("fighting"))
{
System.out.println("You have gained the trait Warrior.");
System.out.println("You have gain the respect of the man-eating squrriel.");
System.out.println("He is now your best friend, named Ruffus. Who will defend you to his death.");
//Extrem Foreshadowing!!!
System.out.println("You hear a noise in the forset do you \"check\" out the noise or do you \"make\" Ruffus check out the noise?");
c3=stuff.next();
if (c3.equals("check"))
{
System.out.println("Ruffus admires your braver he comes along with you.");
System.out.println("It's just a normal squirrel and it seems that Ruffus knows this squirrel.");
System.out.println("You leave the forest alive with help from the two squirrels.");
}
else if(c3.equals("make"))
{
System.out.println("You lose the trait Brave.");
System.out.println("-100 to Ruffus opinion. Ruffus obeys but no longer respects your might.");
System.out.println("Ruffus goes to investigate the noise and trips off the cliff.");
System.out.println("You killed Ruffus, good job I hope you feel good about yourself.");
System.out.println("Ruffus' family will remember this.");
System.out.println("You get mauled by a normal squirrel, who was the one who made the noise and is also Ruffus' cousin.");
}
}
}
else if (c1.equals("run"))
{
System.out.println("You smartly choose to run into the forest.");
System.out.println("You're wild screaming scares off the squirrel but attracts the attention of the talking rock, Regis.");
System.out.println("Would you like to \"talk\" to it or \"fight\" the Mighty Regis.");
c2=stuff.next();
if(c2.equals("talk"))
{
System.out.println("You start to have a lovely conversation with Regis, he hasn't talked to someone in a while he's lonely.");
System.out.println("Regis askes you to stay with him or else something bad might happen to you.");
System.out.println("Would you like to \"stay\" or \"ask\" Regis if he is threatining you?");
c3=stuff.next();
if (c3.equals("stay"))
{
System.out.println("You blink and suddenly your perspective switiches to the rock and you see Regis in your body walk away.");
System.out.println("Thanks for the body!");
System.out.println("Good job, you have lost.");
}
else if (c3.equals("ask"))
{
System.out.println("Regis takes extrem offense to your accusation of him.");
System.out.println("Exactly one metric ton of rocks fall on you from nowhere.");
System.out.println("You don't survive, it was a whole metric ton.");
}
}
else if(c2.equals("fight"))
{
System.out.println("You punch Regis directly in the face, this offendes him.");
System.out.println("Regis suddenly grows arms and legs and you realise the gravity of your mistake.");
System.out.println("Regis is actually the sparring partner of the man-eating squirrel, you met earlier.");
System.out.println("Do you choose to \"fight\" with him or attempt to \"escape\"?");
c3=stuff.next();
if (c3.equals("fight"))
{
System.out.println("You ran from a squirrel, but you think you can take on a rockman. Ha, good luck.");
System.out.println("Regis punches you. You no longer exist.");
System.out.println("Goodbye.");
}
else if(c3.equals("escape"))
{
System.out.println("You know running from your problems isn't healthy. You should probably see a professional.");
System.out.println("Luckly for you, Regis isn't fast, you manage to escape him.");
System.out.println("While running you trip on a squirrel.");
}
}
}
else if (c1.equals("diplomatic"))
{
System.out.println("The squirrel doesn't understand English, but luckly with you diplomatic skillz you used gestures.");
System.out.println("Would you like to use your learning skillz to teach him \"English\" or \"Backgammon\"?");
c2=stuff.next();
if(c2.equals("English"))
{
System.out.println("The squirrel misunderstands one of your lessons and starts speak Spansih.");
System.out.println("Good job, you should be a high school English teacher");
System.out.println("Would you like to attempt to teach \"English\" to the squirrel again or learn \"Spanish\" from it");
c3=stuff.next();
if (c3.equals("English"))
{
System.out.println("While trying to teach it English a talking rock named Regis walks by and decides to help.");
System.out.println("Regis speaks squirrel.");
System.out.println("After a few hours, the squirrel now knows English.");
System.out.println("Good job a rock did a better job than you.");
}
else if (c3.equals("Spanish"))
{
System.out.println("After many days of trying to learn spanish.");
System.out.println("you finally have a rudamentarty understanding of spanish.");
System.out.println("Congrats! You learned spanish from a squirrel.");
}
}
else if(c2.equals("Backgammon"))
{
System.out.println("You start to teach him backgammon.");
System.out.println("Would you like to \"actually\" teach him or \"lie\" so that you win ever game?");
c3=stuff.next();
if (c3.equals("actually"))
{
System.out.println("Congrats! You're a deccent person.");
System.out.println("The squirrel learns quickly and is very good at it.");
System.out.println("You have yet to win a game while teaching the squirrel.");
System.out.println("You've been outsmarted by a squirrel.");
}
else if(c3.equals("lie"))
{
System.out.println("You not a good person.");
System.out.println("Unluckly for you, the squirrel is smarter than you and figures out that you lied to it.");
System.out.println("You get eaten. Surpised? It's a MAN-eating squirrel!");
}
}
}
}
}
Output