From 4b98c2fe765152cac37b5f46c60808e8db86c2c9 Mon Sep 17 00:00:00 2001 From: Xavion3 Date: Thu, 11 Apr 2024 10:45:33 +1000 Subject: [PATCH] Fix random category Also fix the variable name --- src/data/move.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index 16690f2263e..6b44c2d6578 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1930,13 +1930,13 @@ export class ShellSideArmCategoryAttr extends VariableMoveCategoryAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const category = (args[0] as Utils.IntegerHolder); const atkRatio = user.getBattleStat(Stat.ATK, target, move) / target.getBattleStat(Stat.DEF, user, move); - const defRatio = user.getBattleStat(Stat.SPATK, target, move) / target.getBattleStat(Stat.SPDEF, user, move); + const specialRatio = user.getBattleStat(Stat.SPATK, target, move) / target.getBattleStat(Stat.SPDEF, user, move); // Shell Side Arm is much more complicated than it looks, this is a partial implementation to try to achieve something similar to the games - if (atkRatio > defRatio) { + if (atkRatio > specialRatio) { category.value = MoveCategory.PHYSICAL; return true; - } else if (atkRatio === defRatio && user.randSeedInt(1) === 0) { + } else if (atkRatio === specialRatio && user.randSeedInt(2) === 0) { category.value = MoveCategory.PHYSICAL; return true; }