From 9eae85966cd6790496ce591144c9204113534b3a Mon Sep 17 00:00:00 2001 From: Tiduzz Date: Thu, 9 May 2024 18:29:15 -0300 Subject: [PATCH] Refined code, as requested by bennybroseph --- src/data/ability.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 1e4a9d58a03..7e67ec74fb2 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -251,9 +251,9 @@ export class PreDefendFullHpEndureAbAttr extends PreDefendAbAttr { applyPreDefend(pokemon: Pokemon, passive: boolean, attacker: Pokemon, move: PokemonMove, cancelled: Utils.BooleanHolder, args: any[]): boolean { if (pokemon.hp === pokemon.getMaxHp() && pokemon.getMaxHp() >= 1 && (args[0] as Utils.NumberHolder).value >= pokemon.hp){ //Checks if pokemon hp is full and if the damage is higher or equal to defender hp return pokemon.addTag(BattlerTagType.STURDY, 1); //activates sturdy - } else { - return false - } + } + + return false } }