Source:NetHack 5.0.0/dat/wizard3.lua
Jump to navigation
Jump to search
Below is the full text to wizard3.lua from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/dat/wizard3.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 yendor wizard3.lua $NHDT-Date: 1652196040 2022/05/10 15:20:40 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $ 2. -- Copyright (c) 1989 by Jean-Christophe Collet 3. -- Copyright (c) 1992 by M. Stephenson and Izchak Miller 4. -- NetHack may be freely redistributed. See license for details. 5. -- 6. des.level_init({ style="mazegrid", bg ="-" }); 7. 8. des.level_flags("mazelevel", "noteleport", "hardfloor") 9. 10. local tmpbounds = selection.match("-"); 11. local bnds = tmpbounds:bounds(); 12. local bounds2 = selection.fillrect(bnds.lx, bnds.ly + 1, bnds.hx - 2, bnds.hy - 1); 13. 14. local wiz3 = des.map({ halign = "center", valign = "center", map = [[ 15. ----------------------------x 16. |..|............S..........|x 17. |..|..------------------S--|x 18. |..|..|.........|..........|x 19. |..S..|.}}}}}}}.|..........|x 20. |..|..|.}}---}}.|-S--------|x 21. |..|..|.}--.--}.|..|.......|x 22. |..|..|.}|...|}.|..|.......|x 23. |..---|.}--.--}.|..|.......|x 24. |.....|.}}---}}.|..|.......|x 25. |.....S.}}}}}}}.|..|.......|x 26. |.....|.........|..|.......|x 27. ----------------------------x 28. ]], contents = function(rm) 29. des.levregion({ type="stair-up", region={01,00,79,20}, region_islev=1, exclude={0,0,28,12} }) 30. des.levregion({ type="stair-down", region={01,00,79,20}, region_islev=1, exclude={0,0,28,12} }) 31. des.levregion({ type="branch", region={01,00,79,20}, region_islev=1, exclude={0,0,28,12} }) 32. des.teleport_region({ region={01,00,79,20}, region_islev=1, exclude={0,0,27,12} }) 33. des.levregion({ region={25,11,25,11}, type="portal", name="fakewiz1" }); 34. des.mazewalk(28,09,"east") 35. des.region({ region={07,03, 15,11}, lit=0 ,type="morgue", filled=2 }) 36. des.region({ region={17,06, 18,11}, lit=0, type="beehive", filled=1 }) 37. -- make the entry chamber a real room; it affects monster arrival 38. des.region({ region={20,06,26,11},lit=0,type="ordinary",arrival_room=true, 39. contents = function() 40. local w = "north"; 41. if percent(50) then w = "west" end 42. des.door({ state="secret", wall=w }) 43. end 44. }); 45. des.door("closed",18,05) 46. des.ladder("up", 11,07) 47. -- Non diggable walls 48. -- Walls inside the moat stay diggable 49. des.non_diggable(selection.area(00,00,06,12)) 50. des.non_diggable(selection.area(06,00,27,02)) 51. des.non_diggable(selection.area(16,02,27,12)) 52. des.non_diggable(selection.area(06,12,16,12)) 53. -- 54. des.non_passwall(selection.area(00,00,06,12)) 55. des.non_passwall(selection.area(06,00,27,02)) 56. des.non_passwall(selection.area(16,02,27,12)) 57. des.non_passwall(selection.area(06,12,16,12)) 58. -- 59. des.monster("L", 10, 07) 60. des.monster("vampire lord", 12, 07) 61. -- Some surrounding horrors 62. des.monster("kraken", 08, 05) 63. des.monster("giant eel", 08, 08) 64. des.monster("kraken", 14, 05) 65. des.monster("giant eel", 14, 08) 66. -- Other monsters 67. des.monster("L") 68. des.monster("D") 69. des.monster("D", 26, 09) 70. des.monster("&") 71. des.monster("&") 72. des.monster("&") 73. -- And to make things a little harder. 74. des.trap("board",10,07) 75. des.trap("board",12,07) 76. des.trap("board",11,06) 77. des.trap("board",11,08) 78. -- Some loot 79. des.object(")") 80. des.object("!") 81. des.object("?") 82. des.object("?") 83. des.object("(") 84. -- treasures 85. des.object("\"", 11, 07) 86. end 87. }); 88. 89. local protected = bounds2:negate() | wiz3; 90. hell_tweaks(protected);