Visitar URL original
teleportation hub room can yield a map that traps the hero by making stairs inaccessible · Issue #1640 · NetHack/NetHack · GitHub
Skip to content

teleportation hub room can yield a map that traps the hero by making stairs inaccessible #1640

Description

@davidbau

I think the teleportation hub themed room can make the stairs on their level inaccessible. Screenshot:

Image

In this map, all three teleportation traps teleport to the left two rooms in the level and there are no paths out. I encountered this at Dlvl 3 with no way to dig or disable or jump over or circumvent these traps. Maybe I'm missing some possible gameplay trick to get out, but it feels like a boring game just being stuck in three rooms, and it doesn't seem very NetHack-like.

Do (or should) teleportation hubs have some logic to avoid creating inaccessibility traps like this? Maybe teleportation hubs should avoid blocking the doorways?

Activity

  1. ars3niy commented on Jul 27, 2026

    @ars3niy

    The only way out I can think of is try to camp until you kill enough stuff to reach level 5 (starting with your pony, may give you level 3 right away) and then wait for a rock mole. (or a dwarf with a pick-axe). You are likely to fail a food prayer before that happens, though.

  2. arianmarie907-pixel commented on Jul 31, 2026

    @arianmarie907-pixel

    Duplicate of #805

  3. davidbau commented on Jul 31, 2026

    @davidbau
    Author

    Duplicate of #805

    805 seems totally unrelated?

  4. Tomsod commented on Aug 3, 2026

    @Tomsod

    Normally there's a 20% chance to "escape" a trap when you step on it, but 89ea47f specifically makes traps in hubs unavoidable. If not for that, davidbau's situation would be merely annoying rather than game-ruining, so reverting that change could also be a solution.

  5. copperwater commented on Aug 8, 2026

    @copperwater
    Contributor

    When random traps normally generate in rooms, they avoid spaces next to doors for reasons just like this. Traps randomly placed in themed rooms currently unfortunately avoid this logic, since with ordinary rooms the traps are placed after we know where the doors are, but in themed rooms the traps are placed before rooms are connected and any doors exist.

    A narrow solution is possible for this specific issue, since the teleportation hub actually does create its traps after the rooms have been connected. That would entail passing the room selection as data to make_a_trap, and removing any spots adjacent doors from it, before picking where to place the teleportation trap.

    But it is probably better to find a general solution for avoiding traps in themed rooms next to doors.

  6. Tomsod commented on Aug 8, 2026

    @Tomsod

    When random traps normally generate in rooms, they avoid spaces next to doors for reasons just like this.

    Are you sure? I don't see a bydoor() check in mktrap(). Even if teleport hubs will obey this restriction, evidently it could still be possible (although unlikely) for those three traps to cordon off the door anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions