From 034ba7d5d2a345c27de32019b869319a9dbed94a Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Mon, 26 Dec 2022 08:59:37 -0300 Subject: [PATCH] Fixed usage of gBattleStruct->changedSpecies so its only used by player's party --- src/battle_util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index b3b16f255..6a31bc9e2 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -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);