mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-11 19:02:16 +02:00
Made showText=> summary a promise
This commit is contained in:
parent
2eed9b137d
commit
e5fb9d63aa
@ -83,17 +83,18 @@ export class LearnMovePhase extends PlayerPartyMemberPokemonPhase {
|
|||||||
*/
|
*/
|
||||||
forgetMoveProcess(move: Move, pokemon: Pokemon) {
|
forgetMoveProcess(move: Move, pokemon: Pokemon) {
|
||||||
this.scene.ui.setMode(this.messageMode);
|
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)
|
||||||
this.scene.ui.setModeWithoutClear(Mode.SUMMARY, pokemon, SummaryUiMode.LEARN_MOVE, move, (moveIndex: integer) => {
|
.then(() => {
|
||||||
if (moveIndex === 4) {
|
this.scene.ui.setModeWithoutClear(Mode.SUMMARY, pokemon, SummaryUiMode.LEARN_MOVE, move, (moveIndex: integer) => {
|
||||||
this.scene.ui.setMode(this.messageMode).then(() => this.rejectMoveAndEnd(move, pokemon));
|
if (moveIndex === 4) {
|
||||||
return;
|
this.scene.ui.setMode(this.messageMode).then(() => this.rejectMoveAndEnd(move, pokemon));
|
||||||
}
|
return;
|
||||||
const forgetSuccessText = i18next.t("battle:learnMoveForgetSuccess", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: pokemon.moveset[moveIndex]!.getName() });
|
}
|
||||||
const fullText = [i18next.t("battle:countdownPoof"), forgetSuccessText, i18next.t("battle:learnMoveAnd")].join("$");
|
const forgetSuccessText = i18next.t("battle:learnMoveForgetSuccess", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: pokemon.moveset[moveIndex]!.getName() });
|
||||||
this.scene.ui.setMode(this.messageMode).then(() => this.learnMove(moveIndex, move, pokemon, fullText));
|
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user