Repository navigation
Evolution with a status condition
This code allows a pokemon to evolve when it reaches a specified level and has a status condition
An example of use could be a branched evolution to a fire pokemon when the first stage mon is burned.
For this tutorial, Torchic will evolve into Blaziken (skipping out Combusken) when it evolves at level 8.
| Torchic evolving at level 8 when poisoned | Torchic not evolving at level 8 when not poisoned |
|---|---|
![]() |
![]() |
pull from the branch or add manually using the guide below
git remote add tenaya15 https://github.com/tenaya15/tenaya15emerald.git
git pull tenaya15 evo_with_status_condition
in struct Evolution (line 355)
add after u16 targetSpecies;
u16 param2;
This gives us the ability to state a second parameter in the evolution, which in this case we will use for listing the status condition that causes the evolution.
so the section should now be:
struct Evolution
{
u16 method;
u16 param;
u16 targetSpecies;
u16 param2;
};
In the section // Evolution types (line 240)
add a new evolution name, adding 1 from the last entry (16 used for this tutorial)
#define EVO_LEVEL_STATUS 16 // Pokémon reaches the specified level with a status condition
in function u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem) (line 5503)
add after u8 holdEffect; (line 5514)
u16 status;
__
in the same function further down,
add to the case EVO_MODE_NORMAL: section (now at line 5528)
// evolve with status effect at specified level; param2 = status
case EVO_LEVEL_STATUS:
u16 status = GetMonData(mon, MON_DATA_STATUS, 0);
if (gEvolutionTable[species][i].param2 == status && gEvolutionTable[species][i].param <= level)
targetSpecies = gEvolutionTable[species][i].targetSpecies;
break;
give a Pokemon the new evolution method
{EVO_LEVEL_STATUS, *level*, SPECIES_*, STATUS1_*}
STATUS1_* options (from "include/constants/battle.h"):
STATUS1_SLEEP
STATUS1_POISON
STATUS1_BURN
STATUS1_FREEZE
STATUS1_PARALYSIS
STATUS1_TOXIC_POISON
STATUS1_PSN_ANY (STATUS1_POISON | STATUS1_TOXIC_POISON)
STATUS1_ANY (STATUS1_SLEEP | STATUS1_POISON | STATUS1_BURN | STATUS1_FREEZE | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON)
note: If you have added any new status conditions (like Frostbite), you can use them too
Example for this tutorial
[SPECIES_TORCHIC] = {{EVO_LEVEL, 16, SPECIES_COMBUSKEN},
{EVO_LEVEL_STATUS, 8, SPECIES_BLAZIKEN, STATUS1_POISON}},
end of guide

