From 5bf607049e9365fa1e765ffad05999046438abbd Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 7 Feb 2023 16:41:30 +0100 Subject: [PATCH] Fix Pollen Puff score --- src/battle_ai_main.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 560457dcc..bcf4801ee 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -2427,6 +2427,13 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) break; } break; + case EFFECT_HEAL_PULSE: // and floral healing + if (!IsTargetingPartner(battlerAtk, battlerDef)) // Don't heal enemies + { + score -= 10; + break; + } + // fallthrough case EFFECT_HIT_ENEMY_HEAL_ALLY: // pollen puff if (IsTargetingPartner(battlerAtk, battlerDef)) { @@ -2436,20 +2443,6 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score -= 10; else if (gBattleMons[battlerDef].hp > gBattleMons[battlerDef].maxHP / 2) score -= 5; - break; - } - // fallthrough - case EFFECT_HEAL_PULSE: // and floral healing - if (!IsTargetingPartner(battlerAtk, battlerDef)) // Don't heal enemies - { - score -= 10; - } - else - { - if (AtMaxHp(battlerDef)) - score -= 10; - else if (gBattleMons[battlerDef].hp > gBattleMons[battlerDef].maxHP / 2) - score -= 5; } break; case EFFECT_ELECTRIFY: