Escaping the dungeon
In NetHack, a hero can escape the dungeon with their life by a handful of means: this naturally does not include quitting, dying, or ascending.
Description
There are three ways to escape the dungeon and end the game in normal gameplay:
- Climb the staircase on dungeon level 1 without the Amulet of Yendor in the hero's possession, and answer "yes" when prompted.
- Level teleport to any level from −1 to −9 while flying or levitating, or else level teleport to any negative "level" while wearing an amulet of life saving.
- Reach the Astral Plane and sacrifice the Amulet of Yendor on the high altar of a god other than the hero's current god—the god who receives the offering will allow the hero to "escape in celestial disgrace".
Explore mode and wizard mode offer additional means of leaving the dungeon in a similar manner:
- In wizard mode, wishing for a magic portal and then entering it will cause the hero to escape the dungeon, as the magic portal will not be generated pointing at a destination level.
- In explore mode or wizard mode, offering the Amulet of Yendor on the high altar to Moloch in his Sanctum will cause him to retain dominion over the hero's god and snuff out the hero's life. If the hero survives this, he will reduce them to a pile of dust—answering "no" when prompted to die after this will cause the hero to be ejected from the dungeon in "a cloud of black smoke".
In all cases, the hero will leave having either failed their quest for the Amulet, or else being unable to continue.
The following information pertains to an upcoming version (NetHack 3.7.0). If this version is now released, please verify that the information below is still accurate, then update the page to incorporate it.
Per commit 2a10b300, a game that reaches a turn counter of one billion ends immediately in an escape:
- The dungeon capitulates.
Monsters escaping
A monster can escape the dungeon from the first dungeon level by fleeing via the up staircase just as the hero can:[1] if they are currently scared, standing on the up staircase and not carrying the Amulet of Yendor, any of the invocation items or a quest artifact, the monster will escape the dungeon and be effectively removed from the game.[2][3] If the Wizard of Yendor is made to escape the dungeon this way, he will no longer reappear for the rest of the game, including on the Plane of Earth—the Wizard's harassment will still occur, minus the effect that causes him to appear next to the hero. If the Wizard has cloned himself via Double Trouble and one of the clones is made to escape the dungeon, he can no longer make use of the spell.
The following information pertains to an upcoming version (3.7.0). If this version is now released, please verify that the information below is still accurate, then update the page to incorporate it.
Per commit 12498ffa, tracking is fixed to handle both cases above, and the Wizard of Yendor will no longer escape the dungeon at all unless he is one of two Wizards currently present in the game. This fix is reapplied via commit 24e06171 in order to counteract an inadvertent regression from another commit.
Per commit 2caa26a2, monsters escaping the dungeon are handled by a separate function.Strategy
Escaping the dungeon is one of the more common endings for a normal game that has become unwinnable in some manner, e.g. the hero has permanently converted their alignment before gaining Quest access.
In terms of making monsters escape, forcing the Wizard to leave the dungeon will prevent him from reappearing directly for the rest of the ascension run, making it somewhat easier to traverse the Elemental Planes.