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

Hierarchy (view full)

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

    Parameters

    Returns boolean

    boolean Whether this function did anything.

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

    Parameters

    • level: IntegerHolder

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

    Parameters

    Returns boolean

    boolean Whether this function did anything.

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

    Parameters

    Returns boolean

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

    Parameters

    Returns boolean

    boolean Whether this function did anything.

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

    Parameters

    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.

  • 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

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

    Parameters

    • OptionaloverrideValue: number

      integer 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 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

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

    Returns string

    string The localised name for the current value.

  • Gets the localisation key for the challenge

    Returns string

    string The i18n key for this challenge

  • 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

  • Used for unlockable challenges to check if they're unlocked.

    Parameters

    Returns boolean

    boolean Whether this challenge is unlocked.

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

    Parameters

    • source: any

      The source challenge or json.

    Returns Challenge

    This challenge.