Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes moves based on Dragon Darts with strikeCount > 2 always hitting the same battler from the second hit onwards #5830

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/battle_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
AlexOn1ine marked this conversation as resolved.
Show resolved Hide resolved
AccuracyCheck(TRUE, nextInstr, failInstr, move);
return;
}
Expand Down Expand Up @@ -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.
Expand Down
Loading