/*Game Engine Can Be USed As A Attack Sequence*/
#include
#include
#include
int move;
int health = 16;
int attack = 6;
int armor = 2; //creates variables for health ect...
int super = 8; //
//
int health1 = 20;//
int attack1 = 8;//
int armor1 = 2; //
int super12 = 2;//
//
int *are_health = 0; //
int *his_health = 0; //
int *are_grid = 0;// creates pointers to use in new variables
int *super_count = 0; //
void create()
{
are_health = new int;
his_health = new int;
are_grid = new int;
super_count = new int;
}
void fill()
{
*are_health = 20;
*his_health = 20;
}
void deleter()
{
delete his_health;
delete are_health;
delete are_grid;
delete super_count;
}
int hit;
int main()
{
create();
fill();
/* rand/srand example */
/* initialize random generator */
srand ( time(NULL) );
int go = 1;
int count = 0;
int j = 0;
do
{
/* generate some random numbers */
int monster_attack = rand()%10;
int attack_us = rand()%10;
cout << "What Attack do You Want To Use. Press 1 To Attack Or 9 To Use Your Super Attack.";
cin >> hit;
if(attack_us == 1)
{
cout << "Are Attack Misses\n\n";
}
else
{
if(hit == 1)
{
*his_health = *his_health - 4;
cout << "We Attack The Monster His new Health Is " << *his_health << "\n\n";
}
else
{
*his_health = *his_health - 7;
cout << "We Use Are Super Attack On The Monster His new Health Is " << *his_health << "\n\n";
}
}
if(monster_attack <= 4)
{
*are_health = *are_health - 7;
cout << "The Monster Attacks Us Are Health Is: " << *are_health << "\n\n";
}
else if(monster_attack == 5)
{
cout << "The Monster\'s Attack Misses\n\n";
}
else
{
*are_health = *are_health - 2;
cout << "The Monster Attacks Us With His Super Attack Are Health Is: " << *are_health << "\n\n";
}
}
while((*his_health != 0) && (*are_health != 0) && (*his_health > 0) && (*are_health > 0));
deleter();
return 0;
}