diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2020-12-14 20:00:59 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-14 20:00:59 -0500 |
commit | 18a5feb413827ee5641e9a21e8e90ba0e9a90142 (patch) | |
tree | 5b486cd8f42cf734099c0e9a4a3aea37f33c30e6 /src/daycare.c | |
parent | 6dea3374d2277468828c71ef1fb083d85cdcd2ff (diff) | |
parent | f7a729df3079041d3cc462a44919150f4ebdf19f (diff) |
Merge pull request #1269 from GriffinRichards/bugfix
Use BUGFIX for some inline fixes
Diffstat (limited to 'src/daycare.c')
-rw-r--r-- | src/daycare.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/daycare.c b/src/daycare.c index d849b39f3..96f62d5bf 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -551,13 +551,15 @@ static void InheritIVs(struct Pokemon *egg, struct DayCare *daycare) // 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. Amusingly, FRLG and RS also got this wrong. They remove selectedIvs[i], which - // is not an index! This means that it can sometimes remove the wrong stat. To fix, delete - // the following two lines and uncomment the rest of the block. + // is not an index! This means that it can sometimes remove the wrong stat. + #ifndef BUGFIX selectedIvs[i] = availableIVs[Random() % (NUM_STATS - i)]; RemoveIVIndexFromList(availableIVs, i); - // u8 index = Random() % (NUM_STATS - i); - // selectedIvs[i] = availableIVs[index]; - // RemoveIVIndexFromList(availableIVs, index); + #else + u8 index = Random() % (NUM_STATS - i); + selectedIvs[i] = availableIVs[index]; + RemoveIVIndexFromList(availableIVs, index); + #endif } // Determine which parent each of the selected IVs should inherit from. |