mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-30 12:47:12 +00:00
[Bug] Fix quick claw message showing if command is not fight (#1819)
This commit is contained in:
parent
219f227cab
commit
bd34fc0b47
@ -22,6 +22,7 @@ import { Nature } from "#app/data/nature";
|
|||||||
import { BattlerTagType } from "#app/data/enums/battler-tag-type";
|
import { BattlerTagType } from "#app/data/enums/battler-tag-type";
|
||||||
import * as Overrides from "../overrides";
|
import * as Overrides from "../overrides";
|
||||||
import { ModifierType, modifierTypes } from "./modifier-type";
|
import { ModifierType, modifierTypes } from "./modifier-type";
|
||||||
|
import { Command } from "#app/ui/command-ui-handler.js";
|
||||||
|
|
||||||
export type ModifierPredicate = (modifier: Modifier) => boolean;
|
export type ModifierPredicate = (modifier: Modifier) => boolean;
|
||||||
|
|
||||||
@ -776,7 +777,10 @@ export class BypassSpeedChanceModifier extends PokemonHeldItemModifier {
|
|||||||
|
|
||||||
if (!bypassSpeed.value && pokemon.randSeedInt(10) < this.getStackCount()) {
|
if (!bypassSpeed.value && pokemon.randSeedInt(10) < this.getStackCount()) {
|
||||||
bypassSpeed.value = true;
|
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!"));
|
pokemon.scene.queueMessage(getPokemonMessage(pokemon, " used its quick claw to move faster!"));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user