Implemented OW_IGNORE_EGGS_ON_HEAL (#4888)

* Implemented OW_IGNORE_EGGS_ON_HEAL

* Removed videos and change nPokemon to u32

* Changed OW_IGNORE_EGGS_ON_HEAL to GEN_LATEST per https://github.com/rh-hideout/pokeemerald-expansion/pull/4888\#issuecomment-2205271486

* Update include/config/overworld.h

Fixed spelling error per https://github.com/rh-hideout/pokeemerald-expansion/pull/4888#discussion_r1664454436

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
This commit is contained in:
psf 2024-07-04 07:03:42 -07:00 committed by GitHub
parent 47426406c3
commit 2a5e4343c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 6 deletions

View file

@ -82,8 +82,11 @@
#define OW_POPUP_BW_COLOR_WHITE 1 // White pop-up from W2
// Configuration
#define OW_POPUP_BW_COLOR OW_POPUP_BW_COLOR_BLACK // B2W2 use different colors for their map pop-ups.
#define OW_POPUP_BW_COLOR OW_POPUP_BW_COLOR_BLACK // B2W2 use different colors for their map pop-ups.
#define OW_POPUP_BW_TIME_MODE OW_POPUP_BW_TIME_NONE // Determines what type of time is shown.
#define OW_POPUP_BW_ALPHA_BLEND FALSE // Enables alpha blending/transparency for the pop-ups. Mainly intended to be used with the black color option.
// Pokémon Center
#define OW_IGNORE_EGGS_ON_HEAL GEN_LATEST // In Gen 4+, the nurse in the Pokémon Center does not heal Eggs on healing machine.
#endif // GUARD_CONFIG_OVERWORLD_H

View file

@ -75,5 +75,6 @@ void SetWaldaPhrase(const u8 *src);
bool32 IsWaldaPhraseEmpty(void);
void EnterPokeStorage(u8 boxOption);
u32 CountPartyNonEggMons(void);
#endif // GUARD_POKEMON_STORAGE_SYSTEM_H

View file

@ -20,6 +20,7 @@
#include "palette.h"
#include "party_menu.h"
#include "pokemon.h"
#include "pokemon_storage_system.h"
#include "script.h"
#include "sound.h"
#include "sprite.h"
@ -1015,10 +1016,10 @@ void MultiplyPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b)
bool8 FldEff_PokecenterHeal(void)
{
u8 nPokemon;
u32 nPokemon;
struct Task *task;
nPokemon = CalculatePlayerPartyCount();
nPokemon = (OW_IGNORE_EGGS_ON_HEAL <= GEN_3) ? CalculatePlayerPartyCount() : CountPartyNonEggMons();
task = &gTasks[CreateTask(Task_PokecenterHeal, 0xff)];
task->tNumMons = nPokemon;
task->tFirstBallX = 93;

View file

@ -1436,9 +1436,9 @@ s16 GetFirstFreeBoxSpot(u8 boxId)
return -1; // all spots are taken
}
u8 CountPartyNonEggMons(void)
u32 CountPartyNonEggMons(void)
{
u16 i, count;
u32 i, count;
for (i = 0, count = 0; i < PARTY_SIZE; i++)
{
@ -6538,7 +6538,7 @@ static void ReleaseMon(void)
if (OW_PC_RELEASE_ITEM >= GEN_8)
item = GetBoxMonDataAt(boxId, sCursorPosition, MON_DATA_HELD_ITEM);
}
PurgeMonOrBoxMon(boxId, sCursorPosition);
if (item != ITEM_NONE)
AddBagItem(item, 1);