pokerogue/src/phases/level-cap-phase.ts
flx-sta 2bd07cb84e
fix and optimize imports (#4061)
- remove any `.js` extension imports
- remove unncessary dynamic imports of `modifier.ts` file. The file was being imported statically & dynamically. Made it pure static
- increase vite chunk-size warning limit

Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
2024-09-07 21:37:37 -07:00

22 lines
658 B
TypeScript

import BattleScene from "#app/battle-scene";
import { Mode } from "#app/ui/ui";
import i18next from "i18next";
import { FieldPhase } from "./field-phase";
export class LevelCapPhase extends FieldPhase {
constructor(scene: BattleScene) {
super(scene);
}
start(): void {
super.start();
this.scene.ui.setMode(Mode.MESSAGE).then(() => {
// Sound loaded into game as is
this.scene.playSound("level_up_fanfare");
this.scene.ui.showText(i18next.t("battle:levelCapUp", { levelCap: this.scene.getMaxExpLevel() }), null, () => this.end(), null, true);
this.executeForAll(pokemon => pokemon.updateInfo(true));
});
}
}