Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string>
  3. #include <ctime>
  4. #include <cstdlib>
  5.  
  6. using namespace std;
  7.  
  8. int main ()
  9. {
  10.     int a,b,c,d,f;
  11.    
  12.     cout << "[2]Attack Spider hatchling (level 1)"<<endl;
  13.    cin>>a;
  14.  
  15. if (a==2)
  16. {
  17.          
  18. srand((unsigned)time(0));            srand((unsigned)time(0));             srand((unsigned)time(0));            
  19. int exp1;                            int gold1;                            int loot1;                  
  20. for(int index=0; index<1; index++){  for(int index=0; index<1; index++){   for(int index=0; index<1; index++){  
  21. exp1 = (rand()%3)+0;                 gold1 = (rand()%5)+0;                 loot1 = (rand()%3)+0;              
  22.        
  23.        
  24.        
  25.        
  26. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  27.  
  28.  
  29.        
  30.        
  31. srand((unsigned)time(0));             srand((unsigned)time(0));             srand((unsigned)time(0));             srand((unsigned)time(0));                srand((unsigned)time(0));
  32. int random_integer;                   int random_integer2;                  int random_integer3;                  int random_integer4;                     int random_integer5;
  33. for(int index=0; index<1; index++){   for(int index=0; index<1; index++){   for(int index=0; index<1; index++){   for(int index=0; index<1; index++){      for(int index=0; index<1; index++){
  34. random_integer = (rand()%2)+0;        random_integer2 = (rand()%2)+0;       random_integer3 = (rand()%2)+0;       random_integer4 = (rand()%2)+0;          random_integer5 = (rand()%2)+0;
  35.  
  36.  
  37.  
  38.  
  39. srand((unsigned)time(0));             srand((unsigned)time(0));             srand((unsigned)time(0));             srand((unsigned)time(0));                srand((unsigned)time(0));
  40. int random_integer6;                  int random_integer7;                  int random_integer8;                  int random_integer9;                     int random_integer10;
  41. for(int index=0; index<1; index++){   for(int index=0; index<1; index++){   for(int index=0; index<1; index++){   for(int index=0; index<1; index++){      for(int index=0; index<1; index++){
  42. random_integer6 = (rand()%2)+0;       random_integer7 = (rand()%2)+0;       random_integer8 = (rand()%2)+0;       random_integer9 = (rand()%2)+0;          random_integer10 = (rand()%2)+0;
  43.  
  44.  
  45.  
  46.  
  47.  
  48. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  49.  
  50.  
  51.  
  52.  
  53. srand((unsigned)time(0));             srand((unsigned)time(0));             srand((unsigned)time(0));             srand((unsigned)time(0));                srand((unsigned)time(0));
  54. int random_integer11;                 int random_integer12;                 int random_integer13;                 int random_integer14;                    int random_integer15;
  55. for(int index=0; index<1; index++){   for(int index=0; index<1; index++){   for(int index=0; index<1; index++){   for(int index=0; index<1; index++){      for(int index=0; index<1; index++){
  56. random_integer11 = (rand()%1)+0;      random_integer12 = (rand()%1)+0;      random_integer13 = (rand()%1)+0;      random_integer14 = (rand()%1)+0;         random_integer15 = (rand()%1)+0;
  57.  
  58.  
  59.  
  60.  
  61. srand((unsigned)time(0));             srand((unsigned)time(0));             srand((unsigned)time(0));             srand((unsigned)time(0));                srand((unsigned)time(0));
  62. int random_integer16;                 int random_integer17;                 int random_integer18;                 int random_integer19;                    int random_integer20;
  63. for(int index=0; index<1; index++){   for(int index=0; index<1; index++){   for(int index=0; index<1; index++){   for(int index=0; index<1; index++){      for(int index=0; index<1; index++){
  64. random_integer16 = (rand()%1)+0;      random_integer17 = (rand()%1)+0;      random_integer18 = (rand()%1)+0;      random_integer19 = (rand()%1)+0;         random_integer20 = (rand()%1)+0;
  65.      
  66.  
  67.  
  68. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  69.  
  70.  
  71. cout << "You attack the spider hatchling (level 1), You deal " << random_integer << " damage" << endl;
  72. cout << "The Spider Hatchling (level 1) is left with " << 3-random_integer << " health" <<endl;
  73.  
  74. int hp;
  75.    hp= 3-(random_integer);
  76.    
  77.    cout<<""<<endl;
  78.    
  79. cout << "The Spider Hatchling (level 1) retaliates" <<endl;
  80. cout << "Spider Hatchling (level 1) deals " << random_integer11 << " damage"<<endl;
  81. cout << "You have " << 10-random_integer11 << " health left, What is your course of action?"<<endl;      
  82.  
  83. int hp11;
  84.    hp11= 10-(random_integer11);
  85.    
  86.     cout<<""<<endl;
  87.    
  88.     cout << "[1]Attack again"<<endl;
  89.     cout << "[2]Flee (no exp or gold gained)"<<endl;
  90.     cin>>b;
  91.      
  92.      system("CLS");
  93.  
  94. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////    
  95.    
  96.    
  97.    
  98.      cout << "You attack the spider hatchling (level 1), You deal " << random_integer2 << " damage" << endl;
  99. cout << "The Spider Hatchling (level 1) is left with " << hp-random_integer2 << " health" <<endl;
  100.  
  101. int hp2;
  102.    hp2= hp-(random_integer2);
  103.    
  104.    cout<<""<<endl;
  105.    
  106. cout << "The Spider Hatchling (level 1) retaliates" <<endl;
  107. cout << "Spider Hatchling (level 1) deals " << random_integer12 << " damage"<<endl;
  108. cout << "You have " << hp11-random_integer12 << " health left, What is your course of action?"<<endl;      
  109.  
  110. int hp12;
  111.    hp12= hp11-(random_integer12);
  112.    
  113.     cout<<""<<endl;
  114.    
  115.     cout << "[1]Attack again"<<endl;
  116.     cout << "[2]Flee (no exp or gold gained)"<<endl;
  117.     cin>>b;
  118.      
  119.      system("CLS");
  120.      
  121.      
  122. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  123.  
  124. cout << "You attack the spider hatchling (level 1), You deal " << random_integer3 << " damage" << endl;
  125. cout << "The Spider Hatchling (level 1) is left with " << hp2-random_integer3 << " health" <<endl;
  126.  
  127. int hp3;
  128.    hp3= hp2-(random_integer3);
  129.    
  130.    cout<<""<<endl;
  131.    
  132. cout << "The Spider Hatchling (level 1) retaliates" <<endl;
  133. cout << "Spider Hatchling (level 1) deals " << random_integer13 << " damage"<<endl;
  134. cout << "You have " << hp12-random_integer13 << " health left, What is your course of action?"<<endl;      
  135.  
  136. int hp13;
  137.    hp13= hp12-(random_integer13);
  138.    
  139.     cout<<""<<endl;
  140.    
  141.     cout << "[1]Attack again"<<endl;
  142.     cout << "[2]Flee (no exp or gold gained)"<<endl;
  143.     cin>>b;
  144.      
  145.      system("CLS");
  146.  
  147. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////    
  148.    
  149.    
  150.    
  151.      cout << "You attack the spider hatchling (level 1), You deal " << random_integer4 << " damage" << endl;
  152. cout << "The Spider Hatchling (level 1) is left with " << hp3-random_integer4 << " health" <<endl;
  153.  
  154. int hp4;
  155.    hp4= hp3-(random_integer4);
  156.    
  157.    cout<<""<<endl;
  158.    
  159. cout << "The Spider Hatchling (level 1) retaliates" <<endl;
  160. cout << "Spider Hatchling (level 1) deals " << random_integer14 << " damage"<<endl;
  161. cout << "You have " << hp13-random_integer14 << " health left, What is your course of action?"<<endl;      
  162.  
  163. int hp14;
  164.    hp14= hp13-(random_integer14);
  165.    
  166.     cout<<""<<endl;
  167.    
  168.     cout << "[1]Attack again"<<endl;
  169.     cout << "[2]Flee (no exp or gold gained)"<<endl;
  170.     cin>>b;
  171.      
  172.      system("CLS");
  173.      
  174.      
  175. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  176.  
  177. cout << "You attack the spider hatchling (level 1), You deal " << random_integer5 << " damage" << endl;
  178. cout << "The Spider Hatchling (level 1) is left with " << hp4-random_integer5 << " health" <<endl;
  179.  
  180. int hp5;
  181.    hp5= hp4-(random_integer5);
  182.    
  183.    cout<<""<<endl;
  184.    
  185. cout << "The Spider Hatchling (level 1) retaliates" <<endl;
  186. cout << "Spider Hatchling (level 1) deals " << random_integer15 << " damage"<<endl;
  187. cout << "You have " << hp14-random_integer15 << " health left, What is your course of action?"<<endl;      
  188.  
  189. int hp15;
  190.    hp15= hp14-(random_integer15);
  191.    
  192.     cout<<""<<endl;
  193.    
  194.     cout << "[1]Attack again"<<endl;
  195.     cout << "[2]Flee (no exp or gold gained)"<<endl;
  196.     cin>>b;
  197.      
  198.      system("CLS");
  199.      
  200. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  201.  
  202. cout << "You attack the spider hatchling (level 1), You deal " << random_integer6 << " damage" << endl;
  203. cout << "The Spider Hatchling (level 1) is left with " << hp5-random_integer6 << " health" <<endl;
  204.  
  205. int hp6;
  206.    hp6= hp5-(random_integer6);
  207.    
  208.    cout<<""<<endl;
  209.    
  210. cout << "The Spider Hatchling (level 1) retaliates" <<endl;
  211. cout << "Spider Hatchling (level 1) deals " << random_integer16 << " damage"<<endl;
  212. cout << "You have " << hp15-random_integer16 << " health left, What is your course of action?"<<endl;      
  213.  
  214. int hp16;
  215.    hp16= hp15-(random_integer16);
  216.    
  217.     cout<<""<<endl;
  218.    
  219.     cout << "[1]Attack again"<<endl;
  220.     cout << "[2]Flee (no exp or gold gained)"<<endl;
  221.     cin>>b;
  222.      
  223.      system("CLS");
  224.  
  225. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  226.  
  227. cout << "You attack the spider hatchling (level 1), You deal " << random_integer7 << " damage" << endl;
  228. cout << "The Spider Hatchling (level 1) is left with " << hp6-random_integer7 << " health" <<endl;
  229.  
  230. int hp7;
  231.    hp7= hp6-(random_integer7);
  232.    
  233.    cout<<""<<endl;
  234.    
  235. cout << "The Spider Hatchling (level 1) retaliates" <<endl;
  236. cout << "Spider Hatchling (level 1) deals " << random_integer17 << " damage"<<endl;
  237. cout << "You have " << hp16-random_integer17 << " health left, What is your course of action?"<<endl;      
  238.  
  239. int hp17;
  240.    hp17= hp16-(random_integer17);
  241.    
  242.     cout<<""<<endl;
  243.    
  244.     cout << "[1]Attack again"<<endl;
  245.     cout << "[2]Flee (no exp or gold gained)"<<endl;
  246.     cin>>b;
  247.      
  248.      system("CLS");
  249.  
  250. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  251.  
  252. cout << "You attack the spider hatchling (level 1), You deal " << random_integer8 << " damage" << endl;
  253. cout << "The Spider Hatchling (level 1) is left with " << hp7-random_integer8 << " health" <<endl;
  254.  
  255. int hp8;
  256.    hp8= hp7-(random_integer8);
  257.    
  258.    cout<<""<<endl;
  259.    
  260. cout << "The Spider Hatchling (level 1) retaliates" <<endl;
  261. cout << "Spider Hatchling (level 1) deals " << random_integer18 << " damage"<<endl;
  262. cout << "You have " << hp17-random_integer18 << " health left, What is your course of action?"<<endl;      
  263.  
  264. int hp18;
  265.    hp18= hp17-(random_integer18);
  266.    
  267.     cout<<""<<endl;
  268.    
  269.     cout << "[1]Attack again"<<endl;
  270.     cout << "[2]Flee (no exp or gold gained)"<<endl;
  271.     cin>>b;
  272.      
  273.      system("CLS");
  274.        
  275. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  276.  
  277. cout << "You attack the spider hatchling (level 1), You deal " << random_integer9 << " damage" << endl;
  278. cout << "The Spider Hatchling (level 1) is left with " << hp8-random_integer9 << " health" <<endl;
  279.  
  280. int hp9;
  281.    hp9= hp8-(random_integer9);
  282.    
  283.    cout<<""<<endl;
  284.    
  285. cout << "The Spider Hatchling (level 1) retaliates" <<endl;
  286. cout << "Spider Hatchling (level 1) deals " << random_integer19 << " damage"<<endl;
  287. cout << "You have " << hp18-random_integer19 << " health left, What is your course of action?"<<endl;      
  288.  
  289. int hp19;
  290.    hp19= hp18-(random_integer19);
  291.    
  292.     cout<<""<<endl;
  293.    
  294.     cout << "[1]Attack again"<<endl;
  295.     cout << "[2]Flee (no exp or gold gained)"<<endl;
  296.     cin>>b;
  297.      
  298.      system("CLS");
  299.        
  300. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  301.  
  302. cout << "You attack the spider hatchling (level 1), You deal " << random_integer10 << " damage" << endl;
  303. cout << "The Spider Hatchling (level 1) is left with " << hp9-random_integer10 << " health" <<endl;
  304.  
  305. int hp10;
  306.    hp10= hp9-(random_integer10);
  307.    
  308.    cout<<""<<endl;
  309.    
  310. cout << "The Spider Hatchling (level 1) retaliates" <<endl;
  311. cout << "Spider Hatchling (level 1) deals " << random_integer20 << " damage"<<endl;
  312. cout << "You have " << hp19-random_integer20 << " health left, What is your course of action?"<<endl;      
  313.  
  314. int hp20;
  315.    hp20= hp19-(random_integer20);
  316.    
  317.     cout<<""<<endl;
  318.    
  319.     cout << "[1]Attack again"<<endl;
  320.     cout << "[2]Flee (no exp or gold gained)"<<endl;
  321.     cin>>b;
  322.      
  323.      system("CLS");
  324.        
  325.        
  326.        
  327.         if (hp<=0)
  328.        {
  329.                   cout << "You have defeated Spider Hatchling (level 1) you gain " << exp1 << " experience and " << gold1 << " gold" <<endl;
  330.        }
  331.        if (hp2<=0)
  332.        {
  333.                   cout << "You have defeated Spider Hatchling (level 1) you gain " << exp1 << " experience and " << gold1 << " gold" <<endl;
  334.        }
  335.        if (hp3<=0)
  336.        {
  337.                   cout << "You have defeated Spider Hatchling (level 1) you gain " << exp1 << " experience and " << gold1 << " gold" <<endl;
  338.        }
  339.        if (hp4<=0)
  340.        {
  341.                   cout << "You have defeated Spider Hatchling (level 1) you gain " << exp1 << " experience and " << gold1 << " gold" <<endl;
  342.        }
  343.        if (hp5<=0)
  344.        {
  345.                   cout << "You have defeated Spider Hatchling (level 1) you gain " << exp1 << " experience and " << gold1 << " gold" <<endl;
  346.        }
  347.        if (hp6<=0)
  348.        {
  349.                   cout << "You have defeated Spider Hatchling (level 1) you gain " << exp1 << " experience and " << gold1 << " gold" <<endl;
  350.        }
  351.        if (hp7<=0)
  352.        {
  353.                   cout << "You have defeated Spider Hatchling (level 1) you gain " << exp1 << " experience and " << gold1 << " gold" <<endl;
  354.        }
  355.        if (hp8<=0)
  356.        {
  357.                   cout << "You have defeated Spider Hatchling (level 1) you gain " << exp1 << " experience and " << gold1 << " gold" <<endl;
  358.        }
  359.        if (hp9<=0)
  360.        {
  361.                   cout << "You have defeated Spider Hatchling (level 1) you gain " << exp1 << " experience and " << gold1 << " gold" <<endl;
  362.        }
  363.        
  364. }
  365. system("PAUSE");
  366.  return 0;
  367.  
  368. }}}}}}}}}}}}}}}}}}}}}}}
  369. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement