Replace reference to Mode with UiMode and battleType with BattleStyle

This commit is contained in:
Sirz Benjie 2025-04-19 09:52:19 -05:00
parent 50d4e6e180
commit 2f46743a6b
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E

View File

@ -92,7 +92,7 @@ describe("UI - Type Hints", () => {
.enemySpecies(Species.ABRA) .enemySpecies(Species.ABRA)
.moveset([Moves.SPLASH, Moves.SHADOW_BALL, Moves.SOAK]) .moveset([Moves.SPLASH, Moves.SHADOW_BALL, Moves.SOAK])
.enemyMoveset([Moves.SPLASH, Moves.TELEPORT]) .enemyMoveset([Moves.SPLASH, Moves.TELEPORT])
.battleType("double"); .battleStyle("double");
await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]); await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]);
game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH);
@ -103,14 +103,14 @@ describe("UI - Type Hints", () => {
await game.forceEnemyMove(Moves.TELEPORT); await game.forceEnemyMove(Moves.TELEPORT);
await game.toNextTurn(); await game.toNextTurn();
game.onNextPrompt("CommandPhase", Mode.COMMAND, () => { game.onNextPrompt("CommandPhase", UiMode.COMMAND, () => {
const { ui } = game.scene; const { ui } = game.scene;
const handler = ui.getHandler<FightUiHandler>(); const handler = ui.getHandler<FightUiHandler>();
handler.processInput(Button.ACTION); // select "Fight" handler.processInput(Button.ACTION); // select "Fight"
game.phaseInterceptor.unlock(); game.phaseInterceptor.unlock();
}); });
game.onNextPrompt("CommandPhase", Mode.FIGHT, () => { game.onNextPrompt("CommandPhase", UiMode.FIGHT, () => {
const { ui } = game.scene; const { ui } = game.scene;
const movesContainer = ui.getByName<Phaser.GameObjects.Container>(FightUiHandler.MOVES_CONTAINER_NAME); const movesContainer = ui.getByName<Phaser.GameObjects.Container>(FightUiHandler.MOVES_CONTAINER_NAME);
const shadowBallText = movesContainer const shadowBallText = movesContainer