Revert "[UI/UX] Show IVs on stats page of summary (#5172)" (#5284)

This reverts commit 366c88517c.
This commit is contained in:
damocleas 2025-02-09 04:13:06 -05:00 committed by GitHub
parent 366c88517c
commit 612e6a25c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 38 deletions

View File

@ -96,9 +96,6 @@ export default class SummaryUiHandler extends UiHandler {
private friendshipText: Phaser.GameObjects.Text;
private friendshipIcon: Phaser.GameObjects.Sprite;
private friendshipOverlay: Phaser.GameObjects.Sprite;
private permStatsContainer: Phaser.GameObjects.Container;
private ivContainer: Phaser.GameObjects.Container;
private statsContainer: Phaser.GameObjects.Container;
private descriptionScrollTween: Phaser.Tweens.Tween | null;
private moveCursorBlinkTimer: Phaser.Time.TimerEvent | null;
@ -537,10 +534,6 @@ export default class SummaryUiHandler extends UiHandler {
this.passiveContainer.nameText?.setVisible(!this.passiveContainer.descriptionText?.visible);
this.passiveContainer.descriptionText?.setVisible(!this.passiveContainer.descriptionText.visible);
this.passiveContainer.labelImage.setVisible(!this.passiveContainer.labelImage.visible);
} else if (this.cursor === Page.STATS) {
//Show IVs
this.permStatsContainer.setVisible(!this.permStatsContainer.visible);
this.ivContainer.setVisible(!this.ivContainer.visible);
}
} else if (button === Button.CANCEL) {
if (this.summaryUiMode === SummaryUiMode.LEARN_MOVE) {
@ -884,13 +877,8 @@ export default class SummaryUiHandler extends UiHandler {
profileContainer.add(memoText);
break;
case Page.STATS:
this.statsContainer = globalScene.add.container(0, -pageBg.height);
pageContainer.add(this.statsContainer);
this.permStatsContainer = globalScene.add.container(27, 56);
this.statsContainer.add(this.permStatsContainer);
this.ivContainer = globalScene.add.container(27, 56);
this.statsContainer.add(this.ivContainer);
this.statsContainer.setVisible(true);
const statsContainer = globalScene.add.container(0, -pageBg.height);
pageContainer.add(statsContainer);
PERMANENT_STATS.forEach((stat, s) => {
const statName = i18next.t(getStatKey(stat));
@ -899,27 +887,18 @@ export default class SummaryUiHandler extends UiHandler {
const natureStatMultiplier = getNatureStatMultiplier(this.pokemon?.getNature()!, s); // TODO: is this bang correct?
const statLabel = addTextObject(115 * colIndex + (colIndex === 1 ? 5 : 0), 16 * rowIndex, statName, natureStatMultiplier === 1 ? TextStyle.SUMMARY : natureStatMultiplier > 1 ? TextStyle.SUMMARY_PINK : TextStyle.SUMMARY_BLUE);
const ivLabel = addTextObject(115 * colIndex + (colIndex === 1 ? 5 : 0), 16 * rowIndex, statName, this.pokemon?.ivs[stat] === 31 ? TextStyle.SUMMARY_GOLD : TextStyle.SUMMARY);
const statLabel = addTextObject(27 + 115 * colIndex + (colIndex === 1 ? 5 : 0), 56 + 16 * rowIndex, statName, natureStatMultiplier === 1 ? TextStyle.SUMMARY : natureStatMultiplier > 1 ? TextStyle.SUMMARY_PINK : TextStyle.SUMMARY_BLUE);
statLabel.setOrigin(0.5, 0);
ivLabel.setOrigin(0.5, 0);
this.permStatsContainer.add(statLabel);
this.ivContainer.add(ivLabel);
statsContainer.add(statLabel);
const statValueText = stat !== Stat.HP
? Utils.formatStat(this.pokemon?.getStat(stat)!) // TODO: is this bang correct?
: `${Utils.formatStat(this.pokemon?.hp!, true)}/${Utils.formatStat(this.pokemon?.getMaxHp()!, true)}`; // TODO: are those bangs correct?
const ivText = `${this.pokemon?.ivs[stat]}/31`;
const statValue = addTextObject(93 + 88 * colIndex, 16 * rowIndex, statValueText, TextStyle.WINDOW_ALT);
const statValue = addTextObject(120 + 88 * colIndex, 56 + 16 * rowIndex, statValueText, TextStyle.WINDOW_ALT);
statValue.setOrigin(1, 0);
this.permStatsContainer.add(statValue);
const ivValue = addTextObject(93 + 88 * colIndex, 16 * rowIndex, ivText, TextStyle.WINDOW_ALT);
ivValue.setOrigin(1, 0);
this.ivContainer.add(ivValue);
statsContainer.add(statValue);
});
this.ivContainer.setVisible(false);
const itemModifiers = (globalScene.findModifiers(m => m instanceof PokemonHeldItemModifier
&& m.pokemonId === this.pokemon?.id, this.playerParty) as PokemonHeldItemModifier[])
@ -929,7 +908,7 @@ export default class SummaryUiHandler extends UiHandler {
const icon = item.getIcon(true);
icon.setPosition((i % 17) * 12 + 3, 14 * Math.floor(i / 17) + 15);
this.statsContainer.add(icon);
statsContainer.add(icon);
icon.setInteractive(new Phaser.Geom.Rectangle(0, 0, 32, 32), Phaser.Geom.Rectangle.Contains);
icon.on("pointerover", () => globalScene.ui.showTooltip(item.type.name, item.type.getDescription(), true));
@ -945,26 +924,26 @@ export default class SummaryUiHandler extends UiHandler {
const expLabel = addTextObject(6, 112, i18next.t("pokemonSummary:expPoints"), TextStyle.SUMMARY);
expLabel.setOrigin(0, 0);
this.statsContainer.add(expLabel);
statsContainer.add(expLabel);
const nextLvExpLabel = addTextObject(6, 128, i18next.t("pokemonSummary:nextLv"), TextStyle.SUMMARY);
nextLvExpLabel.setOrigin(0, 0);
this.statsContainer.add(nextLvExpLabel);
statsContainer.add(nextLvExpLabel);
const expText = addTextObject(208, 112, pkmExp.toString(), TextStyle.WINDOW_ALT);
expText.setOrigin(1, 0);
this.statsContainer.add(expText);
statsContainer.add(expText);
const nextLvExp = pkmLvl < globalScene.getMaxExpLevel()
? getLevelTotalExp(pkmLvl + 1, pkmSpeciesGrowthRate) - pkmExp
: 0;
const nextLvExpText = addTextObject(208, 128, nextLvExp.toString(), TextStyle.WINDOW_ALT);
nextLvExpText.setOrigin(1, 0);
this.statsContainer.add(nextLvExpText);
statsContainer.add(nextLvExpText);
const expOverlay = globalScene.add.image(140, 145, "summary_stats_overlay_exp");
expOverlay.setOrigin(0, 0);
this.statsContainer.add(expOverlay);
statsContainer.add(expOverlay);
const expMaskRect = globalScene.make.graphics({});
expMaskRect.setScale(6);
@ -975,11 +954,6 @@ export default class SummaryUiHandler extends UiHandler {
const expMask = expMaskRect.createGeometryMask();
expOverlay.setMask(expMask);
this.abilityPrompt = globalScene.add.image(0, 0, !globalScene.inputController?.gamepadSupport ? "summary_profile_prompt_z" : "summary_profile_prompt_a");
this.abilityPrompt.setPosition(8, 47);
this.abilityPrompt.setVisible(true);
this.abilityPrompt.setOrigin(0, 0);
this.statsContainer.add(this.abilityPrompt);
break;
case Page.MOVES:
this.movesContainer = globalScene.add.container(5, -pageBg.height + 26);