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 | /** * Sam-goal - NetHack special level * Converted from: Sam-goal.lua */ import * as des from '../sp_lev.js'; import { selection } from '../sp_lev.js'; import { rn2 } from '../rng.js'; export async function generate() { // NetHack Samurai Sam-goal.lua $NHDT-Date: 1652196013 2022/5/10 15:20:13 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $ // Copyright (c) 1989 by Jean-Christophe Collet // Copyright (c) 1991-92 by M. Stephenson, P. Winner // NetHack may be freely redistributed. See license for details. // des.level_init({ style: "solidfill", fg: " " }); des.level_flags("mazelevel", "noteleport"); await des.map(`\ ....................... ......-------------------...... ......----.................----...... ....----.....-------------.....----.... ....--.....----...........----.....--.... ...||....---....---------....---....||... ...|....--....---.......---....--....|... ....|...||...---...--+--...---...||...|.... ....|...|....|....|-...-|....|....|...|.... ....|...|....|....+.....+....|....|...|.... ....|...|....|....|-...-|....|....|...|.... ....|...||...---...--+--...---...||...|.... ...|....--....---.......---....--....|... ...||....---....---------....---....||... ....--.....----...........----.....--.... ....----.....-------------.....----.... ......----.................----...... ......-------------------...... ....................... `); // Dungeon Description let place = [ [2,11],[42,9] ] let placeidx = rn2(place.length); await des.region(selection.area(0,0,44,19), "unlit"); // Doors des.door("closed",19,10); des.door("closed",22,8); des.door("closed",22,12); des.door("closed",25,10); // Stairs des.stair({ dir: "up", coord: place[placeidx] }); // Holes in the concentric ring walls place = [ [22,14],[30,10],[22, 6],[14,10] ] placeidx = rn2(place.length); des.terrain(place[placeidx], "."); place = [ [22, 4],[35,10],[22,16],[ 9,10] ] placeidx = rn2(place.length); des.terrain(place[placeidx], "."); place = [ [22, 2],[22,18] ] placeidx = rn2(place.length); des.terrain(place[placeidx], "."); // Non diggable walls des.non_diggable(selection.area(0,0,44,19)); // Objects await des.object({ id: "tsurugi", x: 22, y: 10, buc: "blessed", spe: 0, name: "The Tsurugi of Muramasa" }); 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.trap("board",22,9); await des.trap("board",24,10); await des.trap("board",22,11); // 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("Ashikaga Takauji", 22, 10); await des.monster({ id: "samurai", peaceful: 0 }); await des.monster({ id: "samurai", peaceful: 0 }); await des.monster({ id: "samurai", peaceful: 0 }); await des.monster({ id: "samurai", peaceful: 0 }); await des.monster({ id: "samurai", peaceful: 0 }); await des.monster({ id: "ninja", peaceful: 0 }); await des.monster({ id: "ninja", peaceful: 0 }); await des.monster({ id: "ninja", peaceful: 0 }); await des.monster({ id: "ninja", peaceful: 0 }); await des.monster({ id: "ninja", peaceful: 0 }); await des.monster("wolf"); await des.monster("wolf"); await des.monster("wolf"); await des.monster("wolf"); await des.monster("d"); await des.monster("d"); await des.monster("stalker"); await des.monster("stalker"); await des.monster("stalker"); await des.monster("stalker"); await des.monster("stalker"); await des.monster("stalker"); await des.monster("stalker"); await des.monster("stalker"); await des.monster("stalker"); return des.finalize_level(); } |