mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Merge pull request #2662 from AlexOn1ine/heal_pulse_v2
Add Logic for Heal Pulse effects in double battles
This commit is contained in:
commit
27933836b5
@ -3009,6 +3009,13 @@ static s16 AI_DoubleBattle(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
||||
RETURN_SCORE_PLUS(1);
|
||||
}
|
||||
break;
|
||||
case EFFECT_HEAL_PULSE:
|
||||
case EFFECT_HIT_ENEMY_HEAL_ALLY:
|
||||
if (AI_WhoStrikesFirst(battlerAtk, FOE(battlerAtk), move) == AI_IS_FASTER
|
||||
&& AI_WhoStrikesFirst(battlerAtk, BATTLE_PARTNER(FOE(battlerAtk)), move) == AI_IS_FASTER
|
||||
&& gBattleMons[battlerAtkPartner].hp < gBattleMons[battlerAtkPartner].maxHP / 2)
|
||||
RETURN_SCORE_PLUS(1);
|
||||
break;
|
||||
} // attacker move effects
|
||||
} // check partner protecting
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user