Skip to content
Permalink
cb033f1736
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
155 lines (108 sloc) 8.96 KB
// ConsoleApplication1.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
// Debug program: F5 or Debug > Start Debugging menu
// Tips for Getting Started:
// 1. Use the Solution Explorer window to add/manage files
// 2. Use the Team Explorer window to connect to source control
// 3. Use the Output window to see build output and other messages
// 4. Use the Error List window to view errors
// 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
// 6. In the future, to open this project again, go to File > Open > Project and select the .sln file
#include <iostream>
#include <string>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <cstdlib>
using namespace std;
int main() {
string First;
string Last;
string Gender;
string Title;
string YN;
string Bank;
string Number;
cout << "Welcome to my program! This is a choose your own adventure story designed by Nicholas Rising as his first more complicated C++ program. To use this, read what people say. When prompted to act, just type it in below. Use \"Y\" for yes and \"N\" for no. Also, capitalization matters. Without further ado, lets get into it!" << endl << endl;
cout << "-------------------------------------------------------------------------------------------" << endl << endl;
cout << "Please enter your first name:";
cin >> First;
cout << "Please enter your last name:";
cin >> Last;
cout << "Please enter your gender: (M/F)";
cin >> Gender;
cout << "Please enter your 9-diget social security number:";
cin >> Bank;
cout << endl;
cout << "Just kidding. Testing to see if you were paying attention. :)" << endl;
cout << endl;
cout << "-------------------------------------------------------------------------------------------" << endl << endl;
if (Gender == "M") {
Title = "Mr.";
}
if (Gender == "F") {
Title = "Ms.";
}
cout << "You are walking down an old country road. You have no memories. All you remember is your name and that you woke up this morning, and felt an urge to walk in this particular direction." << endl << endl;
cout << "In the distance you see a man tending some flowers at the entrance of what apears to be a dojo. As you get closer, you see that he is quite elderly." << endl << endl;
cout << "He looks up towards you. He stares at you for a second and then exclaims \"Oh! I apologise that I did not recognize you sooner, " << Title << " " << Last << "! Come, let us see the sensei.\"" << endl << endl;
cout << "You ask him who he is. He looks into your eyes. \"So it is true, you did lose your memories. My name is Master Motoyuki. Follow me.\"" << endl << endl;
cout << "Master Motoyuki seems to know who you are, so he may be able to treat your amnesia, but you also must stay wary of strangers. Do you follow him? (Y/N):";
cin >> YN;
cout << endl;
cout << "-------------------------------------------------------------------------------------------" << endl << endl;
if (YN == "Y") {
cout << "You follow Master Motoyuki as he walks past an arched gateway into what appeares to be a courtyard." << endl << endl;
cout << "Master Motoyuki beckons you into a building in front of you. Inside is a simple room with no furnature and a wood floor. In front of you, sitting on a cushion, is a man with a long beard wearing traditional Japanese robes. You feel like you recognize him." << endl << endl;
cout << "The man looks up. \"Ah! You have returned, " << First << ".\" How are you? I have been told you lost your memory. Is this true?\" You nod your head. \"I see. I have some explaining to do.\"" << endl << endl;
cout << "\"Myself, the other Masters including yourself, and the students here, are part of a group known as the Emperors Guard. Our duty is to protect the emperor from harm. However, we remain anonomous to all including the Emperor, and only appear in times of dire need. You, Master " << Last << ", disapeared a couple of days ago, and we feared that you were captured by our enemies. However, our town prophet told us that you would return, short of your memory.\"" << endl << endl;
cout << "\"Oh, and excuse me for not mentioning it earlier, my name is Sensei Yushiro. I am the teacher here, and you are a Master. The Masters are students who came here and passed all of our trials. The students are new recruits and train here with the goal to one day become a Master. All of us here are sworn to secrecy to prevent our enemies from finding us.\"" << endl << endl;
cout << "\"Of course, some bounty hunters hired by our opposition find us, but we try to cover up the mess as best as we can. Anyways, to get your memory back you must...\"" << endl << endl;
cout << "Sudenly, you hear an explosion. The floor rocks. You see flames outside. Sensei Yushiro grabs you by the wrist. \"We must hide, " << First << ", it seems they have found us!\" Sensei Yushiro seems concerned for your safety and is woried by \"they\", but it also looks like the base of the Emperors Guard is in trouble. Do you go with Sensei Yushiro? (Y/N):";
cin >> YN;
cout << endl << endl;
cout << "-------------------------------------------------------------------------------------------" << endl << endl;
if (YN == "Y") {
cout << "You decide to do what Sensei Yushiro says, and you follow him." << endl << endl;
cout << "Sensei Yushiro leads you to a stone wall. He taps a small stone protruding fro1m it and the wall rotates open. \"Thats amazing!\" you exclaim. Sensei Yushiro shushes you and drags you into the darkness behind the wall. He grabs a torch on the wall and lights it." << endl << endl;
cout << "In front of you is a staircase. Sensei Yushiro beckons you down it. You make the decent. At the bottom is a door. Sensei Yushiro pulls out a key and opens the door." << endl << endl;
cout << "Inside are stacks of hay bails, food, and other esentials. Sensei Yushiro explains how this room is a storehouse for the dojo. You sudenly hear a noise comming from upstairs" << endl << endl;
}
if (YN == "N") {
cout << "You decide you must help and can't just hide, and you break free of Sensei Yushiro grasp." << endl << endl;
}
}
if (YN == "N") {
cout << "You do not trust him and run in the opposite direction." << endl << endl;
cout << "Master Motoyuki turns around to beckon you in, when he sees you running away. \"Get him!\" he exclaims." << endl << endl;
cout << "You continue to run. You see a grove of trees you can hide in, but just as you begin heading towards it, black hooded figures emurge from the trees. You turn around and see you are compleatly surrounded." << endl << endl;
cout << "The people are compleatly covered in a skin-tight black cloth, except for their eyes. You feel like you have seen them before. Master Motoyuki walks towards the circle of ninjas surounding you. He enters the ring. \"So, you thought you could escape your greatest enemy. I guess you do still have your memory and were lying. He walks up to you and stares you staight in the eyes." << endl << endl;
cout << "\"Where are you hiding it.\"" << endl << endl;
cout << "\"What is this man talking about?\", you think. Do you:" << endl << endl;
cout << "1) Attack him" << endl << endl;
cout << "2) Tell him you have no idea what he is talking about and that you truly have no memory" << endl << endl;
cout << "3) Try to run through the people surounding you" << endl << endl;
cout << "Do you (Answer with a number):";
cin >> Number;
cout << endl;
cout << "-------------------------------------------------------------------------------------------" << endl << endl;
if (Number == "1") {
cout << "You punch Master Motoyuki in the face." << endl << endl;
cout << "Master Motoyuki takes a step back, suprised by your sudden assault. However, he is tougher then what his age says, and he seems fine." << endl << endl;
cout << "The black-clothed ninjas begin circling towards you, but with a wave, Master Motoyuki stops them. He then takes a swing at you. You barley see it coming, when you feel his fist punch you in the check. You collapse to the ground and everything goes dark." << endl << endl;
goto Blackout;
}
if (Number == "2") {
cout << "\"I have no idea what you are talking about!\" you exclaim." << endl << endl;
cout << "Master Moyoyuki punches you in the face. As you fall, he growles \"You liar.\"" << endl << endl;
cout << "You hit the ground with a thud. Everything starts to spin and then goes dark." << endl << endl;
Blackout:
cout << "You wake up in a dark room." << endl << endl;
}
if (Number == "3") {
cout << "You decide to break through the circle around you. You run, but they lock arms, making your escape imposible." << endl << endl;
}
}
return 0;
}