# applyChallenges | pokemon-rogue-battle
Documentation for pokemon-rogue-battle

# Function applyChallenges

- applyChallenges(
  challengeType: STARTER_CHOICE ,
  pokemon: default ,
  valid: BooleanHolder ,
  dexAttr: DexAttrProps ,
  ): boolean

  Apply all challenges that modify starter choice.

  #### Parameters

  - challengeType: STARTER_CHOICE

    ChallengeType ChallengeType.STARTER_CHOICE

  - pokemon: default

    PokemonSpecies The pokemon to check the validity of.

  - valid: BooleanHolder

    Utils.BooleanHolder A BooleanHolder, the value gets set to false if the pokemon isn't allowed.

  - dexAttr: DexAttrProps

    DexAttrProps The dex attributes of the pokemon.

  #### Returns boolean

  True if any challenge was successfully applied.

  - Defined in src/data/challenge.ts:981
- applyChallenges(challengeType: STARTER_POINTS , points: NumberHolder ): boolean

  Apply all challenges that modify available total starter points.

  #### Parameters

  - challengeType: STARTER_POINTS

    ChallengeType ChallengeType.STARTER_POINTS

  - points: NumberHolder

    Utils.NumberHolder The amount of points you have available.

  #### Returns boolean

  True if any challenge was successfully applied.

  - Defined in src/data/challenge.ts:993
- applyChallenges(
  challengeType: STARTER_COST ,
  species: Species ,
  cost: NumberHolder ,
  ): boolean

  Apply all challenges that modify the cost of a starter.

  #### Parameters

  - challengeType: STARTER_COST

    ChallengeType ChallengeType.STARTER_COST

  - species: Species

    Species The pokemon to change the cost of.

  - cost: NumberHolder

  #### Returns boolean

  True if any challenge was successfully applied.

  - Defined in src/data/challenge.ts:1001
- applyChallenges(challengeType: STARTER_MODIFY , pokemon: default ): boolean

  Apply all challenges that modify a starter after selection.

  #### Parameters

  - challengeType: STARTER_MODIFY

    ChallengeType ChallengeType.STARTER_MODIFY

  - pokemon: default

    Pokemon The starter pokemon to modify.

  #### Returns boolean

  True if any challenge was successfully applied.

  - Defined in src/data/challenge.ts:1012
- applyChallenges(
  challengeType: POKEMON_IN_BATTLE ,
  pokemon: default ,
  valid: BooleanHolder ,
  ): boolean

  Apply all challenges that what pokemon you can have in battle.

  #### Parameters

  - challengeType: POKEMON_IN_BATTLE

    ChallengeType ChallengeType.POKEMON_IN_BATTLE

  - pokemon: default

    Pokemon The pokemon to check the validity of.

  - valid: BooleanHolder

    Utils.BooleanHolder A BooleanHolder, the value gets set to false if the pokemon isn't allowed.

  #### Returns boolean

  True if any challenge was successfully applied.

  - Defined in src/data/challenge.ts:1020
- applyChallenges(
  challengeType: FIXED_BATTLES ,
  waveIndex: number,
  battleConfig: FixedBattleConfig ,
  ): boolean

  Apply all challenges that modify what fixed battles there are.

  #### Parameters

  - challengeType: FIXED_BATTLES

    ChallengeType ChallengeType.FIXED_BATTLES

  - waveIndex: number

    Number The current wave index.

  - battleConfig: FixedBattleConfig

    FixedBattleConfig The battle config to modify.

  #### Returns boolean

  True if any challenge was successfully applied.

  - Defined in src/data/challenge.ts:1032
- applyChallenges(
  challengeType: TYPE_EFFECTIVENESS ,
  effectiveness: NumberHolder ,
  ): boolean

  Apply all challenges that modify type effectiveness.

  #### Parameters

  - challengeType: TYPE_EFFECTIVENESS

    `ChallengeType` ChallengeType.TYPE_EFFECTIVENESS

  - effectiveness: NumberHolder

    `Utils.NumberHolder` The current effectiveness of the move.

  #### Returns boolean

  True if any challenge was successfully applied.

  - Defined in src/data/challenge.ts:1043
