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:
BuffelSaft 2021-10-02 15:08:15 +13:00
parent f49a486a8c
commit 1ee841146f

View File

@ -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)
{