Fixed usage of gBattleStruct->changedSpecies so its only used by player's party

This commit is contained in:
Eduardo Quezada D'Ottone 2022-12-26 08:59:37 -03:00
parent 1580f892a5
commit 034ba7d5d2

View File

@ -9796,8 +9796,8 @@ bool32 TryBattleFormChange(u8 battlerId, u16 method)
targetSpecies = GetBattleFormChangeTargetSpecies(battlerId, method);
if (targetSpecies != SPECIES_NONE)
{
// Saves the original species on the first form change.
if (gBattleStruct->changedSpecies[monId] == SPECIES_NONE)
// Saves the original species on the first form change for the player.
if (side == B_SIDE_PLAYER && gBattleStruct->changedSpecies[monId] == SPECIES_NONE)
gBattleStruct->changedSpecies[monId] = gBattleMons[battlerId].species;
TryToSetBattleFormChangeMoves(&party[monId], method);
@ -9810,8 +9810,8 @@ bool32 TryBattleFormChange(u8 battlerId, u16 method)
targetSpecies = GetFormChangeTargetSpecies(&party[monId], method, 0);
if (targetSpecies != SPECIES_NONE)
{
// Saves the original species on the first form change.
if (gBattleStruct->changedSpecies[monId] == SPECIES_NONE)
// Saves the original species on the first form change for the player.
if (side == B_SIDE_PLAYER && gBattleStruct->changedSpecies[monId] == SPECIES_NONE)
gBattleStruct->changedSpecies[monId] = targetSpecies;
TryToSetBattleFormChangeMoves(&party[monId], method);