mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
fix bug bite not activating if faints target. also save original move target through the effect
This commit is contained in:
parent
b09dad68d5
commit
ebb711b6e5
@ -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:
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user