[UI/UX] Pokédex - Informative messages for level up moves #5388

This commit is contained in:
Wlowscha 2025-02-21 06:23:34 +01:00 committed by GitHub
parent 13d9140340
commit 6a4c6f1c89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 1 deletions

View File

@ -983,13 +983,23 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
ui.setModeWithoutClear(Mode.OPTION_SELECT, {
options: this.levelMoves.map(m => {
const levelNumber = m[0] > 0 ? String(m[0]) : "";
const option: OptionSelectItem = {
label: String(m[0]).padEnd(4, " ") + allMoves[m[1]].name,
label: levelNumber.padEnd(4, " ") + allMoves[m[1]].name,
handler: () => {
return false;
},
onHover: () => {
this.moveInfoOverlay.show(allMoves[m[1]]);
if (m[0] === 0) {
this.showText(i18next.t("pokedexUiHandler:onlyEvolutionMove"));
} else if (m[0] === -1) {
this.showText(i18next.t("pokedexUiHandler:onlyRecallMove"));
} else if (m[0] <= 5) {
this.showText(i18next.t("pokedexUiHandler:onStarterSelectMove"));
} else {
this.showText(i18next.t("pokedexUiHandler:byLevelUpMove"));
}
},
};
return option;