Add P_CAN_FORGET_HIDDEN_MOVE (#4968)

* Added P_CAN_FORGET_HMS

* Renamed to can forget hidden move

* Bypass IsLastMonThatKnowsSurf

* Fixed typo

* Moved P_CAN_FORGET_HIDDEN_MOVE

* Update src/party_menu.c per https://github.com/rh-hideout/pokeemerald-expansion/pull/4968#discussion_r1677033837

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-14 02:23:49 -07:00 committed by GitHub
parent c721f1b04a
commit d410f56a8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 3 deletions

View file

@ -46,6 +46,7 @@
#define P_EV_CAP GEN_LATEST // Since Gen 6, the max EVs per stat is 252 instead of 255.
#define P_SHOW_TERA_TYPE GEN_8 // Since Gen 9, the Tera Type is shown on the summary screen.
#define P_TM_LITERACY GEN_LATEST // Since Gen 6, TM illiterate Pokémon can learn TMs that teach moves that are in their level-up learnsets.
#define P_CAN_FORGET_HIDDEN_MOVE FALSE // If TRUE, Pokémon can forget any move, even if it is a Hidden Move.
#define P_EGG_CYCLE_LENGTH GEN_LATEST // Since Gen 8, egg cycles take half as many steps as before.
#define P_TWO_FRAME_FRONT_SPRITES TRUE // In Pokémon Emerald, Pokémon front sprites always consist of two frames. This config can revert it to only use the first frame, as is the case in the other Gen 3 games.
#define P_ONLY_OBTAINABLE_SHINIES FALSE // If TRUE, Pokémon encountered in the Battle Pyramid won't be shiny.

View file

@ -7762,6 +7762,6 @@ void IsLastMonThatKnowsSurf(void)
}
}
if (AnyStorageMonWithMove(move) != TRUE)
gSpecialVar_Result = TRUE;
gSpecialVar_Result = !P_CAN_FORGET_HIDDEN_MOVE;
}
}

View file

@ -5839,6 +5839,10 @@ const u32 *GetMonSpritePalFromSpecies(u16 species, bool32 isShiny, bool32 isFema
bool8 IsMoveHM(u16 move)
{
int i = 0;
if (P_CAN_FORGET_HIDDEN_MOVE)
return FALSE;
while (sHMMoves[i] != HM_MOVES_END)
{
if (sHMMoves[i++] == move)