Source:NetHack 3.4.3/src/objects.c

From NetHackWiki
Jump to: navigation, search

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

Top of file[edit]

  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.

  1. #ifndef OBJECTS_PASS_2_
  2. /* first pass */
  3. struct monst { struct monst *dummy; };	/* lint: struct obj's union */
  4. #include "config.h"
  5. #include "obj.h"
  6. #include "objclass.h"
  7. #include "prop.h"
  8. #include "skills.h"
  9.  
  10. #else	/* !OBJECTS_PASS_2_ */
  11. /* second pass */
  12. #include "color.h"
  13. #  define COLOR_FIELD(X) X,
  14. #endif	/* !OBJECTS_PASS_2_ */

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

  1. /* objects have symbols: ) [ = " ( % ! ? + / $ * ` 0 _ . */
  2.  
  3. /*
  4. *	Note:  OBJ() and BITS() macros are used to avoid exceeding argument
  5. *	limits imposed by some compilers.  The ctnr field of BITS currently
  6. *	does not map into struct objclass, and is ignored in the expansion.
  7. *	The 0 in the expansion corresponds to oc_pre_discovered, which is
  8. *	set at run-time during role-specific character initialization.
  9. */

Object macros[edit]

  1. #ifndef OBJECTS_PASS_2_
  2. /* first pass -- object descriptive text */
  3. # 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.

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

The OBJECT macro.

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

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

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

Weapons[edit]

Weapon macros[edit]

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


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


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

Projectiles[edit]

  1. /* missiles */
  2. PROJECTILE("arrow", (char *)0,
  3. 		1, 55, 1, 2, 6, 6, 0, IRON, -P_BOW, HI_METAL),
  4. PROJECTILE("elven arrow", "runed arrow",
  5. 		0, 20, 1, 2, 7, 6, 0, WOOD, -P_BOW, HI_WOOD),
  6. PROJECTILE("orcish arrow", "crude arrow",
  7. 		0, 20, 1, 2, 5, 6, 0, IRON, -P_BOW, CLR_BLACK),
  8. PROJECTILE("silver arrow", (char *)0,
  9. 		1, 12, 1, 5, 6, 6, 0, SILVER, -P_BOW, HI_SILVER),
  10. PROJECTILE("ya", "bamboo arrow",
  11. 		0, 15, 1, 4, 7, 7, 1, METAL, -P_BOW, HI_METAL),
  12. PROJECTILE("crossbow bolt", (char *)0,
  13. 		1, 55, 1, 2, 4, 6, 0, IRON, -P_CROSSBOW, HI_METAL),
  14.  
  15. WEAPON("dart", (char *)0,
  16. 	1, 1, 0, 60,  1,  2,  3,  2, 0, P,   -P_DART, IRON, HI_METAL),
  17. WEAPON("shuriken", "throwing star",
  18. 	0, 1, 0, 35,  1,  5,  8,  6, 2, P,   -P_SHURIKEN, IRON, HI_METAL),
  19. WEAPON("boomerang", (char *)0,
  20. 	1, 1, 0, 15,  5, 20,  9,  9, 0, 0,   -P_BOOMERANG, WOOD, HI_WOOD),

Spears[edit]

  1. /* spears */
  2. WEAPON("spear", (char *)0,
  3. 	1, 1, 0, 50, 30,  3,  6,  8, 0, P,   P_SPEAR, IRON, HI_METAL),
  4. WEAPON("elven spear", "runed spear",
  5. 	0, 1, 0, 10, 30,  3,  7,  8, 0, P,   P_SPEAR, WOOD, HI_WOOD),
  6. WEAPON("orcish spear", "crude spear",
  7. 	0, 1, 0, 13, 30,  3,  5,  8, 0, P,   P_SPEAR, IRON, CLR_BLACK),
  8. WEAPON("dwarvish spear", "stout spear",
  9. 	0, 1, 0, 12, 35,  3,  8,  8, 0, P,   P_SPEAR, IRON, HI_METAL),
  10. WEAPON("silver spear", (char *)0,
  11. 	1, 1, 0,  2, 36, 40,  6,  8, 0, P,   P_SPEAR, SILVER, HI_SILVER),
  12. WEAPON("javelin", "throwing spear",
  13. 	0, 1, 0, 10, 20,  3,  6,  6, 0, P,   P_JAVELIN, IRON, HI_METAL),
  14.  
  15. WEAPON("trident", (char *)0,
  16. 	1, 0, 0,  8, 25,  5,  6,  4, 0, P,   P_TRIDENT, IRON, HI_METAL),
  17. 						/* +1 small, +2d4 large */

