/* // Dawn Never Came Special Edition */ #include #include #ifdef HAVE_CONFIG_H #include #endif #include #include using namespace std; void multitool(); void startmenu(); void loadgame(int slot); void savegame(); //global game variables int health; char name[100]; int location; int died; int inventory[3]; int ammo; int endgame; int activegameslot; const char slot1filepath[] = ".slot1.dncs"; const char slot2filepath[] = ".slot2.dncs"; const char slot3filepath[] = ".slot3.dncs"; const char slot4filepath[] = ".slot4.dncs"; int roomammount = 30; void death(int type); void battle(int enemy_type, int enemy_quantity, int able_to_escape); void health_pack(); void super_health_pack(); void the_end(); void tutorial(); int gotitallreadyroom13 = 0; int gotgunupgradeallready = 0; int room23healthpackfix = 0; int cardkeyfix2 = 0; int cardkeyfix = 0; void secretarea(); //room definitions void room1(); void room2(); void room3(); void room4(); void room5(); void room6(); void room8(); void room7(); void room9(); void room10(); void room11(); void room12(); void room13(); void room14(); void room15(); void room16(); void room17(); void room18(); void room19(); void room20(); void room21(); void room22(); void room23(); void room24(); void room25(); void room26(); void room27(); void room28(); void room29(); void room30(); int main() { startmenu(); if(location > 0 && location <= 30 && endgame != 1) { while(endgame != 1) { if (location == 1) { room1(); } eval(strcat(strcat("room", itos(location)), "();")); //system("cls"); system("clear"); if(endgame == 1) { break; } } } else { if(endgame != 1) { //system("cls"); system("clear"); cout << "ERROR: Corrupted File\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); } } if(endgame == 1) { return EXIT_SUCCESS; } } void room30() { //system("cls"); system("clear"); char nav; cout << "You get there in time and you see the mysterious man get brutally shot to death,\nyou enter and you are also shot to death.\n"; cout << "\n"; cout << "Your courageous story is heard through out all the land.\nYou inspire millions to join the revolution,\nand they eventually...\n\n"; savegame(); //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); //system("cls"); system("clear"); the_end(); } void room29() { //system("cls"); system("clear"); char nav; cout << "Room 3121 is just up ahead, you run as fast as you can for the door.\nDawn is in 3 minutes.\n"; cout << "What do you do?\n\n"; cout << "1. Keep running as fast as you can\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { location = 30; } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room29(); } } void room28() { //system("cls"); system("clear"); char nav; cout << "You enter the room with your flashlight, and there are wooden stakes everywhere.\nYou navigate around them and you get to a large map.\nRoom 3121 is just ahead!\n"; cout << "You leave the room and 3 Dregon brothers walk in. you ask yourself\n\"what the hell?\", and the developers say \"Because we can!!!\"\n"; cout << "What do you do?\n\n"; cout << "1. Flee\n"; cout << "2. Fight them\n"; cout << "3. Remind them of the dog\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { death(12); } if(nav == '2') { battle(2, 3, 0); if(died == 1) { death(1); startmenu(); } else { location = 29; } } if(nav == '3') { death(15); } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room28(); } } void room27() { //system("cls"); system("clear"); char nav; cout << "You go back to the really colorful room,\nyou still wonder who was the architecture of this building...\n"; cout << "You are now presented with 2 options.\nWhat do you do?\n\n"; cout << "1. Go through the rainbow door\n"; cout << "2. Go through the tie-dye door\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { location = 28; } if(nav == '2') { location = 26; } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room27(); } } void room26() { //system("cls"); system("clear"); char nav; cout << "You go through the tie-dye door, and Dregon's half-brother enters the room.\n"; cout << "He says \"I always hated that dog, and I was this\nclose to rallying my brothers and\ntake over Decon corporation, and you ruined it!!!\"\n\n\"I'm going to kill you!!!\"\n"; cout << "You have no choice but to fight him.\nWhat do you do?\n\n"; cout << "1. Fight him\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { battle(3,1,0); if(died == 1) { death(1); startmenu(); } else { location = 27; //system("cls"); system("clear"); cout << "You got a flashlight.\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); system("clear"); cout << "You found 10 ammo!\n\n"; //system("pause"); ammo = ammo + 10; cout << "Press Return Key to Continue..."; cin.get(); system("clear"); cout << "You found a health pack!\n\n"; //system("pause"); inventory[0]++; cout << "Press Return Key to Continue..."; cin.get(); } } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room26(); } } void room25() { //system("cls"); system("clear"); char nav; cout << "You go through the rainbow door,\nbut it is too dark to see anything.\n"; cout << "What do you do?\n\n"; cout << "1. go back\n"; cout << "2. keep on going\n"; cout << "3. take a nap\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { location = 24; } if(nav == '2') { death(13); } if(nav == '3') { death(14); } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room25(); } } void room24() { //system("cls"); system("clear"); char nav; cout << "You get the keycard, and you now enter a really colorful room.\nYou wonder who did the architecture of this building...\n"; cout << "You are now presented with 2 options.\nWhat do you do?\n\n"; cout << "1. Go through the magical rainbow door\n"; cout << "2. Go through the groovy tie-dye door\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { location =25; } if(nav == '2') { location = 26; } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room24(); } } void room23() { //system("cls"); system("clear"); char nav; cout << "You enter the room and you see a super health\npack to your left, you feel happy at your fortunes.\n"; cout << "You have no choice but to go back .\n"; cout << "1. Go back\n"; cout << "2. Take the pack and go back\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { location = 19; } if(nav == '2') { if(room23healthpackfix == 0) { inventory[1]++; //system("cls"); system("clear"); cout << "Super Health Pack Acquired!\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); location = 19; ; room23healthpackfix = 1; } else { //system("cls"); system("clear"); cout << "Nah, I think I'll leave it there.\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); location = 19; } } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room23(); } } void room22() { //system("cls"); system("clear"); char nav; cout << "You try to go through this door but it requires a keycard.\nIt is obvious to you that this is the way to go .\n"; cout << "You have no choice but to go back.\nWhat do you do?\n\n"; cout << "1. Go back\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { location = 19; } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room22(); } } void room21() { //system("cls"); system("clear"); char nav; cout << "You go through the door that is old, a man who looks\nsimilar to Dregon enters and pulls out a gun and says\n\"you killed my brother!\"\n"; cout << "You explain to him what happened,\nand he is at first confused, and then he begins to\ncry moaning about some dog, and he hands you a keycard.\n"; cout << "He tells you to go through the new door.\n"; cout << "What do you do?\n\n"; cout << "1. Go back\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { location = 19; cardkeyfix = 1; } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room21(); } } void room20() { //system("cls"); system("clear"); char nav; cout << "You lick Dregon and you remind him of a dog he once had who was killed in the\ngreat massacre, Dregon realizes that he has been working for the wrong side.\n"; cout << "Dregon realizes that he took an oath to avenge his dog and now instead he is\nhelping those people who killed his dog, and in his feeling of uselessness\nand commits suicide.\n\n"; cout << "You now enter a room, it says that room 3121 is a few junctions ahead but once\nagain the map suspiciously doesn't let you know witch way is right.\n"; cout << "Your are presented with three doors, you think to yourself how annoying\nthis is getting.\n"; cout << "What do you do?\n\n"; cout << "1. door number 1, looks old\n"; cout << "2. door number 2, looks new\n"; cout << "3. door number 3, looks a few years old\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { location= 21; //Dregon's brother } if(nav == '2') { if(cardkeyfix == 1) { location = 24; // the way,locked, 24 same door unlocked } else { location = 22; } } if(nav == '3') { location= 23; // health } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room20(); } } void room19() { //system("cls"); system("clear"); char nav; cout << "You now enter the room, it says that room 3121 is a\nfew junctions ahead but once again, the map suspiciously\ndoesn't let you know which way is right.\n"; cout << "Your are presented with three doors, you think to\nyourself how annoying this is getting.\n"; cout << "What do you do?\n\n"; cout << "1. Door number 1, looks old\n"; cout << "2. Door number 2, looks new\n"; cout << "3. Door number 3, looks a few years old\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { location= 21; //Dregon's brother } if(nav == '2') { if(cardkeyfix == 0) { location = 22; } else { location = 24; // the way,locked, 24 same door unlocked } } if(nav == '3') { location= 23; // health } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room19(); } } void room18() { //system("cls"); system("clear"); char nav; cout << "You enter the third wing and a commander approaches you.\nHe addresses himself as Dregon.\nHe challenges you to a fight.\nWhat do you do?\n\n"; cout << "1. Fight him\n"; cout << "2. Run away\n"; cout << "3. Lick him\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3' || nav == 'x' || nav == 'X') { if(nav == '1') { battle(2,1,0); if(died == 1) { death(1); startmenu(); } else { location = 19; } } if(nav == '2') { death(12); } if(nav == '3') { location = 20; } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room18(); } } void room17() { //system("cls"); system("clear"); char nav; cout << "You enter the mech room and you are intimidated by the scale of the mechs.\n"; cout << "The doors lock.\nYou see a large button that activates the mechs.\nWhat do you do?\n\n"; cout << "1. push the button.\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == 'x' || nav == 'X') { if(nav == '1') { battle(3,1,0); if(died == 1) { death(1); startmenu(); } else { //system("cls"); system("clear"); cout << "Super Health Pack Acquired!\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); //system("cls"); system("clear"); cout << "10 ammo Acquired!\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); inventory[1]++; ammo = ammo + 10; location = 16; } } if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room17(); } } void room16() { //system("cls"); system("clear"); char nav; cout << "You leave the room and enter another room\n"; cout << "There is sign that shows where the rooms are\n"; cout << "but the location of room 3121 has been suspiciously removed.\n"; cout << "The room has three doors you know.\nWhat to do?\n\n"; cout << "1. door number 1: the mech room\n"; cout << "2. door number 2: the cafeteria\n"; cout << "3. door number 3: path to the third wing\n"; cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { location = 17;//battle } if(nav == '2') { death(16); } if(nav == '3') { location = 18;//the way } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room16(); } } void room15() { //system("cls"); system("clear"); char nav; cout << "You enter the room and a mysterious man is cutting through the ventilation shaft.\nyou put your knife against his throat and he\nintently grabs it and throws it to the ground.\n"; cout << "He asks you who you are, and you fail to respond. The man then says\n\"I don't have much time but I will tell you the truth\".\n"; cout << "\"In the year 2065 corporations took over the government\nand became the central government. The corporations waged war\non each other, eliminating the strongest corporations of the time.\n"; cout << "The corporations found it necessary to eliminate the poor working class,\nand keep their rich investors alive.\"\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); //system("cls"); system("clear"); cout << "\"Then they took all the people on the streets and started\nforcing them to work in specific areas.\n"; cout << "The people began to revolt against this evil, and the corporations ordered\nthe death of all of them. There has been no\nmassacre bigger then what the corporations had done.\n"; cout << "Then a man named Dr. Zhgivan Fredan created a memory erasing machine for\npeople who carried bad memories,\nas a part of a cure for PTSD. The government instantly\nseized the device and used it on their workers so\nthey could work without any complaint.\n"; cout << "And that is why all the workers in this building are all emotionless,\nbut Fredan's son created a method to stall the machine so the\neffects are not as severe. You and 23 others in this\nroom are the results of Fredan's son's method,\nso I came to get those people out of here.\"\n\n"; cout << "\"I have to leave now, but meet me in the room 3121 at dawn.\"\n"; cout << "\n"; cout << "You are confused about what has\njust happened but you know you must trust him,\ndawn is in three hours and room 3121 is two full wings ahead,\nso you decide to go there right away.\n\n"; cout << "1. Procede to room 3121\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { location = 16; } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room15(); } } void room14() { //system("cls"); system("clear"); char nav; cout << "You enter the room and you see a giant sign:\n"; cout << "______ _ _ ___ ___ \n"; cout << "| ___ \\ | | (_) / _ \\ |__ \\ \n"; cout << "| |_/ / __ _| |__ _ ___ ___ / /_\\ \\_ __ _ _ ___ _ __ ___ ) |\n"; cout << "| ___ \\/ _` | '_ \\| |/ _ \\/ __| | _ | '_ \\| | | |/ _ \\| '_ \\ / _ \\/ / \n"; cout << "| |_/ / (_| | |_) | | __/\\__ \\ | | | | | | | |_| | (_) | | | | __/_| \n"; cout << "\\____/ \\__,_|_.__/|_|\\___||___/ \\_| |_/_| |_|\\__, |\\___/|_| |_|\\___(_) \n"; cout << " __/ | \n"; cout << " |___/ \n\n"; cout << "You are confused by this and you think the person\nwho wrote the sign must be someone with a smelly pillow.\n"; cout << "1. Go to the bathroom\n"; cout << "2. Go back\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { death(11); } if(nav == '2') { location = 12; } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room14(); } } void room13() { //system("cls"); system("clear"); char nav; cout << "You enter a room and you see a health pack on the table.\nwhat do you do?\n\n"; cout << "1. take the health pack and go back\n"; cout << "2. just go back\n"; cout << "3. start head banging\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { if(gotitallreadyroom13 == 1) { //system("cls"); system("clear"); cout << "Nah, I think I'll leave it there.\n\n"; location = 12; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); } else { location = 12; inventory[0]++; //system("cls"); system("clear"); cout << "Health Pack Acquired\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); gotitallreadyroom13 = 1; } } if(nav == '2') { location = 12; } if(nav == '3') { death(10); } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room13(); } } void room12() { //system("cls"); system("clear"); char nav; cout << "You enter the room and you see three new doors.\nWhat do you do?\n\n"; cout << "1. Go through door 1\n"; cout << "2. Go through door 2\n"; cout << "3. Go through door 3\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { location = 13; } if(nav == '2') { location = 14; } if(nav == '3') { location = 15; } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room12(); } } void room11() { //system("cls"); system("clear"); char nav; cout << "As soon as you enter the room, there are two guards that spot you.\n"; cout << "What do you do?\n\n"; cout << "1. Fight the guards, then run\n"; cout << "2. Run away\n"; cout << "3. Challenge the guards to a dance off.\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { battle(1, 2, 0); if(died == 1) { death(1); startmenu(); } else { //system("cls"); system("clear"); cout << "you found 5 ammo!\n\n"; ammo = ammo + 5; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); location= 10; } } if(nav == '2') { location= 10; } if(nav == '3') { death(9); } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room11(); } } void room10() { //system("cls"); system("clear"); char nav; cout << "You use the keycard, and you enter a room with two doors.\nYou see many busy workers. You are confused why all of them\nwork at the same pace, even though it is clear that gunshots have been fired.\n"; cout << "You hear the guards approaching but you are surprisingly calm,\ndue to the knowledge that the guards are extremely slow.\n"; cout << "What do you do?\n\n"; cout << "1. go through door number 1\n"; cout << "2. go through door number 2\n"; cout << "3. go back\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if (nav == '1' || nav == '2' || nav == '3' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '3') { location = 9; } if(nav == '1') { location= 11; } if(nav == '2') { location = 12; } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room10(); } } void room9() { //system("cls"); system("clear"); char nav; cout << "You go back into the room. On the floor lay the bludgeoned worker,\nand the dead guard. You still hear the footsteps.\nYou wonder what could be taking them so long.\n"; cout << "Still, you must think fast or you will be shot.\nThere is a door to your left, right, and in front of you.\nWhat do you do?\n\n"; cout << "1. go to the left\n"; cout << "2. go to the right\n"; cout << "3. go forward\n"; //if there is only 2 choices take out the third if statement cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3'|| nav == 'x' || nav == 'X') { if(nav == '1') { location = 5; } if(nav == '2') { location = 6; } if(nav == '3') { location= 10; } if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room9(); } } void room8() { //system("cls"); system("clear"); char nav; cout << "You go back into the room and the dead guard is untouched.\nYou still hear the footsteps and you wonder whats taking them so long.\n"; cout << "You still must think fast or you will be shot, there is a door to your left, right, and in front of you.\nWhat do you do?\n\n"; cout << "1. go to the left\n"; cout << "2. go to the right\n"; cout << "3. go forward\n"; //if there is only 2 choices take out the third if statement cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3'|| nav == 'x' || nav == 'X') { if(nav == '1') { location= 5; } if(nav == '2') { location= 6; } if(nav == '3') { location= 7; } if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room8(); } } void room7() { //system("cls"); system("clear"); char nav; cout << "You try to open the door but it requires a key card.\nYou have no choice but to go back.\n"; cout << "1. Go back\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { location = 8; } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room7(); } } void room6() { //system("cls"); system("clear"); char nav; cout << "You enter a room with many supplies. You see an attachment in the corner\nthat looks like it should be attached to your gun.\n\n"; cout << "What do you do?\n\n"; cout << "1. Take the piece of metal and go back\n"; cout << "2. Just go back\n"; cout << "3. Do the chicken dance\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this {//location = 10 if(nav == '1') { if(gotgunupgradeallready == 0) { if(cardkeyfix2 == 0) { location = 8; } else { location = 9; } //system("cls"); system("clear"); cout << "Gun upgrade acquired\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); inventory[2] = 1; gotgunupgradeallready = 1; } else { if(cardkeyfix2 == 0) { location = 8; } else { location = 10; } //system("cls"); system("clear"); cout << "Nah, I think I'll just leave it there.\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); } } if(nav == '2') { location = 8; } if(nav == '3') { death(8); } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room6(); } } void room5() { //system("cls"); system("clear"); char nav; cout << "There is a guard in the room. You hope he doesn't spot you, but he does.\nYou see that he has a card key contained in his ID badge.\nYou can't go any further unless you get the card key.\nWhat do you do?\n\n"; cout << "1. Fight him\n"; cout << "2. Run back to the other room\n"; cout << "3. Beg for mercy, you little girl\n"; //if there is only 2 choices take out the third if statement cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3'|| nav == 'x' || nav == 'X') { if(nav == '1') { battle(1, 1, 0); if(died == 1) { death(1); startmenu(); } else { //system("cls"); system("clear"); cout << "you found 5 ammo!\n\n"; ammo = ammo + 5; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); location = 9; cardkeyfix2 = 1; } } if(nav == '2') { death(5); } if(nav == '3') { death(7); } if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room5(); } } void room4() { //system("cls"); system("clear"); char nav; cout << "The Guard lays there bleeding to death. You hear footsteps approaching.\n"; cout << "You must think fast or you will be shot. There is a door to your left,\nyour right, and in front of you.\nWhat do you do?\n\n"; cout << "1. go to the left\n"; cout << "2. go to the right\n"; cout << "3. go forward\n"; //if there is only 2 choices take out the third if statement cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3'|| nav == 'x' || nav == 'X') { if(nav == '1') { location= 5; } if(nav == '2') { location= 6; } if(nav == '3') { location= 7; } if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room4(); } } void room3() { //system("cls"); system("clear"); char nav; cout << "You enter the room and you see a worker's bludgeoned body on the ground.\nThe guard hasn't spotted you yet.\nWhat do you do?\n\n"; cout << "1. Run Away\n"; cout << "2. Stab the guard\n"; cout << "3. Challenge him to a game of tic-tac-toe\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { death(5); } if(nav == '2') { location = 4; } if(nav == '3') { death(6); } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } } void room2() { //system("cls"); system("clear"); char nav; cout << "Although you are angered by the selfless act, you stay in line in fear of the\nsame outcome happening to you.\n"; cout << "You are also puzzled by the lack of reaction of the workers.\nWhat could be happening?\n"; cout << "\n"; cout << "Six days have passed, and the work at the power plant has been tough.\nYou seem inadequate because your\nfellow workers work the same shifts with better proficiency.\nJust as you are about to test one of the generators,\n"; cout << "you hear shouts from the other room.\nThere is a utility knife across the room.\nWhat do you do?\n\n"; cout << "1. Grab the utility knife and go\n"; cout << "2. Just go\n"; cout << "3. Remain there\n"; // ^^ if there are only 2 choices delete this cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3' || nav == 'x' || nav == 'X') // ^^ if there are only 2 choices delete this { if(nav == '1') { location = 3; } if(nav == '2') { death(2); } if(nav == '3') { death(3); } // ^^ if there are only 2 choices delete this if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room2(); } } void room1() { //system("cls"); system("clear"); char nav; cout << "You are a man with no memory of anything, as you ride on a lonely train car.\n"; cout << "\n"; cout << "As the railroad stops you wonder where you are.\n"; cout << "The men sitting in the train have blank looks on their faces and are silent.\n"; cout << "You all get out of the train in single file lines,\nThere are men around you who wield weapons.\n"; cout << "One of the men accidentally steps out of line and he is beaten.\n"; cout << "You feel a surge of anger.\nWhat do you do?\n\n"; cout << "1. Attack the guards\n"; cout << "2. Controll yourself and do nothing\n"; //if there is only 2 choices take out the third if statement cout << "X. Go to multitool\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3'|| nav == 'x' || nav == 'X') { if(nav == '1') { death(2); } if(nav == '2') { location = 2; } if (nav == 'x' || nav == 'X') { multitool(); } } else { //system("cls"); system("clear"); cout << "ERROR: that's not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); room1(); } } void startmenu() { char nav; //system("cls"); system("clear"); cout << " _ \n"; cout << " /' `\\ \n"; cout << " /' ) \n"; cout << " /' /'____ . . , , ,____ \n"; cout << " /' /'/' )| |/ / /' )\n"; cout << " /' /'/' /' | /| /' /' /' \n"; cout << "(,/' (___,/' (___,/(___|/' |/(__/' /(__ \n"; cout << " _ \n"; cout << " ' ) ) \n"; cout << " // /' \n"; cout << " /'/ /' ____ . , ____ ____ \n"; cout << " /' / /' /' )| / /' ) )' )\n"; cout << " /' //' /(___,/' | /' /(___,/' /' \n"; cout << "(,/' (_,(_________|/(__(________/' \n"; ; cout << " _ \n"; cout << " /' `\\ \n"; cout << " /' ._) \n"; cout << " /' ____ ,__________ ____ \n"; cout << " /' /' ) /' ) ) /' )\n"; cout << " /' /' /' /' /' /' /(___,/' \n"; cout << "(_____,/'(___,/(__/' /' /(__(________ \n\n"; cout << "+-------------Special--Edition-------------+\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); int success; do{ //system("cls"); system("clear"); cout << ".-----------.\n"; cout << "| Main Menu |\n"; cout << "`-----------'\n"; cout << "1. New Game\n"; cout << "2. Load Game\n"; cout << "3. Tutorial\n"; cout << "X. Exit\n"; cout << "\nMake a selection: "; cin >> nav; if (nav == '1' || nav == '2' || nav == '3' || nav == ';' || nav == 'x' || nav == 'X') { if(nav == '1') { int error = 0; do{ //system("cls"); system("clear"); cout << "Choose a game slot to use: (1-4) "; cin >> activegameslot; if(activegameslot != 1 && activegameslot != 2 && activegameslot != 3 && activegameslot != 4) { cout << "ERROR: that's not a valid slot"; error = 1; } //system("cls"); system("clear"); if (error == 1) { break; } cout << "Enter your name: "; cin.getline(name, 100); cin.getline(name, 100); //system("cls"); system("clear"); endgame = 0; location = 1; inventory[0] = 0; inventory[1] = 0; inventory[2] = 0; health = 100; savegame(); }while(error == 1); success = 1; } if(nav == '2') { int gameslot; int resetloadgame; do{ resetloadgame = 0; //system("cls"); system("clear"); cout << "Pick a slot: (1-4) "; char gameslotconvert[3]; cin.get(gameslotconvert[0]); cin.get(gameslotconvert[0]); gameslotconvert[1] = '\0'; gameslot = atoi(gameslotconvert); cout << "Loading...\n"; if(gameslot == 1 || gameslot == 2 || gameslot == 3 || gameslot == 4) { loadgame(gameslot); //system("cls"); system("clear"); cout << "Loaded.\n\n"; success = 1; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); //system("cls"); system("clear"); } else { //system("cls"); system("clear"); cout << "ERROR: not a valid game slot.\n\n"; resetloadgame = 1; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); } }while(resetloadgame == 1); } if(nav == '3') { tutorial(); success = 1; } if(nav == ';') { secretarea(); startmenu(); } if(nav == 'x' || nav == 'X') { endgame = 1; success = 1; } } else { system("clear"); cout << "ERROR: Invalid input\n\n"; cout << "Press return key to continue..."; cin.get(); cin.get(); success = 0; } }while(success == 0); } void multitool() { char nav; char confirmquit; char inventorynav; //system("cls"); system("clear"); cout << ".------------.\n"; cout << "| WTK |\n"; cout << "|------------|\n"; cout << "| Multi-tool |\n"; cout << "| Edition |\n"; cout << "`------------'\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); do{ //system("cls"); system("clear"); cout << ".-----------.\n"; cout << "| Main Menu |\n"; cout << "`-----------'\n"; cout << "1. Inventory\n"; cout << "2. System Status\n"; cout << "3. Save Game\n"; cout << "4. Change Name\n"; cout << "0. Turn off multitool\n"; cout << "X. Quit Game\n"; cin >> nav; if(nav == '1' || nav == '2' || nav == '3' || nav == '4' || nav == '5' || nav == '0' || nav == 'x' || nav == 'X') { if(nav == '1') { do{ //system("cls"); system("clear"); cout << "::Inventory::\n\n"; cout << "1. Health pack ("; cout << inventory[0] << ")\n"; cout << "2. Super health pack ("; cout << inventory[1] << ")\n"; cout << " Gun Upgrades (" << inventory[2] << ")\n"; cout << " Ammo ("; cout << ammo << ")\n"; cout << "X. Back\n"; cout << "\nUse which item? "; cin >> inventorynav; if(inventorynav == '1' || inventorynav == '2' || inventorynav == 'x' || inventorynav == 'X') { //system("cls"); system("clear"); if(inventorynav == '1') { if(inventory[0] > 0) { health_pack(); //system("cls"); system("clear"); cout << "HP restored!\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); } else { //system("cls"); system("clear"); cout << "ERROR: No health packs in inventory.\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); } } if(inventorynav == '2') { if(inventory[1] > 0) { super_health_pack(); //system("cls"); system("clear"); cout << "HP restored!\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); } else { //system("cls"); system("clear"); cout << "ERROR: No health packs in inventory.\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); } } } else { //system("cls"); system("clear"); cout << "ERROR: Bad input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); } }while(inventorynav != 'x' && inventorynav != 'X'); } if(nav == '2') { //system("cls"); system("clear"); cout << ".---------------.\n"; cout << "| System Status |\n"; cout << "`---------------'\n"; cout << "\n"; cout << "Health: " << health << "\n"; cout << "Room: " << location << "/" << roomammount << "\n"; cout << "Save Slot: " << activegameslot << "\n"; cout << "\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); //system("cls"); system("clear"); } if(nav == '3') { savegame(); //system("cls"); system("clear"); cout << "Saved.\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); } if(nav == '4') { //system("cls"); system("clear"); cout << "Current name is: " << name; cout << "\n\nEnter your new name: "; cin.getline(name, 100); //system("cls"); system("clear"); } if(nav == 'x' || nav == 'X') { //system("cls"); system("clear"); cout << "Are you sure? (y/n) "; cin.get(confirmquit); cin.get(confirmquit); if(confirmquit == 'y') { endgame = 1; nav = '0'; } } } }while(nav != '0'); return; } void savegame() { ofstream outfile; if(activegameslot == 1) { outfile.open(slot1filepath); } if(activegameslot == 2) { outfile.open(slot2filepath); } if(activegameslot == 3) { outfile.open(slot3filepath); } if(activegameslot == 4) { outfile.open(slot4filepath); } outfile << name << "\n" << inventory[0] << " " << inventory[1] << " " << inventory[2] << " " << health << " " << ammo << " " << location << " " << gotitallreadyroom13 << " " << gotgunupgradeallready << " " << room23healthpackfix << " " << cardkeyfix2 << " " << cardkeyfix; outfile.close(); return; } void loadgame(int slot) { ifstream infile; if(slot == 1) { infile.open(slot1filepath); activegameslot = 1; } if(slot == 2) { infile.open(slot2filepath); activegameslot = 2; } if(slot == 3) { infile.open(slot3filepath); activegameslot = 3; } if(slot == 4) { infile.open(slot4filepath); activegameslot = 4; } infile.getline(name, 100); infile >> inventory[0]; infile >> inventory[1]; infile >> inventory[2]; infile >> health; infile >> ammo; infile >> location; infile >> gotitallreadyroom13; infile >> gotgunupgradeallready; infile >> room23healthpackfix; infile >> cardkeyfix2; infile >> cardkeyfix; return; } void death(int type) { //system("cls"); system("clear"); cout << " _ \n"; cout << " /' `\ \n"; cout << " /' ) \n"; cout << " /' ____ ,__________ ____ \n"; cout << " /' _ /' ) /' ) ) /' )\n"; cout << " /' ' )/' /' /' /' /' /(___,/' \n"; cout << "(_____,/'(___,/(__/' /' /(__(________ \n"; cout << " \n"; cout << " _ \n"; cout << " /' `\ \n"; cout << " /' ) \n"; cout << " /' /'. , ____ ____ \n"; cout << " /' /' | / /' ) )' )\n"; cout << " /' /' | /' /(___,/' /' \n"; cout << "(_____,/' _|/(__(________/' \n"; if(type == 1) { cout << "You died in battle."; } if(type == 2) { cout << "A guard came and beat you to death."; } if(type == 3) { cout << "The system you were working on failed and\nyou were electrocuted."; } if(type == 4) { cout << "You went to the room and you were shot by the guard. "; } if(type == 5) { cout << "The guard sees you and just as you\ntry to escape, he shoots you."; } if(type == 6) { cout << "You play tic-tac-toe and you are\nboth shot because it was a tie."; } if(type == 7) { cout << "You get on your knees and you start begging.\nThe guard feels bad for you, so he makes you put on a\ndress and the two of you have a tea party,\nuntil you are both shot"; } if(type == 8) { cout << "You do the chicken dance and you are then\nkilled by the gods for your complete stupidity"; } if(type == 9) { cout << "The guards accept your challenge. You do the robot,\nand you do it so well it seems that you win, but the guard\nstarts spinning on his head and it is clear you lose.\nYou are then executed on the spot.\n"; } if(type == 10) { cout << "The hidden brain absest in your\nbrain ruptures causing your head to explode.\n"; } if(type == 11) { cout << "In the bathroom a strange person named\nMiles comes and stabs you for your clothes.\n"; } if(type == 12) { cout << "Dregon then pushes a button and you blow up in a glorious meat cloud.\n"; } if(type == 13) { cout << "You continue to go on but you trip and fall onto a wooden stake.\n"; } if(type == 14) { cout << "While taking a nap, you create a time paradox\nthat ruptures the universe, causing the time space continuum\nto shatter, so the therefore the gods stop you from ever being born.\n"; } if(type == 15) { cout << "In an angry rage because of the dog,\nthey all come and slice you to pieces,\nand told you were going to die.\n"; } if(type == 16) { cout << "You go through the door, and it takes you to an\nalternate universe because the programmers forgot\nto put the room in."; } cout<< "\n"; endgame = 0; location = 1; inventory[0] = 0; inventory[1] = 0; inventory[2] = 0; health = 100; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); startmenu(); } void battle(int enemy_type, int enemy_quantity, int able_to_escape) { //note you can only have three enemies. //1 is guard, 2 is commander, 3 is mech //if able_to_escape is 1, then you can escape. int enemy_health[3]; char action[2]; char youraction[2]; int youractionconvert; int turn_over = 0; int battle_esc = 0; if(enemy_type == 1) { enemy_health[0] = 15; enemy_health[1] = 15; enemy_health[2] = 15; } if(enemy_type == 2) { enemy_health[0] = 40; enemy_health[1] = 40; enemy_health[2] = 40; } if(enemy_type == 3) { enemy_health[0] = 70; enemy_health[1] = 70; enemy_health[2] = 70; } while(battle_esc == 0) { turn_over = 0; while(turn_over != 1) { //system("cls"); system("clear"); cout << "+---------------+\n"; cout << " " << name << "\n"; cout << "\n Health: " << health << "/" << 100 << "\n"; cout << " Ammo: " << ammo << "\n"; cout << "+---------------+\n\n"; cout << "+---------------+\n"; if(enemy_quantity >= 1) { if (enemy_type == 1) { cout << " Guard 1\n"; } if (enemy_type == 2) { cout << " Commander 1\n"; } if (enemy_type == 3) { cout << " Mech 1\n"; } cout << " " << enemy_health[0] << "/"; if (enemy_type == 1) { cout << "15"; } if (enemy_type == 2) { cout << "40"; } if (enemy_type == 3) { cout << "70"; } } if(enemy_quantity >= 2) { cout << "\n\n"; if (enemy_type == 1) { cout << " Guard 2\n"; } if (enemy_type == 2) { cout << " Commander 2\n"; } if (enemy_type == 3) { cout << " Mech 2\n"; } cout << " " << enemy_health[1] << "/"; if (enemy_type == 1) { cout << "15"; } if (enemy_type == 2) { cout << "40"; } if (enemy_type == 3) { cout << "70"; } } if(enemy_quantity == 3) { cout << "\n\n"; if (enemy_type == 1) { cout << " Guard 3\n"; } if (enemy_type == 2) { cout << " Commander 3\n"; } if (enemy_type == 3) { cout << " Mech 3\n"; } cout << " " << enemy_health[2] << "/"; if (enemy_type == 1) { cout << "15"; } if (enemy_type == 2) { cout << "40"; } if (enemy_type == 3) { cout << "70"; } } cout << "\n+---------------+\n"; //-------------------- cout << ".---------------------------.\n"; cout << "| Battle Menu |\n"; cout << "|---------------------------|\n"; cout << "| 1. Stab |\n"; cout << "| 2. Shoot |\n"; cout << "| 3. Use Health Pack |\n"; cout << "| 4. Use Super Health Pack |\n"; cout << "| 5. Run |\n"; cout << "`---------------------------'\n"; cout << " Action: "; cin.getline(action, 2); if(action[0]!= '\0') { if(action[0] == '1') { //system("cls"); system("clear"); cout << "+---------------+\n"; if(enemy_quantity >= 1) { if (enemy_type == 1) { cout << " Guard 1\n"; } if (enemy_type == 2) { cout << " Commander 1\n"; } if (enemy_type == 3) { cout << " Mech 1\n"; } cout << " " << enemy_health[0] << "/"; if (enemy_type == 1) { cout << "15"; } if (enemy_type == 2) { cout << "40"; } if (enemy_type == 3) { cout << "70"; } } if(enemy_quantity >= 2) { cout << "\n\n"; if (enemy_type == 1) { cout << " Guard 2\n"; } if (enemy_type == 2) { cout << " Commander 2\n"; } if (enemy_type == 3) { cout << " Mech 2\n"; } cout << " " << enemy_health[1] << "/"; if (enemy_type == 1) { cout << "15"; } if (enemy_type == 2) { cout << "40"; } if (enemy_type == 3) { cout << "70"; } } if(enemy_quantity == 3) { cout << "\n\n"; if (enemy_type == 1) { cout << " Guard 3\n"; } if (enemy_type == 2) { cout << " Commander 3\n"; } if (enemy_type == 3) { cout << " Mech 3\n"; } cout << " " << enemy_health[2] << "/"; if (enemy_type == 1) { cout << "15"; } if (enemy_type == 2) { cout << "40"; } if (enemy_type == 3) { cout << "70"; } } cout << "\n+---------------+\n"; cout << "Which enemy to stab? "; cin.getline(youraction, 2); if(youraction[0] != '\0') { youractionconvert = atoi(youraction); if(youractionconvert <= enemy_quantity) { youractionconvert--; if(enemy_health[youractionconvert] <= 0 && youractionconvert >= 0) { //system("cls"); system("clear"); cout << "ERROR: That enemy is out of health.\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); //system("cls"); system("clear"); turn_over = 0; } else { enemy_health[youractionconvert] = enemy_health[youractionconvert] - 5; cout << "You stab enemy! (-5 health)\n"; turn_over = 1; } } else { //system("cls"); system("clear"); cout << "ERROR: bad input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); //system("cls"); system("clear"); turn_over = 0; } } else { //system("cls"); system("clear"); cout << "ERROR: bad input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); //system("cls"); system("clear"); turn_over = 0; } } if(action[0] == '2') { //system("cls"); system("clear"); cout << "+---------------+\n"; if(enemy_quantity >= 1) { if (enemy_type == 1) { cout << " Guard 1\n"; } if (enemy_type == 2) { cout << " Commander 1\n"; } if (enemy_type == 3) { cout << " Mech 1\n"; } cout << " " << enemy_health[0] << "/"; if (enemy_type == 1) { cout << "15"; } if (enemy_type == 2) { cout << "40"; } if (enemy_type == 3) { cout << "70"; } } if(enemy_quantity >= 2) { cout << "\n\n"; if (enemy_type == 1) { cout << " Guard 2\n"; } if (enemy_type == 2) { cout << " Commander 2\n"; } if (enemy_type == 3) { cout << " Mech 2\n"; } cout << " " << enemy_health[1] << "/"; if (enemy_type == 1) { cout << "15"; } if (enemy_type == 2) { cout << "40"; } if (enemy_type == 3) { cout << "70"; } } if(enemy_quantity == 3) { cout << "\n\n"; if (enemy_type == 1) { cout << " Guard 3\n"; } if (enemy_type == 2) { cout << " Commander 3\n"; } if (enemy_type == 3) { cout << " Mech 3\n"; } cout << " " << enemy_health[2] << "/"; if (enemy_type == 1) { cout << "15"; } if (enemy_type == 2) { cout << "40"; } if (enemy_type == 3) { cout << "70"; } } cout << "\n+---------------+\n"; cout << "Which enemy to shoot? "; cin.getline(youraction, 2); if(youraction[0] != '\0') { youractionconvert = atoi(youraction); if(youractionconvert <= enemy_quantity && youractionconvert >= 0) { if(ammo > 0) { youractionconvert--; if(enemy_health[youractionconvert] <= 0) { //system("cls"); system("clear"); cout << "ERROR: That enemy is out of health.\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); //system("cls"); system("clear"); turn_over = 0; } else { //add weapon upgrades later if(inventory[2] > 0) { enemy_health[youractionconvert] = enemy_health[youractionconvert] - 20; ammo--; //system("cls"); system("clear"); cout << "You shoot at the enemy! (-20 health)\n"; turn_over = 1; } else { enemy_health[youractionconvert] = enemy_health[youractionconvert] - 10; ammo = ammo--; //system("cls"); system("clear"); cout << "You shoot at the enemy! (-10 health)\n"; turn_over = 1; } } } else { //system("cls"); system("clear"); cout << "ERROR: not enough ammo.\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); //system("cls"); system("clear"); turn_over = 0; } } else { //system("cls"); system("clear"); cout << "ERROR: bad input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); //system("cls"); system("clear"); turn_over = 0; } } else { //system("cls"); system("clear"); cout << "ERROR: bad input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); //system("cls"); system("clear"); turn_over = 0; } } if(action[0] == '3') { //system("cls"); system("clear"); if(inventory[0] > 0) { health_pack(); cout << "Health Restored!\n\n"; turn_over = 1; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); break; } else { cout << "ERROR: You don't have any in inventory\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); } } if(action[0] == '4') { //system("cls"); system("clear"); if(inventory[1] > 0) { super_health_pack(); cout << "Health Restored!\n\n"; turn_over = 1; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); } else { cout << "ERROR: You don't have any in inventory\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); } } if(action[0] == '5') { if(able_to_escape == 1) { //system("cls"); system("clear"); cout << "Got away safely!\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); //system("cls"); system("clear"); battle_esc = 1; break; } else { //system("cls"); system("clear"); cout << "Can't escape!!!\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); //system("cls"); system("clear"); turn_over = 1; } } } if(enemy_health[0] < 0) { enemy_health[0] = 0; } if(enemy_health[1] < 0) { enemy_health[1] = 0; } if(enemy_health[2] < 0) { enemy_health[2] = 0; } //check if everyone died if(enemy_quantity == 1) { if(enemy_health[0] == 0) { battle_esc = 1; break; } } if(enemy_quantity == 2) { if(enemy_health[0] == 0 && enemy_health[1] == 0) { battle_esc = 1; break; } } if(enemy_quantity == 3) { if(enemy_health[0] == 0 && enemy_health[1] == 0 && enemy_health[2] == 0) { battle_esc = 1; break; } } } //enemy action if(enemy_quantity >= 1) { if(enemy_health[0] != 0) { if(enemy_type == 1) { cout << "Guard 1 Attacks! (-5 health)\n"; health = health - 5; } if(enemy_type == 2) { cout << "Commander 1 Attacks! (-10 health)\n"; health = health - 10; } if(enemy_type == 3) { cout << "Mech 1 Attacks! (-15 health)\n"; health = health - 15; } } else { if(enemy_type == 1) { cout << "Guard 1 is dead and can't attack!\n"; } if(enemy_type == 2) { cout << "Commander 1 is dead and can't attack!\n"; } if(enemy_type == 3) { cout << "Mech 1 is broken and can't attack!\n"; } } } if(enemy_quantity >= 2) { if(enemy_health[1] != 0) { if(enemy_type == 1) { cout << "Guard 2 Attacks! (-5 health)\n"; health = health - 5; } if(enemy_type == 2) { cout << "Commander 2 Attacks! (-10 health)\n"; health = health - 10; } if(enemy_type == 3) { cout << "Mech 2 Attacks! (-15 health)\n"; health = health - 15; } } else { if(enemy_type == 1) { cout << "Guard 2 is dead and can't attack!\n"; } if(enemy_type == 2) { cout << "Commander 2 is dead and can't attack!\n"; } if(enemy_type == 3) { cout << "Mech 2 is broken and can't attack!\n"; } } } if(enemy_quantity == 3) { if(enemy_health[2] != 0) { if(enemy_type == 1) { cout << "Guard 3 Attacks! (-5 health)\n"; health = health - 5; } if(enemy_type == 2) { cout << "Commander 3 Attacks! (-10 health)\n"; health = health - 10; } if(enemy_type == 3) { cout << "Mech 3 Attacks! (-15 health)\n"; health = health - 15; } } else { if(enemy_type == 1) { cout << "Guard 3 is dead and can't attack!\n"; } if(enemy_type == 2) { cout << "Commander 3 is dead and can't attack!\n"; } if(enemy_type == 3) { cout << "Mech 3 is broken and can't attack!\n"; } } } cout << "\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); //system("cls"); system("clear"); //check for death if(health <= 0) { died = 1; battle_esc = 1; break; } } if(died != 1) { //system("cls"); system("clear"); cout << "You defeated the enemy!\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); //system("cls"); system("clear"); } return; } void health_pack() { health = health + 20; if(health > 100) { health = 100; } inventory[0]--; } void super_health_pack() { health = health + 50; if(health > 100) { health = 100; } inventory[1]--; } void the_end() { cout << " __ _ \n"; cout << " ( ~-_ /' /' /' `\ /'\n"; cout << " /`-__)/' /' ._) /' \n"; cout << " /' /'__ ____ (___ ,____ _____,/' \n"; cout << " /' /' ) /' ) _-~ `/' ) /' /' \n"; cout << " /' /' /' /(___,/' /' /' /' /' /' \n"; cout << "(,/(_, /' /(__(________ (_____,/' /(__(___,/(__ \n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); //system("cls"); system("clear"); cout << " _ \n"; cout << "/ ._ _ _|o_|_ _ \n"; cout << "\\_| (/_(_|| |_ _> \n\n"; cout << "Battle Engine.................. B.J.\n"; cout << "Multitool System............... B.J.\n"; cout << "Item use programming........... B.J.\n"; cout << "Tutorial....................... B.J.\n"; cout << "Splicing/Finalizing............ B.J.\n\n"; cout << "Written Story.................. Jason\n"; cout << "Story Programming.............. Jason\n\n"; cout << "Tester/Awesome Asian........... Ryan T.\n\n"; cout << "Distribution by Psych Designs\nhttp://www.psychdesigns.net/\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); //system("cls"); system("clear"); startmenu(); return; } void tutorial() { //system("cls"); system("clear"); cout << "___ \n"; cout << " | _|_ _ ._ o _.|\n"; cout << " ||_| |_(_)| |(_||\n\n"; cout << "Welcome to the Dawn Never Came tutorial system!\nTo navigate through the pages, press any key.\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); //system("cls"); system("clear"); cout << "___ \n"; cout << " | _|_ _ ._ o _.|\n"; cout << " ||_| |_(_)| |(_||\n\n"; cout << "The game uses a multiple choice system.\nJust input the character on the list, like this:\n\n"; cout << "You are holding a stick of gum. What do you do?\n\n"; cout << "1. Eat the gum\n"; cout << "2. Put it in your pocket\n"; cout << "3. Throw it away\n"; cout << "X. Go to multitool\n"; cout << "1\n\n"; cout << "since I put in a '1', I ate the gum. but what is X? I'll tell you now.\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); //system("cls"); system("clear"); cout << "___ \n"; cout << " | _|_ _ ._ o _.|\n"; cout << " ||_| |_(_)| |(_||\n\n"; cout << "The multitool is like the pause menu in the game.\nIt will let you use items, tell you your health and location,\nand some other stuff.\n"; cout << "I will let you fool around with the multitool now.\nDON'T SAVE or it will corrupt your file.\nTurn it off to continue the tutorial.\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); health = 30; location = 1; inventory[0] = 1; inventory[1] = 1; inventory[2] = 0; multitool(); //system("cls"); system("clear"); cout << "___ \n"; cout << " | _|_ _ ._ o _.|\n"; cout << " ||_| |_(_)| |(_||\n\n"; cout << "Now let's cover the battle system.\n"; cout << "The battle system is pretty simple when it comes to menus.\nThe sophisticated part is gun upgrades.\n"; cout << "Health packs restore 20 HP. Super Health packs restore 50.\n"; cout << "Gun upgrades vary. You will get them later in the game.\n Most will increase damage.\nI'll let you try out the battle system now.\nYou're going to have to win to move on,\nbut it's pretty easy. Run if you have to.\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); //system("cls"); system("clear"); health = 100; ammo = 5; name[0] = 'B'; name[1] = 'o'; name[2] = 'b'; name[3] = '\0'; battle(1, 2, 1); //system("cls"); system("clear"); cout << "___ \n"; cout << " | _|_ _ ._ o _.|\n"; cout << " ||_| |_(_)| |(_||\n\n"; cout << "That pretty much covers it, have fun\nplaying Dawn Never Came!\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); //system("cls"); system("clear"); startmenu(); return; } void secretarea() { //system("cls"); system("clear"); char nav= '0'; while(nav != 'x' && nav != 'X') { cout << ".--------------.\n"; cout << "| DNC Museum |\n"; cout << "`--------------'\n\n"; cout << "1. Save File Editor\n"; cout << "2. Room Commentary\n"; cout << "3. Background Info\n"; cout << "4. About the Developers\n"; cout << "5. Wanna know a secret?\n"; cout << "X. Back to Start Menu\n\n"; cout << "Enter your Choice: "; cin >> nav; if(nav == '1' || nav == '2' || nav == '3' || nav == '4' || nav == '5' || nav == 'x' || nav == 'X') { if(nav == '1') { //system("cls"); system("clear"); cout << "!!! NOTE: This is a FRAGILE part of the program.\nPLEASE only enter NUMBERS unless you want the\ngame to crash!!!\n\n"; cout << "Enter your slot: "; cin >> activegameslot; cout << "\nEnter your name: "; cin.getline(name, 100); cin.getline(name, 100); cout << "\nEnter desired room #: "; cin >> location; cout << "\nEnter desired health: "; cin >> health; cout << "\nEnter desired ammount of ammo: "; cin >> ammo; cout << "\nEnter desired ammount of health packs: "; cin >> inventory[0]; cout << "\nEnter desired ammount of super health packs: "; cin >> inventory[1]; cout << "\nDo you want a gun upgrade? (1=y / 0=n)"; cin >> inventory[2]; cout << "\n\nsaving..."; savegame(); cout << "\n\nsaved."; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); //system("cls"); system("clear"); } if(nav == '2') { //system("cls"); system("clear"); int room; cout << "Enter a room number: "; cin >> room; cout << "\n\n"; if(room >= 1 && room <= 30) { if(room == 1) { cout << "Ah, room 1. The first one in the game. I really don't like the line there,\nbut Jason made me leave it in there...\n\nAction: 2"; } if(room == 2) { cout << "I hate that stupid line. Anyway, this is where everything unwraps.\n\nAction: 1"; } if(room == 3) { cout << "Oh gosh, none of us knew what bludgeoned meant. or how to spell it..."; } if(room == 4) { cout << "heh, in this room you never see what's causing the footsteps.\n\nAction: 1, then 2, then 3."; } if(room == 5) { cout << "Yeah, this is when Jason kind of went crazy out of frustration.\n\nAction: 1"; } if(room == 6) { cout << "OK, this is where you find the first gun upgrade. w00t w00t.\n\nAction: 1 or 2 (you are going to have a hard time unless you have this in the final battle.)"; } if(room == 7) { cout << "yeah, you need the card key./n/nAction: 1"; } if(room == 8) { cout << "this is a copy of room 4 for when you return to the room."; } if(room == 9) { cout << "this is a clone of the other room for after you beat the guard."; } if(room == 10) { cout << "This is for when you get the keycard."; } if(room == 11) { cout << "You have to fight the guards.\n\nAction: 1"; } if(room == 12) { cout << "yup, vagueness. None of them really lead to death,\n1 gets you a health pack, 2 gets you to an Easter egg, 3 is the right way to go.\n\nAction: 1, then 3"; } if(room == 13) { cout << "Get that health pack! We had to make a fix so that you can't just keep going\ninto the room. if you save and open it up again, you can get it though,\nthat variable isn't saved. I didn't feel like fixing that,\nso I just put it in as a cheat. Same thing with all the other health pack rooms.\nLater on this was fixed.\n\nAction: 1"; } if(room == 14) { cout << "This is the Easter egg room. You'd only really get it if you were in my hall.\n"; cout << "I'll explain. There was a kid in our dorm who acted like a\njerk. He kept saying he was rich. He had a bad smelling pillow and in\nthe game\"Apples to Apples\" he said babies were hot.\nThen Jason made the phrase \"Babies Anyone?\"\nWhen you go into the bathroom you get killed by miles.\nHe was supposed to come and live in our hall, but he\nnever showed up, so that's our little memorial to him\n\nAction: 1"; } if(room == 15) { cout << "Yeah, this room was so big we had to put a pause in the middle.\n\nAction: 1"; } if(room == 16) { cout << "The mech room gives you a mech battle, the cafeteria gives you a health pack,\nand the '3' wing is the way to go.\n\nAction: 2, then 3"; } if(room == 17) { cout << "Get ready for the only mech battle in the game!\nWe added in some items later on since it was tough to win if you did that battle.\n\nAction: 1"; } if(room == 18) { cout << "Yet another strange joke Jason made.\nIf you lick him, you don't have to fight him.\n\nAction: 3 or 1"; } if(room == 19) { cout << "Vagueness at it's finest. Door 3 gives you health,\ndoor 1 gets the card key, then you can go through door 2.\n\nAction: 3, then 1, then 2"; } if(room == 20) { cout << "So you licked him, huh? surprised you didn't die?\nDoor 3 gives you health, door 1 gets the card key\nthen you can go through door 2.\n\nAction: 3, then 1, then 2"; } if(room == 21) { cout << "Yeah, I didn't get this either.\n\nAction: 1"; } if(room == 22) { cout << "You need a card key. Yay.\n\nActon: 1"; } if(room == 23) { cout << "Take the health pack, or you're just plain stupid.\nWe're not smart enough to boobytrap one.\n\nAction:1 or 2"; } if(room == 24) { cout << "Yeah, what's a colorfull room doing in a power plant of the future?\n\nAction:2, then 1"; } if(room == 25) { cout << "It's too dark to see. Wait, is that Michael Jackson?\nNo. it's just a guard...\n\nAction: 1"; } if(room == 26) { cout << "Heh, get it? Half brother? Half mech?\n\nAction: 1"; } if(room == 27) { cout << "Now try going through the rainbow door.\n\nAction: 1"; } if(room == 28) { cout << "I think that the Dregon brothers are afraid of vampires.\nDregon's parents must have had a hell of a lot of babies...\n\nAction: 2"; } if(room == 29) { cout << "Wait, aren't you allready running as fast as you can?\n\nAction: 1"; } if(room == 30) { cout << "I still don't get why you are killed in the end..."; } } else { //system("cls"); system("clear"); cout << "ERROR: not a valid room number\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); //system("cls"); system("clear"); } cout << "\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); //system("cls"); system("clear"); } if(nav == '3') { //system("cls"); system("clear"); cout << "Dawn Never Came was a final project developed during the CTY-JHU program.\n"; cout << "Our intentions were for it to be a serious game, but over time the story writer\n"; cout << "just lost it and the story just fell apart. This edition of the game cleaned up\n"; cout << "everything. B.J. ported the game to linux and mac, cleaned up the spelling/grammar,\n"; cout << "and made the DNC Museum. We figured that we would kind of copy the ratchet and clank\n"; cout << "series' museum.\n\nWe were all laughing at the fact that we could just change the save file\n"; cout << "so easily and cheat. So, we decided to make it a feature in this edition.\n\n"; cout << "If you're wondering what WTK is, it was kind of B.J.'s joke, WTK is his suite of\n"; cout << "\"Text Based Tools\" as he calls it. So, we made a multitool edition of it...\n\n"; cout << "Lastly, you have to be wondering why you get shot in the end. Well, we couldn't really\n"; cout << "finish our entire story, so in the end you get shot.\n\nIf we make a DNC 2, it will be about\n"; cout << "how you (a different person) join a faction and\ntry to overthrow the government, and re-establish the real\n"; cout << "government. Also, we would add levels on to the battle engine, and make an entire\n"; cout << "city you have to navigate through, and during missions, it would be a dungeon-style\n"; cout << "setup, where you have to complete objectives.\nif you want this to happen, e-mail me at bj@psychdesigns.net with the subject \"DNC 2\".\n\nEnjoy Dawn Never Came!\n"; cout << "\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); //system("cls"); system("clear"); } if(nav == '4') { //system("cls"); system("clear"); cout << "B.J.:\n\n"; cout << "B.J. owns Psych Designs, does lots of computer-oriented stuff,\nand enjoys being with friends and making games.\nSometimes he works on a mobile computer project with a friend.\n\n"; cout << "Jason:\n\n"; cout << "Jason, AKA \"The Angry Sony Fanboy\" enjoys gaming, going on gamespot, and ranting.\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); //system("cls"); system("clear"); } if(nav == '5') { char password[100]; char realpassword[] = "megatokyo"; cout << "Please enter password: "; cin.getline(password, 100); cin.getline(password, 100); if(password[0] == realpassword[0] && password[1] == realpassword[1] && password[2] == realpassword[2] && password[3] == realpassword[3] && password[4] == realpassword[4] && password[5] == realpassword[5] && password[6] == realpassword[6] && password[7] == realpassword[7] && password[8] == realpassword[8] && password[9] == realpassword[9]) { //system("cls"); system("clear"); cout << "Did you know that there was a kid on our team who did nothing?\nHis name was Christian Teles. He lived in Brazil and he was a jackass.\n\n"; //system("pause"); cout << "Press return to continue..."; cin.get(); //system("cls"); system("clear"); } else { //system("cls"); system("clear"); cout << "ERROR: That's not right.\n\n"; //system("pause"); cout << "Press return to continue..."; cin.get(); //system("cls"); system("clear"); } } } else { if(nav != '0') { //system("cls"); system("clear"); cout << "ERROR: not a valid input\n\n"; //system("pause"); cout << "Press Return Key to Continue..."; cin.get(); cin.get(); //system("cls"); system("clear"); } } } }