diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index fdc7c8a3f..b62eb465e 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -9373,8 +9373,8 @@ BattleScript_FriskActivates:: end3 BattleScript_ImposterActivates:: - transformdataexecution call BattleScript_AbilityPopUp + transformdataexecution playmoveanimation BS_ATTACKER, MOVE_TRANSFORM waitanimation printstring STRINGID_IMPOSTERTRANSFORM diff --git a/src/battle_anim_throw.c b/src/battle_anim_throw.c index 3fc2000e4..4a3cf7cf2 100755 --- a/src/battle_anim_throw.c +++ b/src/battle_anim_throw.c @@ -2484,9 +2484,14 @@ void TryShinyAnimation(u8 battler, struct Pokemon *mon) u32 otId, personality; u32 shinyValue; u8 taskCirc, taskDgnl; + struct Pokemon* illusionMon; isShiny = FALSE; gBattleSpritesDataPtr->healthBoxesData[battler].triedShinyMonAnim = TRUE; + illusionMon = GetIllusionMonPtr(battler); + if (illusionMon != NULL) + mon = illusionMon; + otId = GetMonData(mon, MON_DATA_OT_ID); personality = GetMonData(mon, MON_DATA_PERSONALITY); diff --git a/src/battle_util.c b/src/battle_util.c index 5aa2fc153..fcd967da7 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -10395,12 +10395,19 @@ bool32 SetIllusionMon(struct Pokemon *mon, u32 battlerId) { struct Pokemon *party, *partnerMon; s32 i, id; + u8 side, partyCount; gBattleStruct->illusion[battlerId].set = 1; if (GetMonAbility(mon) != ABILITY_ILLUSION) return FALSE; party = GetBattlerParty(battlerId); + side = GetBattlerSide(battlerId); + partyCount = side == B_SIDE_PLAYER ? gPlayerPartyCount : gEnemyPartyCount; + + // If this pokemon is last in the party, ignore Illusion. + if (&party[partyCount - 1] == mon) + return FALSE; if (IsBattlerAlive(BATTLE_PARTNER(battlerId))) partnerMon = &party[gBattlerPartyIndexes[BATTLE_PARTNER(battlerId)]];