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 | 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x | /**
* sanctum - NetHack special level
* Converted from: sanctum.lua
*/
import * as des from '../sp_lev.js';
import { selection } from '../sp_lev.js';
export async function generate() {
// NetHack gehennom sanctum.lua $NHDT-Date: 1652196034 2022/5/10 15:20:34 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.5 $
// Copyright (c) 1989 by Jean-Christophe Collet
// Copyright (c) 1992 by M. Stephenson and Izchak Miller
// NetHack may be freely redistributed. See license for details.
//
des.level_init({ style: "solidfill", fg: " " });
des.level_flags("mazelevel", "noteleport", "hardfloor", "nommap");
// This is outside the main map, below, so we must do it before adding
// that map and anchoring coordinates to it. This extends the invisible
// barrier up to the top row, which falls outside the drawn map.
des.non_passwall(selection.area(39,0,41,0));
await des.map(`\
----------------------------------------------------------------------------
| -------------- |
| |............| ------- |
| -------............----- |.....| |
| |......................| --.....| --------- |
| ----......................---------|......---- |.......| |
| |........---------..........|......+.........| ------+---..| |
| ---........|.......|..........--S----|.........| |........|..| |
| |..........|.......|.............| |.........-------..---------- |
| |..........|.......|..........---- |..........|....|..|......| |
| |..........|.......|..........| --.......----+---S---S--..| |
| |..........---------..........| |.......|.............|..| |
| ---...........................| -----+-------S---------S--- |
| |...........................| |...| |......| |....|-- |
| ----.....................---- |...---....--- ---......| |
| |.....................| |..........| |.....---- |
| -------...........----- --...------- |.....| |
| |...........| |...| |.....| |
| ------------- ----- ------- |
----------------------------------------------------------------------------
`);
await des.region({ region: [15,7, 21,10], lit: 1, type: "temple", filled: 2, contents: async function() {
des.door({ wall: "random", state: "secret" });
} })
await des.altar({ x: 18, y: 8, align: "noalign", type: "sanctum" });
await des.region({ region: [41,6, 48,11], lit: 0, type: "morgue", filled: 1, irregular: 1 });
// Non diggable walls
des.non_diggable(selection.area(0,0,75,19));
// Invisible barrier separating the left & right halves of the level
des.non_passwall(selection.area(37,0,39,19));
// Doors
des.door("closed",40,6);
des.door("locked",62,6);
des.door("closed",46,12);
des.door("closed",53,10);
// Surround the temple with fire
await des.trap("fire",13,5);
await des.trap("fire",14,5);
await des.trap("fire",15,5);
await des.trap("fire",16,5);
await des.trap("fire",17,5);
await des.trap("fire",18,5);
await des.trap("fire",19,5);
await des.trap("fire",20,5);
await des.trap("fire",21,5);
await des.trap("fire",22,5);
await des.trap("fire",23,5);
await des.trap("fire",13,12);
await des.trap("fire",14,12);
await des.trap("fire",15,12);
await des.trap("fire",16,12);
await des.trap("fire",17,12);
await des.trap("fire",18,12);
await des.trap("fire",19,12);
await des.trap("fire",20,12);
await des.trap("fire",21,12);
await des.trap("fire",22,12);
await des.trap("fire",23,12);
await des.trap("fire",13,6);
await des.trap("fire",13,7);
await des.trap("fire",13,8);
await des.trap("fire",13,9);
await des.trap("fire",13,10);
await des.trap("fire",13,11);
await des.trap("fire",23,6);
await des.trap("fire",23,7);
await des.trap("fire",23,8);
await des.trap("fire",23,9);
await des.trap("fire",23,10);
await des.trap("fire",23,11);
// Some traps.
await des.trap("spiked pit");
await des.trap("fire");
await des.trap("sleep gas");
await des.trap("anti magic");
await des.trap("fire");
await des.trap("magic");
// Some random objects
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("?");
await des.object("?");
await des.object("?");
await des.object("?");
await des.object("?");
// Some monsters.
await des.monster({ id: "horned devil", x: 14,y: 12,peaceful: 0 });
await des.monster({ id: "barbed devil", x: 18,y: 8,peaceful: 0 });
await des.monster({ id: "erinys", x: 10,y: 4,peaceful: 0 });
await des.monster({ id: "marilith", x: 7,y: 9,peaceful: 0 });
await des.monster({ id: "nalfeshnee", x: 27,y: 8,peaceful: 0 });
// Moloch's horde
await des.monster({ id: "aligned cleric", x: 20,y: 3,align: "noalign",peaceful: 0 });
await des.monster({ id: "aligned cleric", x: 15,y: 4,align: "noalign",peaceful: 0 });
await des.monster({ id: "aligned cleric", x: 11,y: 5,align: "noalign",peaceful: 0 });
await des.monster({ id: "aligned cleric", x: 11,y: 7,align: "noalign",peaceful: 0 });
await des.monster({ id: "aligned cleric", x: 11,y: 9,align: "noalign",peaceful: 0 });
await des.monster({ id: "aligned cleric", x: 11,y: 12,align: "noalign",peaceful: 0 });
await des.monster({ id: "aligned cleric", x: 15,y: 13,align: "noalign",peaceful: 0 });
await des.monster({ id: "aligned cleric", x: 17,y: 13,align: "noalign",peaceful: 0 });
await des.monster({ id: "aligned cleric", x: 21,y: 13,align: "noalign",peaceful: 0 });
// A few nasties
await des.monster("L");
await des.monster("L");
await des.monster("V");
await des.monster("V");
await des.monster("V");
des.stair("up", 63,15);
// Teleporting to this level is allowed after the invocation creates its
// entrance. Force arrival in that case to be on rightmost third of level.
des.teleport_region({ region: [54,1,79,18], region_islev: 1, dir: "down" });
return des.finalize_level();
}
|