From 4acbc15ac8ea715479cfd6e472efb5ff600b8de2 Mon Sep 17 00:00:00 2001 From: "Mian Rehman (rehmanm13)" Date: Fri, 16 Apr 2021 10:15:22 +0500 Subject: [PATCH] Create rehman-code.cpp Rehmand Code. Please accept my pull request --- rehman-code.cpp | 118 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 rehman-code.cpp diff --git a/rehman-code.cpp b/rehman-code.cpp new file mode 100644 index 0000000..9b92546 --- /dev/null +++ b/rehman-code.cpp @@ -0,0 +1,118 @@ +#include +#include + +int main() { + + std::cout << " ************************************* (/_/)\n"; + std::cout << " (/_/) * Rahman Text-Adventure * (='.'=)\n"; + std::cout << " (='.'=) * Game * (')_(')\n"; + std::cout << " (')_(') *************************************\n\n"; + + std::cout << " Once upon a day Mars was walking down the coventry building as he saw a cute curious individual\n\n"; + std::cout << " 1) Mars approaches this cute individual\n\n"; + std::cout << " 2) Mars tries walking away\n\n\n"; + + int mars_choice = 0; + char cont = 'y'; + + do { + std::cout << " > "; + std::cin >> mars_choice; + std::cout << "\n"; + } while (mars_choice != 1 && mars_choice != 2); + + if (mars_choice == 1) { + std::cout << " It turns out to be Sky!\n\n"; + std::cout << " Sky jumps on Sameed while smiling\n\n"; + std::cout << " Press any char to continue\n"; + std::cout << " > "; + std::cin >> cont; + } + else{ + std::cout << " You think you can escape? huh? no way!\n\n"; + std::cout << " This cute individual runs towards Sameed and jumps on him!\n\n"; + std::cout << " Turns out it's actually sky!\n\n"; + std::cout << " Press any char to continue\n"; + std::cout << " > "; + std::cin >> cont; + } + + system("CLS"); + std::cout << "\n\n"; + std::cout << " Mars is overcame with happiness upon finding Sky!\n\n"; + std::cout << " Mars is deeply worried because he can't find any way.\n\n"; + std::cout << " Mars was with his friend rehman and sabatierb and a few hours ago till a Thief attacked them\n\n"; + std::cout << " After a long battle neither of the two parties could win. As a last resort, Thief kidnapped Sameed's both friends\n\n"; + std::cout << " in the heat of the battle and escaped.\n\n"; + std::cout << " Press any char to continue\n"; + std::cout << " > "; + std::cin >> cont; + + system("CLS"); + std::cout << "\n\n"; + std::cout << " A few minutes later one friend of Sameed comes running with a lot of battle wounds\n\n"; + std::cout << " 'Mars, hand me some potions. My HP is almost 0...'\n\n"; + std::cout << " 1) Hand over some HP Pots to Sameed.\n\n"; + std::cout << " 2) Ignore him and continue on the adventure against theif alone\n\n"; + do { + std::cout << " > "; + std::cin >> mars_choice; + std::cout << "\n"; + } while (mars_choice != 1 && mars_choice != 2); + system("CLS"); + if (mars_choice == 1) { + std::cout << "\n\n"; + std::cout << " 'Thank you!' my friend shouts while running off to continue battling with the Theif\n\n"; + std::cout << " Sameed runs after Sameed.... 'OMG wait me!'\n\n"; + std::cout << " Mars and Sabatierb find the theif outside the building\n\n"; + std::cout << " Sabatierb runs off to stop him but at this rate he won't catch up\n\n"; + std::cout << " Mars knew he had to do something\n\n"; + std::cout << " 1) Borrow some power from Sameed\n\n"; + std::cout << " 2) Try shooting theif with some fire\n\n"; + do { + std::cout << " > "; + std::cin >> mars_choice; + std::cout << "\n"; + } while (mars_choice != 1 && mars_choice != 2); + + system("CLS"); + + if (mars_choice == 1) { + std::cout << "\n\n"; + std::cout << "After borrowing Rehman's' Power Mars dashes forward and charms theif for 2 seconds\n\n"; + std::cout << "Long enough for Sabatierb to jump off and Sameed to stab theif and push him off into the car \n\n"; + std::cout << " Press any char to continue\n"; + std::cout << " > "; + std::cin >> cont; + system("CLS"); + std::cout << " VICTORY!\n\n\n\n\n"; + std::cout << " Chapter1: Congrats!.\n\n"; + + } + else { + std::cout << "\n\n"; + std::cout << "The Theif ends up escaping..\n\n"; + std::cout << " Press any char to continue\n"; + std::cout << " > "; + std::cin >> cont; + system("CLS"); + std::cout << " G A M E - O V E R\n\n\n\n\n"; + std::cout << " Failure to end the story line with all party members alive.\n\n\n\n"; + std::cout << " Members dead: Sabatierb.\n\n\n"; + } + + } + else { + std::cout << " Mars ends up dying a few seconds later. Mars tries looking for the theif but it's already too late.\n\n"; + std::cout << " Mars was the only one who knew Thief's last position and he ended up dying..\n\n"; + std::cout << " Press any char to continue\n"; + std::cout << " > "; + std::cin >> cont; + system("CLS"); + std::cout << "\n\n\n\n"; + std::cout << " G A M E - O V E R\n\n\n\n\n"; + std::cout << " Failure to end the story line with all party members alive.\n\n\n\n"; + std::cout << " Members dead: Sameed, and Sabatierb.\n\n\n"; + } + +}