[Bug] Fix pokedex option after catching (#5574)
* Fix pokedex entry after catching * Allow turning pages * Using isSeen in more places * Evolutions show up as seen after catching * Apply suggestions from code review Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Showing battle forms correctly for seen mons --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
b33d95d27d
commit
05691970e2
|
@ -329,18 +329,11 @@ export class AttemptCapturePhase extends PokemonPhase {
|
|||
form: pokemon.formIndex,
|
||||
female: pokemon.gender === Gender.FEMALE,
|
||||
};
|
||||
globalScene.ui.setOverlayMode(
|
||||
Mode.POKEDEX_PAGE,
|
||||
pokemon.species,
|
||||
pokemon.formIndex,
|
||||
attributes,
|
||||
null,
|
||||
() => {
|
||||
globalScene.ui.setMode(Mode.MESSAGE).then(() => {
|
||||
promptRelease();
|
||||
});
|
||||
},
|
||||
);
|
||||
globalScene.ui.setOverlayMode(Mode.POKEDEX_PAGE, pokemon.species, attributes, null, null, () => {
|
||||
globalScene.ui.setMode(Mode.MESSAGE).then(() => {
|
||||
promptRelease();
|
||||
});
|
||||
});
|
||||
},
|
||||
() => {
|
||||
globalScene.ui.setMode(
|
||||
|
|
|
@ -978,7 +978,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||
const caughtAttr = this.isCaught();
|
||||
|
||||
// no preferences or Pokemon wasn't caught, return empty attribute
|
||||
if (!starterAttributes || !caughtAttr) {
|
||||
if (!starterAttributes || !this.isSeen()) {
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -2026,6 +2026,11 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||
}
|
||||
break;
|
||||
case Button.LEFT:
|
||||
if (this.filteredIndices && this.filteredIndices.length <= 1) {
|
||||
ui.playError();
|
||||
this.blockInput = false;
|
||||
return true;
|
||||
}
|
||||
this.blockInput = true;
|
||||
ui.setModeWithoutClear(Mode.OPTION_SELECT).then(() => {
|
||||
// Always go back to first selection after scrolling around
|
||||
|
@ -2061,6 +2066,11 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||
this.blockInput = false;
|
||||
break;
|
||||
case Button.RIGHT:
|
||||
if (this.filteredIndices && this.filteredIndices.length <= 1) {
|
||||
ui.playError();
|
||||
this.blockInput = false;
|
||||
return true;
|
||||
}
|
||||
ui.setModeWithoutClear(Mode.OPTION_SELECT).then(() => {
|
||||
// Always go back to first selection after scrolling around
|
||||
if (this.previousSpecies.length === 0) {
|
||||
|
@ -2220,9 +2230,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||
|
||||
const ui = this.getUi();
|
||||
|
||||
const isFormCaught = this.isFormCaught();
|
||||
|
||||
if ((this.isCaught() && isFormCaught) || (this.speciesStarterDexEntry?.seenAttr && cursor === 5)) {
|
||||
if ((this.isCaught() && this.isFormCaught()) || this.isSeen()) {
|
||||
ui.showText(this.menuDescriptions[cursor]);
|
||||
} else {
|
||||
ui.showText("");
|
||||
|
@ -2301,7 +2309,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||
}
|
||||
}
|
||||
|
||||
if (species && (this.speciesStarterDexEntry?.seenAttr || this.isCaught())) {
|
||||
if (species && (this.isSeen() || this.isCaught())) {
|
||||
this.pokemonNumberText.setText(padInt(species.speciesId, 4));
|
||||
|
||||
if (this.isCaught()) {
|
||||
|
|
Loading…
Reference in New Issue