fix mental herb encore, heal block

This commit is contained in:
ghoulslash 2021-09-04 08:40:43 -04:00
parent e475813799
commit a9cbaa5966

View File

@ -5605,6 +5605,7 @@ static bool32 UnnerveOn(u32 battlerId, u32 itemId)
static bool32 GetMentalHerbEffect(u8 battlerId)
{
bool32 ret = FALSE;
// Check infatuation
if (gBattleMons[battlerId].status2 & STATUS2_INFATUATION)
{
@ -5615,18 +5616,18 @@ static bool32 GetMentalHerbEffect(u8 battlerId)
}
#if B_MENTAL_HERB >= GEN_5
// Check taunt
if (gDisableStructs[gBattlerTarget].tauntTimer != 0)
if (gDisableStructs[battlerId].tauntTimer != 0)
{
gDisableStructs[gBattlerTarget].tauntTimer = gDisableStructs[gBattlerTarget].tauntTimer2 = 0;
gDisableStructs[battlerId].tauntTimer = gDisableStructs[battlerId].tauntTimer2 = 0;
gBattleCommunication[MULTISTRING_CHOOSER] = MULTI_CURETAUNT;
PREPARE_MOVE_BUFFER(gBattleTextBuff1, MOVE_TAUNT);
ret = TRUE;
}
// Check encore
if (gDisableStructs[gBattlerTarget].encoreTimer != 0)
if (gDisableStructs[battlerId].encoreTimer != 0)
{
gDisableStructs[gActiveBattler].encoredMove = 0;
gDisableStructs[gBattlerTarget].encoreTimerStartValue = gDisableStructs[gBattlerTarget].encoreTimer = 0;
gDisableStructs[battlerId].encoredMove = 0;
gDisableStructs[battlerId].encoreTimerStartValue = gDisableStructs[battlerId].encoreTimer = 0;
gBattleCommunication[MULTISTRING_CHOOSER] = MULTI_CUREENCORE; // STRINGID_PKMNENCOREENDED
ret = TRUE;
}
@ -5645,10 +5646,10 @@ static bool32 GetMentalHerbEffect(u8 battlerId)
ret = TRUE;
}
// Check disable
if (gDisableStructs[gBattlerTarget].disableTimer != 0)
if (gDisableStructs[battlerId].disableTimer != 0)
{
gDisableStructs[gBattlerTarget].disableTimer = gDisableStructs[gBattlerTarget].disableTimerStartValue = 0;
gDisableStructs[gBattlerTarget].disabledMove = 0;
gDisableStructs[battlerId].disableTimer = gDisableStructs[battlerId].disableTimerStartValue = 0;
gDisableStructs[battlerId].disabledMove = 0;
gBattleCommunication[MULTISTRING_CHOOSER] = MULTI_CUREDISABLE;
ret = TRUE;
}