Fix Sturdy HP check in wrong place

pull/24/head
Flashfyre 2024-04-02 01:15:53 -04:00
parent e171b10d40
commit 91ab0b4b32
1 changed files with 3 additions and 2 deletions

View File

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