diff --git a/src/script_pokemon_util.c b/src/script_pokemon_util.c index e02da5b06e..a0bc7d8e16 100644 --- a/src/script_pokemon_util.c +++ b/src/script_pokemon_util.c @@ -299,10 +299,14 @@ u32 ScriptGiveMonParameterized(u16 species, u8 level, u16 item, u8 ball, u8 natu u16 targetSpecies; // check whether to use a specific nature or a random one - if (OW_SYNCHRONIZE_NATURE >= GEN_6 && (gSpeciesInfo[species].eggGroups[0] == EGG_GROUP_NO_EGGS_DISCOVERED || OW_SYNCHRONIZE_NATURE == GEN_7)) - nature = PickWildMonNature(); - else if (nature >= NUM_NATURES) - nature = Random() % NUM_NATURES; + if (nature >= NUM_NATURES) + { + if (OW_SYNCHRONIZE_NATURE >= GEN_6 + && (gSpeciesInfo[species].eggGroups[0] == EGG_GROUP_NO_EGGS_DISCOVERED || OW_SYNCHRONIZE_NATURE == GEN_7)) + nature = PickWildMonNature(); + else + nature = Random() % NUM_NATURES; + } // create a Pokémon with basic data if ((gender == MON_MALE && genderRatio != MON_FEMALE && genderRatio != MON_GENDERLESS)