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

# Class MoveRestrictionBattlerTag`Abstract`

Base class for tags that restrict the usage of moves. This effect is generally referred to as "disabling" a move in-game. This is not to be confused with `Moves.DISABLE`.

Descendants can override `isMoveRestricted` to restrict moves that match a condition. A restricted move gets cancelled before it is used. Players and enemies should not be allowed to select restricted moves.

#### Hierarchy (View Summary)

- BattlerTag
  - MoveRestrictionBattlerTag
    - ThroatChoppedTag
    - DisabledTag
    - GorillaTacticsTag
    - EncoreTag
    - HealBlockTag
    - TormentTag
    - TauntTag
    - ImprisonTag

- Defined in src/data/battler-tags.ts:145

##### Index

### Constructors

constructor

### Properties

isBatonPassable
lapseTypes
sourceId?
sourceMove
tagType
turnCount

### Methods

canAdd
getDescriptor
getMoveName
getSourcePokemon
interruptedText
isMoveRestricted
isMoveTargetRestricted
isSourceLinked
lapse
loadTag
onAdd
onOverlap
onRemove
selectionDeniedText

## Constructors

### constructor

- new MoveRestrictionBattlerTag(
  tagType: BattlerTagType ,
  lapseType: BattlerTagLapseType | BattlerTagLapseType [],
  turnCount: number,
  sourceMove?: Moves ,
  sourceId?: number,
  ): MoveRestrictionBattlerTag

  #### Parameters

  - tagType: BattlerTagType
  - lapseType: BattlerTagLapseType | BattlerTagLapseType []
  - turnCount: number
  - `Optional` sourceMove: Moves
  - `Optional` sourceId: number

  #### Returns MoveRestrictionBattlerTag

  Overrides BattlerTag.constructor

  - Defined in src/data/battler-tags.ts:146

## Properties

### isBatonPassable

isBatonPassable: boolean

Inherited from BattlerTag.isBatonPassable

- Defined in src/data/battler-tags.ts:65

### lapseTypes

lapseTypes: BattlerTagLapseType []

Inherited from BattlerTag.lapseTypes

- Defined in src/data/battler-tags.ts:61

### `Optional` sourceId

sourceId?: number

Inherited from BattlerTag.sourceId

- Defined in src/data/battler-tags.ts:64

### sourceMove

sourceMove: Moves

Inherited from BattlerTag.sourceMove

- Defined in src/data/battler-tags.ts:63

### tagType

tagType: BattlerTagType

Inherited from BattlerTag.tagType

- Defined in src/data/battler-tags.ts:60

### turnCount

turnCount: number

Inherited from BattlerTag.turnCount

- Defined in src/data/battler-tags.ts:62

## Methods

### canAdd

- canAdd(_pokemon: default ): boolean

  #### Parameters

  - _pokemon: default

  #### Returns boolean

  Inherited from BattlerTag.canAdd

  - Defined in src/data/battler-tags.ts:83

### getDescriptor

- getDescriptor(): string

  #### Returns string

  Inherited from BattlerTag.getDescriptor

  - Defined in src/data/battler-tags.ts:97

### getMoveName

- getMoveName(): null | string

  #### Returns null | string

  Inherited from BattlerTag.getMoveName

  - Defined in src/data/battler-tags.ts:105

### getSourcePokemon

- getSourcePokemon(): null | default

  Helper function that retrieves the source Pokemon object

  #### Returns null | default

  The source `Pokemon` or `null` if none is found

  Inherited from BattlerTag.getSourcePokemon

  - Defined in src/data/battler-tags.ts:124

### interruptedText

- interruptedText(_pokemon: default , _move: Moves ): string

  Gets the text to display when a move's execution is prevented as a result of the restriction. Because restriction effects also prevent selection of the move, this situation can only arise if a pokemon first selects a move, then gets outsped by a pokemon using a move that restricts the selected move.

  #### Parameters

  - _pokemon: default

    `Pokemon` attempting to use the restricted move

  - _move: Moves

    `Moves` ID of the move being interrupted

  #### Returns string

  text to display when the move is interrupted

  - Defined in src/data/battler-tags.ts:215

### `Abstract` isMoveRestricted

- isMoveRestricted(move: Moves , user?: default ): boolean

  Gets whether this tag is restricting a move.

  #### Parameters

  - move: Moves

    `Moves` ID to check restriction for.

  - `Optional` user: default

    The `Pokemon` involved

  #### Returns boolean

  `true` if the move is restricted by this tag, otherwise `false`.

  - Defined in src/data/battler-tags.ts:183

### isMoveTargetRestricted

- isMoveTargetRestricted(_move: Moves , _user: default , _target: default ): boolean

  Checks if this tag is restricting a move based on a user's decisions during the target selection phase

  #### Parameters

  - _move: Moves

    `Moves` move ID to check restriction for

  - _user: default

    `Pokemon` the user of the above move

  - _target: default

    `Pokemon` the target of the above move

  #### Returns boolean

  `false` unless overridden by the child tag

  - Defined in src/data/battler-tags.ts:193

### isSourceLinked

- isSourceLinked(): boolean

  #### Returns boolean

  Inherited from BattlerTag.isSourceLinked

  - Defined in src/data/battler-tags.ts:101

### lapse

- lapse(pokemon: default , lapseType: BattlerTagLapseType ): boolean

  #### Parameters

  - pokemon: default
  - lapseType: BattlerTagLapseType

  #### Returns boolean

  Overrides BattlerTag.lapse

  - Defined in src/data/battler-tags.ts:157

### loadTag

- loadTag(source: any): void

  When given a battler tag or json representing one, load the data for it. This is meant to be inherited from by any battler tag with custom attributes

  #### Parameters

  - source: any

    A battler tag

  #### Returns void

  Inherited from BattlerTag.loadTag

  - Defined in src/data/battler-tags.ts:114

### onAdd

- onAdd(_pokemon: default ): void

  #### Parameters

  - _pokemon: default

  #### Returns void

  Inherited from BattlerTag.onAdd

  - Defined in src/data/battler-tags.ts:87

### onOverlap

- onOverlap(_pokemon: default ): void

  #### Parameters

  - _pokemon: default

  #### Returns void

  Inherited from BattlerTag.onOverlap

  - Defined in src/data/battler-tags.ts:91

### onRemove

- onRemove(_pokemon: default ): void

  #### Parameters

  - _pokemon: default

  #### Returns void

  Inherited from BattlerTag.onRemove

  - Defined in src/data/battler-tags.ts:89

### `Abstract` selectionDeniedText

- selectionDeniedText(pokemon: default , move: Moves ): string

  Gets the text to display when the player attempts to select a move that is restricted by this tag.

  #### Parameters

  - pokemon: default

    `Pokemon` for which the player is attempting to select the restricted move

  - move: Moves

    `Moves` ID of the move that is having its selection denied

  #### Returns string

  text to display when the player attempts to select the restricted move

  - Defined in src/data/battler-tags.ts:204