diff --git a/src/ui/party-ui-handler.ts b/src/ui/party-ui-handler.ts index a8be33b87..b4d87a8ad 100644 --- a/src/ui/party-ui-handler.ts +++ b/src/ui/party-ui-handler.ts @@ -853,6 +853,18 @@ class PartySlot extends Phaser.GameObjects.Container { slotInfoContainer.add(slotGenderText); } + if (this.pokemon.fusionSpecies) { + const splicedIcon = this.scene.add.image(0, 0, 'icon_spliced'); + splicedIcon.setScale(0.5); + splicedIcon.setOrigin(0, 0); + if (this.slotIndex >= battlerCount) + splicedIcon.setPositionRelative(slotLevelLabel, 36 - (genderSymbol ? 8 : 0), 0.5); + else + splicedIcon.setPositionRelative(slotName, 76 - (genderSymbol ? 8 : 0), 3.5); + + slotInfoContainer.add(splicedIcon); + } + if (this.pokemon.status) { const statusIndicator = this.scene.add.sprite(0, 0, 'statuses'); statusIndicator.setFrame(StatusEffect[this.pokemon.status?.effect].toLowerCase()); diff --git a/src/ui/summary-ui-handler.ts b/src/ui/summary-ui-handler.ts index b0fea8d16..42a3cbdd6 100644 --- a/src/ui/summary-ui-handler.ts +++ b/src/ui/summary-ui-handler.ts @@ -35,6 +35,7 @@ export default class SummaryUiHandler extends UiHandler { private numberText: Phaser.GameObjects.Text; private pokemonSprite: Phaser.GameObjects.Sprite; private nameText: Phaser.GameObjects.Text; + private splicedIcon: Phaser.GameObjects.Sprite; private pokeball: Phaser.GameObjects.Sprite; private levelText: Phaser.GameObjects.Text; private genderText: Phaser.GameObjects.Text; @@ -105,6 +106,13 @@ export default class SummaryUiHandler extends UiHandler { this.nameText.setOrigin(0, 0); this.summaryContainer.add(this.nameText); + this.splicedIcon = this.scene.add.sprite(0, -54, 'icon_spliced'); + this.splicedIcon.setVisible(false); + this.splicedIcon.setOrigin(0, 0); + this.splicedIcon.setScale(0.75); + this.splicedIcon.setInteractive(new Phaser.Geom.Rectangle(0, 0, 12, 15), Phaser.Geom.Rectangle.Contains); + this.summaryContainer.add(this.splicedIcon); + this.pokeball = this.scene.add.sprite(6, -19, 'pb'); this.pokeball.setOrigin(0, 1); this.summaryContainer.add(this.pokeball); @@ -212,6 +220,13 @@ export default class SummaryUiHandler extends UiHandler { this.nameText.setText(this.pokemon.name); + this.splicedIcon.setPositionRelative(this.nameText, this.nameText.displayWidth + 2, 3); + this.splicedIcon.setVisible(!!this.pokemon.fusionSpecies); + if (this.splicedIcon.visible) { + this.splicedIcon.on('pointerover', () => (this.scene as BattleScene).ui.showTooltip(null, `${this.pokemon.species.getName(this.pokemon.formIndex)}/${this.pokemon.fusionSpecies.getName(this.pokemon.fusionFormIndex)}`, true)); + this.splicedIcon.on('pointerout', () => (this.scene as BattleScene).ui.hideTooltip()); + } + this.pokeball.setFrame(getPokeballAtlasKey(this.pokemon.pokeball)); this.levelText.setText(this.pokemon.level.toString()); this.genderText.setText(getGenderSymbol(this.pokemon.getGender(true)));