mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Merge pull request #2648 from AlexOn1ine/pollen_puff
Fixes Pollen Puff issue #2611
This commit is contained in:
commit
deb23fc7c6
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user