From 73d3d8648fd444b5e43bc045ecadae360f518274 Mon Sep 17 00:00:00 2001 From: Gianluca Fuoco <87877876+geefuoco@users.noreply.github.com> Date: Wed, 29 May 2024 20:26:24 -0400 Subject: [PATCH] [Bug/Enhancement] Fix stat change color (#1461) * fix: use orange for stat increase and blue for stat decrease like in main games * fix: run eslint --- src/phases.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/phases.ts b/src/phases.ts index 53e150b888e..f10a8f92d08 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -3092,7 +3092,10 @@ export class StatChangePhase extends PokemonPhase { const tileWidth = 156 * this.scene.field.scale * pokemon.getSpriteScale(); const tileHeight = 316 * this.scene.field.scale * pokemon.getSpriteScale(); - const statSprite = this.scene.add.tileSprite(tileX, tileY, tileWidth, tileHeight, "battle_stats", filteredStats.length > 1 ? "mix" : BattleStat[filteredStats[0]].toLowerCase()); + // On increase, show the red sprite located at ATK + // On decrease, show the blue sprite located at SPD + const spriteColor = levels.value >= 1 ? BattleStat[BattleStat.ATK].toLowerCase() : BattleStat[BattleStat.SPD].toLowerCase(); + const statSprite = this.scene.add.tileSprite(tileX, tileY, tileWidth, tileHeight, "battle_stats", spriteColor); statSprite.setPipeline(this.scene.fieldSpritePipeline); statSprite.setAlpha(0); statSprite.setScale(6);