[Bug] Fix Harvest not checking stack limits for berries (#1920)

This commit is contained in:
AJ Fontaine 2024-06-07 17:42:48 -04:00 committed by GitHub
parent 83c11a0865
commit eb058d7eb7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -2590,7 +2590,7 @@ export class PostTurnLootAbAttr extends PostTurnAbAttr {
if (!berryModifier) {
pokemon.scene.addModifier(new BerryModifier(chosenBerry, pokemon.id, chosenBerryType, 1));
} else {
} else if (berryModifier.stackCount < berryModifier.getMaxHeldItemCount(pokemon)) {
berryModifier.stackCount++;
}