Merge pull request #2648 from AlexOn1ine/pollen_puff

Fixes Pollen Puff issue #2611
This commit is contained in:
ghoulslash 2023-02-09 08:21:33 -05:00 committed by GitHub
commit deb23fc7c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: