mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-25 16:26:25 +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;
|
) as BerryModifier | undefined;
|
||||||
|
|
||||||
if (!berryModifier) {
|
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)) {
|
} else if (berryModifier.stackCount < berryModifier.getMaxHeldItemCount(pokemon)) {
|
||||||
berryModifier.stackCount++;
|
berryModifier.stackCount++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user