From 2ec0c3248741802a54bc1bd6a00777717ea07be4 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Wed, 5 Jul 2023 12:10:23 -0400 Subject: [PATCH] Fix variable move accuracy not working with guaranteed hits --- src/battle-phases.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/battle-phases.ts b/src/battle-phases.ts index c4854354a..8b5f90453 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -1366,11 +1366,11 @@ class MoveEffectPhase extends PokemonPhase { const moveAccuracy = new Utils.NumberHolder(this.move.getMove().accuracy); + applyMoveAttrs(VariableAccuracyAttr, this.getUserPokemon(), target, this.move.getMove(), moveAccuracy); + if (moveAccuracy.value === -1) return true; - applyMoveAttrs(VariableAccuracyAttr, this.getUserPokemon(), target, this.move.getMove(), moveAccuracy); - if (!this.move.getMove().getAttrs(OneHitKOAttr).length && this.scene.arena.getTag(ArenaTagType.GRAVITY)) moveAccuracy.value = Math.floor(moveAccuracy.value * 1.67);