Binding of Isaac - Afterbirth+ Lua Reference/Guide
|
Public Member Functions | |
Update () | |
SetStage (LevelStage Stage, StageType StageType) | |
for SetStage/SetNextStage to have effect, call Init afterward More... | |
SetNextStage () | |
string | GetName (LevelStage Stage, StageType Type, integer Curses, int InfiniteLevel, boolean Dyslexia) |
Deletes everything without creating a new room (Added for WiiU Shutdown) More... | |
boolean | CanStageHaveCurseOfLabyrinth (LevelStage Stage) |
string | GetCurseName () |
ShowName (boolean Sticky) | |
boolean | GetStateFlag (Level::StateFlag StateFlag) |
Store private data in the SaveData so it can be written to file. More... | |
SetStateFlag (Level::StateFlag StateFlag, boolean Val) | |
Room & | GetCurrentRoom () |
integer | GetPreviousRoomIndex () |
integer | GetCurrentRoomIndex () |
integer | GetRoomCount () |
integer | GetRandomRoomIndex (boolean IAmErrorRoom, integer Seed) |
integer | GetNonCompleteRoomIndex () |
const RoomDescriptor & | GetRoomByIdx (integer RoomIdx) |
const RoomDescriptor & | GetCurrentRoomDesc () |
const RoomDescriptor & | GetLastRoomDesc () |
LuaArrayProxy< RoomDescriptor, true > | GetRooms () |
integer | GetStartingRoomIndex () |
integer | QueryRoomTypeIndex (RoomType RoomType, boolean Visited, RNG rng) |
integer | GetLastBossRoomListIndex () |
boolean | CanOpenChallengeRoom (integer RoomIndex) |
Vector | GetEnterPosition () |
ChangeRoom (integer RoomIndex) | |
boolean | ForceHorsemanBoss (integer Seed) |
return true on success More... | |
LevelStage | GetStage () |
integer | GetCurses () |
boolean | IsAltStage () |
StageType | GetStageType () |
boolean | HasBossChallenge () |
boolean | IsDevilRoomDisabled () |
DisableDevilRoom () | |
UpdateVisibility () | |
ApplyMapEffect () | |
ApplyBlueMapEffect () | |
ApplyCompassEffect (boolean Persistent) | |
RemoveCompassEffect () | |
ShowMap () | |
Show's all map (world/sun card effect) except the top secret room. More... | |
SetHeartPicked () | |
boolean | GetHeartPicked () |
boolean | GetCanSeeEverything () |
SetCanSeeEverything (boolean Value) | |
AddCurse (LevelCurse Curse, boolean ShowName) | |
RemoveCurses () | |
RemoveCurse (LevelCurse Curse) | |
integer | GetDungeonPlacementSeed () |
RNG & | GetDevilAngelRoomRNG () |
boolean | CanSpawnDevilRoom () |
InitializeDevilAngelRoom (boolean ForceAngel, boolean ForceDevil) | |
UncoverHiddenDoor (integer CurrentRoomIdx, DoorSlot Slot) | |
Uncovers the door on both sides by modifying the saved grid entities for neighboring room. More... | |
SetRedHeartDamage () | |
boolean | IsNextStageAvailable () |
LevelStage | GetAbsoluteStage () |
Returns the absolute stage, if its greed mode its converted to equivalent one. More... | |
AddAngelRoomChance (float Chance) | |
float | GetAngelRoomChance () |
Public Attributes | |
integer | EnterDoor |
integer | LeaveDoor |
Vector | DungeonReturnPosition |
integer | DungeonReturnRoomIndex |
integer | GreedModeWave |
Level::AddAngelRoomChance | ( | float | Chance | ) |
Level::AddCurse | ( | LevelCurse | Curse, |
boolean | ShowName | ||
) |
Level::ApplyBlueMapEffect | ( | ) |
Level::ApplyCompassEffect | ( | boolean | Persistent | ) |
Level::ApplyMapEffect | ( | ) |
boolean Level::CanOpenChallengeRoom | ( | integer | RoomIndex | ) |
boolean Level::CanSpawnDevilRoom | ( | ) |
boolean Level::CanStageHaveCurseOfLabyrinth | ( | LevelStage | Stage | ) |
Level::ChangeRoom | ( | integer | RoomIndex | ) |
Level::DisableDevilRoom | ( | ) |
boolean Level::ForceHorsemanBoss | ( | integer | Seed | ) |
return true on success
LevelStage Level::GetAbsoluteStage | ( | ) |
Returns the absolute stage, if its greed mode its converted to equivalent one.
float Level::GetAngelRoomChance | ( | ) |
boolean Level::GetCanSeeEverything | ( | ) |
Room& Level::GetCurrentRoom | ( | ) |
const RoomDescriptor& Level::GetCurrentRoomDesc | ( | ) |
integer Level::GetCurrentRoomIndex | ( | ) |
This will always return the roomindex on the levelgrid, on which you entered the current room from. (see black entries in graphic below)
string Level::GetCurseName | ( | ) |
integer Level::GetCurses | ( | ) |
RNG& Level::GetDevilAngelRoomRNG | ( | ) |
integer Level::GetDungeonPlacementSeed | ( | ) |
Vector Level::GetEnterPosition | ( | ) |
boolean Level::GetHeartPicked | ( | ) |
integer Level::GetLastBossRoomListIndex | ( | ) |
const RoomDescriptor& Level::GetLastRoomDesc | ( | ) |
string Level::GetName | ( | LevelStage | Stage, |
StageType | Type, | ||
integer | Curses, | ||
int | InfiniteLevel, | ||
boolean | Dyslexia | ||
) |
integer Level::GetNonCompleteRoomIndex | ( | ) |
integer Level::GetPreviousRoomIndex | ( | ) |
integer Level::GetRandomRoomIndex | ( | boolean | IAmErrorRoom, |
integer | Seed | ||
) |
const RoomDescriptor& Level::GetRoomByIdx | ( | integer | RoomIdx | ) |
integer Level::GetRoomCount | ( | ) |
LuaArrayProxy<RoomDescriptor, true> Level::GetRooms | ( | ) |
LevelStage Level::GetStage | ( | ) |
StageType Level::GetStageType | ( | ) |
integer Level::GetStartingRoomIndex | ( | ) |
boolean Level::GetStateFlag | ( | Level::StateFlag | StateFlag | ) |
boolean Level::HasBossChallenge | ( | ) |
Level::InitializeDevilAngelRoom | ( | boolean | ForceAngel, |
boolean | ForceDevil | ||
) |
boolean Level::IsAltStage | ( | ) |
boolean Level::IsDevilRoomDisabled | ( | ) |
boolean Level::IsNextStageAvailable | ( | ) |
Level::RemoveCompassEffect | ( | ) |
Level::RemoveCurse | ( | LevelCurse | Curse | ) |
Level::RemoveCurses | ( | ) |
Level::SetCanSeeEverything | ( | boolean | Value | ) |
Level::SetHeartPicked | ( | ) |
Level::SetNextStage | ( | ) |
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.
Level::SetRedHeartDamage | ( | ) |
Level::SetStage | ( | LevelStage | Stage, |
StageType | StageType | ||
) |
for SetStage/SetNextStage to have effect, call Init afterward
Level::SetStateFlag | ( | Level::StateFlag | StateFlag, |
boolean | Val | ||
) |
Level::ShowMap | ( | ) |
Show's all map (world/sun card effect) except the top secret room.
Level::ShowName | ( | boolean | Sticky | ) |
Level::UncoverHiddenDoor | ( | integer | CurrentRoomIdx, |
DoorSlot | Slot | ||
) |
Uncovers the door on both sides by modifying the saved grid entities for neighboring room.
Level::Update | ( | ) |
Level::UpdateVisibility | ( | ) |
UpdateVisibility()
afterwards to apply any changes.
-- 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()
Vector Level::DungeonReturnPosition |
integer Level::DungeonReturnRoomIndex |
integer Level::EnterDoor |
integer Level::GreedModeWave |
integer Level::LeaveDoor |