From ea130e064fafce3053bdf09be6dc0460921a97ce Mon Sep 17 00:00:00 2001 From: AZero13 <83477269+SiliconA-Z@users.noreply.github.com> Date: Tue, 17 Mar 2026 20:59:12 -0400 Subject: [PATCH] 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 --- src/pokedex.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/pokedex.c b/src/pokedex.c index 96eedafad5..b6e585d76a 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -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)