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

# Class TurnStartPhase

#### Hierarchy (View Summary)

- FieldPhase
  - TurnStartPhase

- Defined in src/phases/turn-start-phase.ts:26

##### Index

### Constructors

constructor

### Methods

end
executeForAll
getCommandOrder
getSpeedOrder
hideEnemyTrainer
showEnemyTrainer
start

## Constructors

### constructor

- new TurnStartPhase(): TurnStartPhase

  #### Returns TurnStartPhase

  Overrides FieldPhase.constructor

  - Defined in src/phases/turn-start-phase.ts:27

## Methods

### end

- end(): void

  #### Returns void

  Inherited from FieldPhase.end

  - Defined in src/phase.ts:6

### executeForAll

- executeForAll(func: PokemonFunc): void

  #### Parameters

  - func: PokemonFunc

  #### Returns void

  Inherited from FieldPhase.executeForAll

  - Defined in src/phases/field-phase.ts:8

### getCommandOrder

- getCommandOrder(): BattlerIndex []

  This takes the result of getSpeedOrder and applies priority / bypass speed attributes to it. This also considers the priority levels of various commands and changes the result of getSpeedOrder based on such.

  #### Returns BattlerIndex []

  BattlerIndex[] the final sequence of commands for this turn

  - Defined in src/phases/turn-start-phase.ts:72

### getSpeedOrder

- getSpeedOrder(): BattlerIndex []

  This orders the active Pokemon on the field by speed into an BattlerIndex array and returns that array. It also checks for Trick Room and reverses the array if it is present.

  #### Returns BattlerIndex []

  BattlerIndex[] the battle indices of all pokemon on the field ordered by speed

  - Defined in src/phases/turn-start-phase.ts:36

### hideEnemyTrainer

- hideEnemyTrainer(): void

  #### Returns void

  Inherited from FieldPhase.hideEnemyTrainer

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

### showEnemyTrainer

- showEnemyTrainer(trainerSlot?: TrainerSlot ): void

  #### Parameters

  - trainerSlot: TrainerSlot = TrainerSlot.NONE

  #### Returns void

  Inherited from FieldPhase.showEnemyTrainer

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

### start

- start(): void

  #### Returns void

  Overrides FieldPhase.start

  - Defined in src/phases/turn-start-phase.ts:143