[Bug] Fix incorrect move effectiveness (#2757)

* Fix incorrect move effectiveness

* Casting variable should be enough
This commit is contained in:
hayuna 2024-07-02 18:20:45 +02:00 committed by GitHub
parent 6da5d9d6aa
commit 13b23289d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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 {