From fa01f32475fe91be746c3fc74a68bd7bd653d90b Mon Sep 17 00:00:00 2001 From: Madi Simpson Date: Sun, 5 May 2024 08:38:55 -0700 Subject: [PATCH] ability: sturdy ability tag no longer pops up with 1 max hp --- src/data/ability.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index cde89a0f4..40c3d1e5a 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -249,7 +249,7 @@ export class PreDefendFormChangeAbAttr extends PreDefendAbAttr { } export class PreDefendFullHpEndureAbAttr extends PreDefendAbAttr { applyPreDefend(pokemon: Pokemon, passive: boolean, attacker: Pokemon, move: PokemonMove, cancelled: Utils.BooleanHolder, args: any[]): boolean { - if (pokemon.getHpRatio() < 1 || (args[0] as Utils.NumberHolder).value < pokemon.hp) + if (pokemon.getMaxHp() <= 1 && (pokemon.getHpRatio() < 1 || (args[0] as Utils.NumberHolder).value < pokemon.hp)) return false; return pokemon.addTag(BattlerTagType.STURDY, 1);