YAPOG  0.0.1
Yet Another Pokemon Online Game
PokemonMoveTable.cpp
Go to the documentation of this file.
2 
4 #include "Pokemon/Pokemon.hpp"
5 
6 namespace yse
7 {
11 
13  : pokemonID_ (1)
14  {
15  }
16 
18  const Pokemon& pokemon,
19  const yap::ID& index)
20  {
21  pokemonID_ = pokemon.GetUniqueID ();
22  index_ = index;
23 
25  pokemon.GetMoveSet ().GetMoves ();
26 
27  if (moves[index.GetValue ()] == nullptr)
28  {
30  pp_ = DEFAULT_PP;
32  }
33  else
34  {
35  staticID_ = moves[index.GetValue ()]->GetStaticID ();
36  pp_ = moves[index.GetValue ()]->GetCurrentPP ();
37  maxPP_ = moves[index.GetValue ()]->GetMaxPP ();
38  }
39  }
40 
41 } // namespace yse