From 1dec46526166e31d07032aff8ceac30dab8907f5 Mon Sep 17 00:00:00 2001 From: alchemis Date: Mon, 20 May 2024 16:40:46 -0300 Subject: [PATCH] fixes enigma berry proccing twice from a single hit --- src/data/berry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/berry.ts b/src/data/berry.ts index 12ce146a8dc..2c298b4909f 100644 --- a/src/data/berry.ts +++ b/src/data/berry.ts @@ -40,7 +40,7 @@ export function getBerryPredicate(berryType: BerryType): BerryPredicate { case BerryType.LUM: return (pokemon: Pokemon) => !!pokemon.status || !!pokemon.getTag(BattlerTagType.CONFUSED); case BerryType.ENIGMA: - return (pokemon: Pokemon) => !!pokemon.turnData.attacksReceived.filter(a => a.result === HitResult.SUPER_EFFECTIVE).length; + return (pokemon: Pokemon) => !!pokemon.turnData.attacksReceived.filter(a => a.result === HitResult.SUPER_EFFECTIVE).length && !(pokemon.scene.getCurrentPhase() instanceof TurnEndPhase); case BerryType.LIECHI: case BerryType.GANLON: case BerryType.PETAYA: