mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-07 17:02:16 +02:00
removed a useless parameter
This commit is contained in:
parent
19cd424e48
commit
9d32a8c03b
@ -3646,8 +3646,7 @@ export class ShowPartyExpBarPhase extends PlayerPartyMemberPokemonPhase {
|
|||||||
let newLevel: integer;
|
let newLevel: integer;
|
||||||
pokemon.addExp(exp.value);
|
pokemon.addExp(exp.value);
|
||||||
newLevel = pokemon.level;
|
newLevel = pokemon.level;
|
||||||
const isLevelUp = newLevel > lastLevel;
|
if (newLevel > lastLevel) {
|
||||||
if (isLevelUp) {
|
|
||||||
this.scene.unshiftPhase(new LevelUpPhase(this.scene, this.partyMemberIndex, lastLevel, newLevel));
|
this.scene.unshiftPhase(new LevelUpPhase(this.scene, this.partyMemberIndex, lastLevel, newLevel));
|
||||||
}
|
}
|
||||||
this.scene.unshiftPhase(new HidePartyExpBarPhase(this.scene));
|
this.scene.unshiftPhase(new HidePartyExpBarPhase(this.scene));
|
||||||
@ -3656,15 +3655,15 @@ export class ShowPartyExpBarPhase extends PlayerPartyMemberPokemonPhase {
|
|||||||
if (this.scene.expParty === 2) {
|
if (this.scene.expParty === 2) {
|
||||||
this.end();
|
this.end();
|
||||||
} else if (this.scene.expParty === 1) {
|
} else if (this.scene.expParty === 1) {
|
||||||
if (isLevelUp) {
|
if (newLevel > lastLevel) {
|
||||||
this.scene.partyExpBar.showPokemonExp(pokemon, exp.value, isLevelUp, this.scene.expParty === 1).then(() => {
|
this.scene.partyExpBar.showPokemonExp(pokemon, exp.value, this.scene.expParty === 1).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, isLevelUp, this.scene.expParty === 1).then(() => {
|
this.scene.partyExpBar.showPokemonExp(pokemon, exp.value, this.scene.expParty === 1).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, isLevelUp: boolean, showOnlyLevelUp: boolean): Promise<void> {
|
showPokemonExp(pokemon: Pokemon, expValue: integer, showOnlyLevelUp: boolean): Promise<void> {
|
||||||
return new Promise<void>(resolve => {
|
return new Promise<void>(resolve => {
|
||||||
if (this.shown)
|
if (this.shown)
|
||||||
return resolve();
|
return resolve();
|
||||||
|
Loading…
Reference in New Issue
Block a user