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

# Class CopyMoveAttr

Attribute used to copy a previously-used move. Used for `Moves.COPYCAT` and `Moves.MIRROR_MOVE`

#### See

`apply` for move selection and move call

#### Hierarchy

- CallMoveAttr
  - CopyMoveAttr

- Defined in src/data/moves/move.ts:6969

##### Index

### Constructors

constructor

### Properties

hasTarget
invalidMoves
selfTarget

### Methods

apply
getCondition
getFailedText
getTargetBenefitScore
getUserBenefitScore

## Constructors

### constructor

- new CopyMoveAttr(
  mirrorMove: boolean,
  invalidMoves?: ReadonlySet< Moves >,
  ): CopyMoveAttr

  #### Parameters

  - mirrorMove: boolean
  - invalidMoves: ReadonlySet< Moves > = ...

  #### Returns CopyMoveAttr

  Overrides CallMoveAttr.constructor

  - Defined in src/data/moves/move.ts:6971

## Properties

### `Protected` hasTarget

hasTarget: boolean

Inherited from CallMoveAttr.hasTarget

- Defined in src/data/moves/move.ts:6715

### `Protected` invalidMoves

invalidMoves: ReadonlySet< Moves >

Inherited from CallMoveAttr.invalidMoves

- Defined in src/data/moves/move.ts:6714

### selfTarget

selfTarget: boolean

Should this `Move` target the user?

Inherited from CallMoveAttr.selfTarget

- Defined in src/data/moves/move.ts:1071

## Methods

### apply

- apply(user: default , target: default , move: default , args: any[]): boolean

  #### Parameters

  - user: default
  - target: default
  - move: default
  - args: any[]

  #### Returns boolean

  Overrides CallMoveAttr.apply

  - Defined in src/data/moves/move.ts:6977

### getCondition

- getCondition(): MoveConditionFunc

  #### Returns MoveConditionFunc

  the `MoveCondition` or MoveConditionFunc for this `Move`

  Overrides CallMoveAttr.getCondition

  - Defined in src/data/moves/move.ts:6983

### getFailedText

- getFailedText(user: default , target: default , move: default ): undefined | string

  #### Parameters

  - user: default

    `Pokemon` using the move

  - target: default

    `Pokemon` target of the move

  - move: default

    `Move` with this attribute

  #### Returns undefined | string

  the string representing failure of this `Move`

  Inherited from CallMoveAttr.getFailedText

  - Defined in src/data/moves/move.ts:1106

### getTargetBenefitScore

- getTargetBenefitScore(user: default , target: default , move: default ): number

  Used by the Enemy AI to rank an attack based on a given target

  #### Parameters

  - user: default
  - target: default
  - move: default

  #### Returns number

  #### See

  `EnemyPokemon.getNextMove`

  Inherited from CallMoveAttr.getTargetBenefitScore

  - Defined in src/data/moves/move.ts:1124

### getUserBenefitScore

- getUserBenefitScore(user: default , target: default , move: default ): number

  Used by the Enemy AI to rank an attack based on a given user

  #### Parameters

  - user: default
  - target: default
  - move: default

  #### Returns number

  #### See

  `EnemyPokemon.getNextMove`

  Inherited from CallMoveAttr.getUserBenefitScore

  - Defined in src/data/moves/move.ts:1115