From cee65c4808f2e104dd8719d5af2c4031b867aa92 Mon Sep 17 00:00:00 2001 From: Dean Date: Fri, 27 Dec 2024 15:09:43 -0800 Subject: [PATCH] Allow for quashed speed ties --- src/data/move.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/data/move.ts b/src/data/move.ts index 8e910b7c79f..8aec6a37c36 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -7682,7 +7682,13 @@ export class ForceLastAttr extends MoveEffectAttr { } /** Returns whether a {@linkcode MovePhase} has been forced last and the corresponding pokemon is slower than {@linkcode target} */ const phaseForcedSlower = (phase: MovePhase, target: Pokemon, trickRoom: boolean): boolean => { - const slower = !trickRoom ? phase.pokemon.getEffectiveStat(Stat.SPD) < target.getEffectiveStat(Stat.SPD) : phase.pokemon.getEffectiveStat(Stat.SPD) > target.getEffectiveStat(Stat.SPD); + let slower: boolean; + // quashed pokemon still have speed ties + if (phase.pokemon.getEffectiveStat(Stat.SPD) === target.getEffectiveStat(Stat.SPD)) { + slower = !!target.randSeedInt(2); + } else { + slower = !trickRoom ? phase.pokemon.getEffectiveStat(Stat.SPD) < target.getEffectiveStat(Stat.SPD) : phase.pokemon.getEffectiveStat(Stat.SPD) > target.getEffectiveStat(Stat.SPD); + } return phase.isForcedLast() && slower; };