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 | 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 1x 1x 2x 2x 1x 1x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 16x 16x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 60x 60x 2x 2x 2x 2x 2x 2x | /**
* medusa-3 - NetHack special level
* Converted from: medusa-3.lua
*/
import * as des from '../sp_lev.js';
import { selection, percent } from '../sp_lev.js';
export async function generate() {
// NetHack medusa medusa-3.lua $NHDT-Date: 1716152250 2024/5/19 20:57:30 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.8 $
// Copyright (c) 1989 by Jean-Christophe Collet
// Copyright (c) 1990, 1991 by M. Stephenson
// NetHack may be freely redistributed. See license for details.
//
des.level_init({ style: "solidfill", fg: " " });
des.level_flags("noteleport", "mazelevel", "shortsighted");
//
// Here you disturb ravens nesting in the trees.
//
await des.map(`\
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
}}}}}}}}}}.}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}.}}}}}}}}}}}}}}}}}}}}}}}}}}}}
}}}}}}}}T..T.}}}}}}}}}}}}}}}}}}}}..}}}}}}}}.}}}...}}}}}}}.}}}}}......}}}}}}}
}}}}}}.......T.}}}}}}}}}}}..}}}}..T.}}}}}}...T...T..}}...T..}}..-----..}}}}}
}}}...-----....}}}}}}}}}}.T..}}}}}...}}}}}.....T..}}}}}......T..|...|.T..}}}
}}}.T.|...|...T.}}}}}}}.T......}}}}..T..}}.}}}.}}...}}}}}.T.....+...|...}}}}
}}}}..|...|.}}.}}}}}.....}}}T.}}}}.....}}}}}}.T}}}}}}}}}}}}}..T.|...|.}}}}}}
}}}}}.|...|.}}}}}}..T..}}}}}}}}}}}}}T.}}}}}}}}..}}}}}}}}}}}.....-----.}}}}}}
}}}}}.--+--..}}}}}}...}}}}}}}}}}}}}}}}}}}T.}}}}}}}}}}}}}}}}.T.}........}}}}}
}}}}}.......}}}}}}..}}}}}}}}}.}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}.}}}.}}.T.}}}}}}
}}.T...T...}}}}T}}}}}}}}}}}....}}}}}}}}}}T}}}}}.T}}...}}}}}}}}}}}}}}...}}}}}
}}}...T}}}}}}}..}}}}}}}}}}}.T...}}}}}}}}.T.}.T.....T....}}}}}}}}}}}}}.}}}}}}
}}}}}}}}}}}}}}}....}}}}}}}...}}.}}}}}}}}}}............T..}}}}}.T.}}}}}}}}}}}
}}}}}}}}}}}}}}}}..T..}}}}}}}}}}}}}}..}}}}}..------+--...T.}}}....}}}}}}}}}}}
}}}}.}..}}}}}}}.T.....}}}}}}}}}}}..T.}}}}.T.|...|...|....}}}}}.}}}}}...}}}}}
}}}.T.}...}..}}}}T.T.}}}}}}.}}}}}}}....}}...|...+...|.}}}}}}}}}}}}}..T...}}}
}}}}..}}}.....}}...}}}}}}}...}}}}}}}}}}}}}T.|...|...|}}}}}}}}}}}....T..}}}}}
}}}}}..}}}.T..}}}.}}}}}}}}.T..}}}}}}}}}}}}}}---S-----}}}}}}}}}}}}}....}}}}}}
}}}}}}}}}}}..}}}}}}}}}}}}}}}.}}}}}}}}}}}}}}}}}T..T}}}}}}}}}}}}}}}}}}}}}}}}}}
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
`);
let place = selection.new();
// each of these spots are inside a distinct room
place.set(8,6);
place.set(66,5);
place.set(46,15);
// location of Medusa and downstairs and Perseus's statue
let medloc = place.rndcoord(1,1);
// specific location for some other statue in a different downstairs-eligible
// room, to prevent object detection from becoming a trivial way to pinpoint
// Medusa's location
// [usefulness depends on future STATUE->dknown changes in nethack's core]
let altloc = place.rndcoord(1,1);
// location of a fountain, in the remaining of three downstairs-eligible rooms
let othloc = place.rndcoord(1,1);
// once here, all three points set in 'place' have been used up
await des.region(selection.area(0,0,74,19),"lit");
// fixup_special hack: the first room defined on a Medusa level gets some
// leaderboard statues, use arrival_room to force it to be a room even though
// monsters won't arrive within it
await des.region({ region: [49,14, 51,16], lit: -1, type: "ordinary", arrival_room: true });
await des.region(selection.area(7,5,9,7),"unlit");
await des.region(selection.area(65,4,67,6),"unlit");
await des.region(selection.area(45,14,47,16),"unlit");
// Non diggable walls
// 4th room has diggable walls as Medusa is never placed there
des.non_diggable(selection.area(6,4,10,8));
des.non_diggable(selection.area(64,3,68,7));
des.non_diggable(selection.area(44,13,48,17));
// All places are accessible also with jumping, so don't bother
// restricting the placement when teleporting from levels below this.
des.teleport_region({ region: [33,2,38,7], dir: "down" });
des.levregion({ region: [32,1,39,7], type: "stair-up" });
// place the downstairs at the same spot where Medusa will be placed
des.stair("down", medloc);
//
des.door("locked",8,8);
des.door("locked",64,5);
des.door("random",50,13);
des.door("locked",48,15);
//
// in one of the three designated rooms, but not the one with Medusa plus
// downstairs and also not 'altloc' where a random statue will be placed
des.feature("fountain", othloc);
//
// same spot as Medusa plus downstairs
await des.object({ id: "statue", coord: medloc, buc: "uncursed",
montype: "knight", historic: 1, male: 1,name: "Perseus",
contents: async function() {
if (percent(75)) {
await des.object({ id: "shield of reflection", buc: "cursed", spe: 0 });
}
if (percent(25)) {
await des.object({ id: "levitation boots", spe: 0 });
}
if (percent(50)) {
await des.object({ id: "scimitar", buc: "blessed", spe: 2 });
}
if (percent(50)) {
await des.object("sack");
}
}
});
//
// first random statue is in one of the three designated rooms but not the
// one with Medusa plus downstairs or the one with the fountain
await des.object({ id: "statue", coord: altloc, contents: 0 });
await des.object({ id: "statue", contents: 0 });
await des.object({ id: "statue", contents: 0 });
await des.object({ id: "statue", contents: 0 });
await des.object({ id: "statue", contents: 0 });
await des.object({ id: "statue", contents: 0 });
await des.object({ id: "statue", contents: 0 });
for (let i = 1, __end_i = 8; i <= __end_i; i++) {
await des.object();
}
await des.object("scroll of blank paper",48,18);
await des.object("scroll of blank paper",48,18);
//
await des.trap("rust");
await des.trap("rust");
await des.trap("board");
await des.trap("board");
await des.trap();
//
// place Medusa before placing other monsters so that they won't be able to
// unintentionally steal her spot on the downstairs
await des.monster({ id: "Medusa", coord: medloc, asleep: 1 });
await des.monster("giant eel");
await des.monster("giant eel");
await des.monster("jellyfish");
await des.monster("jellyfish");
await des.monster("wood nymph");
await des.monster("wood nymph");
await des.monster("water nymph");
await des.monster("water nymph");
for (let i = 1, __end_i = 30; i <= __end_i; i++) {
await des.monster({ id: "raven", peaceful: 0 });
}
// medusa.length-3.lua
return des.finalize_level();
}
|