mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-10-23 13:35:53 +02:00
26 lines
675 B
TypeScript
26 lines
675 B
TypeScript
import { globalScene } from "#app/global-scene";
|
|
import { Mode } from "#app/ui/ui";
|
|
import i18next from "i18next";
|
|
import { FieldPhase } from "./field-phase";
|
|
|
|
export class LevelCapPhase extends FieldPhase {
|
|
start(): void {
|
|
super.start();
|
|
|
|
globalScene.ui.setMode(Mode.MESSAGE).then(() => {
|
|
// Sound loaded into game as is
|
|
globalScene.playSound("level_up_fanfare");
|
|
globalScene.ui.showText(
|
|
i18next.t("battle:levelCapUp", {
|
|
levelCap: globalScene.getMaxExpLevel(),
|
|
}),
|
|
null,
|
|
() => this.end(),
|
|
null,
|
|
true,
|
|
);
|
|
this.executeForAll(pokemon => pokemon.updateInfo(true));
|
|
});
|
|
}
|
|
}
|