Skip to content

Commit

Permalink
[Bug] Enemy pokemon's Harvest creates berry icons on the player's sid…
Browse files Browse the repository at this point in the history
…e when triggered (#3077)
  • Loading branch information
schmidtc1 committed Jul 23, 2024
1 parent d3c9392 commit e846498
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/data/ability.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
Expand Down

0 comments on commit e846498

Please sign in to comment.