Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (enemyrandomattack == 4 && enemyDodge == 1) // if the enemy rolls a dodge action and already had dodge it will then use a normal attack instead of dodging again
- {
- enemy Dodge = 0; // it uses up the dodge and then attacks \/
- normalattack lines of code // i have attack instuctions over there but i cut them so you could see better
- }
- if (enemyrandomattack == 4 && enemyDodge != 1) // if the enemy does no have dodge it will then dodge
- {
- enemyDodge = 1;
- if (enemyNRG < 40)
- {
- enemyNRG = (enemyNRG + 5); // enemy gains 5 energy at the end of the turn because the player dodged and the energy gain is halved
- if (enemyNRG > 40)
- {
- enemyNRG = 40;
- }
- }
- cout << "The enemy decided to dodge the next attack!" << endl;
- cout << "Your creature has " << yourHP << " HP and " << yourNRG << " energy and the enemy has " << enemyHP << " HP and " << enemyNRG << " energy" << endl << endl << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement