Source:NetHack 5.0.0/dat/tower2.lua
Jump to navigation
Jump to search
Below is the full text to tower2.lua from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/dat/tower2.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 tower tower2.lua $NHDT-Date: 1652196037 2022/05/10 15:20:37 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $ 2. -- Copyright (c) 1989 by Jean-Christophe Collet 3. -- NetHack may be freely redistributed. See license for details. 4. -- 5. des.level_init({ style = "solidfill", fg = " " }); 6. 7. des.level_flags("mazelevel", "noteleport", "hardfloor", "solidify") 8. des.map({ halign = "half-left", valign = "center", map = [[ 9. --- --- --- 10. |.| |.| |.| 11. ---S---S---S--- 12. |.S.........S.| 13. ---.------+---- 14. |......|..| 15. --------.------ 16. |.S......+..S.| 17. ---S---S---S--- 18. |.| |.| |.| 19. --- --- --- 20. ]] }); 21. -- Random places are the 10 niches 22. local place = { {03,01},{07,01},{11,01},{01,03},{13,03}, 23. {01,07},{13,07},{03,09},{07,09},{11,09} } 24. shuffle(place) 25. 26. des.ladder("up", 11,05) 27. des.ladder("down", 03,07) 28. des.door("locked",10,04) 29. des.door("locked",09,07) 30. des.monster("&",place[10]) 31. des.monster("&",place[1]) 32. des.monster("hell hound pup",place[2]) 33. des.monster("hell hound pup",place[3]) 34. des.monster("winter wolf",place[4]) 35. des.object({ id = "chest", coord = place[5], 36. contents = function() 37. des.object("amulet of life saving") 38. end 39. }); 40. des.object({ id = "chest", coord = place[6], 41. contents = function() 42. des.object("amulet of strangulation") 43. end 44. }); 45. des.object("water walking boots",place[7]) 46. des.object("crystal plate mail",place[8]) 47. 48. local spbooks = { 49. "spellbook of invisibility", 50. "spellbook of cone of cold", 51. "spellbook of create familiar", 52. "spellbook of clairvoyance", 53. "spellbook of charm monster", 54. "spellbook of stone to flesh", 55. "spellbook of polymorph" 56. } 57. shuffle(spbooks); 58. des.object(spbooks[1],place[9]) 59. 60. -- Walls in the tower are non diggable 61. des.non_diggable(selection.area(00,00,14,10)) 62.