diff options
author | PikalaxALT <PikalaxALT@users.noreply.github.com> | 2020-05-29 16:50:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-29 16:50:37 -0400 |
commit | 24075e9e7299327288737d7347e9c83ac391c787 (patch) | |
tree | 97b4c00e3ffc5725927bd6428e0ed14350ee4595 /src | |
parent | e0ae696479d629694ce55bffe0fd4599d734fc78 (diff) | |
parent | e27c3d2abdce7e88e6110e5633a4c88f4065799b (diff) |
Merge pull request #1061 from GriffinRichards/fix-egg
Clear up misleading egg step name
Diffstat (limited to 'src')
-rw-r--r-- | src/daycare.c | 18 | ||||
-rw-r--r-- | src/egg_hatch.c | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/daycare.c b/src/daycare.c index dcbadeba8..5d4480403 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -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 { diff --git a/src/egg_hatch.c b/src/egg_hatch.c index 3bc35bc4a..a6c39f12b 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -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++) |