From 3d45c952c577cabfddb8911fae547745f170647a Mon Sep 17 00:00:00 2001 From: "Ryan Gillett (gillettr)" Date: Mon, 11 Mar 2019 07:48:09 +0000 Subject: [PATCH] Update Ryan Code --- Ryan Code | 150 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 127 insertions(+), 23 deletions(-) diff --git a/Ryan Code b/Ryan Code index 0b6fd79..ae4635c 100644 --- a/Ryan Code +++ b/Ryan Code @@ -1,6 +1,9 @@ #include #include #include +#include "Monster.h" +#include "Character.h" +#include "Combat.h" using namespace std; @@ -41,7 +44,7 @@ retry: 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 @@ -59,7 +62,7 @@ retry: 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; @@ -68,7 +71,7 @@ retry: 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; @@ -80,7 +83,7 @@ retry: 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) { @@ -90,7 +93,7 @@ retry: 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 { @@ -98,23 +101,124 @@ retry: goto retry1; } } - system("cls"); + 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; - - return(0); - - + { + + 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; + } + + + + + + + + + + + + }