From ebb711b6e52fd5f8e670520dd3e7d1acf56c9caf Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Fri, 13 May 2022 18:24:52 -0400 Subject: [PATCH] fix bug bite not activating if faints target. also save original move target through the effect --- data/battle_scripts_1.s | 2 ++ src/battle_script_commands.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 72549654b..9178f4070 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -1351,9 +1351,11 @@ BattleScript_MoveEffectBugBite:: waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_NO_ANIMATIONS setbyte sBERRY_OVERRIDE, 1 @ override the requirements for eating berries + savetarget consumeberry BS_ATTACKER, FALSE bicword gHitMarker, HITMARKER_NO_ANIMATIONS setbyte sBERRY_OVERRIDE, 0 + restoretarget return BattleScript_EffectCoreEnforcer: diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 4a14d4115..87ff88957 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -2665,7 +2665,8 @@ void SetMoveEffect(bool32 primary, u32 certain) if (gBattleMons[gEffectBattler].hp == 0 && gBattleScripting.moveEffect != MOVE_EFFECT_PAYDAY - && gBattleScripting.moveEffect != MOVE_EFFECT_STEAL_ITEM) + && gBattleScripting.moveEffect != MOVE_EFFECT_STEAL_ITEM + && gBattleScripting.moveEffect != MOVE_EFFECT_BUG_BITE) INCREMENT_RESET_RETURN if (DoesSubstituteBlockMove(gBattlerAttacker, gEffectBattler, gCurrentMove) && affectsUser != MOVE_EFFECT_AFFECTS_USER)