Fix Sturdy HP check in wrong place

This commit is contained in:
Flashfyre 2024-04-02 01:15:53 -04:00
parent e171b10d40
commit 91ab0b4b32

View File

@ -1172,7 +1172,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
this.scene.applyModifiers(EnemyDamageReducerModifier, false, damage);
}
if (damage.value && this.getHpRatio() === 1) {
if (damage.value) {
if (this.getHpRatio() === 1)
applyPreDefendAbAttrs(PreDefendFullHpEndureAbAttr, this, source, battlerMove, cancelled, damage);
const oneHitKo = result === HitResult.ONE_HIT_KO;