From 62c4379a217d10ea0224f31d83c89177be119822 Mon Sep 17 00:00:00 2001 From: Meowsy Date: Mon, 17 Dec 2018 12:28:11 -0500 Subject: [PATCH] Remove magic numbers. --- src/battle_script_commands.c | 2 +- src/pokemon.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 475b16c98..f1e7143dc 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -8648,7 +8648,7 @@ static void atkAE_healpartystatus(void) u16 species = GetMonData(&party[i], MON_DATA_SPECIES2); u8 abilityBit = GetMonData(&party[i], MON_DATA_ALT_ABILITY); - if (species != 0 && species != SPECIES_EGG) + if (species != SPECIES_NONE && species != SPECIES_EGG) { u8 ability; diff --git a/src/pokemon.c b/src/pokemon.c index 8e32479a1..50f0a1ac2 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5935,13 +5935,13 @@ u16 HoennToNationalOrder(u16 hoennNum) u16 SpeciesToCryId(u16 species) { - if (species <= 250) + if (species <= SPECIES_CELEBI - 1) return species; - if (species < 276) + if (species < SPECIES_TREECKO - 1) return 200; - return gSpeciesIdToCryId[species - 276]; + return gSpeciesIdToCryId[species - (SPECIES_TREECKO - 1)]; } void sub_806D544(u16 species, u32 personality, u8 *dest)