diff options
Diffstat (limited to 'src/pokemon.c')
-rw-r--r-- | src/pokemon.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pokemon.c b/src/pokemon.c index 82da96f7d..94002dc7b 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -1334,7 +1334,7 @@ const struct SpindaSpot gSpindaSpotGraphics[] = #include "data/pokemon/item_effects.h" -const s8 gNatureStatTable[][5] = +const s8 gNatureStatTable[][NUM_EV_STATS] = { // Atk Def Spd Sp.Atk Sp.Def { 0, 0, 0, 0, 0}, // Hardy @@ -5715,7 +5715,8 @@ u8 GetTrainerEncounterMusicId(u16 trainerOpponentId) u16 ModifyStatByNature(u8 nature, u16 n, u8 statIndex) { - if (statIndex < 1 || statIndex > 5) + // Dont modify HP, Accuracy, or Evasion by nature + if (statIndex <= STAT_HP || statIndex > NUM_EV_STATS) { // Should just be "return n", but it wouldn't match without this. u16 retVal = n; |