# Class "Level"

## Functions

### AddAngelRoomChance () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void AddAngelRoomChance ( float Chance ) {: .copyable aria-label='Functions' }

### AddCurse () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void AddCurse ( [LevelCurse](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/enums/LevelCurse/README.md) Curse, boolean ShowName ) {: .copyable aria-label='Functions' }

### ApplyBlueMapEffect () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void ApplyBlueMapEffect ( ) {: .copyable aria-label='Functions' }

### ApplyCompassEffect () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void ApplyCompassEffect ( boolean Persistent ) {: .copyable aria-label='Functions' }

### ApplyMapEffect () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void ApplyMapEffect ( ) {: .copyable aria-label='Functions' }

### CanOpenChallengeRoom () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### boolean CanOpenChallengeRoom ( int RoomIndex ) {: .copyable aria-label='Functions' }

### CanSpawnDevilRoom () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### boolean CanSpawnDevilRoom ( ) {: .copyable aria-label='Functions' }

### CanStageHaveCurseOfLabyrinth () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### boolean CanStageHaveCurseOfLabyrinth ( [LevelStage](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/enums/LevelStage/README.md) Stage ) {: .copyable aria-label='Functions' }

### ChangeRoom () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void ChangeRoom ( int RoomIndex ) {: .copyable aria-label='Functions' }

### DisableDevilRoom () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void DisableDevilRoom ( ) {: .copyable aria-label='Functions' }

### ForceHorsemanBoss () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### boolean ForceHorsemanBoss ( int Seed ) {: .copyable aria-label='Functions' }

return true on success

### GetAbsoluteStage () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### [LevelStage](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/enums/LevelStage/README.md) GetAbsoluteStage ( ) {: .copyable aria-label='Functions' }

Returns the absolute stage, if its greed mode its converted to equivalent one.

### GetAngelRoomChance () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### float GetAngelRoomChance ( ) {: .copyable aria-label='Functions' }

### GetCanSeeEverything () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### boolean GetCanSeeEverything ( ) {: .copyable aria-label='Functions' }

### GetCurrentRoom () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### [Room](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/RoomConfig_Room/README.md) GetCurrentRoom ( ) {: .copyable aria-label='Functions' }

### GetCurrentRoomDesc () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### [RoomDescriptor](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/RoomDescriptor/README.md) GetCurrentRoomDesc ( ) {: .copyable aria-label='Functions' }

### GetCurrentRoomIndex () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### int GetCurrentRoomIndex ( ) {: .copyable aria-label='Functions' }

???- note "Notes" This will always return the roomindex on the levelgrid, on which you entered the current room from. (see black entries in graphic below)

### GetCurseName () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### string GetCurseName ( ) {: .copyable aria-label='Functions' }

### GetCurses () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### int GetCurses ( ) {: .copyable aria-label='Functions' }

### GetDevilAngelRoomRNG () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### [RNG](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/RNG/README.md) GetDevilAngelRoomRNG ( ) {: .copyable aria-label='Functions' }

### GetDungeonPlacementSeed () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### int GetDungeonPlacementSeed ( ) {: .copyable aria-label='Functions' }

### GetEnterPosition () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### [Vector](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/Vector/README.md) GetEnterPosition ( ) {: .copyable aria-label='Functions' }

### GetHeartPicked () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### boolean GetHeartPicked ( ) {: .copyable aria-label='Functions' }

### GetLastBossRoomListIndex () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### int GetLastBossRoomListIndex ( ) {: .copyable aria-label='Functions' }

### GetLastRoomDesc () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### [RoomDescriptor](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/RoomDescriptor/README.md) GetLastRoomDesc ( ) {: .copyable aria-label='Functions' }

### GetName () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### string GetName ( [LevelStage](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/enums/LevelStage/README.md) Stage, [StageType](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/enums/StageType/README.md) Type, int Curses, int InfiniteLevel, boolean Dyslexia ) {: .copyable aria-label='Functions' }

### GetNonCompleteRoomIndex () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### int GetNonCompleteRoomIndex ( ) {: .copyable aria-label='Functions' }

### GetPreviousRoomIndex () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### int GetPreviousRoomIndex ( ) {: .copyable aria-label='Functions' }

### GetRandomRoomIndex () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### int GetRandomRoomIndex ( boolean IAmErrorRoom, int Seed ) {: .copyable aria-label='Functions' }

### GetRoomByIdx () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### [RoomDescriptor](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/RoomDescriptor/README.md) GetRoomByIdx ( int RoomIdx ) {: .copyable aria-label='Functions' }

### GetRoomCount () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### int GetRoomCount ( ) {: .copyable aria-label='Functions' }

### GetRooms () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### LuaArrayProxy GetRooms ( ) {: .copyable aria-label='Functions' }

### GetStage () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### [LevelStage](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/enums/LevelStage/README.md) GetStage ( ) {: .copyable aria-label='Functions' }

### GetStageType () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### [StageType](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/enums/StageType/README.md) GetStageType ( ) {: .copyable aria-label='Functions' }

### GetStartingRoomIndex () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### int GetStartingRoomIndex ( ) {: .copyable aria-label='Functions' }

### GetStateFlag () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### boolean GetStateFlag ( StateFlag StateFlag ) {: .copyable aria-label='Functions' }

