Source:NetHack 3.6.0/src/objects.c

From NetHackWiki
(Redirected from Objects.c)
Jump to: navigation, search

Below is the full text to objects.c from the source code of NetHack 3.6.0. To link to a particular line, write [[Source:NetHack 3.6.0/src/objects.c#line123]], for example.

The NetHack General Public License applies to screenshots, source code and other content from NetHack.

This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.

Top of file

  1.  /* NetHack 3.6	objects.c	$NHDT-Date: 1447313395 2015/11/12 07:29:55 $  $NHDT-Branch: master $:$NHDT-Revision: 1.49 $ */
  2.  /* Copyright (c) Mike Threepoint, 1989.                           */
  3.  /* NetHack may be freely redistributed.  See license for details. */
  4.  
  5.  /*
  6.   * The data in this file is processed twice, to construct two arrays.
  7.   * On the first pass, only object name and object description matter.
  8.   * On the second pass, all object-class fields except those two matter.
  9.   * 2nd pass is a recursive inclusion of this file, not a 2nd compilation.
  10.   * The name/description array is also used by makedefs and lev_comp.
  11.   *
  12.   * #ifndef OBJECTS_PASS_2_
  13.   * # define OBJECT(name,desc,foo,bar,glorkum) name,desc
  14.   * struct objdescr obj_descr[] =
  15.   * #else
  16.   * # define OBJECT(name,desc,foo,bar,glorkum) foo,bar,glorkum
  17.   * struct objclass objects[] =
  18.   * #endif
  19.   * {
  20.   *   { OBJECT("strange object",NULL, 1,2,3) },
  21.   *   { OBJECT("arrow","pointy stick", 4,5,6) },
  22.   *   ...
  23.   *   { OBJECT(NULL,NULL, 0,0,0) }
  24.   * };
  25.   * #define OBJECTS_PASS_2_
  26.   * #include "objects.c"
  27.   */
  28.  
  29.  /* *INDENT-OFF* */
  30.  /* clang-format off */
  31.  
  32.  #ifndef OBJECTS_PASS_2_
  33.  /* first pass */
  34.  struct monst { struct monst *dummy; };  /* lint: struct obj's union */
  35.  #include "config.h"
  36.  #include "obj.h"
  37.  #include "objclass.h"
  38.  #include "prop.h"
  39.  #include "skills.h"
  40.  
  41.  #else /* !OBJECTS_PASS_2_ */
  42.  /* second pass */
  43.  #include "color.h"
  44.  #define COLOR_FIELD(X) X,
  45.  #endif /* !OBJECTS_PASS_2_ */
  46.  
  47.  /* objects have symbols: ) [ = " ( % ! ? + / $ * ` 0 _ . */
  48.  
  49.  /*
  50.   *      Note:  OBJ() and BITS() macros are used to avoid exceeding argument
  51.   *      limits imposed by some compilers.  The ctnr field of BITS currently
  52.   *      does not map into struct objclass, and is ignored in the expansion.
  53.   *      The 0 in the expansion corresponds to oc_pre_discovered, which is
  54.   *      set at run-time during role-specific character initialization.
  55.   */
  56.  

Object macros

  1.  #ifndef OBJECTS_PASS_2_
  2.  /* first pass -- object descriptive text */
  3.  #define OBJ(name,desc)  name, desc
  4.  #define OBJECT(obj,bits,prp,sym,prob,dly,wt, \
  5.                 cost,sdam,ldam,oc1,oc2,nut,color)  { obj }
  6.  #define None (char *) 0 /* less visual distraction for 'no description' */
  7.  
  8.  NEARDATA struct objdescr obj_descr[] =
  9.  #else
  10.  /* second pass -- object definitions */
  11.  #define BITS(nmkn,mrg,uskn,ctnr,mgc,chrg,uniq,nwsh,big,tuf,dir,sub,mtrl) \
  12.    nmkn,mrg,uskn,0,mgc,chrg,uniq,nwsh,big,tuf,dir,mtrl,sub /*SCO cpp fodder*/
  13.  #define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \
  14.    { 0, 0, (char *) 0, bits, prp, sym, dly, COLOR_FIELD(color) prob, wt, \
  15.      cost, sdam, ldam, oc1, oc2, nut }
  16.  #ifndef lint
  17.  #define HARDGEM(n) (n >= 8)
  18.  #else
  19.  #define HARDGEM(n) (0)
  20.  #endif
  21.  
  22.  NEARDATA struct objclass objects[] =
  23.  #endif
  24.  {
  25.  /* dummy object[0] -- description [2nd arg] *must* be NULL */
  26.  OBJECT(OBJ("strange object", None),
  27.         BITS(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, P_NONE, 0),
  28.         0, ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
  29.  

Weapons

Weapon macros

  1.  /* weapons ... */
  2.  #define WEAPON(name,desc,kn,mg,bi,prob,wt,                \
  3.                 cost,sdam,ldam,hitbon,typ,sub,metal,color) \
  4.      OBJECT(OBJ(name,desc),                                          \
  5.             BITS(kn, mg, 1, 0, 0, 1, 0, 0, bi, 0, typ, sub, metal),  \
  6.             0, WEAPON_CLASS, prob, 0, wt,                            \
  7.             cost, sdam, ldam, hitbon, 0, wt, color)
  8.  #define PROJECTILE(name,desc,kn,prob,wt,                  \
  9.                     cost,sdam,ldam,hitbon,metal,sub,color) \
  10.      OBJECT(OBJ(name,desc),                                          \
  11.             BITS(kn, 1, 1, 0, 0, 1, 0, 0, 0, 0, PIERCE, sub, metal), \
  12.             0, WEAPON_CLASS, prob, 0, wt,                            \
  13.             cost, sdam, ldam, hitbon, 0, wt, color)
  14.  #define BOW(name,desc,kn,prob,wt,cost,hitbon,metal,sub,color) \
  15.      OBJECT(OBJ(name,desc),                                          \
  16.             BITS(kn, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, sub, metal),      \
  17.             0, WEAPON_CLASS, prob, 0, wt,                            \
  18.             cost, 2, 2, hitbon, 0, wt, color)
  19.  
  20.  /* Note: for weapons that don't do an even die of damage (ex. 2-7 or 3-18)
  21.     the extra damage is added on in weapon.c, not here! */
  22.  
  23.  #define P PIERCE
  24.  #define S SLASH
  25.  #define B WHACK
  26.  

Missiles

  1.  /* missiles; materiel reflects the arrowhead, not the shaft */
  2.  PROJECTILE("arrow", None,
  3.             1, 55, 1, 2, 6, 6, 0,        IRON, -P_BOW, HI_METAL),
  4.  PROJECTILE("elven arrow", "runed arrow",
  5.             0, 20, 1, 2, 7, 6, 0,        WOOD, -P_BOW, HI_WOOD),
  6.  PROJECTILE("orcish arrow", "crude arrow",
  7.             0, 20, 1, 2, 5, 6, 0,        IRON, -P_BOW, CLR_BLACK),
  8.  PROJECTILE("silver arrow", None,
  9.             1, 12, 1, 5, 6, 6, 0,        SILVER, -P_BOW, HI_SILVER),
  10.  PROJECTILE("ya", "bamboo arrow",
  11.             0, 15, 1, 4, 7, 7, 1,        METAL, -P_BOW, HI_METAL),
  12.  PROJECTILE("crossbow bolt", None,
  13.             1, 55, 1, 2, 4, 6, 0,        IRON, -P_CROSSBOW, HI_METAL),
  14.  
  15.  /* missiles that don't use a launcher */
  16.  WEAPON("dart", None,
  17.         1, 1, 0, 60,   1,   2,  3,  2, 0, P,   -P_DART, IRON, HI_METAL),
  18.  WEAPON("shuriken", "throwing star",
  19.         0, 1, 0, 35,   1,   5,  8,  6, 2, P,   -P_SHURIKEN, IRON, HI_METAL),
  20.  WEAPON("boomerang", None,
  21.         1, 1, 0, 15,   5,  20,  9,  9, 0, 0,   -P_BOOMERANG, WOOD, HI_WOOD),
  22.  

Spears

  1.  /* spears [note: javelin used to have a separate skill from spears,
  2.     because the latter are primarily stabbing weapons rather than
  3.     throwing ones; but for playability, they've been merged together
  4.     under spear skill and spears can now be thrown like javelins] */
  5.  WEAPON("spear", None,
  6.         1, 1, 0, 50,  30,   3,  6,  8, 0, P,   P_SPEAR, IRON, HI_METAL),
  7.  WEAPON("elven spear", "runed spear",
  8.         0, 1, 0, 10,  30,   3,  7,  8, 0, P,   P_SPEAR, WOOD, HI_WOOD),
  9.  WEAPON("orcish spear", "crude spear",
  10.         0, 1, 0, 13,  30,   3,  5,  8, 0, P,   P_SPEAR, IRON, CLR_BLACK),
  11.  WEAPON("dwarvish spear", "stout spear",
  12.         0, 1, 0, 12,  35,   3,  8,  8, 0, P,   P_SPEAR, IRON, HI_METAL),
  13.  WEAPON("silver spear", None,
  14.         1, 1, 0,  2,  36,  40,  6,  8, 0, P,   P_SPEAR, SILVER, HI_SILVER),
  15.  WEAPON("javelin", "throwing spear",
  16.         0, 1, 0, 10,  20,   3,  6,  6, 0, P,   P_SPEAR, IRON, HI_METAL),
  17.  
  18.  /* spearish; doesn't stack, not intended to be thrown */
  19.  WEAPON("trident", None,
  20.         1, 0, 0,  8,  25,   5,  6,  4, 0, P,   P_TRIDENT, IRON, HI_METAL),
  21.          /* +1 small, +2d4 large */
  22.  

Blades

  1.  /* blades; all stack */
  2.  WEAPON("dagger", None,
  3.         1, 1, 0, 30,  10,   4,  4,  3, 2, P,   P_DAGGER, IRON, HI_METAL),
  4.  WEAPON("elven dagger", "runed dagger",
  5.         0, 1, 0, 10,  10,   4,  5,  3, 2, P,   P_DAGGER, WOOD, HI_WOOD),
  6.  WEAPON("orcish dagger", "crude dagger",
  7.         0, 1, 0, 12,  10,   4,  3,  3, 2, P,   P_DAGGER, IRON, CLR_BLACK),
  8.  WEAPON("silver dagger", None,
  9.         1, 1, 0,  3,  12,  40,  4,  3, 2, P,   P_DAGGER, SILVER, HI_SILVER),
  10.  WEAPON("athame", None,
  11.         1, 1, 0,  0,  10,   4,  4,  3, 2, S,   P_DAGGER, IRON, HI_METAL),
  12.  WEAPON("scalpel", None,
  13.         1, 1, 0,  0,   5,   6,  3,  3, 2, S,   P_KNIFE, METAL, HI_METAL),
  14.  WEAPON("knife", None,
  15.         1, 1, 0, 20,   5,   4,  3,  2, 0, P|S, P_KNIFE, IRON, HI_METAL),
  16.  WEAPON("stiletto", None,
  17.         1, 1, 0,  5,   5,   4,  3,  2, 0, P|S, P_KNIFE, IRON, HI_METAL),
  18.  /* 3.6: worm teeth and crysknives now stack;
  19.     when a stack of teeth is enchanted at once, they fuse into one crysknife;
  20.     when a stack of crysknives drops, the whole stack reverts to teeth */
  21.  WEAPON("worm tooth", None,
  22.         1, 1, 0,  0,  20,   2,  2,  2, 0, 0,   P_KNIFE, 0, CLR_WHITE),
  23.  WEAPON("crysknife", None,
  24.         1, 1, 0,  0,  20, 100, 10, 10, 3, P,   P_KNIFE, MINERAL, CLR_WHITE),
  25.  

Axes

  1.  /* axes */
  2.  WEAPON("axe", None,
  3.         1, 0, 0, 40,  60,   8,  6,  4, 0, S,   P_AXE, IRON, HI_METAL),
  4.  WEAPON("battle-axe", "double-headed axe",       /* "double-bitted"? */
  5.         0, 0, 1, 10, 120,  40,  8,  6, 0, S,   P_AXE, IRON, HI_METAL),
  6.  

Swords

  1.  /* swords */
  2.  WEAPON("short sword", None,
  3.         1, 0, 0,  8,  30,  10,  6,  8, 0, P,   P_SHORT_SWORD, IRON, HI_METAL),
  4.  WEAPON("elven short sword", "runed short sword",
  5.         0, 0, 0,  2,  30,  10,  8,  8, 0, P,   P_SHORT_SWORD, WOOD, HI_WOOD),
  6.  WEAPON("orcish short sword", "crude short sword",
  7.         0, 0, 0,  3,  30,  10,  5,  8, 0, P,   P_SHORT_SWORD, IRON, CLR_BLACK),
  8.  WEAPON("dwarvish short sword", "broad short sword",
  9.         0, 0, 0,  2,  30,  10,  7,  8, 0, P,   P_SHORT_SWORD, IRON, HI_METAL),
  10.  WEAPON("scimitar", "curved sword",
  11.         0, 0, 0, 15,  40,  15,  8,  8, 0, S,   P_SCIMITAR, IRON, HI_METAL),
  12.  WEAPON("silver saber", None,
  13.         1, 0, 0,  6,  40,  75,  8,  8, 0, S,   P_SABER, SILVER, HI_SILVER),
  14.  WEAPON("broadsword", None,
  15.         1, 0, 0,  8,  70,  10,  4,  6, 0, S,   P_BROAD_SWORD, IRON, HI_METAL),
  16.          /* +d4 small, +1 large */
  17.  WEAPON("elven broadsword", "runed broadsword",
  18.         0, 0, 0,  4,  70,  10,  6,  6, 0, S,   P_BROAD_SWORD, WOOD, HI_WOOD),
  19.          /* +d4 small, +1 large */
  20.  WEAPON("long sword", None,
  21.         1, 0, 0, 50,  40,  15,  8, 12, 0, S,   P_LONG_SWORD, IRON, HI_METAL),
  22.  WEAPON("two-handed sword", None,
  23.         1, 0, 1, 22, 150,  50, 12,  6, 0, S,   P_TWO_HANDED_SWORD,
  24.                                                              IRON, HI_METAL),
  25.          /* +2d6 large */
  26.  WEAPON("katana", "samurai sword",
  27.         0, 0, 0,  4,  40,  80, 10, 12, 1, S,   P_LONG_SWORD, IRON, HI_METAL),
  28.  /* special swords set up for artifacts */
  29.  WEAPON("tsurugi", "long samurai sword",
  30.         0, 0, 1,  0,  60, 500, 16,  8, 2, S,   P_TWO_HANDED_SWORD,
  31.                                                              METAL, HI_METAL),
  32.          /* +2d6 large */
  33.  WEAPON("runesword", "runed broadsword",
  34.         0, 0, 0,  0,  40, 300,  4,  6, 0, S,   P_BROAD_SWORD, IRON, CLR_BLACK),
  35.          /* +d4 small, +1 large; Stormbringer: +5d2 +d8 from level drain */
  36.  

Polearms

  1.  /* polearms */
  2.  /* spear-type */
  3.  WEAPON("partisan", "vulgar polearm",
  4.         0, 0, 1,  5,  80,  10,  6,  6, 0, P,   P_POLEARMS, IRON, HI_METAL),
  5.          /* +1 large */
  6.  WEAPON("ranseur", "hilted polearm",
  7.         0, 0, 1,  5,  50,   6,  4,  4, 0, P,   P_POLEARMS, IRON, HI_METAL),
  8.          /* +d4 both */
  9.  WEAPON("spetum", "forked polearm",
  10.         0, 0, 1,  5,  50,   5,  6,  6, 0, P,   P_POLEARMS, IRON, HI_METAL),
  11.          /* +1 small, +d6 large */
  12.  WEAPON("glaive", "single-edged polearm",
  13.         0, 0, 1,  8,  75,   6,  6, 10, 0, S,   P_POLEARMS, IRON, HI_METAL),
  14.  WEAPON("lance", None,
  15.         1, 0, 0,  4, 180,  10,  6,  8, 0, P,   P_LANCE, IRON, HI_METAL),
  16.          /* +2d10 when jousting with lance as primary weapon */
  17.  /* axe-type */
  18.  WEAPON("halberd", "angled poleaxe",
  19.         0, 0, 1,  8, 150,  10, 10,  6, 0, P|S, P_POLEARMS, IRON, HI_METAL),
  20.          /* +1d6 large */
  21.  WEAPON("bardiche", "long poleaxe",
  22.         0, 0, 1,  4, 120,   7,  4,  4, 0, S,   P_POLEARMS, IRON, HI_METAL),
  23.          /* +1d4 small, +2d4 large */
  24.  WEAPON("voulge", "pole cleaver",
  25.         0, 0, 1,  4, 125,   5,  4,  4, 0, S,   P_POLEARMS, IRON, HI_METAL),
  26.          /* +d4 both */
  27.  WEAPON("dwarvish mattock", "broad pick",
  28.         0, 0, 1, 13, 120,  50, 12,  8, -1, B,  P_PICK_AXE, IRON, HI_METAL),
  29.  /* curved/hooked */
  30.  WEAPON("fauchard", "pole sickle",
  31.         0, 0, 1,  6,  60,   5,  6,  8, 0, P|S, P_POLEARMS, IRON, HI_METAL),
  32.  WEAPON("guisarme", "pruning hook",
  33.         0, 0, 1,  6,  80,   5,  4,  8, 0, S,   P_POLEARMS, IRON, HI_METAL),
  34.          /* +1d4 small */
  35.  WEAPON("bill-guisarme", "hooked polearm",
  36.         0, 0, 1,  4, 120,   7,  4, 10, 0, P|S, P_POLEARMS, IRON, HI_METAL),
  37.          /* +1d4 small */
  38.  /* other */
  39.  WEAPON("lucern hammer", "pronged polearm",
  40.         0, 0, 1,  5, 150,   7,  4,  6, 0, B|P, P_POLEARMS, IRON, HI_METAL),
  41.          /* +1d4 small */
  42.  WEAPON("bec de corbin", "beaked polearm",
  43.         0, 0, 1,  4, 100,   8,  8,  6, 0, B|P, P_POLEARMS, IRON, HI_METAL),
  44.  

Bludgeons

  1.  /* bludgeons */
  2.  WEAPON("mace", None,
  3.         1, 0, 0, 40,  30,   5,  6,  6, 0, B,   P_MACE, IRON, HI_METAL),
  4.          /* +1 small */
  5.  WEAPON("morning star", None,
  6.         1, 0, 0, 12, 120,  10,  4,  6, 0, B,   P_MORNING_STAR, IRON, HI_METAL),
  7.          /* +d4 small, +1 large */
  8.  WEAPON("war hammer", None,
  9.         1, 0, 0, 15,  50,   5,  4,  4, 0, B,   P_HAMMER, IRON, HI_METAL),
  10.          /* +1 small */
  11.  WEAPON("club", None,
  12.         1, 0, 0, 12,  30,   3,  6,  3, 0, B,   P_CLUB, WOOD, HI_WOOD),
  13.  WEAPON("rubber hose", None,
  14.         1, 0, 0,  0,  20,   3,  4,  3, 0, B,   P_WHIP, PLASTIC, CLR_BROWN),
  15.  WEAPON("quarterstaff", "staff",
  16.         0, 0, 1, 11,  40,   5,  6,  6, 0, B,   P_QUARTERSTAFF, WOOD, HI_WOOD),
  17.  /* two-piece */
  18.  WEAPON("aklys", "thonged club",
  19.         0, 0, 0,  8,  15,   4,  6,  3, 0, B,   P_CLUB, IRON, HI_METAL),
  20.  WEAPON("flail", None,
  21.         1, 0, 0, 40,  15,   4,  6,  4, 0, B,   P_FLAIL, IRON, HI_METAL),
  22.          /* +1 small, +1d4 large */
  23.  

Miscellaneous

  1.  /* misc */
  2.  WEAPON("bullwhip", None,
  3.         1, 0, 0,  2,  20,   4,  2,  1, 0, 0,   P_WHIP, LEATHER, CLR_BROWN),
  4.  

Bows

  1.  /* bows */
  2.  BOW("bow", None,               1, 24, 30, 60, 0, WOOD, P_BOW, HI_WOOD),
  3.  BOW("elven bow", "runed bow",  0, 12, 30, 60, 0, WOOD, P_BOW, HI_WOOD),
  4.  BOW("orcish bow", "crude bow", 0, 12, 30, 60, 0, WOOD, P_BOW, CLR_BLACK),
  5.  BOW("yumi", "long bow",        0,  0, 30, 60, 0, WOOD, P_BOW, HI_WOOD),
  6.  BOW("sling", None,             1, 40,  3, 20, 0, LEATHER, P_SLING, HI_LEATHER),
  7.  BOW("crossbow", None,          1, 45, 50, 40, 0, WOOD, P_CROSSBOW, HI_WOOD),
  8.  
  9.  #undef P
  10.  #undef S
  11.  #undef B
  12.  
  13.  #undef WEAPON
  14.  #undef PROJECTILE
  15.  #undef BOW
  16.  

Armor

Armor macros

  1.  /* armor ... */
  2.          /* IRON denotes ferrous metals, including steel.
  3.           * Only IRON weapons and armor can rust.
  4.           * Only COPPER (including brass) corrodes.
  5.           * Some creatures are vulnerable to SILVER.
  6.           */
  7.  #define ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,  \
  8.                cost,ac,can,sub,metal,c)                   \
  9.      OBJECT(OBJ(name, desc),                                         \
  10.             BITS(kn, 0, 1, 0, mgc, 1, 0, 0, blk, 0, 0, sub, metal),  \
  11.             power, ARMOR_CLASS, prob, delay, wt,                     \
  12.             cost, 0, 0, 10 - ac, can, wt, c)
  13.  #define HELM(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c)  \
  14.      ARMOR(name, desc, kn, mgc, 0, power, prob, delay, wt,  \
  15.            cost, ac, can, ARM_HELM, metal, c)
  16.  #define CLOAK(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c)  \
  17.      ARMOR(name, desc, kn, mgc, 0, power, prob, delay, wt,  \
  18.            cost, ac, can, ARM_CLOAK, metal, c)
  19.  #define SHIELD(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,metal,c) \
  20.      ARMOR(name, desc, kn, mgc, blk, power, prob, delay, wt, \
  21.            cost, ac, can, ARM_SHIELD, metal, c)
  22.  #define GLOVES(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c)  \
  23.      ARMOR(name, desc, kn, mgc, 0, power, prob, delay, wt,  \
  24.            cost, ac, can, ARM_GLOVES, metal, c)
  25.  #define BOOTS(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c)  \
  26.      ARMOR(name, desc, kn, mgc, 0, power, prob, delay, wt,  \
  27.            cost, ac, can, ARM_BOOTS, metal, c)
  28.  

