Difference between revisions of "Source:NetHack 3.4.3/src/objects.c"

From NetHackWiki
Jump to navigation Jump to search
(split Armor into subsections)
(corrodes)
 
(13 intermediate revisions by 10 users not shown)
Line 1: Line 1:
=== Top of file ===
+
__MIXEDSYNTAXHIGHLIGHT__
  /* SCCS Id: @(#)objects.c 3.4 2002/07/31 */
+
Below is the full text to src/objects.c from NetHack 3.4.3. To link to a particular line, write [[objects.c#line123|[[objects.c#line123]]]], for example.
  /* Copyright (c) Mike Threepoint, 1989.   */
+
 
  /* NetHack may be freely redistributed.  See license for details. */
+
== Top of file ==
 +
  <span id="line1">1.    /* SCCS Id: @(#)objects.c 3.4 2002/07/31 */</span>
 +
  <span id="line2">2.    /* Copyright (c) Mike Threepoint, 1989.   */</span>
 +
  <span id="line3">3.    /* NetHack may be freely redistributed.  See license for details. */</span>
 +
<span id="line4">4.    </span>
  
 
{{NGPL}}
 
{{NGPL}}
  
  #ifndef OBJECTS_PASS_2_
+
  <span id="line5">5.    #ifndef OBJECTS_PASS_2_</span>
  /* first pass */
+
  <span id="line6">6.    /* first pass */</span>
  struct monst { struct monst *dummy; }; /* lint: struct obj's union */
+
  <span id="line7">7.    struct monst { struct monst *dummy; }; /* lint: struct obj's union */</span>
  #include "config.h"
+
  <span id="line8">8.    #include "config.h"</span>
  #include "obj.h"
+
  <span id="line9">9.    #include "obj.h"</span>
  #include "objclass.h"
+
  <span id="line10">10.  #include "objclass.h"</span>
  #include "prop.h"
+
  <span id="line11">11.  #include "prop.h"</span>
  #include "skills.h"
+
  <span id="line12">12.  #include "skills.h"</span>
   
+
  <span id="line13">13.  </span>
  #else /* !OBJECTS_PASS_2_ */
+
  <span id="line14">14.  #else /* !OBJECTS_PASS_2_ */</span>
  /* second pass */
+
  <span id="line15">15.  /* second pass */</span>
  #include "color.h"
+
  <span id="line16">16.  #include "color.h"</span>
  #  define COLOR_FIELD(X) X,
+
  <span id="line17">17.  #  define COLOR_FIELD(X) X,</span>
  #endif /* !OBJECTS_PASS_2_ */
+
  <span id="line18">18.  #endif /* !OBJECTS_PASS_2_ */</span>
   
+
  <span id="line19">19.  </span>
   
+
 
  /* objects have symbols: ) [ = " ( % ! ? + / $ * ` 0 _ . */
+
The file uses preprocessor tricks so that the file is included twice; the first pass populates the
   
+
<tt>obj_descr[]</tt> array with just the object name and description strings. The second pass will
  /*
+
populate the full objects[] array with the object definitions (excluding the name and description strings).
  * Note:  OBJ() and BITS() macros are used to avoid exceeding argument
+
Do not directly access the <tt>obj_descr[]</tt>, use <tt>OBJ_NAME()</tt> and <tt>OBJ_DESCR()</tt> macros.
  * limits imposed by some compilers.  The ctnr field of BITS currently
+
See the objclass-struct in [[Source:objclass.h|objclass.h]].
  * does not map into struct objclass, and is ignored in the expansion.
+
 
  * The 0 in the expansion corresponds to oc_pre_discovered, which is
+
  <span id="line20">20.  </span>
  * set at run-time during role-specific character initialization.
+
  <span id="line21">21.  /* objects have symbols: ) [ = " ( % ! ? + / $ * ` 0 _ . */</span>
  */
+
  <span id="line22">22.  </span>
   
+
  <span id="line23">23.  /*</span>
=== Object macros ===
+
<span id="line24">24.    * Note:  OBJ() and BITS() macros are used to avoid exceeding argument</span>
 +
<span id="line25">25.    * limits imposed by some compilers.  The ctnr field of BITS currently</span>
 +
<span id="line26">26.    * does not map into struct objclass, and is ignored in the expansion.</span>
 +
<span id="line27">27.    * The 0 in the expansion corresponds to oc_pre_discovered, which is</span>
 +
<span id="line28">28.    * set at run-time during role-specific character initialization.</span>
 +
<span id="line29">29.    */</span>
 +
  <span id="line30">30.  </span>
 +
 
 +
== Object macros ==
  
  #ifndef OBJECTS_PASS_2_
+
  <span id="line31">31.  #ifndef OBJECTS_PASS_2_</span>
  /* first pass -- object descriptive text */
+
  <span id="line32">32.  /* first pass -- object descriptive text */</span>
  # define OBJ(name,desc) name,desc
+
  <span id="line33">33.  # define OBJ(name,desc) name,desc</span>
  
 
Object name and description. The description field can be <tt>(char *)0</tt>, in which case there is no description, and only the object name is used.
 
Object name and description. The description field can be <tt>(char *)0</tt>, in which case there is no description, and only the object name is used.
  
  # define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \
+
  <span id="line34">34.  # define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \</span>
{obj}
+
<span id="line35">35.  {obj}</span>
 +
<span id="line36">36.  </span>
 +
 
 +
The OBJECT macro.
 +
# <tt>obj</tt> is the <tt>OBJ</tt> macro from above.
 +
# <tt>bits</tt> are special bitfields, see <tt>BITS</tt> macro below.
 +
# <tt>prp</tt> is special property of the object it grants, eg. <tt>REFLECTING</tt> or <tt>LIFESAVED</tt>.
 +
# <tt>sym</tt> is the object symbol, one of the <tt>_CLASS</tt> definitions, eg. <tt>GEM_CLASS</tt>.
 +
# <tt>prob</tt> is the object relative random generation probability. For each object class (eg. scrolls or potions), the total of this must be 1000.
 +
# <tt>dly</tt> is delay (in turns) it takes to use the object, eg. to wear or to take off.
 +
# <tt>wt</tt> is object weight.
 +
# <tt>cost</tt> is object base cost, in zorkmids.
 +
# <tt>sdam</tt> means how much object deals damage to small monsters.
 +
# <tt>ldam</tt> means how much object deals damage to large monsters.
 +
# <tt>oc1</tt> is to-hit bonus for weapons or base AC for armor
 +
# <tt>oc2</tt> is MC level for armor or spell level for spellbooks
 +
# <tt>nut</tt> is nutrition gained when the object is eaten.
 +
# <tt>color</tt> is the object color, as used in the TTY windowport.
 +
 
 +
<span id="line37">37.  NEARDATA struct objdescr obj_descr[] = {</span>
 +
<span id="line38">38.  #else</span>
 +
<span id="line39">39.  /* second pass -- object definitions */</span>
 +
<span id="line40">40.  </span>
 +
<span id="line41">41.  # define BITS(nmkn,mrg,uskn,ctnr,mgc,chrg,uniq,nwsh,big,tuf,dir,sub,mtrl) \</span>
 +
<span id="line42">42.  nmkn,mrg,uskn,0,mgc,chrg,uniq,nwsh,big,tuf,dir,mtrl,sub /* SCO ODT 1.1 cpp fodder */</span>
 +
 
 +
The BITS macro. Each of the first 10 values is either 1 or 0.
 +
# <tt>nmkn</tt> tells whether to use the object description or the object real name by default. (See the OBJ macro, above)
 +
# <tt>mrg</tt> tells whether the object can be merged with similar objects or not.
 +
# <tt>uskn</tt> "uses known"
 +
# <tt>ctnr</tt> tells if the object is pre-discovered, ie. known at the start of the game.
 +
# <tt>mgc</tt> tells whether the object is inherently magical or not.
 +
# <tt>chrg</tt> tells whether the object has charges.
 +
# <tt>uniq</tt> tells if the object is unique.
 +
# <tt>nwsh</tt> tells whether player can wish for the object or not.
 +
# <tt>big</tt> tells whether weapon or tool is bimanual, or whether armor is bulky.
 +
# <tt>tuf</tt> whether gems are hard or soft.
 +
# <tt>dir</tt> takes either <tt>NODIR</tt>, <tt>IMMEDIATE</tt> or <tt>RAY</tt>, and defines how wands behave when zapped.
 +
# <tt>sub</tt> armor subtype (as defined in [[objclass.h]]) or skills of weapons, spellbooks, tools or gems.
 +
# <tt>mtrl</tt> takes one of the material definitions, eg. <tt>LEATHER</tt> or <tt>IRON</tt>, as defined in [[objclass.h]]
 +
 
 +
<span id="line43">43.  # define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \</span>
 +
<span id="line44">44.  {0, 0, (char *)0, bits, prp, sym, dly, COLOR_FIELD(color) \</span>
 +
<span id="line45">45.  prob, wt, cost, sdam, ldam, oc1, oc2, nut}</span>
 +
<span id="line46">46.  # ifndef lint</span>
 +
<span id="line47">47.  #  define HARDGEM(n) (n >= 8)</span>
 +
<span id="line48">48.  # else</span>
 +
<span id="line49">49.  #  define HARDGEM(n) (0)</span>
 +
<span id="line50">50.  # endif</span>
 +
<span id="line51">51.  </span>
 +
<span id="line52">52.  NEARDATA struct objclass objects[] = {</span>
 +
<span id="line53">53.  #endif</span>
 +
<span id="line54">54.  /* dummy object[0] -- description [2nd arg] *must* be NULL */</span>
 +
<span id="line55">55.  OBJECT(OBJ("strange object",(char *)0), BITS(1,0,0,0,0,0,0,0,0,0,0,P_NONE,0),</span>
 +
<span id="line56">56.  0, ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),</span>
 +
<span id="line57">57.  </span>
  
The object macro.
 
* <tt>obj</tt> is the <tt>OBJ</tt> macro from above.
 
* <tt>bits</tt> are special bitfields, see <tt>BITS</tt> macro below.
 
* <tt>prp</tt> is special property of the object it grants, eg. <tt>REFLECTING</tt> or <tt>LIFESAVED</tt>.
 
* <tt>sym</tt> is the object symbol, one of the <tt>_CLASS</tt> definitions, eg. <tt>GEM_CLASS</tt>.
 
* <tt>prob</tt> is the object relative random generation probability. For each object class (eg. scrolls or potions), the total of this must be 1000.
 
* <tt>dly</tt> is delay (in turns) it takes to use the object, eg. to wear or to take off.
 
* <tt>wt</tt> is object weight.
 
* <tt>cost</tt> is object base cost, in zorkmids.
 
* <tt>sdam</tt> means how much object deals damage to small monsters.
 
* <tt>ldam</tt> means how much object deals damage to large monsters.
 
* <tt>oc1</tt> TODO
 
* <tt>oc2</tt> TODO
 
* <tt>nut</tt> TODO
 
* <tt>color</tt> is the object color, as used in the TTY windowport.
 
 
NEARDATA struct objdescr obj_descr[] = {
 
#else
 
/* second pass -- object definitions */
 
 
# define BITS(nmkn,mrg,uskn,ctnr,mgc,chrg,uniq,nwsh,big,tuf,dir,sub,mtrl) \
 
nmkn,mrg,uskn,0,mgc,chrg,uniq,nwsh,big,tuf,dir,mtrl,sub /* SCO ODT 1.1 cpp fodder */
 
# define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \
 
{0, 0, (char *)0, bits, prp, sym, dly, COLOR_FIELD(color) \
 
prob, wt, cost, sdam, ldam, oc1, oc2, nut}
 
# ifndef lint
 
#  define HARDGEM(n) (n >= 8)
 
# else
 
#  define HARDGEM(n) (0)
 
# endif
 
 
NEARDATA struct objclass objects[] = {
 
#endif
 
/* dummy object[0] -- description [2nd arg] *must* be NULL */
 
OBJECT(OBJ("strange object",(char *)0), BITS(1,0,0,0,0,0,0,0,0,0,0,P_NONE,0),
 
0, ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
 
 
=== Weapons ===
 
=== Weapons ===
+
==== Weapon macros ====
  /* weapons ... */
+
 
  #define WEAPON(name,app,kn,mg,bi,prob,wt,cost,sdam,ldam,hitbon,typ,sub,metal,color) \
+
  <span id="line58">58.  /* weapons ... */</span>
OBJECT( \
+
  <span id="line59">59.  #define WEAPON(name,app,kn,mg,bi,prob,wt,cost,sdam,ldam,hitbon,typ,sub,metal,color) \</span>
OBJ(name,app), BITS(kn,mg,1,0,0,1,0,0,bi,0,typ,sub,metal), 0, \
+
<span id="line60">60.  OBJECT( \</span>
WEAPON_CLASS, prob, 0, \
+
<span id="line61">61.  OBJ(name,app), BITS(kn,mg,1,0,0,1,0,0,bi,0,typ,sub,metal), 0, \</span>
wt, cost, sdam, ldam, hitbon, 0, wt, color )
+
<span id="line62">62.  WEAPON_CLASS, prob, 0, \</span>
#define PROJECTILE(name,app,kn,prob,wt,cost,sdam,ldam,hitbon,metal,sub,color) \
+
<span id="line63">63.  wt, cost, sdam, ldam, hitbon, 0, wt, color )</span>
OBJECT( \
+
 
OBJ(name,app), \
+
 
BITS(kn,1,1,0,0,1,0,0,0,0,PIERCE,sub,metal), 0, \
+
#<tt>name</tt> is the weapon name.
WEAPON_CLASS, prob, 0, \
+
#<tt>app</tt> is the weapon's appearance.
wt, cost, sdam, ldam, hitbon, 0, wt, color )
+
#<tt>kn</tt> denotes if appearance is the same as the name.
#define BOW(name,app,kn,prob,wt,cost,hitbon,metal,sub,color) \
+
#<tt>mg</tt> denotes stackability.
OBJECT( \
+
#<tt>bi</tt> is set to 1 if it is a two-handed weapon.
OBJ(name,app), BITS(kn,0,1,0,0,1,0,0,0,0,0,sub,metal), 0, \
+
#<tt>prob</tt> is the item's random generation probability.
WEAPON_CLASS, prob, 0, \
+
#<tt>wt</tt> is the weapon's weight.
wt, cost, 2, 2, hitbon, 0, wt, color )
+
#<tt>cost</tt> is the weapon's base price.
   
+
#<tt>sdam</tt> is the damage against small creatures.
  /* Note: for weapons that don't do an even die of damage (ex. 2-7 or 3-18)
+
#<tt>ldam</tt> is damage against large creatures.
  * the extra damage is added on in weapon.c, not here! */
+
#<tt>hitbon</tt> is the weapon's intrinsic bonus to hit.
   
+
#<tt>typ</tt> is the weapon's damage type.
  #define P PIERCE
+
#<tt>sub</tt> is the weapon's subtype (related proficiency).
#define S SLASH
+
#<tt>metal</tt> is the material the weapon is made out of.
#define B WHACK
+
#<tt>color</tt> is the colour when displayed on the screen.
   
+
 
  /* missiles */
+
 
  PROJECTILE("arrow", (char *)0,
+
 
1, 55, 1, 2, 6, 6, 0, IRON, -P_BOW, HI_METAL),
+
<span id="line64">64.  #define PROJECTILE(name,app,kn,prob,wt,cost,sdam,ldam,hitbon,metal,sub,color) \</span>
  PROJECTILE("elven arrow", "runed arrow",
+
<span id="line65">65.  OBJECT( \</span>
0, 20, 1, 2, 7, 6, 0, WOOD, -P_BOW, HI_WOOD),
+
<span id="line66">66.  OBJ(name,app), \</span>
  PROJECTILE("orcish arrow", "crude arrow",
+
<span id="line67">67.  BITS(kn,1,1,0,0,1,0,0,0,0,PIERCE,sub,metal), 0, \</span>
0, 20, 1, 2, 5, 6, 0, IRON, -P_BOW, CLR_BLACK),
+
<span id="line68">68.  WEAPON_CLASS, prob, 0, \</span>
  PROJECTILE("silver arrow", (char *)0,
+
<span id="line69">69.  wt, cost, sdam, ldam, hitbon, 0, wt, color )</span>
1, 12, 1, 5, 6, 6, 0, SILVER, -P_BOW, HI_SILVER),
+
  <span id="line70">70.  #define BOW(name,app,kn,prob,wt,cost,hitbon,metal,sub,color) \</span>
  PROJECTILE("ya", "bamboo arrow",
+
  <span id="line71">71.  OBJECT( \</span>
0, 15, 1, 4, 7, 7, 1, METAL, -P_BOW, HI_METAL),
+
<span id="line72">72.  OBJ(name,app), BITS(kn,0,1,0,0,1,0,0,0,0,0,sub,metal), 0, \</span>
  PROJECTILE("crossbow bolt", (char *)0,
+
  <span id="line73">73.  WEAPON_CLASS, prob, 0, \</span>
1, 55, 1, 2, 4, 6, 0, IRON, -P_CROSSBOW, HI_METAL),
+
  <span id="line74">74.  wt, cost, 2, 2, hitbon, 0, wt, color )</span>
   
+
  <span id="line75">75.  </span>
WEAPON("dart", (char *)0,
+
  <span id="line76">76.  /* Note: for weapons that don't do an even die of damage (ex. 2-7 or 3-18)</span>
1, 1, 0, 60,  1, 2, 3, 2, 0, P,   -P_DART, IRON, HI_METAL),
+
  <span id="line77">77.    * the extra damage is added on in weapon.c, not here! */</span>
  WEAPON("shuriken", "throwing star",
+
  <span id="line78">78.  </span>
0, 1, 0, 35, 1, 5, 8, 6, 2, P,  -P_SHURIKEN, IRON, HI_METAL),
+
<span id="line79">79.  #define P PIERCE</span>
  WEAPON("boomerang", (char *)0,
+
<span id="line80">80.  #define S SLASH</span>
1, 1, 0, 15, 5, 20, 9, 9, 0, 0,  -P_BOOMERANG, WOOD, HI_WOOD),
+
  <span id="line81">81.  #define B WHACK</span>
   
+
<span id="line82">82.  </span>
/* spears */
+
 
  WEAPON("spear", (char *)0,
+
==== Projectiles ====
1, 1, 0, 50, 30,  3,  6,  8, 0, P,  P_SPEAR, IRON, HI_METAL),
+
 
  WEAPON("elven spear", "runed spear",
+
  <span id="line83">83.  /* missiles */</span>
  0, 1, 0, 10, 30378, 0, P,  P_SPEAR, WOOD, HI_WOOD),
+
<span id="line84">84.  PROJECTILE("arrow", (char *)0,</span>
  WEAPON("orcish spear", "crude spear",
+
<span id="line85">85.  1, 55, 1, 2, 6, 6, 0, IRON, -P_BOW, HI_METAL),</span>
  0, 1, 0, 13, 30, 358, 0, PP_SPEAR, IRON, CLR_BLACK),
+
  <span id="line86">86.  PROJECTILE("elven arrow", "runed arrow",</span>
  WEAPON("dwarvish spear", "stout spear",
+
<span id="line87">87.  0, 20, 1, 2, 7, 6, 0, WOOD, -P_BOW, HI_WOOD),</span>
0, 1, 0, 12, 35,  3,  8,  8, 0, P,  P_SPEAR, IRON, HI_METAL),
+
  <span id="line88">88.  PROJECTILE("orcish arrow", "crude arrow",</span>
  WEAPON("silver spear", (char *)0,
+
<span id="line89">89.  0, 20, 1, 2, 5, 6, 0, IRON, -P_BOW, CLR_BLACK),</span>
  1, 1, 0, 2, 36, 406,  8, 0, P,  P_SPEAR, SILVER, HI_SILVER),
+
  <span id="line90">90.  PROJECTILE("silver arrow", (char *)0,</span>
  WEAPON("javelin", "throwing spear",
+
<span id="line91">91.  1, 12, 1, 5, 6, 6, 0, SILVER, -P_BOW, HI_SILVER),</span>
  0, 1, 0, 10, 20,  3,  66, 0, P,  P_JAVELIN, IRON, HI_METAL),
+
  <span id="line92">92.  PROJECTILE("ya", "bamboo arrow",</span>
   
+
<span id="line93">93.  0, 15, 1, 4, 7, 7, 1, METAL, -P_BOW, HI_METAL),</span>
  WEAPON("trident", (char *)0,
+
  <span id="line94">94.  PROJECTILE("crossbow bolt", (char *)0,</span>
  1, 0, 0, 8, 25564, 0, P,  P_TRIDENT, IRON, HI_METAL),
+
<span id="line95">95.  1, 55, 1, 2, 4, 6, 0, IRON, -P_CROSSBOW, HI_METAL),</span>
/* +1 small, +2d4 large */
+
  <span id="line96">96.  </span>
   
+
  <span id="line97">97.  WEAPON("dart", (char *)0,</span>
  /* blades */
+
<span id="line98">98.  1, 1, 0, 60,  1, 2,  3,  2, 0, P,  -P_DART, IRON, HI_METAL),</span>
WEAPON("dagger", (char *)0,
+
  <span id="line99">99.  WEAPON("shuriken", "throwing star",</span>
  1, 1, 0, 30, 10, 443, 2, P,  P_DAGGER, IRON, HI_METAL),
+
<span id="line100">100. 0, 1, 0, 35, 1586, 2, P,  -P_SHURIKEN, IRON, HI_METAL),</span>
  WEAPON("elven dagger", "runed dagger",
+
<span id="line101">101. WEAPON("boomerang", (char *)0,</span>
  0, 1, 0, 10, 10453, 2, P,  P_DAGGER, WOOD, HI_WOOD),
+
<span id="line102">102. 1, 1, 0, 15, 5, 2099, 0, 0-P_BOOMERANG, WOOD, HI_WOOD),</span>
  WEAPON("orcish dagger", "crude dagger",
+
<span id="line103">103.  </span>
  0, 1, 0, 12, 10433, 2, P,  P_DAGGER, IRON, CLR_BLACK),
+
 
  WEAPON("silver dagger", (char *)0,
+
==== Spears ====
1, 1, 0, 3, 12, 40, 4, 3, 2, P,  P_DAGGER, SILVER, HI_SILVER),
+
 
  WEAPON("athame", (char *)0,
+
<span id="line104">104.  /* spears */</span>
  1, 1, 0, 0, 10,  4,  4,  3, 2, S,  P_DAGGER, IRON, HI_METAL),
+
<span id="line105">105. WEAPON("spear", (char *)0,</span>
  WEAPON("scalpel", (char *)0,
+
<span id="line106">106.  1, 1, 0, 50, 30,  3,  6,  8, 0, P,  P_SPEAR, IRON, HI_METAL),</span>
  1, 1, 0, 0, 563,  3, 2, SP_KNIFE, METAL, HI_METAL),
+
<span id="line107">107. WEAPON("elven spear", "runed spear",</span>
  WEAPON("knife", (char *)0,
+
<span id="line108">108. 0, 1, 0, 10, 30, 37,  8, 0, P,  P_SPEAR, WOOD, HI_WOOD),</span>
  1, 1, 0, 20, 5,  4,  3,  2, 0, P|S, P_KNIFE, IRON, HI_METAL),
+
<span id="line109">109. WEAPON("orcish spear", "crude spear",</span>
  WEAPON("stiletto", (char *)0,
+
<span id="line110">110. 0, 1, 0, 13, 30,  3,  58, 0, P,  P_SPEAR, IRON, CLR_BLACK),</span>
  1, 1, 0,  5, 5,  4,  3, 2, 0, P|S, P_KNIFE, IRON, HI_METAL),
+
  <span id="line111">111. WEAPON("dwarvish spear", "stout spear",</span>
  WEAPON("worm tooth", (char *)0,
+
<span id="line112">112. 0, 1, 0, 12, 35388, 0, P,  P_SPEAR, IRON, HI_METAL),</span>
  1, 0, 0,  0, 2022,  2, 0, 0P_KNIFE, 0, CLR_WHITE),
+
  <span id="line113">113. WEAPON("silver spear", (char *)0,</span>
  WEAPON("crysknife", (char *)0,
+
<span id="line114">114. 1, 1, 0, 2, 36, 4068, 0, P,  P_SPEAR, SILVER, HI_SILVER),</span>
  1, 0, 0,  0, 20,100, 10, 10, 3, P,  P_KNIFE, MINERAL, CLR_WHITE),
+
<span id="line115">115. WEAPON("javelin", "throwing spear",</span>
   
+
<span id="line116">116. 0, 1, 0, 10, 20366, 0, P,  P_JAVELIN, IRON, HI_METAL),</span>
  WEAPON("axe", (char *)0,
+
<span id="line117">117.  </span>
1, 0, 0, 40, 60864, 0, S,   P_AXE, IRON, HI_METAL),
+
<span id="line118">118. WEAPON("trident", (char *)0,</span>
  WEAPON("battle-axe", "double-headed axe",
+
<span id="line119">119. 1, 0, 0, 8, 25564, 0, P,  P_TRIDENT, IRON, HI_METAL),</span>
  0, 0, 1, 10,120, 4086, 0, S,   P_AXE, IRON, HI_METAL),
+
  <span id="line120">120.  /* +1 small, +2d4 large */</span>
/* "double-bitted" ? */
+
  <span id="line121">121.  </span>
   
+
 
/* swords */
+
==== Blades ====
WEAPON("short sword", (char *)0,
+
 
  1, 0, 0,  8, 30, 1068, 0, PP_SHORT_SWORD, IRON, HI_METAL),
+
  <span id="line122">122. /* blades */</span>
  WEAPON("elven short sword", "runed short sword",
+
<span id="line123">123. WEAPON("dagger", (char *)0,</span>
0, 0, 0, 2, 30, 10, 8, 8, 0, P,  P_SHORT_SWORD, WOOD, HI_WOOD),
+
<span id="line124">124. 1, 1, 0, 30, 10,  4,  4,  3, 2, P,  P_DAGGER, IRON, HI_METAL),</span>
  WEAPON("orcish short sword", "crude short sword",
+
<span id="line125">125. WEAPON("elven dagger", "runed dagger",</span>
  0, 0, 0, 3, 30, 1058, 0, PP_SHORT_SWORD, IRON, CLR_BLACK),
+
<span id="line126">126. 0, 1, 0, 10, 1045,  3, 2, PP_DAGGER, WOOD, HI_WOOD),</span>
  WEAPON("dwarvish short sword", "broad short sword",
+
<span id="line127">127. WEAPON("orcish dagger", "crude dagger",</span>
  0, 0, 0, 2, 30, 1078, 0, PP_SHORT_SWORD, IRON, HI_METAL),
+
<span id="line128">128. 0, 1, 0, 12, 10,  4,  3,  3, 2, P,   P_DAGGER, IRON, CLR_BLACK),</span>
  WEAPON("scimitar", "curved sword",
+
<span id="line129">129. WEAPON("silver dagger", (char *)0,</span>
0, 0, 0, 15, 40, 15, 8, 8, 0, S,  P_SCIMITAR, IRON, HI_METAL),
+
<span id="line130">130. 1, 1, 0,  3, 12, 40,  4,  3, 2, P,   P_DAGGER, SILVER, HI_SILVER),</span>
  WEAPON("silver saber", (char *)0,
+
<span id="line131">131. WEAPON("athame", (char *)0,</span>
  1, 0, 0,  6, 40, 758,  8, 0, SP_SABER, SILVER, HI_SILVER),
+
<span id="line132">132. 1, 1, 0,  0, 10443, 2, SP_DAGGER, IRON, HI_METAL),</span>
  WEAPON("broadsword", (char *)0,
+
<span id="line133">133. WEAPON("scalpel", (char *)0,</span>
  1, 0, 0,  8, 70, 10,  46, 0, SP_BROAD_SWORD, IRON, HI_METAL),
+
<span id="line134">134. 1, 1, 0,  0, 5, 6, 3, 3, 2, S,  P_KNIFE, METAL, HI_METAL),</span>
/* +d4 small, +1 large */
+
  <span id="line135">135. WEAPON("knife", (char *)0,</span>
  WEAPON("elven broadsword", "runed broadsword",
+
<span id="line136">136.  1, 1, 0, 20, 5432, 0, P|S, P_KNIFE, IRON, HI_METAL),</span>
  0, 0, 0,  4, 70, 10,  66, 0, SP_BROAD_SWORD, WOOD, HI_WOOD),
+
<span id="line137">137. WEAPON("stiletto", (char *)0,</span>
/* +d4 small, +1 large */
+
<span id="line138">138. 1, 1, 0, 5, 5, 432, 0, P|S, P_KNIFE, IRON, HI_METAL),</span>
  WEAPON("long sword", (char *)0,
+
<span id="line139">139. WEAPON("worm tooth", (char *)0,</span>
  1, 0, 0, 50, 40, 15,  8, 12, 0, SP_LONG_SWORD, IRON, HI_METAL),
+
<span id="line140">140. 1, 0, 0,  0, 20, 222, 0, 0P_KNIFE, 0, CLR_WHITE),</span>
  WEAPON("two-handed sword", (char *)0,
+
<span id="line141">141. WEAPON("crysknife", (char *)0,</span>
  1, 0, 1, 22,150, 50, 126, 0, S,  P_TWO_HANDED_SWORD, IRON, HI_METAL),
+
<span id="line142">142.  1, 0, 0, 0, 20,100, 10, 10, 3, P,  P_KNIFE, MINERAL, CLR_WHITE),</span>
/* +2d6 large */
+
  <span id="line143">143.  </span>
  WEAPON("katana", "samurai sword",
+
<span id="line144">144.  WEAPON("axe", (char *)0,</span>
0, 0, 0,  4, 40, 80, 10, 12, 1, S,  P_LONG_SWORD, IRON, HI_METAL),
+
<span id="line145">145. 1, 0, 0, 40, 60, 864, 0, SP_AXE, IRON, HI_METAL),</span>
  /* special swords set up for artifacts */
+
<span id="line146">146. WEAPON("battle-axe", "double-headed axe",</span>
  WEAPON("tsurugi", "long samurai sword",
+
<span id="line147">147. 0, 0, 1, 10,120, 4086, 0, SP_AXE, IRON, HI_METAL),</span>
  0, 0, 10, 60,500, 168, 2, S,  P_TWO_HANDED_SWORD, METAL, HI_METAL),
+
  <span id="line148">148.  /* "double-bitted" ? */</span>
  /* +2d6 large */
+
  <span id="line149">149. </span>
  WEAPON("runesword", "runed broadsword",
+
 
  0, 0, 0,  0, 40,3004,  6, 0, S,  P_BROAD_SWORD, IRON, CLR_BLACK),
+
==== Swords ====
  /* +d4 small, +1 large */
+
 
/* +5d2 +d8 from level drain */
+
<span id="line150">150.  /* swords */</span>
   
+
<span id="line151">151. WEAPON("short sword", (char *)0,</span>
/* polearms */
+
<span id="line152">152. 1, 0, 0,  8, 30, 106,  8, 0, PP_SHORT_SWORD, IRON, HI_METAL),</span>
/* spear-type */
+
<span id="line153">153. WEAPON("elven short sword", "runed short sword",</span>
  WEAPON("partisan", "vulgar polearm",
+
<span id="line154">154. 0, 0, 0,  2, 30, 10,  88, 0, PP_SHORT_SWORD, WOOD, HI_WOOD),</span>
0, 0, 1, 5, 80, 106, 6, 0, PP_POLEARMS, IRON, HI_METAL),
+
<span id="line155">155. WEAPON("orcish short sword", "crude short sword",</span>
/* +1 large */
+
<span id="line156">156. 0, 0, 0,  3, 30, 10,  58, 0, PP_SHORT_SWORD, IRON, CLR_BLACK),</span>
  WEAPON("ranseur", "hilted polearm",
+
<span id="line157">157. WEAPON("dwarvish short sword", "broad short sword",</span>
  0, 0, 1, 5, 50,  6,  4,  4, 0, PP_POLEARMS, IRON, HI_METAL),
+
<span id="line158">158. 0, 0, 0, 2, 30, 10, 7,  8, 0, PP_SHORT_SWORD, IRON, HI_METAL),</span>
  /* +d4 both */
+
<span id="line159">159. WEAPON("scimitar", "curved sword",</span>
  WEAPON("spetum", "forked polearm",
+
<span id="line160">160. 0, 0, 0, 15, 40, 15, 88, 0, S,  P_SCIMITAR, IRON, HI_METAL),</span>
  0, 0, 15, 50, 5, 6, 6, 0, PP_POLEARMS, IRON, HI_METAL),
+
<span id="line161">161. WEAPON("silver saber", (char *)0,</span>
/* +1 small, +d6 large */
+
<span id="line162">162.  1, 0, 0,  6, 40, 75, 8, 8, 0, S,  P_SABER, SILVER, HI_SILVER),</span>
  WEAPON("glaive", "single-edged polearm",
+
  <span id="line163">163. WEAPON("broadsword", (char *)0,</span>
  0, 0, 1,  8, 75, 66, 10, 0, S,  P_POLEARMS, IRON, HI_METAL),
+
<span id="line164">164. 1, 0, 0,  8, 70, 10, 46, 0, S,  P_BROAD_SWORD, IRON, HI_METAL),</span>
  WEAPON("lance", (char *)0,
+
<span id="line165">165. /* +d4 small, +1 large */</span>
  1, 0, 0,  4,180, 1068, 0, PP_LANCE, IRON, HI_METAL),
+
<span id="line166">166. WEAPON("elven broadsword", "runed broadsword",</span>
  /* axe-type */
+
<span id="line167">167. 0, 0, 0,  4, 70, 106,  6, 0, S,  P_BROAD_SWORD, WOOD, HI_WOOD),</span>
  WEAPON("halberd", "angled poleaxe",
+
<span id="line168">168. /* +d4 small, +1 large */</span>
0, 0, 1, 8,150, 10, 10, 6, 0, P|S, P_POLEARMS, IRON, HI_METAL),
+
  <span id="line169">169. WEAPON("long sword", (char *)0,</span>
/* +1d6 large */
+
<span id="line170">170.  1, 0, 0, 50, 40, 158, 12, 0, SP_LONG_SWORD, IRON, HI_METAL),</span>
  WEAPON("bardiche", "long poleaxe",
+
<span id="line171">171. WEAPON("two-handed sword", (char *)0,</span>
  0, 0, 1,  4,120, 744, 0, S,  P_POLEARMS, IRON, HI_METAL),
+
<span id="line172">172. 1, 0, 1, 22,150, 50, 12,  6, 0, SP_TWO_HANDED_SWORD, IRON, HI_METAL),</span>
  /* +1d4 small, +2d4 large */
+
<span id="line173">173. /* +2d6 large */</span>
  WEAPON("voulge", "pole cleaver",
+
<span id="line174">174. WEAPON("katana", "samurai sword",</span>
  0, 0, 1,  4,1255,  4,  4, 0, S,  P_POLEARMS, IRON, HI_METAL),
+
<span id="line175">175. 0, 0, 04, 40, 80, 10, 12, 1, SP_LONG_SWORD, IRON, HI_METAL),</span>
  /* +d4 both */
+
<span id="line176">176.  /* special swords set up for artifacts */</span>
  WEAPON("dwarvish mattock", "broad pick",
+
<span id="line177">177. WEAPON("tsurugi", "long samurai sword",</span>
  0, 0, 1, 13,120, 50, 128,-1, BP_PICK_AXE, IRON, HI_METAL),
+
<span id="line178">178. 0, 0, 1,  0, 60,500, 168, 2, S,  P_TWO_HANDED_SWORD, METAL, HI_METAL),</span>
   
+
  <span id="line179">179.  /* +2d6 large */</span>
/* curved/hooked */
+
<span id="line180">180.  WEAPON("runesword", "runed broadsword",</span>
  WEAPON("fauchard", "pole sickle",
+
<span id="line181">181. 0, 0, 0,  0, 40,30046, 0, SP_BROAD_SWORD, IRON, CLR_BLACK),</span>
  0, 0, 1,  6, 605,  6, 8, 0, P|S, P_POLEARMS, IRON, HI_METAL),
+
  <span id="line182">182.  /* +d4 small, +1 large */</span>
  WEAPON("guisarme", "pruning hook",
+
  <span id="line183">183.  /* +5d2 +d8 from level drain */</span>
  0, 0, 16, 80, 54,  8, 0, SP_POLEARMS, IRON, HI_METAL),
+
<span id="line184">184.  </span>
/* +1d4 small */
+
 
  WEAPON("bill-guisarme", "hooked polearm",
+
==== Polearms ====
  0, 0, 1,  4,120, 74, 10, 0, P|S, P_POLEARMS, IRON, HI_METAL),
+
  <span id="line185">185. /* polearms */</span>
  /* +1d4 small */
+
  <span id="line186">186.  /* spear-type */</span>
/* other */
+
<span id="line187">187.  WEAPON("partisan", "vulgar polearm",</span>
  WEAPON("lucern hammer", "pronged polearm",
+
<span id="line188">188. 0, 0, 1,  5, 80, 1066, 0, P,  P_POLEARMS, IRON, HI_METAL),</span>
  0, 0, 1,  5,150,  7,  4,  6, 0, B|P, P_POLEARMS, IRON, HI_METAL),
+
<span id="line189">189. /* +1 large */</span>
  /* +1d4 small */
+
<span id="line190">190. WEAPON("ranseur", "hilted polearm",</span>
  WEAPON("bec de corbin", "beaked polearm",
+
<span id="line191">191. 0, 0, 1,  5, 506,  4,  4, 0, P,  P_POLEARMS, IRON, HI_METAL),</span>
  0, 0, 1,  4,100886, 0, B|P, P_POLEARMS, IRON, HI_METAL),
+
<span id="line192">192. /* +d4 both */</span>
   
+
<span id="line193">193. WEAPON("spetum", "forked polearm",</span>
/* bludgeons */
+
<span id="line194">194. 0, 0, 1, 5, 50, 5, 66, 0, PP_POLEARMS, IRON, HI_METAL),</span>
  WEAPON("mace", (char *)0,
+
  <span id="line195">195.  /* +1 small, +d6 large */</span>
  1, 0, 0, 40, 30, 5, 66, 0, B,  P_MACE, IRON, HI_METAL),
+
<span id="line196">196. WEAPON("glaive", "single-edged polearm",</span>
/* +1 small */
+
<span id="line197">197. 0, 0, 1,  8, 756,  6, 10, 0, S,   P_POLEARMS, IRON, HI_METAL),</span>
  WEAPON("morning star", (char *)0,
+
<span id="line198">198. WEAPON("lance", (char *)0,</span>
  1, 0, 0, 12,120, 104,  6, 0, B,   P_MORNING_STAR, IRON, HI_METAL),
+
<span id="line199">199. 1, 0, 0,  4,180, 106,  8, 0, PP_LANCE, IRON, HI_METAL),</span>
/* +d4 small, +1 large */
+
<span id="line200">200.  /* axe-type */</span>
  WEAPON("war hammer", (char *)0,
+
<span id="line201">201. WEAPON("halberd", "angled poleaxe",</span>
  1, 0, 0, 15, 50,  5,  4,  4, 0, BP_HAMMER, IRON, HI_METAL),
+
<span id="line202">202. 0, 0, 1,  8,150, 10, 106, 0, P|S, P_POLEARMS, IRON, HI_METAL),</span>
  /* +1 small */
+
<span id="line203">203. /* +1d6 large */</span>
  WEAPON("club", (char *)0,
+
<span id="line204">204. WEAPON("bardiche", "long poleaxe",</span>
  1, 0, 0, 12, 3036, 3, 0, B,   P_CLUB, WOOD, HI_WOOD),
+
<span id="line205">205. 0, 0, 1,  4,120,  7,  4,  4, 0, S,   P_POLEARMS, IRON, HI_METAL),</span>
  #ifdef KOPS
+
<span id="line206">206. /* +1d4 small, +2d4 large */</span>
WEAPON("rubber hose", (char *)0,
+
<span id="line207">207. WEAPON("voulge", "pole cleaver",</span>
1, 0, 0, 0, 20, 3, 4,  3, 0, B,  P_WHIP, PLASTIC, CLR_BROWN),
+
<span id="line208">208. 0, 0, 1,  4,125544, 0, S,   P_POLEARMS, IRON, HI_METAL),</span>
#endif
+
  <span id="line209">209.  /* +d4 both */</span>
  WEAPON("quarterstaff", "staff",
+
<span id="line210">210. WEAPON("dwarvish mattock", "broad pick",</span>
  0, 0, 1, 11, 4056,  6, 0, B,   P_QUARTERSTAFF, WOOD, HI_WOOD),
+
<span id="line211">211. 0, 0, 1, 13,120, 50, 128,-1, B,  P_PICK_AXE, IRON, HI_METAL),</span>
  /* two-piece */
+
<span id="line212">212.  </span>
  WEAPON("aklys", "thonged club",
+
<span id="line213">213.  /* curved/hooked */</span>
  0, 0, 08, 15463, 0, B,   P_CLUB, IRON, HI_METAL),
+
<span id="line214">214. WEAPON("fauchard", "pole sickle",</span>
  WEAPON("flail", (char *)0,
+
<span id="line215">215. 0, 0, 1, 6, 605,  6,  8, 0, P|S, P_POLEARMS, IRON, HI_METAL),</span>
  1, 0, 0, 40, 154,  6,  4, 0, B,  P_FLAIL, IRON, HI_METAL),
+
<span id="line216">216. WEAPON("guisarme", "pruning hook",</span>
  /* +1 small, +1d4 large */
+
<span id="line217">217. 0, 0, 1, 6, 80,  5,  4,  8, 0, SP_POLEARMS, IRON, HI_METAL),</span>
  /* misc */
+
<span id="line218">218. /* +1d4 small */</span>
  WEAPON("bullwhip", (char *)0,
+
<span id="line219">219. WEAPON("bill-guisarme", "hooked polearm",</span>
  1, 0, 0, 2, 20,  4,  2,  1, 0, 0P_WHIP, LEATHER, CLR_BROWN),
+
<span id="line220">220. 0, 0, 1, 4,12074, 10, 0, P|S, P_POLEARMS, IRON, HI_METAL),</span>
   
+
  <span id="line221">221.  /* +1d4 small */</span>
/* bows */
+
  <span id="line222">222. /* other */</span>
  BOW("bow", (char *)0, 1, 24, 30, 60, 0, WOOD, P_BOW, HI_WOOD),
+
  <span id="line223">223. WEAPON("lucern hammer", "pronged polearm",</span>
  BOW("elven bow", "runed bow", 0, 12, 30, 60, 0, WOOD, P_BOW, HI_WOOD),
+
<span id="line224">224. 0, 0, 1, 5,15074,  6, 0, B|P, P_POLEARMS, IRON, HI_METAL),</span>
  BOW("orcish bow", "crude bow", 0, 12, 30, 60, 0, WOOD, P_BOW, CLR_BLACK),
+
  <span id="line225">225.  /* +1d4 small */</span>
  BOW("yumi", "long bow", 0, 0, 30, 60, 0, WOOD, P_BOW, HI_WOOD),
+
<span id="line226">226. WEAPON("bec de corbin", "beaked polearm",</span>
  BOW("sling", (char *)0, 1, 403, 20, 0, LEATHER, P_SLING, HI_LEATHER),
+
<span id="line227">227. 0, 0, 14,100886, 0, B|P, P_POLEARMS, IRON, HI_METAL),</span>
BOW("crossbow", (char *)0, 1, 45, 50, 40, 0, WOOD, P_CROSSBOW, HI_WOOD),
+
<span id="line228">228.  </span>
   
+
 
  #undef P
+
==== Bludgeoning weapons ====
  #undef S
+
 
  #undef B
+
<span id="line229">229.  /* bludgeons */</span>
   
+
<span id="line230">230. WEAPON("mace", (char *)0,</span>
  #undef WEAPON
+
<span id="line231">231. 1, 0, 0, 40, 305,  6,  6, 0, B,  P_MACE, IRON, HI_METAL),</span>
  #undef PROJECTILE
+
<span id="line232">232. /* +1 small */</span>
  #undef BOW
+
  <span id="line233">233. WEAPON("morning star", (char *)0,</span>
   
+
<span id="line234">234. 1, 0, 0, 12,120, 10,  4,  6, 0, BP_MORNING_STAR, IRON, HI_METAL),</span>
 +
  <span id="line235">235.  /* +d4 small, +1 large */</span>
 +
  <span id="line236">236.  WEAPON("war hammer", (char *)0,</span>
 +
<span id="line237">237.  1, 0, 0, 15, 50, 54, 4, 0, B,   P_HAMMER, IRON, HI_METAL),</span>
 +
  <span id="line238">238.  /* +1 small */</span>
 +
<span id="line239">239.  WEAPON("club", (char *)0,</span>
 +
<span id="line240">240.  1, 0, 0, 12, 30, 3, 63, 0, B,   P_CLUB, WOOD, HI_WOOD),</span>
 +
  <span id="line241">241.  #ifdef KOPS</span>
 +
<span id="line242">242.  WEAPON("rubber hose", (char *)0,</span>
 +
<span id="line243">243.  1, 0, 00, 20, 3, 4, 3, 0, B,   P_WHIP, PLASTIC, CLR_BROWN),</span>
 +
  <span id="line244">244. #endif</span>
 +
  <span id="line245">245. WEAPON("quarterstaff", "staff",</span>
 +
  <span id="line246">246.  0, 0, 1, 11, 40, 5, 6, 6, 0, B,  P_QUARTERSTAFF, WOOD, HI_WOOD),</span>
 +
<span id="line247">247.  /* two-piece */</span>
 +
  <span id="line248">248.  WEAPON("aklys", "thonged club",</span>
 +
<span id="line249">249.  0, 0, 0,  8, 15,  4,  6,  3, 0, B,  P_CLUB, IRON, HI_METAL),</span>
 +
<span id="line250">250.  WEAPON("flail", (char *)0,</span>
 +
<span id="line251">251.  1, 0, 0, 40, 15,  4,  6,  4, 0, B,  P_FLAIL, IRON, HI_METAL),</span>
 +
<span id="line252">252.  /* +1 small, +1d4 large */</span>
 +
 
 +
==== Miscellaneous weaponry ====
 +
 
 +
<span id="line253">253.  /* misc */</span>
 +
<span id="line254">254.  WEAPON("bullwhip", (char *)0,</span>
 +
<span id="line255">255.  1, 0, 0,  2, 20,  4,  2,  1, 0, 0,  P_WHIP, LEATHER, CLR_BROWN),</span>
 +
<span id="line256">256.  </span>
 +
<span id="line257">257.  /* bows */</span>
 +
<span id="line258">258.  BOW("bow", (char *)0, 1, 24, 30, 60, 0, WOOD, P_BOW, HI_WOOD),</span>
 +
<span id="line259">259.  BOW("elven bow", "runed bow", 0, 12, 30, 60, 0, WOOD, P_BOW, HI_WOOD),</span>
 +
<span id="line260">260.  BOW("orcish bow", "crude bow", 0, 12, 30, 60, 0, WOOD, P_BOW, CLR_BLACK),</span>
 +
<span id="line261">261.  BOW("yumi", "long bow", 0,  0, 30, 60, 0, WOOD, P_BOW, HI_WOOD),</span>
 +
<span id="line262">262.  BOW("sling", (char *)0, 1, 40,  3, 20, 0, LEATHER, P_SLING, HI_LEATHER),</span>
 +
<span id="line263">263.  BOW("crossbow", (char *)0, 1, 45, 50, 40, 0, WOOD, P_CROSSBOW, HI_WOOD),</span>
 +
<span id="line264">264.  </span>
 +
<span id="line265">265.  #undef P</span>
 +
<span id="line266">266.  #undef S</span>
 +
<span id="line267">267.  #undef B</span>
 +
<span id="line268">268.  </span>
 +
<span id="line269">269.  #undef WEAPON</span>
 +
<span id="line270">270.  #undef PROJECTILE</span>
 +
<span id="line271">271.  #undef BOW</span>
 +
<span id="line272">272.  </span>
 +
 
 
=== Armor ===
 
=== Armor ===
 
==== Armor macros ====
 
==== Armor macros ====
  /* armor ... */
+
 
  /* IRON denotes ferrous metals, including steel.
+
The comment about copper is actually false: both copper and iron corrodes in nethack.
   * Only IRON weapons and armor can rust.
+
 
   * Only COPPER (including brass) corrodes.
+
<span id="line273">273. /* armor ... */</span>
   * Some creatures are vulnerable to SILVER.
+
<span id="line274">274. /* IRON denotes ferrous metals, including steel.</span>
   */
+
<span id="line275">275.   * Only IRON weapons and armor can rust.</span>
  #define ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,sub,metal,c) \
+
<span id="line276">276.   * Only COPPER (including brass) corrodes.</span>
  OBJECT( \
+
<span id="line277">277.   * Some creatures are vulnerable to SILVER.</span>
  OBJ(name,desc), BITS(kn,0,1,0,mgc,1,0,0,blk,0,0,sub,metal), power, \
+
<span id="line278">278.   */</span>
  ARMOR_CLASS, prob, delay, wt, cost, \
+
<span id="line279">279. #define ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,sub,metal,c) \</span>
  0, 0, 10 - ac, can, wt, c )
+
<span id="line280">280. OBJECT( \</span>
  #define HELM(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \
+
<span id="line281">281. OBJ(name,desc), BITS(kn,0,1,0,mgc,1,0,0,blk,0,0,sub,metal), power, \</span>
  ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_HELM,metal,c)
+
<span id="line282">282. ARMOR_CLASS, prob, delay, wt, cost, \</span>
  #define CLOAK(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \
+
<span id="line283">283. 0, 0, 10 - ac, can, wt, c )</span>
  ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_CLOAK,metal,c)
+
<span id="line284">284. #define HELM(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \</span>
  #define SHIELD(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,metal,c) \
+
<span id="line285">285. ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_HELM,metal,c)</span>
  ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,ARM_SHIELD,metal,c)
+
<span id="line286">286. #define CLOAK(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \</span>
  #define GLOVES(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \
+
<span id="line287">287. ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_CLOAK,metal,c)</span>
  ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_GLOVES,metal,c)
+
<span id="line288">288. #define SHIELD(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,metal,c) \</span>
  #define BOOTS(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \
+
<span id="line289">289. ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,ARM_SHIELD,metal,c)</span>
  ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_BOOTS,metal,c)
+
<span id="line290">290. #define GLOVES(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \</span>
 +
<span id="line291">291. ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_GLOVES,metal,c)</span>
 +
<span id="line292">292. #define BOOTS(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \</span>
 +
<span id="line293">293. ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_BOOTS,metal,c)</span>
 +
<span id="line294">294.  </span>
  
 
==== Helmets ====
 
==== Helmets ====
  
  /* helmets */
+
<span id="line295">295. /* helmets */</span>
  HELM("elven leather helm", "leather hat",
+
<span id="line296">296. HELM("elven leather helm", "leather hat",</span>
  0, 0,  0, 6, 1,  3,  8, 9, 0, LEATHER, HI_LEATHER),
+
<span id="line297">297. 0, 0,  0, 6, 1,  3,  8, 9, 0, LEATHER, HI_LEATHER),</span>
  HELM("orcish helm", "iron skull cap",
+
<span id="line298">298. HELM("orcish helm", "iron skull cap",</span>
  0, 0,  0, 6, 1, 30,  10, 9, 0, IRON, CLR_BLACK),
+
<span id="line299">299. 0, 0,  0, 6, 1, 30,  10, 9, 0, IRON, CLR_BLACK),</span>
  HELM("dwarvish iron helm", "hard hat",
+
<span id="line300">300. HELM("dwarvish iron helm", "hard hat",</span>
  0, 0,  0, 6, 1, 40,  20, 8, 0, IRON, HI_METAL),
+
<span id="line301">301. 0, 0,  0, 6, 1, 40,  20, 8, 0, IRON, HI_METAL),</span>
  HELM("fedora", (char *)0,
+
<span id="line302">302. HELM("fedora", (char *)0,</span>
  1, 0,  0, 0, 0,  3,  1,10, 0, CLOTH, CLR_BROWN),
+
<span id="line303">303. 1, 0,  0, 0, 0,  3,  1,10, 0, CLOTH, CLR_BROWN),</span>
  HELM("cornuthaum", "conical hat",
+
<span id="line304">304. HELM("cornuthaum", "conical hat",</span>
  0, 1,  CLAIRVOYANT,
+
<span id="line305">305. 0, 1,  CLAIRVOYANT,</span>
  3, 1,  4,  80,10, 2, CLOTH, CLR_BLUE),
+
<span id="line306">306. 3, 1,  4,  80,10, 2, CLOTH, CLR_BLUE),</span>
  HELM("dunce cap", "conical hat",
+
<span id="line307">307. HELM("dunce cap", "conical hat",</span>
  0, 1,  0, 3, 1,  4,  1,10, 0, CLOTH, CLR_BLUE),
+
<span id="line308">308. 0, 1,  0, 3, 1,  4,  1,10, 0, CLOTH, CLR_BLUE),</span>
  HELM("dented pot", (char *)0,
+
<span id="line309">309. HELM("dented pot", (char *)0,</span>
  1, 0,  0, 2, 0, 10,  8, 9, 0, IRON, CLR_BLACK),
+
<span id="line310">310. 1, 0,  0, 2, 0, 10,  8, 9, 0, IRON, CLR_BLACK),</span>
  /* With shuffled appearances... */
+
<span id="line311">311. /* With shuffled appearances... */</span>
  HELM("helmet", "plumed helmet",
+
<span id="line312">312. HELM("helmet", "plumed helmet",</span>
  0, 0,  0,      10, 1, 30,  10, 9, 0, IRON, HI_METAL),
+
<span id="line313">313. 0, 0,  0,      10, 1, 30,  10, 9, 0, IRON, HI_METAL),</span>
  HELM("helm of brilliance", "etched helmet",
+
<span id="line314">314. HELM("helm of brilliance", "etched helmet",</span>
  0, 1,  0, 6, 1, 50,  50, 9, 0, IRON, CLR_GREEN),
+
<span id="line315">315. 0, 1,  0, 6, 1, 50,  50, 9, 0, IRON, CLR_GREEN),</span>
  HELM("helm of opposite alignment", "crested helmet",
+
<span id="line316">316. HELM("helm of opposite alignment", "crested helmet",</span>
  0, 1,  0, 6, 1, 50,  50, 9, 0, IRON, HI_METAL),
+
<span id="line317">317. 0, 1,  0, 6, 1, 50,  50, 9, 0, IRON, HI_METAL),</span>
  HELM("helm of telepathy", "visored helmet",
+
<span id="line318">318. HELM("helm of telepathy", "visored helmet",</span>
  0, 1,  TELEPAT, 2, 1, 50,  50, 9, 0, IRON, HI_METAL),
+
<span id="line319">319. 0, 1,  TELEPAT, 2, 1, 50,  50, 9, 0, IRON, HI_METAL),</span>
 +
<span id="line320">320.  </span>
 +
 
 +
==== Body armor ====
 +
<span id="line321">321.  /* suits of armor */</span>
 +
<span id="line322">322.  /*</span>
 +
<span id="line323">323.  * There is code in polyself.c that assumes (1) and (2).</span>
 +
<span id="line324">324.  * There is code in obj.h, objnam.c, mon.c, read.c that assumes (2).</span>
 +
<span id="line325">325.  *</span>
 +
<span id="line326">326.  * (1) The dragon scale mails and the dragon scales are together.</span>
 +
<span id="line327">327.  * (2) That the order of the dragon scale mail and dragon scales is the</span>
 +
<span id="line328">328.  *     the same defined in monst.c.</span>
 +
<span id="line329">329.  */</span>
 +
<span id="line330">330.  #define DRGN_ARMR(name,mgc,power,cost,ac,color) \</span>
 +
<span id="line331">331.  ARMOR(name,(char *)0,1,mgc,1,power,0,5,40,cost,ac,0,ARM_SUIT,DRAGON_HIDE,color)</span>
 +
<span id="line332">332.  /* 3.4.1: dragon scale mail reclassified as "magic" since magic is</span>
 +
<span id="line333">333.    needed to create them */</span>
 +
<span id="line334">334.  DRGN_ARMR("gray dragon scale mail",  1, ANTIMAGIC,  1200, 1, CLR_GRAY),</span>
 +
<span id="line335">335.  DRGN_ARMR("silver dragon scale mail", 1, REFLECTING, 1200, 1, DRAGON_SILVER),</span>
 +
<span id="line336">336.  #if 0 /* DEFERRED */</span>
 +
<span id="line337">337.  DRGN_ARMR("shimmering dragon scale mail", 1, DISPLACED, 1200, 1, CLR_CYAN),</span>
 +
<span id="line338">338.  #endif</span>
 +
<span id="line339">339.  DRGN_ARMR("red dragon scale mail",    1, FIRE_RES,    900, 1, CLR_RED),</span>
 +
<span id="line340">340.  DRGN_ARMR("white dragon scale mail",  1, COLD_RES,    900, 1, CLR_WHITE),</span>
 +
<span id="line341">341.  DRGN_ARMR("orange dragon scale mail", 1, SLEEP_RES,  900, 1, CLR_ORANGE),</span>
 +
<span id="line342">342.  DRGN_ARMR("black dragon scale mail",  1, DISINT_RES, 1200, 1, CLR_BLACK),</span>
 +
<span id="line343">343.  DRGN_ARMR("blue dragon scale mail",  1, SHOCK_RES,  900, 1, CLR_BLUE),</span>
 +
<span id="line344">344.  DRGN_ARMR("green dragon scale mail",  1, POISON_RES,  900, 1, CLR_GREEN),</span>
 +
<span id="line345">345.  DRGN_ARMR("yellow dragon scale mail", 1, ACID_RES,    900, 1, CLR_YELLOW),</span>
 +
<span id="line346">346.  </span>
 +
<span id="line347">347.  /* For now, only dragons leave these. */</span>
 +
<span id="line348">348.  /* 3.4.1: dragon scales left classified as "non-magic"; they confer</span>
 +
<span id="line349">349.    magical properties but are produced "naturally" */</span>
 +
<span id="line350">350.  DRGN_ARMR("gray dragon scales",  0, ANTIMAGIC,  700, 7, CLR_GRAY),</span>
 +
<span id="line351">351.  DRGN_ARMR("silver dragon scales", 0, REFLECTING, 700, 7, DRAGON_SILVER),</span>
 +
<span id="line352">352.  #if 0 /* DEFERRED */</span>
 +
<span id="line353">353.  DRGN_ARMR("shimmering dragon scales", 0, DISPLACED,  700, 7, CLR_CYAN),</span>
 +
<span id="line354">354.  #endif</span>
 +
<span id="line355">355.  DRGN_ARMR("red dragon scales",    0, FIRE_RES,  500, 7, CLR_RED),</span>
 +
<span id="line356">356.  DRGN_ARMR("white dragon scales",  0, COLD_RES,  500, 7, CLR_WHITE),</span>
 +
<span id="line357">357.  DRGN_ARMR("orange dragon scales", 0, SLEEP_RES,  500, 7, CLR_ORANGE),</span>
 +
<span id="line358">358.  DRGN_ARMR("black dragon scales",  0, DISINT_RES, 700, 7, CLR_BLACK),</span>
 +
<span id="line359">359.  DRGN_ARMR("blue dragon scales",  0, SHOCK_RES,  500, 7, CLR_BLUE),</span>
 +
<span id="line360">360.  DRGN_ARMR("green dragon scales",  0, POISON_RES, 500, 7, CLR_GREEN),</span>
 +
<span id="line361">361.  DRGN_ARMR("yellow dragon scales", 0, ACID_RES,  500, 7, CLR_YELLOW),</span>
 +
<span id="line362">362.  #undef DRGN_ARMR</span>
 +
<span id="line363">363.  </span>
 +
<span id="line364">364.  ARMOR("plate mail", (char *)0,</span>
 +
<span id="line365">365.  1, 0, 1, 0, 44, 5, 450, 600,  3, 2, ARM_SUIT, IRON, HI_METAL),</span>
 +
<span id="line366">366.  ARMOR("crystal plate mail", (char *)0,</span>
 +
<span id="line367">367.  1, 0, 1, 0, 10, 5, 450, 820,  3, 2, ARM_SUIT, GLASS, CLR_WHITE),</span>
 +
<span id="line368">368.  #ifdef TOURIST</span>
 +
<span id="line369">369.  ARMOR("bronze plate mail", (char *)0,</span>
 +
<span id="line370">370.  1, 0, 1, 0, 25, 5, 450, 400,  4, 0, ARM_SUIT, COPPER, HI_COPPER),</span>
 +
<span id="line371">371.  #else</span>
 +
<span id="line372">372.  ARMOR("bronze plate mail", (char *)0,</span>
 +
<span id="line373">373.  1, 0, 1, 0, 35, 5, 450, 400,  4, 0, ARM_SUIT, COPPER, HI_COPPER),</span>
 +
<span id="line374">374.  #endif</span>
 +
<span id="line375">375.  ARMOR("splint mail", (char *)0,</span>
 +
<span id="line376">376.  1, 0, 1, 0, 62, 5, 400,  80,  4, 1, ARM_SUIT, IRON, HI_METAL),</span>
 +
<span id="line377">377.  ARMOR("banded mail", (char *)0,</span>
 +
<span id="line378">378.  1, 0, 1, 0, 72, 5, 350,  90,  4, 0, ARM_SUIT, IRON, HI_METAL),</span>
 +
<span id="line379">379.  ARMOR("dwarvish mithril-coat", (char *)0,</span>
 +
<span id="line380">380.  1, 0, 0, 0, 10, 1, 150, 240,  4, 3, ARM_SUIT, MITHRIL, HI_METAL),</span>
 +
<span id="line381">381.  ARMOR("elven mithril-coat", (char *)0,</span>
 +
<span id="line382">382.  1, 0, 0, 0, 15, 1, 150, 240,  5, 3, ARM_SUIT, MITHRIL, HI_METAL),</span>
 +
<span id="line383">383.  ARMOR("chain mail", (char *)0,</span>
 +
<span id="line384">384.  1, 0, 0, 0, 72, 5, 300,  75,  5, 1, ARM_SUIT, IRON, HI_METAL),</span>
 +
<span id="line385">385.  ARMOR("orcish chain mail", "crude chain mail",</span>
 +
<span id="line386">386.  0, 0, 0, 0, 20, 5, 300,  75,  6, 1, ARM_SUIT, IRON, CLR_BLACK),</span>
 +
<span id="line387">387.  ARMOR("scale mail", (char *)0,</span>
 +
<span id="line388">388.  1, 0, 0, 0, 72, 5, 250,  45,  6, 0, ARM_SUIT, IRON, HI_METAL),</span>
 +
<span id="line389">389.  ARMOR("studded leather armor", (char *)0,</span>
 +
<span id="line390">390.  1, 0, 0, 0, 72, 3, 200,  15,  7, 1, ARM_SUIT, LEATHER, HI_LEATHER),</span>
 +
<span id="line391">391.  ARMOR("ring mail", (char *)0,</span>
 +
<span id="line392">392.  1, 0, 0, 0, 72, 5, 250, 100,  7, 0, ARM_SUIT, IRON, HI_METAL),</span>
 +
<span id="line393">393.  ARMOR("orcish ring mail", "crude ring mail",</span>
 +
<span id="line394">394.  0, 0, 0, 0, 20, 5, 250,  80,  8, 1, ARM_SUIT, IRON, CLR_BLACK),</span>
 +
<span id="line395">395.  ARMOR("leather armor", (char *)0,</span>
 +
<span id="line396">396.  1, 0, 0, 0, 82, 3, 150,  5,  8, 0, ARM_SUIT, LEATHER, HI_LEATHER),</span>
 +
<span id="line397">397.  ARMOR("leather jacket", (char *)0,</span>
 +
<span id="line398">398.  1, 0, 0, 0, 12, 0, 30,  10,  9, 0, ARM_SUIT, LEATHER, CLR_BLACK),</span>
 +
<span id="line399">399.  </span>
 +
<span id="line400">400.  #ifdef TOURIST</span>
 +
<span id="line401">401.  /* shirts */</span>
 +
<span id="line402">402.  ARMOR("Hawaiian shirt", (char *)0,</span>
 +
<span id="line403">403.  1, 0, 0, 0, 8, 0, 5,  3, 10, 0, ARM_SHIRT, CLOTH, CLR_MAGENTA),</span>
 +
<span id="line404">404.  ARMOR("T-shirt", (char *)0,</span>
 +
<span id="line405">405.  1, 0, 0, 0, 2, 0, 5,  2, 10, 0, ARM_SHIRT, CLOTH, CLR_WHITE),</span>
 +
<span id="line406">406.  #endif</span>
 +
<span id="line407">407.  </span>
  
==== Suits of Armor ====
 
 
/* suits of armor */
 
/*
 
  * There is code in polyself.c that assumes (1) and (2).
 
  * There is code in obj.h, objnam.c, mon.c, read.c that assumes (2).
 
  *
 
  * (1) The dragon scale mails and the dragon scales are together.
 
  * (2) That the order of the dragon scale mail and dragon scales is the
 
  *     the same defined in monst.c.
 
  */
 
#define DRGN_ARMR(name,mgc,power,cost,ac,color) \
 
ARMOR(name,(char *)0,1,mgc,1,power,0,5,40,cost,ac,0,ARM_SUIT,DRAGON_HIDE,color)
 
/* 3.4.1: dragon scale mail reclassified as "magic" since magic is
 
    needed to create them */
 
DRGN_ARMR("gray dragon scale mail",  1, ANTIMAGIC,  1200, 1, CLR_GRAY),
 
DRGN_ARMR("silver dragon scale mail", 1, REFLECTING, 1200, 1, DRAGON_SILVER),
 
#if 0 /* DEFERRED */
 
DRGN_ARMR("shimmering dragon scale mail", 1, DISPLACED, 1200, 1, CLR_CYAN),
 
#endif
 
DRGN_ARMR("red dragon scale mail",    1, FIRE_RES,    900, 1, CLR_RED),
 
DRGN_ARMR("white dragon scale mail",  1, COLD_RES,    900, 1, CLR_WHITE),
 
DRGN_ARMR("orange dragon scale mail", 1, SLEEP_RES,  900, 1, CLR_ORANGE),
 
DRGN_ARMR("black dragon scale mail",  1, DISINT_RES, 1200, 1, CLR_BLACK),
 
DRGN_ARMR("blue dragon scale mail",  1, SHOCK_RES,  900, 1, CLR_BLUE),
 
DRGN_ARMR("green dragon scale mail",  1, POISON_RES,  900, 1, CLR_GREEN),
 
DRGN_ARMR("yellow dragon scale mail", 1, ACID_RES,    900, 1, CLR_YELLOW),
 
 
/* For now, only dragons leave these. */
 
/* 3.4.1: dragon scales left classified as "non-magic"; they confer
 
    magical properties but are produced "naturally" */
 
DRGN_ARMR("gray dragon scales",  0, ANTIMAGIC,  700, 7, CLR_GRAY),
 
DRGN_ARMR("silver dragon scales", 0, REFLECTING, 700, 7, DRAGON_SILVER),
 
#if 0 /* DEFERRED */
 
DRGN_ARMR("shimmering dragon scales", 0, DISPLACED,  700, 7, CLR_CYAN),
 
#endif
 
DRGN_ARMR("red dragon scales",    0, FIRE_RES,  500, 7, CLR_RED),
 
DRGN_ARMR("white dragon scales",  0, COLD_RES,  500, 7, CLR_WHITE),
 
DRGN_ARMR("orange dragon scales", 0, SLEEP_RES,  500, 7, CLR_ORANGE),
 
DRGN_ARMR("black dragon scales",  0, DISINT_RES, 700, 7, CLR_BLACK),
 
DRGN_ARMR("blue dragon scales",  0, SHOCK_RES,  500, 7, CLR_BLUE),
 
DRGN_ARMR("green dragon scales",  0, POISON_RES, 500, 7, CLR_GREEN),
 
DRGN_ARMR("yellow dragon scales", 0, ACID_RES,  500, 7, CLR_YELLOW),
 
#undef DRGN_ARMR
 
 
ARMOR("plate mail", (char *)0,
 
1, 0, 1, 0, 44, 5, 450, 600,  3, 2, ARM_SUIT, IRON, HI_METAL),
 
ARMOR("crystal plate mail", (char *)0,
 
1, 0, 1, 0, 10, 5, 450, 820,  3, 2, ARM_SUIT, GLASS, CLR_WHITE),
 
#ifdef TOURIST
 
ARMOR("bronze plate mail", (char *)0,
 
1, 0, 1, 0, 25, 5, 450, 400,  4, 0, ARM_SUIT, COPPER, HI_COPPER),
 
#else
 
ARMOR("bronze plate mail", (char *)0,
 
1, 0, 1, 0, 35, 5, 450, 400,  4, 0, ARM_SUIT, COPPER, HI_COPPER),
 
#endif
 
ARMOR("splint mail", (char *)0,
 
1, 0, 1, 0, 62, 5, 400,  80,  4, 1, ARM_SUIT, IRON, HI_METAL),
 
ARMOR("banded mail", (char *)0,
 
1, 0, 1, 0, 72, 5, 350,  90,  4, 0, ARM_SUIT, IRON, HI_METAL),
 
ARMOR("dwarvish mithril-coat", (char *)0,
 
1, 0, 0, 0, 10, 1, 150, 240,  4, 3, ARM_SUIT, MITHRIL, HI_METAL),
 
ARMOR("elven mithril-coat", (char *)0,
 
1, 0, 0, 0, 15, 1, 150, 240,  5, 3, ARM_SUIT, MITHRIL, HI_METAL),
 
ARMOR("chain mail", (char *)0,
 
1, 0, 0, 0, 72, 5, 300,  75,  5, 1, ARM_SUIT, IRON, HI_METAL),
 
ARMOR("orcish chain mail", "crude chain mail",
 
0, 0, 0, 0, 20, 5, 300,  75,  6, 1, ARM_SUIT, IRON, CLR_BLACK),
 
ARMOR("scale mail", (char *)0,
 
1, 0, 0, 0, 72, 5, 250,  45,  6, 0, ARM_SUIT, IRON, HI_METAL),
 
ARMOR("studded leather armor", (char *)0,
 
1, 0, 0, 0, 72, 3, 200,  15,  7, 1, ARM_SUIT, LEATHER, HI_LEATHER),
 
ARMOR("ring mail", (char *)0,
 
1, 0, 0, 0, 72, 5, 250, 100,  7, 0, ARM_SUIT, IRON, HI_METAL),
 
ARMOR("orcish ring mail", "crude ring mail",
 
0, 0, 0, 0, 20, 5, 250,  80,  8, 1, ARM_SUIT, IRON, CLR_BLACK),
 
ARMOR("leather armor", (char *)0,
 
1, 0, 0, 0, 82, 3, 150,  5,  8, 0, ARM_SUIT, LEATHER, HI_LEATHER),
 
ARMOR("leather jacket", (char *)0,
 
1, 0, 0, 0, 12, 0, 30,  10,  9, 0, ARM_SUIT, LEATHER, CLR_BLACK),
 
 
#ifdef TOURIST
 
/* shirts */
 
ARMOR("Hawaiian shirt", (char *)0,
 
1, 0, 0, 0, 8, 0, 5,  3, 10, 0, ARM_SHIRT, CLOTH, CLR_MAGENTA),
 
ARMOR("T-shirt", (char *)0,
 
1, 0, 0, 0, 2, 0, 5,  2, 10, 0, ARM_SHIRT, CLOTH, CLR_WHITE),
 
#endif
 
 
 
==== Cloaks ====
 
==== Cloaks ====
  
  /* cloaks */
+
<span id="line408">408. /* cloaks */</span>
  /*  'cope' is not a spelling mistake... leave it be */
+
<span id="line409">409. /*  'cope' is not a spelling mistake... leave it be */</span>
  CLOAK("mummy wrapping", (char *)0,
+
<span id="line410">410. CLOAK("mummy wrapping", (char *)0,</span>
  1, 0, 0,     0, 0,  3,  2, 10, 1, CLOTH, CLR_GRAY),
+
<span id="line411">411. 1, 0, 0,     0, 0,  3,  2, 10, 1, CLOTH, CLR_GRAY),</span>
  CLOAK("elven cloak", "faded pall",
+
<span id="line412">412. CLOAK("elven cloak", "faded pall",</span>
  0, 1, STEALTH,    8, 0, 10, 60,  9, 3, CLOTH, CLR_BLACK),
+
<span id="line413">413. 0, 1, STEALTH,    8, 0, 10, 60,  9, 3, CLOTH, CLR_BLACK),</span>
  CLOAK("orcish cloak", "coarse mantelet",
+
<span id="line414">414. CLOAK("orcish cloak", "coarse mantelet",</span>
  0, 0, 0,     8, 0, 10, 40, 10, 2, CLOTH, CLR_BLACK),
+
<span id="line415">415. 0, 0, 0,     8, 0, 10, 40, 10, 2, CLOTH, CLR_BLACK),</span>
  CLOAK("dwarvish cloak", "hooded cloak",
+
<span id="line416">416. CLOAK("dwarvish cloak", "hooded cloak",</span>
  0, 0, 0,     8, 0, 10, 50, 10, 2, CLOTH, HI_CLOTH),
+
<span id="line417">417. 0, 0, 0,     8, 0, 10, 50, 10, 2, CLOTH, HI_CLOTH),</span>
  CLOAK("oilskin cloak", "slippery cloak",
+
<span id="line418">418. CLOAK("oilskin cloak", "slippery cloak",</span>
  0, 0, 0,     8, 0, 10, 50,  9, 3, CLOTH, HI_CLOTH),
+
<span id="line419">419. 0, 0, 0,     8, 0, 10, 50,  9, 3, CLOTH, HI_CLOTH),</span>
  CLOAK("robe", (char *)0,
+
<span id="line420">420. CLOAK("robe", (char *)0,</span>
  1, 1, 0,     3, 0, 15, 50,  8, 3, CLOTH, CLR_RED),
+
<span id="line421">421. 1, 1, 0,     3, 0, 15, 50,  8, 3, CLOTH, CLR_RED),</span>
  CLOAK("alchemy smock", "apron",
+
<span id="line422">422. CLOAK("alchemy smock", "apron",</span>
  0, 1, POISON_RES, 9, 0, 10, 50,  9, 1, CLOTH, CLR_WHITE),
+
<span id="line423">423. 0, 1, POISON_RES, 9, 0, 10, 50,  9, 1, CLOTH, CLR_WHITE),</span>
  CLOAK("leather cloak", (char *)0,
+
<span id="line424">424. CLOAK("leather cloak", (char *)0,</span>
  1, 0, 0,     8, 0, 15, 40,  9, 1, LEATHER, CLR_BROWN),
+
<span id="line425">425. 1, 0, 0,     8, 0, 15, 40,  9, 1, LEATHER, CLR_BROWN),</span>
  /* With shuffled appearances... */
+
<span id="line426">426. /* With shuffled appearances... */</span>
  CLOAK("cloak of protection", "tattered cape",
+
<span id="line427">427. CLOAK("cloak of protection", "tattered cape",</span>
  0, 1, PROTECTION, 9, 0, 10, 50,  7, 3, CLOTH, HI_CLOTH),
+
<span id="line428">428. 0, 1, PROTECTION, 9, 0, 10, 50,  7, 3, CLOTH, HI_CLOTH),</span>
  CLOAK("cloak of invisibility", "opera cloak",
+
<span id="line429">429. CLOAK("cloak of invisibility", "opera cloak",</span>
  0, 1, INVIS,   10, 0, 10, 60,  9, 2, CLOTH, CLR_BRIGHT_MAGENTA),
+
<span id="line430">430. 0, 1, INVIS,   10, 0, 10, 60,  9, 2, CLOTH, CLR_BRIGHT_MAGENTA),</span>
  CLOAK("cloak of magic resistance", "ornamental cope",
+
<span id="line431">431. CLOAK("cloak of magic resistance", "ornamental cope",</span>
  0, 1, ANTIMAGIC,  2, 0, 10, 60,  9, 3, CLOTH, CLR_WHITE),
+
<span id="line432">432. 0, 1, ANTIMAGIC,  2, 0, 10, 60,  9, 3, CLOTH, CLR_WHITE),</span>
  CLOAK("cloak of displacement", "piece of cloth",
+
<span id="line433">433. CLOAK("cloak of displacement", "piece of cloth",</span>
  0, 1, DISPLACED, 10, 0, 10, 50,  9, 2, CLOTH, HI_CLOTH),
+
<span id="line434">434. 0, 1, DISPLACED, 10, 0, 10, 50,  9, 2, CLOTH, HI_CLOTH),</span>
   
+
  <span id="line435">435.  </span>
 +
 
 
==== Shields ====
 
==== Shields ====
  
  /* shields */
+
<span id="line436">436. /* shields */</span>
  SHIELD("small shield", (char *)0,
+
<span id="line437">437. SHIELD("small shield", (char *)0,</span>
  1, 0, 0, 0,     6, 0, 30, 3,  9, 0, WOOD, HI_WOOD),
+
<span id="line438">438. 1, 0, 0, 0,     6, 0, 30, 3,  9, 0, WOOD, HI_WOOD),</span>
  SHIELD("elven shield", "blue and green shield",
+
<span id="line439">439. SHIELD("elven shield", "blue and green shield",</span>
  0, 0, 0, 0,     2, 0, 40, 7,  8, 0, WOOD, CLR_GREEN),
+
<span id="line440">440. 0, 0, 0, 0,     2, 0, 40, 7,  8, 0, WOOD, CLR_GREEN),</span>
  SHIELD("Uruk-hai shield", "white-handed shield",
+
<span id="line441">441. SHIELD("Uruk-hai shield", "white-handed shield",</span>
  0, 0, 0, 0,     2, 0, 50, 7,  9, 0, IRON, HI_METAL),
+
<span id="line442">442. 0, 0, 0, 0,     2, 0, 50, 7,  9, 0, IRON, HI_METAL),</span>
  SHIELD("orcish shield", "red-eyed shield",
+
<span id="line443">443. SHIELD("orcish shield", "red-eyed shield",</span>
  0, 0, 0, 0,     2, 0, 50, 7,  9, 0, IRON, CLR_RED),
+
<span id="line444">444. 0, 0, 0, 0,     2, 0, 50, 7,  9, 0, IRON, CLR_RED),</span>
  SHIELD("large shield", (char *)0,
+
<span id="line445">445. SHIELD("large shield", (char *)0,</span>
  1, 0, 1, 0,     7, 0,100, 10,  8, 0, IRON, HI_METAL),
+
<span id="line446">446. 1, 0, 1, 0,     7, 0,100, 10,  8, 0, IRON, HI_METAL),</span>
  SHIELD("dwarvish roundshield", "large round shield",
+
<span id="line447">447. SHIELD("dwarvish roundshield", "large round shield",</span>
  0, 0, 0, 0,     4, 0,100, 10,  8, 0, IRON, HI_METAL),
+
<span id="line448">448. 0, 0, 0, 0,     4, 0,100, 10,  8, 0, IRON, HI_METAL),</span>
  SHIELD("shield of reflection", "polished silver shield",
+
<span id="line449">449. SHIELD("shield of reflection", "polished silver shield",</span>
  0, 1, 0, REFLECTING, 3, 0, 50, 50,  8, 0, SILVER, HI_SILVER),
+
<span id="line450">450. 0, 1, 0, REFLECTING, 3, 0, 50, 50,  8, 0, SILVER, HI_SILVER),</span>
   
+
  <span id="line451">451.  </span>
 +
 
 
==== Gloves ====
 
==== Gloves ====
  
  /* gloves */
+
<span id="line452">452. /* gloves */</span>
  /* these have their color but not material shuffled, so the IRON must stay
+
<span id="line453">453. /* these have their color but not material shuffled, so the IRON must stay</span>
   * CLR_BROWN (== HI_LEATHER)
+
<span id="line454">454.   * CLR_BROWN (== HI_LEATHER)</span>
   */
+
<span id="line455">455.   */</span>
  GLOVES("leather gloves", "old gloves",
+
<span id="line456">456. GLOVES("leather gloves", "old gloves",</span>
  0, 0,  0,   16, 1, 10,  8,  9, 0, LEATHER, HI_LEATHER),
+
<span id="line457">457. 0, 0,  0,   16, 1, 10,  8,  9, 0, LEATHER, HI_LEATHER),</span>
  GLOVES("gauntlets of fumbling", "padded gloves",
+
<span id="line458">458. GLOVES("gauntlets of fumbling", "padded gloves",</span>
  0, 1,  FUMBLING,  8, 1, 10, 50,  9, 0, LEATHER, HI_LEATHER),
+
<span id="line459">459. 0, 1,  FUMBLING,  8, 1, 10, 50,  9, 0, LEATHER, HI_LEATHER),</span>
  GLOVES("gauntlets of power", "riding gloves",
+
<span id="line460">460. GLOVES("gauntlets of power", "riding gloves",</span>
  0, 1,  0,   8, 1, 30, 50,  9, 0, IRON, CLR_BROWN),
+
<span id="line461">461. 0, 1,  0,   8, 1, 30, 50,  9, 0, IRON, CLR_BROWN),</span>
  GLOVES("gauntlets of dexterity", "fencing gloves",
+
<span id="line462">462. GLOVES("gauntlets of dexterity", "fencing gloves",</span>
  0, 1,  0,   8, 1, 10, 50,  9, 0, LEATHER, HI_LEATHER),
+
<span id="line463">463. 0, 1,  0,   8, 1, 10, 50,  9, 0, LEATHER, HI_LEATHER),</span>
   
+
  <span id="line464">464.  </span>
 +
 
 
==== Boots ====
 
==== Boots ====
  
  /* boots */
+
<span id="line465">465. /* boots */</span>
  BOOTS("low boots", "walking shoes",
+
<span id="line466">466. BOOTS("low boots", "walking shoes",</span>
  0, 0,  0,   25, 2, 10,  8,  9, 0, LEATHER, HI_LEATHER),
+
<span id="line467">467. 0, 0,  0,   25, 2, 10,  8,  9, 0, LEATHER, HI_LEATHER),</span>
  BOOTS("iron shoes", "hard shoes",
+
<span id="line468">468. BOOTS("iron shoes", "hard shoes",</span>
  0, 0,  0,   7, 2, 50, 16,  8, 0, IRON, HI_METAL),
+
<span id="line469">469. 0, 0,  0,   7, 2, 50, 16,  8, 0, IRON, HI_METAL),</span>
  BOOTS("high boots", "jackboots",
+
<span id="line470">470. BOOTS("high boots", "jackboots",</span>
  0, 0,  0,   15, 2, 20, 12,  8, 0, LEATHER, HI_LEATHER),
+
<span id="line471">471. 0, 0,  0,   15, 2, 20, 12,  8, 0, LEATHER, HI_LEATHER),</span>
  /* With shuffled appearances... */
+
<span id="line472">472. /* With shuffled appearances... */</span>
  BOOTS("speed boots", "combat boots",
+
<span id="line473">473. BOOTS("speed boots", "combat boots",</span>
  0, 1,  FAST,   12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),
+
<span id="line474">474. 0, 1,  FAST,   12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),</span>
  BOOTS("water walking boots", "jungle boots",
+
<span id="line475">475. BOOTS("water walking boots", "jungle boots",</span>
  0, 1,  WWALKING,  12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),
+
<span id="line476">476. 0, 1,  WWALKING,  12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),</span>
  BOOTS("jumping boots", "hiking boots",
+
<span id="line477">477. BOOTS("jumping boots", "hiking boots",</span>
  0, 1,  JUMPING,  12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),
+
<span id="line478">478. 0, 1,  JUMPING,  12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),</span>
  BOOTS("elven boots", "mud boots",
+
<span id="line479">479. BOOTS("elven boots", "mud boots",</span>
  0, 1,  STEALTH,  12, 2, 15,  8,  9, 0, LEATHER, HI_LEATHER),
+
<span id="line480">480. 0, 1,  STEALTH,  12, 2, 15,  8,  9, 0, LEATHER, HI_LEATHER),</span>
  BOOTS("kicking boots", "buckled boots",
+
<span id="line481">481. BOOTS("kicking boots", "buckled boots",</span>
  0, 1,  0,        12, 2, 15,  8,  9, 0, IRON, CLR_BROWN),
+
<span id="line482">482. 0, 1,  0,        12, 2, 15,  8,  9, 0, IRON, CLR_BROWN),</span>
  BOOTS("fumble boots", "riding boots",
+
<span id="line483">483. BOOTS("fumble boots", "riding boots",</span>
  0, 1,  FUMBLING,  12, 2, 20, 30,  9, 0, LEATHER, HI_LEATHER),
+
<span id="line484">484. 0, 1,  FUMBLING,  12, 2, 20, 30,  9, 0, LEATHER, HI_LEATHER),</span>
  BOOTS("levitation boots", "snow boots",
+
<span id="line485">485. BOOTS("levitation boots", "snow boots",</span>
  0, 1,  LEVITATION,12, 2, 15, 30,  9, 0, LEATHER, HI_LEATHER),
+
<span id="line486">486. 0, 1,  LEVITATION,12, 2, 15, 30,  9, 0, LEATHER, HI_LEATHER),</span>
  #undef HELM
+
<span id="line487">487. #undef HELM</span>
  #undef CLOAK
+
<span id="line488">488. #undef CLOAK</span>
  #undef SHIELD
+
<span id="line489">489. #undef SHIELD</span>
  #undef GLOVES
+
<span id="line490">490. #undef GLOVES</span>
  #undef BOOTS
+
<span id="line491">491. #undef BOOTS</span>
  #undef ARMOR
+
<span id="line492">492. #undef ARMOR</span>
 +
<span id="line493">493.  </span>
  
 
=== Rings ===
 
=== Rings ===
  
  /* rings ... */
+
<span id="line494">494. /* rings ... */</span>
  #define RING(name,power,stone,cost,mgc,spec,mohs,metal,color) OBJECT( \
+
<span id="line495">495. #define RING(name,power,stone,cost,mgc,spec,mohs,metal,color) OBJECT( \</span>
  OBJ(name,stone), \
+
<span id="line496">496. OBJ(name,stone), \</span>
  BITS(0,0,spec,0,mgc,spec,0,0,0,HARDGEM(mohs),0,P_NONE,metal), \
+
<span id="line497">497. BITS(0,0,spec,0,mgc,spec,0,0,0,HARDGEM(mohs),0,P_NONE,metal), \</span>
  power, RING_CLASS, 0, 0, 3, cost, 0, 0, 0, 0, 15, color )
+
<span id="line498">498. power, RING_CLASS, 0, 0, 3, cost, 0, 0, 0, 0, 15, color )</span>
  RING("adornment", ADORNED, "wooden",        100, 1, 1, 2, WOOD, HI_WOOD),
+
<span id="line499">499. RING("adornment", ADORNED, "wooden",        100, 1, 1, 2, WOOD, HI_WOOD),</span>
  RING("gain strength", 0, "granite",        150, 1, 1, 7, MINERAL, HI_MINERAL),
+
<span id="line500">500. RING("gain strength", 0, "granite",        150, 1, 1, 7, MINERAL, HI_MINERAL),</span>
  RING("gain constitution", 0, "opal",        150, 1, 1, 7, MINERAL,  HI_MINERAL),
+
<span id="line501">501. RING("gain constitution", 0, "opal",        150, 1, 1, 7, MINERAL,  HI_MINERAL),</span>
  RING("increase accuracy", 0, "clay",        150, 1, 1, 4, MINERAL, CLR_RED),
+
<span id="line502">502. RING("increase accuracy", 0, "clay",        150, 1, 1, 4, MINERAL, CLR_RED),</span>
  RING("increase damage", 0, "coral",        150, 1, 1, 4, MINERAL, CLR_ORANGE),
+
<span id="line503">503. RING("increase damage", 0, "coral",        150, 1, 1, 4, MINERAL, CLR_ORANGE),</span>
  RING("protection", PROTECTION, "black onyx",100, 1, 1, 7, MINERAL, CLR_BLACK),
+
<span id="line504">504. RING("protection", PROTECTION, "black onyx",100, 1, 1, 7, MINERAL, CLR_BLACK),</span>
  RING("regeneration", REGENERATION, "moonstone",
+
<span id="line505">505. RING("regeneration", REGENERATION, "moonstone",</span>
      200, 1, 0, 6, MINERAL, HI_MINERAL),
+
<span id="line506">506.     200, 1, 0, 6, MINERAL, HI_MINERAL),</span>
  RING("searching", SEARCHING, "tiger eye",  200, 1, 0, 6, GEMSTONE, CLR_BROWN),
+
<span id="line507">507. RING("searching", SEARCHING, "tiger eye",  200, 1, 0, 6, GEMSTONE, CLR_BROWN),</span>
  RING("stealth", STEALTH, "jade",            100, 1, 0, 6, GEMSTONE, CLR_GREEN),
+
<span id="line508">508. RING("stealth", STEALTH, "jade",            100, 1, 0, 6, GEMSTONE, CLR_GREEN),</span>
  RING("sustain ability", FIXED_ABIL, "bronze",
+
<span id="line509">509. RING("sustain ability", FIXED_ABIL, "bronze",</span>
      100, 1, 0, 4, COPPER, HI_COPPER),
+
<span id="line510">510.     100, 1, 0, 4, COPPER, HI_COPPER),</span>
  RING("levitation", LEVITATION, "agate",    200, 1, 0, 7, GEMSTONE, CLR_RED),
+
<span id="line511">511. RING("levitation", LEVITATION, "agate",    200, 1, 0, 7, GEMSTONE, CLR_RED),</span>
  RING("hunger", HUNGER, "topaz",            100, 1, 0, 8, GEMSTONE, CLR_CYAN),
+
<span id="line512">512. RING("hunger", HUNGER, "topaz",            100, 1, 0, 8, GEMSTONE, CLR_CYAN),</span>
  RING("aggravate monster", AGGRAVATE_MONSTER, "sapphire",
+
<span id="line513">513. RING("aggravate monster", AGGRAVATE_MONSTER, "sapphire",</span>
      150, 1, 0, 9, GEMSTONE, CLR_BLUE),
+
<span id="line514">514.     150, 1, 0, 9, GEMSTONE, CLR_BLUE),</span>
  RING("conflict", CONFLICT, "ruby",          300, 1, 0, 9, GEMSTONE, CLR_RED),
+
<span id="line515">515. RING("conflict", CONFLICT, "ruby",          300, 1, 0, 9, GEMSTONE, CLR_RED),</span>
  RING("warning", WARNING, "diamond",        100, 1, 0,10, GEMSTONE, CLR_WHITE),
+
<span id="line516">516. RING("warning", WARNING, "diamond",        100, 1, 0,10, GEMSTONE, CLR_WHITE),</span>
  RING("poison resistance", POISON_RES, "pearl",
+
<span id="line517">517. RING("poison resistance", POISON_RES, "pearl",</span>
      150, 1, 0, 4, IRON, CLR_WHITE),
+
<span id="line518">518.     150, 1, 0, 4, IRON, CLR_WHITE),</span>
  RING("fire resistance", FIRE_RES, "iron",  200, 1, 0, 5, IRON, HI_METAL),
+
<span id="line519">519. RING("fire resistance", FIRE_RES, "iron",  200, 1, 0, 5, IRON, HI_METAL),</span>
  RING("cold resistance", COLD_RES, "brass",  150, 1, 0, 4, COPPER, HI_COPPER),
+
<span id="line520">520. RING("cold resistance", COLD_RES, "brass",  150, 1, 0, 4, COPPER, HI_COPPER),</span>
  RING("shock resistance", SHOCK_RES, "copper",
+
<span id="line521">521. RING("shock resistance", SHOCK_RES, "copper",</span>
      150, 1, 0, 3, COPPER, HI_COPPER),
+
<span id="line522">522.     150, 1, 0, 3, COPPER, HI_COPPER),</span>
  RING("free action",    FREE_ACTION, "twisted",
+
<span id="line523">523. RING("free action",    FREE_ACTION, "twisted",</span>
      200, 1, 0, 6, IRON, HI_METAL),
+
<span id="line524">524.     200, 1, 0, 6, IRON, HI_METAL),</span>
  RING("slow digestion",  SLOW_DIGESTION, "steel",
+
<span id="line525">525. RING("slow digestion",  SLOW_DIGESTION, "steel",</span>
      200, 1, 0, 8, IRON, HI_METAL),
+
<span id="line526">526.     200, 1, 0, 8, IRON, HI_METAL),</span>
  RING("teleportation", TELEPORT, "silver",  200, 1, 0, 3, SILVER, HI_SILVER),
+
<span id="line527">527. RING("teleportation", TELEPORT, "silver",  200, 1, 0, 3, SILVER, HI_SILVER),</span>
  RING("teleport control", TELEPORT_CONTROL, "gold",
+
<span id="line528">528. RING("teleport control", TELEPORT_CONTROL, "gold",</span>
      300, 1, 0, 3, GOLD, HI_GOLD),
+
<span id="line529">529.     300, 1, 0, 3, GOLD, HI_GOLD),</span>
  RING("polymorph", POLYMORPH, "ivory",      300, 1, 0, 4, BONE, CLR_WHITE),
+
<span id="line530">530. RING("polymorph", POLYMORPH, "ivory",      300, 1, 0, 4, BONE, CLR_WHITE),</span>
  RING("polymorph control", POLYMORPH_CONTROL, "emerald",
+
<span id="line531">531. RING("polymorph control", POLYMORPH_CONTROL, "emerald",</span>
      300, 1, 0, 8, GEMSTONE, CLR_BRIGHT_GREEN),
+
<span id="line532">532.     300, 1, 0, 8, GEMSTONE, CLR_BRIGHT_GREEN),</span>
  RING("invisibility", INVIS, "wire",        150, 1, 0, 5, IRON, HI_METAL),
+
<span id="line533">533. RING("invisibility", INVIS, "wire",        150, 1, 0, 5, IRON, HI_METAL),</span>
  RING("see invisible", SEE_INVIS, "engagement",
+
<span id="line534">534. RING("see invisible", SEE_INVIS, "engagement",</span>
      150, 1, 0, 5, IRON, HI_METAL),
+
<span id="line535">535.     150, 1, 0, 5, IRON, HI_METAL),</span>
  RING("protection from shape changers", PROT_FROM_SHAPE_CHANGERS, "shiny",
+
<span id="line536">536. RING("protection from shape changers", PROT_FROM_SHAPE_CHANGERS, "shiny",</span>
      100, 1, 0, 5, IRON, CLR_BRIGHT_CYAN),
+
<span id="line537">537.     100, 1, 0, 5, IRON, CLR_BRIGHT_CYAN),</span>
  #undef RING
+
<span id="line538">538. #undef RING</span>
   
+
  <span id="line539">539.  </span>
 +
 
 
=== Amulets ===
 
=== Amulets ===
  
  /* amulets ... - THE Amulet comes last because it is special */
+
<span id="line540">540. /* amulets ... - THE Amulet comes last because it is special */</span>
  #define AMULET(name,desc,power,prob) OBJECT( \
+
<span id="line541">541. #define AMULET(name,desc,power,prob) OBJECT( \</span>
  OBJ(name,desc), BITS(0,0,0,0,1,0,0,0,0,0,0,P_NONE,IRON), power, \
+
<span id="line542">542. OBJ(name,desc), BITS(0,0,0,0,1,0,0,0,0,0,0,P_NONE,IRON), power, \</span>
  AMULET_CLASS, prob, 0, 20, 150, 0, 0, 0, 0, 20, HI_METAL )
+
<span id="line543">543. AMULET_CLASS, prob, 0, 20, 150, 0, 0, 0, 0, 20, HI_METAL )</span>
   
+
  <span id="line544">544.  </span>
  AMULET("amulet of ESP",          "circular",  TELEPAT,    175),
+
<span id="line545">545. AMULET("amulet of ESP",          "circular",  TELEPAT,    175),</span>
  AMULET("amulet of life saving",  "spherical",  LIFESAVED,  75),
+
<span id="line546">546. AMULET("amulet of life saving",  "spherical",  LIFESAVED,  75),</span>
  AMULET("amulet of strangulation", "oval",      STRANGLED,  135),
+
<span id="line547">547. AMULET("amulet of strangulation", "oval",      STRANGLED,  135),</span>
  AMULET("amulet of restful sleep", "triangular", SLEEPING,  135),
+
<span id="line548">548. AMULET("amulet of restful sleep", "triangular", SLEEPING,  135),</span>
  AMULET("amulet versus poison",    "pyramidal",  POISON_RES, 165),
+
<span id="line549">549. AMULET("amulet versus poison",    "pyramidal",  POISON_RES, 165),</span>
  AMULET("amulet of change",        "square",    0,          130),
+
<span id="line550">550. AMULET("amulet of change",        "square",    0,          130),</span>
  /* POLYMORPH */
+
<span id="line551">551. /* POLYMORPH */</span>
  AMULET("amulet of unchanging",    "concave",    UNCHANGING, 45),
+
<span id="line552">552. AMULET("amulet of unchanging",    "concave",    UNCHANGING, 45),</span>
  AMULET("amulet of reflection",    "hexagonal",  REFLECTING,  75),
+
<span id="line553">553. AMULET("amulet of reflection",    "hexagonal",  REFLECTING,  75),</span>
  AMULET("amulet of magical breathing", "octagonal",      MAGICAL_BREATHING, 65),
+
<span id="line554">554. AMULET("amulet of magical breathing", "octagonal",      MAGICAL_BREATHING, 65),</span>
  OBJECT(OBJ("cheap plastic imitation of the Amulet of Yendor",
+
<span id="line555">555. OBJECT(OBJ("cheap plastic imitation of the Amulet of Yendor",</span>
  "Amulet of Yendor"), BITS(0,0,1,0,0,0,0,0,0,0,0,0,PLASTIC), 0,
+
<span id="line556">556. "Amulet of Yendor"), BITS(0,0,1,0,0,0,0,0,0,0,0,0,PLASTIC), 0,</span>
  AMULET_CLASS, 0, 0, 20,    0, 0, 0, 0, 0,  1, HI_METAL),
+
<span id="line557">557. AMULET_CLASS, 0, 0, 20,    0, 0, 0, 0, 0,  1, HI_METAL),</span>
  OBJECT(OBJ("Amulet of Yendor", /* note: description == name */
+
<span id="line558">558. OBJECT(OBJ("Amulet of Yendor", /* note: description == name */</span>
  "Amulet of Yendor"), BITS(0,0,1,0,1,0,1,1,0,0,0,0,MITHRIL), 0,
+
<span id="line559">559. "Amulet of Yendor"), BITS(0,0,1,0,1,0,1,1,0,0,0,0,MITHRIL), 0,</span>
  AMULET_CLASS, 0, 0, 20, 30000, 0, 0, 0, 0, 20, HI_METAL),
+
<span id="line560">560. AMULET_CLASS, 0, 0, 20, 30000, 0, 0, 0, 0, 20, HI_METAL),</span>
  #undef AMULET
+
<span id="line561">561. #undef AMULET</span>
   
+
  <span id="line562">562.  </span>
 +
 
 
=== Tools ===
 
=== Tools ===
  
  /* tools ... */
+
<span id="line563">563. /* tools ... */</span>
  /* tools with weapon characteristics come last */
+
<span id="line564">564. /* tools with weapon characteristics come last */</span>
  #define TOOL(name,desc,kn,mrg,mgc,chg,prob,wt,cost,mat,color) \
+
<span id="line565">565. #define TOOL(name,desc,kn,mrg,mgc,chg,prob,wt,cost,mat,color) \</span>
  OBJECT( OBJ(name,desc), \
+
<span id="line566">566. OBJECT( OBJ(name,desc), \</span>
  BITS(kn,mrg,chg,0,mgc,chg,0,0,0,0,0,P_NONE,mat), \
+
<span id="line567">567. BITS(kn,mrg,chg,0,mgc,chg,0,0,0,0,0,P_NONE,mat), \</span>
  0, TOOL_CLASS, prob, 0, \
+
<span id="line568">568. 0, TOOL_CLASS, prob, 0, \</span>
  wt, cost, 0, 0, 0, 0, wt, color )
+
<span id="line569">569. wt, cost, 0, 0, 0, 0, wt, color )</span>
  #define CONTAINER(name,desc,kn,mgc,chg,prob,wt,cost,mat,color) \
+
<span id="line570">570. #define CONTAINER(name,desc,kn,mgc,chg,prob,wt,cost,mat,color) \</span>
  OBJECT( OBJ(name,desc), \
+
<span id="line571">571. OBJECT( OBJ(name,desc), \</span>
  BITS(kn,0,chg,1,mgc,chg,0,0,0,0,0,P_NONE,mat), \
+
<span id="line572">572. BITS(kn,0,chg,1,mgc,chg,0,0,0,0,0,P_NONE,mat), \</span>
  0, TOOL_CLASS, prob, 0, \
+
<span id="line573">573. 0, TOOL_CLASS, prob, 0, \</span>
  wt, cost, 0, 0, 0, 0, wt, color )
+
<span id="line574">574. wt, cost, 0, 0, 0, 0, wt, color )</span>
  #define WEPTOOL(name,desc,kn,mgc,bi,prob,wt,cost,sdam,ldam,hitbon,sub,mat,clr) \
+
<span id="line575">575. #define WEPTOOL(name,desc,kn,mgc,bi,prob,wt,cost,sdam,ldam,hitbon,sub,mat,clr) \</span>
  OBJECT( OBJ(name,desc), \
+
<span id="line576">576. OBJECT( OBJ(name,desc), \</span>
  BITS(kn,0,1,0,mgc,1,0,0,bi,0,hitbon,sub,mat), \
+
<span id="line577">577. BITS(kn,0,1,0,mgc,1,0,0,bi,0,hitbon,sub,mat), \</span>
  0, TOOL_CLASS, prob, 0, \
+
<span id="line578">578. 0, TOOL_CLASS, prob, 0, \</span>
  wt, cost, sdam, ldam, hitbon, 0, wt, clr )
+
<span id="line579">579. wt, cost, sdam, ldam, hitbon, 0, wt, clr )</span>
  /* containers */
+
<span id="line580">580. /* containers */</span>
  CONTAINER("large box", (char *)0,      1, 0, 0,  40,350,  8, WOOD, HI_WOOD),
+
<span id="line581">581. CONTAINER("large box", (char *)0,      1, 0, 0,  40,350,  8, WOOD, HI_WOOD),</span>
  CONTAINER("chest", (char *)0,          1, 0, 0,  35,600,  16, WOOD, HI_WOOD),
+
<span id="line582">582. CONTAINER("chest", (char *)0,          1, 0, 0,  35,600,  16, WOOD, HI_WOOD),</span>
  CONTAINER("ice box", (char *)0,        1, 0, 0,  5,900,  42, PLASTIC, CLR_WHITE),
+
<span id="line583">583. CONTAINER("ice box", (char *)0,        1, 0, 0,  5,900,  42, PLASTIC, CLR_WHITE),</span>
  CONTAINER("sack", "bag",                0, 0, 0,  35, 15,  2, CLOTH, HI_CLOTH),
+
<span id="line584">584. CONTAINER("sack", "bag",                0, 0, 0,  35, 15,  2, CLOTH, HI_CLOTH),</span>
  CONTAINER("oilskin sack", "bag",        0, 0, 0,  5, 15, 100, CLOTH, HI_CLOTH),
+
<span id="line585">585. CONTAINER("oilskin sack", "bag",        0, 0, 0,  5, 15, 100, CLOTH, HI_CLOTH),</span>
  CONTAINER("bag of holding", "bag",      0, 1, 0,  20, 15, 100, CLOTH, HI_CLOTH),
+
<span id="line586">586. CONTAINER("bag of holding", "bag",      0, 1, 0,  20, 15, 100, CLOTH, HI_CLOTH),</span>
  CONTAINER("bag of tricks", "bag",      0, 1, 1,  20, 15, 100, CLOTH, HI_CLOTH),
+
<span id="line587">587. CONTAINER("bag of tricks", "bag",      0, 1, 1,  20, 15, 100, CLOTH, HI_CLOTH),</span>
  #undef CONTAINER
+
<span id="line588">588. #undef CONTAINER</span>
   
+
  <span id="line589">589.  </span>
  /* lock opening tools */
+
<span id="line590">590. /* lock opening tools */</span>
  TOOL("skeleton key", "key",    0, 0, 0, 0,  80,  3,  10, IRON, HI_METAL),
+
<span id="line591">591. TOOL("skeleton key", "key",    0, 0, 0, 0,  80,  3,  10, IRON, HI_METAL),</span>
  #ifdef TOURIST
+
<span id="line592">592. #ifdef TOURIST</span>
  TOOL("lock pick", (char *)0,    1, 0, 0, 0,  60,  4,  20, IRON, HI_METAL),
+
<span id="line593">593. TOOL("lock pick", (char *)0,    1, 0, 0, 0,  60,  4,  20, IRON, HI_METAL),</span>
  TOOL("credit card", (char *)0,  1, 0, 0, 0,  15,  1,  10, PLASTIC, CLR_WHITE),
+
<span id="line594">594. TOOL("credit card", (char *)0,  1, 0, 0, 0,  15,  1,  10, PLASTIC, CLR_WHITE),</span>
  #else
+
<span id="line595">595. #else</span>
  TOOL("lock pick", (char *)0,    1, 0, 0, 0,  75,  4,  20, IRON, HI_METAL),
+
<span id="line596">596. TOOL("lock pick", (char *)0,    1, 0, 0, 0,  75,  4,  20, IRON, HI_METAL),</span>
  #endif
+
<span id="line597">597. #endif</span>
  /* light sources */
+
<span id="line598">598. /* light sources */</span>
  TOOL("tallow candle", "candle", 0, 1, 0, 0,  20,  2,  10, WAX, CLR_WHITE),
+
<span id="line599">599. TOOL("tallow candle", "candle", 0, 1, 0, 0,  20,  2,  10, WAX, CLR_WHITE),</span>
  TOOL("wax candle", "candle",    0, 1, 0, 0,  5,  2,  20, WAX, CLR_WHITE),
+
<span id="line600">600. TOOL("wax candle", "candle",    0, 1, 0, 0,  5,  2,  20, WAX, CLR_WHITE),</span>
  TOOL("brass lantern", (char *)0,1, 0, 0, 0,  30, 30,  12, COPPER, CLR_YELLOW),
+
<span id="line601">601. TOOL("brass lantern", (char *)0,1, 0, 0, 0,  30, 30,  12, COPPER, CLR_YELLOW),</span>
  TOOL("oil lamp", "lamp",        0, 0, 0, 0,  45, 20,  10, COPPER, CLR_YELLOW),
+
<span id="line602">602. TOOL("oil lamp", "lamp",        0, 0, 0, 0,  45, 20,  10, COPPER, CLR_YELLOW),</span>
  TOOL("magic lamp", "lamp",      0, 0, 1, 0,  15, 20,  50, COPPER, CLR_YELLOW),
+
<span id="line603">603. TOOL("magic lamp", "lamp",      0, 0, 1, 0,  15, 20,  50, COPPER, CLR_YELLOW),</span>
  /* other tools */
+
<span id="line604">604. /* other tools */</span>
  #ifdef TOURIST
+
<span id="line605">605. #ifdef TOURIST</span>
  TOOL("expensive camera", (char *)0,
+
<span id="line606">606. TOOL("expensive camera", (char *)0,</span>
  1, 0, 0, 1,  15, 12, 200, PLASTIC, CLR_BLACK),
+
<span id="line607">607. 1, 0, 0, 1,  15, 12, 200, PLASTIC, CLR_BLACK),</span>
  TOOL("mirror", "looking glass", 0, 0, 0, 0,  45, 13,  10, GLASS, HI_SILVER),
+
<span id="line608">608. TOOL("mirror", "looking glass", 0, 0, 0, 0,  45, 13,  10, GLASS, HI_SILVER),</span>
  #else
+
<span id="line609">609. #else</span>
  TOOL("mirror", "looking glass", 0, 0, 0, 0,  60, 13,  10, GLASS, HI_SILVER),
+
<span id="line610">610. TOOL("mirror", "looking glass", 0, 0, 0, 0,  60, 13,  10, GLASS, HI_SILVER),</span>
  #endif
+
<span id="line611">611. #endif</span>
  TOOL("crystal ball", "glass orb",
+
<span id="line612">612. TOOL("crystal ball", "glass orb",</span>
  0, 0, 1, 1,  15,150,  60, GLASS, HI_GLASS),
+
<span id="line613">613. 0, 0, 1, 1,  15,150,  60, GLASS, HI_GLASS),</span>
  TOOL("lenses", (char *)0, 1, 0, 0, 0,  5,  3,  80, GLASS, HI_GLASS),
+
<span id="line614">614. TOOL("lenses", (char *)0, 1, 0, 0, 0,  5,  3,  80, GLASS, HI_GLASS),</span>
  TOOL("blindfold", (char *)0,    1, 0, 0, 0,  50,  2,  20, CLOTH, CLR_BLACK),
+
<span id="line615">615. TOOL("blindfold", (char *)0,    1, 0, 0, 0,  50,  2,  20, CLOTH, CLR_BLACK),</span>
  TOOL("towel", (char *)0,        1, 0, 0, 0,  50,  2,  50, CLOTH, CLR_MAGENTA),
+
<span id="line616">616. TOOL("towel", (char *)0,        1, 0, 0, 0,  50,  2,  50, CLOTH, CLR_MAGENTA),</span>
  #ifdef STEED
+
<span id="line617">617. #ifdef STEED</span>
  TOOL("saddle", (char *)0,      1, 0, 0, 0,  5,200, 150, LEATHER, HI_LEATHER),
+
<span id="line618">618. TOOL("saddle", (char *)0,      1, 0, 0, 0,  5,200, 150, LEATHER, HI_LEATHER),</span>
  TOOL("leash", (char *)0,        1, 0, 0, 0,  65, 12,  20, LEATHER, HI_LEATHER),
+
<span id="line619">619. TOOL("leash", (char *)0,        1, 0, 0, 0,  65, 12,  20, LEATHER, HI_LEATHER),</span>
  #else
+
<span id="line620">620. #else</span>
  TOOL("leash", (char *)0,        1, 0, 0, 0,  70, 12,  20, LEATHER, HI_LEATHER),
+
<span id="line621">621. TOOL("leash", (char *)0,        1, 0, 0, 0,  70, 12,  20, LEATHER, HI_LEATHER),</span>
  #endif
+
<span id="line622">622. #endif</span>
  TOOL("stethoscope", (char *)0,  1, 0, 0, 0,  25,  4,  75, IRON, HI_METAL),
+
<span id="line623">623. TOOL("stethoscope", (char *)0,  1, 0, 0, 0,  25,  4,  75, IRON, HI_METAL),</span>
  TOOL("tinning kit", (char *)0,  1, 0, 0, 1,  15,100,  30, IRON, HI_METAL),
+
<span id="line624">624. TOOL("tinning kit", (char *)0,  1, 0, 0, 1,  15,100,  30, IRON, HI_METAL),</span>
  TOOL("tin opener", (char *)0,  1, 0, 0, 0,  35,  4,  30, IRON, HI_METAL),
+
<span id="line625">625. TOOL("tin opener", (char *)0,  1, 0, 0, 0,  35,  4,  30, IRON, HI_METAL),</span>
  TOOL("can of grease", (char *)0,1, 0, 0, 1,  15, 15,  20, IRON, HI_METAL),
+
<span id="line626">626. TOOL("can of grease", (char *)0,1, 0, 0, 1,  15, 15,  20, IRON, HI_METAL),</span>
  TOOL("figurine", (char *)0,    1, 0, 1, 0,  25, 50,  80, MINERAL, HI_MINERAL),
+
<span id="line627">627. TOOL("figurine", (char *)0,    1, 0, 1, 0,  25, 50,  80, MINERAL, HI_MINERAL),</span>
  TOOL("magic marker", (char *)0, 1, 0, 1, 1,  15,  2,  50, PLASTIC, CLR_RED),
+
<span id="line628">628. TOOL("magic marker", (char *)0, 1, 0, 1, 1,  15,  2,  50, PLASTIC, CLR_RED),</span>
  /* traps */
+
<span id="line629">629. /* traps */</span>
  TOOL("land mine",(char *)0,    1, 0, 0, 0,  0,300, 180, IRON, CLR_RED),
+
<span id="line630">630. TOOL("land mine",(char *)0,    1, 0, 0, 0,  0,300, 180, IRON, CLR_RED),</span>
  TOOL("beartrap", (char *)0,    1, 0, 0, 0,  0,200,  60, IRON, HI_METAL),
+
<span id="line631">631. TOOL("beartrap", (char *)0,    1, 0, 0, 0,  0,200,  60, IRON, HI_METAL),</span>
  /* instruments */
+
<span id="line632">632. /* instruments */</span>
  TOOL("tin whistle", "whistle",  0, 0, 0, 0, 100,  3,  10, METAL, HI_METAL),
+
<span id="line633">633. TOOL("tin whistle", "whistle",  0, 0, 0, 0, 100,  3,  10, METAL, HI_METAL),</span>
  TOOL("magic whistle", "whistle",0, 0, 1, 0,  30,  3,  10, METAL, HI_METAL),
+
<span id="line634">634. TOOL("magic whistle", "whistle",0, 0, 1, 0,  30,  3,  10, METAL, HI_METAL),</span>
  /* "If tin whistles are made out of tin, what do they make foghorns out of?" */
+
<span id="line635">635. /* "If tin whistles are made out of tin, what do they make foghorns out of?" */</span>
  TOOL("wooden flute", "flute",  0, 0, 0, 0,  4,  5,  12, WOOD, HI_WOOD),
+
<span id="line636">636. TOOL("wooden flute", "flute",  0, 0, 0, 0,  4,  5,  12, WOOD, HI_WOOD),</span>
  TOOL("magic flute", "flute",    0, 0, 1, 1,  2,  5,  36, WOOD, HI_WOOD),
+
<span id="line637">637. TOOL("magic flute", "flute",    0, 0, 1, 1,  2,  5,  36, WOOD, HI_WOOD),</span>
  TOOL("tooled horn&quot;, &amp;quot;horn",    0, 0, 0, 0,  5, 18,  15, BONE, CLR_WHITE),
+
<span id="line638">638. TOOL("tooled horn", "horn",    0, 0, 0, 0,  5, 18,  15, BONE, CLR_WHITE),</span>
  TOOL("frost horn", "horn",      0, 0, 1, 1,  2, 18,  50, BONE, CLR_WHITE),
+
  <span id="line639">639.  TOOL("frost horn", "horn",      0, 0, 1, 1,  2, 18,  50, BONE, CLR_WHITE),</span>
  TOOL("fire horn", "horn",      0, 0, 1, 1,  2, 18,  50, BONE, CLR_WHITE),
+
<span id="line640">640. TOOL("fire horn", "horn",      0, 0, 1, 1,  2, 18,  50, BONE, CLR_WHITE),</span>
  TOOL("horn of plenty", "horn",  0, 0, 1, 1,  2, 18,  50, BONE, CLR_WHITE),
+
<span id="line641">641. TOOL("horn of plenty", "horn",  0, 0, 1, 1,  2, 18,  50, BONE, CLR_WHITE),</span>
  TOOL("wooden harp", "harp",    0, 0, 0, 0,  4, 30,  50, WOOD, HI_WOOD),
+
<span id="line642">642. TOOL("wooden harp", "harp",    0, 0, 0, 0,  4, 30,  50, WOOD, HI_WOOD),</span>
  TOOL("magic harp", "harp",      0, 0, 1, 1,  2, 30,  50, WOOD, HI_WOOD),
+
<span id="line643">643. TOOL("magic harp", "harp",      0, 0, 1, 1,  2, 30,  50, WOOD, HI_WOOD),</span>
  TOOL("bell", (char *)0,        1, 0, 0, 0,  2, 30,  50, COPPER, HI_COPPER),
+
<span id="line644">644. TOOL("bell", (char *)0,        1, 0, 0, 0,  2, 30,  50, COPPER, HI_COPPER),</span>
  TOOL("bugle", (char *)0,        1, 0, 0, 0,  4, 10,  15, COPPER, HI_COPPER),
+
  <span id="line645">645.  TOOL("bugle", (char *)0,        1, 0, 0, 0,  4, 10,  15, COPPER, HI_COPPER),</span>
  TOOL("leather drum", "drum",    0, 0, 0, 0,  4, 25,  25, LEATHER, HI_LEATHER),
+
<span id="line646">646. TOOL("leather drum", "drum",    0, 0, 0, 0,  4, 25,  25, LEATHER, HI_LEATHER),</span>
  TOOL("drum of earthquake", "drum",
+
<span id="line647">647. TOOL("drum of earthquake", "drum",</span>
  0, 0, 1, 1,  2, 25,  25, LEATHER, HI_LEATHER),
+
<span id="line648">648. 0, 0, 1, 1,  2, 25,  25, LEATHER, HI_LEATHER),</span>
  /* tools useful as weapons */
+
<span id="line649">649. /* tools useful as weapons */</span>
  WEPTOOL("pick-axe", (char *)0,
+
<span id="line650">650. WEPTOOL("pick-axe", (char *)0,</span>
1, 0, 0, 20, 100,  50, 6,  3, WHACK,  P_PICK_AXE, IRON, HI_METAL),
+
<span id="line651">651.  1, 0, 0, 20, 100,  50, 6,  3, WHACK,  P_PICK_AXE, IRON, HI_METAL),</span>
  WEPTOOL("grappling hook", "iron hook",
+
<span id="line652">652. WEPTOOL("grappling hook", "iron hook",</span>
  0, 0, 0,  5,  30,  50,  2,  6, WHACK,  P_FLAIL, IRON, HI_METAL),
+
<span id="line653">653. 0, 0, 0,  5,  30,  50,  2,  6, WHACK,  P_FLAIL, IRON, HI_METAL),</span>
  /* 3.4.1: unicorn horn left classified as "magic" */
+
<span id="line654">654. /* 3.4.1: unicorn horn left classified as "magic" */</span>
  WEPTOOL("unicorn horn", (char *)0,
+
<span id="line655">655. WEPTOOL("unicorn horn", (char *)0,</span>
  1, 1, 1,  0,  20, 100, 12, 12, PIERCE, P_UNICORN_HORN, BONE, CLR_WHITE),
+
<span id="line656">656. 1, 1, 1,  0,  20, 100, 12, 12, PIERCE, P_UNICORN_HORN, BONE, CLR_WHITE),</span>
   
+
  <span id="line657">657.  </span>
  /* two special unique artifact "tools" */
+
<span id="line658">658. /* two special unique artifact "tools" */</span>
  OBJECT(OBJ("Candelabrum of Invocation", "candelabrum"),
+
<span id="line659">659. OBJECT(OBJ("Candelabrum of Invocation", "candelabrum"),</span>
  BITS(0,0,1,0,1,0,1,1,0,0,0,P_NONE,GOLD), 0,
+
<span id="line660">660. BITS(0,0,1,0,1,0,1,1,0,0,0,P_NONE,GOLD), 0,</span>
  TOOL_CLASS, 0, 0,10, 5000, 0, 0, 0, 0, 200, HI_GOLD),
+
<span id="line661">661. TOOL_CLASS, 0, 0,10, 5000, 0, 0, 0, 0, 200, HI_GOLD),</span>
  OBJECT(OBJ("Bell of Opening", "silver bell"),
+
<span id="line662">662. OBJECT(OBJ("Bell of Opening", "silver bell"),</span>
  BITS(0,0,1,0,1,1,1,1,0,0,0,P_NONE,SILVER), 0,
+
<span id="line663">663. BITS(0,0,1,0,1,1,1,1,0,0,0,P_NONE,SILVER), 0,</span>
  TOOL_CLASS, 0, 0,10, 5000, 0, 0, 0, 0, 50, HI_SILVER),
+
<span id="line664">664. TOOL_CLASS, 0, 0,10, 5000, 0, 0, 0, 0, 50, HI_SILVER),</span>
  #undef TOOL
+
<span id="line665">665. #undef TOOL</span>
  #undef WEPTOOL
+
<span id="line666">666. #undef WEPTOOL</span>
   
+
  <span id="line667">667.  </span>
 +
 
 
=== Comestibles ===
 
=== Comestibles ===
  
  /* Comestibles ... */
+
<span id="line668">668. /* Comestibles ... */</span>
  #define FOOD(name,prob,delay,wt,unk,tin,nutrition,color) OBJECT( \
+
<span id="line669">669. #define FOOD(name,prob,delay,wt,unk,tin,nutrition,color) OBJECT( \</span>
  OBJ(name,(char *)0), BITS(1,1,unk,0,0,0,0,0,0,0,0,P_NONE,tin), 0, \
+
<span id="line670">670. OBJ(name,(char *)0), BITS(1,1,unk,0,0,0,0,0,0,0,0,P_NONE,tin), 0, \</span>
  FOOD_CLASS, prob, delay, \
+
<span id="line671">671. FOOD_CLASS, prob, delay, \</span>
  wt, nutrition/20 + 5, 0, 0, 0, 0, nutrition, color )
+
<span id="line672">672. wt, nutrition/20 + 5, 0, 0, 0, 0, nutrition, color )</span>
  /* all types of food (except tins & corpses) must have a delay of at least 1. */
+
<span id="line673">673. /* all types of food (except tins & corpses) must have a delay of at least 1. */</span>
  /* delay on corpses is computed and is weight dependant */
+
<span id="line674">674. /* delay on corpses is computed and is weight dependant */</span>
  /* dog eats foods 0-4 but prefers tripe rations above all others */
+
<span id="line675">675. /* dog eats foods 0-4 but prefers tripe rations above all others */</span>
  /* fortune cookies can be read */
+
<span id="line676">676. /* fortune cookies can be read */</span>
  /* carrots improve your vision */
+
<span id="line677">677. /* carrots improve your vision */</span>
  /* +0 tins contain monster meat */
+
<span id="line678">678. /* +0 tins contain monster meat */</span>
  /* +1 tins (of spinach) make you stronger (like Popeye) */
+
<span id="line679">679. /* +1 tins (of spinach) make you stronger (like Popeye) */</span>
  /* food CORPSE is a cadaver of some type */
+
<span id="line680">680. /* food CORPSE is a cadaver of some type */</span>
  /* meatballs/sticks/rings are only created from objects via stone to flesh */
+
<span id="line681">681. /* meatballs/sticks/rings are only created from objects via stone to flesh */</span>
   
+
  <span id="line682">682.  </span>
  /* meat */
+
<span id="line683">683. /* meat */</span>
  FOOD("tripe ration",      140, 2, 10, 0, FLESH, 200, CLR_BROWN),
+
<span id="line684">684. FOOD("tripe ration",      140, 2, 10, 0, FLESH, 200, CLR_BROWN),</span>
  FOOD("corpse",              0, 1,  0, 0, FLESH,  0, CLR_BROWN),
+
<span id="line685">685. FOOD("corpse",              0, 1,  0, 0, FLESH,  0, CLR_BROWN),</span>
  FOOD("egg",                85, 1,  1, 1, FLESH,  80, CLR_WHITE),
+
<span id="line686">686. FOOD("egg",                85, 1,  1, 1, FLESH,  80, CLR_WHITE),</span>
  FOOD("meatball",            0, 1,  1, 0, FLESH,  5, CLR_BROWN),
+
<span id="line687">687. FOOD("meatball",            0, 1,  1, 0, FLESH,  5, CLR_BROWN),</span>
  FOOD("meat stick",          0, 1,  1, 0, FLESH,  5, CLR_BROWN),
+
<span id="line688">688. FOOD("meat stick",          0, 1,  1, 0, FLESH,  5, CLR_BROWN),</span>
  FOOD("huge chunk of meat",  0,20,400, 0, FLESH,2000, CLR_BROWN),
+
<span id="line689">689. FOOD("huge chunk of meat",  0,20,400, 0, FLESH,2000, CLR_BROWN),</span>
  /* special case because it's not mergable */
+
<span id="line690">690. /* special case because it's not mergable */</span>
  OBJECT(OBJ("meat ring", (char *)0),
+
<span id="line691">691. OBJECT(OBJ("meat ring", (char *)0),</span>
     BITS(1,0,0,0,0,0,0,0,0,0,0,0,FLESH),
+
<span id="line692">692.     BITS(1,0,0,0,0,0,0,0,0,0,0,0,FLESH),</span>
     0, FOOD_CLASS, 0, 1, 5, 1, 0, 0, 0, 0, 5, CLR_BROWN),
+
<span id="line693">693.     0, FOOD_CLASS, 0, 1, 5, 1, 0, 0, 0, 0, 5, CLR_BROWN),</span>
   
+
  <span id="line694">694.  </span>
  /* fruits & veggies */
+
<span id="line695">695. /* fruits & veggies */</span>
  FOOD("kelp frond",          0, 1,  1, 0, VEGGY,  30, CLR_GREEN),
+
<span id="line696">696. FOOD("kelp frond",          0, 1,  1, 0, VEGGY,  30, CLR_GREEN),</span>
  FOOD("eucalyptus leaf",      3, 1,  1, 0, VEGGY,  30, CLR_GREEN),
+
<span id="line697">697. FOOD("eucalyptus leaf",      3, 1,  1, 0, VEGGY,  30, CLR_GREEN),</span>
  FOOD("apple",              15, 1,  2, 0, VEGGY,  50, CLR_RED),
+
<span id="line698">698. FOOD("apple",              15, 1,  2, 0, VEGGY,  50, CLR_RED),</span>
  FOOD("orange",              10, 1,  2, 0, VEGGY,  80, CLR_ORANGE),
+
<span id="line699">699. FOOD("orange",              10, 1,  2, 0, VEGGY,  80, CLR_ORANGE),</span>
  FOOD("pear",                10, 1,  2, 0, VEGGY,  50, CLR_BRIGHT_GREEN),
+
<span id="line700">700. FOOD("pear",                10, 1,  2, 0, VEGGY,  50, CLR_BRIGHT_GREEN),</span>
  FOOD("melon",              10, 1,  5, 0, VEGGY, 100, CLR_BRIGHT_GREEN),
+
<span id="line701">701. FOOD("melon",              10, 1,  5, 0, VEGGY, 100, CLR_BRIGHT_GREEN),</span>
  FOOD("banana",              10, 1,  2, 0, VEGGY,  80, CLR_YELLOW),
+
<span id="line702">702. FOOD("banana",              10, 1,  2, 0, VEGGY,  80, CLR_YELLOW),</span>
  FOOD("carrot",              15, 1,  2, 0, VEGGY,  50, CLR_ORANGE),
+
<span id="line703">703. FOOD("carrot",              15, 1,  2, 0, VEGGY,  50, CLR_ORANGE),</span>
  FOOD("sprig of wolfsbane",  7, 1,  1, 0, VEGGY,  40, CLR_GREEN),
+
<span id="line704">704. FOOD("sprig of wolfsbane",  7, 1,  1, 0, VEGGY,  40, CLR_GREEN),</span>
  FOOD("clove of garlic",      7, 1,  1, 0, VEGGY,  40, CLR_WHITE),
+
<span id="line705">705. FOOD("clove of garlic",      7, 1,  1, 0, VEGGY,  40, CLR_WHITE),</span>
  FOOD("slime mold",          75, 1,  5, 0, VEGGY, 250, HI_ORGANIC),
+
<span id="line706">706. FOOD("slime mold",          75, 1,  5, 0, VEGGY, 250, HI_ORGANIC),</span>
   
+
  <span id="line707">707.  </span>
  /* people food */
+
<span id="line708">708. /* people food */</span>
  FOOD("lump of royal jelly",  0, 1,  2, 0, VEGGY, 200, CLR_YELLOW),
+
<span id="line709">709. FOOD("lump of royal jelly",  0, 1,  2, 0, VEGGY, 200, CLR_YELLOW),</span>
  FOOD("cream pie",          25, 1, 10, 0, VEGGY, 100, CLR_WHITE),
+
<span id="line710">710. FOOD("cream pie",          25, 1, 10, 0, VEGGY, 100, CLR_WHITE),</span>
  FOOD("candy bar",          13, 1,  2, 0, VEGGY, 100, CLR_BROWN),
+
<span id="line711">711. FOOD("candy bar",          13, 1,  2, 0, VEGGY, 100, CLR_BROWN),</span>
  FOOD("fortune cookie",      55, 1,  1, 0, VEGGY,  40, CLR_YELLOW),
+
<span id="line712">712. FOOD("fortune cookie",      55, 1,  1, 0, VEGGY,  40, CLR_YELLOW),</span>
  FOOD("pancake",            25, 2,  2, 0, VEGGY, 200, CLR_YELLOW),
+
<span id="line713">713. FOOD("pancake",            25, 2,  2, 0, VEGGY, 200, CLR_YELLOW),</span>
  FOOD("lembas wafer",        20, 2,  5, 0, VEGGY, 800, CLR_WHITE),
+
<span id="line714">714. FOOD("lembas wafer",        20, 2,  5, 0, VEGGY, 800, CLR_WHITE),</span>
  FOOD("cram ration",        20, 3, 15, 0, VEGGY, 600, HI_ORGANIC),
+
<span id="line715">715. FOOD("cram ration",        20, 3, 15, 0, VEGGY, 600, HI_ORGANIC),</span>
  FOOD("food ration",        380, 5, 20, 0, VEGGY, 800, HI_ORGANIC),
+
<span id="line716">716. FOOD("food ration",        380, 5, 20, 0, VEGGY, 800, HI_ORGANIC),</span>
  FOOD("K-ration",            0, 1, 10, 0, VEGGY, 400, HI_ORGANIC),
+
<span id="line717">717. FOOD("K-ration",            0, 1, 10, 0, VEGGY, 400, HI_ORGANIC),</span>
  FOOD("C-ration",            0, 1, 10, 0, VEGGY, 300, HI_ORGANIC),
+
<span id="line718">718. FOOD("C-ration",            0, 1, 10, 0, VEGGY, 300, HI_ORGANIC),</span>
  FOOD("tin",                75, 0, 10, 1, METAL,  0, HI_METAL),
+
<span id="line719">719. FOOD("tin",                75, 0, 10, 1, METAL,  0, HI_METAL),</span>
  #undef FOOD
+
<span id="line720">720. #undef FOOD</span>
   
+
  <span id="line721">721.  </span>
 +
 
 
=== Potions ===
 
=== Potions ===
  
  /* potions ... */
+
<span id="line722">722. /* potions ... */</span>
  #define POTION(name,desc,mgc,power,prob,cost,color) OBJECT( \
+
<span id="line723">723. #define POTION(name,desc,mgc,power,prob,cost,color) OBJECT( \</span>
  OBJ(name,desc), BITS(0,1,0,0,mgc,0,0,0,0,0,0,P_NONE,GLASS), power, \
+
<span id="line724">724. OBJ(name,desc), BITS(0,1,0,0,mgc,0,0,0,0,0,0,P_NONE,GLASS), power, \</span>
  POTION_CLASS, prob, 0, 20, cost, 0, 0, 0, 0, 10, color )
+
<span id="line725">725. POTION_CLASS, prob, 0, 20, cost, 0, 0, 0, 0, 10, color )</span>
  POTION("gain ability", "ruby",          1, 0,          42, 300, CLR_RED),
+
<span id="line726">726. POTION("gain ability", "ruby",          1, 0,          42, 300, CLR_RED),</span>
  POTION("restore ability", "pink",      1, 0,          40, 100, CLR_BRIGHT_MAGENTA),
+
<span id="line727">727. POTION("restore ability", "pink",      1, 0,          40, 100, CLR_BRIGHT_MAGENTA),</span>
  POTION("confusion", "orange",          1, CONFUSION,  42, 100, CLR_ORANGE),
+
<span id="line728">728. POTION("confusion", "orange",          1, CONFUSION,  42, 100, CLR_ORANGE),</span>
  POTION("blindness", "yellow",          1, BLINDED,    40, 150, CLR_YELLOW),
+
<span id="line729">729. POTION("blindness", "yellow",          1, BLINDED,    40, 150, CLR_YELLOW),</span>
  POTION("paralysis", "emerald",          1, 0,          42, 300, CLR_BRIGHT_GREEN),
+
<span id="line730">730. POTION("paralysis", "emerald",          1, 0,          42, 300, CLR_BRIGHT_GREEN),</span>
  POTION("speed", "dark green",          1, FAST,      42, 200, CLR_GREEN),
+
<span id="line731">731. POTION("speed", "dark green",          1, FAST,      42, 200, CLR_GREEN),</span>
  POTION("levitation", "cyan",            1, LEVITATION, 42, 200, CLR_CYAN),
+
<span id="line732">732. POTION("levitation", "cyan",            1, LEVITATION, 42, 200, CLR_CYAN),</span>
  POTION("hallucination", "sky blue",    1, HALLUC,    40, 100, CLR_CYAN),
+
<span id="line733">733. POTION("hallucination", "sky blue",    1, HALLUC,    40, 100, CLR_CYAN),</span>
  POTION("invisibility", "brilliant blue",1, INVIS,      40, 150, CLR_BRIGHT_BLUE),
+
<span id="line734">734. POTION("invisibility", "brilliant blue",1, INVIS,      40, 150, CLR_BRIGHT_BLUE),</span>
  POTION("see invisible", "magenta",      1, SEE_INVIS,  42,  50, CLR_MAGENTA),
+
<span id="line735">735. POTION("see invisible", "magenta",      1, SEE_INVIS,  42,  50, CLR_MAGENTA),</span>
  POTION("healing", "purple-red",        1, 0,          57, 100, CLR_MAGENTA),
+
<span id="line736">736. POTION("healing", "purple-red",        1, 0,          57, 100, CLR_MAGENTA),</span>
  POTION("extra healing", "puce",        1, 0,          47, 100, CLR_RED),
+
<span id="line737">737. POTION("extra healing", "puce",        1, 0,          47, 100, CLR_RED),</span>
  POTION("gain level", "milky",          1, 0,          20, 300, CLR_WHITE),
+
<span id="line738">738. POTION("gain level", "milky",          1, 0,          20, 300, CLR_WHITE),</span>
  POTION("enlightenment", "swirly",      1, 0,          20, 200, CLR_BROWN),
+
<span id="line739">739. POTION("enlightenment", "swirly",      1, 0,          20, 200, CLR_BROWN),</span>
  POTION("monster detection", "bubbly",  1, 0,          40, 150, CLR_WHITE),
+
<span id="line740">740. POTION("monster detection", "bubbly",  1, 0,          40, 150, CLR_WHITE),</span>
  POTION("object detection", "smoky",    1, 0,          42, 150, CLR_GRAY),
+
<span id="line741">741. POTION("object detection", "smoky",    1, 0,          42, 150, CLR_GRAY),</span>
  POTION("gain energy", "cloudy",        1, 0,          42, 150, CLR_WHITE),
+
<span id="line742">742. POTION("gain energy", "cloudy",        1, 0,          42, 150, CLR_WHITE),</span>
  POTION("sleeping",  "effervescent",    1, 0,          42, 100, CLR_GRAY),
+
<span id="line743">743. POTION("sleeping",  "effervescent",    1, 0,          42, 100, CLR_GRAY),</span>
  POTION("full healing",  "black",        1, 0,          10, 200, CLR_BLACK),
+
<span id="line744">744. POTION("full healing",  "black",        1, 0,          10, 200, CLR_BLACK),</span>
  POTION("polymorph", "golden",          1, 0,          10, 200, CLR_YELLOW),
+
<span id="line745">745. POTION("polymorph", "golden",          1, 0,          10, 200, CLR_YELLOW),</span>
  POTION("booze", "brown",                0, 0,          42,  50, CLR_BROWN),
+
<span id="line746">746. POTION("booze", "brown",                0, 0,          42,  50, CLR_BROWN),</span>
  POTION("sickness", "fizzy",            0, 0,          42,  50, CLR_CYAN),
+
<span id="line747">747. POTION("sickness", "fizzy",            0, 0,          42,  50, CLR_CYAN),</span>
  POTION("fruit juice", "dark",          0, 0,          42,  50, CLR_BLACK),
+
<span id="line748">748. POTION("fruit juice", "dark",          0, 0,          42,  50, CLR_BLACK),</span>
  POTION("acid", "white",                0, 0,          10, 250, CLR_WHITE),
+
<span id="line749">749. POTION("acid", "white",                0, 0,          10, 250, CLR_WHITE),</span>
  POTION("oil", "murky",                  0, 0,          30, 250, CLR_BROWN),
+
<span id="line750">750. POTION("oil", "murky",                  0, 0,          30, 250, CLR_BROWN),</span>
  POTION("water", "clear",                0, 0,          92, 100, CLR_CYAN),
+
<span id="line751">751. POTION("water", "clear",                0, 0,          92, 100, CLR_CYAN),</span>
  #undef POTION
+
<span id="line752">752. #undef POTION</span>
   
+
  <span id="line753">753.  </span>
 +
 
 
=== Scrolls ===
 
=== Scrolls ===
  
  /* scrolls ... */
+
<span id="line754">754. /* scrolls ... */</span>
  #define SCROLL(name,text,mgc,prob,cost) OBJECT( \
+
<span id="line755">755. #define SCROLL(name,text,mgc,prob,cost) OBJECT( \</span>
  OBJ(name,text), BITS(0,1,0,0,mgc,0,0,0,0,0,0,P_NONE,PAPER), 0, \
+
<span id="line756">756. OBJ(name,text), BITS(0,1,0,0,mgc,0,0,0,0,0,0,P_NONE,PAPER), 0, \</span>
  SCROLL_CLASS, prob, 0, 5, cost, 0, 0, 0, 0, 6, HI_PAPER )
+
<span id="line757">757. SCROLL_CLASS, prob, 0, 5, cost, 0, 0, 0, 0, 6, HI_PAPER )</span>
  SCROLL("enchant armor",        "ZELGO MER",            1,  63,  80),
+
<span id="line758">758. SCROLL("enchant armor",        "ZELGO MER",            1,  63,  80),</span>
  SCROLL("destroy armor",        "JUYED AWK YACC",      1,  45, 100),
+
<span id="line759">759. SCROLL("destroy armor",        "JUYED AWK YACC",      1,  45, 100),</span>
  SCROLL("confuse monster",      "NR 9",                1,  53, 100),
+
<span id="line760">760. SCROLL("confuse monster",      "NR 9",                1,  53, 100),</span>
  SCROLL("scare monster",        "XIXAXA XOXAXA XUXAXA", 1,  35, 100),
+
<span id="line761">761. SCROLL("scare monster",        "XIXAXA XOXAXA XUXAXA", 1,  35, 100),</span>
  SCROLL("remove curse",          "PRATYAVAYAH",          1,  65,  80),
+
<span id="line762">762. SCROLL("remove curse",          "PRATYAVAYAH",          1,  65,  80),</span>
  SCROLL("enchant weapon",        "DAIYEN FOOELS",        1,  80,  60),
+
<span id="line763">763. SCROLL("enchant weapon",        "DAIYEN FOOELS",        1,  80,  60),</span>
  SCROLL("create monster",        "LEP GEX VEN ZEA",      1,  45, 200),
+
<span id="line764">764. SCROLL("create monster",        "LEP GEX VEN ZEA",      1,  45, 200),</span>
  SCROLL("taming",                "PRIRUTSENIE",          1,  15, 200),
+
<span id="line765">765. SCROLL("taming",                "PRIRUTSENIE",          1,  15, 200),</span>
  SCROLL("genocide",              "ELBIB YLOH",          1,  15, 300),
+
<span id="line766">766. SCROLL("genocide",              "ELBIB YLOH",          1,  15, 300),</span>
  SCROLL("light",                "VERR YED HORRE",      1,  90,  50),
+
<span id="line767">767. SCROLL("light",                "VERR YED HORRE",      1,  90,  50),</span>
  SCROLL("teleportation",        "VENZAR BORGAVVE",      1,  55, 100),
+
<span id="line768">768. SCROLL("teleportation",        "VENZAR BORGAVVE",      1,  55, 100),</span>
  SCROLL("gold detection",        "THARR",                1,  33, 100),
+
<span id="line769">769. SCROLL("gold detection",        "THARR",                1,  33, 100),</span>
  SCROLL("food detection",        "YUM YUM",              1,  25, 100),
+
<span id="line770">770. SCROLL("food detection",        "YUM YUM",              1,  25, 100),</span>
  SCROLL("identify",              "KERNOD WEL",          1, 180,  20),
+
<span id="line771">771. SCROLL("identify",              "KERNOD WEL",          1, 180,  20),</span>
  SCROLL("magic mapping",        "ELAM EBOW",            1,  45, 100),
+
<span id="line772">772. SCROLL("magic mapping",        "ELAM EBOW",            1,  45, 100),</span>
  SCROLL("amnesia",              "DUAM XNAHT",          1,  35, 200),
+
<span id="line773">773. SCROLL("amnesia",              "DUAM XNAHT",          1,  35, 200),</span>
  SCROLL("fire",                  "ANDOVA BEGARIN",      1,  30, 100),
+
<span id="line774">774. SCROLL("fire",                  "ANDOVA BEGARIN",      1,  30, 100),</span>
  SCROLL("earth",                "KIRJE",                1,  18, 200),
+
<span id="line775">775. SCROLL("earth",                "KIRJE",                1,  18, 200),</span>
  SCROLL("punishment",            "VE FORBRYDERNE",      1,  15, 300),
+
<span id="line776">776. SCROLL("punishment",            "VE FORBRYDERNE",      1,  15, 300),</span>
  SCROLL("charging",              "HACKEM MUCHE",        1,  15, 300),
+
<span id="line777">777. SCROLL("charging",              "HACKEM MUCHE",        1,  15, 300),</span>
  SCROLL("stinking cloud", "VELOX NEB",            1,  15, 300),
+
<span id="line778">778. SCROLL("stinking cloud", "VELOX NEB",            1,  15, 300),</span>
  SCROLL((char *)0, "FOOBIE BLETCH",        1,  0, 100),
+
<span id="line779">779. SCROLL((char *)0, "FOOBIE BLETCH",        1,  0, 100),</span>
  SCROLL((char *)0, "TEMOV",                1,  0, 100),
+
<span id="line780">780. SCROLL((char *)0, "TEMOV",                1,  0, 100),</span>
  SCROLL((char *)0, "GARVEN DEH",          1,  0, 100),
+
<span id="line781">781. SCROLL((char *)0, "GARVEN DEH",          1,  0, 100),</span>
  SCROLL((char *)0, "READ ME",              1,  0, 100),
+
<span id="line782">782. SCROLL((char *)0, "READ ME",              1,  0, 100),</span>
  /* these must come last because they have special descriptions */
+
<span id="line783">783. /* these must come last because they have special descriptions */</span>
  #ifdef MAIL
+
<span id="line784">784. #ifdef MAIL</span>
  SCROLL("mail",                  "stamped",          0,  0,  0),
+
<span id="line785">785. SCROLL("mail",                  "stamped",          0,  0,  0),</span>
  #endif
+
<span id="line786">786. #endif</span>
  SCROLL("blank paper",          "unlabeled",        0,  28,  60),
+
<span id="line787">787. SCROLL("blank paper",          "unlabeled",        0,  28,  60),</span>
  #undef SCROLL
+
<span id="line788">788. #undef SCROLL</span>
   
+
  <span id="line789">789.  </span>
 +
 
 
=== Spellbooks ===
 
=== Spellbooks ===
  
  /* spellbooks ... */
+
<span id="line790">790. /* spellbooks ... */</span>
  #define SPELL(name,desc,sub,prob,delay,level,mgc,dir,color) OBJECT( \
+
<span id="line791">791. #define SPELL(name,desc,sub,prob,delay,level,mgc,dir,color) OBJECT( \</span>
  OBJ(name,desc), BITS(0,0,0,0,mgc,0,0,0,0,0,dir,sub,PAPER), 0, \
+
<span id="line792">792. OBJ(name,desc), BITS(0,0,0,0,mgc,0,0,0,0,0,dir,sub,PAPER), 0, \</span>
  SPBOOK_CLASS, prob, delay, \
+
<span id="line793">793. SPBOOK_CLASS, prob, delay, \</span>
  50, level*100, 0, 0, 0, level, 20, color )
+
<span id="line794">794. 50, level*100, 0, 0, 0, level, 20, color )</span>
  SPELL("dig",            "parchment",  P_MATTER_SPELL, 20,  6, 5, 1, RAY,      HI_PAPER),
+
  <span id="line795">795.  SPELL("dig",            "parchment",  P_MATTER_SPELL, 20,  6, 5, 1, RAY,      HI_PAPER),</span>
  SPELL("magic missile",  "vellum",      P_ATTACK_SPELL, 45,  2, 2, 1, RAY,      HI_PAPER),
+
<span id="line796">796. SPELL("magic missile",  "vellum",      P_ATTACK_SPELL, 45,  2, 2, 1, RAY,      HI_PAPER),</span>
  SPELL("fireball",        "ragged",      P_ATTACK_SPELL, 20,  4, 4, 1, RAY,      HI_PAPER),
+
<span id="line797">797. SPELL("fireball",        "ragged",      P_ATTACK_SPELL, 20,  4, 4, 1, RAY,      HI_PAPER),</span>
  SPELL("cone of cold",    "dog eared",  P_ATTACK_SPELL, 10,  7, 4, 1, RAY,      HI_PAPER),
+
<span id="line798">798. SPELL("cone of cold",    "dog eared",  P_ATTACK_SPELL, 10,  7, 4, 1, RAY,      HI_PAPER),</span>
  SPELL("sleep",          "mottled",    P_ENCHANTMENT_SPELL, 50,  1, 1, 1, RAY,      HI_PAPER),
+
<span id="line799">799. SPELL("sleep",          "mottled",    P_ENCHANTMENT_SPELL, 50,  1, 1, 1, RAY,      HI_PAPER),</span>
  SPELL("finger of death", "stained",    P_ATTACK_SPELL,  5, 10, 7, 1, RAY,      HI_PAPER),
+
<span id="line800">800. SPELL("finger of death", "stained",    P_ATTACK_SPELL,  5, 10, 7, 1, RAY,      HI_PAPER),</span>
  SPELL("light",          "cloth",      P_DIVINATION_SPELL, 45,  1, 1, 1, NODIR,    HI_CLOTH),
+
<span id="line801">801. SPELL("light",          "cloth",      P_DIVINATION_SPELL, 45,  1, 1, 1, NODIR,    HI_CLOTH),</span>
  SPELL("detect monsters", "leather",    P_DIVINATION_SPELL, 43,  1, 1, 1, NODIR,    HI_LEATHER),
+
<span id="line802">802. SPELL("detect monsters", "leather",    P_DIVINATION_SPELL, 43,  1, 1, 1, NODIR,    HI_LEATHER),</span>
  SPELL("healing",        "white",      P_HEALING_SPELL, 40,  2, 1, 1, IMMEDIATE, CLR_WHITE),
+
<span id="line803">803. SPELL("healing",        "white",      P_HEALING_SPELL, 40,  2, 1, 1, IMMEDIATE, CLR_WHITE),</span>
  SPELL("knock",          "pink",        P_MATTER_SPELL, 35,  1, 1, 1, IMMEDIATE, CLR_BRIGHT_MAGENTA),
+
<span id="line804">804. SPELL("knock",          "pink",        P_MATTER_SPELL, 35,  1, 1, 1, IMMEDIATE, CLR_BRIGHT_MAGENTA),</span>
  SPELL("force bolt",      "red",        P_ATTACK_SPELL, 35,  2, 1, 1, IMMEDIATE, CLR_RED),
+
  <span id="line805">805.  SPELL("force bolt",      "red",        P_ATTACK_SPELL, 35,  2, 1, 1, IMMEDIATE, CLR_RED),</span>
  SPELL("confuse monster", "orange",      P_ENCHANTMENT_SPELL, 30,  2, 2, 1, IMMEDIATE, CLR_ORANGE),
+
<span id="line806">806. SPELL("confuse monster", "orange",      P_ENCHANTMENT_SPELL, 30,  2, 2, 1, IMMEDIATE, CLR_ORANGE),</span>
  SPELL("cure blindness",  "yellow",      P_HEALING_SPELL, 25,  2, 2, 1, IMMEDIATE, CLR_YELLOW),
+
<span id="line807">807. SPELL("cure blindness",  "yellow",      P_HEALING_SPELL, 25,  2, 2, 1, IMMEDIATE, CLR_YELLOW),</span>
  SPELL("drain life",      "velvet",      P_ATTACK_SPELL, 10,  2, 2, 1, IMMEDIATE, CLR_MAGENTA),
+
<span id="line808">808. SPELL("drain life",      "velvet",      P_ATTACK_SPELL, 10,  2, 2, 1, IMMEDIATE, CLR_MAGENTA),</span>
  SPELL("slow monster",    "light green", P_ENCHANTMENT_SPELL, 30,  2, 2, 1, IMMEDIATE, CLR_BRIGHT_GREEN),
+
<span id="line809">809. SPELL("slow monster",    "light green", P_ENCHANTMENT_SPELL, 30,  2, 2, 1, IMMEDIATE, CLR_BRIGHT_GREEN),</span>
  SPELL("wizard lock",    "dark green",  P_MATTER_SPELL, 30,  3, 2, 1, IMMEDIATE, CLR_GREEN),
+
  <span id="line810">810.  SPELL("wizard lock",    "dark green",  P_MATTER_SPELL, 30,  3, 2, 1, IMMEDIATE, CLR_GREEN),</span>
  SPELL("create monster",  "turquoise",  P_CLERIC_SPELL, 35,  3, 2, 1, NODIR,    CLR_BRIGHT_CYAN),
+
<span id="line811">811. SPELL("create monster",  "turquoise",  P_CLERIC_SPELL, 35,  3, 2, 1, NODIR,    CLR_BRIGHT_CYAN),</span>
  SPELL("detect food",    "cyan",        P_DIVINATION_SPELL, 30,  3, 2, 1, NODIR,    CLR_CYAN),
+
<span id="line812">812. SPELL("detect food",    "cyan",        P_DIVINATION_SPELL, 30,  3, 2, 1, NODIR,    CLR_CYAN),</span>
  SPELL("cause fear",      "light blue",  P_ENCHANTMENT_SPELL, 25,  3, 3, 1, NODIR,    CLR_BRIGHT_BLUE),
+
<span id="line813">813. SPELL("cause fear",      "light blue",  P_ENCHANTMENT_SPELL, 25,  3, 3, 1, NODIR,    CLR_BRIGHT_BLUE),</span>
  SPELL("clairvoyance",    "dark blue",  P_DIVINATION_SPELL, 15,  3, 3, 1, NODIR,    CLR_BLUE),
+
<span id="line814">814. SPELL("clairvoyance",    "dark blue",  P_DIVINATION_SPELL, 15,  3, 3, 1, NODIR,    CLR_BLUE),</span>
  SPELL("cure sickness",  "indigo",      P_HEALING_SPELL, 32,  3, 3, 1, NODIR,    CLR_BLUE),
+
<span id="line815">815. SPELL("cure sickness",  "indigo",      P_HEALING_SPELL, 32,  3, 3, 1, NODIR,    CLR_BLUE),</span>
  SPELL("charm monster",  "magenta",    P_ENCHANTMENT_SPELL, 20,  3, 3, 1, IMMEDIATE, CLR_MAGENTA),
+
<span id="line816">816. SPELL("charm monster",  "magenta",    P_ENCHANTMENT_SPELL, 20,  3, 3, 1, IMMEDIATE, CLR_MAGENTA),</span>
  SPELL("haste self",      "purple",      P_ESCAPE_SPELL, 33,  4, 3, 1, NODIR,    CLR_MAGENTA),
+
<span id="line817">817. SPELL("haste self",      "purple",      P_ESCAPE_SPELL, 33,  4, 3, 1, NODIR,    CLR_MAGENTA),</span>
  SPELL("detect unseen",  "violet",      P_DIVINATION_SPELL, 20,  4, 3, 1, NODIR,    CLR_MAGENTA),
+
<span id="line818">818. SPELL("detect unseen",  "violet",      P_DIVINATION_SPELL, 20,  4, 3, 1, NODIR,    CLR_MAGENTA),</span>
  SPELL("levitation",      "tan",        P_ESCAPE_SPELL, 20,  4, 4, 1, NODIR,    CLR_BROWN),
+
<span id="line819">819. SPELL("levitation",      "tan",        P_ESCAPE_SPELL, 20,  4, 4, 1, NODIR,    CLR_BROWN),</span>
  SPELL("extra healing",  "plaid",      P_HEALING_SPELL, 27,  5, 3, 1, IMMEDIATE, CLR_GREEN),
+
<span id="line820">820. SPELL("extra healing",  "plaid",      P_HEALING_SPELL, 27,  5, 3, 1, IMMEDIATE, CLR_GREEN),</span>
  SPELL("restore ability", "light brown", P_HEALING_SPELL, 25,  5, 4, 1, NODIR,    CLR_BROWN),
+
<span id="line821">821. SPELL("restore ability", "light brown", P_HEALING_SPELL, 25,  5, 4, 1, NODIR,    CLR_BROWN),</span>
  SPELL("invisibility",    "dark brown",  P_ESCAPE_SPELL, 25,  5, 4, 1, NODIR,    CLR_BROWN),
+
<span id="line822">822. SPELL("invisibility",    "dark brown",  P_ESCAPE_SPELL, 25,  5, 4, 1, NODIR,    CLR_BROWN),</span>
  SPELL("detect treasure", "gray",        P_DIVINATION_SPELL, 20,  5, 4, 1, NODIR,    CLR_GRAY),
+
<span id="line823">823. SPELL("detect treasure", "gray",        P_DIVINATION_SPELL, 20,  5, 4, 1, NODIR,    CLR_GRAY),</span>
  SPELL("remove curse",    "wrinkled",    P_CLERIC_SPELL, 25,  5, 3, 1, NODIR,    HI_PAPER),
+
<span id="line824">824. SPELL("remove curse",    "wrinkled",    P_CLERIC_SPELL, 25,  5, 3, 1, NODIR,    HI_PAPER),</span>
  SPELL("magic mapping",  "dusty",      P_DIVINATION_SPELL, 18,  7, 5, 1, NODIR,    HI_PAPER),
+
<span id="line825">825. SPELL("magic mapping",  "dusty",      P_DIVINATION_SPELL, 18,  7, 5, 1, NODIR,    HI_PAPER),</span>
  SPELL("identify",        "bronze",      P_DIVINATION_SPELL, 20,  6, 3, 1, NODIR,    HI_COPPER),
+
  <span id="line826">826.  SPELL("identify",        "bronze",      P_DIVINATION_SPELL, 20,  6, 3, 1, NODIR,    HI_COPPER),</span>
  SPELL("turn undead",    "copper",      P_CLERIC_SPELL, 16,  8, 6, 1, IMMEDIATE, HI_COPPER),
+
<span id="line827">827. SPELL("turn undead",    "copper",      P_CLERIC_SPELL, 16,  8, 6, 1, IMMEDIATE, HI_COPPER),</span>
  SPELL("polymorph",      "silver",      P_MATTER_SPELL, 10,  8, 6, 1, IMMEDIATE, HI_SILVER),
+
<span id="line828">828. SPELL("polymorph",      "silver",      P_MATTER_SPELL, 10,  8, 6, 1, IMMEDIATE, HI_SILVER),</span>
  SPELL("teleport away",  "gold",        P_ESCAPE_SPELL, 15,  6, 6, 1, IMMEDIATE, HI_GOLD),
+
<span id="line829">829. SPELL("teleport away",  "gold",        P_ESCAPE_SPELL, 15,  6, 6, 1, IMMEDIATE, HI_GOLD),</span>
  SPELL("create familiar", "glittering",  P_CLERIC_SPELL, 10,  7, 6, 1, NODIR,    CLR_WHITE),
+
<span id="line830">830. SPELL("create familiar", "glittering",  P_CLERIC_SPELL, 10,  7, 6, 1, NODIR,    CLR_WHITE),</span>
  SPELL("cancellation",    "shining",    P_MATTER_SPELL, 15,  8, 7, 1, IMMEDIATE, CLR_WHITE),
+
<span id="line831">831. SPELL("cancellation",    "shining",    P_MATTER_SPELL, 15,  8, 7, 1, IMMEDIATE, CLR_WHITE),</span>
  SPELL("protection",     "dull",        P_CLERIC_SPELL, 18,  3, 1, 1, NODIR,    HI_PAPER),
+
<span id="line832">832. SPELL("protection",     "dull",        P_CLERIC_SPELL, 18,  3, 1, 1, NODIR,    HI_PAPER),</span>
  SPELL("jumping",     "thin",        P_ESCAPE_SPELL, 20,  3, 1, 1, IMMEDIATE, HI_PAPER),
+
<span id="line833">833. SPELL("jumping",     "thin",        P_ESCAPE_SPELL, 20,  3, 1, 1, IMMEDIATE, HI_PAPER),</span>
  SPELL("stone to flesh", "thick",      P_HEALING_SPELL, 15,  1, 3, 1, IMMEDIATE, HI_PAPER),
+
<span id="line834">834. SPELL("stone to flesh", "thick",      P_HEALING_SPELL, 15,  1, 3, 1, IMMEDIATE, HI_PAPER),</span>
  #if 0 /* DEFERRED */
+
<span id="line835">835. #if 0 /* DEFERRED */</span>
  SPELL("flame sphere",    "canvas",      P_MATTER_SPELL, 20,  2, 1, 1, NODIR, CLR_BROWN),
+
<span id="line836">836. SPELL("flame sphere",    "canvas",      P_MATTER_SPELL, 20,  2, 1, 1, NODIR, CLR_BROWN),</span>
  SPELL("freeze sphere",  "hardcover",  P_MATTER_SPELL, 20,  2, 1, 1, NODIR, CLR_BROWN),
+
<span id="line837">837. SPELL("freeze sphere",  "hardcover",  P_MATTER_SPELL, 20,  2, 1, 1, NODIR, CLR_BROWN),</span>
  #endif
+
<span id="line838">838. #endif</span>
  /* blank spellbook must come last because it retains its description */
+
<span id="line839">839. /* blank spellbook must come last because it retains its description */</span>
  SPELL("blank paper",    "plain",      P_NONE, 18,  0, 0, 0, 0,        HI_PAPER),
+
<span id="line840">840. SPELL("blank paper",    "plain",      P_NONE, 18,  0, 0, 0, 0,        HI_PAPER),</span>
  /* a special, one of a kind, spellbook */
+
<span id="line841">841. /* a special, one of a kind, spellbook */</span>
  OBJECT(OBJ("Book of the Dead", "papyrus"), BITS(0,0,1,0,1,0,1,1,0,0,0,P_NONE,PAPER), 0,
+
<span id="line842">842. OBJECT(OBJ("Book of the Dead", "papyrus"), BITS(0,0,1,0,1,0,1,1,0,0,0,P_NONE,PAPER), 0,</span>
  SPBOOK_CLASS, 0, 0,20, 10000, 0, 0, 0, 7, 20, HI_PAPER),
+
<span id="line843">843. SPBOOK_CLASS, 0, 0,20, 10000, 0, 0, 0, 7, 20, HI_PAPER),</span>
  #undef SPELL
+
<span id="line844">844. #undef SPELL</span>
   
+
  <span id="line845">845.  </span>
 +
 
 
=== Wands ===
 
=== Wands ===
  
  /* wands ... */
+
<span id="line846">846. /* wands ... */</span>
  #define WAND(name,typ,prob,cost,mgc,dir,metal,color) OBJECT( \
+
<span id="line847">847. #define WAND(name,typ,prob,cost,mgc,dir,metal,color) OBJECT( \</span>
  OBJ(name,typ), BITS(0,0,1,0,mgc,1,0,0,0,0,dir,P_NONE,metal), 0, \
+
<span id="line848">848. OBJ(name,typ), BITS(0,0,1,0,mgc,1,0,0,0,0,dir,P_NONE,metal), 0, \</span>
  WAND_CLASS, prob, 0, 7, cost, 0, 0, 0, 0, 30, color )
+
<span id="line849">849. WAND_CLASS, prob, 0, 7, cost, 0, 0, 0, 0, 30, color )</span>
  WAND("light",          "glass",    95, 100, 1, NODIR,    GLASS,    HI_GLASS),
+
<span id="line850">850. WAND("light",          "glass",    95, 100, 1, NODIR,    GLASS,    HI_GLASS),</span>
  WAND("secret door detection", "balsa",
+
<span id="line851">851. WAND("secret door detection", "balsa",</span>
    50, 150, 1, NODIR,   WOOD,    HI_WOOD),
+
<span id="line852">852.   50, 150, 1, NODIR,   WOOD,    HI_WOOD),</span>
  WAND("enlightenment",  "crystal",  15, 150, 1, NODIR,    GLASS,    HI_GLASS),
+
<span id="line853">853. WAND("enlightenment",  "crystal",  15, 150, 1, NODIR,    GLASS,    HI_GLASS),</span>
  WAND("create monster", "maple",    45, 200, 1, NODIR,    WOOD,    HI_WOOD),
+
<span id="line854">854. WAND("create monster", "maple",    45, 200, 1, NODIR,    WOOD,    HI_WOOD),</span>
  WAND("wishing",        "pine",      5, 500, 1, NODIR,    WOOD,    HI_WOOD),
+
<span id="line855">855. WAND("wishing",        "pine",      5, 500, 1, NODIR,    WOOD,    HI_WOOD),</span>
  WAND("nothing",        "oak",      25, 100, 0, IMMEDIATE, WOOD,    HI_WOOD),
+
<span id="line856">856. WAND("nothing",        "oak",      25, 100, 0, IMMEDIATE, WOOD,    HI_WOOD),</span>
  WAND("striking",      "ebony",    75, 150, 1, IMMEDIATE, WOOD,    HI_WOOD),
+
<span id="line857">857. WAND("striking",      "ebony",    75, 150, 1, IMMEDIATE, WOOD,    HI_WOOD),</span>
  WAND("make invisible", "marble",  45, 150, 1, IMMEDIATE, MINERAL,  HI_MINERAL),
+
<span id="line858">858. WAND("make invisible", "marble",  45, 150, 1, IMMEDIATE, MINERAL,  HI_MINERAL),</span>
  WAND("slow monster",  "tin",      50, 150, 1, IMMEDIATE, METAL,    HI_METAL),
+
<span id="line859">859. WAND("slow monster",  "tin",      50, 150, 1, IMMEDIATE, METAL,    HI_METAL),</span>
  WAND("speed monster",  "brass",    50, 150, 1, IMMEDIATE, COPPER,  HI_COPPER),
+
<span id="line860">860. WAND("speed monster",  "brass",    50, 150, 1, IMMEDIATE, COPPER,  HI_COPPER),</span>
  WAND("undead turning", "copper",  50, 150, 1, IMMEDIATE, COPPER,  HI_COPPER),
+
<span id="line861">861. WAND("undead turning", "copper",  50, 150, 1, IMMEDIATE, COPPER,  HI_COPPER),</span>
  WAND("polymorph",      "silver",  45, 200, 1, IMMEDIATE, SILVER,  HI_SILVER),
+
<span id="line862">862. WAND("polymorph",      "silver",  45, 200, 1, IMMEDIATE, SILVER,  HI_SILVER),</span>
  WAND("cancellation",  "platinum", 45, 200, 1, IMMEDIATE, PLATINUM, CLR_WHITE),
+
<span id="line863">863. WAND("cancellation",  "platinum", 45, 200, 1, IMMEDIATE, PLATINUM, CLR_WHITE),</span>
  WAND("teleportation",  "iridium",  45, 200, 1, IMMEDIATE, METAL,    CLR_BRIGHT_CYAN),
+
<span id="line864">864. WAND("teleportation",  "iridium",  45, 200, 1, IMMEDIATE, METAL,    CLR_BRIGHT_CYAN),</span>
  WAND("opening",        "zinc",    25, 150, 1, IMMEDIATE, METAL,    HI_METAL),
+
<span id="line865">865. WAND("opening",        "zinc",    25, 150, 1, IMMEDIATE, METAL,    HI_METAL),</span>
  WAND("locking",        "aluminum", 25, 150, 1, IMMEDIATE, METAL,    HI_METAL),
+
<span id="line866">866. WAND("locking",        "aluminum", 25, 150, 1, IMMEDIATE, METAL,    HI_METAL),</span>
  WAND("probing",        "uranium",  30, 150, 1, IMMEDIATE, METAL,    HI_METAL),
+
<span id="line867">867. WAND("probing",        "uranium",  30, 150, 1, IMMEDIATE, METAL,    HI_METAL),</span>
  WAND("digging",        "iron",    55, 150, 1, RAY,      IRON,    HI_METAL),
+
<span id="line868">868. WAND("digging",        "iron",    55, 150, 1, RAY,      IRON,    HI_METAL),</span>
  WAND("magic missile",  "steel",    50, 150, 1, RAY,      IRON,    HI_METAL),
+
<span id="line869">869. WAND("magic missile",  "steel",    50, 150, 1, RAY,      IRON,    HI_METAL),</span>
  WAND("fire",          "hexagonal",40, 175, 1, RAY,      IRON,    HI_METAL),
+
<span id="line870">870. WAND("fire",          "hexagonal",40, 175, 1, RAY,      IRON,    HI_METAL),</span>
  WAND("cold",          "short",    40, 175, 1, RAY,      IRON,    HI_METAL),
+
<span id="line871">871. WAND("cold",          "short",    40, 175, 1, RAY,      IRON,    HI_METAL),</span>
  WAND("sleep",          "runed",    50, 175, 1, RAY,      IRON,    HI_METAL),
+
<span id="line872">872. WAND("sleep",          "runed",    50, 175, 1, RAY,      IRON,    HI_METAL),</span>
  WAND("death",          "long",      5, 500, 1, RAY,      IRON,    HI_METAL),
+
<span id="line873">873. WAND("death",          "long",      5, 500, 1, RAY,      IRON,    HI_METAL),</span>
  WAND("lightning",      "curved",  40, 175, 1, RAY,      IRON,    HI_METAL),
+
<span id="line874">874. WAND("lightning",      "curved",  40, 175, 1, RAY,      IRON,    HI_METAL),</span>
  WAND((char *)0,        "forked",    0, 150, 1, 0,        WOOD,    HI_WOOD),
+
<span id="line875">875. WAND((char *)0,        "forked",    0, 150, 1, 0,        WOOD,    HI_WOOD),</span>
  WAND((char *)0,        "spiked",    0, 150, 1, 0,        IRON,    HI_METAL),
+
<span id="line876">876. WAND((char *)0,        "spiked",    0, 150, 1, 0,        IRON,    HI_METAL),</span>
  WAND((char *)0,        "jeweled",  0, 150, 1, 0,        IRON,    HI_MINERAL),
+
<span id="line877">877. WAND((char *)0,        "jeweled",  0, 150, 1, 0,        IRON,    HI_MINERAL),</span>
  #undef WAND
+
<span id="line878">878. #undef WAND</span>
   
+
  <span id="line879">879.  </span>
 +
 
 
=== Coins ===
 
=== Coins ===
  
  /* coins ... - so far, gold is all there is */
+
<span id="line880">880. /* coins ... - so far, gold is all there is */</span>
  #define COIN(name,prob,metal,worth) OBJECT( \
+
<span id="line881">881. #define COIN(name,prob,metal,worth) OBJECT( \</span>
  OBJ(name,(char *)0), BITS(0,1,0,0,0,0,0,0,0,0,0,P_NONE,metal), 0, \
+
<span id="line882">882. OBJ(name,(char *)0), BITS(0,1,0,0,0,0,0,0,0,0,0,P_NONE,metal), 0, \</span>
  COIN_CLASS, prob, 0, 1, worth, 0, 0, 0, 0, 0, HI_GOLD )
+
<span id="line883">883. COIN_CLASS, prob, 0, 1, worth, 0, 0, 0, 0, 0, HI_GOLD )</span>
  COIN("gold piece",      1000, GOLD,1),
+
<span id="line884">884. COIN("gold piece",      1000, GOLD,1),</span>
  #undef COIN
+
<span id="line885">885. #undef COIN</span>
   
+
  <span id="line886">886.  </span>
 +
 
 
=== Gems ===
 
=== Gems ===
  
  /* gems ... - includes stones and rocks but not boulders */
+
<span id="line887">887. /* gems ... - includes stones and rocks but not boulders */</span>
  #define GEM(name,desc,prob,wt,gval,nutr,mohs,glass,color) OBJECT( \
+
<span id="line888">888. #define GEM(name,desc,prob,wt,gval,nutr,mohs,glass,color) OBJECT( \</span>
      OBJ(name,desc), \
+
<span id="line889">889.     OBJ(name,desc), \</span>
      BITS(0,1,0,0,0,0,0,0,0,HARDGEM(mohs),0,-P_SLING,glass), 0, \
+
<span id="line890">890.     BITS(0,1,0,0,0,0,0,0,0,HARDGEM(mohs),0,-P_SLING,glass), 0, \</span>
      GEM_CLASS, prob, 0, 1, gval, 3, 3, 0, 0, nutr, color )
+
<span id="line891">891.     GEM_CLASS, prob, 0, 1, gval, 3, 3, 0, 0, nutr, color )</span>
  #define ROCK(name,desc,kn,prob,wt,gval,sdam,ldam,mgc,nutr,mohs,glass,color) OBJECT( \
+
  <span id="line892">892.  #define ROCK(name,desc,kn,prob,wt,gval,sdam,ldam,mgc,nutr,mohs,glass,color) OBJECT( \</span>
      OBJ(name,desc), \
+
<span id="line893">893.     OBJ(name,desc), \</span>
      BITS(kn,1,0,0,mgc,0,0,0,0,HARDGEM(mohs),0,-P_SLING,glass), 0, \
+
<span id="line894">894.     BITS(kn,1,0,0,mgc,0,0,0,0,HARDGEM(mohs),0,-P_SLING,glass), 0, \</span>
      GEM_CLASS, prob, 0, wt, gval, sdam, ldam, 0, 0, nutr, color )
+
<span id="line895">895.     GEM_CLASS, prob, 0, wt, gval, sdam, ldam, 0, 0, nutr, color )</span>
  GEM("dilithium crystal", "white",      2,  1, 4500, 15,  5, GEMSTONE, CLR_WHITE),
+
<span id="line896">896. GEM("dilithium crystal", "white",      2,  1, 4500, 15,  5, GEMSTONE, CLR_WHITE),</span>
  GEM("diamond", "white",                3,  1, 4000, 15, 10, GEMSTONE, CLR_WHITE),
+
  <span id="line897">897.  GEM("diamond", "white",                3,  1, 4000, 15, 10, GEMSTONE, CLR_WHITE),</span>
  GEM("ruby", "red",                    4,  1, 3500, 15,  9, GEMSTONE, CLR_RED),
+
<span id="line898">898. GEM("ruby", "red",                    4,  1, 3500, 15,  9, GEMSTONE, CLR_RED),</span>
  GEM("jacinth", "orange",              3,  1, 3250, 15,  9, GEMSTONE, CLR_ORANGE),
+
<span id="line899">899. GEM("jacinth", "orange",              3,  1, 3250, 15,  9, GEMSTONE, CLR_ORANGE),</span>
  GEM("sapphire", "blue",                4,  1, 3000, 15,  9, GEMSTONE, CLR_BLUE),
+
<span id="line900">900. GEM("sapphire", "blue",                4,  1, 3000, 15,  9, GEMSTONE, CLR_BLUE),</span>
  GEM("black opal", "black",            3,  1, 2500, 15,  8, GEMSTONE, CLR_BLACK),
+
<span id="line901">901. GEM("black opal", "black",            3,  1, 2500, 15,  8, GEMSTONE, CLR_BLACK),</span>
  GEM("emerald", "green",                5,  1, 2500, 15,  8, GEMSTONE, CLR_GREEN),
+
<span id="line902">902. GEM("emerald", "green",                5,  1, 2500, 15,  8, GEMSTONE, CLR_GREEN),</span>
  GEM("turquoise", "green",              6,  1, 2000, 15,  6, GEMSTONE, CLR_GREEN),
+
<span id="line903">903. GEM("turquoise", "green",              6,  1, 2000, 15,  6, GEMSTONE, CLR_GREEN),</span>
  GEM("citrine", "yellow",              4,  1, 1500, 15,  6, GEMSTONE, CLR_YELLOW),
+
<span id="line904">904. GEM("citrine", "yellow",              4,  1, 1500, 15,  6, GEMSTONE, CLR_YELLOW),</span>
  GEM("aquamarine", "green",            6,  1, 1500, 15,  8, GEMSTONE, CLR_GREEN),
+
<span id="line905">905. GEM("aquamarine", "green",            6,  1, 1500, 15,  8, GEMSTONE, CLR_GREEN),</span>
  GEM("amber", "yellowish brown",        8,  1, 1000, 15,  2, GEMSTONE, CLR_BROWN),
+
<span id="line906">906. GEM("amber", "yellowish brown",        8,  1, 1000, 15,  2, GEMSTONE, CLR_BROWN),</span>
  GEM("topaz", "yellowish brown",      10,  1,  900, 15,  8, GEMSTONE, CLR_BROWN),
+
<span id="line907">907. GEM("topaz", "yellowish brown",      10,  1,  900, 15,  8, GEMSTONE, CLR_BROWN),</span>
  GEM("jet", "black",                    6,  1,  850, 15,  7, GEMSTONE, CLR_BLACK),
+
<span id="line908">908. GEM("jet", "black",                    6,  1,  850, 15,  7, GEMSTONE, CLR_BLACK),</span>
  GEM("opal", "white",                  12,  1,  800, 15,  6, GEMSTONE, CLR_WHITE),
+
<span id="line909">909. GEM("opal", "white",                  12,  1,  800, 15,  6, GEMSTONE, CLR_WHITE),</span>
  GEM("chrysoberyl", "yellow",          8,  1,  700, 15,  5, GEMSTONE, CLR_YELLOW),
+
<span id="line910">910. GEM("chrysoberyl", "yellow",          8,  1,  700, 15,  5, GEMSTONE, CLR_YELLOW),</span>
  GEM("garnet", "red",                  12,  1,  700, 15,  7, GEMSTONE, CLR_RED),
+
<span id="line911">911. GEM("garnet", "red",                  12,  1,  700, 15,  7, GEMSTONE, CLR_RED),</span>
  GEM("amethyst", "violet",            14,  1,  600, 15,  7, GEMSTONE, CLR_MAGENTA),
+
  <span id="line912">912.  GEM("amethyst", "violet",            14,  1,  600, 15,  7, GEMSTONE, CLR_MAGENTA),</span>
  GEM("jasper", "red",                  15,  1,  500, 15,  7, GEMSTONE, CLR_RED),
+
<span id="line913">913. GEM("jasper", "red",                  15,  1,  500, 15,  7, GEMSTONE, CLR_RED),</span>
  GEM("fluorite", "violet",            15,  1,  400, 15,  4, GEMSTONE, CLR_MAGENTA),
+
<span id="line914">914. GEM("fluorite", "violet",            15,  1,  400, 15,  4, GEMSTONE, CLR_MAGENTA),</span>
  GEM("obsidian", "black",              9,  1,  200, 15,  6, GEMSTONE, CLR_BLACK),
+
<span id="line915">915. GEM("obsidian", "black",              9,  1,  200, 15,  6, GEMSTONE, CLR_BLACK),</span>
  GEM("agate", "orange",                12,  1,  200, 15,  6, GEMSTONE, CLR_ORANGE),
+
<span id="line916">916. GEM("agate", "orange",                12,  1,  200, 15,  6, GEMSTONE, CLR_ORANGE),</span>
  GEM("jade", "green",                  10,  1,  300, 15,  6, GEMSTONE, CLR_GREEN),
+
<span id="line917">917. GEM("jade", "green",                  10,  1,  300, 15,  6, GEMSTONE, CLR_GREEN),</span>
  GEM("worthless piece of white glass", "white",  77, 1, 0, 6, 5, GLASS, CLR_WHITE),
+
<span id="line918">918. GEM("worthless piece of white glass", "white",  77, 1, 0, 6, 5, GLASS, CLR_WHITE),</span>
  GEM("worthless piece of blue glass", "blue",    77, 1, 0, 6, 5, GLASS, CLR_BLUE),
+
<span id="line919">919. GEM("worthless piece of blue glass", "blue",    77, 1, 0, 6, 5, GLASS, CLR_BLUE),</span>
  GEM("worthless piece of red glass", "red",      77, 1, 0, 6, 5, GLASS, CLR_RED),
+
<span id="line920">920. GEM("worthless piece of red glass", "red",      77, 1, 0, 6, 5, GLASS, CLR_RED),</span>
  GEM("worthless piece of yellowish brown glass", "yellowish brown",
+
<span id="line921">921. GEM("worthless piece of yellowish brown glass", "yellowish brown",</span>
  77, 1, 0, 6, 5, GLASS, CLR_BROWN),
+
<span id="line922">922. 77, 1, 0, 6, 5, GLASS, CLR_BROWN),</span>
  GEM("worthless piece of orange glass", "orange", 76, 1, 0, 6, 5, GLASS, CLR_ORANGE),
+
<span id="line923">923. GEM("worthless piece of orange glass", "orange", 76, 1, 0, 6, 5, GLASS, CLR_ORANGE),</span>
  GEM("worthless piece of yellow glass", "yellow", 77, 1, 0, 6, 5, GLASS, CLR_YELLOW),
+
<span id="line924">924. GEM("worthless piece of yellow glass", "yellow", 77, 1, 0, 6, 5, GLASS, CLR_YELLOW),</span>
  GEM("worthless piece of black glass",  "black",  76, 1, 0, 6, 5, GLASS, CLR_BLACK),
+
<span id="line925">925. GEM("worthless piece of black glass",  "black",  76, 1, 0, 6, 5, GLASS, CLR_BLACK),</span>
  GEM("worthless piece of green glass", "green",  77, 1, 0, 6, 5, GLASS, CLR_GREEN),
+
<span id="line926">926. GEM("worthless piece of green glass", "green",  77, 1, 0, 6, 5, GLASS, CLR_GREEN),</span>
  GEM("worthless piece of violet glass", "violet", 77, 1, 0, 6, 5, GLASS, CLR_MAGENTA),
+
  <span id="line927">927.  GEM("worthless piece of violet glass", "violet", 77, 1, 0, 6, 5, GLASS, CLR_MAGENTA),</span>
   
+
  <span id="line928">928.  </span>
  /* Placement note: there is a wishable subrange for
+
<span id="line929">929. /* Placement note: there is a wishable subrange for</span>
   * "gray stones" in the o_ranges[] array in objnam.c
+
<span id="line930">930.   * "gray stones" in the o_ranges[] array in objnam.c</span>
   * that is currently everything between luckstones and flint (inclusive).
+
<span id="line931">931.   * that is currently everything between luckstones and flint (inclusive).</span>
   */
+
<span id="line932">932.   */</span>
  ROCK("luckstone", "gray", 0, 10,  10, 60, 3, 3, 1, 10, 7, MINERAL, CLR_GRAY),
+
<span id="line933">933. ROCK("luckstone", "gray", 0, 10,  10, 60, 3, 3, 1, 10, 7, MINERAL, CLR_GRAY),</span>
  ROCK("loadstone", "gray", 0, 10, 500,  1, 3, 3, 1, 10, 6, MINERAL, CLR_GRAY),
+
<span id="line934">934. ROCK("loadstone", "gray", 0, 10, 500,  1, 3, 3, 1, 10, 6, MINERAL, CLR_GRAY),</span>
  ROCK("touchstone", "gray", 0,  8,  10, 45, 3, 3, 1, 10, 6, MINERAL, CLR_GRAY),
+
<span id="line935">935. ROCK("touchstone", "gray", 0,  8,  10, 45, 3, 3, 1, 10, 6, MINERAL, CLR_GRAY),</span>
  ROCK("flint", "gray", 0, 10,  10,  1, 6, 6, 0, 10, 7, MINERAL, CLR_GRAY),
+
<span id="line936">936. ROCK("flint", "gray", 0, 10,  10,  1, 6, 6, 0, 10, 7, MINERAL, CLR_GRAY),</span>
  ROCK("rock", (char *)0, 1,100,  10,  0, 3, 3, 0, 10, 7, MINERAL, CLR_GRAY),
+
<span id="line937">937. ROCK("rock", (char *)0, 1,100,  10,  0, 3, 3, 0, 10, 7, MINERAL, CLR_GRAY),</span>
  #undef GEM
+
<span id="line938">938. #undef GEM</span>
  #undef ROCK
+
<span id="line939">939. #undef ROCK</span>
   
+
  <span id="line940">940.  </span>
 +
 
 
=== Miscellaneous ===
 
=== Miscellaneous ===
  
  /* miscellaneous ... */
+
<span id="line941">941. /* miscellaneous ... */</span>
  /* Note: boulders and rocks are not normally created at random; the
+
<span id="line942">942. /* Note: boulders and rocks are not normally created at random; the</span>
   * probabilities only come into effect when you try to polymorph them.
+
<span id="line943">943.   * probabilities only come into effect when you try to polymorph them.</span>
   * Boulders weigh more than MAX_CARR_CAP; statues use corpsenm to take
+
<span id="line944">944.   * Boulders weigh more than MAX_CARR_CAP; statues use corpsenm to take</span>
   * on a specific type and may act as containers (both affect weight).
+
<span id="line945">945.   * on a specific type and may act as containers (both affect weight).</span>
   */
+
<span id="line946">946.   */</span>
  OBJECT(OBJ("boulder",(char *)0), BITS(1,0,0,0,0,0,0,0,1,0,0,P_NONE,MINERAL), 0,
+
<span id="line947">947. OBJECT(OBJ("boulder",(char *)0), BITS(1,0,0,0,0,0,0,0,1,0,0,P_NONE,MINERAL), 0,</span>
  ROCK_CLASS,  100, 0, 6000,  0, 20, 20, 0, 0, 2000, HI_MINERAL),
+
<span id="line948">948. ROCK_CLASS,  100, 0, 6000,  0, 20, 20, 0, 0, 2000, HI_MINERAL),</span>
  OBJECT(OBJ("statue", (char *)0), BITS(1,0,0,1,0,0,0,0,0,0,0,P_NONE,MINERAL), 0,
+
<span id="line949">949. OBJECT(OBJ("statue", (char *)0), BITS(1,0,0,1,0,0,0,0,0,0,0,P_NONE,MINERAL), 0,</span>
  ROCK_CLASS,  900, 0, 2500,  0, 20, 20, 0, 0, 2500, CLR_WHITE),
+
<span id="line950">950. ROCK_CLASS,  900, 0, 2500,  0, 20, 20, 0, 0, 2500, CLR_WHITE),</span>
   
+
  <span id="line951">951.  </span>
  OBJECT(OBJ("heavy iron ball", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,WHACK,P_NONE,IRON), 0,
+
<span id="line952">952. OBJECT(OBJ("heavy iron ball", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,WHACK,P_NONE,IRON), 0,</span>
  BALL_CLASS,  1000, 0,  480, 10, 25, 25, 0, 0,  200, HI_METAL),
+
<span id="line953">953. BALL_CLASS,  1000, 0,  480, 10, 25, 25, 0, 0,  200, HI_METAL),</span>
  /* +d4 when "very heavy" */
+
<span id="line954">954. /* +d4 when "very heavy" */</span>
  OBJECT(OBJ("iron chain", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,WHACK,P_NONE,IRON), 0,
+
<span id="line955">955. OBJECT(OBJ("iron chain", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,WHACK,P_NONE,IRON), 0,</span>
  CHAIN_CLASS, 1000, 0,  120,  0,  4,  4, 0, 0,  200, HI_METAL),
+
<span id="line956">956. CHAIN_CLASS, 1000, 0,  120,  0,  4,  4, 0, 0,  200, HI_METAL),</span>
  /* +1 both l & s */
+
<span id="line957">957. /* +1 both l & s */</span>
   
+
  <span id="line958">958.  </span>
  OBJECT(OBJ("blinding venom", "splash of venom"),
+
<span id="line959">959. OBJECT(OBJ("blinding venom", "splash of venom"),</span>
  BITS(0,1,0,0,0,0,0,1,0,0,0,P_NONE,LIQUID), 0,
+
<span id="line960">960. BITS(0,1,0,0,0,0,0,1,0,0,0,P_NONE,LIQUID), 0,</span>
  VENOM_CLASS,  500, 0, 1,  0,  0,  0, 0, 0, 0, HI_ORGANIC),
+
<span id="line961">961. VENOM_CLASS,  500, 0, 1,  0,  0,  0, 0, 0, 0, HI_ORGANIC),</span>
  OBJECT(OBJ("acid venom", "splash of venom"),
+
<span id="line962">962. OBJECT(OBJ("acid venom", "splash of venom"),</span>
  BITS(0,1,0,0,0,0,0,1,0,0,0,P_NONE,LIQUID), 0,
+
<span id="line963">963. BITS(0,1,0,0,0,0,0,1,0,0,0,P_NONE,LIQUID), 0,</span>
  VENOM_CLASS,  500, 0, 1,  0,  6,  6, 0, 0, 0, HI_ORGANIC),
+
<span id="line964">964. VENOM_CLASS,  500, 0, 1,  0,  6,  6, 0, 0, 0, HI_ORGANIC),</span>
  /* +d6 small or large */
+
<span id="line965">965. /* +d6 small or large */</span>
   
+
  <span id="line966">966.  </span>
  /* fencepost, the deadly Array Terminator -- name [1st arg] *must* be NULL */
+
<span id="line967">967. /* fencepost, the deadly Array Terminator -- name [1st arg] *must* be NULL */</span>
  OBJECT(OBJ((char *)0,(char *)0), BITS(0,0,0,0,0,0,0,0,0,0,0,P_NONE,0), 0,
+
<span id="line968">968. OBJECT(OBJ((char *)0,(char *)0), BITS(0,0,0,0,0,0,0,0,0,0,0,P_NONE,0), 0,</span>
  ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
+
<span id="line969">969. ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)</span>
  }; /* objects[] */
+
<span id="line970">970. }; /* objects[] */</span>
   
+
  <span id="line971">971.  </span>
  #ifndef OBJECTS_PASS_2_
+
<span id="line972">972. #ifndef OBJECTS_PASS_2_</span>
   
+
  <span id="line973">973.  </span>
  /* perform recursive compilation for second structure */
+
<span id="line974">974. /* perform recursive compilation for second structure */</span>
  #  undef OBJ
+
<span id="line975">975. #  undef OBJ</span>
  #  undef OBJECT
+
<span id="line976">976. #  undef OBJECT</span>
  #  define OBJECTS_PASS_2_
+
<span id="line977">977. #  define OBJECTS_PASS_2_</span>
  #include "objects.c"
+
<span id="line978">978. #include "objects.c"</span>
   
+
  <span id="line979">979.  </span>
  void NDECL(objects_init);
+
<span id="line980">980. void NDECL(objects_init);</span>
   
+
  <span id="line981">981.  </span>
  /* dummy routine used to force linkage */
+
 
  void
+
== objects_init ==
  objects_init()
+
<span id="line982">982. /* dummy routine used to force linkage */</span>
  {
+
<span id="line983">983. void</span>
     return;
+
<span id="line984">984. objects_init()</span>
  }
+
<span id="line985">985. {</span>
   
+
<span id="line986">986.     return;</span>
  #endif /* !OBJECTS_PASS_2_ */
+
<span id="line987">987. }</span>
   
+
  <span id="line988">988.  </span>
  /*objects.c*/
+
<span id="line989">989. #endif /* !OBJECTS_PASS_2_ */</span>
 +
  <span id="line990">990.  </span>
 +
<span id="line991">991. /*objects.c*/</span>
  
 
[[Category:Source code]]
 
[[Category:Source code]]

Latest revision as of 16:22, 17 November 2013

