30 lines
1.1 KiB
C++
30 lines
1.1 KiB
C++
|
#ifndef PKMNLIB_POKEMONSPECIES_HPP
|
||
|
#define PKMNLIB_POKEMONSPECIES_HPP
|
||
|
#include <Battling/Models/Creature.hpp>
|
||
|
#include "PokemonForme.hpp"
|
||
|
|
||
|
namespace PkmnLib::Library {
|
||
|
class PokemonSpecies : public CreatureLib::Library::CreatureSpecies {
|
||
|
private:
|
||
|
uint8_t _baseHappiness;
|
||
|
|
||
|
public:
|
||
|
PokemonSpecies(uint16_t id, const std::string& name, const PokemonForme* defaultVariant, float genderRatio,
|
||
|
const std::string& growthRate, uint8_t captureRate, uint8_t baseHappiness)
|
||
|
: CreatureSpecies(id, name, defaultVariant, genderRatio, growthRate, captureRate),
|
||
|
_baseHappiness(baseHappiness) {}
|
||
|
|
||
|
inline uint8_t GetBaseHappiness() const { return _baseHappiness; }
|
||
|
|
||
|
inline const PokemonForme* GetDefaultForme() const {
|
||
|
return reinterpret_cast<const PokemonForme*>(CreatureSpecies::GetVariant("default"));
|
||
|
}
|
||
|
|
||
|
inline const PokemonForme* GetForme(const std::string& key) const {
|
||
|
return reinterpret_cast<const PokemonForme*>(CreatureSpecies::GetVariant(key));
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
#endif // PKMNLIB_POKEMONSPECIES_HPP
|