From c33f9723f543ccb0693b7fc6966ea406da2c1f86 Mon Sep 17 00:00:00 2001 From: Dean <69436131+emdeann@users.noreply.github.com> Date: Fri, 31 Oct 2025 16:21:38 -0700 Subject: [PATCH] Update enum name --- src/data/abilities/ability.ts | 14 +++++++------- src/data/moves/move.ts | 8 ++++---- src/enums/move-priority-modifier.ts | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/data/abilities/ability.ts b/src/data/abilities/ability.ts index 180ba0f3e90..d3c646b9321 100644 --- a/src/data/abilities/ability.ts +++ b/src/data/abilities/ability.ts @@ -34,7 +34,7 @@ import { MoveCategory } from "#enums/move-category"; import { MoveFlags } from "#enums/move-flags"; import { MoveId } from "#enums/move-id"; import { MovePhaseTimingModifier } from "#enums/move-phase-timing-modifier"; -import { MovePriorityModifier } from "#enums/move-priority-modifier"; +import { MovePriorityInBracket } from "#enums/move-priority-modifier"; import { MoveResult } from "#enums/move-result"; import { MoveTarget } from "#enums/move-target"; import { MoveUseMode } from "#enums/move-use-mode"; @@ -4143,11 +4143,11 @@ export class ChangeMovePriorityAbAttr extends AbAttr { } } -export class ChangeMovePriorityModifierAbAttr extends AbAttr { - private readonly newModifier: MovePriorityModifier; +export class ChangeMovePriorityInBracketAbAttr extends AbAttr { + private readonly newModifier: MovePriorityInBracket; private readonly moveFunc: (pokemon: Pokemon, move: Move) => boolean; - constructor(moveFunc: (pokemon: Pokemon, move: Move) => boolean, newModifier: MovePriorityModifier) { + constructor(moveFunc: (pokemon: Pokemon, move: Move) => boolean, newModifier: MovePriorityInBracket) { super(false); this.newModifier = newModifier; this.moveFunc = moveFunc; @@ -6741,7 +6741,7 @@ const AbilityAttrs = Object.freeze({ BlockStatusDamageAbAttr, BlockOneHitKOAbAttr, ChangeMovePriorityAbAttr, - ChangeMovePriorityModifierAbAttr, + ChangeMovePriorityInBracketAbAttr, IgnoreContactAbAttr, PreWeatherEffectAbAttr, PreWeatherDamageAbAttr, @@ -7259,7 +7259,7 @@ export function initAbilities() { .attr(DoubleBattleChanceAbAttr) .build(), new AbBuilder(AbilityId.STALL, 4) - .attr(ChangeMovePriorityModifierAbAttr, (_pokemon, _move: Move) => true, MovePriorityModifier.LAST_IN_BRACKET) + .attr(ChangeMovePriorityInBracketAbAttr, (_pokemon, _move: Move) => true, MovePriorityInBracket.LAST) .build(), new AbBuilder(AbilityId.TECHNICIAN, 4) .attr(MovePowerBoostAbAttr, (user, target, move) => { @@ -8206,7 +8206,7 @@ export function initAbilities() { .ignorable() .build(), new AbBuilder(AbilityId.MYCELIUM_MIGHT, 9) - .attr(ChangeMovePriorityModifierAbAttr, (_pokemon, move) => move.category === MoveCategory.STATUS, MovePriorityModifier.LAST_IN_BRACKET) + .attr(ChangeMovePriorityInBracketAbAttr, (_pokemon, move) => move.category === MoveCategory.STATUS, MovePriorityInBracket.LAST) .attr(PreventBypassSpeedChanceAbAttr, (_pokemon, move) => move.category === MoveCategory.STATUS) .attr(MoveAbilityBypassAbAttr, (_pokemon, move: Move) => move.category === MoveCategory.STATUS) .build(), diff --git a/src/data/moves/move.ts b/src/data/moves/move.ts index 43baf361d5e..417ae7c3b93 100644 --- a/src/data/moves/move.ts +++ b/src/data/moves/move.ts @@ -101,7 +101,7 @@ import { MovePhaseTimingModifier } from "#enums/move-phase-timing-modifier"; import { inSpeedOrder } from "#utils/speed-order-generator"; import { canSpeciesTera, willTerastallize } from "#utils/pokemon-utils"; import type { ReadonlyGenericUint8Array } from "#types/typed-arrays"; -import { MovePriorityModifier } from "#enums/move-priority-modifier"; +import { MovePriorityInBracket } from "#enums/move-priority-modifier"; /** * A function used to conditionally determine execution of a given {@linkcode MoveAttr}. @@ -1069,10 +1069,10 @@ export abstract class Move implements Localizable { public getPriorityModifier(user: Pokemon, simulated = true) { if (user.getTag(BattlerTagType.BYPASS_SPEED)) { - return MovePriorityModifier.FIRST_IN_BRACKET; + return MovePriorityInBracket.FIRST; } - const modifierHolder = new NumberHolder(MovePriorityModifier.NORMAL); - applyAbAttrs("ChangeMovePriorityModifierAbAttr", { pokemon: user, simulated, move: this, priority: modifierHolder }); + const modifierHolder = new NumberHolder(MovePriorityInBracket.NORMAL); + applyAbAttrs("ChangeMovePriorityInBracketAbAttr", { pokemon: user, simulated, move: this, priority: modifierHolder }); return modifierHolder.value; } diff --git a/src/enums/move-priority-modifier.ts b/src/enums/move-priority-modifier.ts index 3e51aaec0a3..ea314fda0e4 100644 --- a/src/enums/move-priority-modifier.ts +++ b/src/enums/move-priority-modifier.ts @@ -3,11 +3,11 @@ import type { ObjectValues } from "#types/type-helpers"; /** * Enum representing modifiers for Move priorities. */ -export const MovePriorityModifier = Object.freeze({ +export const MovePriorityInBracket = Object.freeze({ /** Used when moves go last in their priority bracket, but before moves of lower priority. */ - LAST_IN_BRACKET: 0, + LAST: 0, NORMAL: 1, /** Used when moves go first in their priority bracket, but before moves of lower priority. */ - FIRST_IN_BRACKET: 2, + FIRST: 2, }); -export type MovePriorityModifier = ObjectValues; +export type MovePriorityInBracket = ObjectValues;