From 4f1fa4e19223888a8c2a23d1602129148d29ec75 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 06f6a2c2de2..c8ead786b33 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1934,13 +1934,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; }