diff --git a/public/images/ui/ha_capsule.png b/public/images/ui/ha_capsule.png new file mode 100644 index 000000000..cccc9cf51 Binary files /dev/null and b/public/images/ui/ha_capsule.png differ diff --git a/src/loading-scene.ts b/src/loading-scene.ts index 5c8f879eb..9a3b7fdd5 100644 --- a/src/loading-scene.ts +++ b/src/loading-scene.ts @@ -58,6 +58,7 @@ export class LoadingScene extends SceneBase { this.loadImage('achv_bar_3', 'ui'); this.loadImage('achv_bar_4', 'ui'); this.loadImage('shiny_star', 'ui', 'shiny.png'); + this.loadImage('ha_capsule', 'ui', 'ha_capsule.png'); this.loadImage('icon_spliced', 'ui'); this.loadImage('icon_tera', 'ui'); this.loadImage('type_tera', 'ui'); diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 479ae21e5..e87914821 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -163,6 +163,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { private startCursorObj: Phaser.GameObjects.NineSlice; private starterValueLabels: Phaser.GameObjects.Text[]; private shinyIcons: Phaser.GameObjects.Image[]; + private hiddenAbilityIcons: Phaser.GameObjects.Image[]; private iconAnimHandler: PokemonIconAnimHandler; @@ -382,6 +383,17 @@ export default class StarterSelectUiHandler extends MessageUiHandler { return ret; }); + this.hiddenAbilityIcons = new Array(81).fill(null).map((_, i) => { + const x = (i % 9) * 18; + const y = Math.floor(i / 9) * 18; + const ret = this.scene.add.image(x + 163, y + 16, 'ha_capsule'); + ret.setOrigin(0, 0); + ret.setScale(0.5); + ret.setVisible(false); + this.starterSelectContainer.add(ret); + return ret; + }); + this.pokemonSprite = this.scene.add.sprite(53, 63, `pkmn__sub`); this.starterSelectContainer.add(this.pokemonSprite); @@ -1106,6 +1118,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.updateStarterValueLabel(s); this.starterValueLabels[s].setVisible(slotVisible); this.shinyIcons[s].setVisible(slotVisible && !!this.scene.gameData.dexData[speciesId].caughtAttr && !!(this.scene.gameData.dexData[speciesId].caughtAttr & DexAttr.SHINY)); + this.hiddenAbilityIcons[s].setVisible(slotVisible && !!this.scene.gameData.dexData[speciesId].caughtAttr && !!(this.scene.gameData.dexData[speciesId].caughtAttr & DexAttr.ABILITY_HIDDEN)); } } else { changed = super.setCursor(cursor);