Source:NetHack 5.0.0/dat/tower3.lua
Jump to navigation
Jump to search
Below is the full text to tower3.lua from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/dat/tower3.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 tower3.lua $NHDT-Date: 1652196038 2022/05/10 15:20:38 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $ 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. --------------- 22. ]] }); 23. -- Random places are the 10 niches 24. local place = { {05,01},{09,01},{13,01},{03,03},{15,03}, 25. {03,07},{15,07},{05,09},{09,09},{13,09} } 26. 27. des.levregion({ type="branch", region={02,05,02,05} }) 28. des.ladder("up", 05,07) 29. -- Entry door is, of course, locked 30. des.door("locked",14,05) 31. -- Let's put a dragon behind the door, just for the fun... 32. des.monster("D", 13, 05) 33. des.monster({ x=12, y=04 }) 34. des.monster({ x=12, y=06 }) 35. des.monster() 36. des.monster() 37. des.monster() 38. des.monster() 39. des.monster() 40. des.monster() 41. des.object("long sword",place[4]) 42. des.trap({ coord = place[4] }) 43. des.object("lock pick",place[1]) 44. des.trap({ coord = place[1] }) 45. des.object("elven cloak",place[2]) 46. des.trap({ coord = place[2] }) 47. des.object("blindfold",place[3]) 48. des.trap({ coord = place[3] }) 49. -- Walls in the tower are non diggable 50. des.non_diggable(selection.area(00,00,18,12))