Fixed Sylveon's evolution method (#3048)

This commit is contained in:
Eduardo Quezada D'Ottone 2023-06-19 16:17:51 -04:00 committed by GitHub
parent 5128520291
commit b01f7927cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 7 deletions

View File

@ -298,7 +298,7 @@
#define EVO_ITEM_HOLD_DAY 21 // Pokémon levels up, holds specified item at day
#define EVO_ITEM_HOLD_NIGHT 22 // Pokémon levels up, holds specified item at night
#define EVO_MOVE 23 // Pokémon levels up, knows specified move
#define EVO_MOVE_TYPE 24 // Pokémon levels up, knows move with specified type
#define EVO_FRIENDSHIP_MOVE_TYPE 24 // Pokémon levels up with friendship ≥ 220, knows move with specified type
#define EVO_MAPSEC 25 // Pokémon levels up on specified mapsec
#define EVO_ITEM_MALE 26 // specified item is used on a male Pokémon
#define EVO_ITEM_FEMALE 27 // specified item is used on a female Pokémon

View File

@ -121,7 +121,7 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] =
{EVO_ITEM, ITEM_ICE_STONE, SPECIES_GLACEON},
#endif
#if P_GEN_6_POKEMON == TRUE
{EVO_MOVE_TYPE, TYPE_FAIRY, SPECIES_SYLVEON}
{EVO_FRIENDSHIP_MOVE_TYPE, TYPE_FAIRY, SPECIES_SYLVEON}
#endif
},
[SPECIES_PORYGON] = {{EVO_TRADE_ITEM, ITEM_UPGRADE, SPECIES_PORYGON2},

View File

@ -6501,13 +6501,16 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s
if (MonKnowsMove(mon, gEvolutionTable[species][i].param))
targetSpecies = gEvolutionTable[species][i].targetSpecies;
break;
case EVO_MOVE_TYPE:
for (j = 0; j < 4; j++)
case EVO_FRIENDSHIP_MOVE_TYPE:
if (friendship >= 220)
{
if (gBattleMoves[GetMonData(mon, MON_DATA_MOVE1 + j, NULL)].type == gEvolutionTable[species][i].param)
for (j = 0; j < MAX_MON_MOVES; j++)
{
targetSpecies = gEvolutionTable[species][i].targetSpecies;
break;
if (gBattleMoves[GetMonData(mon, MON_DATA_MOVE1 + j, NULL)].type == gEvolutionTable[species][i].param)
{
targetSpecies = gEvolutionTable[species][i].targetSpecies;
break;
}
}
}
break;