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

# Class TmModifier

#### Hierarchy (View Summary)

- ConsumablePokemonModifier
  - TmModifier

- Defined in src/modifier/modifier.ts:2325

##### Index

### Constructors

constructor

### Properties

pokemonId
type

### Methods

add
apply
getPokemon
match
shouldApply

## Constructors

### constructor

- new TmModifier(type: ModifierType , pokemonId: number): TmModifier

  #### Parameters

  - type: ModifierType
  - pokemonId: number

  #### Returns TmModifier

  Inherited from ConsumablePokemonModifier.constructor

  - Defined in src/modifier/modifier.ts:2052

## Properties

### pokemonId

pokemonId: number

Inherited from ConsumablePokemonModifier.pokemonId

- Defined in src/modifier/modifier.ts:2050

### type

type: TmModifierType

Overrides ConsumablePokemonModifier.type

- Defined in src/modifier/modifier.ts:2326

## Methods

### add

- add(_modifiers: Modifier []): boolean

  #### Parameters

  - _modifiers: Modifier []

  #### Returns boolean

  Inherited from ConsumablePokemonModifier.add

  - Defined in src/modifier/modifier.ts:277

### apply

- apply(playerPokemon: PlayerPokemon ): boolean

  Applies TmModifier

  #### Parameters

  - playerPokemon: PlayerPokemon

    The `PlayerPokemon` that should learn the TM

  #### Returns boolean

  always `true`

  Overrides ConsumablePokemonModifier.apply

  - Defined in src/modifier/modifier.ts:2333

### getPokemon

- getPokemon(): undefined | PlayerPokemon

  #### Returns undefined | PlayerPokemon

  Inherited from ConsumablePokemonModifier.getPokemon

  - Defined in src/modifier/modifier.ts:2075

### match

- match(_modifier: Modifier ): boolean

  #### Parameters

  - _modifier: Modifier

  #### Returns boolean

  Inherited from ConsumablePokemonModifier.match

  - Defined in src/modifier/modifier.ts:165

### shouldApply

- shouldApply(playerPokemon?: PlayerPokemon , ..._args: unknown[]): boolean

  Checks if `ConsumablePokemonModifier` should be applied

  #### Parameters

  - `Optional` playerPokemon: PlayerPokemon

    The `PlayerPokemon` that consumes the item

  - ..._args: unknown[]

    N/A

  #### Returns boolean

  `true` if `ConsumablePokemonModifier` should be applied

  Inherited from ConsumablePokemonModifier.shouldApply

  - Defined in src/modifier/modifier.ts:2064