From 6e134bb7dc0b5650946318a28cbe72a2e5743e24 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Fri, 17 Feb 2023 12:52:43 -0300 Subject: [PATCH] Removed pointless IsBattlerHpLow function --- src/battle_message.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/battle_message.c b/src/battle_message.c index 2b8005f64b..9c8a1b7020 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -3899,14 +3899,6 @@ static u32 GetEnemyMonCount(bool32 onlyAlive) return count; } -static bool32 IsBattlerHpLow(u32 battler) -{ - if ((gBattleMons[battler].hp * 100) / gBattleMons[battler].maxHP < 25) - return TRUE; - else - return FALSE; -} - bool32 ShouldDoTrainerSlide(u32 battlerId, u32 trainerId, u32 which) { s32 i; @@ -3931,7 +3923,7 @@ bool32 ShouldDoTrainerSlide(u32 battlerId, u32 trainerId, u32 which) case TRAINER_SLIDE_LAST_LOW_HP: if (sTrainerSlides[i].msgLastLowHp != NULL && GetEnemyMonCount(TRUE) == 1 - && IsBattlerHpLow(battlerId) + && gBattleMons[battlerId].hp <= (gBattleMons[battlerId].maxHP / 4) && !gBattleStruct->trainerSlideLowHpMsgDone) { gBattleStruct->trainerSlideLowHpMsgDone = TRUE;