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

# Class AttemptRunPhase

#### Hierarchy (View Summary)

- PokemonPhase
  - AttemptRunPhase

- Defined in src/phases/attempt-run-phase.ts:13

##### Index

### Constructors

constructor

### Properties

battlerIndex
fieldIndex
forceFailEscape
player

### Methods

attemptRunAway
end
executeForAll
getPokemon
hideEnemyTrainer
showEnemyTrainer
start

## Constructors

### constructor

- new AttemptRunPhase(battlerIndex?: number): AttemptRunPhase

  #### Parameters

  - `Optional` battlerIndex: number

  #### Returns AttemptRunPhase

  Inherited from PokemonPhase.constructor

  - Defined in src/phases/pokemon-phase.ts:11

## Properties

### `Protected` battlerIndex

battlerIndex: number

Inherited from PokemonPhase.battlerIndex

- Defined in src/phases/pokemon-phase.ts:7

### fieldIndex

fieldIndex: number

Inherited from PokemonPhase.fieldIndex

- Defined in src/phases/pokemon-phase.ts:9

### forceFailEscape

forceFailEscape: boolean = false

For testing purposes: this is to force the pokemon to fail and escape

- Defined in src/phases/attempt-run-phase.ts:15

### player

player: boolean

Inherited from PokemonPhase.player

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

## Methods

### attemptRunAway

- attemptRunAway(
  playerField: PlayerPokemon [],
  enemyField: EnemyPokemon [],
  escapeChance: NumberHolder ,
  ): void

  #### Parameters

  - playerField: PlayerPokemon []
  - enemyField: EnemyPokemon []
  - escapeChance: NumberHolder

  #### Returns void

  - Defined in src/phases/attempt-run-phase.ts:66

### end

- end(): void

  #### Returns void

  Inherited from PokemonPhase.end

  - Defined in src/phase.ts:6

### executeForAll

- executeForAll(func: PokemonFunc): void

  #### Parameters

  - func: PokemonFunc

  #### Returns void

  Inherited from PokemonPhase.executeForAll

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

### getPokemon

- getPokemon(): default

  #### Returns default

  Inherited from PokemonPhase.getPokemon

  - Defined in src/phases/pokemon-phase.ts:26

### hideEnemyTrainer

- hideEnemyTrainer(): void

  #### Returns void

  Inherited from PokemonPhase.hideEnemyTrainer

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

### showEnemyTrainer

- showEnemyTrainer(trainerSlot?: TrainerSlot ): void

  #### Parameters

  - trainerSlot: TrainerSlot = TrainerSlot.NONE

  #### Returns void

  Inherited from PokemonPhase.showEnemyTrainer

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

### start

- start(): void

  #### Returns void

  Overrides PokemonPhase.start

  - Defined in src/phases/attempt-run-phase.ts:17