Fix for Dark Type in party evolution. (#329)

This commit is contained in:
Eduardo Alvaro Quezada D'Ottone 2020-04-16 03:07:31 -04:00 committed by GitHub
parent a387121e4a
commit e232f6bf03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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}},

View File

@ -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;