Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int opponentData()
- {
- EnemyStats temp;
- int nameValue, modValue;
- string returnName, returnMod;
- srand(time(NULL));
- string person[] = { "Alex", "Benjamin", "Cassandra", "Daniel", "Elizabeth" };
- string modWord[] = { "Speedy", "Fierce", "Tough", "Athletic", "Untouchable" };
- nameValue = (rand() % 5);
- modValue = (rand() % 5);
- returnName = person[nameValue];
- returnMod = modWord[modValue];
- int modArr[3];
- switch(modValue)
- {
- case 0:
- int modArr[3];
- modArr[0] = 0;
- modArr[0] = 0;
- modArr[0] = 1;
- case 1:
- int modArr[3];
- modArr[0] = 1;
- modArr[0] = 0;
- modArr[0] = 0;
- case 2:
- int modArr[3];
- modArr[0] = 0;
- modArr[0] = 1;
- modArr[0] = 0;
- case 3:
- int modArr[3];
- modArr[0] = 1;
- modArr[0] = 0;
- modArr[0] = 1;
- case 4:
- int modArr[3];
- modArr[0] = 0;
- modArr[0] = 0;
- modArr[0] = 2;
- default:
- int modArr[3];
- modArr[0] = 0;
- modArr[0] = 0;
- modArr[0] = 0;
- }
- temp.name = person[nameValue];
- temp.modWord = modWord[modValue];
- temp.attack = modArr[0];
- temp.attack = modArr[1];
- temp.evade = modArr[2];
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement