**Dungeons** are procedurally generated structures located in dedicated dimensions, seperate from the normal world.
Most of the gameplay loop takes place inside dungeons, where players fight [enemies](https://github.com/maucon/MCEndgame-fabric/wiki/Enemies) and collect loot.
---
## Entering Dungeons
Entering a dungeon requires a [dungeon device](https://github.com/maucon/MCEndgame-fabric/wiki/Dungeon-Device).
After placing the device, interact with it and press the "Open" button to generate a new dungeon. This creates six portals leading to that dungeon.
Interact with a portal to enter.
- each portal can only be used once
- a portal closes immediately after use
---
## Leaving Dungeons
Dungeons can be exited in the following ways:
- via the portal at its entrance
- via portals that appear in boss rooms after defeating the [boss](https://github.com/maucon/MCEndgame-fabric/wiki/Bosses)
### Death & Rejoining
Dying inside a dungeon respawn the player at the dungeon device.
Leaving the game while inside a dungeon will also return the player to the dungeon device upon rejoining.
---
## Dungeon Level
A players dungeon level determines dungeon difficulty and rewards.
The dungeon level scales:
- equipment
- equipment attributes
- status effects
- additional modifiers
The current dungeon level is displayed inside the dungeon device and in chat when it changes.
### Progression
Killing at least one boss inside a dungeon grants one progress to all players whose level is lower or equal to the dungeon level.
Killing multiple bosses does not grant additional progress.
Upon reaching three progress a players level increases and the progress is set to zero.
Dying inside a dungeon will remove a level and set the progress to zero.
### Aspects
Some aspects can cause a dungeon to be higher level or grant increased progress on completion.
### Commands
Operators can use the /dungeonlevel command to set a players dungeon level.
---
## Enemies
Dungeons contain a number of enemies wearing equipment scaled by the dungeon level.
By default, each dungeon contains three bosses, distributed evenly across the dungeon.
---
## Aspects
**Aspects** modify dungeons and are placed into the dungeon device.
They are a guaranteed drop from elite enemies in dungeons.
Up to four aspects can be used at a time.
When opening a dungeon one item from each stack will be removed.
Aspects that are not applicable due to being blocked by another aspect or exceeding its limit will not be consumed.
Some of the effects aspects can have are:
- increase the number of enemies
- grant more loot in exchange for stronger enemies
- force special encounters
---
## Dungeon Type
Dungeon types determine the dungeons structure (nether or stronghold) and define the monster variety.
Each player has a current dungeon type that is used for dungeons opened by it.
This dungeon type gets rerolled upon completing a dungeon.
## Dungeon Layout
Dungeons are generated by chaining together modular, pre-built rooms.
The layout is mostly linear but has at least two junctions, where a wither skull indicates a short dead end containing a mini boss.
The last boss is in an arena at the end of the dungeon.