Fix variable move accuracy not working with guaranteed hits

pull/2/head
Flashfyre 2023-07-05 12:10:23 -04:00
parent 7cd45b30eb
commit 2ec0c32487
1 changed files with 2 additions and 2 deletions

View File

@ -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);