From 7060a5a0d21e7211a25522ea9cbb4a8ce2a2602d Mon Sep 17 00:00:00 2001 From: Greenlamp Date: Sun, 5 May 2024 14:58:41 +0200 Subject: [PATCH] added new level in the text --- src/phases.ts | 4 ++-- src/ui/party-exp-bar.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/phases.ts b/src/phases.ts index cc121e582e8..70de8db1cb1 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -3656,14 +3656,14 @@ export class ShowPartyExpBarPhase extends PlayerPartyMemberPokemonPhase { this.end(); } else if (this.scene.expParty === 1) { if (newLevel > lastLevel) { - this.scene.partyExpBar.showPokemonExp(pokemon, exp.value, this.scene.expParty === 1).then(() => { + this.scene.partyExpBar.showPokemonExp(pokemon, exp.value, this.scene.expParty === 1, newLevel).then(() => { setTimeout(() => this.end(), 200 / Math.pow(2, this.scene.expGainsSpeed)); }); } else { this.end(); } } else if (this.scene.expGainsSpeed < 3) { - this.scene.partyExpBar.showPokemonExp(pokemon, exp.value, this.scene.expParty === 1).then(() => { + this.scene.partyExpBar.showPokemonExp(pokemon, exp.value, this.scene.expParty === 1, newLevel).then(() => { setTimeout(() => this.end(), 500 / Math.pow(2, this.scene.expGainsSpeed)); }); } else { diff --git a/src/ui/party-exp-bar.ts b/src/ui/party-exp-bar.ts index b647b9d5132..73117da0b20 100644 --- a/src/ui/party-exp-bar.ts +++ b/src/ui/party-exp-bar.ts @@ -29,7 +29,7 @@ export default class PartyExpBar extends Phaser.GameObjects.Container { this.shown = false; } - showPokemonExp(pokemon: Pokemon, expValue: integer, showOnlyLevelUp: boolean): Promise { + showPokemonExp(pokemon: Pokemon, expValue: integer, showOnlyLevelUp: boolean, newLevel: number): Promise { return new Promise(resolve => { if (this.shown) return resolve(); @@ -40,7 +40,7 @@ export default class PartyExpBar extends Phaser.GameObjects.Container { this.add(this.pokemonIcon); if (showOnlyLevelUp) { - this.expText.setText(`Lv. UP`); + this.expText.setText(`Lv. UP : ${newLevel.toString()}`); } else { this.expText.setText(`+${expValue.toString()}`); }