mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-27 01:06:09 +00:00
Candy/Ribbon UI Improvement (#622)
* Candy/Ribbon UI Update * Removes the overrides No level 2000000000000000 runs for you * checks for all root species
This commit is contained in:
parent
b6692e42b2
commit
662319e9ac
@ -414,7 +414,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
this.classicWinIcons = 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 + 152, y + 16, 'champion_ribbon');
|
||||
const ret = this.scene.add.image(x + 153, y + 21, 'champion_ribbon');
|
||||
ret.setOrigin(0, 0);
|
||||
ret.setScale(0.5);
|
||||
ret.setVisible(false);
|
||||
@ -462,7 +462,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
this.pokemonCandyDarknessOverlay.setScale(0.5);
|
||||
this.pokemonCandyDarknessOverlay.setOrigin(0, 0);
|
||||
this.pokemonCandyDarknessOverlay.setTint(0x000000);
|
||||
this.pokemonCandyDarknessOverlay.setAlpha(0.5);
|
||||
this.pokemonCandyDarknessOverlay.setAlpha(0.50);
|
||||
this.pokemonCandyDarknessOverlay.setInteractive(new Phaser.Geom.Rectangle(0, 0, 16, 16), Phaser.Geom.Rectangle.Contains);
|
||||
this.starterSelectContainer.add(this.pokemonCandyDarknessOverlay);
|
||||
|
||||
@ -1332,7 +1332,6 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
}
|
||||
|
||||
this.pokemonCandyDarknessOverlay.setCrop(0,0,16, candyCropY);
|
||||
this.pokemonCandyDarknessOverlay.setCrop(0,0,16, candyCropY);
|
||||
}
|
||||
this.iconAnimHandler.addOrUpdate(this.starterSelectGenIconContainers[species.generation - 1].getAt(this.genSpecies[species.generation - 1].indexOf(species)) as Phaser.GameObjects.Sprite, PokemonIconAnimMode.PASSIVE);
|
||||
|
||||
|
@ -50,6 +50,8 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
private candyShadow: Phaser.GameObjects.Sprite;
|
||||
private candyIcon: Phaser.GameObjects.Sprite;
|
||||
private candyOverlay: Phaser.GameObjects.Sprite;
|
||||
private candyCountText: Phaser.GameObjects.Text;
|
||||
private championRibbon: Phaser.GameObjects.Image;
|
||||
private statusContainer: Phaser.GameObjects.Container;
|
||||
private status: Phaser.GameObjects.Image;
|
||||
private summaryPageContainer: Phaser.GameObjects.Container;
|
||||
@ -142,12 +144,6 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
this.pokeball.setOrigin(0, 1);
|
||||
this.summaryContainer.add(this.pokeball);
|
||||
|
||||
this.candyShadow = this.scene.add.sprite(13, -140, 'candy');
|
||||
this.candyShadow.setTint(0x141414)
|
||||
this.candyShadow.setScale(0.8);
|
||||
this.candyShadow.setInteractive(new Phaser.Geom.Rectangle(0, 0, 16, 16), Phaser.Geom.Rectangle.Contains);
|
||||
this.summaryContainer.add(this.candyShadow);
|
||||
|
||||
this.candyIcon = this.scene.add.sprite(13, -140, 'candy');
|
||||
this.candyIcon.setScale(0.8);
|
||||
this.summaryContainer.add(this.candyIcon);
|
||||
@ -156,6 +152,24 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
this.candyOverlay.setScale(0.8);
|
||||
this.summaryContainer.add(this.candyOverlay);
|
||||
|
||||
this.candyShadow = this.scene.add.sprite(13, -140, 'candy');
|
||||
this.candyShadow.setTint(0x000000);
|
||||
this.candyShadow.setAlpha(0.50);
|
||||
this.candyShadow.setScale(0.8);
|
||||
this.candyShadow.setInteractive(new Phaser.Geom.Rectangle(0, 0, 16, 16), Phaser.Geom.Rectangle.Contains);
|
||||
this.summaryContainer.add(this.candyShadow);
|
||||
|
||||
this.candyCountText = addTextObject(this.scene, 20, -146, 'x0', TextStyle.WINDOW_ALT, { fontSize: '76px' });
|
||||
this.candyCountText.setOrigin(0, 0);
|
||||
this.summaryContainer.add(this.candyCountText);
|
||||
|
||||
this.championRibbon = this.scene.add.image(88, -146, 'champion_ribbon');
|
||||
this.championRibbon.setOrigin(0, 0);
|
||||
//this.championRibbon.setScale(0.8);
|
||||
this.championRibbon.setScale(1.25);
|
||||
this.summaryContainer.add(this.championRibbon);
|
||||
this.championRibbon.setVisible(false);
|
||||
|
||||
this.levelText = addTextObject(this.scene, 36, -17, '', TextStyle.SUMMARY_ALT);
|
||||
this.levelText.setOrigin(0, 1);
|
||||
this.summaryContainer.add(this.levelText);
|
||||
@ -275,6 +289,9 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
this.splicedIcon.on('pointerout', () => (this.scene as BattleScene).ui.hideTooltip());
|
||||
}
|
||||
|
||||
if(this.scene.gameData.starterData[this.pokemon.species.getRootSpeciesId()].classicWinCount > 0 && this.scene.gameData.starterData[this.pokemon.species.getRootSpeciesId(true)].classicWinCount > 0)
|
||||
this.championRibbon.setVisible(true);
|
||||
|
||||
var currentFriendship = this.scene.gameData.starterData[this.pokemon.species.getRootSpeciesId()].friendship;
|
||||
if (!currentFriendship || currentFriendship === undefined)
|
||||
currentFriendship = 0;
|
||||
@ -287,8 +304,9 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
this.candyShadow.on('pointerout', () => (this.scene as BattleScene).ui.hideTooltip());
|
||||
}
|
||||
|
||||
this.candyIcon.setCrop(0,candyCropY,16, 16);
|
||||
this.candyOverlay.setCrop(0,candyCropY,16, 16);
|
||||
this.candyCountText.setText(`x${this.scene.gameData.starterData[this.pokemon.species.getRootSpeciesId()].candyCount}`);
|
||||
|
||||
this.candyShadow.setCrop(0,0,16, candyCropY);
|
||||
|
||||
const doubleShiny = isFusion && this.pokemon.shiny && this.pokemon.fusionShiny;
|
||||
const baseVariant = !doubleShiny ? this.pokemon.getVariant() : this.pokemon.variant;
|
||||
|
Loading…
Reference in New Issue
Block a user