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

From NetHackWiki
Jump to navigation Jump to search
m (Object macros: replaced bullets with numbers. helps, when you need to count the correct attribute place just once. :))
(Added line numbers. Behold, the magic of Perl!)
Line 1: Line 1:
 
=== Top of file ===
 
=== Top of file ===
  /* SCCS Id: @(#)objects.c 3.4 2002/07/31 */
+
  1.  /* SCCS Id: @(#)objects.c 3.4 2002/07/31 */
  /* Copyright (c) Mike Threepoint, 1989.   */
+
  2.  /* Copyright (c) Mike Threepoint, 1989.   */
  /* NetHack may be freely redistributed.  See license for details. */
+
  3.  /* NetHack may be freely redistributed.  See license for details. */
  
 
{{NGPL}}
 
{{NGPL}}
  
  #ifndef OBJECTS_PASS_2_
+
  4.  #ifndef OBJECTS_PASS_2_
  /* first pass */
+
  5.  /* first pass */
  struct monst { struct monst *dummy; }; /* lint: struct obj's union */
+
  6.  struct monst { struct monst *dummy; }; /* lint: struct obj's union */
  #include "config.h"
+
  7.  #include "config.h"
  #include "obj.h"
+
  8.  #include "obj.h"
  #include "objclass.h"
+
  9.  #include "objclass.h"
  #include "prop.h"
+
10. #include "prop.h"
  #include "skills.h"
+
11. #include "skills.h"
   
+
12.  
  #else /* !OBJECTS_PASS_2_ */
+
13. #else /* !OBJECTS_PASS_2_ */
  /* second pass */
+
14. /* second pass */
  #include "color.h"
+
15. #include "color.h"
  #  define COLOR_FIELD(X) X,
+
16. #  define COLOR_FIELD(X) X,
  #endif /* !OBJECTS_PASS_2_ */
+
17. #endif /* !OBJECTS_PASS_2_ */
   
+
18.  
   
+
19.  
  /* objects have symbols: ) [ = " ( % ! ? + / $ * ` 0 _ . */
+
20. /* objects have symbols: ) [ = " ( % ! ? + / $ * ` 0 _ . */
   
+
21.  
  /*
+
22. /*
   * Note:  OBJ() and BITS() macros are used to avoid exceeding argument
+
23.   * Note:  OBJ() and BITS() macros are used to avoid exceeding argument
   * limits imposed by some compilers.  The ctnr field of BITS currently
+
24.   * limits imposed by some compilers.  The ctnr field of BITS currently
   * does not map into struct objclass, and is ignored in the expansion.
+
25.   * does not map into struct objclass, and is ignored in the expansion.
   * The 0 in the expansion corresponds to oc_pre_discovered, which is
+
26.   * The 0 in the expansion corresponds to oc_pre_discovered, which is
   * set at run-time during role-specific character initialization.
+
27.   * set at run-time during role-specific character initialization.
   */
+
28.   */
   
+
29.  
 
=== Object macros ===
 
=== Object macros ===
  
  #ifndef OBJECTS_PASS_2_
+
30. #ifndef OBJECTS_PASS_2_
  /* first pass -- object descriptive text */
+
31. /* first pass -- object descriptive text */
  # define OBJ(name,desc) name,desc
+
32. # define OBJ(name,desc) name,desc
  
 
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) \
+
33. # define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \
{obj}
+
34.  {obj}
  
 
The OBJECT macro.
 
The OBJECT macro.
Line 58: Line 58:
 
# <tt>nut</tt> is nutrition gained when the object is eaten.
 
# <tt>nut</tt> is nutrition gained when the object is eaten.
 
# <tt>color</tt> is the object color, as used in the TTY windowport.
 
# <tt>color</tt> is the object color, as used in the TTY windowport.
   
+
35.  
  NEARDATA struct objdescr obj_descr[] = {
+
36. NEARDATA struct objdescr obj_descr[] = {
  #else
+
37. #else
  /* second pass -- object definitions */
+
38. /* second pass -- object definitions */
   
+
39.  
  # define BITS(nmkn,mrg,uskn,ctnr,mgc,chrg,uniq,nwsh,big,tuf,dir,sub,mtrl) \
+
40. # 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 */
+
41.  nmkn,mrg,uskn,0,mgc,chrg,uniq,nwsh,big,tuf,dir,mtrl,sub /* SCO ODT 1.1 cpp fodder */
  
 
The BITS macro. Each value is either 1 or 0.
 
The BITS macro. Each value is either 1 or 0.
Line 82: Line 82:
 
# <tt>mtrl</tt> takes one of the material definitions, eg. <tt>LEATHER</tt> or <tt>IRON</tt>, as defined in [[objclass.h]]
 
# <tt>mtrl</tt> takes one of the material definitions, eg. <tt>LEATHER</tt> or <tt>IRON</tt>, as defined in [[objclass.h]]
  
  # define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \
+
42. # 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) \
+
43.  {0, 0, (char *)0, bits, prp, sym, dly, COLOR_FIELD(color) \
prob, wt, cost, sdam, ldam, oc1, oc2, nut}
+
44.    prob, wt, cost, sdam, ldam, oc1, oc2, nut}
  # ifndef lint
+
45. # ifndef lint
  #  define HARDGEM(n) (n >= 8)
+
46. #  define HARDGEM(n) (n >= 8)
  # else
+
47. # else
  #  define HARDGEM(n) (0)
+
48. #  define HARDGEM(n) (0)
  # endif
+
49. # endif
   
+
50.  
  NEARDATA struct objclass objects[] = {
+
51. NEARDATA struct objclass objects[] = {
  #endif
+
52. #endif
  /* dummy object[0] -- description [2nd arg] *must* be NULL */
+
53. /* 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),
+
54.  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),
+
55.   0, ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
  
 
=== Weapons ===
 
=== Weapons ===
   
+
56.  
  /* weapons ... */
+
57. /* weapons ... */
  #define WEAPON(name,app,kn,mg,bi,prob,wt,cost,sdam,ldam,hitbon,typ,sub,metal,color) \
+
58. #define WEAPON(name,app,kn,mg,bi,prob,wt,cost,sdam,ldam,hitbon,typ,sub,metal,color) \
OBJECT( \
+
59.  OBJECT( \
OBJ(name,app), BITS(kn,mg,1,0,0,1,0,0,bi,0,typ,sub,metal), 0, \
+
60. OBJ(name,app), BITS(kn,mg,1,0,0,1,0,0,bi,0,typ,sub,metal), 0, \
WEAPON_CLASS, prob, 0, \
+
61. WEAPON_CLASS, prob, 0, \
wt, cost, sdam, ldam, hitbon, 0, wt, color )
+
62. wt, cost, sdam, ldam, hitbon, 0, wt, color )
  #define PROJECTILE(name,app,kn,prob,wt,cost,sdam,ldam,hitbon,metal,sub,color) \
+
63. #define PROJECTILE(name,app,kn,prob,wt,cost,sdam,ldam,hitbon,metal,sub,color) \
OBJECT( \
+
64.  OBJECT( \
OBJ(name,app), \
+
65. OBJ(name,app), \
BITS(kn,1,1,0,0,1,0,0,0,0,PIERCE,sub,metal), 0, \
+
66. BITS(kn,1,1,0,0,1,0,0,0,0,PIERCE,sub,metal), 0, \
WEAPON_CLASS, prob, 0, \
+
67. WEAPON_CLASS, prob, 0, \
wt, cost, sdam, ldam, hitbon, 0, wt, color )
+
68. wt, cost, sdam, ldam, hitbon, 0, wt, color )
  #define BOW(name,app,kn,prob,wt,cost,hitbon,metal,sub,color) \
+
69. #define BOW(name,app,kn,prob,wt,cost,hitbon,metal,sub,color) \
OBJECT( \
+
70.  OBJECT( \
OBJ(name,app), BITS(kn,0,1,0,0,1,0,0,0,0,0,sub,metal), 0, \
+
71. OBJ(name,app), BITS(kn,0,1,0,0,1,0,0,0,0,0,sub,metal), 0, \
WEAPON_CLASS, prob, 0, \
+
72. WEAPON_CLASS, prob, 0, \
wt, cost, 2, 2, hitbon, 0, wt, color )
+
73. wt, cost, 2, 2, hitbon, 0, wt, color )
   
+
74.  
  /* Note: for weapons that don't do an even die of damage (ex. 2-7 or 3-18)
+
75. /* 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! */
+
76.   * the extra damage is added on in weapon.c, not here! */
   
+
77.  
  #define P PIERCE
+
78. #define P PIERCE
  #define S SLASH
+
79. #define S SLASH
  #define B WHACK
+
80. #define B WHACK
   
+
81.  
  /* missiles */
+
82. /* missiles */
  PROJECTILE("arrow", (char *)0,
+
83. PROJECTILE("arrow", (char *)0,
1, 55, 1, 2, 6, 6, 0, IRON, -P_BOW, HI_METAL),
+
84. 1, 55, 1, 2, 6, 6, 0, IRON, -P_BOW, HI_METAL),
  PROJECTILE("elven arrow", "runed arrow",
+
85. PROJECTILE("elven arrow", "runed arrow",
0, 20, 1, 2, 7, 6, 0, WOOD, -P_BOW, HI_WOOD),
+
86. 0, 20, 1, 2, 7, 6, 0, WOOD, -P_BOW, HI_WOOD),
  PROJECTILE("orcish arrow", "crude arrow",
+
87. PROJECTILE("orcish arrow", "crude arrow",
0, 20, 1, 2, 5, 6, 0, IRON, -P_BOW, CLR_BLACK),
+
88. 0, 20, 1, 2, 5, 6, 0, IRON, -P_BOW, CLR_BLACK),
  PROJECTILE("silver arrow", (char *)0,
+
89. PROJECTILE("silver arrow", (char *)0,
1, 12, 1, 5, 6, 6, 0, SILVER, -P_BOW, HI_SILVER),
+
90. 1, 12, 1, 5, 6, 6, 0, SILVER, -P_BOW, HI_SILVER),
  PROJECTILE("ya", "bamboo arrow",
+
91. PROJECTILE("ya", "bamboo arrow",
0, 15, 1, 4, 7, 7, 1, METAL, -P_BOW, HI_METAL),
+
92. 0, 15, 1, 4, 7, 7, 1, METAL, -P_BOW, HI_METAL),
  PROJECTILE("crossbow bolt", (char *)0,
+
93. PROJECTILE("crossbow bolt", (char *)0,
1, 55, 1, 2, 4, 6, 0, IRON, -P_CROSSBOW, HI_METAL),
+
94. 1, 55, 1, 2, 4, 6, 0, IRON, -P_CROSSBOW, HI_METAL),
   
+
95.  
  WEAPON("dart", (char *)0,
+
96. WEAPON("dart", (char *)0,
1, 1, 0, 60,  1,  2,  3,  2, 0, P,  -P_DART, IRON, HI_METAL),
+
97.  1, 1, 0, 60,  1,  2,  3,  2, 0, P,  -P_DART, IRON, HI_METAL),
  WEAPON("shuriken", "throwing star",
+
98. WEAPON("shuriken", "throwing star",
0, 1, 0, 35,  1,  5,  8,  6, 2, P,  -P_SHURIKEN, IRON, HI_METAL),
+
99.  0, 1, 0, 35,  1,  5,  8,  6, 2, P,  -P_SHURIKEN, IRON, HI_METAL),
  WEAPON("boomerang", (char *)0,
+
  100. WEAPON("boomerang", (char *)0,
1, 1, 0, 15,  5, 20,  9,  9, 0, 0,  -P_BOOMERANG, WOOD, HI_WOOD),
+
101.  1, 1, 0, 15,  5, 20,  9,  9, 0, 0,  -P_BOOMERANG, WOOD, HI_WOOD),
   
+
  102.
  /* spears */
+
  103. /* spears */
  WEAPON("spear", (char *)0,
+
  104. WEAPON("spear", (char *)0,
1, 1, 0, 50, 30,  3,  6,  8, 0, P,  P_SPEAR, IRON, HI_METAL),
+
105.  1, 1, 0, 50, 30,  3,  6,  8, 0, P,  P_SPEAR, IRON, HI_METAL),
  WEAPON("elven spear", "runed spear",
+
  106. WEAPON("elven spear", "runed spear",
0, 1, 0, 10, 30,  3,  7,  8, 0, P,  P_SPEAR, WOOD, HI_WOOD),
+
107.  0, 1, 0, 10, 30,  3,  7,  8, 0, P,  P_SPEAR, WOOD, HI_WOOD),
  WEAPON("orcish spear", "crude spear",
+
  108. WEAPON("orcish spear", "crude spear",
0, 1, 0, 13, 30,  3,  5,  8, 0, P,  P_SPEAR, IRON, CLR_BLACK),
+
109.  0, 1, 0, 13, 30,  3,  5,  8, 0, P,  P_SPEAR, IRON, CLR_BLACK),
  WEAPON("dwarvish spear", "stout spear",
+
  110. WEAPON("dwarvish spear", "stout spear",
0, 1, 0, 12, 35,  3,  8,  8, 0, P,  P_SPEAR, IRON, HI_METAL),
+
111.  0, 1, 0, 12, 35,  3,  8,  8, 0, P,  P_SPEAR, IRON, HI_METAL),
  WEAPON("silver spear", (char *)0,
+
  112. WEAPON("silver spear", (char *)0,
1, 1, 0,  2, 36, 40,  6,  8, 0, P,  P_SPEAR, SILVER, HI_SILVER),
+
113.  1, 1, 0,  2, 36, 40,  6,  8, 0, P,  P_SPEAR, SILVER, HI_SILVER),
  WEAPON("javelin", "throwing spear",
+
  114. WEAPON("javelin", "throwing spear",
0, 1, 0, 10, 20,  3,  6,  6, 0, P,  P_JAVELIN, IRON, HI_METAL),
+
115.  0, 1, 0, 10, 20,  3,  6,  6, 0, P,  P_JAVELIN, IRON, HI_METAL),
   
+
  116.
  WEAPON("trident", (char *)0,
+
  117. WEAPON("trident", (char *)0,
1, 0, 0,  8, 25,  5,  6,  4, 0, P,  P_TRIDENT, IRON, HI_METAL),
+
118.  1, 0, 0,  8, 25,  5,  6,  4, 0, P,  P_TRIDENT, IRON, HI_METAL),
/* +1 small, +2d4 large */
+
119. /* +1 small, +2d4 large */
   
+
  120.
  /* blades */
+
  121. /* blades */
  WEAPON("dagger", (char *)0,
+
  122. WEAPON("dagger", (char *)0,
1, 1, 0, 30, 10,  4,  4,  3, 2, P,  P_DAGGER, IRON, HI_METAL),
+
123.  1, 1, 0, 30, 10,  4,  4,  3, 2, P,  P_DAGGER, IRON, HI_METAL),
  WEAPON("elven dagger", "runed dagger",
+
  124. WEAPON("elven dagger", "runed dagger",
0, 1, 0, 10, 10,  4,  5,  3, 2, P,  P_DAGGER, WOOD, HI_WOOD),
+
125.  0, 1, 0, 10, 10,  4,  5,  3, 2, P,  P_DAGGER, WOOD, HI_WOOD),
  WEAPON("orcish dagger", "crude dagger",
+
  126. WEAPON("orcish dagger", "crude dagger",
0, 1, 0, 12, 10,  4,  3,  3, 2, P,  P_DAGGER, IRON, CLR_BLACK),
+
127.  0, 1, 0, 12, 10,  4,  3,  3, 2, P,  P_DAGGER, IRON, CLR_BLACK),
  WEAPON("silver dagger", (char *)0,
+
  128. WEAPON("silver dagger", (char *)0,
1, 1, 0,  3, 12, 40,  4,  3, 2, P,  P_DAGGER, SILVER, HI_SILVER),
+
129.  1, 1, 0,  3, 12, 40,  4,  3, 2, P,  P_DAGGER, SILVER, HI_SILVER),
  WEAPON("athame", (char *)0,
+
  130. WEAPON("athame", (char *)0,
1, 1, 0,  0, 10,  4,  4,  3, 2, S,  P_DAGGER, IRON, HI_METAL),
+
131.  1, 1, 0,  0, 10,  4,  4,  3, 2, S,  P_DAGGER, IRON, HI_METAL),
  WEAPON("scalpel", (char *)0,
+
  132. WEAPON("scalpel", (char *)0,
1, 1, 0,  0,  5,  6,  3,  3, 2, S,  P_KNIFE, METAL, HI_METAL),
+
133.  1, 1, 0,  0,  5,  6,  3,  3, 2, S,  P_KNIFE, METAL, HI_METAL),
  WEAPON("knife", (char *)0,
+
  134. WEAPON("knife", (char *)0,
1, 1, 0, 20,  5,  4,  3,  2, 0, P|S, P_KNIFE, IRON, HI_METAL),
+
135.  1, 1, 0, 20,  5,  4,  3,  2, 0, P|S, P_KNIFE, IRON, HI_METAL),
  WEAPON("stiletto", (char *)0,
+
  136. WEAPON("stiletto", (char *)0,
1, 1, 0,  5,  5,  4,  3,  2, 0, P|S, P_KNIFE, IRON, HI_METAL),
+
137.  1, 1, 0,  5,  5,  4,  3,  2, 0, P|S, P_KNIFE, IRON, HI_METAL),
  WEAPON("worm tooth", (char *)0,
+
  138. WEAPON("worm tooth", (char *)0,
1, 0, 0,  0, 20,  2,  2,  2, 0, 0,  P_KNIFE, 0, CLR_WHITE),
+
139.  1, 0, 0,  0, 20,  2,  2,  2, 0, 0,  P_KNIFE, 0, CLR_WHITE),
  WEAPON("crysknife", (char *)0,
+
  140. WEAPON("crysknife", (char *)0,
1, 0, 0,  0, 20,100, 10, 10, 3, P,  P_KNIFE, MINERAL, CLR_WHITE),
+
141.  1, 0, 0,  0, 20,100, 10, 10, 3, P,  P_KNIFE, MINERAL, CLR_WHITE),
   
+
  142.
  WEAPON("axe", (char *)0,
+
  143. WEAPON("axe", (char *)0,
1, 0, 0, 40, 60,  8,  6,  4, 0, S,  P_AXE, IRON, HI_METAL),
+
144.  1, 0, 0, 40, 60,  8,  6,  4, 0, S,  P_AXE, IRON, HI_METAL),
  WEAPON("battle-axe", "double-headed axe",
+
  145. WEAPON("battle-axe", "double-headed axe",
0, 0, 1, 10,120, 40,  8,  6, 0, S,  P_AXE, IRON, HI_METAL),
+
146.  0, 0, 1, 10,120, 40,  8,  6, 0, S,  P_AXE, IRON, HI_METAL),
/* "double-bitted" ? */
+
147. /* "double-bitted" ? */
   
+
  148.
  /* swords */
+
  149. /* swords */
  WEAPON("short sword", (char *)0,
+
  150. WEAPON("short sword", (char *)0,
1, 0, 0,  8, 30, 10,  6,  8, 0, P,  P_SHORT_SWORD, IRON, HI_METAL),
+
151.  1, 0, 0,  8, 30, 10,  6,  8, 0, P,  P_SHORT_SWORD, IRON, HI_METAL),
  WEAPON("elven short sword", "runed short sword",
+
  152. WEAPON("elven short sword", "runed short sword",
0, 0, 0,  2, 30, 10,  8,  8, 0, P,  P_SHORT_SWORD, WOOD, HI_WOOD),
+
153.  0, 0, 0,  2, 30, 10,  8,  8, 0, P,  P_SHORT_SWORD, WOOD, HI_WOOD),
  WEAPON("orcish short sword", "crude short sword",
+
  154. WEAPON("orcish short sword", "crude short sword",
0, 0, 0,  3, 30, 10,  5,  8, 0, P,  P_SHORT_SWORD, IRON, CLR_BLACK),
+
155.  0, 0, 0,  3, 30, 10,  5,  8, 0, P,  P_SHORT_SWORD, IRON, CLR_BLACK),
  WEAPON("dwarvish short sword", "broad short sword",
+
  156. WEAPON("dwarvish short sword", "broad short sword",
0, 0, 0,  2, 30, 10,  7,  8, 0, P,  P_SHORT_SWORD, IRON, HI_METAL),
+
157.  0, 0, 0,  2, 30, 10,  7,  8, 0, P,  P_SHORT_SWORD, IRON, HI_METAL),
  WEAPON("scimitar", "curved sword",
+
  158. WEAPON("scimitar", "curved sword",
0, 0, 0, 15, 40, 15,  8,  8, 0, S,  P_SCIMITAR, IRON, HI_METAL),
+
159.  0, 0, 0, 15, 40, 15,  8,  8, 0, S,  P_SCIMITAR, IRON, HI_METAL),
  WEAPON("silver saber", (char *)0,
+
  160. WEAPON("silver saber", (char *)0,
1, 0, 0,  6, 40, 75,  8,  8, 0, S,  P_SABER, SILVER, HI_SILVER),
+
161.  1, 0, 0,  6, 40, 75,  8,  8, 0, S,  P_SABER, SILVER, HI_SILVER),
  WEAPON("broadsword", (char *)0,
+
  162. WEAPON("broadsword", (char *)0,
1, 0, 0,  8, 70, 10,  4,  6, 0, S,  P_BROAD_SWORD, IRON, HI_METAL),
+
163.  1, 0, 0,  8, 70, 10,  4,  6, 0, S,  P_BROAD_SWORD, IRON, HI_METAL),
/* +d4 small, +1 large */
+
164. /* +d4 small, +1 large */
  WEAPON("elven broadsword", "runed broadsword",
+
  165. WEAPON("elven broadsword", "runed broadsword",
0, 0, 0,  4, 70, 10,  6,  6, 0, S,  P_BROAD_SWORD, WOOD, HI_WOOD),
+
166.  0, 0, 0,  4, 70, 10,  6,  6, 0, S,  P_BROAD_SWORD, WOOD, HI_WOOD),
/* +d4 small, +1 large */
+
167. /* +d4 small, +1 large */
  WEAPON("long sword", (char *)0,
+
  168. WEAPON("long sword", (char *)0,
1, 0, 0, 50, 40, 15,  8, 12, 0, S,  P_LONG_SWORD, IRON, HI_METAL),
+
169.  1, 0, 0, 50, 40, 15,  8, 12, 0, S,  P_LONG_SWORD, IRON, HI_METAL),
  WEAPON("two-handed sword", (char *)0,
+
  170. WEAPON("two-handed sword", (char *)0,
1, 0, 1, 22,150, 50, 12,  6, 0, S,  P_TWO_HANDED_SWORD, IRON, HI_METAL),
+
171.  1, 0, 1, 22,150, 50, 12,  6, 0, S,  P_TWO_HANDED_SWORD, IRON, HI_METAL),
/* +2d6 large */
+
172. /* +2d6 large */
  WEAPON("katana", "samurai sword",
+
  173. WEAPON("katana", "samurai sword",
0, 0, 0,  4, 40, 80, 10, 12, 1, S,  P_LONG_SWORD, IRON, HI_METAL),
+
174.  0, 0, 0,  4, 40, 80, 10, 12, 1, S,  P_LONG_SWORD, IRON, HI_METAL),
  /* special swords set up for artifacts */
+
  175. /* special swords set up for artifacts */
  WEAPON("tsurugi", "long samurai sword",
+
  176. WEAPON("tsurugi", "long samurai sword",
0, 0, 1,  0, 60,500, 16,  8, 2, S,  P_TWO_HANDED_SWORD, METAL, HI_METAL),
+
177.  0, 0, 1,  0, 60,500, 16,  8, 2, S,  P_TWO_HANDED_SWORD, METAL, HI_METAL),
/* +2d6 large */
+
178. /* +2d6 large */
  WEAPON("runesword", "runed broadsword",
+
  179. WEAPON("runesword", "runed broadsword",
0, 0, 0,  0, 40,300,  4,  6, 0, S,  P_BROAD_SWORD, IRON, CLR_BLACK),
+
180.  0, 0, 0,  0, 40,300,  4,  6, 0, S,  P_BROAD_SWORD, IRON, CLR_BLACK),
/* +d4 small, +1 large */
+
181. /* +d4 small, +1 large */
/* +5d2 +d8 from level drain */
+
182. /* +5d2 +d8 from level drain */
   
+
  183.
  /* polearms */
+
  184. /* polearms */
  /* spear-type */
+
  185. /* spear-type */
  WEAPON("partisan", "vulgar polearm",
+
  186. WEAPON("partisan", "vulgar polearm",
0, 0, 1,  5, 80, 10,  6,  6, 0, P,  P_POLEARMS, IRON, HI_METAL),
+
187.  0, 0, 1,  5, 80, 10,  6,  6, 0, P,  P_POLEARMS, IRON, HI_METAL),
/* +1 large */
+
188. /* +1 large */
  WEAPON("ranseur", "hilted polearm",
+
  189. WEAPON("ranseur", "hilted polearm",
0, 0, 1,  5, 50,  6,  4,  4, 0, P,  P_POLEARMS, IRON, HI_METAL),
+
190.  0, 0, 1,  5, 50,  6,  4,  4, 0, P,  P_POLEARMS, IRON, HI_METAL),
/* +d4 both */
+
191. /* +d4 both */
  WEAPON("spetum", "forked polearm",
+
  192. WEAPON("spetum", "forked polearm",
0, 0, 1,  5, 50,  5,  6,  6, 0, P,  P_POLEARMS, IRON, HI_METAL),
+
193.  0, 0, 1,  5, 50,  5,  6,  6, 0, P,  P_POLEARMS, IRON, HI_METAL),
/* +1 small, +d6 large */
+
194. /* +1 small, +d6 large */
  WEAPON("glaive", "single-edged polearm",
+
  195. WEAPON("glaive", "single-edged polearm",
0, 0, 1,  8, 75,  6,  6, 10, 0, S,  P_POLEARMS, IRON, HI_METAL),
+
196.  0, 0, 1,  8, 75,  6,  6, 10, 0, S,  P_POLEARMS, IRON, HI_METAL),
  WEAPON("lance", (char *)0,
+
  197. WEAPON("lance", (char *)0,
1, 0, 0,  4,180, 10,  6,  8, 0, P,  P_LANCE, IRON, HI_METAL),
+
198.  1, 0, 0,  4,180, 10,  6,  8, 0, P,  P_LANCE, IRON, HI_METAL),
  /* axe-type */
+
  199. /* axe-type */
  WEAPON("halberd", "angled poleaxe",
+
  200. WEAPON("halberd", "angled poleaxe",
0, 0, 1,  8,150, 10, 10,  6, 0, P|S, P_POLEARMS, IRON, HI_METAL),
+
201.  0, 0, 1,  8,150, 10, 10,  6, 0, P|S, P_POLEARMS, IRON, HI_METAL),
/* +1d6 large */
+
202. /* +1d6 large */
  WEAPON("bardiche", "long poleaxe",
+
  203. WEAPON("bardiche", "long poleaxe",
0, 0, 1,  4,120,  7,  4,  4, 0, S,  P_POLEARMS, IRON, HI_METAL),
+
204.  0, 0, 1,  4,120,  7,  4,  4, 0, S,  P_POLEARMS, IRON, HI_METAL),
/* +1d4 small, +2d4 large */
+
205. /* +1d4 small, +2d4 large */
  WEAPON("voulge", "pole cleaver",
+
  206. WEAPON("voulge", "pole cleaver",
0, 0, 1,  4,125,  5,  4,  4, 0, S,  P_POLEARMS, IRON, HI_METAL),
+
207.  0, 0, 1,  4,125,  5,  4,  4, 0, S,  P_POLEARMS, IRON, HI_METAL),
/* +d4 both */
+
208. /* +d4 both */
  WEAPON("dwarvish mattock", "broad pick",
+
  209. WEAPON("dwarvish mattock", "broad pick",
0, 0, 1, 13,120, 50, 12,  8,-1, B,  P_PICK_AXE, IRON, HI_METAL),
+
210.  0, 0, 1, 13,120, 50, 12,  8,-1, B,  P_PICK_AXE, IRON, HI_METAL),
   
+
  211.
  /* curved/hooked */
+
  212. /* curved/hooked */
  WEAPON("fauchard", "pole sickle",
+
  213. WEAPON("fauchard", "pole sickle",
0, 0, 1,  6, 60,  5,  6,  8, 0, P|S, P_POLEARMS, IRON, HI_METAL),
+
214.  0, 0, 1,  6, 60,  5,  6,  8, 0, P|S, P_POLEARMS, IRON, HI_METAL),
  WEAPON("guisarme", "pruning hook",
+
  215. WEAPON("guisarme", "pruning hook",
0, 0, 1,  6, 80,  5,  4,  8, 0, S,  P_POLEARMS, IRON, HI_METAL),
+
216.  0, 0, 1,  6, 80,  5,  4,  8, 0, S,  P_POLEARMS, IRON, HI_METAL),
/* +1d4 small */
+
217. /* +1d4 small */
  WEAPON("bill-guisarme", "hooked polearm",
+
  218. WEAPON("bill-guisarme", "hooked polearm",
0, 0, 1,  4,120,  7,  4, 10, 0, P|S, P_POLEARMS, IRON, HI_METAL),
+
219.  0, 0, 1,  4,120,  7,  4, 10, 0, P|S, P_POLEARMS, IRON, HI_METAL),
/* +1d4 small */
+
220. /* +1d4 small */
  /* other */
+
  221. /* other */
  WEAPON("lucern hammer", "pronged polearm",
+
  222. WEAPON("lucern hammer", "pronged polearm",
0, 0, 1,  5,150,  7,  4,  6, 0, B|P, P_POLEARMS, IRON, HI_METAL),
+
223.  0, 0, 1,  5,150,  7,  4,  6, 0, B|P, P_POLEARMS, IRON, HI_METAL),
/* +1d4 small */
+
224. /* +1d4 small */
  WEAPON("bec de corbin", "beaked polearm",
+
  225. WEAPON("bec de corbin", "beaked polearm",
0, 0, 1,  4,100,  8,  8,  6, 0, B|P, P_POLEARMS, IRON, HI_METAL),
+
226.  0, 0, 1,  4,100,  8,  8,  6, 0, B|P, P_POLEARMS, IRON, HI_METAL),
   
+
  227.
  /* bludgeons */
+
  228. /* bludgeons */
  WEAPON("mace", (char *)0,
+
  229. WEAPON("mace", (char *)0,
1, 0, 0, 40, 30,  5,  6,  6, 0, B,  P_MACE, IRON, HI_METAL),
+
230.  1, 0, 0, 40, 30,  5,  6,  6, 0, B,  P_MACE, IRON, HI_METAL),
/* +1 small */
+
231. /* +1 small */
  WEAPON("morning star", (char *)0,
+
  232. WEAPON("morning star", (char *)0,
1, 0, 0, 12,120, 10,  4,  6, 0, B,  P_MORNING_STAR, IRON, HI_METAL),
+
233.  1, 0, 0, 12,120, 10,  4,  6, 0, B,  P_MORNING_STAR, IRON, HI_METAL),
/* +d4 small, +1 large */
+
234. /* +d4 small, +1 large */
  WEAPON("war hammer", (char *)0,
+
  235. WEAPON("war hammer", (char *)0,
1, 0, 0, 15, 50,  5,  4,  4, 0, B,  P_HAMMER, IRON, HI_METAL),
+
236.  1, 0, 0, 15, 50,  5,  4,  4, 0, B,  P_HAMMER, IRON, HI_METAL),
/* +1 small */
+
237. /* +1 small */
  WEAPON("club", (char *)0,
+
  238. WEAPON("club", (char *)0,
1, 0, 0, 12, 30,  3,  6,  3, 0, B,  P_CLUB, WOOD, HI_WOOD),
+
239.  1, 0, 0, 12, 30,  3,  6,  3, 0, B,  P_CLUB, WOOD, HI_WOOD),
  #ifdef KOPS
+
  240. #ifdef KOPS
  WEAPON("rubber hose", (char *)0,
+
  241. WEAPON("rubber hose", (char *)0,
1, 0, 0,  0, 20,  3,  4,  3, 0, B,  P_WHIP, PLASTIC, CLR_BROWN),
+
242.  1, 0, 0,  0, 20,  3,  4,  3, 0, B,  P_WHIP, PLASTIC, CLR_BROWN),
  #endif
+
  243. #endif
  WEAPON("quarterstaff", "staff",
+
  244. WEAPON("quarterstaff", "staff",
0, 0, 1, 11, 40,  5,  6,  6, 0, B,  P_QUARTERSTAFF, WOOD, HI_WOOD),
+
245.  0, 0, 1, 11, 40,  5,  6,  6, 0, B,  P_QUARTERSTAFF, WOOD, HI_WOOD),
  /* two-piece */
+
  246. /* two-piece */
  WEAPON("aklys", "thonged club",
+
  247. WEAPON("aklys", "thonged club",
0, 0, 0,  8, 15,  4,  6,  3, 0, B,  P_CLUB, IRON, HI_METAL),
+
248.  0, 0, 0,  8, 15,  4,  6,  3, 0, B,  P_CLUB, IRON, HI_METAL),
  WEAPON("flail", (char *)0,
+
  249. WEAPON("flail", (char *)0,
1, 0, 0, 40, 15,  4,  6,  4, 0, B,  P_FLAIL, IRON, HI_METAL),
+
250.  1, 0, 0, 40, 15,  4,  6,  4, 0, B,  P_FLAIL, IRON, HI_METAL),
/* +1 small, +1d4 large */
+
251. /* +1 small, +1d4 large */
  /* misc */
+
  252. /* misc */
  WEAPON("bullwhip", (char *)0,
+
  253. WEAPON("bullwhip", (char *)0,
1, 0, 0,  2, 20,  4,  2,  1, 0, 0,  P_WHIP, LEATHER, CLR_BROWN),
+
254.  1, 0, 0,  2, 20,  4,  2,  1, 0, 0,  P_WHIP, LEATHER, CLR_BROWN),
   
+
  255.
  /* bows */
+
  256. /* bows */
  BOW("bow", (char *)0, 1, 24, 30, 60, 0, WOOD, P_BOW, HI_WOOD),
+
  257. 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),
+
  258. 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),
+
  259. 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),