### HasBossChallenge () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### boolean HasBossChallenge ( ) {: .copyable aria-label='Functions' }

### InitializeDevilAngelRoom () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void InitializeDevilAngelRoom ( boolean ForceAngel, boolean ForceDevil ) {: .copyable aria-label='Functions' }

### IsAltStage () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### boolean IsAltStage ( ) {: .copyable aria-label='Functions' }

### IsDevilRoomDisabled () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### boolean IsDevilRoomDisabled ( ) {: .copyable aria-label='Functions' }

### IsNextStageAvailable () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### boolean IsNextStageAvailable ( ) {: .copyable aria-label='Functions' }

### QueryRoomTypeIndex () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### int QueryRoomTypeIndex ( [RoomType](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/enums/RoomType/README.md) RoomType, boolean Visited, [RNG](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/RNG/README.md) rng ) {: .copyable aria-label='Functions' }

### RemoveCompassEffect () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void RemoveCompassEffect ( ) {: .copyable aria-label='Functions' }

### RemoveCurse () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void RemoveCurse ( [LevelCurse](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/enums/LevelCurse/README.md) Curse ) {: .copyable aria-label='Functions' }

### RemoveCurses () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void RemoveCurses ( ) {: .copyable aria-label='Functions' }

### SetCanSeeEverything () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void SetCanSeeEverything ( boolean Value ) {: .copyable aria-label='Functions' }

### SetHeartPicked () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void SetHeartPicked ( ) {: .copyable aria-label='Functions' }

### SetNextStage () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void SetNextStage ( ) {: .copyable aria-label='Functions' }

This function teleports you directly to the next stage without playing the leveltransition or updating the floors backdrop. Use other functions to fix those issues.

### SetRedHeartDamage () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void SetRedHeartDamage ( ) {: .copyable aria-label='Functions' }

### SetStage () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void SetStage ( [LevelStage](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/enums/LevelStage/README.md) Stage, [StageType](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/enums/StageType/README.md) [StageType](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/enums/StageType/README.md) {: .copyable aria-label='Functions' }

for SetStage/SetNextStage to have effect, call Init afterward

### SetStateFlag () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void SetStateFlag ( StateFlag StateFlag, boolean Val ) {: .copyable aria-label='Functions' }

### ShowMap () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void ShowMap ( ) {: .copyable aria-label='Functions' }

Show's all map (world/sun card effect) except the top secret room.

### ShowName () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void ShowName ( boolean Sticky ) {: .copyable aria-label='Functions' }

### UncoverHiddenDoor () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void UncoverHiddenDoor ( int CurrentRoomIdx, [DoorSlot](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/enums/DoorSlot/README.md) Slot ) {: .copyable aria-label='Functions' }

Uncovers the door on both sides by modifying the saved grid entities for neighboring room.

### Update () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void Update ( ) {: .copyable aria-label='Functions' }

### UpdateVisibility () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### void UpdateVisibility ( ) {: .copyable aria-label='Functions' }

???- note "Notes" Whenever you update the visibility of a room on the minimap, it won't update the map automatically, since it is cached. You have to explicitly call UpdateVisibility() afterwards to apply any changes.

???- example "Example Code" This code

```lua
    -- Local variables
    local game = Game()
    local level = game:GetLevel()

    -- Give the player the Compass effect, which will display all of the floor's special rooms on the mini-map
    level:ApplyCompassEffect()

    -- Remove the icon for the Treasure Room specifically
    local treasureIndex = level:QueryRoomTypeIndex(RoomType.ROOM_TREASURE, false, RNG())
    local treasureRoom = level:GetRoomByIdx(treasureIndex)
    treasureRoom.DisplayFlags = 0

    -- Since the mini-map is cached, changing display flags won't update it unless we explicitly call this function
    level:UpdateVisibility()
```

### DungeonReturnPosition () {: aria-label='Functions' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### [Vector](https://github.com/wofsauge/IsaacDocs/tree/420a6aaa54ea230461fb26e61297c068492684de/beta/Vector/README.md) DungeonReturnPosition  {: .copyable aria-label='Functions' }

## Variables

### DungeonReturnRoomIndex {: aria-label='Variables' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### int DungeonReturnRoomIndex  {: .copyable aria-label='Variables' }

### EnterDoor {: aria-label='Variables' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### int EnterDoor  {: .copyable aria-label='Variables' }

```
This value defines on which doorslot you entered the room.
```

???+ bug "Bugs" Changing this value has no impact on anything. the EnterDoor value is always determined by the LeaveDoor Value and the game itself.

### GreedModeWave {: aria-label='Variables' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### int GreedModeWave  {: .copyable aria-label='Variables' }

### LeaveDoor {: aria-label='Variables' }

[ ](/ab_p/beta/docs/level.md){: .abp .tooltip .badge }

#### int LeaveDoor  {: .copyable aria-label='Variables' }

```
This value defines on which doorslot you are positioned after the transition. You will always end up at the oposite side of the door specified. Example: LeaveDoor=1 (Up0) will position you at Doorslot Down0 (Logic: Doorslot+2)
```

???- note "Notes" if level.LeaveDoor is set to anything other than -1, the function will transition based on the room you are currently in.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.moddingofisaac.com/ab_p/beta/docs/level.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
