mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-28 19:22:29 +02:00
Displaying uncaught forms for Dudunsparce and Maushold properly
This commit is contained in:
parent
23ae686f56
commit
d5eafd5747
@ -573,7 +573,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
this.menuContainer.setVisible(true);
|
this.menuContainer.setVisible(true);
|
||||||
|
|
||||||
this.speciesStarterDexEntry = this.species ? globalScene.gameData.dexData[this.species.speciesId] : null;
|
this.speciesStarterDexEntry = this.species ? globalScene.gameData.dexData[this.species.speciesId] : null;
|
||||||
this.setSpecies(this.species);
|
this.setSpecies();
|
||||||
this.updateInstructions();
|
this.updateInstructions();
|
||||||
|
|
||||||
this.setCursor(0);
|
this.setCursor(0);
|
||||||
@ -1902,7 +1902,8 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
return { currentFriendship, friendshipCap };
|
return { currentFriendship, friendshipCap };
|
||||||
}
|
}
|
||||||
|
|
||||||
setSpecies(species: PokemonSpecies | null) {
|
setSpecies() {
|
||||||
|
const species = this.species;
|
||||||
const starterAttributes : StarterAttributes | null = species ? { ...this.starterAttributes } : null;
|
const starterAttributes : StarterAttributes | null = species ? { ...this.starterAttributes } : null;
|
||||||
|
|
||||||
if (!species && globalScene.ui.getTooltip().visible) {
|
if (!species && globalScene.ui.getTooltip().visible) {
|
||||||
@ -1920,8 +1921,6 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.species = species!; // TODO: is this bang correct?
|
|
||||||
|
|
||||||
if (species && (this.speciesStarterDexEntry?.seenAttr || this.speciesStarterDexEntry?.caughtAttr)) {
|
if (species && (this.speciesStarterDexEntry?.seenAttr || this.speciesStarterDexEntry?.caughtAttr)) {
|
||||||
this.pokemonNumberText.setText(padInt(species.speciesId, 4));
|
this.pokemonNumberText.setText(padInt(species.speciesId, 4));
|
||||||
if (starterAttributes?.nickname) {
|
if (starterAttributes?.nickname) {
|
||||||
@ -2006,7 +2005,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// load default nature from stater save data, if set
|
// Set default attributes if for some reason starterAttributes does not exist or attributes missing
|
||||||
const props: StarterAttributes = globalScene.gameData.getSpeciesDexAttrProps(species, defaultDexAttr);
|
const props: StarterAttributes = globalScene.gameData.getSpeciesDexAttrProps(species, defaultDexAttr);
|
||||||
if (starterAttributes?.variant && !isNaN(starterAttributes.variant)) {
|
if (starterAttributes?.variant && !isNaN(starterAttributes.variant)) {
|
||||||
if (props.shiny) {
|
if (props.shiny) {
|
||||||
@ -2023,10 +2022,11 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
variant: props.variant ?? 0,
|
variant: props.variant ?? 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
const speciesForm = getPokemonSpeciesForm(species.speciesId, props.form ?? 0);
|
if (this.isFormCaught(this.species, props.form)) {
|
||||||
this.setTypeIcons(speciesForm.type1, speciesForm.type2);
|
const speciesForm = getPokemonSpeciesForm(species.speciesId, props.form ?? 0);
|
||||||
|
this.setTypeIcons(speciesForm.type1, speciesForm.type2);
|
||||||
this.pokemonSprite.clearTint();
|
this.pokemonSprite.clearTint();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.pokemonGrowthRateText.setText("");
|
this.pokemonGrowthRateText.setText("");
|
||||||
this.pokemonGrowthRateLabelText.setVisible(false);
|
this.pokemonGrowthRateLabelText.setVisible(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user