+
  260. 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),
+
  261. 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),
+
  262. BOW("crossbow", (char *)0, 1, 45, 50, 40, 0, WOOD, P_CROSSBOW, HI_WOOD),
   
+
  263.
  #undef P
+
  264. #undef P
  #undef S
+
  265. #undef S
  #undef B
+
  266. #undef B
   
+
  267.
  #undef WEAPON
+
  268. #undef WEAPON
  #undef PROJECTILE
+
  269. #undef PROJECTILE
  #undef BOW
+
  270. #undef BOW
   
+
  271.
 
=== Armor ===
 
=== Armor ===
 
==== Armor macros ====
 
==== Armor macros ====
  /* armor ... */
+
  272. /* armor ... */
  /* IRON denotes ferrous metals, including steel.
+
  273. /* IRON denotes ferrous metals, including steel.
  * Only IRON weapons and armor can rust.
+
274.  * Only IRON weapons and armor can rust.
  * Only COPPER (including brass) corrodes.
+
275.  * Only COPPER (including brass) corrodes.
  * Some creatures are vulnerable to SILVER.
+
276.  * Some creatures are vulnerable to SILVER.
  */
+
277.  */
  #define ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,sub,metal,c) \
+
  278. #define ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,sub,metal,c) \
OBJECT( \
+
279.  OBJECT( \
OBJ(name,desc), BITS(kn,0,1,0,mgc,1,0,0,blk,0,0,sub,metal), power, \
+
280. OBJ(name,desc), BITS(kn,0,1,0,mgc,1,0,0,blk,0,0,sub,metal), power, \
ARMOR_CLASS, prob, delay, wt, cost, \
+
281. ARMOR_CLASS, prob, delay, wt, cost, \
0, 0, 10 - ac, can, wt, c )
+
282. 0, 0, 10 - ac, can, wt, c )
  #define HELM(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \
+
  283. #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)
+
284.  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) \
+
  285. #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)
+
286.  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) \
+
  287. #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)
+
288.  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) \
+
  289. #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)
+
290.  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) \
+
  291. #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)
+
292.  ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_BOOTS,metal,c)
  
 
==== Helmets ====
 
==== Helmets ====
  
  /* helmets */
+
  293. /* helmets */
  HELM("elven leather helm", "leather hat",
+
  294. HELM("elven leather helm", "leather hat",
0, 0,  0, 6, 1,  3,  8, 9, 0, LEATHER, HI_LEATHER),
+
295. 0, 0,  0, 6, 1,  3,  8, 9, 0, LEATHER, HI_LEATHER),
  HELM("orcish helm", "iron skull cap",
+
  296. HELM("orcish helm", "iron skull cap",
0, 0,  0, 6, 1, 30,  10, 9, 0, IRON, CLR_BLACK),
+
297. 0, 0,  0, 6, 1, 30,  10, 9, 0, IRON, CLR_BLACK),
  HELM("dwarvish iron helm", "hard hat",
+
  298. HELM("dwarvish iron helm", "hard hat",
0, 0,  0, 6, 1, 40,  20, 8, 0, IRON, HI_METAL),
+
299. 0, 0,  0, 6, 1, 40,  20, 8, 0, IRON, HI_METAL),
  HELM("fedora", (char *)0,
+
  300. HELM("fedora", (char *)0,
1, 0,  0, 0, 0,  3,  1,10, 0, CLOTH, CLR_BROWN),
+
301. 1, 0,  0, 0, 0,  3,  1,10, 0, CLOTH, CLR_BROWN),
  HELM("cornuthaum", "conical hat",
+
  302. HELM("cornuthaum", "conical hat",
0, 1,  CLAIRVOYANT,
+
303. 0, 1,  CLAIRVOYANT,
3, 1,  4,  80,10, 2, CLOTH, CLR_BLUE),
+
304. 3, 1,  4,  80,10, 2, CLOTH, CLR_BLUE),
  HELM("dunce cap", "conical hat",
+
  305. HELM("dunce cap", "conical hat",
0, 1,  0, 3, 1,  4,  1,10, 0, CLOTH, CLR_BLUE),
+
306. 0, 1,  0, 3, 1,  4,  1,10, 0, CLOTH, CLR_BLUE),
  HELM("dented pot", (char *)0,
+
  307. HELM("dented pot", (char *)0,
1, 0,  0, 2, 0, 10,  8, 9, 0, IRON, CLR_BLACK),
+
308. 1, 0,  0, 2, 0, 10,  8, 9, 0, IRON, CLR_BLACK),
  /* With shuffled appearances... */
+
  309. /* With shuffled appearances... */
  HELM("helmet", "plumed helmet",
+
  310. HELM("helmet", "plumed helmet",
0, 0,  0,      10, 1, 30,  10, 9, 0, IRON, HI_METAL),
+
311. 0, 0,  0,      10, 1, 30,  10, 9, 0, IRON, HI_METAL),
  HELM("helm of brilliance", "etched helmet",
+
  312. HELM("helm of brilliance", "etched helmet",
0, 1,  0, 6, 1, 50,  50, 9, 0, IRON, CLR_GREEN),
+
313. 0, 1,  0, 6, 1, 50,  50, 9, 0, IRON, CLR_GREEN),
  HELM("helm of opposite alignment", "crested helmet",
+
  314. HELM("helm of opposite alignment", "crested helmet",
0, 1,  0, 6, 1, 50,  50, 9, 0, IRON, HI_METAL),
+
315. 0, 1,  0, 6, 1, 50,  50, 9, 0, IRON, HI_METAL),
  HELM("helm of telepathy", "visored helmet",
+
  316. HELM("helm of telepathy", "visored helmet",
0, 1,  TELEPAT, 2, 1, 50,  50, 9, 0, IRON, HI_METAL),
+
317. 0, 1,  TELEPAT, 2, 1, 50,  50, 9, 0, IRON, HI_METAL),
  
 
==== Suits of Armor ====
 
==== Suits of Armor ====
   
+
  318.
  /* suits of armor */
+
  319. /* suits of armor */
  /*
+
  320. /*
  * There is code in polyself.c that assumes (1) and (2).
+
321.  * 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).
+
322.  * There is code in obj.h, objnam.c, mon.c, read.c that assumes (2).
  *
+
323.  *
  * (1) The dragon scale mails and the dragon scales are together.
+
324.  * (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
+
325.  * (2) That the order of the dragon scale mail and dragon scales is the
  *     the same defined in monst.c.
+
326.  *     the same defined in monst.c.
  */
+
327.  */
  #define DRGN_ARMR(name,mgc,power,cost,ac,color) \
+
  328. #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)
+
329.  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
+
  330. /* 3.4.1: dragon scale mail reclassified as "magic" since magic is
    needed to create them */
+
331.    needed to create them */
  DRGN_ARMR("gray dragon scale mail",  1, ANTIMAGIC,  1200, 1, CLR_GRAY),
+
  332. DRGN_ARMR("gray dragon scale mail",  1, ANTIMAGIC,  1200, 1, CLR_GRAY),
  DRGN_ARMR("silver dragon scale mail", 1, REFLECTING, 1200, 1, DRAGON_SILVER),
+
  333. DRGN_ARMR("silver dragon scale mail", 1, REFLECTING, 1200, 1, DRAGON_SILVER),
  #if 0 /* DEFERRED */
+
  334. #if 0 /* DEFERRED */
  DRGN_ARMR("shimmering dragon scale mail", 1, DISPLACED, 1200, 1, CLR_CYAN),
+
  335. DRGN_ARMR("shimmering dragon scale mail", 1, DISPLACED, 1200, 1, CLR_CYAN),
  #endif
+
  336. #endif
  DRGN_ARMR("red dragon scale mail",    1, FIRE_RES,    900, 1, CLR_RED),
+
  337. 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),
+
  338. 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),
+
  339. 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),
+
  340. 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),
+
  341. 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),
+
  342. 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),
+
  343. DRGN_ARMR("yellow dragon scale mail", 1, ACID_RES,    900, 1, CLR_YELLOW),
   
+
  344.
  /* For now, only dragons leave these. */
+
  345. /* For now, only dragons leave these. */
  /* 3.4.1: dragon scales left classified as "non-magic"; they confer
+
  346. /* 3.4.1: dragon scales left classified as "non-magic"; they confer
    magical properties but are produced "naturally" */
+
347.    magical properties but are produced "naturally" */
  DRGN_ARMR("gray dragon scales",  0, ANTIMAGIC,  700, 7, CLR_GRAY),
+
  348. DRGN_ARMR("gray dragon scales",  0, ANTIMAGIC,  700, 7, CLR_GRAY),
  DRGN_ARMR("silver dragon scales", 0, REFLECTING, 700, 7, DRAGON_SILVER),
+
  349. DRGN_ARMR("silver dragon scales", 0, REFLECTING, 700, 7, DRAGON_SILVER),
  #if 0 /* DEFERRED */
+
  350. #if 0 /* DEFERRED */
  DRGN_ARMR("shimmering dragon scales", 0, DISPLACED,  700, 7, CLR_CYAN),
+
  351. DRGN_ARMR("shimmering dragon scales", 0, DISPLACED,  700, 7, CLR_CYAN),
  #endif
+
  352. #endif
  DRGN_ARMR("red dragon scales",    0, FIRE_RES,  500, 7, CLR_RED),
+
  353. DRGN_ARMR("red dragon scales",    0, FIRE_RES,  500, 7, CLR_RED),
  DRGN_ARMR("white dragon scales",  0, COLD_RES,  500, 7, CLR_WHITE),
+
  354. DRGN_ARMR("white dragon scales",  0, COLD_RES,  500, 7, CLR_WHITE),
  DRGN_ARMR("orange dragon scales", 0, SLEEP_RES,  500, 7, CLR_ORANGE),
+
  355. DRGN_ARMR("orange dragon scales", 0, SLEEP_RES,  500, 7, CLR_ORANGE),
  DRGN_ARMR("black dragon scales",  0, DISINT_RES, 700, 7, CLR_BLACK),
+
  356. DRGN_ARMR("black dragon scales",  0, DISINT_RES, 700, 7, CLR_BLACK),
  DRGN_ARMR("blue dragon scales",  0, SHOCK_RES,  500, 7, CLR_BLUE),
+
  357. DRGN_ARMR("blue dragon scales",  0, SHOCK_RES,  500, 7, CLR_BLUE),
  DRGN_ARMR("green dragon scales",  0, POISON_RES, 500, 7, CLR_GREEN),
+
  358. DRGN_ARMR("green dragon scales",  0, POISON_RES, 500, 7, CLR_GREEN),
  DRGN_ARMR("yellow dragon scales", 0, ACID_RES,  500, 7, CLR_YELLOW),
+
  359. DRGN_ARMR("yellow dragon scales", 0, ACID_RES,  500, 7, CLR_YELLOW),
  #undef DRGN_ARMR
+
  360. #undef DRGN_ARMR
   
+
  361.
  ARMOR("plate mail", (char *)0,
+
  362. ARMOR("plate mail", (char *)0,
1, 0, 1, 0, 44, 5, 450, 600,  3, 2, ARM_SUIT, IRON, HI_METAL),
+
363.  1, 0, 1, 0, 44, 5, 450, 600,  3, 2, ARM_SUIT, IRON, HI_METAL),
  ARMOR("crystal plate mail", (char *)0,
+
  364. ARMOR("crystal plate mail", (char *)0,
1, 0, 1, 0, 10, 5, 450, 820,  3, 2, ARM_SUIT, GLASS, CLR_WHITE),
+
365.  1, 0, 1, 0, 10, 5, 450, 820,  3, 2, ARM_SUIT, GLASS, CLR_WHITE),
  #ifdef TOURIST
+
  366. #ifdef TOURIST
  ARMOR("bronze plate mail", (char *)0,
+
  367. ARMOR("bronze plate mail", (char *)0,
1, 0, 1, 0, 25, 5, 450, 400,  4, 0, ARM_SUIT, COPPER, HI_COPPER),
+
368.  1, 0, 1, 0, 25, 5, 450, 400,  4, 0, ARM_SUIT, COPPER, HI_COPPER),
  #else
+
  369. #else
  ARMOR("bronze plate mail", (char *)0,
+
  370. ARMOR("bronze plate mail", (char *)0,
1, 0, 1, 0, 35, 5, 450, 400,  4, 0, ARM_SUIT, COPPER, HI_COPPER),
+
371.  1, 0, 1, 0, 35, 5, 450, 400,  4, 0, ARM_SUIT, COPPER, HI_COPPER),
  #endif
+
  372. #endif
  ARMOR("splint mail", (char *)0,
+
  373. ARMOR("splint mail", (char *)0,
1, 0, 1, 0, 62, 5, 400,  80,  4, 1, ARM_SUIT, IRON, HI_METAL),
+
374.  1, 0, 1, 0, 62, 5, 400,  80,  4, 1, ARM_SUIT, IRON, HI_METAL),
  ARMOR("banded mail", (char *)0,
+
  375. ARMOR("banded mail", (char *)0,
1, 0, 1, 0, 72, 5, 350,  90,  4, 0, ARM_SUIT, IRON, HI_METAL),
+
376.  1, 0, 1, 0, 72, 5, 350,  90,  4, 0, ARM_SUIT, IRON, HI_METAL),
  ARMOR("dwarvish mithril-coat", (char *)0,
+
  377. ARMOR("dwarvish mithril-coat", (char *)0,
1, 0, 0, 0, 10, 1, 150, 240,  4, 3, ARM_SUIT, MITHRIL, HI_METAL),
+
378.  1, 0, 0, 0, 10, 1, 150, 240,  4, 3, ARM_SUIT, MITHRIL, HI_METAL),
  ARMOR("elven mithril-coat", (char *)0,
+
  379. ARMOR("elven mithril-coat", (char *)0,
1, 0, 0, 0, 15, 1, 150, 240,  5, 3, ARM_SUIT, MITHRIL, HI_METAL),
+
380.  1, 0, 0, 0, 15, 1, 150, 240,  5, 3, ARM_SUIT, MITHRIL, HI_METAL),
  ARMOR("chain mail", (char *)0,
+
  381. ARMOR("chain mail", (char *)0,
1, 0, 0, 0, 72, 5, 300,  75,  5, 1, ARM_SUIT, IRON, HI_METAL),
+
382.  1, 0, 0, 0, 72, 5, 300,  75,  5, 1, ARM_SUIT, IRON, HI_METAL),
  ARMOR("orcish chain mail", "crude chain mail",
+
  383. ARMOR("orcish chain mail", "crude chain mail",
0, 0, 0, 0, 20, 5, 300,  75,  6, 1, ARM_SUIT, IRON, CLR_BLACK),
+
384.  0, 0, 0, 0, 20, 5, 300,  75,  6, 1, ARM_SUIT, IRON, CLR_BLACK),
  ARMOR("scale mail", (char *)0,
+
  385. ARMOR("scale mail", (char *)0,
1, 0, 0, 0, 72, 5, 250,  45,  6, 0, ARM_SUIT, IRON, HI_METAL),
+
386.  1, 0, 0, 0, 72, 5, 250,  45,  6, 0, ARM_SUIT, IRON, HI_METAL),
  ARMOR("studded leather armor", (char *)0,
+
  387. ARMOR("studded leather armor", (char *)0,
1, 0, 0, 0, 72, 3, 200,  15,  7, 1, ARM_SUIT, LEATHER, HI_LEATHER),
+
388.  1, 0, 0, 0, 72, 3, 200,  15,  7, 1, ARM_SUIT, LEATHER, HI_LEATHER),
  ARMOR("ring mail", (char *)0,
+
  389. ARMOR("ring mail", (char *)0,
1, 0, 0, 0, 72, 5, 250, 100,  7, 0, ARM_SUIT, IRON, HI_METAL),
+
390.  1, 0, 0, 0, 72, 5, 250, 100,  7, 0, ARM_SUIT, IRON, HI_METAL),
  ARMOR("orcish ring mail", "crude ring mail",
+
  391. ARMOR("orcish ring mail", "crude ring mail",
0, 0, 0, 0, 20, 5, 250,  80,  8, 1, ARM_SUIT, IRON, CLR_BLACK),
+
392.  0, 0, 0, 0, 20, 5, 250,  80,  8, 1, ARM_SUIT, IRON, CLR_BLACK),
  ARMOR("leather armor", (char *)0,
+
  393. ARMOR("leather armor", (char *)0,
1, 0, 0, 0, 82, 3, 150,  5,  8, 0, ARM_SUIT, LEATHER, HI_LEATHER),
+
394.  1, 0, 0, 0, 82, 3, 150,  5,  8, 0, ARM_SUIT, LEATHER, HI_LEATHER),
  ARMOR("leather jacket", (char *)0,
+
  395. ARMOR("leather jacket", (char *)0,
1, 0, 0, 0, 12, 0, 30,  10,  9, 0, ARM_SUIT, LEATHER, CLR_BLACK),
+
396.  1, 0, 0, 0, 12, 0, 30,  10,  9, 0, ARM_SUIT, LEATHER, CLR_BLACK),
   
+
  397.
  #ifdef TOURIST
+
  398. #ifdef TOURIST
  /* shirts */
+
  399. /* shirts */
  ARMOR("Hawaiian shirt", (char *)0,
+
  400. ARMOR("Hawaiian shirt", (char *)0,
1, 0, 0, 0, 8, 0, 5,  3, 10, 0, ARM_SHIRT, CLOTH, CLR_MAGENTA),
+
401.  1, 0, 0, 0, 8, 0, 5,  3, 10, 0, ARM_SHIRT, CLOTH, CLR_MAGENTA),
  ARMOR("T-shirt", (char *)0,
+
  402. ARMOR("T-shirt", (char *)0,
1, 0, 0, 0, 2, 0, 5,  2, 10, 0, ARM_SHIRT, CLOTH, CLR_WHITE),
+
403.  1, 0, 0, 0, 2, 0, 5,  2, 10, 0, ARM_SHIRT, CLOTH, CLR_WHITE),
  #endif
+
  404. #endif
   
+
  405.
 
==== Cloaks ====
 
==== Cloaks ====
  
  /* cloaks */
+
  406. /* cloaks */
  /*  'cope' is not a spelling mistake... leave it be */
+
  407. /*  'cope' is not a spelling mistake... leave it be */
  CLOAK("mummy wrapping", (char *)0,
+
  408. CLOAK("mummy wrapping", (char *)0,
1, 0, 0,     0, 0,  3,  2, 10, 1, CLOTH, CLR_GRAY),
+
409. 1, 0, 0,     0, 0,  3,  2, 10, 1, CLOTH, CLR_GRAY),
  CLOAK("elven cloak", "faded pall",
+
  410. CLOAK("elven cloak", "faded pall",
0, 1, STEALTH,    8, 0, 10, 60,  9, 3, CLOTH, CLR_BLACK),
+
411. 0, 1, STEALTH,    8, 0, 10, 60,  9, 3, CLOTH, CLR_BLACK),
  CLOAK("orcish cloak", "coarse mantelet",
+
  412. CLOAK("orcish cloak", "coarse mantelet",
0, 0, 0,     8, 0, 10, 40, 10, 2, CLOTH, CLR_BLACK),
+
413. 0, 0, 0,     8, 0, 10, 40, 10, 2, CLOTH, CLR_BLACK),
  CLOAK("dwarvish cloak", "hooded cloak",
+
  414. CLOAK("dwarvish cloak", "hooded cloak",
0, 0, 0,     8, 0, 10, 50, 10, 2, CLOTH, HI_CLOTH),
+
415. 0, 0, 0,     8, 0, 10, 50, 10, 2, CLOTH, HI_CLOTH),
  CLOAK("oilskin cloak", "slippery cloak",
+
  416. CLOAK("oilskin cloak", "slippery cloak",
0, 0, 0,     8, 0, 10, 50,  9, 3, CLOTH, HI_CLOTH),
+
417. 0, 0, 0,     8, 0, 10, 50,  9, 3, CLOTH, HI_CLOTH),
  CLOAK("robe", (char *)0,
+
  418. CLOAK("robe", (char *)0,
1, 1, 0,     3, 0, 15, 50,  8, 3, CLOTH, CLR_RED),
+
419. 1, 1, 0,     3, 0, 15, 50,  8, 3, CLOTH, CLR_RED),
  CLOAK("alchemy smock", "apron",
+
  420. CLOAK("alchemy smock", "apron",
0, 1, POISON_RES, 9, 0, 10, 50,  9, 1, CLOTH, CLR_WHITE),
+
421. 0, 1, POISON_RES, 9, 0, 10, 50,  9, 1, CLOTH, CLR_WHITE),
  CLOAK("leather cloak", (char *)0,
+
  422. CLOAK("leather cloak", (char *)0,
1, 0, 0,     8, 0, 15, 40,  9, 1, LEATHER, CLR_BROWN),
+
423. 1, 0, 0,     8, 0, 15, 40,  9, 1, LEATHER, CLR_BROWN),
  /* With shuffled appearances... */
+
  424. /* With shuffled appearances... */
  CLOAK("cloak of protection", "tattered cape",
+
  425. CLOAK("cloak of protection", "tattered cape",
0, 1, PROTECTION, 9, 0, 10, 50,  7, 3, CLOTH, HI_CLOTH),
+
426. 0, 1, PROTECTION, 9, 0, 10, 50,  7, 3, CLOTH, HI_CLOTH),
  CLOAK("cloak of invisibility", "opera cloak",
+
  427. CLOAK("cloak of invisibility", "opera cloak",
0, 1, INVIS,   10, 0, 10, 60,  9, 2, CLOTH, CLR_BRIGHT_MAGENTA),
+
428. 0, 1, INVIS,   10, 0, 10, 60,  9, 2, CLOTH, CLR_BRIGHT_MAGENTA),
  CLOAK("cloak of magic resistance", "ornamental cope",
+
  429. CLOAK("cloak of magic resistance", "ornamental cope",
0, 1, ANTIMAGIC,  2, 0, 10, 60,  9, 3, CLOTH, CLR_WHITE),
+
430. 0, 1, ANTIMAGIC,  2, 0, 10, 60,  9, 3, CLOTH, CLR_WHITE),
  CLOAK("cloak of displacement", "piece of cloth",
+
  431. CLOAK("cloak of displacement", "piece of cloth",
0, 1, DISPLACED, 10, 0, 10, 50,  9, 2, CLOTH, HI_CLOTH),
+
432. 0, 1, DISPLACED, 10, 0, 10, 50,  9, 2, CLOTH, HI_CLOTH),
   
+
  433.
 
==== Shields ====
 
==== Shields ====
  
  /* shields */
+
  434. /* shields */
  SHIELD("small shield", (char *)0,
+
  435. SHIELD("small shield", (char *)0,
1, 0, 0, 0,     6, 0, 30, 3,  9, 0, WOOD, HI_WOOD),
+
436. 1, 0, 0, 0,     6, 0, 30, 3,  9, 0, WOOD, HI_WOOD),
  SHIELD("elven shield", "blue and green shield",
+
  437. SHIELD("elven shield", "blue and green shield",
0, 0, 0, 0,     2, 0, 40, 7,  8, 0, WOOD, CLR_GREEN),
+
438. 0, 0, 0, 0,     2, 0, 40, 7,  8, 0, WOOD, CLR_GREEN),
  SHIELD("Uruk-hai shield", "white-handed shield",
+
  439. SHIELD("Uruk-hai shield", "white-handed shield",
0, 0, 0, 0,     2, 0, 50, 7,  9, 0, IRON, HI_METAL),
+
440. 0, 0, 0, 0,     2, 0, 50, 7,  9, 0, IRON, HI_METAL),
  SHIELD("orcish shield", "red-eyed shield",
+
  441. SHIELD("orcish shield", "red-eyed shield",
0, 0, 0, 0,     2, 0, 50, 7,  9, 0, IRON, CLR_RED),
+
442. 0, 0, 0, 0,     2, 0, 50, 7,  9, 0, IRON, CLR_RED),
  SHIELD("large shield", (char *)0,
+
  443. SHIELD("large shield", (char *)0,
1, 0, 1, 0,     7, 0,100, 10,  8, 0, IRON, HI_METAL),
+
444. 1, 0, 1, 0,     7, 0,100, 10,  8, 0, IRON, HI_METAL),
  SHIELD("dwarvish roundshield", "large round shield",
+
  445. SHIELD("dwarvish roundshield", "large round shield",
0, 0, 0, 0,     4, 0,100, 10,  8, 0, IRON, HI_METAL),
+
446. 0, 0, 0, 0,     4, 0,100, 10,  8, 0, IRON, HI_METAL),
  SHIELD("shield of reflection", "polished silver shield",
+
  447. SHIELD("shield of reflection", "polished silver shield",
0, 1, 0, REFLECTING, 3, 0, 50, 50,  8, 0, SILVER, HI_SILVER),
+
448. 0, 1, 0, REFLECTING, 3, 0, 50, 50,  8, 0, SILVER, HI_SILVER),
   
+
  449.
 
==== Gloves ====
 
==== Gloves ====
  
  /* gloves */
+
  450. /* gloves */
  /* these have their color but not material shuffled, so the IRON must stay
+
  451. /* these have their color but not material shuffled, so the IRON must stay
  * CLR_BROWN (== HI_LEATHER)
+
452.  * CLR_BROWN (== HI_LEATHER)
  */
+
453.  */
  GLOVES("leather gloves", "old gloves",
+
  454. GLOVES("leather gloves", "old gloves",
0, 0,  0,   16, 1, 10,  8,  9, 0, LEATHER, HI_LEATHER),
+
455. 0, 0,  0,   16, 1, 10,  8,  9, 0, LEATHER, HI_LEATHER),
  GLOVES("gauntlets of fumbling", "padded gloves",
+
  456. GLOVES("gauntlets of fumbling", "padded gloves",
0, 1,  FUMBLING,  8, 1, 10, 50,  9, 0, LEATHER, HI_LEATHER),
+
457. 0, 1,  FUMBLING,  8, 1, 10, 50,  9, 0, LEATHER, HI_LEATHER),
  GLOVES("gauntlets of power", "riding gloves",
+
  458. GLOVES("gauntlets of power", "riding gloves",
0, 1,  0,   8, 1, 30, 50,  9, 0, IRON, CLR_BROWN),
+
459. 0, 1,  0,   8, 1, 30, 50,  9, 0, IRON, CLR_BROWN),
  GLOVES("gauntlets of dexterity", "fencing gloves",
+
  460. GLOVES("gauntlets of dexterity", "fencing gloves",
0, 1,  0,   8, 1, 10, 50,  9, 0, LEATHER, HI_LEATHER),
+
461. 0, 1,  0,   8, 1, 10, 50,  9, 0, LEATHER, HI_LEATHER),
   
+
  462.
 
==== Boots ====
 
==== Boots ====
  
  /* boots */
+
  463. /* boots */
  BOOTS("low boots", "walking shoes",
+
  464. BOOTS("low boots", "walking shoes",
0, 0,  0,   25, 2, 10,  8,  9, 0, LEATHER, HI_LEATHER),
+
465. 0, 0,  0,   25, 2, 10,  8,  9, 0, LEATHER, HI_LEATHER),
  BOOTS("iron shoes", "hard shoes",
+
  466. BOOTS("iron shoes", "hard shoes",
0, 0,  0,   7, 2, 50, 16,  8, 0, IRON, HI_METAL),
+
467. 0, 0,  0,   7, 2, 50, 16,  8, 0, IRON, HI_METAL),
  BOOTS("high boots", "jackboots",
+
  468. BOOTS("high boots", "jackboots",
0, 0,  0,   15, 2, 20, 12,  8, 0, LEATHER, HI_LEATHER),
+
469. 0, 0,  0,   15, 2, 20, 12,  8, 0, LEATHER, HI_LEATHER),
  /* With shuffled appearances... */
+
  470. /* With shuffled appearances... */
  BOOTS("speed boots", "combat boots",
+
  471. BOOTS("speed boots", "combat boots",
0, 1,  FAST,   12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),
+
472. 0, 1,  FAST,   12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),
  BOOTS("water walking boots", "jungle boots",
+
  473. BOOTS("water walking boots", "jungle boots",
0, 1,  WWALKING,  12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),
+
474. 0, 1,  WWALKING,  12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),
  BOOTS("jumping boots", "hiking boots",
+
  475. BOOTS("jumping boots", "hiking boots",
0, 1,  JUMPING,  12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),
+
476. 0, 1,  JUMPING,  12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),
  BOOTS("elven boots", "mud boots",
+
  477. BOOTS("elven boots", "mud boots",
0, 1,  STEALTH,  12, 2, 15,  8,  9, 0, LEATHER, HI_LEATHER),
+
478. 0, 1,  STEALTH,  12, 2, 15,  8,  9, 0, LEATHER, HI_LEATHER),
  BOOTS("kicking boots", "buckled boots",
+
  479. BOOTS("kicking boots", "buckled boots",
0, 1,  0,        12, 2, 15,  8,  9, 0, IRON, CLR_BROWN),
+
480. 0, 1,  0,        12, 2, 15,  8,  9, 0, IRON, CLR_BROWN),
  BOOTS("fumble boots", "riding boots",
+
  481. BOOTS("fumble boots", "riding boots",
0, 1,  FUMBLING,  12, 2, 20, 30,  9, 0, LEATHER, HI_LEATHER),
+
482. 0, 1,  FUMBLING,  12, 2, 20, 30,  9, 0, LEATHER, HI_LEATHER),
  BOOTS("levitation boots", "snow boots",
+
  483. BOOTS("levitation boots", "snow boots",
0, 1,  LEVITATION,12, 2, 15, 30,  9, 0, LEATHER, HI_LEATHER),
+
484. 0, 1,  LEVITATION,12, 2, 15, 30,  9, 0, LEATHER, HI_LEATHER),
  #undef HELM
+
  485. #undef HELM
  #undef CLOAK
+
  486. #undef CLOAK
  #undef SHIELD
+
  487. #undef SHIELD
  #undef GLOVES
+
  488. #undef GLOVES
  #undef BOOTS
+
  489. #undef BOOTS
  #undef ARMOR
+
  490. #undef ARMOR
  
 
=== Rings ===
 
=== Rings ===
  
  /* rings ... */
+
  491. /* rings ... */
  #define RING(name,power,stone,cost,mgc,spec,mohs,metal,color) OBJECT( \
+
  492. #define RING(name,power,stone,cost,mgc,spec,mohs,metal,color) OBJECT( \
OBJ(name,stone), \
+
493. OBJ(name,stone), \
BITS(0,0,spec,0,mgc,spec,0,0,0,HARDGEM(mohs),0,P_NONE,metal), \
+
494. 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 )
+
495. power, RING_CLASS, 0, 0, 3, cost, 0, 0, 0, 0, 15, color )
  RING("adornment", ADORNED, "wooden",        100, 1, 1, 2, WOOD, HI_WOOD),
+
  496. RING("adornment", ADORNED, "wooden",        100, 1, 1, 2, WOOD, HI_WOOD),
  RING("gain strength", 0, "granite",        150, 1, 1, 7, MINERAL, HI_MINERAL),
+
  497. RING("gain strength", 0, "granite",        150, 1, 1, 7, MINERAL, HI_MINERAL),
  RING("gain constitution", 0, "opal",        150, 1, 1, 7, MINERAL,  HI_MINERAL),
+
  498. RING("gain constitution", 0, "opal",        150, 1, 1, 7, MINERAL,  HI_MINERAL),
  RING("increase accuracy", 0, "clay",        150, 1, 1, 4, MINERAL, CLR_RED),
+
  499. RING("increase accuracy", 0, "clay",        150, 1, 1, 4, MINERAL, CLR_RED),
  RING("increase damage", 0, "coral",        150, 1, 1, 4, MINERAL, CLR_ORANGE),
+
  500. RING("increase damage", 0, "coral",        150, 1, 1, 4, MINERAL, CLR_ORANGE),
  RING("protection", PROTECTION, "black onyx",100, 1, 1, 7, MINERAL, CLR_BLACK),
+
  501. RING("protection", PROTECTION, "black onyx",100, 1, 1, 7, MINERAL, CLR_BLACK),
  RING("regeneration", REGENERATION, "moonstone",
+
  502. RING("regeneration", REGENERATION, "moonstone",
    200, 1, 0, 6, MINERAL, HI_MINERAL),
+
503.       200, 1, 0, 6, MINERAL, HI_MINERAL),
  RING("searching", SEARCHING, "tiger eye",  200, 1, 0, 6, GEMSTONE, CLR_BROWN),
+
  504. RING("searching", SEARCHING, "tiger eye",  200, 1, 0, 6, GEMSTONE, CLR_BROWN),
  RING("stealth", STEALTH, "jade",            100, 1, 0, 6, GEMSTONE, CLR_GREEN),
+
  505. RING("stealth", STEALTH, "jade",            100, 1, 0, 6, GEMSTONE, CLR_GREEN),
  RING("sustain ability", FIXED_ABIL, "bronze",
+
  506. RING("sustain ability", FIXED_ABIL, "bronze",
    100, 1, 0, 4, COPPER, HI_COPPER),
+
507.       100, 1, 0, 4, COPPER, HI_COPPER),
  RING("levitation", LEVITATION, "agate",    200, 1, 0, 7, GEMSTONE, CLR_RED),
+
  508. RING("levitation", LEVITATION, "agate",    200, 1, 0, 7, GEMSTONE, CLR_RED),
  RING("hunger", HUNGER, "topaz",            100, 1, 0, 8, GEMSTONE, CLR_CYAN),
+
  509. RING("hunger", HUNGER, "topaz",            100, 1, 0, 8, GEMSTONE, CLR_CYAN),
  RING("aggravate monster", AGGRAVATE_MONSTER, "sapphire",
+
  510. RING("aggravate monster", AGGRAVATE_MONSTER, "sapphire",
    150, 1, 0, 9, GEMSTONE, CLR_BLUE),
+
511.       150, 1, 0, 9, GEMSTONE, CLR_BLUE),
  RING("conflict", CONFLICT, "ruby",          300, 1, 0, 9, GEMSTONE, CLR_RED),
+
  512. RING("conflict", CONFLICT, "ruby",          300, 1, 0, 9, GEMSTONE, CLR_RED),
  RING("warning", WARNING, "diamond",        100, 1, 0,10, GEMSTONE, CLR_WHITE),
+
  513. RING("warning", WARNING, "diamond",        100, 1, 0,10, GEMSTONE, CLR_WHITE),
  RING("poison resistance", POISON_RES, "pearl",
+
  514. RING("poison resistance", POISON_RES, "pearl",
    150, 1, 0, 4, IRON, CLR_WHITE),
+
515.       150, 1, 0, 4, IRON, CLR_WHITE),
  RING("fire resistance", FIRE_RES, "iron",  200, 1, 0, 5, IRON, HI_METAL),
+
  516. 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),
+
  517. RING("cold resistance", COLD_RES, "brass",  150, 1, 0, 4, COPPER, HI_COPPER),
  RING("shock resistance", SHOCK_RES, "copper",
+
  518. RING("shock resistance", SHOCK_RES, "copper",
    150, 1, 0, 3, COPPER, HI_COPPER),
+
519.       150, 1, 0, 3, COPPER, HI_COPPER),
  RING("free action",    FREE_ACTION, "twisted",
+
  520. RING("free action",    FREE_ACTION, "twisted",
    200, 1, 0, 6, IRON, HI_METAL),
+
521.       200, 1, 0, 6, IRON, HI_METAL),
  RING("slow digestion",  SLOW_DIGESTION, "steel",
+
  522. RING("slow digestion",  SLOW_DIGESTION, "steel",
    200, 1, 0, 8, IRON, HI_METAL),
+
523.       200, 1, 0, 8, IRON, HI_METAL),
  RING("teleportation", TELEPORT, "silver",  200, 1, 0, 3, SILVER, HI_SILVER),
+
  524. RING("teleportation", TELEPORT, "silver",  200, 1, 0, 3, SILVER, HI_SILVER),
  RING("teleport control", TELEPORT_CONTROL, "gold",
+
  525. RING("teleport control", TELEPORT_CONTROL, "gold",
    300, 1, 0, 3, GOLD, HI_GOLD),
+
526.       300, 1, 0, 3, GOLD, HI_GOLD),
  RING("polymorph", POLYMORPH, "ivory",      300, 1, 0, 4, BONE, CLR_WHITE),
+
  527. RING("polymorph", POLYMORPH, "ivory",      300, 1, 0, 4, BONE, CLR_WHITE),
  RING("polymorph control", POLYMORPH_CONTROL, "emerald",
+
  528. RING("polymorph control", POLYMORPH_CONTROL, "emerald",
    300, 1, 0, 8, GEMSTONE, CLR_BRIGHT_GREEN),
+
529.       300, 1, 0, 8, GEMSTONE, CLR_BRIGHT_GREEN),
  RING("invisibility", INVIS, "wire",        150, 1, 0, 5, IRON, HI_METAL),
+
  530. RING("invisibility", INVIS, "wire",        150, 1, 0, 5, IRON, HI_METAL),
  RING("see invisible", SEE_INVIS, "engagement",
+
  531. RING("see invisible", SEE_INVIS, "engagement",
    150, 1, 0, 5, IRON, HI_METAL),
+
532.       150, 1, 0, 5, IRON, HI_METAL),
  RING("protection from shape changers", PROT_FROM_SHAPE_CHANGERS, "shiny",
+
  533. RING("protection from shape changers", PROT_FROM_SHAPE_CHANGERS, "shiny",
    100, 1, 0, 5, IRON, CLR_BRIGHT_CYAN),
+
534.       100, 1, 0, 5, IRON, CLR_BRIGHT_CYAN),
  #undef RING
+
  535. #undef RING
   
+
  536.
 
=== Amulets ===
 
=== Amulets ===
  
  /* amulets ... - THE Amulet comes last because it is special */
+
  537. /* amulets ... - THE Amulet comes last because it is special */
  #define AMULET(name,desc,power,prob) OBJECT( \
+
  538. #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, \
+
539. 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 )
+
540. AMULET_CLASS, prob, 0, 20, 150, 0, 0, 0, 0, 20, HI_METAL )
   
+
  541.
  AMULET("amulet of ESP",          "circular",  TELEPAT,    175),
+
  542. AMULET("amulet of ESP",          "circular",  TELEPAT,    175),
  AMULET("amulet of life saving",  "spherical",  LIFESAVED,  75),
+
  543. AMULET("amulet of life saving",  "spherical",  LIFESAVED,  75),
  AMULET("amulet of strangulation", "oval",      STRANGLED,  135),
+
  544. AMULET("amulet of strangulation", "oval",      STRANGLED,  135),
  AMULET("amulet of restful sleep", "triangular", SLEEPING,  135),
+
  545. AMULET("amulet of restful sleep", "triangular", SLEEPING,  135),
  AMULET("amulet versus poison",    "pyramidal",  POISON_RES, 165),
+
  546. AMULET("amulet versus poison",    "pyramidal",  POISON_RES, 165),
  AMULET("amulet of change",        "square",    0,          130),
+
  547. AMULET("amulet of change",        "square",    0,          130),
/* POLYMORPH */
+
548. /* POLYMORPH */
  AMULET("amulet of unchanging",    "concave",    UNCHANGING, 45),
+
  549. AMULET("amulet of unchanging",    "concave",    UNCHANGING, 45),
  AMULET("amulet of reflection",    "hexagonal",  REFLECTING,  75),
+
  550. AMULET("amulet of reflection",    "hexagonal",  REFLECTING,  75),
  AMULET("amulet of magical breathing", "octagonal",      MAGICAL_BREATHING, 65),
+
  551. AMULET("amulet of magical breathing", "octagonal",      MAGICAL_BREATHING, 65),
  OBJECT(OBJ("cheap plastic imitation of the Amulet of Yendor",
+
  552. 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,
+
553.  "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),
+
554.  AMULET_CLASS, 0, 0, 20,    0, 0, 0, 0, 0,  1, HI_METAL),
  OBJECT(OBJ("Amulet of Yendor", /* note: description == name */
+
  555. 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,
+
556.  "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),
+
557.  AMULET_CLASS, 0, 0, 20, 30000, 0, 0, 0, 0, 20, HI_METAL),
  #undef AMULET
+
  558. #undef AMULET
   
+
  559.
 
=== Tools ===
 
=== Tools ===
  
  /* tools ... */
+
  560. /* tools ... */
  /* tools with weapon characteristics come last */
+
  561. /* tools with weapon characteristics come last */
  #define TOOL(name,desc,kn,mrg,mgc,chg,prob,wt,cost,mat,color) \
+
  562. #define TOOL(name,desc,kn,mrg,mgc,chg,prob,wt,cost,mat,color) \
OBJECT( OBJ(name,desc), \
+
563.  OBJECT( OBJ(name,desc), \
BITS(kn,mrg,chg,0,mgc,chg,0,0,0,0,0,P_NONE,mat), \
+
564. BITS(kn,mrg,chg,0,mgc,chg,0,0,0,0,0,P_NONE,mat), \
0, TOOL_CLASS, prob, 0, \
+
565. 0, TOOL_CLASS, prob, 0, \
wt, cost, 0, 0, 0, 0, wt, color )
+
566. wt, cost, 0, 0, 0, 0, wt, color )
  #define CONTAINER(name,desc,kn,mgc,chg,prob,wt,cost,mat,color) \
+
  567. #define CONTAINER(name,desc,kn,mgc,chg,prob,wt,cost,mat,color) \
OBJECT( OBJ(name,desc), \
+
568.  OBJECT( OBJ(name,desc), \
BITS(kn,0,chg,1,mgc,chg,0,0,0,0,0,P_NONE,mat), \
+
569. BITS(kn,0,chg,1,mgc,chg,0,0,0,0,0,P_NONE,mat), \
0, TOOL_CLASS, prob, 0, \
+
570. 0, TOOL_CLASS, prob, 0, \
wt, cost, 0, 0, 0, 0, wt, color )
+
571. wt, cost, 0, 0, 0, 0, wt, color )
  #define WEPTOOL(name,desc,kn,mgc,bi,prob,wt,cost,sdam,ldam,hitbon,sub,mat,clr) \
+
  572. #define WEPTOOL(name,desc,kn,mgc,bi,prob,wt,cost,sdam,ldam,hitbon,sub,mat,clr) \
OBJECT( OBJ(name,desc), \
+
573.  OBJECT( OBJ(name,desc), \
BITS(kn,0,1,0,mgc,1,0,0,bi,0,hitbon,sub,mat), \
+
574. BITS(kn,0,1,0,mgc,1,0,0,bi,0,hitbon,sub,mat), \
0, TOOL_CLASS, prob, 0, \
+
575. 0, TOOL_CLASS, prob, 0, \
wt, cost, sdam, ldam, hitbon, 0, wt, clr )
+
576. wt, cost, sdam, ldam, hitbon, 0, wt, clr )
  /* containers */
+
  577. /* containers */
  CONTAINER("large box", (char *)0,      1, 0, 0,  40,350,  8, WOOD, HI_WOOD),
+
  578. 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),
+
  579. 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),
+
  580. 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),
+
  581. 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),
+
  582. 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),
+
  583. 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),
+
  584. CONTAINER("bag of tricks", "bag",      0, 1, 1,  20, 15, 100, CLOTH, HI_CLOTH),
  #undef CONTAINER
+
  585. #undef CONTAINER
   
+
  586.
  /* lock opening tools */
+
  587. /* lock opening tools */
  TOOL("skeleton key", "key",    0, 0, 0, 0,  80,  3,  10, IRON, HI_METAL),
+
  588. TOOL("skeleton key", "key",    0, 0, 0, 0,  80,  3,  10, IRON, HI_METAL),
  #ifdef TOURIST
+
  589. #ifdef TOURIST
  TOOL("lock pick", (char *)0,    1, 0, 0, 0,  60,  4,  20, IRON, HI_METAL),
+
  590. 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),
+
  591. TOOL("credit card", (char *)0,  1, 0, 0, 0,  15,  1,  10, PLASTIC, CLR_WHITE),
  #else
+
  592. #else
  TOOL("lock pick", (char *)0,    1, 0, 0, 0,  75,  4,  20, IRON, HI_METAL),
+
  593. TOOL("lock pick", (char *)0,    1, 0, 0, 0,  75,  4,  20, IRON, HI_METAL),
  #endif
+
  594. #endif
  /* light sources */
+
  595. /* light sources */
  TOOL("tallow candle", "candle", 0, 1, 0, 0,  20,  2,  10, WAX, CLR_WHITE),
+
  596. 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),
+
  597. 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),
+
  598. 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),
+
  599. 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),
+
  600. TOOL("magic lamp", "lamp",      0, 0, 1, 0,  15, 20,  50, COPPER, CLR_YELLOW),
  /* other tools */
+
  601. /* other tools */
  #ifdef TOURIST
+
  602. #ifdef TOURIST
  TOOL("expensive camera", (char *)0,
+
  603. TOOL("expensive camera", (char *)0,
1, 0, 0, 1,  15, 12, 200, PLASTIC, CLR_BLACK),
+
604. 1, 0, 0, 1,  15, 12, 200, PLASTIC, CLR_BLACK),
  TOOL("mirror", "looking glass", 0, 0, 0, 0,  45, 13,  10, GLASS, HI_SILVER),
+
  605. TOOL("mirror", "looking glass", 0, 0, 0, 0,  45, 13,  10, GLASS, HI_SILVER),
  #else
+
  606. #else
  TOOL("mirror", "looking glass", 0, 0, 0, 0,  60, 13,  10, GLASS, HI_SILVER),
+
  607. TOOL("mirror", "looking glass", 0, 0, 0, 0,  60, 13,  10, GLASS, HI_SILVER),
  #endif
+
  608. #endif
  TOOL("crystal ball", "glass orb",
+
  609. TOOL("crystal ball", "glass orb",
0, 0, 1, 1,  15,150,  60, GLASS, HI_GLASS),
+
610. 0, 0, 1, 1,  15,150,  60, GLASS, HI_GLASS),
  TOOL("lenses", (char *)0, 1, 0, 0, 0,  5,  3,  80, GLASS, HI_GLASS),
+
  611. 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),
+
  612. 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),
+
  613. TOOL("towel", (char *)0,        1, 0, 0, 0,  50,  2,  50, CLOTH, CLR_MAGENTA),
  #ifdef STEED
+
  614. #ifdef STEED
  TOOL("saddle", (char *)0,      1, 0, 0, 0,  5,200, 150, LEATHER, HI_LEATHER),
+
  615. 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),
+
  616. TOOL("leash", (char *)0,        1, 0, 0, 0,  65, 12,  20, LEATHER, HI_LEATHER),
  #else
+
  617. #else
  TOOL("leash", (char *)0,        1, 0, 0, 0,  70, 12,  20, LEATHER, HI_LEATHER),
+
  618. TOOL("leash", (char *)0,        1, 0, 0, 0,  70, 12,  20, LEATHER, HI_LEATHER),
  #endif
+
  619. #endif
  TOOL("stethoscope", (char *)0,  1, 0, 0, 0,  25,  4,  75, IRON, HI_METAL),
+
  620. 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),
+
  621. 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),
+
  622. 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),
+
  623. 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),
+
  624. 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),
+
  625. TOOL("magic marker", (char *)0, 1, 0, 1, 1,  15,  2,  50, PLASTIC, CLR_RED),
  /* traps */
+
  626. /* traps */
  TOOL("land mine",(char *)0,    1, 0, 0, 0,  0,300, 180, IRON, CLR_RED),
+
  627. 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),
+
  628. TOOL("beartrap", (char *)0,    1, 0, 0, 0,  0,200,  60, IRON, HI_METAL),
  /* instruments */
+
  629. /* instruments */
  TOOL("tin whistle", "whistle",  0, 0, 0, 0, 100,  3,  10, METAL, HI_METAL),
+
  630. 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),
+
  631. 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?" */
+
  632. /* "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),
+
  633. 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),
+
  634. TOOL("magic flute", "flute",    0, 0, 1, 1,  2,  5,  36, WOOD, HI_WOOD),
  TOOL("tooled horn&quot;, &amp;quot;horn",    0, 0, 0, 0,  5, 18,  15, BONE, CLR_WHITE),
+
  635. TOOL("tooled horn&quot;, &amp;quot;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),
+
  636. 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),
+
  637. 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),
+
  638. 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),
+
  639. 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),
+
  640. 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),
+
  641. 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),
+
  642. 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),
+
  643. TOOL("leather drum", "drum",    0, 0, 0, 0,  4, 25,  25, LEATHER, HI_LEATHER),
  TOOL("drum of earthquake", "drum",
+
  644. TOOL("drum of earthquake", "drum",
0, 0, 1, 1,  2, 25,  25, LEATHER, HI_LEATHER),
+
645. 0, 0, 1, 1,  2, 25,  25, LEATHER, HI_LEATHER),
  /* tools useful as weapons */
+
  646. /* tools useful as weapons */
  WEPTOOL("pick-axe", (char *)0,
+
  647. WEPTOOL("pick-axe", (char *)0,
1, 0, 0, 20, 100,  50, 6,  3, WHACK,  P_PICK_AXE, IRON, HI_METAL),
+
648.  1, 0, 0, 20, 100,  50, 6,  3, WHACK,  P_PICK_AXE, IRON, HI_METAL),
  WEPTOOL("grappling hook", "iron hook",
+
  649. WEPTOOL("grappling hook", "iron hook",
0, 0, 0,  5,  30,  50,  2,  6, WHACK,  P_FLAIL, IRON, HI_METAL),
+
650.  0, 0, 0,  5,  30,  50,  2,  6, WHACK,  P_FLAIL, IRON, HI_METAL),
  /* 3.4.1: unicorn horn left classified as "magic" */
+
  651. /* 3.4.1: unicorn horn left classified as "magic" */
  WEPTOOL("unicorn horn", (char *)0,
+
  652. WEPTOOL("unicorn horn", (char *)0,
1, 1, 1,  0,  20, 100, 12, 12, PIERCE, P_UNICORN_HORN, BONE, CLR_WHITE),
+
653.  1, 1, 1,  0,  20, 100, 12, 12, PIERCE, P_UNICORN_HORN, BONE, CLR_WHITE),
   
+
  654.
  /* two special unique artifact "tools" */
+
  655. /* two special unique artifact "tools" */
  OBJECT(OBJ("Candelabrum of Invocation", "candelabrum"),
+
  656. OBJECT(OBJ("Candelabrum of Invocation", "candelabrum"),
BITS(0,0,1,0,1,0,1,1,0,0,0,P_NONE,GOLD), 0,
+
657. 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),
+
658. TOOL_CLASS, 0, 0,10, 5000, 0, 0, 0, 0, 200, HI_GOLD),
  OBJECT(OBJ("Bell of Opening", "silver bell"),
+
  659. OBJECT(OBJ("Bell of Opening", "silver bell"),
BITS(0,0,1,0,1,1,1,1,0,0,0,P_NONE,SILVER), 0,
+
660. 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),
+
661. TOOL_CLASS, 0, 0,10, 5000, 0, 0, 0, 0, 50, HI_SILVER),
  #undef TOOL
+
  662. #undef TOOL
  #undef WEPTOOL
+
  663. #undef WEPTOOL
   
+
  664.
 
=== Comestibles ===
 
=== Comestibles ===
  
  /* Comestibles ... */
+
  665. /* Comestibles ... */
  #define FOOD(name,prob,delay,wt,unk,tin,nutrition,color) OBJECT( \
+
  666. #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, \
+
667. OBJ(name,(char *)0), BITS(1,1,unk,0,0,0,0,0,0,0,0,P_NONE,tin), 0, \
FOOD_CLASS, prob, delay, \
+
668. FOOD_CLASS, prob, delay, \
wt, nutrition/20 + 5, 0, 0, 0, 0, nutrition, color )
+
669. 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. */
+
  670. /* all types of food (except tins & corpses) must have a delay of at least 1. */
  /* delay on corpses is computed and is weight dependant */
+
  671. /* delay on corpses is computed and is weight dependant */
  /* dog eats foods 0-4 but prefers tripe rations above all others */
+
  672. /* dog eats foods 0-4 but prefers tripe rations above all others */
  /* fortune cookies can be read */
+
  673. /* fortune cookies can be read */
  /* carrots improve your vision */
+
  674. /* carrots improve your vision */
  /* +0 tins contain monster meat */
+
  675. /* +0 tins contain monster meat */
  /* +1 tins (of spinach) make you stronger (like Popeye) */
+
  676. /* +1 tins (of spinach) make you stronger (like Popeye) */
  /* food CORPSE is a cadaver of some type */
+
  677. /* food CORPSE is a cadaver of some type */
  /* meatballs/sticks/rings are only created from objects via stone to flesh */
+
  678. /* meatballs/sticks/rings are only created from objects via stone to flesh */
   
+
  679.
  /* meat */
+
  680. /* meat */
  FOOD("tripe ration",      140, 2, 10, 0, FLESH, 200, CLR_BROWN),
+
  681. FOOD("tripe ration",      140, 2, 10, 0, FLESH, 200, CLR_BROWN),
  FOOD("corpse",              0, 1,  0, 0, FLESH,  0, CLR_BROWN),
+
  682. FOOD("corpse",              0, 1,  0, 0, FLESH,  0, CLR_BROWN),
  FOOD("egg",                85, 1,  1, 1, FLESH,  80, CLR_WHITE),
+
  683. FOOD("egg",                85, 1,  1, 1, FLESH,  80, CLR_WHITE),
  FOOD("meatball",            0, 1,  1, 0, FLESH,  5, CLR_BROWN),
+
  684. FOOD("meatball",            0, 1,  1, 0, FLESH,  5, CLR_BROWN),
  FOOD("meat stick",          0, 1,  1, 0, FLESH,  5, CLR_BROWN),
+
  685. FOOD("meat stick",          0, 1,  1, 0, FLESH,  5, CLR_BROWN),
  FOOD("huge chunk of meat",  0,20,400, 0, FLESH,2000, CLR_BROWN),
+
  686. FOOD("huge chunk of meat",  0,20,400, 0, FLESH,2000, CLR_BROWN),
  /* special case because it's not mergable */
+
  687. /* special case because it's not mergable */
  OBJECT(OBJ("meat ring", (char *)0),
+
  688. OBJECT(OBJ("meat ring", (char *)0),
    BITS(1,0,0,0,0,0,0,0,0,0,0,0,FLESH),
+
689.    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),
+
690.    0, FOOD_CLASS, 0, 1, 5, 1, 0, 0, 0, 0, 5, CLR_BROWN),
   
+
  691.
  /* fruits & veggies */
+
  692. /* fruits & veggies */
  FOOD("kelp frond",          0, 1,  1, 0, VEGGY,  30, CLR_GREEN),
+
  693. FOOD("kelp frond",          0, 1,  1, 0, VEGGY,  30, CLR_GREEN),
  FOOD("eucalyptus leaf",      3, 1,  1, 0, VEGGY,  30, CLR_GREEN),
+
  694. FOOD("eucalyptus leaf",      3, 1,  1, 0, VEGGY,  30, CLR_GREEN),
  FOOD("apple",              15, 1,  2, 0, VEGGY,  50, CLR_RED),
+
  695. FOOD("apple",              15, 1,  2, 0, VEGGY,  50, CLR_RED),
  FOOD("orange",              10, 1,  2, 0, VEGGY,  80, CLR_ORANGE),
+
  696. FOOD("orange",              10, 1,  2, 0, VEGGY,  80, CLR_ORANGE),
  FOOD("pear",                10, 1,  2, 0, VEGGY,  50, CLR_BRIGHT_GREEN),
+
  697. FOOD("pear",                10, 1,  2, 0, VEGGY,  50, CLR_BRIGHT_GREEN),
  FOOD("melon",              10, 1,  5, 0, VEGGY, 100, CLR_BRIGHT_GREEN),
+
  698. FOOD("melon",              10, 1,  5, 0, VEGGY, 100, CLR_BRIGHT_GREEN),
  FOOD("banana",              10, 1,  2, 0, VEGGY,  80, CLR_YELLOW),
+
  699. FOOD("banana",              10, 1,  2, 0, VEGGY,  80, CLR_YELLOW),
  FOOD("carrot",              15, 1,  2, 0, VEGGY,  50, CLR_ORANGE),
+
  700. FOOD("carrot",              15, 1,  2, 0, VEGGY,  50, CLR_ORANGE),
  FOOD("sprig of wolfsbane",  7, 1,  1, 0, VEGGY,  40, CLR_GREEN),
+
  701. FOOD("sprig of wolfsbane",  7, 1,  1, 0, VEGGY,  40, CLR_GREEN),
  FOOD("clove of garlic",      7, 1,  1, 0, VEGGY,  40, CLR_WHITE),
+
  702. FOOD("clove of garlic",      7, 1,  1, 0, VEGGY,  40, CLR_WHITE),
  FOOD("slime mold",          75, 1,  5, 0, VEGGY, 250, HI_ORGANIC),
+
  703. FOOD("slime mold",          75, 1,  5, 0, VEGGY, 250, HI_ORGANIC),
   
+
  704.
  /* people food */
+
  705. /* people food */
  FOOD("lump of royal jelly",  0, 1,  2, 0, VEGGY, 200, CLR_YELLOW),
+
  706. FOOD("lump of royal jelly",  0, 1,  2, 0, VEGGY, 200, CLR_YELLOW),
  FOOD("cream pie",          25, 1, 10, 0, VEGGY, 100, CLR_WHITE),
+
  707. FOOD("cream pie",          25, 1, 10, 0, VEGGY, 100, CLR_WHITE),
  FOOD("candy bar",          13, 1,  2, 0, VEGGY, 100, CLR_BROWN),
+
  708. FOOD("candy bar",          13, 1,  2, 0, VEGGY, 100, CLR_BROWN),
  FOOD("fortune cookie",      55, 1,  1, 0, VEGGY,  40, CLR_YELLOW),
+
  709. FOOD("fortune cookie",      55, 1,  1, 0, VEGGY,  40, CLR_YELLOW),
  FOOD("pancake",            25, 2,  2, 0, VEGGY, 200, CLR_YELLOW),
+
  710. FOOD("pancake",            25, 2,  2, 0, VEGGY, 200, CLR_YELLOW),
  FOOD("lembas wafer",        20, 2,  5, 0, VEGGY, 800, CLR_WHITE),
+
  711. FOOD("lembas wafer",        20, 2,  5, 0, VEGGY, 800, CLR_WHITE),
  FOOD("cram ration",        20, 3, 15, 0, VEGGY, 600, HI_ORGANIC),
+
  712. FOOD("cram ration",        20, 3, 15, 0, VEGGY, 600, HI_ORGANIC),
  FOOD("food ration",        380, 5, 20, 0, VEGGY, 800, HI_ORGANIC),
+
  713. FOOD("food ration",        380, 5, 20, 0, VEGGY, 800, HI_ORGANIC),
  FOOD("K-ration",            0, 1, 10, 0, VEGGY, 400, HI_ORGANIC),
+
  714. FOOD("K-ration",            0, 1, 10, 0, VEGGY, 400, HI_ORGANIC),
  FOOD("C-ration",            0, 1, 10, 0, VEGGY, 300, HI_ORGANIC),
+
  715. FOOD("C-ration",            0, 1, 10, 0, VEGGY, 300, HI_ORGANIC),
  FOOD("tin",                75, 0, 10, 1, METAL,  0, HI_METAL),
+
  716. FOOD("tin",                75, 0, 10, 1, METAL,  0, HI_METAL),
  #undef FOOD
+
  717. #undef FOOD
   
+
  718.
 
=== Potions ===
 
=== Potions ===
  
  /* potions ... */
+
  719. /* potions ... */
  #define POTION(name,desc,mgc,power,prob,cost,color) OBJECT( \
+
  720. #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, \
+
721. 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 )
+
722. POTION_CLASS, prob, 0, 20, cost, 0, 0, 0, 0, 10, color )
  POTION("gain ability", "ruby",          1, 0,          42, 300, CLR_RED),
+
  723. POTION("gain ability", "ruby",          1, 0,          42, 300, CLR_RED),
  POTION("restore ability", "pink",      1, 0,          40, 100, CLR_BRIGHT_MAGENTA),
+
  724. POTION("restore ability", "pink",      1, 0,          40, 100, CLR_BRIGHT_MAGENTA),
  POTION("confusion", "orange",          1, CONFUSION,  42, 100, CLR_ORANGE),
+
  725. POTION("confusion", "orange",          1, CONFUSION,  42, 100, CLR_ORANGE),
  POTION("blindness", "yellow",          1, BLINDED,    40, 150, CLR_YELLOW),
+
  726. POTION("blindness", "yellow",          1, BLINDED,    40, 150, CLR_YELLOW),
  POTION("paralysis", "emerald",          1, 0,          42, 300, CLR_BRIGHT_GREEN),
+
  727. POTION("paralysis", "emerald",          1, 0,          42, 300, CLR_BRIGHT_GREEN),
  POTION("speed", "dark green",          1, FAST,      42, 200, CLR_GREEN),
+
  728. POTION("speed", "dark green",          1, FAST,      42, 200, CLR_GREEN),
  POTION("levitation", "cyan",            1, LEVITATION, 42, 200, CLR_CYAN),
+
  729. POTION("levitation", "cyan",            1, LEVITATION, 42, 200, CLR_CYAN),
  POTION("hallucination", "sky blue",    1, HALLUC,    40, 100, CLR_CYAN),
+
  730. POTION("hallucination", "sky blue",    1, HALLUC,    40, 100, CLR_CYAN),
  POTION("invisibility", "brilliant blue",1, INVIS,      40, 150, CLR_BRIGHT_BLUE),
+
  731. POTION("invisibility", "brilliant blue",1, INVIS,      40, 150, CLR_BRIGHT_BLUE),
  POTION("see invisible", "magenta",      1, SEE_INVIS,  42,  50, CLR_MAGENTA),
+
  732. POTION("see invisible", "magenta",      1, SEE_INVIS,  42,  50, CLR_MAGENTA),
  POTION("healing", "purple-red",        1, 0,          57, 100, CLR_MAGENTA),
+
  733. POTION("healing", "purple-red",        1, 0,          57, 100, CLR_MAGENTA),
  POTION("extra healing", "puce",        1, 0,          47, 100, CLR_RED),
+
  734. POTION("extra healing", "puce",        1, 0,          47, 100, CLR_RED),
  POTION("gain level", "milky",          1, 0,          20, 300, CLR_WHITE),
+
  735. POTION("gain level", "milky",          1, 0,          20, 300, CLR_WHITE),
  POTION("enlightenment", "swirly",      1, 0,          20, 200, CLR_BROWN),
+
  736. POTION("enlightenment", "swirly",      1, 0,          20, 200, CLR_BROWN),
  POTION("monster detection", "bubbly",  1, 0,          40, 150, CLR_WHITE),
+
  737. POTION("monster detection", "bubbly",  1, 0,          40, 150, CLR_WHITE),
  POTION("object detection", "smoky",    1, 0,          42, 150, CLR_GRAY),
+
  738. POTION("object detection", "smoky",    1, 0,          42, 150, CLR_GRAY),
  POTION("gain energy", "cloudy",        1, 0,          42, 150, CLR_WHITE),
+
  739. POTION("gain energy", "cloudy",        1, 0,          42, 150, CLR_WHITE),
  POTION("sleeping",  "effervescent",    1, 0,          42, 100, CLR_GRAY),
+
  740. POTION("sleeping",  "effervescent",    1, 0,          42, 100, CLR_GRAY),
  POTION("full healing",  "black",        1, 0,          10, 200, CLR_BLACK),
+
  741. POTION("full healing",  "black",        1, 0,          10, 200, CLR_BLACK),
  POTION("polymorph", "golden",          1, 0,          10, 200, CLR_YELLOW),
+
  742. POTION("polymorph", "golden",          1, 0,          10, 200, CLR_YELLOW),
  POTION("booze", "brown",                0, 0,          42,  50, CLR_BROWN),
+
  743. POTION("booze", "brown",                0, 0,          42,  50, CLR_BROWN),
  POTION("sickness", "fizzy",            0, 0,          42,  50, CLR_CYAN),
+
  744. POTION("sickness", "fizzy",            0, 0,          42,  50, CLR_CYAN),
  POTION("fruit juice", "dark",          0, 0,          42,  50, CLR_BLACK),
+
  745. POTION("fruit juice", "dark",          0, 0,          42,  50, CLR_BLACK),
  POTION("acid", "white",                0, 0,          10, 250, CLR_WHITE),
+
  746. POTION("acid", "white",                0, 0,          10, 250, CLR_WHITE),
  POTION("oil", "murky",                  0, 0,          30, 250, CLR_BROWN),
+
  747. POTION("oil", "murky",                  0, 0,          30, 250, CLR_BROWN),
  POTION("water", "clear",                0, 0,          92, 100, CLR_CYAN),
+
  748. POTION("water", "clear",                0, 0,          92, 100, CLR_CYAN),
  #undef POTION
+
  749. #undef POTION
   
+
  750.
 
=== Scrolls ===
 
=== Scrolls ===
  
  /* scrolls ... */
+
  751. /* scrolls ... */
  #define SCROLL(name,text,mgc,prob,cost) OBJECT( \
+
  752. #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, \
+
753. 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 )
+
754. SCROLL_CLASS, prob, 0, 5, cost, 0, 0, 0, 0, 6, HI_PAPER )
SCROLL("enchant armor",        "ZELGO MER",            1,  63,  80),
+
755.  SCROLL("enchant armor",        "ZELGO MER",            1,  63,  80),
SCROLL("destroy armor",        "JUYED AWK YACC",      1,  45, 100),
+
756.  SCROLL("destroy armor",        "JUYED AWK YACC",      1,  45, 100),
SCROLL("confuse monster",      "NR 9",                1,  53, 100),
+
757.  SCROLL("confuse monster",      "NR 9",                1,  53, 100),
SCROLL("scare monster",        "XIXAXA XOXAXA XUXAXA", 1,  35, 100),
+
758.  SCROLL("scare monster",        "XIXAXA XOXAXA XUXAXA", 1,  35, 100),
SCROLL("remove curse",          "PRATYAVAYAH",          1,  65,  80),
+
759.  SCROLL("remove curse",          "PRATYAVAYAH",          1,  65,  80),
SCROLL("enchant weapon",        "DAIYEN FOOELS",        1,  80,  60),
+
760.  SCROLL("enchant weapon",        "DAIYEN FOOELS",        1,  80,  60),
SCROLL("create monster",        "LEP GEX VEN ZEA",      1,  45, 200),
+
761.  SCROLL("create monster",        "LEP GEX VEN ZEA",      1,  45, 200),
SCROLL("taming",                "PRIRUTSENIE",          1,  15, 200),
+
762.  SCROLL("taming",                "PRIRUTSENIE",          1,  15, 200),
SCROLL("genocide",              "ELBIB YLOH",          1,  15, 300),
+
763.  SCROLL("genocide",              "ELBIB YLOH",          1,  15, 300),
SCROLL("light",                "VERR YED HORRE",      1,  90,  50),
+
764.  SCROLL("light",                "VERR YED HORRE",      1,  90,  50),
SCROLL("teleportation",        "VENZAR BORGAVVE",      1,  55, 100),
+
765.  SCROLL("teleportation",        "VENZAR BORGAVVE",      1,  55, 100),
SCROLL("gold detection",        "THARR",                1,  33, 100),
+
766.  SCROLL("gold detection",        "THARR",                1,  33, 100),
SCROLL("food detection",        "YUM YUM",              1,  25, 100),
+
767.  SCROLL("food detection",        "YUM YUM",              1,  25, 100),
SCROLL("identify",              "KERNOD WEL",          1, 180,  20),
+
768.  SCROLL("identify",              "KERNOD WEL",          1, 180,  20),
SCROLL("magic mapping",        "ELAM EBOW",            1,  45, 100),
+
769.  SCROLL("magic mapping",        "ELAM EBOW",            1,  45, 100),
SCROLL("amnesia",              "DUAM XNAHT",          1,  35, 200),
+
770.  SCROLL("amnesia",              "DUAM XNAHT",          1,  35, 200),
SCROLL("fire",                  "ANDOVA BEGARIN",      1,  30, 100),
+
771.  SCROLL("fire",                  "ANDOVA BEGARIN",      1,  30, 100),
SCROLL("earth",                "KIRJE",                1,  18, 200),
+
772.  SCROLL("earth",                "KIRJE",                1,  18, 200),
SCROLL("punishment",            "VE FORBRYDERNE",      1,  15, 300),
+
773.  SCROLL("punishment",            "VE FORBRYDERNE",      1,  15, 300),
SCROLL("charging",              "HACKEM MUCHE",        1,  15, 300),
+
774.  SCROLL("charging",              "HACKEM MUCHE",        1,  15, 300),
SCROLL("stinking cloud", "VELOX NEB",            1,  15, 300),
+
775.  SCROLL("stinking cloud", "VELOX NEB",            1,  15, 300),
SCROLL((char *)0, "FOOBIE BLETCH",        1,  0, 100),
+
776.  SCROLL((char *)0, "FOOBIE BLETCH",        1,  0, 100),
SCROLL((char *)0, "TEMOV",                1,  0, 100),
+
777.  SCROLL((char *)0, "TEMOV",                1,  0, 100),
SCROLL((char *)0, "GARVEN DEH",          1,  0, 100),
+
778.  SCROLL((char *)0, "GARVEN DEH",          1,  0, 100),
SCROLL((char *)0, "READ ME",              1,  0, 100),
+
779.  SCROLL((char *)0, "READ ME",              1,  0, 100),
/* these must come last because they have special descriptions */
+
780.  /* these must come last because they have special descriptions */
  #ifdef MAIL
+
  781. #ifdef MAIL
SCROLL("mail",                  "stamped",          0,  0,  0),
+
782.  SCROLL("mail",                  "stamped",          0,  0,  0),
  #endif
+
  783. #endif
SCROLL("blank paper",          "unlabeled",        0,  28,  60),
+
784.  SCROLL("blank paper",          "unlabeled",        0,  28,  60),
  #undef SCROLL
+
  785. #undef SCROLL
   
+
  786.
 
=== Spellbooks ===
 
=== Spellbooks ===
  
  /* spellbooks ... */
+
  787. /* spellbooks ... */
  #define SPELL(name,desc,sub,prob,delay,level,mgc,dir,color) OBJECT( \
+
  788. #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, \
+
789. OBJ(name,desc), BITS(0,0,0,0,mgc,0,0,0,0,0,dir,sub,PAPER), 0, \
SPBOOK_CLASS, prob, delay, \
+
790. SPBOOK_CLASS, prob, delay, \
50, level*100, 0, 0, 0, level, 20, color )
+
791. 50, level*100, 0, 0, 0, level, 20, color )
  SPELL("dig",            "parchment",  P_MATTER_SPELL, 20,  6, 5, 1, RAY,      HI_PAPER),
+
  792. 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),
+
  793. 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),
+
  794. 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),
+
  795. 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),
+
  796. 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),
+
  797. 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),
+
  798. 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),
+
  799. 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),
+
  800. 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),
+
  801. 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),
+
  802. 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),
+
  803. 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),
+
  804. 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),
+
  805. 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),
+
  806. 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),
+
  807. 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),
+
  808. 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),
+
  809. 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),
+
  810. 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),
+
  811. 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),
+
  812. 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),
+
  813. 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),
+
  814. 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),
+
  815. 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),
+
  816. 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),
+
  817. 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),
+
  818. 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),
+
  819. 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),
+
  820. 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),
+
  821. 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),
+
  822. 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),
+
  823. 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),
+
  824. 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),
+
  825. 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),
+
  826. 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),
+
  827. 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),
+
  828. 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),
+
  829. 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),
+
  830. 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),
+
  831. SPELL("stone to flesh", "thick",      P_HEALING_SPELL, 15,  1, 3, 1, IMMEDIATE, HI_PAPER),
  #if 0 /* DEFERRED */
+
  832. #if 0 /* DEFERRED */
  SPELL("flame sphere",    "canvas",      P_MATTER_SPELL, 20,  2, 1, 1, NODIR, CLR_BROWN),
+
  833. 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),
+
  834. SPELL("freeze sphere",  "hardcover",  P_MATTER_SPELL, 20,  2, 1, 1, NODIR, CLR_BROWN),
  #endif
+
  835. #endif
  /* blank spellbook must come last because it retains its description */
+
  836. /* blank spellbook must come last because it retains its description */
  SPELL("blank paper",    "plain",      P_NONE, 18,  0, 0, 0, 0,        HI_PAPER),
+
  837. SPELL("blank paper",    "plain",      P_NONE, 18,  0, 0, 0, 0,        HI_PAPER),
  /* a special, one of a kind, spellbook */
+
  838. /* 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,
+
  839. 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),
+
840.  SPBOOK_CLASS, 0, 0,20, 10000, 0, 0, 0, 7, 20, HI_PAPER),
  #undef SPELL
+
  841. #undef SPELL
   
+
  842.
 
=== Wands ===
 
=== Wands ===
  
  /* wands ... */
+
  843. /* wands ... */
  #define WAND(name,typ,prob,cost,mgc,dir,metal,color) OBJECT( \
+
  844. #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, \
+
845. 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 )
+
846. WAND_CLASS, prob, 0, 7, cost, 0, 0, 0, 0, 30, color )
  WAND("light",          "glass",    95, 100, 1, NODIR,    GLASS,    HI_GLASS),
+
  847. WAND("light",          "glass",    95, 100, 1, NODIR,    GLASS,    HI_GLASS),
  WAND("secret door detection", "balsa",
+
  848. WAND("secret door detection", "balsa",
  50, 150, 1, NODIR,   WOOD,    HI_WOOD),
+
849.   50, 150, 1, NODIR,   WOOD,    HI_WOOD),
  WAND("enlightenment",  "crystal",  15, 150, 1, NODIR,    GLASS,    HI_GLASS),
+
  850. WAND("enlightenment",  "crystal",  15, 150, 1, NODIR,    GLASS,    HI_GLASS),
  WAND("create monster", "maple",    45, 200, 1, NODIR,    WOOD,    HI_WOOD),
+
  851. WAND("create monster", "maple",    45, 200, 1, NODIR,    WOOD,    HI_WOOD),
  WAND("wishing",        "pine",      5, 500, 1, NODIR,    WOOD,    HI_WOOD),
+
  852. WAND("wishing",        "pine",      5, 500, 1, NODIR,    WOOD,    HI_WOOD),
  WAND("nothing",        "oak",      25, 100, 0, IMMEDIATE, WOOD,    HI_WOOD),
+
  853. WAND("nothing",        "oak",      25, 100, 0, IMMEDIATE, WOOD,    HI_WOOD),
  WAND("striking",      "ebony",    75, 150, 1, IMMEDIATE, WOOD,    HI_WOOD),
+
  854. WAND("striking",      "ebony",    75, 150, 1, IMMEDIATE, WOOD,    HI_WOOD),
  WAND("make invisible", "marble",  45, 150, 1, IMMEDIATE, MINERAL,  HI_MINERAL),
+
  855. WAND("make invisible", "marble",  45, 150, 1, IMMEDIATE, MINERAL,  HI_MINERAL),
  WAND("slow monster",  "tin",      50, 150, 1, IMMEDIATE, METAL,    HI_METAL),
+
  856. WAND("slow monster",  "tin",      50, 150, 1, IMMEDIATE, METAL,    HI_METAL),
  WAND("speed monster",  "brass",    50, 150, 1, IMMEDIATE, COPPER,  HI_COPPER),
+
  857. WAND("speed monster",  "brass",    50, 150, 1, IMMEDIATE, COPPER,  HI_COPPER),
  WAND("undead turning", "copper",  50, 150, 1, IMMEDIATE, COPPER,  HI_COPPER),
+
  858. WAND("undead turning", "copper",  50, 150, 1, IMMEDIATE, COPPER,  HI_COPPER),
  WAND("polymorph",      "silver",  45, 200, 1, IMMEDIATE, SILVER,  HI_SILVER),
+
  859. WAND("polymorph",      "silver",  45, 200, 1, IMMEDIATE, SILVER,  HI_SILVER),
  WAND("cancellation",  "platinum", 45, 200, 1, IMMEDIATE, PLATINUM, CLR_WHITE),
+
  860. WAND("cancellation",  "platinum", 45, 200, 1, IMMEDIATE, PLATINUM, CLR_WHITE),
  WAND("teleportation",  "iridium",  45, 200, 1, IMMEDIATE, METAL,    CLR_BRIGHT_CYAN),
+
  861. WAND("teleportation",  "iridium",  45, 200, 1, IMMEDIATE, METAL,    CLR_BRIGHT_CYAN),
  WAND("opening",        "zinc",    25, 150, 1, IMMEDIATE, METAL,    HI_METAL),
+
  862. WAND("opening",        "zinc",    25, 150, 1, IMMEDIATE, METAL,    HI_METAL),
  WAND("locking",        "aluminum", 25, 150, 1, IMMEDIATE, METAL,    HI_METAL),
+
  863. WAND("locking",        "aluminum", 25, 150, 1, IMMEDIATE, METAL,    HI_METAL),
  WAND("probing",        "uranium",  30, 150, 1, IMMEDIATE, METAL,    HI_METAL),
+
  864. WAND("probing",        "uranium",  30, 150, 1, IMMEDIATE, METAL,    HI_METAL),
  WAND("digging",        "iron",    55, 150, 1, RAY,      IRON,    HI_METAL),
+
  865. WAND("digging",        "iron",    55, 150, 1, RAY,      IRON,    HI_METAL),
  WAND("magic missile",  "steel",    50, 150, 1, RAY,      IRON,    HI_METAL),
+
  866. WAND("magic missile",  "steel",    50, 150, 1, RAY,      IRON,    HI_METAL),
  WAND("fire",          "hexagonal",40, 175, 1, RAY,      IRON,    HI_METAL),
+
  867. WAND("fire",          "hexagonal",40, 175, 1, RAY,      IRON,    HI_METAL),
  WAND("cold",          "short",    40, 175, 1, RAY,      IRON,    HI_METAL),
+
  868. WAND("cold",          "short",    40, 175, 1, RAY,      IRON,    HI_METAL),
  WAND("sleep",          "runed",    50, 175, 1, RAY,      IRON,    HI_METAL),
+
  869. WAND("sleep",          "runed",    50, 175, 1, RAY,      IRON,    HI_METAL),
  WAND("death",          "long",      5, 500, 1, RAY,      IRON,    HI_METAL),
+
  870. WAND("death",          "long",      5, 500, 1, RAY,      IRON,    HI_METAL),
  WAND("lightning",      "curved",  40, 175, 1, RAY,      IRON,    HI_METAL),
+
  871. WAND("lightning",      "curved",  40, 175, 1, RAY,      IRON,    HI_METAL),
  WAND((char *)0,        "forked",    0, 150, 1, 0,        WOOD,    HI_WOOD),
+
  872. WAND((char *)0,        "forked",    0, 150, 1, 0,        WOOD,    HI_WOOD),
  WAND((char *)0,        "spiked",    0, 150, 1, 0,        IRON,    HI_METAL),
+
  873. WAND((char *)0,        "spiked",    0, 150, 1, 0,        IRON,    HI_METAL),
  WAND((char *)0,        "jeweled",  0, 150, 1, 0,        IRON,    HI_MINERAL),
+
  874. WAND((char *)0,        "jeweled",  0, 150, 1, 0,        IRON,    HI_MINERAL),
  #undef WAND
+
  875. #undef WAND
   
+
  876.
 
=== Coins ===
 
=== Coins ===
  
  /* coins ... - so far, gold is all there is */
+
  877. /* coins ... - so far, gold is all there is */
  #define COIN(name,prob,metal,worth) OBJECT( \
+
  878. #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, \
+
879. 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 )
+
880. COIN_CLASS, prob, 0, 1, worth, 0, 0, 0, 0, 0, HI_GOLD )
COIN("gold piece",      1000, GOLD,1),
+
881.  COIN("gold piece",      1000, GOLD,1),
  #undef COIN
+
  882. #undef COIN
   
+
  883.
 
=== Gems ===
 
=== Gems ===
  
  /* gems ... - includes stones and rocks but not boulders */
+
  884. /* gems ... - includes stones and rocks but not boulders */
  #define GEM(name,desc,prob,wt,gval,nutr,mohs,glass,color) OBJECT( \
+
  885. #define GEM(name,desc,prob,wt,gval,nutr,mohs,glass,color) OBJECT( \
    OBJ(name,desc), \
+
886.      OBJ(name,desc), \
    BITS(0,1,0,0,0,0,0,0,0,HARDGEM(mohs),0,-P_SLING,glass), 0, \
+
887.      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 )
+
888.      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( \
+
  889. #define ROCK(name,desc,kn,prob,wt,gval,sdam,ldam,mgc,nutr,mohs,glass,color) OBJECT( \
    OBJ(name,desc), \
+
890.      OBJ(name,desc), \
    BITS(kn,1,0,0,mgc,0,0,0,0,HARDGEM(mohs),0,-P_SLING,glass), 0, \
+
891.      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 )
+
892.      GEM_CLASS, prob, 0, wt, gval, sdam, ldam, 0, 0, nutr, color )
  GEM("dilithium crystal", "white",      2,  1, 4500, 15,  5, GEMSTONE, CLR_WHITE),
+
  893. GEM("dilithium crystal", "white",      2,  1, 4500, 15,  5, GEMSTONE, CLR_WHITE),
  GEM("diamond", "white",                3,  1, 4000, 15, 10, GEMSTONE, CLR_WHITE),
+
  894. GEM("diamond", "white",                3,  1, 4000, 15, 10, GEMSTONE, CLR_WHITE),
  GEM("ruby", "red",                    4,  1, 3500, 15,  9, GEMSTONE, CLR_RED),
+
  895. GEM("ruby", "red",                    4,  1, 3500, 15,  9, GEMSTONE, CLR_RED),
  GEM("jacinth", "orange",              3,  1, 3250, 15,  9, GEMSTONE, CLR_ORANGE),
+
  896. GEM("jacinth", "orange",              3,  1, 3250, 15,  9, GEMSTONE, CLR_ORANGE),
  GEM("sapphire", "blue",                4,  1, 3000, 15,  9, GEMSTONE, CLR_BLUE),
+
  897. GEM("sapphire", "blue",                4,  1, 3000, 15,  9, GEMSTONE, CLR_BLUE),
  GEM("black opal", "black",            3,  1, 2500, 15,  8, GEMSTONE, CLR_BLACK),
+
  898. GEM("black opal", "black",            3,  1, 2500, 15,  8, GEMSTONE, CLR_BLACK),
  GEM("emerald", "green",                5,  1, 2500, 15,  8, GEMSTONE, CLR_GREEN),
+
  899. GEM("emerald", "green",                5,  1, 2500, 15,  8, GEMSTONE, CLR_GREEN),
  GEM("turquoise", "green",              6,  1, 2000, 15,  6, GEMSTONE, CLR_GREEN),
+
  900. GEM("turquoise", "green",              6,  1, 2000, 15,  6, GEMSTONE, CLR_GREEN),
  GEM("citrine", "yellow",              4,  1, 1500, 15,  6, GEMSTONE, CLR_YELLOW),
+
  901. GEM("citrine", "yellow",              4,  1, 1500, 15,  6, GEMSTONE, CLR_YELLOW),
  GEM("aquamarine", "green",            6,  1, 1500, 15,  8, GEMSTONE, CLR_GREEN),
+
  902. GEM("aquamarine", "green",            6,  1, 1500, 15,  8, GEMSTONE, CLR_GREEN),
  GEM("amber", "yellowish brown",        8,  1, 1000, 15,  2, GEMSTONE, CLR_BROWN),
+
  903. GEM("amber", "yellowish brown",        8,  1, 1000, 15,  2, GEMSTONE, CLR_BROWN),
  GEM("topaz", "yellowish brown",      10,  1,  900, 15,  8, GEMSTONE, CLR_BROWN),
+
  904. GEM("topaz", "yellowish brown",      10,  1,  900, 15,  8, GEMSTONE, CLR_BROWN),
  GEM("jet", "black",                    6,  1,  850, 15,  7, GEMSTONE, CLR_BLACK),
+
  905. GEM("jet", "black",                    6,  1,  850, 15,  7, GEMSTONE, CLR_BLACK),
  GEM("opal", "white",                  12,  1,  800, 15,  6, GEMSTONE, CLR_WHITE),
+
  906. GEM("opal", "white",                  12,  1,  800, 15,  6, GEMSTONE, CLR_WHITE),
  GEM("chrysoberyl", "yellow",          8,  1,  700, 15,  5, GEMSTONE, CLR_YELLOW),
+
  907. GEM("chrysoberyl", "yellow",          8,  1,  700, 15,  5, GEMSTONE, CLR_YELLOW),
  GEM("garnet", "red",                  12,  1,  700, 15,  7, GEMSTONE, CLR_RED),
+
  908. GEM("garnet", "red",                  12,  1,  700, 15,  7, GEMSTONE, CLR_RED),
  GEM("amethyst", "violet",            14,  1,  600, 15,  7, GEMSTONE, CLR_MAGENTA),
+
  909. GEM("amethyst", "violet",            14,  1,  600, 15,  7, GEMSTONE, CLR_MAGENTA),
  GEM("jasper", "red",                  15,  1,  500, 15,  7, GEMSTONE, CLR_RED),
+
  910. GEM("jasper", "red",                  15,  1,  500, 15,  7, GEMSTONE, CLR_RED),
  GEM("fluorite", "violet",            15,  1,  400, 15,  4, GEMSTONE, CLR_MAGENTA),
+
  911. GEM("fluorite", "violet",            15,  1,  400, 15,  4, GEMSTONE, CLR_MAGENTA),
  GEM("obsidian", "black",              9,  1,  200, 15,  6, GEMSTONE, CLR_BLACK),
+
  912. GEM("obsidian", "black",              9,  1,  200, 15,  6, GEMSTONE, CLR_BLACK),
  GEM("agate", "orange",                12,  1,  200, 15,  6, GEMSTONE, CLR_ORANGE),
+
  913. GEM("agate", "orange",                12,  1,  200, 15,  6, GEMSTONE, CLR_ORANGE),
  GEM("jade", "green",                  10,  1,  300, 15,  6, GEMSTONE, CLR_GREEN),
+
  914. 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),
+
  915. 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),
+
  916. 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),
+
  917. GEM("worthless piece of red glass", "red",      77, 1, 0, 6, 5, GLASS, CLR_RED),
  GEM("worthless piece of yellowish brown glass", "yellowish brown",
+
  918. GEM("worthless piece of yellowish brown glass", "yellowish brown",
77, 1, 0, 6, 5, GLASS, CLR_BROWN),
+
919. 77, 1, 0, 6, 5, GLASS, CLR_BROWN),
  GEM("worthless piece of orange glass", "orange", 76, 1, 0, 6, 5, GLASS, CLR_ORANGE),
+
  920. 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),
+
  921. 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),
+
  922. 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),
+
  923. 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),
+
  924. GEM("worthless piece of violet glass", "violet", 77, 1, 0, 6, 5, GLASS, CLR_MAGENTA),
   
+
  925.
  /* Placement note: there is a wishable subrange for
+
  926. /* Placement note: there is a wishable subrange for
  * "gray stones" in the o_ranges[] array in objnam.c
+
927.  * "gray stones" in the o_ranges[] array in objnam.c
  * that is currently everything between luckstones and flint (inclusive).
+
928.  * that is currently everything between luckstones and flint (inclusive).
  */
+
929.  */
  ROCK("luckstone", "gray", 0, 10,  10, 60, 3, 3, 1, 10, 7, MINERAL, CLR_GRAY),
+
  930. 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),
+
  931. 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),
+
  932. 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),
+
  933. 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),
+
  934. ROCK("rock", (char *)0, 1,100,  10,  0, 3, 3, 0, 10, 7, MINERAL, CLR_GRAY),
  #undef GEM
+
  935. #undef GEM
  #undef ROCK
+
  936. #undef ROCK
   
+
  937.
 
=== Miscellaneous ===
 
=== Miscellaneous ===
  
  /* miscellaneous ... */
+
  938. /* miscellaneous ... */
  /* Note: boulders and rocks are not normally created at random; the
+
  939. /* Note: boulders and rocks are not normally created at random; the
  * probabilities only come into effect when you try to polymorph them.
+
940.  * probabilities only come into effect when you try to polymorph them.
  * Boulders weigh more than MAX_CARR_CAP; statues use corpsenm to take
+
941.  * Boulders weigh more than MAX_CARR_CAP; statues use corpsenm to take
  * on a specific type and may act as containers (both affect weight).
+
942.  * on a specific type and may act as containers (both affect weight).
  */
+
943.  */
  OBJECT(OBJ("boulder",(char *)0), BITS(1,0,0,0,0,0,0,0,1,0,0,P_NONE,MINERAL), 0,
+
  944. 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),
+
945. 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,
+
  946. 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),
+
947. ROCK_CLASS,  900, 0, 2500,  0, 20, 20, 0, 0, 2500, CLR_WHITE),
   
+
  948.
  OBJECT(OBJ("heavy iron ball", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,WHACK,P_NONE,IRON), 0,
+
  949. 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),
+
950. BALL_CLASS,  1000, 0,  480, 10, 25, 25, 0, 0,  200, HI_METAL),
/* +d4 when "very heavy" */
+
951. /* +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,
+
  952. 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),
+
953. CHAIN_CLASS, 1000, 0,  120,  0,  4,  4, 0, 0,  200, HI_METAL),
/* +1 both l & s */
+
954. /* +1 both l & s */
   
+
  955.
  OBJECT(OBJ("blinding venom", "splash of venom"),
+
  956. OBJECT(OBJ("blinding venom", "splash of venom"),
BITS(0,1,0,0,0,0,0,1,0,0,0,P_NONE,LIQUID), 0,
+
957. 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),
+
958. VENOM_CLASS,  500, 0, 1,  0,  0,  0, 0, 0, 0, HI_ORGANIC),
  OBJECT(OBJ("acid venom", "splash of venom"),
+
  959. OBJECT(OBJ("acid venom", "splash of venom"),
BITS(0,1,0,0,0,0,0,1,0,0,0,P_NONE,LIQUID), 0,
+
960. 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),
+
961. VENOM_CLASS,  500, 0, 1,  0,  6,  6, 0, 0, 0, HI_ORGANIC),
/* +d6 small or large */
+
962. /* +d6 small or large */
   
+
  963.
  /* fencepost, the deadly Array Terminator -- name [1st arg] *must* be NULL */
+
  964. /* 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,
+
965.  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)
+
966. ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
  }; /* objects[] */
+
  967. }; /* objects[] */
   
+
  968.
  #ifndef OBJECTS_PASS_2_
+
  969. #ifndef OBJECTS_PASS_2_
   
+
  970.
  /* perform recursive compilation for second structure */
+
  971. /* perform recursive compilation for second structure */
  #  undef OBJ
+
  972. #  undef OBJ
  #  undef OBJECT
+
  973. #  undef OBJECT
  #  define OBJECTS_PASS_2_
+
  974. #  define OBJECTS_PASS_2_
  #include "objects.c"
+
  975. #include "objects.c"
   
+
  976.
  void NDECL(objects_init);
+
  977. void NDECL(objects_init);
   
+
  978.
  /* dummy routine used to force linkage */
+
  979. /* dummy routine used to force linkage */
  void
+
  980. void
  objects_init()
+
  981. objects_init()
  {
+
  982. {
    return;
+
983.    return;
  }
+
  984. }
   
+
  985.
  #endif /* !OBJECTS_PASS_2_ */
+
  986. #endif /* !OBJECTS_PASS_2_ */
   
+
  987.
  /*objects.c*/
+
  988. /*objects.c*/
  
 
[[Category:Source code]]
 
[[Category:Source code]]

Revision as of 18:04, 13 August 2006

Top of file

1.   /*	SCCS Id: @(#)objects.c	3.4	2002/07/31	*/
2.   /* Copyright (c) Mike Threepoint, 1989.				  */
3.   /* NetHack may be freely redistributed.  See license for details. */

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

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

4.   #ifndef OBJECTS_PASS_2_
5.   /* first pass */
6.   struct monst { struct monst *dummy; };	/* lint: struct obj's union */
7.   #include "config.h"
8.   #include "obj.h"
9.   #include "objclass.h"
10.  #include "prop.h"
11.  #include "skills.h"
12.  
13.  #else	/* !OBJECTS_PASS_2_ */
14.  /* second pass */
15.  #include "color.h"
16.  #  define COLOR_FIELD(X) X,
17.  #endif	/* !OBJECTS_PASS_2_ */
18.  
19.  
20.  /* objects have symbols: ) [ = " ( % ! ? + / $ * ` 0 _ . */
21.  
22.  /*
23.   *	Note:  OBJ() and BITS() macros are used to avoid exceeding argument
24.   *	limits imposed by some compilers.  The ctnr field of BITS currently
25.   *	does not map into struct objclass, and is ignored in the expansion.
26.   *	The 0 in the expansion corresponds to oc_pre_discovered, which is
27.   *	set at run-time during role-specific character initialization.
28.   */
29.  

Object macros

30.  #ifndef OBJECTS_PASS_2_
31.  /* first pass -- object descriptive text */
32.  # 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.

33.  # define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \
34.   {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 TODO
  12. oc2 TODO
  13. nut is nutrition gained when the object is eaten.
  14. color is the object color, as used in the TTY windowport.
35.  
36.  NEARDATA struct objdescr obj_descr[] = {
37.  #else
38.  /* second pass -- object definitions */
39.  
40.  # define BITS(nmkn,mrg,uskn,ctnr,mgc,chrg,uniq,nwsh,big,tuf,dir,sub,mtrl) \
41.   nmkn,mrg,uskn,0,mgc,chrg,uniq,nwsh,big,tuf,dir,mtrl,sub /* SCO ODT 1.1 cpp fodder */

The BITS macro. Each value 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
42.  # define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \
43.   {0, 0, (char *)0, bits, prp, sym, dly, COLOR_FIELD(color) \
44.    prob, wt, cost, sdam, ldam, oc1, oc2, nut}
45.  # ifndef lint
46.  #  define HARDGEM(n) (n >= 8)
47.  # else
48.  #  define HARDGEM(n) (0)
49.  # endif
50.  
51.  NEARDATA struct objclass objects[] = {
52.  #endif
53.  /* dummy object[0] -- description [2nd arg] *must* be NULL */
54.   OBJECT(OBJ("strange object",(char *)0), BITS(1,0,0,0,0,0,0,0,0,0,0,P_NONE,0),
55. 	  0, ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),

Weapons

56.  
57.  /* weapons ... */
58.  #define WEAPON(name,app,kn,mg,bi,prob,wt,cost,sdam,ldam,hitbon,typ,sub,metal,color) \
59.   OBJECT( \
60. 	OBJ(name,app), BITS(kn,mg,1,0,0,1,0,0,bi,0,typ,sub,metal), 0, \
61. 	WEAPON_CLASS, prob, 0, \
62. 	wt, cost, sdam, ldam, hitbon, 0, wt, color )
63.  #define PROJECTILE(name,app,kn,prob,wt,cost,sdam,ldam,hitbon,metal,sub,color) \
64.   OBJECT( \
65. 	OBJ(name,app), \
66. 	BITS(kn,1,1,0,0,1,0,0,0,0,PIERCE,sub,metal), 0, \
67. 	WEAPON_CLASS, prob, 0, \
68. 	wt, cost, sdam, ldam, hitbon, 0, wt, color )
69.  #define BOW(name,app,kn,prob,wt,cost,hitbon,metal,sub,color) \
70.   OBJECT( \
71. 	OBJ(name,app), BITS(kn,0,1,0,0,1,0,0,0,0,0,sub,metal), 0, \
72. 	WEAPON_CLASS, prob, 0, \
73. 	wt, cost, 2, 2, hitbon, 0, wt, color )
74.  
75.  /* Note: for weapons that don't do an even die of damage (ex. 2-7 or 3-18)
76.   * the extra damage is added on in weapon.c, not here! */
77.  
78.  #define P PIERCE
79.  #define S SLASH
80.  #define B WHACK
81.  
82.  /* missiles */
83.  PROJECTILE("arrow", (char *)0,
84. 	1, 55, 1, 2, 6, 6, 0, IRON, -P_BOW, HI_METAL),
85.  PROJECTILE("elven arrow", "runed arrow",
86. 	0, 20, 1, 2, 7, 6, 0, WOOD, -P_BOW, HI_WOOD),
87.  PROJECTILE("orcish arrow", "crude arrow",
88. 	0, 20, 1, 2, 5, 6, 0, IRON, -P_BOW, CLR_BLACK),
89.  PROJECTILE("silver arrow", (char *)0,
90. 	1, 12, 1, 5, 6, 6, 0, SILVER, -P_BOW, HI_SILVER),
91.  PROJECTILE("ya", "bamboo arrow",
92. 	0, 15, 1, 4, 7, 7, 1, METAL, -P_BOW, HI_METAL),
93.  PROJECTILE("crossbow bolt", (char *)0,
94. 	1, 55, 1, 2, 4, 6, 0, IRON, -P_CROSSBOW, HI_METAL),
95.  
96.  WEAPON("dart", (char *)0,
97.   1, 1, 0, 60,  1,  2,  3,  2, 0, P,   -P_DART, IRON, HI_METAL),
98.  WEAPON("shuriken", "throwing star",
99.   0, 1, 0, 35,  1,  5,  8,  6, 2, P,   -P_SHURIKEN, IRON, HI_METAL),
100. WEAPON("boomerang", (char *)0,
101.  1, 1, 0, 15,  5, 20,  9,  9, 0, 0,   -P_BOOMERANG, WOOD, HI_WOOD),
102. 
103. /* spears */
104. WEAPON("spear", (char *)0,
105.  1, 1, 0, 50, 30,  3,  6,  8, 0, P,   P_SPEAR, IRON, HI_METAL),
106. WEAPON("elven spear", "runed spear",
107.  0, 1, 0, 10, 30,  3,  7,  8, 0, P,   P_SPEAR, WOOD, HI_WOOD),
108. WEAPON("orcish spear", "crude spear",
109.  0, 1, 0, 13, 30,  3,  5,  8, 0, P,   P_SPEAR, IRON, CLR_BLACK),
110. WEAPON("dwarvish spear", "stout spear",
111.  0, 1, 0, 12, 35,  3,  8,  8, 0, P,   P_SPEAR, IRON, HI_METAL),
112. WEAPON("silver spear", (char *)0,
113.  1, 1, 0,  2, 36, 40,  6,  8, 0, P,   P_SPEAR, SILVER, HI_SILVER),
114. WEAPON("javelin", "throwing spear",
115.  0, 1, 0, 10, 20,  3,  6,  6, 0, P,   P_JAVELIN, IRON, HI_METAL),
116. 
117. WEAPON("trident", (char *)0,
118.  1, 0, 0,  8, 25,  5,  6,  4, 0, P,   P_TRIDENT, IRON, HI_METAL),
119.			/* +1 small, +2d4 large */
120. 
121. /* blades */
122. WEAPON("dagger", (char *)0,
123.  1, 1, 0, 30, 10,  4,  4,  3, 2, P,   P_DAGGER, IRON, HI_METAL),
124. WEAPON("elven dagger", "runed dagger",
125.  0, 1, 0, 10, 10,  4,  5,  3, 2, P,   P_DAGGER, WOOD, HI_WOOD),
126. WEAPON("orcish dagger", "crude dagger",
127.  0, 1, 0, 12, 10,  4,  3,  3, 2, P,   P_DAGGER, IRON, CLR_BLACK),
128. WEAPON("silver dagger", (char *)0,
129.  1, 1, 0,  3, 12, 40,  4,  3, 2, P,   P_DAGGER, SILVER, HI_SILVER),
130. WEAPON("athame", (char *)0,
131.  1, 1, 0,  0, 10,  4,  4,  3, 2, S,   P_DAGGER, IRON, HI_METAL),
132. WEAPON("scalpel", (char *)0,
133.  1, 1, 0,  0,  5,  6,  3,  3, 2, S,   P_KNIFE, METAL, HI_METAL),
134. WEAPON("knife", (char *)0,
135.  1, 1, 0, 20,  5,  4,  3,  2, 0, P|S, P_KNIFE, IRON, HI_METAL),
136. WEAPON("stiletto", (char *)0,
137.  1, 1, 0,  5,  5,  4,  3,  2, 0, P|S, P_KNIFE, IRON, HI_METAL),
138. WEAPON("worm tooth", (char *)0,
139.  1, 0, 0,  0, 20,  2,  2,  2, 0, 0,   P_KNIFE, 0, CLR_WHITE),
140. WEAPON("crysknife", (char *)0,
141.  1, 0, 0,  0, 20,100, 10, 10, 3, P,   P_KNIFE, MINERAL, CLR_WHITE),
142. 
143. WEAPON("axe", (char *)0,
144.  1, 0, 0, 40, 60,  8,  6,  4, 0, S,   P_AXE, IRON, HI_METAL),
145. WEAPON("battle-axe", "double-headed axe",
146.  0, 0, 1, 10,120, 40,  8,  6, 0, S,   P_AXE, IRON, HI_METAL),
147.			/* "double-bitted" ? */
148. 
149. /* swords */
150. WEAPON("short sword", (char *)0,
151.  1, 0, 0,  8, 30, 10,  6,  8, 0, P,   P_SHORT_SWORD, IRON, HI_METAL),
152. WEAPON("elven short sword", "runed short sword",
153.  0, 0, 0,  2, 30, 10,  8,  8, 0, P,   P_SHORT_SWORD, WOOD, HI_WOOD),
154. WEAPON("orcish short sword", "crude short sword",
155.  0, 0, 0,  3, 30, 10,  5,  8, 0, P,   P_SHORT_SWORD, IRON, CLR_BLACK),
156. WEAPON("dwarvish short sword", "broad short sword",
157.  0, 0, 0,  2, 30, 10,  7,  8, 0, P,   P_SHORT_SWORD, IRON, HI_METAL),
158. WEAPON("scimitar", "curved sword",
159.  0, 0, 0, 15, 40, 15,  8,  8, 0, S,   P_SCIMITAR, IRON, HI_METAL),
160. WEAPON("silver saber", (char *)0,
161.  1, 0, 0,  6, 40, 75,  8,  8, 0, S,   P_SABER, SILVER, HI_SILVER),
162. WEAPON("broadsword", (char *)0,
163.  1, 0, 0,  8, 70, 10,  4,  6, 0, S,   P_BROAD_SWORD, IRON, HI_METAL),
164.			/* +d4 small, +1 large */
165. WEAPON("elven broadsword", "runed broadsword",
166.  0, 0, 0,  4, 70, 10,  6,  6, 0, S,   P_BROAD_SWORD, WOOD, HI_WOOD),
167.			/* +d4 small, +1 large */
168. WEAPON("long sword", (char *)0,
169.  1, 0, 0, 50, 40, 15,  8, 12, 0, S,   P_LONG_SWORD, IRON, HI_METAL),
170. WEAPON("two-handed sword", (char *)0,
171.  1, 0, 1, 22,150, 50, 12,  6, 0, S,   P_TWO_HANDED_SWORD, IRON, HI_METAL),
172.			/* +2d6 large */
173. WEAPON("katana", "samurai sword",
174.  0, 0, 0,  4, 40, 80, 10, 12, 1, S,   P_LONG_SWORD, IRON, HI_METAL),
175. /* special swords set up for artifacts */
176. WEAPON("tsurugi", "long samurai sword",
177.  0, 0, 1,  0, 60,500, 16,  8, 2, S,   P_TWO_HANDED_SWORD, METAL, HI_METAL),
178.			/* +2d6 large */
179. WEAPON("runesword", "runed broadsword",
180.  0, 0, 0,  0, 40,300,  4,  6, 0, S,   P_BROAD_SWORD, IRON, CLR_BLACK),
181.			/* +d4 small, +1 large */
182.			/* +5d2 +d8 from level drain */
183. 
184. /* polearms */
185. /* spear-type */
186. WEAPON("partisan", "vulgar polearm",
187.  0, 0, 1,  5, 80, 10,  6,  6, 0, P,   P_POLEARMS, IRON, HI_METAL),
188.			/* +1 large */
189. WEAPON("ranseur", "hilted polearm",
190.  0, 0, 1,  5, 50,  6,  4,  4, 0, P,   P_POLEARMS, IRON, HI_METAL),
191.			/* +d4 both */
192. WEAPON("spetum", "forked polearm",
193.  0, 0, 1,  5, 50,  5,  6,  6, 0, P,   P_POLEARMS, IRON, HI_METAL),
194.			/* +1 small, +d6 large */
195. WEAPON("glaive", "single-edged polearm",
196.  0, 0, 1,  8, 75,  6,  6, 10, 0, S,   P_POLEARMS, IRON, HI_METAL),
197. WEAPON("lance", (char *)0,
198.  1, 0, 0,  4,180, 10,  6,  8, 0, P,   P_LANCE, IRON, HI_METAL),
199. /* axe-type */
200. WEAPON("halberd", "angled poleaxe",
201.  0, 0, 1,  8,150, 10, 10,  6, 0, P|S, P_POLEARMS, IRON, HI_METAL),
202.			/* +1d6 large */
203. WEAPON("bardiche", "long poleaxe",
204.  0, 0, 1,  4,120,  7,  4,  4, 0, S,   P_POLEARMS, IRON, HI_METAL),
205.			/* +1d4 small, +2d4 large */
206. WEAPON("voulge", "pole cleaver",
207.  0, 0, 1,  4,125,  5,  4,  4, 0, S,   P_POLEARMS, IRON, HI_METAL),
208.			/* +d4 both */
209. WEAPON("dwarvish mattock", "broad pick",
210.  0, 0, 1, 13,120, 50, 12,  8,-1, B,   P_PICK_AXE, IRON, HI_METAL),
211. 
212. /* curved/hooked */
213. WEAPON("fauchard", "pole sickle",
214.  0, 0, 1,  6, 60,  5,  6,  8, 0, P|S, P_POLEARMS, IRON, HI_METAL),
215. WEAPON("guisarme", "pruning hook",
216.  0, 0, 1,  6, 80,  5,  4,  8, 0, S,   P_POLEARMS, IRON, HI_METAL),
217.			/* +1d4 small */
218. WEAPON("bill-guisarme", "hooked polearm",
219.  0, 0, 1,  4,120,  7,  4, 10, 0, P|S, P_POLEARMS, IRON, HI_METAL),
220.			/* +1d4 small */
221. /* other */
222. WEAPON("lucern hammer", "pronged polearm",
223.  0, 0, 1,  5,150,  7,  4,  6, 0, B|P, P_POLEARMS, IRON, HI_METAL),
224.			/* +1d4 small */
225. WEAPON("bec de corbin", "beaked polearm",
226.  0, 0, 1,  4,100,  8,  8,  6, 0, B|P, P_POLEARMS, IRON, HI_METAL),
227. 
228. /* bludgeons */
229. WEAPON("mace", (char *)0,
230.  1, 0, 0, 40, 30,  5,  6,  6, 0, B,   P_MACE, IRON, HI_METAL),
231.			/* +1 small */
232. WEAPON("morning star", (char *)0,
233.  1, 0, 0, 12,120, 10,  4,  6, 0, B,   P_MORNING_STAR, IRON, HI_METAL),
234.			/* +d4 small, +1 large */
235. WEAPON("war hammer", (char *)0,
236.  1, 0, 0, 15, 50,  5,  4,  4, 0, B,   P_HAMMER, IRON, HI_METAL),
237.			/* +1 small */
238. WEAPON("club", (char *)0,
239.  1, 0, 0, 12, 30,  3,  6,  3, 0, B,   P_CLUB, WOOD, HI_WOOD),
240. #ifdef KOPS
241. WEAPON("rubber hose", (char *)0,
242.  1, 0, 0,  0, 20,  3,  4,  3, 0, B,   P_WHIP, PLASTIC, CLR_BROWN),
243. #endif
244. WEAPON("quarterstaff", "staff",
245.  0, 0, 1, 11, 40,  5,  6,  6, 0, B,   P_QUARTERSTAFF, WOOD, HI_WOOD),
246. /* two-piece */
247. WEAPON("aklys", "thonged club",
248.  0, 0, 0,  8, 15,  4,  6,  3, 0, B,   P_CLUB, IRON, HI_METAL),
249. WEAPON("flail", (char *)0,
250.  1, 0, 0, 40, 15,  4,  6,  4, 0, B,   P_FLAIL, IRON, HI_METAL),
251.			/* +1 small, +1d4 large */
252. /* misc */
253. WEAPON("bullwhip", (char *)0,
254.  1, 0, 0,  2, 20,  4,  2,  1, 0, 0,   P_WHIP, LEATHER, CLR_BROWN),
255. 
256. /* bows */
257. BOW("bow", (char *)0,		1, 24, 30, 60, 0, WOOD, P_BOW, HI_WOOD),
258. BOW("elven bow", "runed bow",	0, 12, 30, 60, 0, WOOD, P_BOW, HI_WOOD),
259. BOW("orcish bow", "crude bow",	0, 12, 30, 60, 0, WOOD, P_BOW, CLR_BLACK),
260. BOW("yumi", "long bow",		0,  0, 30, 60, 0, WOOD, P_BOW, HI_WOOD),
261. BOW("sling", (char *)0,		1, 40,  3, 20, 0, LEATHER, P_SLING, HI_LEATHER),
262. BOW("crossbow", (char *)0,	1, 45, 50, 40, 0, WOOD, P_CROSSBOW, HI_WOOD),
263. 
264. #undef P
265. #undef S
266. #undef B
267. 
268. #undef WEAPON
269. #undef PROJECTILE
270. #undef BOW
271. 

Armor

Armor macros

272. /* armor ... */
273. /* IRON denotes ferrous metals, including steel.
274.  * Only IRON weapons and armor can rust.
275.  * Only COPPER (including brass) corrodes.
276.  * Some creatures are vulnerable to SILVER.
277.  */
278. #define ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,sub,metal,c) \
279.  OBJECT( \
280.	OBJ(name,desc), BITS(kn,0,1,0,mgc,1,0,0,blk,0,0,sub,metal), power, \
281.	ARMOR_CLASS, prob, delay, wt, cost, \
282.	0, 0, 10 - ac, can, wt, c )
283. #define HELM(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \
284.  ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_HELM,metal,c)
285. #define CLOAK(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \
286.  ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_CLOAK,metal,c)
287. #define SHIELD(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,metal,c) \
288.  ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,ARM_SHIELD,metal,c)
289. #define GLOVES(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \
290.  ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_GLOVES,metal,c)
291. #define BOOTS(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \
292.  ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_BOOTS,metal,c)

Helmets

293. /* helmets */
294. HELM("elven leather helm", "leather hat",
295.	0, 0,  0,	6, 1,  3,   8, 9, 0, LEATHER, HI_LEATHER),
296. HELM("orcish helm", "iron skull cap",
297.	0, 0,  0,	6, 1, 30,  10, 9, 0, IRON, CLR_BLACK),
298. HELM("dwarvish iron helm", "hard hat",
299.	0, 0,  0,	6, 1, 40,  20, 8, 0, IRON, HI_METAL),
300. HELM("fedora", (char *)0,
301.	1, 0,  0,	0, 0,  3,   1,10, 0, CLOTH, CLR_BROWN),
302. HELM("cornuthaum", "conical hat",
303.	0, 1,  CLAIRVOYANT,
304.		3, 1,  4,  80,10, 2, CLOTH, CLR_BLUE),
305. HELM("dunce cap", "conical hat",
306.	0, 1,  0,	3, 1,  4,   1,10, 0, CLOTH, CLR_BLUE),
307. HELM("dented pot", (char *)0,
308.	1, 0,  0,	2, 0, 10,   8, 9, 0, IRON, CLR_BLACK),
309. /* With shuffled appearances... */
310. HELM("helmet", "plumed helmet",
311.	0, 0,  0,      10, 1, 30,  10, 9, 0, IRON, HI_METAL),
312. HELM("helm of brilliance", "etched helmet",
313.	0, 1,  0,	6, 1, 50,  50, 9, 0, IRON, CLR_GREEN),
314. HELM("helm of opposite alignment", "crested helmet",
315.	0, 1,  0,	6, 1, 50,  50, 9, 0, IRON, HI_METAL),
316. HELM("helm of telepathy", "visored helmet",
317.	0, 1,  TELEPAT, 2, 1, 50,  50, 9, 0, IRON, HI_METAL),

Suits of Armor

318. 
319. /* suits of armor */
320. /*
321.  * There is code in polyself.c that assumes (1) and (2).
322.  * There is code in obj.h, objnam.c, mon.c, read.c that assumes (2).
323.  *
324.  *	(1) The dragon scale mails and the dragon scales are together.
325.  *	(2) That the order of the dragon scale mail and dragon scales is the
326.  *	    the same defined in monst.c.
327.  */
328. #define DRGN_ARMR(name,mgc,power,cost,ac,color) \
329.  ARMOR(name,(char *)0,1,mgc,1,power,0,5,40,cost,ac,0,ARM_SUIT,DRAGON_HIDE,color)
330. /* 3.4.1: dragon scale mail reclassified as "magic" since magic is
331.    needed to create them */
332. DRGN_ARMR("gray dragon scale mail",   1, ANTIMAGIC,  1200, 1, CLR_GRAY),
333. DRGN_ARMR("silver dragon scale mail", 1, REFLECTING, 1200, 1, DRAGON_SILVER),
334. #if 0	/* DEFERRED */
335. DRGN_ARMR("shimmering dragon scale mail", 1, DISPLACED, 1200, 1, CLR_CYAN),
336. #endif
337. DRGN_ARMR("red dragon scale mail",    1, FIRE_RES,    900, 1, CLR_RED),
338. DRGN_ARMR("white dragon scale mail",  1, COLD_RES,    900, 1, CLR_WHITE),
339. DRGN_ARMR("orange dragon scale mail", 1, SLEEP_RES,   900, 1, CLR_ORANGE),
340. DRGN_ARMR("black dragon scale mail",  1, DISINT_RES, 1200, 1, CLR_BLACK),
341. DRGN_ARMR("blue dragon scale mail",   1, SHOCK_RES,   900, 1, CLR_BLUE),
342. DRGN_ARMR("green dragon scale mail",  1, POISON_RES,  900, 1, CLR_GREEN),
343. DRGN_ARMR("yellow dragon scale mail", 1, ACID_RES,    900, 1, CLR_YELLOW),
344. 
345. /* For now, only dragons leave these. */
346. /* 3.4.1: dragon scales left classified as "non-magic"; they confer
347.    magical properties but are produced "naturally" */
348. DRGN_ARMR("gray dragon scales",   0, ANTIMAGIC,  700, 7, CLR_GRAY),
349. DRGN_ARMR("silver dragon scales", 0, REFLECTING, 700, 7, DRAGON_SILVER),
350. #if 0	/* DEFERRED */
351. DRGN_ARMR("shimmering dragon scales", 0, DISPLACED,  700, 7, CLR_CYAN),
352. #endif
353. DRGN_ARMR("red dragon scales",    0, FIRE_RES,   500, 7, CLR_RED),
354. DRGN_ARMR("white dragon scales",  0, COLD_RES,   500, 7, CLR_WHITE),
355. DRGN_ARMR("orange dragon scales", 0, SLEEP_RES,  500, 7, CLR_ORANGE),
356. DRGN_ARMR("black dragon scales",  0, DISINT_RES, 700, 7, CLR_BLACK),
357. DRGN_ARMR("blue dragon scales",   0, SHOCK_RES,  500, 7, CLR_BLUE),
358. DRGN_ARMR("green dragon scales",  0, POISON_RES, 500, 7, CLR_GREEN),
359. DRGN_ARMR("yellow dragon scales", 0, ACID_RES,   500, 7, CLR_YELLOW),
360. #undef DRGN_ARMR
361. 
362. ARMOR("plate mail", (char *)0,
363.  1, 0, 1, 0,	44, 5, 450, 600,  3, 2, ARM_SUIT, IRON, HI_METAL),
364. ARMOR("crystal plate mail", (char *)0,
365.  1, 0, 1, 0,	10, 5, 450, 820,  3, 2, ARM_SUIT, GLASS, CLR_WHITE),
366. #ifdef TOURIST
367. ARMOR("bronze plate mail", (char *)0,
368.  1, 0, 1, 0,	25, 5, 450, 400,  4, 0, ARM_SUIT, COPPER, HI_COPPER),
369. #else
370. ARMOR("bronze plate mail", (char *)0,
371.  1, 0, 1, 0,	35, 5, 450, 400,  4, 0, ARM_SUIT, COPPER, HI_COPPER),
372. #endif
373. ARMOR("splint mail", (char *)0,
374.  1, 0, 1, 0,	62, 5, 400,  80,  4, 1, ARM_SUIT, IRON, HI_METAL),
375. ARMOR("banded mail", (char *)0,
376.  1, 0, 1, 0,	72, 5, 350,  90,  4, 0, ARM_SUIT, IRON, HI_METAL),
377. ARMOR("dwarvish mithril-coat", (char *)0,
378.  1, 0, 0, 0,	10, 1, 150, 240,  4, 3, ARM_SUIT, MITHRIL, HI_METAL),
379. ARMOR("elven mithril-coat", (char *)0,
380.  1, 0, 0, 0,	15, 1, 150, 240,  5, 3, ARM_SUIT, MITHRIL, HI_METAL),
381. ARMOR("chain mail", (char *)0,
382.  1, 0, 0, 0,	72, 5, 300,  75,  5, 1, ARM_SUIT, IRON, HI_METAL),
383. ARMOR("orcish chain mail", "crude chain mail",
384.  0, 0, 0, 0,	20, 5, 300,  75,  6, 1, ARM_SUIT, IRON, CLR_BLACK),
385. ARMOR("scale mail", (char *)0,
386.  1, 0, 0, 0,	72, 5, 250,  45,  6, 0, ARM_SUIT, IRON, HI_METAL),
387. ARMOR("studded leather armor", (char *)0,
388.  1, 0, 0, 0,	72, 3, 200,  15,  7, 1, ARM_SUIT, LEATHER, HI_LEATHER),
389. ARMOR("ring mail", (char *)0,
390.  1, 0, 0, 0,	72, 5, 250, 100,  7, 0, ARM_SUIT, IRON, HI_METAL),
391. ARMOR("orcish ring mail", "crude ring mail",
392.  0, 0, 0, 0,	20, 5, 250,  80,  8, 1, ARM_SUIT, IRON, CLR_BLACK),
393. ARMOR("leather armor", (char *)0,
394.  1, 0, 0, 0,	82, 3, 150,   5,  8, 0, ARM_SUIT, LEATHER, HI_LEATHER),
395. ARMOR("leather jacket", (char *)0,
396.  1, 0, 0, 0,	12, 0,	30,  10,  9, 0, ARM_SUIT, LEATHER, CLR_BLACK),
397. 
398. #ifdef TOURIST
399. /* shirts */
400. ARMOR("Hawaiian shirt", (char *)0,
401.  1, 0, 0, 0,	 8, 0,	 5,   3, 10, 0, ARM_SHIRT, CLOTH, CLR_MAGENTA),
402. ARMOR("T-shirt", (char *)0,
403.  1, 0, 0, 0,	 2, 0,	 5,   2, 10, 0, ARM_SHIRT, CLOTH, CLR_WHITE),
404. #endif
405. 

Cloaks

406. /* cloaks */
407. /*  'cope' is not a spelling mistake... leave it be */
408. CLOAK("mummy wrapping", (char *)0,
409.	1, 0,	0,	    0, 0,  3,  2, 10, 1, CLOTH, CLR_GRAY),
410. CLOAK("elven cloak", "faded pall",
411.	0, 1,	STEALTH,    8, 0, 10, 60,  9, 3, CLOTH, CLR_BLACK),
412. CLOAK("orcish cloak", "coarse mantelet",
413.	0, 0,	0,	    8, 0, 10, 40, 10, 2, CLOTH, CLR_BLACK),
414. CLOAK("dwarvish cloak", "hooded cloak",
415.	0, 0,	0,	    8, 0, 10, 50, 10, 2, CLOTH, HI_CLOTH),
416. CLOAK("oilskin cloak", "slippery cloak",
417.	0, 0,	0,	    8, 0, 10, 50,  9, 3, CLOTH, HI_CLOTH),
418. CLOAK("robe", (char *)0,
419.	1, 1,	0,	    3, 0, 15, 50,  8, 3, CLOTH, CLR_RED),
420. CLOAK("alchemy smock", "apron",
421.	0, 1,	POISON_RES, 9, 0, 10, 50,  9, 1, CLOTH, CLR_WHITE),
422. CLOAK("leather cloak", (char *)0,
423.	1, 0,	0,	    8, 0, 15, 40,  9, 1, LEATHER, CLR_BROWN),
424. /* With shuffled appearances... */
425. CLOAK("cloak of protection", "tattered cape",
426.	0, 1,	PROTECTION, 9, 0, 10, 50,  7, 3, CLOTH, HI_CLOTH),
427. CLOAK("cloak of invisibility", "opera cloak",
428.	0, 1,	INVIS,	   10, 0, 10, 60,  9, 2, CLOTH, CLR_BRIGHT_MAGENTA),
429. CLOAK("cloak of magic resistance", "ornamental cope",
430.	0, 1,	ANTIMAGIC,  2, 0, 10, 60,  9, 3, CLOTH, CLR_WHITE),
431. CLOAK("cloak of displacement", "piece of cloth",
432.	0, 1,	DISPLACED, 10, 0, 10, 50,  9, 2, CLOTH, HI_CLOTH),
433. 

Shields

434. /* shields */
435. SHIELD("small shield", (char *)0,
436.	1, 0, 0, 0,	     6, 0, 30,	3,  9, 0, WOOD, HI_WOOD),
437. SHIELD("elven shield", "blue and green shield",
438.	0, 0, 0, 0,	     2, 0, 40,	7,  8, 0, WOOD, CLR_GREEN),
439. SHIELD("Uruk-hai shield", "white-handed shield",
440.	0, 0, 0, 0,	     2, 0, 50,	7,  9, 0, IRON, HI_METAL),
441. SHIELD("orcish shield", "red-eyed shield",
442.	0, 0, 0, 0,	     2, 0, 50,	7,  9, 0, IRON, CLR_RED),
443. SHIELD("large shield", (char *)0,
444.	1, 0, 1, 0,	     7, 0,100, 10,  8, 0, IRON, HI_METAL),
445. SHIELD("dwarvish roundshield", "large round shield",
446.	0, 0, 0, 0,	     4, 0,100, 10,  8, 0, IRON, HI_METAL),
447. SHIELD("shield of reflection", "polished silver shield",
448.	0, 1, 0, REFLECTING, 3, 0, 50, 50,  8, 0, SILVER, HI_SILVER),
449. 

Gloves

450. /* gloves */
451. /* these have their color but not material shuffled, so the IRON must stay
452.  * CLR_BROWN (== HI_LEATHER)
453.  */
454. GLOVES("leather gloves", "old gloves",
455.	0, 0,  0,	  16, 1, 10,  8,  9, 0, LEATHER, HI_LEATHER),
456. GLOVES("gauntlets of fumbling", "padded gloves",
457.	0, 1,  FUMBLING,   8, 1, 10, 50,  9, 0, LEATHER, HI_LEATHER),
458. GLOVES("gauntlets of power", "riding gloves",
459.	0, 1,  0,	   8, 1, 30, 50,  9, 0, IRON, CLR_BROWN),
460. GLOVES("gauntlets of dexterity", "fencing gloves",
461.	0, 1,  0,	   8, 1, 10, 50,  9, 0, LEATHER, HI_LEATHER),
462. 

Boots

463. /* boots */
464. BOOTS("low boots", "walking shoes",
465.	0, 0,  0,	  25, 2, 10,  8,  9, 0, LEATHER, HI_LEATHER),
466. BOOTS("iron shoes", "hard shoes",
467.	0, 0,  0,	   7, 2, 50, 16,  8, 0, IRON, HI_METAL),
468. BOOTS("high boots", "jackboots",
469.	0, 0,  0,	  15, 2, 20, 12,  8, 0, LEATHER, HI_LEATHER),
470. /* With shuffled appearances... */
471. BOOTS("speed boots", "combat boots",
472.	0, 1,  FAST,	  12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),
473. BOOTS("water walking boots", "jungle boots",
474.	0, 1,  WWALKING,  12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),
475. BOOTS("jumping boots", "hiking boots",
476.	0, 1,  JUMPING,   12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),
477. BOOTS("elven boots", "mud boots",
478.	0, 1,  STEALTH,   12, 2, 15,  8,  9, 0, LEATHER, HI_LEATHER),
479. BOOTS("kicking boots", "buckled boots",
480.	0, 1,  0,         12, 2, 15,  8,  9, 0, IRON, CLR_BROWN),
481. BOOTS("fumble boots", "riding boots",
482.	0, 1,  FUMBLING,  12, 2, 20, 30,  9, 0, LEATHER, HI_LEATHER),
483. BOOTS("levitation boots", "snow boots",
484.	0, 1,  LEVITATION,12, 2, 15, 30,  9, 0, LEATHER, HI_LEATHER),
485. #undef HELM
486. #undef CLOAK
487. #undef SHIELD
488. #undef GLOVES
489. #undef BOOTS
490. #undef ARMOR

Rings

491. /* rings ... */
492. #define RING(name,power,stone,cost,mgc,spec,mohs,metal,color) OBJECT( \
493.	OBJ(name,stone), \
494.	BITS(0,0,spec,0,mgc,spec,0,0,0,HARDGEM(mohs),0,P_NONE,metal), \
495.	power, RING_CLASS, 0, 0, 3, cost, 0, 0, 0, 0, 15, color )
496. RING("adornment", ADORNED, "wooden",        100, 1, 1, 2, WOOD, HI_WOOD),
497. RING("gain strength", 0, "granite",         150, 1, 1, 7, MINERAL, HI_MINERAL),
498. RING("gain constitution", 0, "opal",        150, 1, 1, 7, MINERAL,  HI_MINERAL),
499. RING("increase accuracy", 0, "clay",        150, 1, 1, 4, MINERAL, CLR_RED),
500. RING("increase damage", 0, "coral",         150, 1, 1, 4, MINERAL, CLR_ORANGE),
501. RING("protection", PROTECTION, "black onyx",100, 1, 1, 7, MINERAL, CLR_BLACK),
502. RING("regeneration", REGENERATION, "moonstone",
503.		      200, 1, 0, 6, MINERAL, HI_MINERAL),
504. RING("searching", SEARCHING, "tiger eye",   200, 1, 0, 6, GEMSTONE, CLR_BROWN),
505. RING("stealth", STEALTH, "jade",            100, 1, 0, 6, GEMSTONE, CLR_GREEN),
506. RING("sustain ability", FIXED_ABIL, "bronze",
507.		      100, 1, 0, 4, COPPER, HI_COPPER),
508. RING("levitation", LEVITATION, "agate",     200, 1, 0, 7, GEMSTONE, CLR_RED),
509. RING("hunger", HUNGER, "topaz",             100, 1, 0, 8, GEMSTONE, CLR_CYAN),
510. RING("aggravate monster", AGGRAVATE_MONSTER, "sapphire",
511.		      150, 1, 0, 9, GEMSTONE, CLR_BLUE),
512. RING("conflict", CONFLICT, "ruby",          300, 1, 0, 9, GEMSTONE, CLR_RED),
513. RING("warning", WARNING, "diamond",         100, 1, 0,10, GEMSTONE, CLR_WHITE),
514. RING("poison resistance", POISON_RES, "pearl",
515.		      150, 1, 0, 4, IRON, CLR_WHITE),
516. RING("fire resistance", FIRE_RES, "iron",   200, 1, 0, 5, IRON, HI_METAL),
517. RING("cold resistance", COLD_RES, "brass",  150, 1, 0, 4, COPPER, HI_COPPER),
518. RING("shock resistance", SHOCK_RES, "copper",
519.		      150, 1, 0, 3, COPPER, HI_COPPER),
520. RING("free action",     FREE_ACTION, "twisted",
521.		      200, 1, 0, 6, IRON, HI_METAL),
522. RING("slow digestion",  SLOW_DIGESTION, "steel",
523.		      200, 1, 0, 8, IRON, HI_METAL),
524. RING("teleportation", TELEPORT, "silver",   200, 1, 0, 3, SILVER, HI_SILVER),
525. RING("teleport control", TELEPORT_CONTROL, "gold",
526.		      300, 1, 0, 3, GOLD, HI_GOLD),
527. RING("polymorph", POLYMORPH, "ivory",       300, 1, 0, 4, BONE, CLR_WHITE),
528. RING("polymorph control", POLYMORPH_CONTROL, "emerald",
529.		      300, 1, 0, 8, GEMSTONE, CLR_BRIGHT_GREEN),
530. RING("invisibility", INVIS, "wire",         150, 1, 0, 5, IRON, HI_METAL),
531. RING("see invisible", SEE_INVIS, "engagement",
532.		      150, 1, 0, 5, IRON, HI_METAL),
533. RING("protection from shape changers", PROT_FROM_SHAPE_CHANGERS, "shiny",
534.		      100, 1, 0, 5, IRON, CLR_BRIGHT_CYAN),
535. #undef RING
536. 

Amulets

537. /* amulets ... - THE Amulet comes last because it is special */
538. #define AMULET(name,desc,power,prob) OBJECT( \
539.	OBJ(name,desc), BITS(0,0,0,0,1,0,0,0,0,0,0,P_NONE,IRON), power, \
540.	AMULET_CLASS, prob, 0, 20, 150, 0, 0, 0, 0, 20, HI_METAL )
541. 
542. AMULET("amulet of ESP",           "circular",   TELEPAT,    175),
543. AMULET("amulet of life saving",   "spherical",  LIFESAVED,   75),
544. AMULET("amulet of strangulation", "oval",       STRANGLED,  135),
545. AMULET("amulet of restful sleep", "triangular", SLEEPING,   135),
546. AMULET("amulet versus poison",    "pyramidal",  POISON_RES, 165),
547. AMULET("amulet of change",        "square",     0,          130),
548.			/* POLYMORPH */
549. AMULET("amulet of unchanging",    "concave",    UNCHANGING,	 45),
550. AMULET("amulet of reflection",    "hexagonal",  REFLECTING,  75),
551. AMULET("amulet of magical breathing", "octagonal",      MAGICAL_BREATHING, 65),
552. OBJECT(OBJ("cheap plastic imitation of the Amulet of Yendor",
553.  "Amulet of Yendor"), BITS(0,0,1,0,0,0,0,0,0,0,0,0,PLASTIC), 0,
554.  AMULET_CLASS, 0, 0, 20,    0, 0, 0, 0, 0,  1, HI_METAL),
555. OBJECT(OBJ("Amulet of Yendor",	/* note: description == name */
556.  "Amulet of Yendor"), BITS(0,0,1,0,1,0,1,1,0,0,0,0,MITHRIL), 0,
557.  AMULET_CLASS, 0, 0, 20, 30000, 0, 0, 0, 0, 20, HI_METAL),
558. #undef AMULET
559. 

Tools

560. /* tools ... */
561. /* tools with weapon characteristics come last */
562. #define TOOL(name,desc,kn,mrg,mgc,chg,prob,wt,cost,mat,color) \
563.  OBJECT( OBJ(name,desc), \
564.	BITS(kn,mrg,chg,0,mgc,chg,0,0,0,0,0,P_NONE,mat), \
565.	0, TOOL_CLASS, prob, 0, \
566.	wt, cost, 0, 0, 0, 0, wt, color )
567. #define CONTAINER(name,desc,kn,mgc,chg,prob,wt,cost,mat,color) \
568.  OBJECT( OBJ(name,desc), \
569.	BITS(kn,0,chg,1,mgc,chg,0,0,0,0,0,P_NONE,mat), \
570.	0, TOOL_CLASS, prob, 0, \
571.	wt, cost, 0, 0, 0, 0, wt, color )
572. #define WEPTOOL(name,desc,kn,mgc,bi,prob,wt,cost,sdam,ldam,hitbon,sub,mat,clr) \
573.  OBJECT( OBJ(name,desc), \
574.	BITS(kn,0,1,0,mgc,1,0,0,bi,0,hitbon,sub,mat), \
575.	0, TOOL_CLASS, prob, 0, \
576.	wt, cost, sdam, ldam, hitbon, 0, wt, clr )
577. /* containers */
578. CONTAINER("large box", (char *)0,       1, 0, 0,  40,350,   8, WOOD, HI_WOOD),
579. CONTAINER("chest", (char *)0,           1, 0, 0,  35,600,  16, WOOD, HI_WOOD),
580. CONTAINER("ice box", (char *)0,         1, 0, 0,   5,900,  42, PLASTIC, CLR_WHITE),
581. CONTAINER("sack", "bag",                0, 0, 0,  35, 15,   2, CLOTH, HI_CLOTH),
582. CONTAINER("oilskin sack", "bag",        0, 0, 0,   5, 15, 100, CLOTH, HI_CLOTH),
583. CONTAINER("bag of holding", "bag",      0, 1, 0,  20, 15, 100, CLOTH, HI_CLOTH),
584. CONTAINER("bag of tricks", "bag",       0, 1, 1,  20, 15, 100, CLOTH, HI_CLOTH),
585. #undef CONTAINER
586. 
587. /* lock opening tools */
588. TOOL("skeleton key", "key",     0, 0, 0, 0,  80,  3,  10, IRON, HI_METAL),
589. #ifdef TOURIST
590. TOOL("lock pick", (char *)0,    1, 0, 0, 0,  60,  4,  20, IRON, HI_METAL),
591. TOOL("credit card", (char *)0,  1, 0, 0, 0,  15,  1,  10, PLASTIC, CLR_WHITE),
592. #else
593. TOOL("lock pick", (char *)0,    1, 0, 0, 0,  75,  4,  20, IRON, HI_METAL),
594. #endif
595. /* light sources */
596. TOOL("tallow candle", "candle", 0, 1, 0, 0,  20,  2,  10, WAX, CLR_WHITE),
597. TOOL("wax candle", "candle",    0, 1, 0, 0,   5,  2,  20, WAX, CLR_WHITE),
598. TOOL("brass lantern", (char *)0,1, 0, 0, 0,  30, 30,  12, COPPER, CLR_YELLOW),
599. TOOL("oil lamp", "lamp",        0, 0, 0, 0,  45, 20,  10, COPPER, CLR_YELLOW),
600. TOOL("magic lamp", "lamp",      0, 0, 1, 0,  15, 20,  50, COPPER, CLR_YELLOW),
601. /* other tools */
602. #ifdef TOURIST
603. TOOL("expensive camera", (char *)0,
604.		1, 0, 0, 1,  15, 12, 200, PLASTIC, CLR_BLACK),
605. TOOL("mirror", "looking glass", 0, 0, 0, 0,  45, 13,  10, GLASS, HI_SILVER),
606. #else
607. TOOL("mirror", "looking glass", 0, 0, 0, 0,  60, 13,  10, GLASS, HI_SILVER),
608. #endif
609. TOOL("crystal ball", "glass orb",
610.		0, 0, 1, 1,  15,150,  60, GLASS, HI_GLASS),
611. TOOL("lenses", (char *)0,	1, 0, 0, 0,   5,  3,  80, GLASS, HI_GLASS),
612. TOOL("blindfold", (char *)0,    1, 0, 0, 0,  50,  2,  20, CLOTH, CLR_BLACK),
613. TOOL("towel", (char *)0,        1, 0, 0, 0,  50,  2,  50, CLOTH, CLR_MAGENTA),
614. #ifdef STEED
615. TOOL("saddle", (char *)0,       1, 0, 0, 0,   5,200, 150, LEATHER, HI_LEATHER),
616. TOOL("leash", (char *)0,        1, 0, 0, 0,  65, 12,  20, LEATHER, HI_LEATHER),
617. #else
618. TOOL("leash", (char *)0,        1, 0, 0, 0,  70, 12,  20, LEATHER, HI_LEATHER),
619. #endif
620. TOOL("stethoscope", (char *)0,  1, 0, 0, 0,  25,  4,  75, IRON, HI_METAL),
621. TOOL("tinning kit", (char *)0,  1, 0, 0, 1,  15,100,  30, IRON, HI_METAL),
622. TOOL("tin opener", (char *)0,   1, 0, 0, 0,  35,  4,  30, IRON, HI_METAL),
623. TOOL("can of grease", (char *)0,1, 0, 0, 1,  15, 15,  20, IRON, HI_METAL),
624. TOOL("figurine", (char *)0,     1, 0, 1, 0,  25, 50,  80, MINERAL, HI_MINERAL),
625. TOOL("magic marker", (char *)0, 1, 0, 1, 1,  15,  2,  50, PLASTIC, CLR_RED),
626. /* traps */
627. TOOL("land mine",(char *)0,     1, 0, 0, 0,   0,300, 180, IRON, CLR_RED),
628. TOOL("beartrap", (char *)0,     1, 0, 0, 0,   0,200,  60, IRON, HI_METAL),
629. /* instruments */
630. TOOL("tin whistle", "whistle",  0, 0, 0, 0, 100,  3,  10, METAL, HI_METAL),
631. TOOL("magic whistle", "whistle",0, 0, 1, 0,  30,  3,  10, METAL, HI_METAL),
632. /* "If tin whistles are made out of tin, what do they make foghorns out of?" */
633. TOOL("wooden flute", "flute",   0, 0, 0, 0,   4,  5,  12, WOOD, HI_WOOD),
634. TOOL("magic flute", "flute",    0, 0, 1, 1,   2,  5,  36, WOOD, HI_WOOD),
635. TOOL("tooled horn", &quot;horn",     0, 0, 0, 0,   5, 18,  15, BONE, CLR_WHITE),
636. TOOL("frost horn", "horn",      0, 0, 1, 1,   2, 18,  50, BONE, CLR_WHITE),
637. TOOL("fire horn", "horn",       0, 0, 1, 1,   2, 18,  50, BONE, CLR_WHITE),
638. TOOL("horn of plenty", "horn",  0, 0, 1, 1,   2, 18,  50, BONE, CLR_WHITE),
639. TOOL("wooden harp", "harp",     0, 0, 0, 0,   4, 30,  50, WOOD, HI_WOOD),
640. TOOL("magic harp", "harp",      0, 0, 1, 1,   2, 30,  50, WOOD, HI_WOOD),
641. TOOL("bell", (char *)0,         1, 0, 0, 0,   2, 30,  50, COPPER, HI_COPPER),
642. TOOL("bugle", (char *)0,        1, 0, 0, 0,   4, 10,  15, COPPER, HI_COPPER),
643. TOOL("leather drum", "drum",    0, 0, 0, 0,   4, 25,  25, LEATHER, HI_LEATHER),
644. TOOL("drum of earthquake", "drum",
645.		0, 0, 1, 1,   2, 25,  25, LEATHER, HI_LEATHER),
646. /* tools useful as weapons */
647. WEPTOOL("pick-axe", (char *)0,
648.  1, 0, 0, 20, 100,  50,	6,  3, WHACK,  P_PICK_AXE, IRON, HI_METAL),
649. WEPTOOL("grappling hook", "iron hook",
650.  0, 0, 0,  5,  30,  50,  2,  6, WHACK,  P_FLAIL, IRON, HI_METAL),
651. /* 3.4.1: unicorn horn left classified as "magic" */
652. WEPTOOL("unicorn horn", (char *)0,
653.  1, 1, 1,  0,  20, 100, 12, 12, PIERCE, P_UNICORN_HORN, BONE, CLR_WHITE),
654. 
655. /* two special unique artifact "tools" */
656. OBJECT(OBJ("Candelabrum of Invocation", "candelabrum"),
657.	BITS(0,0,1,0,1,0,1,1,0,0,0,P_NONE,GOLD), 0,
658.	TOOL_CLASS, 0, 0,10, 5000, 0, 0, 0, 0, 200, HI_GOLD),
659. OBJECT(OBJ("Bell of Opening", "silver bell"),
660.	BITS(0,0,1,0,1,1,1,1,0,0,0,P_NONE,SILVER), 0,
661.	TOOL_CLASS, 0, 0,10, 5000, 0, 0, 0, 0, 50, HI_SILVER),
662. #undef TOOL
663. #undef WEPTOOL
664. 

Comestibles

665. /* Comestibles ... */
666. #define FOOD(name,prob,delay,wt,unk,tin,nutrition,color) OBJECT( \
667.	OBJ(name,(char *)0), BITS(1,1,unk,0,0,0,0,0,0,0,0,P_NONE,tin), 0, \
668.	FOOD_CLASS, prob, delay, \
669.	wt, nutrition/20 + 5, 0, 0, 0, 0, nutrition, color )
670. /* all types of food (except tins & corpses) must have a delay of at least 1. */
671. /* delay on corpses is computed and is weight dependant */
672. /* dog eats foods 0-4 but prefers tripe rations above all others */
673. /* fortune cookies can be read */
674. /* carrots improve your vision */
675. /* +0 tins contain monster meat */
676. /* +1 tins (of spinach) make you stronger (like Popeye) */
677. /* food CORPSE is a cadaver of some type */
678. /* meatballs/sticks/rings are only created from objects via stone to flesh */
679. 
680. /* meat */
681. FOOD("tripe ration",       140, 2, 10, 0, FLESH, 200, CLR_BROWN),
682. FOOD("corpse",               0, 1,  0, 0, FLESH,   0, CLR_BROWN),
683. FOOD("egg",                 85, 1,  1, 1, FLESH,  80, CLR_WHITE),
684. FOOD("meatball",             0, 1,  1, 0, FLESH,   5, CLR_BROWN),
685. FOOD("meat stick",           0, 1,  1, 0, FLESH,   5, CLR_BROWN),
686. FOOD("huge chunk of meat",   0,20,400, 0, FLESH,2000, CLR_BROWN),
687. /* special case because it's not mergable */
688. OBJECT(OBJ("meat ring", (char *)0),
689.     BITS(1,0,0,0,0,0,0,0,0,0,0,0,FLESH),
690.     0, FOOD_CLASS, 0, 1, 5, 1, 0, 0, 0, 0, 5, CLR_BROWN),
691. 
692. /* fruits & veggies */
693. FOOD("kelp frond",           0, 1,  1, 0, VEGGY,  30, CLR_GREEN),
694. FOOD("eucalyptus leaf",      3, 1,  1, 0, VEGGY,  30, CLR_GREEN),
695. FOOD("apple",               15, 1,  2, 0, VEGGY,  50, CLR_RED),
696. FOOD("orange",              10, 1,  2, 0, VEGGY,  80, CLR_ORANGE),
697. FOOD("pear",                10, 1,  2, 0, VEGGY,  50, CLR_BRIGHT_GREEN),
698. FOOD("melon",               10, 1,  5, 0, VEGGY, 100, CLR_BRIGHT_GREEN),
699. FOOD("banana",              10, 1,  2, 0, VEGGY,  80, CLR_YELLOW),
700. FOOD("carrot",              15, 1,  2, 0, VEGGY,  50, CLR_ORANGE),
701. FOOD("sprig of wolfsbane",   7, 1,  1, 0, VEGGY,  40, CLR_GREEN),
702. FOOD("clove of garlic",      7, 1,  1, 0, VEGGY,  40, CLR_WHITE),
703. FOOD("slime mold",          75, 1,  5, 0, VEGGY, 250, HI_ORGANIC),
704. 
705. /* people food */
706. FOOD("lump of royal jelly",  0, 1,  2, 0, VEGGY, 200, CLR_YELLOW),
707. FOOD("cream pie",           25, 1, 10, 0, VEGGY, 100, CLR_WHITE),
708. FOOD("candy bar",           13, 1,  2, 0, VEGGY, 100, CLR_BROWN),
709. FOOD("fortune cookie",      55, 1,  1, 0, VEGGY,  40, CLR_YELLOW),
710. FOOD("pancake",             25, 2,  2, 0, VEGGY, 200, CLR_YELLOW),
711. FOOD("lembas wafer",        20, 2,  5, 0, VEGGY, 800, CLR_WHITE),
712. FOOD("cram ration",         20, 3, 15, 0, VEGGY, 600, HI_ORGANIC),
713. FOOD("food ration",        380, 5, 20, 0, VEGGY, 800, HI_ORGANIC),
714. FOOD("K-ration",             0, 1, 10, 0, VEGGY, 400, HI_ORGANIC),
715. FOOD("C-ration",             0, 1, 10, 0, VEGGY, 300, HI_ORGANIC),
716. FOOD("tin",                 75, 0, 10, 1, METAL,   0, HI_METAL),
717. #undef FOOD
718. 

Potions

719. /* potions ... */
720. #define POTION(name,desc,mgc,power,prob,cost,color) OBJECT( \
721.	OBJ(name,desc), BITS(0,1,0,0,mgc,0,0,0,0,0,0,P_NONE,GLASS), power, \
722.	POTION_CLASS, prob, 0, 20, cost, 0, 0, 0, 0, 10, color )
723. POTION("gain ability", "ruby",          1, 0,          42, 300, CLR_RED),
724. POTION("restore ability", "pink",       1, 0,          40, 100, CLR_BRIGHT_MAGENTA),
725. POTION("confusion", "orange",           1, CONFUSION,  42, 100, CLR_ORANGE),
726. POTION("blindness", "yellow",           1, BLINDED,    40, 150, CLR_YELLOW),
727. POTION("paralysis", "emerald",          1, 0,          42, 300, CLR_BRIGHT_GREEN),
728. POTION("speed", "dark green",           1, FAST,       42, 200, CLR_GREEN),
729. POTION("levitation", "cyan",            1, LEVITATION, 42, 200, CLR_CYAN),
730. POTION("hallucination", "sky blue",     1, HALLUC,     40, 100, CLR_CYAN),
731. POTION("invisibility", "brilliant blue",1, INVIS,      40, 150, CLR_BRIGHT_BLUE),
732. POTION("see invisible", "magenta",      1, SEE_INVIS,  42,  50, CLR_MAGENTA),
733. POTION("healing", "purple-red",         1, 0,          57, 100, CLR_MAGENTA),
734. POTION("extra healing", "puce",         1, 0,          47, 100, CLR_RED),
735. POTION("gain level", "milky",           1, 0,          20, 300, CLR_WHITE),
736. POTION("enlightenment", "swirly",       1, 0,          20, 200, CLR_BROWN),
737. POTION("monster detection", "bubbly",   1, 0,          40, 150, CLR_WHITE),
738. POTION("object detection", "smoky",     1, 0,          42, 150, CLR_GRAY),
739. POTION("gain energy", "cloudy",         1, 0,          42, 150, CLR_WHITE),
740. POTION("sleeping",  "effervescent",     1, 0,          42, 100, CLR_GRAY),
741. POTION("full healing",  "black",        1, 0,          10, 200, CLR_BLACK),
742. POTION("polymorph", "golden",           1, 0,          10, 200, CLR_YELLOW),
743. POTION("booze", "brown",                0, 0,          42,  50, CLR_BROWN),
744. POTION("sickness", "fizzy",             0, 0,          42,  50, CLR_CYAN),
745. POTION("fruit juice", "dark",           0, 0,          42,  50, CLR_BLACK),
746. POTION("acid", "white",                 0, 0,          10, 250, CLR_WHITE),
747. POTION("oil", "murky",                  0, 0,          30, 250, CLR_BROWN),
748. POTION("water", "clear",                0, 0,          92, 100, CLR_CYAN),
749. #undef POTION
750. 

Scrolls

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

Spellbooks

787. /* spellbooks ... */
788. #define SPELL(name,desc,sub,prob,delay,level,mgc,dir,color) OBJECT( \
789.	OBJ(name,desc), BITS(0,0,0,0,mgc,0,0,0,0,0,dir,sub,PAPER), 0, \
790.	SPBOOK_CLASS, prob, delay, \
791.	50, level*100, 0, 0, 0, level, 20, color )
792. SPELL("dig",             "parchment",   P_MATTER_SPELL, 20,  6, 5, 1, RAY,       HI_PAPER),
793. SPELL("magic missile",   "vellum",      P_ATTACK_SPELL, 45,  2, 2, 1, RAY,       HI_PAPER),
794. SPELL("fireball",        "ragged",      P_ATTACK_SPELL, 20,  4, 4, 1, RAY,       HI_PAPER),
795. SPELL("cone of cold",    "dog eared",   P_ATTACK_SPELL, 10,  7, 4, 1, RAY,       HI_PAPER),
796. SPELL("sleep",           "mottled",     P_ENCHANTMENT_SPELL, 50,  1, 1, 1, RAY,       HI_PAPER),
797. SPELL("finger of death", "stained",     P_ATTACK_SPELL,  5, 10, 7, 1, RAY,       HI_PAPER),
798. SPELL("light",           "cloth",       P_DIVINATION_SPELL, 45,  1, 1, 1, NODIR,     HI_CLOTH),
799. SPELL("detect monsters", "leather",     P_DIVINATION_SPELL, 43,  1, 1, 1, NODIR,     HI_LEATHER),
800. SPELL("healing",         "white",       P_HEALING_SPELL, 40,  2, 1, 1, IMMEDIATE, CLR_WHITE),
801. SPELL("knock",           "pink",        P_MATTER_SPELL, 35,  1, 1, 1, IMMEDIATE, CLR_BRIGHT_MAGENTA),
802. SPELL("force bolt",      "red",         P_ATTACK_SPELL, 35,  2, 1, 1, IMMEDIATE, CLR_RED),
803. SPELL("confuse monster", "orange",      P_ENCHANTMENT_SPELL, 30,  2, 2, 1, IMMEDIATE, CLR_ORANGE),
804. SPELL("cure blindness",  "yellow",      P_HEALING_SPELL, 25,  2, 2, 1, IMMEDIATE, CLR_YELLOW),
805. SPELL("drain life",      "velvet",      P_ATTACK_SPELL, 10,  2, 2, 1, IMMEDIATE, CLR_MAGENTA),
806. SPELL("slow monster",    "light green", P_ENCHANTMENT_SPELL, 30,  2, 2, 1, IMMEDIATE, CLR_BRIGHT_GREEN),
807. SPELL("wizard lock",     "dark green",  P_MATTER_SPELL, 30,  3, 2, 1, IMMEDIATE, CLR_GREEN),
808. SPELL("create monster",  "turquoise",   P_CLERIC_SPELL, 35,  3, 2, 1, NODIR,     CLR_BRIGHT_CYAN),
809. SPELL("detect food",     "cyan",        P_DIVINATION_SPELL, 30,  3, 2, 1, NODIR,     CLR_CYAN),
810. SPELL("cause fear",      "light blue",  P_ENCHANTMENT_SPELL, 25,  3, 3, 1, NODIR,     CLR_BRIGHT_BLUE),
811. SPELL("clairvoyance",    "dark blue",   P_DIVINATION_SPELL, 15,  3, 3, 1, NODIR,     CLR_BLUE),
812. SPELL("cure sickness",   "indigo",      P_HEALING_SPELL, 32,  3, 3, 1, NODIR,     CLR_BLUE),
813. SPELL("charm monster",   "magenta",     P_ENCHANTMENT_SPELL, 20,  3, 3, 1, IMMEDIATE, CLR_MAGENTA),
814. SPELL("haste self",      "purple",      P_ESCAPE_SPELL, 33,  4, 3, 1, NODIR,     CLR_MAGENTA),
815. SPELL("detect unseen",   "violet",      P_DIVINATION_SPELL, 20,  4, 3, 1, NODIR,     CLR_MAGENTA),
816. SPELL("levitation",      "tan",         P_ESCAPE_SPELL, 20,  4, 4, 1, NODIR,     CLR_BROWN),
817. SPELL("extra healing",   "plaid",       P_HEALING_SPELL, 27,  5, 3, 1, IMMEDIATE, CLR_GREEN),
818. SPELL("restore ability", "light brown", P_HEALING_SPELL, 25,  5, 4, 1, NODIR,     CLR_BROWN),
819. SPELL("invisibility",    "dark brown",  P_ESCAPE_SPELL, 25,  5, 4, 1, NODIR,     CLR_BROWN),
820. SPELL("detect treasure", "gray",        P_DIVINATION_SPELL, 20,  5, 4, 1, NODIR,     CLR_GRAY),
821. SPELL("remove curse",    "wrinkled",    P_CLERIC_SPELL, 25,  5, 3, 1, NODIR,     HI_PAPER),
822. SPELL("magic mapping",   "dusty",       P_DIVINATION_SPELL, 18,  7, 5, 1, NODIR,     HI_PAPER),
823. SPELL("identify",        "bronze",      P_DIVINATION_SPELL, 20,  6, 3, 1, NODIR,     HI_COPPER),
824. SPELL("turn undead",     "copper",      P_CLERIC_SPELL, 16,  8, 6, 1, IMMEDIATE, HI_COPPER),
825. SPELL("polymorph",       "silver",      P_MATTER_SPELL, 10,  8, 6, 1, IMMEDIATE, HI_SILVER),
826. SPELL("teleport away",   "gold",        P_ESCAPE_SPELL, 15,  6, 6, 1, IMMEDIATE, HI_GOLD),
827. SPELL("create familiar", "glittering",  P_CLERIC_SPELL, 10,  7, 6, 1, NODIR,     CLR_WHITE),
828. SPELL("cancellation",    "shining",     P_MATTER_SPELL, 15,  8, 7, 1, IMMEDIATE, CLR_WHITE),
829. SPELL("protection",	     "dull",        P_CLERIC_SPELL, 18,  3, 1, 1, NODIR,     HI_PAPER),
830. SPELL("jumping",	     "thin",        P_ESCAPE_SPELL, 20,  3, 1, 1, IMMEDIATE, HI_PAPER),
831. SPELL("stone to flesh",	 "thick",       P_HEALING_SPELL, 15,  1, 3, 1, IMMEDIATE, HI_PAPER),
832. #if 0	/* DEFERRED */
833. SPELL("flame sphere",    "canvas",      P_MATTER_SPELL, 20,  2, 1, 1, NODIR, CLR_BROWN),
834. SPELL("freeze sphere",   "hardcover",   P_MATTER_SPELL, 20,  2, 1, 1, NODIR, CLR_BROWN),
835. #endif
836. /* blank spellbook must come last because it retains its description */
837. SPELL("blank paper",     "plain",       P_NONE, 18,  0, 0, 0, 0,         HI_PAPER),
838. /* a special, one of a kind, spellbook */
839. OBJECT(OBJ("Book of the Dead", "papyrus"), BITS(0,0,1,0,1,0,1,1,0,0,0,P_NONE,PAPER), 0,
840.  SPBOOK_CLASS, 0, 0,20, 10000, 0, 0, 0, 7, 20, HI_PAPER),
841. #undef SPELL
842. 

Wands

843. /* wands ... */
844. #define WAND(name,typ,prob,cost,mgc,dir,metal,color) OBJECT( \
845.	OBJ(name,typ), BITS(0,0,1,0,mgc,1,0,0,0,0,dir,P_NONE,metal), 0, \
846.	WAND_CLASS, prob, 0, 7, cost, 0, 0, 0, 0, 30, color )
847. WAND("light",          "glass",    95, 100, 1, NODIR,     GLASS,    HI_GLASS),
848. WAND("secret door detection", "balsa",
849.		   50, 150, 1, NODIR,	  WOOD,     HI_WOOD),
850. WAND("enlightenment",  "crystal",  15, 150, 1, NODIR,     GLASS,    HI_GLASS),
851. WAND("create monster", "maple",    45, 200, 1, NODIR,     WOOD,     HI_WOOD),
852. WAND("wishing",        "pine",      5, 500, 1, NODIR,     WOOD,     HI_WOOD),
853. WAND("nothing",        "oak",      25, 100, 0, IMMEDIATE, WOOD,     HI_WOOD),
854. WAND("striking",       "ebony",    75, 150, 1, IMMEDIATE, WOOD,     HI_WOOD),
855. WAND("make invisible", "marble",   45, 150, 1, IMMEDIATE, MINERAL,  HI_MINERAL),
856. WAND("slow monster",   "tin",      50, 150, 1, IMMEDIATE, METAL,    HI_METAL),
857. WAND("speed monster",  "brass",    50, 150, 1, IMMEDIATE, COPPER,   HI_COPPER),
858. WAND("undead turning", "copper",   50, 150, 1, IMMEDIATE, COPPER,   HI_COPPER),
859. WAND("polymorph",      "silver",   45, 200, 1, IMMEDIATE, SILVER,   HI_SILVER),
860. WAND("cancellation",   "platinum", 45, 200, 1, IMMEDIATE, PLATINUM, CLR_WHITE),
861. WAND("teleportation",  "iridium",  45, 200, 1, IMMEDIATE, METAL,    CLR_BRIGHT_CYAN),
862. WAND("opening",        "zinc",     25, 150, 1, IMMEDIATE, METAL,    HI_METAL),
863. WAND("locking",        "aluminum", 25, 150, 1, IMMEDIATE, METAL,    HI_METAL),
864. WAND("probing",        "uranium",  30, 150, 1, IMMEDIATE, METAL,    HI_METAL),
865. WAND("digging",        "iron",     55, 150, 1, RAY,       IRON,     HI_METAL),
866. WAND("magic missile",  "steel",    50, 150, 1, RAY,       IRON,     HI_METAL),
867. WAND("fire",           "hexagonal",40, 175, 1, RAY,       IRON,     HI_METAL),
868. WAND("cold",           "short",    40, 175, 1, RAY,       IRON,     HI_METAL),
869. WAND("sleep",          "runed",    50, 175, 1, RAY,       IRON,     HI_METAL),
870. WAND("death",          "long",      5, 500, 1, RAY,       IRON,     HI_METAL),
871. WAND("lightning",      "curved",   40, 175, 1, RAY,       IRON,     HI_METAL),
872. WAND((char *)0,        "forked",    0, 150, 1, 0,         WOOD,     HI_WOOD),
873. WAND((char *)0,        "spiked",    0, 150, 1, 0,         IRON,     HI_METAL),
874. WAND((char *)0,        "jeweled",   0, 150, 1, 0,         IRON,     HI_MINERAL),
875. #undef WAND
876. 

Coins

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

Gems

884. /* gems ... - includes stones and rocks but not boulders */
885. #define GEM(name,desc,prob,wt,gval,nutr,mohs,glass,color) OBJECT( \
886.      OBJ(name,desc), \
887.      BITS(0,1,0,0,0,0,0,0,0,HARDGEM(mohs),0,-P_SLING,glass), 0, \
888.      GEM_CLASS, prob, 0, 1, gval, 3, 3, 0, 0, nutr, color )
889. #define ROCK(name,desc,kn,prob,wt,gval,sdam,ldam,mgc,nutr,mohs,glass,color) OBJECT( \
890.      OBJ(name,desc), \
891.      BITS(kn,1,0,0,mgc,0,0,0,0,HARDGEM(mohs),0,-P_SLING,glass), 0, \
892.      GEM_CLASS, prob, 0, wt, gval, sdam, ldam, 0, 0, nutr, color )
893. GEM("dilithium crystal", "white",      2,  1, 4500, 15,  5, GEMSTONE, CLR_WHITE),
894. GEM("diamond", "white",                3,  1, 4000, 15, 10, GEMSTONE, CLR_WHITE),
895. GEM("ruby", "red",                     4,  1, 3500, 15,  9, GEMSTONE, CLR_RED),
896. GEM("jacinth", "orange",               3,  1, 3250, 15,  9, GEMSTONE, CLR_ORANGE),
897. GEM("sapphire", "blue",                4,  1, 3000, 15,  9, GEMSTONE, CLR_BLUE),
898. GEM("black opal", "black",             3,  1, 2500, 15,  8, GEMSTONE, CLR_BLACK),
899. GEM("emerald", "green",                5,  1, 2500, 15,  8, GEMSTONE, CLR_GREEN),
900. GEM("turquoise", "green",              6,  1, 2000, 15,  6, GEMSTONE, CLR_GREEN),
901. GEM("citrine", "yellow",               4,  1, 1500, 15,  6, GEMSTONE, CLR_YELLOW),
902. GEM("aquamarine", "green",             6,  1, 1500, 15,  8, GEMSTONE, CLR_GREEN),
903. GEM("amber", "yellowish brown",        8,  1, 1000, 15,  2, GEMSTONE, CLR_BROWN),
904. GEM("topaz", "yellowish brown",       10,  1,  900, 15,  8, GEMSTONE, CLR_BROWN),
905. GEM("jet", "black",                    6,  1,  850, 15,  7, GEMSTONE, CLR_BLACK),
906. GEM("opal", "white",                  12,  1,  800, 15,  6, GEMSTONE, CLR_WHITE),
907. GEM("chrysoberyl", "yellow",           8,  1,  700, 15,  5, GEMSTONE, CLR_YELLOW),
908. GEM("garnet", "red",                  12,  1,  700, 15,  7, GEMSTONE, CLR_RED),
909. GEM("amethyst", "violet",             14,  1,  600, 15,  7, GEMSTONE, CLR_MAGENTA),
910. GEM("jasper", "red",                  15,  1,  500, 15,  7, GEMSTONE, CLR_RED),
911. GEM("fluorite", "violet",             15,  1,  400, 15,  4, GEMSTONE, CLR_MAGENTA),
912. GEM("obsidian", "black",               9,  1,  200, 15,  6, GEMSTONE, CLR_BLACK),
913. GEM("agate", "orange",                12,  1,  200, 15,  6, GEMSTONE, CLR_ORANGE),
914. GEM("jade", "green",                  10,  1,  300, 15,  6, GEMSTONE, CLR_GREEN),
915. GEM("worthless piece of white glass", "white",   77, 1, 0, 6, 5, GLASS, CLR_WHITE),
916. GEM("worthless piece of blue glass", "blue",     77, 1, 0, 6, 5, GLASS, CLR_BLUE),
917. GEM("worthless piece of red glass", "red",       77, 1, 0, 6, 5, GLASS, CLR_RED),
918. GEM("worthless piece of yellowish brown glass", "yellowish brown",
919.			 77, 1, 0, 6, 5, GLASS, CLR_BROWN),
920. GEM("worthless piece of orange glass", "orange", 76, 1, 0, 6, 5, GLASS, CLR_ORANGE),
921. GEM("worthless piece of yellow glass", "yellow", 77, 1, 0, 6, 5, GLASS, CLR_YELLOW),
922. GEM("worthless piece of black glass",  "black",  76, 1, 0, 6, 5, GLASS, CLR_BLACK),
923. GEM("worthless piece of green glass", "green",   77, 1, 0, 6, 5, GLASS, CLR_GREEN),
924. GEM("worthless piece of violet glass", "violet", 77, 1, 0, 6, 5, GLASS, CLR_MAGENTA),
925. 
926. /* Placement note: there is a wishable subrange for
927.  * "gray stones" in the o_ranges[] array in objnam.c
928.  * that is currently everything between luckstones and flint (inclusive).
929.  */
930. ROCK("luckstone", "gray",	0, 10,  10, 60, 3, 3, 1, 10, 7, MINERAL, CLR_GRAY),
931. ROCK("loadstone", "gray",	0, 10, 500,  1, 3, 3, 1, 10, 6, MINERAL, CLR_GRAY),
932. ROCK("touchstone", "gray",	0,  8,  10, 45, 3, 3, 1, 10, 6, MINERAL, CLR_GRAY),
933. ROCK("flint", "gray",		0, 10,  10,  1, 6, 6, 0, 10, 7, MINERAL, CLR_GRAY),
934. ROCK("rock", (char *)0,		1,100,  10,  0, 3, 3, 0, 10, 7, MINERAL, CLR_GRAY),
935. #undef GEM
936. #undef ROCK
937. 

Miscellaneous

938. /* miscellaneous ... */
939. /* Note: boulders and rocks are not normally created at random; the
940.  * probabilities only come into effect when you try to polymorph them.
941.  * Boulders weigh more than MAX_CARR_CAP; statues use corpsenm to take
942.  * on a specific type and may act as containers (both affect weight).
943.  */
944. OBJECT(OBJ("boulder",(char *)0), BITS(1,0,0,0,0,0,0,0,1,0,0,P_NONE,MINERAL), 0,
945.	ROCK_CLASS,   100, 0, 6000,  0, 20, 20, 0, 0, 2000, HI_MINERAL),
946. OBJECT(OBJ("statue", (char *)0), BITS(1,0,0,1,0,0,0,0,0,0,0,P_NONE,MINERAL), 0,
947.	ROCK_CLASS,   900, 0, 2500,  0, 20, 20, 0, 0, 2500, CLR_WHITE),
948. 
949. OBJECT(OBJ("heavy iron ball", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,WHACK,P_NONE,IRON), 0,
950.	BALL_CLASS,  1000, 0,  480, 10, 25, 25, 0, 0,  200, HI_METAL),
951.			/* +d4 when "very heavy" */
952. OBJECT(OBJ("iron chain", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,WHACK,P_NONE,IRON), 0,
953.	CHAIN_CLASS, 1000, 0,  120,  0,  4,  4, 0, 0,  200, HI_METAL),
954.			/* +1 both l & s */
955. 
956. OBJECT(OBJ("blinding venom", "splash of venom"),
957.	BITS(0,1,0,0,0,0,0,1,0,0,0,P_NONE,LIQUID), 0,
958.	VENOM_CLASS,  500, 0,	 1,  0,  0,  0, 0, 0,	 0, HI_ORGANIC),
959. OBJECT(OBJ("acid venom", "splash of venom"),
960.	BITS(0,1,0,0,0,0,0,1,0,0,0,P_NONE,LIQUID), 0,
961.	VENOM_CLASS,  500, 0,	 1,  0,  6,  6, 0, 0,	 0, HI_ORGANIC),
962.	/* +d6 small or large */
963. 
964. /* fencepost, the deadly Array Terminator -- name [1st arg] *must* be NULL */
965.  OBJECT(OBJ((char *)0,(char *)0), BITS(0,0,0,0,0,0,0,0,0,0,0,P_NONE,0), 0,
966.	ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
967. }; /* objects[] */
968. 
969. #ifndef OBJECTS_PASS_2_
970. 
971. /* perform recursive compilation for second structure */
972. #  undef OBJ
973. #  undef OBJECT
974. #  define OBJECTS_PASS_2_
975. #include "objects.c"
976. 
977. void NDECL(objects_init);
978. 
979. /* dummy routine used to force linkage */
980. void
981. objects_init()
982. {
983.     return;
984. }
985. 
986. #endif	/* !OBJECTS_PASS_2_ */
987. 
988. /*objects.c*/