OSDN Git Service

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