From 4a528aebcca67a1325f85e597f0245fe18abd6f9 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Mon, 8 Apr 2024 12:52:37 -0400 Subject: [PATCH] Fix one hit KO moves not working properly --- src/data/move.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index fa236cdf1..441dfa777 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1133,7 +1133,7 @@ export class OneHitKOAttr extends MoveAttr { return (user, target, move) => { const cancelled = new Utils.BooleanHolder(false); applyAbAttrs(BlockOneHitKOAbAttr, target, cancelled); - return !cancelled && user.level >= target.level; + return !cancelled.value && user.level >= target.level; } } } @@ -1877,7 +1877,7 @@ export class OneHitKOAccuracyAttr extends MoveAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const accuracy = args[0] as Utils.NumberHolder; accuracy.value = 30 + 70 * Math.min(target.level / user.level, 0.5) * 2; - return false; + return true; } }