From e84649854dfaff5dc02da255a09496332ba47e9c Mon Sep 17 00:00:00 2001 From: schmidtc1 <62030095+schmidtc1@users.noreply.github.com> Date: Mon, 22 Jul 2024 20:42:55 -0400 Subject: [PATCH] [Bug] Enemy pokemon's Harvest creates berry icons on the player's side when triggered (#3077) --- src/data/ability.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 842f95e9ddd..161e7594a8f 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -3031,7 +3031,11 @@ export class PostTurnLootAbAttr extends PostTurnAbAttr { ) as BerryModifier | undefined; if (!berryModifier) { - pokemon.scene.addModifier(new BerryModifier(chosenBerry, pokemon.id, chosenBerryType, 1)); + if (pokemon.isPlayer()) { + pokemon.scene.addModifier(new BerryModifier(chosenBerry, pokemon.id, chosenBerryType, 1)); + } else { + pokemon.scene.addEnemyModifier(new BerryModifier(chosenBerry, pokemon.id, chosenBerryType, 1)); + } } else if (berryModifier.stackCount < berryModifier.getMaxHeldItemCount(pokemon)) { berryModifier.stackCount++; }