Fix max mushroom unable to be selected when one stat is maxed (#8287)

This commit is contained in:
FosterProgramming 2025-11-18 23:12:11 +01:00 committed by GitHub
parent 5e40456f45
commit a914c11b30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1293,11 +1293,12 @@ bool32 CannotUseItemsInBattle(u16 itemId, struct Pokemon *mon)
case EFFECT_ITEM_INCREASE_ALL_STATS:
{
u32 ability = GetBattlerAbility(gBattlerInMenuId);
cannotUse = TRUE;
for (i = STAT_ATK; i < NUM_STATS; i++)
{
if (CompareStat(gBattlerInMenuId, i, MAX_STAT_STAGE, CMP_EQUAL, ability))
if (!CompareStat(gBattlerInMenuId, i, MAX_STAT_STAGE, CMP_EQUAL, ability))
{
cannotUse = TRUE;
cannotUse = FALSE;
break;
}
}