Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct monster{
- int rep_count;
- int bi_count;
- int hum_count;
- int hy_count;
- vector<string> mon_count;
- }mob;
- mob.rep_count = 50;
- mob.bi_count = 95;
- mob.hum_count = 50; //Sets up the number of monsters you have to kill to win
- mob.hy_count = 5;
- for(int i=mob.bi_count;i>0;i--){
- mob.mon_count.push_back("bird");
- }
- for(int i=mob.rep_count;i>0;i--){
- mob.mon_count.push_back("reptile");
- mob.mon_count.push_back("humanoid");
- }
- for(int i=mob.hy_count;i>0;i--){
- mob.mon_count.push_back("hybrid");
- }
- int freq = rand() % 200 + 1;
- string f_mon = mob.mon_count[freq];
- if(f_mon=="bird"){
- mob.bird();
- mob.mon_count.erase(mob.mon_count.begin()+freq);
- }
- else if(f_mon=="reptile"){
- mob.reptile();
- mob.mon_count.erase(mob.mon_count.begin()+freq);
- }
- else if(f_mon=="humanoid"){
- mob.humanoid();
- mob.mon_count.erase(mob.mon_count.begin()+freq);
- }
- else{
- mob.hybrid();
- mob.mon_count.erase(mob.mon_count.begin()+freq);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement