Alright, the damage is 2, the hp is 5, yet one hit kills:
This isn't the final part of the script, I test often so I don't cp my errorsCode:battle() { time_t seconds; time(&seconds); srand((unsigned int) seconds); int monhp; int monmaxhp; char mon[20]; int monid; char command[10]; int monmp; int monsp; int monatk; int dmg; monid = rand()%10; strcpy(mon,"Zerra"); monhp = 5; monatk = 1; dmg = 2; monmaxhp = monhp; while (monhp >= 1) { cout << mon << "\nHP: " << monhp <<"/"<< monmaxhp; cout << "What will you do?\n: "; cin >> command; if (strcmp(command,"attack") == 0) { monhp = monmp - dmg; cout << "You dealt " << dmg << " points of dammage.\n"; strcpy(command,"new"); } cout << "The "<<mon<<" has died"; } // end loop return 0; } //end function protocol