mirror of
https://github.com/pret/pokeemerald.git
synced 2026-03-21 17:54:57 -05:00
Prevent Shiny in pokedex
XOR with shiny odds to prevent this. The pokemon is only for display purposes so just edit the pokedex OTID. Fixes #2148
This commit is contained in:
parent
25ffb2c12c
commit
ea130e064f
|
|
@ -4669,7 +4669,15 @@ static u32 GetPokedexMonPersonality(u16 species)
|
|||
u16 CreateMonSpriteFromNationalDexNumber(u16 nationalNum, s16 x, s16 y, u16 paletteSlot)
|
||||
{
|
||||
nationalNum = NationalPokedexNumToSpecies(nationalNum);
|
||||
|
||||
// Prevent cases where a pokedex pokemon can be shiny.
|
||||
#ifdef BUGFIX
|
||||
u32 personality = GetPokedexMonPersonality(nationalNum);
|
||||
u32 pokedexOTID = personality ^ SHINY_ODDS; // Make sure the XOR comes out as not shiny.
|
||||
return CreateMonPicSprite_HandleDeoxys(nationalNum, pokedexOTID, personality, TRUE, x, y, paletteSlot, TAG_NONE);
|
||||
#else
|
||||
return CreateMonPicSprite_HandleDeoxys(nationalNum, SHINY_ODDS, GetPokedexMonPersonality(nationalNum), TRUE, x, y, paletteSlot, TAG_NONE);
|
||||
#endif
|
||||
}
|
||||
|
||||
static u16 CreateSizeScreenTrainerPic(u16 species, s16 x, s16 y, s8 paletteSlot)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user