Helmets

  1.  /* helmets */
  2.  HELM("elven leather helm", "leather hat",
  3.       0, 0,           0,  6, 1,  3,  8,  9, 0, LEATHER, HI_LEATHER),
  4.  HELM("orcish helm", "iron skull cap",
  5.       0, 0,           0,  6, 1, 30, 10,  9, 0, IRON, CLR_BLACK),
  6.  HELM("dwarvish iron helm", "hard hat",
  7.       0, 0,           0,  6, 1, 40, 20,  8, 0, IRON, HI_METAL),
  8.  HELM("fedora", None,
  9.       1, 0,           0,  0, 0,  3,  1, 10, 0, CLOTH, CLR_BROWN),
  10.  HELM("cornuthaum", "conical hat",
  11.       0, 1, CLAIRVOYANT,  3, 1,  4, 80, 10, 1, CLOTH, CLR_BLUE),
  12.          /* name coined by devteam; confers clairvoyance for wizards,
  13.             blocks clairvoyance if worn by role other than wizard */
  14.  HELM("dunce cap", "conical hat",
  15.       0, 1,           0,  3, 1,  4,  1, 10, 0, CLOTH, CLR_BLUE),
  16.  HELM("dented pot", None,
  17.       1, 0,           0,  2, 0, 10,  8,  9, 0, IRON, CLR_BLACK),
  18.  /* with shuffled appearances... */
  19.  HELM("helmet", "plumed helmet",
  20.       0, 0,           0, 10, 1, 30, 10,  9, 0, IRON, HI_METAL),
  21.  HELM("helm of brilliance", "etched helmet",
  22.       0, 1,           0,  6, 1, 50, 50,  9, 0, IRON, CLR_GREEN),
  23.  HELM("helm of opposite alignment", "crested helmet",
  24.       0, 1,           0,  6, 1, 50, 50,  9, 0, IRON, HI_METAL),
  25.  HELM("helm of telepathy", "visored helmet",
  26.       0, 1,     TELEPAT,  2, 1, 50, 50,  9, 0, IRON, HI_METAL),
  27.  

