Run
Functions
Section titled “Functions”anyEasterEggEnabled()
Section titled “anyEasterEggEnabled()”anyEasterEggEnabled(
exceptions?):boolean
Defined in: packages/isaacscript-common/src/functions/run.ts:13
Alias for the anySeedEffectEnabled function.
Parameters
Section titled “Parameters”exceptions?
Section titled “exceptions?”readonly SeedEffect[]
Returns
Section titled “Returns”boolean
anySeedEffectEnabled()
Section titled “anySeedEffectEnabled()”anySeedEffectEnabled(
exceptions?):boolean
Defined in: packages/isaacscript-common/src/functions/run.ts:24
Helper function to see if any seed effects (i.e. Easter Eggs) are enabled for the current run.
Parameters
Section titled “Parameters”exceptions?
Section titled “exceptions?”readonly SeedEffect[]
Optional. An array of seed effects to ignore.
Returns
Section titled “Returns”boolean
getSeedEffects()
Section titled “getSeedEffects()”getSeedEffects(): readonly
SeedEffect[]
Defined in: packages/isaacscript-common/src/functions/run.ts:44
Helper function to get the seed effects (i.e. Easter Eggs) that are enabled for the current run.
Returns
Section titled “Returns”readonly SeedEffect[]
onSetSeed()
Section titled “onSetSeed()”onSetSeed():
boolean
Defined in: packages/isaacscript-common/src/functions/run.ts:61
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
Section titled “Returns”boolean
onVictoryLap()
Section titled “onVictoryLap()”onVictoryLap():
boolean
Defined in: packages/isaacscript-common/src/functions/run.ts:73
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
Section titled “Returns”boolean
restart()
Section titled “restart()”restart(
character?):void
Defined in: packages/isaacscript-common/src/functions/run.ts:85
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
Section titled “Parameters”character?
Section titled “character?”PlayerType
Returns
Section titled “Returns”void
setRunSeed()
Section titled “setRunSeed()”setRunSeed(
startSeedOrStartSeedString):void
Defined in: packages/isaacscript-common/src/functions/run.ts:113
Helper function to restart the run on a particular starting seed.
Under the hood, this function executes the seed console command.
Parameters
Section titled “Parameters”startSeedOrStartSeedString
Section titled “startSeedOrStartSeedString”string | Seed
Either the numerical start seed (e.g. 268365970) or the start seed string (e.g. “AAJ2 8V9C”).
Returns
Section titled “Returns”void
setUnseeded()
Section titled “setUnseeded()”setUnseeded():
void
Defined in: packages/isaacscript-common/src/functions/run.ts:132
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
Section titled “Returns”void
