Source:NetHack 5.0.0/dat/bigrm-10.lua

From NetHackWiki
Jump to navigation Jump to search

Below is the full text to bigrm-10.lua from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/dat/bigrm-10.lua#line12]], for example.

The NetHack General Public License applies to screenshots, source code and other content from NetHack.

This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.

1. -- NetHack bigroom bigrm-10.lua	$NHDT-Date: 1652196024 2022/05/10 15:20:24 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
2. --	Copyright (c) 1989 by Jean-Christophe Collet
3. --	Copyright (c) 1990 by M. Stephenson
4. -- NetHack may be freely redistributed.  See license for details.
5. --
6. des.level_init({ style = "solidfill", fg = " " });
7. des.level_flags("mazelevel", "noflip");
8. 
9. des.map([[
10. .......................................................................
11. .......................................................................
12. .......................................................................
13. .......................................................................
14. ...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C...
15. ...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC...
16. ...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C...
17. ...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC...
18. ...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C...
19. ...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC...
20. ...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C...
21. ...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC...
22. ...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C...
23. ...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC...
24. ...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C...
25. .......................................................................
26. .......................................................................
27. .......................................................................
28. .......................................................................
29. ]]);
30. 
31. if percent(40) then
32.    -- occasionally it's not a fog maze
33.    local terrain = { "L", "}", "T", "-", "F" };
34.    local tidx = math.random(1, #terrain);
35.    -- break it up a bit
36.    des.replace_terrain({ region={0, 0, 70, 18}, fromterrain="C", toterrain=".", chance=5 });
37.    des.replace_terrain({ region={0, 0, 70, 18}, fromterrain="C", toterrain=terrain[tidx] });
38. end;
39. 
40. des.region(selection.area(00,00,70,18), "lit");
41. 
42. -- when falling down on this level, never end up in the fog maze
43. des.teleport_region({ region = {00,00,70,18}, exclude = {02,03,68,15}, dir = "down" });
44. 
45. for i = 1,15 do
46.    des.object();
47. end
48. 
49. for i = 1,6 do
50.    des.trap();
51. end
52. 
53. for i = 1,28 do
54.   des.monster();
55. end
56. 
57. des.mazewalk({ x=4, y=2, dir="south", stocked=0 });
58. 
59. -- Stairs up, not in the fog maze
60. des.levregion({ region = {00,00,70,18}, exclude = {02,03,68,15}, type="stair-up"});
61. des.stair("down");