Skip to content

Challenges

clearChallenge(): void

Defined in: packages/isaacscript-common/src/functions/challenges.ts:32

Helper function to clear the current challenge, which will restart the run on a new random non-challenge seed with the current character.

If the player is not in a challenge already, this function will do nothing.

Under the hood, this function executes the challenge 0 console command.

void


getChallengeBoss(challenge): BossID

Defined in: packages/isaacscript-common/src/functions/challenges.ts:52

Get the final boss of a challenge. This will only work for vanilla challenges.

For modded challenges, BossID.MOM (6) will be returned.

Note that for Challenge.BACKASSWARDS (31), this function will return BossID.MEGA_SATAN (55), but this is not actually the final boss. (There is no final boss for this challenge.)

Challenge

BossID


getChallengeCharacter(challenge): PlayerType

Defined in: packages/isaacscript-common/src/functions/challenges.ts:64

Get the starting character of a challenge. This will only work for vanilla challenges.

For modded challenges, PlayerType.ISAAC (0) will be returned.

Challenge

PlayerType


getChallengeCollectibleTypes(challenge): readonly CollectibleType[]

Defined in: packages/isaacscript-common/src/functions/challenges.ts:76

Get the extra starting collectibles for a challenge. This will only work for vanilla challenges.

For modded challenges, an empty array will be returned.

Challenge

readonly CollectibleType[]


getChallengeName(challenge): string

Defined in: packages/isaacscript-common/src/functions/challenges.ts:87

Get the proper name for a Challenge enum. This will only work for vanilla challenges.

For modded challenges, “Unknown” will be returned.

Challenge

string


getChallengeTrinketType(challenge): TrinketType | undefined

Defined in: packages/isaacscript-common/src/functions/challenges.ts:101

Get the extra starting trinket for a challenge. This will only work for vanilla challenges.

If a challenge does not grant a starting trinket, undefined will be returned.

For modded challenges, undefined will be returned.

Challenge

TrinketType | undefined


onAnyChallenge(): boolean

Defined in: packages/isaacscript-common/src/functions/challenges.ts:108

Helper function to see if the player is playing any challenge.

boolean


onChallenge(…challenges): boolean

Defined in: packages/isaacscript-common/src/functions/challenges.ts:119

Helper function to check to see if the player is playing a particular challenge.

This function is variadic, meaning that you can specify as many challenges as you want to check for.

…readonly Challenge[]

boolean


setChallenge(challenge): void

Defined in: packages/isaacscript-common/src/functions/challenges.ts:131

Helper function to restart the run on a particular challenge.

If the player is already in the particular challenge, this function will do nothing.

Under the hood, this function executes the challenge 0 console command.

Challenge

void