Adds function to set IsEgg on Pokemon
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2021-06-27 12:21:02 +02:00
parent 733c1d0ce4
commit 4633c6beef
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
2 changed files with 2 additions and 0 deletions

View File

@ -54,6 +54,7 @@ SIMPLE_GET_FUNC(Pokemon, GetFriendship, uint8_t)
export void PkmnLib_Pokemon_SetFriendship(Pokemon* p, u8 value) { p->SetFriendship(value); }
export void PkmnLib_Pokemon_ChangeFriendship(Pokemon* p, i8 amount) { p->ChangeFriendship(amount); }
SIMPLE_GET_FUNC(Pokemon, IsEgg, bool)
export void PkmnLib_Pokemon_SetIsEgg(Pokemon* p, bool value) { p->SetIsEgg(value); }
export u8 PkmnLib_Pokemon_Evolve(Pokemon* p, const PkmnLib::Library::PokemonSpecies* species,

View File

@ -62,6 +62,7 @@ namespace PkmnLib::Battling {
return _effortValues.SetStat(stat, value);
}
inline bool IsEgg() const noexcept { return _isEgg; }
inline void SetIsEgg(bool value) noexcept { _isEgg = value; }
inline ArbUt::BorrowedPtr<const PkmnLib::Library::PokemonSpecies> GetPokemonSpecies() const noexcept {
return _species.As<const PkmnLib::Library::PokemonSpecies>();