[Bug] Enemy pokemon's Harvest creates berry icons on the player's side when triggered (#3077)
This commit is contained in:
parent
d3c9392721
commit
e84649854d
|
@ -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++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue