mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-23 15:03:24 +02:00
[Bug] [Sprite] Fix fusion shiny party icon (#6397)
* Fix shiny icon with fusion shiny in party * Fix hover tooltip not working when first splicing a mon * Fix fusion shiny icon on summary screen
This commit is contained in:
parent
cd610ff2c5
commit
a85d8cd5de
@ -287,9 +287,6 @@ export abstract class BattleInfo extends Phaser.GameObjects.Container {
|
|||||||
2.5,
|
2.5,
|
||||||
);
|
);
|
||||||
this.splicedIcon.setVisible(pokemon.isFusion(true));
|
this.splicedIcon.setVisible(pokemon.isFusion(true));
|
||||||
if (!this.splicedIcon.visible) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.splicedIcon
|
this.splicedIcon
|
||||||
.on("pointerover", () =>
|
.on("pointerover", () =>
|
||||||
globalScene.ui.showTooltip(
|
globalScene.ui.showTooltip(
|
||||||
@ -323,6 +320,10 @@ export abstract class BattleInfo extends Phaser.GameObjects.Container {
|
|||||||
.setVisible(pokemon.isShiny())
|
.setVisible(pokemon.isShiny())
|
||||||
.setTint(getVariantTint(baseVariant));
|
.setTint(getVariantTint(baseVariant));
|
||||||
|
|
||||||
|
this.shinyIcon
|
||||||
|
.on("pointerover", () => globalScene.ui.showTooltip("", i18next.t("common:shinyOnHover") + shinyDescriptor))
|
||||||
|
.on("pointerout", () => globalScene.ui.hideTooltip());
|
||||||
|
|
||||||
if (!this.shinyIcon.visible) {
|
if (!this.shinyIcon.visible) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -335,10 +336,6 @@ export abstract class BattleInfo extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
shinyDescriptor += ")";
|
shinyDescriptor += ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
this.shinyIcon
|
|
||||||
.on("pointerover", () => globalScene.ui.showTooltip("", i18next.t("common:shinyOnHover") + shinyDescriptor))
|
|
||||||
.on("pointerout", () => globalScene.ui.hideTooltip());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
initInfo(pokemon: Pokemon) {
|
initInfo(pokemon: Pokemon) {
|
||||||
|
@ -2041,12 +2041,13 @@ class PartySlot extends Phaser.GameObjects.Container {
|
|||||||
|
|
||||||
if (this.pokemon.isShiny()) {
|
if (this.pokemon.isShiny()) {
|
||||||
const doubleShiny = this.pokemon.isDoubleShiny(false);
|
const doubleShiny = this.pokemon.isDoubleShiny(false);
|
||||||
|
const largeIconTint = doubleShiny ? this.pokemon.getBaseVariant() : this.pokemon.getVariant();
|
||||||
|
|
||||||
const shinyStar = globalScene.add
|
const shinyStar = globalScene.add
|
||||||
.image(0, 0, `shiny_star_small${doubleShiny ? "_1" : ""}`)
|
.image(0, 0, `shiny_star_small${doubleShiny ? "_1" : ""}`)
|
||||||
.setOrigin(0)
|
.setOrigin(0)
|
||||||
.setPositionRelative(this.slotName, shinyIconToNameOffset.x, shinyIconToNameOffset.y)
|
.setPositionRelative(this.slotName, shinyIconToNameOffset.x, shinyIconToNameOffset.y)
|
||||||
.setTint(getVariantTint(this.pokemon.getBaseVariant()));
|
.setTint(getVariantTint(largeIconTint));
|
||||||
slotInfoContainer.add(shinyStar);
|
slotInfoContainer.add(shinyStar);
|
||||||
|
|
||||||
if (doubleShiny) {
|
if (doubleShiny) {
|
||||||
|
@ -430,20 +430,21 @@ export class SummaryUiHandler extends UiHandler {
|
|||||||
this.friendshipShadow.setCrop(0, 0, 16, 16 - 16 * ((this.pokemon?.friendship || 0) / 255));
|
this.friendshipShadow.setCrop(0, 0, 16, 16 - 16 * ((this.pokemon?.friendship || 0) / 255));
|
||||||
|
|
||||||
const doubleShiny = this.pokemon.isDoubleShiny(false);
|
const doubleShiny = this.pokemon.isDoubleShiny(false);
|
||||||
const baseVariant = this.pokemon.getBaseVariant(doubleShiny);
|
const bigIconVariant = doubleShiny ? this.pokemon.getBaseVariant(doubleShiny) : this.pokemon.getVariant();
|
||||||
|
|
||||||
this.shinyIcon.setPositionRelative(
|
this.shinyIcon.setPositionRelative(
|
||||||
this.nameText,
|
this.nameText,
|
||||||
this.nameText.displayWidth + (this.splicedIcon.visible ? this.splicedIcon.displayWidth + 1 : 0) + 1,
|
this.nameText.displayWidth + (this.splicedIcon.visible ? this.splicedIcon.displayWidth + 1 : 0) + 1,
|
||||||
3,
|
3,
|
||||||
);
|
);
|
||||||
this.shinyIcon.setTexture(`shiny_star${doubleShiny ? "_1" : ""}`);
|
this.shinyIcon
|
||||||
this.shinyIcon.setVisible(this.pokemon.isShiny(false));
|
.setTexture(`shiny_star${doubleShiny ? "_1" : ""}`)
|
||||||
this.shinyIcon.setTint(getVariantTint(baseVariant));
|
.setVisible(this.pokemon.isShiny(false))
|
||||||
|
.setTint(getVariantTint(bigIconVariant));
|
||||||
if (this.shinyIcon.visible) {
|
if (this.shinyIcon.visible) {
|
||||||
let shinyDescriptor = "";
|
let shinyDescriptor = "";
|
||||||
if (doubleShiny || baseVariant) {
|
if (doubleShiny || bigIconVariant) {
|
||||||
shinyDescriptor = " (" + getShinyDescriptor(baseVariant);
|
shinyDescriptor = " (" + getShinyDescriptor(bigIconVariant);
|
||||||
if (doubleShiny) {
|
if (doubleShiny) {
|
||||||
shinyDescriptor += "/" + getShinyDescriptor(this.pokemon.fusionVariant);
|
shinyDescriptor += "/" + getShinyDescriptor(this.pokemon.fusionVariant);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user