From 29b0f046a648bfbc1a2607ae2cf95225f66237d3 Mon Sep 17 00:00:00 2001
From: Flashfyre <flashfireex@gmail.com>
Date: Fri, 27 Oct 2023 23:18:18 -0400
Subject: [PATCH] Lower Berry Pouch cap to 3

---
 src/battle-phases.ts     | 2 +-
 src/modifier/modifier.ts | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/battle-phases.ts b/src/battle-phases.ts
index 1a70d1b70..2f0b20c3f 100644
--- a/src/battle-phases.ts
+++ b/src/battle-phases.ts
@@ -256,7 +256,7 @@ export class EncounterPhase extends BattlePhase {
         this.scene.gameData.setPokemonSeen(enemyPokemon);
       }
 
-      if (this.scene.gameMode === GameMode.CLASSIC && battle.waveIndex === 200 && enemyPokemon.species.speciesId === Species.ETERNATUS)
+      if (this.scene.gameMode === GameMode.CLASSIC && (battle.waveIndex === 200 || !(battle.waveIndex % 250)) && enemyPokemon.species.speciesId === Species.ETERNATUS)
         enemyPokemon.formIndex = 1;
 
       loadEnemyAssets.push(enemyPokemon.loadAssets());
diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts
index 18e3a0df1..22ffbec06 100644
--- a/src/modifier/modifier.ts
+++ b/src/modifier/modifier.ts
@@ -671,13 +671,13 @@ export class PreserveBerryModifier extends PersistentModifier {
 
   apply(args: any[]): boolean {
     if (!(args[0] as Utils.BooleanHolder).value)
-      (args[0] as Utils.BooleanHolder).value = this.getStackCount() === this.getMaxStackCount() || Utils.randInt(this.getMaxStackCount()) < this.getStackCount();
+      (args[0] as Utils.BooleanHolder).value = Utils.randInt(this.getMaxStackCount()) < this.getStackCount();
 
     return true;
   }
 
   getMaxStackCount(): integer {
-    return 4;
+    return 3;
   }
 }