Okay, so I was sick today and I decided to devote my day to making a extremely basic battle sim. on C++, I just wanted some tips, and there are little bugs (huge) but please report them when you find them... blah blah
Like I said it is very basic. Here is the code: Code:
#include <iostream>
#include <cmath>
int main ()
{
using namespace std;
cout << "Welcome, to Jakes battle simulator 1000" << endl;
int Jake;
Jake = 100;
int JakeDam;
JakeDam = Jake / 4;
int Bad;
Bad = 50;
int BadDam;
BadDam = Bad / 4;
cout << "This is your hp and current damage." << endl << Jake << endl << JakeDam << endl;
system ("Pause");
cout << "the status of your opponet is this." << endl << Bad << endl << BadDam << endl;
system ("pause");
cout << "press 1 to attack you're opponet, press 2 to run like hell." << endl;
int pchoice;
cin >> pchoice;
if (pchoice <= 1 )
{
Bad = Bad - JakeDam;
cout << "bad is hit" << endl ;
system ("pause");
cout << "new bad hp = ";
cout << Bad << endl;
system ("pause");
cout << "You are hit!" << endl;
system ("pause");
Jake = Jake - BadDam;
cout << "You're new HP is: " << endl;
cout << Jake;
}
cout << "press 1 to attack you're opponet, press 2 to run like hell." << endl;
int r2;
cin >> r2;
if (r2 <= 1 )
{
Bad = Bad - JakeDam;
cout << "bad is hit" << endl ;
system ("pause");
cout << "new bad hp = ";
cout << Bad << endl;
system ("pause");
if (Bad <=0)
{
cout << "Bad is dead" ;
cout << endl;
cout << "end of simulation" << endl;
system ("pause");
return 0;
}
}
cout << "You are hit!" << endl;
system ("pause");
Jake = Jake - BadDam;
cout << "You're new HP is: " << endl;
cout << Jake;
}
I also wanted to include that I did this all by myself, after watching a few tut's of course 
Also note that it only goes up to round two currently, if you somehow make it go past that it will say "end of simulation"