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

# Class CanFormChangeWithItemRequirement

Finds if there are pokemon that can form change with a given item. Notice that we mean specific items, like Charizardite, not the Mega Bracelet. If you want to trigger the event based on the form change enabler, use PersistentModifierRequirement.

#### Hierarchy (View Summary)

- EncounterPokemonRequirement
  - CanFormChangeWithItemRequirement

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

##### Index

### Constructors

constructor

### Properties

invertQuery
minNumberOfPokemon
requiredFormChangeItem

### Methods

filterByForm
getDialogueToken
meetsRequirement
queryParty

## Constructors

### constructor

- new CanFormChangeWithItemRequirement(
  formChangeItem: FormChangeItem | FormChangeItem [],
  minNumberOfPokemon?: number,
  invertQuery?: boolean,
  ): CanFormChangeWithItemRequirement

  #### Parameters

  - formChangeItem: FormChangeItem | FormChangeItem []
  - minNumberOfPokemon: number = 1
  - invertQuery: boolean = false

  #### Returns CanFormChangeWithItemRequirement

  Overrides EncounterPokemonRequirement.constructor

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

## Properties

### invertQuery

invertQuery: boolean

Overrides EncounterPokemonRequirement.invertQuery

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

### minNumberOfPokemon

minNumberOfPokemon: number

Overrides EncounterPokemonRequirement.minNumberOfPokemon

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

### requiredFormChangeItem

requiredFormChangeItem: FormChangeItem []

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

## Methods

### filterByForm

- filterByForm(pokemon: any, formChangeItem: any): boolean

  #### Parameters

  - pokemon: any
  - formChangeItem: any

  #### Returns boolean

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

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

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

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