From 13b23289d1203470271b56deeab35e9f07deeca1 Mon Sep 17 00:00:00 2001 From: hayuna Date: Tue, 2 Jul 2024 18:20:45 +0200 Subject: [PATCH] [Bug] Fix incorrect move effectiveness (#2757) * Fix incorrect move effectiveness * Casting variable should be enough --- src/field/pokemon.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 3ee19920ae9..88d7f6b73a8 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1155,7 +1155,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { applyPreDefendAbAttrs(MoveImmunityAbAttr, this, source, move, cancelled, typeMultiplier, true); } - return (!cancelled.value ? typeMultiplier.value : 0) as TypeDamageMultiplier; + return (!cancelled.value ? Number(typeMultiplier.value) : 0) as TypeDamageMultiplier; } getAttackTypeEffectiveness(moveType: Type, source?: Pokemon, ignoreStrongWinds: boolean = false): TypeDamageMultiplier {