From e633ff1577e2695f6536d8e1dc30557d7e156b09 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Fri, 28 Jul 2023 10:23:37 -0400 Subject: [PATCH] Remove logic that makes all status moves 100 accuracy --- src/battle-phases.ts | 24 ++++++++++-------------- src/data/move.ts | 4 ++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/battle-phases.ts b/src/battle-phases.ts index 36fc5e206..6045041a5 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -1392,21 +1392,17 @@ class MoveEffectPhase extends PokemonPhase { if (!this.move.getMove().getAttrs(OneHitKOAttr).length && this.scene.arena.getTag(ArenaTagType.GRAVITY)) moveAccuracy.value = Math.floor(moveAccuracy.value * 1.67); - if (this.move.getMove().category !== MoveCategory.STATUS) { - const userAccuracyLevel = new Utils.IntegerHolder(this.getUserPokemon().summonData.battleStats[BattleStat.ACC]); - const targetEvasionLevel = new Utils.IntegerHolder(target.summonData.battleStats[BattleStat.EVA]); - this.scene.applyModifiers(TempBattleStatBoosterModifier, this.player, TempBattleStat.ACC, userAccuracyLevel); - const rand = Utils.randInt(100, 1); - let accuracyMultiplier = 1; - if (userAccuracyLevel.value !== targetEvasionLevel.value) { - accuracyMultiplier = userAccuracyLevel.value > targetEvasionLevel.value - ? (3 + Math.min(userAccuracyLevel.value - targetEvasionLevel.value, 6)) / 3 - : 3 / (3 + Math.min(targetEvasionLevel.value - userAccuracyLevel.value, 6)); - } - return rand <= moveAccuracy.value * accuracyMultiplier; + const userAccuracyLevel = new Utils.IntegerHolder(this.getUserPokemon().summonData.battleStats[BattleStat.ACC]); + const targetEvasionLevel = new Utils.IntegerHolder(target.summonData.battleStats[BattleStat.EVA]); + this.scene.applyModifiers(TempBattleStatBoosterModifier, this.player, TempBattleStat.ACC, userAccuracyLevel); + const rand = Utils.randInt(100, 1); + let accuracyMultiplier = 1; + if (userAccuracyLevel.value !== targetEvasionLevel.value) { + accuracyMultiplier = userAccuracyLevel.value > targetEvasionLevel.value + ? (3 + Math.min(userAccuracyLevel.value - targetEvasionLevel.value, 6)) / 3 + : 3 / (3 + Math.min(targetEvasionLevel.value - userAccuracyLevel.value, 6)); } - - return true; + return rand <= moveAccuracy.value * accuracyMultiplier; } getUserPokemon(): Pokemon { diff --git a/src/data/move.ts b/src/data/move.ts index ede4d5a12..860b0556e 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1651,6 +1651,10 @@ export class DisableMoveAttr extends MoveEffectAttr { } }; } + + getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { + return -5; + } } export class FrenzyAttr extends MoveEffectAttr {