Project #1

Code

///jack newsom
///period 5
///program name Adventure2
///filename Adventure2.java
///date completed 10/2/15

import java.util.Scanner;

public class Adventure2
{
    public static void main( String[] args)
    {
        Scanner advbot = new Scanner(System.in);
        
        String level1, level2room1, level2room2, level2room3, level3room1a, level3room1b, level3room2a, level3room2b, level3room3a, level3room3b, level4room1a1, level4room1a2, level4room1b1, level4room1b2, level4room2a1, level4room2a2, level4room2b1, level4room2b2, level4room3a1, level4room3a2, level4room3b1, level4room3b2;
        
        System.out.println("Welcome to Jack's sp00ky adventure!");
        
        System.out.println();
        
        System.out.println("You arrive at Las Lomas. Do you go to the bathroom, library, or cafeteria?");
        String r1C = advbot.next();
        
        boolean bR1Ca = r1C.equals("bathroom");
        boolean bR1Cb = r1C.equals("library");
        
        if ( bR1Ca == true )
        {
        //bathroom 
            System.out.println("You enter the bathroom. You notice a kid writing something on a stall.");
            System.out.println("Do you try to stop him? (y/n)");
            String l2r1 = advbot.next();
            
            boolean bl2r1 = l2r1.equals("y");
            if ( bl2r1 == true )
            {
            //stop kid
                System.out.println("You walk up to the kid and tell him to stop defiling school property.");
                System.out.println("The kid turns around, gives a grim smile, and points to his masterpiece.");
                System.out.println("It reads \"lol im gonna blow up da skul tmrw xD\". After reading this work rivaling Shakespeare, you decide you ");
                System.out.println("have two options. Do you \"slap\" the kid for being a dumb freshman or do you give him a \"swirly\" for improper spelling?");
                
                String l3r1a = advbot.next();
                
                boolean bl3r1a = l3r1a.equals("slap");
                
                if ( bl3r1a == true )
                {
                //slap, l4r1a1
                    System.out.println("You pimp slap the freshman 40 times with both hands. After the 23rd hit, his skin becomes raw and starts to bleed.");
                    System.out.println("The blood dripping from his face lands on a hidden pentagram on the floor. You did not realize it initially, but ");
                    System.out.println("the freshman is one of the many cultists who attends Las Lomas. When his blood hits the pentagram, the drawing bursts into flame ");
                    System.out.println("and a demonic voice resembling Sean Connery yells \"Malagoth abigor derka derka cyka blyat\".");
                    System.out.println("A giant minion from Despicable Me ascends in an explosion of red flame from the pentagram and \"Kali-Ma\"s your heart. RIP");
                }
                else
                {
                //swirly, l4r1a2
                    System.out.println("You swirly the freshman and walk out the bathroom proudly. Ms. Amin walks up to you and says ");
                    System.out.println("\"Honey, have you done your theme assignment?\" You respond \"Ms. Amin, I'm not even in your class.\"");
                    System.out.println("Ms. Amin fiercely disagrees and forces you to enroll in Digital Design 3. The end.");                      
                }
                
            }
            else
            {
            //dont stop kid
                System.out.println("You allow the kid to continue writing on the stall. As you turn around to leave the bathroom, a SWAT team breaks the door ");
                System.out.println("down and the leader yells \"GET ON THE GROUND!!\". Do you \"obey\" his order or do you use your sweet \"karate\" skills to fight them?");
                
                String l3r1b = advbot.next();
                
                boolean bl3r1b = l3r1b.equals("obey");
                
                if ( bl3r1b == true )
                {
                //obey orders, l4r1b1
                    System.out.println("You allow the SWAT team to cuff you. They grab you and throw you into a police van.");
                    System.out.println("Do you use your MLG hacking skills to \"hack\" into the mainframe and free yourself or do you \"cooperate\" with the SWAT?");
                }
                else
                {
                //karate fight, l4r1b1
                    System.out.println("You unleash your dank karate skills on the unsuspecting SWAT team, which is suprisingly unprepared for such an outburst.");
                    System.out.println("In a true homage to Chuck Norris, you roundhouse kick the entire team, knocking them all to the ground");
                    System.out.println("Do you \"run\" away while the SWAT team is stunned or do you \"demand\" they make you their leader?");
                }
            }
        }
        else if ( bR1Cb == true )
        {
        //library
            System.out.println("You enter the library. Do you go to a \"computer\" or a \"desk\"?");
            String l2r2 = advbot.next();
            
            boolean bl2r2 = l2r2.equals("computer");
            
            if ( bl2r2 == true )
            {
            //computer, l3r2a
                System.out.println("You walk over to a computer and log on. Recently, you've been learning how to hack in Mr. Davis' Intro to Computer Programming class.");
                System.out.println("Do you use your newly acquired skills for \"good\" or for \"evil\"?");
                
                String l3r2a = advbot.next();
                
                boolean bl3r2a = l3r2a.equals("good");
                
                if ( bl3r2a == true )
                {
                //good hacker, l4r2a1
                    System.out.println("You boot Windows Powershell. After a few furious seconds of typing, you have complete access to the nuclear launch codes of Iran.");
                    System.out.println(" Knowing what must be done, you unleash a barrage of nukes onto different ISIS militia groups in the Middle East. Seconds later, ");
                    System.out.println("President Obama enters the library followed by the Secret Service. Obama approaches you and shakes your hand, thanking you for ending ");
                    System.out.println("the bloodbath in the Middle East.");
                }
                else
                {
                //bad hacker, l4r2a2
                    System.out.println("You boot Windows Powershell. After a few furious seconds of typing, you have unrestricted access to FBI records. ");
                    System.out.println("In an act of true evil, you legally change Independence Day to July 5th. You monster!");
                }
                
            }
            else 
            {
            //desk, l3r2b
                System.out.println("You walk over to a desk to work diligently on your homework. You study for 45 minutes and get an A on Mr. McGill's AP Euromemes test. Congratualtions!");
            }
        }
        else if ( bR1Ca == false && bR1Cb == false )
        {
        //cafeteria  
            System.out.println("You enter the cafeteria. Do you go \"order\" lunch or \"fight\" the school bully?");
            String l2r3 = advbot.next();
            
            boolean bl2r3 = l2r3.equals("order");
            
            if ( bl2r3 == true )
            {
            //order lunch, l3r3a
                System.out.println("You walk over to the kitchen to order some lunch. Do you buy a baked \"potato\" or a slice of \"pizza\"?");
                
                String l3r3a = advbot.next();
                
                boolean bl3r3a = l3r3a.equals("potato");
                
                if ( bl3r3a == true )
                {
                //potato, l4r3a1
                    System.out.println("You buy the baked potato. As you are walking out of the cafeteria, you are approached by an elderly man with Einstein-esque hair.");
                    System.out.println("The man says \"Hello, child. I require your potato to power my time machine. Without it, Hitler will win WW2!\"");
                    System.out.println("Knowing you must do what is moral, you hand the man your potato. He eats it and runs away. The end.");
                }
                else
                {
                //pizza, l4r3a2  
                    System.out.println("You buy the pizza and walk to the area where you normally eat lunch. You sit down with your friends and have a casual conversation ");
                    System.out.println("about the reading assignment for Ms. Beezelbub's English 4 class. You decide that making the pizza was a great decision because ");
                    System.out.println("it is delicious.");
                }
                
            }
            else
            {
            //fight the bully, l3r3b
                System.out.println("You walk up to the school bully and say \"ur bad lel\". He towers over you, measuring over 9 feet tall and weighing more than 500lbs.");
                System.out.println("The bully gets really close to you and begins breathing on your scalp. He says \"What the ( ͡° ͜ʖ ͡°)  did you just say about me, you little ( ͡° ͜ʖ ͡°)?\" ");
                System.out.println("Because you haven't taken memespeak at Las Lomas yet, you have no idea what ( ͡° ͜ʖ ͡°) means. Because you think the bully is trying to trigger you, you decide you have two options: have a \"KKona\" battle or a \"FeelsBadMan\" battle. Which do you choose?");
                
                String l3r3b = advbot.next();
                
                boolean bl3r3b = l3r3b.equals("KKona");
                
                if ( bl3r3b == true )
                {
                //brotherman bill fight, l4r3b1
                    System.out.println("You initiate a KKona battle with the bully. You begin singing \"Brotherman Bill\" quietly to channel your KKona powers.");
                    System.out.println("The bully begins to sing the song also. When you notice this, you begin singing louder, to one-up the bully. ");
                    System.out.println("You take a look at the crowd. They are all PogChamping and you feel the pressure build. You stop singing, take a step back, and ");
                    System.out.println("run towards the bully with your arms behind your back because that's what they do in Naruto and in Naruto they run really fast. ");
                    System.out.println("You launch yourself towards the bully and RKO him. He topples over and can't get back up. He says \"xD loL wazn even tryin Xd\"");
                }
                else
                {
                //pepe fight, l4r3b2
                    System.out.println("You try to initiate a pepe fight but because your collection of pepes isn't nearly as rare or as extensive as his, the bully wins by default. ");
                    System.out.println("As is standard procedure in pepe fights, you are required to give the bully your hard drives with all your pepes because you lost.");
                }
            }
        }
        else
        {
            System.out.println("Whoops, looks like you didn't choose an available option. Try again!");
        }
    }
}      
    

Picture of the output

Assignment X