Update enum name

This commit is contained in:
Dean 2025-10-31 16:21:38 -07:00
parent 5c8c2151a8
commit c33f9723f5
3 changed files with 15 additions and 15 deletions

View File

@ -34,7 +34,7 @@ import { MoveCategory } from "#enums/move-category";
import { MoveFlags } from "#enums/move-flags"; import { MoveFlags } from "#enums/move-flags";
import { MoveId } from "#enums/move-id"; import { MoveId } from "#enums/move-id";
import { MovePhaseTimingModifier } from "#enums/move-phase-timing-modifier"; 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 { MoveResult } from "#enums/move-result";
import { MoveTarget } from "#enums/move-target"; import { MoveTarget } from "#enums/move-target";
import { MoveUseMode } from "#enums/move-use-mode"; import { MoveUseMode } from "#enums/move-use-mode";
@ -4143,11 +4143,11 @@ export class ChangeMovePriorityAbAttr extends AbAttr {
} }
} }
export class ChangeMovePriorityModifierAbAttr extends AbAttr { export class ChangeMovePriorityInBracketAbAttr extends AbAttr {
private readonly newModifier: MovePriorityModifier; private readonly newModifier: MovePriorityInBracket;
private readonly moveFunc: (pokemon: Pokemon, move: Move) => boolean; 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); super(false);
this.newModifier = newModifier; this.newModifier = newModifier;
this.moveFunc = moveFunc; this.moveFunc = moveFunc;
@ -6741,7 +6741,7 @@ const AbilityAttrs = Object.freeze({
BlockStatusDamageAbAttr, BlockStatusDamageAbAttr,
BlockOneHitKOAbAttr, BlockOneHitKOAbAttr,
ChangeMovePriorityAbAttr, ChangeMovePriorityAbAttr,
ChangeMovePriorityModifierAbAttr, ChangeMovePriorityInBracketAbAttr,
IgnoreContactAbAttr, IgnoreContactAbAttr,
PreWeatherEffectAbAttr, PreWeatherEffectAbAttr,
PreWeatherDamageAbAttr, PreWeatherDamageAbAttr,
@ -7259,7 +7259,7 @@ export function initAbilities() {
.attr(DoubleBattleChanceAbAttr) .attr(DoubleBattleChanceAbAttr)
.build(), .build(),
new AbBuilder(AbilityId.STALL, 4) new AbBuilder(AbilityId.STALL, 4)
.attr(ChangeMovePriorityModifierAbAttr, (_pokemon, _move: Move) => true, MovePriorityModifier.LAST_IN_BRACKET) .attr(ChangeMovePriorityInBracketAbAttr, (_pokemon, _move: Move) => true, MovePriorityInBracket.LAST)
.build(), .build(),
new AbBuilder(AbilityId.TECHNICIAN, 4) new AbBuilder(AbilityId.TECHNICIAN, 4)
.attr(MovePowerBoostAbAttr, (user, target, move) => { .attr(MovePowerBoostAbAttr, (user, target, move) => {
@ -8206,7 +8206,7 @@ export function initAbilities() {
.ignorable() .ignorable()
.build(), .build(),
new AbBuilder(AbilityId.MYCELIUM_MIGHT, 9) 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(PreventBypassSpeedChanceAbAttr, (_pokemon, move) => move.category === MoveCategory.STATUS)
.attr(MoveAbilityBypassAbAttr, (_pokemon, move: Move) => move.category === MoveCategory.STATUS) .attr(MoveAbilityBypassAbAttr, (_pokemon, move: Move) => move.category === MoveCategory.STATUS)
.build(), .build(),

View File

@ -101,7 +101,7 @@ import { MovePhaseTimingModifier } from "#enums/move-phase-timing-modifier";
import { inSpeedOrder } from "#utils/speed-order-generator"; import { inSpeedOrder } from "#utils/speed-order-generator";
import { canSpeciesTera, willTerastallize } from "#utils/pokemon-utils"; import { canSpeciesTera, willTerastallize } from "#utils/pokemon-utils";
import type { ReadonlyGenericUint8Array } from "#types/typed-arrays"; 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}. * 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) { public getPriorityModifier(user: Pokemon, simulated = true) {
if (user.getTag(BattlerTagType.BYPASS_SPEED)) { if (user.getTag(BattlerTagType.BYPASS_SPEED)) {
return MovePriorityModifier.FIRST_IN_BRACKET; return MovePriorityInBracket.FIRST;
} }
const modifierHolder = new NumberHolder(MovePriorityModifier.NORMAL); const modifierHolder = new NumberHolder(MovePriorityInBracket.NORMAL);
applyAbAttrs("ChangeMovePriorityModifierAbAttr", { pokemon: user, simulated, move: this, priority: modifierHolder }); applyAbAttrs("ChangeMovePriorityInBracketAbAttr", { pokemon: user, simulated, move: this, priority: modifierHolder });
return modifierHolder.value; return modifierHolder.value;
} }

View File

@ -3,11 +3,11 @@ import type { ObjectValues } from "#types/type-helpers";
/** /**
* Enum representing modifiers for Move priorities. * 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. */ /** Used when moves go last in their priority bracket, but before moves of lower priority. */
LAST_IN_BRACKET: 0, LAST: 0,
NORMAL: 1, NORMAL: 1,
/** Used when moves go first in their priority bracket, but before moves of lower priority. */ /** 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<typeof MovePriorityModifier>; export type MovePriorityInBracket = ObjectValues<typeof MovePriorityInBracket>;