Reordered evolutions and added constants for new evo methods
This commit is contained in:
parent
1ea9681534
commit
ccb8d7a857
3 changed files with 553 additions and 573 deletions
|
@ -290,7 +290,7 @@
|
||||||
#define EVO_ITEM_HOLD_DAY 21 // Pokémon levels up, holds specified item at day
|
#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_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 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_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_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
|
#define EVO_ITEM_FEMALE 27 // specified item is used on a female Pokémon
|
||||||
|
@ -306,6 +306,8 @@
|
||||||
#define EVO_DARK_SCROLL 37 // interacts with Scroll of Darkness
|
#define EVO_DARK_SCROLL 37 // interacts with Scroll of Darkness
|
||||||
#define EVO_WATER_SCROLL 38 // interacts with Scroll of Waters
|
#define EVO_WATER_SCROLL 38 // interacts with Scroll of Waters
|
||||||
#define EVO_ALCREMIE 39 // TODO: read separate lookup table from gEvolutionTable.
|
#define EVO_ALCREMIE 39 // TODO: read separate lookup table from gEvolutionTable.
|
||||||
|
#define EVO_ITEM_NIGHT 40 // specified item is used on Pokémon, is night
|
||||||
|
#define EVO_RECOIL_DMG 41 // TODO: Pokémon receives a specified amount of recoil damage.
|
||||||
|
|
||||||
#define EVOS_PER_MON 10
|
#define EVOS_PER_MON 10
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -6452,13 +6452,16 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s
|
||||||
if (MonKnowsMove(mon, gEvolutionTable[species][i].param))
|
if (MonKnowsMove(mon, gEvolutionTable[species][i].param))
|
||||||
targetSpecies = gEvolutionTable[species][i].targetSpecies;
|
targetSpecies = gEvolutionTable[species][i].targetSpecies;
|
||||||
break;
|
break;
|
||||||
case EVO_MOVE_TYPE:
|
case EVO_FRIENDSHIP_MOVE_TYPE:
|
||||||
for (j = 0; j < 4; j++)
|
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;
|
if (gBattleMoves[GetMonData(mon, MON_DATA_MOVE1 + j, NULL)].type == gEvolutionTable[species][i].param)
|
||||||
break;
|
{
|
||||||
|
targetSpecies = gEvolutionTable[species][i].targetSpecies;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -6593,6 +6596,11 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s
|
||||||
if (GetMonGender(mon) == MON_MALE && gEvolutionTable[species][i].param == evolutionItem)
|
if (GetMonGender(mon) == MON_MALE && gEvolutionTable[species][i].param == evolutionItem)
|
||||||
targetSpecies = gEvolutionTable[species][i].targetSpecies;
|
targetSpecies = gEvolutionTable[species][i].targetSpecies;
|
||||||
break;
|
break;
|
||||||
|
case EVO_ITEM_NIGHT:
|
||||||
|
RtcCalcLocalTime();
|
||||||
|
if (gLocalTime.hours >= 0 && gLocalTime.hours < 12 && gEvolutionTable[species][i].param == evolutionItem)
|
||||||
|
targetSpecies = gEvolutionTable[species][i].targetSpecies;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue