Docs » API reference » Dungeon

Dungeon

A dungeon: its tier, its levels, its guardian and its reset.

A handle to something in the game. Once that thing is gone, its calls fail with Gone. You get one from world.dungeon_at(...), world.dungeons_near(...), player.dungeon.

Methods

MethodDescription
fn name(&self) -> Result<String>String name()Its name, as its banner shows (CATACOMBS, OVERGROWN HALLS, SANDSTONE TOMB, FROZEN CRYPT, BASALT FORGE).
fn entrance(&self) -> Result<Place>Place entrance()Where its stairs begin: the middle of its plaza, over the stairwell.
fn tier(&self) -> Result<DungeonTier>DungeonTier tier()Its tier.
fn lowest_level(&self) -> Result<i64>long lowestLevel()Its creatures' lowest level.
fn highest_level(&self) -> Result<i64>long highestLevel()Its creatures' highest level (its guardian's).
fn corrupted(&self) -> Result<bool>boolean corrupted()Whether it is corrupted this time (stronger, better loot).
fn beaten(&self) -> Result<bool>boolean beaten()Whether its guardian is beaten and it waits to reset (saved with the world).
fn resets(&self) -> Result<i64>long resets()How many times it has reset.
fn reset(&self) -> Result<bool>boolean reset() world_editResets a beaten dungeon now, if no player stands over it: one more reset, its corruption rolled again, its guardian waiting again; false if its guardian is not beaten or someone is there. It changes the dungeon's saved record only: the reset that comes on its own (the first dawn a full day after its guardian fell, with no player inside) also refills its chests and puts its boss room back.

DungeonTier

A dungeon's tier.

One of a fixed set of values.

ValueMeaning
DungeonTier::CopperDungeonTier.COPPERCopper (levels 10 to 15).
DungeonTier::IronDungeonTier.IRONIron (18 to 24).
DungeonTier::CobaltDungeonTier.COBALTCobalt (28 to 35).
DungeonTier::VoxeliumDungeonTier.VOXELIUMVoxelium (40 to 48).

Events

Related events: PlayerEnteredDungeon, DungeonBeaten, DungeonReset.