From f0d33c96aa617e22c64e254a6633a2d23ac65d99 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Fri, 29 Mar 2024 13:47:40 -0400 Subject: [PATCH] Fix Self-Destruct and Explosion not taking type advantage into account --- src/data/move.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/move.ts b/src/data/move.ts index 55118a1ff..99c291411 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -634,7 +634,7 @@ export class SacrificialAttr extends MoveEffectAttr { } getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { - return Math.ceil((1 - user.getHpRatio()) * 10) - 10; + return Math.ceil(((1 - user.getHpRatio()) * 10 - 10) * (target.getAttackTypeEffectiveness(move.type) - 0.5)); } }