2019-12-29 14:29:52 +00:00
|
|
|
#ifndef PKMNLIB_POKEMONSPECIES_HPP
|
|
|
|
#define PKMNLIB_POKEMONSPECIES_HPP
|
|
|
|
#include <Battling/Models/Creature.hpp>
|
2020-01-02 12:45:39 +00:00
|
|
|
#include "../Evolutions/EvolutionData.hpp"
|
2019-12-29 14:29:52 +00:00
|
|
|
#include "PokemonForme.hpp"
|
|
|
|
|
|
|
|
namespace PkmnLib::Library {
|
|
|
|
class PokemonSpecies : public CreatureLib::Library::CreatureSpecies {
|
|
|
|
private:
|
|
|
|
uint8_t _baseHappiness;
|
2020-01-02 12:45:39 +00:00
|
|
|
std::vector<EvolutionData> _evolutions;
|
2019-12-29 14:29:52 +00:00
|
|
|
|
|
|
|
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));
|
|
|
|
}
|
2020-01-02 12:45:39 +00:00
|
|
|
|
|
|
|
inline void AddEvolution(EvolutionData data) { _evolutions.push_back(data); }
|
|
|
|
const std::vector<EvolutionData>& GetEvolutions() const { return _evolutions; }
|
2019-12-29 14:29:52 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // PKMNLIB_POKEMONSPECIES_HPP
|