Source:NetHack 5.0.0/dat/medusa-1.lua
Jump to navigation
Jump to search
Below is the full text to medusa-1.lua from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/dat/medusa-1.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-1.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. -- 7. -- These are the Medusa's levels : 8. -- 9. 10. des.level_init({ style = "solidfill", fg = " " }); 11. 12. des.level_flags("mazelevel", "noteleport") 13. 14. des.map([[ 15. }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} 16. }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} 17. }}.}}}}}..}}}}}......}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}....}}}...}}}}} 18. }...}}.....}}}}}....}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}...............} 19. }....}}}}}}}}}}....}}}..}}}}}}}}}}}.......}}}}}}}}}}}}}}}}..}}.....}}}...}} 20. }....}}}}}}}}.....}}}}..}}}}}}.................}}}}}}}}}}}.}}}}.....}}...}} 21. }....}}}}}}}}}}}}.}}}}.}}}}}}.-----------------.}}}}}}}}}}}}}}}}}.........} 22. }....}}}}}}}}}}}}}}}}}}.}}}...|...............S...}}}}}}}}}}}}}}}}}}}....}} 23. }.....}.}}....}}}}}}}}}.}}....--------+--------....}}}}}}..}}}}}}}}}}}...}} 24. }......}}}}..}}}}}}}}}}}}}........|.......|........}}}}}....}}}}}}}}}}}}}}} 25. }.....}}}}}}}}}}}}}}}}}}}}........|.......|........}}}}}...}}}}}}}}}.}}}}}} 26. }.....}}}}}}}}}}}}}}}}}}}}....--------+--------....}}}}}}.}.}}}}}}}}}}}}}}} 27. }......}}}}}}}}}}}}}}}}}}}}...S...............|...}}}}}}}}}}}}}}}}}.}}}}}}} 28. }.......}}}}}}}..}}}}}}}}}}}}.-----------------.}}}}}}}}}}}}}}}}}....}}}}}} 29. }........}}.}}....}}}}}}}}}}}}.................}}}}}..}}}}}}}}}.......}}}}} 30. }.......}}}}}}}......}}}}}}}}}}}}}}.......}}}}}}}}}.....}}}}}}...}}..}}}}}} 31. }.....}}}}}}}}}}}.....}}}}}}}}}}}}}}}}}}}}}}.}}}}}}}..}}}}}}}}}}....}}}}}}} 32. }}..}}}}}}}}}}}}}....}}}}}}}}}}}}}}}}}}}}}}...}}..}}}}}}}.}}.}}}}..}}}}}}}} 33. }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} 34. }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} 35. ]]); 36. -- Dungeon Description 37. des.region(selection.area(00,00,74,19),"lit") 38. des.region(selection.area(31,07,45,07),"unlit") 39. -- make the downstairs room a real room to control arriving monsters, 40. -- and also as a fixup_special hack; the first room defined on Medusa's level 41. -- receives some statues 42. des.region({ region={35,09, 41,10}, lit = 0, type="ordinary", arrival_room=true }) 43. des.region(selection.area(31,12,45,12),"unlit") 44. -- Teleport: down to up stairs island, up to Medusa's island 45. des.teleport_region({ region = {01,01,05,17}, dir="down" }) 46. des.teleport_region({ region = {26,04,50,15}, dir="up" }) 47. -- Stairs 48. des.stair("up", 05,14) 49. des.stair("down", 36,10) 50. -- Doors 51. des.door("closed",46,07) 52. des.door("locked",38,08) 53. des.door("locked",38,11) 54. des.door("closed",30,12) 55. -- Branch, not allowed inside Medusa's building. 56. des.levregion({ region = {01,00,79,20}, exclude = {30,06,46,13}, type = "branch" }) 57. -- Non diggable walls 58. des.non_diggable(selection.area(30,06,46,13)) 59. -- Objects 60. des.object({ id = "statue", x=36,y=10, buc="uncursed", 61. montype="knight", historic=1, male = 1, name="Perseus", 62. contents = function() 63. if percent(75) then 64. des.object({ id = "shield of reflection", buc="cursed", spe=0 }) 65. end 66. if percent(25) then 67. des.object({ id = "levitation boots", spe=0 }) 68. end 69. if percent(50) then 70. des.object({ id = "scimitar", buc="blessed", spe=2 }) 71. end 72. if percent(50) then 73. des.object("sack") 74. end 75. end 76. }); 77. 78. -- Specifying explicit contents forces them to be empty. 79. des.object({ id = "statue", contents = 0 }) 80. des.object({ id = "statue", contents = 0 }) 81. des.object({ id = "statue", contents = 0 }) 82. des.object({ id = "statue", contents = 0 }) 83. des.object({ id = "statue", contents = 0 }) 84. des.object({ id = "statue", contents = 0 }) 85. des.object({ id = "statue", contents = 0 }) 86. des.object() 87. des.object() 88. des.object() 89. des.object() 90. des.object() 91. des.object() 92. des.object() 93. des.object() 94. -- Random traps 95. des.trap() 96. des.trap() 97. des.trap() 98. des.trap() 99. des.trap() 100. des.trap("board",38,07) 101. des.trap("board",38,12) 102. -- Random monsters 103. des.monster({ id = "Medusa", x=36,y=10, asleep=1 }) 104. des.monster("giant eel",11,06) 105. des.monster("giant eel",23,13) 106. des.monster("giant eel",29,02) 107. des.monster("jellyfish",02,02) 108. des.monster("jellyfish",00,08) 109. des.monster("jellyfish",04,18) 110. des.monster("water troll",51,03) 111. des.monster("water troll",64,11) 112. des.monster({ class = 'S', x=38, y=07 }) 113. des.monster({ class = 'S', x=38, y=12 }) 114. des.monster() 115. des.monster() 116. des.monster() 117. des.monster() 118. des.monster() 119. des.monster() 120. des.monster() 121. des.monster() 122. des.monster() 123. des.monster()