PokéRogue
    Preparing search index...

    Class GameMode

    Implements

    Index

    Constructors

    Properties

    battleConfig: FixedBattleConfigs
    challenges: Challenge[]
    dailyConfig?: CustomDailyRunConfig
    hasMysteryEncounters: boolean
    hasNoShop: boolean
    hasRandomBiomes: boolean
    hasRandomBosses: boolean
    hasShortBiomes: boolean
    hasTrainers: boolean
    isChallenge: boolean
    isClassic: boolean
    isDaily: boolean
    isEndless: boolean
    isSplicedOnly: boolean
    maxMysteryEncounterWave: number
    minMysteryEncounterWave: number
    modeId: GameModes

    Methods

    • Parameters

      • isBoss: boolean

      Returns number

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

      Parameters

      • waveIndex: number

        The wave to check.

      Returns FixedBattleConfig | undefined

      The fixed battle for this wave.

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

      Returns [minWave: number, maxWave: number]

    • Check if the current game mode has the shop enabled or not

      Returns boolean

      Whether the shop is available in the current mode

    • Helper function to get starting level for game mode.

      Returns number

      either:

      • starting level override from overrides.ts
      • 20 for Daily Runs
      • 5 for all other modes
    • Returns number

      either:

      • override from overrides.ts
      • 1000
      • override from a custom daily seed
    • Parameters

      • waveIndex: number
      • ignoreCurveChanges: boolean = false

      Returns number

    • Helper function to see if a GameMode has any challenges, needed in tests

      Returns boolean

      true if the game mode has at least one challenge

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

      Parameters

      Returns boolean

      true if the game mode has that challenge

    • Parameters

      • waveIndex: number

      Returns boolean

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

    • Every 10 waves is a boss battle

      Parameters

      • waveIndex: number

      Returns boolean

      true if waveIndex is a multiple of 10

    • Check whether the current wave is an Endless boss of any kind.

      Parameters

      • waveIndex: number

        The current wave number.

      Returns boolean

      Whether waveIndex corresponds to an Endless boss.

    • 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

    • Check whether the current wave is an Endless minor boss. Currently is normal Eternatus.

      Parameters

      • waveIndex: number

        The current wave number.

      Returns boolean

      Whether waveIndex is a multiple of 250 during endless mode.

    • 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

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

      Returns boolean

      true if a fresh start challenge is being applied

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

      Returns boolean

      true if a fresh start challenge is being applied

    • Parameters

      • waveIndex: number
      • biomeType: BiomeId
      • offsetGym: boolean

      Returns 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

    • 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)

      Returns boolean

      Whether a trainer should be generated

    • 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

      • Optionalseverity: number

        If provided, will override the given severity amount. Unused if challenge does not use severity

      Returns void

      Add severity support to daily mode challenge setting

    • Sets the daily config if the seed is a custom seed.

      Parameters

      • seed: string

        The seed to check

      Returns string

      The seed to use.

      If it is not a custom seed, it will return the original seed.