Show icon in dex for HA mons, like shiny (#117)
* Show icon in dex for HA mons, like shiny * Swaps the star with the HA capsule * Removes the unwanted icon
This commit is contained in:
parent
cdab38abda
commit
f068b53d44
Binary file not shown.
After Width: | Height: | Size: 297 B |
|
@ -58,6 +58,7 @@ export class LoadingScene extends SceneBase {
|
||||||
this.loadImage('achv_bar_3', 'ui');
|
this.loadImage('achv_bar_3', 'ui');
|
||||||
this.loadImage('achv_bar_4', 'ui');
|
this.loadImage('achv_bar_4', 'ui');
|
||||||
this.loadImage('shiny_star', 'ui', 'shiny.png');
|
this.loadImage('shiny_star', 'ui', 'shiny.png');
|
||||||
|
this.loadImage('ha_capsule', 'ui', 'ha_capsule.png');
|
||||||
this.loadImage('icon_spliced', 'ui');
|
this.loadImage('icon_spliced', 'ui');
|
||||||
this.loadImage('icon_tera', 'ui');
|
this.loadImage('icon_tera', 'ui');
|
||||||
this.loadImage('type_tera', 'ui');
|
this.loadImage('type_tera', 'ui');
|
||||||
|
|
|
@ -163,6 +163,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||||
private startCursorObj: Phaser.GameObjects.NineSlice;
|
private startCursorObj: Phaser.GameObjects.NineSlice;
|
||||||
private starterValueLabels: Phaser.GameObjects.Text[];
|
private starterValueLabels: Phaser.GameObjects.Text[];
|
||||||
private shinyIcons: Phaser.GameObjects.Image[];
|
private shinyIcons: Phaser.GameObjects.Image[];
|
||||||
|
private hiddenAbilityIcons: Phaser.GameObjects.Image[];
|
||||||
|
|
||||||
private iconAnimHandler: PokemonIconAnimHandler;
|
private iconAnimHandler: PokemonIconAnimHandler;
|
||||||
|
|
||||||
|
@ -382,6 +383,17 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||||
return ret;
|
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.pokemonSprite = this.scene.add.sprite(53, 63, `pkmn__sub`);
|
||||||
this.starterSelectContainer.add(this.pokemonSprite);
|
this.starterSelectContainer.add(this.pokemonSprite);
|
||||||
|
|
||||||
|
@ -1106,6 +1118,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||||
this.updateStarterValueLabel(s);
|
this.updateStarterValueLabel(s);
|
||||||
this.starterValueLabels[s].setVisible(slotVisible);
|
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.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 {
|
} else {
|
||||||
changed = super.setCursor(cursor);
|
changed = super.setCursor(cursor);
|
||||||
|
|
Loading…
Reference in New Issue