Fix damage booster type check

This commit is contained in:
Flashfyre committed 2024-04-04 21:16:25 -04:00
1 parent e191ae0567
commit 4afa0bf142
1 file changed
+3 -1
+3 -1
View File
@@ -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 {