All files / js/levels fire.js

0% Statements 0/170
0% Branches 0/1
0% Functions 0/1
0% Lines 0/170

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                                                                                                                                                                                                                                                                                                                                                     
/**
 * fire - NetHack special level
 * Converted from: fire.lua
 */

import * as des from '../sp_lev.js';

export async function generate() {
    // NetHack endgame fire.lua	$NHDT-Date: 1700398454 2023/11/19 12:54:14 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $
    // Copyright (c) 1989 by Jean-Christophe Collet
    // Copyright (c) 1992,1993 by Izchak Miller, David Cohrs,
    // and Timo Hakulinen
    // NetHack may be freely redistributed.  See license for details.
    // 
    des.level_init({ style: "solidfill", fg: " " });

    des.level_flags("mazelevel", "noteleport", "hardfloor", "shortsighted", "hot", "fumaroles");
    // The player lands, upon arrival, in the
    // lower-right.  The location of the
    // portal to the next level is randomly chosen.
    // This map has no visible outer boundary, and
    // is mostly open area, with lava lakes and bunches of fire traps.
    // It fills the entire mappable area.
    await des.map(`\
LL.............LL..............L...LL.........LL.................LL...........L
LL....LLLLLLLL............L...L.............LL....LLL.......................LL.
L....LL...................L......................LLLL................LL........
.....L.............LLLL...LL....LL...............LLLLL.............LLL.........
.L.LLLL..............LL....L.....LLL..............LLLL..............LLLL......L
LL..........LLLL...LLLL...LLL....LLL......L........LLLL....LL........LLL......L
LL........LLLLLLL...LL.....L......L......LL.........LL......LL........LL...L...
L.........LL..LLL..LL......LL......LLLL..L.........LL......LLL............LL...
......L..LL....LLLLL.................LLLLLLL.......L......LL............LLLLLL.
......L..L.....LL.LLLL.......L............L........LLLLL.LL......LL.........LL.
......LL........L...LL......LL.............LLL.....L...LLL.......LLL.........L.
.L.....LLLLLL........L.......LLL.............L....LL...L.LLL......LLLLLLL......
LL..........LLLL............LL.L.............L....L...LL.........LLL..LLL......
.L...........................LLLLL...........LL...L...L........LLLL..LLLLLL...L
.L.....LLLL.............LL....LL.......LLL...LL.......L..LLL....LLLLLLL.......L
.........LLL.........LLLLLLLLLLL......LLLLL...L...........LL...LL...LL.........
...........LL.......LL.........LL.......LLL....L..LLL....LL.........LL.........
............LLLLLLLLL...........LL....LLL.......LLLLL.....LL........LL.........
.LL...............L.............LLLLLL............LL...LLLL.........LL.......L.
LL.....L..........................LL....................LL..................LLL
L.....LLL......................LLLLL.........L.........LLLLLLLL..............LL
`);
    des.teleport_region({ region: [71,16,71,16] });
    des.levregion({ region: [0,0,78,19], exclude: [67,13,78,19], type: "portal", name: "water" });

    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    await des.trap("fire");
    // An assortment of fire-appropriate nasties
    await des.monster("red dragon");
    await des.monster("balrog");
    await des.monster({ id: "fire elemental", peaceful: 0 });
    await des.monster({ id: "fire elemental", peaceful: 0 });
    await des.monster("fire vortex");
    await des.monster("hell hound");
    // 
    await des.monster("fire giant");
    await des.monster("barbed devil");
    await des.monster("hell hound");
    await des.monster("stone golem");
    await des.monster("pit fiend");
    await des.monster({ id: "fire elemental", peaceful: 0 });
    // 
    await des.monster({ id: "fire elemental", peaceful: 0 });
    await des.monster("hell hound");
    await des.monster({ id: "fire elemental", peaceful: 0 });
    await des.monster({ id: "fire elemental", peaceful: 0 });
    await des.monster("scorpion");
    await des.monster("fire giant");
    // 
    await des.monster("hell hound");
    await des.monster("dust vortex");
    await des.monster("fire vortex");
    await des.monster({ id: "fire elemental", peaceful: 0 });
    await des.monster({ id: "fire elemental", peaceful: 0 });
    await des.monster({ id: "fire elemental", peaceful: 0 });
    await des.monster("hell hound");
    await des.monster({ id: "fire elemental", peaceful: 0 });
    await des.monster("stone golem");
    await des.monster("pit viper");
    await des.monster("pit viper");
    await des.monster("fire vortex");
    // 
    await des.monster({ id: "fire elemental", peaceful: 0 });
    await des.monster({ id: "fire elemental", peaceful: 0 });
    await des.monster("fire giant");
    await des.monster({ id: "fire elemental", peaceful: 0 });
    await des.monster("fire vortex");
    await des.monster("fire vortex");
    await des.monster("pit fiend");
    await des.monster({ id: "fire elemental", peaceful: 0 });
    await des.monster("pit viper");
    // 
    await des.monster({ id: "salamander", peaceful: 0 });
    await des.monster({ id: "salamander", peaceful: 0 });
    await des.monster("minotaur");
    await des.monster({ id: "salamander", peaceful: 0 });
    await des.monster("steam vortex");
    await des.monster({ id: "salamander", peaceful: 0 });
    await des.monster({ id: "salamander", peaceful: 0 });
    // 
    await des.monster("fire giant");
    await des.monster("barbed devil");
    await des.monster({ id: "fire elemental", peaceful: 0 });
    await des.monster("fire vortex");
    await des.monster({ id: "fire elemental", peaceful: 0 });
    await des.monster({ id: "fire elemental", peaceful: 0 });
    await des.monster("hell hound");
    await des.monster("fire giant");
    await des.monster("pit fiend");
    await des.monster({ id: "fire elemental", peaceful: 0 });
    await des.monster({ id: "fire elemental", peaceful: 0 });
    // 
    await des.monster("barbed devil");
    await des.monster({ id: "salamander", peaceful: 0 });
    await des.monster("steam vortex");
    await des.monster({ id: "salamander", peaceful: 0 });
    await des.monster({ id: "salamander", peaceful: 0 });

    await des.object("boulder");
    await des.object("boulder");
    await des.object("boulder");
    await des.object("boulder");
    await des.object("boulder");



    return des.finalize_level();
}