Source:NetHack 5.0.0/dat/fakewiz2.lua

From NetHackWiki
Jump to navigation Jump to search

Below is the full text to fakewiz2.lua from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/dat/fakewiz2.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 fakewiz2.lua	$NHDT-Date: 1652196026 2022/05/10 15:20:26 $  $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");
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 fakewiz2 = des.map({ halign = "center", valign = "center", map = [[
15. .........
16. .}}}}}}}.
17. .}}---}}.
18. .}--.--}.
19. .}|...|}.
20. .}--.--}.
21. .}}---}}.
22. .}}}}}}}.
23. .........
24. ]], contents = function(rm)
25.    des.levregion({ region={01,00,79,20}, region_islev=1, exclude={0,0,8,8}, type="stair-up" })
26.    des.levregion({ region={01,00,79,20}, region_islev=1, exclude={0,0,8,8}, type="stair-down" })
27.    des.levregion({ region={01,00,79,20}, region_islev=1, exclude={0,0,8,8}, type="branch" });
28.    des.teleport_region({ region={01,00,79,20}, region_islev=1,exclude={2,2,6,6} })
29.    des.mazewalk(08,05,"east")
30.    des.monster("L",04,04)
31.    des.monster("vampire lord",03,04)
32.    des.monster("kraken",06,06)
33.    -- And to make things a little harder.
34.    des.trap("board",04,03)
35.    des.trap("board",04,05)
36.    des.trap("board",03,04)
37.    des.trap("board",05,04)
38.    -- treasures
39.    des.object("\"",04,04)
40. end
41. });
42. 
43. local protected = bounds2:negate() | fakewiz2;
44. hell_tweaks(protected);