public static void DoContainer(Player player1, Container container)
        {
            Console.Clear ();

            var chestList = container.chestList;

            int j = 0;
            while(j == 0)
            {
                for (int i = 0; i < chestList.Count; i++) {
                    Console.WriteLine ((i + 1) + ". " + chestList [i].name);
                }

                int input = UI.PromptIntInRange ("Please enter the number of an item you want to take. Enter 0 to leave.", 0, chestList.Count);
                if (input == 0) {
                    Console.Clear ();
                    j++;
                }
                else if (input != 0) {
                    Player.inventory.Add (chestList [input-1]);
                    Console.Clear ();
                    Console.WriteLine (chestList [input-1].name + " has been added to your inventory.");
                    chestList.RemoveAt (input-1);
                }
            }
        }
        public static void SaveGame(Player player1)
        {
            string filename = player1.name + ".txt";
            var writer = new StreamWriter (filename);
            writer.WriteLine (player1.name);
            writer.WriteLine (player1.playerClass);
            writer.WriteLine (player1.level);
            writer.WriteLine (player1.experience);
            writer.WriteLine (player1.currentHealth);
            writer.WriteLine (player1.maximumHealth);
            writer.WriteLine (player1.STR);
            writer.WriteLine (player1.DEX);
            writer.WriteLine (player1.INT);
            writer.WriteLine (player1.CON);
            writer.WriteLine (player1.weapon.ID);
            writer.WriteLine (player1.armor.ID);
            writer.WriteLine (player1.salve.ID);
            writer.WriteLine (player1.progress);
            for (int i = 0; i < Player.inventory.Count; i++) {
                writer.WriteLine (Player.inventory [i].ID);
            }
            writer.WriteLine ("~");
            for (int i = 0; i < Player.storylist.Count; i++) {
                writer.WriteLine (Player.storylist [i]);
            }

            Console.WriteLine ("The game has been saved :)");

            writer.Close ();
        }
 public static void GetItem(Player player1, int input, List<Item> chestList)
 {
     Player.inventory.Add (chestList [input-1]);
     Console.Clear ();
     Console.WriteLine (chestList [input-1].name + " has been added to your inventory.");
     chestList.RemoveAt (input-1);
 }
        public static void Sequence1(Player player1)
        {
            var reader = new StreamReader ("Story.txt");

            string[] storyArray = GetStory (reader, "sequence1");
            if (!Player.storylist.Contains (1)) {
                Console.WriteLine (storyArray [0]);
            } else if (Player.storylist.Contains (1)) {
                Console.WriteLine ("You are back in your stasis room.");
            }
            int i = 0;
            string input = "";
            while (i == 0) {
                Console.WriteLine (storyArray[1]);
                Console.WriteLine ("What would you like to do?");
                Console.WriteLine ("INVENTORY || SAVE || STATUS || HELP");
                input = Console.ReadLine ();
                input = input.ToUpper ();
                if (input == "CHEST") {
                    Console.WriteLine ("You hobble over to the chest and open it up.");
                    Console.Clear ();
                    if (player1.playerClass == "Scientist") {
                        Container.DoContainer (player1, World.ContainerByID (401));
                    } else if (player1.playerClass == "Brawler") {
                        Container.DoContainer (player1, World.ContainerByID (402));
                    } else if (player1.playerClass == "Sniper") {
                        Container.DoContainer (player1, World.ContainerByID (403));
                    }
                } else if (input == "DOOR") {
                    Console.Clear ();
                    if (!Player.storylist.Contains (1)) {
                        Console.WriteLine ("As you open the door, a robot mech is alerted to your presence. You immediately notice that the robot is not a friendly one, as a matter of fact, the robot is armed and has a tattoo 'born to kill' across its chest...");
                        Console.ReadLine ();
                        Combat.DoCombat (player1, (Enemy)World.EnemyByID (304));
                        player1.progress++;
                        Player.storylist.Add (1);
                        Save.SaveGame (player1);
                    } else if (Player.storylist.Contains (1)) {
                        player1.progress++;
                    }
                    i++;
                } else if (input == "INVENTORY") {
                    Console.Clear ();
                    Inventory.DoInventory (player1);
                } else if (input == "SAVE") {
                    Console.Clear ();
                    Save.SaveGame (player1);
                } else if (input == "HELP") {
                    Console.Clear ();
                    Help.HelpTips ();
                }else if (input == "STATUS") {
                    Console.Clear ();
                    Player.PlayerSummary (player1);
                } else {
                    Console.Clear ();
                }
            }
        }
        public static void LevelUp(Player player1)
        {
            int level = 0;

            if (player1.experience >= 0 && player1.experience < 20) {
                level = 1;
            }
            else if (player1.experience >= 20 && player1.experience < 60) {
                level = 2;
            }
            else if (player1.experience >= 60 && player1.experience < 120) {
                level = 3;
            }
            else if (player1.experience >= 120 && player1.experience < 200) {
                level = 4;
            }

            if (level != player1.level) {
                player1.level = level;
                if (player1.playerClass == "Scientist") {
                    player1.INT += 4;
                    player1.STR += 2;
                    player1.DEX += 2;
                    player1.CON += 2;

                    player1.maximumHealth += 5;
                    player1.currentHealth = player1.maximumHealth;

                    player1.willpower += 10;
                    player1.initiative += 5;
                }
                else if (player1.playerClass == "Brawler") {
                    player1.INT += 2;
                    player1.STR += 4;
                    player1.DEX += 2;
                    player1.CON += 2;

                    player1.maximumHealth += 7;
                    player1.currentHealth = player1.maximumHealth;

                    player1.willpower += 3;
                    player1.initiative += 3;
                }
                else if (player1.playerClass == "Sniper") {
                    player1.INT += 2;
                    player1.STR += 2;
                    player1.DEX += 4;
                    player1.CON += 2;

                    player1.maximumHealth += 5;
                    player1.currentHealth = player1.maximumHealth;

                    player1.willpower += 3;
                    player1.initiative += 8;
                }
                Console.WriteLine ("You leveled up to level " + player1.level + "!");
            }
        }
 public static string Check(Player player1, Enemy enemy)
 {
     if (player1.currentHealth < 1) {
         return "FALSE";
     } else if (enemy.health < 1) {
         return "TRUE";
     } else {
         return "NULL";
     }
 }
        public static void Main()
        {
            Help.HelpTips ();

            bool x = Load.WillLoad (); //determines if the user will load a game or not.

            var player1 = new Player ();
            if (x == false) {
                player1.name = Player.GetName ();
                Console.Clear ();
                player1.playerClass = Player.GetClass ();
                Console.Clear ();
                player1.maximumHealth = Player.GetMaximumHealth (player1.playerClass);
                player1.currentHealth = player1.maximumHealth;
                player1.STR = Player.GetAttribute (player1.playerClass, "STR");
                System.Threading.Thread.Sleep (5);
                player1.DEX = Player.GetAttribute (player1.playerClass, "DEX");
                System.Threading.Thread.Sleep (5);
                player1.INT = Player.GetAttribute (player1.playerClass, "INT");
                System.Threading.Thread.Sleep (5);
                player1.CON = Player.GetAttribute (player1.playerClass, "CON");
                player1.willpower = 10 + player1.INT / 4;
                player1.level = 1;
                player1.experience = 0;
                player1.salve = (Salve)World.ItemByID (201);

            }
            if (x == true) {
                Load.LoadGame (player1);
                Console.Clear ();
                Console.WriteLine ("Your character has been loaded.");
                Console.WriteLine ("Press enter to continue...");
                Console.ReadLine ();
                Console.Clear ();
            }

            Player.PlayerSummary (player1); //a brief summary of the characters stats.

            Save.SaveGame (player1); //saves the game. Writes to a .txt file named after the character.

            //story elements are within if statements such that if a player continues a saved game, they can be directed back to the most recent room.
            if (player1.progress <= 1) {
                Story.Sequence1 (player1);
            }
            if (player1.progress == 2) {
                Story.Sequence2 (player1);
            }
            if (player1.progress == 3) {
                Story.Sequence3 (player1);
            }
            if (player1.progress == 4) {
                return;
            }
        }
        public static void LoadGame(Player player1)
        {
            string filename = FileCheck ();
            var reader = new StreamReader (filename);

            player1.name = reader.ReadLine ();
            player1.playerClass = reader.ReadLine ();
            player1.level = int.Parse(reader.ReadLine ());
            player1.experience = int.Parse (reader.ReadLine ());
            player1.currentHealth = int.Parse(reader.ReadLine ());
            player1.maximumHealth = int.Parse(reader.ReadLine ());
            player1.STR = int.Parse(reader.ReadLine ());
            player1.DEX = int.Parse(reader.ReadLine ());
            player1.INT = int.Parse(reader.ReadLine ());
            player1.CON = int.Parse(reader.ReadLine ());
            player1.weapon = (Weapon)World.ItemByID(int.Parse(reader.ReadLine ()));
            player1.armor = (Armor)World.ItemByID(int.Parse(reader.ReadLine ()));
            player1.salve = (Salve)World.ItemByID (int.Parse (reader.ReadLine ()));
            player1.progress = int.Parse (reader.ReadLine ());

            int input;
            string checkinput;
            int i = 0;
            while (i == 0) {
                checkinput = reader.ReadLine ();
                if (checkinput == "~") {
                    break;
                }
                input = int.Parse (checkinput);

                if (input > 0 && input <= 100) {
                    //weapon
                    Player.inventory.Add((Weapon)World.ItemByID(input));
                } else if (input > 100 && input <= 200) {
                    //armor
                    Player.inventory.Add((Armor)World.ItemByID(input));
                } else if (input > 200 && input <= 300) {
                    //salve
                    Player.inventory.Add((Salve)World.ItemByID(input));
                }
            }
            int storyinput;
            while (!reader.EndOfStream) {
                storyinput = int.Parse(reader.ReadLine ());
                Player.storylist.Add (storyinput);
            }

            reader.Close ();
        }
        public static void EnemyCombat(Player player1, Enemy enemy, Combat combat)
        {
            Console.Clear ();

            Combat.CombatStats (player1, enemy);

            int enemyd20;

            Random random = new Random ();

            Console.WriteLine (enemy.name + " is attacking...");
            Console.ReadLine ();

            enemyd20 = random.Next (1, 21);
            int enemyattack = enemyd20 + enemy.attackModifier;

            if (enemy.weaponType == "STR" || enemy.weaponType == "DEX") {
                if (enemyattack >= player1.armor.armorClass + combat.defend) {
                    Console.WriteLine ("The " + enemy.name + " hits you with " + enemy.weaponName + "!");
                    int damage = random.Next (enemy.weaponMin, enemy.weaponMax + 1);
                    player1.currentHealth -= damage;
                    Console.WriteLine ("You take " + damage + " damage!");
                    Console.ReadLine ();
                } else if (enemyattack < player1.armor.armorClass + combat.defend) {
                    Console.WriteLine ("The attack missed!");
                    Console.ReadLine ();
                }
            } else if (enemy.weaponType == "INT") {
                if (enemyattack >= player1.willpower) {
                    Console.WriteLine ("The " + enemy.name + " hits you with " + enemy.weaponName + "!");
                    int damage = random.Next (enemy.weaponMin, enemy.weaponMax + 1);
                    player1.currentHealth -= damage;
                    Console.WriteLine ("You take " + damage + " damage!");
                    Console.ReadLine ();
                } else if (enemyattack < player1.willpower) {
                    Console.WriteLine ("The attack missed!");
                    Console.ReadLine ();
                }
            }
        }
        public static void Loot(Player player1, Enemy enemy)
        {
            Console.Clear ();
            Console.WriteLine ("You killed the " + enemy.name + "!");
            player1.experience += enemy.experience;
            Console.WriteLine ("You gain " + enemy.experience + " experience!");
            Console.WriteLine ("You find " + enemy.Value + " credits on the " + enemy.name + ".");
            player1.Value += enemy.Value;

            Level.LevelUp (player1);

            Console.WriteLine ("Press enter to continue...");
            Console.ReadLine ();
        }
 public static Enemy GetRandomEnemyByLevel(Player player1)
 {
     var enemylist = new List<Enemy> ();
     for (int i = 0; i < World.Enemies.Count; i++) {
         if (World.Enemies [i].level == 1) {
             enemylist.Add (World.Enemies [i]);
         }
     }
     Random random = new Random ();
     return enemylist [random.Next (0, enemylist.Count)];
 }
        public static void DoCombat(Player player1, Enemy enemy)
        {
            int playerd20;
            int enemyd20;
            string x;

            Random random = new Random ();

            Combat combat = new Combat ();

            playerd20 = random.Next (1, 21);

            enemyd20 = random.Next (1, 21);

            int playerinitiative = playerd20 + player1.initiative;
            int enemyinitiative = enemyd20 + enemy.initiative;

            Console.Clear ();
            Console.WriteLine ("Combat Encounter!!");
            Console.WriteLine ("An enemy " + enemy.name + " has appeared!");

            Console.WriteLine ("Press enter to continue...");
            Console.ReadLine ();

            int i = 0;
            while (i == 0) {
                if (playerinitiative > enemyinitiative) {
                    if (enemy.health > 0) {
                        Combat.PlayerCombat (player1, enemy, combat);

                        x = Check (player1, enemy);
                        if (x == "TRUE") {
                            Enemy.Loot (player1, enemy);
                            Console.Clear ();
                            i++;

                        }
                    }
                    if (enemy.health > 0) {
                        Combat.EnemyCombat (player1, enemy, combat);
                        x = Check (player1, enemy);
                        if (x == "FALSE") {
                            Combat.GameOver (player1);
                        } else if (x == "TRUE") {
                            Enemy.Loot (player1, enemy);
                            Console.Clear ();
                            i++;
                        }
                    }

                }
                else if (enemyinitiative >= playerinitiative) {
                    if (enemy.health > 0) {
                        Combat.EnemyCombat (player1, enemy, combat);
                        x = Combat.Check (player1, enemy);
                        if (x == "FALSE") {
                            Combat.GameOver (player1);
                        }
                        Combat.PlayerCombat (player1, enemy, combat);
                    }
                    x = Combat.Check (player1, enemy);
                    if (x == "TRUE") {
                        Enemy.Loot (player1, enemy);
                        Console.Clear ();
                        i++;
                    }
                }
            }
            enemy.health = enemy.maxhealth;
        }
 public static void CombatStats(Player player1, Enemy enemy)
 {
     Console.WriteLine (player1.name + "\t\t\t" + enemy.name);
     Console.WriteLine ("Health: " + player1.currentHealth + "\t\t\t" + "Health: " + enemy.health);
 }
        public static void Sequence4(Player player1)
        {
            var reader = new StreamReader ("Story.txt");

            string[] storyArray = GetStory (reader, "sequence4");

            if (!Player.storylist.Contains (40)) {
                Console.WriteLine (storyArray [0]);
                Console.ReadLine ();
                Console.Clear ();
                Console.WriteLine ("From the far side of the building you can see multiple enemies emerge, prepare for combat!");
                Console.ReadLine ();

                Combat.DoCombat(player1, Enemy.GetRandomEnemyByLevel(player1));
                Combat.DoCombat(player1, Enemy.GetRandomEnemyByLevel(player1));
                Combat.DoCombat(player1, Enemy.GetRandomEnemyByLevel(player1));

                Player.storylist.Add (40);

            } else if (Player.storylist.Contains (40)) {
                Console.WriteLine ("You are back on the roof");
            }

            int i = 0;
            string input = "";
            while (i == 0) {
                Console.WriteLine (storyArray[1]);
                Console.WriteLine ("What would you like to do?");
                Console.WriteLine ("INVENTORY || SAVE || STATUS || HELP || BACK");
                input = Console.ReadLine ();
                input = input.ToUpper ();
                if (input == "HELICOPTER") {
                    Console.Clear ();
                    Console.WriteLine ("You hastily run towards the helicopter and enter as the guard prepares to take off. After flying for about 4 hours you arrive at your destination.");
                    Console.WriteLine ("Thanks for playing!");
                    Console.ReadLine ();
                } else if (input == "DOCUMENT") {
                    Console.Clear ();
                    if (!Player.storylist.Contains (42)) {
                        Console.WriteLine ("You walk over and pick up the document...");
                        Player.inventory.Add ((Document)World.ItemByID (502));
                        Player.storylist.Add (42);
                        Console.ReadLine ();
                        Console.Clear ();
                    } else if (Player.storylist.Contains (42)) {
                        Console.WriteLine ("You already picked that up...");
                        Console.ReadLine ();
                        Console.Clear ();
                    }
                } else if (input == "BACK") {
                    player1.progress--;
                    Console.Clear ();
                    Story.Sequence1 (player1);
                } else if (input == "INVENTORY") {
                    Console.Clear ();
                    Inventory.DoInventory (player1);
                } else if (input == "HELP") {
                    Console.Clear ();
                    Help.HelpTips ();
                }else if (input == "SAVE") {
                    Console.Clear ();
                    Save.SaveGame (player1);
                } else if (input == "STATUS") {
                    Console.Clear ();
                    Player.PlayerSummary (player1);
                } else {
                    Console.Clear ();
                }
            }
        }
        public static void PlayerCombat(Player player1, Enemy enemy, Combat combat)
        {
            Console.Clear ();
            int playerd20;

            Random random = new Random ();
            int j = 0;
            while (j == 0) {
                Combat.CombatStats (player1, enemy);

                Console.WriteLine ("ATTACK");
                Console.WriteLine ("DEFEND");
                Console.WriteLine ("INVENTORY");
                Console.WriteLine ("AC" + (player1.armor.armorClass + combat.defend));
                string input = UI.PromptLine ("What would you like to do?");
                input = input.ToUpper ();

                if (input == "ATTACK") {
                    j++;
                    if (player1.weapon.Type == "STR") {
                        playerd20 = random.Next (1, 21);
                        int playerattack = playerd20 + (player1.STR / 4);

                        if (playerattack >= enemy.armorClass) {
                            Console.Clear ();
                            Console.WriteLine ("You hit the enemy with your " + player1.weapon.name + "!");
                            int damage = random.Next (player1.weapon.minDamage, player1.weapon.maxDamage + 1);
                            enemy.health -= damage + (player1.STR / 4);
                            Console.WriteLine ("It does " + (damage + (player1.STR / 4)) + " damage!");
                            Console.ReadLine ();
                        } else if (playerattack < enemy.armorClass) {
                            Console.Clear ();
                            Console.WriteLine ("Your attack missed :(");
                            Console.ReadLine ();
                        }

                    }
                    if (player1.weapon.Type == "DEX") {
                        playerd20 = random.Next (1, 21);
                        int playerattack = playerd20 + (player1.DEX / 4);

                        if (playerattack >= enemy.armorClass) {
                            Console.Clear ();
                            Console.WriteLine ("You hit the enemy with your " + player1.weapon.name + "!");
                            int damage = random.Next (player1.weapon.minDamage, player1.weapon.maxDamage + 1);
                            enemy.health -= damage + (player1.DEX / 4);
                            Console.WriteLine ("It does " + (damage + (player1.DEX / 4)) + " damage!");
                            Console.ReadLine ();
                        } else if (playerattack < enemy.armorClass) {
                            Console.Clear ();
                            Console.WriteLine ("Your attack missed :(");
                            Console.ReadLine ();
                        }
                    }
                    if (player1.weapon.Type == "INT") {
                        playerd20 = random.Next (1, 21);
                        int playerattack = playerd20 + (player1.INT / 4);

                        if (playerattack >= enemy.willPower) {
                            Console.Clear ();
                            Console.WriteLine ("You hit the enemy with your " + player1.weapon.name + "!");
                            int damage = random.Next (player1.weapon.minDamage, player1.weapon.maxDamage + 1);
                            enemy.health -= (damage + (player1.INT / 4));
                            Console.WriteLine ("It does " + (damage + (player1.INT / 4)) + " damage!");
                            Console.ReadLine ();
                        } else if (playerattack < enemy.willPower) {
                            Console.Clear ();
                            Console.WriteLine ("Your attack was negated :(");
                            Console.ReadLine ();
                        }
                    }

                } else if (input == "DEFEND") {
                    j++;
                    combat.defend += (4 / combat.defendcounter);
                    Console.WriteLine ("Your defense has been raised!");
                    combat.defendcounter++;
                    Console.ReadLine ();
                } else if (input == "INVENTORY") {
                    Console.Clear ();
                    j++;
                    Inventory.DoInventory (player1);
                } else {
                    Console.Clear ();
                    Console.WriteLine ("I can't understand you");
                    Console.ReadLine ();
                    Console.Clear ();
                }
            }
        }
        public static void Sequence3(Player player1)
        {
            var reader = new StreamReader ("Story.txt");

            string[] storyArray = GetStory (reader, "sequence3");

            if (!Player.storylist.Contains (30)) {
                Console.WriteLine (storyArray [0]);
                Player.storylist.Add (30);
            } else if (Player.storylist.Contains (30)) {
                Console.WriteLine ("You are back in the utility room.");
            }

            int i = 0;
            string input = "";
            while (i == 0) {
                Console.WriteLine (storyArray [1]);
                Console.WriteLine ("What would you like to do?");
                Console.WriteLine ("INVENTORY || SAVE || STATUS || HELP || BACK");
                input = Console.ReadLine ();
                input = input.ToUpper ();
                if (input == "BOX") {
                    Console.Clear ();
                    if (!Player.storylist.Contains (31)) {
                        Console.WriteLine ("You open the utility box and find the power switch. With one smooth motion you shut off the power and the room goes dark.");
                        Player.storylist.Add (31);
                        Player.storylist.Add (29);
                        Console.ReadLine ();
                        Console.Clear ();
                    } else if (Player.storylist.Contains (31)) {
                        Console.WriteLine ("The power switch is off, better leave it that way.");
                        Console.ReadLine ();
                        Console.Clear ();
                    }

                } else if (input == "CHEST") {
                    Console.Clear ();
                    Console.WriteLine ("You open up the chest.");
                    Container.DoContainer (player1, World.ContainerByID (404));
                } else if (input == "BACK") {
                    player1.progress--;
                    Console.Clear ();
                    Story.Sequence2 (player1);
                } else if (input == "INVENTORY") {
                    Console.Clear ();
                    Inventory.DoInventory (player1);
                } else if (input == "HELP") {
                    Console.Clear ();
                    Help.HelpTips ();
                }else if (input == "SAVE") {
                    Console.Clear ();
                    Save.SaveGame (player1);
                } else if (input == "STATUS") {
                    Console.Clear ();
                    Player.PlayerSummary (player1);
                } else {
                    Console.Clear ();
                }
            }
        }
 public static void PlayerSummary(Player player1)
 {
     Console.WriteLine ("Name: " + player1.name);
     Console.WriteLine ("Class: " + player1.playerClass);
     Console.WriteLine ("Level: " + player1.level);
     Console.WriteLine ("Strength: " + player1.STR);
     Console.WriteLine ("Dexterity: " + player1.DEX);
     Console.WriteLine ("Intelligence: " + player1.INT);
     Console.WriteLine ("Constitution: " + player1.CON);
     Console.WriteLine ("Health: " + player1.maximumHealth);
     Console.WriteLine ("Experience: " + player1.experience);
     Console.WriteLine ("Weapon: " + player1.weapon.name);
     Console.WriteLine ("Armor: " + player1.armor.name);
     Console.WriteLine ("Inventory: ");
     if (Player.inventory.Count > 1) {
         for (int i = 0; i < Player.inventory.Count; i++) {
             Console.WriteLine ("\t\t" + Player.inventory [i].name);
         }
     } else if (Player.inventory.Count < 1) {
         Console.WriteLine ("empty");
     }
     Console.WriteLine ("Press enter to continue...");
     Console.ReadLine ();
     Console.Clear ();
 }
 public static void GameOver(Player player1)
 {
     Console.WriteLine ("You died");
     int i = 0;
     while (i == 0) {
         string input = Console.ReadLine ();
         if (input == "continue") {
             player1.currentHealth = player1.maximumHealth;
             i++;
         }
     }
 }
        public static void Sequence2(Player player1)
        {
            var reader = new StreamReader ("Story.txt");

            string[] storyArray = GetStory (reader, "sequence2");

            if (!Player.storylist.Contains (26)) {
                Console.WriteLine (storyArray [0]);
            } else if (Player.storylist.Contains (26)) {
                Console.WriteLine ("You are back in the circular computer room.");
            }

            int i = 0;
            string input = "";
            while (i == 0) {
                Console.WriteLine (storyArray[1]);
                Console.WriteLine ("What would you like to do?");
                Console.WriteLine ("INVENTORY || SAVE || STATUS || HELP || BACK");
                input = Console.ReadLine ();
                input = input.ToUpper ();
                if (input == "GUARD") {
                    Console.Clear ();
                    if (!Player.storylist.Contains (29)) {
                        if (!Player.storylist.Contains (22)) {
                            Console.WriteLine (player1.name + "! I'm so glad you made it out of there, I was sure the stasis ward was lost entirely. If you made it this far, you might have a chance to get us out of this mess, well at least for a little bit. I'm going to need you to make your way to the utilities room and shut off the power, that should give us some time to regroup. It won't solve the problem permanently but it's worth a shot. Quickly! I'll hold them off while you search for the power grid.");
                            Player.storylist.Add (22);
                            Console.ReadLine ();
                            Console.Clear ();
                        } else if (Player.storylist.Contains (22)) {
                            Console.WriteLine ("I'm not sure talking to me is the best use of your time...");
                            Console.ReadLine ();
                            Console.Clear ();
                        }
                    }
                    if (Player.storylist.Contains (29)) {
                        Console.WriteLine (player1.name + " you've done it! The power is out. Quick, down the HALLWAY we will attempt to escape to the roof. There should be a helicopter we can use to escape.");
                        Console.ReadLine ();
                        Console.Clear ();
                    }
                } else if (input == "HALLWAY") {
                    Console.Clear ();
                    if (!Player.storylist.Contains (29)) {
                        if (!Player.storylist.Contains (23)) {
                            Console.WriteLine ("As you scurry down the hallway, dead bodies litter the floor, looking up from the carnage you realize that  3 mechs are running you down!");
                            Console.ReadLine ();
                            Combat.DoCombat (player1, (Enemy)World.EnemyByID (304));
                            Combat.DoCombat (player1, (Enemy)World.EnemyByID (304));
                            Combat.DoCombat (player1, (Enemy)World.EnemyByID (304));
                            Player.storylist.Add (23);
                            Console.WriteLine ("After fighting off the mechs, you search for the utility room, but it doesn't appear to be in this part of the building. :(");
                            Console.ReadLine ();
                            Console.Clear ();
                        } else if (Player.storylist.Contains (23)) {
                            Console.WriteLine ("You walk down the hallway and find the remains of some slaughtered mechs. You find nothing else of value here.");
                            Console.ReadLine ();
                            Console.Clear ();
                        }
                    }
                    if (Player.storylist.Contains (29)) {
                        Save.SaveGame (player1);
                        player1.progress++;
                        Story.Sequence4 (player1);
                    }
                } else if (input == "DOCUMENT") {
                    Console.Clear ();
                    if (!Player.storylist.Contains (24)) {
                        Console.WriteLine ("You pick up the document...");
                        Player.inventory.Add ((Document)World.ItemByID (501));
                        Player.storylist.Add (24);
                        Console.ReadLine ();
                        Console.Clear ();
                    } else if (Player.storylist.Contains (24)) {
                        Console.WriteLine ("You already picked that up...");
                        Console.ReadLine ();
                        Console.Clear ();
                    }
                } else if (input == "DOOR") {
                    i++;
                    player1.progress++;
                    Player.storylist.Add (26);
                    Save.SaveGame (player1);
                    Console.Clear ();
                } else if (input == "BACK") {
                    player1.progress--;
                    Console.Clear ();
                    Story.Sequence1 (player1);
                } else if (input == "INVENTORY") {
                    Console.Clear ();
                    Inventory.DoInventory (player1);
                } else if (input == "SAVE") {
                    Console.Clear ();
                    Save.SaveGame (player1);
                } else if (input == "HELP") {
                    Console.Clear ();
                    Help.HelpTips ();
                }else if (input == "STATUS") {
                    Console.Clear ();
                    Player.PlayerSummary (player1);
                } else {
                    Console.Clear ();
                }
            }
        }