Skip to content

Pokecenters Disregard Eggs

Thomas Winwood edited this page Aug 28, 2020 · 3 revisions

Pokecenters Disregard Eggs

Credit to ghoulslash

In Gen4+, pokecenters disregarded eggs for the healing animation. This replicates that effect in Pokeemerald

Replace the relevant party count

Open src/field_effect.c. Change FldEff_PokecenterHeal like so.

bool8 FldEff_PokecenterHeal(void)
{
    u8 nPokemon;
    struct Task *task;

-    nPokemon = CalculatePlayerPartyCount();
+    nPokemon = CountPartyNonEggMons();
    task = &gTasks[CreateTask(Task_PokecenterHeal, 0xff)];
    task->tNumMons = nPokemon;
    task->tFirstBallX = 93;
    task->tFirstBallY = 36;
    task->tMonitorX = 124;
    task->tMonitorY = 24;
    return FALSE;
}

Allow field_effect.c to recognize CountPartyNonEggMons

Keep src/field_effect.c open. Add the following somewhere at the top:

#include "pokemon_storage_system.h"

Open include/pokemon_storage_system.h. Add the following to the bottom:

u8 CountPartyNonEggMons(void);
Clone this wiki locally