SHARE
TWEET

Untitled

a guest May 26th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int opponentData()
  2. {
  3.     EnemyStats temp;
  4.  
  5.     int nameValue, modValue;
  6.     string returnName, returnMod;
  7.  
  8.     srand(time(NULL));
  9.  
  10.     string person[] = { "Alex", "Benjamin", "Cassandra", "Daniel", "Elizabeth" };
  11.     string modWord[] = { "Speedy", "Fierce", "Tough", "Athletic", "Untouchable" };
  12.  
  13.     nameValue = (rand() % 5);
  14.     modValue = (rand() % 5);
  15.    
  16.     returnName = person[nameValue];
  17.     returnMod = modWord[modValue];
  18.  
  19.     int modArr[3];
  20.  
  21.     switch(modValue)
  22.     {
  23.     case 0:
  24.         int modArr[3];
  25.         modArr[0] = 0;
  26.         modArr[0] = 0;
  27.         modArr[0] = 1;
  28.     case 1:
  29.         int modArr[3];
  30.         modArr[0] = 1;
  31.         modArr[0] = 0;
  32.         modArr[0] = 0;
  33.     case 2:
  34.         int modArr[3];
  35.         modArr[0] = 0;
  36.         modArr[0] = 1;
  37.         modArr[0] = 0;
  38.     case 3:
  39.         int modArr[3];
  40.         modArr[0] = 1;
  41.         modArr[0] = 0;
  42.         modArr[0] = 1;
  43.     case 4:
  44.         int modArr[3];
  45.         modArr[0] = 0;
  46.         modArr[0] = 0;
  47.         modArr[0] = 2;
  48.     default:
  49.         int modArr[3];
  50.         modArr[0] = 0;
  51.         modArr[0] = 0;
  52.         modArr[0] = 0;
  53.     }
  54.    
  55.     temp.name = person[nameValue];
  56.     temp.modWord = modWord[modValue];
  57.     temp.attack = modArr[0];
  58.     temp.attack = modArr[1];
  59.     temp.evade = modArr[2];
  60.  
  61.     return 0;
  62. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top