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

# Class GameMode

#### Implements

- GameModeConfig

- Defined in src/game-mode.ts:43

##### Index

### Constructors

constructor

### Properties

battleConfig
challenges
hasMysteryEncounters
hasNoShop
hasRandomBiomes
hasRandomBosses
hasShortBiomes
hasTrainers
isChallenge
isClassic
isDaily
isEndless
isSplicedOnly
maxMysteryEncounterWave
minMysteryEncounterWave
modeId

### Methods

getClearScoreBonus
getEnemyModifierChance
getFixedBattle
getMysteryEncounterLegalWaves
getName
getOverrideSpecies
getStartingBiome
getStartingLevel
getStartingMoney
getWaveForDifficulty
hasChallenge
isBattleClassicFinalBoss
isBoss
isEndlessBoss
isEndlessMajorBoss
isEndlessMinorBoss
isFixedBattle
isFreshStartChallenge
isTrainerBoss
isWaveFinal
isWaveTrainer
setChallengeValue
getModeName

## Constructors

### constructor

- new GameMode(
  modeId: GameModes ,
  config: GameModeConfig,
  battleConfig?: FixedBattleConfigs ,
  ): GameMode

  #### Parameters

  - modeId: GameModes
  - config: GameModeConfig
  - `Optional` battleConfig: FixedBattleConfigs

  #### Returns GameMode

  - Defined in src/game-mode.ts:61

## Properties

### battleConfig

battleConfig: FixedBattleConfigs

- Defined in src/game-mode.ts:56

### challenges

challenges: Challenge []

- Defined in src/game-mode.ts:55

### hasMysteryEncounters

hasMysteryEncounters: boolean

Implementation of GameModeConfig.hasMysteryEncounters

- Defined in src/game-mode.ts:57

### hasNoShop

hasNoShop: boolean

Implementation of GameModeConfig.hasNoShop

- Defined in src/game-mode.ts:49

### hasRandomBiomes

hasRandomBiomes: boolean

Implementation of GameModeConfig.hasRandomBiomes

- Defined in src/game-mode.ts:51

### hasRandomBosses

hasRandomBosses: boolean

Implementation of GameModeConfig.hasRandomBosses

- Defined in src/game-mode.ts:52

### hasShortBiomes

hasShortBiomes: boolean

Implementation of GameModeConfig.hasShortBiomes

- Defined in src/game-mode.ts:50

### hasTrainers

hasTrainers: boolean

Implementation of GameModeConfig.hasTrainers

- Defined in src/game-mode.ts:48

### isChallenge

isChallenge: boolean

Implementation of GameModeConfig.isChallenge

- Defined in src/game-mode.ts:54

### isClassic

isClassic: boolean

Implementation of GameModeConfig.isClassic

- Defined in src/game-mode.ts:45

### isDaily

isDaily: boolean

Implementation of GameModeConfig.isDaily

- Defined in src/game-mode.ts:47

### isEndless

isEndless: boolean

Implementation of GameModeConfig.isEndless

- Defined in src/game-mode.ts:46

### isSplicedOnly

isSplicedOnly: boolean

Implementation of GameModeConfig.isSplicedOnly

- Defined in src/game-mode.ts:53

### maxMysteryEncounterWave

maxMysteryEncounterWave: number

- Defined in src/game-mode.ts:59

### minMysteryEncounterWave

minMysteryEncounterWave: number

- Defined in src/game-mode.ts:58

### modeId

modeId: GameModes

- Defined in src/game-mode.ts:44

## Methods

### getClearScoreBonus

- getClearScoreBonus(): number

  #### Returns number

  - Defined in src/game-mode.ts:318

### getEnemyModifierChance

- getEnemyModifierChance(isBoss: boolean): number

  #### Parameters

  - isBoss: boolean

  #### Returns number

  - Defined in src/game-mode.ts:330

### getFixedBattle

- getFixedBattle(waveIndex: number): FixedBattleConfig

  Returns the config for the fixed battle for a particular wave.

  #### Parameters

  - waveIndex: number

    The wave to check.

  #### Returns FixedBattleConfig

  The fixed battle for this wave.

  - Defined in src/game-mode.ts:310

### getMysteryEncounterLegalWaves

- getMysteryEncounterLegalWaves(): [number, number]

  Returns the wave range where MEs can spawn for the game mode [min, max]

  #### Returns [number, number]

  - Defined in src/game-mode.ts:360

### getName

- getName(): string

  #### Returns string

  - Defined in src/game-mode.ts:342

### getOverrideSpecies

- getOverrideSpecies(waveIndex: number): null | default

  #### Parameters

  - waveIndex: number

  #### Returns null | default

  - Defined in src/game-mode.ts:216

### getStartingBiome

- getStartingBiome(): Biome

  #### Returns Biome

  either:

  - random biome for Daily mode
  - override from overrides.ts
  - Town
  - Defined in src/game-mode.ts:134

### getStartingLevel

- getStartingLevel(): number

  #### Returns number

  either:

  - override from overrides.ts
  - 20 for Daily Runs
  - 5 for all other modes
  - Defined in src/game-mode.ts:107

### getStartingMoney

- getStartingMoney(): number

  #### Returns number

  either:

  - override from overrides.ts
  - 1000
  - Defined in src/game-mode.ts:124

### getWaveForDifficulty

- getWaveForDifficulty(waveIndex: number, ignoreCurveChanges?: boolean): number

  #### Parameters

  - waveIndex: number
  - ignoreCurveChanges: boolean = false

  #### Returns number

  - Defined in src/game-mode.ts:143

### hasChallenge

- hasChallenge(challenge: Challenges ): boolean

  Helper function to see if a GameMode has a specific challenge type

  #### Parameters

  - challenge: Challenges

    the Challenges it looks for

  #### Returns boolean

  true if the game mode has that challenge

  - Defined in src/game-mode.ts:89

### isBattleClassicFinalBoss

- isBattleClassicFinalBoss(waveIndex: number): boolean

  #### Parameters

  - waveIndex: number

  #### Returns boolean

  `true` if the current battle is against classic mode's final boss

  - Defined in src/game-mode.ts:261

### isBoss

- isBoss(waveIndex: number): boolean

  Every 10 waves is a boss battle

  #### Parameters

  - waveIndex: number

  #### Returns boolean

  true if waveIndex is a multiple of 10

  - Defined in src/game-mode.ts:254

### isEndlessBoss

- isEndlessBoss(waveIndex: number): boolean

  Every 50 waves of an Endless mode is a boss At this time it is paradox pokemon

  #### Parameters

  - waveIndex: number

  #### Returns boolean

  true if waveIndex is a multiple of 50 in Endless

  - Defined in src/game-mode.ts:270

### isEndlessMajorBoss

- isEndlessMajorBoss(waveIndex: number): boolean

  Every 1000 waves of an Endless mode is a major boss At this time it is Eternamax Eternatus

  #### Parameters

  - waveIndex: number

  #### Returns boolean

  true if waveIndex is a multiple of 1000 in Endless

  - Defined in src/game-mode.ts:288

### isEndlessMinorBoss

- isEndlessMinorBoss(waveIndex: number): boolean

  Every 250 waves of an Endless mode is a minor boss At this time it is Eternatus

  #### Parameters

  - waveIndex: number

  #### Returns boolean

  true if waveIndex is a multiple of 250 in Endless

  - Defined in src/game-mode.ts:279

### isFixedBattle

- isFixedBattle(waveIndex: number): boolean

  Checks whether there is a fixed battle on this gamemode on a given wave.

  #### Parameters

  - waveIndex: number

    The wave to check.

  #### Returns boolean

  If this game mode has a fixed battle on this wave

  - Defined in src/game-mode.ts:297

### isFreshStartChallenge

- isFreshStartChallenge(): boolean

  Helper function to see if the game mode is using fresh start

  #### Returns boolean

  true if a fresh start challenge is being applied

  - Defined in src/game-mode.ts:97

### isTrainerBoss

- isTrainerBoss(waveIndex: number, biomeType: Biome , offsetGym: boolean): boolean

  #### Parameters

  - waveIndex: number
  - biomeType: Biome
  - offsetGym: boolean

  #### Returns boolean

  - Defined in src/game-mode.ts:204

### isWaveFinal

- isWaveFinal(waveIndex: number, modeId?: GameModes ): boolean

  Checks if wave provided is the final for current or specified game mode

  #### Parameters

  - waveIndex: number
  - modeId: GameModes = ...

    game mode

  #### Returns boolean

  if the current wave is final for classic or daily OR a minor boss in endless

  - Defined in src/game-mode.ts:237

### isWaveTrainer

- isWaveTrainer(waveIndex: number, arena: Arena ): boolean

  Determines whether or not to generate a trainer

  #### Parameters

  - waveIndex: number

    the current floor the player is on (trainer sprites fail to generate on X1 floors)

  - arena: Arena

    the current `Arena`

  #### Returns boolean

  `true` if a trainer should be generated, `false` otherwise

  - Defined in src/game-mode.ts:158

### setChallengeValue

- setChallengeValue(challenge: Challenges , value: number): void

  Enables challenges if they are disabled and sets the specified challenge's value

  #### Parameters

  - challenge: Challenges

    The challenge to set

  - value: number

    The value to give the challenge. Impact depends on the specific challenge

  #### Returns void

  - Defined in src/game-mode.ts:76

### `Static` getModeName

- getModeName(modeId: GameModes ): string

  #### Parameters

  - modeId: GameModes

  #### Returns string

  - Defined in src/game-mode.ts:371