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

# Class FixedBattle

#### Hierarchy (View Summary)

- default
  - FixedBattle

- Defined in src/battle.ts:487

##### Index

### Constructors

constructor

### Properties

battleScore
battleSeed
battleSpec
battleType
double
enemyFaints
enemyFaintsHistory
enemyLevels
enemyParty
enemySwitchCounter
escapeAttempts
gameMode
lastEnemyInvolved
lastMove
lastPlayerInvolved
lastUsedPokeball
moneyScattered
mysteryEncounter?
mysteryEncounterType?
playerFaintsHistory
playerParticipantIds
postBattleLoot
preTurnCommands
seenEnemyPartyMemberIds
started
trainer
turn
turnCommands
waveIndex

### Methods

addBattleScore
addParticipant
addPostBattleLoot
getBattlerCount
getBgmOverride
getLevelForWave
incrementTurn
isBattleMysteryEncounter
pickUpScatteredMoney
randSeedGaussForLevel
randSeedInt
removeFaintedParticipant

## Constructors

### constructor

- new FixedBattle(waveIndex: number, config: FixedBattleConfig ): FixedBattle

  #### Parameters

  - waveIndex: number
  - config: FixedBattleConfig

  #### Returns FixedBattle

  Overrides default.constructor

  - Defined in src/battle.ts:488

## Properties

### battleScore

battleScore: number = 0

Inherited from default.battleScore

- Defined in src/battle.ts:98

### battleSeed

battleSeed: string = ...

Inherited from default.battleSeed

- Defined in src/battle.ts:102

### battleSpec

battleSpec: BattleSpec

Inherited from default.battleSpec

- Defined in src/battle.ts:86

### battleType

battleType: BattleType

Inherited from default.battleType

- Defined in src/battle.ts:85

### double

double: boolean

Inherited from default.double

- Defined in src/battle.ts:91

### enemyFaints

enemyFaints: number = 0

Saves the number of times a Pokemon on the enemy's side has fainted during this battle. This is saved here since we encounter a new enemy every wave. `globalScene.arena.playerFaints` is the corresponding faint counter for the player and needs to be save across waves (reset every arena encounter).

Inherited from default.enemyFaints

- Defined in src/battle.ts:114

### enemyFaintsHistory

enemyFaintsHistory: FaintLogEntry [] = []

Inherited from default.enemyFaintsHistory

- Defined in src/battle.ts:116

### enemyLevels

enemyLevels: undefined | number[]

Inherited from default.enemyLevels

- Defined in src/battle.ts:88

### enemyParty

enemyParty: EnemyPokemon [] = []

Inherited from default.enemyParty

- Defined in src/battle.ts:89

### enemySwitchCounter

enemySwitchCounter: number = 0

Inherited from default.enemySwitchCounter

- Defined in src/battle.ts:93

### escapeAttempts

escapeAttempts: number = 0

Inherited from default.escapeAttempts

- Defined in src/battle.ts:100

### `Protected` gameMode

gameMode: GameMode

Inherited from default.gameMode

- Defined in src/battle.ts:83

### lastEnemyInvolved

lastEnemyInvolved: number

Primarily for double battles, keeps track of last enemy and player pokemon that triggered its ability or used a move

Inherited from default.lastEnemyInvolved

- Defined in src/battle.ts:106

### lastMove

lastMove: Moves

Inherited from default.lastMove

- Defined in src/battle.ts:101

### lastPlayerInvolved

lastPlayerInvolved: number

Inherited from default.lastPlayerInvolved

- Defined in src/battle.ts:107

### lastUsedPokeball

lastUsedPokeball: null | PokeballType = null

Inherited from default.lastUsedPokeball

- Defined in src/battle.ts:108

### moneyScattered

moneyScattered: number = 0

Inherited from default.moneyScattered

- Defined in src/battle.ts:104

### `Optional` mysteryEncounter

mysteryEncounter?: default

If the current battle is a Mystery Encounter, this will always be defined

Inherited from default.mysteryEncounter

- Defined in src/battle.ts:120

### `Optional` mysteryEncounterType

mysteryEncounterType?: MysteryEncounterType

Inherited from default.mysteryEncounterType

- Defined in src/battle.ts:118

### playerFaintsHistory

playerFaintsHistory: FaintLogEntry [] = []

Inherited from default.playerFaintsHistory

- Defined in src/battle.ts:115

### playerParticipantIds

playerParticipantIds: Set<number> = ...

Inherited from default.playerParticipantIds

- Defined in src/battle.ts:97

### postBattleLoot

postBattleLoot: PokemonHeldItemModifier [] = []

Inherited from default.postBattleLoot

- Defined in src/battle.ts:99

### preTurnCommands

preTurnCommands: TurnCommands

Inherited from default.preTurnCommands

- Defined in src/battle.ts:95

### seenEnemyPartyMemberIds

seenEnemyPartyMemberIds: Set<number> = ...

Inherited from default.seenEnemyPartyMemberIds

- Defined in src/battle.ts:90

### started

started: boolean = false

Inherited from default.started

- Defined in src/battle.ts:92

### trainer

trainer: null | default

Inherited from default.trainer

- Defined in src/battle.ts:87

### turn

turn: number = 0

Inherited from default.turn

- Defined in src/battle.ts:94

### turnCommands

turnCommands: TurnCommands

Inherited from default.turnCommands

- Defined in src/battle.ts:96

### waveIndex

waveIndex: number

Inherited from default.waveIndex

- Defined in src/battle.ts:84

## Methods

### addBattleScore

- addBattleScore(): void

  #### Returns void

  Inherited from default.addBattleScore

  - Defined in src/battle.ts:233

### addParticipant

- addParticipant(playerPokemon: PlayerPokemon ): void

  #### Parameters

  - playerPokemon: PlayerPokemon

  #### Returns void

  Inherited from default.addParticipant

  - Defined in src/battle.ts:189

### addPostBattleLoot

- addPostBattleLoot(enemyPokemon: EnemyPokemon ): void

  #### Parameters

  - enemyPokemon: EnemyPokemon

  #### Returns void

  Inherited from default.addPostBattleLoot

  - Defined in src/battle.ts:197

### getBattlerCount

- getBattlerCount(): number

  #### Returns number

  Inherited from default.getBattlerCount

  - Defined in src/battle.ts:178

### getBgmOverride

- getBgmOverride(): null | string

  #### Returns null | string

  Inherited from default.getBgmOverride

  - Defined in src/battle.ts:255

### getLevelForWave

- getLevelForWave(): number

  #### Returns number

  Inherited from default.getLevelForWave

  - Defined in src/battle.ts:145

### incrementTurn

- incrementTurn(): void

  #### Returns void

  Inherited from default.incrementTurn

  - Defined in src/battle.ts:182

### isBattleMysteryEncounter

- isBattleMysteryEncounter(): boolean

  Returns if the battle is of type `BattleType.MYSTERY_ENCOUNTER`

  #### Returns boolean

  Inherited from default.isBattleMysteryEncounter

  - Defined in src/battle.ts:482

### pickUpScatteredMoney

- pickUpScatteredMoney(): void

  #### Returns void

  Inherited from default.pickUpScatteredMoney

  - Defined in src/battle.ts:213

### randSeedGaussForLevel

- randSeedGaussForLevel(value: number): number

  #### Parameters

  - value: number

  #### Returns number

  Inherited from default.randSeedGaussForLevel

  - Defined in src/battle.ts:170

### randSeedInt

- randSeedInt(range: number, min?: number): number

  Generates a random number using the current battle's seed. Calls `Utils.randSeedInt`

  #### Parameters

  - range: number

    How large of a range of random numbers to choose from. If `range` <= 1, returns `min`

  - min: number = 0

    The minimum integer to pick, default `0`

  #### Returns number

  A random integer between `min` and (`min` + `range` - 1)

  Inherited from default.randSeedInt

  - Defined in src/battle.ts:456

### removeFaintedParticipant

- removeFaintedParticipant(playerPokemon: PlayerPokemon ): void

  #### Parameters

  - playerPokemon: PlayerPokemon

  #### Returns void

  Inherited from default.removeFaintedParticipant

  - Defined in src/battle.ts:193