Stage History
Classes
Section titled “Classes”StageHistory
Section titled “StageHistory”Defined in: packages/isaacscript-common/src/classes/features/other/StageHistory.ts:23
Extends
Section titled “Extends”Feature
Methods
Section titled “Methods”getNextStageTypeWithHistory()
Section titled “getNextStageTypeWithHistory()”getNextStageTypeWithHistory(
upwards?):StageType
Defined in: packages/isaacscript-common/src/classes/features/other/StageHistory.ts:63
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.
This function accounts for the previous floors that a player has visited thus far on the run so
that the next stage type can be properly calculated on The Ascent (which makes it unlike the
getNextStageType function).
In order to use this function, you must upgrade your mod with ISCFeature.STAGE_HISTORY.
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
getNextStageWithHistory()
Section titled “getNextStageWithHistory()”getNextStageWithHistory():
LevelStage
Defined in: packages/isaacscript-common/src/classes/features/other/StageHistory.ts:171
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.
This function accounts for the previous floors that a player has visited thus far on the run so
that the next stage can be properly calculated on The Ascent (which makes it unlike the
getNextStage function).
In order to use this function, you must upgrade your mod with ISCFeature.STAGE_HISTORY.
Returns
Section titled “Returns”LevelStage
getStageHistory()
Section titled “getStageHistory()”getStageHistory(): readonly
StageHistoryEntry[]
Defined in: packages/isaacscript-common/src/classes/features/other/StageHistory.ts:305
Helper function to get all of the stages that a player has visited thus far on this run.
In order to use this function, you must upgrade your mod with ISCFeature.STAGE_HISTORY.
Returns
Section titled “Returns”readonly StageHistoryEntry[]
hasVisitedStage()
Section titled “hasVisitedStage()”hasVisitedStage(
stage,stageType?):boolean
Defined in: packages/isaacscript-common/src/classes/features/other/StageHistory.ts:320
Helper function to check if a player has previous visited a particular stage (or stage + stage type combination) on this run.
In order to use this function, you must upgrade your mod with ISCFeature.STAGE_HISTORY.
Parameters
Section titled “Parameters”LevelStage
The stage to check for.
stageType?
Section titled “stageType?”StageType
Optional. If provided, will check for a specific stage and stage type combination.
Returns
Section titled “Returns”boolean
