mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-07 08:52:17 +02:00
added new level in the text
This commit is contained in:
parent
9d32a8c03b
commit
7060a5a0d2
@ -3656,14 +3656,14 @@ export class ShowPartyExpBarPhase extends PlayerPartyMemberPokemonPhase {
|
|||||||
this.end();
|
this.end();
|
||||||
} else if (this.scene.expParty === 1) {
|
} else if (this.scene.expParty === 1) {
|
||||||
if (newLevel > lastLevel) {
|
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));
|
setTimeout(() => this.end(), 200 / Math.pow(2, this.scene.expGainsSpeed));
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.end();
|
this.end();
|
||||||
}
|
}
|
||||||
} else if (this.scene.expGainsSpeed < 3) {
|
} 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));
|
setTimeout(() => this.end(), 500 / Math.pow(2, this.scene.expGainsSpeed));
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -29,7 +29,7 @@ export default class PartyExpBar extends Phaser.GameObjects.Container {
|
|||||||
this.shown = false;
|
this.shown = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
showPokemonExp(pokemon: Pokemon, expValue: integer, showOnlyLevelUp: boolean): Promise<void> {
|
showPokemonExp(pokemon: Pokemon, expValue: integer, showOnlyLevelUp: boolean, newLevel: number): Promise<void> {
|
||||||
return new Promise<void>(resolve => {
|
return new Promise<void>(resolve => {
|
||||||
if (this.shown)
|
if (this.shown)
|
||||||
return resolve();
|
return resolve();
|
||||||
@ -40,7 +40,7 @@ export default class PartyExpBar extends Phaser.GameObjects.Container {
|
|||||||
this.add(this.pokemonIcon);
|
this.add(this.pokemonIcon);
|
||||||
|
|
||||||
if (showOnlyLevelUp) {
|
if (showOnlyLevelUp) {
|
||||||
this.expText.setText(`Lv. UP`);
|
this.expText.setText(`Lv. UP : ${newLevel.toString()}`);
|
||||||
} else {
|
} else {
|
||||||
this.expText.setText(`+${expValue.toString()}`);
|
this.expText.setText(`+${expValue.toString()}`);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user