Suits

  1.  /* suits of armor */
  2.  /*
  3.   * There is code in polyself.c that assumes (1) and (2).
  4.   * There is code in obj.h, objnam.c, mon.c, read.c that assumes (2).
  5.   *      (1) The dragon scale mails and the dragon scales are together.
  6.   *      (2) That the order of the dragon scale mail and dragon scales
  7.   *          is the the same as order of dragons defined in monst.c.
  8.   */
  9.  #define DRGN_ARMR(name,mgc,power,cost,ac,color)  \
  10.      ARMOR(name, None, 1, mgc, 1, power, 0, 5, 40,  \
  11.            cost, ac, 0, ARM_SUIT, DRAGON_HIDE, color)
  12.  /* 3.4.1: dragon scale mail reclassified as "magic" since magic is
  13.     needed to create them */
  14.  DRGN_ARMR("gray dragon scale mail",    1, ANTIMAGIC,  1200, 1, CLR_GRAY),
  15.  DRGN_ARMR("silver dragon scale mail",  1, REFLECTING, 1200, 1, DRAGON_SILVER),
  16.  #if 0 /* DEFERRED */
  17.  DRGN_ARMR("shimmering dragon scale mail", 1, DISPLACED, 1200, 1, CLR_CYAN),
  18.  #endif
  19.  DRGN_ARMR("red dragon scale mail",     1, FIRE_RES,    900, 1, CLR_RED),
  20.  DRGN_ARMR("white dragon scale mail",   1, COLD_RES,    900, 1, CLR_WHITE),
  21.  DRGN_ARMR("orange dragon scale mail",  1, SLEEP_RES,   900, 1, CLR_ORANGE),
  22.  DRGN_ARMR("black dragon scale mail",   1, DISINT_RES, 1200, 1, CLR_BLACK),
  23.  DRGN_ARMR("blue dragon scale mail",    1, SHOCK_RES,   900, 1, CLR_BLUE),
  24.  DRGN_ARMR("green dragon scale mail",   1, POISON_RES,  900, 1, CLR_GREEN),
  25.  DRGN_ARMR("yellow dragon scale mail",  1, ACID_RES,    900, 1, CLR_YELLOW),
  26.  /* For now, only dragons leave these. */
  27.  /* 3.4.1: dragon scales left classified as "non-magic"; they confer
  28.     magical properties but are produced "naturally" */
  29.  DRGN_ARMR("gray dragon scales",        0, ANTIMAGIC,   700, 7, CLR_GRAY),
  30.  DRGN_ARMR("silver dragon scales",      0, REFLECTING,  700, 7, DRAGON_SILVER),
  31.  #if 0 /* DEFERRED */
  32.  DRGN_ARMR("shimmering dragon scales",  0, DISPLACED,   700, 7, CLR_CYAN),
  33.  #endif
  34.  DRGN_ARMR("red dragon scales",         0, FIRE_RES,    500, 7, CLR_RED),
  35.  DRGN_ARMR("white dragon scales",       0, COLD_RES,    500, 7, CLR_WHITE),
  36.  DRGN_ARMR("orange dragon scales",      0, SLEEP_RES,   500, 7, CLR_ORANGE),
  37.  DRGN_ARMR("black dragon scales",       0, DISINT_RES,  700, 7, CLR_BLACK),
  38.  DRGN_ARMR("blue dragon scales",        0, SHOCK_RES,   500, 7, CLR_BLUE),
  39.  DRGN_ARMR("green dragon scales",       0, POISON_RES,  500, 7, CLR_GREEN),
  40.  DRGN_ARMR("yellow dragon scales",      0, ACID_RES,    500, 7, CLR_YELLOW),
  41.  #undef DRGN_ARMR
  42.  /* other suits */
  43.  ARMOR("plate mail", None,
  44.        1, 0, 1,  0, 44, 5, 450, 600,  3, 2,  ARM_SUIT, IRON, HI_METAL),
  45.  ARMOR("crystal plate mail", None,
  46.        1, 0, 1,  0, 10, 5, 450, 820,  3, 2,  ARM_SUIT, GLASS, CLR_WHITE),
  47.  ARMOR("bronze plate mail", None,
  48.        1, 0, 1,  0, 25, 5, 450, 400,  4, 1,  ARM_SUIT, COPPER, HI_COPPER),
  49.  ARMOR("splint mail", None,
  50.        1, 0, 1,  0, 62, 5, 400,  80,  4, 1,  ARM_SUIT, IRON, HI_METAL),
  51.  ARMOR("banded mail", None,
  52.        1, 0, 1,  0, 72, 5, 350,  90,  4, 1,  ARM_SUIT, IRON, HI_METAL),
  53.  ARMOR("dwarvish mithril-coat", None,
  54.        1, 0, 0,  0, 10, 1, 150, 240,  4, 2,  ARM_SUIT, MITHRIL, HI_SILVER),
  55.  ARMOR("elven mithril-coat", None,
  56.        1, 0, 0,  0, 15, 1, 150, 240,  5, 2,  ARM_SUIT, MITHRIL, HI_SILVER),
  57.  ARMOR("chain mail", None,
  58.        1, 0, 0,  0, 72, 5, 300,  75,  5, 1,  ARM_SUIT, IRON, HI_METAL),
  59.  ARMOR("orcish chain mail", "crude chain mail",
  60.        0, 0, 0,  0, 20, 5, 300,  75,  6, 1,  ARM_SUIT, IRON, CLR_BLACK),
  61.  ARMOR("scale mail", None,
  62.        1, 0, 0,  0, 72, 5, 250,  45,  6, 1,  ARM_SUIT, IRON, HI_METAL),
  63.  ARMOR("studded leather armor", None,
  64.        1, 0, 0,  0, 72, 3, 200,  15,  7, 1,  ARM_SUIT, LEATHER, HI_LEATHER),
  65.  ARMOR("ring mail", None,
  66.        1, 0, 0,  0, 72, 5, 250, 100,  7, 1,  ARM_SUIT, IRON, HI_METAL),
  67.  ARMOR("orcish ring mail", "crude ring mail",
  68.        0, 0, 0,  0, 20, 5, 250,  80,  8, 1,  ARM_SUIT, IRON, CLR_BLACK),
  69.  ARMOR("leather armor", None,
  70.        1, 0, 0,  0, 82, 3, 150,   5,  8, 1,  ARM_SUIT, LEATHER, HI_LEATHER),
  71.  ARMOR("leather jacket", None,
  72.        1, 0, 0,  0, 12, 0,  30,  10,  9, 0,  ARM_SUIT, LEATHER, CLR_BLACK),
  73.  

Shirts

  1.  /* shirts */
  2.  ARMOR("Hawaiian shirt", None,
  3.        1, 0, 0,  0,  8, 0,   5,   3, 10, 0,  ARM_SHIRT, CLOTH, CLR_MAGENTA),
  4.  ARMOR("T-shirt", None,
  5.        1, 0, 0,  0,  2, 0,   5,   2, 10, 0,  ARM_SHIRT, CLOTH, CLR_WHITE),
  6.  

Cloaks

  1.  /* cloaks */
  2.  CLOAK("mummy wrapping", None,
  3.        1, 0,          0,  0, 0,  3,  2, 10, 1,  CLOTH, CLR_GRAY),
  4.          /* worn mummy wrapping blocks invisibility */
  5.  CLOAK("elven cloak", "faded pall",
  6.        0, 1,    STEALTH,  8, 0, 10, 60,  9, 1,  CLOTH, CLR_BLACK),
  7.  CLOAK("orcish cloak", "coarse mantelet",
  8.        0, 0,          0,  8, 0, 10, 40, 10, 1,  CLOTH, CLR_BLACK),
  9.  CLOAK("dwarvish cloak", "hooded cloak",
  10.        0, 0,          0,  8, 0, 10, 50, 10, 1,  CLOTH, HI_CLOTH),
  11.  CLOAK("oilskin cloak", "slippery cloak",
  12.        0, 0,          0,  8, 0, 10, 50,  9, 2,  CLOTH, HI_CLOTH),
  13.  CLOAK("robe", None,
  14.        1, 1,          0,  3, 0, 15, 50,  8, 2,  CLOTH, CLR_RED),
  15.          /* robe was adopted from slash'em, where it's worn as a suit
  16.             rather than as a cloak and there are several variations */
  17.  CLOAK("alchemy smock", "apron",
  18.        0, 1, POISON_RES,  9, 0, 10, 50,  9, 1,  CLOTH, CLR_WHITE),
  19.  CLOAK("leather cloak", None,
  20.        1, 0,          0,  8, 0, 15, 40,  9, 1,  LEATHER, CLR_BROWN),
  21.  /* with shuffled appearances... */
  22.  CLOAK("cloak of protection", "tattered cape",
  23.        0, 1, PROTECTION,  9, 0, 10, 50,  7, 3,  CLOTH, HI_CLOTH),
  24.          /* cloak of protection is now the only item conferring MC 3 */
  25.  CLOAK("cloak of invisibility", "opera cloak",
  26.        0, 1,      INVIS, 10, 0, 10, 60,  9, 1,  CLOTH, CLR_BRIGHT_MAGENTA),
  27.  CLOAK("cloak of magic resistance", "ornamental cope",
  28.        0, 1,  ANTIMAGIC,  2, 0, 10, 60,  9, 1,  CLOTH, CLR_WHITE),
  29.          /*  'cope' is not a spelling mistake... leave it be */
  30.  CLOAK("cloak of displacement", "piece of cloth",
  31.        0, 1,  DISPLACED, 10, 0, 10, 50,  9, 1,  CLOTH, HI_CLOTH),
  32.  

