Skip to main content

Next Stage

Functions

getNextStage

getNextStage(): LevelStage

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

LevelStage

Defined in

packages/isaacscript-common/src/functions/nextStage.ts:25


getNextStageType

getNextStageType(upwards?): StageType

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

NameTypeDefault valueDescription
upwardsbooleanfalseWhether the player should go up to Cathedral in the case of being on Womb 2. Default is false.

Returns

StageType

Defined in

packages/isaacscript-common/src/functions/nextStage.ts:134