Help with battle sequences in Pokemon style game

Hi, I'm new to the forums and c++. I'm creating a Pokemon style game and I'm trying to figure out a way to have the "pokemon" I collect level up after getting a certain amount of experience.

I would like to know if there is a simple way to express this within a class without having to designate another class to the leveled up Pokemon. Also, I have battle sequences which involve one friendly pokemon battling an enemy monster. How would I switch between pokemon in battles if i have collected more than one (i.e. if I wanted to "tag in" another pokemon to fight the same enemy)?

Sorry if this is all too vague. Any help is appreciated. I have more code than this but I'm restricted to 8192 characters...

This is the class I'm working with:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
class Gmon
{
public:
	Gmon(const string& name = "", string move1 = "", string move2 = "", string move3 = "", string move4 = "", int attack1 = 0, int attack2 = 0, int attack3 = 0, int attack4 = 0, int health = 0, int experience = 0, int power = 0);
	
	string m_Name;
	string m_Move1;
	string m_Move2;
	string m_Move3;
	string m_Move4;
	

	int m_Attack1;
	int m_Attack2;
	int m_Attack3;
	int m_Attack4;
	int m_Health;
	int m_Experience;
	int m_Power;
  
	
   
	
	
	
    void SetAttack1( int m_eHealth);
	void SetAttack2( int m_eHealth);
	void SetAttack3( int m_eHealth);
	void SetAttack4( int m_eHealth);
	
	/*void SeteAttack(int m_Health);*/

	int GetAttack1(int m_eHealth);
	int GetAttack2(int m_eHealth);
	int GetAttack3(int m_eHealth);
	int GetAttack4(int m_eHealth);
	

	int GeteAttack1(int m_Health);
	int GeteAttack2(int m_Health);
	int GeteAttack3(int m_Health);
	int GeteAttack4(int m_Health);
    
};
Gmon::Gmon(const string& name, string move1, string move2, string move3, string move4, int attack1, int attack2 , int attack3, int attack4, int health, int experience, int power):
		m_Name(name), m_Move1(move1), m_Move2(move2), m_Move3(move3), m_Move4(move4), m_Attack1(attack1), m_Attack2(attack2), m_Attack3(attack3), m_Attack4(attack4), m_Health(health), m_Experience(experience), m_Power(power)
		{}
class Emon : public Gmon
{
public:
Emon(const string& name = "", string move1 = "", string move2 = "", string move3 = "", string move4 = "", int attack1 = 0, int attack2 = 0, int attack3 = 0, int attack4 = 0, int ehealth = 0);
		
	
	int m_eHealth;
	int ehealth;
		
		 
	};
Emon::Emon(const string& name, string move1, string move2, string move3, string move4, int attack1, int attack2 , int attack3, int attack4, int ehealth):
		Gmon (name,move1,move2,move3,move4,attack1,attack2 ,attack3,attack4), m_eHealth(ehealth)  //This means Emon will share the constructor with Gmon
		{}


		



	 





	Gmon Dog("Flare, the Pyro Dog", "Flaming Piss", "Fireball", "Ash Fart", "Volcanic Carchase",8,13,24,30,160,0,50);
	Gmon Turtle("Oogway, the Lax Turtle", "Slow Wit", "Turtle Fur", "Shell Spin", "Kamikaze Half Shell Breakdance",9,14,22,35,175,0,50);
	Gmon Plant("Bud, the Quick-Witted Plant", "Pulsating Vine", "Hydroponic Hypnosis", "...as a Kite", "Vulva Flytrap",8,13,20,27,140,0,50);
	Emon EKitty("Kitty Kaaat", "Panic Pee", "Calculated Clawing", "Vicious Pounce", "Spaztic Maul",7,14,21,25,120);
	Emon EBlob("Blob", "Slimy Slap", "Amorphous Absorption", "Enervating Envelop", "Insane in the Membrane",6,15,20,26,140);
	Emon EBat("Ozzy", "Prepared Pierce", "Sucky Sucky", "Swarming Fangs", "Bite It's Freakin Head Off!",8,16,24,32,155);
	Emon EGrr("Grr", "Jockey","Yut", "Shin kick","Fancy Pants",10,20,30,40,200);


And this is a sample of one of the attack sequences:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
while ((attack != 'a') && (attack != 'b') && (attack != 'c') && (attack != 'd') && (attack != 'e'));
	srand(static_cast<unsigned int>(time(0)));
		
		int enemy=rand();
		int enemyattack=((enemy %4)+1);
		   system ("cls");
		   {
				 if (attack == 'a')
					{
					 GetAttack1(EKitty.m_eHealth);
					}
		  
				else if (attack == 'b')
					{
					 GetAttack2(EKitty.m_eHealth);
					}
				else if (attack == 'c')
					{
					GetAttack3(EKitty.m_eHealth);
					}
				 else if (attack == 'd')
				 {
				   GetAttack4(EKitty.m_eHealth);
				 }
				else if (attack == 'e')
				{
					 char invchoice = 'a' && 'b' && 'c';
				while ((invchoice != 'a') && (invchoice != 'b') && (invchoice != 'c'))
				{
					 cout << "What item would you like to you use?\n"
							 "A. Wazu Healing Potion: " << healthpotion <<
							 "\nB. Power Potion: " << powerpotion <<
							 "\nC. Iron Skin Potion: " << ironskinpotion << endl;
					
					 cin >> invchoice;
				
				}
					 
					 {
						 if (invchoice == 'a')
						 {
							 {
								 if (healthpotion > 0)
								 {
							 cout << "You use the Wazu Healing Potion and your Gmon heals 50 Points!";
								 healthpotion=healthpotion-1; health=health+50;
								 system("pause");
								 system ("cls");
								 }
								 else if (healthpotion <=0)
								 {
									 cout << "You do not have any healing potions";
									 system("pause");
									 system ("cls");
								 }
							 }

						 }
						 else if (invchoice == 'b')
						 {
							 {
								 if (powerpotion > 0)
								 {
							 cout << "You use the Power Potion and your Gmon gains 50 Power Points!";
								 powerpotion=powerpotion-1; gpower=gpower+50;
								 system("pause");
								 system ("cls");
								 }
								 else if (powerpotion <=0)
								 {
									 cout << "You do not have any Power potions";
									 system("pause");
									 system ("cls");
								 }
							 }
						 }
						 else if (invchoice == 'c')
						 {
							 {
								 if (ironskinpotion > 0)
								 {
							 cout << "You use Iron Skin Potion and your Gmon heals 100 Points!";
								 ironskinpotion=ironskinpotion-1; health=health+100;
								 system("pause");
								 system ("cls");
								 }
								 else if (ironskinpotion <=0)
								 {
									 cout << "You do not have any Iron Skin Potions";
									 system("pause");
									 system ("cls");
								 }
							 }
						 }
					 }
				 
		
				 
		}
		   
		
		   {
		if (enemyattack == 1)
		{
			EKitty.GeteAttack1(m_Health);

		}
		
		if (enemyattack == 2)
		{
			EKitty.GeteAttack2(m_Health);

		}
		
		if (enemyattack == 3)
		{
			EKitty.GeteAttack3(m_Health);

		}
		
		if (enemyattack == 4)
		{
			EKitty.GeteAttack4(m_Health);

		}

}
}

}
}
Topic archived. No new replies allowed.