Assignemnt #45 Choose Your Own Adventure

Code

    ///Name: Morgan Kaplan
    ///Period: 5
    ///Project Name: Choose Your own adventure
    ///File Name: Adventure.java

import java.util.Scanner;

public class Adventure
{
    public static void main( String[] args )
    {
        Scanner momo= new Scanner(System.in);
        
        String Path, Door="", transformation, animals, offer, bat, friend;
            
        System.out.println( "There is an eerie presence in the air as you stroll along the dark forrest path.  You went out to gather fire wood for your family but have gotten lost along the complex trails which seem to weave in and out in an abstract pattern.  The sun is setting and darkness is slowly swallowing the air while snow begins to flutter down from the sky.  You decide you need to find shelter immediately.  You see two paths, one leading to a witch's castle and another leading to a vampire's cave.  Which path do you choose?  Answer Options: witch or vampire." );
        Path=momo.next();
         
        if ( Path.equals("witch"))
		{
			System.out.println( "You tip toe up the creaky stone stairs to the castle to find the front door locked.  Do you knock nicely or bust open the door? Answer Options: knock or bust." );
            Door=momo.next();
       if ( Door.equals("knock"))
		{
			System.out.println( "The door slowly opens to reveal one old women.  She greets you with a pleasent smile and invites you inside for a nice meal.  She offers you milk with cookies or a salad with a protein shake.  Which meal do you choose?  Answer options: cookies or salad." );
            transformation=momo.next();
        if ( transformation.equals("cookies"))
		{
			System.out.println( "As soon as you chomp into your cookies a strange feeling begins to reside in your stomach.  The witch has poured a potion into the cookies!  Luckily, the witch likes people who like junk food so she goes easy on you. You blossom into a beautiful fairy.  You are absolutely stunning and amazing to look at.  You are the most beautiful person in the entire world.  So in other words, you're Morgan Kaplan." );
        } 
        if ( transformation.equals("salad"))
		{
         System.out.println( "You take a small bite of your salad but then notice a strange tingling feeling on your tongue.  You look into a mirror and realize that a seed from the carrot you had just eaten was begining to sprout on your esophagus!  Your skins begins to glow orange and all your bones conform to one.  You are now a giant carrot who can only sing in carrot puns to communicate." );
        }} 
       if ( Door.equals("bust"))
		{
			System.out.println( "You kick open the door with all your might.  Unfortunately the door does not open and a siren goes off.  You immediately start running.  On one side of you is a gaggle of angry geese and on the other side is an alligator, which one do you choose? Answer options: geese or alligator" );
            animals=momo.next();
            if ( animals.equals("geese"))
		{
			System.out.println( "The Geese swarm around you in a fit of rage.  They start to peck you and call you insulting names.  The gaggle ties you down and uses you as a nest." );
        }
     if ( animals.equals("alligator"))
		{
			System.out.println( "The alligator crawls towards you as you close your eyes and brace yourself to be eaten alive.  However instead of recieving a painful bite you hear a rather upbeat voice.  The alligator introduces himself and says \"Hi I'm Bob the alligator it's nice to meet you!\" After chatting with Bob for a while you find out Bob is your spirit animal.  You then ride off into the sunset together.");
                }          
        } 
        }
         
        
        
        if ( Path.equals("vampire"))
		{
			System.out.println( "You cautiously creep into a cave filled with fog and darkness.  It is pitch black and you can not see a thing but you hear a strange voice singing in your ear.  It is a bat offering you directions to the other exit of the cave.  Do you take his advice or go in the opposite direction?  Answer options:  advice or opposite. " );
            bat=momo.next();
       if ( bat.equals("advice"))
		{
			System.out.println( "You follow the bat to the end of the cave.  However,  the exit is not anywhere closer to your home and you need shelter from the coming snow storm!  The bat senses your dismay and offers to host you for the night.  Do you accept his offer or decline?  Answer options: accept or decline " );
            offer=momo.next();
        if ( offer.equals("accept"))
		{
			System.out.println( "You are shown to a dim room lit by only a single candle.  There a group of what seems like freakishly pale people all sit around what appears to be a bowl filled with a mysterious liquid.  A pale little girl with dark black hair and even blacker eyes offers you a drink of this mysterious liquid.  Parched, you decide to take a sip.  It tastes strange and you begin to question this risky decision.  Your arms then begin to morph into gray wings.  You are now a Vampire Bat!" );
        } 
        if ( offer.equals("decline"))
		{
         System.out.println( "You wonder out into the twisting and confusing paths.  There you are caught in the storm and freeze.  You wake up the next day and you're Frosty the Snowman." );
        }} 
       if ( bat.equals("opposite"))
		{
			System.out.println( "You delibrately go in the opposite direction as directed by the bat.  You wonder into a room with a colony of pale children sitting around a bonfire.  As you as you step in the room all of their heads turn 180 degrees and stare at you.  You see one of them has fangs and you realize that these are no ordinary people but vampires! Do you pretend to be another fellow vampire or do you introduce yourself and tell the truth?  Answer options: pretend or truth." );
            friend=momo.next();
            if ( friend.equals("pretend"))
		{
			System.out.println( "The colony easily recognizes that you are a human based on your scent.  They are very upset that you lied to them and their feelings are very hurt.  They all start crying because they feel like no one understands them!  In an effort to make you understand their pain they bite you.  You are then cursed with a fate much worse than death, being undead." );
        }
     if ( friend.equals("truth"))
		{
			System.out.println( "The vampires are happy you shared the truth with them.  The leader then transforms into a giant bat and flies you back to your house." );
                }          
        } 
        }
        
    }
        
}
    

Picture of Output

Assignment 45