From 71f644c453d2c73ce384900bc4885ff945f7538c Mon Sep 17 00:00:00 2001 From: Xavion3 Date: Thu, 27 Feb 2025 04:03:22 +1100 Subject: [PATCH] [UI] Tera type on summary screen (#5419) --- src/ui/summary-ui-handler.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ui/summary-ui-handler.ts b/src/ui/summary-ui-handler.ts index b952037a079..31dee6bb46c 100644 --- a/src/ui/summary-ui-handler.ts +++ b/src/ui/summary-ui-handler.ts @@ -28,6 +28,7 @@ import { modifierSortFunc } from "#app/modifier/modifier"; import { PlayerGender } from "#enums/player-gender"; import { Stat, PERMANENT_STATS, getStatKey } from "#enums/stat"; import { Nature } from "#enums/nature"; +import { achvs } from "#app/system/achv"; enum Page { PROFILE, @@ -783,9 +784,6 @@ export default class SummaryUiHandler extends UiHandler { if (types.length > 1) { profileContainer.add(getTypeIcon(1, types[1])); } - if (this.pokemon?.isTerastallized) { - profileContainer.add(getTypeIcon(types.length, this.pokemon.getTeraType(), true)); - } if (this.pokemon?.getLuck()) { const luckLabelText = addTextObject(141, 28, i18next.t("common:luckIndicator"), TextStyle.SUMMARY_ALT); @@ -798,6 +796,13 @@ export default class SummaryUiHandler extends UiHandler { profileContainer.add(luckText); } + if (globalScene.gameData.achvUnlocks.hasOwnProperty(achvs.TERASTALLIZE.id) && !Utils.isNullOrUndefined(this.pokemon)) { + const teraIcon = globalScene.add.sprite(123, 26, "button_tera"); + teraIcon.setName("terrastallize-icon"); + teraIcon.setFrame(Type[this.pokemon.getTeraType()].toLowerCase()); + profileContainer.add(teraIcon); + } + this.abilityContainer = { labelImage: globalScene.add.image(0, 0, "summary_profile_ability"), ability: this.pokemon?.getAbility(true)!, // TODO: is this bang correct?