From e232f6bf03e544efc0d2d240b5da4a81fbc43d09 Mon Sep 17 00:00:00 2001 From: Eduardo Alvaro Quezada D'Ottone Date: Thu, 16 Apr 2020 03:07:31 -0400 Subject: [PATCH] Fix for Dark Type in party evolution. (#329) --- include/constants/pokemon.h | 2 +- src/data/pokemon/evolution.h | 2 +- src/pokemon.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index ca3ee54fd1..a6dcb8a5c6 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -292,7 +292,7 @@ #define EVO_ITEM_FEMALE 0x001B // specified item is used on a female Pokémon #define EVO_LEVEL_RAIN 0x001C // Pokémon reaches the specified level while it's raining #define EVO_SPECIFIC_MON_IN_PARTY 0x001D // Pokémon levels up with a specified Pokémon in party -#define EVO_LEVEL_SPECIFIC_MON_TYPE_IN_PARTY 0x001E // Pokémon reaches the specified level with a specified Pokémon in party +#define EVO_LEVEL_DARK_TYPE_MON_IN_PARTY 0x001E // Pokémon reaches the specified level with a Dark Type Pokémon in party #define EVOS_PER_MON 8 diff --git a/src/data/pokemon/evolution.h b/src/data/pokemon/evolution.h index 365f9b9619..5abeb8436e 100644 --- a/src/data/pokemon/evolution.h +++ b/src/data/pokemon/evolution.h @@ -395,7 +395,7 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_FLABEBE] = {{EVO_LEVEL, 19, SPECIES_FLOETTE}}, [SPECIES_FLOETTE] = {{EVO_ITEM, ITEM_NONE,/*ITEM_SHINY_STONE*/ SPECIES_FLORGES}}, [SPECIES_SKIDDO] = {{EVO_LEVEL, 32, SPECIES_GOGOAT}}, - [SPECIES_PANCHAM] = {{EVO_LEVEL_SPECIFIC_MON_TYPE_IN_PARTY, 32, SPECIES_PANGORO}}, + [SPECIES_PANCHAM] = {{EVO_LEVEL_DARK_TYPE_MON_IN_PARTY, 32, SPECIES_PANGORO}}, [SPECIES_ESPURR] = {{EVO_LEVEL_MALE, 25, SPECIES_MEOWSTIC}, {EVO_LEVEL_FEMALE, 25, SPECIES_MEOWSTIC_F}}, [SPECIES_HONEDGE] = {{EVO_LEVEL, 35, SPECIES_DOUBLADE}}, diff --git a/src/pokemon.c b/src/pokemon.c index 4b1d761053..602e0c2920 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5810,14 +5810,14 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) } } break; - case EVO_LEVEL_SPECIFIC_MON_TYPE_IN_PARTY: + case EVO_LEVEL_DARK_TYPE_MON_IN_PARTY: if (gEvolutionTable[species][i].param <= level) { for (j = 0; j < PARTY_SIZE; j++) { u16 species = GetMonData(&gPlayerParty[j], MON_DATA_SPECIES, NULL); - if (gBaseStats[species].type1 == gEvolutionTable[species][i].param - || gBaseStats[species].type2 == gEvolutionTable[species][i].param) + if (gBaseStats[species].type1 == TYPE_DARK + || gBaseStats[species].type2 == TYPE_DARK) { targetSpecies = gEvolutionTable[species][i].targetSpecies; break;