PokéRogue
    Preparing search index...

    Class ChallengeAbstract

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    conditions: ChallengeCondition[] = []

    The id of the challenge

    maxSeverity: number = 0

    The maximum severity of the challenge.

    maxValue: number

    The maximum strength of the challenge.

    severity: number = 0

    The current severity of the challenge. Some challenges have multiple severities in addition to strength.

    value: number = 0

    The "strength" of the challenge, all challenges have a numerical value.

    Accessors

    Methods

    • Modifies fixed battles (e.g. Gym Leaders).

      Parameters

      • waveIndex: number

        The current wave index

      • battleConfig: FixedBattleConfig

        The battle config to modify

      Returns boolean

      Whether this function did anything

    • Modifies the base stats of a Pokemon.

      Parameters

      • pokemon: Pokemon

        What Pokémon would learn the move

      • baseStats: number[]

        What are the stats to flip

      Returns boolean

      Whether this function did anything

    • Modifies the level of AI Pokemon.

      Parameters

      • level: NumberHolder

        The generated level.

      • levelCap: number

        The current level cap.

      • isTrainer: boolean

        Whether this is a trainer Pokémon

      • isBoss: boolean

        Whether this is a non-trainer boss Pokémon

      Returns boolean

      • Whether this function did anything
    • Modifies the number of move slots an AI Pokemon can have.

      Parameters

      • pokemon: Pokemon

        The Pokémon that is being considered

      • moveSlots: NumberHolder

        The amount of move slots

      Returns boolean

      Whether this function did anything

    • Modifies whether the automatic party healing after every 10th wave is enabled or not.

      Parameters

      Returns boolean

      Whether this function did anything

    • Modifies which pokemon are allowed in battle.

      Parameters

      • pokemon: Pokemon

        The Pokémon to check the validity of

      • isValid: BooleanHolder

        Holds a boolean that will be set to false if the Pokémon isn't allowed

      Returns boolean

      Whether this function did anything

    • Modifies whether Pokemon can be revived.

      Parameters

      • isValid: BooleanHolder

        Whether fainting is a permanent status or not

      Returns boolean

      Whether this function did anything

    • Modifies whether the shop is available at the end of each wave.

      Parameters

      • isEnabled: BooleanHolder

        Whether the shop is or is not available after a wave

      Returns boolean

      Whether this function did anything

    • Modifies the data of chosen starters.

      Parameters

      • pokemon: Pokemon

        The starter Pokémon to modify.

      Returns boolean

      Whether this function did anything.

    • Modifies the maximum points available for the player to spend on starters.

      Parameters

      • points: NumberHolder

        Holder for amount of starter points the user has to spend

      Returns boolean

      Whether this function did anything

    • Modifies the type chart (e.g. changing which types are effective against which).

      Parameters

      • effectiveness: NumberHolder

        The current effectiveness of the move

      Returns boolean

      Whether this function did anything

    • Sealed

      Decrease the severity of the challenge

      Returns boolean

      Whether the value changed

    • Sealed

      Decrease the value of the challenge

      Returns boolean

      Whether the value changed

    • Return the description of a challenge's current value.

      Parameters

      • overrideValue: number = ...

        (Default this.value) Overrides the value used

      Returns string

      The localised description for the current value.

    • Return the textual representation of a challenge's current value.

      Parameters

      • overrideValue: number = ...

        (Default this.value) Overrides the value used

      Returns string

      The localised text for the current value.

    • Sealed

      Whether to allow choosing this challenge's severity.

      Returns boolean

    • Sealed

      Increase the severity of the challenge

      Returns boolean

      Whether the value changed

    • Sealed

      Increase the value of the challenge

      Returns boolean

      Whether the value changed

    • Check if an unlockable challenge is unlocked

      Parameters

      Returns boolean

      Whether this challenge is unlocked

    • Clones a challenge, either from another challenge or json.

      Parameters

      • source: any

        The source challenge or json.

      Returns Challenge

      This challenge.