changed condition so it works for doubles too

This commit is contained in:
geeil-han 2024-12-04 20:15:11 +01:00
parent 5428d56572
commit 97b7e9d9bf

View File

@ -7772,7 +7772,7 @@ export class StuffCheeksCondition extends MoveSelectCondition {
* @returns true if the user is holding a berry, otherwise false * @returns true if the user is holding a berry, otherwise false
*/ */
private selectableCondition(user: Pokemon): boolean { private selectableCondition(user: Pokemon): boolean {
return user.scene.findModifiers(m => m instanceof BerryModifier, user.isPlayer()).length > 0; return user?.getHeldItems()?.filter(m => m instanceof BerryModifier, user.isPlayer())?.length > 0;
} }
/** /**