diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-08-19 13:37:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-19 13:37:01 -0400 |
commit | 9ad143bf24e986fc56b1fb228c376c78f05723b2 (patch) | |
tree | acd94733b2b5673f206398abf3ae3f8e5c6ee5dd /src | |
parent | f77e1a9901e0e0e4fca20c35fdeb3c3175dc3947 (diff) | |
parent | c7473dac0ba85362eff0d777f5d24386bc0602c2 (diff) |
Merge pull request #460 from Sewef/master
Use SHINY_ODDS where necessary
Diffstat (limited to 'src')
-rw-r--r-- | src/pokedex_screen.c | 2 | ||||
-rw-r--r-- | src/pokemon.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/pokedex_screen.c b/src/pokedex_screen.c index 5b0105fcb..19f1a03fb 100644 --- a/src/pokedex_screen.c +++ b/src/pokedex_screen.c @@ -3100,7 +3100,7 @@ u8 DexScreen_DrawMonAreaPage(void) if (monIsCaught) { - sPokedexScreenData->windowIds[14] = CreateMonPicSprite_HandleDeoxys(species, 8, DexScreen_GetDefaultPersonality(species), TRUE, 40, 104, 0, 0xFFFF); + sPokedexScreenData->windowIds[14] = CreateMonPicSprite_HandleDeoxys(species, SHINY_ODDS, DexScreen_GetDefaultPersonality(species), TRUE, 40, 104, 0, 0xFFFF); gSprites[sPokedexScreenData->windowIds[14]].oam.paletteNum = 2; gSprites[sPokedexScreenData->windowIds[14]].oam.affineMode = 1; gSprites[sPokedexScreenData->windowIds[14]].oam.matrixNum = 2; diff --git a/src/pokemon.c b/src/pokemon.c index 350395763..39cc2f636 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -1745,7 +1745,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV, { value = Random32(); shinyValue = HIHALF(value) ^ LOHALF(value) ^ HIHALF(personality) ^ LOHALF(personality); - } while (shinyValue < 8); + } while (shinyValue < SHINY_ODDS); } else if (otIdType == OT_ID_PRESET) //Pokemon has a preset OT ID { @@ -5712,7 +5712,7 @@ const u32 *GetMonSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 p return gMonPaletteTable[0].data; shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality); - if (shinyValue < 8) + if (shinyValue < SHINY_ODDS) return gMonShinyPaletteTable[species].data; else return gMonPaletteTable[species].data; @@ -5731,7 +5731,7 @@ const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u u32 shinyValue; shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality); - if (shinyValue < 8) + if (shinyValue < SHINY_ODDS) return &gMonShinyPaletteTable[species]; else return &gMonPaletteTable[species]; @@ -5865,7 +5865,7 @@ static bool8 IsShinyOtIdPersonality(u32 otId, u32 personality) { bool8 retVal = FALSE; u32 shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality); - if (shinyValue < 8) + if (shinyValue < SHINY_ODDS) retVal = TRUE; return retVal; } |