Fix bug when changing forms multiple times (#8458)
This commit is contained in:
parent
af18615a46
commit
aafa937b86
@ -919,8 +919,6 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, u8 changeType)
|
||||
bool32 isShiny;
|
||||
const void *src;
|
||||
const u16 *paletteData;
|
||||
struct Pokemon *monAtk = GetBattlerMon(battlerAtk);
|
||||
struct Pokemon *monDef = GetBattlerMon(battlerDef);
|
||||
void *dst;
|
||||
|
||||
if (IsContest())
|
||||
@ -938,7 +936,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, u8 changeType)
|
||||
else
|
||||
{
|
||||
position = GetBattlerPosition(battlerAtk);
|
||||
if (gBattleSpritesDataPtr->battlerData[battlerAtk].transformSpecies == SPECIES_NONE)
|
||||
if (changeType == SPECIES_GFX_CHANGE_TRANSFORM)
|
||||
{
|
||||
// Get base form if its currently Gigantamax
|
||||
if (IsGigantamaxed(battlerDef))
|
||||
@ -946,13 +944,13 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, u8 changeType)
|
||||
else if (gBattleStruct->illusion[battlerDef].state == ILLUSION_ON)
|
||||
targetSpecies = GetIllusionMonSpecies(battlerDef);
|
||||
else
|
||||
targetSpecies = GetMonData(monDef, MON_DATA_SPECIES);
|
||||
gBattleSpritesDataPtr->battlerData[battlerAtk].transformSpecies = targetSpecies;
|
||||
targetSpecies = gBattleMons[battlerDef].species;
|
||||
}
|
||||
else
|
||||
{
|
||||
targetSpecies = gBattleSpritesDataPtr->battlerData[battlerAtk].transformSpecies;
|
||||
targetSpecies = gBattleMons[battlerAtk].species;
|
||||
}
|
||||
gBattleSpritesDataPtr->battlerData[battlerAtk].transformSpecies = targetSpecies;
|
||||
|
||||
if (changeType == SPECIES_GFX_CHANGE_TRANSFORM)
|
||||
{
|
||||
@ -961,8 +959,8 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, u8 changeType)
|
||||
}
|
||||
else
|
||||
{
|
||||
personalityValue = GetMonData(monAtk, MON_DATA_PERSONALITY);
|
||||
isShiny = GetMonData(monAtk, MON_DATA_IS_SHINY);
|
||||
personalityValue = gBattleMons[battlerAtk].personality;
|
||||
isShiny = gBattleMons[battlerAtk].isShiny;
|
||||
}
|
||||
HandleLoadSpecialPokePic(!IsOnPlayerSide(battlerAtk),
|
||||
gMonSpritesGfxPtr->spritesGfx[position],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user