Talk:Magic portal

From NetHackWiki
Jump to navigation Jump to search

Quest portal

Can the quest portal be in the same room as stairs? Shop? temple? 71.206.188.10 01:09, 20 January 2012 (UTC)

I've never seen it in a special room (shop, temple, ...) or in a vault, but I have had a case where the quest portal room was not connected to the rest of the level. Maybe a source diver can answer the stairs question. --Tjr 03:43, 20 January 2012 (UTC)
find_branch_room in mklev.c seems to do the task of finding a room to place the branch stairs/portal in, and the code seems to return a random room if there are only 2 rooms. If there are more rooms, it'll try 100 times to find a room which doesn't have the downstairs or upstairs and which is "ordinary" (type OROOM, so no shop, temple, vault, anthole, swamp etc.). Failing that (which is unlikely, but possible), it just returns a random room. --Bcode 13:46, 20 January 2012 (UTC)
Two rooms are exceedingly unlikely, see User:Tjr/object_generation_spoiler#In_a_normal_rooms-and-corridor_level_at_level_creation_time. --Tjr 13:58, 20 January 2012 (UTC)
Aside from the Rogue level as mentioned in the article, I encounter my quest portal in the Big Room quite frequently. I've been wondering whether this can count as bias for a while. --FJH 23:04, 20 January 2012 (UTC)