Source:NetHack 5.0.0/dat/medusa-2.lua

From NetHackWiki
Jump to navigation Jump to search

Below is the full text to medusa-2.lua from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/dat/medusa-2.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 medusa medusa-2.lua	$NHDT-Date: 1652196027 2022/05/10 15:20:27 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $
2. --	Copyright (c) 1989 by Jean-Christophe Collet
3. --	Copyright (c) 1990, 1991 by M. Stephenson
4. -- NetHack may be freely redistributed.  See license for details.
5. --
6. des.level_init({ style = "solidfill", fg = " " });
7. 
8. des.level_flags("mazelevel", "noteleport")
9. 
10. des.map([[
11. }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
12. }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
13. }------}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}-------}}}}}}}}--------------}
14. }|....|}}}}}}}}}..}.}}..}}}}}}}}}}}}}..}}}}}}-.....--}}}}}}}|............|}
15. }|....|.}}}}}}}}}}}.}...}}..}}}}}}}}}}}}}}}}}---......}}}}}.|............|}
16. }S....|.}}}}}}---}}}}}}}}}}}}}}}}}}}}}}}}}}---...|..-}}}}}}.S..----------|}
17. }|....|.}}}}}}-...}}}}}}}}}.}}...}.}}}}.}}}......----}}}}}}.|............|}
18. }|....|.}}}}}}-....--}}}}}}}}}}}}}}}}}}}}}}----...--}}}}}}}.|..--------+-|}
19. }|....|.}}}}}}}......}}}}...}}}}}}.}}}}}}}}}}}---..---}}}}}.|..|..S...|..|}
20. }|....|.}}}}}}-....-}}}}}}}------}}}}}}}}}}}}}}-...|.-}}}}}.|..|..|...|..|}
21. }|....|.}}}}}}}}}---}}}}}}}........}}}}}}}}}}---.|....}}}}}.|..|..|...|..|}
22. }|....|.}}}}}}}}}}}}}}}}}}-....|...-}}}}}}}}--...----.}}}}}.|..|..|...|..|}
23. }|....|.}}}}}}..}}}}}}}}}}---..--------}}}}}-..---}}}}}}}}}.|..|..-------|}
24. }|...}|...}}}.}}}}}}...}}}}}--..........}}}}..--}}}}}}}}}}}.|..|.........|}
25. }|...}S...}}.}}}}}}}}}}}}}}}-..--------}}}}}}}}}}}}}}...}}}.|..--------..S}
26. }|...}|...}}}}}}}..}}}}}}----..|....-}}}}}}}}}}}}}}}}}..}}}.|............|}
27. }|....|}}}}}....}}}}..}}.-.......----}}......}}}}}}.......}}|............|}
28. }------}}}}}}}}}}}}}}}}}}---------}}}}}}}}}}}}}}}}}}}}}}}}}}--------------}
29. }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
30. }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
31. ]]);
32. -- Dungeon Description
33. des.region(selection.area(00,00,74,19),"lit")
34. des.region(selection.area(02,03,05,16),"unlit")
35. -- fixup_special hack: the first room defined on a Medusa level gets some
36. -- leaderboard statues; setting the region as irregular makes it a room
37. des.region({ region={61,03, 72,16}, lit=0, type="ordinary",irregular = 1 })
38. des.region(selection.area(71,08,72,11),"unlit")
39. -- make the downstairs area a real room to control arriving monsters
40. des.region({ region={67,08,69,11}, lit=1, type="ordinary", arrival_room=true })
41. -- Teleport: down to up stairs island, up to Medusa's island
42. des.teleport_region({ region = {02,03,05,16}, dir="down" })
43. des.teleport_region({ region = {61,03,72,16}, dir="up" })
44. -- Stairs
45. des.stair("up", 04,09)
46. des.stair("down", 68,10)
47. -- Doors
48. des.door("locked", 71,07)
49. -- Branch, not allowed on Medusa's island.
50. des.levregion({ type="branch", region = {01,00,79,20}, exclude = {59,01,73,17} })
51. -- Non diggable walls
52. des.non_diggable(selection.area(01,02,06,17))
53. des.non_diggable(selection.area(60,02,73,17))
54. -- Objects
55. des.object({ id = "statue", x=68,y=10,buc="uncursed",
56.                       montype="knight", historic=1, male=1,name="Perseus",
57.                       contents = function()
58.                          if percent(25) then
59.                             des.object({ id = "shield of reflection", buc="cursed", spe=0 })
60.                          end
61.                          if percent(75) then
62.                             des.object({ id = "levitation boots", spe=0 })
63.                          end
64.                          if percent(50) then
65.                             des.object({ id = "scimitar", buc="blessed", spe=2 })
66.                          end
67.                          if percent(50) then
68.                             des.object("sack")
69.                          end
70.                       end
71. });
72. des.object({ id = "statue", x=64, y=08, contents=0 })
73. des.object({ id = "statue", x=65, y=08, contents=0 })
74. des.object({ id = "statue", x=64, y=09, contents=0 })
75. des.object({ id = "statue", x=65, y=09, contents=0 })
76. des.object({ id = "statue", x=64, y=10, contents=0 })
77. des.object({ id = "statue", x=65, y=10, contents=0 })
78. des.object({ id = "statue", x=64, y=11, contents=0 })
79. des.object({ id = "statue", x=65, y=11, contents=0 })
80. des.object("boulder",04,04)
81. des.object("/",52,09)
82. des.object("boulder",52,09)
83. des.object()
84. des.object()
85. des.object()
86. des.object()
87. des.object()
88. des.object()
89. -- Traps
90. des.trap("magic",03,12)
91. des.trap()
92. des.trap()
93. des.trap()
94. des.trap()
95. -- Monsters.
96. des.monster({ id="Medusa",x=68,y=10,asleep=1 })
97. des.monster("gremlin",02,14)
98. des.monster("titan",02,05)
99. des.monster("electric eel",10,13)
100. des.monster("electric eel",11,13)
101. des.monster("electric eel",10,14)
102. des.monster("electric eel",11,14)
103. des.monster("electric eel",10,15)
104. des.monster("electric eel",11,15)
105. des.monster("jellyfish",01,01)
106. des.monster("jellyfish",00,08)
107. des.monster("jellyfish",04,19)
108. des.monster({ id = "stone golem",x=64,y=08,asleep=1 })
109. des.monster({ id = "stone golem",x=65,y=08,asleep=1 })
110. des.monster({ id = "stone golem",x=64,y=09,asleep=1 })
111. des.monster({ id = "stone golem",x=65,y=09,asleep=1 })
112. des.monster({ id = "cobra",x=64,y=10,asleep=1 })
113. des.monster({ id = "cobra",x=65,y=10,asleep=1 })
114. des.monster("A",72,08)
115. des.monster({ id = "yellow light",x=72,y=11,asleep=1 })
116. des.monster({ x = 17, y = 07 })
117. des.monster({ x = 28, y = 11 })
118. des.monster({ x = 32, y = 13 })
119. des.monster({ x = 49, y = 09 })
120. des.monster({ x = 48, y = 07 })
121. des.monster({ x = 65, y = 03 })
122. des.monster({ x = 70, y = 04 })
123. des.monster({ x = 70, y = 15 })
124. des.monster({ x = 65, y = 16 })
125. des.monster()
126. des.monster()
127. des.monster()
128. des.monster()
129.