Source:NetHack 3.2.0/artilist.h

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

Warning! This is the source code from an old release. For the latest release, see Source code

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