Made showText=> summary a promise

This commit is contained in:
frutescens 2024-09-04 14:02:54 -07:00
parent 2eed9b137d
commit e5fb9d63aa

View File

@ -83,7 +83,8 @@ export class LearnMovePhase extends PlayerPartyMemberPokemonPhase {
*/
forgetMoveProcess(move: Move, pokemon: Pokemon) {
this.scene.ui.setMode(this.messageMode);
this.scene.ui.showText(i18next.t("battle:learnMoveForgetQuestion"), null, () => {
this.scene.ui.showTextPromise(i18next.t("battle:learnMoveForgetQuestion"), undefined, true)
.then(() => {
this.scene.ui.setModeWithoutClear(Mode.SUMMARY, pokemon, SummaryUiMode.LEARN_MOVE, move, (moveIndex: integer) => {
if (moveIndex === 4) {
this.scene.ui.setMode(this.messageMode).then(() => this.rejectMoveAndEnd(move, pokemon));
@ -93,7 +94,7 @@ export class LearnMovePhase extends PlayerPartyMemberPokemonPhase {
const fullText = [i18next.t("battle:countdownPoof"), forgetSuccessText, i18next.t("battle:learnMoveAnd")].join("$");
this.scene.ui.setMode(this.messageMode).then(() => this.learnMove(moveIndex, move, pokemon, fullText));
});
}, null, true);
});
}
/**