fixed StealEatBerryAttr sometimes eating 2 stacks of a berry
parent
85edb32c06
commit
703b9303ec
|
@ -1189,7 +1189,7 @@ export class StealEatBerryAttr extends EatBerryAttr {
|
||||||
if (heldBerries.length) {
|
if (heldBerries.length) {
|
||||||
this.chosenBerry = heldBerries[user.randSeedInt(heldBerries.length)];
|
this.chosenBerry = heldBerries[user.randSeedInt(heldBerries.length)];
|
||||||
|
|
||||||
if (!--this.chosenBerry.stackCount)
|
if (this.chosenBerry.stackCount == 1)
|
||||||
target.scene.removeModifier(this.chosenBerry);
|
target.scene.removeModifier(this.chosenBerry);
|
||||||
target.scene.updateModifiers(target.isPlayer());
|
target.scene.updateModifiers(target.isPlayer());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue