Source:NetHack 3.1.0/artilist.h

From NetHackWiki
Revision as of 06:02, 4 March 2008 by Kernigh bot (talk | contribs) (NetHack 3.1.0/artilist.h moved to Source:NetHack 3.1.0/artilist.h: Robot: moved page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

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

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.    /*	SCCS Id: @(#)artilist.h	3.1	92/12/13	*/
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 const struct artifact NEARDATA 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.   A("Orcrist",			ELVEN_BROADSWORD,
63.   	SPFX_DFLAG2, 0, M2_ORC,
64.   	PHYS(5,0),	NO_DFNS,	NO_CARY,	0, A_LAWFUL,	'E' ),
65.   
66.   A("Sting",			ELVEN_DAGGER,
67.   	(SPFX_WARN|SPFX_DFLAG2), 0, M2_ORC,
68.   	PHYS(5,0),	NO_DFNS,	NO_CARY,	0, A_LAWFUL,	 0  ),
69.   /*
70.    *	Magicbane is a bit different!  Its magic fanfare
71.    *	unbalances victims in addition to doing some damage.
72.    */
73.   A("Magicbane",			ATHAME,
74.   	(SPFX_RESTR|SPFX_ATTK|SPFX_DEFN), 0, 0,
75.   	STUN(3,4),	DFNS(AD_MAGM),	NO_CARY,	0, A_NEUTRAL,	'W' ),
76.   
77.   A("Frost Brand",		LONG_SWORD,
78.   	(SPFX_RESTR|SPFX_ATTK|SPFX_DEFN), 0, 0,
79.   	COLD(5,0),	COLD(0,0),	NO_CARY,	0, A_NEUTRAL,	 0  ),
80.   
81.   A("Fire Brand",			LONG_SWORD,
82.   	(SPFX_RESTR|SPFX_ATTK|SPFX_DEFN), 0, 0,
83.   	FIRE(5,0),	FIRE(0,0),	NO_CARY,	0, A_NEUTRAL,	 0  ),
84.   
85.   A("Dragonbane",			BROADSWORD,
86.   	(SPFX_RESTR|SPFX_DCLAS), 0, S_DRAGON,
87.   	PHYS(5,0),	NO_DFNS,	NO_CARY,	0, A_NEUTRAL,	 0  ),
88.   
89.   A("Demonbane",			LONG_SWORD,
90.   	(SPFX_RESTR|SPFX_DFLAG2), 0, M2_DEMON,
91.   	PHYS(5,0),	NO_DFNS,	NO_CARY,	0, A_LAWFUL,	 0  ),
92.   
93.   A("Werebane",			SILVER_SABER,
94.   	(SPFX_RESTR|SPFX_DFLAG2), 0, M2_WERE,
95.   	PHYS(5,0),	NO_DFNS,	NO_CARY,	0, A_LAWFUL,	 0  ),
96.   
97.   A("Grayswandir",		SILVER_SABER,
98.   	(SPFX_RESTR|SPFX_HALRES), 0, 0,
99.   	PHYS(5,0),	NO_DFNS,	NO_CARY,	0, A_LAWFUL,	 0  ),
100.  
101.  A("Giantslayer",		LONG_SWORD,
102.  	(SPFX_RESTR|SPFX_DFLAG2), 0, M2_GIANT,
103.  	PHYS(5,0),	NO_DFNS,	NO_CARY,	0, A_NEUTRAL,	 0  ),
104.  
105.  A("Ogresmasher",		WAR_HAMMER,
106.  	(SPFX_RESTR|SPFX_DCLAS), 0, S_OGRE,
107.  	PHYS(5,0),	NO_DFNS,	NO_CARY,	0, A_LAWFUL,	 0  ),
108.  
109.  A("Trollsbane",			MORNING_STAR,
110.  	(SPFX_RESTR|SPFX_DCLAS), 0, S_TROLL,
111.  	PHYS(5,0),	NO_DFNS,	NO_CARY,	0, A_LAWFUL,	 0  ),
112.  /*
113.   *	Two problems:  1) doesn't let trolls regenerate heads,
114.   *	2) doesn't give unusual message for 2-headed monsters (but
115.   *	allowing those at all causes more problems than worth the effort).
116.   */
117.  A("Vorpal Blade",		LONG_SWORD,
118.  	(SPFX_RESTR|SPFX_BEHEAD), 0, 0,
119.  	PHYS(5,1),	NO_DFNS,	NO_CARY,	0, A_NEUTRAL,	 0  ),
120.  /*
121.   *	Ah, never shall I forget the cry,
122.   *		or the shriek that shrieked he,
123.   *	As I gnashed my teeth, and from my sheath
124.   *		I drew my Snickersnee!
125.   *			--Koko, Lord high executioner of Titipu
126.   *			  (From Sir W.S. Gilbert's "The Mikado")
127.   */
128.  A("Snickersnee",		KATANA,
129.  	SPFX_RESTR, 0, 0,
130.  	PHYS(0,8),	NO_DFNS,	NO_CARY,	0, A_LAWFUL,	'S' ),
131.  
132.  A("Sunsword",			LONG_SWORD,
133.  	(SPFX_RESTR|SPFX_DFLAG2), 0, M2_UNDEAD,
134.  	PHYS(5,0),	NO_DFNS,	NO_CARY,	0, A_LAWFUL,	 0  ),
135.  
136.  #ifdef MULDGN
137.  /*
138.   *	The artifacts for the quest dungeon, all self-willed.
139.   */
140.  
141.  A("The Orb of Detection",	CRYSTAL_BALL,
142.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL), (SPFX_ESP|SPFX_HSPDAM), 0,
143.  	NO_ATTK,	NO_DFNS,	CARY(AD_MAGM),
144.  	INVIS,		A_LAWFUL,	'A' ),
145.  
146.  A("The Heart of Ahriman", LUCKSTONE,
147.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL), SPFX_STLTH, 0,
148.  	NO_ATTK,	NO_DFNS,	NO_CARY,
149.  	LEVITATION,	A_NEUTRAL,	'B' ),
150.  
151.  A("The Sceptre of Might",	QUARTERSTAFF,
152.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_DALIGN), 0, 0,
153.  	PHYS(0,0),	NO_DFNS,	CARY(AD_MAGM),
154.  	CONFLICT,	A_LAWFUL,	'C' ),
155.  
156.  A("The Palantir of Westernesse",	CRYSTAL_BALL,
157.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL),
158.  		(SPFX_ESP|SPFX_REGEN|SPFX_HSPDAM), 0,
159.  	NO_ATTK,	NO_DFNS,	NO_CARY,
160.  	TAMING,		A_CHAOTIC,	'E' ),
161.  
162.  A("The Staff of Aesculapius",	QUARTERSTAFF,
163.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_ATTK|SPFX_INTEL|SPFX_DRLI|SPFX_REGEN), 0,0,
164.  	DRLI(0,0),	NO_DFNS,	NO_CARY,
165.  	HEALING,	A_NEUTRAL,	'H' ),
166.  
167.  A("The Magic Mirror of Merlin",	MIRROR,
168.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_SPEEK), SPFX_ESP, 0,
169.  	NO_ATTK,	NO_DFNS,	CARY(AD_MAGM),
170.  	0,		A_LAWFUL,	'K' ),
171.  
172.  A("The Mitre of Holiness",	HELM_OF_BRILLIANCE,
173.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_DCLAS|SPFX_INTEL), 0, M2_UNDEAD,
174.  	NO_ATTK,	NO_DFNS,	CARY(AD_FIRE),
175.  	ENERGY_BOOST,	A_LAWFUL,	'P' ),
176.  
177.  A("The Master Key of Thievery", SKELETON_KEY,
178.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_SPEEK),
179.  		(SPFX_WARN|SPFX_TCTRL|SPFX_HPHDAM), 0,
180.  	NO_ATTK,	NO_DFNS,	NO_CARY,
181.  	UNTRAP,		A_CHAOTIC,	'R' ),
182.  
183.  A("The Tsurugi of Muramasa",	TSURUGI,
184.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_BEHEAD|SPFX_LUCK), 0, 0,
185.  	NO_ATTK,	NO_DFNS,	NO_CARY,
186.  	0,		A_LAWFUL,	'S' ),
187.  
188.  # ifdef TOURIST
189.  A("The Platinum Yendorian Express Card", CREDIT_CARD,
190.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_DEFN),
191.  		(SPFX_ESP|SPFX_HSPDAM), 0,
192.  	NO_ATTK,	NO_DFNS,	CARY(AD_MAGM),
193.  	CHARGE_OBJ,	A_NEUTRAL,	'T' ),
194.  # endif
195.  
196.  A("The Orb of Fate",		CRYSTAL_BALL,
197.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_LUCK),
198.  		(SPFX_WARN|SPFX_HSPDAM|SPFX_HPHDAM), 0,
199.  	NO_ATTK,	NO_DFNS,	NO_CARY,
200.  	LEV_TELE,	A_NEUTRAL,	'V' ),
201.  
202.  A("The Eye of the Aethiopica",	AMULET_OF_ESP,
203.  	(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL), (SPFX_EREGEN|SPFX_HSPDAM), 0,
204.  	NO_ATTK,	NO_DFNS,	CARY(AD_MAGM),
205.  	CREATE_PORTAL,	A_NEUTRAL,	'W' ),
206.  #endif	/* MULDGN */
207.  /*
208.   *  terminator; otyp must be zero
209.   */
210.  A(0, 0, 0, 0, 0, NO_ATTK, NO_DFNS, NO_CARY, 0, A_NONE, 0 )
211.  
212.  };	/* artilist[] (or artifact_names[]) */
213.  
214.  #undef	A
215.  
216.  #ifndef MAKEDEFS_C
217.  #undef	NO_ATTK
218.  #undef	NO_DFNS
219.  #undef	DFNS
220.  #undef	PHYS
221.  #undef	DRLI
222.  #undef	COLD
223.  #undef	FIRE
224.  #undef	ELEC
225.  #undef	STUN
226.  #endif
227.  
228.  /*artilist.h*/