Fixed Shiny Pokemon not being shiny after transforming with a gimmick (#5573)

Co-authored-by: Hedara <hedara90@gmail.com>
This commit is contained in:
hedara90 2024-10-25 14:42:06 +02:00 committed by GitHub
parent a9abbdf1d4
commit 5dcf3e7664
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -897,7 +897,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool32 megaEvo, bo
if (GetBattlerSide(battlerAtk) == B_SIDE_PLAYER)
{
if (B_TRANSFORM_SHINY >= GEN_4 && trackEnemyPersonality)
if (B_TRANSFORM_SHINY >= GEN_4 && trackEnemyPersonality && !megaEvo)
{
personalityValue = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerDef]], MON_DATA_PERSONALITY);
isShiny = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerDef]], MON_DATA_IS_SHINY);
@ -915,7 +915,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool32 megaEvo, bo
}
else
{
if (B_TRANSFORM_SHINY >= GEN_4 && trackEnemyPersonality)
if (B_TRANSFORM_SHINY >= GEN_4 && trackEnemyPersonality && !megaEvo)
{
personalityValue = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerDef]], MON_DATA_PERSONALITY);
isShiny = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerDef]], MON_DATA_IS_SHINY);