Merge pull request #2662 from AlexOn1ine/heal_pulse_v2

Add Logic for Heal Pulse effects in double battles
This commit is contained in:
ghoulslash 2023-02-09 08:18:00 -05:00 committed by GitHub
commit 27933836b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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