mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-06 09:33:22 +01:00
Fixed usage of gBattleStruct->changedSpecies so its only used by player's party
This commit is contained in:
parent
1580f892a5
commit
034ba7d5d2
@ -9796,8 +9796,8 @@ bool32 TryBattleFormChange(u8 battlerId, u16 method)
|
|||||||
targetSpecies = GetBattleFormChangeTargetSpecies(battlerId, method);
|
targetSpecies = GetBattleFormChangeTargetSpecies(battlerId, method);
|
||||||
if (targetSpecies != SPECIES_NONE)
|
if (targetSpecies != SPECIES_NONE)
|
||||||
{
|
{
|
||||||
// Saves the original species on the first form change.
|
// Saves the original species on the first form change for the player.
|
||||||
if (gBattleStruct->changedSpecies[monId] == SPECIES_NONE)
|
if (side == B_SIDE_PLAYER && gBattleStruct->changedSpecies[monId] == SPECIES_NONE)
|
||||||
gBattleStruct->changedSpecies[monId] = gBattleMons[battlerId].species;
|
gBattleStruct->changedSpecies[monId] = gBattleMons[battlerId].species;
|
||||||
|
|
||||||
TryToSetBattleFormChangeMoves(&party[monId], method);
|
TryToSetBattleFormChangeMoves(&party[monId], method);
|
||||||
@ -9810,8 +9810,8 @@ bool32 TryBattleFormChange(u8 battlerId, u16 method)
|
|||||||
targetSpecies = GetFormChangeTargetSpecies(&party[monId], method, 0);
|
targetSpecies = GetFormChangeTargetSpecies(&party[monId], method, 0);
|
||||||
if (targetSpecies != SPECIES_NONE)
|
if (targetSpecies != SPECIES_NONE)
|
||||||
{
|
{
|
||||||
// Saves the original species on the first form change.
|
// Saves the original species on the first form change for the player.
|
||||||
if (gBattleStruct->changedSpecies[monId] == SPECIES_NONE)
|
if (side == B_SIDE_PLAYER && gBattleStruct->changedSpecies[monId] == SPECIES_NONE)
|
||||||
gBattleStruct->changedSpecies[monId] = targetSpecies;
|
gBattleStruct->changedSpecies[monId] = targetSpecies;
|
||||||
|
|
||||||
TryToSetBattleFormChangeMoves(&party[monId], method);
|
TryToSetBattleFormChangeMoves(&party[monId], method);
|
||||||
|
Loading…
Reference in New Issue
Block a user