From 431521ed7077c8493d66a9d293969b7dc191a791 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Sat, 14 Jun 2025 10:31:06 -0700 Subject: [PATCH] Remove circular import between `battle-anims.ts` and `battler-tags.ts` --- src/data/battle-anims.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/data/battle-anims.ts b/src/data/battle-anims.ts index 131086625df..be060b57e9c 100644 --- a/src/data/battle-anims.ts +++ b/src/data/battle-anims.ts @@ -1,12 +1,18 @@ import { globalScene } from "#app/global-scene"; -import { allMoves } from "./data-lists"; +import { allMoves } from "#app/data/data-lists"; import { MoveFlags } from "#enums/MoveFlags"; -import type Pokemon from "../field/pokemon"; -import { type nil, getFrameMs, getEnumKeys, getEnumValues, animationFileName, coerceArray } from "../utils/common"; +import type Pokemon from "#app/field/pokemon"; +import { + type nil, + getFrameMs, + getEnumKeys, + getEnumValues, + animationFileName, + coerceArray, + isNullOrUndefined, +} from "#app/utils/common"; import type { BattlerIndex } from "#enums/battler-index"; import { MoveId } from "#enums/move-id"; -import { SubstituteTag } from "./battler-tags"; -import { isNullOrUndefined } from "../utils/common"; import Phaser from "phaser"; import { EncounterAnim } from "#enums/encounter-anims"; import { AnimBlendType, AnimFrameTarget, AnimFocus, ChargeAnim, CommonAnim } from "#enums/move-anims-common"; @@ -845,7 +851,7 @@ export abstract class BattleAnim { return; } - const targetSubstitute = !!onSubstitute && user !== target ? target.getTag(SubstituteTag) : null; + const targetSubstitute = !!onSubstitute && user !== target ? target.getTag(BattlerTagType.SUBSTITUTE) : null; const userSprite = user.getSprite(); const targetSprite = targetSubstitute?.sprite ?? target.getSprite();