I am trying to build a battle program similar to most RPG's I am still not completely done with it yet but I was building it to check for erorrs and I keep getting the error stated above. If someone could help me that would be greatly appreciated. Also If someone could tell me how to use the random function I would appreciate it but I don't expect it since I can just find it on the net. Thank you all for your help.
CODE
#include<iostream>
using namespace std;
#include <string>
#include <iomanip>
#include <windows.h>
#include <dos.h>
int main (int argc, char * argv[]);
{
int Hero_HP;
int Hero_MP;
int Hero_AP;
int Hero_Strength;
int Hero_Dexterity;
int Hero_Intellegence;
int Hero_Attack;
int Hero_Defense;
int Hero_Accuracy;
int Potion_Inventory;
int Battle;
while (Battle = 1);
{
if (Battle = 1 )
{cout << "Your Options are " << '\n';
cout << "Attack - 1" << '\n';
cout << "Item - 2" << '\n';
}
if (Hero_Class == 1)
{
cout << "3 - Whirl Wind Attack";
cout << " This Attack will strike all the Enemies MP Cost: 5" << '\n';
cout << "4 - Wild Swing" << '\n';
cout << " Attack with low accurracy but if it hits will do critical damage MP Cost: 5" << '\n';
}
if (Hero_Class == 2)
{
cout << "3 - Hide" << '\n';
cout << " Makes player harder to hit for 5 turns MP Cost: 5" << '\n';
}
if (Hero_Class == 3)
{
cout << "Cure Light wounds - 3" << '\n';
cout << " Heals 20 HP MP Cost: 5" << '\n';
cout << "Fireball - 4" << '\n';
cout << " Shoot fire to damage enemies MP Cost: 5 " << '\n';
cout << "Energy Sheild - 5" << '\n';
cout << "Armor temporally Increased for 5 Turns MP Cost: 5" << '\n';
cout << "Firewall - 6" << '\n';
cout << "Sightly increase defence, if hit enemy also delt damage MP Cost: 10";
}
Player_Select;
cin >> Player_Choice;
Enemy_Select:
cout << "What Enemy do you want to hit ?";
cin >> Enemy_Choice;
if (Enemy_Choice == 1 && Enemy_HP_1 == 0)
{
cout << "That Enemy is dead please choose anouther";
goto Enemy_Select
}
if (Enemy_Choice == 2 && Enemy_HP_2 == 0)
{
cout << "That Enemy is dead please choose anouther";
goto Enemy_Select
}
if (Enemy_Choice == 3 && Enemy_HP_3 == 0)
{
cout << "That Enemy is dead please choose anouther";
goto Enemy_Select
}
if (Hero_Class == 1)
{
cout << "Please choose the Enemy you want to strike";
switch (Player_Choice)
{
case 1:
if (Enemy_Choice == 1)
{
if ( (Hero_Dexterity + RANDOM NUMBER) > (Enemy_Dexterity_1 + RANDOM NUMBER)
{
Enemy_HP_1 = Enemy_HP_1 - (3 *(1.5 * Current_Level);
}
}
if (Enemy_Choice == 2)
{
if ( (Hero_Dexterity + RANDOM NUMBER) > (Enemy_Dexterity_2 + RANDOM NUMBER)
{
Enemy_HP_2 = Enemy_HP_2 - (3 *(1.5 * Current_Level);
}
}
if (Enemy_Choice == 3)
{
if ( (Hero_Dexterity + RANDOM NUMBER) > (Enemy_Dexterity_3 + RANDOM NUMBER)
{
Enemy_HP_3 = Enemy_HP_3 - (3 *(1.5 * Current_Level);
}
}
break;
case 2:
if (Item_Choice == 1)
break;
case 3:
Enemy_HP_1 = Enemy_HP_1 - (3 *(1.25 * Current_Level);
Enemy_HP_2 = Enemy_HP_2 - (3 *(1.25 * Current_Level);
Enemy_HP_3 = Enemy_HP_3 - (3 *(1.25 * Current_Level);
break;
case 4:
if (Enemy_Choice == 1)
{
if ( (Hero_Dexterity + RANDOM NUMBER - 5) > (Enemy_Dexterity_1 + RANDOM NUMBER)
{
Enemy_HP_1 = Enemy_HP_1 - (3 *(2 * Current_Level);
}
}
if (Enemy_Choice == 2)
{
if ( (Hero_Dexterity + RANDOM NUMBER - 5) > (Enemy_Dexterity_2 + RANDOM NUMBER)
{
Enemy_HP_2 = Enemy_HP_2 - (3 *(2 * Current_Level);
}
}
if (Enemy_Choice == 3)
{
if ( (Hero_Dexterity + RANDOM NUMBER - 5) > (Enemy_Dexterity_3 + RANDOM NUMBER)
{
Enemy_HP_3 = Enemy_HP_3 - (3 *(2 * Current_Level);
}
}
}
}
if (Hero_Class == 2)
{
switch (Player_Choice)
{
case 1:
if (Enemy_Choice == 1)
{
if ( (Hero_Dexterity + RANDOM NUMBER) > (Enemy_Dexterity_1 + RANDOM NUMBER)
{
Enemy_HP_1 = Enemy_HP_1 - (3 *(1.5 * Current_Level);
}
}
if (Enemy_Choice == 2)
{
if ( (Hero_Dexterity + RANDOM NUMBER) > (Enemy_Dexterity_2 + RANDOM NUMBER)
{
Enemy_HP_2 = Enemy_HP_2 - (3 *(1.5 * Current_Level);
}
}
if (Enemy_Choice == 3)
{
if ( (Hero_Dexterity + RANDOM NUMBER) > (Enemy_Dexterity_3 + RANDOM NUMBER)
{
Enemy_HP_3 = Enemy_HP_3 - (3 *(1.5 * Current_Level);
}
}
break;
case 2:
if (Item_Choice == 1)
break;
case 3:
hide = 5;
break;
}
}
if (Hero_Class == 3)
{
switch (Player_Choice)
{
case 1:
if (Enemy_Choice == 1)
{
if ( (Hero_Dexterity + RANDOM NUMBER) > (Enemy_Dexterity_1 + RANDOM NUMBER)
{
Enemy_HP_1 = Enemy_HP_1 - (3 *(1.5 * Current_Level);
}
}
if (Enemy_Choice == 2)
{
if ( (Hero_Dexterity + RANDOM NUMBER) > (Enemy_Dexterity_2 + RANDOM NUMBER)
{
Enemy_HP_2 = Enemy_HP_2 - (3 *(1.5 * Current_Level);
}
}
if (Enemy_Choice == 3)
{
if ( (Hero_Dexterity + RANDOM NUMBER) > (Enemy_Dexterity_3 + RANDOM NUMBER)
{
Enemy_HP_3 = Enemy_HP_3 - (3 *(1.5 * Current_Level);
}
}
break;
case 2:
if (Item_Choice == 1)
break;
case 3:
Hero_HP = Hero_HP + 20;
break;
case 4:
if (Enemy_Choice == 1)
{
if ( (Hero_Dexterity + RANDOM NUMBER) > (Enemy_Dexterity_1 + RANDOM NUMBER)
{
Enemy_HP_1 = Enemy_HP_1 - (3 *(1.5 * Current_Level);
}
}
if (Enemy_Choice == 2)
{
Enemy_HP_2 = Enemy_HP_2 - (3 *(1.5 * Current_Level);
}
if (Enemy_Choice == 3)
{
Enemy_HP_3 = Enemy_HP_3 - (3 *(1.5 * Current_Level);
}
break;
case 5:
Energy_Sheild = 5;
break;
case 6:
Energy_Sheild = 5;
break;
}
}
Enemy1(ATTACKS)
Enemy2(ATTACKS)
Enemy3(ATTACKS)
End If
if (Enemy_1_HP = 0 & Enemy_2_HP = 0 & Enemy_3_HP = 0)
{
Battle = 0
}
}
}