From bd34fc0b476effe2b57983513962830afbdd82b4 Mon Sep 17 00:00:00 2001 From: Adrian T <68144167+torranx@users.noreply.github.com> Date: Wed, 5 Jun 2024 21:38:43 +0800 Subject: [PATCH] [Bug] Fix quick claw message showing if command is not fight (#1819) --- src/modifier/modifier.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index 28bf2f61c75..6f296c997ca 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -22,6 +22,7 @@ import { Nature } from "#app/data/nature"; import { BattlerTagType } from "#app/data/enums/battler-tag-type"; import * as Overrides from "../overrides"; import { ModifierType, modifierTypes } from "./modifier-type"; +import { Command } from "#app/ui/command-ui-handler.js"; export type ModifierPredicate = (modifier: Modifier) => boolean; @@ -776,7 +777,10 @@ export class BypassSpeedChanceModifier extends PokemonHeldItemModifier { if (!bypassSpeed.value && pokemon.randSeedInt(10) < this.getStackCount()) { bypassSpeed.value = true; - if (this.type instanceof ModifierTypes.PokemonHeldItemModifierType && this.type.id === "QUICK_CLAW") { + const isCommandFight = pokemon.scene.currentBattle.turnCommands[pokemon.getBattlerIndex()]?.command === Command.FIGHT; + const hasQuickClaw = this.type instanceof ModifierTypes.PokemonHeldItemModifierType && this.type.id === "QUICK_CLAW"; + + if (isCommandFight && hasQuickClaw) { pokemon.scene.queueMessage(getPokemonMessage(pokemon, " used its quick claw to move faster!")); } return true;