Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions Pokemon/Header/Pokemon/Pokemon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ namespace N_Pokemon
{
class Pokemon {
public:
string name;
PokemonType type;
int health;
int maxHealth;
int attackPower;


// Default constructor
Pokemon();

Expand All @@ -34,5 +29,17 @@ namespace N_Pokemon
void takeDamage(int damage);

bool isFainted() const;

//getters and setters
string getName();

void setName(string _name);

protected:
string name;
PokemonType type;
int health;
int maxHealth;
int attackPower;
};
}
17 changes: 17 additions & 0 deletions Pokemon/Header/Pokemon/Pokemons/Bulbasaur.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#pragma once
#include "../Pokemon.hpp"

namespace N_Pokemon {
namespace N_Pokemons {

class Bulbasaur : public Pokemon {
public:
Bulbasaur();

private:
int leafBlade_dmg;
void leafBlade(Pokemon& target);
};

}
}
17 changes: 17 additions & 0 deletions Pokemon/Header/Pokemon/Pokemons/Caterpie.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#pragma once
#include "../Pokemon.hpp"

namespace N_Pokemon {
namespace N_Pokemons {

class Caterpie : public Pokemon {
public:
Caterpie();

private:
int bugBite_dmg;
void bugBite(Pokemon& target);
};

}
}
17 changes: 17 additions & 0 deletions Pokemon/Header/Pokemon/Pokemons/Charmander.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#pragma once
#include "../Pokemon.hpp"

namespace N_Pokemon {
namespace N_Pokemons {

class Charmander : public Pokemon {
public:
Charmander();

private:
int flameThrower_dmg;
void flameThrower(Pokemon& target);
};

}
}
16 changes: 16 additions & 0 deletions Pokemon/Header/Pokemon/Pokemons/Pidgey.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once
#include "../Pokemon.hpp"

namespace N_Pokemon {
namespace N_Pokemons {

class Pidgey : public Pokemon {
public:
Pidgey();

private:
int wingAttack_dmg;
void WingAttack(Pokemon& target);
};
}
}
17 changes: 17 additions & 0 deletions Pokemon/Header/Pokemon/Pokemons/Pikachu.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#pragma once
#include "../Pokemon.hpp"

namespace N_Pokemon {
namespace N_Pokemons {

class Pikachu : public Pokemon {
public:
Pikachu();

private:
int thunderShock_dmg;
void thunderShock(Pokemon& target);
};

}
}
17 changes: 17 additions & 0 deletions Pokemon/Header/Pokemon/Pokemons/Squitle.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#pragma once
#include "../Pokemon.hpp"

namespace N_Pokemon {
namespace N_Pokemons {

class Squitle : public Pokemon {
public:
Squitle();

private:
int waterGun_dmg;
void waterGun(Pokemon& target);
};

}
}
12 changes: 12 additions & 0 deletions Pokemon/Pokemon.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@
<ClCompile Include="Src\Character\Player\Player.cpp" />
<ClCompile Include="Src\Pokemon\Pokemon.cpp" />
<ClCompile Include="Src\Character\ProfessorOak.cpp" />
<ClCompile Include="Src\Pokemon\Pokemons\Bulbasaur.cpp" />
<ClCompile Include="Src\Pokemon\Pokemons\Charmander.cpp" />
<ClCompile Include="Src\Pokemon\Pokemons\Pidgey.cpp" />
<ClCompile Include="Src\Pokemon\Pokemons\Caterpie.cpp" />
<ClCompile Include="Src\Pokemon\Pokemons\Pikachu.cpp" />
<ClCompile Include="Src\Pokemon\Pokemons\Squirtle.cpp" />
<ClCompile Include="Src\Utility\Utility.cpp" />
<ClCompile Include="Src\Battle\WildEncounterManager.cpp" />
</ItemGroup>
Expand All @@ -177,6 +183,12 @@
<ClInclude Include="Header\Character\Player\Player.hpp" />
<ClInclude Include="Header\Pokemon\Pokemon.hpp" />
<ClInclude Include="Header\Pokemon\PokemonChoice.hpp" />
<ClInclude Include="Header\Pokemon\Pokemons\Bulbasaur.hpp" />
<ClInclude Include="Header\Pokemon\Pokemons\Charmander.hpp" />
<ClInclude Include="Header\Pokemon\Pokemons\Pidgey.hpp" />
<ClInclude Include="Header\Pokemon\Pokemons\Caterpie.hpp" />
<ClInclude Include="Header\Pokemon\Pokemons\Pikachu.hpp" />
<ClInclude Include="Header\Pokemon\Pokemons\Squitle.hpp" />
<ClInclude Include="Header\Pokemon\PokemonType.hpp" />
<ClInclude Include="Header\Character\ProfessorOak.hpp" />
<ClInclude Include="Header\Utility\Utility.hpp" />
Expand Down
36 changes: 36 additions & 0 deletions Pokemon/Pokemon.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,24 @@
<ClCompile Include="Src\Battle\BattleManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Src\Pokemon\Pokemons\Pikachu.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Src\Pokemon\Pokemons\Pidgey.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Src\Pokemon\Pokemons\Caterpie.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Src\Pokemon\Pokemons\Bulbasaur.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Src\Pokemon\Pokemons\Charmander.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Src\Pokemon\Pokemons\Squirtle.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Header\Character\Player\Player.hpp">
Expand Down Expand Up @@ -74,5 +92,23 @@
<ClInclude Include="Header\Battle\BattleState.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Header\Pokemon\Pokemons\Pikachu.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Header\Pokemon\Pokemons\Pidgey.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Header\Pokemon\Pokemons\Caterpie.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Header\Pokemon\Pokemons\Bulbasaur.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Header\Pokemon\Pokemons\Charmander.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Header\Pokemon\Pokemons\Squitle.hpp">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
Binary file modified Pokemon/Pokemon/x64/Debug/Pokemon.ilk
Binary file not shown.
9 changes: 6 additions & 3 deletions Pokemon/Pokemon/x64/Debug/Pokemon.log
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
 BattleManager.cpp
