Project #1

Code

    import java.util.Scanner;
    public class project1
    {
        public static void main(String[] args)
        {
            Scanner keyboard = new Scanner(System.in);
            
            String ans1,ans2,ans3,ans4;
                
            System.out.println( "So, you are in a 20 by 20 room, there is a \"door,\" a \"42,\" and a \"bed\" that do you want to go to?" );
            ans1 = keyboard.next();
            
            if (ans1.equals("door"))
            {
                System.out.println("do you want to \"inspect\" the door or \"kick\" it down?");
                ans2 = keyboard.next();
            
                if (ans2.equals("kick"))
                    {
                        System.out.println("You kick down the door and get a splinter you may try to \"pull\" out the splinter or \"run\" away.");
                        ans3 = keyboard.next();
                        if (ans3.equals("run"))
                        {
                            System.out.println("Though the door you are found by a group of guards.");
                            System.out.println("You have lost the game.");
                        }
                        else if  (ans3.equals("pull"))
                        {
                            System.out.println("You fail at pulling out the splinter.");
                            System.out.println("You now have a splinter in your leg.");
                            System.out.println("for the rest of your years.");
                            System.out.println("You have lost the game.");
                        }
                        else
                        {
                            System.out.println("That is not an Option");
                        }
                    }
                else if (ans2.equals("inspect"))
                    {
                        System.out.println("The door is unlocked do you want to \"open\" or \"call\" your pet owl?");  
                        ans3 = keyboard.next(); 
                        if (ans3.equals("call"))
                        {
                            System.out.println("Your pet owl calls back from the other side of the door you can tell it to \"attack\" or \"come\" to you.");
                            ans4 = keyboard.next();
                            if (ans4.equals("attack"))
                            {
                                System.out.println("Your pet owl attack you because you're the only target.");
                                System.out.println("You have lost the game.");
                            }
                            else if (ans4.equals("come"))
                            {
                                System.out.println("An owlbear walks though the door.");
                                System.out.println("You're owl was really an owlbear the hole time.");
                                System.out.println("You have lost the game.");
                            }
                            else
                            {
                                System.out.println("That is not an Option");
                            }
                        }
                        else if  (ans3.equals("open"))
                        {
                            System.out.println("The guard on the other side starts telling you that.");
                            System.out.println("\"Your army was defeated and");
                            System.out.println("You have lost the game.\"");
                        }
                        else
                        {
                            System.out.println("That is not an Option");
                        }
                    }
                else 
                    {
                        System.out.println("please restart");
                    }
            }
            else if (ans1.equals("bed"))
            {
                System.out.println("you may \"sleep\" or \"lay\" down");
                ans2 = keyboard.next();
                if (ans2.equals("sleep"))
                {
                    System.out.println("you wake up having all of your spell slots back, you may get \"up\" or go back to \"sleep\"");
                    ans3 = keyboard.next();
                    if (ans3.equals("sleep"))
                    {
                        
                        System.out.println("You gain the Trait slothful");
                        System.out.println("You have lost the game.");
                    }
                    else if (ans3.equals("up"))
                    {
                        System.out.println("A pack of wondering jagurs enter the room ");
                        System.out.println("the jagurs do not speak common and attack you");
                        System.out.println("You cast magic missle hiting a jagur");
                        System.out.println("but that was only one of them.");
                        System.out.println("You have lost the game.");
                    }
                    else
                    {
                        System.out.println("That is not an Option");
                    }
                }
                else if(ans2.equals("lay"))
                {
                    
                    System.out.println("You are now just wasting time.");
                    System.out.println("You remember that you have homework due tomorrow.");
                    System.out.println("do you \"hate\" your self for not doing it or \"try\" to complete it?");
                    ans3 = keyboard.next();
                    if (ans3.equals("hate"))
                    {
                        System.out.println("Hate leads to suffering, and the dark side");
                        System.out.println("You will become a dark lord, only without the force");
                        System.out.println("You have lost the game.");
                    }
                    else if (ans3.equals("try"))
                    {
                        System.out.println("You don't have to time to finish your work");
                        System.out.println("You get an F on the assignment");
                        System.out.println("You have lost the game.");
                    }
                    else
                    {
                        System.out.println("That is not an Option");
                    }
                }
                else
                {
                    System.out.println("That is not an Option");
                }
                }
            else if (ans1.equals("42"))
            {
                System.out.println("You circle around the 42 looking for an opening. will you be \"aggressive\" or defensive\"");
                ans2 = keyboard.next();
                if (ans2.equals("aggressive"))
                {
                    System.out.println("You find an opening and strike, the 42 is able the block the attack and counter");
                    System.out.println("you're now off balance, you may \"swing\" violently or \"regain\" balance");
                    ans3 = keyboard.next();
                    if (ans3.equals("swing"))
                    {
                        
                        System.out.println("You swing in to the air and fall to your DOOM");
                        System.out.println("You have lost the game.");
                    }
                    else if (ans3.equals("regain"))
                    {
                        System.out.println("while you are regaining you're");
                        System.out.println("You have lost the game.");
                    }
                    else
                    {
                        System.out.println("That is not an Option");
                    }
                }
                else if (ans2.equals("defensive"))
                {
                    System.out.println("As you circle around the 42 you find an opening will you attack with a \"sword\" or poke it with a \"stick\"?");
                    ans3 = keyboard.next();
                    if (ans3.equals("sword"))
                    {
                        
                        System.out.println("As you strike you realize you are not holding a sword.");
                        System.out.println("The 42 laughs in your face.");
                        System.out.println("You have lost the game.");
                    }
                    else if (ans3.equals("stick"))
                    {
                        System.out.println("The 42 starts to bite the stick");
                        System.out.println("You have tamed the medium rare man eating 42");
                        System.out.println("You have WON the game.");
                        System.out.println("GG.");
                    }
                    else
                    {
                        System.out.println("That is not an Option");
                    }
                }
                else
                {
                    System.out.println("That is not an Option");
                }
                }
            else
            {
                System.out.println("That is not an Option");
            }
            
        }
    }
    

Picture of the output