-Added EFFECT_JUNGLE_HEALING to IsHealingMoveEffect
-Modified the code for EFFECT_TAKE_HEART inside AI_CheckViability and AI_CheckBadMove
This commit is contained in:
LOuroboros 2023-04-15 10:48:46 -03:00
parent 318b1ce4a2
commit 7d499548e8
2 changed files with 6 additions and 2 deletions

View file

@ -2612,7 +2612,10 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
score -= 10;
break;*/
case EFFECT_TAKE_HEART:
if (!AnyPartyMemberStatused(battlerAtk, FALSE) || PartnerHasSameMoveEffectWithoutTarget(BATTLE_PARTNER(battlerAtk), move, AI_DATA->partnerMove))
if ((!(gBattleMons[battlerAtk].status1 & STATUS1_ANY)
|| PartnerHasSameMoveEffectWithoutTarget(BATTLE_PARTNER(battlerAtk), move, AI_DATA->partnerMove))
&& !BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_SPATK)
&& !BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_SPDEF))
score -= 10;
break;
case EFFECT_PLACEHOLDER:
@ -3731,7 +3734,6 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
break;
case EFFECT_WISH:
case EFFECT_HEAL_BELL:
case EFFECT_TAKE_HEART:
if (ShouldUseWishAromatherapy(battlerAtk, battlerDef, move))
score += 3;
break;
@ -4368,6 +4370,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
score++;
break;
case EFFECT_REFRESH:
case EFFECT_TAKE_HEART:
if (gBattleMons[battlerAtk].status1 & STATUS1_ANY)
score += 2;
break;

View file

@ -2021,6 +2021,7 @@ bool32 IsHealingMoveEffect(u16 effect)
case EFFECT_HEALING_WISH:
case EFFECT_HEAL_PULSE:
case EFFECT_REST:
case EFFECT_JUNGLE_HEALING:
return TRUE;
default:
return FALSE;