mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-21 02:40:17 +01:00
Fix recoil occurring on zero damage attack
The "x was hit with recoil!" message was appearing when the target was immune due to protection or an ability - this should fix that and handle any other cases where 0 damage is dealt.
This commit is contained in:
parent
f49a486a8c
commit
1ee841146f
@ -4793,7 +4793,8 @@ static void Cmd_moveend(void)
|
||||
case MOVEEND_RECOIL:
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& !(gHitMarker & HITMARKER_UNABLE_TO_USE_MOVE)
|
||||
&& IsBattlerAlive(gBattlerAttacker))
|
||||
&& IsBattlerAlive(gBattlerAttacker)
|
||||
&& gBattleScripting.savedDmg != 0) // Some checks may be redundant alongside this one
|
||||
{
|
||||
switch (gBattleMoves[gCurrentMove].effect)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user