Hopefully fixed bug

my sanity and homework are paying the price for this lol
This commit is contained in:
Bertie690 2025-04-21 23:54:48 -04:00
parent b341943ea8
commit 82572b263d

View File

@ -4113,6 +4113,7 @@ export class PostTurnRestoreBerryAbAttr extends PostTurnAbAttr {
const chosenBerryType = berriesEaten[randomIdx]; const chosenBerryType = berriesEaten[randomIdx];
pokemon.battleData.berriesEaten.splice(randomIdx, 1); // Remove berry from memory pokemon.battleData.berriesEaten.splice(randomIdx, 1); // Remove berry from memory
const chosenBerry = new BerryModifierType(chosenBerryType); const chosenBerry = new BerryModifierType(chosenBerryType);
chosenBerry.id = "BERRY" // needed to prevent item deletion; remove after modifier rework
// Add the randomly chosen berry or update the existing one // Add the randomly chosen berry or update the existing one
const berryModifier = globalScene.findModifier( const berryModifier = globalScene.findModifier(