From ebc8edd5a65c92b1211aacb3ac4efdbeffd7d207 Mon Sep 17 00:00:00 2001 From: Ultimate Bob Date: Tue, 9 May 2023 00:58:38 +1000 Subject: [PATCH 1/3] Fix shiny animation not respecting illusion mon. --- src/battle_anim_throw.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/battle_anim_throw.c b/src/battle_anim_throw.c index 3fc2000e4a..4a3cf7cf27 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); From f985eefaa139017c2d67b1ea1591bd3d36bb6af4 Mon Sep 17 00:00:00 2001 From: Ultimate Bob Date: Tue, 9 May 2023 01:40:28 +1000 Subject: [PATCH 2/3] Show Imposter abilty in popup instead of opponent's ability. --- data/battle_scripts_1.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index fdc7c8a3fd..b62eb465eb 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 From 64c2eb39c0f65632ed06b1b19bbf2fca4dc7b089 Mon Sep 17 00:00:00 2001 From: Ultimate Bob Date: Tue, 9 May 2023 02:33:12 +1000 Subject: [PATCH 3/3] Ignore Illusion if the pokemon is the last slot in the party. --- src/battle_util.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/battle_util.c b/src/battle_util.c index cd65d58093..dd6e2bc06e 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -10398,12 +10398,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)]];