From a60a23474b1fd286f598cd17a63dc0744bae25cd Mon Sep 17 00:00:00 2001 From: PhallenTree <168426989+PhallenTree@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:15:58 +0000 Subject: [PATCH] Fixes moves based on Dragon Darts with strikeCount > 2 always hitting the same battler from the second hit onwards (#5830) --- src/battle_script_commands.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 5a16340e5014..1d1a842797ff 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1734,7 +1734,6 @@ static void AccuracyCheck(bool32 recalcDragonDarts, const u8 *nextInstr, const u { // Smart target to partner if miss gBattlerTarget = BATTLE_PARTNER(battlerDef); - gBattleStruct->moveResultFlags[battlerDef] &= ~MOVE_RESULT_MISSED; AccuracyCheck(TRUE, nextInstr, failInstr, move); return; } @@ -6511,7 +6510,7 @@ static void Cmd_moveend(void) else { if (gMovesInfo[gCurrentMove].effect == EFFECT_DRAGON_DARTS - && gBattleStruct->moveTarget[gBattlerAttacker] == gBattlerTarget // Haven't already changed targets + && !(gBattleStruct->moveResultFlags[BATTLE_PARTNER(gBattlerTarget)] & MOVE_RESULT_MISSED) // didn't miss the other target && CanTargetPartner(gBattlerAttacker, gBattlerTarget) && !TargetFullyImmuneToCurrMove(gBattlerAttacker, BATTLE_PARTNER(gBattlerTarget))) gBattlerTarget = BATTLE_PARTNER(gBattlerTarget); // Target the partner in doubles for second hit.