Document bugged IV inheritance difference

This commit is contained in:
ExpoSeed 2020-11-15 16:24:19 -06:00 committed by GitHub
parent 7172ea35f9
commit 3f157b5293
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.