Next Stage
Functions
Section titled “Functions”getNextStage()
Section titled “getNextStage()”getNextStage():
LevelStage
Defined in: packages/isaacscript-common/src/functions/nextStage.ts:25
Helper function to get the stage that a trapdoor or heaven door would take the player to, based on the current stage, room, and game state flags.
If you want to account for the player having visited Repentance floors in The Ascent, use the
getNextStageUsingHistory helper function instead (from the stage history feature). Handling
this requires stateful tracking as the player progresses through the run.
Returns
Section titled “Returns”LevelStage
getNextStageType()
Section titled “getNextStageType()”getNextStageType(
upwards?):StageType
Defined in: packages/isaacscript-common/src/functions/nextStage.ts:138
Helper function to get the stage type that a trapdoor or heaven door would take the player to, based on the current stage, room, and game state flags.
If you want to account for previous floors visited on The Ascent, use the
getNextStageTypeUsingHistory helper function instead (from the stage history feature). Handling
this requires stateful tracking as the player progresses through the run.
Parameters
Section titled “Parameters”upwards?
Section titled “upwards?”boolean = false
Whether the player should go up to Cathedral in the case of being on Womb 2. Default is false.
Returns
Section titled “Returns”StageType
