diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-01-19 04:03:16 -0500 |
---|---|---|
committer | GriffinR <griffin.g.richards@gmail.com> | 2021-01-19 04:03:16 -0500 |
commit | bc20fda6041244d83775f6e3084f74ebe81a5fda (patch) | |
tree | 9417aef5eaed196948741589681460389178f7cb /src/pokemon.c | |
parent | f19d1b25906f32e291d795a52c62933860a133e9 (diff) |
Use GET_UNOWN_LETTER macro
Diffstat (limited to 'src/pokemon.c')
-rw-r--r-- | src/pokemon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pokemon.c b/src/pokemon.c index 5829bbd0a..94bbd0dc4 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -2304,14 +2304,14 @@ void CreateMonWithGenderNatureLetter(struct Pokemon *mon, u16 species, u8 level, { u32 personality; - if ((u8)(unownLetter - 1) < 28) + if ((u8)(unownLetter - 1) < NUM_UNOWN_FORMS) { u16 actualLetter; do { personality = Random32(); - actualLetter = ((((personality & 0x3000000) >> 18) | ((personality & 0x30000) >> 12) | ((personality & 0x300) >> 6) | (personality & 0x3)) % 28); + actualLetter = GET_UNOWN_LETTER(personality); } while (nature != GetNatureFromPersonality(personality) || gender != GetGenderFromSpeciesAndPersonality(species, personality) |