Sync pokedex constants

This commit is contained in:
GriffinR
2022-10-29 23:46:39 -04:00
parent d1178f7f8f
commit 8aae7ac7f3
7 changed files with 891 additions and 871 deletions
+5 -2
View File
@@ -94,6 +94,9 @@ static const struct CombinedMove sCombinedMoves[2] =
{0xFFFF, 0xFFFF, 0xFFFF}
};
// NOTE: The order of the elements in the 3 arrays below is irrelevant.
// To reorder the pokedex, see the values in include/constants/pokedex.h.
static const u16 sSpeciesToHoennPokedexNum[] = // Assigns all species to the Hoenn Dex Index (Summary No. for Hoenn Dex)
{
SPECIES_TO_HOENN(BULBASAUR),
@@ -5008,7 +5011,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem)
if (gEvolutionTable[species][i].param == heldItem)
{
targetSpecies = gEvolutionTable[species][i].targetSpecies;
if (IsNationalPokedexEnabled() || targetSpecies <= 151)
if (IsNationalPokedexEnabled() || targetSpecies <= KANTO_SPECIES_END)
{
heldItem = 0;
SetMonData(mon, MON_DATA_HELD_ITEM, &heldItem);
@@ -5664,7 +5667,7 @@ u16 SpeciesToPokedexNum(u16 species)
{
species = SpeciesToNationalPokedexNum(species);
if (!IsNationalPokedexEnabled() && species > 151)
if (!IsNationalPokedexEnabled() && species > KANTO_SPECIES_END)
return 0xFFFF;
return species;
}