Shields

  1.  /* shields */
  2.  SHIELD("small shield", None,
  3.         1, 0, 0,          0, 6, 0,  30,  3, 9, 0,  WOOD, HI_WOOD),
  4.  SHIELD("elven shield", "blue and green shield",
  5.         0, 0, 0,          0, 2, 0,  40,  7, 8, 0,  WOOD, CLR_GREEN),
  6.  SHIELD("Uruk-hai shield", "white-handed shield",
  7.         0, 0, 0,          0, 2, 0,  50,  7, 9, 0,  IRON, HI_METAL),
  8.  SHIELD("orcish shield", "red-eyed shield",
  9.         0, 0, 0,          0, 2, 0,  50,  7, 9, 0,  IRON, CLR_RED),
  10.  SHIELD("large shield", None,
  11.         1, 0, 1,          0, 7, 0, 100, 10, 8, 0,  IRON, HI_METAL),
  12.  SHIELD("dwarvish roundshield", "large round shield",
  13.         0, 0, 0,          0, 4, 0, 100, 10, 8, 0,  IRON, HI_METAL),
  14.  SHIELD("shield of reflection", "polished silver shield",
  15.         0, 1, 0, REFLECTING, 3, 0,  50, 50, 8, 0,  SILVER, HI_SILVER),
  16.  

Gloves

  1.  /* gloves */
  2.  /* These have their color but not material shuffled, so the IRON must
  3.   * stay CLR_BROWN (== HI_LEATHER) even though it's normally either
  4.   * HI_METAL or CLR_BLACK.  All have shuffled descriptions.
  5.   */
  6.  GLOVES("leather gloves", "old gloves",
  7.         0, 0,        0, 16, 1, 10,  8, 9, 0,  LEATHER, HI_LEATHER),
  8.  GLOVES("gauntlets of fumbling", "padded gloves",
  9.         0, 1, FUMBLING,  8, 1, 10, 50, 9, 0,  LEATHER, HI_LEATHER),
  10.  GLOVES("gauntlets of power", "riding gloves",
  11.         0, 1,        0,  8, 1, 30, 50, 9, 0,  IRON, CLR_BROWN),
  12.  GLOVES("gauntlets of dexterity", "fencing gloves",
  13.         0, 1,        0,  8, 1, 10, 50, 9, 0,  LEATHER, HI_LEATHER),
  14.  
  15.  /* boots */
  16.  BOOTS("low boots", "walking shoes",
  17.        0, 0,          0, 25, 2, 10,  8, 9, 0, LEATHER, HI_LEATHER),
  18.  BOOTS("iron shoes", "hard shoes",
  19.        0, 0,          0,  7, 2, 50, 16, 8, 0, IRON, HI_METAL),
  20.  BOOTS("high boots", "jackboots",
  21.        0, 0,          0, 15, 2, 20, 12, 8, 0, LEATHER, HI_LEATHER),
  22.  /* with shuffled appearances... */
  23.  BOOTS("speed boots", "combat boots",
  24.        0, 1,       FAST, 12, 2, 20, 50, 9, 0, LEATHER, HI_LEATHER),
  25.  BOOTS("water walking boots", "jungle boots",
  26.        0, 1,   WWALKING, 12, 2, 15, 50, 9, 0, LEATHER, HI_LEATHER),
  27.  BOOTS("jumping boots", "hiking boots",
  28.        0, 1,    JUMPING, 12, 2, 20, 50, 9, 0, LEATHER, HI_LEATHER),
  29.  BOOTS("elven boots", "mud boots",
  30.        0, 1,    STEALTH, 12, 2, 15,  8, 9, 0, LEATHER, HI_LEATHER),
  31.  BOOTS("kicking boots", "buckled boots",
  32.        0, 1,          0, 12, 2, 50,  8, 9, 0, IRON, CLR_BROWN),
  33.          /* CLR_BROWN for same reason as gauntlets of power */
  34.  BOOTS("fumble boots", "riding boots",
  35.        0, 1,   FUMBLING, 12, 2, 20, 30, 9, 0, LEATHER, HI_LEATHER),
  36.  BOOTS("levitation boots", "snow boots",
  37.        0, 1, LEVITATION, 12, 2, 15, 30, 9, 0, LEATHER, HI_LEATHER),
  38.  #undef HELM
  39.  #undef CLOAK
  40.  #undef SHIELD
  41.  #undef GLOVES
  42.  #undef BOOTS
  43.  #undef ARMOR
  44.  

Rings

  1.  /* rings ... */
  2.  #define RING(name,stone,power,cost,mgc,spec,mohs,metal,color) \
  3.      OBJECT(OBJ(name, stone),                                          \
  4.             BITS(0, 0, spec, 0, mgc, spec, 0, 0, 0,                    \
  5.                  HARDGEM(mohs), 0, P_NONE, metal),                     \
  6.             power, RING_CLASS, 0, 0, 3, cost, 0, 0, 0, 0, 15, color)
  7.  RING("adornment", "wooden",
  8.       ADORNED,                  100, 1, 1, 2, WOOD, HI_WOOD),
  9.  RING("gain strength", "granite",
  10.       0,                        150, 1, 1, 7, MINERAL, HI_MINERAL),
  11.  RING("gain constitution", "opal",
  12.       0,                        150, 1, 1, 7, MINERAL, HI_MINERAL),
  13.  RING("increase accuracy", "clay",
  14.       0,                        150, 1, 1, 4, MINERAL, CLR_RED),
  15.  RING("increase damage", "coral",
  16.       0,                        150, 1, 1, 4, MINERAL, CLR_ORANGE),
  17.  RING("protection", "black onyx",
  18.       PROTECTION,               100, 1, 1, 7, MINERAL, CLR_BLACK),
  19.          /* 'PROTECTION' intrinsic enhances MC from worn armor by +1,
  20.             regardless of ring's enchantment; wearing a second ring of
  21.             protection (or even one ring of protection combined with
  22.             cloak of protection) doesn't give a second MC boost */
  23.  RING("regeneration", "moonstone",
  24.       REGENERATION,             200, 1, 0,  6, MINERAL, HI_MINERAL),
  25.  RING("searching", "tiger eye",
  26.       SEARCHING,                200, 1, 0,  6, GEMSTONE, CLR_BROWN),
  27.  RING("stealth", "jade",
  28.       STEALTH,                  100, 1, 0,  6, GEMSTONE, CLR_GREEN),
  29.  RING("sustain ability", "bronze",
  30.       FIXED_ABIL,               100, 1, 0,  4, COPPER, HI_COPPER),
  31.  RING("levitation", "agate",
  32.       LEVITATION,               200, 1, 0,  7, GEMSTONE, CLR_RED),
  33.  RING("hunger", "topaz",
  34.       HUNGER,                   100, 1, 0,  8, GEMSTONE, CLR_CYAN),
  35.  RING("aggravate monster", "sapphire",
  36.       AGGRAVATE_MONSTER,        150, 1, 0,  9, GEMSTONE, CLR_BLUE),
  37.  RING("conflict", "ruby",
  38.       CONFLICT,                 300, 1, 0,  9, GEMSTONE, CLR_RED),
  39.  RING("warning", "diamond",
  40.       WARNING,                  100, 1, 0, 10, GEMSTONE, CLR_WHITE),
  41.  RING("poison resistance", "pearl",
  42.       POISON_RES,               150, 1, 0,  4, BONE, CLR_WHITE),
  43.  RING("fire resistance", "iron",
  44.       FIRE_RES,                 200, 1, 0,  5, IRON, HI_METAL),
  45.  RING("cold resistance", "brass",
  46.       COLD_RES,                 150, 1, 0,  4, COPPER, HI_COPPER),
  47.  RING("shock resistance", "copper",
  48.       SHOCK_RES,                150, 1, 0,  3, COPPER, HI_COPPER),
  49.  RING("free action", "twisted",
  50.       FREE_ACTION,              200, 1, 0,  6, IRON, HI_METAL),
  51.  RING("slow digestion", "steel",
  52.       SLOW_DIGESTION,           200, 1, 0,  8, IRON, HI_METAL),
  53.  RING("teleportation", "silver",
  54.       TELEPORT,                 200, 1, 0,  3, SILVER, HI_SILVER),
  55.  RING("teleport control", "gold",
  56.       TELEPORT_CONTROL,         300, 1, 0,  3, GOLD, HI_GOLD),
  57.  RING("polymorph", "ivory",
  58.       POLYMORPH,                300, 1, 0,  4, BONE, CLR_WHITE),
  59.  RING("polymorph control", "emerald",
  60.       POLYMORPH_CONTROL,        300, 1, 0,  8, GEMSTONE, CLR_BRIGHT_GREEN),
  61.  RING("invisibility", "wire",
  62.       INVIS,                    150, 1, 0,  5, IRON, HI_METAL),
  63.  RING("see invisible", "engagement",
  64.       SEE_INVIS,                150, 1, 0,  5, IRON, HI_METAL),
  65.  RING("protection from shape changers", "shiny",
  66.       PROT_FROM_SHAPE_CHANGERS, 100, 1, 0,  5, IRON, CLR_BRIGHT_CYAN),
  67.  #undef RING
  68.  

Amulets

  1.  /* amulets ... - THE Amulet comes last because it is special */
  2.  #define AMULET(name,desc,power,prob) \
  3.      OBJECT(OBJ(name, desc),                                            \
  4.             BITS(0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, P_NONE, IRON),        \
  5.             power, AMULET_CLASS, prob, 0, 20, 150, 0, 0, 0, 0, 20, HI_METAL)
  6.  AMULET("amulet of ESP",                "circular", TELEPAT, 175),
  7.  AMULET("amulet of life saving",       "spherical", LIFESAVED, 75),
  8.  AMULET("amulet of strangulation",          "oval", STRANGLED, 135),
  9.  AMULET("amulet of restful sleep",    "triangular", SLEEPY, 135),
  10.  AMULET("amulet versus poison",        "pyramidal", POISON_RES, 165),
  11.  AMULET("amulet of change",               "square", 0, 130),
  12.  AMULET("amulet of unchanging",          "concave", UNCHANGING, 45),
  13.  AMULET("amulet of reflection",        "hexagonal", REFLECTING, 75),
  14.  AMULET("amulet of magical breathing", "octagonal", MAGICAL_BREATHING, 65),
  15.  /* fixed descriptions; description duplication is deliberate;
  16.   * fake one must come before real one because selection for
  17.   * description shuffling stops when a non-magic amulet is encountered
  18.   */
  19.  OBJECT(OBJ("cheap plastic imitation of the Amulet of Yendor",
  20.             "Amulet of Yendor"),
  21.         BITS(0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, PLASTIC),
  22.         0, AMULET_CLASS, 0, 0, 20, 0, 0, 0, 0, 0, 1, HI_METAL),
  23.  OBJECT(OBJ("Amulet of Yendor", /* note: description == name */
  24.             "Amulet of Yendor"),
  25.         BITS(0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, MITHRIL),
  26.         0, AMULET_CLASS, 0, 0, 20, 30000, 0, 0, 0, 0, 20, HI_METAL),
  27.  #undef AMULET
  28.  

