PokéRogue
    Preparing search index...

    Helper to handle overrides in tests

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    disableShinies: boolean = true

    If true, sets the shiny overrides to disable shinies at the start of each test.

    true

    normalizeIVs: boolean = true

    If true, will set the IV overrides for player and enemy pokemon to 31 at the start of each test.

    true

    normalizeNatures: boolean = true

    If true, will set the Nature overrides for player and enemy pokemon to a neutral nature at the start of each test.

    true

    removeEnemyStartingItems: boolean = true

    If true, removes the starting items from enemies at the start of each test.

    true

    Methods

    • Override confusion to always or never activate

      Parameters

      • activate: null | boolean

        true to force activation, false to force no activation, null to disable the override

      Returns this

      this

    • Force random critical hit rolls to always or never suceed.

      Parameters

      • crits: null | boolean

        true to guarantee crits on eligible moves, false to force rolls to fail, null to disable override

      Returns this

      this

      This does not change any effects that guarantee or block critical hits; it merely mocks any chance-based rolls not already at 100%.
      For instance, a Pokemon at +3 crit stages will still critically hit with the override set to false, whereas one at +2 crit stages (a 50% chance) will not.

    • Forces the status of the enemy pokemon passive ability

      Parameters

      • hasPassiveAbility: null | boolean

        Forces the passive to be active if true, inactive if false

      Returns this

      this

    • Override the enemy Pokemon to have the given amount of health segments

      Parameters

      • healthSegments: number

        The number of segments to give

        • 0 (default): the health segments will be handled like in the game based on wave, level and species
        • 1: the Pokemon will not be a boss
        • 2+: the Pokemon will be a boss with the given number of health segments

      Returns this

      this

    • Overrides the IVs of the enemy pokemon

      Parameters

      • ivs: null | number | number[]

        If set to a number, all IVs are set to the same value. Must be between 0 and 31!

        If set to an array, that array is applied to the pokemon's IV field as-is. All values must be between 0 and 31, and the array must be of exactly length 6!

        If set to null, the override is disabled.

      Returns this

      this

    • Override enemy shininess

      Parameters

      • shininess: null | boolean

        true or false to force the enemy's pokemon to be shiny or not shiny, null to disable the override and re-enable RNG shinies.

      • Optionalvariant: Variant

        (Optional) The enemy's shiny Variant.

      Returns this

    • Forces the status of the player pokemon passive ability

      Parameters

      • hasPassiveAbility: null | boolean

        Forces the passive to be active if true, inactive if false

      Returns this

      this

    • Override the wave level cap

      Parameters

      • cap: number

        The level cap value to set; 0 uses normal level caps and negative values disable it completely

      Returns this

      this

    • Overrides the IVs of the player pokemon

      Parameters

      • ivs: null | number | number[]

        If set to a number, all IVs are set to the same value. Must be between 0 and 31!

        If set to an array, that array is applied to the pokemon's IV field as-is. All values must be between 0 and 31, and the array must be of exactly length 6!

        If set to null, the override is disabled.

      Returns this

      this

    • Override player shininess

      Parameters

      • shininess: null | boolean

        true or false to force the player's pokemon to be shiny or not shiny, null to disable the override and re-enable RNG shinies.

      Returns this

      this

    • Override statuses (Paralysis and Freeze) to always or never activate

      Parameters

      • activate: null | boolean

        true to force activation, false to force no activation, null to disable the override

      Returns this

      this