Prevents seteffectprimary and seteffectsecondary from softlocking (#9236)

This commit is contained in:
PhallenTree 2026-02-17 17:32:29 +00:00 committed by GitHub
parent bc6bbb1bc5
commit 353d011c72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4267,7 +4267,8 @@ static void Cmd_seteffectprimary(void)
u32 battler = GetBattlerForBattleScript(cmd->battler);
u32 effectBattler = GetBattlerForBattleScript(cmd->effectBattler);
SetMoveEffect(battler, effectBattler, gBattleScripting.moveEffect, cmd->nextInstr, EFFECT_PRIMARY);
gBattlescriptCurrInstr = cmd->nextInstr;
SetMoveEffect(battler, effectBattler, gBattleScripting.moveEffect, gBattlescriptCurrInstr, EFFECT_PRIMARY);
}
static void Cmd_seteffectsecondary(void)
@ -4276,7 +4277,8 @@ static void Cmd_seteffectsecondary(void)
u32 battler = GetBattlerForBattleScript(cmd->battler);
u32 effectBattler = GetBattlerForBattleScript(cmd->effectBattler);
SetMoveEffect(battler, effectBattler, gBattleScripting.moveEffect, cmd->nextInstr, EFFECT_PRIMARY);
gBattlescriptCurrInstr = cmd->nextInstr;
SetMoveEffect(battler, effectBattler, gBattleScripting.moveEffect, gBattlescriptCurrInstr, NO_FLAGS);
}
static void Cmd_clearvolatile(void)