From 4afa0bf1421b8fcbeafdd40970a12810180c4bde Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Thu, 4 Apr 2024 21:16:25 -0400 Subject: [PATCH] Fix damage booster type check --- src/modifier/modifier.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index 1ee1c26a0..3638c2380 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -666,6 +666,8 @@ export class AttackTypeBoosterModifier extends PokemonHeldItemModifier { const attackTypeBoosterModifier = modifier as AttackTypeBoosterModifier; return attackTypeBoosterModifier.moveType === this.moveType && attackTypeBoosterModifier.boostMultiplier === this.boostMultiplier; } + + return false; } clone() { @@ -677,7 +679,7 @@ export class AttackTypeBoosterModifier extends PokemonHeldItemModifier { } shouldApply(args: any[]): boolean { - return super.shouldApply(args) && args.length === 2 && args[1] instanceof Utils.NumberHolder; + return super.shouldApply(args) && args.length === 3 && typeof args[1] === 'number' && args[2] instanceof Utils.NumberHolder; } apply(args: any[]): boolean {