Blades[edit]

  1. /* blades */
  2. WEAPON("dagger", (char *)0,
  3. 	1, 1, 0, 30, 10,  4,  4,  3, 2, P,   P_DAGGER, IRON, HI_METAL),
  4. WEAPON("elven dagger", "runed dagger",
  5. 	0, 1, 0, 10, 10,  4,  5,  3, 2, P,   P_DAGGER, WOOD, HI_WOOD),
  6. WEAPON("orcish dagger", "crude dagger",
  7. 	0, 1, 0, 12, 10,  4,  3,  3, 2, P,   P_DAGGER, IRON, CLR_BLACK),
  8. WEAPON("silver dagger", (char *)0,
  9. 	1, 1, 0,  3, 12, 40,  4,  3, 2, P,   P_DAGGER, SILVER, HI_SILVER),
  10. WEAPON("athame", (char *)0,
  11. 	1, 1, 0,  0, 10,  4,  4,  3, 2, S,   P_DAGGER, IRON, HI_METAL),
  12. WEAPON("scalpel", (char *)0,
  13. 	1, 1, 0,  0,  5,  6,  3,  3, 2, S,   P_KNIFE, METAL, HI_METAL),
  14. WEAPON("knife", (char *)0,
  15. 	1, 1, 0, 20,  5,  4,  3,  2, 0, P|S, P_KNIFE, IRON, HI_METAL),
  16. WEAPON("stiletto", (char *)0,
  17. 	1, 1, 0,  5,  5,  4,  3,  2, 0, P|S, P_KNIFE, IRON, HI_METAL),
  18. WEAPON("worm tooth", (char *)0,
  19. 	1, 0, 0,  0, 20,  2,  2,  2, 0, 0,   P_KNIFE, 0, CLR_WHITE),
  20. WEAPON("crysknife", (char *)0,
  21. 	1, 0, 0,  0, 20,100, 10, 10, 3, P,   P_KNIFE, MINERAL, CLR_WHITE),
  22.  
  23. WEAPON("axe", (char *)0,
  24. 	1, 0, 0, 40, 60,  8,  6,  4, 0, S,   P_AXE, IRON, HI_METAL),
  25. WEAPON("battle-axe", "double-headed axe",
  26. 	0, 0, 1, 10,120, 40,  8,  6, 0, S,   P_AXE, IRON, HI_METAL),
  27. 						/* "double-bitted" ? */

Swords[edit]

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

Polearms[edit]

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

Bludgeoning weapons[edit]

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

Miscellaneous weaponry[edit]

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

Armor[edit]

Armor macros[edit]

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

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

Helmets[edit]

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

Body armor[edit]

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

Cloaks[edit]

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

Shields[edit]

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

Gloves[edit]

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

Boots[edit]

  1. /* boots */
  2. BOOTS("low boots", "walking shoes",
  3. 		0, 0,  0,	  25, 2, 10,  8,  9, 0, LEATHER, HI_LEATHER),
  4. BOOTS("iron shoes", "hard shoes",
  5. 		0, 0,  0,	   7, 2, 50, 16,  8, 0, IRON, HI_METAL),
  6. BOOTS("high boots", "jackboots",
  7. 		0, 0,  0,	  15, 2, 20, 12,  8, 0, LEATHER, HI_LEATHER),
  8. /* With shuffled appearances... */
  9. BOOTS("speed boots", "combat boots",
  10. 		0, 1,  FAST,	  12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),
  11. BOOTS("water walking boots", "jungle boots",
  12. 		0, 1,  WWALKING,  12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),
  13. BOOTS("jumping boots", "hiking boots",
  14. 		0, 1,  JUMPING,   12, 2, 20, 50,  9, 0, LEATHER, HI_LEATHER),
  15. BOOTS("elven boots", "mud boots",
  16. 		0, 1,  STEALTH,   12, 2, 15,  8,  9, 0, LEATHER, HI_LEATHER),
  17. BOOTS("kicking boots", "buckled boots",
  18. 		0, 1,  0,         12, 2, 15,  8,  9, 0, IRON, CLR_BROWN),
  19. BOOTS("fumble boots", "riding boots",
  20. 		0, 1,  FUMBLING,  12, 2, 20, 30,  9, 0, LEATHER, HI_LEATHER),
  21. BOOTS("levitation boots", "snow boots",
  22. 		0, 1,  LEVITATION,12, 2, 15, 30,  9, 0, LEATHER, HI_LEATHER),
  23. #undef HELM
  24. #undef CLOAK
  25. #undef SHIELD
  26. #undef GLOVES
  27. #undef BOOTS
  28. #undef ARMOR

Rings[edit]

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

Amulets[edit]

  1. /* amulets ... - THE Amulet comes last because it is special */
  2. #define AMULET(name,desc,power,prob) OBJECT( \
  3. 		OBJ(name,desc), BITS(0,0,0,0,1,0,0,0,0,0,0,P_NONE,IRON), power, \
  4. 		AMULET_CLASS, prob, 0, 20, 150, 0, 0, 0, 0, 20, HI_METAL )
  5.  
  6. AMULET("amulet of ESP",           "circular",   TELEPAT,    175),
  7. AMULET("amulet of life saving",   "spherical",  LIFESAVED,   75),
  8. AMULET("amulet of strangulation", "oval",       STRANGLED,  135),
  9. AMULET("amulet of restful sleep", "triangular", SLEEPING,   135),
  10. AMULET("amulet versus poison",    "pyramidal",  POISON_RES, 165),
  11. AMULET("amulet of change",        "square",     0,          130),
  12. 						/* POLYMORPH */
  13. AMULET("amulet of unchanging",    "concave",    UNCHANGING,	 45),
  14. AMULET("amulet of reflection",    "hexagonal",  REFLECTING,  75),
  15. AMULET("amulet of magical breathing", "octagonal",      MAGICAL_BREATHING, 65),
  16. OBJECT(OBJ("cheap plastic imitation of the Amulet of Yendor",
  17. 	"Amulet of Yendor"), BITS(0,0,1,0,0,0,0,0,0,0,0,0,PLASTIC), 0,
  18. 	AMULET_CLASS, 0, 0, 20,    0, 0, 0, 0, 0,  1, HI_METAL),
  19. OBJECT(OBJ("Amulet of Yendor",	/* note: description == name */
  20. 	"Amulet of Yendor"), BITS(0,0,1,0,1,0,1,1,0,0,0,0,MITHRIL), 0,
  21. 	AMULET_CLASS, 0, 0, 20, 30000, 0, 0, 0, 0, 20, HI_METAL),
  22. #undef AMULET

Tools[edit]

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

