From 91ab0b4b3288b0d39aa636e1fcf11a8b008a8f5a Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Tue, 2 Apr 2024 01:15:53 -0400 Subject: [PATCH] Fix Sturdy HP check in wrong place --- src/field/pokemon.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index a31f14f60..aef6cae01 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1172,8 +1172,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { this.scene.applyModifiers(EnemyDamageReducerModifier, false, damage); } - if (damage.value && this.getHpRatio() === 1) { - applyPreDefendAbAttrs(PreDefendFullHpEndureAbAttr, this, source, battlerMove, cancelled, damage); + if (damage.value) { + if (this.getHpRatio() === 1) + applyPreDefendAbAttrs(PreDefendFullHpEndureAbAttr, this, source, battlerMove, cancelled, damage); const oneHitKo = result === HitResult.ONE_HIT_KO; damage.value = this.damageAndUpdate(damage.value, result as DamageResult, isCritical, oneHitKo, oneHitKo);