- applyChallenges(
  challengeType: AI_LEVEL ,
  level: NumberHolder ,
  levelCap: number,
  isTrainer: boolean,
  isBoss: boolean,
  ): boolean

  Apply all challenges that modify what level AI are.

  #### Parameters

  - challengeType: AI_LEVEL

    ChallengeType ChallengeType.AI_LEVEL

  - level: NumberHolder

    Utils.NumberHolder The generated level of the pokemon.

  - levelCap: number

    Number The maximum level cap for the current wave.

  - isTrainer: boolean

    Boolean Whether this is a trainer pokemon.

  - isBoss: boolean

    Boolean Whether this is a non-trainer boss pokemon.

  #### Returns boolean

  True if any challenge was successfully applied.

  - Defined in src/data/challenge.ts:1056
- applyChallenges(
  challengeType: AI_MOVE_SLOTS ,
  pokemon: default ,
  moveSlots: NumberHolder ,
  ): boolean

  Apply all challenges that modify how many move slots the AI has.

  #### Parameters

  - challengeType: AI_MOVE_SLOTS

    ChallengeType ChallengeType.AI_MOVE_SLOTS

  - pokemon: default

    Pokemon The pokemon being considered.

  - moveSlots: NumberHolder

    Utils.NumberHolder The amount of move slots.

  #### Returns boolean

  True if any challenge was successfully applied.

  - Defined in src/data/challenge.ts:1070
- applyChallenges(
  challengeType: PASSIVE_ACCESS ,
  pokemon: default ,
  hasPassive: BooleanHolder ,
  ): boolean

  Apply all challenges that modify whether a pokemon has its passive.

  #### Parameters

  - challengeType: PASSIVE_ACCESS

    ChallengeType ChallengeType.PASSIVE_ACCESS

  - pokemon: default

    Pokemon The pokemon to modify.

  - hasPassive: BooleanHolder

    Utils.BooleanHolder Whether it has its passive.

  #### Returns boolean

  True if any challenge was successfully applied.

  - Defined in src/data/challenge.ts:1082
- applyChallenges(challengeType: GAME_MODE_MODIFY ): boolean

  Apply all challenges that modify the game modes settings.

  #### Parameters

  - challengeType: GAME_MODE_MODIFY

    ChallengeType ChallengeType.GAME_MODE_MODIFY

  #### Returns boolean

  True if any challenge was successfully applied.

  - Defined in src/data/challenge.ts:1092
- applyChallenges(
  challengeType: MOVE_ACCESS ,
  pokemon: default ,
  moveSource: MoveSourceType ,
  move: Moves ,
  level: NumberHolder ,
  ): boolean

  Apply all challenges that modify what level a pokemon can access a move.

  #### Parameters

  - challengeType: MOVE_ACCESS

    ChallengeType ChallengeType.MOVE_ACCESS

  - pokemon: default

    Pokemon What pokemon would learn the move.

  - moveSource: MoveSourceType

    MoveSourceType What source the pokemon would get the move from.

  - move: Moves

    Moves The move in question.

  - level: NumberHolder

    Utils.NumberHolder The level threshold for access.

  #### Returns boolean

  True if any challenge was successfully applied.

  - Defined in src/data/challenge.ts:1102
- applyChallenges(
  challengeType: MOVE_WEIGHT ,
  pokemon: default ,
  moveSource: MoveSourceType ,
  move: Moves ,
  weight: NumberHolder ,
  ): boolean

  Apply all challenges that modify what weight a pokemon gives to move generation

  #### Parameters

  - challengeType: MOVE_WEIGHT

    ChallengeType ChallengeType.MOVE_WEIGHT

  - pokemon: default

    Pokemon What pokemon would learn the move.

  - moveSource: MoveSourceType

    MoveSourceType What source the pokemon would get the move from.

  - move: Moves

    Moves The move in question.

  - weight: NumberHolder

    Utils.NumberHolder The weight of the move.

  #### Returns boolean

  True if any challenge was successfully applied.

  - Defined in src/data/challenge.ts:1118
- applyChallenges(
  challengeType: FLIP_STAT ,
  pokemon: default ,
  baseStats: number[],
  ): boolean

  Apply all challenges that modify starter choice.

  #### Parameters

  - challengeType: FLIP_STAT

    ChallengeType ChallengeType.STARTER_CHOICE

  - pokemon: default

    PokemonSpecies The pokemon to check the validity of.

  - baseStats: number[]

  #### Returns boolean

  True if any challenge was successfully applied.

  - Defined in src/data/challenge.ts:1126