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: default

        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

        Utils.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 STARTER_MODIFY challenges. Derived classes should alter this.

      Parameters

      Returns boolean

      boolean Whether this function did anything.

    • Adds an unlock condition to this challenge.

      Parameters

      • condition: ChallengeCondition

        ChallengeCondition The condition to add.

      Returns Challenge

      Challenge This challenge

    • 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

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

      Parameters

      • OptionaloverrideValue: number

        number The value to check for. If undefined, gets the current value.

      Returns string

      string The localised description for the current value.

    • Gets the "difficulty" value of this challenge.

      Returns number

      integer The difficulty value.

    • Gets the localisation key for the challenge

      Returns string

      string The i18n key for this challenge

    • Gets the minimum difficulty added by this challenge.

      Returns number

      integer The difficulty value.

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

      Parameters

      • OptionaloverrideValue: number

        number The value to check for. If undefined, gets the current value.

      Returns string

      string The localised name 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