Merge pull request #1061 from GriffinRichards/fix-egg

Clear up misleading egg step name
This commit is contained in:
PikalaxALT 2020-05-29 16:50:37 -04:00 committed by GitHub
commit 24075e9e72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 11 deletions

View File

@ -4,7 +4,7 @@
void ScriptHatchMon(void);
bool8 CheckDaycareMonReceivedMail(void);
void EggHatch(void);
u8 GetEggStepsToSubtract(void);
u8 GetEggCyclesToSubtract(void);
u16 CountPartyAliveNonEggMons(void);
#endif // GUARD_EGG_HATCH_H

View File

@ -892,11 +892,11 @@ static bool8 TryProduceOrHatchEgg(struct DayCare *daycare)
TriggerPendingDaycareEgg();
}
// Hatch Egg
// Try to hatch Egg
if (++daycare->stepCounter == 255)
{
u32 steps;
u8 toSub = GetEggStepsToSubtract();
u32 eggCycles;
u8 toSub = GetEggCyclesToSubtract();
for (i = 0; i < gPlayerPartyCount; i++)
{
@ -905,15 +905,15 @@ static bool8 TryProduceOrHatchEgg(struct DayCare *daycare)
if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_IS_BAD_EGG))
continue;
steps = GetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP);
if (steps != 0)
eggCycles = GetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP);
if (eggCycles != 0)
{
if (steps >= toSub)
steps -= toSub;
if (eggCycles >= toSub)
eggCycles -= toSub;
else
steps -= 1;
eggCycles -= 1;
SetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP, &steps);
SetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP, &eggCycles);
}
else
{

View File

@ -865,7 +865,7 @@ static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed)
AddTextPrinterParameterized4(windowId, 1, x, y, 0, 0, sEggHatchData->textColor, speed, string);
}
u8 GetEggStepsToSubtract(void)
u8 GetEggCyclesToSubtract(void)
{
u8 count, i;
for (count = CalculatePlayerPartyCount(), i = 0; i < count; i++)