Assignment #77 Adventure 2

This took longer than any other program I've done, and I know it can be cleaned up and there are easier ways to do it, but I've spent enough time on it already

Code

    /// Name: Koosha Kimelman
    /// Period: 7
    /// Program Name: Adventure 2
    /// File Name: Adventure2.java
    /// Date Completed: 12/3/15
    
    import java.util.Scanner;
    
    public class Adventure2 {
    
        public static void main(String[] args) {
        
            Scanner keyboard = new Scanner(System.in);
            
            int n = 0;
            String r1, r2, r3;
            r1 = "";
            
            System.out.println("Another time-consuming adventure. Yay.");
            
            while (n < 3) {
                    if (r1.equals("")) {
                        System.out.println("\nYou are in another random building with no distinctive features and you don't know why. Just go with it. There are two doors; there is a door with a \"1\" on it, and a door with a \"2\" on it. Which one do you go through?");
                    
                    n++;
                    System.out.print("> ");
                    r1 = keyboard.next();
                    }
                
                    if (r1.equals("1")) {
                        System.out.println("\nThere are two more doors; there is a \"red-orange\" door and a \"grey\" door. Which one do you go through? You may also go \"back\".");
                        r2 = keyboard.next();
                    
                        if (r2.equals("red-orange")) {
                            System.out.println("\nThere are two more doors; there is a \"red\" door and an \"orange\" door. Which one do you go through? You may also go \"back\".");
                            r3 = keyboard.next();
                            
                            if (r3.equals("red")) {
                                System.out.println("You open the door and walk inside. The door closes behind you and locks itself. The room is full of fire and it burns you. \nYou have died.");
                                n = 4;
                            }
                            else if (r3.equals("orange")) {
                                System.out.println("You open the door and walk inside. The door closes behind you and locks itself. The room is full of ravenous tigers that eat you. \nYou have died.");
                                n = 4;
                            }
                            else if (r3.equals("back"))
                                r2 = "N/A";
                        }
                        else if (r2.equals("grey")) {
                            System.out.println("\nThere are two more doors; there is a \"black\" door and a \"white\" door. Which one do you go through? You may also go \"back\".");
                            r3 = keyboard.next();
                            
                            if (r3.equals("black")) {
                                System.out.println("You open the door and walk inside. The door closes behind you and locks itself. The room is just an empty, devoid vacuum and you suffocate. \nYou have died.");
                                n = 4;
                            }
                            else if (r3.equals("white")) {
                                System.out.println("You open the door and walk inside. The door closes behind you and locks itself. The room is filled with snow and ice and is below -100° F and you freeze. \nYou have died.");
                                n = 4;
                            }
                            else if (r3.equals("back"))
                                r3 = "N/A";
                        }
                        else if (r2.equals("back"))
                            r1 = "";
                    }
                    else if (r1.equals("2")) {
                        System.out.println("\nThere are two more doors; there is a \"yellow-green\" door and a \"pink-blue\" door. Which one do you go through? You may also go \"back\".");
                        r2 = keyboard.next();
                        
                        if (r2.equals("yellow-green")) {
                            System.out.println("\nThere are two more doors; there is a \"yellow\" door and a \"green\" door, Which one do you go through? You may also go \"back\".");
                            r3 = keyboard.next();
                            
                            if (r3.equals("yellow")) {
                                System.out.println("You open the door and walk inside. The door closes behind you and locks itself. The room is made entirely of metal and has circuits sending huge amounts of electricity all over the room and you get electrocuted instantly. \nYou have died.");
                                n = 4;
                            }
                            else if (r3.equals("green")) {
                                System.out.println("You open the door and walk inside. The door closes behind you and locks itself. The room is filled with alligators that attack you and eat you. \nYou have died.");
                                n = 4;
                            }
                            else if (r3.equals("back"))
                                r3 = "N/A";
                        }
                        else if (r2.equals("pink-blue")) {
                            System.out.println("\nThere are two more doors; there is a \"pink\" door and a \"blue\" door, Which one do you go through? You may also go \"back\".");
                            r3 = keyboard.next();
                            
                            if (r3.equals("pink")) {
                                System.out.println("You open the door and walk inside. The door closes behind you and locks itself. The room is filled with lots of sugary candy, and you can't resist, so you try a piece. It's delicious, so you have another, and another, and soon you have eaten so many that you just collapse and never get back up. \nYou have died.");
                                n = 4;
                            }
                            else if (r3.equals("blue")) {
                                System.out.println("You open the door and walk inside. The door closes behind you and locks itself. The room is filled with water up to the top. There is no air whatsoever and you drown. \nYou have died.");
                                n = 4;
                            }
                            else if (r3.equals("back"))
                                r3 = "N/A";
                        else if (r2.equals("back"))
                            r2 = "N/A";
                        }
                        else if (r2.equals("back"))
                            r1 = "";
                    }
            }
            
            if (n == 3) {
                System.out.println("You have had enough of this crazy building, so you decide to just leave. \nYou survived. \n\nThis is the only ending where you live, congratulations on not being able to decide which one to go through.");
            }
                
            System.out.println("\n\nThe end.");
        }
    }
    

Picture of the output

Assignment 77