mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-24 20:30:18 +01:00
Form change on daycare withdraw
This commit is contained in:
parent
3655fe52f3
commit
c0040b5ce5
@ -247,6 +247,7 @@ static void ApplyDaycareExperience(struct Pokemon *mon)
|
|||||||
static u16 TakeSelectedPokemonFromDaycare(struct DaycareMon *daycareMon)
|
static u16 TakeSelectedPokemonFromDaycare(struct DaycareMon *daycareMon)
|
||||||
{
|
{
|
||||||
u16 species;
|
u16 species;
|
||||||
|
u16 newSpecies;
|
||||||
u32 experience;
|
u32 experience;
|
||||||
struct Pokemon pokemon;
|
struct Pokemon pokemon;
|
||||||
|
|
||||||
@ -254,6 +255,13 @@ static u16 TakeSelectedPokemonFromDaycare(struct DaycareMon *daycareMon)
|
|||||||
species = GetBoxMonData(&daycareMon->mon, MON_DATA_SPECIES);
|
species = GetBoxMonData(&daycareMon->mon, MON_DATA_SPECIES);
|
||||||
BoxMonToMon(&daycareMon->mon, &pokemon);
|
BoxMonToMon(&daycareMon->mon, &pokemon);
|
||||||
|
|
||||||
|
newSpecies = GetFormChangeTargetSpecies(&pokemon, FORM_WITHDRAW, 0);
|
||||||
|
if (newSpecies != SPECIES_NONE) {
|
||||||
|
SetMonData(&pokemon, MON_DATA_SPECIES, &newSpecies);
|
||||||
|
CalculateMonStats(&pokemon);
|
||||||
|
species = newSpecies;
|
||||||
|
}
|
||||||
|
|
||||||
if (GetMonData(&pokemon, MON_DATA_LEVEL) != MAX_LEVEL)
|
if (GetMonData(&pokemon, MON_DATA_LEVEL) != MAX_LEVEL)
|
||||||
{
|
{
|
||||||
experience = GetMonData(&pokemon, MON_DATA_EXP) + daycareMon->steps;
|
experience = GetMonData(&pokemon, MON_DATA_EXP) + daycareMon->steps;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user