Hey guys, I'm trying to make a game which is kinda similar to pokemon
When my current monster is dead, the next monster will pop up
I'm trying to find a way to implement this function
This is my current code structure:
void battle(){
int attack = 10;
int enemyAttack = 15;
int playerHealth = 20;
int enemeyHealth = 100;
for (int i = 0; i<mPlayer->getMonsterSize();i++)
{
do{
playerHealth -= enemyAttack;
enemyHealth -= playerAttack;
} while (maxHealth >0 && enemyHealth>0);
}
}
So basically I have 6 monster in my monsterSize.
Can anyone please suggest a way to help me finish my game?
Sorry, I forgot to mention that I already have a monster array which is showed here getMonsterSize().
I also have a struct for attack health and other status like agility and strength