summaryrefslogtreecommitdiff
path: root/src/daycare.c
diff options
context:
space:
mode:
authorKurausukun <lord.uber1@gmail.com>2020-12-10 23:30:52 -0500
committerKurausukun <lord.uber1@gmail.com>2020-12-10 23:30:52 -0500
commit58976ebaa8d73d174940f622ec36f22bcd2fd8a2 (patch)
treec27ab24ed83fdb16654b5814d681af487b119601 /src/daycare.c
parent32ae13f9b66ab1b01146e5746e9350f97f055526 (diff)
parent8d29f65c6c7f34aa53ae2e7ae3e4f34a95025602 (diff)
Merge remote-tracking branch 'upstream/master' into berry_crush
Diffstat (limited to 'src/daycare.c')
-rw-r--r--src/daycare.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/daycare.c b/src/daycare.c
index 1490d3742..60bff8f1e 100644
--- a/src/daycare.c
+++ b/src/daycare.c
@@ -22,7 +22,6 @@
#include "constants/items.h"
#include "constants/moves.h"
#include "constants/region_map_sections.h"
-#include "constants/species.h"
// this file's functions
static void ClearDaycareMonMail(struct DayCareMail *mail);
@@ -549,7 +548,12 @@ static void InheritIVs(struct Pokemon *egg, struct DayCare *daycare)
{
// Randomly pick an IV from the available list and stop from being chosen again.
selectedIvs[i] = availableIVs[Random() % (NUM_STATS - i)];
- RemoveIVIndexFromList(availableIVs, i);
+ // BUG: Instead of removing the IV that was just picked (like in RS and FRLG), this
+ // removes position 0 (HP) then position 1 (DEF), then position 2. This is why HP and DEF
+ // have a lower chance to be inherited in Emerald and why the IV picked for inheritance can
+ // be repeated. Uncomment the inline comment and remove the existing expression to get the
+ // intended behavior and to match the other Gen 3 games.
+ RemoveIVIndexFromList(availableIVs, i /*selectedIvs[i]*/);
}
// Determine which parent each of the selected IVs should inherit from.
@@ -1183,7 +1187,7 @@ static void DaycareAddTextPrinter(u8 windowId, const u8 *text, u32 x, u32 y)
printer.y = y;
printer.currentX = x;
printer.currentY = y;
- printer.style = 0;
+ printer.unk = 0;
gTextFlags.useAlternateDownArrow = 0;
printer.letterSpacing = 0;
printer.lineSpacing = 1;