|
|
|
|
|
|
|
|
|
|
|
|
string Monster::GetType() { return Type; } void Monster::SetType(string x) { Type = x; } int Monster::GetAttack() { return Atk; } void Monster::SetAttack(int x) { Atk = x; } int Monster::GetDefense() { return Def; } void Monster::SetDefense(int x) { Def = x; } int Monster::GetSpAttack() { return SpAtk; } void Monster::SetSpAttack(int x) { SpAtk = x; } int Monster::GetSpDefense() { return SpDef; } void Monster::SetSpDefense(int x) { SpDef = x; } int Monster::GetHealth() { return HP; } void Monster::SetHealth(int x) { HP = x; } int Monster::GetSpeed() { return Speed; } void Monster::SetSpeed(int x) { Speed = x; } string Monster::GetAdvantage() { return Advantage; } void Monster::SetAdvantage(string x) { Advantage = x; } string Monster::GetDisadvantage() { return Disadvantage; } void Monster::SetDisadvantage(string x) { Disadvantage = x; } string Monster::GetMonsterName() { return MonsterName; } void Monster::SetMonsterName(string x) { MonsterName = x; } int Monster::GetLevel() { return Level; } void Monster::SetLevel(int x) { Level = x; } int Monster::GetExperience() { return Experience; } void Monster::SetExperience(int x) { Experience = x; } |
string Monster::GetType() { return Type; } void Monster::SetType(string x) { Type = x; } int Monster::GetAttack() { return Atk; } void Monster::SetAttack(int x) { Atk = x; } int Monster::GetDefense() { return Def; } void Monster::SetDefense(int x) { Def = x; } int Monster::GetSpAttack() { return SpAtk; } void Monster::SetSpAttack(int x) { SpAtk = x; } int Monster::GetSpDefense() { return SpDef; } void Monster::SetSpDefense(int x) { SpDef = x; } int Monster::GetHealth() { return HP; } void Monster::SetHealth(int x) { HP = x; } int Monster::GetSpeed() { return Speed; } void Monster::SetSpeed(int x) { Speed = x; } string Monster::GetAdvantage() { return Advantage; } void Monster::SetAdvantage(string x) { Advantage = x; } string Monster::GetDisadvantage() { return Disadvantage; } void Monster::SetDisadvantage(string x) { Disadvantage = x; } string Monster::GetMonsterName() { return MonsterName; } void Monster::SetMonsterName(string x) { MonsterName = x; } int Monster::GetLevel() { return Level; } void Monster::SetLevel(int x) { Level = x; } int Monster::GetExperience() { return Experience; } void Monster::SetExperience(int x) { Experience = x; } |
Moves move; Moves move1; Moves move2; Moves move3; Moves move4; |
|
|
|
|
|
|
|
|
|
|
lines 5,14-16,30,56 in battlephase function is where the use the data(part 1), and in line 1-4 (part 3) is where i give values to them (in post 6 on this page) |
Nope, you give data to the globals but never use them |
that is the problem i am trying to solve, can you please help me fix that, as that was the whole reason why i created the thread in the first place |
Move1
, Move2
etc, but you do not use them anywhere in your code. Instead, you are using the data members Monster::move1
, Monster::move2
etc, which you have not initialised.
Move1
appears nowhere in your posted code, apart from where it is initialised.move1
, which you do not initialise anywhere.Move1
and move1
are considered to be different names.