diff --git a/Final Game code(working) b/Final Game code(working) index 8b13789..c8ccdeb 100644 --- a/Final Game code(working) +++ b/Final Game code(working) @@ -1 +1,215 @@ +#include +#include +#include + +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 village 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 village" << 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; + std::cout << "\nYou: How bad is the situation?" << std::endl; + std::cout << "Chief: The civilians are running about and putting themselves in more danger. The top priority is to keep them safe." << std::endl; + std::cout << "You: Alright, I'll head to the village square." << std::endl; + std::cout << "# You run towards the village square to help the civilians while the chief goes to warn the other warriors" << std::endl; + std::cout << "# You get to the village centre and see a goblin rearing up against and infant and a man struggling against another goblin with a pick axe" << std::endl; + std::cout << "Arthur(a.k.a your best friend): Help me please" << std::endl; + + + + int choiceTwo_Path; + std::cout << "Who do you save?" << std::endl; + std::cout << "\t >> Enter '1' to save the infant" << std::endl; + std::cout << "\t >> Enter '2' to help Arthur" << std::endl; + //this bit here you had as retry not retry2 so i made this section a retry2 section here and line 90 + + retry2: + std::cout << "\nEnter your choice "; + std::cin >> choiceTwo_Path; + if (choiceTwo_Path == 1) + { + std::cout << "# You run to the child, parry the goblin's attack and slice it's stomach" << std::endl; + std::cout << "# Suddenly you hear a loud scream" << std::endl; + std::cout << "Arthur: *Whispering faintly* I thought we were friends..." << std::endl; + std::cout << "# He whispers as the goblin stabs him through the chest" << std::endl; + + system("PAUSE"); + + } + else if (choiceTwo_Path == 2) + { + std::cout << "# You run over to Arthur's side and block the first blow from the goblin. Arthur then slides past you and cuts off the head of the defenseless creature" << std::endl; + std::cout << "Arthur: Good to have you back my friend. Wait.... what that noise?" << std::endl; + std::cout << "# Arthur says as you both hear a freakish cackle coming from across the square. It is the goblin shrieking in triumph as it devours the child" << std::endl; + system("PAUSE"); + + + + system("PAUSE"); + + } + } + 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 retry2; + + } + 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: 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; + + int choiceTwo2_Path; + 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 << "# You hear a twig snap and go on high alert. It ends up just being a wild horse grazing on the patches of grass in the clearing." << std::endl; + std::cout << "# The tranquility of the moment reminds you of a time when things weren't so conflict stricken" << std::endl; + std::cout << "Chief: The tent is done now, lets eat and call it a night. I'll take first watch." << std::endl; + std::cout << "# After you eat you go into the tent while Chief takes the first watch and drift off into slumber thinking about the troubles and challenges of the days to come. " << std::endl; + system("PAUSE"); + return 0; + } + else if (choiceTwo2_Path == 2) + { + std::cout << "You: I'll do the tent, I believe I'm better doing it rather than picking up food" << std::endl; + std::cout << "\nChief: That's fine, see you in a couple of minutes then. I'll go and sort out our dinner" << std::endl; + std::cout << "You: Chief, the tent is ready. Come inside so we can eat and rest for the night" << std::endl; + std::cout << "Chief: Ok, I'll take the first watch after we eat." << std::endl; + std::cout << "# You both finish eating and you lay down in the tent as you struggle to drift off into a slumber with the troubles ahead on your mind." << std::endl; + system("PAUSE"); + return 0; + } + else + { + std::cout << "You're doing it wrong hero! Press either '1' or '2', that's all!" << std::endl; + goto retry1; + } + } + 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: 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"); + return 0; + } + 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"); + return 0; + } + 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"); + return 0; + } + 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"); + return 0; + } + 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; + } + } +}