mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-19 07:20:57 +00:00
[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…
x
Reference in New Issue
Block a user