Game.cpp
Pokemon.cpp
 Bulbasaur.cpp
Charmander.cpp
Pidgey.cpp
Caterpie.cpp
Pikachu.cpp
Squirtle.cpp
Generating Code...
Pokemon.vcxproj -> C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\x64\Debug\Pokemon.exe
Binary file modified Pokemon/Pokemon/x64/Debug/Pokemon.tlog/CL.command.1.tlog
Binary file not shown.
Binary file modified Pokemon/Pokemon/x64/Debug/Pokemon.tlog/CL.read.1.tlog
Binary file not shown.
Binary file modified Pokemon/Pokemon/x64/Debug/Pokemon.tlog/CL.write.1.tlog
Binary file not shown.
6 changes: 6 additions & 0 deletions Pokemon/Pokemon/x64/Debug/Pokemon.tlog/Cl.items.tlog
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,11 @@ C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\main.cpp;C:\Users\wasis
C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Src\Character\Player\Player.cpp;C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Pokemon\x64\Debug\Player.obj
C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Src\Pokemon\Pokemon.cpp;C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Pokemon\x64\Debug\Pokemon.obj
C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Src\Character\ProfessorOak.cpp;C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Pokemon\x64\Debug\ProfessorOak.obj
C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Src\Pokemon\Pokemons\Bulbasaur.cpp;C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Pokemon\x64\Debug\Bulbasaur.obj
C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Src\Pokemon\Pokemons\Charmander.cpp;C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Pokemon\x64\Debug\Charmander.obj
C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Src\Pokemon\Pokemons\Pidgey.cpp;C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Pokemon\x64\Debug\Pidgey.obj
C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Src\Pokemon\Pokemons\Caterpie.cpp;C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Pokemon\x64\Debug\Caterpie.obj
C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Src\Pokemon\Pokemons\Pikachu.cpp;C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Pokemon\x64\Debug\Pikachu.obj
C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Src\Pokemon\Pokemons\Squirtle.cpp;C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Pokemon\x64\Debug\Squirtle.obj
C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Src\Utility\Utility.cpp;C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Pokemon\x64\Debug\Utility.obj
C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Src\Battle\WildEncounterManager.cpp;C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Pokemon\x64\Debug\WildEncounterManager.obj
Binary file modified Pokemon/Pokemon/x64/Debug/Pokemon.tlog/link.command.1.tlog
Binary file not shown.
Binary file modified Pokemon/Pokemon/x64/Debug/Pokemon.tlog/link.read.1.tlog
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
^C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\BATTLEMANAGER.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\GAME.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\MAIN.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\PLAYER.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\POKEMON.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\PROFESSOROAK.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\UTILITY.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\WILDENCOUNTERMANAGER.OBJ
^C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\BATTLEMANAGER.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\BULBASAUR.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\CATERPIE.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\CHARMANDER.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\GAME.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\MAIN.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\PIDGEY.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\PIKACHU.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\PLAYER.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\POKEMON.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\PROFESSOROAK.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\SQUIRTLE.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\UTILITY.OBJ|C:\USERS\WASIS\ONEDRIVE\DESKTOP\MY REPOS\POKEMON\POKEMON\POKEMON\X64\DEBUG\WILDENCOUNTERMANAGER.OBJ
C:\Users\wasis\OneDrive\Desktop\My repos\Pokemon\Pokemon\Pokemon\x64\Debug\Pokemon.ilk
Binary file modified Pokemon/Pokemon/x64/Debug/Pokemon.tlog/link.write.1.tlog
Binary file not shown.
Binary file modified Pokemon/Pokemon/x64/Debug/vc143.idb
Binary file not shown.
Binary file modified Pokemon/Pokemon/x64/Debug/vc143.pdb
Binary file not shown.
6 changes: 3 additions & 3 deletions Pokemon/Src/Battle/BattleManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace N_Battle
battleState.wildPokemon = &wildPokemon;
battleState.playerTurn = true; // Player starts first
battleState.battleOngoing = true;
std::cout << "A wild " << wildPokemon.name << " appeared!\n";
std::cout << "A wild " << wildPokemon.getName() << " appeared!\n";
battle();
}

