Added missing MOVE_UNAVAILABLE to Gorilla Tactics check

This commit is contained in:
Eduardo Quezada D'Ottone 2022-07-18 09:24:08 -04:00
parent e791cf90ad
commit e55fea47f3

View File

@ -1893,7 +1893,7 @@ u8 TrySetCantSelectMoveBattleScript(void)
}
}
if ((GetBattlerAbility(gActiveBattler) == ABILITY_GORILLA_TACTICS) && *choicedMove != MOVE_NONE
&& *choicedMove != 0xFFFF && *choicedMove != move)
&& *choicedMove != MOVE_UNAVAILABLE && *choicedMove != move)
{
gCurrentMove = *choicedMove;
gLastUsedItem = gBattleMons[gActiveBattler].item;
@ -1977,7 +1977,7 @@ u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check)
else if (gBattleMons[battlerId].moves[i] == MOVE_STUFF_CHEEKS && ItemId_GetPocket(gBattleMons[gActiveBattler].item) != POCKET_BERRIES)
unusableMoves |= gBitTable[i];
// Gorilla Tactics
else if (GetBattlerAbility(battlerId) == ABILITY_GORILLA_TACTICS && *choicedMove != MOVE_NONE && *choicedMove != 0xFFFF && *choicedMove != gBattleMons[battlerId].moves[i])
else if (GetBattlerAbility(battlerId) == ABILITY_GORILLA_TACTICS && *choicedMove != MOVE_NONE && *choicedMove != MOVE_UNAVAILABLE && *choicedMove != gBattleMons[battlerId].moves[i])
unusableMoves |= gBitTable[i];
}
return unusableMoves;