mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-18 23:11:11 +00:00
ability: sturdy ability tag no longer pops up with 1 max hp
This commit is contained in:
parent
5c6e161eda
commit
fa01f32475
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user