Skip to main content

Run

Functions

anyEasterEggEnabled

anyEasterEggEnabled(exceptions?): boolean

Alias for the anySeedEffectEnabled function.

Parameters

NameType
exceptions?readonly SeedEffect[]

Returns

boolean

Defined in

packages/isaacscript-common/src/functions/run.ts:13


anySeedEffectEnabled

anySeedEffectEnabled(exceptions?): boolean

Helper function to see if any seed effects (i.e. Easter Eggs) are enabled for the current run.

Parameters

NameTypeDescription
exceptions?readonly SeedEffect[]Optional. An array of seed effects to ignore.

Returns

boolean

Defined in

packages/isaacscript-common/src/functions/run.ts:24


getSeedEffects

getSeedEffects(): readonly SeedEffect[]

Helper function to get the seed effects (i.e. Easter Eggs) that are enabled for the current run.

Returns

readonly SeedEffect[]

Defined in

packages/isaacscript-common/src/functions/run.ts:44


onSetSeed

onSetSeed(): boolean

Helper function to check whether the player is playing on a set seed (i.e. that they entered in a specific seed by pressing tab on the character selection screen). When the player resets the game on a set seed, the game will not switch to a different seed.

Under the hood, this checks if the current challenge is Challenge.NULL and the Seeds.IsCustomRun method.

Returns

boolean

Defined in

packages/isaacscript-common/src/functions/run.ts:61


onVictoryLap

onVictoryLap(): boolean

Helper function to check whether the player is on a Victory Lap (i.e. they answered "yes" to the popup that happens after defeating The Lamb).

Returns

boolean

Defined in

packages/isaacscript-common/src/functions/run.ts:73


restart

restart(character?): void

Helper function to restart the run using the console command of "restart". If the player is playing a seeded run, then it will restart the game to the beginning of the seed. Otherwise, it will put the player on a run with an entirely new seed.

You can optionally specify a PlayerType to restart the game as that character.

Parameters

NameType
character?PlayerType

Returns

void

Defined in

packages/isaacscript-common/src/functions/run.ts:85


setRunSeed

setRunSeed(startSeedOrStartSeedString): void

Helper function to restart the run on a particular starting seed.

Under the hood, this function executes the seed console command.

Parameters

NameTypeDescription
startSeedOrStartSeedStringstring | SeedEither the numerical start seed (e.g. 268365970) or the start seed string (e.g. "AAJ2 8V9C").

Returns

void

Defined in

packages/isaacscript-common/src/functions/run.ts:113


setUnseeded

setUnseeded(): void

Helper function to change the run status to that of an unseeded run with a new random seed.

This is useful to revert the behavior where playing on a set seed and restarting the game will not take you to a new seed.

Under the hood, this function calls the Seeds.Reset method and the Seeds.Restart(Challenge.NULL) method.

Returns

void

Defined in

packages/isaacscript-common/src/functions/run.ts:132