Below is the full text to src/objects.c from NetHack 3.4.3. To link to a particular line, write [[objects.c#line123|objects.c#line123]], for example.

Top of file

/*	SCCS Id: @(#)objects.c	3.4	2002/07/31	*/
/* Copyright (c) Mike Threepoint, 1989.				  */
/* 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.

#ifndef OBJECTS_PASS_2_
/* first pass */
struct monst { struct monst *dummy; };	/* lint: struct obj's union */
#include "config.h"
#include "obj.h"
#include "objclass.h"
#include "prop.h"
#include "skills.h"

#else	/* !OBJECTS_PASS_2_ */
/* second pass */
#include "color.h"
#  define COLOR_FIELD(X) X,
#endif	/* !OBJECTS_PASS_2_ */

The file uses preprocessor tricks so that the file is included twice; the first pass populates the obj_descr[] array with just the object name and description strings. The second pass will populate the full objects[] array with the object definitions (excluding the name and description strings). Do not directly access the obj_descr[], use OBJ_NAME() and OBJ_DESCR() macros. See the objclass-struct in objclass.h.

/* objects have symbols: ) [ = " ( % ! ? + / $ * ` 0 _ . */

/*
*	Note:  OBJ() and BITS() macros are used to avoid exceeding argument
*	limits imposed by some compilers.  The ctnr field of BITS currently
*	does not map into struct objclass, and is ignored in the expansion.
*	The 0 in the expansion corresponds to oc_pre_discovered, which is
*	set at run-time during role-specific character initialization.
*/

Object macros

#ifndef OBJECTS_PASS_2_
/* first pass -- object descriptive text */
# define OBJ(name,desc) name,desc

Object name and description. The description field can be (char *)0, in which case there is no description, and only the object name is used.

# define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \
	{obj}

The OBJECT macro.

  1. obj is the OBJ macro from above.
  2. bits are special bitfields, see BITS macro below.
  3. prp is special property of the object it grants, eg. REFLECTING or LIFESAVED.
  4. sym is the object symbol, one of the _CLASS definitions, eg. GEM_CLASS.
  5. prob is the object relative random generation probability. For each object class (eg. scrolls or potions), the total of this must be 1000.
  6. dly is delay (in turns) it takes to use the object, eg. to wear or to take off.
  7. wt is object weight.
  8. cost is object base cost, in zorkmids.
  9. sdam means how much object deals damage to small monsters.
  10. ldam means how much object deals damage to large monsters.
  11. oc1 is to-hit bonus for weapons or base AC for armor
  12. oc2 is MC level for armor or spell level for spellbooks
  13. nut is nutrition gained when the object is eaten.
  14. color is the object color, as used in the TTY windowport.
NEARDATA struct objdescr obj_descr[] = {
#else
/* second pass -- object definitions */

# define BITS(nmkn,mrg,uskn,ctnr,mgc,chrg,uniq,nwsh,big,tuf,dir,sub,mtrl) \
	nmkn,mrg,uskn,0,mgc,chrg,uniq,nwsh,big,tuf,dir,mtrl,sub /* SCO ODT 1.1 cpp fodder */

The BITS macro. Each of the first 10 values is either 1 or 0.

  1. nmkn tells whether to use the object description or the object real name by default. (See the OBJ macro, above)
  2. mrg tells whether the object can be merged with similar objects or not.
  3. uskn "uses known"
  4. ctnr tells if the object is pre-discovered, ie. known at the start of the game.
  5. mgc tells whether the object is inherently magical or not.
  6. chrg tells whether the object has charges.
  7. uniq tells if the object is unique.
  8. nwsh tells whether player can wish for the object or not.
  9. big tells whether weapon or tool is bimanual, or whether armor is bulky.
  10. tuf whether gems are hard or soft.
  11. dir takes either NODIR, IMMEDIATE or RAY, and defines how wands behave when zapped.
  12. sub armor subtype (as defined in objclass.h) or skills of weapons, spellbooks, tools or gems.
  13. mtrl takes one of the material definitions, eg. LEATHER or IRON, as defined in objclass.h
# define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \
	{0, 0, (char *)0, bits, prp, sym, dly, COLOR_FIELD(color) \
	 prob, wt, cost, sdam, ldam, oc1, oc2, nut}
# ifndef lint
#  define HARDGEM(n) (n >= 8)
# else
#  define HARDGEM(n) (0)
# endif

NEARDATA struct objclass objects[] = {
#endif
/* dummy object[0] -- description [2nd arg] *must* be NULL */
	OBJECT(OBJ("strange object",(char *)0), BITS(1,0,0,0,0,0,0,0,0,0,0,P_NONE,0),
			0, ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),

Weapons

Weapon macros

/* weapons ... */
#define WEAPON(name,app,kn,mg,bi,prob,wt,cost,sdam,ldam,hitbon,typ,sub,metal,color) \
	OBJECT( \
		OBJ(name,app), BITS(kn,mg,1,0,0,1,0,0,bi,0,typ,sub,metal), 0, \
		WEAPON_CLASS, prob, 0, \
		wt, cost, sdam, ldam, hitbon, 0, wt, color )


  1. name is the weapon name.
  2. app is the weapon's appearance.
  3. kn denotes if appearance is the same as the name.
  4. mg denotes stackability.
  5. bi is set to 1 if it is a two-handed weapon.
  6. prob is the item's random generation probability.
  7. wt is the weapon's weight.
  8. cost is the weapon's base price.
  9. sdam is the damage against small creatures.
  10. ldam is damage against large creatures.
  11. hitbon is the weapon's intrinsic bonus to hit.
  12. typ is the weapon's damage type.
  13. sub is the weapon's subtype (related proficiency).
  14. metal is the material the weapon is made out of.
  15. color is the colour when displayed on the screen.


#define PROJECTILE(name,app,kn,prob,wt,cost,sdam,ldam,hitbon,metal,sub,color) \
	OBJECT( \
		OBJ(name,app), \
		BITS(kn,1,1,0,0,1,0,0,0,0,PIERCE,sub,metal), 0, \
		WEAPON_CLASS, prob, 0, \
		wt, cost, sdam, ldam, hitbon, 0, wt, color )
#define BOW(name,app,kn,prob,wt,cost,hitbon,metal,sub,color) \
	OBJECT( \
		OBJ(name,app), BITS(kn,0,1,0,0,1,0,0,0,0,0,sub,metal), 0, \
		WEAPON_CLASS, prob, 0, \
		wt, cost, 2, 2, hitbon, 0, wt, color )

/* Note: for weapons that don't do an even die of damage (ex. 2-7 or 3-18)
* the extra damage is added on in weapon.c, not here! */

#define P PIERCE
#define S SLASH
#define B WHACK

Projectiles

/* missiles */
PROJECTILE("arrow", (char *)0,
		1, 55, 1, 2, 6, 6, 0, IRON, -P_BOW, HI_METAL),
PROJECTILE("elven arrow", "runed arrow",
		0, 20, 1, 2, 7, 6, 0, WOOD, -P_BOW, HI_WOOD),
PROJECTILE("orcish arrow", "crude arrow",
		0, 20, 1, 2, 5, 6, 0, IRON, -P_BOW, CLR_BLACK),
PROJECTILE("silver arrow", (char *)0,
		1, 12, 1, 5, 6, 6, 0, SILVER, -P_BOW, HI_SILVER),
PROJECTILE("ya", "bamboo arrow",
		0, 15, 1, 4, 7, 7, 1, METAL, -P_BOW, HI_METAL),
PROJECTILE("crossbow bolt", (char *)0,
		1, 55, 1, 2, 4, 6, 0, IRON, -P_CROSSBOW, HI_METAL),

WEAPON("dart", (char *)0,
	1, 1, 0, 60,  1,  2,  3,  2, 0, P,   -P_DART, IRON, HI_METAL),
WEAPON("shuriken", "throwing star",
	0, 1, 0, 35,  1,  5,  8,  6, 2, P,   -P_SHURIKEN, IRON, HI_METAL),
WEAPON("boomerang", (char *)0,
	1, 1, 0, 15,  5, 20,  9,  9, 0, 0,   -P_BOOMERANG, WOOD, HI_WOOD),

Spears

/* spears */
WEAPON("spear", (char *)0,
	1, 1, 0, 50, 30,  3,  6,  8, 0, P,   P_SPEAR, IRON, HI_METAL),
WEAPON("elven spear", "runed spear",
	0, 1, 0, 10, 30,  3,  7,  8, 0, P,   P_SPEAR, WOOD, HI_WOOD),
WEAPON("orcish spear", "crude spear",
	0, 1, 0, 13, 30,  3,  5,  8, 0, P,   P_SPEAR, IRON, CLR_BLACK),
WEAPON("dwarvish spear", "stout spear",
	0, 1, 0, 12, 35,  3,  8,  8, 0, P,   P_SPEAR, IRON, HI_METAL),
WEAPON("silver spear", (char *)0,
	1, 1, 0,  2, 36, 40,  6,  8, 0, P,   P_SPEAR, SILVER, HI_SILVER),
WEAPON("javelin", "throwing spear",
	0, 1, 0, 10, 20,  3,  6,  6, 0, P,   P_JAVELIN, IRON, HI_METAL),

WEAPON("trident", (char *)0,
	1, 0, 0,  8, 25,  5,  6,  4, 0, P,   P_TRIDENT, IRON, HI_METAL),
						/* +1 small, +2d4 large */

Blades

/* blades */
WEAPON("dagger", (char *)0,
	1, 1, 0, 30, 10,  4,  4,  3, 2, P,   P_DAGGER, IRON, HI_METAL),
WEAPON("elven dagger", "runed dagger",
	0, 1, 0, 10, 10,  4,  5,  3, 2, P,   P_DAGGER, WOOD, HI_WOOD),
WEAPON("orcish dagger", "crude dagger",
	0, 1, 0, 12, 10,  4,  3,  3, 2, P,   P_DAGGER, IRON, CLR_BLACK),
WEAPON("silver dagger", (char *)0,
	1, 1, 0,  3, 12, 40,  4,  3, 2, P,   P_DAGGER, SILVER, HI_SILVER),
WEAPON("athame", (char *)0,
	1, 1, 0,  0, 10,  4,  4,  3, 2, S,   P_DAGGER, IRON, HI_METAL),
WEAPON("scalpel", (char *)0,
	1, 1, 0,  0,  5,  6,  3,  3, 2, S,   P_KNIFE, METAL, HI_METAL),
WEAPON("knife", (char *)0,
	1, 1, 0, 20,  5,  4,  3,  2, 0, P|S, P_KNIFE, IRON, HI_METAL),
WEAPON("stiletto", (char *)0,
	1, 1, 0,  5,  5,  4,  3,  2, 0, P|S, P_KNIFE, IRON, HI_METAL),
WEAPON("worm tooth", (char *)0,
	1, 0, 0,  0, 20,  2,  2,  2, 0, 0,   P_KNIFE, 0, CLR_WHITE),
WEAPON("crysknife", (char *)0,
	1, 0, 0,  0, 20,100, 10, 10, 3, P,   P_KNIFE, MINERAL, CLR_WHITE),

WEAPON("axe", (char *)0,
	1, 0, 0, 40, 60,  8,  6,  4, 0, S,   P_AXE, IRON, HI_METAL),
WEAPON("battle-axe", "double-headed axe",
	0, 0, 1, 10,120, 40,  8,  6, 0, S,   P_AXE, IRON, HI_METAL),
						/* "double-bitted" ? */

Swords

/* swords */
WEAPON("short sword", (char *)0,
	1, 0, 0,  8, 30, 10,  6,  8, 0, P,   P_SHORT_SWORD, IRON, HI_METAL),
WEAPON("elven short sword", "runed short sword",
	0, 0, 0,  2, 30, 10,  8,  8, 0, P,   P_SHORT_SWORD, WOOD, HI_WOOD),
WEAPON("orcish short sword", "crude short sword",
	0, 0, 0,  3, 30, 10,  5,  8, 0, P,   P_SHORT_SWORD, IRON, CLR_BLACK),
WEAPON("dwarvish short sword", "broad short sword",
	0, 0, 0,  2, 30, 10,  7,  8, 0, P,   P_SHORT_SWORD, IRON, HI_METAL),
WEAPON("scimitar", "curved sword",
	0, 0, 0, 15, 40, 15,  8,  8, 0, S,   P_SCIMITAR, IRON, HI_METAL),
WEAPON("silver saber", (char *)0,
	1, 0, 0,  6, 40, 75,  8,  8, 0, S,   P_SABER, SILVER, HI_SILVER),
WEAPON("broadsword", (char *)0,
	1, 0, 0,  8, 70, 10,  4,  6, 0, S,   P_BROAD_SWORD, IRON, HI_METAL),
						/* +d4 small, +1 large */
WEAPON("elven broadsword", "runed broadsword",
	0, 0, 0,  4, 70, 10,  6,  6, 0, S,   P_BROAD_SWORD, WOOD, HI_WOOD),
						/* +d4 small, +1 large */
WEAPON("long sword", (char *)0,
	1, 0, 0, 50, 40, 15,  8, 12, 0, S,   P_LONG_SWORD, IRON, HI_METAL),
WEAPON("two-handed sword", (char *)0,
	1, 0, 1, 22,150, 50, 12,  6, 0, S,   P_TWO_HANDED_SWORD, IRON, HI_METAL),
						/* +2d6 large */
WEAPON("katana", "samurai sword",
	0, 0, 0,  4, 40, 80, 10, 12, 1, S,   P_LONG_SWORD, IRON, HI_METAL),
/* special swords set up for artifacts */
WEAPON("tsurugi", "long samurai sword",
	0, 0, 1,  0, 60,500, 16,  8, 2, S,   P_TWO_HANDED_SWORD, METAL, HI_METAL),
						/* +2d6 large */
WEAPON("runesword", "runed broadsword",
	0, 0, 0,  0, 40,300,  4,  6, 0, S,   P_BROAD_SWORD, IRON, CLR_BLACK),
						/* +d4 small, +1 large */
						/* +5d2 +d8 from level drain */

Polearms

/* polearms */
/* spear-type */
WEAPON("partisan", "vulgar polearm",
	0, 0, 1,  5, 80, 10,  6,  6, 0, P,   P_POLEARMS, IRON, HI_METAL),
						/* +1 large */
WEAPON("ranseur", "hilted polearm",
	0, 0, 1,  5, 50,  6,  4,  4, 0, P,   P_POLEARMS, IRON, HI_METAL),
						/* +d4 both */
WEAPON("spetum", "forked polearm",
	0, 0, 1,  5, 50,  5,  6,  6, 0, P,   P_POLEARMS, IRON, HI_METAL),
						/* +1 small, +d6 large */
WEAPON("glaive", "single-edged polearm",
	0, 0, 1,  8, 75,  6,  6, 10, 0, S,   P_POLEARMS, IRON, HI_METAL),
WEAPON("lance", (char *)0,
	1, 0, 0,  4,180, 10,  6,  8, 0, P,   P_LANCE, IRON, HI_METAL),
/* axe-type */
WEAPON("halberd", "angled poleaxe",
	0, 0, 1,  8,150, 10, 10,  6, 0, P|S, P_POLEARMS, IRON, HI_METAL),
						/* +1d6 large */
WEAPON("bardiche", "long poleaxe",
	0, 0, 1,  4,120,  7,  4,  4, 0, S,   P_POLEARMS, IRON, HI_METAL),
						/* +1d4 small, +2d4 large */
WEAPON("voulge", "pole cleaver",
	0, 0, 1,  4,125,  5,  4,  4, 0, S,   P_POLEARMS, IRON, HI_METAL),
						/* +d4 both */
WEAPON("dwarvish mattock", "broad pick",
	0, 0, 1, 13,120, 50, 12,  8,-1, B,   P_PICK_AXE, IRON, HI_METAL),

/* curved/hooked */
WEAPON("fauchard", "pole sickle",
	0, 0, 1,  6, 60,  5,  6,  8, 0, P|S, P_POLEARMS, IRON, HI_METAL),
WEAPON("guisarme", "pruning hook",
	0, 0, 1,  6, 80,  5,  4,  8, 0, S,   P_POLEARMS, IRON, HI_METAL),
						/* +1d4 small */
WEAPON("bill-guisarme", "hooked polearm",
	0, 0, 1,  4,120,  7,  4, 10, 0, P|S, P_POLEARMS, IRON, HI_METAL),
						/* +1d4 small */
/* other */
WEAPON("lucern hammer", "pronged polearm",
	0, 0, 1,  5,150,  7,  4,  6, 0, B|P, P_POLEARMS, IRON, HI_METAL),
						/* +1d4 small */
WEAPON("bec de corbin", "beaked polearm",
	0, 0, 1,  4,100,  8,  8,  6, 0, B|P, P_POLEARMS, IRON, HI_METAL),

Bludgeoning weapons

/* bludgeons */
WEAPON("mace", (char *)0,
	1, 0, 0, 40, 30,  5,  6,  6, 0, B,   P_MACE, IRON, HI_METAL),
						/* +1 small */
WEAPON("morning star", (char *)0,
	1, 0, 0, 12,120, 10,  4,  6, 0, B,   P_MORNING_STAR, IRON, HI_METAL),
						/* +d4 small, +1 large */
WEAPON("war hammer", (char *)0,
	1, 0, 0, 15, 50,  5,  4,  4, 0, B,   P_HAMMER, IRON, HI_METAL),
						/* +1 small */
WEAPON("club", (char *)0,
	1, 0, 0, 12, 30,  3,  6,  3, 0, B,   P_CLUB, WOOD, HI_WOOD),
#ifdef KOPS
WEAPON("rubber hose", (char *)0,
	1, 0, 0,  0, 20,  3,  4,  3, 0, B,   P_WHIP, PLASTIC, CLR_BROWN),
#endif
WEAPON("quarterstaff", "staff",
	0, 0, 1, 11, 40,  5,  6,  6, 0, B,   P_QUARTERSTAFF, WOOD, HI_WOOD),
/* two-piece */
WEAPON("aklys", "thonged club",
	0, 0, 0,  8, 15,  4,  6,  3, 0, B,   P_CLUB, IRON, HI_METAL),
WEAPON("flail", (char *)0,
	1, 0, 0, 40, 15,  4,  6,  4, 0, B,   P_FLAIL, IRON, HI_METAL),
						/* +1 small, +1d4 large */

Miscellaneous weaponry

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

/* bows */
BOW("bow", (char *)0,		1, 24, 30, 60, 0, WOOD, P_BOW, HI_WOOD),
BOW("elven bow", "runed bow",	0, 12, 30, 60, 0, WOOD, P_BOW, HI_WOOD),
BOW("orcish bow", "crude bow",	0, 12, 30, 60, 0, WOOD, P_BOW, CLR_BLACK),
BOW("yumi", "long bow",		0,  0, 30, 60, 0, WOOD, P_BOW, HI_WOOD),
BOW("sling", (char *)0,		1, 40,  3, 20, 0, LEATHER, P_SLING, HI_LEATHER),
BOW("crossbow", (char *)0,	1, 45, 50, 40, 0, WOOD, P_CROSSBOW, HI_WOOD),

#undef P
#undef S
#undef B

#undef WEAPON
#undef PROJECTILE
#undef BOW

Armor

Armor macros

The comment about copper is actually false: both copper and iron corrodes in nethack.

/* armor ... */
/* IRON denotes ferrous metals, including steel.
* Only IRON weapons and armor can rust.
* Only COPPER (including brass) corrodes.
* Some creatures are vulnerable to SILVER.
*/
#define ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,sub,metal,c) \
	OBJECT( \
		OBJ(name,desc), BITS(kn,0,1,0,mgc,1,0,0,blk,0,0,sub,metal), power, \
		ARMOR_CLASS, prob, delay, wt, cost, \
		0, 0, 10 - ac, can, wt, c )
#define HELM(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \
	ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_HELM,metal,c)
#define CLOAK(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \
	ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_CLOAK,metal,c)
#define SHIELD(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,metal,c) \
	ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,ARM_SHIELD,metal,c)
#define GLOVES(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \
	ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_GLOVES,metal,c)
#define BOOTS(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \
	ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_BOOTS,metal,c)

Helmets

/* helmets */
HELM("elven leather helm", "leather hat",
		0, 0,  0,	6, 1,  3,   8, 9, 0, LEATHER, HI_LEATHER),
HELM("orcish helm", "iron skull cap",
		0, 0,  0,	6, 1, 30,  10, 9, 0, IRON, CLR_BLACK),
HELM("dwarvish iron helm", "hard hat",
		0, 0,  0,	6, 1, 40,  20, 8, 0, IRON, HI_METAL),
HELM("fedora", (char *)0,
		1, 0,  0,	0, 0,  3,   1,10, 0, CLOTH, CLR_BROWN),
HELM("cornuthaum", "conical hat",
		0, 1,  CLAIRVOYANT,
				3, 1,  4,  80,10, 2, CLOTH, CLR_BLUE),
HELM("dunce cap", "conical hat",
		0, 1,  0,	3, 1,  4,   1,10, 0, CLOTH, CLR_BLUE),
HELM("dented pot", (char *)0,
		1, 0,  0,	2, 0, 10,   8, 9, 0, IRON, CLR_BLACK),
/* With shuffled appearances... */
HELM("helmet", "plumed helmet",
		0, 0,  0,      10, 1, 30,  10, 9, 0, IRON, HI_METAL),
HELM("helm of brilliance", "etched helmet",
		0, 1,  0,	6, 1, 50,  50, 9, 0, IRON, CLR_GREEN),
HELM("helm of opposite alignment", "crested helmet",
		0, 1,  0,	6, 1, 50,  50, 9, 0, IRON, HI_METAL),
HELM("helm of telepathy", "visored helmet",
		0, 1,  TELEPAT, 2, 1, 50,  50, 9, 0, IRON, HI_METAL),

Body armor

/* suits of armor */
/*
* There is code in polyself.c that assumes (1) and (2).
* There is code in obj.h, objnam.c, mon.c, read.c that assumes (2).
*
*	(1) The dragon scale mails and the dragon scales are together.
*	(2) That the order of the dragon scale mail and dragon scales is the
*	    the same defined in monst.c.
*/
#define DRGN_ARMR(name,mgc,power,cost,ac,color) \
	ARMOR(name,(char *)0,1,mgc,1,power,0,5,40,cost,ac,0,ARM_SUIT,DRAGON_HIDE,color)
/* 3.4.1: dragon scale mail reclassified as "magic" since magic is
needed to create them */
DRGN_ARMR("gray dragon scale mail",   1, ANTIMAGIC,  1200, 1, CLR_GRAY),
DRGN_ARMR("silver dragon scale mail", 1, REFLECTING, 1200, 1, DRAGON_SILVER),
#if 0	/* DEFERRED */
DRGN_ARMR("shimmering dragon scale mail", 1, DISPLACED, 1200, 1, CLR_CYAN),
#endif
DRGN_ARMR("red dragon scale mail",    1, FIRE_RES,    900, 1, CLR_RED),
DRGN_ARMR("white dragon scale mail",  1, COLD_RES,    900, 1, CLR_WHITE),
DRGN_ARMR("orange dragon scale mail", 1, SLEEP_RES,   900, 1, CLR_ORANGE),
DRGN_ARMR("black dragon scale mail",  1, DISINT_RES, 1200, 1, CLR_BLACK),
DRGN_ARMR("blue dragon scale mail",   1, SHOCK_RES,   900, 1, CLR_BLUE),
DRGN_ARMR("green dragon scale mail",  1, POISON_RES,  900, 1, CLR_GREEN),
DRGN_ARMR("yellow dragon scale mail", 1, ACID_RES,    900, 1, CLR_YELLOW),

/* For now, only dragons leave these. */
/* 3.4.1: dragon scales left classified as "non-magic"; they confer
magical properties but are produced "naturally" */
DRGN_ARMR("gray dragon scales",   0, ANTIMAGIC,  700, 7, CLR_GRAY),
DRGN_ARMR("silver dragon scales", 0, REFLECTING, 700, 7, DRAGON_SILVER),
#if 0	/* DEFERRED */
DRGN_ARMR("shimmering dragon scales", 0, DISPLACED,  700, 7, CLR_CYAN),
#endif
DRGN_ARMR("red dragon scales",    0, FIRE_RES,   500, 7, CLR_RED),
DRGN_ARMR("white dragon scales",  0, COLD_RES,   500, 7, CLR_WHITE),
DRGN_ARMR("orange dragon scales", 0, SLEEP_RES,  500, 7, CLR_ORANGE),
DRGN_ARMR("black dragon scales",  0, DISINT_RES, 700, 7, CLR_BLACK),
DRGN_ARMR("blue dragon scales",   0, SHOCK_RES,  500, 7, CLR_BLUE),
DRGN_ARMR("green dragon scales",  0, POISON_RES, 500, 7, CLR_GREEN),
DRGN_ARMR("yellow dragon scales", 0, ACID_RES,   500, 7, CLR_YELLOW),
#undef DRGN_ARMR

ARMOR("plate mail", (char *)0,
	1, 0, 1, 0,	44, 5, 450, 600,  3, 2, ARM_SUIT, IRON, HI_METAL),
ARMOR("crystal plate mail", (char *)0,
	1, 0, 1, 0,	10, 5, 450, 820,  3, 2, ARM_SUIT, GLASS, CLR_WHITE),
#ifdef TOURIST
ARMOR("bronze plate mail", (char *)0,
	1, 0, 1, 0,	25, 5, 450, 400,  4, 0, ARM_SUIT, COPPER, HI_COPPER),
#else
ARMOR("bronze plate mail", (char *)0,
	1, 0, 1, 0,	35, 5, 450, 400,  4, 0, ARM_SUIT, COPPER, HI_COPPER),
#endif
ARMOR("splint mail", (char *)0,
	1, 0, 1, 0,	62, 5, 400,  80,  4, 1, ARM_SUIT, IRON, HI_METAL),
ARMOR("banded mail", (char *)0,
	1, 0, 1, 0,	72, 5, 350,  90,  4, 0, ARM_SUIT, IRON, HI_METAL),
ARMOR("dwarvish mithril-coat", (char *)0,
	1, 0, 0, 0,	10, 1, 150, 240,  4, 3, ARM_SUIT, MITHRIL, HI_METAL),
ARMOR("elven mithril-coat", (char *)0,
	1, 0, 0, 0,	15, 1, 150, 240,  5, 3, ARM_SUIT, MITHRIL, HI_METAL),
ARMOR("chain mail", (char *)0,
	1, 0, 0, 0,	72, 5, 300,  75,  5, 1, ARM_SUIT, IRON, HI_METAL),
ARMOR("orcish chain mail", "crude chain mail",
	0, 0, 0, 0,	20, 5, 300,  75,  6, 1, ARM_SUIT, IRON, CLR_BLACK),
ARMOR("scale mail", (char *)0,
	1, 0, 0, 0,	72, 5, 250,  45,  6, 0, ARM_SUIT, IRON, HI_METAL),
ARMOR("studded leather armor", (char *)0,
	1, 0, 0, 0,	72, 3, 200,  15,  7, 1, ARM_SUIT, LEATHER, HI_LEATHER),
ARMOR("ring mail", (char *)0,
	1, 0, 0, 0,	72, 5, 250, 100,  7, 0, ARM_SUIT, IRON, HI_METAL),
ARMOR("orcish ring mail", "crude ring mail",
	0, 0, 0, 0,	20, 5, 250,  80,  8, 1, ARM_SUIT, IRON, CLR_BLACK),
ARMOR("leather armor", (char *)0,
	1, 0, 0, 0,	82, 3, 150,   5,  8, 0, ARM_SUIT, LEATHER, HI_LEATHER),
ARMOR("leather jacket", (char *)0,
	1, 0, 0, 0,	12, 0,	30,  10,  9, 0, ARM_SUIT, LEATHER, CLR_BLACK),

#ifdef TOURIST
/* shirts */
ARMOR("Hawaiian shirt", (char *)0,
	1, 0, 0, 0,	 8, 0,	 5,   3, 10, 0, ARM_SHIRT, CLOTH, CLR_MAGENTA),
ARMOR("T-shirt", (char *)0,
	1, 0, 0, 0,	 2, 0,	 5,   2, 10, 0, ARM_SHIRT, CLOTH, CLR_WHITE),
#endif

Cloaks

/* cloaks */
/*  'cope' is not a spelling mistake... leave it be */
CLOAK("mummy wrapping", (char *)0,
		1, 0,	0,	    0, 0,  3,  2, 10, 1, CLOTH, CLR_GRAY),
CLOAK("elven cloak", "faded pall",
		0, 1,	STEALTH,    8, 0, 10, 60,  9, 3, CLOTH, CLR_BLACK),
CLOAK("orcish cloak", "coarse mantelet",
		0, 0,	0,	    8, 0, 10, 40, 10, 2, CLOTH, CLR_BLACK),
CLOAK("dwarvish cloak", "hooded cloak",
		0, 0,	0,	    8, 0, 10, 50, 10, 2, CLOTH, HI_CLOTH),
CLOAK("oilskin cloak", "slippery cloak",
		0, 0,	0,	    8, 0, 10, 50,  9, 3, CLOTH, HI_CLOTH),
CLOAK("robe", (char *)0,
		1, 1,	0,	    3, 0, 15, 50,  8, 3, CLOTH, CLR_RED),
CLOAK("alchemy smock", "apron",
		0, 1,	POISON_RES, 9, 0, 10, 50,  9, 1, CLOTH, CLR_WHITE),
CLOAK("leather cloak", (char *)0,
		1, 0,	0,	    8, 0, 15, 40,  9, 1, LEATHER, CLR_BROWN),
/* With shuffled appearances... */
CLOAK("cloak of protection", "tattered cape",
		0, 1,	PROTECTION, 9, 0, 10, 50,  7, 3, CLOTH, HI_CLOTH),
CLOAK("cloak of invisibility", "opera cloak",
		0, 1,	INVIS,	   10, 0, 10, 60,  9, 2, CLOTH, CLR_BRIGHT_MAGENTA),
CLOAK("cloak of magic resistance", "ornamental cope",
		0, 1,	ANTIMAGIC,  2, 0, 10, 60,  9, 3, CLOTH, CLR_WHITE),
CLOAK("cloak of displacement", "piece of cloth",
		0, 1,	DISPLACED, 10, 0, 10, 50,  9, 2, CLOTH, HI_CLOTH),

Shields

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

Gloves

/* gloves */
/* these have their color but not material shuffled, so the IRON must stay
* CLR_BROWN (== HI_LEATHER)
*/
GLOVES("leather gloves", "old gloves",
		0, 0,  0,	  16, 1, 10,  8,  9, 0, LEATHER, HI_LEATHER),
GLOVES("gauntlets of fumbling", "padded gloves",
		0, 1,  FUMBLING,   8, 1, 10, 50,  9, 0, LEATHER, HI_LEATHER),
GLOVES("gauntlets of power", "riding gloves",
		0, 1,  0,	   8, 1, 30, 50,  9, 0, IRON, CLR_BROWN),
GLOVES("gauntlets of dexterity", "fencing gloves",
		0, 1,  0,	   8, 1, 10, 50,  9, 0, LEATHER, HI_LEATHER),

Boots

/* boots */
BOOTS("low boots", "walking shoes",
		0, 0,  0,	  25, 2, 10,  8,  9, 0, LEATHER, HI_LEATHER),
BOOTS("iron shoes", "hard shoes",
		0, 0,  0,	   7, 2, 50, 16,  8, 0, IRON, HI_METAL),
BOOTS("high boots", "jackboots",
		0, 0,  0,	  15, 2, 20, 12,  8, 0, LEATHER, HI_LEATHER),
/* With shuffled appearances... */
BOOTS("speed boots", "combat boots",
		0, 1,  FAST,	  12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),
BOOTS("water walking boots", "jungle boots",
		0, 1,  WWALKING,  12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),
BOOTS("jumping boots", "hiking boots",
		0, 1,  JUMPING,   12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),
BOOTS("elven boots", "mud boots",
		0, 1,  STEALTH,   12, 2, 15,  8,  9, 0, LEATHER, HI_LEATHER),
BOOTS("kicking boots", "buckled boots",
		0, 1,  0,         12, 2, 15,  8,  9, 0, IRON, CLR_BROWN),
BOOTS("fumble boots", "riding boots",
		0, 1,  FUMBLING,  12, 2, 20, 30,  9, 0, LEATHER, HI_LEATHER),
BOOTS("levitation boots", "snow boots",
		0, 1,  LEVITATION,12, 2, 15, 30,  9, 0, LEATHER, HI_LEATHER),
#undef HELM
#undef CLOAK
#undef SHIELD
#undef GLOVES
#undef BOOTS
#undef ARMOR

Rings

/* rings ... */
#define RING(name,power,stone,cost,mgc,spec,mohs,metal,color) OBJECT( \
		OBJ(name,stone), \
		BITS(0,0,spec,0,mgc,spec,0,0,0,HARDGEM(mohs),0,P_NONE,metal), \
		power, RING_CLASS, 0, 0, 3, cost, 0, 0, 0, 0, 15, color )
RING("adornment", ADORNED, "wooden",        100, 1, 1, 2, WOOD, HI_WOOD),
RING("gain strength", 0, "granite",         150, 1, 1, 7, MINERAL, HI_MINERAL),
RING("gain constitution", 0, "opal",        150, 1, 1, 7, MINERAL,  HI_MINERAL),
RING("increase accuracy", 0, "clay",        150, 1, 1, 4, MINERAL, CLR_RED),
RING("increase damage", 0, "coral",         150, 1, 1, 4, MINERAL, CLR_ORANGE),
RING("protection", PROTECTION, "black onyx",100, 1, 1, 7, MINERAL, CLR_BLACK),
RING("regeneration", REGENERATION, "moonstone",
					    200, 1, 0, 6, MINERAL, HI_MINERAL),
RING("searching", SEARCHING, "tiger eye",   200, 1, 0, 6, GEMSTONE, CLR_BROWN),
RING("stealth", STEALTH, "jade",            100, 1, 0, 6, GEMSTONE, CLR_GREEN),
RING("sustain ability", FIXED_ABIL, "bronze",
					    100, 1, 0, 4, COPPER, HI_COPPER),
RING("levitation", LEVITATION, "agate",     200, 1, 0, 7, GEMSTONE, CLR_RED),
RING("hunger", HUNGER, "topaz",             100, 1, 0, 8, GEMSTONE, CLR_CYAN),
RING("aggravate monster", AGGRAVATE_MONSTER, "sapphire",
					    150, 1, 0, 9, GEMSTONE, CLR_BLUE),
RING("conflict", CONFLICT, "ruby",          300, 1, 0, 9, GEMSTONE, CLR_RED),
RING("warning", WARNING, "diamond",         100, 1, 0,10, GEMSTONE, CLR_WHITE),
RING("poison resistance", POISON_RES, "pearl",
					    150, 1, 0, 4, IRON, CLR_WHITE),
RING("fire resistance", FIRE_RES, "iron",   200, 1, 0, 5, IRON, HI_METAL),
RING("cold resistance", COLD_RES, "brass",  150, 1, 0, 4, COPPER, HI_COPPER),
RING("shock resistance", SHOCK_RES, "copper",
					    150, 1, 0, 3, COPPER, HI_COPPER),
RING("free action",     FREE_ACTION, "twisted",
					    200, 1, 0, 6, IRON, HI_METAL),
RING("slow digestion",  SLOW_DIGESTION, "steel",
					    200, 1, 0, 8, IRON, HI_METAL),
RING("teleportation", TELEPORT, "silver",   200, 1, 0, 3, SILVER, HI_SILVER),
RING("teleport control", TELEPORT_CONTROL, "gold",
					    300, 1, 0, 3, GOLD, HI_GOLD),
RING("polymorph", POLYMORPH, "ivory",       300, 1, 0, 4, BONE, CLR_WHITE),
RING("polymorph control", POLYMORPH_CONTROL, "emerald",
					    300, 1, 0, 8, GEMSTONE, CLR_BRIGHT_GREEN),
RING("invisibility", INVIS, "wire",         150, 1, 0, 5, IRON, HI_METAL),
RING("see invisible", SEE_INVIS, "engagement",
					    150, 1, 0, 5, IRON, HI_METAL),
RING("protection from shape changers", PROT_FROM_SHAPE_CHANGERS, "shiny",
					    100, 1, 0, 5, IRON, CLR_BRIGHT_CYAN),
#undef RING

Amulets

/* amulets ... - THE Amulet comes last because it is special */
#define AMULET(name,desc,power,prob) OBJECT( \
		OBJ(name,desc), BITS(0,0,0,0,1,0,0,0,0,0,0,P_NONE,IRON), power, \
		AMULET_CLASS, prob, 0, 20, 150, 0, 0, 0, 0, 20, HI_METAL )

AMULET("amulet of ESP",           "circular",   TELEPAT,    175),
AMULET("amulet of life saving",   "spherical",  LIFESAVED,   75),
AMULET("amulet of strangulation", "oval",       STRANGLED,  135),
AMULET("amulet of restful sleep", "triangular", SLEEPING,   135),
AMULET("amulet versus poison",    "pyramidal",  POISON_RES, 165),
AMULET("amulet of change",        "square",     0,          130),
						/* POLYMORPH */
AMULET("amulet of unchanging",    "concave",    UNCHANGING,	 45),
AMULET("amulet of reflection",    "hexagonal",  REFLECTING,  75),
AMULET("amulet of magical breathing", "octagonal",      MAGICAL_BREATHING, 65),
OBJECT(OBJ("cheap plastic imitation of the Amulet of Yendor",
	"Amulet of Yendor"), BITS(0,0,1,0,0,0,0,0,0,0,0,0,PLASTIC), 0,
	AMULET_CLASS, 0, 0, 20,    0, 0, 0, 0, 0,  1, HI_METAL),
OBJECT(OBJ("Amulet of Yendor",	/* note: description == name */
	"Amulet of Yendor"), BITS(0,0,1,0,1,0,1,1,0,0,0,0,MITHRIL), 0,
	AMULET_CLASS, 0, 0, 20, 30000, 0, 0, 0, 0, 20, HI_METAL),
#undef AMULET

Tools

/* tools ... */
/* tools with weapon characteristics come last */
#define TOOL(name,desc,kn,mrg,mgc,chg,prob,wt,cost,mat,color) \
	OBJECT( OBJ(name,desc), \
		BITS(kn,mrg,chg,0,mgc,chg,0,0,0,0,0,P_NONE,mat), \
		0, TOOL_CLASS, prob, 0, \
		wt, cost, 0, 0, 0, 0, wt, color )
#define CONTAINER(name,desc,kn,mgc,chg,prob,wt,cost,mat,color) \
	OBJECT( OBJ(name,desc), \
		BITS(kn,0,chg,1,mgc,chg,0,0,0,0,0,P_NONE,mat), \
		0, TOOL_CLASS, prob, 0, \
		wt, cost, 0, 0, 0, 0, wt, color )
#define WEPTOOL(name,desc,kn,mgc,bi,prob,wt,cost,sdam,ldam,hitbon,sub,mat,clr) \
	OBJECT( OBJ(name,desc), \
		BITS(kn,0,1,0,mgc,1,0,0,bi,0,hitbon,sub,mat), \
		0, TOOL_CLASS, prob, 0, \
		wt, cost, sdam, ldam, hitbon, 0, wt, clr )
/* containers */
CONTAINER("large box", (char *)0,       1, 0, 0,  40,350,   8, WOOD, HI_WOOD),
CONTAINER("chest", (char *)0,           1, 0, 0,  35,600,  16, WOOD, HI_WOOD),
CONTAINER("ice box", (char *)0,         1, 0, 0,   5,900,  42, PLASTIC, CLR_WHITE),
CONTAINER("sack", "bag",                0, 0, 0,  35, 15,   2, CLOTH, HI_CLOTH),
CONTAINER("oilskin sack", "bag",        0, 0, 0,   5, 15, 100, CLOTH, HI_CLOTH),
CONTAINER("bag of holding", "bag",      0, 1, 0,  20, 15, 100, CLOTH, HI_CLOTH),
CONTAINER("bag of tricks", "bag",       0, 1, 1,  20, 15, 100, CLOTH, HI_CLOTH),
#undef CONTAINER

/* lock opening tools */
TOOL("skeleton key", "key",     0, 0, 0, 0,  80,  3,  10, IRON, HI_METAL),
#ifdef TOURIST
TOOL("lock pick", (char *)0,    1, 0, 0, 0,  60,  4,  20, IRON, HI_METAL),
TOOL("credit card", (char *)0,  1, 0, 0, 0,  15,  1,  10, PLASTIC, CLR_WHITE),
#else
TOOL("lock pick", (char *)0,    1, 0, 0, 0,  75,  4,  20, IRON, HI_METAL),
#endif
/* light sources */
TOOL("tallow candle", "candle", 0, 1, 0, 0,  20,  2,  10, WAX, CLR_WHITE),
TOOL("wax candle", "candle",    0, 1, 0, 0,   5,  2,  20, WAX, CLR_WHITE),
TOOL("brass lantern", (char *)0,1, 0, 0, 0,  30, 30,  12, COPPER, CLR_YELLOW),
TOOL("oil lamp", "lamp",        0, 0, 0, 0,  45, 20,  10, COPPER, CLR_YELLOW),
TOOL("magic lamp", "lamp",      0, 0, 1, 0,  15, 20,  50, COPPER, CLR_YELLOW),
/* other tools */
#ifdef TOURIST
TOOL("expensive camera", (char *)0,
				1, 0, 0, 1,  15, 12, 200, PLASTIC, CLR_BLACK),
TOOL("mirror", "looking glass", 0, 0, 0, 0,  45, 13,  10, GLASS, HI_SILVER),
#else
TOOL("mirror", "looking glass", 0, 0, 0, 0,  60, 13,  10, GLASS, HI_SILVER),
#endif
TOOL("crystal ball", "glass orb",
				0, 0, 1, 1,  15,150,  60, GLASS, HI_GLASS),