Comestibles[edit]

  1. /* Comestibles ... */
  2. #define FOOD(name,prob,delay,wt,unk,tin,nutrition,color) OBJECT( \
  3. 		OBJ(name,(char *)0), BITS(1,1,unk,0,0,0,0,0,0,0,0,P_NONE,tin), 0, \
  4. 		FOOD_CLASS, prob, delay, \
  5. 		wt, nutrition/20 + 5, 0, 0, 0, 0, nutrition, color )
  6. /* all types of food (except tins & corpses) must have a delay of at least 1. */
  7. /* delay on corpses is computed and is weight dependant */
  8. /* dog eats foods 0-4 but prefers tripe rations above all others */
  9. /* fortune cookies can be read */
  10. /* carrots improve your vision */
  11. /* +0 tins contain monster meat */
  12. /* +1 tins (of spinach) make you stronger (like Popeye) */
  13. /* food CORPSE is a cadaver of some type */
  14. /* meatballs/sticks/rings are only created from objects via stone to flesh */
  15.  
  16. /* meat */
  17. FOOD("tripe ration",       140, 2, 10, 0, FLESH, 200, CLR_BROWN),
  18. FOOD("corpse",               0, 1,  0, 0, FLESH,   0, CLR_BROWN),
  19. FOOD("egg",                 85, 1,  1, 1, FLESH,  80, CLR_WHITE),
  20. FOOD("meatball",             0, 1,  1, 0, FLESH,   5, CLR_BROWN),
  21. FOOD("meat stick",           0, 1,  1, 0, FLESH,   5, CLR_BROWN),
  22. FOOD("huge chunk of meat",   0,20,400, 0, FLESH,2000, CLR_BROWN),
  23. /* special case because it's not mergable */
  24. OBJECT(OBJ("meat ring", (char *)0),
  25. BITS(1,0,0,0,0,0,0,0,0,0,0,0,FLESH),
  26. 0, FOOD_CLASS, 0, 1, 5, 1, 0, 0, 0, 0, 5, CLR_BROWN),
  27.  
  28. /* fruits & veggies */
  29. FOOD("kelp frond",           0, 1,  1, 0, VEGGY,  30, CLR_GREEN),
  30. FOOD("eucalyptus leaf",      3, 1,  1, 0, VEGGY,  30, CLR_GREEN),
  31. FOOD("apple",               15, 1,  2, 0, VEGGY,  50, CLR_RED),
  32. FOOD("orange",              10, 1,  2, 0, VEGGY,  80, CLR_ORANGE),
  33. FOOD("pear",                10, 1,  2, 0, VEGGY,  50, CLR_BRIGHT_GREEN),
  34. FOOD("melon",               10, 1,  5, 0, VEGGY, 100, CLR_BRIGHT_GREEN),
  35. FOOD("banana",              10, 1,  2, 0, VEGGY,  80, CLR_YELLOW),
  36. FOOD("carrot",              15, 1,  2, 0, VEGGY,  50, CLR_ORANGE),
  37. FOOD("sprig of wolfsbane",   7, 1,  1, 0, VEGGY,  40, CLR_GREEN),
  38. FOOD("clove of garlic",      7, 1,  1, 0, VEGGY,  40, CLR_WHITE),
  39. FOOD("slime mold",          75, 1,  5, 0, VEGGY, 250, HI_ORGANIC),
  40.  
  41. /* people food */
  42. FOOD("lump of royal jelly",  0, 1,  2, 0, VEGGY, 200, CLR_YELLOW),
  43. FOOD("cream pie",           25, 1, 10, 0, VEGGY, 100, CLR_WHITE),
  44. FOOD("candy bar",           13, 1,  2, 0, VEGGY, 100, CLR_BROWN),
  45. FOOD("fortune cookie",      55, 1,  1, 0, VEGGY,  40, CLR_YELLOW),
  46. FOOD("pancake",             25, 2,  2, 0, VEGGY, 200, CLR_YELLOW),
  47. FOOD("lembas wafer",        20, 2,  5, 0, VEGGY, 800, CLR_WHITE),
  48. FOOD("cram ration",         20, 3, 15, 0, VEGGY, 600, HI_ORGANIC),
  49. FOOD("food ration",        380, 5, 20, 0, VEGGY, 800, HI_ORGANIC),
  50. FOOD("K-ration",             0, 1, 10, 0, VEGGY, 400, HI_ORGANIC),
  51. FOOD("C-ration",             0, 1, 10, 0, VEGGY, 300, HI_ORGANIC),
  52. FOOD("tin",                 75, 0, 10, 1, METAL,   0, HI_METAL),
  53. #undef FOOD

Potions[edit]

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

Scrolls[edit]

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

Spellbooks[edit]

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

Wands[edit]

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

Coins[edit]

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

Gems[edit]

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

Miscellaneous[edit]

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

objects_init[edit]

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