Use move effect for some moves instead of ids (#5433)

This commit is contained in:
Alex 2024-09-28 07:46:52 +02:00 committed by GitHub
parent c1dffc694e
commit 1956376e0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5184,15 +5184,15 @@ static bool32 TryDoMoveEffectsBeforeMoves(void)
{
gBattleStruct->focusPunchBattlers |= 1u << battlers[i];
gBattlerAttacker = battlers[i];
switch (gChosenMoveByBattler[gBattlerAttacker])
switch (gMovesInfo[gChosenMoveByBattler[gBattlerAttacker]].effect)
{
case MOVE_FOCUS_PUNCH:
case EFFECT_FOCUS_PUNCH:
BattleScriptExecute(BattleScript_FocusPunchSetUp);
return TRUE;
case MOVE_BEAK_BLAST:
case EFFECT_BEAK_BLAST:
BattleScriptExecute(BattleScript_BeakBlastSetUp);
return TRUE;
case MOVE_SHELL_TRAP:
case EFFECT_SHELL_TRAP:
BattleScriptExecute(BattleScript_ShellTrapSetUp);
return TRUE;
}