#ifndef PKMNLIB_POKEMON_HPP #define PKMNLIB_POKEMON_HPP #include #include #include "../../Library/Statistic.hpp" #include "../Library/BattleLibrary.hpp" #include "LearnedMove.hpp" namespace PkmnLib::Battling { class Pokemon : public CreatureLib::Battling::Creature { private: CreatureLib::Library::StatisticSet _individualValues; CreatureLib::Library::StatisticSet _effortValues; Arbutils::CaseInsensitiveConstString _nature; const BattleLibrary* GetLibrary() const { return reinterpret_cast(_library); } public: Pokemon(const BattleLibrary* library, const Library::PokemonSpecies* species, const Library::PokemonForme* forme, uint8_t level, uint32_t experience, uint32_t uid, CreatureLib::Library::Gender gender, uint8_t coloring, const Library::Item* heldItem, const std::string& nickname, const CreatureLib::Library::TalentIndex& talent, List moves, CreatureLib::Library::StatisticSet individualValues, CreatureLib::Library::StatisticSet effortValues, const Arbutils::CaseInsensitiveConstString& nature) : CreatureLib::Battling::Creature(library, species, forme, level, experience, uid, gender, coloring, heldItem, nickname, talent, std::move(moves)), _individualValues(individualValues), _effortValues(effortValues), _nature(nature) {} const Library::PokemonForme* GetForme() const { return dynamic_cast(GetVariant()); } const bool IsShiny() const { return _coloring == 1; } const std::vector& GetMoves() const { return reinterpret_cast&>(_attacks); } const Library::Nature& GetNature() const; uint8_t GetIndividualValue(CreatureLib::Library::Statistic stat) const { return _individualValues.GetStat(stat); } uint8_t GetEffortValue(CreatureLib::Library::Statistic stat) const { return _effortValues.GetStat(stat); } }; } #endif // PKMNLIB_POKEMON_HPP