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

# Class CommonBattleAnim

#### Hierarchy (View Summary)

- BattleAnim
  - CommonBattleAnim

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

##### Index

### Constructors

constructor

### Properties

bgSprite
commonAnim
playRegardlessOfIssues
sprites
target
user

### Methods

getAnim
isHideTarget
isHideUser
isOppAnim
play
playWithoutTargets

## Constructors

### constructor

- new CommonBattleAnim(
  commonAnim: null | CommonAnim ,
  user: default ,
  target?: default ,
  playOnEmptyField?: boolean,
  ): CommonBattleAnim

  #### Parameters

  - commonAnim: null | CommonAnim
  - user: default
  - `Optional` target: default
  - playOnEmptyField: boolean = false

  #### Returns CommonBattleAnim

  Overrides BattleAnim.constructor

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

## Properties

### bgSprite

bgSprite: TileSprite | Rectangle

Inherited from BattleAnim.bgSprite

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

### commonAnim

commonAnim: null | CommonAnim

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

### 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.

Inherited from BattleAnim.playRegardlessOfIssues

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

### sprites

sprites: Sprite[]

Inherited from BattleAnim.sprites

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

### target

target: null | default

Inherited from BattleAnim.target

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

### user

user: null | default

Inherited from BattleAnim.user

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

## Methods

### getAnim

- getAnim(): null | AnimConfig

  #### Returns null | AnimConfig

  Overrides BattleAnim.getAnim

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

### `Protected` isHideTarget

- isHideTarget(): boolean

  #### Returns boolean

  Inherited from BattleAnim.isHideTarget

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

### `Protected` isHideUser

- isHideUser(): boolean

  #### Returns boolean

  Inherited from BattleAnim.isHideUser

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

### isOppAnim

- isOppAnim(): boolean

  #### Returns boolean

  Overrides BattleAnim.isOppAnim

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

### play

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

  #### Parameters

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

  #### Returns void

  Inherited from BattleAnim.play

  - 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

  Inherited from BattleAnim.playWithoutTargets

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