Make Tandemaus only evolve at the end of battles (#4759)
This commit is contained in:
parent
fd08e59e8d
commit
341fa3692c
3 changed files with 7 additions and 5 deletions
|
@ -289,8 +289,8 @@
|
|||
#define EVO_LEVEL_FOG 42 // Pokémon reaches the specified level during fog in the overworld
|
||||
#define EVO_MOVE_TWO_SEGMENT 43 // Pokémon levels up, knows specified move, has a personality value with a modulus of 0
|
||||
#define EVO_MOVE_THREE_SEGMENT 44 // Pokémon levels up, knows specified move, has a personality value with a modulus of 1-99
|
||||
#define EVO_LEVEL_FAMILY_OF_THREE 45 // Pokémon reaches the specified level with a personality value with a modulus of 0
|
||||
#define EVO_LEVEL_FAMILY_OF_FOUR 46 // Pokémon reaches the specified level with a personality value with a modulus of 1-99
|
||||
#define EVO_LEVEL_FAMILY_OF_THREE 45 // Pokémon reaches the specified level in battle with a personality value with a modulus of 0
|
||||
#define EVO_LEVEL_FAMILY_OF_FOUR 46 // Pokémon reaches the specified level in battle with a personality value with a modulus of 1-99
|
||||
#define EVO_LEVEL_MOVE_TWENTY_TIMES 47 // Pokémon levels up after having used a move for at least 20 times
|
||||
#define EVO_LEVEL_RECOIL_DAMAGE_MALE 48 // Pokémon levels up after having suffered specified amount of non-fainting recoil damage as a male
|
||||
#define EVO_LEVEL_RECOIL_DAMAGE_FEMALE 49 // Pokémon levels up after having suffered specified amount of non-fainting recoil damage as a female
|
||||
|
@ -302,6 +302,7 @@
|
|||
#define EVO_MODE_ITEM_CHECK 3 // If an Everstone is being held, still want to show that the stone *could* be used on that Pokémon to evolve
|
||||
#define EVO_MODE_BATTLE_SPECIAL 4
|
||||
#define EVO_MODE_OVERWORLD_SPECIAL 5
|
||||
#define EVO_MODE_BATTLE_ONLY 6 // This mode is only used in battles to support Tandemaus' unique requirement
|
||||
|
||||
#define MON_PIC_WIDTH 64
|
||||
#define MON_PIC_HEIGHT 64
|
||||
|
|
|
@ -5837,7 +5837,7 @@ static void TryEvolvePokemon(void)
|
|||
if (species == SPECIES_NONE && (gLeveledUpInBattle & gBitTable[i]))
|
||||
{
|
||||
gLeveledUpInBattle &= ~(gBitTable[i]);
|
||||
species = GetEvolutionTargetSpecies(&gPlayerParty[i], EVO_MODE_NORMAL, gLeveledUpInBattle, NULL);
|
||||
species = GetEvolutionTargetSpecies(&gPlayerParty[i], EVO_MODE_BATTLE_ONLY, gLeveledUpInBattle, NULL);
|
||||
}
|
||||
|
||||
if (species != SPECIES_NONE)
|
||||
|
|
|
@ -4176,6 +4176,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s
|
|||
switch (mode)
|
||||
{
|
||||
case EVO_MODE_NORMAL:
|
||||
case EVO_MODE_BATTLE_ONLY:
|
||||
level = GetMonData(mon, MON_DATA_LEVEL, 0);
|
||||
friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, 0);
|
||||
|
||||
|
@ -4264,11 +4265,11 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s
|
|||
targetSpecies = evolutions[i].targetSpecies;
|
||||
break;
|
||||
case EVO_LEVEL_FAMILY_OF_FOUR:
|
||||
if (evolutions[i].param <= level && (personality % 100) != 0)
|
||||
if (mode == EVO_MODE_BATTLE_ONLY && evolutions[i].param <= level && (personality % 100) != 0)
|
||||
targetSpecies = evolutions[i].targetSpecies;
|
||||
break;
|
||||
case EVO_LEVEL_FAMILY_OF_THREE:
|
||||
if (evolutions[i].param <= level && (personality % 100) == 0)
|
||||
if (mode == EVO_MODE_BATTLE_ONLY && evolutions[i].param <= level && (personality % 100) == 0)
|
||||
targetSpecies = evolutions[i].targetSpecies;
|
||||
break;
|
||||
case EVO_BEAUTY:
|
||||
|
|
Loading…
Reference in a new issue