[BACK]Return to Globals.c CVS log [TXT][DIR] Up to [contributed] / brogue-ce / src / brogue

Annotation of brogue-ce/src/brogue/Globals.c, Revision 1.1.1.1

1.1       rubenllo    1: /*
                      2:  *  Globals.c
                      3:  *  Brogue
                      4:  *
                      5:  *  Created by Brian Walker on 1/10/09.
                      6:  *  Copyright 2012. All rights reserved.
                      7:  *
                      8:  *  This file is part of Brogue.
                      9:  *
                     10:  *  This program is free software: you can redistribute it and/or modify
                     11:  *  it under the terms of the GNU Affero General Public License as
                     12:  *  published by the Free Software Foundation, either version 3 of the
                     13:  *  License, or (at your option) any later version.
                     14:  *
                     15:  *  This program is distributed in the hope that it will be useful,
                     16:  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
                     17:  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     18:  *  GNU Affero General Public License for more details.
                     19:  *
                     20:  *  You should have received a copy of the GNU Affero General Public License
                     21:  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
                     22:  */
                     23:
                     24: #include "Rogue.h"
                     25:
                     26: tcell tmap[DCOLS][DROWS];                       // grids with info about the map
                     27: pcell pmap[DCOLS][DROWS];
                     28: short **scentMap;
                     29: cellDisplayBuffer displayBuffer[COLS][ROWS];    // used to optimize plotCharWithColor
                     30: short terrainRandomValues[DCOLS][DROWS][8];
                     31: short **safetyMap;                              // used to help monsters flee
                     32: short **allySafetyMap;                          // used to help allies flee
                     33: short **chokeMap;                               // used to assess the importance of the map's various chokepoints
                     34: const short nbDirs[8][2] = {{0,-1}, {0,1}, {-1,0}, {1,0}, {-1,-1}, {-1,1}, {1,-1}, {1,1}};
                     35: const short cDirs[8][2] = {{0, 1}, {1, 1}, {1, 0}, {1, -1}, {0, -1}, {-1, -1}, {-1, 0}, {-1, 1}};
                     36: short numberOfWaypoints;
                     37: levelData *levels;
                     38: creature player;
                     39: playerCharacter rogue;
                     40: creature *monsters;
                     41: creature *dormantMonsters;
                     42: creature *graveyard;
                     43: creature *purgatory;
                     44: item *floorItems;
                     45: item *packItems;
                     46: item *monsterItemsHopper;
                     47:
                     48: char displayedMessage[MESSAGE_LINES][COLS*2];
                     49: boolean messageConfirmed[MESSAGE_LINES];
                     50: char combatText[COLS * 2];
                     51: short messageArchivePosition;
                     52: char messageArchive[MESSAGE_ARCHIVE_LINES][COLS*2];
                     53:
                     54: char currentFilePath[BROGUE_FILENAME_MAX];
                     55:
                     56: char displayDetail[DCOLS][DROWS];       // used to make certain per-cell data accessible to external code (e.g. terminal adaptations)
                     57:
                     58: #ifdef AUDIT_RNG
                     59: FILE *RNGLogFile;
                     60: #endif
                     61:
                     62: unsigned char inputRecordBuffer[INPUT_RECORD_BUFFER + 100];
                     63: unsigned short locationInRecordingBuffer;
                     64: unsigned long randomNumbersGenerated;
                     65: unsigned long positionInPlaybackFile;
                     66: unsigned long lengthOfPlaybackFile;
                     67: unsigned long recordingLocation;
                     68: unsigned long maxLevelChanges;
                     69: char annotationPathname[BROGUE_FILENAME_MAX];   // pathname of annotation file
                     70: unsigned long previousGameSeed;
                     71:
                     72: //                                  Red     Green   Blue    RedRand GreenRand   BlueRand    Rand    Dances?
                     73: // basic colors
                     74: const color white =                 {100,   100,    100,    0,      0,          0,          0,      false};
                     75: const color gray =                  {50,    50,     50,     0,      0,          0,          0,      false};
                     76: const color darkGray =              {30,    30,     30,     0,      0,          0,          0,      false};
                     77: const color veryDarkGray =          {15,    15,     15,     0,      0,          0,          0,      false};
                     78: const color black =                 {0,     0,      0,      0,      0,          0,          0,      false};
                     79: const color yellow =                {100,   100,    0,      0,      0,          0,          0,      false};
                     80: const color darkYellow =            {50,    50,     0,      0,      0,          0,          0,      false};
                     81: const color teal =                  {30,    100,    100,    0,      0,          0,          0,      false};
                     82: const color purple =                {100,   0,      100,    0,      0,          0,          0,      false};
                     83: const color darkPurple =            {50,    0,      50,     0,      0,          0,          0,      false};
                     84: const color brown =                 {60,    40,     0,      0,      0,          0,          0,      false};
                     85: const color green =                 {0,     100,    0,      0,      0,          0,          0,      false};
                     86: const color darkGreen =             {0,     50,     0,      0,      0,          0,          0,      false};
                     87: const color orange =                {100,   50,     0,      0,      0,          0,          0,      false};
                     88: const color darkOrange =            {50,    25,     0,      0,      0,          0,          0,      false};
                     89: const color blue =                  {0,     0,      100,    0,      0,          0,          0,      false};
                     90: const color darkBlue =              {0,     0,      50,     0,      0,          0,          0,      false};
                     91: const color darkTurquoise =         {0,     40,     65,     0,      0,          0,          0,      false};
                     92: const color lightBlue =             {40,    40,     100,    0,      0,          0,          0,      false};
                     93: const color pink =                  {100,   60,     66,     0,      0,          0,          0,      false};
                     94: const color red  =                  {100,   0,      0,      0,      0,          0,          0,      false};
                     95: const color darkRed =               {50,    0,      0,      0,      0,          0,          0,      false};
                     96: const color tanColor =              {80,    67,     15,     0,      0,          0,          0,      false};
                     97:
                     98: // bolt colors
                     99: const color rainbow =               {-70,   -70,    -70,    170,    170,        170,        0,      true};
                    100: const color descentBoltColor =      {-40,   -40,    -40,    0,      0,          80,         80,     true};
                    101: const color discordColor =          {25,    0,      25,     66,     0,          0,          0,      true};
                    102: const color poisonColor =           {0,     0,      0,      10,     50,         10,         0,      true};
                    103: const color beckonColor =           {10,    10,     10,     5,      5,          5,          50,     true};
                    104: const color invulnerabilityColor =  {25,    0,      25,     0,      0,          66,         0,      true};
                    105: const color dominationColor =       {0,     0,      100,    80,     25,         0,          0,      true};
                    106: const color empowermentColor =      {30,    100,    40,     25,     80,         25,         0,      true};
                    107: const color fireBoltColor =         {500,   150,    0,      45,     30,         0,          0,      true};
                    108: const color yendorLightColor =      {50,    -100,    30,     0,      0,          0,          0,      true};
                    109: const color dragonFireColor =       {500,   150,    0,      45,     30,         45,         0,      true};
                    110: const color flamedancerCoronaColor ={500,   150,    100,    45,     30,         0,          0,      true};
                    111: //const color shieldingColor =      {100,   50,     0,      0,      50,         100,        0,      true};
                    112: const color shieldingColor =        {150,   75,     0,      0,      50,         175,        0,      true};
                    113:
                    114: // tile colors
                    115: const color undiscoveredColor =     {0,     0,      0,      0,      0,          0,          0,      false};
                    116:
                    117: const color wallForeColor =         {7,     7,      7,      3,      3,          3,          0,      false};
                    118:
                    119: color wallBackColor;
                    120: const color wallBackColorStart =    {45,    40,     40,     15,     0,          5,          20,     false};
                    121: const color wallBackColorEnd =      {40,    30,     35,     0,      20,         30,         20,     false};
                    122:
                    123: const color mudWallForeColor =      {55,    45,     0,      5,      5,          5,          1,      false};
                    124: //const color mudWallForeColor =      {40,  34,     7,      0,      3,          0,          3,      false};
                    125: const color mudWallBackColor =      {20,    12,     3,      8,      4,          3,          0,      false};
                    126:
                    127: const color graniteBackColor =      {10,    10,     10,     0,      0,          0,          0,      false};
                    128:
                    129: const color floorForeColor =        {30,    30,     30,     0,      0,          0,          35,     false};
                    130:
                    131: color floorBackColor;
                    132: const color floorBackColorStart =   {2,     2,      10,     2,      2,          0,          0,      false};
                    133: const color floorBackColorEnd =     {5,     5,      5,      2,      2,          0,          0,      false};
                    134:
                    135: const color stairsBackColor =       {15,    15,     5,      0,      0,          0,          0,      false};
                    136: const color firstStairsBackColor =  {10,    10,     25,     0,      0,          0,          0,      false};
                    137:
                    138: const color refuseBackColor =       {6,     5,      3,      2,      2,          0,          0,      false};
                    139: const color rubbleBackColor =       {7,     7,      8,      2,      2,          1,          0,      false};
                    140: const color bloodflowerForeColor =  {30,    5,      40,     5,      1,          3,          0,      false};
                    141: const color bloodflowerPodForeColor = {50,  5,      25,     5,      1,          3,          0,      false};
                    142: const color bloodflowerBackColor =  {15,    3,      10,     3,      1,          3,          0,      false};
                    143: const color bedrollBackColor =      {10,    8,      5,      1,      1,          0,          0,      false};
                    144:
                    145: const color obsidianBackColor =     {6,     0,      8,      2,      0,          3,          0,      false};
                    146: const color carpetForeColor =       {23,    30,     38,     0,      0,          0,          0,      false};
                    147: const color carpetBackColor =       {15,    8,      5,      0,      0,          0,          0,      false};
                    148: const color marbleForeColor =       {30,    23,     38,     0,      0,          0,          0,      false};
                    149: const color marbleBackColor =       {6,     5,      13,     1,      0,          1,          0,      false};
                    150: const color doorForeColor =         {70,    35,     15,     0,      0,          0,          0,      false};
                    151: const color doorBackColor =         {30,    10,     5,      0,      0,          0,          0,      false};
                    152: //const color ironDoorForeColor =       {40,    40,     40,     0,      0,          0,          0,      false};
                    153: const color ironDoorForeColor =     {500,   500,    500,    0,      0,          0,          0,      false};
                    154: const color ironDoorBackColor =     {15,    15,     30,     0,      0,          0,          0,      false};
                    155: const color bridgeFrontColor =      {33,    12,     12,     12,     7,          2,          0,      false};
                    156: const color bridgeBackColor =       {12,    3,      2,      3,      2,          1,          0,      false};
                    157: const color statueBackColor =       {20,    20,     20,     0,      0,          0,          0,      false};
                    158: const color glyphColor =            {20,    5,      5,      50,     0,          0,          0,      true};
                    159: const color glyphLightColor =       {150,   0,      0,      150,    0,          0,          0,      true};
                    160: const color sacredGlyphColor =      {5,     20,     5,      0,      50,         0,          0,      true};
                    161: const color sacredGlyphLightColor = {45,    150,    60,     25,     80,         25,         0,      true};
                    162:
                    163: //const color deepWaterForeColor =  {5,     5,      40,     0,      0,          10,         10,     true};
                    164: //color deepWaterBackColor;
                    165: //const color deepWaterBackColorStart = {5, 5,      55,     5,      5,          10,         10,     true};
                    166: //const color deepWaterBackColorEnd =   {5,     5,      45,     2,      2,          5,          5,      true};
                    167: //const color shallowWaterForeColor =   {40,    40,     90,     0,      0,          10,         10,     true};
                    168: //color shallowWaterBackColor;
                    169: //const color shallowWaterBackColorStart ={30,30,       80,     0,      0,          10,         10,     true};
                    170: //const color shallowWaterBackColorEnd ={20,    20,     60,     0,      0,          5,          5,      true};
                    171:
                    172: const color deepWaterForeColor =    {5,     8,      20,     0,      4,          15,         10,     true};
                    173: color deepWaterBackColor;
                    174: const color deepWaterBackColorStart = {5,   10,     31,     5,      5,          5,          6,      true};
                    175: const color deepWaterBackColorEnd = {5,     8,      20,     2,      3,          5,          5,      true};
                    176: const color shallowWaterForeColor = {28,    28,     60,     0,      0,          10,         10,     true};
                    177: color shallowWaterBackColor;
                    178: const color shallowWaterBackColorStart ={20,20,     60,     0,      0,          10,         10,     true};
                    179: const color shallowWaterBackColorEnd ={12,  15,     40,     0,      0,          5,          5,      true};
                    180:
                    181: const color mudForeColor =          {18,    14,     5,      5,      5,          0,          0,      false};
                    182: const color mudBackColor =          {23,    17,     7,      5,      5,          0,          0,      false};
                    183: const color chasmForeColor =        {7,     7,      15,     4,      4,          8,          0,      false};
                    184: color chasmEdgeBackColor;
                    185: const color chasmEdgeBackColorStart ={5,    5,      25,     2,      2,          2,          0,      false};
                    186: const color chasmEdgeBackColorEnd = {8,     8,      20,     2,      2,          2,          0,      false};
                    187: const color fireForeColor =         {70,    20,     0,      15,     10,         0,          0,      true};
                    188: const color lavaForeColor =         {20,    20,     20,     100,    10,         0,          0,      true};
                    189: const color brimstoneForeColor =    {100,   50,     10,     0,      50,         40,         0,      true};
                    190: const color brimstoneBackColor =    {18,    12,     9,      0,      0,          5,          0,      false};
                    191:
                    192: const color lavaBackColor =         {70,    20,     0,      15,     10,         0,          0,      true};
                    193: const color acidBackColor =         {15,    80,     25,     5,      15,         10,         0,      true};
                    194:
                    195: const color lightningColor =        {100,   150,    500,    50,     50,         0,          50,     true};
                    196: const color fungusLightColor =      {2,     11,     11,     4,      3,          3,          0,      true};
                    197: const color lavaLightColor =        {47,    13,     0,      10,     7,          0,          0,      true};
                    198: const color deepWaterLightColor =   {10,    30,     100,    0,      30,         100,        0,      true};
                    199:
                    200: const color grassColor =            {15,    40,     15,     15,     50,         15,         10,     false};
                    201: const color deadGrassColor =        {20,    13,     0,      20,     10,         5,          10,     false};
                    202: const color fungusColor =           {15,    50,     50,     0,      25,         0,          30,     true};
                    203: const color grayFungusColor =       {30,    30,     30,     5,      5,          5,          10,     false};
                    204: const color foliageColor =          {25,    100,    25,     15,     0,          15,         0,      false};
                    205: const color deadFoliageColor =      {20,    13,     0,      30,     15,         0,          20,     false};
                    206: const color lichenColor =           {50,    5,      25,     10,     0,          5,          0,      true};
                    207: const color hayColor =              {70,    55,     5,      0,      20,         20,         0,      false};
                    208: const color ashForeColor =          {20,    20,     20,     0,      0,          0,          20,     false};
                    209: const color bonesForeColor =        {80,    80,     30,     5,      5,          35,         5,      false};
                    210: const color ectoplasmColor =        {45,    20,     55,     25,     0,          25,         5,      false};
                    211: const color forceFieldColor =       {0,     25,     25,     0,      25,         25,         0,      true};
                    212: const color wallCrystalColor =      {40,    40,     60,     20,     20,         40,         0,      true};
                    213: const color altarForeColor =        {5,     7,      9,      0,      0,          0,          0,      false};
                    214: const color altarBackColor =        {35,    18,     18,     0,      0,          0,          0,      false};
                    215: const color greenAltarBackColor =   {18,    25,     18,     0,      0,          0,          0,      false};
                    216: const color goldAltarBackColor =    {25,    24,     12,     0,      0,          0,          0,      false};
                    217: const color pedestalBackColor =     {10,    5,      20,     0,      0,          0,          0,      false};
                    218:
                    219: // monster colors
                    220: const color goblinColor =           {40,    30,     20,     0,      0,          0,          0,      false};
                    221: const color jackalColor =           {60,    42,     27,     0,      0,          0,          0,      false};
                    222: const color ogreColor =             {60,    25,     25,     0,      0,          0,          0,      false};
                    223: const color eelColor =              {30,    12,     12,     0,      0,          0,          0,      false};
                    224: const color goblinConjurerColor =   {67,    10,     100,    0,      0,          0,          0,      false};
                    225: const color spectralBladeColor =    {15,    15,     60,     0,      0,          70,         50,     true};
                    226: const color spectralImageColor =    {13,    0,      0,      25,     0,          0,          0,      true};
                    227: const color toadColor =             {40,    65,     30,     0,      0,          0,          0,      false};
                    228: const color trollColor =            {40,    60,     15,     0,      0,          0,          0,      false};
                    229: const color centipedeColor =        {75,    25,     85,     0,      0,          0,          0,      false};
                    230: const color dragonColor =           {20,    80,     15,     0,      0,          0,          0,      false};
                    231: const color krakenColor =           {100,   55,     55,     0,      0,          0,          0,      false};
                    232: const color salamanderColor =       {40,    10,     0,      8,      5,          0,          0,      true};
                    233: const color pixieColor =            {60,    60,     60,     40,     40,         40,         0,      true};
                    234: const color darPriestessColor =     {0,     50,     50,     0,      0,          0,          0,      false};
                    235: const color darMageColor =          {50,    50,     0,      0,      0,          0,          0,      false};
                    236: const color wraithColor =           {66,    66,     25,     0,      0,          0,          0,      false};
                    237: const color pinkJellyColor =        {100,   40,     40,     5,      5,          5,          20,     true};
                    238: const color wormColor =             {80,    60,     40,     0,      0,          0,          0,      false};
                    239: const color sentinelColor =         {3,     3,      30,     0,      0,          10,         0,      true};
                    240: const color goblinMysticColor =     {10,    67,     100,    0,      0,          0,          0,      false};
                    241: const color ifritColor =            {50,    10,     100,    75,     0,          20,         0,      true};
                    242: const color phoenixColor =          {100,   0,      0,      0,      100,        0,          0,      true};
                    243:
                    244: // light colors
                    245: color minersLightColor;
                    246: const color minersLightStartColor = {180,   180,    180,    0,      0,          0,          0,      false};
                    247: const color minersLightEndColor =   {90,    90,     120,    0,      0,          0,          0,      false};
                    248: const color torchColor =            {150,   75,     30,     0,      30,         20,         0,      true};
                    249: const color torchLightColor =       {75,    38,     15,     0,      15,         7,          0,      true};
                    250: //const color hauntedTorchColor =     {75,  30,     150,    30,     20,         0,          0,      true};
                    251: const color hauntedTorchColor =     {75,    20,     40,     30,     10,         0,          0,      true};
                    252: //const color hauntedTorchLightColor ={19,     7,       37,     8,      4,          0,          0,      true};
                    253: const color hauntedTorchLightColor ={67,    10,     10,     20,     4,          0,          0,      true};
                    254: const color ifritLightColor =       {0,     10,     150,    100,    0,          100,        0,      true};
                    255: //const color unicornLightColor =       {-50,   -50,    -50,    200,    200,        200,        0,      true};
                    256: const color unicornLightColor =     {-50,   -50,    -50,    250,    250,        250,        0,      true};
                    257: const color wispLightColor =        {75,    100,    250,    33,     10,         0,          0,      true};
                    258: const color summonedImageLightColor ={200,  0,      75,     0,      0,          0,          0,      true};
                    259: const color spectralBladeLightColor ={40,   0,      230,    0,      0,          0,          0,      true};
                    260: const color ectoplasmLightColor =   {23,    10,     28,     13,     0,          13,         3,      false};
                    261: const color explosionColor =        {10,    8,      2,      0,      2,          2,          0,      true};
                    262: const color explosiveAuraColor =    {2000,  0,      -1000,  200,    200,        0,          0,      true};
                    263: const color sacrificeTargetColor =  {100,   -100,   -300,   0,      100,        100,        0,      true};
                    264: const color dartFlashColor =        {500,   500,    500,    0,      2,          2,          0,      true};
                    265: const color lichLightColor =        {-50,   80,     30,     0,      0,          20,         0,      true};
                    266: const color forceFieldLightColor =  {10,    10,     10,     0,      50,         50,         0,      true};
                    267: const color crystalWallLightColor = {10,    10,     10,     0,      0,          50,         0,      true};
                    268: const color sunLightColor =         {100,   100,    75,     0,      0,          0,          0,      false};
                    269: const color fungusForestLightColor ={30,    40,     60,     0,      0,          0,          40,     true};
                    270: const color fungusTrampledLightColor ={10,  10,     10,     0,      50,         50,         0,      true};
                    271: const color redFlashColor =         {100,   10,     10,     0,      0,          0,          0,      false};
                    272: const color darknessPatchColor =    {-10,   -10,    -10,    0,      0,          0,          0,      false};
                    273: const color darknessCloudColor =    {-20,   -20,    -20,    0,      0,          0,          0,      false};
                    274: const color magicMapFlashColor =    {60,    20,     60,     0,      0,          0,          0,      false};
                    275: const color sentinelLightColor =    {20,    20,     120,    10,     10,         60,         0,      true};
                    276: const color telepathyColor =        {30,    30,     130,    0,      0,          0,          0,      false};
                    277: const color confusionLightColor =   {10,    10,     10,     10,     10,         10,         0,      true};
                    278: const color portalActivateLightColor ={300, 400,    500,    0,      0,          0,          0,      true};
                    279: const color descentLightColor =     {20,    20,     70,     0,      0,          0,          0,      false};
                    280: const color algaeBlueLightColor =   {20,    15,     50,     0,      0,          0,          0,      false};
                    281: const color algaeGreenLightColor =  {15,    50,     20,     0,      0,          0,          0,      false};
                    282:
                    283: // flare colors
                    284: const color scrollProtectionColor = {375,   750,    0,      0,      0,          0,          0,      true};
                    285: const color scrollEnchantmentColor ={250,   225,    300,    0,      0,          450,        0,      true};
                    286: const color potionStrengthColor =   {1000,  0,      400,    600,    0,          0,          0,      true};
                    287: const color empowermentFlashColor = {500,   1000,   600,    0,      500,        0,          0,      true};
                    288: const color genericFlashColor =     {800,   800,    800,    0,      0,          0,          0,      false};
                    289: const color summoningFlashColor =   {0,     0,      0,      600,    0,          1200,       0,      true};
                    290: const color fireFlashColor =        {750,   225,    0,      100,    50,         0,          0,      true};
                    291: const color explosionFlareColor =   {10000, 6000,   1000,   0,      0,          0,          0,      false};
                    292: const color quietusFlashColor =     {0,     -1000,  -200,   0,      0,          0,          0,      true};
                    293: const color slayingFlashColor =     {-1000, -200,   0,      0,      0,          0,          0,      true};
                    294:
                    295: // color multipliers
                    296: const color colorDim25 =            {25,    25,     25,     25,     25,         25,         25,     false};
                    297: const color colorMultiplier100 =    {100,   100,    100,    100,    100,        100,        100,    false};
                    298: const color memoryColor =           {25,    25,     50,     20,     20,         20,         0,      false};
                    299: const color memoryOverlay =         {25,    25,     50,     0,      0,          0,          0,      false};
                    300: const color magicMapColor =         {60,    20,     60,     60,     20,         60,         0,      false};
                    301: const color clairvoyanceColor =     {50,    90,     50,     50,     90,         50,         66,     false};
                    302: const color telepathyMultiplier =   {30,    30,     130,    30,     30,         130,        66,     false};
                    303: const color omniscienceColor =      {140,   100,    60,     140,    100,        60,         90,     false};
                    304: const color basicLightColor =       {180,   180,    180,    180,    180,        180,        180,    false};
                    305:
                    306: // blood colors
                    307: const color humanBloodColor =       {60,    20,     10,     15,     0,          0,          15,     false};
                    308: const color insectBloodColor =      {10,    60,     20,     0,      15,         0,          15,     false};
                    309: const color vomitColor =            {60,    50,     5,      0,      15,         15,         0,      false};
                    310: const color urineColor =            {70,    70,     40,     0,      0,          0,          10,     false};
                    311: const color methaneColor =          {45,    60,     15,     0,      0,          0,          0,      false};
                    312:
                    313: // gas colors
                    314: const color poisonGasColor =        {75,    25,     85,     0,      0,          0,          0,      false};
                    315: const color confusionGasColor =     {60,    60,     60,     40,     40,         40,         0,      true};
                    316:
                    317: // interface colors
                    318: const color itemColor =             {100,   95,     -30,    0,      0,          0,          0,      false};
                    319: const color blueBar =               {15,    10,     50,     0,      0,          0,          0,      false};
                    320: const color redBar =                {45,    10,     15,     0,      0,          0,          0,      false};
                    321: const color hiliteColor =           {100,   100,    0,      0,      0,          0,          0,      false};
                    322: const color interfaceBoxColor =     {7,     6,      15,     0,      0,          0,          0,      false};
                    323: const color interfaceButtonColor =  {18,    15,     38,     0,      0,          0,          0,      false};
                    324: const color buttonHoverColor =      {100,   70,     40,     0,      0,          0,          0,      false};
                    325: const color titleButtonColor =      {23,    15,     30,     0,      0,          0,          0,      false};
                    326:
                    327: const color playerInvisibleColor =  {20,    20,     30,     0,      0,          80,         0,      true};
                    328: const color playerInLightColor =    {100,   90,     30,     0,      0,          0,          0,      false};
                    329: const color playerInShadowColor =   {60,    60,     100,    0,      0,          0,          0,      false};
                    330: const color playerInDarknessColor = {30,    30,     65,     0,      0,          0,          0,      false};
                    331:
                    332: const color inLightMultiplierColor ={150,   150,    75,     150,    150,        75,         100,    true};
                    333: const color inDarknessMultiplierColor={66,  66,     120,    66,     66,         120,        66,     true};
                    334:
                    335: const color goodMessageColor =      {60,    50,     100,    0,      0,          0,          0,      false};
                    336: const color badMessageColor =       {100,   50,     60,     0,      0,          0,          0,      false};
                    337: const color advancementMessageColor ={50,   100,    60,     0,      0,          0,          0,      false};
                    338: const color itemMessageColor =      {100,   100,    50,     0,      0,          0,          0,      false};
                    339: const color flavorTextColor =       {50,    40,     90,     0,      0,          0,          0,      false};
                    340: const color backgroundMessageColor ={60,    20,     70,     0,      0,          0,          0,      false};
                    341:
                    342: const color superVictoryColor =     {150,   100,    300,    0,      0,          0,          0,      false};
                    343:
                    344: //const color flameSourceColor = {0, 0, 0, 65, 40, 100, 0, true}; // 1
                    345: //const color flameSourceColor = {0, 0, 0, 80, 50, 100, 0, true}; // 2
                    346: //const color flameSourceColor = {25, 13, 25, 50, 25, 50, 0, true}; // 3
                    347: //const color flameSourceColor = {20, 20, 20, 60, 20, 40, 0, true}; // 4
                    348: //const color flameSourceColor = {30, 18, 18, 70, 36, 36, 0, true}; // 7**
                    349: const color flameSourceColor = {20, 7, 7, 60, 40, 40, 0, true}; // 8
                    350: const color flameSourceColorSecondary = {7, 2, 0, 10, 0, 0, 0, true};
                    351:
                    352: //const color flameTitleColor = {0, 0, 0, 17, 10, 6, 0, true}; // pale orange
                    353: //const color flameTitleColor = {0, 0, 0, 7, 7, 10, 0, true}; // *pale blue*
                    354: const color flameTitleColor = {0, 0, 0, 9, 9, 15, 0, true}; // *pale blue**
                    355: //const color flameTitleColor = {0, 0, 0, 11, 11, 18, 0, true}; // *pale blue*
                    356: //const color flameTitleColor = {0, 0, 0, 15, 15, 9, 0, true}; // pale yellow
                    357: //const color flameTitleColor = {0, 0, 0, 15, 9, 15, 0, true}; // pale purple
                    358:
                    359: const color *dynamicColors[NUMBER_DYNAMIC_COLORS][3] = {
                    360:     // used color           shallow color               deep color
                    361:     {&minersLightColor,     &minersLightStartColor,     &minersLightEndColor},
                    362:     {&wallBackColor,        &wallBackColorStart,        &wallBackColorEnd},
                    363:     {&deepWaterBackColor,   &deepWaterBackColorStart,   &deepWaterBackColorEnd},
                    364:     {&shallowWaterBackColor,&shallowWaterBackColorStart,&shallowWaterBackColorEnd},
                    365:     {&floorBackColor,       &floorBackColorStart,       &floorBackColorEnd},
                    366:     {&chasmEdgeBackColor,   &chasmEdgeBackColorStart,   &chasmEdgeBackColorEnd},
                    367: };
                    368:
                    369: const autoGenerator autoGeneratorCatalog[NUMBER_AUTOGENERATORS] = {
                    370: //   terrain                    layer   DF                          Machine                     reqDungeon  reqLiquid   >Depth  <Depth          freq    minIncp minSlope    maxNumber
                    371:     // Ordinary features of the dungeon
                    372:     {0,                         0,      DF_GRANITE_COLUMN,          0,                          FLOOR,      NOTHING,    1,      DEEPEST_LEVEL,  60,     100,    0,          4},
                    373:     {0,                         0,      DF_CRYSTAL_WALL,            0,                          WALL,       NOTHING,    14,     DEEPEST_LEVEL,  15,     -325,   25,         5},
                    374:     {0,                         0,      DF_LUMINESCENT_FUNGUS,      0,                          FLOOR,      NOTHING,    7,      DEEPEST_LEVEL,  15,     -300,   70,         14},
                    375:     {0,                         0,      DF_GRASS,                   0,                          FLOOR,      NOTHING,    0,      10,             0,      1000,   -80,        10},
                    376:     {0,                         0,      DF_DEAD_GRASS,              0,                          FLOOR,      NOTHING,    4,      9,              0,      -200,   80,         10},
                    377:     {0,                         0,      DF_DEAD_GRASS,              0,                          FLOOR,      NOTHING,    9,      14,             0,      1200,   -80,        10},
                    378:     {0,                         0,      DF_BONES,                   0,                          FLOOR,      NOTHING,    12,     DEEPEST_LEVEL-1,30,     0,      0,          4},
                    379:     {0,                         0,      DF_RUBBLE,                  0,                          FLOOR,      NOTHING,    0,      DEEPEST_LEVEL-1,30,     0,      0,          4},
                    380:     {0,                         0,      DF_FOLIAGE,                 0,                          FLOOR,      NOTHING,    0,      8,              15,     1000,   -333,       10},
                    381:     {0,                         0,      DF_FUNGUS_FOREST,           0,                          FLOOR,      NOTHING,    13,     DEEPEST_LEVEL,  30,     -600,   50,         12},
                    382:     {0,                         0,      DF_BUILD_ALGAE_WELL,        0,                          FLOOR,      DEEP_WATER, 10,     DEEPEST_LEVEL,  50,     0,      0,          2},
                    383:     {STATUE_INERT,              DUNGEON,0,                          0,                          WALL,       NOTHING,    6,      DEEPEST_LEVEL-1,5,      -100,   35,         3},
                    384:     {STATUE_INERT,              DUNGEON,0,                          0,                          FLOOR,      NOTHING,    10,     DEEPEST_LEVEL-1,50,     0,      0,          3},
                    385:     {TORCH_WALL,                DUNGEON,0,                          0,                          WALL,       NOTHING,    6,      DEEPEST_LEVEL-1,5,      -200,   70,         12},
                    386:
                    387:     // Pre-revealed traps
                    388:     {GAS_TRAP_POISON,           DUNGEON,0,                          0,                          FLOOR,      NOTHING,    2,      4,              20,     0,      0,          1},
                    389:     {NET_TRAP,                  DUNGEON,0,                          0,                          FLOOR,      NOTHING,    2,      5,              20,     0,      0,          1},
                    390:     {0,                         0,      0,                          MT_PARALYSIS_TRAP_AREA,     FLOOR,      NOTHING,    2,      6,              20,     0,      0,          1},
                    391:     {ALARM_TRAP,                DUNGEON,0,                          0,                          FLOOR,      NOTHING,    4,      7,              20,     0,      0,          1},
                    392:     {GAS_TRAP_CONFUSION,        DUNGEON,0,                          0,                          FLOOR,      NOTHING,    2,      10,             20,     0,      0,          1},
                    393:     {FLAMETHROWER,              DUNGEON,0,                          0,                          FLOOR,      NOTHING,    4,      12,             20,     0,      0,          1},
                    394:     {FLOOD_TRAP,                DUNGEON,0,                          0,                          FLOOR,      NOTHING,    10,     14,             20,     0,      0,          1},
                    395:
                    396:     // Hidden traps
                    397:     {GAS_TRAP_POISON_HIDDEN,    DUNGEON,0,                          0,                          FLOOR,      NOTHING,    5,      DEEPEST_LEVEL-1,20,     100,    0,          3},
                    398:     {NET_TRAP_HIDDEN,           DUNGEON,0,                          0,                          FLOOR,      NOTHING,    6,      DEEPEST_LEVEL-1,20,     100,    0,          3},
                    399:     {0,                         0,      0,                          MT_PARALYSIS_TRAP_HIDDEN_AREA, FLOOR,   NOTHING,    7,      DEEPEST_LEVEL-1,20,     100,    0,          3},
                    400:     {ALARM_TRAP_HIDDEN,         DUNGEON,0,                          0,                          FLOOR,      NOTHING,    8,      DEEPEST_LEVEL-1,20,     100,    0,          2},
                    401:     {TRAP_DOOR_HIDDEN,          DUNGEON,0,                          0,                          FLOOR,      NOTHING,    9,      DEEPEST_LEVEL-1,20,     100,    0,          2},
                    402:     {GAS_TRAP_CONFUSION_HIDDEN, DUNGEON,0,                          0,                          FLOOR,      NOTHING,    11,     DEEPEST_LEVEL-1,20,     100,    0,          3},
                    403:     {FLAMETHROWER_HIDDEN,       DUNGEON,0,                          0,                          FLOOR,      NOTHING,    13,     DEEPEST_LEVEL-1,20,     100,    0,          3},
                    404:     {FLOOD_TRAP_HIDDEN,         DUNGEON,0,                          0,                          FLOOR,      NOTHING,    15,     DEEPEST_LEVEL-1,20,     100,    0,          3},
                    405:     {0,                         0,      0,                          MT_SWAMP_AREA,              FLOOR,      NOTHING,    1,      DEEPEST_LEVEL-1,30,     0,      0,          2},
                    406:     {0,                         0,      DF_SUNLIGHT,                0,                          FLOOR,      NOTHING,    0,      5,              15,     500,    -150,       10},
                    407:     {0,                         0,      DF_DARKNESS,                0,                          FLOOR,      NOTHING,    1,      15,             15,     500,    -50,        10},
                    408:     {STEAM_VENT,                DUNGEON,0,                          0,                          FLOOR,      NOTHING,    16,     DEEPEST_LEVEL-1,30,     100,    0,          3},
                    409:     {CRYSTAL_WALL,              DUNGEON,0,                          0,                          WALL,       NOTHING,    DEEPEST_LEVEL,DEEPEST_LEVEL,100,0,      0,          600},
                    410:
                    411:     // Dewars
                    412:     {DEWAR_CAUSTIC_GAS,         DUNGEON,DF_CARPET_AREA,             0,                          FLOOR,      NOTHING,    8,      DEEPEST_LEVEL-1,2,      0,      0,          2},
                    413:     {DEWAR_CONFUSION_GAS,       DUNGEON,DF_CARPET_AREA,             0,                          FLOOR,      NOTHING,    8,      DEEPEST_LEVEL-1,2,      0,      0,          2},
                    414:     {DEWAR_PARALYSIS_GAS,       DUNGEON,DF_CARPET_AREA,             0,                          FLOOR,      NOTHING,    8,      DEEPEST_LEVEL-1,2,      0,      0,          2},
                    415:     {DEWAR_METHANE_GAS,         DUNGEON,DF_CARPET_AREA,             0,                          FLOOR,      NOTHING,    8,      DEEPEST_LEVEL-1,2,      0,      0,          2},
                    416:
                    417:     // Flavor machines
                    418:     {0,                         0,      DF_LUMINESCENT_FUNGUS,      0,                          FLOOR,      NOTHING,    DEEPEST_LEVEL,DEEPEST_LEVEL,100,0,      0,          200},
                    419:     {0,                         0,      0,                          MT_BLOODFLOWER_AREA,        FLOOR,      NOTHING,    1,      30,             25,     140,    -10,        3},
                    420:     {0,                         0,      0,                          MT_SHRINE_AREA,             FLOOR,      NOTHING,    5,      AMULET_LEVEL,   7,      0,      0,          1},
                    421:     {0,                         0,      0,                          MT_IDYLL_AREA,              FLOOR,      NOTHING,    1,      5,              15,     0,      0,          1},
                    422:     {0,                         0,      0,                          MT_REMNANT_AREA,            FLOOR,      NOTHING,    10,     DEEPEST_LEVEL,  15,     0,      0,          2},
                    423:     {0,                         0,      0,                          MT_DISMAL_AREA,             FLOOR,      NOTHING,    7,      DEEPEST_LEVEL,  12,     0,      0,          5},
                    424:     {0,                         0,      0,                          MT_BRIDGE_TURRET_AREA,      FLOOR,      NOTHING,    5,      DEEPEST_LEVEL-1,6,      0,      0,          2},
                    425:     {0,                         0,      0,                          MT_LAKE_PATH_TURRET_AREA,   FLOOR,      NOTHING,    5,      DEEPEST_LEVEL-1,6,      0,      0,          2},
                    426:     {0,                         0,      0,                          MT_TRICK_STATUE_AREA,       FLOOR,      NOTHING,    6,      DEEPEST_LEVEL-1,15,     0,      0,          3},
                    427:     {0,                         0,      0,                          MT_SENTINEL_AREA,           FLOOR,      NOTHING,    12,     DEEPEST_LEVEL-1,10,     0,      0,          2},
                    428:     {0,                         0,      0,                          MT_WORM_AREA,               FLOOR,      NOTHING,    12,     DEEPEST_LEVEL-1,12,     0,      0,          3},
                    429: };
                    430:
                    431: const floorTileType tileCatalog[NUMBER_TILETYPES] = {
                    432:
                    433:     // promoteChance is in hundredths of a percent per turn
                    434:
                    435:     //  char        fore color              back color      priority    ignit   fireType    discovType  promoteType     promoteChance   glowLight       flags                                                                                               description         flavorText
                    436:
                    437:     // dungeon layer (this layer must have all of fore color, back color and char)
                    438:     {   ' ',        &black,                 &black,                 100,0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       0, 0,                                                                                               "a chilly void",        ""},
                    439:     {G_GRANITE,     &wallBackColor,         &graniteBackColor,      0,  0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (T_OBSTRUCTS_EVERYTHING), (TM_STAND_IN_TILE),                                                       "a rough granite wall", "The granite is split open with splinters of rock jutting out at odd angles."},
                    440:     {G_FLOOR,       &floorForeColor,        &floorBackColor,        95, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       0, 0,                                                                                               "the ground",           ""},
                    441:     {G_FLOOR,       &floorForeColor,        &floorBackColor,        95, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       0, 0,                                                                                               "the ground",           ""},
                    442:     {G_CARPET,      &carpetForeColor,       &carpetBackColor,       85, 0,  DF_EMBERS,      0,          0,              0,              NO_LIGHT,       (T_IS_FLAMMABLE), (TM_VANISHES_UPON_PROMOTION),                                                     "the carpet",           "Ornate carpeting fills this room, a relic of ages past."},
                    443:     {G_CARPET,      &marbleForeColor,       &marbleBackColor,       85, 0,  DF_EMBERS,      0,          0,              0,              NO_LIGHT,       0, 0,                                                                                               "the marble ground",    "Light from the nearby crystals catches the grain of the lavish marble floor."},
                    444:     {G_WALL,        &wallForeColor,         &wallBackColor,         0,  0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (T_OBSTRUCTS_EVERYTHING), (TM_STAND_IN_TILE),                                                       "a stone wall",         "The rough stone wall is firm and unyielding."},
                    445:     {G_CLOSED_DOOR, &doorForeColor,         &doorBackColor,         25, 50, DF_EMBERS,      0,          DF_OPEN_DOOR,   0,              NO_LIGHT,       (T_OBSTRUCTS_VISION | T_OBSTRUCTS_GAS | T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_PROMOTES_ON_STEP | TM_VISUALLY_DISTINCT), "a wooden door", "you pass through the doorway."},
                    446:     {G_OPEN_DOOR,   &doorForeColor,         &doorBackColor,         25, 50, DF_EMBERS,      0,          DF_CLOSED_DOOR, 10000,          NO_LIGHT,       (T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_VISUALLY_DISTINCT),           "an open door",         "you pass through the doorway."},
                    447:     {G_WALL,        &wallForeColor,         &wallBackColor,         0,  50, DF_EMBERS,      DF_SHOW_DOOR,0,             0,              NO_LIGHT,       (T_OBSTRUCTS_EVERYTHING | T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_IS_SECRET),  "a stone wall",     "The rough stone wall is firm and unyielding."},
                    448:     {G_CLOSED_IRON_DOOR,&ironDoorForeColor, &ironDoorBackColor,     15, 50, DF_EMBERS,      0,          DF_OPEN_IRON_DOOR_INERT,0,      NO_LIGHT,       (T_OBSTRUCTS_EVERYTHING), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_PROMOTES_WITH_KEY | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT | TM_BRIGHT_MEMORY | TM_INTERRUPT_EXPLORATION_WHEN_SEEN | TM_INVERT_WHEN_HIGHLIGHTED),  "a locked iron door",   "you search your pack but do not have a matching key."},
                    449:     {G_OPEN_IRON_DOOR,&white,               &ironDoorBackColor,     90, 50, DF_EMBERS,      0,          0,              0,              NO_LIGHT,       (T_OBSTRUCTS_SURFACE_EFFECTS), (TM_STAND_IN_TILE | TM_VISUALLY_DISTINCT),                           "an open iron door",    "you pass through the doorway."},
                    450:     {G_DOWN_STAIRS, &itemColor,             &stairsBackColor,       30, 0,  DF_PLAIN_FIRE,  0,          DF_REPEL_CREATURES, 0,          NO_LIGHT,       (T_OBSTRUCTS_ITEMS | T_OBSTRUCTS_SURFACE_EFFECTS), (TM_PROMOTES_ON_STEP | TM_STAND_IN_TILE | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT | TM_BRIGHT_MEMORY | TM_INTERRUPT_EXPLORATION_WHEN_SEEN | TM_INVERT_WHEN_HIGHLIGHTED), "a downward staircase",   "stairs spiral downward into the depths."},
                    451:     {G_UP_STAIRS,   &itemColor,             &stairsBackColor,       30, 0,  DF_PLAIN_FIRE,  0,          DF_REPEL_CREATURES, 0,          NO_LIGHT,       (T_OBSTRUCTS_ITEMS | T_OBSTRUCTS_SURFACE_EFFECTS), (TM_PROMOTES_ON_STEP | TM_STAND_IN_TILE | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT | TM_BRIGHT_MEMORY | TM_INTERRUPT_EXPLORATION_WHEN_SEEN | TM_INVERT_WHEN_HIGHLIGHTED), "an upward staircase",    "stairs spiral upward."},
                    452:     {G_DOORWAY,    &lightBlue,             &firstStairsBackColor,  30, 0,  DF_PLAIN_FIRE,  0,          DF_REPEL_CREATURES, 0,          NO_LIGHT,       (T_OBSTRUCTS_ITEMS | T_OBSTRUCTS_SURFACE_EFFECTS), (TM_PROMOTES_ON_STEP | TM_STAND_IN_TILE | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT | TM_BRIGHT_MEMORY | TM_INTERRUPT_EXPLORATION_WHEN_SEEN | TM_INVERT_WHEN_HIGHLIGHTED), "the dungeon exit",       "the gilded doors leading out of the dungeon are sealed by an invisible force."},
                    453:     {G_DOORWAY,    &wallCrystalColor,      &firstStairsBackColor,  30, 0,  DF_PLAIN_FIRE,  0,          DF_REPEL_CREATURES, 0,          INCENDIARY_DART_LIGHT,      (T_OBSTRUCTS_ITEMS | T_OBSTRUCTS_SURFACE_EFFECTS), (TM_PROMOTES_ON_STEP | TM_STAND_IN_TILE | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT | TM_BRIGHT_MEMORY | TM_INTERRUPT_EXPLORATION_WHEN_SEEN | TM_INVERT_WHEN_HIGHLIGHTED), "a crystal portal",       "dancing lights play across the plane of this sparkling crystal portal."},
                    454:     {G_TORCH,      &torchColor,            &wallBackColor,         0,  0,  DF_PLAIN_FIRE,  0,          0,              0,              TORCH_LIGHT,    (T_OBSTRUCTS_EVERYTHING), (TM_STAND_IN_TILE),                                                       "a wall-mounted torch", "The torch is anchored firmly to the wall and sputters quietly in the gloom."},
                    455:     {G_CRYSTAL,    &wallCrystalColor,      &wallCrystalColor,      0,  0,  DF_PLAIN_FIRE,  0,          0,              0,              CRYSTAL_WALL_LIGHT,(T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_ITEMS | T_OBSTRUCTS_GAS | T_OBSTRUCTS_SURFACE_EFFECTS | T_OBSTRUCTS_DIAGONAL_MOVEMENT), (TM_STAND_IN_TILE | TM_REFLECTS_BOLTS),"a crystal formation", "You feel the crystal's glossy surface and admire the dancing lights beneath."},
                    456:     {G_PORTCULLIS, &gray,                  &floorBackColor,        10, 0,  DF_PLAIN_FIRE,  0,          DF_OPEN_PORTCULLIS, 0,          NO_LIGHT,       (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_ITEMS), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT | TM_CONNECTS_LEVEL), "a heavy portcullis", "The iron bars rattle but will not budge; they are firmly locked in place."},
                    457:     {G_FLOOR,      &floorForeColor,        &floorBackColor,        95, 0,  DF_PLAIN_FIRE,  0,          DF_ACTIVATE_PORTCULLIS,0,       NO_LIGHT,       (0), (TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED),                                                    "the ground",           ""},
                    458:     {G_BARRICADE,  &doorForeColor,         &floorBackColor,        10, 100,DF_WOODEN_BARRICADE_BURN,0, 0,              0,              NO_LIGHT,       (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_ITEMS | T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_VISUALLY_DISTINCT | TM_CONNECTS_LEVEL),"a dry wooden barricade","The wooden barricade is firmly set but has dried over the years. Might it burn?"},
                    459:     {G_TORCH,     &torchLightColor,       &wallBackColor,         0,  0,  DF_PLAIN_FIRE,  0,          DF_PILOT_LIGHT, 0,              TORCH_LIGHT,    (T_OBSTRUCTS_EVERYTHING), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED),            "a wall-mounted torch", "The torch is anchored firmly to the wall, and sputters quietly in the gloom."},
                    460:     {G_FIRE,     &fireForeColor,         &wallBackColor,         0,  0,  DF_PLAIN_FIRE,  0,          0,              0,              TORCH_LIGHT,    (T_OBSTRUCTS_EVERYTHING | T_IS_FIRE), (TM_STAND_IN_TILE | TM_LIST_IN_SIDEBAR),                      "a fallen torch",       "The torch lies at the foot of the wall, spouting gouts of flame haphazardly."},
                    461:     {G_TORCH,       &torchColor,            &wallBackColor,         0,  0,  DF_PLAIN_FIRE,  0,          DF_HAUNTED_TORCH_TRANSITION,0,  TORCH_LIGHT,    (T_OBSTRUCTS_EVERYTHING), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED),            "a wall-mounted torch", "The torch is anchored firmly to the wall and sputters quietly in the gloom."},
                    462:     {G_TORCH,       &torchColor,            &wallBackColor,         0,  0,  DF_PLAIN_FIRE,  0,          DF_HAUNTED_TORCH,2000,          TORCH_LIGHT,    (T_OBSTRUCTS_EVERYTHING), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION),                          "a wall-mounted torch", "The torch is anchored firmly to the wall and sputters quietly in the gloom."},
                    463:     {G_TORCH,       &hauntedTorchColor,     &wallBackColor,         0,  0,  DF_PLAIN_FIRE,  0,          0,              0,              HAUNTED_TORCH_LIGHT,(T_OBSTRUCTS_EVERYTHING), (TM_STAND_IN_TILE),                                                   "a sputtering torch",   "A dim purple flame sputters and spits atop this wall-mounted torch."},
                    464:     {G_WALL,        &wallForeColor,         &wallBackColor,         0,  0,  DF_PLAIN_FIRE,  DF_REVEAL_LEVER,0,          0,              NO_LIGHT,       (T_OBSTRUCTS_EVERYTHING), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_IS_SECRET),           "a stone wall",         "The rough stone wall is firm and unyielding."},
                    465:     {G_LEVER,       &wallForeColor,         &wallBackColor,         0,  0,  DF_PLAIN_FIRE,  0,          DF_PULL_LEVER,  0,              NO_LIGHT,       (T_OBSTRUCTS_EVERYTHING), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_PROMOTES_ON_PLAYER_ENTRY | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT | TM_INVERT_WHEN_HIGHLIGHTED),"a lever", "The lever moves."},
                    466:     {G_LEVER_PULLED,&wallForeColor,      &wallBackColor,         0,  0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (T_OBSTRUCTS_EVERYTHING), (TM_STAND_IN_TILE),                                                       "an inactive lever",    "The lever won't budge."},
                    467:     {G_WALL,     &wallForeColor,         &wallBackColor,         0,  0,  DF_PLAIN_FIRE,  0,          DF_CREATE_LEVER,0,              NO_LIGHT,       (T_OBSTRUCTS_EVERYTHING), (TM_STAND_IN_TILE | TM_IS_WIRED),                                         "a stone wall",         "The rough stone wall is firm and unyielding."},
                    468:     {G_STATUE,   &wallBackColor,         &statueBackColor,       0,  0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_ITEMS | T_OBSTRUCTS_GAS | T_OBSTRUCTS_SURFACE_EFFECTS), (TM_STAND_IN_TILE),  "a marble statue",  "The cold marble statue has weathered the years with grace."},
                    469:     {G_STATUE,   &wallBackColor,         &statueBackColor,       0,  0,  DF_PLAIN_FIRE,  0,          DF_CRACKING_STATUE,0,           NO_LIGHT,       (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_ITEMS | T_OBSTRUCTS_GAS | T_OBSTRUCTS_SURFACE_EFFECTS), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED),"a marble statue", "The cold marble statue has weathered the years with grace."},
                    470:     {G_CRACKED_STATUE,   &wallBackColor,         &statueBackColor,       0,  0,  DF_PLAIN_FIRE,  0,          DF_STATUE_SHATTER,3500,         NO_LIGHT,       (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_ITEMS | T_OBSTRUCTS_GAS | T_OBSTRUCTS_SURFACE_EFFECTS), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_LIST_IN_SIDEBAR),"a cracking statue",    "Deep cracks ramble down the side of the statue even as you watch."},
                    471:     {G_STATUE,   &wallBackColor,         &statueBackColor,       0,  0,  DF_PLAIN_FIRE,  0,          DF_STATUE_SHATTER,0,            NO_LIGHT,       (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_ITEMS | T_OBSTRUCTS_GAS | T_OBSTRUCTS_SURFACE_EFFECTS), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED),"a marble statue", "The cold marble statue has weathered the years with grace."},
                    472:     {G_DOORWAY,    &wallBackColor,         &floorBackColor,        17, 0,  DF_PLAIN_FIRE,  0,          DF_PORTAL_ACTIVATE,0,           NO_LIGHT,       (T_OBSTRUCTS_ITEMS), (TM_STAND_IN_TILE | TM_IS_WIRED | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),  "a stone archway",      "This ancient moss-covered stone archway radiates a strange, alien energy."},
                    473:     {G_WALL,     &wallForeColor,         &wallBackColor,         0,  0,  DF_PLAIN_FIRE,  0,          DF_TURRET_EMERGE,0,             NO_LIGHT,       (T_OBSTRUCTS_EVERYTHING), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED),            "a stone wall",         "The rough stone wall is firm and unyielding."},
                    474:     {G_WALL,     &wallForeColor,         &wallBackColor,         0,  0,  DF_PLAIN_FIRE,  0,          DF_WALL_SHATTER,0,              NO_LIGHT,       (T_OBSTRUCTS_EVERYTHING), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED),            "a stone wall",         "The rough stone wall is firm and unyielding."},
                    475:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        95, 0,  DF_PLAIN_FIRE,  0,          DF_DARKENING_FLOOR, 0,          NO_LIGHT,       (0), (TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED),                                                    "the ground",           ""},
                    476:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        95, 0,  DF_PLAIN_FIRE,  0,          DF_DARK_FLOOR,  1500,           NO_LIGHT,       (0), (TM_VANISHES_UPON_PROMOTION),                                                                  "the ground",           ""},
                    477:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        95, 0,  DF_PLAIN_FIRE,  0,          0,              0,              DARKNESS_CLOUD_LIGHT, 0, 0,                                                                                         "the ground",           ""},
                    478:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        95, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (0), (TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_PROMOTES_ON_PLAYER_ENTRY),                      "the ground",           ""},
                    479:     {G_ALTAR,    &altarForeColor,        &altarBackColor,        17, 0,  0,              0,          0,              0,              CANDLE_LIGHT,   (T_OBSTRUCTS_SURFACE_EFFECTS), (TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),                         "a candle-lit altar",   "a gilded altar is adorned with candles that flicker in the breeze."},
                    480:     {G_ORB_ALTAR, &altarForeColor,        &altarBackColor,        17, 0,  0,              0,          0,              0,              CANDLE_LIGHT,   (T_OBSTRUCTS_SURFACE_EFFECTS), (TM_PROMOTES_WITH_KEY | TM_IS_WIRED | TM_LIST_IN_SIDEBAR),           "a candle-lit altar",   "ornate gilding spirals around a spherical depression in the top of the altar."},
                    481:     {G_ALTAR,    &altarForeColor,        &altarBackColor,        17, 0,  0,              0,          DF_ITEM_CAGE_CLOSE, 0,          CANDLE_LIGHT,   (T_OBSTRUCTS_SURFACE_EFFECTS), (TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_PROMOTES_WITHOUT_KEY | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),"a candle-lit altar",   "a cage, open on the bottom, hangs over this altar on a retractable chain."},
                    482:     {G_CLOSED_CAGE,     &altarBackColor,        &veryDarkGray,          17, 0,  0,              0,          DF_ITEM_CAGE_OPEN,  0,          CANDLE_LIGHT,   (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_SURFACE_EFFECTS), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_PROMOTES_WITH_KEY | TM_IS_WIRED | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),"an iron cage","the missing item must be replaced before you can access the remaining items."},
                    483:     {G_SAC_ALTAR, &altarForeColor,        &altarBackColor,        17, 0,  0,              0,          DF_ALTAR_INERT, 0,              CANDLE_LIGHT,   (T_OBSTRUCTS_SURFACE_EFFECTS), (TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_PROMOTES_ON_ITEM_PICKUP | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT), "a candle-lit altar",   "a weathered stone altar is adorned with candles that flicker in the breeze."},
                    484:     {G_SAC_ALTAR, &altarForeColor,        &altarBackColor,        17, 0,  0,              0,          DF_ALTAR_RETRACT,0,             CANDLE_LIGHT,   (T_OBSTRUCTS_SURFACE_EFFECTS), (TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_PROMOTES_ON_ITEM_PICKUP | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT), "a candle-lit altar",   "a weathered stone altar is adorned with candles that flicker in the breeze."},
                    485:     {G_CLOSED_CAGE,     &altarBackColor,        &veryDarkGray,          17, 0,  0,              0,          DF_CAGE_DISAPPEARS, 0,          CANDLE_LIGHT,   (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_SURFACE_EFFECTS), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),"an iron cage","the cage won't budge. Perhaps there is a way to raise it nearby..."},
                    486:     {G_PEDESTAL,    &altarForeColor,        &pedestalBackColor,     17, 0,  0,              0,          0,              0,              CANDLE_LIGHT,   (T_OBSTRUCTS_SURFACE_EFFECTS), 0,                                                                   "a stone pedestal",     "elaborate carvings wind around this ancient pedestal."},
                    487:     {G_OPEN_CAGE,    &floorBackColor,        &veryDarkGray,          17, 0,  0,              0,          0,              0,              NO_LIGHT,       (0), (TM_STAND_IN_TILE),                                                                            "an open cage",         "the interior of the cage is filthy and reeks of decay."},
                    488:     {G_CLOSED_CAGE,     &gray,                  &darkGray,              17, 0,  0,              0,          DF_MONSTER_CAGE_OPENS,  0,      NO_LIGHT,       (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_SURFACE_EFFECTS | T_OBSTRUCTS_GAS), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_PROMOTES_WITH_KEY | TM_LIST_IN_SIDEBAR | TM_INTERRUPT_EXPLORATION_WHEN_SEEN),"a locked iron cage","the bars of the cage are firmly set and will not budge."},
                    489:     {G_CLOSED_COFFIN,    &bridgeFrontColor,      &bridgeBackColor,       17, 20, DF_COFFIN_BURNS,0,          DF_COFFIN_BURSTS,0,             NO_LIGHT,       (T_IS_FLAMMABLE), (TM_IS_WIRED | TM_VANISHES_UPON_PROMOTION | TM_LIST_IN_SIDEBAR),                  "a sealed coffin",      "a coffin made from thick wooden planks rests in a bed of moss."},
                    490:     {G_OPEN_COFFIN,    &black,                 &bridgeBackColor,       17, 20, DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_LIST_IN_SIDEBAR),             "an empty coffin",      "an open wooden coffin rests in a bed of moss."},
                    491:
                    492:     // traps (part of dungeon layer):
                    493:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        95, 0,  DF_POISON_GAS_CLOUD, DF_SHOW_POISON_GAS_TRAP, 0, 0,         NO_LIGHT,       (T_IS_DF_TRAP), (TM_IS_SECRET),                                                                     "the ground",           ""},
                    494:     {G_TRAP,     &poisonGasColor,        0,                      30, 0,  DF_POISON_GAS_CLOUD, 0,     0,              0,              NO_LIGHT,       (T_IS_DF_TRAP), (TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),                                        "a caustic gas trap",   "there is a hidden pressure plate in the floor above a reserve of caustic gas."},
                    495:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        95, 0,  DF_POISON_GAS_CLOUD, DF_SHOW_TRAPDOOR,0,    0,              NO_LIGHT,       (T_AUTO_DESCENT), (TM_IS_SECRET),                                                                   "the ground",           "you plunge through a hidden trap door!"},
                    496:     {G_CHASM,    &chasmForeColor,        &black,                 30, 0,  DF_POISON_GAS_CLOUD,0,      0,              0,              NO_LIGHT,       (T_AUTO_DESCENT), 0,                                                                                "a hole",               "you plunge through a hole in the ground!"},
                    497:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        95, 0,  0,              DF_SHOW_PARALYSIS_GAS_TRAP, 0, 0,           NO_LIGHT,       (T_IS_DF_TRAP), (TM_IS_SECRET | TM_IS_WIRED),                                                       "the ground",           ""},
                    498:     {G_TRAP,     &pink,                  0,                      30, 0,  0,              0,          0,              0,              NO_LIGHT,       (T_IS_DF_TRAP), (TM_IS_WIRED | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),                          "a paralysis trigger",  "there is a hidden pressure plate in the floor."},
                    499:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        95, 0,  DF_PLAIN_FIRE,  DF_DISCOVER_PARALYSIS_VENT, DF_PARALYSIS_VENT_SPEW,0,NO_LIGHT,  (0), (TM_VANISHES_UPON_PROMOTION | TM_IS_SECRET | TM_IS_WIRED),                                 "the ground",           ""},
                    500:     {G_VENT,     &pink,                  0,                      30, 0,  DF_PLAIN_FIRE,  0,          DF_PARALYSIS_VENT_SPEW,0,       NO_LIGHT,       (0), (TM_IS_WIRED | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),                                     "an inactive gas vent", "A dormant gas vent is connected to a reserve of paralytic gas."},
                    501:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        95, 0,  DF_CONFUSION_GAS_TRAP_CLOUD,DF_SHOW_CONFUSION_GAS_TRAP, 0,0,NO_LIGHT,       (T_IS_DF_TRAP), (TM_IS_SECRET),                                                                     "the ground",           ""},
                    502:     {G_TRAP,     &confusionGasColor,     0,                      30, 0,  DF_CONFUSION_GAS_TRAP_CLOUD,0,  0,          0,              NO_LIGHT,       (T_IS_DF_TRAP), (TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),                                        "a confusion trap",     "A hidden pressure plate accompanies a reserve of psychotropic gas."},
                    503:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        95, 0,  DF_FLAMETHROWER,    DF_SHOW_FLAMETHROWER_TRAP, 0,   0,      NO_LIGHT,       (T_IS_DF_TRAP), (TM_IS_SECRET),                                                                     "the ground",           ""},
                    504:     {G_TRAP,     &red,                   0,                      30, 0,  DF_FLAMETHROWER,    0,      0,              0,              NO_LIGHT,       (T_IS_DF_TRAP), (TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),                                        "a fire trap",          "A hidden pressure plate is connected to a crude flamethrower mechanism."},
                    505:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        95, 0,  DF_FLOOD,       DF_SHOW_FLOOD_TRAP, 0,      0,              NO_LIGHT,       (T_IS_DF_TRAP), (TM_IS_SECRET),                                                                     "the ground",           ""},
                    506:     {G_TRAP,     &blue,                  0,                      58, 0,  DF_FLOOD,       0,          0,              0,              NO_LIGHT,       (T_IS_DF_TRAP), (TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),                                        "a flood trap",         "A hidden pressure plate is connected to floodgates in the walls and ceiling."},
                    507:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        95, 0,  DF_NET,         DF_SHOW_NET_TRAP, 0,        0,              NO_LIGHT,       (T_IS_DF_TRAP), (TM_IS_SECRET),                                                                     "the ground",           ""},
                    508:     {G_TRAP,     &tanColor,              0,                      30, 0,  DF_NET,         0,          0,              0,              NO_LIGHT,       (T_IS_DF_TRAP), (TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),                                        "a net trap",           "you see netting subtly concealed in the ceiling over a hidden pressure plate."},
                    509:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        95, 0,  DF_AGGRAVATE_TRAP, DF_SHOW_ALARM_TRAP, 0,   0,              NO_LIGHT,       (T_IS_DF_TRAP), (TM_IS_SECRET),                                                                     "the ground",           ""},
                    510:     {G_TRAP,     &gray,                  0,                      30, 0,  DF_AGGRAVATE_TRAP, 0,       0,              0,              NO_LIGHT,       (T_IS_DF_TRAP), (TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),                                        "an alarm trap",        "a hidden pressure plate is connected to a loud alarm mechanism."},
                    511:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        95, 0,  DF_PLAIN_FIRE,  DF_SHOW_POISON_GAS_VENT, DF_POISON_GAS_VENT_OPEN, 0, NO_LIGHT, (0), (TM_VANISHES_UPON_PROMOTION | TM_IS_SECRET | TM_IS_WIRED),                                  "the ground",           ""},
                    512:     {G_VENT,     &floorForeColor,        0,                      30, 0,  DF_PLAIN_FIRE,  0,          DF_POISON_GAS_VENT_OPEN,0,      NO_LIGHT,       (0), (TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),        "an inactive gas vent", "An inactive gas vent is hidden in a crevice in the ground."},
                    513:     {G_VENT,     &floorForeColor,        0,                      30, 0,  DF_PLAIN_FIRE,  0,          DF_VENT_SPEW_POISON_GAS,10000,  NO_LIGHT,       0, (TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),                                                     "a gas vent",           "Clouds of caustic gas are wafting out of a hidden vent in the floor."},
                    514:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        95, 0,  DF_PLAIN_FIRE,  DF_SHOW_METHANE_VENT, DF_METHANE_VENT_OPEN,0,NO_LIGHT,      (0), (TM_VANISHES_UPON_PROMOTION | TM_IS_SECRET | TM_IS_WIRED),                                     "the ground",           ""},
                    515:     {G_VENT,     &floorForeColor,        0,                      30, 0,  DF_PLAIN_FIRE,  0,          DF_METHANE_VENT_OPEN,0,         NO_LIGHT,       (0), (TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),        "an inactive gas vent", "An inactive gas vent is hidden in a crevice in the ground."},
                    516:     {G_VENT,     &floorForeColor,        0,                      30, 15, DF_EMBERS,      0,          DF_VENT_SPEW_METHANE,5000,      NO_LIGHT,       (T_IS_FLAMMABLE), (TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),                                      "a gas vent",           "Clouds of explosive gas are wafting out of a hidden vent in the floor."},
                    517:     {G_VENT,     &gray,                  0,                      15, 15, DF_EMBERS,      0,          DF_STEAM_PUFF,  250,            NO_LIGHT,       T_OBSTRUCTS_ITEMS, (TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),                                     "a steam vent",         "A natural crevice in the floor periodically vents scalding gouts of steam."},
                    518:     {G_TRAP,     &white,                 &chasmEdgeBackColor,    15, 0,  0,              0,          DF_MACHINE_PRESSURE_PLATE_USED,0,NO_LIGHT,      (T_IS_DF_TRAP), (TM_VANISHES_UPON_PROMOTION | TM_PROMOTES_ON_STEP | TM_IS_WIRED | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),"a pressure plate",        "There is an exposed pressure plate here. A thrown item might trigger it."},
                    519:     {G_TRAP,     &darkGray,              &chasmEdgeBackColor,    15, 0,  0,              0,          0,              0,              NO_LIGHT,       0, (TM_LIST_IN_SIDEBAR),                                                                            "an inactive pressure plate", "This pressure plate has already been depressed."},
                    520:     {G_MAGIC_GLYPH,    &glyphColor,            0,                      42, 0,  0,              0,          DF_INACTIVE_GLYPH,0,            GLYPH_LIGHT_DIM,(0), (TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_PROMOTES_ON_PLAYER_ENTRY | TM_VISUALLY_DISTINCT),"a magical glyph",      "A strange glyph, engraved into the floor, flickers with magical light."},
                    521:     {G_MAGIC_GLYPH,    &glyphColor,            0,                      42, 0,  0,              0,          DF_ACTIVE_GLYPH,10000,          GLYPH_LIGHT_BRIGHT,(0), (TM_VANISHES_UPON_PROMOTION | TM_VISUALLY_DISTINCT),                                        "a glowing glyph",      "A strange glyph, engraved into the floor, radiates magical light."},
                    522:     {G_DEWAR,    &poisonGasColor,        &darkGray,              10, 20, DF_DEWAR_CAUSTIC,0,         DF_DEWAR_CAUSTIC,0,             NO_LIGHT,       (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_SURFACE_EFFECTS | T_OBSTRUCTS_GAS | T_IS_FLAMMABLE), (TM_VANISHES_UPON_PROMOTION | TM_VISUALLY_DISTINCT | TM_LIST_IN_SIDEBAR | TM_PROMOTES_ON_PLAYER_ENTRY | TM_INVERT_WHEN_HIGHLIGHTED),"a glass dewar of caustic gas", ""},
                    523:     {G_DEWAR,    &confusionGasColor,     &darkGray,              10, 20, DF_DEWAR_CONFUSION,0,       DF_DEWAR_CONFUSION,0,           NO_LIGHT,       (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_SURFACE_EFFECTS | T_OBSTRUCTS_GAS | T_IS_FLAMMABLE), (TM_VANISHES_UPON_PROMOTION | TM_VISUALLY_DISTINCT | TM_LIST_IN_SIDEBAR | TM_PROMOTES_ON_PLAYER_ENTRY | TM_INVERT_WHEN_HIGHLIGHTED),"a glass dewar of confusion gas", ""},
                    524:     {G_DEWAR,    &pink,                  &darkGray,              10, 20, DF_DEWAR_PARALYSIS,0,       DF_DEWAR_PARALYSIS,0,           NO_LIGHT,       (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_SURFACE_EFFECTS | T_OBSTRUCTS_GAS | T_IS_FLAMMABLE), (TM_VANISHES_UPON_PROMOTION | TM_VISUALLY_DISTINCT | TM_LIST_IN_SIDEBAR | TM_PROMOTES_ON_PLAYER_ENTRY | TM_INVERT_WHEN_HIGHLIGHTED),"a glass dewar of paralytic gas", ""},
                    525:     {G_DEWAR,    &methaneColor,          &darkGray,              10, 20, DF_DEWAR_METHANE,0,         DF_DEWAR_METHANE,0,             NO_LIGHT,       (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_SURFACE_EFFECTS | T_OBSTRUCTS_GAS | T_IS_FLAMMABLE), (TM_VANISHES_UPON_PROMOTION | TM_VISUALLY_DISTINCT | TM_LIST_IN_SIDEBAR | TM_PROMOTES_ON_PLAYER_ENTRY | TM_INVERT_WHEN_HIGHLIGHTED),"a glass dewar of methane gas", ""},
                    526:
                    527:     // liquid layer
                    528:     {G_LIQUID,   &deepWaterForeColor,    &deepWaterBackColor,    40, 100,DF_STEAM_ACCUMULATION,  0,  0,              0,              NO_LIGHT,       (T_IS_FLAMMABLE | T_IS_DEEP_WATER), (TM_ALLOWS_SUBMERGING | TM_STAND_IN_TILE | TM_EXTINGUISHES_FIRE),"the murky waters",    "the current tugs you in all directions."},
                    529:     {0,             &shallowWaterForeColor, &shallowWaterBackColor, 55, 0,  DF_STEAM_ACCUMULATION,  0,  0,              0,              NO_LIGHT,       (0), (TM_STAND_IN_TILE | TM_EXTINGUISHES_FIRE | TM_ALLOWS_SUBMERGING),                              "shallow water",        "the water is cold and reaches your knees."},
                    530:     {G_BOG,      &mudForeColor,          &mudBackColor,          55, 0,  DF_PLAIN_FIRE,  0,          DF_METHANE_GAS_PUFF, 100,       NO_LIGHT,       (0), (TM_STAND_IN_TILE | TM_ALLOWS_SUBMERGING),                                                     "a bog",                "you are knee-deep in thick, foul-smelling mud."},
                    531:     {G_CHASM,    &chasmForeColor,        &black,                 40, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (T_AUTO_DESCENT), (TM_STAND_IN_TILE),                                                               "a chasm",              "you plunge downward into the chasm!"},
                    532:     {G_FLOOR,    &white,                 &chasmEdgeBackColor,    80, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       0, 0,                                                                                               "the brink of a chasm", "chilly winds blow upward from the stygian depths."},
                    533:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        95, 0,  DF_PLAIN_FIRE,  0,          DF_SPREADABLE_COLLAPSE,0,       NO_LIGHT,       (0), (TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED),                                                    "the ground",           ""},
                    534:     {G_FLOOR,    &white,                 &chasmEdgeBackColor,    45, 0,  DF_PLAIN_FIRE,  0,          DF_COLLAPSE_SPREADS,2500,       NO_LIGHT,       (0), (TM_VANISHES_UPON_PROMOTION),                                                                  "the crumbling ground", "cracks are appearing in the ground beneath your feet!"},
                    535:     {G_LIQUID,   &fireForeColor,         &lavaBackColor,         40, 0,  DF_OBSIDIAN,    0,          0,              0,              LAVA_LIGHT,     (T_LAVA_INSTA_DEATH), (TM_STAND_IN_TILE | TM_ALLOWS_SUBMERGING),                                    "lava",                 "searing heat rises from the lava."},
                    536:     {G_LIQUID,   &fireForeColor,         &lavaBackColor,         40, 0,  DF_OBSIDIAN,    0,          DF_RETRACTING_LAVA, 0,          LAVA_LIGHT,     (T_LAVA_INSTA_DEATH), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_ALLOWS_SUBMERGING),"lava","searing heat rises from the lava."},
                    537:     {G_LIQUID,   &fireForeColor,         &lavaBackColor,         40, 0,  DF_OBSIDIAN,    0,          DF_OBSIDIAN_WITH_STEAM, -1500,  LAVA_LIGHT,     (T_LAVA_INSTA_DEATH), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_ALLOWS_SUBMERGING),       "cooling lava",         "searing heat rises from the lava."},
                    538:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        90, 0,  DF_PLAIN_FIRE,  0,          0,              0,              SUN_LIGHT,      (0), (TM_STAND_IN_TILE),                                                                            "a patch of sunlight",  "sunlight streams through cracks in the ceiling."},
                    539:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        90, 0,  DF_PLAIN_FIRE,  0,          0,              0,              DARKNESS_PATCH_LIGHT,   (0), 0,                                                                                     "a patch of shadows",   "this area happens to be cloaked in shadows -- perhaps a safe place to hide."},
                    540:     {G_ASHES,      &brimstoneForeColor,    &brimstoneBackColor,    40, 100,DF_INERT_BRIMSTONE, 0,      DF_INERT_BRIMSTONE, 10,         NO_LIGHT,       (T_IS_FLAMMABLE | T_SPONTANEOUSLY_IGNITES), 0,                                                      "hissing brimstone",    "the jagged brimstone hisses and spits ominously as it crunches under your feet."},
                    541:     {G_ASHES,      &brimstoneForeColor,    &brimstoneBackColor,    40, 0,  DF_INERT_BRIMSTONE, 0,      DF_ACTIVE_BRIMSTONE, 800,       NO_LIGHT,       (T_SPONTANEOUSLY_IGNITES), 0,                                                                       "hissing brimstone",    "the jagged brimstone hisses and spits ominously as it crunches under your feet."},
                    542:     {G_FLOOR,    &darkGray,              &obsidianBackColor,     50, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       0, 0,                                                                                               "the obsidian ground",  "the ground has fused into obsidian."},
                    543:     {G_BRIDGE,   &bridgeFrontColor,      &bridgeBackColor,       45, 50, DF_BRIDGE_FIRE, 0,          0,              0,              NO_LIGHT,       (T_IS_FLAMMABLE), (TM_VANISHES_UPON_PROMOTION),                                                     "a rickety rope bridge","the rickety rope bridge creaks underfoot."},
                    544:     {G_BRIDGE,   &bridgeFrontColor,      &bridgeBackColor,       45, 50, DF_BRIDGE_FALL, 0,          DF_BRIDGE_FALL, 10000,          NO_LIGHT,       (T_IS_FLAMMABLE), (TM_VANISHES_UPON_PROMOTION),                                                     "a plummeting bridge",  "the bridge is plunging into the chasm before your eyes!"},
                    545:     {G_BRIDGE,   &bridgeFrontColor,      &bridgeBackColor,       45, 50, DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (T_IS_FLAMMABLE), (TM_VANISHES_UPON_PROMOTION),                                                     "a rickety rope bridge","the rickety rope bridge is staked to the edge of the chasm."},
                    546:     {G_FLOOR,    &white,                 &chasmEdgeBackColor,    20, 50, DF_BRIDGE_FIRE, 0,          0,              0,              NO_LIGHT,       0, 0,                                                                                               "a stone bridge",       "the narrow stone bridge winds precariously across the chasm."},
                    547:     {0,             &shallowWaterForeColor, &shallowWaterBackColor, 60, 0,  DF_STEAM_ACCUMULATION,  0,  DF_SPREADABLE_WATER,0,          NO_LIGHT,       (0), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_EXTINGUISHES_FIRE | TM_ALLOWS_SUBMERGING),   "shallow water",    "the water is cold and reaches your knees."},
                    548:     {0,             &shallowWaterForeColor, &shallowWaterBackColor, 60, 0,  DF_STEAM_ACCUMULATION,  0,  DF_WATER_SPREADS,2500,          NO_LIGHT,       (0), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_EXTINGUISHES_FIRE | TM_ALLOWS_SUBMERGING), "shallow water",        "the water is cold and reaches your knees."},
                    549:     {G_FLOOR,      &mudForeColor,          &mudBackColor,          55, 0,  DF_PLAIN_FIRE,  0,          DF_MUD_ACTIVATE,0,              NO_LIGHT,       (0), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_ALLOWS_SUBMERGING),          "a bog",                "you are knee-deep in thick, foul-smelling mud."},
                    550:     {G_FLOOR,    &white,                 &lightBlue,             35, 100,DF_DEEP_WATER_THAW, 0,      DF_DEEP_WATER_MELTING, -100,    NO_LIGHT,       (T_IS_FLAMMABLE), (TM_VANISHES_UPON_PROMOTION),                                                     "ice",                  "a sheet of ice extends into the water, ripples frozen into its glossy surface."},
                    551:     {G_FLOOR,    &black,                 &lightBlue,             35, 100,DF_DEEP_WATER_THAW, 0,      DF_DEEP_WATER_THAW, 10000,      NO_LIGHT,       (T_IS_FLAMMABLE), (TM_VANISHES_UPON_PROMOTION),                                                     "melting ice",          "cracks extend across the surface of the ice as it melts before your eyes."},
                    552:     {G_FLOOR,    &white,                 &lightBlue,             35, 100,DF_SHALLOW_WATER_THAW, 0,   DF_SHALLOW_WATER_MELTING, -100, NO_LIGHT,       (T_IS_FLAMMABLE), (TM_VANISHES_UPON_PROMOTION),                                                     "ice",                  "a sheet of ice extends into the water, ripples frozen into its glossy surface."},
                    553:     {G_FLOOR,    &black,                 &lightBlue,             35, 100,DF_DEEP_WATER_THAW, 0,      DF_SHALLOW_WATER_THAW, 10000,   NO_LIGHT,       (T_IS_FLAMMABLE), (TM_VANISHES_UPON_PROMOTION),                                                     "melting ice",          "cracks extend across the surface of the ice as it melts before your eyes."},
                    554:
                    555:     // surface layer
                    556:     {G_CHASM,    &chasmForeColor,        &black,                 9,  0,  DF_PLAIN_FIRE,  0,          DF_HOLE_DRAIN,  -1000,          NO_LIGHT,       (T_AUTO_DESCENT), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION),                                  "a hole",               "you plunge downward into the hole!"},
                    557:     {G_CHASM,    &chasmForeColor,        &black,                 9,  0,  DF_PLAIN_FIRE,  0,          DF_HOLE_DRAIN,  -1000,          DESCENT_LIGHT,  (T_AUTO_DESCENT), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION),                                  "a hole",               "you plunge downward into the hole!"},
                    558:     {G_FLOOR,    &white,                 &chasmEdgeBackColor,    50, 0,  DF_PLAIN_FIRE,  0,          0,              -500,           NO_LIGHT,       (0), (TM_VANISHES_UPON_PROMOTION),                                                                  "translucent ground",   "chilly gusts of air blow upward through the translucent floor."},
                    559:     {G_LIQUID,   &deepWaterForeColor,    &deepWaterBackColor,    41, 100,DF_STEAM_ACCUMULATION,  0,  DF_FLOOD_DRAIN, -200,           NO_LIGHT,       (T_IS_FLAMMABLE | T_IS_DEEP_WATER), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_EXTINGUISHES_FIRE | TM_ALLOWS_SUBMERGING), "sloshing water", "roiling water floods the room."},
                    560:     {0,             &shallowWaterForeColor, &shallowWaterBackColor, 50, 0,  DF_STEAM_ACCUMULATION,  0,  DF_PUDDLE,      -100,           NO_LIGHT,       (0), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_EXTINGUISHES_FIRE | TM_ALLOWS_SUBMERGING), "shallow water",        "knee-deep water drains slowly into holes in the floor."},
                    561:     {G_GRASS,    &grassColor,            0,                      60, 15, DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION),                                  "grass-like fungus",    "grass-like fungus crunches underfoot."},
                    562:     {G_GRASS,    &deadGrassColor,        0,                      60, 40, DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION),                                  "withered fungus",      "dead fungus covers the ground."},
                    563:     {G_GRASS,    &grayFungusColor,       0,                      51, 10, DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION),                                  "withered fungus",      "groping tendrils of pale fungus rise from the muck."},
                    564:     {G_GRASS,    &fungusColor,           0,                      60, 10, DF_PLAIN_FIRE,  0,          0,              0,              FUNGUS_LIGHT,   (T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION),                                  "luminescent fungus",   "luminescent fungus casts a pale, eerie glow."},
                    565:     {G_LICHEN,   &lichenColor,           0,                      60, 50, DF_PLAIN_FIRE,  0,          DF_LICHEN_GROW, 10000,          NO_LIGHT,       (T_CAUSES_POISON | T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION),                "deadly lichen",        "venomous barbs cover the quivering tendrils of this fast-growing lichen."},
                    566:     {G_GRASS,    &hayColor,              &refuseBackColor,       57, 50, DF_STENCH_BURN, 0,          0,              0,              NO_LIGHT,       (T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION),                                  "filthy hay",           "a pile of hay, matted with filth, has been arranged here as a makeshift bed."},
                    567:     {G_FLOOR_ALT,    &humanBloodColor,       0,                      80, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (0), (TM_STAND_IN_TILE),                                                                            "a pool of blood",      "the floor is splattered with blood."},
                    568:     {G_FLOOR_ALT,    &insectBloodColor,      0,                      80, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (0), (TM_STAND_IN_TILE),                                                                            "a pool of green blood", "the floor is splattered with green blood."},
                    569:     {G_FLOOR_ALT,    &poisonGasColor,        0,                      80, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (0), (TM_STAND_IN_TILE),                                                                            "a pool of purple blood", "the floor is splattered with purple blood."},
                    570:     {G_FLOOR_ALT,    &acidBackColor,         0,                      80, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       0, 0,                                                                                               "a puddle of acid",     "the floor is splattered with acid."},
                    571:     {G_FLOOR_ALT,    &vomitColor,            0,                      80, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (0), (TM_STAND_IN_TILE),                                                                            "a puddle of vomit",    "the floor is caked with vomit."},
                    572:     {G_FLOOR_ALT,    &urineColor,            0,                      80, 0,  DF_PLAIN_FIRE,  0,          0,              100,            NO_LIGHT,       (0), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION),                                               "a puddle of urine",    "a puddle of urine covers the ground."},
                    573:     {G_FLOOR_ALT,    &white,                 0,                      80, 0,  DF_PLAIN_FIRE,  0,          0,              0,              UNICORN_POOP_LIGHT,(0), (TM_STAND_IN_TILE),                                                                         "unicorn poop",         "a pile of lavender-scented unicorn poop sparkles with rainbow light."},
                    574:     {G_FLOOR_ALT,    &wormColor,             0,                      80, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (0), (TM_STAND_IN_TILE),                                                                            "a pool of worm entrails", "worm viscera cover the ground."},
                    575:     {G_ASHES,      &ashForeColor,          0,                      80, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (0), (TM_STAND_IN_TILE),                                                                            "a pile of ashes",      "charcoal and ash crunch underfoot."},
                    576:     {G_ASHES,      &ashForeColor,          0,                      87, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (0), (TM_STAND_IN_TILE),                                                                            "burned carpet",        "the carpet has been scorched by an ancient fire."},
                    577:     {G_FLOOR_ALT,    &shallowWaterBackColor, 0,                      80, 20, 0,              0,          0,              100,            NO_LIGHT,       (T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION),                                  "a puddle of water",    "a puddle of water covers the ground."},
                    578:     {G_BONES,    &bonesForeColor,        0,                      70, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (0), (TM_STAND_IN_TILE),                                                                            "a pile of bones",      "unidentifiable bones, yellowed with age, litter the ground."},
                    579:     {G_RUBBLE,    &gray,                  0,                      70, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (0), (TM_STAND_IN_TILE),                                                                            "a pile of rubble",     "rocky rubble covers the ground."},
                    580:     {G_BONES,    &mudBackColor,          &refuseBackColor,       50, 20, DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (0), (TM_STAND_IN_TILE),                                                                            "a pile of filthy effects","primitive tools, carvings and trinkets are strewn about the area."},
                    581:     {G_FLOOR_ALT,    &white,                 0,                      70, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (0), (TM_STAND_IN_TILE),                                                                            "shattered glass",      "jagged chunks of glass from the broken dewar litter the ground."},
                    582:     {G_FLOOR_ALT,    &ectoplasmColor,        0,                      70, 0,  DF_PLAIN_FIRE,  0,          0,              0,              ECTOPLASM_LIGHT,(0), (TM_STAND_IN_TILE),                                                                            "ectoplasmic residue",  "a thick, glowing substance has congealed on the ground."},
                    583:     {G_ASHES,      &fireForeColor,         0,                      70, 0,  DF_PLAIN_FIRE,  0,          DF_ASH,         300,            EMBER_LIGHT,    (0), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION),                                               "sputtering embers",    "sputtering embers cover the ground."},
                    584:     {G_WEB,      &white,                 0,                      19, 100,DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (T_ENTANGLES | T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_VISUALLY_DISTINCT),"a spiderweb",       "thick, sticky spiderwebs fill the area."},
                    585:     {G_NET,      &brown,                 0,                      19, 40, DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (T_ENTANGLES | T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_VISUALLY_DISTINCT),"a net",             "a dense tangle of netting fills the area."},
                    586:     {G_FOLIAGE,  &foliageColor,          0,                      45, 15, DF_PLAIN_FIRE,  0,          DF_TRAMPLED_FOLIAGE, 0,         NO_LIGHT,       (T_OBSTRUCTS_VISION | T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_PROMOTES_ON_STEP), "dense foliage",   "dense foliage fills the area, thriving on what sunlight trickles in."},
                    587:     {G_FOLIAGE,  &deadFoliageColor,      0,                      45, 80, DF_PLAIN_FIRE,  0,          DF_SMALL_DEAD_GRASS, 0,         NO_LIGHT,       (T_OBSTRUCTS_VISION | T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_PROMOTES_ON_STEP), "dead foliage",    "the decaying husk of a fungal growth fills the area."},
                    588:     {G_GRASS,    &foliageColor,   0,                      60, 15, DF_PLAIN_FIRE,  0,          DF_FOLIAGE_REGROW, 100,         NO_LIGHT,       (T_IS_FLAMMABLE), (TM_VANISHES_UPON_PROMOTION),                                                     "trampled foliage",     "dense foliage fills the area, thriving on what sunlight trickles in."},
                    589:     {G_FOLIAGE,  &fungusForestLightColor,0,                      45, 15, DF_PLAIN_FIRE,  0,          DF_TRAMPLED_FUNGUS_FOREST, 0,   FUNGUS_FOREST_LIGHT,(T_OBSTRUCTS_VISION | T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_PROMOTES_ON_STEP),"a luminescent fungal forest", "luminescent fungal growth fills the area, groping upward from the rich soil."},
                    590:     {G_GRASS,    &fungusForestLightColor,0,               60, 15, DF_PLAIN_FIRE,  0,          DF_FUNGUS_FOREST_REGROW, 100,   FUNGUS_LIGHT,   (T_IS_FLAMMABLE), (TM_VANISHES_UPON_PROMOTION),                                                     "trampled fungal foliage", "luminescent fungal growth fills the area, groping upward from the rich soil."},
                    591:     {G_CRYSTAL,  &forceFieldColor,       &forceFieldColor,       0,  0,  0,              0,          DF_FORCEFIELD_MELT, -200,       FORCEFIELD_LIGHT, (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_GAS | T_OBSTRUCTS_DIAGONAL_MOVEMENT), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_PROMOTES_ON_STEP),       "a green crystal",      "The translucent green crystal is melting away in front of your eyes."},
                    592:     {G_CRYSTAL,  &black,                 &forceFieldColor,       0,  0,  0,              0,          0,              -10000,         FORCEFIELD_LIGHT, (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_GAS | T_OBSTRUCTS_DIAGONAL_MOVEMENT), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION),     "a dissolving crystal",     "The translucent green crystal is melting away in front of your eyes."},
                    593:     {G_MAGIC_GLYPH,    &sacredGlyphColor,      0,                      57, 0,  0,              0,          0,              0,              SACRED_GLYPH_LIGHT, (T_SACRED), 0,                                                                                  "a sacred glyph",       "a sacred glyph adorns the floor, glowing with a powerful warding enchantment."},
                    594:     {G_CHAIN_TOP_LEFT,&gray,                  0,                      20, 0,  0,              0,          0,              0,              NO_LIGHT,       0, 0,                                                                                               "an iron manacle",      "a thick iron manacle is anchored to the ceiling."},
                    595:     {G_CHAIN_BOTTOM_RIGHT, &gray,             0,                      20, 0,  0,              0,          0,              0,              NO_LIGHT,       0, 0,                                                                                               "an iron manacle",      "a thick iron manacle is anchored to the floor."},
                    596:     {G_CHAIN_TOP_RIGHT, &gray,                0,                      20, 0,  0,              0,          0,              0,              NO_LIGHT,       0, 0,                                                                                               "an iron manacle",      "a thick iron manacle is anchored to the ceiling."},
                    597:     {G_CHAIN_BOTTOM_LEFT, &gray,              0,                      20, 0,  0,              0,          0,              0,              NO_LIGHT,       0, 0,                                                                                               "an iron manacle",      "a thick iron manacle is anchored to the floor."},
                    598:     {G_CHAIN_TOP,     &gray,                  0,                      20, 0,  0,              0,          0,              0,              NO_LIGHT,       0, 0,                                                                                               "an iron manacle",      "a thick iron manacle is anchored to the wall."},
                    599:     {G_CHAIN_BOTTOM,  &gray,                  0,                      20, 0,  0,              0,          0,              0,              NO_LIGHT,       0, 0,                                                                                               "an iron manacle",      "a thick iron manacle is anchored to the wall."},
                    600:     {G_CHAIN_LEFT,    &gray,                  0,                      20, 0,  0,              0,          0,              0,              NO_LIGHT,       0, 0,                                                                                               "an iron manacle",      "a thick iron manacle is anchored to the wall."},
                    601:     {G_CHAIN_RIGHT,   &gray,                  0,                      20, 0,  0,              0,          0,              0,              NO_LIGHT,       0, 0,                                                                                               "an iron manacle",      "a thick iron manacle is anchored to the wall."},
                    602:     {0,             0,                      0,                      1,  0,  0,              0,          0,              10000,          PORTAL_ACTIVATE_LIGHT,(0), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION),                                         "blinding light",       "blinding light streams out of the archway."},
                    603:     {0,             0,                      0,                      100,0,  0,              0,          0,              10000,          GLYPH_LIGHT_BRIGHT,(0), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION),                                            "a red glow",           "a red glow fills the area."},
                    604:
                    605:     // fire tiles
                    606:     {G_FIRE,     &fireForeColor,         0,                      10, 0,  0,              0,          DF_EMBERS,      500,            FIRE_LIGHT,     (T_IS_FIRE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_VISUALLY_DISTINCT),                "billowing flames",     "flames billow upward."},
                    607:     {G_FIRE,     &fireForeColor,         0,                      10, 0,  0,              0,          0,              2500,           BRIMSTONE_FIRE_LIGHT,(T_IS_FIRE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_VISUALLY_DISTINCT),           "sulfurous flames",     "sulfurous flames leap from the unstable bed of brimstone."},
                    608:     {G_FIRE,     &fireForeColor,         0,                      10, 0,  0,              0,          DF_OBSIDIAN,    5000,           FIRE_LIGHT,     (T_IS_FIRE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_VISUALLY_DISTINCT),                "clouds of infernal flame", "billowing infernal flames eat at the floor."},
                    609:     {G_FIRE,     &fireForeColor,         0,                      10, 0,  0,              0,          0,              8000,           FIRE_LIGHT,     (T_IS_FIRE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_VISUALLY_DISTINCT),                "a cloud of burning gas", "burning gas fills the air with flame."},
                    610:     {G_FIRE,     &yellow,                0,                      10, 0,  0,              0,          0,              10000,          EXPLOSION_LIGHT,(T_IS_FIRE | T_CAUSES_EXPLOSIVE_DAMAGE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_VISUALLY_DISTINCT), "a violent explosion", "the force of the explosion slams into you."},
                    611:     {G_FIRE,     &white,                 0,                      10, 0,  0,              0,          0,              10000,          INCENDIARY_DART_LIGHT ,(T_IS_FIRE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_VISUALLY_DISTINCT),         "a flash of fire",      "flames burst out of the incendiary dart."},
                    612:     {G_FIRE,     &white,                 0,                      10, 0,  0,              0,          DF_EMBERS,      3000,           FIRE_LIGHT,     (T_IS_FIRE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_VISUALLY_DISTINCT),                "crackling flames",     "crackling flames rise from the blackened item."},
                    613:     {G_FIRE,     &white,                 0,                      10, 0,  0,              0,          DF_EMBERS,      3000,           FIRE_LIGHT,     (T_IS_FIRE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_VISUALLY_DISTINCT),                "greasy flames",        "greasy flames rise from the corpse."},
                    614:
                    615:     // gas layer
                    616:     {   ' ',        0,                      &poisonGasColor,        35, 100,DF_GAS_FIRE,    0,          0,              0,              NO_LIGHT,       (T_IS_FLAMMABLE | T_CAUSES_DAMAGE), (TM_STAND_IN_TILE | TM_GAS_DISSIPATES),                         "a cloud of caustic gas", "you can feel the purple gas eating at your flesh."},
                    617:     {   ' ',        0,                      &confusionGasColor,     35, 100,DF_GAS_FIRE,    0,          0,              0,              CONFUSION_GAS_LIGHT,(T_IS_FLAMMABLE | T_CAUSES_CONFUSION), (TM_STAND_IN_TILE | TM_GAS_DISSIPATES_QUICKLY),          "a cloud of confusion gas", "the rainbow-colored gas tickles your brain."},
                    618:     {   ' ',        0,                      &vomitColor,            35, 100,DF_GAS_FIRE,    0,          0,              0,              NO_LIGHT,       (T_IS_FLAMMABLE | T_CAUSES_NAUSEA), (TM_STAND_IN_TILE | TM_GAS_DISSIPATES_QUICKLY),                 "a cloud of putrescence", "the stench of rotting flesh is overpowering."},
                    619:     {   ' ',        0,                      &vomitColor,            35, 0,  DF_GAS_FIRE,    0,          0,              0,              NO_LIGHT,       (T_CAUSES_NAUSEA), (TM_STAND_IN_TILE | TM_GAS_DISSIPATES_QUICKLY),                                  "a cloud of putrid smoke", "you retch violently at the smell of the greasy smoke."},
                    620:     {   ' ',        0,                      &pink,                  35, 100,DF_GAS_FIRE,    0,          0,              0,              NO_LIGHT,       (T_IS_FLAMMABLE | T_CAUSES_PARALYSIS), (TM_STAND_IN_TILE | TM_GAS_DISSIPATES_QUICKLY),              "a cloud of paralytic gas", "the pale gas causes your muscles to stiffen."},
                    621:     {   ' ',        0,                      &methaneColor,          35, 100,DF_GAS_FIRE,    0,          DF_EXPLOSION_FIRE, 0,           NO_LIGHT,       (T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_EXPLOSIVE_PROMOTE),                                        "a cloud of explosive gas", "the smell of explosive swamp gas fills the air."},
                    622:     {   ' ',        0,                      &white,                 35, 0,  DF_GAS_FIRE,    0,          0,              0,              NO_LIGHT,       (T_CAUSES_DAMAGE), (TM_STAND_IN_TILE | TM_GAS_DISSIPATES_QUICKLY),                                  "a cloud of scalding steam", "scalding steam fills the air!"},
                    623:     {   ' ',        0,                      0,                      35, 0,  DF_GAS_FIRE,    0,          0,              0,              DARKNESS_CLOUD_LIGHT,   (0), (TM_STAND_IN_TILE),                                                                    "a cloud of supernatural darkness", "everything is obscured by an aura of supernatural darkness."},
                    624:     {   ' ',        0,                      &darkRed,               35, 0,  DF_GAS_FIRE,    0,          0,              0,              NO_LIGHT,       (T_CAUSES_HEALING), (TM_STAND_IN_TILE | TM_GAS_DISSIPATES_QUICKLY),                                 "a cloud of healing spores", "bloodwort spores, renowned for their healing properties, fill the air."},
                    625:
                    626:     // bloodwort pods
                    627:     {G_BLOODWORT_STALK,  &bloodflowerForeColor,  &bloodflowerBackColor,  10, 20, DF_PLAIN_FIRE,  0,          DF_BLOODFLOWER_PODS_GROW, 100,  NO_LIGHT,       (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_ITEMS | T_IS_FLAMMABLE), (TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT), "a bloodwort stalk", "this spindly plant grows seed pods famous for their healing properties."},
                    628:     {G_BLOODWORT_POD,     &bloodflowerPodForeColor, 0,                    11, 20, DF_BLOODFLOWER_POD_BURST,0, DF_BLOODFLOWER_POD_BURST, 0,    NO_LIGHT,       (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_ITEMS | T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_PROMOTES_ON_PLAYER_ENTRY | TM_VISUALLY_DISTINCT | TM_INVERT_WHEN_HIGHLIGHTED), "a bloodwort pod", "the bloodwort seed pod bursts, releasing a cloud of healing spores."},
                    629:
                    630:     // shrine accoutrements
                    631:     {G_BEDROLL,   &black,                 &bedrollBackColor,      57, 50, DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (T_IS_FLAMMABLE), (TM_VANISHES_UPON_PROMOTION),                                                     "an abandoned bedroll", "a bedroll lies in the corner, disintegrating with age."},
                    632:
                    633:     // algae
                    634:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        95, 0,  DF_PLAIN_FIRE,  0,          DF_ALGAE_1,     100,            NO_LIGHT,       0, 0,                                                                                               "the ground",           ""},
                    635:     {G_LIQUID,   &deepWaterForeColor,    &deepWaterBackColor,    40, 100,DF_STEAM_ACCUMULATION,  0,  DF_ALGAE_1,     500,            LUMINESCENT_ALGAE_BLUE_LIGHT,(T_IS_FLAMMABLE | T_IS_DEEP_WATER), (TM_STAND_IN_TILE | TM_EXTINGUISHES_FIRE | TM_ALLOWS_SUBMERGING),  "luminescent waters",   "blooming algae fills the waters with a swirling luminescence."},
                    636:     {G_LIQUID,   &deepWaterForeColor,    &deepWaterBackColor,    39, 100,DF_STEAM_ACCUMULATION,  0,  DF_ALGAE_REVERT,300,            LUMINESCENT_ALGAE_GREEN_LIGHT,(T_IS_FLAMMABLE | T_IS_DEEP_WATER), (TM_STAND_IN_TILE | TM_EXTINGUISHES_FIRE | TM_ALLOWS_SUBMERGING), "luminescent waters",   "blooming algae fills the waters with a swirling luminescence."},
                    637:
                    638:     // ancient spirit terrain
                    639:     {G_VINE,     &lichenColor,           0,                      19, 100,DF_PLAIN_FIRE,  0,          DF_ANCIENT_SPIRIT_GRASS,1000,   NO_LIGHT,       (T_ENTANGLES | T_CAUSES_DAMAGE | T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_VISUALLY_DISTINCT | TM_PROMOTES_ON_PLAYER_ENTRY),"thorned vines",       "thorned vines make a rustling noise as they quiver restlessly."}, // +tile
                    640:     {G_GRASS,    &grassColor,            0,                      60, 15, DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (T_IS_FLAMMABLE), (TM_STAND_IN_TILE),                                                               "a tuft of grass",      "tufts of lush grass have improbably pushed upward through the stone ground."},
                    641:
                    642:     // Yendor amulet floor tile
                    643:     {G_FLOOR,    &floorForeColor,        &floorBackColor,        95, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       0, (TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_PROMOTES_ON_ITEM_PICKUP),                         "the ground",           ""},
                    644:
                    645:     // commutation device
                    646:     {G_ORB_ALTAR, &altarForeColor,        &greenAltarBackColor,   17, 0,  0,              0,          DF_ALTAR_COMMUTE,0,             NO_LIGHT,       (T_OBSTRUCTS_SURFACE_EFFECTS), (TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_SWAP_ENCHANTS_ACTIVATION | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),    "a commutation altar",  "crude diagrams on this altar and its twin invite you to place items upon them."},
                    647:     {G_ORB_ALTAR, &black,                 &greenAltarBackColor,   17, 0,  0,              0,          0,              0,              NO_LIGHT,       (T_OBSTRUCTS_SURFACE_EFFECTS), (TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),                         "a scorched altar",     "scorch marks cover the surface of the altar, but it is cold to the touch."},
                    648:     {G_PIPES,    &veryDarkGray,          0,                      45, 0,  DF_PLAIN_FIRE,  0,          DF_INERT_PIPE,  0,              CONFUSION_GAS_LIGHT, (0), (TM_IS_WIRED | TM_VANISHES_UPON_PROMOTION),                                               "glowing glass pipes",  "glass pipes are set into the floor and emit a soft glow of shifting color."},
                    649:     {G_PIPES,    &black,                 0,                      45, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (0), (0),                                                                                           "charred glass pipes",  "the inside of the glass pipes are charred."},
                    650:
                    651:     // resurrection altar
                    652:     {G_ALTAR,    &altarForeColor,        &goldAltarBackColor,    17, 0,  0,              0,          DF_ALTAR_RESURRECT,0,           CANDLE_LIGHT,   (T_OBSTRUCTS_SURFACE_EFFECTS), (TM_IS_WIRED | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),           "a resurrection altar", "the souls of the dead surround you. A deceased ally might be called back."},
                    653:     {G_ALTAR,    &black,                 &goldAltarBackColor,    16, 0,  0,              0,          0,              0,              NO_LIGHT,       (T_OBSTRUCTS_SURFACE_EFFECTS), (TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),                         "a scorched altar",     "scorch marks cover the surface of the altar, but it is cold to the touch."},
                    654:     {0,             0,                      0,                      95, 0,  0,              0,          0,              0,              NO_LIGHT,       (0), (TM_IS_WIRED | TM_PROMOTES_ON_PLAYER_ENTRY),                                                   "the ground",           ""},
                    655:
                    656:     // sacrifice altar
                    657:     {G_SAC_ALTAR, &altarForeColor,        &altarBackColor,        17, 0,  0,              0,          DF_SACRIFICE_ALTAR,0,           CANDLE_LIGHT,   (T_OBSTRUCTS_SURFACE_EFFECTS), (TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT), "a sacrifice altar", "demonological symbols decorate this altar."},
                    658:     {G_SAC_ALTAR, &altarForeColor,        &altarBackColor,        17, 0,  0,              0,          DF_SACRIFICE_COMPLETE,0,        CANDLE_LIGHT,   (T_OBSTRUCTS_SURFACE_EFFECTS), (TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT | TM_PROMOTES_ON_SACRIFICE_ENTRY), "a sacrifice altar",    "demonological symbols decorate this altar."},
                    659:     {G_LIQUID,   &fireForeColor,         &lavaBackColor,         40, 0,  DF_OBSIDIAN,    0,          0,              0,              LAVA_LIGHT,     (T_LAVA_INSTA_DEATH), (TM_ALLOWS_SUBMERGING | TM_LIST_IN_SIDEBAR),                                  "a sacrificial pit",      "the smell of burnt flesh lingers over this pit of lava."},
                    660:     {G_WALL,     &altarBackColor,        &veryDarkGray,          17, 0,  0,              0,          DF_SACRIFICE_CAGE_ACTIVE,   0,  CANDLE_LIGHT,   (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_SURFACE_EFFECTS), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT),"an iron cage","the cage won't budge. Perhaps there is a way to raise it nearby..."},
                    661:     {G_STATUE,   &wallBackColor,         &statueBackColor,       0,  0,  DF_PLAIN_FIRE,  0,          0,              0,              DEMONIC_STATUE_LIGHT,   (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_ITEMS | T_OBSTRUCTS_GAS | T_OBSTRUCTS_SURFACE_EFFECTS), (TM_STAND_IN_TILE),  "a demonic statue", "An obsidian statue of a leering demon looms over the room."},
                    662:
                    663:     // doorway statues
                    664:     {G_STATUE,   &wallBackColor,         &statueBackColor,       0,  0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_ITEMS | T_OBSTRUCTS_GAS | T_OBSTRUCTS_SURFACE_EFFECTS), (TM_STAND_IN_TILE | TM_CONNECTS_LEVEL),  "a marble statue",  "The cold marble statue has weathered the years with grace."},
                    665:     {G_STATUE,   &wallBackColor,         &statueBackColor,       0,  0,  DF_PLAIN_FIRE,  0,          DF_CRACKING_STATUE,0,           NO_LIGHT,       (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_ITEMS | T_OBSTRUCTS_GAS | T_OBSTRUCTS_SURFACE_EFFECTS), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_CONNECTS_LEVEL),"a marble statue", "The cold marble statue has weathered the years with grace."},
                    666:
                    667:     // extensible stone bridge
                    668:     {G_CHASM,    &chasmForeColor,        &black,                 40, 0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (T_AUTO_DESCENT), (TM_STAND_IN_TILE),                                                               "a chasm",              "you plunge downward into the chasm!"},
                    669:     {G_FLOOR,    &white,                 &chasmEdgeBackColor,    40, 0,  DF_PLAIN_FIRE,  0,          DF_BRIDGE_ACTIVATE,6000,        NO_LIGHT,       (0), (TM_VANISHES_UPON_PROMOTION),                                                                  "a stone bridge",       "the narrow stone bridge is extending across the chasm."},
                    670:     {G_FLOOR,    &white,                 &chasmEdgeBackColor,    80, 0,  DF_PLAIN_FIRE,  0,          DF_BRIDGE_ACTIVATE_ANNOUNCE,0,  NO_LIGHT,       (0), (TM_IS_WIRED),                                                                                 "the brink of a chasm", "chilly winds blow upward from the stygian depths."},
                    671:
                    672:     // rat trap
                    673:     {G_WALL,     &wallForeColor,         &wallBackColor,         0,  0,  DF_PLAIN_FIRE,  0,          DF_WALL_CRACK,  0,              NO_LIGHT,       (T_OBSTRUCTS_EVERYTHING), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED),            "a stone wall",         "The rough stone wall is firm and unyielding."},
                    674:     {G_WALL,     &wallForeColor,         &wallBackColor,         0,  0,  DF_PLAIN_FIRE,  0,          DF_WALL_SHATTER,500,            NO_LIGHT,       (T_OBSTRUCTS_EVERYTHING), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_LIST_IN_SIDEBAR),     "a cracking wall",      "Cracks are running ominously across the base of this rough stone wall."},
                    675:
                    676:     // electric crystals
                    677:     {G_ELECTRIC_CRYSTAL, &wallCrystalColor, &graniteBackColor,   0,  0,  DF_PLAIN_FIRE,  0,          DF_ELECTRIC_CRYSTAL_ON, 0,      NO_LIGHT,       (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_ITEMS | T_OBSTRUCTS_GAS | T_OBSTRUCTS_SURFACE_EFFECTS), (TM_STAND_IN_TILE | TM_PROMOTES_ON_ELECTRICITY | TM_IS_CIRCUIT_BREAKER | TM_IS_WIRED | TM_LIST_IN_SIDEBAR), "a darkened crystal globe", "A slight electric shock startles you when you touch the inert crystal globe."},
                    678:     {G_ELECTRIC_CRYSTAL, &white,         &wallCrystalColor,      0,  0,  DF_PLAIN_FIRE,  0,          0,              0,              CRYSTAL_WALL_LIGHT,(T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_ITEMS | T_OBSTRUCTS_GAS | T_OBSTRUCTS_SURFACE_EFFECTS), (TM_STAND_IN_TILE | TM_LIST_IN_SIDEBAR), "a shining crystal globe", "Crackling light streams out of the crystal globe."},
                    679:     {G_LEVER,    &wallForeColor,         &wallBackColor,         0,  0,  DF_PLAIN_FIRE,  0,          DF_TURRET_LEVER,0,              NO_LIGHT,       (T_OBSTRUCTS_EVERYTHING), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_PROMOTES_ON_PLAYER_ENTRY | TM_LIST_IN_SIDEBAR | TM_VISUALLY_DISTINCT | TM_INVERT_WHEN_HIGHLIGHTED),"a lever", "The lever moves."},
                    680:
                    681:     // worm tunnels
                    682:     {0,             0,                      0,                      100,0,  0,              0,          DF_WORM_TUNNEL_MARKER_ACTIVE,0, NO_LIGHT,       (0), (TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED),                                                    "",                     ""},
                    683:     {0,             0,                      0,                      100,0,  0,              0,          DF_GRANITE_CRUMBLES,-2000,      NO_LIGHT,       (0), (TM_VANISHES_UPON_PROMOTION),                                                                  "a rough granite wall", "The granite is split open with splinters of rock jutting out at odd angles."},
                    684:     {G_WALL,     &wallForeColor,         &wallBackColor,         0,  0,  DF_PLAIN_FIRE,  0,          DF_WALL_SHATTER,0,              NO_LIGHT,       (T_OBSTRUCTS_EVERYTHING), (TM_STAND_IN_TILE | TM_VANISHES_UPON_PROMOTION | TM_IS_WIRED | TM_CONNECTS_LEVEL),"a stone wall", "The rough stone wall is firm and unyielding."},
                    685:
                    686:     // zombie crypt
                    687:     {G_FIRE,     &fireForeColor,         &statueBackColor,       0,  0,  DF_PLAIN_FIRE,  0,          0,              0,              BURNING_CREATURE_LIGHT, (T_OBSTRUCTS_PASSABILITY | T_OBSTRUCTS_ITEMS | T_IS_FIRE), (TM_STAND_IN_TILE | TM_LIST_IN_SIDEBAR),"a ceremonial brazier",      "The ancient brazier smolders with a deep crimson flame."},
                    688:
                    689:     // goblin warren
                    690:     {G_FLOOR,    &mudBackColor,          &refuseBackColor,       85, 0,  DF_STENCH_SMOLDER,0,        0,              0,              NO_LIGHT,       (T_IS_FLAMMABLE), (TM_VANISHES_UPON_PROMOTION),                                                     "the mud floor",        "Rotting animal matter has been ground into the mud floor; the stench is awful."},
                    691:     {G_WALL,     &mudWallForeColor,      &mudWallBackColor,      0,  0,  DF_PLAIN_FIRE,  0,          0,              0,              NO_LIGHT,       (T_OBSTRUCTS_EVERYTHING), (TM_STAND_IN_TILE),                                                       "a mud-covered wall",   "A malodorous layer of clay and fecal matter coats the wall."},
                    692:     {G_DOORWAY,    &mudWallForeColor,      &refuseBackColor,       25, 50, DF_EMBERS,      0,          0,              0,              NO_LIGHT,       (T_OBSTRUCTS_VISION | T_OBSTRUCTS_GAS | T_IS_FLAMMABLE), (TM_STAND_IN_TILE | TM_VISUALLY_DISTINCT), "hanging animal skins", "you push through the animal skins that hang across the threshold."},
                    693: };
                    694:
                    695: // Features in the gas layer use the startprob as volume, ignore probdecr, and spawn in only a single point.
                    696: // Intercepts and slopes are in units of 0.01.
                    697: dungeonFeature dungeonFeatureCatalog[NUMBER_DUNGEON_FEATURES] = {
                    698:     // tileType                 layer       start   decr    fl  txt  flare   fCol fRad  propTerrain subseqDF
                    699:     {0}, // nothing
                    700:     {GRANITE,                   DUNGEON,    80,     70,     DFF_CLEAR_OTHER_TERRAIN},
                    701:     {CRYSTAL_WALL,              DUNGEON,    200,    50,     DFF_CLEAR_OTHER_TERRAIN},
                    702:     {LUMINESCENT_FUNGUS,        SURFACE,    60,     8,      DFF_BLOCKED_BY_OTHER_LAYERS},
                    703:     {GRASS,                     SURFACE,    75,     5,      DFF_BLOCKED_BY_OTHER_LAYERS},
                    704:     {DEAD_GRASS,                SURFACE,    75,     5,      DFF_BLOCKED_BY_OTHER_LAYERS,    "", 0,  0,  0,      0,          DF_DEAD_FOLIAGE},
                    705:     {BONES,                     SURFACE,    75,     23,     0},
                    706:     {RUBBLE,                    SURFACE,    45,     23,     0},
                    707:     {FOLIAGE,                   SURFACE,    100,    33,     (DFF_BLOCKED_BY_OTHER_LAYERS)},
                    708:     {FUNGUS_FOREST,             SURFACE,    100,    45,     (DFF_BLOCKED_BY_OTHER_LAYERS)},
                    709:     {DEAD_FOLIAGE,              SURFACE,    50,     30,     (DFF_BLOCKED_BY_OTHER_LAYERS)},
                    710:
                    711:     // misc. liquids
                    712:     {SUNLIGHT_POOL,             LIQUID,     65,     6,      0},
                    713:     {DARKNESS_PATCH,            LIQUID,     65,     11,     0},
                    714:
                    715:     // Dungeon features spawned during gameplay:
                    716:
                    717:     // revealed secrets
                    718:     {DOOR,                      DUNGEON,    0,      0,      0, "", GENERIC_FLASH_LIGHT},
                    719:     {GAS_TRAP_POISON,           DUNGEON,    0,      0,      0, "", GENERIC_FLASH_LIGHT},
                    720:     {GAS_TRAP_PARALYSIS,        DUNGEON,    0,      0,      0, "", GENERIC_FLASH_LIGHT},
                    721:     {CHASM_EDGE,                LIQUID,     100,    100,    0, "", GENERIC_FLASH_LIGHT},
                    722:     {TRAP_DOOR,                 LIQUID,     0,      0,      DFF_CLEAR_OTHER_TERRAIN, "", GENERIC_FLASH_LIGHT, 0, 0, 0, DF_SHOW_TRAPDOOR_HALO},
                    723:     {GAS_TRAP_CONFUSION,        DUNGEON,    0,      0,      0, "", GENERIC_FLASH_LIGHT},
                    724:     {FLAMETHROWER,              DUNGEON,    0,      0,      0, "", GENERIC_FLASH_LIGHT},
                    725:     {FLOOD_TRAP,                DUNGEON,    0,      0,      0, "", GENERIC_FLASH_LIGHT},
                    726:     {NET_TRAP,                  DUNGEON,    0,      0,      0, "", GENERIC_FLASH_LIGHT},
                    727:     {ALARM_TRAP,                DUNGEON,    0,      0,      0, "", GENERIC_FLASH_LIGHT},
                    728:
                    729:     // bloods
                    730:     // Start probability is actually a percentage for bloods.
                    731:     // Base probability is 15 + (damage * 2/3), and then take the given percentage of that.
                    732:     // If it's a gas, we multiply the base by an additional 100.
                    733:     // Thus to get a starting gas volume of a poison potion (1000), with a hit for 10 damage, use a starting probability of 48.
                    734:     {RED_BLOOD,                 SURFACE,    100,    25,     0},
                    735:     {GREEN_BLOOD,               SURFACE,    100,    25,     0},
                    736:     {PURPLE_BLOOD,              SURFACE,    100,    25,     0},
                    737:     {WORM_BLOOD,                SURFACE,    100,    25,     0},
                    738:     {ACID_SPLATTER,             SURFACE,    200,    25,     0},
                    739:     {ASH,                       SURFACE,    50,     25,     0},
                    740:     {EMBERS,                    SURFACE,    125,    25,     0},
                    741:     {ECTOPLASM,                 SURFACE,    110,    25,     0},
                    742:     {RUBBLE,                    SURFACE,    33,     25,     0},
                    743:     {ROT_GAS,                   GAS,        12,     0,      0},
                    744:
                    745:     // monster effects
                    746:     {VOMIT,                     SURFACE,    30,     10,     0},
                    747:     {POISON_GAS,                GAS,        2000,   0,      0},
                    748:     {GAS_EXPLOSION,             SURFACE,    350,    100,    0,  "", EXPLOSION_FLARE_LIGHT},
                    749:     {RED_BLOOD,                 SURFACE,    150,    30,     0},
                    750:     {FLAMEDANCER_FIRE,          SURFACE,    200,    75,     0},
                    751:
                    752:     // mutation effects
                    753:     {GAS_EXPLOSION,             SURFACE,    350,    100,    0,  "The corpse detonates with terrifying force!", EXPLOSION_FLARE_LIGHT},
                    754:     {LICHEN,                    SURFACE,    70,     60,     0,  "Poisonous spores burst from the corpse!"},
                    755:
                    756:     // misc
                    757:     {NOTHING,                   GAS,        0,      0,      DFF_EVACUATE_CREATURES_FIRST},
                    758:     {ROT_GAS,                   GAS,        15,     0,      0},
                    759:     {STEAM,                     GAS,        325,    0,      0},
                    760:     {STEAM,                     GAS,        15,     0,      0},
                    761:     {METHANE_GAS,               GAS,        2,      0,      0},
                    762:     {EMBERS,                    SURFACE,    0,      0,      0},
                    763:     {URINE,                     SURFACE,    65,     25,     0},
                    764:     {UNICORN_POOP,              SURFACE,    65,     40,     0},
                    765:     {PUDDLE,                    SURFACE,    13,     25,     0},
                    766:     {ASH,                       SURFACE,    0,      0,      0},
                    767:     {ECTOPLASM,                 SURFACE,    0,      0,      0},
                    768:     {FORCEFIELD,                SURFACE,    100,    50,     0},
                    769:     {FORCEFIELD_MELT,           SURFACE,    0,      0,      0},
                    770:     {SACRED_GLYPH,              LIQUID,     100,    100,    0,  "", EMPOWERMENT_LIGHT},
                    771:     {LICHEN,                    SURFACE,    2,      100,    (DFF_BLOCKED_BY_OTHER_LAYERS)}, // Lichen won't spread through lava.
                    772:     {RUBBLE,                    SURFACE,    45,     23,     (DFF_ACTIVATE_DORMANT_MONSTER)},
                    773:     {RUBBLE,                    SURFACE,    0,      0,      (DFF_ACTIVATE_DORMANT_MONSTER)},
                    774:
                    775:     {SPIDERWEB,                 SURFACE,    15,     12,     0},
                    776:     {SPIDERWEB,                 SURFACE,    100,    39,     0},
                    777:
                    778:     {ANCIENT_SPIRIT_VINES,      SURFACE,    75,     70,     0},
                    779:     {ANCIENT_SPIRIT_GRASS,      SURFACE,    50,     47,     0},
                    780:
                    781:     // foliage
                    782:     {TRAMPLED_FOLIAGE,          SURFACE,    0,      0,      0},
                    783:     {DEAD_GRASS,                SURFACE,    75,     75,     0},
                    784:     {FOLIAGE,                   SURFACE,    0,      0,      (DFF_BLOCKED_BY_OTHER_LAYERS)},
                    785:     {TRAMPLED_FUNGUS_FOREST,    SURFACE,    0,      0,      0},
                    786:     {FUNGUS_FOREST,             SURFACE,    0,      0,      (DFF_BLOCKED_BY_OTHER_LAYERS)},
                    787:
                    788:     // brimstone
                    789:     {ACTIVE_BRIMSTONE,          LIQUID,     0,      0,      0},
                    790:     {INERT_BRIMSTONE,           LIQUID,     0,      0,      0,  "", 0,  0,  0,      0,          DF_BRIMSTONE_FIRE},
                    791:
                    792:     // bloodwort
                    793:     {BLOODFLOWER_POD,           SURFACE,    60,     60,     DFF_EVACUATE_CREATURES_FIRST},
                    794:     {BLOODFLOWER_POD,           SURFACE,    10,     10,     DFF_EVACUATE_CREATURES_FIRST},
                    795:     {HEALING_CLOUD,             GAS,        350,    0,      0},
                    796:
                    797:     // dewars
                    798:     {POISON_GAS,                GAS,        20000,  0,      0, "the dewar shatters and pressurized caustic gas explodes outward!", 0, &poisonGasColor, 4, 0, DF_DEWAR_GLASS},
                    799:     {CONFUSION_GAS,             GAS,        20000,  0,      0, "the dewar shatters and pressurized confusion gas explodes outward!", 0, &confusionGasColor, 4, 0, DF_DEWAR_GLASS},
                    800:     {PARALYSIS_GAS,             GAS,        20000,  0,      0, "the dewar shatters and pressurized paralytic gas explodes outward!", 0, &pink, 4, 0, DF_DEWAR_GLASS},
                    801:     {METHANE_GAS,               GAS,        20000,  0,      0, "the dewar shatters and pressurized methane gas explodes outward!", 0, &methaneColor, 4, 0, DF_DEWAR_GLASS},
                    802:     {BROKEN_GLASS,              SURFACE,    100,    70,     0},
                    803:     {CARPET,                    DUNGEON,    120,    20,     0},
                    804:
                    805:     // algae
                    806:     {DEEP_WATER_ALGAE_WELL,     DUNGEON,    0,      0,      DFF_SUPERPRIORITY},
                    807:     {DEEP_WATER_ALGAE_1,        LIQUID,     50,     100,    0,  "", 0,  0,   0,     DEEP_WATER, DF_ALGAE_2},
                    808:     {DEEP_WATER_ALGAE_2,        LIQUID,     0,      0,      0},
                    809:     {DEEP_WATER,                LIQUID,     0,      0,      DFF_SUPERPRIORITY},
                    810:
                    811:     // doors, item cages, altars, glyphs, guardians -- reusable machine components
                    812:     {OPEN_DOOR,                 DUNGEON,    0,      0,      0},
                    813:     {DOOR,                      DUNGEON,    0,      0,      0},
                    814:     {OPEN_IRON_DOOR_INERT,      DUNGEON,    0,      0,      0,  "", GENERIC_FLASH_LIGHT},
                    815:     {ALTAR_CAGE_OPEN,           DUNGEON,    0,      0,      0,  "the cages lift off of the altars as you approach.", GENERIC_FLASH_LIGHT},
                    816:     {ALTAR_CAGE_CLOSED,         DUNGEON,    0,      0,      (DFF_EVACUATE_CREATURES_FIRST), "the cages lower to cover the altars.", GENERIC_FLASH_LIGHT},
                    817:     {ALTAR_INERT,               DUNGEON,    0,      0,      0},
                    818:     {FLOOR_FLOODABLE,           DUNGEON,    0,      0,      0,  "the altar retracts into the ground with a grinding sound.", GENERIC_FLASH_LIGHT},
                    819:     {PORTAL_LIGHT,              SURFACE,    0,      0,      (DFF_EVACUATE_CREATURES_FIRST | DFF_ACTIVATE_DORMANT_MONSTER), "the archway flashes, and you catch a glimpse of another world!"},
                    820:     {MACHINE_GLYPH_INACTIVE,    DUNGEON,    0,      0,      0},
                    821:     {MACHINE_GLYPH,             DUNGEON,    0,      0,      0},
                    822:     {GUARDIAN_GLOW,             SURFACE,    0,      0,      0,  ""},
                    823:     {GUARDIAN_GLOW,             SURFACE,    0,      0,      0,  "the glyph beneath you glows, and the guardians take a step!"},
                    824:     {GUARDIAN_GLOW,             SURFACE,    0,      0,      0,  "the mirrored totem flashes, reflecting the red glow of the glyph beneath you."},
                    825:     {MACHINE_GLYPH,             DUNGEON,    200,    95,     DFF_BLOCKED_BY_OTHER_LAYERS},
                    826:     {WALL_LEVER,                DUNGEON,    0,      0,      0,  "you notice a lever hidden behind a loose stone in the wall.", GENERIC_FLASH_LIGHT},
                    827:     {WALL_LEVER_PULLED,         DUNGEON,    0,      0,      0},
                    828:     {WALL_LEVER_HIDDEN,         DUNGEON,    0,      0,      0},
                    829:
                    830:     {BRIDGE_FALLING,            LIQUID,     200,    100,    0, "", 0, 0, 0, BRIDGE},
                    831:     {CHASM,                     LIQUID,     0,      0,      0, "", GENERIC_FLASH_LIGHT, 0, 0, 0, DF_BRIDGE_FALL_PREP},
                    832:
                    833:     // fire
                    834:     {PLAIN_FIRE,                SURFACE,    0,      0,      0},
                    835:     {GAS_FIRE,                  SURFACE,    0,      0,      0},
                    836:     {GAS_EXPLOSION,             SURFACE,    60,     17,     0},
                    837:     {DART_EXPLOSION,            SURFACE,    0,      0,      0},
                    838:     {BRIMSTONE_FIRE,            SURFACE,    0,      0,      0},
                    839:     {0,                         0,          0,      0,      0,  "the rope bridge snaps from the heat and plunges into the chasm!", FALLEN_TORCH_FLASH_LIGHT,    0,  0,      0,      DF_BRIDGE_FALL},
                    840:     {PLAIN_FIRE,                SURFACE,    100,    37,     0},
                    841:     {EMBERS,                    SURFACE,    0,      0,      0},
                    842:     {EMBERS,                    SURFACE,    100,    94,     0},
                    843:     {OBSIDIAN,                  SURFACE,    0,      0,      0},
                    844:     {ITEM_FIRE,                 SURFACE,    0,      0,      0,  "", FALLEN_TORCH_FLASH_LIGHT},
                    845:     {CREATURE_FIRE,             SURFACE,    0,      0,      0,  "", FALLEN_TORCH_FLASH_LIGHT},
                    846:
                    847:     {FLOOD_WATER_SHALLOW,       SURFACE,    225,    37,     0,  "", 0,  0,  0,      0,          DF_FLOOD_2},
                    848:     {FLOOD_WATER_DEEP,          SURFACE,    175,    37,     0,  "the area is flooded as water rises through imperceptible holes in the ground."},
                    849:     {FLOOD_WATER_SHALLOW,       SURFACE,    10,     25,     0},
                    850:     {HOLE,                      SURFACE,    200,    100,    0},
                    851:     {HOLE_EDGE,                 SURFACE,    0,      0,      0},
                    852:
                    853:     // ice effects
                    854:     {ICE_DEEP,                  LIQUID,     150,    50,     DFF_EVACUATE_CREATURES_FIRST,   "", 0,  0,  0,      DEEP_WATER,         DF_ALGAE_1_FREEZE},
                    855:     {ICE_DEEP,                  LIQUID,     150,    50,     DFF_EVACUATE_CREATURES_FIRST,   "", 0,  0,  0,      DEEP_WATER_ALGAE_1, DF_ALGAE_2_FREEZE},
                    856:     {ICE_DEEP,                  LIQUID,     150,    50,     DFF_EVACUATE_CREATURES_FIRST,   "", 0,  0,  0,      DEEP_WATER_ALGAE_2, DF_SHALLOW_WATER_FREEZE},
                    857:     {ICE_DEEP_MELT,             LIQUID,     0,      0,      0},
                    858:     {DEEP_WATER,                LIQUID,     0,      0,      0},
                    859:     {ICE_SHALLOW,               LIQUID,     100,    50,     DFF_EVACUATE_CREATURES_FIRST,   "", 0,  0,  0,      SHALLOW_WATER},
                    860:     {ICE_SHALLOW_MELT,          LIQUID,     0,      0,      0},
                    861:     {SHALLOW_WATER,             LIQUID,     0,      0,      0},
                    862:
                    863:     // gas trap effects
                    864:     {POISON_GAS,                GAS,        1000,   0,      0,  "a cloud of caustic gas sprays upward from the floor!"},
                    865:     {CONFUSION_GAS,             GAS,        300,    0,      0,  "a sparkling cloud of confusion gas sprays upward from the floor!"},
                    866:     {NETTING,                   SURFACE,    300,    90,     0,  "a net falls from the ceiling!"},
                    867:     {0,                         0,          0,      0,      DFF_AGGRAVATES_MONSTERS, "a piercing shriek echoes through the nearby rooms!", 0, 0, DCOLS/2},
                    868:     {METHANE_GAS,               GAS,        10000,  0,      0}, // debugging toy
                    869:
                    870:     // potions
                    871:     {POISON_GAS,                GAS,        1000,   0,      0,  "", 0,  &poisonGasColor,4},
                    872:     {PARALYSIS_GAS,             GAS,        1000,   0,      0,  "", 0,  &pink,4},
                    873:     {CONFUSION_GAS,             GAS,        1000,   0,      0,  "", 0,  &confusionGasColor, 4},
                    874:     {PLAIN_FIRE,                SURFACE,    100,    37,     0,  "", EXPLOSION_FLARE_LIGHT},
                    875:     {DARKNESS_CLOUD,            GAS,        200,    0,      0},
                    876:     {HOLE_EDGE,                 SURFACE,    300,    100,    0,  "", 0,  &darkBlue,3,0,          DF_HOLE_2},
                    877:     {LICHEN,                    SURFACE,    70,     60,     0},
                    878:
                    879:     // other items
                    880:     {PLAIN_FIRE,                SURFACE,    100,    45,     0,  "", 0,  &yellow,3},
                    881:     {HOLE_GLOW,                 SURFACE,    200,    100,    DFF_SUBSEQ_EVERYWHERE,  "", 0,  &darkBlue,3,0,          DF_STAFF_HOLE_EDGE},
                    882:     {HOLE_EDGE,                 SURFACE,    100,    100,    0},
                    883:
                    884:     // machine components
                    885:
                    886:     // commutation altars
                    887:     {COMMUTATION_ALTAR_INERT,   DUNGEON,    0,      0,      0,  "the items on the two altars flash with a brilliant light!", SCROLL_ENCHANTMENT_LIGHT},
                    888:     {PIPE_GLOWING,              SURFACE,    90,     60,     0},
                    889:     {PIPE_INERT,                SURFACE,    0,      0,      0,  "", SCROLL_ENCHANTMENT_LIGHT},
                    890:
                    891:     // resurrection altars
                    892:     {RESURRECTION_ALTAR_INERT,  DUNGEON,    0,      0,      DFF_RESURRECT_ALLY, "An old friend emerges from a bloom of sacred light!", EMPOWERMENT_LIGHT},
                    893:     {MACHINE_TRIGGER_FLOOR_REPEATING, LIQUID, 300,  100,    DFF_SUPERPRIORITY},
                    894:
                    895:     // sacrifice altars
                    896:     {SACRIFICE_ALTAR,           DUNGEON,    0,      0,      0,  "a demonic presence whispers its demand: \"bring to me the marked sacrifice!\""},
                    897:     {SACRIFICE_LAVA,            DUNGEON,    0,      0,      0,  "demonic cackling echoes through the room as the altar plunges downward!"},
                    898:     {ALTAR_CAGE_RETRACTABLE,    DUNGEON,    0,      0,      0},
                    899:
                    900:     // coffin bursts open to reveal vampire:
                    901:     {COFFIN_OPEN,               DUNGEON,    0,      0,      DFF_ACTIVATE_DORMANT_MONSTER,   "the coffin opens and a dark figure rises!", 0, &darkGray, 3},
                    902:     {PLAIN_FIRE,                SURFACE,    0,      0,      DFF_ACTIVATE_DORMANT_MONSTER,   "as flames begin to lick the coffin, its tenant bursts forth!", 0, 0, 0, 0, DF_EMBERS_PATCH},
                    903:     {MACHINE_TRIGGER_FLOOR,     DUNGEON,    200,    100,    0},
                    904:
                    905:     // throwing tutorial:
                    906:     {ALTAR_INERT,               DUNGEON,    0,      0,      0,  "the cage lifts off of the altar.", GENERIC_FLASH_LIGHT},
                    907:     {TRAP_DOOR,                 LIQUID,     225,    100,    (DFF_CLEAR_OTHER_TERRAIN | DFF_SUBSEQ_EVERYWHERE), "", 0, 0, 0, 0, DF_SHOW_TRAPDOOR_HALO},
                    908:     {LAVA,                      LIQUID,     225,    100,    (DFF_CLEAR_OTHER_TERRAIN)},
                    909:     {MACHINE_PRESSURE_PLATE_USED,DUNGEON,   0,      0,      0},
                    910:
                    911:     // rat trap:
                    912:     {RAT_TRAP_WALL_CRACKING,    DUNGEON,    0,      0,      0,  "a scratching sound emanates from the nearby walls!", 0, 0, 0, 0, DF_RUBBLE},
                    913:
                    914:     // wooden barricade at entrance:
                    915:     {PLAIN_FIRE,                SURFACE,    0,      0,      0,  "flames quickly consume the wooden barricade."},
                    916:
                    917:     // wooden barricade around altar:
                    918:     {WOODEN_BARRICADE,          DUNGEON,    220,    100,    (DFF_TREAT_AS_BLOCKING | DFF_SUBSEQ_EVERYWHERE), "", 0, 0, 0, 0, DF_SMALL_DEAD_GRASS},
                    919:
                    920:     // shallow water flood machine:
                    921:     {MACHINE_FLOOD_WATER_SPREADING, LIQUID, 0,      0,      0,  "you hear a heavy click, and the nearby water begins flooding the area!"},
                    922:     {SHALLOW_WATER,             LIQUID,     0,      0,      0},
                    923:     {MACHINE_FLOOD_WATER_SPREADING,LIQUID,  100,    100,    0,  "", 0,  0,  0,      FLOOR_FLOODABLE,            DF_SHALLOW_WATER},
                    924:     {MACHINE_FLOOD_WATER_DORMANT,LIQUID,    250,    100,    (DFF_TREAT_AS_BLOCKING), "", 0, 0, 0, 0,            DF_SPREADABLE_DEEP_WATER_POOL},
                    925:     {DEEP_WATER,                LIQUID,     90,     100,    (DFF_CLEAR_OTHER_TERRAIN | DFF_PERMIT_BLOCKING)},
                    926:
                    927:     // unstable floor machine:
                    928:     {MACHINE_COLLAPSE_EDGE_SPREADING,LIQUID,0,      0,      0,  "you hear a deep rumbling noise as the floor begins to collapse!"},
                    929:     {CHASM,                     LIQUID,     0,      0,      DFF_CLEAR_OTHER_TERRAIN, "", 0, 0, 0, 0, DF_SHOW_TRAPDOOR_HALO},
                    930:     {MACHINE_COLLAPSE_EDGE_SPREADING,LIQUID,100,    100,    0,  "", 0,  0,  0,  FLOOR_FLOODABLE,    DF_COLLAPSE},
                    931:     {MACHINE_COLLAPSE_EDGE_DORMANT,LIQUID,  0,      0,      0},
                    932:
                    933:     // levitation bridge machine:
                    934:     {CHASM_WITH_HIDDEN_BRIDGE_ACTIVE,LIQUID,100,    100,    0,  "", 0, 0,  0,  CHASM_WITH_HIDDEN_BRIDGE,  DF_BRIDGE_APPEARS},
                    935:     {CHASM_WITH_HIDDEN_BRIDGE_ACTIVE,LIQUID,100,    100,    0,  "a stone bridge extends from the floor with a grinding sound.", 0, 0,  0,  CHASM_WITH_HIDDEN_BRIDGE,  DF_BRIDGE_APPEARS},
                    936:     {STONE_BRIDGE,              LIQUID,     0,      0,      0},
                    937:     {MACHINE_CHASM_EDGE,        LIQUID,     100,    100,    0},
                    938:
                    939:     // retracting lava pool:
                    940:     {LAVA_RETRACTABLE,          LIQUID,     100,    100,    0,  "", 0, 0,  0,  LAVA},
                    941:     {LAVA_RETRACTING,           LIQUID,     0,      0,      0,  "hissing fills the air as the lava begins to cool."},
                    942:     {OBSIDIAN,                  SURFACE,    0,      0,      0,  "", 0,  0,  0,      0,          DF_STEAM_ACCUMULATION},
                    943:
                    944:     // hidden poison vent machine:
                    945:     {MACHINE_POISON_GAS_VENT_DORMANT,DUNGEON,0,     0,      0,  "you notice an inactive gas vent hidden in a crevice of the floor.", GENERIC_FLASH_LIGHT},
                    946:     {MACHINE_POISON_GAS_VENT,   DUNGEON,    0,      0,      0,  "deadly purple gas starts wafting out of hidden vents in the floor!"},
                    947:     {PORTCULLIS_CLOSED,         DUNGEON,    0,      0,      DFF_EVACUATE_CREATURES_FIRST,   "with a heavy mechanical sound, an iron portcullis falls from the ceiling!", GENERIC_FLASH_LIGHT},
                    948:     {PORTCULLIS_DORMANT,        DUNGEON,    0,      0,      0,  "the portcullis slowly rises from the ground into a slot in the ceiling.", GENERIC_FLASH_LIGHT},
                    949:     {POISON_GAS,                GAS,        25,     0,      0},
                    950:
                    951:     // hidden methane vent machine:
                    952:     {MACHINE_METHANE_VENT_DORMANT,DUNGEON,0,        0,      0,  "you notice an inactive gas vent hidden in a crevice of the floor.", GENERIC_FLASH_LIGHT},
                    953:     {MACHINE_METHANE_VENT,      DUNGEON,    0,      0,      0,  "explosive methane gas starts wafting out of hidden vents in the floor!", 0, 0, 0, 0, DF_VENT_SPEW_METHANE},
                    954:     {METHANE_GAS,               GAS,        60,     0,      0},
                    955:     {PILOT_LIGHT,               DUNGEON,    0,      0,      0,  "a torch falls from its mount and lies sputtering on the floor.", FALLEN_TORCH_FLASH_LIGHT},
                    956:
                    957:     // paralysis trap:
                    958:     {MACHINE_PARALYSIS_VENT,    DUNGEON,    0,      0,      0,  "you notice an inactive gas vent hidden in a crevice of the floor.", GENERIC_FLASH_LIGHT},
                    959:     {PARALYSIS_GAS,             GAS,        350,    0,      0,  "paralytic gas sprays upward from hidden vents in the floor!", 0, 0, 0, 0, DF_REVEAL_PARALYSIS_VENT_SILENTLY},
                    960:     {MACHINE_PARALYSIS_VENT,    DUNGEON,    0,      0,      0},
                    961:
                    962:     // thematic dungeon:
                    963:     {RED_BLOOD,                 SURFACE,    75,     25,     0},
                    964:
                    965:     // statuary:
                    966:     {STATUE_CRACKING,           DUNGEON,    0,      0,      0,  "cracks begin snaking across the marble surface of the statue!", 0, 0, 0, 0, DF_RUBBLE},
                    967:     {RUBBLE,                    SURFACE,    120,    100,    DFF_ACTIVATE_DORMANT_MONSTER,   "the statue shatters!", 0, &darkGray, 3, 0, DF_RUBBLE},
                    968:
                    969:     // hidden turrets:
                    970:     {WALL,                      DUNGEON,    0,      0,      DFF_ACTIVATE_DORMANT_MONSTER,   "you hear a click, and the stones in the wall shift to reveal turrets!", 0, 0, 0, 0, DF_RUBBLE},
                    971:
                    972:     // worm tunnels:
                    973:     {WORM_TUNNEL_MARKER_DORMANT,LIQUID,     5,      5,      0,  "", 0,  0,  GRANITE},
                    974:     {WORM_TUNNEL_MARKER_ACTIVE, LIQUID,     0,      0,      0},
                    975:     {FLOOR,                     DUNGEON,    0,      0,      (DFF_SUPERPRIORITY | DFF_ACTIVATE_DORMANT_MONSTER),  "", 0, 0,  0,  0,  DF_TUNNELIZE},
                    976:     {FLOOR,                     DUNGEON,    0,      0,      0,  "the nearby wall cracks and collapses in a cloud of dust!", 0, &darkGray,  5,  0,  DF_TUNNELIZE},
                    977:
                    978:     // haunted room:
                    979:     {DARK_FLOOR_DARKENING,      DUNGEON,    0,      0,      0,  "the light in the room flickers and you feel a chill in the air."},
                    980:     {DARK_FLOOR,                DUNGEON,    0,      0,      DFF_ACTIVATE_DORMANT_MONSTER,   "", 0, 0, 0, 0, DF_ECTOPLASM_DROPLET},
                    981:     {HAUNTED_TORCH_TRANSITIONING,DUNGEON,   0,      0,      0},
                    982:     {HAUNTED_TORCH,             DUNGEON,    0,      0,      0},
                    983:
                    984:     // mud pit:
                    985:     {MACHINE_MUD_DORMANT,       LIQUID,     100,    100,    0},
                    986:     {MUD,                       LIQUID,     0,      0,      DFF_ACTIVATE_DORMANT_MONSTER,   "across the bog, bubbles rise ominously from the mud."},
                    987:
                    988:     // electric crystals:
                    989:     {ELECTRIC_CRYSTAL_ON,       DUNGEON,    0,      0,      0, "the crystal absorbs the electricity and begins to glow.", CHARGE_FLASH_LIGHT},
                    990:     {WALL,                      DUNGEON,    0,      0,      DFF_ACTIVATE_DORMANT_MONSTER,   "the wall above the lever shifts to reveal a spark turret!"},
                    991:
                    992:     // idyll:
                    993:     {SHALLOW_WATER,             LIQUID,     150,    100,    (DFF_PERMIT_BLOCKING)},
                    994:     {DEEP_WATER,                LIQUID,     90,     100,    (DFF_TREAT_AS_BLOCKING | DFF_CLEAR_OTHER_TERRAIN | DFF_SUBSEQ_EVERYWHERE), "", 0, 0, 0, 0, DF_SHALLOW_WATER_POOL},
                    995:
                    996:     // swamp:
                    997:     {SHALLOW_WATER,             LIQUID,     30,     100,    0},
                    998:     {GRAY_FUNGUS,               SURFACE,    80,     50,     0,  "", 0, 0, 0, 0, DF_SWAMP_MUD},
                    999:     {MUD,                       LIQUID,     75,     5,      0,  "", 0, 0, 0, 0, DF_SWAMP_WATER},
                   1000:
                   1001:     // camp:
                   1002:     {HAY,                       SURFACE,    90,     87,     0},
                   1003:     {JUNK,                      SURFACE,    20,     20,     0},
                   1004:
                   1005:     // remnants:
                   1006:     {CARPET,                    DUNGEON,    110,    20,     DFF_SUBSEQ_EVERYWHERE,  "", 0, 0, 0, 0, DF_REMNANT_ASH},
                   1007:     {BURNED_CARPET,             SURFACE,    120,    100,    0},
                   1008:
                   1009:     // chasm catwalk:
                   1010:     {CHASM,                     LIQUID,     0,      0,      DFF_CLEAR_OTHER_TERRAIN, "", 0, 0, 0, 0, DF_SHOW_TRAPDOOR_HALO},
                   1011:     {STONE_BRIDGE,              LIQUID,     0,      0,      DFF_CLEAR_OTHER_TERRAIN},
                   1012:
                   1013:     // lake catwalk:
                   1014:     {DEEP_WATER,                LIQUID,     0,      0,      DFF_CLEAR_OTHER_TERRAIN, "", 0, 0, 0, 0, DF_LAKE_HALO},
                   1015:     {SHALLOW_WATER,             LIQUID,     160,    100,    0},
                   1016:
                   1017:     // worms pop out of walls:
                   1018:     {RUBBLE,                    SURFACE,    120,    100,    DFF_ACTIVATE_DORMANT_MONSTER,   "the nearby wall explodes in a shower of stone fragments!", 0, &darkGray, 3, 0, DF_RUBBLE},
                   1019:
                   1020:     // monster cages open:
                   1021:     {MONSTER_CAGE_OPEN,         DUNGEON,    0,      0,      0},
                   1022:
                   1023:     // goblin warren:
                   1024:     {STENCH_SMOKE_GAS,          GAS,        50,     0,      0, "", 0, 0, 0, 0, DF_PLAIN_FIRE},
                   1025:     {STENCH_SMOKE_GAS,          GAS,        50,     0,      0, "", 0, 0, 0, 0, DF_EMBERS},
                   1026: };
                   1027:
                   1028: dungeonProfile dungeonProfileCatalog[NUMBER_DUNGEON_PROFILES] = {
                   1029:     // Room frequencies:
                   1030:     //      0. Cross room
                   1031:     //      1. Small symmetrical cross room
                   1032:     //      2. Small room
                   1033:     //      3. Circular room
                   1034:     //      4. Chunky room
                   1035:     //      5. Cave
                   1036:     //      6. Cavern (the kind that fills a level)
                   1037:     //      7. Entrance room (the big upside-down T room at the start of depth 1)
                   1038:
                   1039:     // Room frequencies
                   1040:     // 0    1   2   3   4   5   6   7   Corridor chance
                   1041:     {{2,    1,  1,  1,  7,  1,  0,  0}, 10},    // Basic dungeon generation (further adjusted by depth)
                   1042:     {{10,   0,  0,  3,  7,  10, 10, 0}, 0},     // First room for basic dungeon generation (further adjusted by depth)
                   1043:
                   1044:     {{0,    0,  1,  0,  0,  0,  0,  0}, 0},     // Goblin warrens
                   1045:     {{0,    5,  0,  1,  0,  0,  0,  0}, 0},     // Sentinel sanctuaries
                   1046: };
                   1047:
                   1048: // radius is in units of 0.01
                   1049: const lightSource lightCatalog[NUMBER_LIGHT_KINDS] = {
                   1050:     //color                 radius range            fade%   passThroughCreatures
                   1051:     {0},                                                                // NO_LIGHT
                   1052:     {&minersLightColor,     {0, 0, 1},              35,     true},      // miners light
                   1053:     {&fireBoltColor,        {300, 400, 1},          0,      false},     // burning creature light
                   1054:     {&wispLightColor,       {400, 800, 1},          0,      false},     // will-o'-the-wisp light
                   1055:     {&fireBoltColor,        {300, 400, 1},          0,      false},     // salamander glow
                   1056:     {&pink,                 {600, 600, 1},          0,      true},      // imp light
                   1057:     {&pixieColor,           {400, 600, 1},          50,     false},     // pixie light
                   1058:     {&lichLightColor,       {1500, 1500, 1},        0,      false},     // lich light
                   1059:     {&flamedancerCoronaColor,{1000, 2000, 1},       0,      false},     // flamedancer light
                   1060:     {&sentinelLightColor,   {300, 500, 1},          0,      false},     // sentinel light
                   1061:     {&unicornLightColor,    {300, 400, 1},          0,      false},     // unicorn light
                   1062:     {&ifritLightColor,      {300, 600, 1},          0,      false},     // ifrit light
                   1063:     {&fireBoltColor,        {400, 600, 1},          0,      false},     // phoenix light
                   1064:     {&fireBoltColor,        {150, 300, 1},          0,      false},     // phoenix egg light
                   1065:     {&yendorLightColor,     {1500, 1500, 1},        0,      false},     // Yendorian light
                   1066:     {&spectralBladeLightColor,{350, 350, 1},        0,      false},     // spectral blades
                   1067:     {&summonedImageLightColor,{350, 350, 1},        0,      false},     // weapon images
                   1068:     {&lightningColor,       {250, 250, 1},          35,     false},     // lightning turret light
                   1069:     {&explosiveAuraColor,   {150, 200, 1},          0,      true},      // explosive bloat light
                   1070:     {&lightningColor,       {300, 300, 1},          0,      false},     // bolt glow
                   1071:     {&telepathyColor,       {200, 200, 1},          0,      true},      // telepathy light
                   1072:     {&sacrificeTargetColor, {250, 250, 1},          0,      true},      // sacrifice doom light
                   1073:
                   1074:     // flares:
                   1075:     {&scrollProtectionColor,{600, 600, 1},          0,      true},      // scroll of protection flare
                   1076:     {&scrollEnchantmentColor,{600, 600, 1},         0,      true},      // scroll of enchantment flare
                   1077:     {&potionStrengthColor,  {600, 600, 1},          0,      true},      // potion of strength flare
                   1078:     {&empowermentFlashColor,{600, 600, 1},          0,      true},      // empowerment flare
                   1079:     {&genericFlashColor,    {300, 300, 1},          0,      true},      // generic flash flare
                   1080:     {&fireFlashColor,       {800, 800, 1},          0,      false},     // fallen torch flare
                   1081:     {&summoningFlashColor,  {600, 600, 1},          0,      true},      // summoning flare
                   1082:     {&explosionFlareColor,  {5000, 5000, 1},        0,      true},      // explosion (explosive bloat or incineration potion)
                   1083:     {&quietusFlashColor,    {300, 300, 1},          0,      true},      // quietus activation flare
                   1084:     {&slayingFlashColor,    {300, 300, 1},          0,      true},      // slaying activation flare
                   1085:     {&lightningColor,       {800, 800, 1},          0,      false},     // electric crystal activates
                   1086:
                   1087:     // glowing terrain:
                   1088:     {&torchLightColor,      {1000, 1000, 1},        50,     false},     // torch
                   1089:     {&lavaLightColor,       {300, 300, 1},          50,     false},     // lava
                   1090:     {&sunLightColor,        {200, 200, 1},          25,     true},      // sunlight
                   1091:     {&darknessPatchColor,   {400, 400, 1},          0,      true},      // darkness patch
                   1092:     {&fungusLightColor,     {300, 300, 1},          50,     false},     // luminescent fungus
                   1093:     {&fungusForestLightColor,{500, 500, 1},         0,      false},     // luminescent forest
                   1094:     {&algaeBlueLightColor,  {300, 300, 1},          0,      false},     // luminescent algae blue
                   1095:     {&algaeGreenLightColor, {300, 300, 1},          0,      false},     // luminescent algae green
                   1096:     {&ectoplasmColor,       {200, 200, 1},          50,     false},     // ectoplasm
                   1097:     {&unicornLightColor,    {200, 200, 1},          0,      false},     // unicorn poop light
                   1098:     {&lavaLightColor,       {200, 200, 1},          50,     false},     // embers
                   1099:     {&lavaLightColor,       {500, 1000, 1},         0,      false},     // fire
                   1100:     {&lavaLightColor,       {200, 300, 1},          0,      false},     // brimstone fire
                   1101:     {&explosionColor,       {DCOLS*100,DCOLS*100,1},100,    false},     // explosions
                   1102:     {&dartFlashColor,       {15*100,15*100,1},      0,      false},     // incendiary darts
                   1103:     {&portalActivateLightColor, {DCOLS*100,DCOLS*100,1},0,  false},     // portal activation
                   1104:     {&confusionLightColor,  {300, 300, 1},          100,    false},     // confusion gas
                   1105:     {&darknessCloudColor,   {500, 500, 1},          0,      true},      // darkness cloud
                   1106:     {&forceFieldLightColor, {200, 200, 1},          50,     false},     // forcefield
                   1107:     {&crystalWallLightColor,{300, 500, 1},          50,     false},     // crystal wall
                   1108:     {&torchLightColor,      {200, 400, 1},          0,      false},     // candle light
                   1109:     {&hauntedTorchColor,    {400, 600, 1},          0,      false},     // haunted torch
                   1110:     {&glyphLightColor,      {100, 100, 1},          0,      false},     // glyph dim light
                   1111:     {&glyphLightColor,      {300, 300, 1},          0,      false},     // glyph bright light
                   1112:     {&sacredGlyphColor,     {300, 300, 1},          0,      false},     // sacred glyph light
                   1113:     {&descentLightColor,    {600, 600, 1},          0,      false},     // magical pit light
                   1114:     {&sacrificeTargetColor, {800, 1200, 1},          0,      true},      // demonic statue light
                   1115: };
                   1116:
                   1117: const blueprint blueprintCatalog[NUMBER_BLUEPRINTS] = {
                   1118:     {{0}}, // nothing
                   1119:     //BLUEPRINTS:
                   1120:     //depths            roomSize    freq    featureCt   dungeonProfileType  flags   (features on subsequent lines)
                   1121:
                   1122:         //FEATURES:
                   1123:         //DF        terrain     layer       instanceCtRange minInsts    itemCat     itemKind    monsterKind     reqSpace        hordeFl     itemFlags   featureFlags
                   1124:
                   1125:     // -- REWARD ROOMS --
                   1126:
                   1127:     // Mixed item library -- can check one item out at a time
                   1128:     {{1, 12},           {30, 50},   30,     6,          0,                  (BP_ROOM | BP_PURGE_INTERIOR | BP_SURROUND_WITH_WALLS | BP_OPEN_INTERIOR | BP_IMPREGNABLE | BP_REWARD), {
                   1129:         {0,         CARPET,     DUNGEON,        {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)},
                   1130:         {0,         0,          0,              {1,1},      1,          0,          0,          0,              2,              0,          0,          (MF_BUILD_AT_ORIGIN | MF_PERMIT_BLOCKING | MF_BUILD_VESTIBULE)},
                   1131:         {0,         ALTAR_CAGE_OPEN,DUNGEON,    {1,1},      1,          WAND,       -1,         0,              2,              0,          (ITEM_IS_KEY | ITEM_KIND_AUTO_ID | ITEM_PLAYER_AVOIDS), (MF_GENERATE_ITEM | MF_TREAT_AS_BLOCKING | MF_IMPREGNABLE)},
                   1132:         {0,         ALTAR_CAGE_OPEN,DUNGEON,    {3,3},      3,          (WEAPON|ARMOR|WAND),-1, 0,              2,              0,          (ITEM_IS_KEY | ITEM_KIND_AUTO_ID | ITEM_PLAYER_AVOIDS), (MF_GENERATE_ITEM | MF_NO_THROWING_WEAPONS | MF_TREAT_AS_BLOCKING | MF_IMPREGNABLE)},
                   1133:         {0,         ALTAR_CAGE_OPEN,DUNGEON,    {2,3},      2,          (STAFF|RING|CHARM),-1,  0,              2,              0,          (ITEM_IS_KEY | ITEM_KIND_AUTO_ID | ITEM_MAX_CHARGES_KNOWN | ITEM_PLAYER_AVOIDS),    (MF_GENERATE_ITEM | MF_NO_THROWING_WEAPONS | MF_TREAT_AS_BLOCKING | MF_IMPREGNABLE)},
                   1134:         {0,         STATUE_INERT,DUNGEON,       {2,3},      0,          0,          -1,         0,              2,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_BUILD_IN_WALLS | MF_IMPREGNABLE)}}},
                   1135:     // Single item category library -- can check one item out at a time
                   1136:     {{1, 12},           {30, 50},   15,     5,          0,                  (BP_ROOM | BP_PURGE_INTERIOR | BP_SURROUND_WITH_WALLS | BP_OPEN_INTERIOR | BP_IMPREGNABLE | BP_REWARD), {
                   1137:         {0,         CARPET,     DUNGEON,        {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)},
                   1138:         {0,         0,          0,              {1,1},      1,          0,          0,          0,              2,              0,          0,          (MF_BUILD_AT_ORIGIN | MF_PERMIT_BLOCKING | MF_BUILD_VESTIBULE)},
                   1139:         {0,         ALTAR_CAGE_OPEN,DUNGEON,    {3,4},      3,          (RING),     -1,         0,              2,              0,          (ITEM_IS_KEY | ITEM_KIND_AUTO_ID | ITEM_MAX_CHARGES_KNOWN | ITEM_PLAYER_AVOIDS),    (MF_GENERATE_ITEM | MF_TREAT_AS_BLOCKING | MF_ALTERNATIVE | MF_IMPREGNABLE)},
                   1140:         {0,         ALTAR_CAGE_OPEN,DUNGEON,    {4,5},      4,          (STAFF),    -1,         0,              2,              0,          (ITEM_IS_KEY | ITEM_KIND_AUTO_ID | ITEM_MAX_CHARGES_KNOWN | ITEM_PLAYER_AVOIDS),    (MF_GENERATE_ITEM | MF_TREAT_AS_BLOCKING | MF_ALTERNATIVE | MF_IMPREGNABLE)},
                   1141:         {0,         STATUE_INERT,DUNGEON,       {2,3},      0,          0,          -1,         0,              2,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_BUILD_IN_WALLS | MF_IMPREGNABLE)}}},
                   1142:     // Treasure room -- apothecary or archive (potions or scrolls)
                   1143:     {{8, AMULET_LEVEL}, {20, 40},   20,     6,          0,                  (BP_ROOM | BP_PURGE_INTERIOR | BP_SURROUND_WITH_WALLS | BP_OPEN_INTERIOR | BP_IMPREGNABLE | BP_REWARD), {
                   1144:         {0,         CARPET,     DUNGEON,        {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)},
                   1145:         {0,         0,          0,              {5,7},      2,          (POTION),   -1,         0,              2,              0,          0,          (MF_GENERATE_ITEM | MF_ALTERNATIVE | MF_TREAT_AS_BLOCKING)},
                   1146:         {0,         0,          0,              {4,6},      2,          (SCROLL),   -1,         0,              2,              0,          0,          (MF_GENERATE_ITEM | MF_ALTERNATIVE | MF_TREAT_AS_BLOCKING)},
                   1147:         {0,         FUNGUS_FOREST,SURFACE,      {3,4},      0,          0,          -1,         0,              2,              0,          0,          0},
                   1148:         {0,         0,          0,              {1,1},      1,          0,          0,          0,              2,              0,          0,          (MF_BUILD_AT_ORIGIN | MF_PERMIT_BLOCKING | MF_BUILD_VESTIBULE)},
                   1149:         {0,         STATUE_INERT,DUNGEON,       {2,3},      0,          0,          -1,         0,              2,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_BUILD_IN_WALLS | MF_IMPREGNABLE)}}},
                   1150:     // Guaranteed good permanent item on a glowing pedestal (runic weapon/armor or 2 staffs)
                   1151:     {{5, 16},           {10, 30},   30,     6,          0,                  (BP_ROOM | BP_PURGE_INTERIOR | BP_SURROUND_WITH_WALLS | BP_OPEN_INTERIOR | BP_IMPREGNABLE | BP_REWARD), {
                   1152:         {0,         CARPET,     DUNGEON,        {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)},
                   1153:         {0,         STATUE_INERT,DUNGEON,       {2,3},      0,          0,          -1,         0,              2,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_BUILD_IN_WALLS | MF_IMPREGNABLE)},
                   1154:         {0,         PEDESTAL,   DUNGEON,        {1,1},      1,          (WEAPON),   -1,         0,              2,              0,          ITEM_IDENTIFIED,(MF_GENERATE_ITEM | MF_ALTERNATIVE | MF_REQUIRE_GOOD_RUNIC | MF_NO_THROWING_WEAPONS | MF_TREAT_AS_BLOCKING)},
                   1155:         {0,         PEDESTAL,   DUNGEON,        {1,1},      1,          (ARMOR),    -1,         0,              2,              0,          ITEM_IDENTIFIED,(MF_GENERATE_ITEM | MF_ALTERNATIVE | MF_REQUIRE_GOOD_RUNIC | MF_TREAT_AS_BLOCKING)},
                   1156:         {0,         PEDESTAL,   DUNGEON,        {2,2},      2,          (STAFF),    -1,         0,              2,              0,          (ITEM_KIND_AUTO_ID | ITEM_MAX_CHARGES_KNOWN),   (MF_GENERATE_ITEM | MF_ALTERNATIVE | MF_TREAT_AS_BLOCKING)},
                   1157:         {0,         0,          0,              {1,1},      1,          0,          0,          0,              2,              0,          0,          (MF_BUILD_AT_ORIGIN | MF_PERMIT_BLOCKING | MF_BUILD_VESTIBULE)}}},
                   1158:     // Guaranteed good consumable item on glowing pedestals (scrolls of enchanting, potion of life)
                   1159:     {{10, AMULET_LEVEL},{10, 30},   30,     5,          0,                  (BP_ROOM | BP_PURGE_INTERIOR | BP_SURROUND_WITH_WALLS | BP_OPEN_INTERIOR | BP_IMPREGNABLE | BP_REWARD), {
                   1160:         {0,         CARPET,     DUNGEON,        {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)},
                   1161:         {0,         STATUE_INERT,DUNGEON,       {1,3},      0,          0,          -1,         0,              2,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_BUILD_IN_WALLS | MF_IMPREGNABLE)},
                   1162:         {0,         PEDESTAL,   DUNGEON,        {1,1},      1,          (SCROLL),   SCROLL_ENCHANTING, 0,       2,              0,          (ITEM_KIND_AUTO_ID),    (MF_GENERATE_ITEM | MF_ALTERNATIVE | MF_TREAT_AS_BLOCKING)},
                   1163:         {0,         PEDESTAL,   DUNGEON,        {1,1},      1,          (POTION),   POTION_LIFE,0,              2,              0,          (ITEM_KIND_AUTO_ID),    (MF_GENERATE_ITEM | MF_ALTERNATIVE | MF_TREAT_AS_BLOCKING)},
                   1164:         {0,         0,          0,              {1,1},      1,          0,          0,          0,              2,              0,          0,          (MF_BUILD_AT_ORIGIN | MF_PERMIT_BLOCKING | MF_BUILD_VESTIBULE)}}},
                   1165:     // Commutation altars
                   1166:     {{13, AMULET_LEVEL},{10, 30},   50,     4,          0,                  (BP_ROOM | BP_PURGE_INTERIOR | BP_SURROUND_WITH_WALLS | BP_OPEN_INTERIOR | BP_IMPREGNABLE | BP_REWARD), {
                   1167:         {0,         CARPET,     DUNGEON,        {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)},
                   1168:         {0,         STATUE_INERT,DUNGEON,       {1,3},      0,          0,          -1,         0,              2,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_BUILD_IN_WALLS | MF_IMPREGNABLE)},
                   1169:         {DF_MAGIC_PIPING,COMMUTATION_ALTAR,DUNGEON,{2,2},   2,          0,          -1,         0,              2,              0,          0,          (MF_TREAT_AS_BLOCKING)},
                   1170:         {0,         0,          0,              {1,1},      1,          0,          0,          0,              2,              0,          0,          (MF_BUILD_AT_ORIGIN | MF_PERMIT_BLOCKING | MF_BUILD_VESTIBULE)}}},
                   1171:     // Resurrection altar
                   1172:     {{13, AMULET_LEVEL},{10, 30},   30,     4,          0,                  (BP_ROOM | BP_PURGE_INTERIOR | BP_SURROUND_WITH_WALLS | BP_OPEN_INTERIOR | BP_IMPREGNABLE | BP_REWARD), {
                   1173:         {0,         CARPET,     DUNGEON,        {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)},
                   1174:         {0,         STATUE_INERT,DUNGEON,       {1,3},      0,          0,          -1,         0,              2,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_BUILD_IN_WALLS | MF_IMPREGNABLE)},
                   1175:         {DF_MACHINE_FLOOR_TRIGGER_REPEATING, RESURRECTION_ALTAR,DUNGEON, {1,1}, 1, 0, -1,       0,              2,              0,          0,          (MF_TREAT_AS_BLOCKING)},
                   1176:         {0,         0,          0,              {1,1},      1,          0,          0,          0,              2,              0,          0,          (MF_BUILD_AT_ORIGIN | MF_PERMIT_BLOCKING | MF_BUILD_VESTIBULE)}}},
                   1177:     // Outsourced item -- same item possibilities as in the good permanent item reward room (plus charms), but directly adopted by 1-2 key machines.
                   1178:     {{5, 17},           {0, 0},     20,     4,          0,                  (BP_REWARD | BP_NO_INTERIOR_FLAG),  {
                   1179:         {0,         0,          0,              {1,1},      1,          (WEAPON),   -1,         0,              0,              0,          ITEM_IDENTIFIED,(MF_GENERATE_ITEM | MF_ALTERNATIVE | MF_REQUIRE_GOOD_RUNIC | MF_NO_THROWING_WEAPONS | MF_OUTSOURCE_ITEM_TO_MACHINE | MF_BUILD_ANYWHERE_ON_LEVEL)},
                   1180:         {0,         0,          0,              {1,1},      1,          (ARMOR),    -1,         0,              0,              0,          ITEM_IDENTIFIED,(MF_GENERATE_ITEM | MF_ALTERNATIVE | MF_REQUIRE_GOOD_RUNIC | MF_OUTSOURCE_ITEM_TO_MACHINE | MF_BUILD_ANYWHERE_ON_LEVEL)},
                   1181:         {0,         0,          0,              {2,2},      2,          (STAFF),    -1,         0,              0,              0,          ITEM_KIND_AUTO_ID, (MF_GENERATE_ITEM | MF_ALTERNATIVE | MF_OUTSOURCE_ITEM_TO_MACHINE | MF_BUILD_ANYWHERE_ON_LEVEL)},
                   1182:         {0,         0,          0,              {1,2},      1,          (CHARM),    -1,         0,              0,              0,          ITEM_KIND_AUTO_ID, (MF_GENERATE_ITEM | MF_ALTERNATIVE | MF_OUTSOURCE_ITEM_TO_MACHINE | MF_BUILD_ANYWHERE_ON_LEVEL)}}},
                   1183:     // Dungeon -- two allies chained up for the taking
                   1184:     {{5, AMULET_LEVEL}, {30, 80},   12,     5,          0,                  (BP_ROOM | BP_REWARD),  {
                   1185:         {0,         VOMIT,      SURFACE,        {2,2},      2,          0,          -1,         0,              2,              (HORDE_MACHINE_CAPTIVE | HORDE_LEADER_CAPTIVE), 0, (MF_GENERATE_HORDE | MF_TREAT_AS_BLOCKING)},
                   1186:         {DF_AMBIENT_BLOOD,MANACLE_T,SURFACE,    {1,2},      1,          0,          -1,         0,              1,              0,          0,          0},
                   1187:         {DF_AMBIENT_BLOOD,MANACLE_L,SURFACE,    {1,2},      1,          0,          -1,         0,              1,              0,          0,          0},
                   1188:         {DF_BONES,  0,          0,              {2,3},      1,          0,          -1,         0,              1,              0,          0,          0},
                   1189:         {DF_VOMIT,  0,          0,              {2,3},      1,          0,          -1,         0,              1,              0,          0,          0},
                   1190:         {0,         0,          0,              {1,1},      1,          0,          0,          0,              2,              0,          0,          (MF_BUILD_AT_ORIGIN | MF_PERMIT_BLOCKING | MF_BUILD_VESTIBULE)}}},
                   1191:     // Kennel -- allies locked in cages in an open room; choose one or two to unlock and take with you.
                   1192:     {{5, AMULET_LEVEL}, {30, 80},   12,     4,          0,                  (BP_ROOM | BP_REWARD),  {
                   1193:         {0,         MONSTER_CAGE_CLOSED,DUNGEON,{3,5},      3,          0,          -1,         0,              2,              (HORDE_MACHINE_KENNEL | HORDE_LEADER_CAPTIVE), 0, (MF_GENERATE_HORDE | MF_TREAT_AS_BLOCKING | MF_IMPREGNABLE)},
                   1194:         {0,         0,          0,              {1,2},      1,          KEY,        KEY_CAGE,   0,              1,              0,          (ITEM_IS_KEY | ITEM_PLAYER_AVOIDS),(MF_PERMIT_BLOCKING | MF_GENERATE_ITEM | MF_OUTSOURCE_ITEM_TO_MACHINE | MF_SKELETON_KEY | MF_KEY_DISPOSABLE)},
                   1195:         {DF_AMBIENT_BLOOD, 0,   0,              {3,5},      3,          0,          -1,         0,              1,              0,          0,          0},
                   1196:         {DF_BONES,  0,          0,              {3,5},      3,          0,          -1,         0,              1,              0,          0,          0},
                   1197:         {0,         TORCH_WALL, DUNGEON,        {2,3},      2,          0,          0,          0,              1,              0,          0,          (MF_BUILD_IN_WALLS)}}},
                   1198:     // Vampire lair -- allies locked in cages and chained in a hidden room with a vampire in a coffin; vampire has one cage key.
                   1199:     {{10, AMULET_LEVEL},{50, 80},   5,      4,          0,                  (BP_ROOM | BP_REWARD | BP_SURROUND_WITH_WALLS | BP_PURGE_INTERIOR), {
                   1200:         {DF_AMBIENT_BLOOD,0,    0,              {1,2},      1,          0,          -1,         0,              2,              (HORDE_MACHINE_CAPTIVE | HORDE_LEADER_CAPTIVE), 0, (MF_GENERATE_HORDE | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY)},
                   1201:         {DF_AMBIENT_BLOOD,MONSTER_CAGE_CLOSED,DUNGEON,{2,4},2,          0,          -1,         0,              2,              (HORDE_VAMPIRE_FODDER | HORDE_LEADER_CAPTIVE), 0, (MF_GENERATE_HORDE | MF_TREAT_AS_BLOCKING | MF_IMPREGNABLE | MF_NOT_IN_HALLWAY)},
                   1202:         {DF_TRIGGER_AREA,COFFIN_CLOSED,0,       {1,1},      1,          KEY,        KEY_CAGE,   MK_VAMPIRE,     1,              0,          (ITEM_IS_KEY | ITEM_PLAYER_AVOIDS),(MF_GENERATE_ITEM | MF_SKELETON_KEY | MF_MONSTER_TAKE_ITEM | MF_MONSTERS_DORMANT | MF_FAR_FROM_ORIGIN | MF_KEY_DISPOSABLE)},
                   1203:         {DF_AMBIENT_BLOOD,SECRET_DOOR,DUNGEON,  {1,1},      1,          0,          0,          0,              1,              0,          0,          (MF_PERMIT_BLOCKING | MF_BUILD_AT_ORIGIN)}}},
                   1204:     // Legendary ally -- approach the altar with the crystal key to activate a portal and summon a legendary ally.
                   1205:     {{8, AMULET_LEVEL}, {30, 50},   15,     2,          0,                  (BP_ROOM | BP_REWARD),  {
                   1206:         {DF_LUMINESCENT_FUNGUS, ALTAR_KEYHOLE, DUNGEON, {1,1}, 1,       KEY,        KEY_PORTAL, 0,              2,              0,          (ITEM_IS_KEY | ITEM_PLAYER_AVOIDS),(MF_GENERATE_ITEM | MF_NOT_IN_HALLWAY | MF_NEAR_ORIGIN | MF_OUTSOURCE_ITEM_TO_MACHINE | MF_KEY_DISPOSABLE)},
                   1207:         {DF_LUMINESCENT_FUNGUS, PORTAL, DUNGEON,{1,1},      1,          0,          -1,         0,              2,              HORDE_MACHINE_LEGENDARY_ALLY,0, (MF_GENERATE_HORDE | MF_MONSTERS_DORMANT | MF_FAR_FROM_ORIGIN)}}},
                   1208:     // Goblin warren
                   1209:     {{5, 15},           {100, 200}, 15,     9,          DP_GOBLIN_WARREN,   (BP_ROOM | BP_REWARD | BP_MAXIMIZE_INTERIOR | BP_REDESIGN_INTERIOR),    {
                   1210:         {0,         MUD_FLOOR,  DUNGEON,        {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)},
                   1211:         {0,         MUD_DOORWAY,DUNGEON,        {1,1},      1,          0,          -1,         0,              1,              0,          0,          (MF_BUILD_AT_ORIGIN)},
                   1212:         {0,         MUD_WALL,   DUNGEON,        {1,1},      100,        0,          -1,         0,              1,              0,          0,          (MF_BUILD_IN_WALLS | MF_EVERYWHERE)},
                   1213:         {0,         PEDESTAL,   DUNGEON,        {1,1},      1,          (SCROLL),   SCROLL_ENCHANTING, MK_GOBLIN_CHIEFTAN, 2,   0,          (ITEM_KIND_AUTO_ID),    (MF_GENERATE_ITEM | MF_MONSTER_SLEEPING | MF_ALTERNATIVE | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY | MF_FAR_FROM_ORIGIN)},
                   1214:         {0,         PEDESTAL,   DUNGEON,        {1,1},      1,          (POTION),   POTION_LIFE, MK_GOBLIN_CHIEFTAN, 2,         0,          (ITEM_KIND_AUTO_ID),    (MF_GENERATE_ITEM | MF_MONSTER_SLEEPING | MF_ALTERNATIVE | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY | MF_FAR_FROM_ORIGIN)},
                   1215:         {0,         0,          0,              {5, 8},     5,          0,          -1,         0,              2,              HORDE_MACHINE_GOBLIN_WARREN,    0,  (MF_GENERATE_HORDE | MF_NOT_IN_HALLWAY | MF_MONSTER_SLEEPING)},
                   1216:         {0,         0,          0,              {2,3},      2,          (WEAPON|ARMOR), -1,     0,              1,              0,          0,          (MF_GENERATE_ITEM | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY)},
                   1217:         {DF_HAY,    0,          0,              {10, 15},   1,          0,          -1,         0,              1,              0,          0,          (MF_NOT_IN_HALLWAY)},
                   1218:         {DF_JUNK,   0,          0,              {7, 12},    1,          0,          -1,         0,              1,              0,          0,          (MF_NOT_IN_HALLWAY)}}},
                   1219:     // Sentinel sanctuary
                   1220:     {{10, 23},           {100, 200}, 15,  10,           DP_SENTINEL_SANCTUARY, (BP_ROOM | BP_REWARD | BP_MAXIMIZE_INTERIOR | BP_REDESIGN_INTERIOR), {
                   1221:         {0,         MARBLE_FLOOR,DUNGEON,       {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)},
                   1222:         {0,         CRYSTAL_WALL,DUNGEON,       {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_BUILD_IN_WALLS | MF_EVERYWHERE)},
                   1223:         {0,         PEDESTAL, DUNGEON, {1,1},   1,          (SCROLL),   SCROLL_ENCHANTING,0,    2,              0,              (ITEM_KIND_AUTO_ID),    (MF_GENERATE_ITEM | MF_ALTERNATIVE | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY | MF_FAR_FROM_ORIGIN)},
                   1224:         {0,         PEDESTAL, DUNGEON, {1,1},   1,          (POTION),   POTION_LIFE,0,          2,              0,              (ITEM_KIND_AUTO_ID),    (MF_GENERATE_ITEM | MF_ALTERNATIVE | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY | MF_FAR_FROM_ORIGIN)},
                   1225:         {0,         MACHINE_GLYPH,DUNGEON,      {30, 35},   20,         0,          -1,         0,              1,              0,          0,          (MF_PERMIT_BLOCKING)},
                   1226:         {0,         STATUE_INERT,DUNGEON,       {3, 5},     3,          0,          -1,         MK_SENTINEL,    2,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY)},
                   1227:         {0,         STATUE_INERT,DUNGEON,       {10, 15},   8,          0,          -1,         MK_SENTINEL,    2,              0,          0,          MF_BUILD_IN_WALLS},
                   1228:         {0,         0,          0,              {4, 6},     4,          0,          -1,         MK_GUARDIAN,    1,              0,          0,          MF_TREAT_AS_BLOCKING},
                   1229:         {0,         0,          0,              {0, 2},     0,          0,          -1,         MK_WINGED_GUARDIAN, 1,          0,          0,          MF_TREAT_AS_BLOCKING},
                   1230:         {0,         0,          0,              {2,3},      2,          (SCROLL | POTION), -1,  0,              1,              0,          0,          (MF_GENERATE_ITEM | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY)}}},
                   1231:
                   1232:     // -- AMULET HOLDER --
                   1233:     // Statuary -- key on an altar, area full of statues; take key to cause statues to burst and reveal monsters
                   1234:     {{10, AMULET_LEVEL},{35, 40},   0,      4,          0,                  (BP_PURGE_INTERIOR | BP_OPEN_INTERIOR), {
                   1235:         {DF_LUMINESCENT_FUNGUS, AMULET_SWITCH, DUNGEON, {1,1}, 1,       AMULET,     -1,         0,              2,              0,          0,          (MF_GENERATE_ITEM | MF_NEAR_ORIGIN | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY)},
                   1236:         {0,         FUNGUS_FOREST,SURFACE,      {2,3},      0,          0,          -1,         0,              2,              0,          0,          MF_NOT_IN_HALLWAY},
                   1237:         {0,         STATUE_INSTACRACK,DUNGEON,  {1,1},      1,          0,          -1,         MK_WARDEN_OF_YENDOR,1,          0,          0,          (MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY | MF_MONSTERS_DORMANT | MF_FAR_FROM_ORIGIN | MF_IN_PASSABLE_VIEW_OF_ORIGIN | MF_IMPREGNABLE)},
                   1238:         {0,         TORCH_WALL, DUNGEON,        {3,4},      0,          0,          0,          0,              1,              0,          0,          (MF_BUILD_IN_WALLS)}}},
                   1239:
                   1240:     // -- VESTIBULES --
                   1241:
                   1242:     // Plain locked door, key guarded by an adoptive room
                   1243:     {{1, AMULET_LEVEL}, {1, 1},     100,        1,      0,                  (BP_VESTIBULE), {
                   1244:         {0,         LOCKED_DOOR, DUNGEON,       {1,1},      1,          KEY,        KEY_DOOR,   0,              1,              0,          (ITEM_IS_KEY | ITEM_PLAYER_AVOIDS), (MF_BUILD_AT_ORIGIN | MF_PERMIT_BLOCKING | MF_GENERATE_ITEM | MF_OUTSOURCE_ITEM_TO_MACHINE | MF_KEY_DISPOSABLE | MF_IMPREGNABLE)}}},
                   1245:     // Plain secret door
                   1246:     {{2, AMULET_LEVEL}, {1, 1},     1,      1,          0,                  (BP_VESTIBULE), {
                   1247:         {0,         SECRET_DOOR, DUNGEON,       {1,1},      1,          0,          0,          0,              1,              0,          0,          (MF_BUILD_AT_ORIGIN | MF_PERMIT_BLOCKING)}}},
                   1248:     // Lever and either an exploding wall or a portcullis
                   1249:     {{4, AMULET_LEVEL}, {1, 1},     8,      3,          0,                  (BP_VESTIBULE), {
                   1250:         {0,         WORM_TUNNEL_OUTER_WALL,DUNGEON,{1,1},   1,          0,          -1,         0,              1,              0,          0,          (MF_BUILD_AT_ORIGIN | MF_PERMIT_BLOCKING | MF_IMPREGNABLE | MF_ALTERNATIVE)},
                   1251:         {0,         PORTCULLIS_CLOSED,DUNGEON,  {1,1},      1,          0,          0,          0,              3,              0,          0,          (MF_BUILD_AT_ORIGIN | MF_PERMIT_BLOCKING | MF_IMPREGNABLE | MF_ALTERNATIVE)},
                   1252:         {0,         WALL_LEVER_HIDDEN,DUNGEON,  {1,1},      1,          0,          -1,         0,              1,              0,          0,          (MF_BUILD_IN_WALLS | MF_IN_PASSABLE_VIEW_OF_ORIGIN | MF_BUILD_ANYWHERE_ON_LEVEL)}}},
                   1253:     // Flammable barricade in the doorway -- burn the wooden barricade to enter
                   1254:     {{1, 6},            {1, 1},     10,     3,          0,                  (BP_VESTIBULE), {
                   1255:         {0,         WOODEN_BARRICADE,DUNGEON,   {1,1},      1,          0,          0,          0,              1,              0,          0,          (MF_PERMIT_BLOCKING | MF_BUILD_AT_ORIGIN)},
                   1256:         {0,         0,          0,              {1,1},      1,          WEAPON,     INCENDIARY_DART, 0,         1,              0,          0,          (MF_GENERATE_ITEM | MF_BUILD_ANYWHERE_ON_LEVEL | MF_NOT_IN_HALLWAY | MF_ALTERNATIVE)},
                   1257:         {0,         0,          0,              {1,1},      1,          POTION,     POTION_INCINERATION, 0,     1,              0,          0,          (MF_GENERATE_ITEM | MF_BUILD_ANYWHERE_ON_LEVEL | MF_NOT_IN_HALLWAY | MF_ALTERNATIVE)}}},
                   1258:     // Statue in the doorway -- use a scroll of shattering to enter
                   1259:     {{1, AMULET_LEVEL}, {1, 1},     6,      2,          0,                  (BP_VESTIBULE), {
                   1260:         {0,         STATUE_INERT_DOORWAY,DUNGEON,       {1,1},1,        0,          0,          0,              1,              0,          0,          (MF_PERMIT_BLOCKING | MF_BUILD_AT_ORIGIN)},
                   1261:         {0,         0,          0,              {1,1},      1,          SCROLL,     SCROLL_SHATTERING, 0,       1,              0,          0,          (MF_GENERATE_ITEM | MF_BUILD_ANYWHERE_ON_LEVEL | MF_NOT_IN_HALLWAY)}}},
                   1262:     // Statue in the doorway -- bursts to reveal monster
                   1263:     {{5, AMULET_LEVEL}, {2, 2},     6,      2,          0,                  (BP_VESTIBULE), {
                   1264:         {0,         STATUE_DORMANT_DOORWAY,DUNGEON,     {1, 1}, 1,      0,          -1,         0,              1,              HORDE_MACHINE_STATUE,0, (MF_PERMIT_BLOCKING | MF_GENERATE_HORDE | MF_MONSTERS_DORMANT | MF_BUILD_AT_ORIGIN | MF_ALTERNATIVE)},
                   1265:         {0,         MACHINE_TRIGGER_FLOOR,DUNGEON,{0,0},    1,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)}}},
                   1266:     // Throwing tutorial -- toss an item onto the pressure plate to retract the portcullis
                   1267:     {{1, 4},            {70, 70},   8,      3,          0,                  (BP_VESTIBULE), {
                   1268:         {DF_MEDIUM_HOLE, MACHINE_PRESSURE_PLATE, LIQUID, {1,1}, 1,      0,          0,          0,              1,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY)},
                   1269:         {0,         PORTCULLIS_CLOSED,DUNGEON,  {1,1},      1,          0,          0,          0,              3,              0,          0,          (MF_IMPREGNABLE | MF_PERMIT_BLOCKING | MF_BUILD_AT_ORIGIN | MF_ALTERNATIVE)},
                   1270:         {0,         WORM_TUNNEL_OUTER_WALL,DUNGEON,{1,1},   1,          0,          -1,         0,              1,              0,          0,          (MF_BUILD_AT_ORIGIN | MF_PERMIT_BLOCKING | MF_IMPREGNABLE | MF_ALTERNATIVE)}}},
                   1271:     // Pit traps -- area outside entrance is full of pit traps
                   1272:     {{1, AMULET_LEVEL}, {30, 60},   8,      3,          0,                  (BP_VESTIBULE | BP_OPEN_INTERIOR | BP_NO_INTERIOR_FLAG),    {
                   1273:         {0,         DOOR,       DUNGEON,        {1,1},      1,          0,          0,          0,              1,              0,          0,          (MF_PERMIT_BLOCKING | MF_BUILD_AT_ORIGIN | MF_ALTERNATIVE)},
                   1274:         {0,         SECRET_DOOR,DUNGEON,        {1,1},      1,          0,          0,          0,              1,              0,          0,          (MF_IMPREGNABLE | MF_PERMIT_BLOCKING | MF_BUILD_AT_ORIGIN | MF_ALTERNATIVE)},
                   1275:         {0,         TRAP_DOOR_HIDDEN,DUNGEON,   {60, 60},   1,          0,          -1,         0,              1,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_REPEAT_UNTIL_NO_PROGRESS)}}},
                   1276:     // Beckoning obstacle -- a mirrored totem guards the door, and glyph are around the doorway.
                   1277:     {{5, AMULET_LEVEL}, {15, 30},   8,      3,          0,                  (BP_VESTIBULE | BP_PURGE_INTERIOR | BP_OPEN_INTERIOR), {
                   1278:         {0,         DOOR,       DUNGEON,        {1,1},      1,          0,          -1,         0,              1,              0,          0,          (MF_PERMIT_BLOCKING | MF_BUILD_AT_ORIGIN)},
                   1279:         {0,         MACHINE_GLYPH,DUNGEON,      {1,1},      0,          0,          -1,         0,              1,              0,          0,          (MF_NEAR_ORIGIN | MF_EVERYWHERE)},
                   1280:         {0,         0,          0,              {1,1},      1,          0,          -1,         MK_MIRRORED_TOTEM,3,            0,          0,          (MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY | MF_IN_VIEW_OF_ORIGIN | MF_BUILD_ANYWHERE_ON_LEVEL)},
                   1281:         {0,         MACHINE_GLYPH,DUNGEON,      {3,5},      2,          0,          -1,         0,              2,              0,          0,          (MF_TREAT_AS_BLOCKING)}}},
                   1282:     // Guardian obstacle -- a guardian is in the door on a glyph, with other glyphs scattered around.
                   1283:     {{6, AMULET_LEVEL}, {25, 25},   8,      4,          0,                  (BP_VESTIBULE | BP_OPEN_INTERIOR),  {
                   1284:         {0,         DOOR,       DUNGEON,        {1,1},      1,          0,          0,          MK_GUARDIAN,    2,              0,          0,          (MF_BUILD_AT_ORIGIN | MF_PERMIT_BLOCKING | MF_ALTERNATIVE)},
                   1285:         {0,         DOOR,       DUNGEON,        {1,1},      1,          0,          0,          MK_WINGED_GUARDIAN,2,           0,          0,          (MF_BUILD_AT_ORIGIN | MF_PERMIT_BLOCKING | MF_ALTERNATIVE)},
                   1286:         {0,         MACHINE_GLYPH,DUNGEON,      {10,10},    3,          0,          -1,         0,              1,              0,          0,          (MF_PERMIT_BLOCKING| MF_NEAR_ORIGIN)},
                   1287:         {0,         MACHINE_GLYPH,DUNGEON,      {1,1},      0,          0,          -1,         0,              2,              0,          0,          (MF_EVERYWHERE | MF_PERMIT_BLOCKING | MF_NOT_IN_HALLWAY)}}},
                   1288:
                   1289:     // -- KEY HOLDERS --
                   1290:
                   1291:     // Nested item library -- can check one item out at a time, and one is a disposable key to another reward room
                   1292:     {{1, AMULET_LEVEL}, {30, 50},   35,     7,          0,                  (BP_ROOM | BP_PURGE_INTERIOR | BP_SURROUND_WITH_WALLS | BP_OPEN_INTERIOR | BP_ADOPT_ITEM | BP_IMPREGNABLE), {
                   1293:         {0,         CARPET,     DUNGEON,        {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)},
                   1294:         {0,         WALL,       DUNGEON,        {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_BUILD_IN_WALLS | MF_IMPREGNABLE | MF_EVERYWHERE)},
                   1295:         {0,         0,          0,              {1,1},      1,          0,          0,          0,              2,              0,          0,          (MF_BUILD_AT_ORIGIN | MF_PERMIT_BLOCKING | MF_BUILD_VESTIBULE)},
                   1296:         {0,         ALTAR_CAGE_OPEN,DUNGEON,    {1,2},      1,          (WEAPON|ARMOR|WAND),-1, 0,              2,              0,          (ITEM_IS_KEY | ITEM_KIND_AUTO_ID | ITEM_PLAYER_AVOIDS), (MF_GENERATE_ITEM | MF_NO_THROWING_WEAPONS | MF_TREAT_AS_BLOCKING | MF_IMPREGNABLE)},
                   1297:         {0,         ALTAR_CAGE_OPEN,DUNGEON,    {1,2},      1,          (STAFF|RING|CHARM),-1,  0,              2,              0,          (ITEM_IS_KEY | ITEM_KIND_AUTO_ID | ITEM_MAX_CHARGES_KNOWN | ITEM_PLAYER_AVOIDS),    (MF_GENERATE_ITEM | MF_NO_THROWING_WEAPONS | MF_TREAT_AS_BLOCKING | MF_IMPREGNABLE)},
                   1298:         {0,         ALTAR_CAGE_OPEN,DUNGEON,    {1,1},      1,          0,          -1,         0,              2,              0,          (ITEM_IS_KEY | ITEM_PLAYER_AVOIDS | ITEM_MAX_CHARGES_KNOWN),    (MF_ADOPT_ITEM | MF_TREAT_AS_BLOCKING | MF_IMPREGNABLE)},
                   1299:         {0,         STATUE_INERT,DUNGEON,       {1,3},      0,          0,          -1,         0,              2,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_BUILD_IN_WALLS | MF_IMPREGNABLE)}}},
                   1300:     // Secret room -- key on an altar in a secret room
                   1301:     {{1, AMULET_LEVEL}, {15, 100},  1,      2,          0,                  (BP_ROOM | BP_ADOPT_ITEM), {
                   1302:         {0,         ALTAR_INERT,DUNGEON,        {1,1},      1,          0,          -1,         0,              1,              0,          ITEM_PLAYER_AVOIDS, (MF_ADOPT_ITEM | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY)},
                   1303:         {0,         SECRET_DOOR,DUNGEON,        {1,1},      1,          0,          0,          0,              1,              0,          0,          (MF_PERMIT_BLOCKING | MF_BUILD_AT_ORIGIN)}}},
                   1304:     // Throwing tutorial -- toss an item onto the pressure plate to retract the cage and reveal the key
                   1305:     {{1, 4},            {70, 80},   8,      2,          0,                  (BP_ADOPT_ITEM), {
                   1306:         {0,         ALTAR_CAGE_RETRACTABLE,DUNGEON,{1,1},   1,          0,          -1,         0,              3,              0,          0,          (MF_ADOPT_ITEM | MF_IMPREGNABLE | MF_NOT_IN_HALLWAY)},
                   1307:         {DF_MEDIUM_HOLE, MACHINE_PRESSURE_PLATE, LIQUID, {1,1}, 1,      0,          0,          0,              1,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY)}}},
                   1308:     // Rat trap -- getting the key triggers paralysis vents nearby and also causes rats to burst out of the walls
                   1309:     {{1,8},             {30, 70},   7,      3,          0,                  (BP_ADOPT_ITEM | BP_ROOM),  {
                   1310:         {0,         ALTAR_SWITCH,DUNGEON,       {1,1},      1,          0,          -1,         0,              1,              0,          0,          (MF_ADOPT_ITEM | MF_FAR_FROM_ORIGIN | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY)},
                   1311:         {0,         MACHINE_PARALYSIS_VENT_HIDDEN,DUNGEON,{1,1},1,      0,          -1,         0,              2,              0,          0,          (MF_FAR_FROM_ORIGIN | MF_NOT_IN_HALLWAY)},
                   1312:         {0,         RAT_TRAP_WALL_DORMANT,DUNGEON,{10,20},  5,          0,          -1,         MK_RAT,         1,              0,          0,          (MF_MONSTERS_DORMANT | MF_BUILD_IN_WALLS | MF_NOT_ON_LEVEL_PERIMETER)}}},
                   1313:     // Fun with fire -- trigger the fire trap and coax the fire over to the wooden barricade surrounding the altar and key
                   1314:     {{3, 10},           {80, 100},  10,     6,          0,                  (BP_ROOM | BP_ADOPT_ITEM | BP_PURGE_INTERIOR | BP_SURROUND_WITH_WALLS | BP_OPEN_INTERIOR), {
                   1315:         {DF_SURROUND_WOODEN_BARRICADE,ALTAR_INERT,DUNGEON,{1,1},1,      0,          -1,         0,              3,              0,          0,          (MF_ADOPT_ITEM | MF_FAR_FROM_ORIGIN | MF_TREAT_AS_BLOCKING)},
                   1316:         {0,         GRASS,      SURFACE,        {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE | MF_ALTERNATIVE)},
                   1317:         {DF_SWAMP,  0,          0,              {4,4},      2,          0,          -1,         0,              2,              0,          0,          (MF_ALTERNATIVE | MF_FAR_FROM_ORIGIN)},
                   1318:         {0,         FLAMETHROWER_HIDDEN,DUNGEON,{1,1},      1,          0,          0,          0,              1,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_NEAR_ORIGIN)},
                   1319:         {0,         GAS_TRAP_POISON_HIDDEN,DUNGEON,{3, 3},  1,          0,          -1,         0,              5,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_ALTERNATIVE)},
                   1320:         {0,         0,          0,              {2,2},      1,          POTION,     POTION_LICHEN, 0,           3,              0,          0,          (MF_GENERATE_ITEM | MF_BUILD_ANYWHERE_ON_LEVEL | MF_NOT_IN_HALLWAY | MF_ALTERNATIVE)}}},
                   1321:     // Flood room -- key on an altar in a room with pools of eel-infested waters; take key to flood room with shallow water
                   1322:     {{3, AMULET_LEVEL}, {80, 180},  10,     4,          0,                  (BP_ROOM | BP_SURROUND_WITH_WALLS | BP_PURGE_LIQUIDS | BP_PURGE_PATHING_BLOCKERS | BP_ADOPT_ITEM),  {
                   1323:         {0,         FLOOR_FLOODABLE,LIQUID,     {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)},
                   1324:         {0,         ALTAR_SWITCH,DUNGEON,       {1,1},      1,          0,          -1,         0,              5,              0,          0,          (MF_ADOPT_ITEM | MF_FAR_FROM_ORIGIN | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY)},
                   1325:         {DF_SPREADABLE_WATER_POOL,0,0,          {2, 4},     1,          0,          -1,         0,              5,              HORDE_MACHINE_WATER_MONSTER,0,MF_GENERATE_HORDE},
                   1326:         {DF_GRASS,  FOLIAGE,    SURFACE,        {3, 4},     3,          0,          -1,         0,              1,              0,          0,          0}}},
                   1327:     // Fire trap room -- key on an altar, pools of water, fire traps all over the place.
                   1328:     {{4, AMULET_LEVEL}, {80, 180},  6,      5,          0,                  (BP_ROOM | BP_SURROUND_WITH_WALLS | BP_PURGE_LIQUIDS | BP_PURGE_PATHING_BLOCKERS | BP_ADOPT_ITEM),  {
                   1329:         {0,         ALTAR_INERT,DUNGEON,        {1,1},      1,          0,          -1,         0,              1,              0,          0,          (MF_ADOPT_ITEM | MF_FAR_FROM_ORIGIN | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY)},
                   1330:         {0,         0,          0,              {1, 1},     1,          0,          -1,         0,              4,              0,          0,          MF_BUILD_AT_ORIGIN},
                   1331:         {0,         FLAMETHROWER_HIDDEN,DUNGEON,{40, 60},   20,         0,          -1,         0,              1,              0,          0,          (MF_TREAT_AS_BLOCKING)},
                   1332:         {DF_DEEP_WATER_POOL,0,  0,              {4, 4},     1,          0,          -1,         0,              4,              HORDE_MACHINE_WATER_MONSTER,0,MF_GENERATE_HORDE},
                   1333:         {DF_GRASS,  FOLIAGE,    SURFACE,        {3, 4},     3,          0,          -1,         0,              1,              0,          0,          0}}},
                   1334:     // Thief area -- empty altar, monster with item, permanently fleeing.
                   1335:     {{3, AMULET_LEVEL}, {15, 20},   10,     2,          0,                  (BP_ADOPT_ITEM),    {
                   1336:         {DF_LUMINESCENT_FUNGUS, ALTAR_INERT,DUNGEON,{1,1},  1,          0,          -1,         0,              2,              HORDE_MACHINE_THIEF,0,          (MF_ADOPT_ITEM | MF_BUILD_AT_ORIGIN | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY | MF_GENERATE_HORDE | MF_MONSTER_TAKE_ITEM | MF_MONSTER_FLEEING)},
                   1337:         {0,         STATUE_INERT,0,             {3, 5},     2,          0,          -1,         0,              2,              0,          0,          (MF_FAR_FROM_ORIGIN | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY)}}},
                   1338:     // Collapsing floor area -- key on an altar in an area; take key to cause the floor of the area to collapse
                   1339:     {{1, AMULET_LEVEL}, {45, 65},   13,     3,          0,                  (BP_ADOPT_ITEM | BP_TREAT_AS_BLOCKING), {
                   1340:         {0,         FLOOR_FLOODABLE,DUNGEON,    {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)},
                   1341:         {0,         ALTAR_SWITCH_RETRACTING,DUNGEON,{1,1},  1,          0,          -1,         0,              3,              0,          0,          (MF_ADOPT_ITEM | MF_NEAR_ORIGIN | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY)},
                   1342:         {DF_ADD_MACHINE_COLLAPSE_EDGE_DORMANT,0,0,{3, 3},   2,          0,          -1,         0,              3,              0,          0,          (MF_FAR_FROM_ORIGIN | MF_NOT_IN_HALLWAY)}}},
                   1343:     // Pit traps -- key on an altar, room full of pit traps
                   1344:     {{1, AMULET_LEVEL}, {30, 100},  10,     3,          0,                  (BP_ROOM | BP_ADOPT_ITEM),  {
                   1345:         {0,         ALTAR_INERT,DUNGEON,        {1,1},      1,          0,          -1,         0,              2,              0,          0,          (MF_ADOPT_ITEM | MF_FAR_FROM_ORIGIN | MF_TREAT_AS_BLOCKING)},
                   1346:         {0,         TRAP_DOOR_HIDDEN,DUNGEON,   {30, 40},   1,          0,          -1,         0,              1,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_REPEAT_UNTIL_NO_PROGRESS)},
                   1347:         {0,         SECRET_DOOR,DUNGEON,        {1,1},      1,          0,          0,          0,              1,              0,          0,          (MF_PERMIT_BLOCKING | MF_BUILD_AT_ORIGIN)}}},
                   1348:     // Levitation challenge -- key on an altar, room filled with pit, levitation or lever elsewhere on level, bridge appears when you grab the key/lever.
                   1349:     {{1, 13},           {75, 120},  10,     9,          0,                  (BP_ROOM | BP_ADOPT_ITEM | BP_PURGE_INTERIOR | BP_OPEN_INTERIOR | BP_SURROUND_WITH_WALLS),  {
                   1350:         {0,         ALTAR_SWITCH,DUNGEON,       {1,1},      1,          0,          -1,         0,              3,              0,          0,          (MF_ADOPT_ITEM | MF_FAR_FROM_ORIGIN | MF_TREAT_AS_BLOCKING)},
                   1351:         {0,         TORCH_WALL, DUNGEON,        {1,4},      0,          0,          0,          0,              1,              0,          0,          (MF_BUILD_IN_WALLS)},
                   1352:         {0,         0,          0,              {1,1},      1,          0,          0,          0,              3,              0,          0,          MF_BUILD_AT_ORIGIN},
                   1353:         {DF_ADD_DORMANT_CHASM_HALO, CHASM,LIQUID,{120, 120},1,          0,          -1,         0,              1,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_REPEAT_UNTIL_NO_PROGRESS)},
                   1354:         {DF_ADD_DORMANT_CHASM_HALO, CHASM_WITH_HIDDEN_BRIDGE,LIQUID,{1,1},1,0,      0,          0,              1,              0,          0,          (MF_PERMIT_BLOCKING | MF_EVERYWHERE)},
                   1355:         {0,         0,          0,              {1,1},      1,          POTION,     POTION_LEVITATION, 0,       1,              0,          0,          (MF_GENERATE_ITEM | MF_BUILD_ANYWHERE_ON_LEVEL | MF_NOT_IN_HALLWAY | MF_ALTERNATIVE)},
                   1356:         {0,         WALL_LEVER_HIDDEN,DUNGEON,  {1,1},      1,          0,          -1,         0,              1,              0,          0,          (MF_BUILD_IN_WALLS | MF_IN_PASSABLE_VIEW_OF_ORIGIN | MF_BUILD_ANYWHERE_ON_LEVEL | MF_ALTERNATIVE)}}},
                   1357:     // Web climbing -- key on an altar, room filled with pit, spider at altar to shoot webs, bridge appears when you grab the key
                   1358:     {{7, AMULET_LEVEL}, {55, 90},   10,     7,          0,                  (BP_ROOM | BP_ADOPT_ITEM | BP_PURGE_INTERIOR | BP_OPEN_INTERIOR | BP_SURROUND_WITH_WALLS),  {
                   1359:         {0,         ALTAR_SWITCH,DUNGEON,       {1,1},      1,          0,          -1,         MK_SPIDER,      3,              0,          0,          (MF_ADOPT_ITEM | MF_FAR_FROM_ORIGIN | MF_TREAT_AS_BLOCKING | MF_IN_VIEW_OF_ORIGIN)},
                   1360:         {0,         TORCH_WALL, DUNGEON,        {1,4},      0,          0,          0,          0,              1,              0,          0,          (MF_BUILD_IN_WALLS)},
                   1361:         {0,         0,          0,              {1,1},      1,          0,          0,          0,              3,              0,          0,          MF_BUILD_AT_ORIGIN},
                   1362:         {DF_ADD_DORMANT_CHASM_HALO, CHASM,LIQUID,   {120, 120}, 1,      0,          -1,         0,              1,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_REPEAT_UNTIL_NO_PROGRESS)},
                   1363:         {DF_ADD_DORMANT_CHASM_HALO, CHASM_WITH_HIDDEN_BRIDGE,LIQUID,{1,1},1,0,      0,          0,              1,              0,          0,          (MF_PERMIT_BLOCKING | MF_EVERYWHERE)}}},
                   1364:     // Lava moat room -- key on an altar, room filled with lava, levitation/fire immunity/lever elsewhere on level, lava retracts when you grab the key/lever
                   1365:     {{3, 13},           {75, 120},  7,      7,          0,                  (BP_ROOM | BP_ADOPT_ITEM | BP_PURGE_INTERIOR | BP_SURROUND_WITH_WALLS | BP_OPEN_INTERIOR),  {
                   1366:         {0,         ALTAR_SWITCH,DUNGEON,       {1,1},      1,          0,          -1,         0,              2,              0,          0,          (MF_ADOPT_ITEM | MF_FAR_FROM_ORIGIN | MF_TREAT_AS_BLOCKING)},
                   1367:         {0,         0,          0,              {1,1},      1,          0,          0,          0,              2,              0,          0,          (MF_BUILD_AT_ORIGIN)},
                   1368:         {0,         LAVA,       LIQUID,         {60,60},    1,          0,          0,          0,              1,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_REPEAT_UNTIL_NO_PROGRESS)},
                   1369:         {DF_LAVA_RETRACTABLE, LAVA_RETRACTABLE, LIQUID, {1,1}, 1,       0,          0,          0,              1,              0,          0,          (MF_PERMIT_BLOCKING | MF_EVERYWHERE)},
                   1370:         {0,         0,          0,              {1,1},      1,          POTION,     POTION_LEVITATION, 0,       1,              0,          0,          (MF_GENERATE_ITEM | MF_BUILD_ANYWHERE_ON_LEVEL | MF_NOT_IN_HALLWAY | MF_ALTERNATIVE)},
                   1371:         {0,         0,          0,              {1,1},      1,          POTION,     POTION_FIRE_IMMUNITY, 0,    1,              0,          0,          (MF_GENERATE_ITEM | MF_BUILD_ANYWHERE_ON_LEVEL | MF_NOT_IN_HALLWAY | MF_ALTERNATIVE)},
                   1372:         {0,         WALL_LEVER_HIDDEN,DUNGEON,  {1,1},      1,          0,          -1,         0,              1,              0,          0,          (MF_BUILD_IN_WALLS | MF_IN_PASSABLE_VIEW_OF_ORIGIN | MF_BUILD_ANYWHERE_ON_LEVEL | MF_ALTERNATIVE)}}},
                   1373:     // Lava moat area -- key on an altar, surrounded with lava, levitation/fire immunity elsewhere on level, lava retracts when you grab the key
                   1374:     {{3, 13},           {40, 60},   3,      5,          0,                  (BP_ADOPT_ITEM | BP_PURGE_INTERIOR | BP_OPEN_INTERIOR | BP_TREAT_AS_BLOCKING),  {
                   1375:         {0,         ALTAR_SWITCH,DUNGEON,       {1,1},      1,          0,          -1,         0,              2,              0,          0,          (MF_ADOPT_ITEM | MF_BUILD_AT_ORIGIN | MF_TREAT_AS_BLOCKING)},
                   1376:         {0,         LAVA,       LIQUID,         {60,60},    1,          0,          0,          0,              1,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_REPEAT_UNTIL_NO_PROGRESS)},
                   1377:         {DF_LAVA_RETRACTABLE, LAVA_RETRACTABLE, LIQUID, {1,1}, 1,       0,          0,          0,              1,              0,          0,          (MF_PERMIT_BLOCKING | MF_EVERYWHERE)},
                   1378:         {0,         0,          0,              {1,1},      1,          POTION,     POTION_LEVITATION, 0,       1,              0,          0,          (MF_GENERATE_ITEM | MF_BUILD_ANYWHERE_ON_LEVEL | MF_NOT_IN_HALLWAY | MF_ALTERNATIVE)},
                   1379:         {0,         0,          0,              {1,1},      1,          POTION,     POTION_FIRE_IMMUNITY, 0,    1,              0,          0,          (MF_GENERATE_ITEM | MF_BUILD_ANYWHERE_ON_LEVEL | MF_NOT_IN_HALLWAY | MF_ALTERNATIVE)}}},
                   1380:     // Poison gas -- key on an altar; take key to cause a caustic gas vent to appear and the door to be blocked; there is a hidden trapdoor or an escape item somewhere inside
                   1381:     {{4, AMULET_LEVEL}, {35, 60},   7,      7,          0,                  (BP_ROOM | BP_PURGE_INTERIOR | BP_SURROUND_WITH_WALLS | BP_ADOPT_ITEM), {
                   1382:         {0,         ALTAR_SWITCH,DUNGEON,       {1,1},      1,          0,          -1,         0,              2,              0,          0,          (MF_ADOPT_ITEM | MF_TREAT_AS_BLOCKING)},
                   1383:         {0,         MACHINE_POISON_GAS_VENT_HIDDEN,DUNGEON,{1,2}, 1,    0,          -1,         0,              2,              0,          0,          0},
                   1384:         {0,         TRAP_DOOR_HIDDEN,DUNGEON,   {1,1},      1,          0,          -1,         0,              2,              0,          0,          MF_ALTERNATIVE},
                   1385:         {0,         0,          0,              {1,1},      1,          SCROLL,     SCROLL_TELEPORT, 0,         2,              0,          0,          (MF_GENERATE_ITEM | MF_NOT_IN_HALLWAY | MF_ALTERNATIVE)},
                   1386:         {0,         0,          0,              {1,1},      1,          POTION,     POTION_DESCENT, 0,          2,              0,          0,          (MF_GENERATE_ITEM | MF_NOT_IN_HALLWAY | MF_ALTERNATIVE)},
                   1387:         {0,         WALL_LEVER_HIDDEN_DORMANT,DUNGEON,{1,1},1,          0,          -1,         0,              1,              0,          0,          (MF_BUILD_IN_WALLS)},
                   1388:         {0,         PORTCULLIS_DORMANT,DUNGEON,{1,1},       1,          0,          0,          0,              1,              0,          0,          (MF_BUILD_AT_ORIGIN | MF_PERMIT_BLOCKING)}}},
                   1389:     // Explosive situation -- key on an altar; take key to cause a methane gas vent to appear and a pilot light to ignite
                   1390:     {{7, AMULET_LEVEL}, {80, 90},   10,     5,          0,                  (BP_ROOM | BP_PURGE_LIQUIDS | BP_SURROUND_WITH_WALLS | BP_ADOPT_ITEM),  {
                   1391:         {0,         DOOR,       DUNGEON,        {1,1},      1,          0,          0,          0,              1,              0,          0,          (MF_BUILD_AT_ORIGIN)},
                   1392:         {0,         FLOOR,      DUNGEON,        {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)},
                   1393:         {0,         ALTAR_SWITCH,DUNGEON,       {1,1},      1,          0,          -1,         0,              1,              0,          0,          (MF_ADOPT_ITEM | MF_TREAT_AS_BLOCKING | MF_FAR_FROM_ORIGIN)},
                   1394:         {0,         MACHINE_METHANE_VENT_HIDDEN,DUNGEON,{1,1}, 1,       0,          -1,         0,              1,              0,          0,          MF_NEAR_ORIGIN},
                   1395:         {0,         PILOT_LIGHT_DORMANT,DUNGEON,{1,1},      1,          0,          -1,         0,              1,              0,          0,          (MF_FAR_FROM_ORIGIN | MF_BUILD_IN_WALLS)}}},
                   1396:     // Burning grass -- key on an altar; take key to cause pilot light to ignite grass in room
                   1397:     {{1, 7},            {40, 110},  10,     6,          0,                  (BP_ROOM | BP_PURGE_INTERIOR | BP_SURROUND_WITH_WALLS | BP_ADOPT_ITEM | BP_OPEN_INTERIOR),  {
                   1398:         {DF_SMALL_DEAD_GRASS,ALTAR_SWITCH_RETRACTING,DUNGEON,{1,1},1,   0,          -1,         0,              1,              0,          0,          (MF_ADOPT_ITEM | MF_TREAT_AS_BLOCKING | MF_FAR_FROM_ORIGIN)},
                   1399:         {DF_DEAD_FOLIAGE,0,     SURFACE,        {2,3},      0,          0,          -1,         0,              1,              0,          0,          0},
                   1400:         {0,         FOLIAGE,    SURFACE,        {1,4},      0,          0,          -1,         0,              1,              0,          0,          0},
                   1401:         {0,         GRASS,      SURFACE,        {10,25},    0,          0,          -1,         0,              1,              0,          0,          0},
                   1402:         {0,         DEAD_GRASS, SURFACE,        {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)},
                   1403:         {0,         PILOT_LIGHT_DORMANT,DUNGEON,{1,1},      1,          0,          -1,         0,              1,              0,          0,          MF_NEAR_ORIGIN | MF_BUILD_IN_WALLS}}},
                   1404:     // Statuary -- key on an altar, area full of statues; take key to cause statues to burst and reveal monsters
                   1405:     {{10, AMULET_LEVEL},{35, 90},   10,     2,          0,                  (BP_ADOPT_ITEM | BP_NO_INTERIOR_FLAG),  {
                   1406:         {0,         ALTAR_SWITCH,DUNGEON,       {1,1},      1,          0,          -1,         0,              2,              0,          0,          (MF_ADOPT_ITEM | MF_NEAR_ORIGIN | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY)},
                   1407:         {0,         STATUE_DORMANT,DUNGEON,     {3,5},      3,          0,          -1,         0,              2,              HORDE_MACHINE_STATUE,0, (MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY | MF_GENERATE_HORDE | MF_MONSTERS_DORMANT | MF_FAR_FROM_ORIGIN)}}},
                   1408:     // Guardian water puzzle -- key held by a guardian, flood trap in the room, glyphs scattered. Lure the guardian into the water to have him drop the key.
                   1409:     {{4, AMULET_LEVEL}, {35, 70},   8,      4,          0,                  (BP_ROOM | BP_PURGE_INTERIOR | BP_SURROUND_WITH_WALLS | BP_ADOPT_ITEM), {
                   1410:         {0,         0,          0,              {1,1},      1,          0,          -1,         0,              2,              0,          0,          (MF_BUILD_AT_ORIGIN)},
                   1411:         {0,         0,          0,              {1,1},      1,          0,          -1,         MK_GUARDIAN,    2,              0,          0,          (MF_ADOPT_ITEM | MF_FAR_FROM_ORIGIN | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY | MF_MONSTER_TAKE_ITEM)},
                   1412:         {0,         FLOOD_TRAP,DUNGEON,         {1,1},      1,          0,          -1,         0,              2,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY)},
                   1413:         {0,         MACHINE_GLYPH,DUNGEON,      {1,1},      4,          0,          -1,         0,              2,              0,          0,          (MF_EVERYWHERE | MF_NOT_IN_HALLWAY)}}},
                   1414:     // Guardian gauntlet -- key in a room full of guardians, glyphs scattered and unavoidable.
                   1415:     {{6, AMULET_LEVEL}, {50, 95},   10,     6,          0,                  (BP_ROOM | BP_ADOPT_ITEM),  {
                   1416:         {DF_GLYPH_CIRCLE,ALTAR_INERT,DUNGEON,   {1,1},      1,          0,          -1,         0,              1,              0,          0,          (MF_ADOPT_ITEM | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY | MF_FAR_FROM_ORIGIN)},
                   1417:         {0,         DOOR,       DUNGEON,        {1,1},      1,          0,          0,          0,              3,              0,          0,          (MF_PERMIT_BLOCKING | MF_BUILD_AT_ORIGIN)},
                   1418:         {0,         0,          0,              {3,6},      3,          0,          -1,         MK_GUARDIAN,    2,              0,          0,          (MF_NEAR_ORIGIN | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY | MF_ALTERNATIVE)},
                   1419:         {0,         0,          0,              {1,2},      1,          0,          -1,         MK_WINGED_GUARDIAN,2,           0,          0,          (MF_NEAR_ORIGIN | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY | MF_ALTERNATIVE)},
                   1420:         {0,         MACHINE_GLYPH,DUNGEON,      {10,15},   10,          0,          -1,         0,              1,              0,          0,          (MF_PERMIT_BLOCKING | MF_NOT_IN_HALLWAY)},
                   1421:         {0,         MACHINE_GLYPH,DUNGEON,      {1,1},      0,          0,          -1,         0,              2,              0,          0,          (MF_EVERYWHERE | MF_PERMIT_BLOCKING | MF_NOT_IN_HALLWAY)}}},
                   1422:     // Guardian corridor -- key in a small room, with a connecting corridor full of glyphs, one guardian blocking the corridor.
                   1423:     {{4, AMULET_LEVEL}, {85, 100},   5,     7,          0,                  (BP_ROOM | BP_ADOPT_ITEM | BP_PURGE_INTERIOR | BP_OPEN_INTERIOR | BP_SURROUND_WITH_WALLS),        {
                   1424:         {DF_GLYPH_CIRCLE,ALTAR_INERT,DUNGEON,   {1,1},      1,          0,          -1,         MK_GUARDIAN,    3,              0,          0,          (MF_ADOPT_ITEM | MF_FAR_FROM_ORIGIN  | MF_ALTERNATIVE)},
                   1425:         {DF_GLYPH_CIRCLE,ALTAR_INERT,DUNGEON,   {1,1},      1,          0,          -1,         MK_WINGED_GUARDIAN,3,           0,          0,          (MF_ADOPT_ITEM | MF_FAR_FROM_ORIGIN  | MF_ALTERNATIVE)},
                   1426:         {0,         MACHINE_GLYPH,DUNGEON,      {3,5},      2,          0,          0,          0,              2,              0,          0,          MF_NEAR_ORIGIN | MF_NOT_IN_HALLWAY},
                   1427:         {0,         0,          0,              {1,1},      1,          0,          0,          0,              3,              0,          0,          MF_BUILD_AT_ORIGIN},
                   1428:         {0,         WALL,DUNGEON,               {80,80},    1,          0,          -1,         0,              1,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_REPEAT_UNTIL_NO_PROGRESS)},
                   1429:         {0,         MACHINE_GLYPH,DUNGEON,      {1,1},      1,          0,          0,          0,              1,              0,          0,          (MF_PERMIT_BLOCKING | MF_EVERYWHERE)},
                   1430:         {0,         MACHINE_GLYPH,DUNGEON,      {1,1},      1,          0,          -1,         0,              1,              0,          0,          (MF_IN_PASSABLE_VIEW_OF_ORIGIN | MF_NOT_IN_HALLWAY | MF_BUILD_ANYWHERE_ON_LEVEL)}}},
                   1431:     // Sacrifice altar -- lure the chosen monster from elsewhere on the level onto the altar to release the key.
                   1432:     {{4, AMULET_LEVEL}, {20, 60},   12,     6,          0,                  (BP_ROOM | BP_ADOPT_ITEM | BP_PURGE_INTERIOR | BP_OPEN_INTERIOR | BP_SURROUND_WITH_WALLS),        {
                   1433:         {DF_BONES,  0,          0,              {3,4},      2,          0,          -1,         0,              1,              0,          0,          0},
                   1434:         {0,         0,          0,              {1,1},      0,          0,          -1,         0,              2,              0,          0,          (MF_BUILD_IN_WALLS | MF_EVERYWHERE)},
                   1435:         {DF_TRIGGER_AREA,SACRIFICE_ALTAR_DORMANT,DUNGEON,{1,1},1,       0,          -1,         0,              2,              0,          0,          (MF_FAR_FROM_ORIGIN | MF_NOT_IN_HALLWAY)},
                   1436:         {0,         SACRIFICE_CAGE_DORMANT,DUNGEON,{1,1},   1,          0,          -1,         0,              2,              0,          0,          (MF_ADOPT_ITEM | MF_NOT_IN_HALLWAY | MF_IMPREGNABLE)},
                   1437:         {0,         DEMONIC_STATUE,DUNGEON,     {1,1},      1,          0,          -1,         0,              2,              0,          0,          (MF_FAR_FROM_ORIGIN | MF_NOT_IN_HALLWAY | MF_IMPREGNABLE)},
                   1438:         {0,         STATUE_INSTACRACK,DUNGEON,  {1,1},      1,          0,          -1,         0,              2,              (HORDE_SACRIFICE_TARGET), 0, (MF_BUILD_ANYWHERE_ON_LEVEL | MF_GENERATE_HORDE | MF_MONSTERS_DORMANT | MF_TREAT_AS_BLOCKING | MF_IMPREGNABLE | MF_NOT_IN_HALLWAY)}}},
                   1439:     // Summoning circle -- key in a room with an eldritch totem, glyphs unavoidable. // DISABLED. (Not fun enough.)
                   1440:     {{12, AMULET_LEVEL}, {50, 100}, 0,      2,          0,                  (BP_ROOM | BP_OPEN_INTERIOR | BP_ADOPT_ITEM),   {
                   1441:         {DF_GLYPH_CIRCLE,ALTAR_INERT,DUNGEON,   {1,1},      1,          0,          -1,         0,              3,              0,          0,          (MF_ADOPT_ITEM | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY | MF_FAR_FROM_ORIGIN)},
                   1442:         {DF_GLYPH_CIRCLE,0,     0,              {1,1},      1,          0,          -1,         MK_ELDRITCH_TOTEM,3,            0,          0,          (MF_FAR_FROM_ORIGIN | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY)}}},
                   1443:     // Beckoning obstacle -- key surrounded by glyphs in a room with a mirrored totem.
                   1444:     {{5, AMULET_LEVEL}, {60, 100},  10,     4,          0,                  (BP_ROOM | BP_PURGE_INTERIOR | BP_SURROUND_WITH_WALLS | BP_OPEN_INTERIOR | BP_ADOPT_ITEM), {
                   1445:         {DF_GLYPH_CIRCLE,ALTAR_INERT,DUNGEON,   {1,1},      1,          0,          -1,         0,              3,              0,          0,          (MF_ADOPT_ITEM | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY | MF_FAR_FROM_ORIGIN | MF_IN_VIEW_OF_ORIGIN)},
                   1446:         {0,         0,          0,              {1,1},      1,          0,          -1,         MK_MIRRORED_TOTEM,3,            0,          0,          (MF_NEAR_ORIGIN | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY | MF_IN_VIEW_OF_ORIGIN)},
                   1447:         {0,         0,          0,              {1,1},      1,          0,          -1,         0,              2,              0,          0,          (MF_BUILD_AT_ORIGIN)},
                   1448:         {0,         MACHINE_GLYPH,DUNGEON,      {3,5},      2,          0,          -1,         0,              2,              0,          0,          (MF_TREAT_AS_BLOCKING)}}},
                   1449:     // Worms in the walls -- key on altar; take key to cause underworms to burst out of the walls
                   1450:     {{12,AMULET_LEVEL}, {7, 7},     7,      2,          0,                  (BP_ADOPT_ITEM),    {
                   1451:         {0,         ALTAR_SWITCH,DUNGEON,       {1,1},      1,          0,          -1,         0,              2,              0,          0,          (MF_ADOPT_ITEM | MF_NEAR_ORIGIN | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY)},
                   1452:         {0,         WALL_MONSTER_DORMANT,DUNGEON,{5,8},     5,          0,          -1,         MK_UNDERWORM,   1,              0,          0,          (MF_MONSTERS_DORMANT | MF_BUILD_IN_WALLS | MF_NOT_ON_LEVEL_PERIMETER)}}},
                   1453:     // Mud pit -- key on an altar, room full of mud, take key to cause bog monsters to spawn in the mud
                   1454:     {{12, AMULET_LEVEL},{40, 90},   10,     3,          0,                  (BP_ROOM | BP_ADOPT_ITEM | BP_SURROUND_WITH_WALLS | BP_PURGE_LIQUIDS),  {
                   1455:         {DF_SWAMP,      0,      0,              {5,5},      0,          0,          -1,         0,              1,              0,          0,          0},
                   1456:         {DF_SWAMP,  ALTAR_SWITCH,DUNGEON,       {1,1},      1,          0,          -1,         0,              2,              0,          0,          (MF_ADOPT_ITEM | MF_FAR_FROM_ORIGIN | MF_TREAT_AS_BLOCKING)},
                   1457:         {DF_MUD_DORMANT,0,      0,              {3,4},      3,          0,          -1,         0,              1,              HORDE_MACHINE_MUD,0,    (MF_GENERATE_HORDE | MF_MONSTERS_DORMANT)}}},
                   1458:     // Electric crystals -- key caged on an altar, darkened crystal globes around the room, lightning the globes to release the key.
                   1459:     {{6, AMULET_LEVEL},{40, 60},    10,     4,          0,                  (BP_ROOM | BP_ADOPT_ITEM | BP_SURROUND_WITH_WALLS | BP_OPEN_INTERIOR | BP_PURGE_INTERIOR),  {
                   1460:         {0,         CARPET,     DUNGEON,        {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)},
                   1461:         {0,         ELECTRIC_CRYSTAL_OFF,DUNGEON,{3,4},     3,          0,          -1,         0,              3,              0,          0,          (MF_NOT_IN_HALLWAY | MF_IMPREGNABLE)},
                   1462:         {0,         ALTAR_CAGE_RETRACTABLE,DUNGEON,{1,1},   1,          0,          -1,         0,              3,              0,          0,          (MF_ADOPT_ITEM | MF_IMPREGNABLE | MF_NOT_IN_HALLWAY | MF_FAR_FROM_ORIGIN)},
                   1463:         {0,         TURRET_LEVER, DUNGEON,      {7,9},      4,          0,          -1,         MK_SPARK_TURRET,3,              0,          0,          (MF_BUILD_IN_WALLS | MF_MONSTERS_DORMANT)}}},
                   1464:     // Zombie crypt -- key on an altar; coffins scattered around; brazier in the room; take key to cause zombies to burst out of all of the coffins
                   1465:     {{12, AMULET_LEVEL},{60, 90},   10,     8,          0,                  (BP_ROOM | BP_ADOPT_ITEM | BP_SURROUND_WITH_WALLS | BP_PURGE_INTERIOR), {
                   1466:         {0,         DOOR,       DUNGEON,        {1,1},      1,          0,          -1,         0,              1,              0,          0,          (MF_BUILD_AT_ORIGIN)},
                   1467:         {DF_BONES,  0,          0,              {3,4},      2,          0,          -1,         0,              1,              0,          0,          0},
                   1468:         {DF_ASH,    0,          0,              {3,4},      2,          0,          -1,         0,              1,              0,          0,          0},
                   1469:         {DF_AMBIENT_BLOOD,0,    0,              {1,2},      1,          0,          -1,         0,              1,              0,          0,          0},
                   1470:         {DF_AMBIENT_BLOOD,0,    0,              {1,2},      1,          0,          -1,         0,              1,              0,          0,          0},
                   1471:         {0,         ALTAR_SWITCH,DUNGEON,       {1,1},      1,          0,          -1,         0,              2,              0,          0,          (MF_ADOPT_ITEM | MF_FAR_FROM_ORIGIN | MF_TREAT_AS_BLOCKING)},
                   1472:         {0,         BRAZIER,    DUNGEON,        {1,1},      1,          0,          -1,         0,              2,              0,          0,          (MF_NEAR_ORIGIN | MF_TREAT_AS_BLOCKING)},
                   1473:         {0,         COFFIN_CLOSED, DUNGEON,     {6,8},      1,          0,          0,          MK_ZOMBIE,      2,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY | MF_MONSTERS_DORMANT)}}},
                   1474:     // Haunted house -- key on an altar; take key to cause the room to darken, ectoplasm to cover everything and phantoms to appear
                   1475:     {{16, AMULET_LEVEL},{45, 150},  10,     4,          0,                  (BP_ROOM | BP_ADOPT_ITEM | BP_PURGE_INTERIOR | BP_SURROUND_WITH_WALLS), {
                   1476:         {0,         ALTAR_SWITCH,DUNGEON,       {1,1},      1,          0,          -1,         0,              2,              0,          0,          (MF_ADOPT_ITEM | MF_FAR_FROM_ORIGIN | MF_TREAT_AS_BLOCKING)},
                   1477:         {0,         DARK_FLOOR_DORMANT,DUNGEON, {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)},
                   1478:         {0,         DARK_FLOOR_DORMANT,DUNGEON, {4,5},      4,          0,          -1,         MK_PHANTOM,     1,              0,          0,          (MF_MONSTERS_DORMANT)},
                   1479:         {0,         HAUNTED_TORCH_DORMANT,DUNGEON,{5,10},   3,          0,          -1,         0,              2,              0,          0,          (MF_BUILD_IN_WALLS)}}},
                   1480:     // Worm tunnels -- hidden lever causes tunnels to open up revealing worm areas and a key
                   1481:     {{8, AMULET_LEVEL},{80, 175},   10,     6,          0,                  (BP_ROOM | BP_ADOPT_ITEM | BP_PURGE_INTERIOR | BP_MAXIMIZE_INTERIOR | BP_SURROUND_WITH_WALLS),  {
                   1482:         {0,         ALTAR_INERT,DUNGEON,        {1,1},      1,          0,          -1,         0,              2,              0,          0,          (MF_ADOPT_ITEM | MF_FAR_FROM_ORIGIN | MF_TREAT_AS_BLOCKING)},
                   1483:         {0,         0,          0,              {3,6},      3,          0,          -1,         MK_UNDERWORM,   1,              0,          0,          0},
                   1484:         {0,         GRANITE,    DUNGEON,        {150,150},  1,          0,          -1,         0,              1,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_REPEAT_UNTIL_NO_PROGRESS)},
                   1485:         {DF_WORM_TUNNEL_MARKER_DORMANT,GRANITE,DUNGEON,{0,0},0,         0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE | MF_PERMIT_BLOCKING)},
                   1486:         {DF_TUNNELIZE,WORM_TUNNEL_OUTER_WALL,DUNGEON,{1,1}, 1,          0,          -1,         0,              1,              0,          0,          (MF_BUILD_AT_ORIGIN | MF_PERMIT_BLOCKING)},
                   1487:         {0,         WALL_LEVER_HIDDEN,DUNGEON,  {1,1},      1,          0,          -1,         0,              1,              0,          0,          (MF_BUILD_IN_WALLS | MF_IN_PASSABLE_VIEW_OF_ORIGIN | MF_BUILD_ANYWHERE_ON_LEVEL)}}},
                   1488:     // Gauntlet -- key on an altar; take key to cause turrets to emerge
                   1489:     {{5, 24},           {35, 90},   10,     2,          0,                  (BP_ADOPT_ITEM | BP_NO_INTERIOR_FLAG),  {
                   1490:         {0,         ALTAR_SWITCH,DUNGEON,       {1,1},      1,          0,          -1,         0,              2,              0,          0,          (MF_ADOPT_ITEM | MF_NEAR_ORIGIN | MF_NOT_IN_HALLWAY | MF_TREAT_AS_BLOCKING)},
                   1491:         {0,         TURRET_DORMANT,DUNGEON,     {4,6},      4,          0,          -1,         0,              2,              HORDE_MACHINE_TURRET,0, (MF_TREAT_AS_BLOCKING | MF_GENERATE_HORDE | MF_MONSTERS_DORMANT | MF_BUILD_IN_WALLS | MF_IN_VIEW_OF_ORIGIN)}}},
                   1492:     // Boss -- key is held by a boss atop a pile of bones in a secret room. A few fungus patches light up the area.
                   1493:     {{5, AMULET_LEVEL}, {40, 100},  18,     3,          0,                  (BP_ROOM | BP_ADOPT_ITEM | BP_SURROUND_WITH_WALLS | BP_PURGE_LIQUIDS), {
                   1494:         {DF_BONES,  SECRET_DOOR,DUNGEON,        {1,1},      1,          0,          0,          0,              3,              0,          0,          (MF_PERMIT_BLOCKING | MF_BUILD_AT_ORIGIN)},
                   1495:         {DF_LUMINESCENT_FUNGUS, STATUE_INERT,DUNGEON,{7,7}, 0,          0,          -1,         0,              2,              0,          0,          (MF_TREAT_AS_BLOCKING)},
                   1496:         {DF_BONES,  0,          0,              {1,1},      1,          0,          -1,         0,              1,              HORDE_MACHINE_BOSS, 0,  (MF_ADOPT_ITEM | MF_FAR_FROM_ORIGIN | MF_MONSTER_TAKE_ITEM | MF_GENERATE_HORDE | MF_MONSTER_SLEEPING)}}},
                   1497:
                   1498:     // -- FLAVOR MACHINES --
                   1499:
                   1500:     // Bloodwort -- bloodwort stalk, some pods, and surrounding grass
                   1501:     {{1,DEEPEST_LEVEL}, {5, 5},     0,          2,      0,                  (BP_TREAT_AS_BLOCKING), {
                   1502:         {DF_GRASS,  BLOODFLOWER_STALK, SURFACE, {1, 1},     1,          0,          -1,         0,              0,              0,          0,          (MF_BUILD_AT_ORIGIN | MF_NOT_IN_HALLWAY)},
                   1503:         {DF_BLOODFLOWER_PODS_GROW_INITIAL,0, 0, {1, 1},     1,          0,          -1,         0,              1,              0,          0,          (MF_BUILD_AT_ORIGIN | MF_TREAT_AS_BLOCKING)}}},
                   1504:     // Shrine -- safe haven constructed and abandoned by a past adventurer
                   1505:     {{1,DEEPEST_LEVEL}, {15, 25},   0,          3,      0,                  (BP_ROOM | BP_PURGE_INTERIOR | BP_SURROUND_WITH_WALLS | BP_OPEN_INTERIOR), {
                   1506:         {0,         SACRED_GLYPH,  DUNGEON,     {1, 1},     1,          0,          -1,         0,              3,              0,          0,          (MF_BUILD_AT_ORIGIN)},
                   1507:         {0,         HAVEN_BEDROLL, SURFACE,     {1, 1},     1,          0,          -1,         0,              2,              0,          0,          (MF_FAR_FROM_ORIGIN | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY)},
                   1508:         {0,         BONES,      SURFACE,        {1, 1},     1,          (POTION|SCROLL|WEAPON|ARMOR|RING),-1,0, 2,              0,          0,          (MF_GENERATE_ITEM | MF_TREAT_AS_BLOCKING | MF_NOT_IN_HALLWAY)}}},
                   1509:     // Idyll -- ponds and some grass and forest
                   1510:     {{1,DEEPEST_LEVEL}, {80, 120},  0,      2,          0,                  BP_NO_INTERIOR_FLAG, {
                   1511:         {DF_GRASS,  FOLIAGE,    SURFACE,        {3, 4},     3,          0,          -1,         0,              1,              0,          0,          0},
                   1512:         {DF_DEEP_WATER_POOL,0,  0,              {2, 3},     2,          0,          -1,         0,              5,              0,          0,          (MF_NOT_IN_HALLWAY)}}},
                   1513:     // Swamp -- mud, grass and some shallow water
                   1514:     {{1,DEEPEST_LEVEL}, {50, 65},   0,      2,          0,                  BP_NO_INTERIOR_FLAG, {
                   1515:         {DF_SWAMP,  0,          0,              {6, 8},     3,          0,          -1,         0,              1,              0,          0,          0},
                   1516:         {DF_DEEP_WATER_POOL,0,  0,              {0, 1},     0,          0,          -1,         0,              3,              0,          0,          (MF_NOT_IN_HALLWAY | MF_TREAT_AS_BLOCKING)}}},
                   1517:     // Camp -- hay, junk, urine, vomit
                   1518:     {{1,DEEPEST_LEVEL}, {40, 50},   0,      4,          0,                  BP_NO_INTERIOR_FLAG, {
                   1519:         {DF_HAY,    0,          0,              {1, 3},     1,          0,          -1,         0,              1,              0,          0,          (MF_NOT_IN_HALLWAY | MF_IN_VIEW_OF_ORIGIN)},
                   1520:         {DF_JUNK,   0,          0,              {1, 2},     1,          0,          -1,         0,              3,              0,          0,          (MF_NOT_IN_HALLWAY | MF_IN_VIEW_OF_ORIGIN)},
                   1521:         {DF_URINE,  0,          0,              {3, 5},     1,          0,          -1,         0,              1,              0,          0,          MF_IN_VIEW_OF_ORIGIN},
                   1522:         {DF_VOMIT,  0,          0,              {0, 2},     0,          0,          -1,         0,              1,              0,          0,          MF_IN_VIEW_OF_ORIGIN}}},
                   1523:     // Remnant -- carpet surrounded by ash and with some statues
                   1524:     {{1,DEEPEST_LEVEL}, {80, 120},  0,      2,          0,                  BP_NO_INTERIOR_FLAG, {
                   1525:         {DF_REMNANT, 0,         0,              {6, 8},     3,          0,          -1,         0,              1,              0,          0,          0},
                   1526:         {0,         STATUE_INERT,DUNGEON,       {3, 5},     2,          0,          -1,         0,              1,              0,          0,          (MF_NOT_IN_HALLWAY | MF_TREAT_AS_BLOCKING)}}},
                   1527:     // Dismal -- blood, bones, charcoal, some rubble
                   1528:     {{1,DEEPEST_LEVEL}, {60, 70},   0,      3,          0,                  BP_NO_INTERIOR_FLAG, {
                   1529:         {DF_AMBIENT_BLOOD, 0,   0,              {5,10},     3,          0,          -1,         0,              1,              0,          0,          MF_NOT_IN_HALLWAY},
                   1530:         {DF_ASH,    0,          0,              {4, 8},     2,          0,          -1,         0,              1,              0,          0,          MF_NOT_IN_HALLWAY},
                   1531:         {DF_BONES,  0,          0,              {3, 5},     2,          0,          -1,         0,              1,              0,          0,          MF_NOT_IN_HALLWAY}}},
                   1532:     // Chasm catwalk -- narrow bridge over a chasm, possibly under fire from a turret or two
                   1533:     {{1,DEEPEST_LEVEL-1},{40, 80},  0,      4,          0,                  (BP_REQUIRE_BLOCKING | BP_OPEN_INTERIOR | BP_NO_INTERIOR_FLAG), {
                   1534:         {DF_CHASM_HOLE, 0,      0,              {80, 80},   1,          0,          -1,         0,              1,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_REPEAT_UNTIL_NO_PROGRESS)},
                   1535:         {DF_CATWALK_BRIDGE,0,   0,              {0,0},      0,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)},
                   1536:         {0,         MACHINE_TRIGGER_FLOOR, DUNGEON, {0,1},  0,          0,          0,          0,              1,              0,          0,          (MF_NEAR_ORIGIN | MF_PERMIT_BLOCKING)},
                   1537:         {0,         TURRET_DORMANT,DUNGEON,     {1, 2},     1,          0,          -1,         0,              2,              HORDE_MACHINE_TURRET,0, (MF_TREAT_AS_BLOCKING | MF_GENERATE_HORDE | MF_MONSTERS_DORMANT | MF_BUILD_IN_WALLS | MF_IN_VIEW_OF_ORIGIN)}}},
                   1538:     // Lake walk -- narrow bridge of shallow water through a lake, possibly under fire from a turret or two
                   1539:     {{1,DEEPEST_LEVEL}, {40, 80},   0,      3,          0,                  (BP_REQUIRE_BLOCKING | BP_OPEN_INTERIOR | BP_NO_INTERIOR_FLAG), {
                   1540:         {DF_LAKE_CELL,  0,      0,              {80, 80},   1,          0,          -1,         0,              1,              0,          0,          (MF_TREAT_AS_BLOCKING | MF_REPEAT_UNTIL_NO_PROGRESS)},
                   1541:         {0,         MACHINE_TRIGGER_FLOOR, DUNGEON, {0,1},  0,          0,          0,          0,              1,              0,          0,          (MF_NEAR_ORIGIN | MF_PERMIT_BLOCKING)},
                   1542:         {0,         TURRET_DORMANT,DUNGEON,     {1, 2},     1,          0,          -1,         0,              2,              HORDE_MACHINE_TURRET,0, (MF_TREAT_AS_BLOCKING | MF_GENERATE_HORDE | MF_MONSTERS_DORMANT | MF_BUILD_IN_WALLS | MF_IN_VIEW_OF_ORIGIN)}}},
                   1543:     // Paralysis trap -- already-revealed pressure plate with a few hidden vents nearby.
                   1544:     {{1,DEEPEST_LEVEL}, {35, 40},   0,      2,          0,                  (BP_NO_INTERIOR_FLAG), {
                   1545:         {0,         GAS_TRAP_PARALYSIS, DUNGEON, {1,2},     1,          0,          0,          0,              3,              0,          0,          (MF_NEAR_ORIGIN | MF_NOT_IN_HALLWAY)},
                   1546:         {0,         MACHINE_PARALYSIS_VENT_HIDDEN,DUNGEON,{3, 4},2,     0,          0,          0,              3,              0,          0,          (MF_FAR_FROM_ORIGIN | MF_NOT_IN_HALLWAY)}}},
                   1547:     // Paralysis trap -- hidden pressure plate with a few vents nearby.
                   1548:     {{1,DEEPEST_LEVEL}, {35, 40},   0,      2,          0,                  (BP_NO_INTERIOR_FLAG), {
                   1549:         {0,         GAS_TRAP_PARALYSIS_HIDDEN, DUNGEON, {1,2},1,        0,          0,          0,              3,              0,          0,          (MF_NEAR_ORIGIN | MF_NOT_IN_HALLWAY)},
                   1550:         {0,         MACHINE_PARALYSIS_VENT_HIDDEN,DUNGEON,{3, 4},2,     0,          0,          0,              3,              0,          0,          (MF_FAR_FROM_ORIGIN | MF_NOT_IN_HALLWAY)}}},
                   1551:     // Statue comes alive -- innocent-looking statue that bursts to reveal a monster when the player approaches
                   1552:     {{1,DEEPEST_LEVEL}, {5, 5},     0,      3,          0,                  (BP_NO_INTERIOR_FLAG), {
                   1553:         {0,         STATUE_DORMANT,DUNGEON,     {1, 1},     1,          0,          -1,         0,              1,              HORDE_MACHINE_STATUE,0, (MF_GENERATE_HORDE | MF_MONSTERS_DORMANT | MF_BUILD_AT_ORIGIN | MF_ALTERNATIVE)},
                   1554:         {0,         STATUE_DORMANT,DUNGEON,     {1, 1},     1,          0,          -1,         0,              1,              HORDE_MACHINE_STATUE,0, (MF_GENERATE_HORDE | MF_MONSTERS_DORMANT | MF_BUILD_IN_WALLS | MF_ALTERNATIVE | MF_NOT_ON_LEVEL_PERIMETER)},
                   1555:         {0,         MACHINE_TRIGGER_FLOOR,DUNGEON,{0,0},    2,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)}}},
                   1556:     // Worms in the walls -- step on trigger region to cause underworms to burst out of the walls
                   1557:     {{1,DEEPEST_LEVEL}, {7, 7},     0,      2,          0,                  (BP_NO_INTERIOR_FLAG), {
                   1558:         {0,         WALL_MONSTER_DORMANT,DUNGEON,{1, 3},    1,          0,          -1,         MK_UNDERWORM,   1,              0,          0,          (MF_MONSTERS_DORMANT | MF_BUILD_IN_WALLS | MF_NOT_ON_LEVEL_PERIMETER)},
                   1559:         {0,         MACHINE_TRIGGER_FLOOR,DUNGEON,{0,0},    2,          0,          -1,         0,              0,              0,          0,          (MF_EVERYWHERE)}}},
                   1560:     // Sentinels
                   1561:     {{1,DEEPEST_LEVEL}, {40, 40},   0,      2,          0,                  (BP_NO_INTERIOR_FLAG), {
                   1562:         {0,         STATUE_INERT,DUNGEON,       {3, 3},     3,          0,          -1,         MK_SENTINEL,    2,              0,          0,          (MF_NOT_IN_HALLWAY | MF_TREAT_AS_BLOCKING | MF_IN_VIEW_OF_ORIGIN)},
                   1563:         {DF_ASH,    0,          0,              {2, 3},     0,          0,          -1,         0,              0,              0,          0,          0}}},
                   1564: };
                   1565:
                   1566:
                   1567: // Defines all creatures, which include monsters and the player:
                   1568: creatureType monsterCatalog[NUMBER_MONSTER_KINDS] = {
                   1569:     //  name            ch      color           HP      def     acc     damage          reg move    attack  blood           light isLarge     DFChance DFType         bolts       behaviorF, abilityF
                   1570:     {0, "you",  G_PLAYER,       &playerInLightColor,30, 0,      100,    {1, 2, 1},      20, 100,    100,    DF_RED_BLOOD,   0,    false,      0,      0,              {0},
                   1571:         (MONST_MALE | MONST_FEMALE)},
                   1572:
                   1573:     {0, "rat",          G_RAT,    &gray,          6,      0,      80,     {1, 3, 1},      20, 100,    100,    DF_RED_BLOOD,   0,    false,      1,      DF_URINE,       {0}},
                   1574:     {0, "kobold",       G_KOBOLD,    &goblinColor,   7,      0,      80,     {1, 4, 1},      20, 100,    100,    DF_RED_BLOOD,   0,    false,      0,      0,              {0}},
                   1575:     {0, "jackal",       G_JACKAL,    &jackalColor,   8,      0,      70,     {2, 4, 1},      20, 50,     100,    DF_RED_BLOOD,   0,    false,      1,      DF_URINE,              {0}},
                   1576:     {0, "eel",          G_EEL,    &eelColor,      18,     27,     100,    {3, 7, 2},      5,  50,     100,    0,              0,    false,      0,      0,              {0},
                   1577:         (MONST_RESTRICTED_TO_LIQUID | MONST_IMMUNE_TO_WATER | MONST_SUBMERGES | MONST_FLITS | MONST_NEVER_SLEEPS)},
                   1578:     {0, "monkey",       G_MONKEY,    &ogreColor,     12,     17,     100,    {1, 3, 1},      20, 100,    100,    DF_RED_BLOOD,   0,    false,      1,      DF_URINE,       {0},
                   1579:         (0), (MA_HIT_STEAL_FLEE)},
                   1580:     {0, "bloat",        G_BLOAT,    &poisonGasColor,4,      0,      100,    {0, 0, 0},      5,  100,    100,    DF_PURPLE_BLOOD,0,    false,      0,      DF_BLOAT_DEATH, {0},
                   1581:         (MONST_FLIES | MONST_FLITS), (MA_KAMIKAZE | MA_DF_ON_DEATH)},
                   1582:     {0, "pit bloat",    G_BLOAT,    &lightBlue,     4,      0,      100,    {0, 0, 0},      5,  100,    100,    DF_PURPLE_BLOOD,0,    false,      0,      DF_HOLE_POTION, {0},
                   1583:         (MONST_FLIES | MONST_FLITS), (MA_KAMIKAZE | MA_DF_ON_DEATH)},
                   1584:     {0, "goblin",       G_GOBLIN,    &goblinColor,   15,     10,     70,     {2, 5, 1},      20, 100,    100,    DF_RED_BLOOD,   0,    false,      0,      0,              {0},
                   1585:         (0),  (MA_ATTACKS_PENETRATE | MA_AVOID_CORRIDORS)},
                   1586:     {0, "goblin conjurer",G_GOBLIN_MAGIC,  &goblinConjurerColor, 10,10,    70,     {2, 4, 1},      20, 100,    100,    DF_RED_BLOOD,   0,    false,      0,      0,              {0},
                   1587:         (MONST_MAINTAINS_DISTANCE | MONST_CAST_SPELLS_SLOWLY | MONST_CARRY_ITEM_25), (MA_CAST_SUMMON | MA_AVOID_CORRIDORS)},
                   1588:     {0, "goblin mystic",G_GOBLIN_MAGIC,    &goblinMysticColor, 10, 10,     70,     {2, 4, 1},      20, 100,    100,    DF_RED_BLOOD,   0,    false,      0,      0,              {BOLT_SHIELDING},
                   1589:         (MONST_MAINTAINS_DISTANCE | MONST_CARRY_ITEM_25), (MA_AVOID_CORRIDORS)},
                   1590:     {0, "goblin totem", G_TOTEM, &orange,    30,     0,      0,      {0, 0, 0},      0,  100,    300,    DF_RUBBLE_BLOOD,IMP_LIGHT,    false,0,    0,              {BOLT_HASTE, BOLT_SPARK},
                   1591:         (MONST_IMMUNE_TO_WEBS | MONST_NEVER_SLEEPS | MONST_IMMOBILE | MONST_INANIMATE | MONST_WILL_NOT_USE_STAIRS), (0)},
                   1592:     {0, "pink jelly",   G_JELLY,    &pinkJellyColor,50,     0,      85,     {1, 3, 1},      0,  100,    100,    DF_PURPLE_BLOOD,0,    true,       0,      0,              {0},
                   1593:         (MONST_NEVER_SLEEPS), (MA_CLONE_SELF_ON_DEFEND)},
                   1594:     {0, "toad",         G_TOAD,    &toadColor,     18,     0,      90,     {1, 4, 1},      10, 100,    100,    DF_GREEN_BLOOD, 0,    false,      0,      0,              {0},
                   1595:         (0), (MA_HIT_HALLUCINATE)},
                   1596:     {0, "vampire bat",  G_BAT,    &gray,          18,     25,     100,    {2, 6, 1},      20, 50,     100,    DF_RED_BLOOD,   0,    false,      0,      0,              {0},
                   1597:         (MONST_FLIES | MONST_FLITS), (MA_TRANSFERENCE)},
                   1598:     {0, "arrow turret", G_TURRET,&black,     30,     0,      90,     {2, 6, 1},      0,  100,    250,    0,              0,    false,      0,      0,              {BOLT_DISTANCE_ATTACK},
                   1599:         (MONST_TURRET), (0)},
                   1600:     {0, "acid mound",   G_MOUND,    &acidBackColor, 15,     10,     70,     {1, 3, 1},      5,  100,    100,    DF_ACID_BLOOD,  0,    false,      0,      0,              {0},
                   1601:         (MONST_DEFEND_DEGRADE_WEAPON), (MA_HIT_DEGRADE_ARMOR)},
                   1602:     {0, "centipede",    G_CENTIPEDE,    &centipedeColor,20,     20,     80,     {4, 12, 1},     20, 100,    100,    DF_GREEN_BLOOD, 0,    false,      0,      0,              {0},
                   1603:         (0), (MA_CAUSES_WEAKNESS)},
                   1604:     {0, "ogre",         G_OGRE,    &ogreColor,     55,     60,     125,    {9, 13, 2},     20, 100,    200,    DF_RED_BLOOD,   0,    true,       0,      0,              {0},
                   1605:         (MONST_MALE | MONST_FEMALE), (MA_AVOID_CORRIDORS | MA_ATTACKS_STAGGER)},
                   1606:     {0, "bog monster",  G_BOG_MONSTER,    &krakenColor,   55,     60,     5000,   {3, 4, 1},      3,  200,    100,    0,              0,    true,       0,      0,              {0},
                   1607:         (MONST_RESTRICTED_TO_LIQUID | MONST_SUBMERGES | MONST_FLITS | MONST_FLEES_NEAR_DEATH), (MA_SEIZES)},
                   1608:     {0, "ogre totem",   G_TOTEM, &green,     70,     0,      0,      {0, 0, 0},      0,  100,    400,    DF_RUBBLE_BLOOD,LICH_LIGHT,    false,0,   0,              {BOLT_HEALING, BOLT_SLOW_2},
                   1609:         (MONST_IMMUNE_TO_WEBS | MONST_NEVER_SLEEPS | MONST_IMMOBILE | MONST_INANIMATE | MONST_WILL_NOT_USE_STAIRS), (0)},
                   1610:     {0, "spider",       G_SPIDER,    &white,         20,     70,     90,     {3, 4, 2},      20, 100,    200,    DF_GREEN_BLOOD, 0,    false,      0,      0,              {BOLT_SPIDERWEB},
                   1611:         (MONST_IMMUNE_TO_WEBS | MONST_CAST_SPELLS_SLOWLY | MONST_ALWAYS_USE_ABILITY), (MA_POISONS)},
                   1612:     {0, "spark turret", G_TURRET, &lightningColor,80,0,      100,    {0, 0, 0},      0,  100,    150,    0,              SPARK_TURRET_LIGHT,    false, 0,  0,      {BOLT_SPARK},
                   1613:         (MONST_TURRET), (0)},
                   1614:     {0, "wisp",         G_WISP,    &wispLightColor,10,     90,     100,    {0, 0, 0},      5,  100,    100,    DF_ASH_BLOOD,   WISP_LIGHT,    false, 0,  0,              {0},
                   1615:         (MONST_IMMUNE_TO_FIRE | MONST_FLIES | MONST_FLITS | MONST_NEVER_SLEEPS | MONST_FIERY | MONST_DIES_IF_NEGATED), (MA_HIT_BURN)},
                   1616:     {0, "wraith",       G_WRAITH,    &wraithColor,   50,     60,     120,    {6, 13, 2},     5,  50,     100,    DF_GREEN_BLOOD, 0,    true,       0,      0,              {0},
                   1617:         (MONST_FLEES_NEAR_DEATH)},
                   1618:     {0, "zombie",       G_ZOMBIE,    &vomitColor,    80,     0,      120,    {7, 12, 1},     0,  100,    100,    DF_ROT_GAS_BLOOD,0,    true,      100,    DF_ROT_GAS_PUFF, {0}},
                   1619:     {0, "troll",        G_TROLL,    &trollColor,    65,     70,     125,    {10, 15, 3},    1,  100,    100,    DF_RED_BLOOD,   0,    true,       0,      0,              {0},
                   1620:         (MONST_MALE | MONST_FEMALE)},
                   1621:     {0, "ogre shaman",  G_OGRE_MAGIC,    &green,         45,     40,     100,    {5, 9, 1},      20, 100,    200,    DF_RED_BLOOD,   0,    true,       0,      0,              {BOLT_HASTE, BOLT_SPARK},
                   1622:         (MONST_MAINTAINS_DISTANCE | MONST_CAST_SPELLS_SLOWLY | MONST_MALE | MONST_FEMALE), (MA_CAST_SUMMON | MA_AVOID_CORRIDORS)},
                   1623:     {0, "naga",         G_NAGA,    &trollColor,    75,     70,     150,    {7, 11, 4},     10, 100,    100,    DF_GREEN_BLOOD, 0,    true,       100,    DF_PUDDLE,      {0},
                   1624:         (MONST_IMMUNE_TO_WATER | MONST_SUBMERGES | MONST_NEVER_SLEEPS | MONST_FEMALE), (MA_ATTACKS_ALL_ADJACENT)},
                   1625:     {0, "salamander",   G_SALAMANDER,    &salamanderColor,60,    70,     150,    {5, 11, 3},     10, 100,    100,    DF_ASH_BLOOD,   SALAMANDER_LIGHT,    true,  100, DF_SALAMANDER_FLAME, {0},
                   1626:         (MONST_IMMUNE_TO_FIRE | MONST_SUBMERGES | MONST_NEVER_SLEEPS | MONST_FIERY | MONST_MALE), (MA_ATTACKS_EXTEND)},
                   1627:     {0, "explosive bloat",G_BLOAT,  &orange,        10,     0,      100,    {0, 0, 0},      5,  100,    100,    DF_RED_BLOOD,   EXPLOSIVE_BLOAT_LIGHT,    false,0, DF_BLOAT_EXPLOSION, {0},
                   1628:         (MONST_FLIES | MONST_FLITS), (MA_KAMIKAZE | MA_DF_ON_DEATH)},
                   1629:     {0, "dar blademaster",G_DAR_BLADEMASTER,  &purple,        35,     70,     160,    {5, 9, 2},      20, 100,    100,    DF_RED_BLOOD,   0,    false,      0,      0,              {BOLT_BLINKING},
                   1630:         (MONST_CARRY_ITEM_25 | MONST_MALE | MONST_FEMALE), (MA_AVOID_CORRIDORS)},
                   1631:     {0, "dar priestess", G_DAR_PRIESTESS,   &darPriestessColor,20,  60,     100,    {2, 5, 1},      20, 100,    100,    DF_RED_BLOOD,   0,    false,      0,      0,              {BOLT_NEGATION, BOLT_HEALING, BOLT_HASTE, BOLT_SPARK},
                   1632:         (MONST_MAINTAINS_DISTANCE | MONST_CARRY_ITEM_25 | MONST_FEMALE), (MA_AVOID_CORRIDORS)},
                   1633:     {0, "dar battlemage",G_DAR_BATTLEMAGE,   &darMageColor,  20,     60,     100,    {1, 3, 1},      20, 100,    100,    DF_RED_BLOOD,   0,    false,      0,      0,              {BOLT_FIRE, BOLT_SLOW_2, BOLT_DISCORD},
                   1634:         (MONST_MAINTAINS_DISTANCE | MONST_CARRY_ITEM_25 | MONST_MALE | MONST_FEMALE), (MA_AVOID_CORRIDORS)},
                   1635:     {0, "acidic jelly", G_JELLY,    &acidBackColor, 60,     0,      115,    {2, 6, 1},      0,  100,    100,    DF_ACID_BLOOD,  0,    true,       0,      0,              {0},
                   1636:         (MONST_DEFEND_DEGRADE_WEAPON), (MA_HIT_DEGRADE_ARMOR | MA_CLONE_SELF_ON_DEFEND)},
                   1637:     {0, "centaur",      G_CENTAUR,    &tanColor,      35,     50,     175,    {4, 8, 2},      20, 50,     100,    DF_RED_BLOOD,   0,    true,       0,      0,              {BOLT_DISTANCE_ATTACK},
                   1638:         (MONST_MAINTAINS_DISTANCE | MONST_MALE), (0)},
                   1639:     {0, "underworm",    G_UNDERWORM,    &wormColor,     80,     40,     160,    {18, 22, 2},    3,  150,    200,    DF_WORM_BLOOD,  0,    true,       0,      0,              {0},
                   1640:         (MONST_NEVER_SLEEPS)},
                   1641:     {0, "sentinel",     G_GUARDIAN, &sentinelColor, 50,0,      0,      {0, 0, 0},      0,  100,    175,    DF_RUBBLE_BLOOD,SENTINEL_LIGHT,    false,0,0,             {BOLT_HEALING, BOLT_SPARK},
                   1642:         (MONST_TURRET | MONST_CAST_SPELLS_SLOWLY | MONST_DIES_IF_NEGATED), (0)},
                   1643:     {0, "dart turret", G_TURRET, &centipedeColor,20, 0,      140,    {1, 2, 1},      0,  100,    250,    0,              0,    false,      0,      0,              {BOLT_POISON_DART},
                   1644:         (MONST_TURRET), (MA_CAUSES_WEAKNESS)},
                   1645:     {0, "kraken",       G_KRAKEN,    &krakenColor,   120,    0,      150,    {15, 20, 3},    1,  50,     100,    0,              0,    true,       0,      0,              {0},
                   1646:         (MONST_RESTRICTED_TO_LIQUID | MONST_IMMUNE_TO_WATER | MONST_SUBMERGES | MONST_FLITS | MONST_NEVER_SLEEPS | MONST_FLEES_NEAR_DEATH), (MA_SEIZES)},
                   1647:     {0, "lich",         G_LICH,    &white,         35,     80,     175,    {2, 6, 1},      0,  100,    100,    DF_ASH_BLOOD,   LICH_LIGHT,    true,  0,  0,              {BOLT_FIRE},
                   1648:         (MONST_MAINTAINS_DISTANCE | MONST_CARRY_ITEM_25 | MONST_NO_POLYMORPH), (MA_CAST_SUMMON)},
                   1649:     {0, "phylactery",   G_EGG,&lichLightColor,30,    0,      0,      {0, 0, 0},      0,  100,    150,    DF_RUBBLE_BLOOD,LICH_LIGHT,    false, 0,  0,              {0},
                   1650:         (MONST_IMMUNE_TO_WEBS | MONST_NEVER_SLEEPS | MONST_IMMOBILE | MONST_INANIMATE | MONST_ALWAYS_HUNTING | MONST_WILL_NOT_USE_STAIRS | MONST_DIES_IF_NEGATED), (MA_CAST_SUMMON | MA_ENTER_SUMMONS)},
                   1651:     {0, "pixie",        G_PIXIE,    &pixieColor,    10,     90,     100,    {1, 3, 1},      20, 50,     100,    DF_GREEN_BLOOD, PIXIE_LIGHT,    false, 0, 0,              {BOLT_NEGATION, BOLT_SLOW_2, BOLT_DISCORD, BOLT_SPARK},
                   1652:         (MONST_MAINTAINS_DISTANCE | MONST_FLIES | MONST_FLITS | MONST_MALE | MONST_FEMALE), (0)},
                   1653:     {0, "phantom",      G_PHANTOM,    &ectoplasmColor,35,     70,     160,    {12, 18, 4},    0,  50,     200,    DF_ECTOPLASM_BLOOD, 0,    true,   2,      DF_ECTOPLASM_DROPLET, {0},
                   1654:         (MONST_INVISIBLE | MONST_FLITS | MONST_FLIES | MONST_IMMUNE_TO_WEBS)},
                   1655:     {0, "flame turret", G_TURRET, &lavaForeColor,40, 0,      150,    {1, 2, 1},      0,  100,    250,    0,              LAVA_LIGHT,    false, 0,  0,              {BOLT_FIRE},
                   1656:         (MONST_TURRET), (0)},
                   1657:     {0, "imp",          G_IMP,    &pink,          35,     90,     225,    {4, 9, 2},      10, 100,    100,    DF_GREEN_BLOOD, IMP_LIGHT,    false,  0,  0,              {BOLT_BLINKING},
                   1658:         (0), (MA_HIT_STEAL_FLEE)},
                   1659:     {0, "fury",         G_FURY,    &darkRed,       19,     90,     200,    {6, 11, 4},     20, 50,     100,    DF_RED_BLOOD,   0,    false,      0,      0,              {0},
                   1660:         (MONST_NEVER_SLEEPS | MONST_FLIES)},
                   1661:     {0, "revenant",     G_REVENANT,    &ectoplasmColor,30,     0,      200,    {15, 20, 5},    0,  100,    100,    DF_ECTOPLASM_BLOOD, 0,    true,   0,      0,              {0},
                   1662:         (MONST_IMMUNE_TO_WEAPONS)},
                   1663:     {0, "tentacle horror",G_TENTACLE_HORROR,  &centipedeColor,120,    95,     225,    {25, 35, 3},    1,  100,    100,    DF_PURPLE_BLOOD,0,    true,       0,      0,              {0}},
                   1664:     {0, "golem",        G_GOLEM,    &gray,          400,    70,     225,    {4, 8, 1},      0,  100,    100,    DF_RUBBLE_BLOOD,0,    true,       0,      0,              {0},
                   1665:         (MONST_REFLECT_4 | MONST_DIES_IF_NEGATED)},
                   1666:     {0, "dragon",       G_DRAGON,    &dragonColor,   150,    90,     250,    {25, 50, 4},    20, 50,     200,    DF_GREEN_BLOOD, 0,    true,       0,      0,              {BOLT_DRAGONFIRE},
                   1667:         (MONST_IMMUNE_TO_FIRE | MONST_CARRY_ITEM_100), (MA_ATTACKS_ALL_ADJACENT)},
                   1668:
                   1669:     // bosses
                   1670:     {0, "goblin warlord",G_GOBLIN_CHIEFTAN,   &blue,          30,     17,     100,    {3, 6, 1},      20, 100,    100,    DF_RED_BLOOD,   0,    false,      0,      0,              {0},
                   1671:         (MONST_MAINTAINS_DISTANCE | MONST_CARRY_ITEM_25), (MA_CAST_SUMMON | MA_ATTACKS_PENETRATE | MA_AVOID_CORRIDORS)},
                   1672:     {0, "black jelly",  G_JELLY,    &black,         120,    0,      130,    {3, 8, 1},      0,  100,    100,    DF_PURPLE_BLOOD,0,    true,       0,      0,              {0},
                   1673:         (0), (MA_CLONE_SELF_ON_DEFEND)},
                   1674:     {0, "vampire",      G_VAMPIRE,    &white,         75,     60,     120,    {4, 15, 2},     6,  50,     100,    DF_RED_BLOOD,   0,    true,       0,      DF_BLOOD_EXPLOSION, {BOLT_BLINKING, BOLT_DISCORD},
                   1675:         (MONST_FLEES_NEAR_DEATH | MONST_MALE), (MA_TRANSFERENCE | MA_DF_ON_DEATH | MA_CAST_SUMMON | MA_ENTER_SUMMONS)},
                   1676:     {0, "flamedancer",  G_FLAMEDANCER,    &white,         65,     80,     120,    {3, 8, 2},      0,  100,    100,    DF_EMBER_BLOOD, FLAMEDANCER_LIGHT,    true, 100,DF_FLAMEDANCER_CORONA, {BOLT_FIRE},
                   1677:         (MONST_MAINTAINS_DISTANCE | MONST_IMMUNE_TO_FIRE | MONST_FIERY), (MA_HIT_BURN)},
                   1678:
                   1679:     // special effect monsters
                   1680:     {0, "spectral blade",G_WEAPON, &spectralBladeColor,1, 0, 150,    {1, 1, 1},      0,  50,     100,    0,              SPECTRAL_BLADE_LIGHT,    false,0,0,       {0},
                   1681:         (MONST_INANIMATE | MONST_NEVER_SLEEPS | MONST_FLIES | MONST_WILL_NOT_USE_STAIRS | MONST_DIES_IF_NEGATED | MONST_IMMUNE_TO_WEBS | MONST_NOT_LISTED_IN_SIDEBAR)},
                   1682:     {0, "spectral sword",G_WEAPON, &spectralImageColor, 1,0, 150,    {1, 1, 1},      0,  50,     100,    0,              SPECTRAL_IMAGE_LIGHT,    false,0,0,       {0},
                   1683:         (MONST_INANIMATE | MONST_NEVER_SLEEPS | MONST_FLIES | MONST_WILL_NOT_USE_STAIRS | MONST_DIES_IF_NEGATED | MONST_IMMUNE_TO_WEBS)},
                   1684:     {0, "stone guardian",G_GUARDIAN, &white,   1000,   0,      200,    {12, 17, 2},    0,  100,    100,    DF_RUBBLE,      0,    false,      100,      DF_GUARDIAN_STEP, {0},
                   1685:         (MONST_INANIMATE | MONST_NEVER_SLEEPS | MONST_ALWAYS_HUNTING | MONST_IMMUNE_TO_FIRE | MONST_IMMUNE_TO_WEAPONS | MONST_WILL_NOT_USE_STAIRS | MONST_DIES_IF_NEGATED | MONST_REFLECT_4 | MONST_ALWAYS_USE_ABILITY | MONST_GETS_TURN_ON_ACTIVATION)},
                   1686:     {0, "winged guardian",G_WINGED_GUARDIAN, &blue,   1000,   0,      200,    {12, 17, 2},    0,  100,    100,    DF_RUBBLE,      0,    false,      100,      DF_SILENT_GLYPH_GLOW, {BOLT_BLINKING},
                   1687:         (MONST_INANIMATE | MONST_NEVER_SLEEPS | MONST_ALWAYS_HUNTING | MONST_IMMUNE_TO_FIRE | MONST_IMMUNE_TO_WEAPONS | MONST_WILL_NOT_USE_STAIRS | MONST_DIES_IF_NEGATED | MONST_REFLECT_4 | MONST_GETS_TURN_ON_ACTIVATION | MONST_ALWAYS_USE_ABILITY), (0)},
                   1688:     {0, "guardian spirit",G_GUARDIAN, &spectralImageColor,1000,0,200,  {5, 12, 2},     0,  100,    100,    0,              SPECTRAL_IMAGE_LIGHT,    false,100,0,     {0},
                   1689:         (MONST_INANIMATE | MONST_NEVER_SLEEPS | MONST_IMMUNE_TO_FIRE | MONST_IMMUNE_TO_WEAPONS | MONST_DIES_IF_NEGATED | MONST_REFLECT_4 | MONST_ALWAYS_USE_ABILITY)},
                   1690:     {0, "Warden of Yendor",G_WARDEN, &yendorLightColor,1000,   0,    300,    {12, 17, 2},    0,  200,    200,    DF_RUBBLE,      YENDOR_LIGHT,    true,  100, 0,           {0},
                   1691:         (MONST_NEVER_SLEEPS | MONST_ALWAYS_HUNTING | MONST_INVULNERABLE | MONST_NO_POLYMORPH)},
                   1692:     {0, "eldritch totem",G_TOTEM, &glyphColor,80,    0,      0,      {0, 0, 0},      0,  100,    100,    DF_RUBBLE_BLOOD,0,    false,      0,      0,              {0},
                   1693:         (MONST_IMMUNE_TO_WEBS | MONST_NEVER_SLEEPS | MONST_IMMOBILE | MONST_INANIMATE | MONST_ALWAYS_HUNTING | MONST_WILL_NOT_USE_STAIRS | MONST_GETS_TURN_ON_ACTIVATION | MONST_ALWAYS_USE_ABILITY), (MA_CAST_SUMMON)},
                   1694:     {0, "mirrored totem",G_TOTEM, &beckonColor,80,   0,      0,      {0, 0, 0},      0,  100,    100,    DF_RUBBLE_BLOOD,0,    false,      100,    DF_MIRROR_TOTEM_STEP, {BOLT_BECKONING},
                   1695:         (MONST_IMMUNE_TO_WEBS | MONST_NEVER_SLEEPS | MONST_IMMOBILE | MONST_INANIMATE | MONST_ALWAYS_HUNTING | MONST_WILL_NOT_USE_STAIRS | MONST_GETS_TURN_ON_ACTIVATION | MONST_ALWAYS_USE_ABILITY | MONST_REFLECT_4 | MONST_IMMUNE_TO_WEAPONS | MONST_IMMUNE_TO_FIRE), (0)},
                   1696:
                   1697:     // legendary allies
                   1698:     {0, "unicorn",      G_UNICORN, &white,   40,     60,     175,    {2, 10, 2},     20, 50,     100,    DF_RED_BLOOD,   UNICORN_LIGHT,    true, 1,DF_UNICORN_POOP, {BOLT_HEALING, BOLT_SHIELDING},
                   1699:         (MONST_MAINTAINS_DISTANCE | MONST_MALE | MONST_FEMALE), (0)},
                   1700:     {0, "ifrit",        G_IFRIT,    &ifritColor,    40,     75,     175,    {5, 13, 2},     1,  50,     100,    DF_ASH_BLOOD,   IFRIT_LIGHT,    true, 0,  0,              {BOLT_DISCORD},
                   1701:         (MONST_IMMUNE_TO_FIRE | MONST_FLIES | MONST_MALE), (0)},
                   1702:     {0, "phoenix",      G_PHOENIX,    &phoenixColor,  30,     70,     175,    {4, 10, 2},     0,  50,     100,    DF_ASH_BLOOD,   PHOENIX_LIGHT,    true, 0,0,              {0},
                   1703:         (MONST_IMMUNE_TO_FIRE| MONST_FLIES | MONST_NO_POLYMORPH)},
                   1704:     {0, "phoenix egg",  G_EGG,&phoenixColor, 50,     0,      0,      {0, 0, 0},      0,  100,    150,    DF_ASH_BLOOD,   PHOENIX_EGG_LIGHT,    false,  0,  0,      {0},
                   1705:         (MONST_IMMUNE_TO_FIRE| MONST_IMMUNE_TO_WEBS | MONST_NEVER_SLEEPS | MONST_IMMOBILE | MONST_INANIMATE | MONST_WILL_NOT_USE_STAIRS | MONST_NO_POLYMORPH | MONST_ALWAYS_HUNTING | MONST_IMMUNE_TO_WEAPONS), (MA_CAST_SUMMON | MA_ENTER_SUMMONS)},
                   1706:     {0, "mangrove dryad",G_ANCIENT_SPIRIT,   &tanColor,      70,     60,     175,    {2, 8, 2},      6,  100,    100,    DF_ASH_BLOOD,   0,    true,       0,      0,              {BOLT_ANCIENT_SPIRIT_VINES},
                   1707:         (MONST_IMMUNE_TO_WEBS | MONST_ALWAYS_USE_ABILITY | MONST_MAINTAINS_DISTANCE | MONST_NO_POLYMORPH | MONST_MALE | MONST_FEMALE), (0)},
                   1708: };
                   1709:
                   1710: const monsterWords monsterText[NUMBER_MONSTER_KINDS] = {
                   1711:     {"A naked adventurer in an unforgiving place, bereft of equipment and confused about the circumstances.",
                   1712:         "studying", "Studying",
                   1713:         {"hit", {0}}},
                   1714:     {"The rat is a scavenger of the shallows, perpetually in search of decaying animal matter.",
                   1715:         "gnawing at", "Eating",
                   1716:         {"scratches", "bites", {0}}},
                   1717:     {"The kobold is a lizardlike humanoid of the upper dungeon.",
                   1718:         "poking at", "Examining",
                   1719:         {"clubs", "bashes", {0}}},
                   1720:     {"The jackal prowls the caverns for intruders to rend with $HISHER powerful jaws.",
                   1721:         "tearing at", "Eating",
                   1722:         {"claws", "bites", "mauls", {0}}},
                   1723:     {"The eel slips silently through the subterranean lake, waiting for unsuspecting prey to set foot in $HISHER dark waters.",
                   1724:         "eating", "Eating",
                   1725:         {"shocks", "bites", {0}}},
                   1726:     {"Mischievous trickster that $HESHE is, the monkey lives to steal shiny trinkets from passing adventurers.",
                   1727:         "examining", "Examining",
                   1728:         {"tweaks", "bites", "punches", {0}}},
                   1729:     {"A bladder of deadly gas buoys the bloat through the air, $HISHER thin veinous membrane ready to rupture at the slightest stress.",
                   1730:         "gazing at", "Gazing",
                   1731:         {"bumps", {0}},
                   1732:         "bursts, leaving behind an expanding cloud of caustic gas!"},
                   1733:     {"This rare subspecies of bloat is filled with a peculiar vapor that, if released, will cause the floor to vanish out from underneath $HIMHER.",
                   1734:         "gazing at", "Gazing",
                   1735:         {"bumps", {0}},
                   1736:         "bursts, causing the floor underneath $HIMHER to disappear!"},
                   1737:     {"A filthy little primate, the tribalistic goblin often travels in packs and carries a makeshift stone spear.",
                   1738:         "chanting over", "Chanting",
                   1739:         {"cuts", "stabs", "skewers", {0}}},
                   1740:     {"This goblin is covered with glowing sigils that pulse with power. $HESHE can call into existence phantom blades to attack $HISHER foes.",
                   1741:         "performing a ritual on", "Performing ritual",
                   1742:         {"thumps", "whacks", "wallops", {0}},
                   1743:         {0},
                   1744:         "gestures ominously!"},
                   1745:     {"This goblin carries no weapon, and $HISHER eyes sparkle with golden light. $HESHE can invoke a powerful shielding magic to protect $HISHER escorts from harm.",
                   1746:         "performing a ritual on", "Performing ritual",
                   1747:         {"slaps", "punches", "kicks", {0}}},
                   1748:     {"Goblins have created this makeshift totem and imbued $HIMHER with a shamanistic power.",
                   1749:         "gazing at", "Gazing",
                   1750:         {"hits", {0}}},
                   1751:     {"This mass of caustic pink goo slips across the ground in search of a warm meal.",
                   1752:         "absorbing", "Feeding",
                   1753:         {"smears", "slimes", "drenches"}},
                   1754:     {"The enormous, warty toad secretes a powerful hallucinogenic slime to befuddle the senses of any creatures that come in contact with $HIMHER.",
                   1755:         "eating", "Eating",
                   1756:         {"slimes", "slams", {0}}},
                   1757:     {"Often hunting in packs, leathery wings and keen senses guide the vampire bat unerringly to $HISHER prey.",
                   1758:         "draining", "Feeding",
                   1759:         {"nips", "bites", {0}}},
                   1760:     {"A mechanical contraption embedded in the wall, the spring-loaded arrow turret will fire volley after volley of arrows at intruders.",
                   1761:         "gazing at", "Gazing",
                   1762:         {"shoots", {0}}},
                   1763:     {"The acid mound squelches softly across the ground, leaving a trail of hissing goo in $HISHER path.",
                   1764:         "liquefying", "Feeding",
                   1765:         {"slimes", "douses", "drenches", {0}}},
                   1766:     {"This monstrous centipede's incisors are imbued with a horrible venom that will slowly kill $HISHER prey.",
                   1767:         "eating", "Eating",
                   1768:         {"pricks", "stings", {0}}},
                   1769:     {"This lumbering creature carries an enormous club that $HESHE can swing with incredible force.",
                   1770:         "examining", "Studying",
                   1771:         {"cudgels", "clubs", "batters", {0}}},
                   1772:     {"The horrifying bog monster dwells beneath the surface of mud-filled swamps. When $HISHER prey ventures into the mud, the bog monster will ensnare the unsuspecting victim in $HISHER pale tentacles and squeeze its life away.",
                   1773:         "draining", "Feeding",
                   1774:         {"squeezes", "strangles", "crushes", {0}}},
                   1775:     {"Ancient ogres versed in the eldritch arts have assembled this totem and imbued $HIMHER with occult power.",
                   1776:         "gazing at", "Gazing",
                   1777:         {"hits", {0}}},
                   1778:     {"The spider's red eyes pierce the darkness in search of enemies to ensnare with $HISHER projectile webs and dissolve with deadly poison.",
                   1779:         "draining", "Feeding",
                   1780:         {"bites", "stings", {0}}},
                   1781:     {"This contraption hums with electrical charge that $HISHER embedded crystals and magical sigils can direct at intruders in deadly arcs.",
                   1782:         "gazing at", "Gazing",
                   1783:         {"shocks", {0}}},
                   1784:     {"An ethereal blue flame dances through the air, flickering and pulsing in time to an otherworldly rhythm.",
                   1785:         "consuming", "Feeding",
                   1786:         {"scorches", "burns", {0}}},
                   1787:     {"The wraith's hollow eye sockets stare hungrily at the world from $HISHER emaciated frame, and $HISHER long, bloodstained nails grope ceaselessly at the air for a fresh victim.",
                   1788:         "devouring", "Feeding",
                   1789:         {"clutches", "claws", "bites", {0}}},
                   1790:     {"The zombie is the accursed product of a long-forgotten ritual. Perpetually decaying flesh hangs from $HISHER bones in shreds and releases a flammable stench that will induce violent nausea with one whiff.",
                   1791:         "rending", "Eating",
                   1792:         {"hits", "bites", {0}}},
                   1793:     {"An enormous, disfigured creature covered in phlegm and warts, the troll regenerates very quickly and attacks with astonishing strength. Many adventures have ended at $HISHER misshapen hands.",
                   1794:         "eating", "Eating",
                   1795:         {"cudgels", "clubs", "bludgeons", "pummels", "batters"}},
                   1796:     {"This ogre is bent with age, but what $HESHE has lost in physical strength, $HESHE has more than gained in occult power.",
                   1797:         "performing a ritual on", "Performing ritual",
                   1798:         {"cudgels", "clubs", {0}},
                   1799:         {0},
                   1800:         "chants in a harsh, guttural tongue!"},
                   1801:     {"The serpentine naga live beneath the subterranean waters and emerge to attack unsuspecting adventurers.",
                   1802:         "studying", "Studying",
                   1803:         {"claws", "bites", "tail-whips", {0}}},
                   1804:     {"A serpent wreathed in flames and carrying a burning lash, salamanders dwell in lakes of fire and emerge when they sense a nearby victim, leaving behind a trail of glowing embers.",
                   1805:         "studying", "Studying",
                   1806:         {"whips", "lashes", {0}}},
                   1807:     {"This rare subspecies of bloat is little more than a thin membrane surrounding a bladder of highly explosive gases. The slightest stress will cause $HIMHER to rupture in spectacular and deadly fashion.",
                   1808:         "gazing at", "Gazing",
                   1809:         {"bumps", {0}},
                   1810:         "detonates with terrifying force!"},
                   1811:     {"An elf of the deep, the dar blademaster leaps toward $HISHER enemies with frightening speed to engage in deadly swordplay.",
                   1812:         "studying", "Studying",
                   1813:         {"grazes", "cuts", "slices", "slashes", "stabs"}},
                   1814:     {"The dar priestess carries a host of religious relics that jangle as $HESHE walks.",
                   1815:         "praying over", "Praying",
                   1816:         {"cuts", "slices", {0}}},
                   1817:     {"The dar battlemage's eyes glow like embers and $HISHER hands radiate an occult heat.",
                   1818:         "transmuting", "Transmuting",
                   1819:         {"cuts", {0}}},
                   1820:     {"A jelly subsisting on a diet of acid mounds will eventually express the characteristics of $HISHER prey, corroding any unprotected weapons or armor that come in contact with $HIMHER.",
                   1821:         "transmuting", "Transmuting",
                   1822:         {"burns", {0}}},
                   1823:     {"Half man and half horse, the centaur is an expert with the bow and arrow -- hunter and steed fused into a single creature.",
                   1824:         "studying", "Studying",
                   1825:         {"shoots", {0}}},
                   1826:     {"A strange and horrifying creature of the earth's deepest places, larger than an ogre but capable of squeezing through tiny openings. When hungry, the underworm will burrow behind the walls of a cavern and lurk dormant and motionless -- often for months -- until $HESHE can feel the telltale vibrations of nearby prey.",
                   1827:         "consuming", "Consuming",
                   1828:         {"slams", "bites", "tail-whips", {0}}},
                   1829:     {"An ancient statue of an unrecognizable humanoid figure, the sentinel holds aloft a crystal that gleams with ancient warding magic. Sentinels are always found in groups, and each will attempt to repair any damage done to the others.",
                   1830:         "focusing on", "Focusing",
                   1831:         {"hits", {0}}},
                   1832:     {"This spring-loaded contraption fires darts that are imbued with a strength-sapping poison.",
                   1833:         "gazing at", "Gazing",
                   1834:         {"pricks", {0}}},
                   1835:     {"This tentacled nightmare will emerge from the subterranean waters to ensnare and devour any creature foolish enough to set foot into $HISHER lake.",
                   1836:         "devouring", "Feeding",
                   1837:         {"slaps", "smites", "batters", {0}}},
                   1838:     {"The desiccated form of an ancient sorcerer, animated by dark arts and lust for power, commands the obedience of the infernal planes. $HISHER essence is anchored to reality by a phylactery that is always in $HISHER possession, and the lich cannot die unless $HISHER phylactery is destroyed.",
                   1839:         "enchanting", "Enchanting",
                   1840:         {"touches", {0}},
                   1841:         {0},
                   1842:         "rasps a terrifying incantation!"},
                   1843:     {"This gem was the fulcrum of a dark rite, performed centuries ago, that bound the soul of an ancient and terrible sorcerer. Hurry and destroy the gem, before the lich can gather its power and regenerate its corporeal form!",
                   1844:         "enchanting", "Enchanting",
                   1845:         {"touches", {0}},
                   1846:         {0},
                   1847:         "swirls with dark sorcery as the lich regenerates its form!"},
                   1848:     {"A tiny humanoid sparkles in the gloom, the hum of $HISHER beating wings punctuated by intermittent peals of high-pitched laughter. What $HESHE lacks in physical endurance, $HESHE makes up for with $HISHER wealth of mischievous magical abilities.",
                   1849:         "sprinkling dust on", "Dusting",
                   1850:         {"pokes", {0}}},
                   1851:     {"A silhouette of mournful rage against an empty backdrop, the phantom slips through the dungeon invisibly in clear air, leaving behind glowing droplets of ectoplasm and the cries of $HISHER unsuspecting victims.",
                   1852:         "permeating", "Permeating",
                   1853:         {"hits", {0}}},
                   1854:     {"This infernal contraption spits blasts of flame at intruders.",
                   1855:         "incinerating", "Incinerating",
                   1856:         {"pricks", {0}}},
                   1857:     {"This trickster demon moves with astonishing speed and delights in stealing from $HISHER enemies and blinking away.",
                   1858:         "dissecting", "Dissecting",
                   1859:         {"slices", "cuts", {0}}},
                   1860:     {"A creature of inchoate rage made flesh, the fury's moist wings beat loudly in the darkness.",
                   1861:         "flagellating", "Flagellating",
                   1862:         {"drubs", "fustigates", "castigates", {0}}},
                   1863:     {"This unholy specter stalks the deep places of the earth without fear, impervious to conventional attacks.",
                   1864:         "desecrating", "Desecrating",
                   1865:         {"hits", {0}}},
                   1866:     {"This seething, towering nightmare of fleshy tentacles slinks through the bowels of the world. The tentacle horror's incredible strength and regeneration make $HIMHER one of the most fearsome creatures of the dungeon.",
                   1867:         "sucking on", "Consuming",
                   1868:         {"slaps", "batters", "crushes", {0}}},
                   1869:     {"A statue animated by an ancient and tireless magic, the golem does not regenerate and attacks with only moderate strength, but $HISHER stone form can withstand incredible damage before collapsing into rubble.",
                   1870:         "cradling", "Cradling",
                   1871:         {"backhands", "punches", "kicks", {0}}},
                   1872:     {"An ancient serpent of the world's deepest places, the dragon's immense form belies its lightning-quick speed and testifies to $HISHER breathtaking strength. An undying furnace of white-hot flames burns within $HISHER scaly hide, and few could withstand a single moment under $HISHER infernal lash.",
                   1873:         "consuming", "Consuming",
                   1874:         {"claws", "tail-whips", "bites", {0}}},
                   1875:
                   1876:     {"Taller, stronger and smarter than other goblins, the warlord commands the loyalty of $HISHER kind and can summon them into battle.",
                   1877:         "chanting over", "Chanting",
                   1878:         {"slashes", "cuts", "stabs", "skewers", {0}},
                   1879:         {0},
                   1880:         "lets loose a deafening war cry!"},
                   1881:     {"This blob of jet-black goo is as rare as $HESHE is deadly. Few creatures of the dungeon can withstand $HISHER caustic assault. Beware.",
                   1882:         "absorbing", "Feeding",
                   1883:         {"smears", "slimes", "drenches"}},
                   1884:     {"This vampire lives a solitary life deep underground, consuming any warm-blooded creature unfortunate to venture near $HISHER lair.",
                   1885:         "draining", "Drinking",
                   1886:         {"grazes", "bites", "buries $HISHER fangs in", {0}},
                   1887:         {0},
                   1888:         "spreads his cloak and bursts into a cloud of bats!"},
                   1889:     {"An elemental creature from another plane of existence, the infernal flamedancer burns with such intensity that $HESHE is painful to behold.",
                   1890:         "immolating", "Consuming",
                   1891:         {"singes", "burns", "immolates", {0}}},
                   1892:
                   1893:     {"Eldritch forces have coalesced to form this flickering, ethereal weapon.",
                   1894:         "gazing at", "Gazing",
                   1895:         {"nicks",  {0}}},
                   1896:     {"Eldritch energies bound up in your equipment have leapt forth to project this spectral image.",
                   1897:         "gazing at", "Gazing",
                   1898:         {"hits",  {0}}},
                   1899:     {"Guarding the room is a weathered stone statue of a knight carrying a battleaxe, connected to the glowing glyphs on the floor by invisible strands of enchantment.",
                   1900:         "gazing at", "Gazing",
                   1901:         {"strikes",  {0}}},
                   1902:     {"A statue of a sword-wielding angel surveys the room, connected to the glowing glyphs on the floor by invisible strands of enchantment.",
                   1903:         "gazing at", "Gazing",
                   1904:         {"strikes",  {0}}},
                   1905:     {"A spectral outline of a knight carrying a battleaxe casts an ethereal light on $HISHER surroundings.",
                   1906:         "gazing at", "Gazing",
                   1907:         {"strikes",  {0}}},
                   1908:     {"An immortal presence stalks through the dungeon, implacably hunting that which was taken... and the one who took it.",
                   1909:         "gazing at", "Gazing",
                   1910:         {"strikes",  {0}}},
                   1911:     {"This totem sits at the center of a summoning circle that radiates a strange energy.",
                   1912:         "gazing at", "Gazing",
                   1913:         {"strikes",  {0}},
                   1914:         {0},
                   1915:         "crackles with energy as you touch the glyph!"},
                   1916:     {"A prism of shoulder-high mirrored surfaces gleams in the darkness.",
                   1917:         "gazing at", "Gazing",
                   1918:         {"strikes",  {0}}},
                   1919:
                   1920:     {"The unicorn's flowing mane and tail shine with rainbow light, $HISHER horn glows with healing and protective magic, and $HISHER eyes implore you to always chase your dreams. Unicorns are rumored to be attracted to virgins -- is there a hint of accusation in $HISHER gaze?",
                   1921:         "consecrating", "Consecrating",
                   1922:         {"pokes", "stabs", "gores", {0}}},
                   1923:     {"A whirling desert storm given human shape, the ifrit's twin scimitars flicker in the darkness and $HISHER eyes burn with otherworldly zeal.",
                   1924:         "absorbing", "Absorbing",
                   1925:         {"cuts", "slashes", "lacerates", {0}}},
                   1926:     {"This legendary bird shines with a brilliant light, and $HISHER wings crackle and pop like embers as they beat the air. When $HESHE dies, legend has it that an egg will form and a newborn phoenix will rise from its ashes.",
                   1927:         "cremating", "Cremating",
                   1928:         {"pecks", "scratches", "claws", {0}}},
                   1929:     {"Cradled in a nest of cooling ashes, the translucent membrane of the phoenix egg reveals a yolk that glows brighter by the second.",
                   1930:         "cremating", "Cremating",
                   1931:         {"touches", {0}},
                   1932:         {0},
                   1933:         "bursts as a newborn phoenix rises from the ashes!"},
                   1934:     {"This mangrove dryad is as old as the earth, and $HISHER gnarled figure houses an ancient power. When angered, $HESHE can call upon the forces of nature to bind $HISHER foes and tear them to shreds.",
                   1935:         "absorbing", "Absorbing",
                   1936:         {"whips", "lashes", "thrashes", "lacerates", {0}}},
                   1937: };
                   1938:
                   1939: const mutation mutationCatalog[NUMBER_MUTATORS] = {
                   1940:     //Title         textColor       healthFactor    moveSpdMult attackSpdMult   defMult damMult DF% DFtype  light   monstFlags  abilityFlags    forbiddenFlags      forbiddenAbilities      canBeNegated
                   1941:     {"explosive",   &orange,        50,             100,        100,            50,     100,    0,  DF_MUTATION_EXPLOSION, EXPLOSIVE_BLOAT_LIGHT, 0, MA_DF_ON_DEATH, MONST_SUBMERGES, 0,
                   1942:         "A rare mutation will cause $HIMHER to explode violently when $HESHE dies.",    true},
                   1943:     {"infested",    &lichenColor,   50,             100,        100,            50,     100,    0,  DF_MUTATION_LICHEN, 0, 0,   MA_DF_ON_DEATH, 0,               0,
                   1944:         "$HESHE has been infested by deadly lichen spores; poisonous fungus will spread from $HISHER corpse when $HESHE dies.", true},
                   1945:     {"agile",       &lightBlue,     100,            50,         100,            150,    100,    -1, 0,      0,      MONST_FLEES_NEAR_DEATH, 0, MONST_FLEES_NEAR_DEATH, 0,
                   1946:         "A rare mutation greatly enhances $HISHER mobility.",   false},
                   1947:     {"juggernaut",  &brown,         300,            200,        200,            75,     200,    -1, 0,      0,      0,          MA_ATTACKS_STAGGER, MONST_MAINTAINS_DISTANCE, 0,
                   1948:         "A rare mutation has hardened $HISHER flesh, increasing $HISHER health and power but compromising $HISHER speed.",  false},
                   1949:     {"grappling",   &tanColor,      150,            100,        100,            50,     100,    -1, 0,      0,      0,          MA_SEIZES,      MONST_MAINTAINS_DISTANCE, MA_SEIZES,
                   1950:         "A rare mutation has caused suckered tentacles to sprout from $HISHER frame, increasing $HISHER health and allowing $HIMHER to grapple with $HISHER prey.", true},
                   1951:     {"vampiric",    &red,           100,            100,        100,            100,    100,    -1, 0,      0,      0,          MA_TRANSFERENCE, MONST_MAINTAINS_DISTANCE, MA_TRANSFERENCE,
                   1952:         "A rare mutation allows $HIMHER to heal $HIMSELFHERSELF with every attack.",    true},
                   1953:     {"toxic",       &green,         100,            100,        200,            100,    20,     -1, 0,      0,      0,          (MA_CAUSES_WEAKNESS | MA_POISONS), MONST_MAINTAINS_DISTANCE, (MA_CAUSES_WEAKNESS | MA_POISONS),
                   1954:         "A rare mutation causes $HIMHER to poison $HISHER victims and sap their strength with every attack.",   true},
                   1955:     {"reflective",  &darkTurquoise, 100,            100,        100,            100,    100,    -1, 0,      0,      MONST_REFLECT_4, 0,         (MONST_REFLECT_4 | MONST_ALWAYS_USE_ABILITY), 0,
                   1956:         "A rare mutation has coated $HISHER flesh with reflective scales.",     true},
                   1957: };
                   1958:
                   1959: const hordeType hordeCatalog[NUMBER_HORDES] = {
                   1960:     // leader       #members    member list                             member numbers                  minL    maxL    freq    spawnsIn        machine         flags
                   1961:     {MK_RAT,            0,      {0},                                    {{0}},                          1,      5,      150},
                   1962:     {MK_KOBOLD,         0,      {0},                                    {{0}},                          1,      6,      150},
                   1963:     {MK_JACKAL,         0,      {0},                                    {{0}},                          1,      3,      100},
                   1964:     {MK_JACKAL,         1,      {MK_JACKAL},                            {{1, 3, 1}},                    3,      7,      50},
                   1965:     {MK_EEL,            0,      {0},                                    {{0}},                          2,      17,     100,        DEEP_WATER},
                   1966:     {MK_MONKEY,         0,      {0},                                    {{0}},                          2,      9,      50},
                   1967:     {MK_BLOAT,          0,      {0},                                    {{0}},                          2,      13,     30},
                   1968:     {MK_PIT_BLOAT,      0,      {0},                                    {{0}},                          2,      13,     10},
                   1969:     {MK_BLOAT,          1,      {MK_BLOAT},                             {{0, 2, 1}},                    14,     26,     30},
                   1970:     {MK_PIT_BLOAT,      1,      {MK_PIT_BLOAT},                         {{0, 2, 1}},                    14,     26,     10},
                   1971:     {MK_EXPLOSIVE_BLOAT,0,      {0},                                    {{0}},                          10,     26,     10},
                   1972:     {MK_GOBLIN,         0,      {0},                                    {{0}},                          3,      10,     100},
                   1973:     {MK_GOBLIN_CONJURER,0,      {0},                                    {{0}},                          3,      10,     60},
                   1974:     {MK_TOAD,           0,      {0},                                    {{0}},                          4,      11,     100},
                   1975:     {MK_PINK_JELLY,     0,      {0},                                    {{0}},                          4,      13,     100},
                   1976:     {MK_GOBLIN_TOTEM,   1,      {MK_GOBLIN},                            {{2,4,1}},                      5,      13,     100,        0,              MT_CAMP_AREA,   HORDE_NO_PERIODIC_SPAWN},
                   1977:     {MK_ARROW_TURRET,   0,      {0},                                    {{0}},                          5,      13,     100,        WALL,   0,                      HORDE_NO_PERIODIC_SPAWN},
                   1978:     {MK_MONKEY,         1,      {MK_MONKEY},                            {{2,4,1}},                      5,      13,     20},
                   1979:     {MK_VAMPIRE_BAT,    0,      {0},                                    {{0}},                          6,      13,     30},
                   1980:     {MK_VAMPIRE_BAT,    1,      {MK_VAMPIRE_BAT},                       {{1,2,1}},                      6,      13,     70,      0,              0,              HORDE_NEVER_OOD},
                   1981:     {MK_ACID_MOUND,     0,      {0},                                    {{0}},                          6,      13,     100},
                   1982:     {MK_GOBLIN,         3,      {MK_GOBLIN, MK_GOBLIN_MYSTIC, MK_JACKAL},{{2, 3, 1}, {1,2,1}, {1,2,1}}, 6,      12,     40},
                   1983:     {MK_GOBLIN_CONJURER,2,      {MK_GOBLIN_CONJURER, MK_GOBLIN_MYSTIC}, {{0,1,1}, {1,1,1}},             7,      15,     40},
                   1984:     {MK_CENTIPEDE,      0,      {0},                                    {{0}},                          7,      14,     100},
                   1985:     {MK_BOG_MONSTER,    0,      {0},                                    {{0}},                          7,      14,     80,     MUD,            0,              HORDE_NEVER_OOD},
                   1986:     {MK_OGRE,           0,      {0},                                    {{0}},                          7,      13,     100},
                   1987:     {MK_EEL,            1,      {MK_EEL},                               {{2, 4, 1}},                    8,      22,     70,     DEEP_WATER},
                   1988:     {MK_ACID_MOUND,     1,      {MK_ACID_MOUND},                        {{2, 4, 1}},                    9,      13,     30},
                   1989:     {MK_SPIDER,         0,      {0},                                    {{0}},                          9,      16,     100},
                   1990:     {MK_DAR_BLADEMASTER,1,      {MK_DAR_BLADEMASTER},                   {{0, 1, 1}},                    10,     14,     100},
                   1991:     {MK_WILL_O_THE_WISP,0,      {0},                                    {{0}},                          10,     17,     100},
                   1992:     {MK_WRAITH,         0,      {0},                                    {{0}},                          10,     17,     100},
                   1993:     {MK_GOBLIN_TOTEM,   4,      {MK_GOBLIN_TOTEM, MK_GOBLIN_CONJURER, MK_GOBLIN_MYSTIC, MK_GOBLIN}, {{1,2,1},{1,2,1},{1,2,1},{3,5,1}},10,17,80,0,MT_CAMP_AREA,  HORDE_NO_PERIODIC_SPAWN},
                   1994:     {MK_SPARK_TURRET,   0,      {0},                                    {{0}},                          11,     18,     100,        WALL,   0,                      HORDE_NO_PERIODIC_SPAWN},
                   1995:     {MK_ZOMBIE,         0,      {0},                                    {{0}},                          11,     18,     100},
                   1996:     {MK_TROLL,          0,      {0},                                    {{0}},                          12,     19,     100},
                   1997:     {MK_OGRE_TOTEM,     1,      {MK_OGRE},                              {{2,4,1}},                      12,     19,     60,     0,          0,                  HORDE_NO_PERIODIC_SPAWN},
                   1998:     {MK_BOG_MONSTER,    1,      {MK_BOG_MONSTER},                       {{2,4,1}},                      12,     26,     100,        MUD},
                   1999:     {MK_NAGA,           0,      {0},                                    {{0}},                          13,     20,     100,        DEEP_WATER},
                   2000:     {MK_SALAMANDER,     0,      {0},                                    {{0}},                          13,     20,     100,        LAVA},
                   2001:     {MK_OGRE_SHAMAN,    1,      {MK_OGRE},                              {{1, 3, 1}},                    14,     20,     100},
                   2002:     {MK_CENTAUR,        1,      {MK_CENTAUR},                           {{1, 1, 1}},                    14,     21,     100},
                   2003:     {MK_ACID_JELLY,     0,      {0},                                    {{0}},                          14,     21,     100},
                   2004:     {MK_DART_TURRET,    0,      {0},                                    {{0}},                          15,     22,     100,        WALL,   0,                      HORDE_NO_PERIODIC_SPAWN},
                   2005:     {MK_PIXIE,          0,      {0},                                    {{0}},                          14,     21,     80},
                   2006:     {MK_FLAME_TURRET,   0,      {0},                                    {{0}},                          14,     24,     100,        WALL,   0,                      HORDE_NO_PERIODIC_SPAWN},
                   2007:     {MK_DAR_BLADEMASTER,2,      {MK_DAR_BLADEMASTER, MK_DAR_PRIESTESS}, {{0, 1, 1}, {0, 1, 1}},         15,     17,     100},
                   2008:     {MK_PINK_JELLY,     2,      {MK_PINK_JELLY, MK_DAR_PRIESTESS},      {{0, 1, 1}, {1, 2, 1}},         17,     23,     70},
                   2009:     {MK_KRAKEN,         0,      {0},                                    {{0}},                          15,     30,     100,        DEEP_WATER},
                   2010:     {MK_PHANTOM,        0,      {0},                                    {{0}},                          16,     23,     100},
                   2011:     {MK_WRAITH,         1,      {MK_WRAITH},                            {{1, 4, 1}},                    16,     23,     80},
                   2012:     {MK_IMP,            0,      {0},                                    {{0}},                          17,     24,     100},
                   2013:     {MK_DAR_BLADEMASTER,3,      {MK_DAR_BLADEMASTER, MK_DAR_PRIESTESS, MK_DAR_BATTLEMAGE},{{1,2,1},{1,1,1},{1,1,1}},18,25,100},
                   2014:     {MK_FURY,           1,      {MK_FURY},                              {{2, 4, 1}},                    18,     26,     80},
                   2015:     {MK_REVENANT,       0,      {0},                                    {{0}},                          19,     27,     100},
                   2016:     {MK_GOLEM,          0,      {0},                                    {{0}},                          21,     30,     100},
                   2017:     {MK_TENTACLE_HORROR,0,      {0},                                    {{0}},                          22,     DEEPEST_LEVEL-1,        100},
                   2018:     {MK_PHYLACTERY,     0,      {0},                                    {{0}},                          22,     DEEPEST_LEVEL-1,        100},
                   2019:     {MK_DRAGON,         0,      {0},                                    {{0}},                          24,     DEEPEST_LEVEL-1,        70},
                   2020:     {MK_DRAGON,         1,      {MK_DRAGON},                            {{1,1,1}},                      27,     DEEPEST_LEVEL-1,        30},
                   2021:     {MK_GOLEM,          3,      {MK_GOLEM, MK_DAR_PRIESTESS, MK_DAR_BATTLEMAGE}, {{1, 2, 1}, {0,1,1},{0,1,1}},27,DEEPEST_LEVEL-1,   80},
                   2022:     {MK_GOLEM,          1,      {MK_GOLEM},                             {{5, 10, 2}},                   30,     DEEPEST_LEVEL-1,    20},
                   2023:     {MK_KRAKEN,         1,      {MK_KRAKEN},                            {{5, 10, 2}},                   30,     DEEPEST_LEVEL-1,    100,        DEEP_WATER},
                   2024:     {MK_TENTACLE_HORROR,2,      {MK_TENTACLE_HORROR, MK_REVENANT},      {{1, 3, 1}, {2, 4, 1}},         32,     DEEPEST_LEVEL-1,    20},
                   2025:     {MK_DRAGON,         1,      {MK_DRAGON},                            {{3, 5, 1}},                    34,     DEEPEST_LEVEL-1,    20},
                   2026:
                   2027:     // summons
                   2028:     {MK_GOBLIN_CONJURER,1,      {MK_SPECTRAL_BLADE},                    {{3, 5, 1}},                    0,      0,      100,    0,          0,                  HORDE_IS_SUMMONED | HORDE_DIES_ON_LEADER_DEATH},
                   2029:     {MK_OGRE_SHAMAN,    1,      {MK_OGRE},                              {{1, 1, 1}},                    0,      0,      100,    0,          0,                  HORDE_IS_SUMMONED},
                   2030:     {MK_VAMPIRE,        1,      {MK_VAMPIRE_BAT},                       {{3, 3, 1}},                    0,      0,      100,    0,          0,                  HORDE_IS_SUMMONED},
                   2031:     {MK_LICH,           1,      {MK_PHANTOM},                           {{2, 3, 1}},                    0,      0,      100,    0,          0,                  HORDE_IS_SUMMONED},
                   2032:     {MK_LICH,           1,      {MK_FURY},                              {{2, 3, 1}},                    0,      0,      100,    0,          0,                  HORDE_IS_SUMMONED},
                   2033:     {MK_PHYLACTERY,     1,      {MK_LICH},                              {{1,1,1}},                      0,      0,      100,    0,          0,                  HORDE_IS_SUMMONED},
                   2034:     {MK_GOBLIN_CHIEFTAN,2,      {MK_GOBLIN_CONJURER, MK_GOBLIN},        {{1,1,1}, {3,4,1}},             0,      0,      100,    0,          0,                  HORDE_IS_SUMMONED | HORDE_SUMMONED_AT_DISTANCE},
                   2035:     {MK_PHOENIX_EGG,    1,      {MK_PHOENIX},                           {{1,1,1}},                      0,      0,      100,    0,          0,                  HORDE_IS_SUMMONED},
                   2036:     {MK_ELDRITCH_TOTEM, 1,      {MK_SPECTRAL_BLADE},                    {{4, 7, 1}},                    0,      0,      100,    0,          0,                  HORDE_IS_SUMMONED | HORDE_DIES_ON_LEADER_DEATH},
                   2037:     {MK_ELDRITCH_TOTEM, 1,      {MK_FURY},                              {{2, 3, 1}},                    0,      0,      100,    0,          0,                  HORDE_IS_SUMMONED | HORDE_DIES_ON_LEADER_DEATH},
                   2038:
                   2039:     // captives
                   2040:     {MK_MONKEY,         1,      {MK_KOBOLD},                            {{1, 2, 1}},                    1,      5,      10,     0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2041:     {MK_GOBLIN,         1,      {MK_GOBLIN},                            {{1, 2, 1}},                    3,      7,      10,     0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2042:     {MK_OGRE,           1,      {MK_GOBLIN},                            {{3, 5, 1}},                    4,      10,     10,     0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2043:     {MK_GOBLIN_MYSTIC,  1,      {MK_KOBOLD},                            {{3, 7, 1}},                    5,      11,     10,     0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2044:     {MK_OGRE,           1,      {MK_OGRE},                              {{1, 2, 1}},                    8,      15,     20,     0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2045:     {MK_TROLL,          1,      {MK_TROLL},                             {{1, 2, 1}},                    14,     19,     10,     0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2046:     {MK_CENTAUR,        1,      {MK_TROLL},                             {{1, 2, 1}},                    12,     19,     10,     0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2047:     {MK_TROLL,          2,      {MK_OGRE, MK_OGRE_SHAMAN},              {{2, 3, 1}, {0, 1, 1}},         17,     19,     10,     0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2048:     {MK_DAR_BLADEMASTER,1,      {MK_TROLL},                             {{1, 2, 1}},                    12,     19,     10,     0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2049:     {MK_NAGA,           1,      {MK_SALAMANDER},                        {{1, 2, 1}},                    14,     20,     10,     0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2050:     {MK_SALAMANDER,     1,      {MK_NAGA},                              {{1, 2, 1}},                    13,     20,     10,     0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2051:     {MK_TROLL,          1,      {MK_SALAMANDER},                        {{1, 2, 1}},                    13,     19,     10,     0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2052:     {MK_IMP,            1,      {MK_FURY},                              {{2, 4, 1}},                    18,     26,     10,     0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2053:     {MK_PIXIE,          1,      {MK_IMP, MK_PHANTOM},                   {{1, 2, 1}, {1, 2, 1}},         14,     21,     10,     0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2054:     {MK_DAR_BLADEMASTER,1,      {MK_FURY},                              {{2, 4, 1}},                    18,     26,     10,     0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2055:     {MK_DAR_BLADEMASTER,1,      {MK_IMP},                               {{2, 3, 1}},                    18,     26,     10,     0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2056:     {MK_DAR_PRIESTESS,  1,      {MK_FURY},                              {{2, 4, 1}},                    18,     26,     10,     0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2057:     {MK_DAR_BATTLEMAGE, 1,      {MK_IMP},                               {{2, 3, 1}},                    18,     26,     10,     0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2058:     {MK_TENTACLE_HORROR,3,      {MK_DAR_BLADEMASTER, MK_DAR_PRIESTESS, MK_DAR_BATTLEMAGE},{{1,2,1},{1,1,1},{1,1,1}},20,26,10,   0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2059:     {MK_GOLEM,          3,      {MK_DAR_BLADEMASTER, MK_DAR_PRIESTESS, MK_DAR_BATTLEMAGE},{{1,2,1},{1,1,1},{1,1,1}},18,25,10,   0,          0,                  HORDE_LEADER_CAPTIVE | HORDE_NEVER_OOD},
                   2060:
                   2061:     // bosses
                   2062:     {MK_GOBLIN_CHIEFTAN,2,      {MK_GOBLIN_MYSTIC, MK_GOBLIN, MK_GOBLIN_TOTEM}, {{1,1,1}, {2,3,1}, {2,2,1}},2,  10,     50,     0,          0,                  HORDE_MACHINE_BOSS},
                   2063:     {MK_BLACK_JELLY,    0,      {0},                                    {{0}},                          5,      15,     50,     0,          0,                  HORDE_MACHINE_BOSS},
                   2064:     {MK_VAMPIRE,        0,      {0},                                    {{0}},                          10,     DEEPEST_LEVEL,  50,  0,     0,                  HORDE_MACHINE_BOSS},
                   2065:     {MK_FLAMEDANCER,    0,      {0},                                    {{0}},                          10,     DEEPEST_LEVEL,  50,  0,     0,                  HORDE_MACHINE_BOSS},
                   2066:
                   2067:     // machine water monsters
                   2068:     {MK_EEL,            0,      {0},                                    {{0}},                          2,      7,      100,        DEEP_WATER, 0,                  HORDE_MACHINE_WATER_MONSTER},
                   2069:     {MK_EEL,            1,      {MK_EEL},                               {{2, 4, 1}},                    5,      15,     100,        DEEP_WATER, 0,                  HORDE_MACHINE_WATER_MONSTER},
                   2070:     {MK_KRAKEN,         0,      {0},                                    {{0}},                          12,     DEEPEST_LEVEL,  100,    DEEP_WATER, 0,              HORDE_MACHINE_WATER_MONSTER},
                   2071:     {MK_KRAKEN,         1,      {MK_EEL},                               {{1, 2, 1}},                    12,     DEEPEST_LEVEL,  80, DEEP_WATER, 0,              HORDE_MACHINE_WATER_MONSTER},
                   2072:
                   2073:     // dungeon captives -- no captors
                   2074:     {MK_OGRE,           0,      {0},                                    {{0}},                          4,      13,     100,        0,          0,                  HORDE_MACHINE_CAPTIVE | HORDE_LEADER_CAPTIVE},
                   2075:     {MK_NAGA,           0,      {0},                                    {{0}},                          12,     20,     50,     0,          0,                  HORDE_MACHINE_CAPTIVE | HORDE_LEADER_CAPTIVE},
                   2076:     {MK_GOBLIN_MYSTIC,  0,      {0},                                    {{0}},                          2,      8,      100,        0,          0,                  HORDE_MACHINE_CAPTIVE | HORDE_LEADER_CAPTIVE},
                   2077:     {MK_TROLL,          0,      {0},                                    {{0}},                          10,     20,     50,     0,          0,                  HORDE_MACHINE_CAPTIVE | HORDE_LEADER_CAPTIVE},
                   2078:     {MK_DAR_BLADEMASTER,0,      {0},                                    {{0}},                          8,      16,     100,        0,          0,                  HORDE_MACHINE_CAPTIVE | HORDE_LEADER_CAPTIVE},
                   2079:     {MK_DAR_PRIESTESS,  0,      {0},                                    {{0}},                          8,      14,     100,        0,          0,                  HORDE_MACHINE_CAPTIVE | HORDE_LEADER_CAPTIVE},
                   2080:     {MK_WRAITH,         0,      {0},                                    {{0}},                          11,     20,     100,        0,          0,                  HORDE_MACHINE_CAPTIVE | HORDE_LEADER_CAPTIVE},
                   2081:     {MK_GOLEM,          0,      {0},                                    {{0}},                          17,     23,     100,        0,          0,                  HORDE_MACHINE_CAPTIVE | HORDE_LEADER_CAPTIVE},
                   2082:     {MK_TENTACLE_HORROR,0,      {0},                                    {{0}},                          20,     AMULET_LEVEL,100,0,         0,                  HORDE_MACHINE_CAPTIVE | HORDE_LEADER_CAPTIVE},
                   2083:     {MK_DRAGON,         0,      {0},                                    {{0}},                          23,     AMULET_LEVEL,100,0,         0,                  HORDE_MACHINE_CAPTIVE | HORDE_LEADER_CAPTIVE},
                   2084:
                   2085:     // machine statue monsters
                   2086:     {MK_GOBLIN,         0,      {0},                                    {{0}},                          1,      6,      100,        STATUE_DORMANT, 0,              HORDE_MACHINE_STATUE},
                   2087:     {MK_OGRE,           0,      {0},                                    {{0}},                          6,      12,     100,        STATUE_DORMANT, 0,              HORDE_MACHINE_STATUE},
                   2088:     {MK_WRAITH,         0,      {0},                                    {{0}},                          10,     17,     100,        STATUE_DORMANT, 0,              HORDE_MACHINE_STATUE},
                   2089:     {MK_NAGA,           0,      {0},                                    {{0}},                          12,     19,     100,        STATUE_DORMANT, 0,              HORDE_MACHINE_STATUE},
                   2090:     {MK_TROLL,          0,      {0},                                    {{0}},                          14,     21,     100,        STATUE_DORMANT, 0,              HORDE_MACHINE_STATUE},
                   2091:     {MK_GOLEM,          0,      {0},                                    {{0}},                          21,     30,     100,        STATUE_DORMANT, 0,              HORDE_MACHINE_STATUE},
                   2092:     {MK_DRAGON,         0,      {0},                                    {{0}},                          29,     DEEPEST_LEVEL,  100,    STATUE_DORMANT, 0,          HORDE_MACHINE_STATUE},
                   2093:     {MK_TENTACLE_HORROR,0,      {0},                                    {{0}},                          29,     DEEPEST_LEVEL,  100,    STATUE_DORMANT, 0,          HORDE_MACHINE_STATUE},
                   2094:
                   2095:     // machine turrets
                   2096:     {MK_ARROW_TURRET,   0,      {0},                                    {{0}},                          5,      13,     100,        TURRET_DORMANT, 0,              HORDE_MACHINE_TURRET},
                   2097:     {MK_SPARK_TURRET,   0,      {0},                                    {{0}},                          11,     18,     100,        TURRET_DORMANT, 0,              HORDE_MACHINE_TURRET},
                   2098:     {MK_DART_TURRET,    0,      {0},                                    {{0}},                          15,     22,     100,        TURRET_DORMANT, 0,              HORDE_MACHINE_TURRET},
                   2099:     {MK_FLAME_TURRET,   0,      {0},                                    {{0}},                          17,     24,     100,        TURRET_DORMANT, 0,              HORDE_MACHINE_TURRET},
                   2100:
                   2101:     // machine mud monsters
                   2102:     {MK_BOG_MONSTER,    0,      {0},                                    {{0}},                          12,     26,     100,        MACHINE_MUD_DORMANT, 0,         HORDE_MACHINE_MUD},
                   2103:     {MK_KRAKEN,         0,      {0},                                    {{0}},                          17,     26,     30,     MACHINE_MUD_DORMANT, 0,         HORDE_MACHINE_MUD},
                   2104:
                   2105:     // kennel monsters
                   2106:     {MK_MONKEY,         0,      {0},                                    {{0}},                          1,      5,      100,        MONSTER_CAGE_CLOSED, 0,         HORDE_MACHINE_KENNEL | HORDE_LEADER_CAPTIVE},
                   2107:     {MK_GOBLIN,         0,      {0},                                    {{0}},                          1,      8,      100,        MONSTER_CAGE_CLOSED, 0,         HORDE_MACHINE_KENNEL | HORDE_LEADER_CAPTIVE},
                   2108:     {MK_GOBLIN_CONJURER,0,      {0},                                    {{0}},                          2,      9,      100,        MONSTER_CAGE_CLOSED, 0,         HORDE_MACHINE_KENNEL | HORDE_LEADER_CAPTIVE},
                   2109:     {MK_GOBLIN_MYSTIC,  0,      {0},                                    {{0}},                          2,      9,      100,        MONSTER_CAGE_CLOSED, 0,         HORDE_MACHINE_KENNEL | HORDE_LEADER_CAPTIVE},
                   2110:     {MK_OGRE,           0,      {0},                                    {{0}},                          7,      17,     100,        MONSTER_CAGE_CLOSED, 0,         HORDE_MACHINE_KENNEL | HORDE_LEADER_CAPTIVE},
                   2111:     {MK_TROLL,          0,      {0},                                    {{0}},                          12,     21,     100,        MONSTER_CAGE_CLOSED, 0,         HORDE_MACHINE_KENNEL | HORDE_LEADER_CAPTIVE},
                   2112:     {MK_NAGA,           0,      {0},                                    {{0}},                          13,     23,     100,        MONSTER_CAGE_CLOSED, 0,         HORDE_MACHINE_KENNEL | HORDE_LEADER_CAPTIVE},
                   2113:     {MK_SALAMANDER,     0,      {0},                                    {{0}},                          9,      20,     100,        MONSTER_CAGE_CLOSED, 0,         HORDE_MACHINE_KENNEL | HORDE_LEADER_CAPTIVE},
                   2114:     {MK_IMP,            0,      {0},                                    {{0}},                          15,     26,     100,        MONSTER_CAGE_CLOSED, 0,         HORDE_MACHINE_KENNEL | HORDE_LEADER_CAPTIVE},
                   2115:     {MK_PIXIE,          0,      {0},                                    {{0}},                          11,     21,     100,        MONSTER_CAGE_CLOSED, 0,         HORDE_MACHINE_KENNEL | HORDE_LEADER_CAPTIVE},
                   2116:     {MK_DAR_BLADEMASTER,0,      {0},                                    {{0}},                          9,      AMULET_LEVEL, 100, MONSTER_CAGE_CLOSED, 0,      HORDE_MACHINE_KENNEL | HORDE_LEADER_CAPTIVE},
                   2117:     {MK_DAR_PRIESTESS,  0,      {0},                                    {{0}},                          12,     AMULET_LEVEL, 100, MONSTER_CAGE_CLOSED, 0,      HORDE_MACHINE_KENNEL | HORDE_LEADER_CAPTIVE},
                   2118:     {MK_DAR_BATTLEMAGE, 0,      {0},                                    {{0}},                          13,     AMULET_LEVEL, 100, MONSTER_CAGE_CLOSED, 0,      HORDE_MACHINE_KENNEL | HORDE_LEADER_CAPTIVE},
                   2119:
                   2120:     // vampire bloodbags
                   2121:     {MK_MONKEY,         0,      {0},                                    {{0}},                          1,      5,      100,        MONSTER_CAGE_CLOSED, 0,         HORDE_VAMPIRE_FODDER | HORDE_LEADER_CAPTIVE},
                   2122:     {MK_GOBLIN,         0,      {0},                                    {{0}},                          1,      8,      100,        MONSTER_CAGE_CLOSED, 0,         HORDE_VAMPIRE_FODDER | HORDE_LEADER_CAPTIVE},
                   2123:     {MK_GOBLIN_CONJURER,0,      {0},                                    {{0}},                          2,      9,      100,        MONSTER_CAGE_CLOSED, 0,         HORDE_VAMPIRE_FODDER | HORDE_LEADER_CAPTIVE},
                   2124:     {MK_GOBLIN_MYSTIC,  0,      {0},                                    {{0}},                          2,      9,      100,        MONSTER_CAGE_CLOSED, 0,         HORDE_VAMPIRE_FODDER | HORDE_LEADER_CAPTIVE},
                   2125:     {MK_OGRE,           0,      {0},                                    {{0}},                          5,      15,     100,        MONSTER_CAGE_CLOSED, 0,         HORDE_VAMPIRE_FODDER | HORDE_LEADER_CAPTIVE},
                   2126:     {MK_TROLL,          0,      {0},                                    {{0}},                          10,     19,     100,        MONSTER_CAGE_CLOSED, 0,         HORDE_VAMPIRE_FODDER | HORDE_LEADER_CAPTIVE},
                   2127:     {MK_NAGA,           0,      {0},                                    {{0}},                          9,      20,     100,        MONSTER_CAGE_CLOSED, 0,         HORDE_VAMPIRE_FODDER | HORDE_LEADER_CAPTIVE},
                   2128:     {MK_IMP,            0,      {0},                                    {{0}},                          15,     AMULET_LEVEL,100,MONSTER_CAGE_CLOSED, 0,            HORDE_VAMPIRE_FODDER | HORDE_LEADER_CAPTIVE},
                   2129:     {MK_PIXIE,          0,      {0},                                    {{0}},                          11,     21,     100,        MONSTER_CAGE_CLOSED, 0,         HORDE_VAMPIRE_FODDER | HORDE_LEADER_CAPTIVE},
                   2130:     {MK_DAR_BLADEMASTER,0,      {0},                                    {{0}},                          9,      AMULET_LEVEL,100,MONSTER_CAGE_CLOSED, 0,            HORDE_VAMPIRE_FODDER | HORDE_LEADER_CAPTIVE},
                   2131:     {MK_DAR_PRIESTESS,  0,      {0},                                    {{0}},                          12,     AMULET_LEVEL,100,MONSTER_CAGE_CLOSED, 0,            HORDE_VAMPIRE_FODDER | HORDE_LEADER_CAPTIVE},
                   2132:     {MK_DAR_BATTLEMAGE, 0,      {0},                                    {{0}},                          13,     AMULET_LEVEL,100,MONSTER_CAGE_CLOSED, 0,            HORDE_VAMPIRE_FODDER | HORDE_LEADER_CAPTIVE},
                   2133:
                   2134:     // key thieves
                   2135:     {MK_MONKEY,         0,      {0},                                    {{0}},                          1,      14,     100,     0,          0,                  HORDE_MACHINE_THIEF},
                   2136:     {MK_IMP,            0,      {0},                                    {{0}},                          15,     DEEPEST_LEVEL,  100, 0,      0,                  HORDE_MACHINE_THIEF},
                   2137:
                   2138:     // sacrifice victims
                   2139:     {MK_MONKEY,         0,      {0},                                    {{0}},                          1,      5,      100,        STATUE_INSTACRACK, 0,           HORDE_SACRIFICE_TARGET},
                   2140:     {MK_GOBLIN,         0,      {0},                                    {{0}},                          3,      10,     100,        STATUE_INSTACRACK, 0,           HORDE_SACRIFICE_TARGET},
                   2141:     {MK_OGRE,           0,      {0},                                    {{0}},                          7,      13,     100,        STATUE_INSTACRACK, 0,           HORDE_SACRIFICE_TARGET},
                   2142:     {MK_TROLL,          0,      {0},                                    {{0}},                          12,     19,     100,        STATUE_INSTACRACK, 0,           HORDE_SACRIFICE_TARGET},
                   2143:     {MK_WRAITH,         0,      {0},                                    {{0}},                          10,     17,     100,        STATUE_INSTACRACK, 0,           HORDE_SACRIFICE_TARGET},
                   2144:     {MK_NAGA,           0,      {0},                                    {{0}},                          13,     20,     100,        STATUE_INSTACRACK, 0,           HORDE_SACRIFICE_TARGET},
                   2145:     {MK_DAR_BLADEMASTER,0,      {0},                                    {{0}},                          10,     20,     100,        STATUE_INSTACRACK, 0,           HORDE_SACRIFICE_TARGET},
                   2146:     {MK_GOLEM,          0,      {0},                                    {{0}},                          22,     DEEPEST_LEVEL,100,  STATUE_INSTACRACK, 0,           HORDE_SACRIFICE_TARGET},
                   2147:     {MK_REVENANT,       0,      {0},                                    {{0}},                          22,     DEEPEST_LEVEL,100,  STATUE_INSTACRACK, 0,           HORDE_SACRIFICE_TARGET},
                   2148:     {MK_TENTACLE_HORROR,0,      {0},                                    {{0}},                          22,     DEEPEST_LEVEL,100,  STATUE_INSTACRACK, 0,           HORDE_SACRIFICE_TARGET},
                   2149:
                   2150:     // legendary allies
                   2151:     {MK_UNICORN,        0,      {0},                                    {{0}},                          1,      DEEPEST_LEVEL,  100, 0,     0,                  HORDE_MACHINE_LEGENDARY_ALLY | HORDE_ALLIED_WITH_PLAYER},
                   2152:     {MK_IFRIT,          0,      {0},                                    {{0}},                          1,      DEEPEST_LEVEL,  100,    0,      0,                  HORDE_MACHINE_LEGENDARY_ALLY | HORDE_ALLIED_WITH_PLAYER},
                   2153:     {MK_PHOENIX_EGG,    0,      {0},                                    {{0}},                          1,      DEEPEST_LEVEL,  100,    0,      0,                  HORDE_MACHINE_LEGENDARY_ALLY | HORDE_ALLIED_WITH_PLAYER},
                   2154:     {MK_ANCIENT_SPIRIT, 0,      {0},                                    {{0}},                          1,      DEEPEST_LEVEL,  100,    0,      0,                  HORDE_MACHINE_LEGENDARY_ALLY | HORDE_ALLIED_WITH_PLAYER},
                   2155:
                   2156:     // goblin warren
                   2157:     {MK_GOBLIN,         0,      {0},                                    {{0}},                          1,      10,     100,     0,              0,              HORDE_MACHINE_GOBLIN_WARREN},
                   2158:     {MK_GOBLIN_CONJURER,0,      {0},                                    {{0}},                          1,      10,     60,      0,              0,              HORDE_MACHINE_GOBLIN_WARREN},
                   2159:     {MK_GOBLIN_TOTEM,   1,      {MK_GOBLIN},                            {{2,4,1}},                      5,      13,     100,        0,              MT_CAMP_AREA,   HORDE_MACHINE_GOBLIN_WARREN},
                   2160:     {MK_GOBLIN,         3,      {MK_GOBLIN, MK_GOBLIN_MYSTIC, MK_JACKAL},{{2, 3, 1}, {1,2,1}, {1,2,1}}, 6,      12,     40,      0,              0,              HORDE_MACHINE_GOBLIN_WARREN},
                   2161:     {MK_GOBLIN_CONJURER,2,      {MK_GOBLIN_CONJURER, MK_GOBLIN_MYSTIC}, {{0,1,1}, {1,1,1}},             7,      15,     40,      0,              0,              HORDE_MACHINE_GOBLIN_WARREN},
                   2162:     {MK_GOBLIN_TOTEM,   4,      {MK_GOBLIN_TOTEM, MK_GOBLIN_CONJURER, MK_GOBLIN_MYSTIC, MK_GOBLIN}, {{1,2,1},{1,2,1},{1,2,1},{3,5,1}},10,17,80,0,MT_CAMP_AREA,  HORDE_MACHINE_GOBLIN_WARREN},
                   2163:     {MK_GOBLIN,         1,      {MK_GOBLIN},                            {{1, 2, 1}},                    3,      7,      10,     0,              0,              HORDE_MACHINE_GOBLIN_WARREN | HORDE_LEADER_CAPTIVE},
                   2164: };
                   2165:
                   2166: const monsterClass monsterClassCatalog[MONSTER_CLASS_COUNT] = {
                   2167:     // name             frequency   maxDepth    member list
                   2168:     {"abomination",     10,         -1,         {MK_BOG_MONSTER, MK_UNDERWORM, MK_KRAKEN, MK_TENTACLE_HORROR}},
                   2169:     {"dar",             10,         22,         {MK_DAR_BLADEMASTER, MK_DAR_PRIESTESS, MK_DAR_BATTLEMAGE}},
                   2170:     {"animal",          10,         10,         {MK_RAT, MK_MONKEY, MK_JACKAL, MK_EEL, MK_TOAD, MK_VAMPIRE_BAT, MK_CENTIPEDE, MK_SPIDER}},
                   2171:     {"goblin",          10,         10,         {MK_GOBLIN, MK_GOBLIN_CONJURER, MK_GOBLIN_MYSTIC, MK_GOBLIN_TOTEM, MK_GOBLIN_CHIEFTAN, MK_SPECTRAL_BLADE}},
                   2172:     {"ogre",            10,         16,         {MK_OGRE, MK_OGRE_SHAMAN, MK_OGRE_TOTEM}},
                   2173:     {"dragon",          10,         -1,         {MK_DRAGON}},
                   2174:     {"undead",          10,         -1,         {MK_ZOMBIE, MK_WRAITH, MK_VAMPIRE, MK_PHANTOM, MK_LICH, MK_REVENANT}},
                   2175:     {"jelly",           10,         15,         {MK_PINK_JELLY, MK_BLACK_JELLY, MK_ACID_JELLY}},
                   2176:     {"turret",          5,          18,         {MK_ARROW_TURRET, MK_SPARK_TURRET, MK_DART_TURRET, MK_FLAME_TURRET}},
                   2177:     {"infernal",        10,         -1,         {MK_FLAMEDANCER, MK_IMP, MK_REVENANT, MK_FURY, MK_PHANTOM, MK_IFRIT}},
                   2178:     {"mage",            10,         -1,         {MK_GOBLIN_CONJURER, MK_GOBLIN_MYSTIC, MK_OGRE_SHAMAN, MK_DAR_PRIESTESS, MK_DAR_BATTLEMAGE, MK_PIXIE, MK_LICH}},
                   2179:     {"waterborne",      10,         17,         {MK_EEL, MK_NAGA, MK_KRAKEN}},
                   2180:     {"airborne",        10,         15,         {MK_VAMPIRE_BAT, MK_WILL_O_THE_WISP, MK_PIXIE, MK_PHANTOM, MK_FURY, MK_IFRIT, MK_PHOENIX}},
                   2181:     {"fireborne",       10,         12,         {MK_WILL_O_THE_WISP, MK_SALAMANDER, MK_FLAMEDANCER, MK_PHOENIX}},
                   2182:     {"troll",           10,         15,         {MK_TROLL}},
                   2183: };
                   2184:
                   2185: // ITEMS
                   2186:
                   2187: char itemTitles[NUMBER_SCROLL_KINDS][30];
                   2188:
                   2189: const char itemCategoryNames[NUMBER_ITEM_CATEGORIES][7] = {
                   2190:         "food",
                   2191:         "weapon",
                   2192:         "armor",
                   2193:         "potion",
                   2194:         "scroll",
                   2195:         "staff",
                   2196:         "wand",
                   2197:         "ring",
                   2198:         "charm",
                   2199:         "gold",
                   2200:         "amulet",
                   2201:         "gem",
                   2202:         "key"
                   2203: };
                   2204:
                   2205: const char titlePhonemes[NUMBER_TITLE_PHONEMES][30] = {
                   2206:     "glorp",
                   2207:     "snarg",
                   2208:     "gana",
                   2209:     "flin",
                   2210:     "herba",
                   2211:     "pora",
                   2212:     "nuglo",
                   2213:     "greep",
                   2214:     "nur",
                   2215:     "lofa",
                   2216:     "poder",
                   2217:     "nidge",
                   2218:     "pus",
                   2219:     "wooz",
                   2220:     "flem",
                   2221:     "bloto",
                   2222:     "porta",
                   2223:     "ermah",
                   2224:     "gerd",
                   2225:     "nurt",
                   2226:     "flurx",
                   2227: };
                   2228:
                   2229: char itemColors[NUMBER_ITEM_COLORS][30];
                   2230:
                   2231: const char itemColorsRef[NUMBER_ITEM_COLORS][30] = {
                   2232:     "crimson",
                   2233:     "scarlet",
                   2234:     "orange",
                   2235:     "yellow",
                   2236:     "green",
                   2237:     "blue",
                   2238:     "indigo",
                   2239:     "violet",
                   2240:     "puce",
                   2241:     "mauve",
                   2242:     "burgundy",
                   2243:     "turquoise",
                   2244:     "aquamarine",
                   2245:     "gray",
                   2246:     "pink",
                   2247:     "white",
                   2248:     "lavender",
                   2249:     "tan",
                   2250:     "brown",
                   2251:     "cyan",
                   2252:     "black"
                   2253: };
                   2254:
                   2255: char itemWoods[NUMBER_ITEM_WOODS][30];
                   2256:
                   2257: const char itemWoodsRef[NUMBER_ITEM_WOODS][30] = {
                   2258:     "teak",
                   2259:     "oak",
                   2260:     "redwood",
                   2261:     "rowan",
                   2262:     "willow",
                   2263:     "mahogany",
                   2264:     "pinewood",
                   2265:     "maple",
                   2266:     "bamboo",
                   2267:     "ironwood",
                   2268:     "pearwood",
                   2269:     "birch",
                   2270:     "cherry",
                   2271:     "eucalyptus",
                   2272:     "walnut",
                   2273:     "cedar",
                   2274:     "rosewood",
                   2275:     "yew",
                   2276:     "sandalwood",
                   2277:     "hickory",
                   2278:     "hemlock",
                   2279: };
                   2280:
                   2281: char itemMetals[NUMBER_ITEM_METALS][30];
                   2282:
                   2283: const char itemMetalsRef[NUMBER_ITEM_METALS][30] = {
                   2284:     "bronze",
                   2285:     "steel",
                   2286:     "brass",
                   2287:     "pewter",
                   2288:     "nickel",
                   2289:     "copper",
                   2290:     "aluminum",
                   2291:     "tungsten",
                   2292:     "titanium",
                   2293:     "cobalt",
                   2294:     "chromium",
                   2295:     "silver",
                   2296: };
                   2297:
                   2298: char itemGems[NUMBER_ITEM_GEMS][30];
                   2299:
                   2300: const char itemGemsRef[NUMBER_ITEM_GEMS][30] = {
                   2301:     "diamond",
                   2302:     "opal",
                   2303:     "garnet",
                   2304:     "ruby",
                   2305:     "amethyst",
                   2306:     "topaz",
                   2307:     "onyx",
                   2308:     "tourmaline",
                   2309:     "sapphire",
                   2310:     "obsidian",
                   2311:     "malachite",
                   2312:     "aquamarine",
                   2313:     "emerald",
                   2314:     "jade",
                   2315:     "alexandrite",
                   2316:     "agate",
                   2317:     "bloodstone",
                   2318:     "jasper"
                   2319: };
                   2320:
                   2321: //typedef struct itemTable {
                   2322: //  char *name;
                   2323: //  char *flavor;
                   2324: //  short frequency;
                   2325: //  short marketValue;
                   2326: //  short number;
                   2327: //  randomRange range;
                   2328: //} itemTable;
                   2329:
                   2330: const itemTable keyTable[NUMBER_KEY_TYPES] = {
                   2331:     {"door key",            "", "", 1, 0,   0, {0,0,0}, true, false, "The notches on this ancient iron key are well worn; its leather lanyard is battered by age. What door might it open?"},
                   2332:     {"cage key",            "", "", 1, 0,   0, {0,0,0}, true, false, "The rust accreted on this iron key has been stained with flecks of blood; it must have been used recently. What cage might it open?"},
                   2333:     {"crystal orb",         "", "", 1, 0,   0, {0,0,0}, true, false, "A faceted orb, seemingly cut from a single crystal, sparkling and perpetually warm to the touch. What manner of device might such an object activate?"},
                   2334: };
                   2335:
                   2336: const itemTable foodTable[NUMBER_FOOD_KINDS] = {
                   2337:     {"ration of food",      "", "", 3, 25,  1800, {0,0,0}, true, false, "A ration of food. Was it left by former adventurers? Is it a curious byproduct of the subterranean ecosystem?"},
                   2338:     {"mango",               "", "", 1, 15,  1550, {0,0,0}, true, false, "An odd fruit to be found so deep beneath the surface of the earth, but only slightly less filling than a ration of food."}
                   2339: };
                   2340:
                   2341: const itemTable weaponTable[NUMBER_WEAPON_KINDS] = {
                   2342:     {"dagger",              "", "", 10, 190,        12, {3, 4,  1},     true, false, "A simple iron dagger with a well-worn wooden handle. Daggers will deal quintuple damage upon a successful sneak attack instead of triple damage."},
                   2343:     {"sword",               "", "", 10, 440,        14, {7, 9,  1},     true, false, "The razor-sharp length of steel blade shines reassuringly."},
                   2344:     {"broadsword",          "", "", 10, 990,        19, {14, 22, 1},    true, false, "This towering blade inflicts heavy damage by investing its heft into every cut."},
                   2345:
                   2346:     {"whip",                "", "", 10, 440,        14, {3, 5,  1},     true, false, "The lash from this coil of braided leather can tear bark from trees, and it will reach opponents up to five spaces away."},
                   2347:     {"rapier",              "", "", 10, 440,        15, {3, 5,  1},     true, false, "This blade is thin and flexible, designed for deft and rapid maneuvers. It inflicts less damage than comparable weapons, but permits you to attack twice as quickly. If there is one space between you and an enemy and you step directly toward it, you will perform a devastating lunge attack, which deals treble damage and never misses."},
                   2348:     {"flail",               "", "", 10, 440,        17, {10,13, 1},     true, false, "This spiked iron ball can be whirled at the end of its chain in synchronicity with your movement, allowing you a free attack whenever moving between two spaces that are adjacent to an enemy."},
                   2349:
                   2350:     {"mace",                "", "", 10, 660,        16, {16, 20, 1},    true, false, "The iron flanges at the head of this weapon inflict substantial damage with every weighty blow. Because of its heft, it takes an extra turn to recover when it hits, and will push your opponent backward if there is room."},
                   2351:     {"war hammer",          "", "", 10, 1100,       20, {25, 35, 1},    true, false, "Few creatures can withstand the crushing blow of this towering mass of lead and steel, but only the strongest of adventurers can effectively wield it. Because of its heft, it takes an extra turn to recover when it hits, and will push your opponent backward if there is room."},
                   2352:
                   2353:     {"spear",               "", "", 10, 330,        13, {4, 5, 1},      true, false, "A slender wooden rod tipped with sharpened iron. The reach of the spear permits you to simultaneously attack an adjacent enemy and the enemy directly behind it."},
                   2354:     {"war pike",            "", "", 10, 880,        18, {11, 15, 1},    true, false, "A long steel pole ending in a razor-sharp point. The reach of the pike permits you to simultaneously attack an adjacent enemy and the enemy directly behind it."},
                   2355:
                   2356:     {"axe",                 "", "", 10, 550,        15, {7, 9, 1},      true, false, "The blunt iron edge on this axe glints in the darkness. The arc of its swing permits you to attack all adjacent enemies simultaneously."},
                   2357:     {"war axe",             "", "", 10, 990,        19, {12, 17, 1},    true, false, "The enormous steel head of this war axe puts considerable heft behind each stroke. The arc of its swing permits you to attack all adjacent enemies simultaneously."},
                   2358:
                   2359:     {"dart",                "", "", 0,  15,         10, {2, 4,  1},     true, false, "These simple metal spikes are weighted to fly true and sting their prey with a flick of the wrist."},
                   2360:     {"incendiary dart",     "", "", 10, 25,         12, {1, 2,  1},     true, false, "The barbed spike on each of these darts is designed to stick to its target while the compounds strapped to its length explode into flame."},
                   2361:     {"javelin",             "", "", 10, 40,         15, {3, 11, 3},     true, false, "This length of metal is weighted to keep the spike at its tip foremost as it sails through the air."},
                   2362: };
                   2363:
                   2364: const itemTable armorTable[NUMBER_ARMOR_KINDS] = {
                   2365:     {"leather armor",   "", "", 10, 250,        10, {30,30,0},      true, false, "This lightweight armor offers basic protection."},
                   2366:     {"scale mail",      "", "", 10, 350,        12, {40,40,0},      true, false, "Bronze scales cover the surface of treated leather, offering greater protection than plain leather with minimal additional weight."},
                   2367:     {"chain mail",      "", "", 10, 500,        13, {50,50,0},      true, false, "Interlocking metal links make for a tough but flexible suit of armor."},
                   2368:     {"banded mail",     "", "", 10, 800,        15, {70,70,0},      true, false, "Overlapping strips of metal horizontally encircle a chain mail base, offering an additional layer of protection at the cost of greater weight."},
                   2369:     {"splint mail",     "", "", 10, 1000,       17, {90,90,0},      true, false, "Thick plates of metal are embedded into a chain mail base, providing the wearer with substantial protection."},
                   2370:     {"plate armor",     "", "", 10, 1300,       19, {110,110,0},    true, false, "Enormous plates of metal are joined together into a suit that provides unmatched protection to any adventurer strong enough to bear its staggering weight."}
                   2371: };
                   2372:
                   2373: const char weaponRunicNames[NUMBER_WEAPON_RUNIC_KINDS][30] = {
                   2374:     "speed",
                   2375:     "quietus",
                   2376:     "paralysis",
                   2377:     "multiplicity",
                   2378:     "slowing",
                   2379:     "confusion",
                   2380:     "force",
                   2381:     "slaying",
                   2382:     "mercy",
                   2383:     "plenty"
                   2384: };
                   2385:
                   2386: const char armorRunicNames[NUMBER_ARMOR_ENCHANT_KINDS][30] = {
                   2387:     "multiplicity",
                   2388:     "mutuality",
                   2389:     "absorption",
                   2390:     "reprisal",
                   2391:     "immunity",
                   2392:     "reflection",
                   2393:     "respiration",
                   2394:     "dampening",
                   2395:     "burden",
                   2396:     "vulnerability",
                   2397:     "immolation",
                   2398: };
                   2399:
                   2400: itemTable scrollTable[NUMBER_SCROLL_KINDS] = {
                   2401:     {"enchanting",          itemTitles[0], "",  0,  550,    0,{0,0,0}, false, false, "This ancient enchanting sorcery will imbue a single item with a powerful and permanent magical charge. A staff will increase in power and in number of charges; a weapon will inflict more damage and find its mark more easily; a suit of armor will deflect attacks more often; the magic of a ring will intensify; and a wand will gain expendable charges in the least amount that such a wand can be found with. Weapons and armor will also require less strength to use, and any curses on the item will be lifted."}, // frequency is dynamically adjusted
                   2402:     {"identify",            itemTitles[1], "",  30, 300,    0,{0,0,0}, false, false, "This scrying magic will permanently reveal all of the secrets of a single item."},
                   2403:     {"teleportation",       itemTitles[2], "",  10, 500,    0,{0,0,0}, false, false, "This escape spell will instantly relocate you to a random location on the dungeon level. It can be used to escape a dangerous situation with luck. The unlucky reader might find himself in an even more dangerous place."},
                   2404:     {"remove curse",        itemTitles[3], "",  15, 150,    0,{0,0,0}, false, false, "This redemption spell will instantly strip from the reader's weapon, armor, rings and carried items any evil enchantments that might prevent the wearer from removing them."},
                   2405:     {"recharging",          itemTitles[4], "",  12, 375,    0,{0,0,0}, false, false, "The power bound up in this parchment will instantly recharge all of your staffs and charms."},
                   2406:     {"protect armor",       itemTitles[5], "",  10, 400,    0,{0,0,0}, false, false, "This ceremonial shielding magic will permanently proof your armor against degradation by acid."},
                   2407:     {"protect weapon",      itemTitles[6], "",  10, 400,    0,{0,0,0}, false, false, "This ceremonial shielding magic will permanently proof your weapon against degradation by acid."},
                   2408:     {"sanctuary",           itemTitles[7], "",  10, 500,    0,{0,0,0}, false, false, "This protection rite will imbue the area with powerful warding glyphs, when released over plain ground. Monsters will not willingly set foot on the affected area."},
                   2409:     {"magic mapping",       itemTitles[8], "",  12, 500,    0,{0,0,0}, false, false, "This powerful scouting magic will etch a purple-hued image of crystal clarity into your memory, alerting you to the precise layout of the level and revealing all hidden secrets."},
                   2410:     {"negation",            itemTitles[9], "",  8,  400,    0,{0,0,0}, false, false, "When this powerful anti-magic is released, all creatures (including yourself) and all items lying on the ground within your field of view will be exposed to its blast and stripped of magic. Creatures animated purely by magic will die. Potions, scrolls, items being held by other creatures and items in your inventory will not be affected."},
                   2411:     {"shattering",          itemTitles[10],"",  8,  500,    0,{0,0,0}, false, false, "This strange incantation will alter the physical structure of nearby stone, causing it to evaporate into the air over the ensuing minutes."},
                   2412:     {"discord",             itemTitles[11], "", 8,  400,    0,{0,0,0}, false, false, "This scroll will unleash a powerful blast of mind magic. Any creatures within line of sight will turn against their companions and attack indiscriminately for 30 turns."},
                   2413:     {"aggravate monsters",  itemTitles[12], "", 15, 50,     0,{0,0,0}, false, false, "This scroll will unleash a piercing shriek that will awaken all monsters and alert them to the reader's location."},
                   2414:     {"summon monsters",     itemTitles[13], "", 10, 50,     0,{0,0,0}, false, false, "This summoning incantation will call out to creatures in other planes of existence, drawing them through the fabric of reality to confront the reader."},
                   2415: };
                   2416:
                   2417: itemTable potionTable[NUMBER_POTION_KINDS] = {
                   2418:     {"life",                itemColors[1], "",  0,  500,    0,{0,0,0}, false, false, "A swirling elixir that will instantly heal you, cure you of ailments, and permanently increase your maximum health."}, // frequency is dynamically adjusted
                   2419:     {"strength",            itemColors[2], "",  0,  400,    0,{0,0,0}, false, false, "This powerful medicine will course through your muscles, permanently increasing your strength by one point."}, // frequency is dynamically adjusted
                   2420:     {"telepathy",           itemColors[3], "",  20, 350,    0,{0,0,0}, false, false, "This mysterious liquid will attune your mind to the psychic signature of distant creatures. Its effects will not reveal inanimate objects, such as totems, turrets and traps."},
                   2421:     {"levitation",          itemColors[4], "",  15, 250,    0,{0,0,0}, false, false, "This curious liquid will cause you to hover in the air, able to drift effortlessly over lava, water, chasms and traps. Flames, gases and spiderwebs fill the air, and cannot be bypassed while airborne. Creatures that dwell in water or mud will be unable to attack you while you levitate."},
                   2422:     {"detect magic",        itemColors[5], "",  20, 500,    0,{0,0,0}, false, false, "This mysterious brew will sensitize your mind to the radiance of magic. Items imbued with helpful enchantments will be marked with a full sigil; items corrupted by curses or designed to bring misfortune upon the bearer will be marked with a hollow sigil. The Amulet of Yendor will be revealed by its unique aura."},
                   2423:     {"speed",               itemColors[6], "",  10, 500,    0,{0,0,0}, false, false, "Quaffing the contents of this flask will enable you to move at blinding speed for several minutes."},
                   2424:     {"fire immunity",       itemColors[7], "",  15, 500,    0,{0,0,0}, false, false, "This potion will render you impervious to heat and permit you to wander through fire and lava and ignore otherwise deadly bolts of flame. It will not guard against the concussive impact of an explosion, however."},
                   2425:     {"invisibility",        itemColors[8], "",  15, 400,    0,{0,0,0}, false, false, "Drinking this potion will render you temporarily invisible. Enemies more than two spaces away will be unable to track you."},
                   2426:     {"caustic gas",         itemColors[9], "",  15, 200,    0,{0,0,0}, false, false, "Uncorking or shattering this pressurized glass will cause its contents to explode into a deadly cloud of caustic purple gas. You might choose to fling this potion at distant enemies instead of uncorking it by hand."},
                   2427:     {"paralysis",           itemColors[10], "", 10, 250,    0,{0,0,0}, false, false, "Upon exposure to open air, the liquid in this flask will vaporize into a numbing pink haze. Anyone who inhales the cloud will be paralyzed instantly, unable to move for some time after the cloud dissipates. This item can be thrown at distant enemies to catch them within the effect of the gas."},
                   2428:     {"hallucination",       itemColors[11], "", 10, 500,    0,{0,0,0}, false, false, "This flask contains a vicious and long-lasting hallucinogen. Under its dazzling effect, you will wander through a rainbow wonderland, unable to discern the form of any creatures or items you see."},
                   2429:     {"confusion",           itemColors[12], "", 15, 450,    0,{0,0,0}, false, false, "This unstable chemical will quickly vaporize into a glittering cloud upon contact with open air, causing any creature that inhales it to lose control of the direction of its movements until the effect wears off (although its ability to aim projectile attacks will not be affected). Its vertiginous intoxication can cause creatures and adventurers to careen into one another or into chasms or lava pits, so extreme care should be taken when under its effect. Its contents can be weaponized by throwing the flask at distant enemies."},
                   2430:     {"incineration",        itemColors[13], "", 15, 500,    0,{0,0,0}, false, false, "This flask contains an unstable compound which will burst violently into flame upon exposure to open air. You might throw the flask at distant enemies -- or into a deep lake, to cleanse the cavern with scalding steam."},
                   2431:     {"darkness",            itemColors[14], "", 7,  150,    0,{0,0,0}, false, false, "Drinking this potion will plunge you into darkness. At first, you will be completely blind to anything not illuminated by an independent light source, but over time your vision will regain its former strength. Throwing the potion will create a cloud of supernatural darkness, and enemies will have difficulty seeing or following you if you take refuge under its cover."},
                   2432:     {"descent",             itemColors[15], "", 15, 500,    0,{0,0,0}, false, false, "When this flask is uncorked by hand or shattered by being thrown, the fog that seeps out will temporarily cause the ground in the vicinity to vanish."},
                   2433:     {"creeping death",      itemColors[16], "", 7,  450,    0,{0,0,0}, false, false, "When the cork is popped or the flask is thrown, tiny spores will spill across the ground and begin to grow a deadly lichen. Anything that touches the lichen will be poisoned by its clinging tendrils, and the lichen will slowly grow to fill the area. Fire will purge the infestation."},
                   2434: };
                   2435:
                   2436: itemTable wandTable[NUMBER_WAND_KINDS] = {
                   2437:     {"teleportation",   itemMetals[0], "",  3,  800,    BOLT_TELEPORT,      {3,5,1}, false, false, "This wand will teleport a creature to a random place on the level. Aquatic or mud-bound creatures will be rendered helpless on dry land."},
                   2438:     {"slowness",        itemMetals[1], "",  3,  800,    BOLT_SLOW,          {2,5,1}, false, false, "This wand will cause a creature to move at half its ordinary speed for 30 turns."},
                   2439:     {"polymorphism",    itemMetals[2], "",  3,  700,    BOLT_POLYMORPH,     {3,5,1}, false, false, "This mischievous magic will transform a creature into another creature at random. Beware: the tamest of creatures might turn into the most fearsome. The horror of the transformation will turn an allied victim against you."},
                   2440:     {"negation",        itemMetals[3], "",  3,  550,    BOLT_NEGATION,      {4,6,1}, false, false, "This powerful anti-magic will strip a creature of a host of magical traits, including flight, invisibility, acidic corrosiveness, telepathy, magical speed or slowness, hypnosis, magical fear, immunity to physical attack, fire resistance and the ability to blink. Spellcasters will lose their magical abilities and magical totems will be rendered inert. Creatures animated purely by magic will die."},
                   2441:     {"domination",      itemMetals[4], "",  1,  1000,   BOLT_DOMINATION,    {1,2,1}, false, false, "This wand can forever bind an enemy to the caster's will, turning it into a steadfast ally. However, the magic works only against enemies that are near death."},
                   2442:     {"beckoning",       itemMetals[5], "",  3,  500,    BOLT_BECKONING,     {2,4,1}, false, false, "The force of this wand will draw the targeted creature into direct proximity."},
                   2443:     {"plenty",          itemMetals[6], "",  2,  700,    BOLT_PLENTY,        {1,2,1}, false, false, "The creature at the other end of this wand, friend or foe, will be beside itself -- literally! This mischievous cloning magic splits the body and life essence of its target into two. Both the creature and its clone will be weaker than the original."},
                   2444:     {"invisibility",    itemMetals[7], "",  3,  100,    BOLT_INVISIBILITY,  {3,5,1}, false, false, "This wand will render a creature temporarily invisible to the naked eye. Only with telepathy or in the silhouette of a thick gas will an observer discern the creature's hazy outline."},
                   2445:     {"empowerment",     itemMetals[8], "",  1,  100,    BOLT_EMPOWERMENT,   {1,1,1}, false, false, "This sacred magic will permanently improve the mind and body of any monster it hits. A wise adventurer will use it on allies, making them stronger in combat and able to learn a new talent from a fallen foe. If the bolt is reflected back at you, it will have no effect."},
                   2446: };
                   2447:
                   2448: itemTable staffTable[NUMBER_STAFF_KINDS] = {
                   2449:     {"lightning",       itemWoods[0], "",   15, 1300,   BOLT_LIGHTNING,     {2,4,1}, false, false, "This staff conjures forth deadly arcs of electricity to damage to any number of creatures in a straight line."},
                   2450:     {"firebolt",        itemWoods[1], "",   15, 1300,   BOLT_FIRE,          {2,4,1}, false, false, "This staff unleashes bursts of magical fire. It will ignite flammable terrain and burn any creature that it hits. Creatures with an immunity to fire will be unaffected by the bolt."},
                   2451:     {"poison",          itemWoods[3], "",   10, 1200,   BOLT_POISON,        {2,4,1}, false, false, "The vile blast of this twisted staff will imbue its target with a deadly venom. Each turn, a creature that is poisoned will suffer one point of damage per dose of poison it has received, and poisoned creatures will not regenerate lost health until the poison clears."},
                   2452:     {"tunneling",       itemWoods[4], "",   10, 1000,   BOLT_TUNNELING,     {2,4,1}, false, false, "Bursts of magic from this staff will pass harmlessly through creatures but will reduce obstructions to rubble."},
                   2453:     {"blinking",        itemWoods[5], "",   11, 1200,   BOLT_BLINKING,      {2,4,1}, false, false, "This staff will allow you to teleport in the chosen direction. Creatures and inanimate obstructions will block the teleportation."},
                   2454:     {"entrancement",    itemWoods[6], "",   6,  1000,   BOLT_ENTRANCEMENT,  {2,4,1}, false, false, "This staff will send creatures into a temporary trance, causing them to mindlessly mirror your movements. You can use the effect to cause one creature to attack another or to step into hazardous terrain, but the spell will be broken if you attack the creature under the effect."},
                   2455:     {"obstruction",     itemWoods[7], "",   10, 1000,   BOLT_OBSTRUCTION,   {2,4,1}, false, false, "This staff will conjure a mass of impenetrable green crystal, preventing anything from moving through the affected area and temporarily entombing anything that is already there. The crystal will dissolve into the air as time passes. Higher level staffs will create larger obstructions."},
                   2456:     {"discord",         itemWoods[8], "",   10, 1000,   BOLT_DISCORD,       {2,4,1}, false, false, "This staff will alter the perception of a creature and cause it to lash out indiscriminately. Strangers and allies alike will turn on the victim."},
                   2457:     {"conjuration",     itemWoods[9], "",   8,  1000,   BOLT_CONJURATION,   {2,4,1}, false, false, "A flick of this staff will summon a number of phantom blades to fight on your behalf."},
                   2458:     {"healing",         itemWoods[10], "",  5,  1100,   BOLT_HEALING,       {2,4,1}, false, false, "This staff will heal any creature, friend or foe. Unfortunately, you cannot use this or any staff on yourself except by reflecting the bolt."},
                   2459:     {"haste",           itemWoods[11], "",  5,  900,    BOLT_HASTE,         {2,4,1}, false, false, "This staff will temporarily double the speed of any creature, friend or foe. Unfortunately, you cannot use this or any staff on yourself except by reflecting the bolt."},
                   2460:     {"protection",      itemWoods[12], "",  5,  900,    BOLT_SHIELDING,     {2,4,1}, false, false, "This staff will bathe a creature in a protective light that will absorb all damage until it is depleted. Unfortunately, you cannot use this or any staff on yourself except by reflecting the bolt."},
                   2461: };
                   2462:
                   2463: itemTable ringTable[NUMBER_RING_KINDS] = {
                   2464:     {"clairvoyance",    itemGems[0], "",    1,  900,    0,{1,3,1}, false, false, "This ring of eldritch scrying will permit you to see through nearby walls and doors, within a radius determined by the level of the ring. A cursed ring of clairvoyance will blind you to your immediate surroundings."},
                   2465:     {"stealth",         itemGems[1], "",    1,  800,    0,{1,3,1}, false, false, "This ring of silent passage will reduce your stealth range, making enemies less likely to notice you and more likely to lose your trail. Staying motionless and lurking in the shadows will make you even harder to spot. Cursed rings of stealth will increase your stealth range, making you easier to spot and to track."},
                   2466:     {"regeneration",    itemGems[2], "",    1,  750,    0,{1,3,1}, false, false, "This ring of sacred life will allow you to recover lost health at an accelerated rate. Cursed rings will decrease or even halt your natural regeneration."},
                   2467:     {"transference",    itemGems[3], "",    1,  750,    0,{1,3,1}, false, false, "This ring of blood magic will heal you in proportion to the damage you inflict on others. Cursed rings will cause you to lose health when inflicting damage."},
                   2468:     {"light",           itemGems[4], "",    1,  600,    0,{1,3,1}, false, false, "This ring of preternatural vision will allow you to see farther in the dimming light of the deeper dungeon levels. It will not make you more noticeable to enemies."},
                   2469:     {"awareness",       itemGems[5], "",    1,  700,    0,{1,3,1}, false, false, "This ring of effortless vigilance will enable you to notice hidden secrets (traps, secret doors and hidden levers) more often and from a greater distance. Cursed rings of awareness will dull your senses, making it harder to notice secrets without actively searching for them."},
                   2470:     {"wisdom",          itemGems[6], "",    1,  700,    0,{1,3,1}, false, false, "This ring of arcane power will cause your staffs to recharge at an accelerated rate. Cursed rings of wisdom will cause your staffs to recharge more slowly."},
                   2471:     {"reaping",         itemGems[7], "",    1,  700,    0,{1,3,1}, false, false, "This ring of blood magic will recharge your staffs and charms every time you hit an enemy. Cursed rings of reaping will drain your staffs and charms with every hit."},
                   2472: };
                   2473:
                   2474: itemTable charmTable[NUMBER_CHARM_KINDS] = {
                   2475:     {"health",          "", "", 5,  900,    0,{1,2,1}, true, false, "A handful of dried bloodwort and mandrake root has been bound together with leather cord and imbued with a powerful healing magic."},
                   2476:     {"protection",      "", "", 5,  800,    0,{1,2,1}, true, false, "Four copper rings have been joined into a tetrahedron. The construct is oddly warm to the touch."},
                   2477:     {"haste",           "", "", 5,  750,    0,{1,2,1}, true, false, "Various animals have been etched into the surface of this brass bangle. It emits a barely audible hum."},
                   2478:     {"fire immunity",   "", "", 3,  750,    0,{1,2,1}, true, false, "Eldritch flames flicker within this polished crystal bauble."},
                   2479:     {"invisibility",    "", "", 5,  700,    0,{1,2,1}, true, false, "A jade figurine depicts a strange humanoid creature. It has a face on both sides of its head, but all four eyes are closed."},
                   2480:     {"telepathy",       "", "", 3,  700,    0,{1,2,1}, true, false, "Seven tiny glass eyes roll freely within this glass sphere. Somehow, they always come to rest facing outward."},
                   2481:     {"levitation",      "", "", 1,  700,    0,{1,2,1}, true, false, "Sparkling dust and fragments of feather waft and swirl endlessly inside this small glass sphere."},
                   2482:     {"shattering",      "", "", 1,  700,    0,{1,2,1}, true, false, "This turquoise crystal, fixed to a leather lanyard, hums with an arcane energy that sets your teeth on edge."},
                   2483:     {"guardian",        "", "", 5,  700,    0,{1,2,1}, true, false, "When you touch this tiny granite statue, a rhythmic booming echoes in your mind."},
                   2484: //    {"fear",            "", "",   3,  700,    0,{1,2,1}, true, false, "When you gaze into the murky interior of this obsidian cube, you feel as though something predatory is watching you."},
                   2485:     {"teleportation",   "", "", 4,  700,    0,{1,2,1}, true, false, "The surface of this nickel sphere has been etched with a perfect grid pattern. Somehow, the squares of the grid are all exactly the same size."},
                   2486:     {"recharging",      "", "", 5,  700,    0,{1,2,1}, true, false, "A strip of bronze has been wound around a rough wooden sphere. Each time you touch it, you feel a tiny electric shock."},
                   2487:     {"negation",        "", "", 5,  700,    0,{1,2,1}, true, false, "A featureless gray disc hangs from a lanyard. When you touch it, your hand and arm go numb."},
                   2488: };
                   2489:
                   2490: const bolt boltCatalog[NUMBER_BOLT_KINDS] = {
                   2491:     {{0}},
                   2492:     //name                      bolt description                ability description                         char    foreColor       backColor           boltEffect      magnitude       pathDF      targetDF    forbiddenMonsterFlags       flags
                   2493:     {"teleportation spell",     "casts a teleport spell",       "can teleport other creatures",             0,      NULL,           &blue,              BE_TELEPORT,    10,             0,          0,          MONST_IMMOBILE,             (BF_TARGET_ENEMIES)},
                   2494:     {"slowing spell",           "casts a slowing spell",        "can slow $HISHER enemies",                 0,      NULL,           &green,             BE_SLOW,        10,             0,          0,          MONST_INANIMATE,            (BF_TARGET_ENEMIES)},
                   2495:     {"polymorph spell",         "casts a polymorphism spell",   "can polymorph other creatures",            0,      NULL,           &purple,            BE_POLYMORPH,   10,             0,          0,          MONST_INANIMATE,            (BF_TARGET_ENEMIES)},
                   2496:     {"negation magic",          "casts a negation spell",       "can cast negation",                        0,      NULL,           &pink,              BE_NEGATION,    10,             0,          0,          0,                          (BF_TARGET_ENEMIES)},
                   2497:     {"domination spell",        "casts a domination spell",     "can dominate other creatures",             0,      NULL,           &dominationColor,   BE_DOMINATION,  10,             0,          0,          MONST_INANIMATE,            (BF_TARGET_ENEMIES)},
                   2498:     {"beckoning spell",         "casts a beckoning spell",      "can cast beckoning",                       0,      NULL,           &beckonColor,       BE_BECKONING,   10,             0,          0,          MONST_IMMOBILE,             (BF_TARGET_ENEMIES)},
                   2499:     {"spell of plenty",         "casts a spell of plenty",      "can duplicate other creatures",            0,      NULL,           &rainbow,           BE_PLENTY,      10,             0,          0,          MONST_INANIMATE,            (BF_TARGET_ALLIES | BF_NOT_LEARNABLE)},
                   2500:     {"invisibility magic",      "casts invisibility magic",     "can turn creatures invisible",             0,      NULL,           &darkBlue,          BE_INVISIBILITY, 10,            0,          0,          MONST_INANIMATE,            (BF_TARGET_ALLIES)},
                   2501:     {"empowerment sorcery",     "casts empowerment",            "can cast empowerment",                     0,      NULL,           &empowermentColor,  BE_EMPOWERMENT, 10,             0,          0,          MONST_INANIMATE,            (BF_TARGET_ALLIES | BF_NOT_LEARNABLE)},
                   2502:     {"lightning",               "casts lightning",              "can hurl lightning bolts",                 0,      NULL,           &lightningColor,    BE_DAMAGE,      10,             0,          0,          0,                          (BF_PASSES_THRU_CREATURES | BF_TARGET_ENEMIES | BF_ELECTRIC)},
                   2503:     {"flame",                   "casts a gout of flame",        "can hurl gouts of flame",                  0,      NULL,           &fireBoltColor,     BE_DAMAGE,      4,              0,          0,          MONST_IMMUNE_TO_FIRE,       (BF_TARGET_ENEMIES | BF_FIERY)},
                   2504:     {"poison ray",              "casts a poison ray",           "can cast poisonous bolts",                 0,      NULL,           &poisonColor,       BE_POISON,      10,             0,          0,          MONST_INANIMATE,            (BF_TARGET_ENEMIES)},
                   2505:     {"tunneling magic",         "casts tunneling",              "can tunnel",                               0,      NULL,           &brown,             BE_TUNNELING,   10,             0,          0,          0,                          (BF_PASSES_THRU_CREATURES)},
                   2506:     {"blink trajectory",        "blinks",                       "can blink",                                0,      NULL,           &white,             BE_BLINKING,    5,              0,          0,          0,                          (BF_HALTS_BEFORE_OBSTRUCTION)},
                   2507:     {"entrancement ray",        "casts entrancement",           "can cast entrancement",                    0,      NULL,           &yellow,            BE_ENTRANCEMENT,10,             0,          0,          MONST_INANIMATE,            (BF_TARGET_ENEMIES)},
                   2508:     {"obstruction magic",       "casts obstruction",            "can cast obstruction",                     0,      NULL,           &forceFieldColor,   BE_OBSTRUCTION, 10,             0,          0,          0,                          (BF_HALTS_BEFORE_OBSTRUCTION)},
                   2509:     {"spell of discord",        "casts a spell of discord",     "can cast discord",                         0,      NULL,           &discordColor,      BE_DISCORD,     10,             0,          0,          MONST_INANIMATE,            (BF_TARGET_ENEMIES)},
                   2510:     {"conjuration magic",       "casts a conjuration bolt",     "can cast conjuration",                     0,      NULL,           &spectralBladeColor, BE_CONJURATION,10,             0,          0,          MONST_IMMUNE_TO_WEAPONS,    (BF_HALTS_BEFORE_OBSTRUCTION | BF_TARGET_ENEMIES)},
                   2511:     {"healing magic",           "casts healing",                "can heal $HISHER allies",                  0,      NULL,           &darkRed,           BE_HEALING,     5,              0,          0,          0,                          (BF_TARGET_ALLIES)},
                   2512:     {"haste spell",             "casts a haste spell",          "can haste $HISHER allies",                 0,      NULL,           &orange,            BE_HASTE,       2,              0,          0,          MONST_INANIMATE,            (BF_TARGET_ALLIES)},
                   2513:     {"slowing spell",           "casts a slowing spell",        "can slow $HISHER enemies",                 0,      NULL,           &green,             BE_SLOW,        2,              0,          0,          MONST_INANIMATE,            (BF_TARGET_ENEMIES)},
                   2514:     {"protection magic",        "casts protection",             "can cast protection",                      0,      NULL,           &shieldingColor,    BE_SHIELDING,   5,              0,          0,          MONST_INANIMATE,            (BF_TARGET_ALLIES)},
                   2515:     {"spiderweb",               "launches a sticky web",        "can launch sticky webs",                   '*',    &white,         NULL,               BE_NONE,        10,             DF_WEB_SMALL, DF_WEB_LARGE, (MONST_IMMOBILE | MONST_IMMUNE_TO_WEBS),   (BF_TARGET_ENEMIES | BF_NEVER_REFLECTS | BF_NOT_LEARNABLE)},
                   2516:     {"spark",                   "shoots a spark",               "can throw sparks of lightning",            0,      NULL,           &lightningColor,    BE_DAMAGE,      1,              0,          0,          0,                          (BF_PASSES_THRU_CREATURES | BF_TARGET_ENEMIES | BF_ELECTRIC)},
                   2517:     {"dragonfire",              "breathes a gout of white-hot flame", "can breathe gouts of white-hot flame", 0,    NULL,           &dragonFireColor,   BE_DAMAGE,      18,             DF_OBSIDIAN, 0,         MONST_IMMUNE_TO_FIRE,       (BF_TARGET_ENEMIES | BF_FIERY | BF_NOT_LEARNABLE)},
                   2518:     {"arrow",                   "shoots an arrow",              "attacks from a distance",                  G_WEAPON,&gray,         NULL,               BE_ATTACK,      1,              0,          0,          MONST_IMMUNE_TO_WEAPONS,    (BF_TARGET_ENEMIES | BF_NEVER_REFLECTS | BF_NOT_LEARNABLE)},
                   2519:     {"poisoned dart",           "fires a dart",                 "fires strength-sapping darts",             G_WEAPON,&centipedeColor,NULL,              BE_ATTACK,      1,              0,          0,          0,                          (BF_TARGET_ENEMIES | BF_NEVER_REFLECTS | BF_NOT_LEARNABLE)},
                   2520:     {"growing vines",           "releases carnivorous vines into the ground", "conjures carnivorous vines", G_GRASS,&tanColor,      NULL,               BE_NONE,        5,              DF_ANCIENT_SPIRIT_GRASS, DF_ANCIENT_SPIRIT_VINES, (MONST_INANIMATE | MONST_IMMUNE_TO_WEBS),   (BF_TARGET_ENEMIES | BF_NEVER_REFLECTS)},
                   2521:     {"whip",                    "whips",                        "wields a whip",                            '*',    &tanColor,      NULL,               BE_ATTACK,      1,              0,          0,          MONST_IMMUNE_TO_WEAPONS,    (BF_TARGET_ENEMIES | BF_NEVER_REFLECTS | BF_NOT_LEARNABLE | BF_DISPLAY_CHAR_ALONG_LENGTH)},
                   2522: };
                   2523:
                   2524: const feat featTable[FEAT_COUNT] = {
                   2525:     {"Pure Mage",       "Ascend without using fists or a weapon.", true},
                   2526:     {"Pure Warrior",    "Ascend without using a staff, wand or charm.", true},
                   2527:     {"Pacifist",        "Ascend without attacking a creature.", true},
                   2528:     {"Archivist",       "Ascend without drinking a potion or reading a scroll.", true},
                   2529:     {"Companion",       "Journey with an ally through 20 depths.", false},
                   2530:     {"Specialist",      "Enchant an item up to or above +16.", false},
                   2531:     {"Jellymancer",     "Obtain at least 90 jelly allies simultaneously.", false},
                   2532:     {"Indomitable",     "Ascend without taking damage.", true},
                   2533:     {"Mystic",          "Ascend without eating.", true},
                   2534:     {"Dragonslayer",    "Kill a dragon with a melee attack.", false},
                   2535:     {"Paladin",         "Ascend without attacking an unaware or fleeing creature.", true},
                   2536: };
                   2537:
                   2538: const char monsterBehaviorFlagDescriptions[32][COLS] = {
                   2539:     "is invisible",                             // MONST_INVISIBLE
                   2540:     "is an inanimate object",                   // MONST_INANIMATE
                   2541:     "cannot move",                              // MONST_IMMOBILE
                   2542:     "",                                         // MONST_CARRY_ITEM_100
                   2543:     "",                                         // MONST_CARRY_ITEM_25
                   2544:     "",                                         // MONST_ALWAYS_HUNTING
                   2545:     "flees at low health",                      // MONST_FLEES_NEAR_DEATH
                   2546:     "",                                         // MONST_ATTACKABLE_THRU_WALLS
                   2547:     "corrodes weapons when hit",                // MONST_DEFEND_DEGRADE_WEAPON
                   2548:     "is immune to weapon damage",               // MONST_IMMUNE_TO_WEAPONS
                   2549:     "flies",                                    // MONST_FLIES
                   2550:     "moves erratically",                        // MONST_FLITS
                   2551:     "is immune to fire",                        // MONST_IMMUNE_TO_FIRE
                   2552:     "",                                         // MONST_CAST_SPELLS_SLOWLY
                   2553:     "cannot be entangled",                      // MONST_IMMUNE_TO_WEBS
                   2554:     "can reflect magic spells",                 // MONST_REFLECT_4
                   2555:     "never sleeps",                             // MONST_NEVER_SLEEPS
                   2556:     "burns unceasingly",                        // MONST_FIERY
                   2557:     "is invulnerable",                          // MONST_INVULNERABLE
                   2558:     "is at home in water",                      // MONST_IMMUNE_TO_WATER
                   2559:     "cannot venture onto dry land",             // MONST_RESTRICTED_TO_LIQUID
                   2560:     "submerges",                                // MONST_SUBMERGES
                   2561:     "keeps $HISHER distance",                   // MONST_MAINTAINS_DISTANCE
                   2562:     "",                                         // MONST_WILL_NOT_USE_STAIRS
                   2563:     "is animated purely by magic",              // MONST_DIES_IF_NEGATED
                   2564:     "",                                         // MONST_MALE
                   2565:     "",                                         // MONST_FEMALE
                   2566:     "",                                         // MONST_NOT_LISTED_IN_SIDEBAR
                   2567:     "moves only when activated",                // MONST_GETS_TURN_ON_ACTIVATION
                   2568: };
                   2569:
                   2570: const char monsterAbilityFlagDescriptions[32][COLS] = {
                   2571:     "can induce hallucinations",                // MA_HIT_HALLUCINATE
                   2572:     "can steal items",                          // MA_HIT_STEAL_FLEE
                   2573:     "lights enemies on fire when $HESHE hits",  // MA_HIT_BURN
                   2574:     "can possess $HISHER summoned allies",      // MA_ENTER_SUMMONS
                   2575:     "corrodes armor when $HESHE hits",          // MA_HIT_DEGRADE_ARMOR
                   2576:     "can summon allies",                        // MA_CAST_SUMMON
                   2577:     "immobilizes $HISHER prey",                 // MA_SEIZES
                   2578:     "injects poison when $HESHE hits",          // MA_POISONS
                   2579:     "",                                         // MA_DF_ON_DEATH
                   2580:     "divides in two when struck",               // MA_CLONE_SELF_ON_DEFEND
                   2581:     "dies when $HESHE attacks",                 // MA_KAMIKAZE
                   2582:     "recovers health when $HESHE inflicts damage",// MA_TRANSFERENCE
                   2583:     "saps strength when $HESHE inflicts damage",// MA_CAUSE_WEAKNESS
                   2584:
                   2585:     "attacks up to two opponents in a line",    // MA_ATTACKS_PENETRATE
                   2586:     "attacks all adjacent opponents at once",   // MA_ATTACKS_ALL_ADJACENT
                   2587:     "attacks with a whip",                      // MA_ATTACKS_EXTEND
                   2588:     "pushes opponents backward when $HESHE hits", // MA_ATTACKS_STAGGER
                   2589:     "avoids attacking in corridors in a group", // MA_AVOID_CORRIDORS
                   2590: };
                   2591:
                   2592: const char monsterBookkeepingFlagDescriptions[32][COLS] = {
                   2593:     "",                                         // MB_WAS_VISIBLE
                   2594:     "is telepathically bonded with you",        // MB_TELEPATHICALLY_REVEALED
                   2595:     "",                                         // MB_PREPLACED
                   2596:     "",                                         // MB_APPROACHING_UPSTAIRS
                   2597:     "",                                         // MB_APPROACHING_DOWNSTAIRS
                   2598:     "",                                         // MB_APPROACHING_PIT
                   2599:     "",                                         // MB_LEADER
                   2600:     "",                                         // MB_FOLLOWER
                   2601:     "",                                         // MB_CAPTIVE
                   2602:     "has been immobilized",                     // MB_SEIZED
                   2603:     "is currently holding $HISHER prey immobile",// MB_SEIZING
                   2604:     "is submerged",                             // MB_SUBMERGED
                   2605:     "",                                         // MB_JUST_SUMMONED
                   2606:     "",                                         // MB_WILL_FLASH
                   2607:     "is anchored to reality by $HISHER summoner",// MB_BOUND_TO_LEADER
                   2608:     "is marked for demonic sacrifice",          // MB_MARKED_FOR_SACRIFICE
                   2609: };

CVSweb