Source:NetHack 3.3.0/artilist.h

Below is the full text to artilist.h from the source code of NetHack 3.3.0. To link to a particular line, write [[NetHack 3.3.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.3	99/03/22	*/ 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, PM_KNIGHT), 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 a Valkyrie 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, PM_VALKYRIE), 53.   54.   A("Cleaver",			BATTLE_AXE,  55.   	SPFX_RESTR, 0, 0,  56.   	PHYS(3,6),	NO_DFNS,	NO_CARY,	0, A_NEUTRAL, PM_BARBARIAN), 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,	 0	), 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, PM_WIZARD), 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_NONE,	 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_NONE,	 0  ), 86.   87.   A("Dragonbane",			BROADSWORD,  88.   	(SPFX_RESTR|SPFX_DCLAS), 0, S_DRAGON,  89.   	PHYS(5,0),	NO_DFNS,	NO_CARY,	0, A_NONE,	 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_NONE,	 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_NONE,	 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_NONE,	 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, PM_SAMURAI), 133.  134.  A("Sunsword",			LONG_SWORD,  135.  	(SPFX_RESTR|SPFX_DFLAG2), 0, M2_UNDEAD,  136.  	PHYS(5,0),	DFNS(AD_BLND),	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, PM_ARCHEOLOGIST), 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, PM_BARBARIAN), 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, PM_CAVEMAN), 156.  157.  #if 0	/* OBSOLETE */ 158. A("The Palantir of Westernesse",	CRYSTAL_BALL,  159.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL),  160.  		(SPFX_ESP|SPFX_REGEN|SPFX_HSPDAM), 0,  161.  	NO_ATTK,	NO_DFNS,	NO_CARY,  162.  	TAMING,		A_CHAOTIC, PM_ELF), 163. #endif 164.  165.  A("The Staff of Aesculapius",	QUARTERSTAFF,  166.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_ATTK|SPFX_INTEL|SPFX_DRLI|SPFX_REGEN), 0,0,  167.  	DRLI(0,0),	DRLI(0,0),	NO_CARY,  168.  	HEALING,	A_NEUTRAL, PM_HEALER), 169.  170.  A("The Magic Mirror of Merlin", MIRROR,  171.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_SPEAK), SPFX_ESP, 0,  172.  	NO_ATTK,	NO_DFNS,	CARY(AD_MAGM),  173.  	0,		A_LAWFUL, PM_KNIGHT), 174.  175.  A("The Eyes of the Overworld",	LENSES,  176.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_XRAY), 0, 0,  177.  	NO_ATTK,	NO_DFNS,	CARY(AD_MAGM),  178.  	ENLIGHTENING,	A_NEUTRAL,	 PM_MONK), 179.  180.  A("The Mitre of Holiness",	HELM_OF_BRILLIANCE,  181.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_DFLAG2|SPFX_INTEL), 0, M2_UNDEAD,  182.  	NO_ATTK,	NO_DFNS,	CARY(AD_FIRE),  183.  	ENERGY_BOOST,	A_LAWFUL, PM_PRIEST), 184.  185.  A("The Longbow of Artemis", BOW,  186.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_REFLECT), SPFX_ESP, 0,  187.  	PHYS(5,0),	NO_DFNS,	NO_CARY,  188.  	CREATE_AMMO, A_CHAOTIC, PM_RANGER), 189.  190.  A("The Master Key of Thievery", SKELETON_KEY,  191.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_SPEAK),  192.  		(SPFX_WARN|SPFX_TCTRL|SPFX_HPHDAM), 0,  193.  	NO_ATTK,	NO_DFNS,	NO_CARY,  194.  	UNTRAP,		A_CHAOTIC, PM_ROGUE), 195.  196.  A("The Tsurugi of Muramasa",	TSURUGI,  197.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_BEHEAD|SPFX_LUCK), 0, 0,  198.  	PHYS(0,8),	NO_DFNS,	NO_CARY,  199.  	0,		A_LAWFUL, PM_SAMURAI), 200.  201.  #ifdef TOURIST 202. A("The Platinum Yendorian Express Card", CREDIT_CARD,  203.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_DEFN),  204.  		(SPFX_ESP|SPFX_HSPDAM), 0,  205.  	NO_ATTK,	NO_DFNS,	CARY(AD_MAGM),  206.  	CHARGE_OBJ,	A_NEUTRAL, PM_TOURIST), 207. #endif 208.  209.  A("The Orb of Fate",		CRYSTAL_BALL,  210.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_LUCK),  211.  		(SPFX_WARN|SPFX_HSPDAM|SPFX_HPHDAM), 0,  212.  	NO_ATTK,	NO_DFNS,	NO_CARY,  213.  	LEV_TELE,	A_NEUTRAL, PM_VALKYRIE), 214.  215.  A("The Eye of the Aethiopica",	AMULET_OF_ESP,  216.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL), (SPFX_EREGEN|SPFX_HSPDAM), 0,  217.  	NO_ATTK,	NO_DFNS,	CARY(AD_MAGM),  218.  	CREATE_PORTAL,	A_NEUTRAL, PM_WIZARD), 219.  220.  /*  221.   *  terminator; otyp must be zero 222.  */  223.  A(0, 0, 0, 0, 0, NO_ATTK, NO_DFNS, NO_CARY, 0, A_NONE, 0 ) 224.  225.  };	/* artilist[] (or artifact_names[]) */ 226.  227.  #undef	A 228.  229.  #ifndef MAKEDEFS_C 230. #undef	NO_ATTK 231. #undef	NO_DFNS 232. #undef	DFNS 233. #undef	PHYS 234. #undef	DRLI 235. #undef	COLD 236. #undef	FIRE 237. #undef	ELEC 238. #undef	STUN 239. #endif 240.  241.  /*artilist.h*/