Merge pull request #460 from Sewef/master
Use SHINY_ODDS where necessary
This commit is contained in:
@@ -3100,7 +3100,7 @@ u8 DexScreen_DrawMonAreaPage(void)
|
|||||||
|
|
||||||
if (monIsCaught)
|
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.paletteNum = 2;
|
||||||
gSprites[sPokedexScreenData->windowIds[14]].oam.affineMode = 1;
|
gSprites[sPokedexScreenData->windowIds[14]].oam.affineMode = 1;
|
||||||
gSprites[sPokedexScreenData->windowIds[14]].oam.matrixNum = 2;
|
gSprites[sPokedexScreenData->windowIds[14]].oam.matrixNum = 2;
|
||||||
|
|||||||
+4
-4
@@ -1745,7 +1745,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
|
|||||||
{
|
{
|
||||||
value = Random32();
|
value = Random32();
|
||||||
shinyValue = HIHALF(value) ^ LOHALF(value) ^ HIHALF(personality) ^ LOHALF(personality);
|
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
|
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;
|
return gMonPaletteTable[0].data;
|
||||||
|
|
||||||
shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality);
|
shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality);
|
||||||
if (shinyValue < 8)
|
if (shinyValue < SHINY_ODDS)
|
||||||
return gMonShinyPaletteTable[species].data;
|
return gMonShinyPaletteTable[species].data;
|
||||||
else
|
else
|
||||||
return gMonPaletteTable[species].data;
|
return gMonPaletteTable[species].data;
|
||||||
@@ -5731,7 +5731,7 @@ const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u
|
|||||||
u32 shinyValue;
|
u32 shinyValue;
|
||||||
|
|
||||||
shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality);
|
shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality);
|
||||||
if (shinyValue < 8)
|
if (shinyValue < SHINY_ODDS)
|
||||||
return &gMonShinyPaletteTable[species];
|
return &gMonShinyPaletteTable[species];
|
||||||
else
|
else
|
||||||
return &gMonPaletteTable[species];
|
return &gMonPaletteTable[species];
|
||||||
@@ -5865,7 +5865,7 @@ static bool8 IsShinyOtIdPersonality(u32 otId, u32 personality)
|
|||||||
{
|
{
|
||||||
bool8 retVal = FALSE;
|
bool8 retVal = FALSE;
|
||||||
u32 shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality);
|
u32 shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality);
|
||||||
if (shinyValue < 8)
|
if (shinyValue < SHINY_ODDS)
|
||||||
retVal = TRUE;
|
retVal = TRUE;
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user