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

# Class TypeRequirement

#### Hierarchy (View Summary)

- EncounterPokemonRequirement
  - TypeRequirement

- Defined in src/data/mystery-encounters/mystery-encounter-requirements.ts:502

##### Index

### Constructors

constructor

### Properties

excludeFainted
invertQuery
minNumberOfPokemon
requiredType

### Methods

getDialogueToken
meetsRequirement
queryParty

## Constructors

### constructor

- new TypeRequirement(
  type: PokemonType | PokemonType [],
  excludeFainted?: boolean,
  minNumberOfPokemon?: number,
  invertQuery?: boolean,
  ): TypeRequirement

  #### Parameters

  - type: PokemonType | PokemonType []
  - excludeFainted: boolean = true
  - minNumberOfPokemon: number = 1
  - invertQuery: boolean = false

  #### Returns TypeRequirement

  Overrides EncounterPokemonRequirement.constructor

  - Defined in src/data/mystery-encounters/mystery-encounter-requirements.ts:508

## Properties

### excludeFainted

excludeFainted: boolean

- Defined in src/data/mystery-encounters/mystery-encounter-requirements.ts:504

### invertQuery

invertQuery: boolean

Overrides EncounterPokemonRequirement.invertQuery

- Defined in src/data/mystery-encounters/mystery-encounter-requirements.ts:506

### minNumberOfPokemon

minNumberOfPokemon: number

Overrides EncounterPokemonRequirement.minNumberOfPokemon

- Defined in src/data/mystery-encounters/mystery-encounter-requirements.ts:505

### requiredType

requiredType: PokemonType []

- Defined in src/data/mystery-encounters/mystery-encounter-requirements.ts:503

## Methods

### getDialogueToken

- getDialogueToken(pokemon?: PlayerPokemon ): [string, string]

  Returns a dialogue token key/value pair for a given Requirement. Should be overridden by child Requirement classes.

  #### Parameters

  - `Optional` pokemon: PlayerPokemon

  #### Returns [string, string]

  Overrides EncounterPokemonRequirement.getDialogueToken

  - Defined in src/data/mystery-encounters/mystery-encounter-requirements.ts:542

### meetsRequirement

- meetsRequirement(): boolean

  Returns whether the EncounterPokemonRequirement's... requirements, are met by the given scene

  #### Returns boolean

  Overrides EncounterPokemonRequirement.meetsRequirement

  - Defined in src/data/mystery-encounters/mystery-encounter-requirements.ts:516

### queryParty

- queryParty(partyPokemon: PlayerPokemon []): PlayerPokemon []

  Returns all party members that are compatible with this requirement. For non pokemon related requirements, the entire party is returned.

  #### Parameters

  - partyPokemon: PlayerPokemon []

  #### Returns PlayerPokemon []

  Overrides EncounterPokemonRequirement.queryParty

  - Defined in src/data/mystery-encounters/mystery-encounter-requirements.ts:530