1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
|
#include <iostream>
using namespace std;
int page = 0; //Page Choices
int choice = 0;
int leftDoor (); //Page function decleration
int rightDoor ();
int pickDoor ();
int divePast ();
int stayStill ();
int spaceSwitch ();
int stepBalcony ();
int openBox ();
int theRoom ();
int wakeUp ();
int floorFall ();
int originalRoom ();
int main () { // Main Function //
cout << "========================The Journey========================\n\n\n";
cout << "You strain your eyes against the flood of light.\n";
cout << "Your legs are weak and your memory hazy.\n\n";
cout << "'How did I get here?' you say.\n";
cout << "You notice a small key hanging form the center of the room.\n";
cout << "Attached is a note...it reads:\n\n";
cout << " Greetings Traveler! Your Journey Begins Here. Choose Left Or Right!\n\n";
cout << "The room has two doors, one labeled 'Left' and one 'Right'.\n";
cout << "Which door would you like to go through?\n\n";
cout << "\nPick Page 2 for the left door.\n";
cout << "Pick Page 3 for the right door.\n\n";
pickDoor();
cout << "\n\n========================The End!=============================\n";
cout << "test\n";
return 0;
}
// Start page functions //
int pickDoor() {
cout << "Which page would you like?\n";
cin >> page;
if ( page == 2) {
leftDoor(); }
else if (page == 3) {
rightDoor(); }
}
int leftDoor() {
cout << "\n\nThe handle turns slightly and instantly you are pushed inside.\n";
cout << "The door slams behind you, and you notice a small light from the ceiling.\n";
cout << "As your eyes adjust to the darkness again, you notice a small figure.\n";
cout << "The figure approaches and reaches toward you.\n\n";
cout << "You notice a small passage behind the figure, just big enough for you.\n\n";
cout << "Go to page 4 to push the figure and dive for the passage.\n";
cout << "Go to page 5 to stay and see what the figure wants.\n\n";
cout << "Which page would you like?\n";
cin >> page;
if (page == 4) {
divePast(); }
else if (page == 5) {
stayStill(); }
}
int rightDoor() {
cout << "\n\nAs you approach the door you hear a faint buzzing sound.\n";
cout << "The handle turns and the door creaks open slowly.\n";
cout << "You step in and the door slams forcefully behind you.\n";
cout << "Inside is a small box pulsing with electricity.\n";
cout << "You spot a key inside the box to unlock the door behind you.\n";
cout << "There is also a small balcony to step out onto.\n";
cout << "Go to page 8 to reach for the key.\n";
cout << "Go to page 9 to step onto the balcony.\n\n";
cout << "Which page would you like?\n";
cin >> page;
if (page == 8) {
openBox(); }
else if (page == 9) {
stepBalcony(); }
}
int divePast() {
cout << "\nYou shove the figure to the floor, and dive for the passage!\n";
cout << "Your body slams to the ground and you slide through to a well lit room.\n";
cout << "You hear a shriek and the passage crumbles behind you.\n";
cout << "Immediately you try to stand and notice that you are being forced to the ground.\n";
cout << "The gravity in this room is 3 times what it should be.\n";
cout << "You notice a hole in the ceiling and in the floor.\n";
cout << "You can see a room through the ceiling as if you were looking down on it.\n";
cout << "There is a switch on the wall across the room but you must stand to push it\n";
cout << "Do you slide to the hole in the floor and fall through?\n";
cout << "Or do you struggle for the switch?\n\n";
cout << "Go to page 6 to fall through the floor.\n";
cout << "Go to page 7 to try for the switch.\n\n";
cout << "Which page would you like?\n";
cin >> page;
if (page == 7) {
spaceSwitch(); }
else if (page == 6) {
floorFall(); }
}
int stayStill() {
cout << "\nYou stand frozen, hoping the figure is not hostile.\n";
cout << "It slowly glides to you, getting taller as it moves.\n";
cout << "It stop just short of you and strechtes its long dark hand out.\n";
cout << "In it is a square ornate box, cold to the touch.\n";
cout << "You take it and as you do the figure turns and disappears.\n";
cout << "Behind in the smoke, a door forms into the wall.\n\n";
cout << "Go to page 10 to go through the door.\n";
cin >> page;
if (page == 10) {
theRoom(); }
}
int theRoom() {
cout << "\nAs you enter the room a box emergences from the floor in the center.\n";
cout << "An insert to place the ornate box is depressed into the middle.\n";
cout << "You place the box down and immediately a horrible siren pierces your ears.\n";
cout << "You struggle to find the source as your ears beging to vibrate with pain.\n";
cout << "You fall to the ground and clasp your hands to your ears!\n";
cout << "You are barley able to make out a voice in the distance!\n";
cout << "The voice is calling your name....\n\n";
cout << "Go to page 24 to see who it is.\n";
cin >> page;
if (page == 24) {
wakeUp (); }
}
int spaceSwitch() {
cout << "\nYou slowly slide over to the switch and struggle to reach up.\n";
cout << "With all your strength you manage to just barely flip the switch.\n";
cout << "Immediately a huge suction forces you to the hole in the ceiling!\n";
cout << "You smash through the fake room projection and are ejected into space.\n";
cout << "Within seconds you are forzen solid and only able to reach for the room.\n";
cout << "Your frozen body is forever suspended, drifting away into space.\n\n";
}
int openBox() {
cout << "\nThe box pulses with electricity!\n";
cout << "You can feel it as you get close when the hairs on your body raise.\n";
cout << "Inside shines the key to the door.\n";
cout << "You steady your hand and time the pulses...\n";
cout << "One....Two....Three! You grab!! You feel the jolt through your body.\n";
cout << "Inside your hand you feel the hard metal of the key.\n";
cout << "Afer you recover from the shock, you insert they key and slowly twist.\n";
cout << "You hear a faint click as the door unlocks and you slowly open it.\n\n";
cout << "Go to page 21 to get back into the room.\n";
cin >> page;
if (page == 21) {
originalRoom (); }
}
int stepBalcony() {
cout << "\nThe air is cold and sharp as you step onto the balcony,\n";
cout << "As you breath in the breeze you can smell the faint smell of smoke!\n";
cout << "As you turn around you realize the room behind you is engulfed in flames!\n";
cout << "You panic as there is nowhere to go beside out onto the roof!\n";
cout << "As you swing your leg over the rail, you can see the ground is close.\n";
cout << "Close enough to reach with your feet.\n";
cout << "You simply climb over and walk away.\n";
cout << "You can't help but think that for some reason...\n";
cout << "You didn't think the gas would ignite that fast.......\n";
|