Source:NetHack 5.0.0/dat/wizard2.lua
Jump to navigation
Jump to search
Below is the full text to wizard2.lua from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/dat/wizard2.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 wizard2.lua $NHDT-Date: 1652196039 2022/05/10 15:20:39 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $ 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 wiz2 = des.map({ halign = "center", valign = "center", map = [[ 15. ----------------------------x 16. |.....|.S....|.............|x 17. |.....|.-------S--------S--|x 18. |.....|.|.........|........|x 19. |..-S--S|.........|........|x 20. |..|....|.........|------S-|x 21. |..|....|.........|.....|..|x 22. |-S-----|.........|.....|..|x 23. |.......|.........|S--S--..|x 24. |.......|.........|.|......|x 25. |-----S----S-------.|......|x 26. |............|....S.|......|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. -- entire tower in a region, constrains monster migration 34. des.region({ region={01,01, 26,11}, lit=0, type="ordinary", arrival_room=true }) 35. des.region({ region={09,03, 17,09}, lit=0, type="zoo", filled=1 }) 36. des.door("closed",15,02) 37. des.door("closed",11,10) 38. des.mazewalk(28,05,"east") 39. des.ladder("up", 12,01) 40. des.ladder("down", 14,11) 41. -- Non diggable walls everywhere 42. des.non_diggable(selection.area(00,00,27,12)) 43. -- 44. des.non_passwall(selection.area(00,00,27,12)) 45. -- Random traps. 46. des.trap("spiked pit") 47. des.trap("sleep gas") 48. des.trap("anti magic") 49. des.trap("magic") 50. -- Some random loot. 51. des.object("!") 52. des.object("!") 53. des.object("?") 54. des.object("?") 55. des.object("+") 56. -- treasures 57. des.object("\"", 04, 06) 58. end 59. }); 60. 61. local protected = bounds2:negate() | wiz2; 62. hell_tweaks(protected);