Tools

  1.  /* tools ... */
  2.  /* tools with weapon characteristics come last */
  3.  #define TOOL(name,desc,kn,mrg,mgc,chg,prob,wt,cost,mat,color) \
  4.      OBJECT(OBJ(name, desc),                                             \
  5.             BITS(kn, mrg, chg, 0, mgc, chg, 0, 0, 0, 0, 0, P_NONE, mat), \
  6.             0, TOOL_CLASS, prob, 0, wt, cost, 0, 0, 0, 0, wt, color)
  7.  #define CONTAINER(name,desc,kn,mgc,chg,prob,wt,cost,mat,color) \
  8.      OBJECT(OBJ(name, desc),                                             \
  9.             BITS(kn, 0, chg, 1, mgc, chg, 0, 0, 0, 0, 0, P_NONE, mat),   \
  10.             0, TOOL_CLASS, prob, 0, wt, cost, 0, 0, 0, 0, wt, color)
  11.  #define WEPTOOL(name,desc,kn,mgc,bi,prob,wt,cost,sdam,ldam,hitbon,sub,mat,clr)\
  12.      OBJECT(OBJ(name, desc),                                             \
  13.             BITS(kn, 0, 1, 0, mgc, 1, 0, 0, bi, 0, hitbon, sub, mat),    \
  14.             0, TOOL_CLASS, prob, 0, wt, cost, sdam, ldam, hitbon, 0, wt, clr)
  15.  /* containers */
  16.  CONTAINER("large box",       None, 1, 0, 0, 40, 350,   8, WOOD, HI_WOOD),
  17.  CONTAINER("chest",           None, 1, 0, 0, 35, 600,  16, WOOD, HI_WOOD),
  18.  CONTAINER("ice box",         None, 1, 0, 0,  5, 900,  42, PLASTIC, CLR_WHITE),
  19.  CONTAINER("sack",           "bag", 0, 0, 0, 35,  15,   2, CLOTH, HI_CLOTH),
  20.  CONTAINER("oilskin sack",   "bag", 0, 0, 0,  5,  15, 100, CLOTH, HI_CLOTH),
  21.  CONTAINER("bag of holding", "bag", 0, 1, 0, 20,  15, 100, CLOTH, HI_CLOTH),
  22.  CONTAINER("bag of tricks",  "bag", 0, 1, 1, 20,  15, 100, CLOTH, HI_CLOTH),
  23.  #undef CONTAINER
  24.  
  25.  /* lock opening tools */
  26.  TOOL("skeleton key",       "key", 0, 0, 0, 0, 80,  3, 10, IRON, HI_METAL),
  27.  TOOL("lock pick",           None, 1, 0, 0, 0, 60,  4, 20, IRON, HI_METAL),
  28.  TOOL("credit card",         None, 1, 0, 0, 0, 15,  1, 10, PLASTIC, CLR_WHITE),
  29.  /* light sources */
  30.  TOOL("tallow candle",   "candle", 0, 1, 0, 0, 20,  2, 10, WAX, CLR_WHITE),
  31.  TOOL("wax candle",      "candle", 0, 1, 0, 0,  5,  2, 20, WAX, CLR_WHITE),
  32.  TOOL("brass lantern",       None, 1, 0, 0, 0, 30, 30, 12, COPPER, CLR_YELLOW),
  33.  TOOL("oil lamp",          "lamp", 0, 0, 0, 0, 45, 20, 10, COPPER, CLR_YELLOW),
  34.  TOOL("magic lamp",        "lamp", 0, 0, 1, 0, 15, 20, 50, COPPER, CLR_YELLOW),
  35.  /* other tools */
  36.  TOOL("expensive camera",    None, 1, 0, 0, 1, 15, 12,200, PLASTIC, CLR_BLACK),
  37.  TOOL("mirror",   "looking glass", 0, 0, 0, 0, 45, 13, 10, GLASS, HI_SILVER),
  38.  TOOL("crystal ball", "glass orb", 0, 0, 1, 1, 15,150, 60, GLASS, HI_GLASS),
  39.  TOOL("lenses",              None, 1, 0, 0, 0,  5,  3, 80, GLASS, HI_GLASS),
  40.  TOOL("blindfold",           None, 1, 0, 0, 0, 50,  2, 20, CLOTH, CLR_BLACK),
  41.  TOOL("towel",               None, 1, 0, 0, 0, 50,  2, 50, CLOTH, CLR_MAGENTA),
  42.  TOOL("saddle",              None, 1, 0, 0, 0,  5,200,150, LEATHER, HI_LEATHER),
  43.  TOOL("leash",               None, 1, 0, 0, 0, 65, 12, 20, LEATHER, HI_LEATHER),
  44.  TOOL("stethoscope",         None, 1, 0, 0, 0, 25,  4, 75, IRON, HI_METAL),
  45.  TOOL("tinning kit",         None, 1, 0, 0, 1, 15,100, 30, IRON, HI_METAL),
  46.  TOOL("tin opener",          None, 1, 0, 0, 0, 35,  4, 30, IRON, HI_METAL),
  47.  TOOL("can of grease",       None, 1, 0, 0, 1, 15, 15, 20, IRON, HI_METAL),
  48.  TOOL("figurine",            None, 1, 0, 1, 0, 25, 50, 80, MINERAL, HI_MINERAL),
  49.          /* monster type specified by obj->corpsenm */
  50.  TOOL("magic marker",        None, 1, 0, 1, 1, 15,  2, 50, PLASTIC, CLR_RED),
  51.  /* traps */
  52.  TOOL("land mine",           None, 1, 0, 0, 0, 0, 300,180, IRON, CLR_RED),
  53.  TOOL("beartrap",            None, 1, 0, 0, 0, 0, 200, 60, IRON, HI_METAL),
  54.  /* instruments;
  55.     "If tin whistles are made out of tin, what do they make foghorns out of?" */
  56.  TOOL("tin whistle",    "whistle", 0, 0, 0, 0,100, 3, 10, METAL, HI_METAL),
  57.  TOOL("magic whistle",  "whistle", 0, 0, 1, 0, 30, 3, 10, METAL, HI_METAL),
  58.  TOOL("wooden flute",     "flute", 0, 0, 0, 0,  4, 5, 12, WOOD, HI_WOOD),
  59.  TOOL("magic flute",      "flute", 0, 0, 1, 1,  2, 5, 36, WOOD, HI_WOOD),
  60.  TOOL("tooled horn",       "horn", 0, 0, 0, 0,  5, 18, 15, BONE, CLR_WHITE),
  61.  TOOL("frost horn",        "horn", 0, 0, 1, 1,  2, 18, 50, BONE, CLR_WHITE),
  62.  TOOL("fire horn",         "horn", 0, 0, 1, 1,  2, 18, 50, BONE, CLR_WHITE),
  63.  TOOL("horn of plenty",    "horn", 0, 0, 1, 1,  2, 18, 50, BONE, CLR_WHITE),
  64.          /* horn, but not an instrument */
  65.  TOOL("wooden harp",       "harp", 0, 0, 0, 0,  4, 30, 50, WOOD, HI_WOOD),
  66.  TOOL("magic harp",        "harp", 0, 0, 1, 1,  2, 30, 50, WOOD, HI_WOOD),
  67.  TOOL("bell",                None, 1, 0, 0, 0,  2, 30, 50, COPPER, HI_COPPER),
  68.  TOOL("bugle",               None, 1, 0, 0, 0,  4, 10, 15, COPPER, HI_COPPER),
  69.  TOOL("leather drum",      "drum", 0, 0, 0, 0,  4, 25, 25, LEATHER, HI_LEATHER),
  70.  TOOL("drum of earthquake","drum", 0, 0, 1, 1,  2, 25, 25, LEATHER, HI_LEATHER),
  71.  /* tools useful as weapons */
  72.  WEPTOOL("pick-axe", None,
  73.          1, 0, 0, 20, 100,  50,  6,  3, WHACK,  P_PICK_AXE, IRON, HI_METAL),
  74.  WEPTOOL("grappling hook", "iron hook",
  75.          0, 0, 0,  5,  30,  50,  2,  6, WHACK,  P_FLAIL,    IRON, HI_METAL),
  76.  WEPTOOL("unicorn horn", None,
  77.          1, 1, 1,  0,  20, 100, 12, 12, PIERCE, P_UNICORN_HORN,
  78.                                                             BONE, CLR_WHITE),
  79.          /* 3.4.1: unicorn horn left classified as "magic" */
  80.  /* two unique tools;
  81.   * not artifacts, despite the comment which used to be here
  82.   */
  83.  OBJECT(OBJ("Candelabrum of Invocation", "candelabrum"),
  84.         BITS(0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, P_NONE, GOLD),
  85.         0, TOOL_CLASS, 0, 0, 10, 5000, 0, 0, 0, 0, 200, HI_GOLD),
  86.  OBJECT(OBJ("Bell of Opening", "silver bell"),
  87.         BITS(0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, P_NONE, SILVER),
  88.         0, TOOL_CLASS, 0, 0, 10, 5000, 0, 0, 0, 0, 50, HI_SILVER),
  89.  #undef TOOL
  90.  #undef WEPTOOL
  91.  

Comestibles

  1.  /* Comestibles ... */
  2.  #define FOOD(name, prob, delay, wt, unk, tin, nutrition, color)         \
  3.      OBJECT(OBJ(name, None),                                       \
  4.             BITS(1, 1, unk, 0, 0, 0, 0, 0, 0, 0, 0, P_NONE, tin), 0,     \
  5.             FOOD_CLASS, prob, delay, wt, nutrition / 20 + 5, 0, 0, 0, 0, \
  6.             nutrition, color)
  7.  /* All types of food (except tins & corpses) must have a delay of at least 1.
  8.   * Delay on corpses is computed and is weight dependant.
  9.   * Domestic pets prefer tripe rations above all others.
  10.   * Fortune cookies can be read, using them up without ingesting them.
  11.   * Carrots improve your vision.
  12.   * +0 tins contain monster meat.
  13.   * +1 tins (of spinach) make you stronger (like Popeye).
  14.   * Meatballs/sticks/rings are only created from objects via stone to flesh.
  15.   */
  16.  /* meat */
  17.  FOOD("tripe ration",        140,  2, 10, 0, FLESH, 200, CLR_BROWN),
  18.  FOOD("corpse",                0,  1,  0, 0, FLESH,   0, CLR_BROWN),
  19.  FOOD("egg",                  85,  1,  1, 1, FLESH,  80, CLR_WHITE),
  20.  FOOD("meatball",              0,  1,  1, 0, FLESH,   5, CLR_BROWN),
  21.  FOOD("meat stick",            0,  1,  1, 0, FLESH,   5, CLR_BROWN),
  22.  FOOD("huge chunk of meat",    0, 20,400, 0, FLESH,2000, CLR_BROWN),
  23.  /* special case because it's not mergable */
  24.  OBJECT(OBJ("meat ring", None),
  25.         BITS(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, FLESH),
  26.         0, FOOD_CLASS, 0, 1, 5, 1, 0, 0, 0, 0, 5, CLR_BROWN),
  27.  /* pudding 'corpses' will turn into these and combine;
  28.     must be in same order as the pudding monsters */
  29.  FOOD("glob of gray ooze",     0,  2, 20, 0, FLESH,  20, CLR_GRAY),
  30.  FOOD("glob of brown pudding", 0,  2, 20, 0, FLESH,  20, CLR_BROWN),
  31.  FOOD("glob of green slime",   0,  2, 20, 0, FLESH,  20, CLR_GREEN),
  32.  FOOD("glob of black pudding", 0,  2, 20, 0, FLESH,  20, CLR_BLACK),
  33.  
  34.  /* fruits & veggies */
  35.  FOOD("kelp frond",            0,  1,  1, 0, VEGGY,  30, CLR_GREEN),
  36.  FOOD("eucalyptus leaf",       3,  1,  1, 0, VEGGY,  30, CLR_GREEN),
  37.  FOOD("apple",                15,  1,  2, 0, VEGGY,  50, CLR_RED),
  38.  FOOD("orange",               10,  1,  2, 0, VEGGY,  80, CLR_ORANGE),
  39.  FOOD("pear",                 10,  1,  2, 0, VEGGY,  50, CLR_BRIGHT_GREEN),
  40.  FOOD("melon",                10,  1,  5, 0, VEGGY, 100, CLR_BRIGHT_GREEN),
  41.  FOOD("banana",               10,  1,  2, 0, VEGGY,  80, CLR_YELLOW),
  42.  FOOD("carrot",               15,  1,  2, 0, VEGGY,  50, CLR_ORANGE),
  43.  FOOD("sprig of wolfsbane",    7,  1,  1, 0, VEGGY,  40, CLR_GREEN),
  44.  FOOD("clove of garlic",       7,  1,  1, 0, VEGGY,  40, CLR_WHITE),
  45.  /* name of slime mold is changed based on player's OPTION=fruit:something
  46.     and bones data might have differently named ones from prior games */
  47.  FOOD("slime mold",           75,  1,  5, 0, VEGGY, 250, HI_ORGANIC),
  48.  
  49.  /* people food */
  50.  FOOD("lump of royal jelly",   0,  1,  2, 0, VEGGY, 200, CLR_YELLOW),
  51.  FOOD("cream pie",            25,  1, 10, 0, VEGGY, 100, CLR_WHITE),
  52.  FOOD("candy bar",            13,  1,  2, 0, VEGGY, 100, CLR_BROWN),
  53.  FOOD("fortune cookie",       55,  1,  1, 0, VEGGY,  40, CLR_YELLOW),
  54.  FOOD("pancake",              25,  2,  2, 0, VEGGY, 200, CLR_YELLOW),
  55.  FOOD("lembas wafer",         20,  2,  5, 0, VEGGY, 800, CLR_WHITE),
  56.  FOOD("cram ration",          20,  3, 15, 0, VEGGY, 600, HI_ORGANIC),
  57.  FOOD("food ration",         380,  5, 20, 0, VEGGY, 800, HI_ORGANIC),
  58.  FOOD("K-ration",              0,  1, 10, 0, VEGGY, 400, HI_ORGANIC),
  59.  FOOD("C-ration",              0,  1, 10, 0, VEGGY, 300, HI_ORGANIC),
  60.  /* tins have type specified by obj->spe (+1 for spinach, other implies
  61.     flesh; negative specifies preparation method {homemade,boiled,&c})
  62.     and by obj->corpsenm (type of monster flesh) */
  63.  FOOD("tin",                  75,  0, 10, 1, METAL,   0, HI_METAL),
  64.  #undef FOOD
  65.  

Potions

  1.  /* potions ... */
  2.  #define POTION(name,desc,mgc,power,prob,cost,color) \
  3.      OBJECT(OBJ(name, desc),                                             \
  4.             BITS(0, 1, 0, 0, mgc, 0, 0, 0, 0, 0, 0, P_NONE, GLASS),      \
  5.             power, POTION_CLASS, prob, 0, 20, cost, 0, 0, 0, 0, 10, color)
  6.  POTION("gain ability",           "ruby",  1, 0, 42, 300, CLR_RED),
  7.  POTION("restore ability",        "pink",  1, 0, 40, 100, CLR_BRIGHT_MAGENTA),
  8.  POTION("confusion",            "orange",  1, CONFUSION, 42, 100, CLR_ORANGE),
  9.  POTION("blindness",            "yellow",  1, BLINDED, 40, 150, CLR_YELLOW),
  10.  POTION("paralysis",           "emerald",  1, 0, 42, 300, CLR_BRIGHT_GREEN),
  11.  POTION("speed",            "dark green",  1, FAST, 42, 200, CLR_GREEN),
  12.  POTION("levitation",             "cyan",  1, LEVITATION, 42, 200, CLR_CYAN),
  13.  POTION("hallucination",      "sky blue",  1, HALLUC, 40, 100, CLR_CYAN),
  14.  POTION("invisibility", "brilliant blue",  1, INVIS, 40, 150, CLR_BRIGHT_BLUE),
  15.  POTION("see invisible",       "magenta",  1, SEE_INVIS, 42, 50, CLR_MAGENTA),
  16.  POTION("healing",          "purple-red",  1, 0, 57, 100, CLR_MAGENTA),
  17.  POTION("extra healing",          "puce",  1, 0, 47, 100, CLR_RED),
  18.  POTION("gain level",            "milky",  1, 0, 20, 300, CLR_WHITE),
  19.  POTION("enlightenment",        "swirly",  1, 0, 20, 200, CLR_BROWN),
  20.  POTION("monster detection",    "bubbly",  1, 0, 40, 150, CLR_WHITE),
  21.  POTION("object detection",      "smoky",  1, 0, 42, 150, CLR_GRAY),
  22.  POTION("gain energy",          "cloudy",  1, 0, 42, 150, CLR_WHITE),
  23.  POTION("sleeping",       "effervescent",  1, 0, 42, 100, CLR_GRAY),
  24.  POTION("full healing",          "black",  1, 0, 10, 200, CLR_BLACK),
  25.  POTION("polymorph",            "golden",  1, 0, 10, 200, CLR_YELLOW),
  26.  POTION("booze",                 "brown",  0, 0, 42,  50, CLR_BROWN),
  27.  POTION("sickness",              "fizzy",  0, 0, 42,  50, CLR_CYAN),
  28.  POTION("fruit juice",            "dark",  0, 0, 42,  50, CLR_BLACK),
  29.  POTION("acid",                  "white",  0, 0, 10, 250, CLR_WHITE),
  30.  POTION("oil",                   "murky",  0, 0, 30, 250, CLR_BROWN),
  31.  /* fixed description
  32.   */
  33.  POTION("water",                 "clear",  0, 0, 92, 100, CLR_CYAN),
  34.  #undef POTION
  35.  

Scrolls

  1.  /* scrolls ... */
  2.  #define SCROLL(name,text,mgc,prob,cost) \
  3.      OBJECT(OBJ(name, text),                                           \
  4.             BITS(0, 1, 0, 0, mgc, 0, 0, 0, 0, 0, 0, P_NONE, PAPER),    \
  5.             0, SCROLL_CLASS, prob, 0, 5, cost, 0, 0, 0, 0, 6, HI_PAPER)
  6.  SCROLL("enchant armor",              "ZELGO MER",  1,  63,  80),
  7.  SCROLL("destroy armor",         "JUYED AWK YACC",  1,  45, 100),
  8.  SCROLL("confuse monster",                 "NR 9",  1,  53, 100),
  9.  SCROLL("scare monster",   "XIXAXA XOXAXA XUXAXA",  1,  35, 100),
  10.  SCROLL("remove curse",             "PRATYAVAYAH",  1,  65,  80),
  11.  SCROLL("enchant weapon",         "DAIYEN FOOELS",  1,  80,  60),
  12.  SCROLL("create monster",       "LEP GEX VEN ZEA",  1,  45, 200),
  13.  SCROLL("taming",                   "PRIRUTSENIE",  1,  15, 200),
  14.  SCROLL("genocide",                  "ELBIB YLOH",  1,  15, 300),
  15.  SCROLL("light",                 "VERR YED HORRE",  1,  90,  50),
  16.  SCROLL("teleportation",        "VENZAR BORGAVVE",  1,  55, 100),
  17.  SCROLL("gold detection",                 "THARR",  1,  33, 100),
  18.  SCROLL("food detection",               "YUM YUM",  1,  25, 100),
  19.  SCROLL("identify",                  "KERNOD WEL",  1, 180,  20),
  20.  SCROLL("magic mapping",              "ELAM EBOW",  1,  45, 100),
  21.  SCROLL("amnesia",                   "DUAM XNAHT",  1,  35, 200),
  22.  SCROLL("fire",                  "ANDOVA BEGARIN",  1,  30, 100),
  23.  SCROLL("earth",                          "KIRJE",  1,  18, 200),
  24.  SCROLL("punishment",            "VE FORBRYDERNE",  1,  15, 300),
  25.  SCROLL("charging",                "HACKEM MUCHE",  1,  15, 300),
  26.  SCROLL("stinking cloud",             "VELOX NEB",  1,  15, 300),
  27.      /* Extra descriptions, shuffled into use at start of new game.
  28.       * Code in win/share/tilemap.c depends on SCR_STINKING_CLOUD preceding
  29.       * these and on how many of them there are.  If a real scroll gets added
  30.       * after stinking cloud or the number of extra descriptions changes,
  31.       * tilemap.c must be modified to match.
  32.       */
  33.  SCROLL(None,      "FOOBIE BLETCH",  1,   0, 100),
  34.  SCROLL(None,              "TEMOV",  1,   0, 100),
  35.  SCROLL(None,         "GARVEN DEH",  1,   0, 100),
  36.  SCROLL(None,            "READ ME",  1,   0, 100),
  37.  SCROLL(None,      "ETAOIN SHRDLU",  1,   0, 100),
  38.  SCROLL(None,        "LOREM IPSUM",  1,   0, 100),
  39.  SCROLL(None,              "FNORD",  1,   0, 100), /* Illuminati */
  40.  SCROLL(None,            "KO BATE",  1,   0, 100), /* Kurd Lasswitz */
  41.  SCROLL(None,      "ABRA KA DABRA",  1,   0, 100), /* traditional incantation */
  42.  SCROLL(None,       "ASHPD SODALG",  1,   0, 100), /* Portal */
  43.  SCROLL(None,            "ZLORFIK",  1,   0, 100), /* Zak McKracken */
  44.  SCROLL(None,      "GNIK SISI VLE",  1,   0, 100), /* Zak McKracken */
  45.  SCROLL(None,    "HAPAX LEGOMENON",  1,   0, 100),
  46.  SCROLL(None,  "EIRIS SAZUN IDISI",  1,   0, 100), /* Merseburg Incantations */
  47.  SCROLL(None,    "PHOL ENDE WODAN",  1,   0, 100), /* Merseburg Incantations */
  48.  SCROLL(None,              "GHOTI",  1,   0, 100), /* pronounced as 'fish',
  49.                                                          George Bernard Shaw */
  50.  SCROLL(None, "MAPIRO MAHAMA DIROMAT", 1, 0, 100), /* Wizardry */
  51.  SCROLL(None,  "VAS CORP BET MANI",  1,   0, 100), /* Ultima */
  52.  SCROLL(None,            "XOR OTA",  1,   0, 100), /* Aarne Haapakoski */
  53.  SCROLL(None, "STRC PRST SKRZ KRK",  1,   0, 100), /* Czech and Slovak
  54.                                                          tongue-twister */
  55.      /* These must come last because they have special fixed descriptions.
  56.       */
  57.  #ifdef MAIL
  58.  SCROLL("mail",          "stamped",  0,   0,   0),
  59.  #endif
  60.  SCROLL("blank paper", "unlabeled",  0,  28,  60),
  61.  #undef SCROLL
  62.  

Spellbooks

  1.  /* spellbooks ... */
  2.  /* expanding beyond 52 spells would require changes in spellcasting
  3.     or imposition of a limit on number of spells hero can know because
  4.     they are currently assigned successive letters, a-zA-Z, when learned */
  5.  #define SPELL(name,desc,sub,prob,delay,level,mgc,dir,color)  \
  6.      OBJECT(OBJ(name, desc),                                             \
  7.             BITS(0, 0, 0, 0, mgc, 0, 0, 0, 0, 0, dir, sub, PAPER),       \
  8.             0, SPBOOK_CLASS, prob, delay, 50, level * 100,               \
  9.             0, 0, 0, level, 20, color)
  10.  SPELL("dig",             "parchment",
  11.        P_MATTER_SPELL,      20,  6, 5, 1, RAY, HI_PAPER),
  12.  SPELL("magic missile",   "vellum",
  13.        P_ATTACK_SPELL,      45,  2, 2, 1, RAY, HI_PAPER),
  14.  SPELL("fireball",        "ragged",
  15.        P_ATTACK_SPELL,      20,  4, 4, 1, RAY, HI_PAPER),
  16.  SPELL("cone of cold",    "dog eared",
  17.        P_ATTACK_SPELL,      10,  7, 4, 1, RAY, HI_PAPER),
  18.  SPELL("sleep",           "mottled",
  19.        P_ENCHANTMENT_SPELL, 50,  1, 1, 1, RAY, HI_PAPER),
  20.  SPELL("finger of death", "stained",
  21.        P_ATTACK_SPELL,       5, 10, 7, 1, RAY, HI_PAPER),
  22.  SPELL("light",           "cloth",
  23.        P_DIVINATION_SPELL,  45,  1, 1, 1, NODIR, HI_CLOTH),
  24.  SPELL("detect monsters", "leathery",
  25.        P_DIVINATION_SPELL,  43,  1, 1, 1, NODIR, HI_LEATHER),
  26.  SPELL("healing",         "white",
  27.        P_HEALING_SPELL,     40,  2, 1, 1, IMMEDIATE, CLR_WHITE),
  28.  SPELL("knock",           "pink",
  29.        P_MATTER_SPELL,      35,  1, 1, 1, IMMEDIATE, CLR_BRIGHT_MAGENTA),
  30.  SPELL("force bolt",      "red",
  31.        P_ATTACK_SPELL,      35,  2, 1, 1, IMMEDIATE, CLR_RED),
  32.  SPELL("confuse monster", "orange",
  33.        P_ENCHANTMENT_SPELL, 30,  2, 2, 1, IMMEDIATE, CLR_ORANGE),
  34.  SPELL("cure blindness",  "yellow",
  35.        P_HEALING_SPELL,     25,  2, 2, 1, IMMEDIATE, CLR_YELLOW),
  36.  SPELL("drain life",      "velvet",
  37.        P_ATTACK_SPELL,      10,  2, 2, 1, IMMEDIATE, CLR_MAGENTA),
  38.  SPELL("slow monster",    "light green",
  39.        P_ENCHANTMENT_SPELL, 30,  2, 2, 1, IMMEDIATE, CLR_BRIGHT_GREEN),
  40.  SPELL("wizard lock",     "dark green",
  41.        P_MATTER_SPELL,      30,  3, 2, 1, IMMEDIATE, CLR_GREEN),
  42.  SPELL("create monster",  "turquoise",
  43.        P_CLERIC_SPELL,      35,  3, 2, 1, NODIR, CLR_BRIGHT_CYAN),
  44.  SPELL("detect food",     "cyan",
  45.        P_DIVINATION_SPELL,  30,  3, 2, 1, NODIR, CLR_CYAN),
  46.  SPELL("cause fear",      "light blue",
  47.        P_ENCHANTMENT_SPELL, 25,  3, 3, 1, NODIR, CLR_BRIGHT_BLUE),
  48.  SPELL("clairvoyance",    "dark blue",
  49.        P_DIVINATION_SPELL,  15,  3, 3, 1, NODIR, CLR_BLUE),
  50.  SPELL("cure sickness",   "indigo",
  51.        P_HEALING_SPELL,     32,  3, 3, 1, NODIR, CLR_BLUE),
  52.  SPELL("charm monster",   "magenta",
  53.        P_ENCHANTMENT_SPELL, 20,  3, 3, 1, IMMEDIATE, CLR_MAGENTA),
  54.  SPELL("haste self",      "purple",
  55.        P_ESCAPE_SPELL,      33,  4, 3, 1, NODIR, CLR_MAGENTA),
  56.  SPELL("detect unseen",   "violet",
  57.        P_DIVINATION_SPELL,  20,  4, 3, 1, NODIR, CLR_MAGENTA),
  58.  SPELL("levitation",      "tan",
  59.        P_ESCAPE_SPELL,      20,  4, 4, 1, NODIR, CLR_BROWN),
  60.  SPELL("extra healing",   "plaid",
  61.        P_HEALING_SPELL,     27,  5, 3, 1, IMMEDIATE, CLR_GREEN),
  62.  SPELL("restore ability", "light brown",
  63.        P_HEALING_SPELL,     25,  5, 4, 1, NODIR, CLR_BROWN),
  64.  SPELL("invisibility",    "dark brown",
  65.        P_ESCAPE_SPELL,      25,  5, 4, 1, NODIR, CLR_BROWN),
  66.  SPELL("detect treasure", "gray",
  67.        P_DIVINATION_SPELL,  20,  5, 4, 1, NODIR, CLR_GRAY),
  68.  SPELL("remove curse",    "wrinkled",
  69.        P_CLERIC_SPELL,      25,  5, 3, 1, NODIR, HI_PAPER),
  70.  SPELL("magic mapping",   "dusty",
  71.        P_DIVINATION_SPELL,  18,  7, 5, 1, NODIR, HI_PAPER),
  72.  SPELL("identify",        "bronze",
  73.        P_DIVINATION_SPELL,  20,  6, 3, 1, NODIR, HI_COPPER),
  74.  SPELL("turn undead",     "copper",
  75.        P_CLERIC_SPELL,      16,  8, 6, 1, IMMEDIATE, HI_COPPER),
  76.  SPELL("polymorph",       "silver",
  77.        P_MATTER_SPELL,      10,  8, 6, 1, IMMEDIATE, HI_SILVER),
  78.  SPELL("teleport away",   "gold",
  79.        P_ESCAPE_SPELL,      15,  6, 6, 1, IMMEDIATE, HI_GOLD),
  80.  SPELL("create familiar", "glittering",
  81.        P_CLERIC_SPELL,      10,  7, 6, 1, NODIR, CLR_WHITE),
  82.  SPELL("cancellation",    "shining",
  83.        P_MATTER_SPELL,      15,  8, 7, 1, IMMEDIATE, CLR_WHITE),
  84.  SPELL("protection",      "dull",
  85.        P_CLERIC_SPELL,      18,  3, 1, 1, NODIR, HI_PAPER),
  86.  SPELL("jumping",         "thin",
  87.        P_ESCAPE_SPELL,      20,  3, 1, 1, IMMEDIATE, HI_PAPER),
  88.  SPELL("stone to flesh",  "thick",
  89.        P_HEALING_SPELL,     15,  1, 3, 1, IMMEDIATE, HI_PAPER),
  90.  #if 0 /* DEFERRED */
  91.  /* from slash'em, create a tame critter which explodes when attacking,
  92.     damaging adjacent creatures--friend or foe--and dying in the process */
  93.  SPELL("flame sphere",    "canvas",
  94.        P_MATTER_SPELL,      20,  2, 1, 1, NODIR, CLR_BROWN),
  95.  SPELL("freeze sphere",   "hardcover",
  96.        P_MATTER_SPELL,      20,  2, 1, 1, NODIR, CLR_BROWN),
  97.  #endif
  98.  /* books with fixed descriptions
  99.   */
  100.  SPELL("blank paper", "plain", P_NONE, 18, 0, 0, 0, 0, HI_PAPER),
  101.  /* tribute book for 3.6 */
  102.  OBJECT(OBJ("novel", "paperback"),
  103.         BITS(0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, P_NONE, HI_PAPER),
  104.         0, SPBOOK_CLASS, 0, 0, 0, 20, 0, 0, 0, 1, 20, CLR_BRIGHT_BLUE),
  105.  /* a special, one of a kind, spellbook */
  106.  OBJECT(OBJ("Book of the Dead", "papyrus"),
  107.         BITS(0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, P_NONE, PAPER),
  108.         0, SPBOOK_CLASS, 0, 0, 20, 10000, 0, 0, 0, 7, 20, HI_PAPER),
  109.  #undef SPELL
  110.  

Wands

  1.  /* wands ... */
  2.  #define WAND(name,typ,prob,cost,mgc,dir,metal,color) \
  3.      OBJECT(OBJ(name, typ),                                              \
  4.             BITS(0, 0, 1, 0, mgc, 1, 0, 0, 0, 0, dir, P_NONE, metal),    \
  5.             0, WAND_CLASS, prob, 0, 7, cost, 0, 0, 0, 0, 30, color)
  6.  WAND("light",           "glass", 95, 100, 1, NODIR, GLASS, HI_GLASS),
  7.  WAND("secret door detection",
  8.                          "balsa", 50, 150, 1, NODIR, WOOD, HI_WOOD),
  9.  WAND("enlightenment", "crystal", 15, 150, 1, NODIR, GLASS, HI_GLASS),
  10.  WAND("create monster",  "maple", 45, 200, 1, NODIR, WOOD, HI_WOOD),
  11.  WAND("wishing",          "pine",  5, 500, 1, NODIR, WOOD, HI_WOOD),
  12.  WAND("nothing",           "oak", 25, 100, 0, IMMEDIATE, WOOD, HI_WOOD),
  13.  WAND("striking",        "ebony", 75, 150, 1, IMMEDIATE, WOOD, HI_WOOD),
  14.  WAND("make invisible", "marble", 45, 150, 1, IMMEDIATE, MINERAL, HI_MINERAL),
  15.  WAND("slow monster",      "tin", 50, 150, 1, IMMEDIATE, METAL, HI_METAL),
  16.  WAND("speed monster",   "brass", 50, 150, 1, IMMEDIATE, COPPER, HI_COPPER),
  17.  WAND("undead turning", "copper", 50, 150, 1, IMMEDIATE, COPPER, HI_COPPER),
  18.  WAND("polymorph",      "silver", 45, 200, 1, IMMEDIATE, SILVER, HI_SILVER),
  19.  WAND("cancellation", "platinum", 45, 200, 1, IMMEDIATE, PLATINUM, CLR_WHITE),
  20.  WAND("teleportation", "iridium", 45, 200, 1, IMMEDIATE, METAL,
  21.                                                               CLR_BRIGHT_CYAN),
  22.  WAND("opening",          "zinc", 25, 150, 1, IMMEDIATE, METAL, HI_METAL),
  23.  WAND("locking",      "aluminum", 25, 150, 1, IMMEDIATE, METAL, HI_METAL),
  24.  WAND("probing",       "uranium", 30, 150, 1, IMMEDIATE, METAL, HI_METAL),
  25.  WAND("digging",          "iron", 55, 150, 1, RAY, IRON, HI_METAL),
  26.  WAND("magic missile",   "steel", 50, 150, 1, RAY, IRON, HI_METAL),
  27.  WAND("fire",        "hexagonal", 40, 175, 1, RAY, IRON, HI_METAL),
  28.  WAND("cold",            "short", 40, 175, 1, RAY, IRON, HI_METAL),
  29.  WAND("sleep",           "runed", 50, 175, 1, RAY, IRON, HI_METAL),
  30.  WAND("death",            "long",  5, 500, 1, RAY, IRON, HI_METAL),
  31.  WAND("lightning",      "curved", 40, 175, 1, RAY, IRON, HI_METAL),
  32.  /* extra descriptions, shuffled into use at start of new game */
  33.  WAND(None,             "forked",  0, 150, 1, 0, WOOD, HI_WOOD),
  34.  WAND(None,             "spiked",  0, 150, 1, 0, IRON, HI_METAL),
  35.  WAND(None,            "jeweled",  0, 150, 1, 0, IRON, HI_MINERAL),
  36.  #undef WAND
  37.  

Coins

  1.  /* coins ... - so far, gold is all there is */
  2.  #define COIN(name,prob,metal,worth) \
  3.      OBJECT(OBJ(name, None),                                        \
  4.             BITS(0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, P_NONE, metal),    \
  5.             0, COIN_CLASS, prob, 0, 1, worth, 0, 0, 0, 0, 0, HI_GOLD)
  6.  COIN("gold piece", 1000, GOLD, 1),
  7.  #undef COIN
  8.  

Gems

  1.  /* gems ... - includes stones and rocks but not boulders */
  2.  #define GEM(name,desc,prob,wt,gval,nutr,mohs,glass,color) \
  3.      OBJECT(OBJ(name, desc),                                             \
  4.             BITS(0, 1, 0, 0, 0, 0, 0, 0, 0,                              \
  5.                  HARDGEM(mohs), 0, -P_SLING, glass),                     \
  6.             0, GEM_CLASS, prob, 0, 1, gval, 3, 3, 0, 0, nutr, color)
  7.  #define ROCK(name,desc,kn,prob,wt,gval,sdam,ldam,mgc,nutr,mohs,glass,color) \
  8.      OBJECT(OBJ(name, desc),                                             \
  9.             BITS(kn, 1, 0, 0, mgc, 0, 0, 0, 0,                           \
  10.                  HARDGEM(mohs), 0, -P_SLING, glass),                     \
  11.             0, GEM_CLASS, prob, 0, wt, gval, sdam, ldam, 0, 0, nutr, color)
  12.  GEM("dilithium crystal", "white",  2, 1, 4500, 15,  5, GEMSTONE, CLR_WHITE),
  13.  GEM("diamond",           "white",  3, 1, 4000, 15, 10, GEMSTONE, CLR_WHITE),
  14.  GEM("ruby",                "red",  4, 1, 3500, 15,  9, GEMSTONE, CLR_RED),
  15.  GEM("jacinth",          "orange",  3, 1, 3250, 15,  9, GEMSTONE, CLR_ORANGE),
  16.  GEM("sapphire",           "blue",  4, 1, 3000, 15,  9, GEMSTONE, CLR_BLUE),
  17.  GEM("black opal",        "black",  3, 1, 2500, 15,  8, GEMSTONE, CLR_BLACK),
  18.  GEM("emerald",           "green",  5, 1, 2500, 15,  8, GEMSTONE, CLR_GREEN),
  19.  GEM("turquoise",         "green",  6, 1, 2000, 15,  6, GEMSTONE, CLR_GREEN),
  20.  GEM("citrine",          "yellow",  4, 1, 1500, 15,  6, GEMSTONE, CLR_YELLOW),
  21.  GEM("aquamarine",        "green",  6, 1, 1500, 15,  8, GEMSTONE, CLR_GREEN),
  22.  GEM("amber",   "yellowish brown",  8, 1, 1000, 15,  2, GEMSTONE, CLR_BROWN),
  23.  GEM("topaz",   "yellowish brown", 10, 1,  900, 15,  8, GEMSTONE, CLR_BROWN),
  24.  GEM("jet",               "black",  6, 1,  850, 15,  7, GEMSTONE, CLR_BLACK),
  25.  GEM("opal",              "white", 12, 1,  800, 15,  6, GEMSTONE, CLR_WHITE),
  26.  GEM("chrysoberyl",      "yellow",  8, 1,  700, 15,  5, GEMSTONE, CLR_YELLOW),
  27.  GEM("garnet",              "red", 12, 1,  700, 15,  7, GEMSTONE, CLR_RED),
  28.  GEM("amethyst",         "violet", 14, 1,  600, 15,  7, GEMSTONE, CLR_MAGENTA),
  29.  GEM("jasper",              "red", 15, 1,  500, 15,  7, GEMSTONE, CLR_RED),
  30.  GEM("fluorite",         "violet", 15, 1,  400, 15,  4, GEMSTONE, CLR_MAGENTA),
  31.  GEM("obsidian",          "black",  9, 1,  200, 15,  6, GEMSTONE, CLR_BLACK),
  32.  GEM("agate",            "orange", 12, 1,  200, 15,  6, GEMSTONE, CLR_ORANGE),
  33.  GEM("jade",              "green", 10, 1,  300, 15,  6, GEMSTONE, CLR_GREEN),
  34.  GEM("worthless piece of white glass", "white",
  35.      77, 1, 0, 6, 5, GLASS, CLR_WHITE),
  36.  GEM("worthless piece of blue glass", "blue",
  37.      77, 1, 0, 6, 5, GLASS, CLR_BLUE),
  38.  GEM("worthless piece of red glass", "red",
  39.      77, 1, 0, 6, 5, GLASS, CLR_RED),
  40.  GEM("worthless piece of yellowish brown glass", "yellowish brown",
  41.      77, 1, 0, 6, 5, GLASS, CLR_BROWN),
  42.  GEM("worthless piece of orange glass", "orange",
  43.      76, 1, 0, 6, 5, GLASS, CLR_ORANGE),
  44.  GEM("worthless piece of yellow glass", "yellow",
  45.      77, 1, 0, 6, 5, GLASS, CLR_YELLOW),
  46.  GEM("worthless piece of black glass", "black",
  47.      76, 1, 0, 6, 5, GLASS, CLR_BLACK),
  48.  GEM("worthless piece of green glass", "green",
  49.      77, 1, 0, 6, 5, GLASS, CLR_GREEN),
  50.  GEM("worthless piece of violet glass", "violet",
  51.      77, 1, 0, 6, 5, GLASS, CLR_MAGENTA),
  52.  
  53.  /* Placement note: there is a wishable subrange for
  54.   * "gray stones" in the o_ranges[] array in objnam.c
  55.   * that is currently everything between luckstones and flint
  56.   * (inclusive).
  57.   */
  58.  ROCK("luckstone", "gray",  0,  10,  10, 60, 3, 3, 1, 10, 7, MINERAL, CLR_GRAY),
  59.  ROCK("loadstone", "gray",  0,  10, 500,  1, 3, 3, 1, 10, 6, MINERAL, CLR_GRAY),
  60.  ROCK("touchstone", "gray", 0,   8,  10, 45, 3, 3, 1, 10, 6, MINERAL, CLR_GRAY),
  61.  ROCK("flint", "gray",      0,  10,  10,  1, 6, 6, 0, 10, 7, MINERAL, CLR_GRAY),
  62.  ROCK("rock", None,         1, 100,  10,  0, 3, 3, 0, 10, 7, MINERAL, CLR_GRAY),
  63.  #undef GEM
  64.  #undef ROCK
  65.  

Miscellaneous

  1.  /* miscellaneous ... */
  2.  /* Note: boulders and rocks are not normally created at random; the
  3.   * probabilities only come into effect when you try to polymorph them.
  4.   * Boulders weigh more than MAX_CARR_CAP; statues use corpsenm to take
  5.   * on a specific type and may act as containers (both affect weight).
  6.   */
  7.  OBJECT(OBJ("boulder", None),
  8.         BITS(1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, P_NONE, MINERAL), 0,
  9.         ROCK_CLASS, 100, 0, 6000, 0, 20, 20, 0, 0, 2000, HI_MINERAL),
  10.  OBJECT(OBJ("statue", None),
  11.         BITS(1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, P_NONE, MINERAL), 0,
  12.         ROCK_CLASS, 900, 0, 2500, 0, 20, 20, 0, 0, 2500, CLR_WHITE),
  13.  
  14.  OBJECT(OBJ("heavy iron ball", None),
  15.         BITS(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, WHACK, P_NONE, IRON), 0,
  16.         BALL_CLASS, 1000, 0, 480, 10, 25, 25, 0, 0, 200, HI_METAL),
  17.          /* +d4 when "very heavy" */
  18.  OBJECT(OBJ("iron chain", None),
  19.         BITS(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, WHACK, P_NONE, IRON), 0,
  20.         CHAIN_CLASS, 1000, 0, 120, 0, 4, 4, 0, 0, 200, HI_METAL),
  21.          /* +1 both l & s */
  22.  
  23.  /* Venom is normally a transitory missile (spit by various creatures)
  24.   * but can be wished for in wizard mode so could occur in bones data.
  25.   */
  26.  OBJECT(OBJ("blinding venom", "splash of venom"),
  27.         BITS(0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, P_NONE, LIQUID), 0,
  28.         VENOM_CLASS, 500, 0, 1, 0, 0, 0, 0, 0, 0, HI_ORGANIC),
  29.  OBJECT(OBJ("acid venom", "splash of venom"),
  30.         BITS(0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, P_NONE, LIQUID), 0,
  31.         VENOM_CLASS, 500, 0, 1, 0, 6, 6, 0, 0, 0, HI_ORGANIC),
  32.          /* +d6 small or large */
  33.  
  34.  /* fencepost, the deadly Array Terminator -- name [1st arg] *must* be NULL */
  35.  OBJECT(OBJ(None, None),
  36.         BITS(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, P_NONE, 0), 0,
  37.         ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
  38.  }; /* objects[] */
  39.  
  40.  #ifndef OBJECTS_PASS_2_
  41.  
  42.  /* perform recursive compilation for second structure */
  43.  #undef OBJ
  44.  #undef OBJECT
  45.  #define OBJECTS_PASS_2_
  46.  #include "objects.c"
  47.  
  48.  /* clang-format on */
  49.  /* *INDENT-ON* */
  50.  
  51.  void NDECL(objects_init);
  52.  

objects_init

  1.  /* dummy routine used to force linkage */
  2.  void
  3.  objects_init()
  4.  {
  5.      return;
  6.  }
  7.  
  8.  #endif /* !OBJECTS_PASS_2_ */
  9.  
  10.  /*objects.c*/