mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-09 13:15:07 +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)
|
||||
{
|
||||
u16 species;
|
||||
u16 newSpecies;
|
||||
u32 experience;
|
||||
struct Pokemon pokemon;
|
||||
|
||||
@ -254,6 +255,13 @@ static u16 TakeSelectedPokemonFromDaycare(struct DaycareMon *daycareMon)
|
||||
species = GetBoxMonData(&daycareMon->mon, MON_DATA_SPECIES);
|
||||
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)
|
||||
{
|
||||
experience = GetMonData(&pokemon, MON_DATA_EXP) + daycareMon->steps;
|
||||
|
Loading…
Reference in New Issue
Block a user