Added Nature evolution methods

This commit is contained in:
Eduardo Quezada D'Ottone 2021-11-27 20:46:19 -03:00
parent 2ae7627f34
commit fa995894b7
3 changed files with 54 additions and 2 deletions

View File

@ -346,6 +346,8 @@
#define EVO_LEVEL_DARK_TYPE_MON_IN_PARTY 30 // Pokémon reaches the specified level with a Dark Type Pokémon in party
#define EVO_TRADE_SPECIFIC_MON 31 // Pokémon is traded for a specified Pokémon
#define EVO_SPECIFIC_MAP 32 // Pokémon levels up on specified map
#define EVO_LEVEL_NATURE_AMPED 33 // Pokémon reaches the specified level, it has a Hardy, Brave, Adamant, Naughty, Docile, Impish, Lax, Hasty, Jolly, Naive, Rash, Sassy, or Quirky nature.
#define EVO_LEVEL_NATURE_LOW_KEY 34 // Pokémon reaches the specified level, it has a Lonely, Bold, Relaxed, Timid, Serious, Modest, Mild, Quiet, Bashful, Calm, Gentle, or Careful nature.
#define EVOS_PER_MON 10

View File

@ -471,8 +471,8 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] =
{EVO_ITEM, ITEM_NONE, SPECIES_APPLETUN}},
[SPECIES_SILICOBRA] = {{EVO_LEVEL, 36, SPECIES_SANDACONDA}},
[SPECIES_ARROKUDA] = {{EVO_LEVEL, 26, SPECIES_BARRASKEWDA}},
[SPECIES_TOXEL] = {{EVO_LEVEL, 30, SPECIES_TOXTRICITY},
{EVO_LEVEL, 30, SPECIES_TOXTRICITY_LOW_KEY}},
[SPECIES_TOXEL] = {{EVO_LEVEL_NATURE_AMPED, 30, SPECIES_TOXTRICITY},
{EVO_LEVEL_NATURE_LOW_KEY, 30, SPECIES_TOXTRICITY_LOW_KEY}},
[SPECIES_SIZZLIPEDE] = {{EVO_LEVEL, 28, SPECIES_CENTISKORCH}},
[SPECIES_CLOBBOPUS] = {{EVO_MOVE, MOVE_TAUNT, SPECIES_GRAPPLOCT}},
[SPECIES_SINISTEA] = {{EVO_ITEM, ITEM_NONE, SPECIES_POLTEAGEIST}},

View File

@ -6529,6 +6529,56 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, u
if (currentMap == gEvolutionTable[species][i].param)
targetSpecies = gEvolutionTable[species][i].targetSpecies;
break;
case EVO_LEVEL_NATURE_AMPED:
if (gEvolutionTable[species][i].param <= level)
{
u8 nature = GetNature(mon);
#ifdef GBA_PRINTF
mgba_printf(MGBA_LOG_DEBUG, "nat = %d", nature);
#endif
switch (nature)
{
case NATURE_HARDY:
case NATURE_BRAVE:
case NATURE_ADAMANT:
case NATURE_NAUGHTY:
case NATURE_DOCILE:
case NATURE_IMPISH:
case NATURE_LAX:
case NATURE_HASTY:
case NATURE_JOLLY:
case NATURE_NAIVE:
case NATURE_RASH:
case NATURE_SASSY:
case NATURE_QUIRKY:
targetSpecies = gEvolutionTable[species][i].targetSpecies;
break;
}
}
break;
case EVO_LEVEL_NATURE_LOW_KEY:
if (gEvolutionTable[species][i].param <= level)
{
u8 nature = GetNature(mon);
switch (nature)
{
case NATURE_LONELY:
case NATURE_BOLD:
case NATURE_RELAXED:
case NATURE_TIMID:
case NATURE_SERIOUS:
case NATURE_MODEST:
case NATURE_MILD:
case NATURE_QUIET:
case NATURE_BASHFUL:
case NATURE_CALM:
case NATURE_GENTLE:
case NATURE_CAREFUL:
targetSpecies = gEvolutionTable[species][i].targetSpecies;
break;
}
}
break;
}
}
break;