suggested change + restructure

This commit is contained in:
cawtds 2026-03-16 17:37:01 +01:00
parent e7e7b023d8
commit b1b4ba213f
2 changed files with 8 additions and 9 deletions

View File

@ -627,21 +627,21 @@ void BattleLoadMonSpriteGfx(struct Pokemon *mon, enum BattlerId battler)
return;
isShiny = GetMonData(mon, MON_DATA_IS_SHINY);
species = GetMonData(mon, MON_DATA_SPECIES);
personalityValue = GetMonData(mon, MON_DATA_PERSONALITY);
if (gBattleSpritesDataPtr->battlerData[battler].transformSpecies == SPECIES_NONE)
{
species = GetMonData(mon, MON_DATA_SPECIES);
personalityValue = GetMonData(mon, MON_DATA_PERSONALITY);
}
else
if (gBattleSpritesDataPtr->battlerData[battler].transformSpecies != SPECIES_NONE)
{
species = gBattleSpritesDataPtr->battlerData[battler].transformSpecies;
// If battler has Gigantamax factor, try convert gfx to G-Max version
if (GetActiveGimmick(battler) == GIMMICK_DYNAMAX && GetMonData(mon, MON_DATA_GIGANTAMAX_FACTOR))
gBattleSpritesDataPtr->battlerData[battler].transformSpecies = species = GetGMaxTargetSpecies(species);
personalityValue = gTransformedPersonalities[battler];
isShiny = gTransformedShininess[battler];
if (gBattleMons[battler].volatiles.transformed)
{
personalityValue = gTransformedPersonalities[battler];
isShiny = gTransformedShininess[battler];
}
}
position = GetBattlerPosition(battler);

View File

@ -8817,7 +8817,6 @@ bool32 TryBattleFormChange(enum BattlerId battler, enum FormChanges method, enum
TryToSetBattleFormChangeMoves(mon, method);
SetMonData(mon, MON_DATA_SPECIES, &targetSpecies);
gBattleMons[battler].species = targetSpecies;
gBattleMons[battler].volatiles.isTransformedMonShiny = gBattleMons[battler].isShiny;
RecalcBattlerStats(battler, mon, method == FORM_CHANGE_BATTLE_GIGANTAMAX);
return TRUE;
}