mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-28 20:42:45 +02:00
Remove circular import between battle-anims.ts
and battler-tags.ts
This commit is contained in:
parent
f3a07ced5c
commit
431521ed70
@ -1,12 +1,18 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { allMoves } from "./data-lists";
|
import { allMoves } from "#app/data/data-lists";
|
||||||
import { MoveFlags } from "#enums/MoveFlags";
|
import { MoveFlags } from "#enums/MoveFlags";
|
||||||
import type Pokemon from "../field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { type nil, getFrameMs, getEnumKeys, getEnumValues, animationFileName, coerceArray } from "../utils/common";
|
import {
|
||||||
|
type nil,
|
||||||
|
getFrameMs,
|
||||||
|
getEnumKeys,
|
||||||
|
getEnumValues,
|
||||||
|
animationFileName,
|
||||||
|
coerceArray,
|
||||||
|
isNullOrUndefined,
|
||||||
|
} from "#app/utils/common";
|
||||||
import type { BattlerIndex } from "#enums/battler-index";
|
import type { BattlerIndex } from "#enums/battler-index";
|
||||||
import { MoveId } from "#enums/move-id";
|
import { MoveId } from "#enums/move-id";
|
||||||
import { SubstituteTag } from "./battler-tags";
|
|
||||||
import { isNullOrUndefined } from "../utils/common";
|
|
||||||
import Phaser from "phaser";
|
import Phaser from "phaser";
|
||||||
import { EncounterAnim } from "#enums/encounter-anims";
|
import { EncounterAnim } from "#enums/encounter-anims";
|
||||||
import { AnimBlendType, AnimFrameTarget, AnimFocus, ChargeAnim, CommonAnim } from "#enums/move-anims-common";
|
import { AnimBlendType, AnimFrameTarget, AnimFocus, ChargeAnim, CommonAnim } from "#enums/move-anims-common";
|
||||||
@ -845,7 +851,7 @@ export abstract class BattleAnim {
|
|||||||
return;
|
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 userSprite = user.getSprite();
|
||||||
const targetSprite = targetSubstitute?.sprite ?? target.getSprite();
|
const targetSprite = targetSubstitute?.sprite ?? target.getSprite();
|
||||||
|
Loading…
Reference in New Issue
Block a user