# BattleAnim | pokemon-rogue-battle
Documentation for pokemon-rogue-battle

# Class BattleAnim`Abstract`

#### Hierarchy (View Summary)

- BattleAnim
  - CommonBattleAnim
  - MoveAnim
  - EncounterBattleAnim

- Defined in src/data/battle-anims.ts:821

##### Index

### Constructors

constructor

### Properties

bgSprite
playRegardlessOfIssues
sprites
target
user

### Methods

getAnim
isHideTarget
isHideUser
isOppAnim
play
playWithoutTargets

## Constructors

### constructor

- new BattleAnim(
  user?: default ,
  target?: default ,
  playRegardlessOfIssues?: boolean,
  ): BattleAnim

  #### Parameters

  - `Optional` user: default
  - `Optional` target: default
  - playRegardlessOfIssues: boolean = false

  #### Returns BattleAnim

  - Defined in src/data/battle-anims.ts:836

## Properties

### bgSprite

bgSprite: TileSprite | Rectangle

- Defined in src/data/battle-anims.ts:825

### playRegardlessOfIssues

playRegardlessOfIssues: boolean

Will attempt to play as much of an animation as possible, even if not all targets are on the field. Will also play the animation, even if the user has selected "Move Animations" OFF in Settings. Exclusively used by MEs atm, for visual animations at the start of an encounter.

- Defined in src/data/battle-anims.ts:831

### sprites

sprites: Sprite[]

- Defined in src/data/battle-anims.ts:824

### target

target: null | default

- Defined in src/data/battle-anims.ts:823

### user

user: null | default

- Defined in src/data/battle-anims.ts:822

## Methods

### `Abstract` getAnim

- getAnim(): null | AnimConfig

  #### Returns null | AnimConfig

  - Defined in src/data/battle-anims.ts:843

### `Protected` isHideTarget

- isHideTarget(): boolean

  #### Returns boolean

  - Defined in src/data/battle-anims.ts:851

### `Protected` isHideUser

- isHideUser(): boolean

  #### Returns boolean

  - Defined in src/data/battle-anims.ts:847

### `Abstract` isOppAnim

- isOppAnim(): boolean

  #### Returns boolean

  - Defined in src/data/battle-anims.ts:845

### play

- play(onSubstitute?: boolean, callback?: Function): void

  #### Parameters

  - `Optional` onSubstitute: boolean
  - `Optional` callback: Function

  #### Returns void

  - Defined in src/data/battle-anims.ts:931

### playWithoutTargets

- playWithoutTargets(
  targetInitialX: number,
  targetInitialY: number,
  frameTimeMult: number,
  frameTimedEventPriority?: 0 | 1 | 3 | 5,
  callback?: Function,
  ): void

  #### Parameters

  - targetInitialX: number
  - targetInitialY: number
  - frameTimeMult: number
  - `Optional` frameTimedEventPriority: 0 | 1 | 3 | 5

    0 is behind all other sprites (except BG)

    - 1 on top of player field
    - 3 is on top of both fields
    - 5 is on top of player sprite
  - `Optional` callback: Function

  #### Returns void

  - Defined in src/data/battle-anims.ts:1266