Block selecting x items when contrary pokemon are at minimum stages (#8288)

This commit is contained in:
FosterProgramming 2025-11-18 23:33:41 +01:00 committed by GitHub
parent 4a69268bd5
commit 8f692ed055
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1254,7 +1254,8 @@ bool32 CannotUseItemsInBattle(u16 itemId, struct Pokemon *mon)
switch (battleUsage)
{
case EFFECT_ITEM_INCREASE_STAT:
if (gBattleMons[gBattlerInMenuId].statStages[GetItemEffect(itemId)[1]] == MAX_STAT_STAGE)
u32 ability = GetBattlerAbility(gBattlerInMenuId);
if (CompareStat(gBattlerInMenuId, GetItemEffect(itemId)[1], MAX_STAT_STAGE, CMP_EQUAL, ability))
cannotUse = TRUE;
break;
case EFFECT_ITEM_SET_FOCUS_ENERGY: