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

# Class EncounterPhase

#### Hierarchy (View Summary)

- BattlePhase
  - EncounterPhase
    - NextEncounterPhase

- Defined in src/phases/encounter-phase.ts:43

##### Index

### Constructors

constructor

### Methods

doEncounter
doEncounterCommon
end
getEncounterMessage
hideEnemyTrainer
showEnemyTrainer
start
tryOverrideForBattleSpec
trySetWeatherIfNewBiome

## Constructors

### constructor

- new EncounterPhase(loaded?: boolean): EncounterPhase

  #### Parameters

  - `Optional` loaded: boolean

  #### Returns EncounterPhase

  Overrides BattlePhase.constructor

  - Defined in src/phases/encounter-phase.ts:46

## Methods

### doEncounter

- doEncounter(): void

  #### Returns void

  - Defined in src/phases/encounter-phase.ts:319

### doEncounterCommon

- doEncounterCommon(showEncounterMessage?: boolean): void

  #### Parameters

  - showEncounterMessage: boolean = true

  #### Returns void

  - Defined in src/phases/encounter-phase.ts:402

### end

- end(): void

  #### Returns void

  Overrides BattlePhase.end

  - Defined in src/phases/encounter-phase.ts:544

### getEncounterMessage

- getEncounterMessage(): string

  #### Returns string

  - Defined in src/phases/encounter-phase.ts:372

### hideEnemyTrainer

- hideEnemyTrainer(): void

  #### Returns void

  Inherited from BattlePhase.hideEnemyTrainer

  - Defined in src/phases/battle-phase.ts:37

### showEnemyTrainer

- showEnemyTrainer(trainerSlot?: TrainerSlot ): void

  #### Parameters

  - trainerSlot: TrainerSlot = TrainerSlot.NONE

  #### Returns void

  Inherited from BattlePhase.showEnemyTrainer

  - Defined in src/phases/battle-phase.ts:10

### start

- start(): void

  #### Returns void

  Overrides BattlePhase.start

  - Defined in src/phases/encounter-phase.ts:52

### tryOverrideForBattleSpec

- tryOverrideForBattleSpec(): boolean

  #### Returns boolean

  - Defined in src/phases/encounter-phase.ts:630

### trySetWeatherIfNewBiome

- trySetWeatherIfNewBiome(): void

  Set biome weather if and only if this encounter is the start of a new biome.

  By using function overrides, this should happen if and only if this phase is exactly a NewBiomeEncounterPhase or an EncounterPhase (to account for Wave 1 of a Daily Run), but NOT NextEncounterPhase (which starts the next wave in the same biome).

  #### Returns void

  - Defined in src/phases/encounter-phase.ts:685