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
|
int main()
{
//Attacks! (no need to inherit and create a new struct)
Attack HydroPump("Hydro Pump", 120, 0, 5, 75, "Water");
Attack TBolt("Thunderbolt", 100, 0, 10, 100, "Electric");
Attack ElectroBall("Electro Ball", 150, 50, 10, 100, "Elecric");
Attack FireBlast("Fire Blast", 150, 0, 5, 80, "Fire");
Attack Crunch("Crunch", 90, 0, 30, 100, "Dark");
Attack Superpower("Superpower", 30, 120, 10, 90, "Fighting");
Attack Earthquake("Earthquake", 100, 0, 10, 100, "Ground");
Attack Psychic("Psychic", 90, 0, 25, 100, "Psychic");
Attack ShadowBall("Shadow Ball", 90, 0, 30, 100, "Ghost");
Attack RockSlide("Rock Slide", 100, 0, 10, 90, "Rock");
Attack Explosion("Explosion", 300, 999999, 5, 100, "Normal");
Attack StoneEdge("Stone Edge", 120, 30, 10, 100, "Ground");
Attack Recover("Recover", 0, 0, 30, 100, "Normal");
Attack FlashCannon("Flash Cannon", 100, 0, 20, 100, "Steel");
Attack Scald("Scald", 100, 0, 30, 100, "Water");
Attack IceBeam("Ice Beam", 100, 0, 20, 100, "Ice");
//Attack lists for Pokemon
vector<Attack> GolemAttack{ Earthquake, RockSlide, Explosion, StoneEdge };
vector<Attack> ShedinjaAttack{ HydroPump, TBolt, Psychic, FireBlast };
vector<Attack> LuxrayAttack{ TBolt, ElectroBall, Superpower, Crunch };
vector<Attack> StarmieAttack{ TBolt, HydroPump, Recover, Psychic };
vector<Attack> EmpoleonAttack{ Scald, FlashCannon, HydroPump, IceBeam };
//Pokemon!
Pokemon Golem("Golem", "Rock", "Ground", 80, 120, 130, 55, 65, 45, GolemAttack);
Pokemon Luxray("Luxray", "Electric", "\0", 80, 120, 79, 95, 79, 70, LuxrayAttack);
Pokemon Starmie("Starmie", "Water", "Psychic", 60, 75, 85, 100, 85, 115, StarmieAttack);
Pokemon Empoleon("Empoleon", "Steel", "Water", 84, 86, 88, 111, 101, 60, EmpoleonAttack);
Pokemon Shedinja("Shedinja", "Ghost", "Bug", 1, 90, 45, 30, 30, 40, ShedinjaAttack);
// Actual stuff below
string input;
string input2;
Pokemon* YourPKMN = nullptr;
Pokemon* EnemyPKMN = nullptr;
cout << "Welcome to the Pokemon Battle Simulator! Player 1, choose your Pokemon! (Has to be spelled correctly, capital first letter)\n";
cin >> input;
cout << endl;
if (input == "Golem") {
YourPKMN = &Golem;
}
else if (input == "Luxray"){
YourPKMN = &Luxray;
}
else if (input == "Starmie") {
YourPKMN = &Starmie;
}
else if (input == "Empoleon") {
YourPKMN = &Empoleon;
}
else if (input == "Shedinja") {
YourPKMN == &Shedinja;
}
cout << "Player 2, choose your Pokemon!\n";
cin >> input2;
if (input2 == "Golem") {
EnemyPKMN = &Golem;
}
else if (input2 == "Luxray") {
EnemyPKMN = &Luxray;
}
else if (input2 == "Starmie") {
EnemyPKMN = &Starmie;
}
else if (input2 == "Empoleon") {
EnemyPKMN = &Empoleon;
}
else if (input2 == "Shedinja") {
EnemyPKMN == &Shedinja;
}
do
{
"Player 1, choose a move!\n";
for (auto Move = Pokemon.attackList.begin(); Move != Pokemon.attackList.end(); Move++)
{
cout << Move->getName() << " | " << Move->getPP() << " PP\n";
}
} while (YourPKMN && EnemyPKMN != nullptr);
}
| |