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

# Class TormentTag

Battle Tag that applies the move Torment to the target Pokemon Torment restricts the use of moves twice in a row. The tag is only removed if the target leaves the battle. Torment does not interrupt the move if the move is performed consecutively in the same turn and right after Torment is applied

#### Hierarchy (View Summary)

- MoveRestrictionBattlerTag
  - TormentTag

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

##### 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 TormentTag(sourceId: number): TormentTag

  #### Parameters

  - sourceId: number

  #### Returns TormentTag

  Overrides MoveRestrictionBattlerTag.constructor

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

## Properties

### isBatonPassable

isBatonPassable: boolean

Inherited from MoveRestrictionBattlerTag.isBatonPassable

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

### lapseTypes

lapseTypes: BattlerTagLapseType []

Inherited from MoveRestrictionBattlerTag.lapseTypes

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

### `Optional` sourceId

sourceId?: number

Inherited from MoveRestrictionBattlerTag.sourceId

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

### sourceMove

sourceMove: Moves

Inherited from MoveRestrictionBattlerTag.sourceMove

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

### tagType

tagType: BattlerTagType

Inherited from MoveRestrictionBattlerTag.tagType

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

### turnCount

turnCount: number

Inherited from MoveRestrictionBattlerTag.turnCount

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

## Methods

### canAdd

- canAdd(_pokemon: default ): boolean

  #### Parameters

  - _pokemon: default

  #### Returns boolean

  Inherited from MoveRestrictionBattlerTag.canAdd

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

### getDescriptor

- getDescriptor(): string

  #### Returns string

  Inherited from MoveRestrictionBattlerTag.getDescriptor

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

### getMoveName

- getMoveName(): null | string

  #### Returns null | string

  Inherited from MoveRestrictionBattlerTag.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 MoveRestrictionBattlerTag.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

  Inherited from MoveRestrictionBattlerTag.interruptedText

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

### isMoveRestricted

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

  This checks if the current move used is identical to the last used move with a `MoveResult` of `SUCCESS`/`MISS`

  #### Parameters

  - move: Moves

    the move under investigation

  - user: default

  #### Returns boolean

  `true` if there is valid consecutive usage | `false` if the moves are different from each other

  Overrides MoveRestrictionBattlerTag.isMoveRestricted

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

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

  Inherited from MoveRestrictionBattlerTag.isMoveTargetRestricted

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

### isSourceLinked

- isSourceLinked(): boolean

  #### Returns boolean

  Inherited from MoveRestrictionBattlerTag.isSourceLinked

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

### lapse

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

  Torment only ends when the affected Pokemon leaves the battle field

  #### Parameters

  - pokemon: default

    the Pokemon under the effects of Torment

  - _tagType: BattlerTagLapseType

  #### Returns boolean

  `true` if still present | `false` if not

  Overrides MoveRestrictionBattlerTag.lapse

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

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

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

### onAdd

- onAdd(pokemon: default ): void

  Adds the battler tag to the target Pokemon and defines the private class variable 'target' 'Target' is used to track the Pokemon's current status

  #### Parameters

  - pokemon: default

    the Pokemon tormented

  #### Returns void

  Overrides MoveRestrictionBattlerTag.onAdd

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

### onOverlap

- onOverlap(_pokemon: default ): void

  #### Parameters

  - _pokemon: default

  #### Returns void

  Inherited from MoveRestrictionBattlerTag.onOverlap

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

### onRemove

- onRemove(_pokemon: default ): void

  #### Parameters

  - _pokemon: default

  #### Returns void

  Inherited from MoveRestrictionBattlerTag.onRemove

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

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

  #### Returns string

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

  Overrides MoveRestrictionBattlerTag.selectionDeniedText

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