From cec9e177d66be04a43cc44493c907f9f58d0c531 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 23 Dec 2019 17:26:48 +0100 Subject: [PATCH] Gooey add check for not displaying ability pop up when not necessary --- src/battle_util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index eaa0543196..af620d2f9b 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -3318,6 +3318,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA case ABILITY_TANGLING_HAIR: if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) && gBattleMons[gBattlerAttacker].hp != 0 + && gBattleMons[gBattlerAttacker].statStages[STAT_SPEED] != 0 && !gProtectStructs[gBattlerAttacker].confusionSelfDmg && TARGET_TURN_DAMAGED && (gBattleMoves[move].flags & FLAG_MAKES_CONTACT)) @@ -3489,10 +3490,10 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA gBattleStruct->atkCancellerTracker = 0; gBattlerAttacker = gBattlerAbility = battler; gCalledMove = gCurrentMove; - + // Set the target to the original target of the mon that first used a Dance move gBattlerTarget = gBattleScripting.savedBattler & 0x3; - + // Make sure that the target isn't an ally - if it is, target the original user if (GetBattlerSide(gBattlerTarget) == GetBattlerSide(gBattlerAttacker)) gBattlerTarget = (gBattleScripting.savedBattler & 0xF0) >> 4;