From 4922f8cb62398961dcfb5f4cb7324f05e457c422 Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Wed, 23 Apr 2025 12:36:58 -0500 Subject: [PATCH] Minor cleanup of updatePokemonExp --- src/ui/battle-info/player-battle-info.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/ui/battle-info/player-battle-info.ts b/src/ui/battle-info/player-battle-info.ts index 0acd3b3a623..de8a5ea4edd 100644 --- a/src/ui/battle-info/player-battle-info.ts +++ b/src/ui/battle-info/player-battle-info.ts @@ -95,17 +95,13 @@ export class PlayerBattleInfo extends BattleInfo { this.updateHpFrame(); } - async updatePokemonExp(pokemon: PlayerPokemon, instant?: boolean, levelDurationMultiplier = 1): Promise { + updatePokemonExp(pokemon: PlayerPokemon, instant?: boolean, levelDurationMultiplier = 1): Promise { const levelUp = this.lastLevel < pokemon.level; const relLevelExp = getLevelRelExp(this.lastLevel + 1, pokemon.species.growthRate); const levelExp = levelUp ? relLevelExp : pokemon.levelExp; let ratio = relLevelExp ? levelExp / relLevelExp : 0; if (this.lastLevel >= globalScene.getMaxExpLevel(true)) { - if (levelUp) { - ratio = 1; - } else { - ratio = 0; - } + ratio = levelUp ? 1 : 0; instant = true; } const durationMultiplier = Phaser.Tweens.Builders.GetEaseFunction("Sine.easeIn")(