From 4633c6beef6ce28432c3caad601557b6684ceb57 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 27 Jun 2021 12:21:02 +0200 Subject: [PATCH] Adds function to set IsEgg on Pokemon --- CInterface/Battling/Pokemon.cpp | 1 + src/Battling/Pokemon/Pokemon.hpp | 1 + 2 files changed, 2 insertions(+) diff --git a/CInterface/Battling/Pokemon.cpp b/CInterface/Battling/Pokemon.cpp index 1f9fd73..4684279 100644 --- a/CInterface/Battling/Pokemon.cpp +++ b/CInterface/Battling/Pokemon.cpp @@ -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, diff --git a/src/Battling/Pokemon/Pokemon.hpp b/src/Battling/Pokemon/Pokemon.hpp index 7dba165..d142064 100644 --- a/src/Battling/Pokemon/Pokemon.hpp +++ b/src/Battling/Pokemon/Pokemon.hpp @@ -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 GetPokemonSpecies() const noexcept { return _species.As();