Source:NetHack 3.6.1/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.1. To link to a particular line, write [[Source:NetHack 3.6.1/src/objects.c#line123]], for example.

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. */

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.

  1.  
  2.  /*
  3.   * The data in this file is processed twice, to construct two arrays.
  4.   * On the first pass, only object name and object description matter.
  5.   * On the second pass, all object-class fields except those two matter.
  6.   * 2nd pass is a recursive inclusion of this file, not a 2nd compilation.
  7.   * The name/description array is also used by makedefs and lev_comp.
  8.   *
  9.   * #ifndef OBJECTS_PASS_2_
  10.   * # define OBJECT(name,desc,foo,bar,glorkum) name,desc
  11.   * struct objdescr obj_descr[] =
  12.   * #else
  13.   * # define OBJECT(name,desc,foo,bar,glorkum) foo,bar,glorkum
  14.   * struct objclass objects[] =
  15.   * #endif
  16.   * {
  17.   *   { OBJECT("strange object",NULL, 1,2,3) },
  18.   *   { OBJECT("arrow","pointy stick", 4,5,6) },
  19.   *   ...
  20.   *   { OBJECT(NULL,NULL, 0,0,0) }
  21.   * };
  22.   * #define OBJECTS_PASS_2_
  23.   * #include "objects.c"
  24.   */
  25.  
  26.  /* *INDENT-OFF* */
  27.  /* clang-format off */
  28.  
  29.  #ifndef OBJECTS_PASS_2_
  30.  /* first pass */
  31.  struct monst { struct monst *dummy; };  /* lint: struct obj's union */
  32.  #include "config.h"
  33.  #include "obj.h"
  34.  #include "objclass.h"
  35.  #include "prop.h"
  36.  #include "skills.h"
  37.  
  38.  #else /* !OBJECTS_PASS_2_ */
  39.  /* second pass */
  40.  #include "color.h"
  41.  #define COLOR_FIELD(X) X,
  42.  #endif /* !OBJECTS_PASS_2_ */
  43.  
  44.  /* objects have symbols: ) [ = " ( % ! ? + / $ * ` 0 _ . */
  45.  
  46.  /*
  47.   *      Note:  OBJ() and BITS() macros are used to avoid exceeding argument
  48.   *      limits imposed by some compilers.  The ctnr field of BITS currently
  49.   *      does not map into struct objclass, and is ignored in the expansion.
  50.   *      The 0 in the expansion corresponds to oc_pre_discovered, which is
  51.   *      set at run-time during role-specific character initialization.
  52.   */
  53.  
  54.  #ifndef OBJECTS_PASS_2_
  55.  /* first pass -- object descriptive text */
  56.  #define OBJ(name,desc)  name, desc
  57.  #define OBJECT(obj,bits,prp,sym,prob,dly,wt, \
  58.                 cost,sdam,ldam,oc1,oc2,nut,color)  { obj }
  59.  #define None (char *) 0 /* less visual distraction for 'no description' */
  60.  
  61.  NEARDATA struct objdescr obj_descr[] =
  62.  #else
  63.  /* second pass -- object definitions */
  64.  #define BITS(nmkn,mrg,uskn,ctnr,mgc,chrg,uniq,nwsh,big,tuf,dir,sub,mtrl) \
  65.    nmkn,mrg,uskn,0,mgc,chrg,uniq,nwsh,big,tuf,dir,mtrl,sub /*SCO cpp fodder*/
  66.  #define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \
  67.    { 0, 0, (char *) 0, bits, prp, sym, dly, COLOR_FIELD(color) prob, wt, \
  68.      cost, sdam, ldam, oc1, oc2, nut }
  69.  #ifndef lint
  70.  #define HARDGEM(n) (n >= 8)
  71.  #else
  72.  #define HARDGEM(n) (0)
  73.  #endif
  74.  
  75.  NEARDATA struct objclass objects[] =
  76.  #endif
  77.  {
  78.  /* dummy object[0] -- description [2nd arg] *must* be NULL */
  79.  OBJECT(OBJ("strange object", None),
  80.         BITS(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, P_NONE, 0),
  81.         0, ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
  82.  
  83.  /* weapons ... */
  84.  #define WEAPON(name,desc,kn,mg,bi,prob,wt,                \
  85.                 cost,sdam,ldam,hitbon,typ,sub,metal,color) \
  86.      OBJECT(OBJ(name,desc),                                          \
  87.             BITS(kn, mg, 1, 0, 0, 1, 0, 0, bi, 0, typ, sub, metal),  \
  88.             0, WEAPON_CLASS, prob, 0, wt,                            \
  89.             cost, sdam, ldam, hitbon, 0, wt, color)
  90.  #define PROJECTILE(name,desc,kn,prob,wt,                  \
  91.                     cost,sdam,ldam,hitbon,metal,sub,color) \
  92.      OBJECT(OBJ(name,desc),                                          \
  93.             BITS(kn, 1, 1, 0, 0, 1, 0, 0, 0, 0, PIERCE, sub, metal), \
  94.             0, WEAPON_CLASS, prob, 0, wt,                            \
  95.             cost, sdam, ldam, hitbon, 0, wt, color)
  96.  #define BOW(name,desc,kn,prob,wt,cost,hitbon,metal,sub,color) \
  97.      OBJECT(OBJ(name,desc),                                          \
  98.             BITS(kn, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, sub, metal),      \
  99.             0, WEAPON_CLASS, prob, 0, wt,                            \
  100.             cost, 2, 2, hitbon, 0, wt, color)
  101.  
  102.  /* Note: for weapons that don't do an even die of damage (ex. 2-7 or 3-18)
  103.     the extra damage is added on in weapon.c, not here! */
  104.  
  105.  #define P PIERCE
  106.  #define S SLASH
  107.  #define B WHACK
  108.  
  109.  /* missiles; materiel reflects the arrowhead, not the shaft */
  110.  PROJECTILE("arrow", None,
  111.             1, 55, 1, 2, 6, 6, 0,        IRON, -P_BOW, HI_METAL),
  112.  PROJECTILE("elven arrow", "runed arrow",
  113.             0, 20, 1, 2, 7, 6, 0,        WOOD, -P_BOW, HI_WOOD),
  114.  PROJECTILE("orcish arrow", "crude arrow",
  115.             0, 20, 1, 2, 5, 6, 0,        IRON, -P_BOW, CLR_BLACK),
  116.  PROJECTILE("silver arrow", None,
  117.             1, 12, 1, 5, 6, 6, 0,        SILVER, -P_BOW, HI_SILVER),
  118.  PROJECTILE("ya", "bamboo arrow",
  119.             0, 15, 1, 4, 7, 7, 1,        METAL, -P_BOW, HI_METAL),
  120.  PROJECTILE("crossbow bolt", None,
  121.             1, 55, 1, 2, 4, 6, 0,        IRON, -P_CROSSBOW, HI_METAL),
  122.  
  123.  /* missiles that don't use a launcher */
  124.  WEAPON("dart", None,
  125.         1, 1, 0, 60,   1,   2,  3,  2, 0, P,   -P_DART, IRON, HI_METAL),
  126.  WEAPON("shuriken", "throwing star",
  127.         0, 1, 0, 35,   1,   5,  8,  6, 2, P,   -P_SHURIKEN, IRON, HI_METAL),
  128.  WEAPON("boomerang", None,
  129.         1, 1, 0, 15,   5,  20,  9,  9, 0, 0,   -P_BOOMERANG, WOOD, HI_WOOD),
  130.  
  131.  /* spears [note: javelin used to have a separate skill from spears,
  132.     because the latter are primarily stabbing weapons rather than
  133.     throwing ones; but for playability, they've been merged together
  134.     under spear skill and spears can now be thrown like javelins] */
  135.  WEAPON("spear", None,
  136.         1, 1, 0, 50,  30,   3,  6,  8, 0, P,   P_SPEAR, IRON, HI_METAL),
  137.  WEAPON("elven spear", "runed spear",
  138.         0, 1, 0, 10,  30,   3,  7,  8, 0, P,   P_SPEAR, WOOD, HI_WOOD),
  139.  WEAPON("orcish spear", "crude spear",
  140.         0, 1, 0, 13,  30,   3,  5,  8, 0, P,   P_SPEAR, IRON, CLR_BLACK),
  141.  WEAPON("dwarvish spear", "stout spear",
  142.         0, 1, 0, 12,  35,   3,  8,  8, 0, P,   P_SPEAR, IRON, HI_METAL),
  143.  WEAPON("silver spear", None,
  144.         1, 1, 0,  2,  36,  40,  6,  8, 0, P,   P_SPEAR, SILVER, HI_SILVER),
  145.  WEAPON("javelin", "throwing spear",
  146.         0, 1, 0, 10,  20,   3,  6,  6, 0, P,   P_SPEAR, IRON, HI_METAL),
  147.  
  148.  /* spearish; doesn't stack, not intended to be thrown */
  149.  WEAPON("trident", None,
  150.         1, 0, 0,  8,  25,   5,  6,  4, 0, P,   P_TRIDENT, IRON, HI_METAL),
  151.          /* +1 small, +2d4 large */
  152.  
  153.  /* blades; all stack */
  154.  WEAPON("dagger", None,
  155.         1, 1, 0, 30,  10,   4,  4,  3, 2, P,   P_DAGGER, IRON, HI_METAL),
  156.  WEAPON("elven dagger", "runed dagger",
  157.         0, 1, 0, 10,  10,   4,  5,  3, 2, P,   P_DAGGER, WOOD, HI_WOOD),
  158.  WEAPON("orcish dagger", "crude dagger",
  159.         0, 1, 0, 12,  10,   4,  3,  3, 2, P,   P_DAGGER, IRON, CLR_BLACK),
  160.  WEAPON("silver dagger", None,
  161.         1, 1, 0,  3,  12,  40,  4,  3, 2, P,   P_DAGGER, SILVER, HI_SILVER),
  162.  WEAPON("athame", None,
  163.         1, 1, 0,  0,  10,   4,  4,  3, 2, S,   P_DAGGER, IRON, HI_METAL),
  164.  WEAPON("scalpel", None,
  165.         1, 1, 0,  0,   5,   6,  3,  3, 2, S,   P_KNIFE, METAL, HI_METAL),
  166.  WEAPON("knife", None,
  167.         1, 1, 0, 20,   5,   4,  3,  2, 0, P|S, P_KNIFE, IRON, HI_METAL),
  168.  WEAPON("stiletto", None,
  169.         1, 1, 0,  5,   5,   4,  3,  2, 0, P|S, P_KNIFE, IRON, HI_METAL),
  170.  /* 3.6: worm teeth and crysknives now stack;
  171.     when a stack of teeth is enchanted at once, they fuse into one crysknife;
  172.     when a stack of crysknives drops, the whole stack reverts to teeth */
  173.  WEAPON("worm tooth", None,
  174.         1, 1, 0,  0,  20,   2,  2,  2, 0, 0,   P_KNIFE, 0, CLR_WHITE),
  175.  WEAPON("crysknife", None,
  176.         1, 1, 0,  0,  20, 100, 10, 10, 3, P,   P_KNIFE, MINERAL, CLR_WHITE),
  177.  
  178.  /* axes */
  179.  WEAPON("axe", None,
  180.         1, 0, 0, 40,  60,   8,  6,  4, 0, S,   P_AXE, IRON, HI_METAL),
  181.  WEAPON("battle-axe", "double-headed axe",       /* "double-bitted"? */
  182.         0, 0, 1, 10, 120,  40,  8,  6, 0, S,   P_AXE, IRON, HI_METAL),
  183.  
  184.  /* swords */
  185.  WEAPON("short sword", None,
  186.         1, 0, 0,  8,  30,  10,  6,  8, 0, P,   P_SHORT_SWORD, IRON, HI_METAL),
  187.  WEAPON("elven short sword", "runed short sword",
  188.         0, 0, 0,  2,  30,  10,  8,  8, 0, P,   P_SHORT_SWORD, WOOD, HI_WOOD),
  189.  WEAPON("orcish short sword", "crude short sword",
  190.         0, 0, 0,  3,  30,  10,  5,  8, 0, P,   P_SHORT_SWORD, IRON, CLR_BLACK),
  191.  WEAPON("dwarvish short sword", "broad short sword",
  192.         0, 0, 0,  2,  30,  10,  7,  8, 0, P,   P_SHORT_SWORD, IRON, HI_METAL),
  193.  WEAPON("scimitar", "curved sword",
  194.         0, 0, 0, 15,  40,  15,  8,  8, 0, S,   P_SCIMITAR, IRON, HI_METAL),
  195.  WEAPON("silver saber", None,
  196.         1, 0, 0,  6,  40,  75,  8,  8, 0, S,   P_SABER, SILVER, HI_SILVER),
  197.  WEAPON("broadsword", None,
  198.         1, 0, 0,  8,  70,  10,  4,  6, 0, S,   P_BROAD_SWORD, IRON, HI_METAL),
  199.          /* +d4 small, +1 large */
  200.  WEAPON("elven broadsword", "runed broadsword",
  201.         0, 0, 0,  4,  70,  10,  6,  6, 0, S,   P_BROAD_SWORD, WOOD, HI_WOOD),
  202.          /* +d4 small, +1 large */
  203.  WEAPON("long sword", None,
  204.         1, 0, 0, 50,  40,  15,  8, 12, 0, S,   P_LONG_SWORD, IRON, HI_METAL),
  205.  WEAPON("two-handed sword", None,
  206.         1, 0, 1, 22, 150,  50, 12,  6, 0, S,   P_TWO_HANDED_SWORD,
  207.                                                              IRON, HI_METAL),
  208.          /* +2d6 large */
  209.  WEAPON("katana", "samurai sword",
  210.         0, 0, 0,  4,  40,  80, 10, 12, 1, S,   P_LONG_SWORD, IRON, HI_METAL),
  211.  /* special swords set up for artifacts */
  212.  WEAPON("tsurugi", "long samurai sword",
  213.         0, 0, 1,  0,  60, 500, 16,  8, 2, S,   P_TWO_HANDED_SWORD,
  214.                                                              METAL, HI_METAL),
  215.          /* +2d6 large */
  216.  WEAPON("runesword", "runed broadsword",
  217.         0, 0, 0,  0,  40, 300,  4,  6, 0, S,   P_BROAD_SWORD, IRON, CLR_BLACK),
  218.          /* +d4 small, +1 large; Stormbringer: +5d2 +d8 from level drain */
  219.  
  220.  /* polearms */
  221.  /* spear-type */
  222.  WEAPON("partisan", "vulgar polearm",
  223.         0, 0, 1,  5,  80,  10,  6,  6, 0, P,   P_POLEARMS, IRON, HI_METAL),
  224.          /* +1 large */
  225.  WEAPON("ranseur", "hilted polearm",
  226.         0, 0, 1,  5,  50,   6,  4,  4, 0, P,   P_POLEARMS, IRON, HI_METAL),
  227.          /* +d4 both */
  228.  WEAPON("spetum", "forked polearm",
  229.         0, 0, 1,  5,  50,   5,  6,  6, 0, P,   P_POLEARMS, IRON, HI_METAL),
  230.          /* +1 small, +d6 large */
  231.  WEAPON("glaive", "single-edged polearm",
  232.         0, 0, 1,  8,  75,   6,  6, 10, 0, S,   P_POLEARMS, IRON, HI_METAL),
  233.  WEAPON("lance", None,
  234.         1, 0, 0,  4, 180,  10,  6,  8, 0, P,   P_LANCE, IRON, HI_METAL),
  235.          /* +2d10 when jousting with lance as primary weapon */
  236.  /* axe-type */
  237.  WEAPON("halberd", "angled poleaxe",
  238.         0, 0, 1,  8, 150,  10, 10,  6, 0, P|S, P_POLEARMS, IRON, HI_METAL),
  239.          /* +1d6 large */
  240.  WEAPON("bardiche", "long poleaxe",
  241.         0, 0, 1,  4, 120,   7,  4,  4, 0, S,   P_POLEARMS, IRON, HI_METAL),
  242.          /* +1d4 small, +2d4 large */
  243.  WEAPON("voulge", "pole cleaver",
  244.         0, 0, 1,  4, 125,   5,  4,  4, 0, S,   P_POLEARMS, IRON, HI_METAL),
  245.          /* +d4 both */
  246.  WEAPON("dwarvish mattock", "broad pick",
  247.         0, 0, 1, 13, 120,  50, 12,  8, -1, B,  P_PICK_AXE, IRON, HI_METAL),
  248.  /* curved/hooked */
  249.  WEAPON("fauchard", "pole sickle",
  250.         0, 0, 1,  6,  60,   5,  6,  8, 0, P|S, P_POLEARMS, IRON, HI_METAL),
  251.  WEAPON("guisarme", "pruning hook",
  252.         0, 0, 1,  6,  80,   5,  4,  8, 0, S,   P_POLEARMS, IRON, HI_METAL),
  253.          /* +1d4 small */
  254.  WEAPON("bill-guisarme", "hooked polearm",
  255.         0, 0, 1,  4, 120,   7,  4, 10, 0, P|S, P_POLEARMS, IRON, HI_METAL),
  256.          /* +1d4 small */
  257.  /* other */
  258.  WEAPON("lucern hammer", "pronged polearm",
  259.         0, 0, 1,  5, 150,   7,  4,  6, 0, B|P, P_POLEARMS, IRON, HI_METAL),
  260.          /* +1d4 small */
  261.  WEAPON("bec de corbin", "beaked polearm",
  262.         0, 0, 1,  4, 100,   8,  8,  6, 0, B|P, P_POLEARMS, IRON, HI_METAL),
  263.  
  264.  /* bludgeons */
  265.  WEAPON("mace", None,
  266.         1, 0, 0, 40,  30,   5,  6,  6, 0, B,   P_MACE, IRON, HI_METAL),
  267.          /* +1 small */
  268.  WEAPON("morning star", None,
  269.         1, 0, 0, 12, 120,  10,  4,  6, 0, B,   P_MORNING_STAR, IRON, HI_METAL),
  270.          /* +d4 small, +1 large */
  271.  WEAPON("war hammer", None,
  272.         1, 0, 0, 15,  50,   5,  4,  4, 0, B,   P_HAMMER, IRON, HI_METAL),
  273.          /* +1 small */
  274.  WEAPON("club", None,
  275.         1, 0, 0, 12,  30,   3,  6,  3, 0, B,   P_CLUB, WOOD, HI_WOOD),
  276.  WEAPON("rubber hose", None,
  277.         1, 0, 0,  0,  20,   3,  4,  3, 0, B,   P_WHIP, PLASTIC, CLR_BROWN),
  278.  WEAPON("quarterstaff", "staff",
  279.         0, 0, 1, 11,  40,   5,  6,  6, 0, B,   P_QUARTERSTAFF, WOOD, HI_WOOD),
  280.  /* two-piece */
  281.  WEAPON("aklys", "thonged club",
  282.         0, 0, 0,  8,  15,   4,  6,  3, 0, B,   P_CLUB, IRON, HI_METAL),
  283.  WEAPON("flail", None,
  284.         1, 0, 0, 40,  15,   4,  6,  4, 0, B,   P_FLAIL, IRON, HI_METAL),
  285.          /* +1 small, +1d4 large */
  286.  
  287.  /* misc */
  288.  WEAPON("bullwhip", None,
  289.         1, 0, 0,  2,  20,   4,  2,  1, 0, 0,   P_WHIP, LEATHER, CLR_BROWN),
  290.  
  291.  /* bows */
  292.  BOW("bow", None,               1, 24, 30, 60, 0, WOOD, P_BOW, HI_WOOD),
  293.  BOW("elven bow", "runed bow",  0, 12, 30, 60, 0, WOOD, P_BOW, HI_WOOD),
  294.  BOW("orcish bow", "crude bow", 0, 12, 30, 60, 0, WOOD, P_BOW, CLR_BLACK),
  295.  BOW("yumi", "long bow",        0,  0, 30, 60, 0, WOOD, P_BOW, HI_WOOD),
  296.  BOW("sling", None,             1, 40,  3, 20, 0, LEATHER, P_SLING, HI_LEATHER),
  297.  BOW("crossbow", None,          1, 45, 50, 40, 0, WOOD, P_CROSSBOW, HI_WOOD),
  298.  
  299.  #undef P
  300.  #undef S
  301.  #undef B
  302.  
  303.  #undef WEAPON
  304.  #undef PROJECTILE
  305.  #undef BOW
  306.  
  307.  /* armor ... */
  308.          /* IRON denotes ferrous metals, including steel.
  309.           * Only IRON weapons and armor can rust.
  310.           * Only COPPER (including brass) corrodes.
  311.           * Some creatures are vulnerable to SILVER.
  312.           */
  313.  #define ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,  \
  314.                cost,ac,can,sub,metal,c)                   \
  315.      OBJECT(OBJ(name, desc),                                         \
  316.             BITS(kn, 0, 1, 0, mgc, 1, 0, 0, blk, 0, 0, sub, metal),  \
  317.             power, ARMOR_CLASS, prob, delay, wt,                     \
  318.             cost, 0, 0, 10 - ac, can, wt, c)
  319.  #define HELM(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c)  \
  320.      ARMOR(name, desc, kn, mgc, 0, power, prob, delay, wt,  \
  321.            cost, ac, can, ARM_HELM, metal, c)
  322.  #define CLOAK(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c)  \
  323.      ARMOR(name, desc, kn, mgc, 0, power, prob, delay, wt,  \
  324.            cost, ac, can, ARM_CLOAK, metal, c)
  325.  #define SHIELD(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,metal,c) \
  326.      ARMOR(name, desc, kn, mgc, blk, power, prob, delay, wt, \
  327.            cost, ac, can, ARM_SHIELD, metal, c)
  328.  #define GLOVES(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c)  \
  329.      ARMOR(name, desc, kn, mgc, 0, power, prob, delay, wt,  \
  330.            cost, ac, can, ARM_GLOVES, metal, c)
  331.  #define BOOTS(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c)  \
  332.      ARMOR(name, desc, kn, mgc, 0, power, prob, delay, wt,  \
  333.            cost, ac, can, ARM_BOOTS, metal, c)
  334.  
  335.  /* helmets */
  336.  HELM("elven leather helm", "leather hat",
  337.       0, 0,           0,  6, 1,  3,  8,  9, 0, LEATHER, HI_LEATHER),
  338.  HELM("orcish helm", "iron skull cap",
  339.       0, 0,           0,  6, 1, 30, 10,  9, 0, IRON, CLR_BLACK),
  340.  HELM("dwarvish iron helm", "hard hat",
  341.       0, 0,           0,  6, 1, 40, 20,  8, 0, IRON, HI_METAL),
  342.  HELM("fedora", None,
  343.       1, 0,           0,  0, 0,  3,  1, 10, 0, CLOTH, CLR_BROWN),
  344.  HELM("cornuthaum", "conical hat",
  345.       0, 1, CLAIRVOYANT,  3, 1,  4, 80, 10, 1, CLOTH, CLR_BLUE),
  346.          /* name coined by devteam; confers clairvoyance for wizards,
  347.             blocks clairvoyance if worn by role other than wizard */
  348.  HELM("dunce cap", "conical hat",
  349.       0, 1,           0,  3, 1,  4,  1, 10, 0, CLOTH, CLR_BLUE),
  350.  HELM("dented pot", None,
  351.       1, 0,           0,  2, 0, 10,  8,  9, 0, IRON, CLR_BLACK),
  352.  /* with shuffled appearances... */
  353.  HELM("helmet", "plumed helmet",
  354.       0, 0,           0, 10, 1, 30, 10,  9, 0, IRON, HI_METAL),
  355.  HELM("helm of brilliance", "etched helmet",
  356.       0, 1,           0,  6, 1, 50, 50,  9, 0, IRON, CLR_GREEN),
  357.  HELM("helm of opposite alignment", "crested helmet",
  358.       0, 1,           0,  6, 1, 50, 50,  9, 0, IRON, HI_METAL),
  359.  HELM("helm of telepathy", "visored helmet",
  360.       0, 1,     TELEPAT,  2, 1, 50, 50,  9, 0, IRON, HI_METAL),
  361.  
  362.  /* suits of armor */
  363.  /*
  364.   * There is code in polyself.c that assumes (1) and (2).
  365.   * There is code in obj.h, objnam.c, mon.c, read.c that assumes (2).
  366.   *      (1) The dragon scale mails and the dragon scales are together.
  367.   *      (2) That the order of the dragon scale mail and dragon scales
  368.   *          is the the same as order of dragons defined in monst.c.
  369.   */
  370.  #define DRGN_ARMR(name,mgc,power,cost,ac,color)  \
  371.      ARMOR(name, None, 1, mgc, 1, power, 0, 5, 40,  \
  372.            cost, ac, 0, ARM_SUIT, DRAGON_HIDE, color)
  373.  /* 3.4.1: dragon scale mail reclassified as "magic" since magic is
  374.     needed to create them */
  375.  DRGN_ARMR("gray dragon scale mail",    1, ANTIMAGIC,  1200, 1, CLR_GRAY),
  376.  DRGN_ARMR("silver dragon scale mail",  1, REFLECTING, 1200, 1, DRAGON_SILVER),
  377.  #if 0 /* DEFERRED */
  378.  DRGN_ARMR("shimmering dragon scale mail", 1, DISPLACED, 1200, 1, CLR_CYAN),
  379.  #endif
  380.  DRGN_ARMR("red dragon scale mail",     1, FIRE_RES,    900, 1, CLR_RED),
  381.  DRGN_ARMR("white dragon scale mail",   1, COLD_RES,    900, 1, CLR_WHITE),
  382.  DRGN_ARMR("orange dragon scale mail",  1, SLEEP_RES,   900, 1, CLR_ORANGE),
  383.  DRGN_ARMR("black dragon scale mail",   1, DISINT_RES, 1200, 1, CLR_BLACK),
  384.  DRGN_ARMR("blue dragon scale mail",    1, SHOCK_RES,   900, 1, CLR_BLUE),
  385.  DRGN_ARMR("green dragon scale mail",   1, POISON_RES,  900, 1, CLR_GREEN),
  386.  DRGN_ARMR("yellow dragon scale mail",  1, ACID_RES,    900, 1, CLR_YELLOW),
  387.  /* For now, only dragons leave these. */
  388.  /* 3.4.1: dragon scales left classified as "non-magic"; they confer
  389.     magical properties but are produced "naturally" */
  390.  DRGN_ARMR("gray dragon scales",        0, ANTIMAGIC,   700, 7, CLR_GRAY),
  391.  DRGN_ARMR("silver dragon scales",      0, REFLECTING,  700, 7, DRAGON_SILVER),
  392.  #if 0 /* DEFERRED */
  393.  DRGN_ARMR("shimmering dragon scales",  0, DISPLACED,   700, 7, CLR_CYAN),
  394.  #endif
  395.  DRGN_ARMR("red dragon scales",         0, FIRE_RES,    500, 7, CLR_RED),
  396.  DRGN_ARMR("white dragon scales",       0, COLD_RES,    500, 7, CLR_WHITE),
  397.  DRGN_ARMR("orange dragon scales",      0, SLEEP_RES,   500, 7, CLR_ORANGE),
  398.  DRGN_ARMR("black dragon scales",       0, DISINT_RES,  700, 7, CLR_BLACK),
  399.  DRGN_ARMR("blue dragon scales",        0, SHOCK_RES,   500, 7, CLR_BLUE),
  400.  DRGN_ARMR("green dragon scales",       0, POISON_RES,  500, 7, CLR_GREEN),
  401.  DRGN_ARMR("yellow dragon scales",      0, ACID_RES,    500, 7, CLR_YELLOW),
  402.  #undef DRGN_ARMR
  403.  /* other suits */
  404.  ARMOR("plate mail", None,
  405.        1, 0, 1,  0, 44, 5, 450, 600,  3, 2,  ARM_SUIT, IRON, HI_METAL),
  406.  ARMOR("crystal plate mail", None,
  407.        1, 0, 1,  0, 10, 5, 450, 820,  3, 2,  ARM_SUIT, GLASS, CLR_WHITE),
  408.  ARMOR("bronze plate mail", None,
  409.        1, 0, 1,  0, 25, 5, 450, 400,  4, 1,  ARM_SUIT, COPPER, HI_COPPER),
  410.  ARMOR("splint mail", None,
  411.        1, 0, 1,  0, 62, 5, 400,  80,  4, 1,  ARM_SUIT, IRON, HI_METAL),
  412.  ARMOR("banded mail", None,
  413.        1, 0, 1,  0, 72, 5, 350,  90,  4, 1,  ARM_SUIT, IRON, HI_METAL),
  414.  ARMOR("dwarvish mithril-coat", None,
  415.        1, 0, 0,  0, 10, 1, 150, 240,  4, 2,  ARM_SUIT, MITHRIL, HI_SILVER),
  416.  ARMOR("elven mithril-coat", None,
  417.        1, 0, 0,  0, 15, 1, 150, 240,  5, 2,  ARM_SUIT, MITHRIL, HI_SILVER),
  418.  ARMOR("chain mail", None,
  419.        1, 0, 0,  0, 72, 5, 300,  75,  5, 1,  ARM_SUIT, IRON, HI_METAL),
  420.  ARMOR("orcish chain mail", "crude chain mail",
  421.        0, 0, 0,  0, 20, 5, 300,  75,  6, 1,  ARM_SUIT, IRON, CLR_BLACK),
  422.  ARMOR("scale mail", None,
  423.        1, 0, 0,  0, 72, 5, 250,  45,  6, 1,  ARM_SUIT, IRON, HI_METAL),
  424.  ARMOR("studded leather armor", None,
  425.        1, 0, 0,  0, 72, 3, 200,  15,  7, 1,  ARM_SUIT, LEATHER, HI_LEATHER),
  426.  ARMOR("ring mail", None,
  427.        1, 0, 0,  0, 72, 5, 250, 100,  7, 1,  ARM_SUIT, IRON, HI_METAL),
  428.  ARMOR("orcish ring mail", "crude ring mail",
  429.        0, 0, 0,  0, 20, 5, 250,  80,  8, 1,  ARM_SUIT, IRON, CLR_BLACK),
  430.  ARMOR("leather armor", None,
  431.        1, 0, 0,  0, 82, 3, 150,   5,  8, 1,  ARM_SUIT, LEATHER, HI_LEATHER),
  432.  ARMOR("leather jacket", None,
  433.        1, 0, 0,  0, 12, 0,  30,  10,  9, 0,  ARM_SUIT, LEATHER, CLR_BLACK),
  434.  
  435.  /* shirts */
  436.  ARMOR("Hawaiian shirt", None,
  437.        1, 0, 0,  0,  8, 0,   5,   3, 10, 0,  ARM_SHIRT, CLOTH, CLR_MAGENTA),
  438.  ARMOR("T-shirt", None,
  439.        1, 0, 0,  0,  2, 0,   5,   2, 10, 0,  ARM_SHIRT, CLOTH, CLR_WHITE),
  440.  
  441.  /* cloaks */
  442.  CLOAK("mummy wrapping", None,
  443.        1, 0,          0,  0, 0,  3,  2, 10, 1,  CLOTH, CLR_GRAY),
  444.          /* worn mummy wrapping blocks invisibility */
  445.  CLOAK("elven cloak", "faded pall",
  446.        0, 1,    STEALTH,  8, 0, 10, 60,  9, 1,  CLOTH, CLR_BLACK),
  447.  CLOAK("orcish cloak", "coarse mantelet",
  448.        0, 0,          0,  8, 0, 10, 40, 10, 1,  CLOTH, CLR_BLACK),
  449.  CLOAK("dwarvish cloak", "hooded cloak",
  450.        0, 0,          0,  8, 0, 10, 50, 10, 1,  CLOTH, HI_CLOTH),
  451.  CLOAK("oilskin cloak", "slippery cloak",
  452.        0, 0,          0,  8, 0, 10, 50,  9, 2,  CLOTH, HI_CLOTH),
  453.  CLOAK("robe", None,
  454.        1, 1,          0,  3, 0, 15, 50,  8, 2,  CLOTH, CLR_RED),
  455.          /* robe was adopted from slash'em, where it's worn as a suit
  456.             rather than as a cloak and there are several variations */
  457.  CLOAK("alchemy smock", "apron",
  458.        0, 1, POISON_RES,  9, 0, 10, 50,  9, 1,  CLOTH, CLR_WHITE),
  459.  CLOAK("leather cloak", None,
  460.        1, 0,          0,  8, 0, 15, 40,  9, 1,  LEATHER, CLR_BROWN),
  461.  /* with shuffled appearances... */
  462.  CLOAK("cloak of protection", "tattered cape",
  463.        0, 1, PROTECTION,  9, 0, 10, 50,  7, 3,  CLOTH, HI_CLOTH),
  464.          /* cloak of protection is now the only item conferring MC 3 */
  465.  CLOAK("cloak of invisibility", "opera cloak",
  466.        0, 1,      INVIS, 10, 0, 10, 60,  9, 1,  CLOTH, CLR_BRIGHT_MAGENTA),
  467.  CLOAK("cloak of magic resistance", "ornamental cope",
  468.        0, 1,  ANTIMAGIC,  2, 0, 10, 60,  9, 1,  CLOTH, CLR_WHITE),
  469.          /*  'cope' is not a spelling mistake... leave it be */
  470.  CLOAK("cloak of displacement", "piece of cloth",
  471.        0, 1,  DISPLACED, 10, 0, 10, 50,  9, 1,  CLOTH, HI_CLOTH),
  472.  
  473.  /* shields */
  474.  SHIELD("small shield", None,
  475.         1, 0, 0,          0, 6, 0,  30,  3, 9, 0,  WOOD, HI_WOOD),
  476.  SHIELD("elven shield", "blue and green shield",
  477.         0, 0, 0,          0, 2, 0,  40,  7, 8, 0,  WOOD, CLR_GREEN),
  478.  SHIELD("Uruk-hai shield", "white-handed shield",
  479.         0, 0, 0,          0, 2, 0,  50,  7, 9, 0,  IRON, HI_METAL),
  480.  SHIELD("orcish shield", "red-eyed shield",
  481.         0, 0, 0,          0, 2, 0,  50,  7, 9, 0,  IRON, CLR_RED),
  482.  SHIELD("large shield", None,
  483.         1, 0, 1,          0, 7, 0, 100, 10, 8, 0,  IRON, HI_METAL),
  484.  SHIELD("dwarvish roundshield", "large round shield",
  485.         0, 0, 0,          0, 4, 0, 100, 10, 8, 0,  IRON, HI_METAL),
  486.  SHIELD("shield of reflection", "polished silver shield",
  487.         0, 1, 0, REFLECTING, 3, 0,  50, 50, 8, 0,  SILVER, HI_SILVER),
  488.  
  489.  /* gloves */
  490.  /* These have their color but not material shuffled, so the IRON must
  491.   * stay CLR_BROWN (== HI_LEATHER) even though it's normally either
  492.   * HI_METAL or CLR_BLACK.  All have shuffled descriptions.
  493.   */
  494.  GLOVES("leather gloves", "old gloves",
  495.         0, 0,        0, 16, 1, 10,  8, 9, 0,  LEATHER, HI_LEATHER),
  496.  GLOVES("gauntlets of fumbling", "padded gloves",
  497.         0, 1, FUMBLING,  8, 1, 10, 50, 9, 0,  LEATHER, HI_LEATHER),
  498.  GLOVES("gauntlets of power", "riding gloves",
  499.         0, 1,        0,  8, 1, 30, 50, 9, 0,  IRON, CLR_BROWN),
  500.  GLOVES("gauntlets of dexterity", "fencing gloves",
  501.         0, 1,        0,  8, 1, 10, 50, 9, 0,  LEATHER, HI_LEATHER),
  502.  
  503.  /* boots */
  504.  BOOTS("low boots", "walking shoes",
  505.        0, 0,          0, 25, 2, 10,  8, 9, 0, LEATHER, HI_LEATHER),
  506.  BOOTS("iron shoes", "hard shoes",
  507.        0, 0,          0,  7, 2, 50, 16, 8, 0, IRON, HI_METAL),
  508.  BOOTS("high boots", "jackboots",
  509.        0, 0,          0, 15, 2, 20, 12, 8, 0, LEATHER, HI_LEATHER),
  510.  /* with shuffled appearances... */
  511.  BOOTS("speed boots", "combat boots",
  512.        0, 1,       FAST, 12, 2, 20, 50, 9, 0, LEATHER, HI_LEATHER),
  513.  BOOTS("water walking boots", "jungle boots",
  514.        0, 1,   WWALKING, 12, 2, 15, 50, 9, 0, LEATHER, HI_LEATHER),
  515.  BOOTS("jumping boots", "hiking boots",
  516.        0, 1,    JUMPING, 12, 2, 20, 50, 9, 0, LEATHER, HI_LEATHER),
  517.  BOOTS("elven boots", "mud boots",
  518.        0, 1,    STEALTH, 12, 2, 15,  8, 9, 0, LEATHER, HI_LEATHER),
  519.  BOOTS("kicking boots", "buckled boots",
  520.        0, 1,          0, 12, 2, 50,  8, 9, 0, IRON, CLR_BROWN),
  521.          /* CLR_BROWN for same reason as gauntlets of power */
  522.  BOOTS("fumble boots", "riding boots",
  523.        0, 1,   FUMBLING, 12, 2, 20, 30, 9, 0, LEATHER, HI_LEATHER),
  524.  BOOTS("levitation boots", "snow boots",
  525.        0, 1, LEVITATION, 12, 2, 15, 30, 9, 0, LEATHER, HI_LEATHER),
  526.  #undef HELM
  527.  #undef CLOAK
  528.  #undef SHIELD
  529.  #undef GLOVES
  530.  #undef BOOTS
  531.  #undef ARMOR
  532.  
  533.  /* rings ... */
  534.  #define RING(name,stone,power,cost,mgc,spec,mohs,metal,color) \
  535.      OBJECT(OBJ(name, stone),                                          \
  536.             BITS(0, 0, spec, 0, mgc, spec, 0, 0, 0,                    \
  537.                  HARDGEM(mohs), 0, P_NONE, metal),                     \
  538.             power, RING_CLASS, 0, 0, 3, cost, 0, 0, 0, 0, 15, color)
  539.  RING("adornment", "wooden",
  540.       ADORNED,                  100, 1, 1, 2, WOOD, HI_WOOD),
  541.  RING("gain strength", "granite",
  542.       0,                        150, 1, 1, 7, MINERAL, HI_MINERAL),
  543.  RING("gain constitution", "opal",
  544.       0,                        150, 1, 1, 7, MINERAL, HI_MINERAL),
  545.  RING("increase accuracy", "clay",
  546.       0,                        150, 1, 1, 4, MINERAL, CLR_RED),
  547.  RING("increase damage", "coral",
  548.       0,                        150, 1, 1, 4, MINERAL, CLR_ORANGE),
  549.  RING("protection", "black onyx",
  550.       PROTECTION,               100, 1, 1, 7, MINERAL, CLR_BLACK),
  551.          /* 'PROTECTION' intrinsic enhances MC from worn armor by +1,
  552.             regardless of ring's enchantment; wearing a second ring of
  553.             protection (or even one ring of protection combined with
  554.             cloak of protection) doesn't give a second MC boost */
  555.  RING("regeneration", "moonstone",
  556.       REGENERATION,             200, 1, 0,  6, MINERAL, HI_MINERAL),
  557.  RING("searching", "tiger eye",
  558.       SEARCHING,                200, 1, 0,  6, GEMSTONE, CLR_BROWN),
  559.  RING("stealth", "jade",
  560.       STEALTH,                  100, 1, 0,  6, GEMSTONE, CLR_GREEN),
  561.  RING("sustain ability", "bronze",
  562.       FIXED_ABIL,               100, 1, 0,  4, COPPER, HI_COPPER),
  563.  RING("levitation", "agate",
  564.       LEVITATION,               200, 1, 0,  7, GEMSTONE, CLR_RED),
  565.  RING("hunger", "topaz",
  566.       HUNGER,                   100, 1, 0,  8, GEMSTONE, CLR_CYAN),
  567.  RING("aggravate monster", "sapphire",
  568.       AGGRAVATE_MONSTER,        150, 1, 0,  9, GEMSTONE, CLR_BLUE),
  569.  RING("conflict", "ruby",
  570.       CONFLICT,                 300, 1, 0,  9, GEMSTONE, CLR_RED),
  571.  RING("warning", "diamond",
  572.       WARNING,                  100, 1, 0, 10, GEMSTONE, CLR_WHITE),
  573.  RING("poison resistance", "pearl",
  574.       POISON_RES,               150, 1, 0,  4, BONE, CLR_WHITE),
  575.  RING("fire resistance", "iron",
  576.       FIRE_RES,                 200, 1, 0,  5, IRON, HI_METAL),
  577.  RING("cold resistance", "brass",
  578.       COLD_RES,                 150, 1, 0,  4, COPPER, HI_COPPER),
  579.  RING("shock resistance", "copper",
  580.       SHOCK_RES,                150, 1, 0,  3, COPPER, HI_COPPER),
  581.  RING("free action", "twisted",
  582.       FREE_ACTION,              200, 1, 0,  6, IRON, HI_METAL),
  583.  RING("slow digestion", "steel",
  584.       SLOW_DIGESTION,           200, 1, 0,  8, IRON, HI_METAL),
  585.  RING("teleportation", "silver",
  586.       TELEPORT,                 200, 1, 0,  3, SILVER, HI_SILVER),
  587.  RING("teleport control", "gold",
  588.       TELEPORT_CONTROL,         300, 1, 0,  3, GOLD, HI_GOLD),
  589.  RING("polymorph", "ivory",
  590.       POLYMORPH,                300, 1, 0,  4, BONE, CLR_WHITE),
  591.  RING("polymorph control", "emerald",
  592.       POLYMORPH_CONTROL,        300, 1, 0,  8, GEMSTONE, CLR_BRIGHT_GREEN),
  593.  RING("invisibility", "wire",
  594.       INVIS,                    150, 1, 0,  5, IRON, HI_METAL),
  595.  RING("see invisible", "engagement",
  596.       SEE_INVIS,                150, 1, 0,  5, IRON, HI_METAL),
  597.  RING("protection from shape changers", "shiny",
  598.       PROT_FROM_SHAPE_CHANGERS, 100, 1, 0,  5, IRON, CLR_BRIGHT_CYAN),
  599.  #undef RING
  600.  
  601.  /* amulets ... - THE Amulet comes last because it is special */
  602.  #define AMULET(name,desc,power,prob) \
  603.      OBJECT(OBJ(name, desc),                                            \
  604.             BITS(0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, P_NONE, IRON),        \
  605.             power, AMULET_CLASS, prob, 0, 20, 150, 0, 0, 0, 0, 20, HI_METAL)
  606.  AMULET("amulet of ESP",                "circular", TELEPAT, 175),
  607.  AMULET("amulet of life saving",       "spherical", LIFESAVED, 75),
  608.  AMULET("amulet of strangulation",          "oval", STRANGLED, 135),
  609.  AMULET("amulet of restful sleep",    "triangular", SLEEPY, 135),
  610.  AMULET("amulet versus poison",        "pyramidal", POISON_RES, 165),
  611.  AMULET("amulet of change",               "square", 0, 130),
  612.  AMULET("amulet of unchanging",          "concave", UNCHANGING, 45),
  613.  AMULET("amulet of reflection",        "hexagonal", REFLECTING, 75),
  614.  AMULET("amulet of magical breathing", "octagonal", MAGICAL_BREATHING, 65),
  615.  /* fixed descriptions; description duplication is deliberate;
  616.   * fake one must come before real one because selection for
  617.   * description shuffling stops when a non-magic amulet is encountered
  618.   */
  619.  OBJECT(OBJ("cheap plastic imitation of the Amulet of Yendor",
  620.             "Amulet of Yendor"),
  621.         BITS(0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, PLASTIC),
  622.         0, AMULET_CLASS, 0, 0, 20, 0, 0, 0, 0, 0, 1, HI_METAL),
  623.  OBJECT(OBJ("Amulet of Yendor", /* note: description == name */
  624.             "Amulet of Yendor"),
  625.         BITS(0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, MITHRIL),
  626.         0, AMULET_CLASS, 0, 0, 20, 30000, 0, 0, 0, 0, 20, HI_METAL),
  627.  #undef AMULET
  628.  
  629.  /* tools ... */
  630.  /* tools with weapon characteristics come last */
  631.  #define TOOL(name,desc,kn,mrg,mgc,chg,prob,wt,cost,mat,color) \
  632.      OBJECT(OBJ(name, desc),                                             \
  633.             BITS(kn, mrg, chg, 0, mgc, chg, 0, 0, 0, 0, 0, P_NONE, mat), \
  634.             0, TOOL_CLASS, prob, 0, wt, cost, 0, 0, 0, 0, wt, color)
  635.  #define CONTAINER(name,desc,kn,mgc,chg,prob,wt,cost,mat,color) \
  636.      OBJECT(OBJ(name, desc),                                             \
  637.             BITS(kn, 0, chg, 1, mgc, chg, 0, 0, 0, 0, 0, P_NONE, mat),   \
  638.             0, TOOL_CLASS, prob, 0, wt, cost, 0, 0, 0, 0, wt, color)
  639.  #define WEPTOOL(name,desc,kn,mgc,bi,prob,wt,cost,sdam,ldam,hitbon,sub,mat,clr)\
  640.      OBJECT(OBJ(name, desc),                                             \
  641.             BITS(kn, 0, 1, 0, mgc, 1, 0, 0, bi, 0, hitbon, sub, mat),    \
  642.             0, TOOL_CLASS, prob, 0, wt, cost, sdam, ldam, hitbon, 0, wt, clr)
  643.  /* containers */
  644.  CONTAINER("large box",       None, 1, 0, 0, 40, 350,   8, WOOD, HI_WOOD),
  645.  CONTAINER("chest",           None, 1, 0, 0, 35, 600,  16, WOOD, HI_WOOD),
  646.  CONTAINER("ice box",         None, 1, 0, 0,  5, 900,  42, PLASTIC, CLR_WHITE),
  647.  CONTAINER("sack",           "bag", 0, 0, 0, 35,  15,   2, CLOTH, HI_CLOTH),
  648.  CONTAINER("oilskin sack",   "bag", 0, 0, 0,  5,  15, 100, CLOTH, HI_CLOTH),
  649.  CONTAINER("bag of holding", "bag", 0, 1, 0, 20,  15, 100, CLOTH, HI_CLOTH),
  650.  CONTAINER("bag of tricks",  "bag", 0, 1, 1, 20,  15, 100, CLOTH, HI_CLOTH),
  651.  #undef CONTAINER
  652.  
  653.  /* lock opening tools */
  654.  TOOL("skeleton key",       "key", 0, 0, 0, 0, 80,  3, 10, IRON, HI_METAL),
  655.  TOOL("lock pick",           None, 1, 0, 0, 0, 60,  4, 20, IRON, HI_METAL),
  656.  TOOL("credit card",         None, 1, 0, 0, 0, 15,  1, 10, PLASTIC, CLR_WHITE),
  657.  /* light sources */
  658.  TOOL("tallow candle",   "candle", 0, 1, 0, 0, 20,  2, 10, WAX, CLR_WHITE),
  659.  TOOL("wax candle",      "candle", 0, 1, 0, 0,  5,  2, 20, WAX, CLR_WHITE),
  660.  TOOL("brass lantern",       None, 1, 0, 0, 0, 30, 30, 12, COPPER, CLR_YELLOW),
  661.  TOOL("oil lamp",          "lamp", 0, 0, 0, 0, 45, 20, 10, COPPER, CLR_YELLOW),
  662.  TOOL("magic lamp",        "lamp", 0, 0, 1, 0, 15, 20, 50, COPPER, CLR_YELLOW),
  663.  /* other tools */
  664.  TOOL("expensive camera",    None, 1, 0, 0, 1, 15, 12,200, PLASTIC, CLR_BLACK),
  665.  TOOL("mirror",   "looking glass", 0, 0, 0, 0, 45, 13, 10, GLASS, HI_SILVER),
  666.  TOOL("crystal ball", "glass orb", 0, 0, 1, 1, 15,150, 60, GLASS, HI_GLASS),
  667.  TOOL("lenses",              None, 1, 0, 0, 0,  5,  3, 80, GLASS, HI_GLASS),
  668.  TOOL("blindfold",           None, 1, 0, 0, 0, 50,  2, 20, CLOTH, CLR_BLACK),
  669.  TOOL("towel",               None, 1, 0, 0, 0, 50,  2, 50, CLOTH, CLR_MAGENTA),
  670.  TOOL("saddle",              None, 1, 0, 0, 0,  5,200,150, LEATHER, HI_LEATHER),
  671.  TOOL("leash",               None, 1, 0, 0, 0, 65, 12, 20, LEATHER, HI_LEATHER),
  672.  TOOL("stethoscope",         None, 1, 0, 0, 0, 25,  4, 75, IRON, HI_METAL),
  673.  TOOL("tinning kit",         None, 1, 0, 0, 1, 15,100, 30, IRON, HI_METAL),
  674.  TOOL("tin opener",          None, 1, 0, 0, 0, 35,  4, 30, IRON, HI_METAL),
  675.  TOOL("can of grease",       None, 1, 0, 0, 1, 15, 15, 20, IRON, HI_METAL),
  676.  TOOL("figurine",            None, 1, 0, 1, 0, 25, 50, 80, MINERAL, HI_MINERAL),
  677.          /* monster type specified by obj->corpsenm */
  678.  TOOL("magic marker",        None, 1, 0, 1, 1, 15,  2, 50, PLASTIC, CLR_RED),
  679.  /* traps */
  680.  TOOL("land mine",           None, 1, 0, 0, 0, 0, 300,180, IRON, CLR_RED),
  681.  TOOL("beartrap",            None, 1, 0, 0, 0, 0, 200, 60, IRON, HI_METAL),
  682.  /* instruments;
  683.     "If tin whistles are made out of tin, what do they make foghorns out of?" */
  684.  TOOL("tin whistle",    "whistle", 0, 0, 0, 0,100, 3, 10, METAL, HI_METAL),
  685.  TOOL("magic whistle",  "whistle", 0, 0, 1, 0, 30, 3, 10, METAL, HI_METAL),
  686.  TOOL("wooden flute",     "flute", 0, 0, 0, 0,  4, 5, 12, WOOD, HI_WOOD),
  687.  TOOL("magic flute",      "flute", 0, 0, 1, 1,  2, 5, 36, WOOD, HI_WOOD),
  688.  TOOL("tooled horn",       "horn", 0, 0, 0, 0,  5, 18, 15, BONE, CLR_WHITE),
  689.  TOOL("frost horn",        "horn", 0, 0, 1, 1,  2, 18, 50, BONE, CLR_WHITE),
  690.  TOOL("fire horn",         "horn", 0, 0, 1, 1,  2, 18, 50, BONE, CLR_WHITE),
  691.  TOOL("horn of plenty",    "horn", 0, 0, 1, 1,  2, 18, 50, BONE, CLR_WHITE),
  692.          /* horn, but not an instrument */
  693.  TOOL("wooden harp",       "harp", 0, 0, 0, 0,  4, 30, 50, WOOD, HI_WOOD),
  694.  TOOL("magic harp",        "harp", 0, 0, 1, 1,  2, 30, 50, WOOD, HI_WOOD),
  695.  TOOL("bell",                None, 1, 0, 0, 0,  2, 30, 50, COPPER, HI_COPPER),
  696.  TOOL("bugle",               None, 1, 0, 0, 0,  4, 10, 15, COPPER, HI_COPPER),
  697.  TOOL("leather drum",      "drum", 0, 0, 0, 0,  4, 25, 25, LEATHER, HI_LEATHER),
  698.  TOOL("drum of earthquake","drum", 0, 0, 1, 1,  2, 25, 25, LEATHER, HI_LEATHER),
  699.  /* tools useful as weapons */
  700.  WEPTOOL("pick-axe", None,
  701.          1, 0, 0, 20, 100,  50,  6,  3, WHACK,  P_PICK_AXE, IRON, HI_METAL),
  702.  WEPTOOL("grappling hook", "iron hook",
  703.          0, 0, 0,  5,  30,  50,  2,  6, WHACK,  P_FLAIL,    IRON, HI_METAL),
  704.  WEPTOOL("unicorn horn", None,
  705.          1, 1, 1,  0,  20, 100, 12, 12, PIERCE, P_UNICORN_HORN,
  706.                                                             BONE, CLR_WHITE),
  707.          /* 3.4.1: unicorn horn left classified as "magic" */
  708.  /* two unique tools;
  709.   * not artifacts, despite the comment which used to be here
  710.   */
  711.  OBJECT(OBJ("Candelabrum of Invocation", "candelabrum"),
  712.         BITS(0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, P_NONE, GOLD),
  713.         0, TOOL_CLASS, 0, 0, 10, 5000, 0, 0, 0, 0, 200, HI_GOLD),
  714.  OBJECT(OBJ("Bell of Opening", "silver bell"),
  715.         BITS(0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, P_NONE, SILVER),
  716.         0, TOOL_CLASS, 0, 0, 10, 5000, 0, 0, 0, 0, 50, HI_SILVER),
  717.  #undef TOOL
  718.  #undef WEPTOOL
  719.  
  720.  /* Comestibles ... */
  721.  #define FOOD(name, prob, delay, wt, unk, tin, nutrition, color)         \
  722.      OBJECT(OBJ(name, None),                                       \
  723.             BITS(1, 1, unk, 0, 0, 0, 0, 0, 0, 0, 0, P_NONE, tin), 0,     \
  724.             FOOD_CLASS, prob, delay, wt, nutrition / 20 + 5, 0, 0, 0, 0, \
  725.             nutrition, color)
  726.  /* All types of food (except tins & corpses) must have a delay of at least 1.
  727.   * Delay on corpses is computed and is weight dependant.
  728.   * Domestic pets prefer tripe rations above all others.
  729.   * Fortune cookies can be read, using them up without ingesting them.
  730.   * Carrots improve your vision.
  731.   * +0 tins contain monster meat.
  732.   * +1 tins (of spinach) make you stronger (like Popeye).
  733.   * Meatballs/sticks/rings are only created from objects via stone to flesh.
  734.   */
  735.  /* meat */
  736.  FOOD("tripe ration",        140,  2, 10, 0, FLESH, 200, CLR_BROWN),
  737.  FOOD("corpse",                0,  1,  0, 0, FLESH,   0, CLR_BROWN),
  738.  FOOD("egg",                  85,  1,  1, 1, FLESH,  80, CLR_WHITE),
  739.  FOOD("meatball",              0,  1,  1, 0, FLESH,   5, CLR_BROWN),
  740.  FOOD("meat stick",            0,  1,  1, 0, FLESH,   5, CLR_BROWN),
  741.  FOOD("huge chunk of meat",    0, 20,400, 0, FLESH,2000, CLR_BROWN),
  742.  /* special case because it's not mergable */
  743.  OBJECT(OBJ("meat ring", None),
  744.         BITS(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, FLESH),
  745.         0, FOOD_CLASS, 0, 1, 5, 1, 0, 0, 0, 0, 5, CLR_BROWN),
  746.  /* pudding 'corpses' will turn into these and combine;
  747.     must be in same order as the pudding monsters */
  748.  FOOD("glob of gray ooze",     0,  2, 20, 0, FLESH,  20, CLR_GRAY),
  749.  FOOD("glob of brown pudding", 0,  2, 20, 0, FLESH,  20, CLR_BROWN),
  750.  FOOD("glob of green slime",   0,  2, 20, 0, FLESH,  20, CLR_GREEN),
  751.  FOOD("glob of black pudding", 0,  2, 20, 0, FLESH,  20, CLR_BLACK),
  752.  
  753.  /* fruits & veggies */
  754.  FOOD("kelp frond",            0,  1,  1, 0, VEGGY,  30, CLR_GREEN),
  755.  FOOD("eucalyptus leaf",       3,  1,  1, 0, VEGGY,  30, CLR_GREEN),
  756.  FOOD("apple",                15,  1,  2, 0, VEGGY,  50, CLR_RED),
  757.  FOOD("orange",               10,  1,  2, 0, VEGGY,  80, CLR_ORANGE),
  758.  FOOD("pear",                 10,  1,  2, 0, VEGGY,  50, CLR_BRIGHT_GREEN),
  759.  FOOD("melon",                10,  1,  5, 0, VEGGY, 100, CLR_BRIGHT_GREEN),
  760.  FOOD("banana",               10,  1,  2, 0, VEGGY,  80, CLR_YELLOW),
  761.  FOOD("carrot",               15,  1,  2, 0, VEGGY,  50, CLR_ORANGE),
  762.  FOOD("sprig of wolfsbane",    7,  1,  1, 0, VEGGY,  40, CLR_GREEN),
  763.  FOOD("clove of garlic",       7,  1,  1, 0, VEGGY,  40, CLR_WHITE),
  764.  /* name of slime mold is changed based on player's OPTION=fruit:something
  765.     and bones data might have differently named ones from prior games */
  766.  FOOD("slime mold",           75,  1,  5, 0, VEGGY, 250, HI_ORGANIC),
  767.  
  768.  /* people food */
  769.  FOOD("lump of royal jelly",   0,  1,  2, 0, VEGGY, 200, CLR_YELLOW),
  770.  FOOD("cream pie",            25,  1, 10, 0, VEGGY, 100, CLR_WHITE),
  771.  FOOD("candy bar",            13,  1,  2, 0, VEGGY, 100, CLR_BROWN),
  772.  FOOD("fortune cookie",       55,  1,  1, 0, VEGGY,  40, CLR_YELLOW),
  773.  FOOD("pancake",              25,  2,  2, 0, VEGGY, 200, CLR_YELLOW),
  774.  FOOD("lembas wafer",         20,  2,  5, 0, VEGGY, 800, CLR_WHITE),
  775.  FOOD("cram ration",          20,  3, 15, 0, VEGGY, 600, HI_ORGANIC),
  776.  FOOD("food ration",         380,  5, 20, 0, VEGGY, 800, HI_ORGANIC),
  777.  FOOD("K-ration",              0,  1, 10, 0, VEGGY, 400, HI_ORGANIC),
  778.  FOOD("C-ration",              0,  1, 10, 0, VEGGY, 300, HI_ORGANIC),
  779.  /* tins have type specified by obj->spe (+1 for spinach, other implies
  780.     flesh; negative specifies preparation method {homemade,boiled,&c})
  781.     and by obj->corpsenm (type of monster flesh) */
  782.  FOOD("tin",                  75,  0, 10, 1, METAL,   0, HI_METAL),
  783.  #undef FOOD
  784.  
  785.  /* potions ... */
  786.  #define POTION(name,desc,mgc,power,prob,cost,color) \
  787.      OBJECT(OBJ(name, desc),                                             \
  788.             BITS(0, 1, 0, 0, mgc, 0, 0, 0, 0, 0, 0, P_NONE, GLASS),      \
  789.             power, POTION_CLASS, prob, 0, 20, cost, 0, 0, 0, 0, 10, color)
  790.  POTION("gain ability",           "ruby",  1, 0, 42, 300, CLR_RED),
  791.  POTION("restore ability",        "pink",  1, 0, 40, 100, CLR_BRIGHT_MAGENTA),
  792.  POTION("confusion",            "orange",  1, CONFUSION, 42, 100, CLR_ORANGE),
  793.  POTION("blindness",            "yellow",  1, BLINDED, 40, 150, CLR_YELLOW),
  794.  POTION("paralysis",           "emerald",  1, 0, 42, 300, CLR_BRIGHT_GREEN),
  795.  POTION("speed",            "dark green",  1, FAST, 42, 200, CLR_GREEN),
  796.  POTION("levitation",             "cyan",  1, LEVITATION, 42, 200, CLR_CYAN),
  797.  POTION("hallucination",      "sky blue",  1, HALLUC, 40, 100, CLR_CYAN),
  798.  POTION("invisibility", "brilliant blue",  1, INVIS, 40, 150, CLR_BRIGHT_BLUE),
  799.  POTION("see invisible",       "magenta",  1, SEE_INVIS, 42, 50, CLR_MAGENTA),
  800.  POTION("healing",          "purple-red",  1, 0, 57, 100, CLR_MAGENTA),
  801.  POTION("extra healing",          "puce",  1, 0, 47, 100, CLR_RED),
  802.  POTION("gain level",            "milky",  1, 0, 20, 300, CLR_WHITE),
  803.  POTION("enlightenment",        "swirly",  1, 0, 20, 200, CLR_BROWN),
  804.  POTION("monster detection",    "bubbly",  1, 0, 40, 150, CLR_WHITE),
  805.  POTION("object detection",      "smoky",  1, 0, 42, 150, CLR_GRAY),
  806.  POTION("gain energy",          "cloudy",  1, 0, 42, 150, CLR_WHITE),
  807.  POTION("sleeping",       "effervescent",  1, 0, 42, 100, CLR_GRAY),
  808.  POTION("full healing",          "black",  1, 0, 10, 200, CLR_BLACK),
  809.  POTION("polymorph",            "golden",  1, 0, 10, 200, CLR_YELLOW),
  810.  POTION("booze",                 "brown",  0, 0, 42,  50, CLR_BROWN),
  811.  POTION("sickness",              "fizzy",  0, 0, 42,  50, CLR_CYAN),
  812.  POTION("fruit juice",            "dark",  0, 0, 42,  50, CLR_BLACK),
  813.  POTION("acid",                  "white",  0, 0, 10, 250, CLR_WHITE),
  814.  POTION("oil",                   "murky",  0, 0, 30, 250, CLR_BROWN),
  815.  /* fixed description
  816.   */
  817.  POTION("water",                 "clear",  0, 0, 92, 100, CLR_CYAN),
  818.  #undef POTION
  819.  
  820.  /* scrolls ... */
  821.  #define SCROLL(name,text,mgc,prob,cost) \
  822.      OBJECT(OBJ(name, text),                                           \
  823.             BITS(0, 1, 0, 0, mgc, 0, 0, 0, 0, 0, 0, P_NONE, PAPER),    \
  824.             0, SCROLL_CLASS, prob, 0, 5, cost, 0, 0, 0, 0, 6, HI_PAPER)
  825.  SCROLL("enchant armor",              "ZELGO MER",  1,  63,  80),
  826.  SCROLL("destroy armor",         "JUYED AWK YACC",  1,  45, 100),
  827.  SCROLL("confuse monster",                 "NR 9",  1,  53, 100),
  828.  SCROLL("scare monster",   "XIXAXA XOXAXA XUXAXA",  1,  35, 100),
  829.  SCROLL("remove curse",             "PRATYAVAYAH",  1,  65,  80),
  830.  SCROLL("enchant weapon",         "DAIYEN FOOELS",  1,  80,  60),
  831.  SCROLL("create monster",       "LEP GEX VEN ZEA",  1,  45, 200),
  832.  SCROLL("taming",                   "PRIRUTSENIE",  1,  15, 200),
  833.  SCROLL("genocide",                  "ELBIB YLOH",  1,  15, 300),
  834.  SCROLL("light",                 "VERR YED HORRE",  1,  90,  50),
  835.  SCROLL("teleportation",        "VENZAR BORGAVVE",  1,  55, 100),
  836.  SCROLL("gold detection",                 "THARR",  1,  33, 100),
  837.  SCROLL("food detection",               "YUM YUM",  1,  25, 100),
  838.  SCROLL("identify",                  "KERNOD WEL",  1, 180,  20),
  839.  SCROLL("magic mapping",              "ELAM EBOW",  1,  45, 100),
  840.  SCROLL("amnesia",                   "DUAM XNAHT",  1,  35, 200),
  841.  SCROLL("fire",                  "ANDOVA BEGARIN",  1,  30, 100),
  842.  SCROLL("earth",                          "KIRJE",  1,  18, 200),
  843.  SCROLL("punishment",            "VE FORBRYDERNE",  1,  15, 300),
  844.  SCROLL("charging",                "HACKEM MUCHE",  1,  15, 300),
  845.  SCROLL("stinking cloud",             "VELOX NEB",  1,  15, 300),
  846.      /* Extra descriptions, shuffled into use at start of new game.
  847.       * Code in win/share/tilemap.c depends on SCR_STINKING_CLOUD preceding
  848.       * these and on how many of them there are.  If a real scroll gets added
  849.       * after stinking cloud or the number of extra descriptions changes,
  850.       * tilemap.c must be modified to match.
  851.       */
  852.  SCROLL(None,      "FOOBIE BLETCH",  1,   0, 100),
  853.  SCROLL(None,              "TEMOV",  1,   0, 100),
  854.  SCROLL(None,         "GARVEN DEH",  1,   0, 100),
  855.  SCROLL(None,            "READ ME",  1,   0, 100),
  856.  SCROLL(None,      "ETAOIN SHRDLU",  1,   0, 100),
  857.  SCROLL(None,        "LOREM IPSUM",  1,   0, 100),
  858.  SCROLL(None,              "FNORD",  1,   0, 100), /* Illuminati */
  859.  SCROLL(None,            "KO BATE",  1,   0, 100), /* Kurd Lasswitz */
  860.  SCROLL(None,      "ABRA KA DABRA",  1,   0, 100), /* traditional incantation */
  861.  SCROLL(None,       "ASHPD SODALG",  1,   0, 100), /* Portal */
  862.  SCROLL(None,            "ZLORFIK",  1,   0, 100), /* Zak McKracken */
  863.  SCROLL(None,      "GNIK SISI VLE",  1,   0, 100), /* Zak McKracken */
  864.  SCROLL(None,    "HAPAX LEGOMENON",  1,   0, 100),
  865.  SCROLL(None,  "EIRIS SAZUN IDISI",  1,   0, 100), /* Merseburg Incantations */
  866.  SCROLL(None,    "PHOL ENDE WODAN",  1,   0, 100), /* Merseburg Incantations */
  867.  SCROLL(None,              "GHOTI",  1,   0, 100), /* pronounced as 'fish',
  868.                                                          George Bernard Shaw */
  869.  SCROLL(None, "MAPIRO MAHAMA DIROMAT", 1, 0, 100), /* Wizardry */
  870.  SCROLL(None,  "VAS CORP BET MANI",  1,   0, 100), /* Ultima */
  871.  SCROLL(None,            "XOR OTA",  1,   0, 100), /* Aarne Haapakoski */
  872.  SCROLL(None, "STRC PRST SKRZ KRK",  1,   0, 100), /* Czech and Slovak
  873.                                                          tongue-twister */
  874.      /* These must come last because they have special fixed descriptions.
  875.       */
  876.  #ifdef MAIL
  877.  SCROLL("mail",          "stamped",  0,   0,   0),
  878.  #endif
  879.  SCROLL("blank paper", "unlabeled",  0,  28,  60),
  880.  #undef SCROLL
  881.  
  882.  /* spellbooks ... */
  883.  /* expanding beyond 52 spells would require changes in spellcasting
  884.     or imposition of a limit on number of spells hero can know because
  885.     they are currently assigned successive letters, a-zA-Z, when learned */
  886.  #define SPELL(name,desc,sub,prob,delay,level,mgc,dir,color)  \
  887.      OBJECT(OBJ(name, desc),                                             \
  888.             BITS(0, 0, 0, 0, mgc, 0, 0, 0, 0, 0, dir, sub, PAPER),       \
  889.             0, SPBOOK_CLASS, prob, delay, 50, level * 100,               \
  890.             0, 0, 0, level, 20, color)
  891.  SPELL("dig",             "parchment",
  892.        P_MATTER_SPELL,      20,  6, 5, 1, RAY, HI_PAPER),
  893.  SPELL("magic missile",   "vellum",
  894.        P_ATTACK_SPELL,      45,  2, 2, 1, RAY, HI_PAPER),
  895.  SPELL("fireball",        "ragged",
  896.        P_ATTACK_SPELL,      20,  4, 4, 1, RAY, HI_PAPER),
  897.  SPELL("cone of cold",    "dog eared",
  898.        P_ATTACK_SPELL,      10,  7, 4, 1, RAY, HI_PAPER),
  899.  SPELL("sleep",           "mottled",
  900.        P_ENCHANTMENT_SPELL, 50,  1, 1, 1, RAY, HI_PAPER),
  901.  SPELL("finger of death", "stained",
  902.        P_ATTACK_SPELL,       5, 10, 7, 1, RAY, HI_PAPER),
  903.  SPELL("light",           "cloth",
  904.        P_DIVINATION_SPELL,  45,  1, 1, 1, NODIR, HI_CLOTH),
  905.  SPELL("detect monsters", "leathery",
  906.        P_DIVINATION_SPELL,  43,  1, 1, 1, NODIR, HI_LEATHER),
  907.  SPELL("healing",         "white",
  908.        P_HEALING_SPELL,     40,  2, 1, 1, IMMEDIATE, CLR_WHITE),
  909.  SPELL("knock",           "pink",
  910.        P_MATTER_SPELL,      35,  1, 1, 1, IMMEDIATE, CLR_BRIGHT_MAGENTA),
  911.  SPELL("force bolt",      "red",
  912.        P_ATTACK_SPELL,      35,  2, 1, 1, IMMEDIATE, CLR_RED),
  913.  SPELL("confuse monster", "orange",
  914.        P_ENCHANTMENT_SPELL, 30,  2, 2, 1, IMMEDIATE, CLR_ORANGE),
  915.  SPELL("cure blindness",  "yellow",
  916.        P_HEALING_SPELL,     25,  2, 2, 1, IMMEDIATE, CLR_YELLOW),
  917.  SPELL("drain life",      "velvet",
  918.        P_ATTACK_SPELL,      10,  2, 2, 1, IMMEDIATE, CLR_MAGENTA),
  919.  SPELL("slow monster",    "light green",
  920.        P_ENCHANTMENT_SPELL, 30,  2, 2, 1, IMMEDIATE, CLR_BRIGHT_GREEN),
  921.  SPELL("wizard lock",     "dark green",
  922.        P_MATTER_SPELL,      30,  3, 2, 1, IMMEDIATE, CLR_GREEN),
  923.  SPELL("create monster",  "turquoise",
  924.        P_CLERIC_SPELL,      35,  3, 2, 1, NODIR, CLR_BRIGHT_CYAN),
  925.  SPELL("detect food",     "cyan",
  926.        P_DIVINATION_SPELL,  30,  3, 2, 1, NODIR, CLR_CYAN),
  927.  SPELL("cause fear",      "light blue",
  928.        P_ENCHANTMENT_SPELL, 25,  3, 3, 1, NODIR, CLR_BRIGHT_BLUE),
  929.  SPELL("clairvoyance",    "dark blue",
  930.        P_DIVINATION_SPELL,  15,  3, 3, 1, NODIR, CLR_BLUE),
  931.  SPELL("cure sickness",   "indigo",
  932.        P_HEALING_SPELL,     32,  3, 3, 1, NODIR, CLR_BLUE),
  933.  SPELL("charm monster",   "magenta",
  934.        P_ENCHANTMENT_SPELL, 20,  3, 3, 1, IMMEDIATE, CLR_MAGENTA),
  935.  SPELL("haste self",      "purple",
  936.        P_ESCAPE_SPELL,      33,  4, 3, 1, NODIR, CLR_MAGENTA),
  937.  SPELL("detect unseen",   "violet",
  938.        P_DIVINATION_SPELL,  20,  4, 3, 1, NODIR, CLR_MAGENTA),
  939.  SPELL("levitation",      "tan",
  940.        P_ESCAPE_SPELL,      20,  4, 4, 1, NODIR, CLR_BROWN),
  941.  SPELL("extra healing",   "plaid",
  942.        P_HEALING_SPELL,     27,  5, 3, 1, IMMEDIATE, CLR_GREEN),
  943.  SPELL("restore ability", "light brown",
  944.        P_HEALING_SPELL,     25,  5, 4, 1, NODIR, CLR_BROWN),
  945.  SPELL("invisibility",    "dark brown",
  946.        P_ESCAPE_SPELL,      25,  5, 4, 1, NODIR, CLR_BROWN),
  947.  SPELL("detect treasure", "gray",
  948.        P_DIVINATION_SPELL,  20,  5, 4, 1, NODIR, CLR_GRAY),
  949.  SPELL("remove curse",    "wrinkled",
  950.        P_CLERIC_SPELL,      25,  5, 3, 1, NODIR, HI_PAPER),
  951.  SPELL("magic mapping",   "dusty",
  952.        P_DIVINATION_SPELL,  18,  7, 5, 1, NODIR, HI_PAPER),
  953.  SPELL("identify",        "bronze",
  954.        P_DIVINATION_SPELL,  20,  6, 3, 1, NODIR, HI_COPPER),
  955.  SPELL("turn undead",     "copper",
  956.        P_CLERIC_SPELL,      16,  8, 6, 1, IMMEDIATE, HI_COPPER),
  957.  SPELL("polymorph",       "silver",
  958.        P_MATTER_SPELL,      10,  8, 6, 1, IMMEDIATE, HI_SILVER),
  959.  SPELL("teleport away",   "gold",
  960.        P_ESCAPE_SPELL,      15,  6, 6, 1, IMMEDIATE, HI_GOLD),
  961.  SPELL("create familiar", "glittering",
  962.        P_CLERIC_SPELL,      10,  7, 6, 1, NODIR, CLR_WHITE),
  963.  SPELL("cancellation",    "shining",
  964.        P_MATTER_SPELL,      15,  8, 7, 1, IMMEDIATE, CLR_WHITE),
  965.  SPELL("protection",      "dull",
  966.        P_CLERIC_SPELL,      18,  3, 1, 1, NODIR, HI_PAPER),
  967.  SPELL("jumping",         "thin",
  968.        P_ESCAPE_SPELL,      20,  3, 1, 1, IMMEDIATE, HI_PAPER),
  969.  SPELL("stone to flesh",  "thick",
  970.        P_HEALING_SPELL,     15,  1, 3, 1, IMMEDIATE, HI_PAPER),
  971.  #if 0 /* DEFERRED */
  972.  /* from slash'em, create a tame critter which explodes when attacking,
  973.     damaging adjacent creatures--friend or foe--and dying in the process */
  974.  SPELL("flame sphere",    "canvas",
  975.        P_MATTER_SPELL,      20,  2, 1, 1, NODIR, CLR_BROWN),
  976.  SPELL("freeze sphere",   "hardcover",
  977.        P_MATTER_SPELL,      20,  2, 1, 1, NODIR, CLR_BROWN),
  978.  #endif
  979.  /* books with fixed descriptions
  980.   */
  981.  SPELL("blank paper", "plain", P_NONE, 18, 0, 0, 0, 0, HI_PAPER),
  982.  /* tribute book for 3.6 */
  983.  OBJECT(OBJ("novel", "paperback"),
  984.         BITS(0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, P_NONE, PAPER),
  985.         0, SPBOOK_CLASS, 0, 0, 0, 20, 0, 0, 0, 1, 20, CLR_BRIGHT_BLUE),
  986.  /* a special, one of a kind, spellbook */
  987.  OBJECT(OBJ("Book of the Dead", "papyrus"),
  988.         BITS(0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, P_NONE, PAPER),
  989.         0, SPBOOK_CLASS, 0, 0, 20, 10000, 0, 0, 0, 7, 20, HI_PAPER),
  990.  #undef SPELL
  991.  
  992.  /* wands ... */
  993.  #define WAND(name,typ,prob,cost,mgc,dir,metal,color) \
  994.      OBJECT(OBJ(name, typ),                                              \
  995.             BITS(0, 0, 1, 0, mgc, 1, 0, 0, 0, 0, dir, P_NONE, metal),    \
  996.             0, WAND_CLASS, prob, 0, 7, cost, 0, 0, 0, 0, 30, color)
  997.  WAND("light",           "glass", 95, 100, 1, NODIR, GLASS, HI_GLASS),
  998.  WAND("secret door detection",
  999.                          "balsa", 50, 150, 1, NODIR, WOOD, HI_WOOD),
  1000.  WAND("enlightenment", "crystal", 15, 150, 1, NODIR, GLASS, HI_GLASS),
  1001.  WAND("create monster",  "maple", 45, 200, 1, NODIR, WOOD, HI_WOOD),
  1002.  WAND("wishing",          "pine",  5, 500, 1, NODIR, WOOD, HI_WOOD),
  1003.  WAND("nothing",           "oak", 25, 100, 0, IMMEDIATE, WOOD, HI_WOOD),
  1004.  WAND("striking",        "ebony", 75, 150, 1, IMMEDIATE, WOOD, HI_WOOD),
  1005.  WAND("make invisible", "marble", 45, 150, 1, IMMEDIATE, MINERAL, HI_MINERAL),
  1006.  WAND("slow monster",      "tin", 50, 150, 1, IMMEDIATE, METAL, HI_METAL),
  1007.  WAND("speed monster",   "brass", 50, 150, 1, IMMEDIATE, COPPER, HI_COPPER),
  1008.  WAND("undead turning", "copper", 50, 150, 1, IMMEDIATE, COPPER, HI_COPPER),
  1009.  WAND("polymorph",      "silver", 45, 200, 1, IMMEDIATE, SILVER, HI_SILVER),
  1010.  WAND("cancellation", "platinum", 45, 200, 1, IMMEDIATE, PLATINUM, CLR_WHITE),
  1011.  WAND("teleportation", "iridium", 45, 200, 1, IMMEDIATE, METAL,
  1012.                                                               CLR_BRIGHT_CYAN),
  1013.  WAND("opening",          "zinc", 25, 150, 1, IMMEDIATE, METAL, HI_METAL),
  1014.  WAND("locking",      "aluminum", 25, 150, 1, IMMEDIATE, METAL, HI_METAL),
  1015.  WAND("probing",       "uranium", 30, 150, 1, IMMEDIATE, METAL, HI_METAL),
  1016.  WAND("digging",          "iron", 55, 150, 1, RAY, IRON, HI_METAL),
  1017.  WAND("magic missile",   "steel", 50, 150, 1, RAY, IRON, HI_METAL),
  1018.  WAND("fire",        "hexagonal", 40, 175, 1, RAY, IRON, HI_METAL),
  1019.  WAND("cold",            "short", 40, 175, 1, RAY, IRON, HI_METAL),
  1020.  WAND("sleep",           "runed", 50, 175, 1, RAY, IRON, HI_METAL),
  1021.  WAND("death",            "long",  5, 500, 1, RAY, IRON, HI_METAL),
  1022.  WAND("lightning",      "curved", 40, 175, 1, RAY, IRON, HI_METAL),
  1023.  /* extra descriptions, shuffled into use at start of new game */
  1024.  WAND(None,             "forked",  0, 150, 1, 0, WOOD, HI_WOOD),
  1025.  WAND(None,             "spiked",  0, 150, 1, 0, IRON, HI_METAL),
  1026.  WAND(None,            "jeweled",  0, 150, 1, 0, IRON, HI_MINERAL),
  1027.  #undef WAND
  1028.  
  1029.  /* coins ... - so far, gold is all there is */
  1030.  #define COIN(name,prob,metal,worth) \
  1031.      OBJECT(OBJ(name, None),                                        \
  1032.             BITS(0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, P_NONE, metal),    \
  1033.             0, COIN_CLASS, prob, 0, 1, worth, 0, 0, 0, 0, 0, HI_GOLD)
  1034.  COIN("gold piece", 1000, GOLD, 1),
  1035.  #undef COIN
  1036.  
  1037.  /* gems ... - includes stones and rocks but not boulders */
  1038.  #define GEM(name,desc,prob,wt,gval,nutr,mohs,glass,color) \
  1039.      OBJECT(OBJ(name, desc),                                             \
  1040.             BITS(0, 1, 0, 0, 0, 0, 0, 0, 0,                              \
  1041.                  HARDGEM(mohs), 0, -P_SLING, glass),                     \
  1042.             0, GEM_CLASS, prob, 0, 1, gval, 3, 3, 0, 0, nutr, color)
  1043.  #define ROCK(name,desc,kn,prob,wt,gval,sdam,ldam,mgc,nutr,mohs,glass,color) \
  1044.      OBJECT(OBJ(name, desc),                                             \
  1045.             BITS(kn, 1, 0, 0, mgc, 0, 0, 0, 0,                           \
  1046.                  HARDGEM(mohs), 0, -P_SLING, glass),                     \
  1047.             0, GEM_CLASS, prob, 0, wt, gval, sdam, ldam, 0, 0, nutr, color)
  1048.  GEM("dilithium crystal", "white",  2, 1, 4500, 15,  5, GEMSTONE, CLR_WHITE),
  1049.  GEM("diamond",           "white",  3, 1, 4000, 15, 10, GEMSTONE, CLR_WHITE),
  1050.  GEM("ruby",                "red",  4, 1, 3500, 15,  9, GEMSTONE, CLR_RED),
  1051.  GEM("jacinth",          "orange",  3, 1, 3250, 15,  9, GEMSTONE, CLR_ORANGE),
  1052.  GEM("sapphire",           "blue",  4, 1, 3000, 15,  9, GEMSTONE, CLR_BLUE),
  1053.  GEM("black opal",        "black",  3, 1, 2500, 15,  8, GEMSTONE, CLR_BLACK),
  1054.  GEM("emerald",           "green",  5, 1, 2500, 15,  8, GEMSTONE, CLR_GREEN),
  1055.  GEM("turquoise",         "green",  6, 1, 2000, 15,  6, GEMSTONE, CLR_GREEN),
  1056.  GEM("citrine",          "yellow",  4, 1, 1500, 15,  6, GEMSTONE, CLR_YELLOW),
  1057.  GEM("aquamarine",        "green",  6, 1, 1500, 15,  8, GEMSTONE, CLR_GREEN),
  1058.  GEM("amber",   "yellowish brown",  8, 1, 1000, 15,  2, GEMSTONE, CLR_BROWN),
  1059.  GEM("topaz",   "yellowish brown", 10, 1,  900, 15,  8, GEMSTONE, CLR_BROWN),
  1060.  GEM("jet",               "black",  6, 1,  850, 15,  7, GEMSTONE, CLR_BLACK),
  1061.  GEM("opal",              "white", 12, 1,  800, 15,  6, GEMSTONE, CLR_WHITE),
  1062.  GEM("chrysoberyl",      "yellow",  8, 1,  700, 15,  5, GEMSTONE, CLR_YELLOW),
  1063.  GEM("garnet",              "red", 12, 1,  700, 15,  7, GEMSTONE, CLR_RED),
  1064.  GEM("amethyst",         "violet", 14, 1,  600, 15,  7, GEMSTONE, CLR_MAGENTA),
  1065.  GEM("jasper",              "red", 15, 1,  500, 15,  7, GEMSTONE, CLR_RED),
  1066.  GEM("fluorite",         "violet", 15, 1,  400, 15,  4, GEMSTONE, CLR_MAGENTA),
  1067.  GEM("obsidian",          "black",  9, 1,  200, 15,  6, GEMSTONE, CLR_BLACK),
  1068.  GEM("agate",            "orange", 12, 1,  200, 15,  6, GEMSTONE, CLR_ORANGE),
  1069.  GEM("jade",              "green", 10, 1,  300, 15,  6, GEMSTONE, CLR_GREEN),
  1070.  GEM("worthless piece of white glass", "white",
  1071.      77, 1, 0, 6, 5, GLASS, CLR_WHITE),
  1072.  GEM("worthless piece of blue glass", "blue",
  1073.      77, 1, 0, 6, 5, GLASS, CLR_BLUE),
  1074.  GEM("worthless piece of red glass", "red",
  1075.      77, 1, 0, 6, 5, GLASS, CLR_RED),
  1076.  GEM("worthless piece of yellowish brown glass", "yellowish brown",
  1077.      77, 1, 0, 6, 5, GLASS, CLR_BROWN),
  1078.  GEM("worthless piece of orange glass", "orange",
  1079.      76, 1, 0, 6, 5, GLASS, CLR_ORANGE),
  1080.  GEM("worthless piece of yellow glass", "yellow",
  1081.      77, 1, 0, 6, 5, GLASS, CLR_YELLOW),
  1082.  GEM("worthless piece of black glass", "black",
  1083.      76, 1, 0, 6, 5, GLASS, CLR_BLACK),
  1084.  GEM("worthless piece of green glass", "green",
  1085.      77, 1, 0, 6, 5, GLASS, CLR_GREEN),
  1086.  GEM("worthless piece of violet glass", "violet",
  1087.      77, 1, 0, 6, 5, GLASS, CLR_MAGENTA),
  1088.  
  1089.  /* Placement note: there is a wishable subrange for
  1090.   * "gray stones" in the o_ranges[] array in objnam.c
  1091.   * that is currently everything between luckstones and flint
  1092.   * (inclusive).
  1093.   */
  1094.  ROCK("luckstone", "gray",  0,  10,  10, 60, 3, 3, 1, 10, 7, MINERAL, CLR_GRAY),
  1095.  ROCK("loadstone", "gray",  0,  10, 500,  1, 3, 3, 1, 10, 6, MINERAL, CLR_GRAY),
  1096.  ROCK("touchstone", "gray", 0,   8,  10, 45, 3, 3, 1, 10, 6, MINERAL, CLR_GRAY),
  1097.  ROCK("flint", "gray",      0,  10,  10,  1, 6, 6, 0, 10, 7, MINERAL, CLR_GRAY),
  1098.  ROCK("rock", None,         1, 100,  10,  0, 3, 3, 0, 10, 7, MINERAL, CLR_GRAY),
  1099.  #undef GEM
  1100.  #undef ROCK
  1101.  
  1102.  /* miscellaneous ... */
  1103.  /* Note: boulders and rocks are not normally created at random; the
  1104.   * probabilities only come into effect when you try to polymorph them.
  1105.   * Boulders weigh more than MAX_CARR_CAP; statues use corpsenm to take
  1106.   * on a specific type and may act as containers (both affect weight).
  1107.   */
  1108.  OBJECT(OBJ("boulder", None),
  1109.         BITS(1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, P_NONE, MINERAL), 0,
  1110.         ROCK_CLASS, 100, 0, 6000, 0, 20, 20, 0, 0, 2000, HI_MINERAL),
  1111.  OBJECT(OBJ("statue", None),
  1112.         BITS(1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, P_NONE, MINERAL), 0,
  1113.         ROCK_CLASS, 900, 0, 2500, 0, 20, 20, 0, 0, 2500, CLR_WHITE),
  1114.  
  1115.  OBJECT(OBJ("heavy iron ball", None),
  1116.         BITS(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, WHACK, P_NONE, IRON), 0,
  1117.         BALL_CLASS, 1000, 0, 480, 10, 25, 25, 0, 0, 200, HI_METAL),
  1118.          /* +d4 when "very heavy" */
  1119.  OBJECT(OBJ("iron chain", None),
  1120.         BITS(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, WHACK, P_NONE, IRON), 0,
  1121.         CHAIN_CLASS, 1000, 0, 120, 0, 4, 4, 0, 0, 200, HI_METAL),
  1122.          /* +1 both l & s */
  1123.  
  1124.  /* Venom is normally a transitory missile (spit by various creatures)
  1125.   * but can be wished for in wizard mode so could occur in bones data.
  1126.   */
  1127.  OBJECT(OBJ("blinding venom", "splash of venom"),
  1128.         BITS(0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, P_NONE, LIQUID), 0,
  1129.         VENOM_CLASS, 500, 0, 1, 0, 0, 0, 0, 0, 0, HI_ORGANIC),
  1130.  OBJECT(OBJ("acid venom", "splash of venom"),
  1131.         BITS(0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, P_NONE, LIQUID), 0,
  1132.         VENOM_CLASS, 500, 0, 1, 0, 6, 6, 0, 0, 0, HI_ORGANIC),
  1133.          /* +d6 small or large */
  1134.  
  1135.  /* fencepost, the deadly Array Terminator -- name [1st arg] *must* be NULL */
  1136.  OBJECT(OBJ(None, None),
  1137.         BITS(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, P_NONE, 0), 0,
  1138.         ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
  1139.  }; /* objects[] */
  1140.  
  1141.  #ifndef OBJECTS_PASS_2_
  1142.  
  1143.  /* perform recursive compilation for second structure */
  1144.  #undef OBJ
  1145.  #undef OBJECT
  1146.  #define OBJECTS_PASS_2_
  1147.  #include "objects.c"
  1148.  
  1149.  /* clang-format on */
  1150.  /* *INDENT-ON* */
  1151.  
  1152.  void NDECL(objects_init);
  1153.  

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*/