#include <iostream>
//NAMESPACE
usingnamespace std;
//MY VARIABLES
long a = 0;
long b = 1;//never changes
long c = 2;//never changes
long d = 0;
long e = 0;
long f = 3;//never changes
long Attack = 0;
long Defence = 0;
long Health = 0;
long Damage = 0;
long OAttack = 0;
long ODefence = 0;
long OHealth = 0;
long Battlephase = 0;
long Number = 0;
long Void = 0;
//CALLS MY FUNCTIONS
void Program();//calls the Program function
void Character();//calls the Character function
void TypeCharacter();//calls the TypeCharacter function
void Rules();//calls the Rules function
void Stat();//calls the Stat function
void YourAdvantageDisadvantage();//calls the YourAdvantageDisadvantage function
void OponentAdvantageDisadvantage();//calls the OponentAdvantageDisadvantage function
void Battlephase();//calls the Battlephase function
//EXECUTES THE PROGRAM
int main()
{
Program();
Character();
TypeCharacter();
Rules();
Stat();
YourAdvantageDisadvantage();
OponentAdvantageDisadvantage();
Battlephase();
system("PAUSE");
return 0;
}
void Program()
{
cout << "Please note this program will only work if you press ENTER after each responce."<< endl;
}
void Character()
{
cout << "What character do you want?" << endl << endl;
cout << "There is a fire type who specializes with fire attacks. (#1)" << endl;
cout << "There is a water type who specializes with water attacks. (#2)" << endl;
cout << "There is a nature type who specializes with nature attacks. (#3)" << endl << endl;
cout << "Please enter the number of the monster you would like.";
cin >> a;
cout << endl;
}
void TypeCharacter()
{
if(a == b)
{
e = 1;
cout << "You chose the fire type." << endl << "It does twice as much damage on nature types and half as much damage on water types.";
}
elseif(a == c)
{
e = 2;
cout << "You chose the water type." << endl << "It does twice as much damage on fire types and half as much damage on nature types.";
}
else{e = 3;
cout << "You chose the nature type." << endl << "It does twice as much damage on water types and half as much damage on fire types."<< endl << endl;
;
}
}
void Rules()
{
cout << "Each of your characters battle." << endl;
cout << "You each alternate by taking turns. " << endl;
cout << "Since you are a beginner you will go first." << endl << endl;
cout << "To continue, type a number.";
cin >> d;
cout << endl;
}
void Stat()
{
if(e == b)
{
cout << "Your fire type has the following stats" <<endl <<endl;
}
elseif(a == c)
{
cout << "Your water type has the following stats" <<endl <<endl;
}
else{
cout << "Your nature type has the following stats"<<endl <<endl;
;
}
Attack = 10;
Defence = 2;
Health = 40;
OAttack = 10;
ODefence = 2;
OHealth = 40;
cout << "Attack:" << Attack << endl << "Defense:" << Defence << endl <<
"Health:" << Health << endl << endl;
cout <<"Your opponent sent out a water type."<<endl;
cout <<"Its stats are"<<endl<<endl;
cout << "Attack:" << OAttack << endl << "Defense:" << ODefence << endl <<
"Health:" << OHealth << endl << endl;
cout << "Type a number to continue.";
}
void YourAdvantageDisadvantage()
{
//fire
if(e == b)
{
Attack = Attack / 2;
}
//water
if(e == c)
{
Attack = Attack + 0;
}
//nature
if (e == f)
{
Attack = Attack * 2;
}
}
void OponentAdvantageDisadvantage()
{
//water vs fire
if(e == b)
{
OAttack = OAttack * 2;
}
//water vs water
if(e == c)
{
OAttack = OAttack + 0;
}
//water vs nature
if (e == f)
{
OAttack = OAttack / 2;
}
cin >> d;
cout << endl;
}
void Battlephase()
{
cout <<"Let the battle begin!"<<endl;
YouAttack:
{
if(Health != Number)
{
{
cout << "You attacked and dealt " << Attack <<" Damage" <<endl;
OHealth = OHealth - Attack;
cout << "Your opponents health is " << OHealth <<endl <<endl;
}
if(OHealth == Number)
{
cout <<"You Win!"<<endl<<endl;
}
if (OHealth > Number)goto OpponentAttack;
}
}
OpponentAttack:
{
if(OHealth != Number)
{
{
cout << "Your opponent attacked and dealt " << OAttack <<" Damage" <<endl;
Health = Health - OAttack;
cout << "Your health is " << Health <<endl <<endl;
}
if(Health == Number)
{
cout <<"You Lose :("<<endl<<endl;
}
if (Health > Number)goto YouAttack;
}
}
}