From fcc5ec1dd0c392ccb224f31cc4679ff4d260efce Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 24 May 2020 10:58:33 +0200 Subject: [PATCH] Fix Teleport wild double battle --- src/battle_script_commands.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index a5e7f85068..81fde7c45a 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1678,7 +1678,11 @@ static void Cmd_attackanimation(void) if (gBattleControllerExecFlags) return; - if ((gHitMarker & HITMARKER_NO_ANIMATIONS) && (gCurrentMove != MOVE_TRANSFORM && gCurrentMove != MOVE_SUBSTITUTE)) + if ((gHitMarker & HITMARKER_NO_ANIMATIONS) + && gCurrentMove != MOVE_TRANSFORM + && gCurrentMove != MOVE_SUBSTITUTE + // In a wild double battle gotta use the teleport animation if two wild pokemon are alive. + && !(gCurrentMove == MOVE_TELEPORT && WILD_DOUBLE_BATTLE && GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT && IsBattlerAlive(BATTLE_PARTNER(gBattlerAttacker)))) { BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_Pausex20;