ability: sturdy ability tag no longer pops up with 1 max hp

This commit is contained in:
Madi Simpson 2024-05-05 08:38:55 -07:00 committed by Samuel H
parent 5c6e161eda
commit fa01f32475
1 changed files with 1 additions and 1 deletions

View File

@ -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);