diff --git a/src/data/abilities/ability.ts b/src/data/abilities/ability.ts index baf19ee3601..d30a2fc18e4 100644 --- a/src/data/abilities/ability.ts +++ b/src/data/abilities/ability.ts @@ -5983,11 +5983,6 @@ export class IllusionPostBattleAbAttr extends PostBattleAbAttr { } } -export interface BypassSpeedChanceAbAttrParams extends AbAttrBaseParams { - /** Holds whether the speed check is bypassed after ability application */ - bypass: BooleanHolder; -} - /** * If a Pokémon with this Ability selects a damaging move, it has a 30% chance of going first in its priority bracket. If the Ability activates, this is announced at the start of the turn (after move selection). * @sealed @@ -6003,7 +5998,7 @@ export class BypassSpeedChanceAbAttr extends AbAttr { this.chance = chance; } - override canApply({ bypass, simulated, pokemon }: BypassSpeedChanceAbAttrParams): boolean { + override canApply({ simulated, pokemon }: AbAttrBaseParams): boolean { // TODO: Consider whether we can move the simulated check to the `apply` method // May be difficult as we likely do not want to modify the randBattleSeed const turnCommand = globalScene.currentBattle.turnCommands[pokemon.getBattlerIndex()]; @@ -6020,11 +6015,11 @@ export class BypassSpeedChanceAbAttr extends AbAttr { /** * bypass move order in their priority bracket when pokemon choose damaging move */ - override apply({ pokemon }: BypassSpeedChanceAbAttrParams): void { + override apply({ pokemon }: AbAttrBaseParams): void { pokemon.addTag(BattlerTagType.BYPASS_SPEED); } - override getTriggerMessage({ pokemon }: BypassSpeedChanceAbAttrParams, _abilityName: string): string { + override getTriggerMessage({ pokemon }: AbAttrBaseParams, _abilityName: string): string { return i18next.t("abilityTriggers:quickDraw", { pokemonName: getPokemonNameWithAffix(pokemon) }); } } diff --git a/src/data/moves/move.ts b/src/data/moves/move.ts index 17b22c46d9a..071ff6e6337 100644 --- a/src/data/moves/move.ts +++ b/src/data/moves/move.ts @@ -874,7 +874,7 @@ export default abstract class Move implements Localizable { getPriorityModifier(user: Pokemon, simulated = true): MovePriorityModifier { const modifierHolder = new NumberHolder(MovePriorityModifier.NORMAL); - applyAbAttrs("ChangeMovePriorityModifierAbAttr", user, null, simulated, this, modifierHolder); + applyAbAttrs("ChangeMovePriorityModifierAbAttr", {pokemon: user, simulated: simulated, move: this, priority: modifierHolder}); modifierHolder.value = user.getTag(BattlerTagType.BYPASS_SPEED) ? MovePriorityModifier.FIRST_IN_BRACKET : modifierHolder.value; return modifierHolder.value; } diff --git a/src/phases/turn-start-phase.ts b/src/phases/turn-start-phase.ts index 3e70d79cd06..fde4bc9ae58 100644 --- a/src/phases/turn-start-phase.ts +++ b/src/phases/turn-start-phase.ts @@ -1,4 +1,3 @@ -import { Stat } from "#app/enums/stat"; import { PokemonMove } from "#app/data/moves/pokemon-move"; import { Command } from "#enums/command"; import { FieldPhase } from "./field-phase"; @@ -74,7 +73,7 @@ export class TurnStartPhase extends FieldPhase { const phaseManager = globalScene.phaseManager; applyInSpeedOrder(activeField, (p: Pokemon) => { - applyAbAttrs("BypassSpeedChanceAbAttr", p, null); + applyAbAttrs("BypassSpeedChanceAbAttr", { pokemon: p }); globalScene.applyModifiers(BypassSpeedChanceModifier, p.isPlayer(), p); });