Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.74 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <cstdlib>
  4. #include <ctime>
  5. using namespace std;
  6.  
  7.  
  8. int main(){
  9.  
  10.  
  11. int inventory[8],check,attempt,choice,ready,r=1,c=1;
  12.  
  13. //main menu
  14. cout << "=========================================";
  15. cout << "\n=\t Food Wants To Eat Humans \t=";
  16. cout << "\n=========================================\n";
  17.  
  18. cout << "\nFood Siege! Game where the food eats you" << endl << endl << "[Instructions]";
  19. cout << endl << endl << "You are given 2 of each unique ingredients to contain the raging expirements" << endl << "Monsters are vulnerable and immune to certain ingredients depending on their main flavor";
  20. cout << endl << endl << "Enter [1] to start! \nPress any key to close the game" <<endl << endl;
  21.  
  22. cin >> choice;
  23.  
  24. if(choice==c){
  25.  
  26. system("CLS");
  27.  
  28. cout << "[Gastronomy Professor Masayuki] I'm glad you are here. The people at the culinary lab blew a high-tech stove." <<endl << endl;
  29.  
  30. cout << "[Gastronomy Professor Masayuki] We need your help to catch these wild failed experiments roaming around the building"<<endl << endl;
  31.  
  32. cout << "[Gastronomy Professor Masayuki] Take 2 each of these special ingredients to contain these monsters." <<endl << endl;
  33.  
  34. cout << "[Gastronomy Professor Masayuki] I need to help the other culinary students. I will be at the Gastronomy Mastery Building" <<endl << endl;
  35.  
  36. cout << endl << "You recieved [Iodized Salt] x2 , [Sweet Jam] 2x , [Sour Gum] 2x and [Spicy Jerky] 2x" << endl;
  37.  
  38. cout << endl << "Type [1] to hunt monsters \nPress any key to close the game" << endl <<endl;
  39.  
  40. cin >> ready;
  41.  
  42. if(ready==r){
  43. system("CLS");
  44.  
  45. // start game
  46. // variable
  47.  
  48. const int mons_array=8,main_array=8;
  49. int ctr=1,turn=8,search,probability;
  50.  
  51.  
  52. const string mons[8]={"Abominable Cream Pie","Entagled Spaghetti","Elvish Rotten Apple","Zombie Blue Cheese","Muddy Chili Con Carne Blob","Dragonic Kimchi Ramyeon","Grillled BBQ Kracken","Taco Monster"};
  53.  
  54. const string main [8]={"Sweet","Sweet","Sour","Sour","Spicy","Spicy","Salty","Salty"};
  55.  
  56. const string second [8]={"Salty","Salty","Sweet","Salty","Sour","Sour","Sweet","Spicy"};
  57.  
  58. const string absent [8]={"Sour","Spicy","Spicy","Spicy","Sweet","Salty","Sour","Sour"};
  59.  
  60. const string sec_absent [8]={"Spicy","Sour","Salty","Sweet","Salty","Sweet","Spicy","Sweet"};
  61.  
  62. srand(time(0)); //seed random number
  63. for(int ctrl=1;ctrl<9;++ctrl){
  64.  
  65. cout << "press [1] to look for monster = ";
  66. cin >> search;
  67.  
  68.  
  69. if(search==1){
  70.  
  71.  
  72. ////////
  73. for (int i=0;i < ctr; i++){
  74.  
  75. int index1 = rand() % mons_array;
  76. int index2 = rand() % main_array;
  77.  
  78. cout << "you have encounter a wild " << main[index2] << " " << mons[index1] << "!" << endl << endl;
  79.  
  80.  
  81. cout << "Do you want to throw \n[1] Iodized Salt\n[2] Sweet Jam\n[3] Sour Gum\n[4] Spicy Jerky\n\n";
  82.  
  83. cin >> probability;
  84.  
  85. switch(probability){
  86.  
  87. case 1:
  88. if(main[index2]="Salty"){
  89.  
  90. }
  91.  
  92.  
  93.  
  94.  
  95.  
  96. break;
  97.  
  98. case 2:
  99. //
  100. break;
  101.  
  102. case 3:
  103. //
  104. break;
  105.  
  106. case 4:
  107. //
  108. break;
  109.  
  110. default:
  111. //
  112. break;
  113. }
  114.  
  115.  
  116. }
  117. /////////
  118.  
  119. }
  120. else{
  121. system("CLS");
  122. cout << "Terminating Game to go back to main menu";
  123. }
  124. }
  125.  
  126.  
  127. //this is main menu ends
  128. }
  129. else{
  130. system("CLS");
  131. cout << "Terminating Game to go back to main menu";
  132. };
  133.  
  134. }
  135.  
  136.  
  137.  
  138. else{
  139. system("CLS");
  140. cout << "Going back to Main Menu";
  141. };
  142.  
  143.  
  144.  
  145.  
  146. return 0;
  147. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement