diff --git a/src/data/move.ts b/src/data/move.ts index 5ead38097c3..e89f3b20761 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -3964,6 +3964,8 @@ export class AddBattlerTagAttr extends MoveEffectAttr { return -3; case BattlerTagType.ENCORE: return -2; + case BattlerTagType.MINIMIZED: + return 0; case BattlerTagType.INGRAIN: case BattlerTagType.IGNORE_ACCURACY: case BattlerTagType.AQUA_RING: diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 5b37365bec1..f8e95786aee 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -3505,6 +3505,10 @@ export class EnemyPokemon extends Pokemon { const target = this.scene.getField()[mt]; let targetScore = move.getUserBenefitScore(this, target, move) + move.getTargetBenefitScore(this, target, move) * (mt < BattlerIndex.ENEMY === this.isPlayer() ? 1 : -1); + if (Number.isNaN(targetScore)) { + console.error(`Move ${move.name} returned score of NaN`); + targetScore = 0; + } if ((move.name.endsWith(" (N)") || !move.applyConditions(this, target, move)) && ![Moves.SUCKER_PUNCH, Moves.UPPER_HAND, Moves.THUNDERCLAP].includes(move.id)) { targetScore = -20; } else if (move instanceof AttackMove) {