Source:NetHack 3.4.3/include/artilist.h

From NetHackWiki
Jump to: navigation, search

Below is the full text to include/artilist.h from NetHack 3.4.3. To link to a particular line, write [[artilist.h#line123]], for example.

  1. /*	SCCS Id: @(#)artilist.h 3.4	2003/02/12	*/
  2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  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. #ifdef MAKEDEFS_C
  2. /* in makedefs.c, all we care about is the list of names */
  3.  
  4. #define A(nam,typ,s1,s2,mt,atk,dfn,cry,inv,al,cl,rac,cost) nam
  5.  
  6. static const char *artifact_names[] = {
  7. #else
  8. /* in artifact.c, set up the actual artifact list structure */
  9.  
  10. #define A(nam,typ,s1,s2,mt,atk,dfn,cry,inv,al,cl,rac,cost) \
  11. { typ, nam, s1, s2, mt, atk, dfn, cry, inv, al, cl, rac, cost }
  12.  
  13. #define     NO_ATTK	{0,0,0,0}		/* no attack */
  14. #define     NO_DFNS	{0,0,0,0}		/* no defense */
  15. #define     NO_CARY	{0,0,0,0}		/* no carry effects */
  16. #define     DFNS(c)	{0,c,0,0}
  17. #define     CARY(c)	{0,c,0,0}
  18. #define     PHYS(a,b)	{0,AD_PHYS,a,b}		/* physical */
  19. #define     DRLI(a,b)	{0,AD_DRLI,a,b}		/* life drain */
  20. #define     COLD(a,b)	{0,AD_COLD,a,b}
  21. #define     FIRE(a,b)	{0,AD_FIRE,a,b}
  22. #define     ELEC(a,b)	{0,AD_ELEC,a,b}		/* electrical shock */
  23. #define     STUN(a,b)	{0,AD_STUN,a,b}		/* magical attack */
  24.  
  25. STATIC_OVL NEARDATA struct artifact artilist[] = {
  26. #endif	/* MAKEDEFS_C */
  27.  
  28. /* Artifact cost rationale:
  29. * 1.  The more useful the artifact, the better its cost.
  30. * 2.  Quest artifacts are highly valued.
  31. * 3.  Chaotic artifacts are inflated due to scarcity (and balance).
  32. */
  33.  
  34.  
  35. /*  dummy element #0, so that all interesting indices are non-zero */
  36. A("",				STRANGE_OBJECT,
  37. 	0, 0, 0, NO_ATTK, NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 0L ),
  38.  
  39. A("Excalibur",			LONG_SWORD,
  40. 	(SPFX_NOGEN|SPFX_RESTR|SPFX_SEEK|SPFX_DEFN|SPFX_INTEL|SPFX_SEARCH),0,0,
  41. 	PHYS(5,10),	DRLI(0,0),	NO_CARY,	0, A_LAWFUL, PM_KNIGHT, NON_PM, 4000L ),
  42. /*
  43. *	Stormbringer only has a 2 because it can drain a level,
  44. *	providing 8 more.
  45. */
  46. A("Stormbringer",		RUNESWORD,
  47. 	(SPFX_RESTR|SPFX_ATTK|SPFX_DEFN|SPFX_INTEL|SPFX_DRLI), 0, 0,
  48. 	DRLI(5,2),	DRLI(0,0),	NO_CARY,	0, A_CHAOTIC, NON_PM, NON_PM, 8000L ),
  49. /*
  50. *	Mjollnir will return to the hand of the wielder when thrown
  51. *	if the wielder is a Valkyrie wearing Gauntlets of Power.
  52. */
  53. A("Mjollnir",			WAR_HAMMER,		/* Mjo:llnir */
  54. 	(SPFX_RESTR|SPFX_ATTK),  0, 0,
  55. 	ELEC(5,24),	NO_DFNS,	NO_CARY,	0, A_NEUTRAL, PM_VALKYRIE, NON_PM, 4000L ),
  56.  
  57. A("Cleaver",			BATTLE_AXE,
  58. 	SPFX_RESTR, 0, 0,
  59. 	PHYS(3,6),	NO_DFNS,	NO_CARY,	0, A_NEUTRAL, PM_BARBARIAN, NON_PM, 1500L ),
  60.  
  61. A("Grimtooth",			ORCISH_DAGGER,
  62. 	SPFX_RESTR, 0, 0,
  63. 	PHYS(2,6),	NO_DFNS,	NO_CARY,	0, A_CHAOTIC, NON_PM, PM_ORC, 300L ),
  64. /*
  65. *	Orcrist and Sting have same alignment as elves.
  66. */
  67. A("Orcrist",			ELVEN_BROADSWORD,
  68. 	SPFX_DFLAG2, 0, M2_ORC,
  69. 	PHYS(5,0),	NO_DFNS,	NO_CARY,	0, A_CHAOTIC, NON_PM, PM_ELF, 2000L ),
  70.  
  71. /*
  72. *	The combination of SPFX_WARN and M2_something on an artifact
  73. *	will trigger EWarn_of_mon for all monsters that have the appropriate
  74. *	M2_something flags.  In Sting's case it will trigger EWarn_of_mon
  75. *	for M2_ORC monsters.
  76. */
  77. A("Sting",			ELVEN_DAGGER,
  78. 	(SPFX_WARN|SPFX_DFLAG2), 0, M2_ORC,
  79. 	PHYS(5,0),	NO_DFNS,	NO_CARY,	0, A_CHAOTIC, NON_PM, PM_ELF, 800L ),
  80. /*
  81. *	Magicbane is a bit different!  Its magic fanfare
  82. *	unbalances victims in addition to doing some damage.
  83. */
  84. A("Magicbane",			ATHAME,
  85. 	(SPFX_RESTR|SPFX_ATTK|SPFX_DEFN), 0, 0,
  86. 	STUN(3,4),	DFNS(AD_MAGM),	NO_CARY,	0, A_NEUTRAL, PM_WIZARD, NON_PM, 3500L ),
  87.  
  88. A("Frost Brand",		LONG_SWORD,
  89. 	(SPFX_RESTR|SPFX_ATTK|SPFX_DEFN), 0, 0,
  90. 	COLD(5,0),	COLD(0,0),	NO_CARY,	0, A_NONE, NON_PM, NON_PM, 3000L ),
  91.  
  92. A("Fire Brand",			LONG_SWORD,
  93. 	(SPFX_RESTR|SPFX_ATTK|SPFX_DEFN), 0, 0,
  94. 	FIRE(5,0),	FIRE(0,0),	NO_CARY,	0, A_NONE, NON_PM, NON_PM, 3000L ),
  95.  
  96. A("Dragonbane",			BROADSWORD,
  97. 	(SPFX_RESTR|SPFX_DCLAS), 0, S_DRAGON,
  98. 	PHYS(5,0),	NO_DFNS,	NO_CARY,	0, A_NONE, NON_PM, NON_PM, 500L ),
  99.  
  100. A("Demonbane",			LONG_SWORD,
  101. 	(SPFX_RESTR|SPFX_DFLAG2), 0, M2_DEMON,
  102. 	PHYS(5,0),	NO_DFNS,	NO_CARY,	0, A_LAWFUL, NON_PM, NON_PM, 2500L ),
  103.  
  104. A("Werebane",			SILVER_SABER,
  105. 	(SPFX_RESTR|SPFX_DFLAG2), 0, M2_WERE,
  106. 	PHYS(5,0),	DFNS(AD_WERE),	NO_CARY,	0, A_NONE, NON_PM, NON_PM, 1500L ),
  107.  
  108. A("Grayswandir",		SILVER_SABER,
  109. 	(SPFX_RESTR|SPFX_HALRES), 0, 0,
  110. 	PHYS(5,0),	NO_DFNS,	NO_CARY,	0, A_LAWFUL, NON_PM, NON_PM, 8000L ),
  111.  
  112. A("Giantslayer",		LONG_SWORD,
  113. 	(SPFX_RESTR|SPFX_DFLAG2), 0, M2_GIANT,
  114. 	PHYS(5,0),	NO_DFNS,	NO_CARY,	0, A_NEUTRAL, NON_PM, NON_PM, 200L ),
  115.  
  116. A("Ogresmasher",		WAR_HAMMER,
  117. 	(SPFX_RESTR|SPFX_DCLAS), 0, S_OGRE,
  118. 	PHYS(5,0),	NO_DFNS,	NO_CARY,	0, A_NONE, NON_PM, NON_PM, 200L ),
  119.  
  120. A("Trollsbane",			MORNING_STAR,
  121. 	(SPFX_RESTR|SPFX_DCLAS), 0, S_TROLL,
  122. 	PHYS(5,0),	NO_DFNS,	NO_CARY,	0, A_NONE, NON_PM, NON_PM, 200L ),
  123. /*
  124. *	Two problems:  1) doesn't let trolls regenerate heads,
  125. *	2) doesn't give unusual message for 2-headed monsters (but
  126. *	allowing those at all causes more problems than worth the effort).
  127. */
  128. A("Vorpal Blade",		LONG_SWORD,
  129. 	(SPFX_RESTR|SPFX_BEHEAD), 0, 0,
  130. 	PHYS(5,1),	NO_DFNS,	NO_CARY,	0, A_NEUTRAL, NON_PM, NON_PM, 4000L ),
  131. /*
  132. *	Ah, never shall I forget the cry,
  133. *		or the shriek that shrieked he,
  134. *	As I gnashed my teeth, and from my sheath
  135. *		I drew my Snickersnee!
  136. *			--Koko, Lord high executioner of Titipu
  137. *			  (From Sir W.S. Gilbert's "The Mikado")
  138. */
  139. A("Snickersnee",		KATANA,
  140. 	SPFX_RESTR, 0, 0,
  141. 	PHYS(0,8),	NO_DFNS,	NO_CARY,	0, A_LAWFUL, PM_SAMURAI, NON_PM, 1200L ),
  142.  
  143. A("Sunsword",			LONG_SWORD,
  144. 	(SPFX_RESTR|SPFX_DFLAG2), 0, M2_UNDEAD,
  145. 	PHYS(5,0),	DFNS(AD_BLND),	NO_CARY,	0, A_LAWFUL, NON_PM, NON_PM, 1500L ),
  146.  
  147. /*
  148. *	The artifacts for the quest dungeon, all self-willed.
  149. */
  150.  
  151. A("The Orb of Detection",	CRYSTAL_BALL,
  152. 	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL), (SPFX_ESP|SPFX_HSPDAM), 0,
  153. 	NO_ATTK,	NO_DFNS,	CARY(AD_MAGM),
  154. 	INVIS,		A_LAWFUL, PM_ARCHEOLOGIST, NON_PM, 2500L ),
  155.  
  156. A("The Heart of Ahriman",	LUCKSTONE,
  157. 	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL), SPFX_STLTH, 0,
  158. 	/* this stone does double damage if used as a projectile weapon */
  159. 	PHYS(5,0),	NO_DFNS,	NO_CARY,
  160. 	LEVITATION,	A_NEUTRAL, PM_BARBARIAN, NON_PM, 2500L ),
  161.  
  162. A("The Sceptre of Might",	MACE,
  163. 	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_DALIGN), 0, 0,
  164. 	PHYS(5,0),	NO_DFNS,	CARY(AD_MAGM),
  165. 	CONFLICT,	A_LAWFUL, PM_CAVEMAN, NON_PM, 2500L ),
  166.  
  167. #if 0	/* OBSOLETE */
  168. A("The Palantir of Westernesse",	CRYSTAL_BALL,
  169. 	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL),
  170. 		(SPFX_ESP|SPFX_REGEN|SPFX_HSPDAM), 0,
  171. 	NO_ATTK,	NO_DFNS,	NO_CARY,
  172. 	TAMING,		A_CHAOTIC, NON_PM , PM_ELF, 8000L ),
  173. #endif
  174.  
  175. A("The Staff of Aesculapius",	QUARTERSTAFF,
  176. 	(SPFX_NOGEN|SPFX_RESTR|SPFX_ATTK|SPFX_INTEL|SPFX_DRLI|SPFX_REGEN), 0,0,
  177. 	DRLI(0,0),	DRLI(0,0),	NO_CARY,
  178. 	HEALING,	A_NEUTRAL, PM_HEALER, NON_PM, 5000L ),
  179.  
  180. A("The Magic Mirror of Merlin", MIRROR,
  181. 	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_SPEAK), SPFX_ESP, 0,
  182. 	NO_ATTK,	NO_DFNS,	CARY(AD_MAGM),
  183. 	0,		A_LAWFUL, PM_KNIGHT, NON_PM, 1500L ),
  184.  
  185. A("The Eyes of the Overworld",	LENSES,
  186. 	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_XRAY), 0, 0,
  187. 	NO_ATTK,	NO_DFNS,	CARY(AD_MAGM),
  188. 	ENLIGHTENING,	A_NEUTRAL,	 PM_MONK, NON_PM, 2500L ),
  189.  
  190. A("The Mitre of Holiness",	HELM_OF_BRILLIANCE,
  191. 	(SPFX_NOGEN|SPFX_RESTR|SPFX_DFLAG2|SPFX_INTEL), 0, M2_UNDEAD,
  192. 	NO_ATTK,	NO_DFNS,	CARY(AD_FIRE),
  193. 	ENERGY_BOOST,	A_LAWFUL, PM_PRIEST, NON_PM, 2000L ),
  194.  
  195. A("The Longbow of Diana", BOW,
  196. 	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_REFLECT), SPFX_ESP, 0,
  197. 	PHYS(5,0),	NO_DFNS,	NO_CARY,
  198. 	CREATE_AMMO, A_CHAOTIC, PM_RANGER, NON_PM, 4000L ),
  199.  
  200. A("The Master Key of Thievery", SKELETON_KEY,
  201. 	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_SPEAK),
  202. 		(SPFX_WARN|SPFX_TCTRL|SPFX_HPHDAM), 0,
  203. 	NO_ATTK,	NO_DFNS,	NO_CARY,
  204. 	UNTRAP,		A_CHAOTIC, PM_ROGUE, NON_PM, 3500L ),
  205.  
  206. A("The Tsurugi of Muramasa",	TSURUGI,
  207. 	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_BEHEAD|SPFX_LUCK), 0, 0,
  208. 	PHYS(0,8),	NO_DFNS,	NO_CARY,
  209. 	0,		A_LAWFUL, PM_SAMURAI, NON_PM, 4500L ),
  210.  
  211. #ifdef TOURIST
  212. A("The Platinum Yendorian Express Card", CREDIT_CARD,
  213. 	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_DEFN),
  214. 		(SPFX_ESP|SPFX_HSPDAM), 0,
  215. 	NO_ATTK,	NO_DFNS,	CARY(AD_MAGM),
  216. 	CHARGE_OBJ,	A_NEUTRAL, PM_TOURIST, NON_PM, 7000L ),
  217. #endif
  218.  
  219. A("The Orb of Fate",		CRYSTAL_BALL,
  220. 	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_LUCK),
  221. 		(SPFX_WARN|SPFX_HSPDAM|SPFX_HPHDAM), 0,
  222. 	NO_ATTK,	NO_DFNS,	NO_CARY,
  223. 	LEV_TELE,	A_NEUTRAL, PM_VALKYRIE, NON_PM, 3500L ),
  224.  
  225. A("The Eye of the Aethiopica",	AMULET_OF_ESP,
  226. 	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL), (SPFX_EREGEN|SPFX_HSPDAM), 0,
  227. 	NO_ATTK,	NO_DFNS,	CARY(AD_MAGM),
  228. 	CREATE_PORTAL,	A_NEUTRAL, PM_WIZARD, NON_PM, 4000L ),
  229.  
  230. /*
  231. *  terminator; otyp must be zero
  232. */
  233. A(0, 0, 0, 0, 0, NO_ATTK, NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 0L )
  234.  
  235. };	/* artilist[] (or artifact_names[]) */
  236.  
  237. #undef	A
  238.  
  239. #ifndef MAKEDEFS_C
  240. #undef	NO_ATTK
  241. #undef	NO_DFNS
  242. #undef	DFNS
  243. #undef	PHYS
  244. #undef	DRLI
  245. #undef	COLD
  246. #undef	FIRE
  247. #undef	ELEC
  248. #undef	STUN
  249. #endif
  250.  
  251. /*artilist.h*/