same lists for healing moves (#3787)
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
This commit is contained in:
parent
fcdc515be2
commit
cd0b4db09b
5 changed files with 11 additions and 30 deletions
|
@ -119,7 +119,7 @@ bool32 ShouldSetSnow(u32 battler, u32 ability, u32 holdEffect);
|
|||
bool32 ShouldSetRain(u32 battlerAtk, u32 ability, u32 holdEffect);
|
||||
bool32 ShouldSetSun(u32 battlerAtk, u32 atkAbility, u32 holdEffect);
|
||||
bool32 HasSleepMoveWithLowAccuracy(u32 battlerAtk, u32 battlerDef);
|
||||
bool32 IsHealingMoveEffect(u32 effect);
|
||||
bool32 IsHealingMove(u32 move);
|
||||
bool32 HasHealingEffect(u32 battler);
|
||||
bool32 IsTrappingMoveEffect(u32 effect);
|
||||
bool32 HasTrappingMoveEffect(u32 battler);
|
||||
|
|
|
@ -4715,7 +4715,7 @@ static s32 AI_CheckViability(u32 battlerAtk, u32 battlerDef, u32 move, s32 score
|
|||
ADJUST_SCORE(3);
|
||||
break;
|
||||
case EFFECT_HEAL_BLOCK:
|
||||
if (AI_WhoStrikesFirst(battlerAtk, battlerDef, move) == AI_IS_FASTER && predictedMove != MOVE_NONE && IsHealingMoveEffect(gBattleMoves[predictedMove].effect))
|
||||
if (AI_WhoStrikesFirst(battlerAtk, battlerDef, move) == AI_IS_FASTER && predictedMove != MOVE_NONE && IsHealingMove(predictedMove))
|
||||
ADJUST_SCORE(3); // Try to cancel healing move
|
||||
else if (HasHealingEffect(battlerDef) || aiData->holdEffects[battlerDef] == HOLD_EFFECT_LEFTOVERS
|
||||
|| (aiData->holdEffects[battlerDef] == HOLD_EFFECT_BLACK_SLUDGE && IS_BATTLER_OF_TYPE(battlerDef, TYPE_POISON)))
|
||||
|
|
|
@ -2017,28 +2017,9 @@ bool32 HasSleepMoveWithLowAccuracy(u32 battlerAtk, u32 battlerDef)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
bool32 IsHealingMoveEffect(u32 effect)
|
||||
bool32 IsHealingMove(u32 move)
|
||||
{
|
||||
switch (effect)
|
||||
{
|
||||
case EFFECT_RESTORE_HP:
|
||||
case EFFECT_MORNING_SUN:
|
||||
case EFFECT_SYNTHESIS:
|
||||
case EFFECT_MOONLIGHT:
|
||||
case EFFECT_SOFTBOILED:
|
||||
case EFFECT_ROOST:
|
||||
case EFFECT_SWALLOW:
|
||||
case EFFECT_WISH:
|
||||
case EFFECT_HEALING_WISH:
|
||||
case EFFECT_HEAL_PULSE:
|
||||
case EFFECT_REST:
|
||||
case EFFECT_JUNGLE_HEALING:
|
||||
case EFFECT_ABSORB:
|
||||
case EFFECT_DREAM_EATER:
|
||||
return TRUE;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
return gBattleMoves[move].healBlockBanned;
|
||||
}
|
||||
|
||||
bool32 HasHealingEffect(u32 battlerId)
|
||||
|
@ -2048,7 +2029,7 @@ bool32 HasHealingEffect(u32 battlerId)
|
|||
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
{
|
||||
if (moves[i] != MOVE_NONE && moves[i] != MOVE_UNAVAILABLE && IsHealingMoveEffect(gBattleMoves[moves[i]].effect))
|
||||
if (moves[i] != MOVE_NONE && moves[i] != MOVE_UNAVAILABLE && IsHealingMove(moves[i]))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -3928,12 +3928,12 @@ static u8 Task_GetInfoCardInput(u8 taskId)
|
|||
|
||||
#undef tUsingAlternateSlot
|
||||
|
||||
static bool32 IsDomeHealingMoveEffect(u32 effect)
|
||||
static bool32 IsDomeHealingMove(u32 move)
|
||||
{
|
||||
if (IsHealingMoveEffect(effect))
|
||||
if (IsHealingMove(move))
|
||||
return TRUE;
|
||||
// Check extra effects not considered plain healing by AI
|
||||
switch(effect)
|
||||
switch (gBattleMoves[move].effect)
|
||||
{
|
||||
case EFFECT_INGRAIN:
|
||||
case EFFECT_REFRESH:
|
||||
|
@ -4343,7 +4343,7 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId)
|
|||
move = gSaveBlock2Ptr->frontier.domePlayerPartyData[i].moves[j];
|
||||
else
|
||||
move = gFacilityTrainerMons[DOME_MONS[trainerTourneyId][i]].moves[j];
|
||||
|
||||
|
||||
switch (k)
|
||||
{
|
||||
case MOVE_POINTS_COMBO:
|
||||
|
@ -4359,7 +4359,7 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId)
|
|||
allocatedArray[k] = IsDomeRareMove(move) ? 1 : 0;
|
||||
break;
|
||||
case MOVE_POINTS_HEAL:
|
||||
allocatedArray[k] = IsDomeHealingMoveEffect(gBattleMoves[move].effect) ? 1 : 0;
|
||||
allocatedArray[k] = IsDomeHealingMove(move) ? 1 : 0;
|
||||
break;
|
||||
case MOVE_POINTS_RISKY:
|
||||
allocatedArray[k] = IsDomeRiskyMoveEffect(gBattleMoves[move].effect) ? 1 : 0;
|
||||
|
|
|
@ -4687,7 +4687,7 @@ s8 GetMovePriority(u32 battler, u16 move)
|
|||
{
|
||||
priority++;
|
||||
}
|
||||
else if (ability == ABILITY_TRIAGE && IsHealingMoveEffect(gBattleMoves[move].effect))
|
||||
else if (ability == ABILITY_TRIAGE && IsHealingMove(move))
|
||||
priority += 3;
|
||||
|
||||
if (gProtectStructs[battler].quash)
|
||||
|
|
Loading…
Reference in a new issue