From 8f692ed0553e3292e44b3d49a3c13673bb64cacc Mon Sep 17 00:00:00 2001 From: FosterProgramming Date: Tue, 18 Nov 2025 23:33:41 +0100 Subject: [PATCH] Block selecting x items when contrary pokemon are at minimum stages (#8288) --- src/item_use.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/item_use.c b/src/item_use.c index 18fdbea192..b97ac1202b 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -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: