From 3f157b5293b54466c5f4d54b600e9097163fc241 Mon Sep 17 00:00:00 2001 From: ExpoSeed <43502820+ExpoSeed@users.noreply.github.com> Date: Sun, 15 Nov 2020 16:24:19 -0600 Subject: [PATCH 1/2] Document bugged IV inheritance difference --- src/daycare.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/daycare.c b/src/daycare.c index a438c8e857..369fe14e82 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -548,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 remove the existing expression to get the intended behavior and + // to match the other Gen 3 games. This bug was also in DP and never fixed until Platinum. + RemoveIVIndexFromList(availableIVs, i /*selectedIvs[i]*/); } // Determine which parent each of the selected IVs should inherit from. From e5f043ff72d7652f63ee574d9f0acf8f1a8ddbe7 Mon Sep 17 00:00:00 2001 From: ExpoSeed <43502820+ExpoSeed@users.noreply.github.com> Date: Sun, 15 Nov 2020 16:28:09 -0600 Subject: [PATCH 2/2] Fix grammar --- src/daycare.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/daycare.c b/src/daycare.c index 369fe14e82..fd6ed3a509 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -551,8 +551,8 @@ static void InheritIVs(struct Pokemon *egg, struct DayCare *daycare) // 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 remove the existing expression to get the intended behavior and - // to match the other Gen 3 games. This bug was also in DP and never fixed until Platinum. + // 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]*/); }