ok so i worked on this during lunch at school since i was bored, but here it is so far.
#include <iostream>
#include <cmath>
int main()
{
using namespace std;
int badguy1;
int action1;
int action;
int att;
int def;
int health;
int shop;
int action2;
int action3;
int action4;
int gold;
badguy1 = 100;
health = 100;
att = 10;
def = 10;
gold = 200;
cout << "main menu" << endl;
cout << "what do you want to do?" << endl;
cout << "1. fight a monster , 2. train attack , 3. train defense , 4. enter the shop , 5. fight the boss" << endl;
cin >> action1;
if (action1 == 1 || action1 == 1.)
{
cout << " you have chosen to fight" << endl;
cout << " the enemy you are fighting has " << badguy1 << " health" << endl;
cout << " you health is " << health << endl;
cout << " now what move will you use?" << endl;
cout << " 1. attack , 2. defend. 3. run" << endl;
cin >> action;
if (action == 1. || action == 1)
{
cout << " you did 10 damage, but your enemy did 8 to you" << endl;
badguy1 = 90;
health = 92;
cout << " now your enemy has " << badguy1 << " health" << endl;
cout << " now you health is " << health << endl;
cout << " now what move will you use?" << endl;
cout << " 1. attack , 2. defend. 3. run" << endl;
cin >> action2;
if (action2 == 1. || action2 == 1)
{
cout << "CRITICAL HIT! you did 25 damage! your enemy was so scared they couldnt hit you" << endl;
badguy1 = 65;
cout << " now your enemy has " << badguy1 << " health" << endl;
cout << " now you health is " << health << endl;
cout << " now what move will you use?" << endl;
cout << " 1. attack , 2. defend. 3. run" << endl;
cin >> action3;
if (action3 == 1. || action3 == 1)
{
cout << "you did a combo hit and did 70 damage! your enemy did 50 to you" << endl;
health = 42;
badguy1 = 0;
cout << " now your enemy has " << badguy1 << " health" << endl;
cout << " now you health is " << health << endl;
cout << " you killed your enemy!" << endl;
cout << " now chose your loot" << endl;
cout << " 1. 75 gold , 2. 50 gold and 3 attack points , 3. 50 gold and 3 defense points , 4. 6 attack points , 5. 6 defense points , 6. 3 attack points and 3 defense points." << endl;
cin >> action4;
if (action4 == 1. || action4 == 1)
{
gold = 275;
cout << "you now have " << gold << " gold" << endl;
}
else if(action4 == 2. || action4 == 2)
{
gold = 250;
att = 13;
cout << " you now have " << gold << " gold and " << att << " attack points" << endl;
}
else if(action4 == 3. || action4 == 3)
{
gold = 250;
def = 13;
cout << " you now have " << gold << " gold and " << def << " defense points" << endl;
}
else if(action4 == 5. || action4 == 5)
{
def = 16;
cout << " you now have" << def << " defense points" << endl;
}
else if(action4 == 4. || action4 == 4)
{
att = 16;
cout << " you now have" << att << " attack points" << endl;
}
else if(action4 == 6. || action4 == 6)
{
att = 13;
def = 13;
cout << " you now have" << att << " attack points and " << def << "defense points" << endl;
}
else cout << " you lose" << endl;
}
else cout << " you lose" << endl;
}
else cout << " you lose" << endl;
}
else cout << " you lose" << endl;
}
system("pause");
return 0;
}
theres spots here where i know i could use something to make it better but not sure...
anyone have any ideas?
and ideas of things i should add etc.
thanks!