From e0f7e7a2d970df7e28884f9e8c73b2771355312e Mon Sep 17 00:00:00 2001 From: W1serV1ser <1prefertheaircauseimanairnomad@gmail.com> Date: Mon, 27 Dec 2021 12:10:38 -0800 Subject: [PATCH] Updated variable name in MOVEEND_SKY_DROP_CONFUSE --- src/battle_script_commands.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 47d5b4fa26..d71c93bcaa 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -5179,22 +5179,23 @@ static void Cmd_moveend(void) { if (gBattleStruct->skyDropTargets[i] == 0xFE) { + u8 targetId; // Find the battler id of the Pokemon that was held by Sky Drop - for (arg1 = 0; arg1 < gBattlersCount; arg1++) + for (targetId = 0; targetId < gBattlersCount; targetId++) { - if (gBattleStruct->skyDropTargets[arg1] == i) + if (gBattleStruct->skyDropTargets[targetId] == i) break; } // Set gBattlerAttacker to the battler id of the target - gBattlerAttacker = arg1; + gBattlerAttacker = targetId; // Jump to "confused due to fatigue" script gBattlescriptCurrInstr = BattleScript_ThrashConfuses; // Clear skyDropTargets data gBattleStruct->skyDropTargets[i] = 0xFF; - gBattleStruct->skyDropTargets[arg1] = 0xFF; + gBattleStruct->skyDropTargets[targetId] = 0xFF; return; } }