Adds bg glow behind starters with unlocked passives (#2497)

This commit is contained in:
AJ Fontaine 2024-07-12 21:53:54 -04:00 committed by GitHub
parent 7709ff5d21
commit a1a906ed71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

View File

@ -91,6 +91,7 @@ export class LoadingScene extends SceneBase {
this.loadImage("shiny_star_small", "ui", "shiny_small.png");
this.loadImage("shiny_star_small_1", "ui", "shiny_small_1.png");
this.loadImage("shiny_star_small_2", "ui", "shiny_small_2.png");
this.loadImage("passive_bg", "ui", "passive_bg.png");
this.loadAtlas("shiny_icons", "ui");
this.loadImage("ha_capsule", "ui", "ha_capsule.png");
this.loadImage("champion_ribbon", "ui", "champion_ribbon.png");

View File

@ -268,6 +268,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
private classicWinIcons: Phaser.GameObjects.Image[];
private candyUpgradeIcon: Phaser.GameObjects.Image[];
private candyUpgradeOverlayIcon: Phaser.GameObjects.Image[];
private starterPassiveBgs: Phaser.GameObjects.Image[];
private iconAnimHandler: PokemonIconAnimHandler;
@ -398,6 +399,16 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.updateGenOptions();
this.starterPassiveBgs = new Array(81).fill(null).map((_, i) => {
const position = calcIconPosition(i);
const ret = this.scene.add.image(position.x + 153, position.y+14, "passive_bg");
ret.setOrigin(0, 0);
ret.setScale(0.75);
ret.setVisible(false);
this.starterSelectContainer.add(ret);
return ret;
});
this.starterSelectGenIconContainers = new Array(gens.length).fill(null).map((_, i) => {
const container = this.scene.add.container(151, 9);
if (i) {
@ -1853,6 +1864,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.shinyIcons[s][v].setTint(getVariantTint(speciesVariants[v] === DexAttr.DEFAULT_VARIANT ? 0 : speciesVariants[v] === DexAttr.VARIANT_2 ? 1 : 2));
}
}
this.starterPassiveBgs[s].setVisible(slotVisible && !!this.scene.gameData.starterData[speciesId].passiveAttr);
this.hiddenAbilityIcons[s].setVisible(slotVisible && !!this.scene.gameData.dexData[speciesId].caughtAttr && !!(this.scene.gameData.starterData[speciesId].abilityAttr & 4));
this.classicWinIcons[s].setVisible(slotVisible && this.scene.gameData.starterData[speciesId].classicWinCount > 0);