From ffe7c371b3dd5a22a841a335972535d8f51fc956 Mon Sep 17 00:00:00 2001 From: Dmitriy Date: Wed, 22 May 2024 09:33:29 -0400 Subject: [PATCH] run auto formatter because I forgot --- src/data/ability.ts | 6 +++--- src/phases.ts | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index fec6f77ae76..e00c6b5f9a8 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -2519,14 +2519,14 @@ export class HealFromBerryUseAbAttr extends AbAttr { private healPercent: number; constructor(healPercent: number) { - super() + super(); // Clamp healPercent so its between [0,1]. this.healPercent = Math.max(Math.min(healPercent, 1), 0); } apply(pokemon: Pokemon, passive: boolean, ...args: [Utils.BooleanHolder, any[]]): boolean { - const { name: abilityName } = passive ? pokemon.getPassiveAbility() : pokemon.getAbility() + const { name: abilityName } = passive ? pokemon.getPassiveAbility() : pokemon.getAbility(); pokemon.scene.unshiftPhase( new PokemonHealPhase( pokemon.scene, @@ -2537,7 +2537,7 @@ export class HealFromBerryUseAbAttr extends AbAttr { ) ); - return true + return true; } } diff --git a/src/phases.ts b/src/phases.ts index 2b7ce611db6..8c4f5d620c4 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -2107,7 +2107,9 @@ export class BerryPhase extends FieldPhase { if (cancelled.value) { pokemon.scene.queueMessage(getPokemonMessage(pokemon, " is too\nnervous to eat berries!")); } else { - this.scene.unshiftPhase(new CommonAnimPhase(this.scene, pokemon.getBattlerIndex(), pokemon.getBattlerIndex(), CommonAnim.USE_ITEM)); + this.scene.unshiftPhase( + new CommonAnimPhase(this.scene, pokemon.getBattlerIndex(), pokemon.getBattlerIndex(), CommonAnim.USE_ITEM) + ); for (const berryModifier of this.scene.applyModifiers(BerryModifier, pokemon.isPlayer(), pokemon) as BerryModifier[]) { if (berryModifier.consumed) {