Skip to content
Permalink
master
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
#include <iostream>
#include <string>
#include <stdlib.h>
#include "Monster.h"
#include "Character.h"
#include "Combat.h"
using namespace std;
int main()
{
{
char name[50];
std::cout << "What is your name, hero?" << std::endl;
std::cin.getline(name, 50);
std::cout << "You better move fast, " << name << ". The goblins are attacking the city and the people need your help." << std::endl;
system("PAUSE");
int _getch();
}
system("cls");
int choiceOne_Path;
std::cout << "#What are you going to do?" << std::endl;
std::cout << "\t >> Enter '1' to run towards the city" << std::endl;
std::cout << "\t >> Enter '2' to run away" << std::endl;
retry:
std::cout << "\nEnter your choice ";
std::cin >> choiceOne_Path;
if (choiceOne_Path == 1)
{
std::cout << "\n!!!----------------------Chapter One: Escape----------------------!!!" << std::endl;
std::cout << "\nYou: We have to save the civilians!" << std::endl;
std::cout << "Chief: Here, take one of these, you'll need it" << std::endl;
std::cout << "# You take the sword and run towards the city with the chief" << std::endl;
system("PAUSE");
return 0;
}
else if (choiceOne_Path == 2)
{
std::cout << "\n!!!----------------------Chapter One: Escape----------------------!!!" << std::endl;
std::cout << "Chief: We need to get away while we still can" << std::endl;
std::cout << "\nYou: We can't just leave the civilians behind!" << std::endl;
std::cout << "Chief: There isn't anytime, follow me" << std::endl;
std::cout << "# The chief leads you away from the chaos deep into the forest" << std::endl;
system("PAUSE");
}
else
{
std::cout << "You're doing it wrong hero! Press either '1' or '2', that's all!" << std::endl;
goto retry;
}
std::cout << "\n----------------------Press any key to continue----------------------" << std::endl;
int _getch();
system("cls");
switch (choiceOne_Path)
{
case 1: std::cout << "" << std::endl;
case 2: int choiceTwo2_Path;
std::cout << "\n!!!----------------------Chapter Two: Surviving after the Attack----------------------!!!" << std::endl;
std::cout << "Chief: We need to build a tent to stay the night and collect some food..hmm..fruits is a good idea" << std::endl;
std::cout << "\nYou: Which one you want me to do?" << std::endl;
std::cout << "Chief: Choose, do what you prefer, I'll do the other one" << std::endl;
std::cout << "#Which task are you going to do?" << std::endl;
std::cout << "\t >> Enter '1' to collect food" << std::endl;
std::cout << "\t >> Enter '2' to make a tent" << std::endl;
retry1:
std::cout << "\nEnter your choice ";
std::cin >> choiceTwo2_Path;
if (choiceTwo2_Path == 1)
{
std::cout << "You:I will take some food" << std::endl;
std::cout << "\nChief:That's fine, I'll make the tent" << std::endl;
std::cout << "# 1 hour passes..." << std::endl;
std::cout << "\nChief: We need to sleep, it's been a busy day today" << std::endl;
std::cout << "You: Okay, sleep well..." << std::endl;
system("PAUSE");
}
else if (choiceTwo2_Path == 2)
{
std::cout << "You:I'll do the tent, I believe I'm better doing it rather than pick up food" << std::endl;
std::cout << "\nChief:That's fine, see you in a couple of minutes then" << std::endl;
std::cout << "# 1 hour passes..." << std::endl;
std::cout << "\nChief: We need to sleep, it's been a busy day today" << std::endl;
std::cout << "You: Okay, sleep well..." << std::endl;
system("PAUSE");
}
else
{
std::cout << "You're doing it wrong hero! Press either '1' or '2', that's all!" << std::endl;
goto retry1;
}
}
system("cls");
int Flashback;
{
std::cout << "\n!!!----------------------Chapter Two A: The Memories----------------------!!!" << std::endl;
system("PAUSE");
std::cout << "# As you sleep you are having faint memories of the life you had before the attack..." << std::endl;
system("PAUSE");
std::cout << "# You begin walking towards the light where you begin to see a familiar face, but can't quite work out who it is..." << std::endl;
system("PAUSE");
std::cout << "# Upon getting closer, the face becomes clearer and suddenly you see..." << std::endl;
system("PAUSE");
std::cout << "# It's Arthur! Your childhood friend!" << std::endl;
system("PAUSE");
std::cout << "# As you begin being closer to him you start to remember..." << std::endl;
system("PAUSE");
std::cout << "# The life you had before, emerging in front of you" << std::endl;
}
int _getch();
system("cls");
switch (choiceOne_Path)
{
case 1: std::cout << "" << std::endl;
case 2: std::cout << "\n!!!----------------------Chapter Three: Surviving inside the forest!----------------------!!!" << std::endl;
std::cout << "Chief: We need to find a way to get out of this massive forest or we'll run out of food and water." << std::endl;
std::cout << "\nYou: Which way do you want to walk?" << std::endl;
std::cout << "Chief: Choose, do what you prefer, I'll agree with your choice." << std::endl;
int choiceThree_Path;
std::cout << "# Which way are you going?" << std::endl;
std::cout << "\t >> Enter '1' to go North." << std::endl;
std::cout << "\t >> Enter '2' to go South." << std::endl;
std::cout << "\t >> Enter '3' to go East." << std::endl;
std::cout << "\t >> Enter '4' to go West." << std::endl;
retry3:
std::cout << "\nEnter your choice ";
std::cin >> choiceThree_Path;
if (choiceThree_Path == 1)
{
std::cout << "You: Let's head north!" << std::endl;
std::cout << "\nChief: That's fine, I'll get our stuff and were gonna get going ASAP!" << std::endl;
std::cout << "# You hear a twig snap and go on high alert. It ends up being a wild bear that stares at you with a dumbass face." << std::endl;
std::cout << "# Your heart starts pumping a thousand per second but it ends up that the bear is just hanging around and it's no harm to you." << std::endl;
std::cout << "Chief: That's the closest i have been of dying." << std::endl;
std::cout << "# Before you continue on your trip to leave the forest you help the bear to get some food. " << std::endl;
system("PAUSE");
}
else if (choiceThree_Path == 2)
{
std::cout << "You: Let's head south!" << std::endl;
std::cout << "\nChief: That's fine, I'll get our stuff and were gonna get going ASAP!" << std::endl;
std::cout << "# You hear a twig snap and go on high alert. It ends up being a wild deer that runs away because you scared him." << std::endl;
std::cout << "Chief: I hope they weren´t so shy so I could pet them." << std::endl;
std::cout << "# You continue your trip to leave the forest. " << std::endl;
system("PAUSE");
}
else if (choiceThree_Path == 3)
{
std::cout << "You: Let's head East!" << std::endl;
std::cout << "\nChief: That's fine, I'll get our stuff and were gonna get going ASAP!" << std::endl;
std::cout << "# You hear a twig snap and go on high alert. It ends up being a wild boar that prepares to attack you." << std::endl;
std::cout << "# You start thinking of all things that would help you dodge the wild boars attack and be able to run away safely." << std::endl;
std::cout << "# You both start running in zigzags so the boar gets confused and stops chasing you, fortunately, it works." << std::endl;
std::cout << "Chief: That was close, i think i need some washed underpants." << std::endl;
std::cout << "# You continue your trip to leave the forest. " << std::endl;
system("PAUSE");
}
else if (choiceThree_Path == 4)
{
std::cout << "You: Let's head West!" << std::endl;
std::cout << "\nChief: That's fine, I'll get our stuff and were gonna get going ASAP!" << std::endl;
std::cout << "# You hear a twig snap and go on high alert. It ends up being a little squirrel that is looking for something to eat." << std::endl;
std::cout << "# You remember that you have some nuts in your bag, so you share some with the little squirrel before you go on your trip." << std::endl;
std::cout << "Chief: They are such cute animals." << std::endl;
std::cout << "# You continue your trip to leave the forest. " << std::endl;
system("PAUSE");
}
else
{
std::cout << "You're doing it wrong hero! Press either '1' or '2' or '3' or '4', that's all!" << std::endl;
goto retry3;
}
}
int _getch();
system("cls");
Monster goblin("goblin", 50, 2); //declared the monster type outside of the main
int main(int argc, char * const argv[])
{
Character C(name);
Combat combat(goblin);
combat.combat1(C);
return 0;
}
}