From 8dd6608e10a5076e4323d8fb46963a7160618f11 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Sun, 20 Jul 2025 00:48:27 -0700 Subject: [PATCH] [UI] Status moves only show 1x or 0x for effectiveness hints (#6119) --- src/data/moves/move.ts | 7 ++++--- src/ui/fight-ui-handler.ts | 15 +++++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/data/moves/move.ts b/src/data/moves/move.ts index 0b0a7e4a853..c4b4b6e844e 100644 --- a/src/data/moves/move.ts +++ b/src/data/moves/move.ts @@ -305,10 +305,11 @@ export abstract class Move implements Localizable { /** * Checks if the move is immune to certain types. + * * Currently looks at cases of Grass types with powder moves and Dark types with moves affected by Prankster. - * @param {Pokemon} user the source of this move - * @param {Pokemon} target the target of this move - * @param {PokemonType} type the type of the move's target + * @param user - The source of this move + * @param target - The target of this move + * @param type - The type of the move's target * @returns boolean */ isTypeImmune(user: Pokemon, target: Pokemon, type: PokemonType): boolean { diff --git a/src/ui/fight-ui-handler.ts b/src/ui/fight-ui-handler.ts index c5f55cc2f9d..9c08991e063 100644 --- a/src/ui/fight-ui-handler.ts +++ b/src/ui/fight-ui-handler.ts @@ -322,7 +322,6 @@ export class FightUiHandler extends UiHandler implements InfoToggle { /** * Gets multiplier text for a pokemon's move against a specific opponent - * Returns undefined if it's a status move */ private getEffectivenessText(pokemon: Pokemon, opponent: Pokemon, pokemonMove: PokemonMove): string | undefined { const effectiveness = opponent.getMoveEffectiveness( @@ -333,8 +332,11 @@ export class FightUiHandler extends UiHandler implements InfoToggle { undefined, true, ); - if (effectiveness === undefined) { - return undefined; + if (pokemonMove.getMove().category === MoveCategory.STATUS) { + if (effectiveness === 0) { + return "0x"; + } + return "1x"; } return `${effectiveness}x`; @@ -391,7 +393,12 @@ export class FightUiHandler extends UiHandler implements InfoToggle { ), ) .sort((a, b) => b - a) - .map(effectiveness => getTypeDamageMultiplierColor(effectiveness ?? 0, "offense")); + .map(effectiveness => { + if (pokemonMove.getMove().category === MoveCategory.STATUS && effectiveness !== 0) { + return undefined; + } + return getTypeDamageMultiplierColor(effectiveness ?? 0, "offense"); + }); return moveColors[0]; }