Expand Down Expand Up @@ -42,10 +42,10 @@ namespace N_Battle

void BattleManager::handleBattleOutcome() {
if (battleState.playerPokemon->isFainted()) {
std::cout << battleState.playerPokemon->name << " has fainted! You lose the battle.\n";
std::cout << battleState.playerPokemon->getName() << " has fainted! You lose the battle.\n";
}
else {
std::cout << "You defeated the wild " << battleState.wildPokemon->name << "!\n";
std::cout << "You defeated the wild " << battleState.wildPokemon->getName() << "!\n";
}
}

Expand Down
2 changes: 1 addition & 1 deletion Pokemon/Src/Character/Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace N_Character
chosenPokemon = N_Pokemon::Pokemon("Pikachu", N_Pokemon::PokemonType::ELECTRIC, 100, 10);
break;
}
cout << "Player " << name << " chose " << chosenPokemon.name << "!\n";
cout << "Player " << name << " chose " << chosenPokemon.getName() << "!\n";
Utility::waitForEnter();
}
}
Expand Down
4 changes: 2 additions & 2 deletions Pokemon/Src/Main/Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace N_Game

caveGrass = {"Cave", {Pokemon {"Zubat", PokemonType::POISON, 30, 10}, Pokemon {"Geodude", PokemonType::ROCK, 50, 10}}, 80};

shallowWater = {"Cave", {Pokemon {"Staryu", PokemonType::WATER, 40, 10}, Pokemon {"Tentacool", PokemonType::POISON, 40, 10}}, 80};
shallowWater = {"water", {Pokemon {"Staryu", PokemonType::WATER, 40, 10}, Pokemon {"Tentacool", PokemonType::POISON, 40, 10}}, 80};
}

void Game::gameLoop(Player& player) {
Expand Down Expand Up @@ -51,7 +51,7 @@ namespace N_Game
case 2: {
std::cout << "You head to the PokeCenter.\n";
player.chosenPokemon.heal();
std::cout << player.chosenPokemon.name << "'s health is fully restored!\n";
std::cout << player.chosenPokemon.getName() << "'s health is fully restored!\n";
break;
}
case 5: {
Expand Down
10 changes: 10 additions & 0 deletions Pokemon/Src/Pokemon/Pokemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,15 @@ namespace N_Pokemon
{
health = maxHealth;
}

string Pokemon::getName()
{
return (Pokemon::name);
}

void Pokemon::setName(string _name)
{
Pokemon::name = _name;
}
}

20 changes: 20 additions & 0 deletions Pokemon/Src/Pokemon/Pokemons/Bulbasaur.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include "../../../Header/Pokemon/Pokemons/Bulbasaur.hpp"
#include "../../../Header/Pokemon/PokemonType.hpp"
#include <iostream>

namespace N_Pokemon {
namespace N_Pokemons {

using namespace std;

Bulbasaur::Bulbasaur() : Pokemon("Bulbasaur", PokemonType::ELECTRIC, 100, 20)
{
leafBlade_dmg = 15;
}

void Bulbasaur::leafBlade(Pokemon& target) {
cout << name << " uses Thunder Shock on " << target.getName() << "!\n";
target.takeDamage(leafBlade_dmg);
}
}
}
20 changes: 20 additions & 0 deletions Pokemon/Src/Pokemon/Pokemons/Caterpie.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include "../../../Header/Pokemon/Pokemons/Caterpie.hpp"
#include "../../../Header/Pokemon/PokemonType.hpp"
#include <iostream>

namespace N_Pokemon {
namespace N_Pokemons {

using namespace std;

Caterpie::Caterpie() : Pokemon("Pikachu", PokemonType::ELECTRIC, 100, 20)
{
bugBite_dmg = 15;
}

void Caterpie::bugBite(Pokemon& target) {
cout << name << " uses Wing Attack on " << target.getName() << "!\n";
target.takeDamage(bugBite_dmg);
}
}
}
20 changes: 20 additions & 0 deletions Pokemon/Src/Pokemon/Pokemons/Charmander.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include "../../../Header/Pokemon/Pokemons/Charmander.hpp"
#include "../../../Header/Pokemon/PokemonType.hpp"
#include <iostream>

namespace N_Pokemon {
namespace N_Pokemons {

using namespace std;

Charmander::Charmander() : Pokemon("Charmander", PokemonType::ELECTRIC, 100, 20)
{
flameThrower_dmg = 15;
}

void Charmander::flameThrower(Pokemon& target) {
cout << name << " uses Thunder Shock on " << target.getName() << "!\n";
target.takeDamage(flameThrower_dmg);
}
}
}
Loading