1 /* NetHack 3.7  artilist.h      $NHDT-Date: 1596498526 2020/08/03 23:48:46 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.23 $ */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /*-Copyright (c) Robert Patrick Rankin, 2017. */
4 /* NetHack may be freely redistributed.  See license for details. */
5 
6 #if defined(MAKEDEFS_C) || defined (MDLIB_C)
7 /* in makedefs.c, all we care about is the list of names */
8 
9 #define A(nam, typ, s1, s2, mt, atk, dfn, cry, inv, al, cl, rac, cost, clr) nam
10 
11 static const char *artifact_names[] = {
12 #else
13 /* in artifact.c, set up the actual artifact list structure */
14 
15 #define A(nam, typ, s1, s2, mt, atk, dfn, cry, inv, al, cl, rac, cost, clr) \
16     {                                                                       \
17         typ, nam, s1, s2, mt, atk, dfn, cry, inv, al, cl, rac, cost, clr    \
18     }
19 
20 /* clang-format off */
21 #define     NO_ATTK     {0,0,0,0}               /* no attack */
22 #define     NO_DFNS     {0,0,0,0}               /* no defense */
23 #define     NO_CARY     {0,0,0,0}               /* no carry effects */
24 #define     DFNS(c)     {0,c,0,0}
25 #define     CARY(c)     {0,c,0,0}
26 #define     PHYS(a,b)   {0,AD_PHYS,a,b}         /* physical */
27 #define     DRLI(a,b)   {0,AD_DRLI,a,b}         /* life drain */
28 #define     COLD(a,b)   {0,AD_COLD,a,b}
29 #define     FIRE(a,b)   {0,AD_FIRE,a,b}
30 #define     ELEC(a,b)   {0,AD_ELEC,a,b}         /* electrical shock */
31 #define     STUN(a,b)   {0,AD_STUN,a,b}         /* magical attack */
32 #define     POIS(a,b)   {0,AD_DRST,a,b}         /* poison */
33 /* clang-format on */
34 
35 static NEARDATA struct artifact artilist[] = {
36 #endif /* MAKEDEFS_C || MDLIB_C */
37 
38     /* Artifact cost rationale:
39      * 1.  The more useful the artifact, the better its cost.
40      * 2.  Quest artifacts are highly valued.
41      * 3.  Chaotic artifacts are inflated due to scarcity (and balance).
42      */
43 
44     /*  dummy element #0, so that all interesting indices are non-zero */
45     A("", STRANGE_OBJECT, 0, 0, 0, NO_ATTK, NO_DFNS, NO_CARY, 0, A_NONE,
46       NON_PM, NON_PM, 0L, NO_COLOR),
47 
48     A("Excalibur", LONG_SWORD, (SPFX_NOGEN | SPFX_RESTR | SPFX_SEEK
49                                 | SPFX_DEFN | SPFX_INTEL | SPFX_SEARCH),
50       0, 0, PHYS(5, 10), DRLI(0, 0), NO_CARY, 0, A_LAWFUL, PM_KNIGHT, NON_PM,
51       4000L, NO_COLOR),
52     /*
53      *      Stormbringer only has a 2 because it can drain a level,
54      *      providing 8 more.
55      */
56     A("Stormbringer", RUNESWORD,
57       (SPFX_RESTR | SPFX_ATTK | SPFX_DEFN | SPFX_INTEL | SPFX_DRLI), 0, 0,
58       DRLI(5, 2), DRLI(0, 0), NO_CARY, 0, A_CHAOTIC, NON_PM, NON_PM, 8000L,
59       NO_COLOR),
60     /*
61      *      Mjollnir can be thrown when wielded if hero has 25 Strength
62      *      (usually via gauntlets of power but possible with rings of
63      *      gain strength).  If the thrower is a Valkyrie, Mjollnir will
64      *      usually (99%) return and then usually (separate 99%) be caught
65      *      and automatically be re-wielded.  When returning Mjollnir is
66      *      not caught, there is a 50:50 chance of hitting hero for damage
67      *      and its lightning shock might destroy some wands and/or rings.
68      *
69      *      Monsters don't throw Mjollnir regardless of strength (not even
70      *      fake-player valkyries).
71      */
72     A("Mjollnir", WAR_HAMMER, /* Mjo:llnir */
73       (SPFX_RESTR | SPFX_ATTK), 0, 0, ELEC(5, 24), NO_DFNS, NO_CARY,
74       LIGHTNING_BOLT, A_NEUTRAL, PM_VALKYRIE, NON_PM, 4000L, NO_COLOR),
75 
76     A("Cleaver", BATTLE_AXE, SPFX_RESTR, 0, 0, PHYS(3, 6), NO_DFNS, NO_CARY,
77       0, A_NEUTRAL, PM_BARBARIAN, NON_PM, 1500L, NO_COLOR),
78 
79     /*
80      *      Grimtooth glows in warning when elves are present, but its
81      *      damage bonus applies to all targets rather than just elves
82      *      (handled as special case in spec_dbon()).
83      */
84     A("Grimtooth", ORCISH_DAGGER, (SPFX_RESTR | SPFX_WARN | SPFX_DFLAG2),
85       0, M2_ELF, PHYS(2, 6), POIS(0, 0),
86       NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ORC, 1000L, CLR_RED),
87     /*
88      *      Orcrist and Sting have same alignment as elves.
89      *
90      *      The combination of SPFX_WARN+SPFX_DFLAG2+M2_value will trigger
91      *      EWarn_of_mon for all monsters that have the M2_value flag.
92      *      Sting and Orcrist will warn of M2_ORC monsters.
93      */
94     A("Orcrist", ELVEN_BROADSWORD, (SPFX_WARN | SPFX_DFLAG2), 0, M2_ORC,
95       PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ELF, 2000L,
96       CLR_BRIGHT_BLUE), /* bright blue is actually light blue */
97 
98     A("Sting", ELVEN_DAGGER, (SPFX_WARN | SPFX_DFLAG2), 0, M2_ORC, PHYS(5, 0),
99       NO_DFNS, NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ELF, 800L, CLR_BRIGHT_BLUE),
100     /*
101      *      Magicbane is a bit different!  Its magic fanfare
102      *      unbalances victims in addition to doing some damage.
103      */
104     A("Magicbane", ATHAME, (SPFX_RESTR | SPFX_ATTK | SPFX_DEFN), 0, 0,
105       STUN(3, 4), DFNS(AD_MAGM), NO_CARY, 0, A_NEUTRAL, PM_WIZARD, NON_PM,
106       3500L, NO_COLOR),
107 
108     A("Frost Brand", SHORT_SWORD, (SPFX_RESTR | SPFX_ATTK | SPFX_DEFN), 0, 0,
109       COLD(5, 0), COLD(0, 0), NO_CARY, 0, A_NONE, NON_PM, NON_PM, 3000L,
110       NO_COLOR),
111 
112     A("Fire Brand", SHORT_SWORD, (SPFX_RESTR | SPFX_ATTK | SPFX_DEFN), 0, 0,
113       FIRE(5, 0), FIRE(0, 0), NO_CARY, 0, A_NONE, NON_PM, NON_PM, 3000L,
114       NO_COLOR),
115 
116     A("Dragonbane", DWARVISH_SPEAR,
117       (SPFX_WARN | SPFX_RESTR | SPFX_DCLAS | SPFX_REFLECT), 0, S_DRAGON,
118       PHYS(5, 10), NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 2500L,
119       NO_COLOR),
120 
121     A("Demonbane", MACE, (SPFX_WARN | SPFX_RESTR | SPFX_DFLAG2), 0, M2_DEMON,
122       PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 2500L,
123       CLR_WHITE),
124 
125     A("Werebane", SABER, (SPFX_WARN | SPFX_RESTR | SPFX_DFLAG2), 0, M2_WERE,
126       PHYS(5, 10), DFNS(AD_WERE), NO_CARY, 0, A_NONE, NON_PM, NON_PM, 1500L,
127       NO_COLOR),
128 
129     A("Grayswandir", SABER, (SPFX_RESTR | SPFX_HALRES), 0, 0,
130       PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 8000L,
131       NO_COLOR),
132 
133     A("Giantslayer", LONG_SWORD,
134       (SPFX_WARN | SPFX_RESTR | SPFX_DFLAG2), 0, M2_GIANT,
135       PHYS(5, 10), NO_DFNS, NO_CARY, 0, A_NEUTRAL, NON_PM, NON_PM, 500L,
136       NO_COLOR),
137 
138     A("Ogresmasher", WAR_HAMMER, (SPFX_RESTR | SPFX_HEAVYHIT), 0, 0,
139       PHYS(3, 8), NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 1200L,
140       NO_COLOR),
141 
142     A("Trollsbane", MORNING_STAR,
143       (SPFX_WARN | SPFX_RESTR | SPFX_DCLAS | SPFX_REGEN), 0, S_TROLL,
144       PHYS(5, 10), NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 1000L,
145       NO_COLOR),
146     /*
147      *      Two problems:  1) doesn't let trolls regenerate heads,
148      *      2) doesn't give unusual message for 2-headed monsters (but
149      *      allowing those at all causes more problems than worth the effort).
150      */
151     A("Vorpal Blade", LONG_SWORD, (SPFX_RESTR | SPFX_BEHEAD), 0, 0,
152       PHYS(5, 8), NO_DFNS, NO_CARY, 0, A_NEUTRAL, NON_PM, NON_PM, 4000L,
153       NO_COLOR),
154     /*
155      *      Ah, never shall I forget the cry,
156      *              or the shriek that shrieked he,
157      *      As I gnashed my teeth, and from my sheath
158      *              I drew my Snickersnee!
159      *                      --Koko, Lord high executioner of Titipu
160      *                        (From Sir W.S. Gilbert's "The Mikado")
161      */
162     A("Snickersnee", KATANA, SPFX_RESTR, 0, 0, PHYS(0, 8), NO_DFNS, NO_CARY,
163       0, A_LAWFUL, PM_SAMURAI, NON_PM, 1200L, NO_COLOR),
164 
165     A("Sunsword", LONG_SWORD, (SPFX_RESTR | SPFX_DFLAG2), 0, M2_UNDEAD,
166       PHYS(5, 0), DFNS(AD_BLND), NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 1500L,
167       NO_COLOR),
168 
169     /*
170      *      The artifacts for the quest dungeon, all self-willed.
171      */
172 
173     A("Itlachiayaque", SHIELD_OF_REFLECTION,
174       (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL), SPFX_WARN, 0,
175       NO_ATTK, NO_DFNS, CARY(AD_FIRE), SMOKE_CLOUD, A_LAWFUL, PM_ARCHEOLOGIST,
176       NON_PM, 3500L, NO_COLOR),
177 
178     A("The Heart of Ahriman", LUCKSTONE,
179       (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL), SPFX_STLTH, 0,
180       /* this stone does double damage if used as a projectile weapon */
181       PHYS(5, 0), NO_DFNS, NO_CARY, LEVITATION, A_NEUTRAL, PM_BARBARIAN,
182       NON_PM, 2500L, NO_COLOR),
183 
184     A("Big Stick", CLUB,
185       (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_DEFN),
186       SPFX_STLTH, 0, /* "speak softly..." */
187       PHYS(5, 12), DFNS(AD_MAGM), NO_CARY, CONFLICT, A_CHAOTIC, PM_CAVE_DWELLER,
188       NON_PM, 2500L, NO_COLOR),
189 
190 #if 0 /* OBSOLETE */
191 A("The Palantir of Westernesse",        CRYSTAL_BALL,
192         (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL),
193                 (SPFX_ESP|SPFX_REGEN|SPFX_HSPDAM), 0,
194         NO_ATTK,        NO_DFNS,        NO_CARY,
195         TAMING,         A_CHAOTIC, NON_PM , PM_ELF, 8000L, NO_COLOR ),
196 #endif
197 
198     A("The Staff of Aesculapius", QUARTERSTAFF,
199       (SPFX_NOGEN | SPFX_RESTR | SPFX_ATTK | SPFX_INTEL | SPFX_DRLI
200        | SPFX_REGEN),
201       0, 0, DRLI(0, 0), DRLI(0, 0), NO_CARY, HEALING, A_NEUTRAL, PM_HEALER,
202       NON_PM, 5000L, NO_COLOR),
203 
204     A("The Magic Mirror of Merlin", MIRROR,
205       (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_SPEAK), SPFX_ESP, 0,
206       NO_ATTK, NO_DFNS, CARY(AD_MAGM), 0, A_LAWFUL, PM_KNIGHT, NON_PM, 1500L,
207       NO_COLOR),
208 
209     A("The Eyes of the Overworld", LENSES,
210       (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_XRAY), 0, 0, NO_ATTK,
211       DFNS(AD_MAGM), NO_CARY, ENLIGHTENING, A_NEUTRAL, PM_MONK, NON_PM,
212       2500L, NO_COLOR),
213 
214     A("The Sceptre of Might", MACE,
215       (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_DALIGN), 0, 0, PHYS(5, 0),
216       DRLI(0,0), NO_CARY, ENERGY_BOOST, A_LAWFUL, PM_CLERIC, NON_PM,
217       2500L, NO_COLOR),
218 
219     /* Removed for now. This isn't a bad artifact, but the Sceptre of Might
220      * offers more interesting choices for Priests than this does.
221     A("The Mitre of Holiness", HELM_OF_BRILLIANCE,
222       (SPFX_NOGEN | SPFX_RESTR | SPFX_DFLAG2 | SPFX_INTEL | SPFX_PROTECT), 0,
223       M2_UNDEAD, NO_ATTK, NO_DFNS, CARY(AD_FIRE), ENERGY_BOOST, A_LAWFUL,
224       PM_CLERIC, NON_PM, 2000L, NO_COLOR),
225      */
226 
227     A("The Longbow of Diana", BOW,
228       (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_REFLECT), SPFX_ESP, 0,
229       PHYS(5, 0), NO_DFNS, NO_CARY, CREATE_AMMO, A_CHAOTIC, PM_RANGER, NON_PM,
230       4000L, NO_COLOR),
231 
232     /* MKoT has an additional carry property if the Key is not cursed (for
233        rogues) or blessed (for non-rogues):  #untrap of doors and chests
234        will always find any traps and disarming those will always succeed */
235     A("The Master Key of Thievery", SKELETON_KEY,
236       (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_SPEAK),
237       (SPFX_WARN | SPFX_TCTRL | SPFX_HPHDAM), 0, NO_ATTK, NO_DFNS, NO_CARY,
238       UNTRAP, A_CHAOTIC, PM_ROGUE, NON_PM, 3500L, NO_COLOR),
239 
240     A("The Tsurugi of Muramasa", TSURUGI,
241       (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_BEHEAD | SPFX_LUCK
242        | SPFX_PROTECT),
243       0, 0, PHYS(0, 8), NO_DFNS, NO_CARY, 0, A_LAWFUL, PM_SAMURAI, NON_PM,
244       4500L, NO_COLOR),
245 
246     A("The Platinum Yendorian Express Card", CREDIT_CARD,
247       (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_DEFN),
248       (SPFX_ESP | SPFX_HSPDAM), 0, NO_ATTK, NO_DFNS, CARY(AD_MAGM),
249       CHARGE_OBJ, A_NEUTRAL, PM_TOURIST, NON_PM, 7000L, NO_COLOR),
250 
251     A("The Orb of Fate", CRYSTAL_BALL,
252       (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_LUCK),
253       (SPFX_WARN | SPFX_HSPDAM | SPFX_HPHDAM), 0, NO_ATTK, NO_DFNS, NO_CARY,
254       LEV_TELE, A_NEUTRAL, PM_VALKYRIE, NON_PM, 3500L, NO_COLOR),
255 
256     A("The Eye of the Aethiopica", AMULET_OF_ESP,
257       (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL), (SPFX_EREGEN | SPFX_HSPDAM), 0,
258       NO_ATTK, DFNS(AD_MAGM), NO_CARY, CREATE_PORTAL, A_NEUTRAL, PM_WIZARD,
259       NON_PM, 4000L, NO_COLOR),
260 
261     /*
262      *  terminator; otyp must be zero
263      */
264     A(0, 0, 0, 0, 0, NO_ATTK, NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 0L,
265       0) /* 0 is CLR_BLACK rather than NO_COLOR but it doesn't matter here */
266 
267 }; /* artilist[] (or artifact_names[]) */
268 
269 #undef A
270 
271 #if !defined(MAKEDEFS_C) && !defined(MDLIB_C)
272 #undef NO_ATTK
273 #undef NO_DFNS
274 #undef DFNS
275 #undef PHYS
276 #undef DRLI
277 #undef COLD
278 #undef FIRE
279 #undef ELEC
280 #undef STUN
281 #endif
282 
283 /*artilist.h*/
284