Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 1x 1x 1x 2x 2x 2x 1x 1x 1x 1x 1x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x | /**
* minend-2 - NetHack special level
* Converted from: minend-2.lua
*/
import * as des from '../sp_lev.js';
import { selection, percent } from '../sp_lev.js';
export async function generate() {
// NetHack mines minend-2.lua $NHDT-Date: 1652196029 2022/5/10 15:20:29 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $
// Copyright (c) 1989-95 by Jean-Christophe Collet
// Copyright (c) 1991-95 by M. Stephenson
// NetHack may be freely redistributed. See license for details.
//
// Mine } level variant 2
// "Gnome King's Wine Cellar"
des.level_init({ style: "solidfill", fg: " " });
des.level_flags("mazelevel");
await des.map(`\
---------------------------------------------------------------------------
|...................................................| |
|.|---------S--.--|...|--------------------------|..| |
|.||---| |.||-| |...|..........................|..| |
|.||...| |-|.|.|---...|.............................| .. |
|.||...|-|.....|....|-|..........................|..|. .. |
|.||.....|-S|..|....|............................|..|.. |
|.||--|..|..|..|-|..|----------------------------|..|-. |
|.| |..|..|....|..................................|... |
|.| |..|..|----|..-----------------------------|..|.... |
|.|---|..|--|.......|----------------------------|..|..... |
|...........|----.--|......................| |..|....... |
|-----------|...|.| |------------------|.|.|-----|..|.....|.. |
|-----------|.{.|.|--------------------|.|..........|.....|.... |
|...............|.S......................|-------------..-----... |
|.--------------|.|--------------------|.|......................... |
|.................| |.....................|........ |
---------------------------------------------------------------------------
`);
if (percent(50)) {
des.terrain([55,14],"-");
des.terrain([56,14],"-");
des.terrain([61,15],"|");
des.terrain([52,5], "S");
des.door("locked", 52,5);
}
if (percent(50)) {
des.terrain([18,1], "|");
des.terrain(selection.area(7,12, 8,13), ".");
}
if (percent(50)) {
des.terrain([49,4], "|");
des.terrain([21,5], ".");
}
if (percent(50)) {
if (percent(50)) {
des.terrain([22,1], "|");
} else {
des.terrain([50,7], "-");
des.terrain([51,7], "-");
}
}
// uncontrolled arrival (via trap door, level teleport) will be in the central
// portion of level to prevent ending up stuck in the treasure area, whether
// arriving from above or below (despite this being bottom of Mines branch,
// hero might arrive from below by invoking Wiz role's Eye of the Aethiopica)
des.teleport_region({ region: [23,3,48,16], region_islev: 1 });
// Dungeon Description
des.feature("fountain", [14,13]);
await des.region(selection.area(23,3,48,6),"lit");
await des.region(selection.area(21,6,22,6),"lit");
await des.region(selection.area(14,4,14,4),"unlit");
await des.region(selection.area(10,5,14,8),"unlit");
await des.region(selection.area(10,9,11,9),"unlit");
await des.region(selection.area(15,8,16,8),"unlit");
// Secret doors
des.door("locked",12,2);
des.door("locked",11,6);
// Stairs
des.stair("up", 36,4);
// Non diggable walls
des.non_diggable(selection.area(0,0,52,17));
des.non_diggable(selection.area(53,0,74,0));
des.non_diggable(selection.area(53,17,74,17));
des.non_diggable(selection.area(74,1,74,16));
des.non_diggable(selection.area(53,7,55,7));
des.non_diggable(selection.area(53,14,61,14));
// The Gnome King's wine cellar.
// the Trespassers sign is a long-running joke
des.engraving([12,3], "engrave",
"You are now entering the Gnome King's wine cellar.")
des.engraving([12,4], "engrave", "Trespassers will be persecuted!");
await des.object("potion of booze", 10, 7);
await des.object("potion of booze", 10, 7);
await des.object("!", 10, 7);
await des.object("potion of booze", 10, 8);
await des.object("potion of booze", 10, 8);
await des.object("!", 10, 8);
await des.object("potion of booze", 10, 9);
await des.object("potion of booze", 10, 9);
await des.object("potion of object detection", 10, 9);
// Objects
// The Treasure chamber...args
await des.object("diamond", 69, 4);
await des.object("*", 69, 4);
await des.object("diamond", 69, 4);
await des.object("*", 69, 4);
await des.object("emerald", 70, 4);
await des.object("*", 70, 4);
await des.object("emerald", 70, 4);
await des.object("*", 70, 4);
await des.object("emerald", 69, 5);
await des.object("*", 69, 5);
await des.object("ruby", 69, 5);
await des.object("*", 69, 5);
await des.object("ruby", 70, 5);
await des.object("amethyst", 70, 5);
await des.object("*", 70, 5);
await des.object("amethyst", 70, 5);
await des.object({ id: "luckstone", x: 70, y: 5,
buc: "not-cursed", achievement: 1 });
// Scattered gems...args
await des.object("*");
await des.object("*");
await des.object("*");
await des.object("*");
await des.object("*");
await des.object("*");
await des.object("*");
await des.object("(");
await des.object("(");
await des.object();
await des.object();
await des.object();
// Random traps
await des.trap();
await des.trap();
await des.trap();
await des.trap();
await des.trap();
await des.trap();
// Random monsters.
await des.monster("gnome king");
await des.monster("gnome lord");
await des.monster("gnome lord");
await des.monster("gnome lord");
await des.monster("gnomish wizard");
await des.monster("gnomish wizard");
await des.monster("gnome");
await des.monster("gnome");
await des.monster("gnome");
await des.monster("gnome");
await des.monster("gnome");
await des.monster("gnome");
await des.monster("gnome");
await des.monster("gnome");
await des.monster("gnome");
await des.monster("hobbit");
await des.monster("hobbit");
await des.monster("dwarf");
await des.monster("dwarf");
await des.monster("dwarf");
await des.monster("h");
return des.finalize_level();
}
|