shiny roll calc as separate function

This commit is contained in:
cawtds 2024-07-06 02:10:30 +02:00
parent 91550eb75f
commit 3babd7f130
3 changed files with 7 additions and 1 deletions

View File

@ -42,5 +42,6 @@ u16 GetLocalWaterMon(void);
bool8 UpdateRepelCounter(void);
bool8 TryDoDoubleWildBattle(void);
bool8 StandardWildEncounter_Debug(void);
u32 CalculateChainFishingShinyRolls(void);
#endif // GUARD_WILD_ENCOUNTER_H

View File

@ -1151,7 +1151,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
if (LURE_STEP_COUNT != 0)
totalRerolls += 1;
if (I_FISHING_CHAIN && gIsFishingEncounter)
totalRerolls += (2 * gChainFishingDexNavStreak);
totalRerolls += CalculateChainFishingShinyRolls();
while (GET_SHINY_VALUE(value, personality) >= SHINY_ODDS && totalRerolls > 0)
{

View File

@ -869,6 +869,11 @@ bool8 DoesCurrentMapHaveFishingMons(void)
return FALSE;
}
u32 CalculateChainFishingShinyRolls(void)
{
return (2 * gChainFishingDexNavStreak);
}
static void UpdateChainFishingSpeciesAndStreak(u32 species)
{
if (!I_FISHING_CHAIN)