From f5c165ff0ccc0801ff0a9b93619103cc81940f91 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 28 Dec 2022 08:18:15 -0300 Subject: [PATCH] Updated Dire Claw's effect again Thanks to MGriffin for providing a much nicer code for it. --- src/battle_script_commands.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 6e0f4c05d..df995ef60 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -3654,13 +3654,9 @@ void SetMoveEffect(bool32 primary, u32 certain) } else { - DIRE_CLAW_STATUS_PICK: - gBattleScripting.moveEffect = Random() % 6; - if (gBattleScripting.moveEffect == 0 - || gBattleScripting.moveEffect == MOVE_EFFECT_BURN - || gBattleScripting.moveEffect == MOVE_EFFECT_FREEZE) - goto DIRE_CLAW_STATUS_PICK; - SetMoveEffect(FALSE, 0); + static const u8 sDireClawEffects[] = { MOVE_EFFECT_POISON, MOVE_EFFECT_PARALYSIS, MOVE_EFFECT_SLEEP }; + gBattleScripting.moveEffect = sDireClawEffects[Random() % 3]; + SetMoveEffect(TRUE, 0); } break; } @@ -11942,8 +11938,8 @@ static void Cmd_trysetencore(void) } if (gLastMoves[gBattlerTarget] == MOVE_STRUGGLE - || gLastMoves[gBattlerTarget] == MOVE_ENCORE - || gLastMoves[gBattlerTarget] == MOVE_MIRROR_MOVE) + || gLastMoves[gBattlerTarget] == MOVE_ENCORE + || gLastMoves[gBattlerTarget] == MOVE_MIRROR_MOVE) { i = MAX_MON_MOVES; }