pokemon-rogue-battle
    Preparing search index...

    Class ChallengeAbstract

    A challenge object. Exists only to serve as a base class.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    conditions: ChallengeCondition[]
    maxSeverity: number
    maxValue: number
    severity: number
    value: number

    Methods

    • An apply function for FIXED_BATTLE challenges. Derived classes should alter this.

      Parameters

      Returns boolean

      boolean Whether this function did anything.

    • An apply function for FlipStats. Derived classes should alter this.

      Parameters

      • _pokemon: Pokemon

        Pokemon What pokemon would learn the move.

      • _baseStats: number[]

        What are the stats to flip.

      Returns boolean

      boolean Whether this function did anything.

    • An apply function for GAME_MODE_MODIFY challenges. Derived classes should alter this.

      Returns boolean

      boolean Whether this function did anything.

    • An apply function for AI_LEVEL challenges. Derived classes should alter this.

      Parameters

      • _level: NumberHolder

        NumberHolder The generated level.

      • _levelCap: number

        Number The current level cap.

      • _isTrainer: boolean

        Boolean Whether this is a trainer pokemon.

      • _isBoss: boolean

        Boolean Whether this is a non-trainer boss pokemon.

      Returns boolean

      boolean Whether this function did anything.

    • An apply function for PARTY_HEAL. Derived classes should alter this.

      Parameters

      Returns boolean

      Whether this function did anything

    • An apply function for POKEMON_ADD_TO_PARTY. Derived classes should alter this.

      Parameters

      Returns boolean

      Whether this function did anything

    • An apply function for POKEMON_IN_BATTLE challenges. Derived classes should alter this.

      Parameters

      Returns boolean

      boolean Whether this function did anything.

    • An apply function for PREVENT_REVIVE. Derived classes should alter this.

      Parameters

      • _status: BooleanHolder

        Whether fainting is a permanent status or not

      Returns boolean

      Whether this function did anything

    • An apply function for SHOP. Derived classes should alter this.

      Parameters

      • _status: BooleanHolder

        Whether the shop is or is not available after a wave

      Returns boolean

      Whether this function did anything

    • An apply function for STARTER_MODIFY challenges. Derived classes should alter this.

      Parameters

      Returns boolean

      boolean Whether this function did anything.

    • An apply function for STARTER_POINTS challenges. Derived classes should alter this.

      Parameters

      Returns boolean

      boolean Whether this function did anything.

    • An apply function for TYPE_EFFECTIVENESS challenges. Derived classes should alter this.

      Parameters

      Returns boolean

      Whether this function did anything.

    • Decrease the severity of the challenge

      Returns boolean

      boolean Returns true if the value changed

    • Decrease the value of the challenge

      Returns boolean

      boolean Returns true if the value changed

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

      Parameters

      • overrideValue: number = ...

        The value to check for; default this.value

      Returns string

      The localised description for the current value.

    • Gets the "difficulty" value of this challenge.

      Returns number

      integer The difficulty value.

    • Gets the localization key for the challenge

      Returns string

      The i18n key for this challenge as camel case.

    • Gets the minimum difficulty added by this challenge.

      Returns number

      integer The difficulty value.

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

      Parameters

      • overrideValue: number = ...

        The value to check for; default this.value

      Returns string

      The localised text for the current value.

    • Whether to allow choosing this challenge's severity.

      Returns boolean

    • Increase the severity of the challenge

      Returns boolean

      boolean Returns true if the value changed

    • Increase the value of the challenge

      Returns boolean

      boolean Returns true if the value changed