pokerogue/src/phases/level-cap-phase.ts
Sirz Benjie 408b66f913
[Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495)
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-03-09 14:13:25 -07:00

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));
});
}
}