TOOL("lenses", (char *)0,	1, 0, 0, 0,   5,  3,  80, GLASS, HI_GLASS),
TOOL("blindfold", (char *)0,    1, 0, 0, 0,  50,  2,  20, CLOTH, CLR_BLACK),
TOOL("towel", (char *)0,        1, 0, 0, 0,  50,  2,  50, CLOTH, CLR_MAGENTA),
#ifdef STEED
TOOL("saddle", (char *)0,       1, 0, 0, 0,   5,200, 150, LEATHER, HI_LEATHER),
TOOL("leash", (char *)0,        1, 0, 0, 0,  65, 12,  20, LEATHER, HI_LEATHER),
#else
TOOL("leash", (char *)0,        1, 0, 0, 0,  70, 12,  20, LEATHER, HI_LEATHER),
#endif
TOOL("stethoscope", (char *)0,  1, 0, 0, 0,  25,  4,  75, IRON, HI_METAL),
TOOL("tinning kit", (char *)0,  1, 0, 0, 1,  15,100,  30, IRON, HI_METAL),
TOOL("tin opener", (char *)0,   1, 0, 0, 0,  35,  4,  30, IRON, HI_METAL),
TOOL("can of grease", (char *)0,1, 0, 0, 1,  15, 15,  20, IRON, HI_METAL),
TOOL("figurine", (char *)0,     1, 0, 1, 0,  25, 50,  80, MINERAL, HI_MINERAL),
TOOL("magic marker", (char *)0, 1, 0, 1, 1,  15,  2,  50, PLASTIC, CLR_RED),
/* traps */
TOOL("land mine",(char *)0,     1, 0, 0, 0,   0,300, 180, IRON, CLR_RED),
TOOL("beartrap", (char *)0,     1, 0, 0, 0,   0,200,  60, IRON, HI_METAL),
/* instruments */
TOOL("tin whistle", "whistle",  0, 0, 0, 0, 100,  3,  10, METAL, HI_METAL),
TOOL("magic whistle", "whistle",0, 0, 1, 0,  30,  3,  10, METAL, HI_METAL),
/* "If tin whistles are made out of tin, what do they make foghorns out of?" */
TOOL("wooden flute", "flute",   0, 0, 0, 0,   4,  5,  12, WOOD, HI_WOOD),
TOOL("magic flute", "flute",    0, 0, 1, 1,   2,  5,  36, WOOD, HI_WOOD),
TOOL("tooled horn", "horn",     0, 0, 0, 0,   5, 18,  15, BONE, CLR_WHITE),
TOOL("frost horn", "horn",      0, 0, 1, 1,   2, 18,  50, BONE, CLR_WHITE),
TOOL("fire horn", "horn",       0, 0, 1, 1,   2, 18,  50, BONE, CLR_WHITE),
TOOL("horn of plenty", "horn",  0, 0, 1, 1,   2, 18,  50, BONE, CLR_WHITE),
TOOL("wooden harp", "harp",     0, 0, 0, 0,   4, 30,  50, WOOD, HI_WOOD),
TOOL("magic harp", "harp",      0, 0, 1, 1,   2, 30,  50, WOOD, HI_WOOD),
TOOL("bell", (char *)0,         1, 0, 0, 0,   2, 30,  50, COPPER, HI_COPPER),
TOOL("bugle", (char *)0,        1, 0, 0, 0,   4, 10,  15, COPPER, HI_COPPER),
TOOL("leather drum", "drum",    0, 0, 0, 0,   4, 25,  25, LEATHER, HI_LEATHER),
TOOL("drum of earthquake", "drum",
				0, 0, 1, 1,   2, 25,  25, LEATHER, HI_LEATHER),
/* tools useful as weapons */
WEPTOOL("pick-axe", (char *)0,
	1, 0, 0, 20, 100,  50,	6,  3, WHACK,  P_PICK_AXE, IRON, HI_METAL),
WEPTOOL("grappling hook", "iron hook",
	0, 0, 0,  5,  30,  50,  2,  6, WHACK,  P_FLAIL, IRON, HI_METAL),
/* 3.4.1: unicorn horn left classified as "magic" */
WEPTOOL("unicorn horn", (char *)0,
	1, 1, 1,  0,  20, 100, 12, 12, PIERCE, P_UNICORN_HORN, BONE, CLR_WHITE),

/* two special unique artifact "tools" */
OBJECT(OBJ("Candelabrum of Invocation", "candelabrum"),
		BITS(0,0,1,0,1,0,1,1,0,0,0,P_NONE,GOLD), 0,
		TOOL_CLASS, 0, 0,10, 5000, 0, 0, 0, 0, 200, HI_GOLD),
OBJECT(OBJ("Bell of Opening", "silver bell"),
		BITS(0,0,1,0,1,1,1,1,0,0,0,P_NONE,SILVER), 0,
		TOOL_CLASS, 0, 0,10, 5000, 0, 0, 0, 0, 50, HI_SILVER),
#undef TOOL
#undef WEPTOOL

Comestibles

/* Comestibles ... */
#define FOOD(name,prob,delay,wt,unk,tin,nutrition,color) OBJECT( \
		OBJ(name,(char *)0), BITS(1,1,unk,0,0,0,0,0,0,0,0,P_NONE,tin), 0, \
		FOOD_CLASS, prob, delay, \
		wt, nutrition/20 + 5, 0, 0, 0, 0, nutrition, color )
/* all types of food (except tins & corpses) must have a delay of at least 1. */
/* delay on corpses is computed and is weight dependant */
/* dog eats foods 0-4 but prefers tripe rations above all others */
/* fortune cookies can be read */
/* carrots improve your vision */
/* +0 tins contain monster meat */
/* +1 tins (of spinach) make you stronger (like Popeye) */
/* food CORPSE is a cadaver of some type */
/* meatballs/sticks/rings are only created from objects via stone to flesh */

/* meat */
FOOD("tripe ration",       140, 2, 10, 0, FLESH, 200, CLR_BROWN),
FOOD("corpse",               0, 1,  0, 0, FLESH,   0, CLR_BROWN),
FOOD("egg",                 85, 1,  1, 1, FLESH,  80, CLR_WHITE),
FOOD("meatball",             0, 1,  1, 0, FLESH,   5, CLR_BROWN),
FOOD("meat stick",           0, 1,  1, 0, FLESH,   5, CLR_BROWN),
FOOD("huge chunk of meat",   0,20,400, 0, FLESH,2000, CLR_BROWN),
/* special case because it's not mergable */
OBJECT(OBJ("meat ring", (char *)0),
BITS(1,0,0,0,0,0,0,0,0,0,0,0,FLESH),
0, FOOD_CLASS, 0, 1, 5, 1, 0, 0, 0, 0, 5, CLR_BROWN),

/* fruits & veggies */
FOOD("kelp frond",           0, 1,  1, 0, VEGGY,  30, CLR_GREEN),
FOOD("eucalyptus leaf",      3, 1,  1, 0, VEGGY,  30, CLR_GREEN),
FOOD("apple",               15, 1,  2, 0, VEGGY,  50, CLR_RED),
FOOD("orange",              10, 1,  2, 0, VEGGY,  80, CLR_ORANGE),
FOOD("pear",                10, 1,  2, 0, VEGGY,  50, CLR_BRIGHT_GREEN),
FOOD("melon",               10, 1,  5, 0, VEGGY, 100, CLR_BRIGHT_GREEN),
FOOD("banana",              10, 1,  2, 0, VEGGY,  80, CLR_YELLOW),
FOOD("carrot",              15, 1,  2, 0, VEGGY,  50, CLR_ORANGE),
FOOD("sprig of wolfsbane",   7, 1,  1, 0, VEGGY,  40, CLR_GREEN),
FOOD("clove of garlic",      7, 1,  1, 0, VEGGY,  40, CLR_WHITE),
FOOD("slime mold",          75, 1,  5, 0, VEGGY, 250, HI_ORGANIC),

/* people food */
FOOD("lump of royal jelly",  0, 1,  2, 0, VEGGY, 200, CLR_YELLOW),
FOOD("cream pie",           25, 1, 10, 0, VEGGY, 100, CLR_WHITE),
FOOD("candy bar",           13, 1,  2, 0, VEGGY, 100, CLR_BROWN),
FOOD("fortune cookie",      55, 1,  1, 0, VEGGY,  40, CLR_YELLOW),
FOOD("pancake",             25, 2,  2, 0, VEGGY, 200, CLR_YELLOW),
FOOD("lembas wafer",        20, 2,  5, 0, VEGGY, 800, CLR_WHITE),
FOOD("cram ration",         20, 3, 15, 0, VEGGY, 600, HI_ORGANIC),
FOOD("food ration",        380, 5, 20, 0, VEGGY, 800, HI_ORGANIC),
FOOD("K-ration",             0, 1, 10, 0, VEGGY, 400, HI_ORGANIC),
FOOD("C-ration",             0, 1, 10, 0, VEGGY, 300, HI_ORGANIC),
FOOD("tin",                 75, 0, 10, 1, METAL,   0, HI_METAL),
#undef FOOD

Potions

/* potions ... */
#define POTION(name,desc,mgc,power,prob,cost,color) OBJECT( \
		OBJ(name,desc), BITS(0,1,0,0,mgc,0,0,0,0,0,0,P_NONE,GLASS), power, \
		POTION_CLASS, prob, 0, 20, cost, 0, 0, 0, 0, 10, color )
POTION("gain ability", "ruby",          1, 0,          42, 300, CLR_RED),
POTION("restore ability", "pink",       1, 0,          40, 100, CLR_BRIGHT_MAGENTA),
POTION("confusion", "orange",           1, CONFUSION,  42, 100, CLR_ORANGE),
POTION("blindness", "yellow",           1, BLINDED,    40, 150, CLR_YELLOW),
POTION("paralysis", "emerald",          1, 0,          42, 300, CLR_BRIGHT_GREEN),
POTION("speed", "dark green",           1, FAST,       42, 200, CLR_GREEN),
POTION("levitation", "cyan",            1, LEVITATION, 42, 200, CLR_CYAN),
POTION("hallucination", "sky blue",     1, HALLUC,     40, 100, CLR_CYAN),
POTION("invisibility", "brilliant blue",1, INVIS,      40, 150, CLR_BRIGHT_BLUE),
POTION("see invisible", "magenta",      1, SEE_INVIS,  42,  50, CLR_MAGENTA),
POTION("healing", "purple-red",         1, 0,          57, 100, CLR_MAGENTA),
POTION("extra healing", "puce",         1, 0,          47, 100, CLR_RED),
POTION("gain level", "milky",           1, 0,          20, 300, CLR_WHITE),
POTION("enlightenment", "swirly",       1, 0,          20, 200, CLR_BROWN),
POTION("monster detection", "bubbly",   1, 0,          40, 150, CLR_WHITE),
POTION("object detection", "smoky",     1, 0,          42, 150, CLR_GRAY),
POTION("gain energy", "cloudy",         1, 0,          42, 150, CLR_WHITE),
POTION("sleeping",  "effervescent",     1, 0,          42, 100, CLR_GRAY),
POTION("full healing",  "black",        1, 0,          10, 200, CLR_BLACK),
POTION("polymorph", "golden",           1, 0,          10, 200, CLR_YELLOW),
POTION("booze", "brown",                0, 0,          42,  50, CLR_BROWN),
POTION("sickness", "fizzy",             0, 0,          42,  50, CLR_CYAN),
POTION("fruit juice", "dark",           0, 0,          42,  50, CLR_BLACK),
POTION("acid", "white",                 0, 0,          10, 250, CLR_WHITE),
POTION("oil", "murky",                  0, 0,          30, 250, CLR_BROWN),
POTION("water", "clear",                0, 0,          92, 100, CLR_CYAN),
#undef POTION

Scrolls

/* scrolls ... */
#define SCROLL(name,text,mgc,prob,cost) OBJECT( \
		OBJ(name,text), BITS(0,1,0,0,mgc,0,0,0,0,0,0,P_NONE,PAPER), 0, \
		SCROLL_CLASS, prob, 0, 5, cost, 0, 0, 0, 0, 6, HI_PAPER )
	SCROLL("enchant armor",         "ZELGO MER",            1,  63,  80),
	SCROLL("destroy armor",         "JUYED AWK YACC",       1,  45, 100),
	SCROLL("confuse monster",       "NR 9",                 1,  53, 100),
	SCROLL("scare monster",         "XIXAXA XOXAXA XUXAXA", 1,  35, 100),
	SCROLL("remove curse",          "PRATYAVAYAH",          1,  65,  80),
	SCROLL("enchant weapon",        "DAIYEN FOOELS",        1,  80,  60),
	SCROLL("create monster",        "LEP GEX VEN ZEA",      1,  45, 200),
	SCROLL("taming",                "PRIRUTSENIE",          1,  15, 200),
	SCROLL("genocide",              "ELBIB YLOH",           1,  15, 300),
	SCROLL("light",                 "VERR YED HORRE",       1,  90,  50),
	SCROLL("teleportation",         "VENZAR BORGAVVE",      1,  55, 100),
	SCROLL("gold detection",        "THARR",                1,  33, 100),
	SCROLL("food detection",        "YUM YUM",              1,  25, 100),
	SCROLL("identify",              "KERNOD WEL",           1, 180,  20),
	SCROLL("magic mapping",         "ELAM EBOW",            1,  45, 100),
	SCROLL("amnesia",               "DUAM XNAHT",           1,  35, 200),
	SCROLL("fire",                  "ANDOVA BEGARIN",       1,  30, 100),
	SCROLL("earth",                 "KIRJE",                1,  18, 200),
	SCROLL("punishment",            "VE FORBRYDERNE",       1,  15, 300),
	SCROLL("charging",              "HACKEM MUCHE",         1,  15, 300),
	SCROLL("stinking cloud",	"VELOX NEB",            1,  15, 300),
	SCROLL((char *)0,		"FOOBIE BLETCH",        1,   0, 100),
	SCROLL((char *)0,		"TEMOV",                1,   0, 100),
	SCROLL((char *)0,		"GARVEN DEH",           1,   0, 100),
	SCROLL((char *)0,		"READ ME",              1,   0, 100),
	/* these must come last because they have special descriptions */
#ifdef MAIL
	SCROLL("mail",                  "stamped",          0,   0,   0),
#endif
	SCROLL("blank paper",           "unlabeled",        0,  28,  60),
#undef SCROLL

Spellbooks

/* spellbooks ... */
#define SPELL(name,desc,sub,prob,delay,level,mgc,dir,color) OBJECT( \
		OBJ(name,desc), BITS(0,0,0,0,mgc,0,0,0,0,0,dir,sub,PAPER), 0, \
		SPBOOK_CLASS, prob, delay, \
		50, level*100, 0, 0, 0, level, 20, color )
SPELL("dig",             "parchment",   P_MATTER_SPELL, 20,  6, 5, 1, RAY,       HI_PAPER),
SPELL("magic missile",   "vellum",      P_ATTACK_SPELL, 45,  2, 2, 1, RAY,       HI_PAPER),
SPELL("fireball",        "ragged",      P_ATTACK_SPELL, 20,  4, 4, 1, RAY,       HI_PAPER),
SPELL("cone of cold",    "dog eared",   P_ATTACK_SPELL, 10,  7, 4, 1, RAY,       HI_PAPER),
SPELL("sleep",           "mottled",     P_ENCHANTMENT_SPELL, 50,  1, 1, 1, RAY,       HI_PAPER),
SPELL("finger of death", "stained",     P_ATTACK_SPELL,  5, 10, 7, 1, RAY,       HI_PAPER),
SPELL("light",           "cloth",       P_DIVINATION_SPELL, 45,  1, 1, 1, NODIR,     HI_CLOTH),
SPELL("detect monsters", "leather",     P_DIVINATION_SPELL, 43,  1, 1, 1, NODIR,     HI_LEATHER),
SPELL("healing",         "white",       P_HEALING_SPELL, 40,  2, 1, 1, IMMEDIATE, CLR_WHITE),
SPELL("knock",           "pink",        P_MATTER_SPELL, 35,  1, 1, 1, IMMEDIATE, CLR_BRIGHT_MAGENTA),
SPELL("force bolt",      "red",         P_ATTACK_SPELL, 35,  2, 1, 1, IMMEDIATE, CLR_RED),
SPELL("confuse monster", "orange",      P_ENCHANTMENT_SPELL, 30,  2, 2, 1, IMMEDIATE, CLR_ORANGE),
SPELL("cure blindness",  "yellow",      P_HEALING_SPELL, 25,  2, 2, 1, IMMEDIATE, CLR_YELLOW),
SPELL("drain life",      "velvet",      P_ATTACK_SPELL, 10,  2, 2, 1, IMMEDIATE, CLR_MAGENTA),
SPELL("slow monster",    "light green", P_ENCHANTMENT_SPELL, 30,  2, 2, 1, IMMEDIATE, CLR_BRIGHT_GREEN),
SPELL("wizard lock",     "dark green",  P_MATTER_SPELL, 30,  3, 2, 1, IMMEDIATE, CLR_GREEN),
SPELL("create monster",  "turquoise",   P_CLERIC_SPELL, 35,  3, 2, 1, NODIR,     CLR_BRIGHT_CYAN),
SPELL("detect food",     "cyan",        P_DIVINATION_SPELL, 30,  3, 2, 1, NODIR,     CLR_CYAN),
SPELL("cause fear",      "light blue",  P_ENCHANTMENT_SPELL, 25,  3, 3, 1, NODIR,     CLR_BRIGHT_BLUE),
SPELL("clairvoyance",    "dark blue",   P_DIVINATION_SPELL, 15,  3, 3, 1, NODIR,     CLR_BLUE),
SPELL("cure sickness",   "indigo",      P_HEALING_SPELL, 32,  3, 3, 1, NODIR,     CLR_BLUE),
SPELL("charm monster",   "magenta",     P_ENCHANTMENT_SPELL, 20,  3, 3, 1, IMMEDIATE, CLR_MAGENTA),
SPELL("haste self",      "purple",      P_ESCAPE_SPELL, 33,  4, 3, 1, NODIR,     CLR_MAGENTA),
SPELL("detect unseen",   "violet",      P_DIVINATION_SPELL, 20,  4, 3, 1, NODIR,     CLR_MAGENTA),
SPELL("levitation",      "tan",         P_ESCAPE_SPELL, 20,  4, 4, 1, NODIR,     CLR_BROWN),
SPELL("extra healing",   "plaid",       P_HEALING_SPELL, 27,  5, 3, 1, IMMEDIATE, CLR_GREEN),
SPELL("restore ability", "light brown", P_HEALING_SPELL, 25,  5, 4, 1, NODIR,     CLR_BROWN),
SPELL("invisibility",    "dark brown",  P_ESCAPE_SPELL, 25,  5, 4, 1, NODIR,     CLR_BROWN),
SPELL("detect treasure", "gray",        P_DIVINATION_SPELL, 20,  5, 4, 1, NODIR,     CLR_GRAY),
SPELL("remove curse",    "wrinkled",    P_CLERIC_SPELL, 25,  5, 3, 1, NODIR,     HI_PAPER),
SPELL("magic mapping",   "dusty",       P_DIVINATION_SPELL, 18,  7, 5, 1, NODIR,     HI_PAPER),
SPELL("identify",        "bronze",      P_DIVINATION_SPELL, 20,  6, 3, 1, NODIR,     HI_COPPER),
SPELL("turn undead",     "copper",      P_CLERIC_SPELL, 16,  8, 6, 1, IMMEDIATE, HI_COPPER),
SPELL("polymorph",       "silver",      P_MATTER_SPELL, 10,  8, 6, 1, IMMEDIATE, HI_SILVER),
SPELL("teleport away",   "gold",        P_ESCAPE_SPELL, 15,  6, 6, 1, IMMEDIATE, HI_GOLD),
SPELL("create familiar", "glittering",  P_CLERIC_SPELL, 10,  7, 6, 1, NODIR,     CLR_WHITE),
SPELL("cancellation",    "shining",     P_MATTER_SPELL, 15,  8, 7, 1, IMMEDIATE, CLR_WHITE),
SPELL("protection",	     "dull",        P_CLERIC_SPELL, 18,  3, 1, 1, NODIR,     HI_PAPER),
SPELL("jumping",	     "thin",        P_ESCAPE_SPELL, 20,  3, 1, 1, IMMEDIATE, HI_PAPER),
SPELL("stone to flesh",	 "thick",       P_HEALING_SPELL, 15,  1, 3, 1, IMMEDIATE, HI_PAPER),
#if 0	/* DEFERRED */
SPELL("flame sphere",    "canvas",      P_MATTER_SPELL, 20,  2, 1, 1, NODIR, CLR_BROWN),
SPELL("freeze sphere",   "hardcover",   P_MATTER_SPELL, 20,  2, 1, 1, NODIR, CLR_BROWN),
#endif
/* blank spellbook must come last because it retains its description */
SPELL("blank paper",     "plain",       P_NONE, 18,  0, 0, 0, 0,         HI_PAPER),
/* a special, one of a kind, spellbook */
OBJECT(OBJ("Book of the Dead", "papyrus"), BITS(0,0,1,0,1,0,1,1,0,0,0,P_NONE,PAPER), 0,
	SPBOOK_CLASS, 0, 0,20, 10000, 0, 0, 0, 7, 20, HI_PAPER),
#undef SPELL

Wands

/* wands ... */
#define WAND(name,typ,prob,cost,mgc,dir,metal,color) OBJECT( \
		OBJ(name,typ), BITS(0,0,1,0,mgc,1,0,0,0,0,dir,P_NONE,metal), 0, \
		WAND_CLASS, prob, 0, 7, cost, 0, 0, 0, 0, 30, color )
WAND("light",          "glass",    95, 100, 1, NODIR,     GLASS,    HI_GLASS),
WAND("secret door detection", "balsa",
				   50, 150, 1, NODIR,	  WOOD,     HI_WOOD),
WAND("enlightenment",  "crystal",  15, 150, 1, NODIR,     GLASS,    HI_GLASS),
WAND("create monster", "maple",    45, 200, 1, NODIR,     WOOD,     HI_WOOD),
WAND("wishing",        "pine",      5, 500, 1, NODIR,     WOOD,     HI_WOOD),
WAND("nothing",        "oak",      25, 100, 0, IMMEDIATE, WOOD,     HI_WOOD),
WAND("striking",       "ebony",    75, 150, 1, IMMEDIATE, WOOD,     HI_WOOD),
WAND("make invisible", "marble",   45, 150, 1, IMMEDIATE, MINERAL,  HI_MINERAL),
WAND("slow monster",   "tin",      50, 150, 1, IMMEDIATE, METAL,    HI_METAL),
WAND("speed monster",  "brass",    50, 150, 1, IMMEDIATE, COPPER,   HI_COPPER),
WAND("undead turning", "copper",   50, 150, 1, IMMEDIATE, COPPER,   HI_COPPER),
WAND("polymorph",      "silver",   45, 200, 1, IMMEDIATE, SILVER,   HI_SILVER),
WAND("cancellation",   "platinum", 45, 200, 1, IMMEDIATE, PLATINUM, CLR_WHITE),
WAND("teleportation",  "iridium",  45, 200, 1, IMMEDIATE, METAL,    CLR_BRIGHT_CYAN),
WAND("opening",        "zinc",     25, 150, 1, IMMEDIATE, METAL,    HI_METAL),
WAND("locking",        "aluminum", 25, 150, 1, IMMEDIATE, METAL,    HI_METAL),
WAND("probing",        "uranium",  30, 150, 1, IMMEDIATE, METAL,    HI_METAL),
WAND("digging",        "iron",     55, 150, 1, RAY,       IRON,     HI_METAL),
WAND("magic missile",  "steel",    50, 150, 1, RAY,       IRON,     HI_METAL),
WAND("fire",           "hexagonal",40, 175, 1, RAY,       IRON,     HI_METAL),
WAND("cold",           "short",    40, 175, 1, RAY,       IRON,     HI_METAL),
WAND("sleep",          "runed",    50, 175, 1, RAY,       IRON,     HI_METAL),
WAND("death",          "long",      5, 500, 1, RAY,       IRON,     HI_METAL),
WAND("lightning",      "curved",   40, 175, 1, RAY,       IRON,     HI_METAL),
WAND((char *)0,        "forked",    0, 150, 1, 0,         WOOD,     HI_WOOD),
WAND((char *)0,        "spiked",    0, 150, 1, 0,         IRON,     HI_METAL),
WAND((char *)0,        "jeweled",   0, 150, 1, 0,         IRON,     HI_MINERAL),
#undef WAND

Coins

/* coins ... - so far, gold is all there is */
#define COIN(name,prob,metal,worth) OBJECT( \
		OBJ(name,(char *)0), BITS(0,1,0,0,0,0,0,0,0,0,0,P_NONE,metal), 0, \
		COIN_CLASS, prob, 0, 1, worth, 0, 0, 0, 0, 0, HI_GOLD )
	COIN("gold piece",      1000, GOLD,1),
#undef COIN

Gems

/* gems ... - includes stones and rocks but not boulders */
#define GEM(name,desc,prob,wt,gval,nutr,mohs,glass,color) OBJECT( \
	    OBJ(name,desc), \
	    BITS(0,1,0,0,0,0,0,0,0,HARDGEM(mohs),0,-P_SLING,glass), 0, \
	    GEM_CLASS, prob, 0, 1, gval, 3, 3, 0, 0, nutr, color )
#define ROCK(name,desc,kn,prob,wt,gval,sdam,ldam,mgc,nutr,mohs,glass,color) OBJECT( \
	    OBJ(name,desc), \
	    BITS(kn,1,0,0,mgc,0,0,0,0,HARDGEM(mohs),0,-P_SLING,glass), 0, \
	    GEM_CLASS, prob, 0, wt, gval, sdam, ldam, 0, 0, nutr, color )
GEM("dilithium crystal", "white",      2,  1, 4500, 15,  5, GEMSTONE, CLR_WHITE),
GEM("diamond", "white",                3,  1, 4000, 15, 10, GEMSTONE, CLR_WHITE),
GEM("ruby", "red",                     4,  1, 3500, 15,  9, GEMSTONE, CLR_RED),
GEM("jacinth", "orange",               3,  1, 3250, 15,  9, GEMSTONE, CLR_ORANGE),
GEM("sapphire", "blue",                4,  1, 3000, 15,  9, GEMSTONE, CLR_BLUE),
GEM("black opal", "black",             3,  1, 2500, 15,  8, GEMSTONE, CLR_BLACK),
GEM("emerald", "green",                5,  1, 2500, 15,  8, GEMSTONE, CLR_GREEN),
GEM("turquoise", "green",              6,  1, 2000, 15,  6, GEMSTONE, CLR_GREEN),
GEM("citrine", "yellow",               4,  1, 1500, 15,  6, GEMSTONE, CLR_YELLOW),
GEM("aquamarine", "green",             6,  1, 1500, 15,  8, GEMSTONE, CLR_GREEN),
GEM("amber", "yellowish brown",        8,  1, 1000, 15,  2, GEMSTONE, CLR_BROWN),
GEM("topaz", "yellowish brown",       10,  1,  900, 15,  8, GEMSTONE, CLR_BROWN),
GEM("jet", "black",                    6,  1,  850, 15,  7, GEMSTONE, CLR_BLACK),
GEM("opal", "white",                  12,  1,  800, 15,  6, GEMSTONE, CLR_WHITE),
GEM("chrysoberyl", "yellow",           8,  1,  700, 15,  5, GEMSTONE, CLR_YELLOW),
GEM("garnet", "red",                  12,  1,  700, 15,  7, GEMSTONE, CLR_RED),
GEM("amethyst", "violet",             14,  1,  600, 15,  7, GEMSTONE, CLR_MAGENTA),
GEM("jasper", "red",                  15,  1,  500, 15,  7, GEMSTONE, CLR_RED),
GEM("fluorite", "violet",             15,  1,  400, 15,  4, GEMSTONE, CLR_MAGENTA),
GEM("obsidian", "black",               9,  1,  200, 15,  6, GEMSTONE, CLR_BLACK),
GEM("agate", "orange",                12,  1,  200, 15,  6, GEMSTONE, CLR_ORANGE),
GEM("jade", "green",                  10,  1,  300, 15,  6, GEMSTONE, CLR_GREEN),
GEM("worthless piece of white glass", "white",   77, 1, 0, 6, 5, GLASS, CLR_WHITE),
GEM("worthless piece of blue glass", "blue",     77, 1, 0, 6, 5, GLASS, CLR_BLUE),
GEM("worthless piece of red glass", "red",       77, 1, 0, 6, 5, GLASS, CLR_RED),
GEM("worthless piece of yellowish brown glass", "yellowish brown",
						 77, 1, 0, 6, 5, GLASS, CLR_BROWN),
GEM("worthless piece of orange glass", "orange", 76, 1, 0, 6, 5, GLASS, CLR_ORANGE),
GEM("worthless piece of yellow glass", "yellow", 77, 1, 0, 6, 5, GLASS, CLR_YELLOW),
GEM("worthless piece of black glass",  "black",  76, 1, 0, 6, 5, GLASS, CLR_BLACK),
GEM("worthless piece of green glass", "green",   77, 1, 0, 6, 5, GLASS, CLR_GREEN),
GEM("worthless piece of violet glass", "violet", 77, 1, 0, 6, 5, GLASS, CLR_MAGENTA),

/* Placement note: there is a wishable subrange for
* "gray stones" in the o_ranges[] array in objnam.c
* that is currently everything between luckstones and flint (inclusive).
*/
ROCK("luckstone", "gray",	0, 10,  10, 60, 3, 3, 1, 10, 7, MINERAL, CLR_GRAY),
ROCK("loadstone", "gray",	0, 10, 500,  1, 3, 3, 1, 10, 6, MINERAL, CLR_GRAY),
ROCK("touchstone", "gray",	0,  8,  10, 45, 3, 3, 1, 10, 6, MINERAL, CLR_GRAY),
ROCK("flint", "gray",		0, 10,  10,  1, 6, 6, 0, 10, 7, MINERAL, CLR_GRAY),
ROCK("rock", (char *)0,		1,100,  10,  0, 3, 3, 0, 10, 7, MINERAL, CLR_GRAY),
#undef GEM
#undef ROCK

Miscellaneous

/* miscellaneous ... */
/* Note: boulders and rocks are not normally created at random; the
* probabilities only come into effect when you try to polymorph them.
* Boulders weigh more than MAX_CARR_CAP; statues use corpsenm to take
* on a specific type and may act as containers (both affect weight).
*/
OBJECT(OBJ("boulder",(char *)0), BITS(1,0,0,0,0,0,0,0,1,0,0,P_NONE,MINERAL), 0,
		ROCK_CLASS,   100, 0, 6000,  0, 20, 20, 0, 0, 2000, HI_MINERAL),
OBJECT(OBJ("statue", (char *)0), BITS(1,0,0,1,0,0,0,0,0,0,0,P_NONE,MINERAL), 0,
		ROCK_CLASS,   900, 0, 2500,  0, 20, 20, 0, 0, 2500, CLR_WHITE),

OBJECT(OBJ("heavy iron ball", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,WHACK,P_NONE,IRON), 0,
		BALL_CLASS,  1000, 0,  480, 10, 25, 25, 0, 0,  200, HI_METAL),
						/* +d4 when "very heavy" */
OBJECT(OBJ("iron chain", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,WHACK,P_NONE,IRON), 0,
		CHAIN_CLASS, 1000, 0,  120,  0,  4,  4, 0, 0,  200, HI_METAL),
						/* +1 both l & s */

OBJECT(OBJ("blinding venom", "splash of venom"),
		BITS(0,1,0,0,0,0,0,1,0,0,0,P_NONE,LIQUID), 0,
		VENOM_CLASS,  500, 0,	 1,  0,  0,  0, 0, 0,	 0, HI_ORGANIC),
OBJECT(OBJ("acid venom", "splash of venom"),
		BITS(0,1,0,0,0,0,0,1,0,0,0,P_NONE,LIQUID), 0,
		VENOM_CLASS,  500, 0,	 1,  0,  6,  6, 0, 0,	 0, HI_ORGANIC),
		/* +d6 small or large */

/* fencepost, the deadly Array Terminator -- name [1st arg] *must* be NULL */
	OBJECT(OBJ((char *)0,(char *)0), BITS(0,0,0,0,0,0,0,0,0,0,0,P_NONE,0), 0,
		ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
}; /* objects[] */

#ifndef OBJECTS_PASS_2_

/* perform recursive compilation for second structure */
#  undef OBJ
#  undef OBJECT
#  define OBJECTS_PASS_2_
#include "objects.c"

void NDECL(objects_init);

objects_init

/* dummy routine used to force linkage */
void
objects_init()
{
return;
}

#endif	/* !OBJECTS_PASS_2_ */

/*objects.c*/