mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-11 02:42:19 +02:00
fixed 0 stack berry modifier not disappearing
This commit is contained in:
parent
9cea00ce90
commit
7a6c215a7c
@ -1235,7 +1235,7 @@ export class EatBerryAttr extends MoveEffectAttr {
|
||||
|
||||
if (!preserve.value){ // remove the eaten berry if not preserved
|
||||
if (!--this.chosenBerry.stackCount)
|
||||
target.scene.removeModifier(this.chosenBerry);
|
||||
target.scene.removeModifier(this.chosenBerry, !target.isPlayer());
|
||||
target.scene.updateModifiers(target.isPlayer());
|
||||
}
|
||||
|
||||
@ -1277,7 +1277,7 @@ export class StealEatBerryAttr extends EatBerryAttr {
|
||||
this.chosenBerry = heldBerries[user.randSeedInt(heldBerries.length)];
|
||||
|
||||
if (this.chosenBerry.stackCount == 1) // remove modifier if its the last berry
|
||||
target.scene.removeModifier(this.chosenBerry);
|
||||
target.scene.removeModifier(this.chosenBerry, !target.isPlayer());
|
||||
target.scene.updateModifiers(target.isPlayer());
|
||||
|
||||
user.scene.queueMessage(getPokemonMessage(user, ` stole and ate\n${target.name}'s ${this.chosenBerry.type.name}!`));
|
||||
|
Loading…
Reference in New Issue
Block a user