mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-25 08:16:04 +00:00
Added the (+) icon for newly non-shiny pokemon
Will only show the (+) icon if you catch a non-shiny, have caught a shiny of that species before, and have not caught a non-shiny before. Removed magic numbers from new non-shiny check
This commit is contained in:
parent
6442b8345f
commit
ca81ac6a3c
@ -313,6 +313,11 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
|||||||
this.pokemonShinyNewIcon.setShadowColor(getTextColor(TextStyle.SUMMARY_BLUE, true, this.scene.uiTheme));
|
this.pokemonShinyNewIcon.setShadowColor(getTextColor(TextStyle.SUMMARY_BLUE, true, this.scene.uiTheme));
|
||||||
const newShinyOrVariant = ((newShiny & caughtAttr) === BigInt(0)) || ((newVariant & caughtAttr) === BigInt(0));
|
const newShinyOrVariant = ((newShiny & caughtAttr) === BigInt(0)) || ((newVariant & caughtAttr) === BigInt(0));
|
||||||
this.pokemonShinyNewIcon.setVisible(!!newShinyOrVariant);
|
this.pokemonShinyNewIcon.setVisible(!!newShinyOrVariant);
|
||||||
|
} else if ((caughtAttr & DexAttr.NON_SHINY) === BigInt(0) && ((caughtAttr & DexAttr.SHINY) === DexAttr.SHINY)) { //If the player has *only* caught any shiny variant of this species, not a non-shiny
|
||||||
|
this.pokemonShinyNewIcon.setVisible(true);
|
||||||
|
this.pokemonShinyNewIcon.setText("(+)");
|
||||||
|
this.pokemonShinyNewIcon.setColor(getTextColor(TextStyle.SUMMARY_BLUE, false, this.scene.uiTheme));
|
||||||
|
this.pokemonShinyNewIcon.setShadowColor(getTextColor(TextStyle.SUMMARY_BLUE, true, this.scene.uiTheme));
|
||||||
} else {
|
} else {
|
||||||
this.pokemonShinyNewIcon.setVisible(false);
|
this.pokemonShinyNewIcon.setVisible(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user