2 #include "cmd-activate.h"
4 typedef struct artifact_type artifact_type;
7 * @struct artifact_type
8 * @brief 固定アーティファクト情報の構造体 / Artifact structure.
11 * the save-file only writes "cur_num" to the savefile.
12 * "max_num" is always "1" (if that artifact "exists")
16 STR_OFFSET name; /*!< アーティファクト名(headerオフセット参照) / Name (offset) */
17 STR_OFFSET text; /*!< アーティファクト解説(headerオフセット参照) / Text (offset) */
19 OBJECT_TYPE_VALUE tval; /*!< ベースアイテム大項目ID / Artifact type */
20 OBJECT_SUBTYPE_VALUE sval; /*!< ベースアイテム小項目ID / Artifact sub type */
22 PARAMETER_VALUE pval; /*!< pval修正値 / Artifact extra info */
24 HIT_PROB to_h; /*!< 命中ボーナス値 / Bonus to hit */
25 HIT_POINT to_d; /*!< ダメージボーナス値 / Bonus to damage */
26 ARMOUR_CLASS to_a; /*!< ACボーナス値 / Bonus to armor */
28 ARMOUR_CLASS ac; /*!< 上書きベースAC値 / Base armor */
31 DICE_SID ds; /*!< ダイス値 / Damage when hits */
33 WEIGHT weight; /*!< 重量 / Weight */
35 PRICE cost; /*!< 基本価格 / Artifact "cost" */
37 BIT_FLAGS flags[TR_FLAG_SIZE]; /*! アイテムフラグ / Artifact Flags */
39 #define TRG_INSTA_ART 0x00000001L /* Item must be an artifact */
40 #define TRG_QUESTITEM 0x00000002L /* quest level item -KMW- */
41 #define TRG_XTRA_POWER 0x00000004L /* Extra power */
42 #define TRG_ONE_SUSTAIN 0x00000008L /* One sustain */
43 #define TRG_XTRA_RES_OR_POWER 0x00000010L /* Extra resistance or power */
44 #define TRG_XTRA_H_RES 0x00000020L /* Extra high resistance */
45 #define TRG_XTRA_E_RES 0x00000040L /* Extra element resistance */
46 #define TRG_XTRA_L_RES 0x00000080L /* Extra lordly resistance */
47 #define TRG_XTRA_D_RES 0x00000100L /* Extra dragon resistance */
48 #define TRG_XTRA_RES 0x00000200L /* Extra resistance */
49 #define TRG_CURSED 0x00000400L /* Item is Cursed */
50 #define TRG_HEAVY_CURSE 0x00000800L /* Item is Heavily Cursed */
51 #define TRG_PERMA_CURSE 0x00001000L /* Item is Perma Cursed */
52 #define TRG_RANDOM_CURSE0 0x00002000L /* Item is Random Cursed */
53 #define TRG_RANDOM_CURSE1 0x00004000L /* Item is Random Cursed */
54 #define TRG_RANDOM_CURSE2 0x00008000L /* Item is Random Cursed */
55 #define TRG_XTRA_DICE 0x00010000L /* Extra dice */
56 #define TRG_POWERFUL 0x00020000L /* Item has good value even if Cursed */
57 BIT_FLAGS gen_flags; /*! アイテム生成フラグ / flags for generate */
59 DEPTH level; /*! 基本生成階 / Artifact level */
60 RARITY rarity; /*! レアリティ / Artifact rarity */
62 byte cur_num; /*! 現在の生成数 / Number created (0 or 1) */
63 byte max_num; /*! (未使用)最大生成数 / Unused (should be "1") */
65 FLOOR_IDX floor_id; /*! アイテムを落としたフロアのID / Leaved on this location last time */
67 byte act_idx; /*! 発動能力ID / Activative ability index */
70 extern artifact_type *a_info;
74 extern ARTIFACT_IDX max_a_idx;
77 extern bool become_random_artifact(player_type *player_ptr, object_type *o_ptr, bool a_scroll);
78 extern int activation_index(object_type *o_ptr);
79 extern const activation_type* find_activation_info(object_type *o_ptr);
80 extern void random_artifact_resistance(object_type *o_ptr, artifact_type *a_ptr);
81 extern bool create_named_art(player_type *player_ptr, ARTIFACT_IDX a_idx, POSITION y, POSITION x);
82 extern bool make_artifact(object_type *o_ptr);
83 extern bool make_artifact_special(object_type *o_ptr);
85 /*** Artifact indexes (see "lib/edit/a_info.txt") ***/
88 #define ART_GALADRIEL 1
92 #define ART_PALANTIR 15
93 #define ART_STONE_LORE 17
94 #define ART_FLY_STONE 147
95 #define ART_ORB_OF_FATE 245
97 #define ART_CARLAMMAS 4
100 #define ART_FARAMIR 18
101 #define ART_BOROMIR 143
102 #define ART_MAGATAMA 149
103 #define ART_INROU 166
104 #define ART_NIGHT 215
105 #define ART_SACRED_KNIGHTS 217
107 #define ART_CHARMED 219
120 #define ART_RAZORBACK 129
121 #define ART_BLADETURNER 130
122 #define ART_SEIRYU 201
125 #define ART_SOULKEEPER 19
126 #define ART_ISILDUR 20
127 #define ART_ROHIRRIM 21
128 #define ART_LOHENGRIN 22
129 #define ART_JULIAN 23
130 #define ART_ARVEDUI 24
131 #define ART_CASPANION 25
132 #define ART_GILES 168
133 #define ART_MORLOK 203
134 #define ART_VETERAN 206
137 #define ART_SHIVA_JACKET 26
138 #define ART_HITHLOMIR 27
139 #define ART_THALKETTOTH 28
140 #define ART_HIMRING 127
141 #define ART_ICANUS 131
142 #define ART_NAMAKE_ARMOR 183
144 #define ART_DASAI 200
145 #define ART_KESHO 204
146 #define ART_MILIM 246
149 #define ART_THORIN 30
150 #define ART_CELEGORM 31
151 #define ART_ANARION 32
152 #define ART_GIL_GALAD 138
153 #define ART_YENDOR 141
155 #define ART_EARENDIL 186
156 #define ART_PERSEUS 197
158 /* Helms and Crowns */
161 #define ART_BERUTHIEL 35
162 #define ART_THRANDUIL 36
163 #define ART_THENGEL 37
164 #define ART_HAMMERHAND 38
166 #define ART_HOLHENNETH 40
167 #define ART_TERROR 41
169 #define ART_NUMENOR 132
170 #define ART_STONEMASK 146
174 #define ART_COLLUIN 44
175 #define ART_HOLCOLLETH 45
176 #define ART_THINGOL 46
177 #define ART_THORONGIL 47
178 #define ART_COLANNON 48
179 #define ART_LUTHIEN 49
182 #define ART_HEAVENLY_MAIDEN 233
185 #define ART_CAMBELEG 52
186 #define ART_CAMMITHRIM 53
187 #define ART_PAURHACH 54
188 #define ART_CORWIN 55
189 #define ART_PAURAEGEN 56
190 #define ART_PAURNEN 57
191 #define ART_THANOS 58
192 #define ART_FINGOLFIN 59
193 #define ART_PAURNIMMEN 185
196 #define ART_FEANOR 60
199 #define ART_SHIVA_BOOTS 63
200 #define ART_GLASS 165
207 #define ART_MAEDHROS 64
209 #define ART_NARTHANC 66
210 #define ART_NIMTHANC 67
211 #define ART_DETHANC 68
214 #define ART_CALRIS 71
215 #define ART_GRAYSWANDIR 72
216 #define ART_GLAMDRING 73
217 #define ART_NOTHUNG 74
218 #define ART_ORCRIST 75
219 #define ART_GURTHANG 76
220 #define ART_ZARCUTHRA 77
221 #define ART_TWILIGHT 78
222 #define ART_GONDRICAM 79
223 #define ART_CRISDURIAN 80
224 #define ART_AGLARANG 81
225 #define ART_RINGIL 82
226 #define ART_ANDURIL 83
227 #define ART_WEREWINDLE 84
228 #define ART_CHAINSWORD 85
229 #define ART_FORASGIL 86
230 #define ART_CARETH 87
232 #define ART_SOULSWORD 89
233 #define ART_MERLIN 90
234 #define ART_DOOMCALLER 91
235 #define ART_VORPAL_BLADE 92
236 #define ART_SLAYER 123
237 #define ART_KUSANAGI 128
238 #define ART_HURIN 133
239 #define ART_AZAGHAL 135
241 #define ART_CHARIOT 140
242 #define ART_WORPAL_BLADE 142
243 #define ART_MURAMASA 144
244 #define ART_ZANTETSU 150
245 #define ART_SOULCRUSH 154
246 #define ART_FALIS 155
247 #define ART_HRUNTING 156
248 #define ART_ANUBIS 158
249 #define ART_GURENKI 160
250 #define ART_TAILBITER 167
251 #define ART_MUSASI_KATANA 171
252 #define ART_MUSASI_WAKIZASI 172
253 #define ART_QUICKTHORN 174
254 #define ART_TINYTHORN 175
255 #define ART_EXCALIBUR 176
256 #define ART_EXCALIPUR 177
257 #define ART_EXCALIBUR_J 179
258 #define ART_ARUNRUTH 184
259 #define ART_HAKABUSA 189
260 #define ART_STORMBRINGER 190
261 #define ART_NARSIL 191
262 #define ART_KANNU 193
263 #define ART_GRIMTOOTH 196
264 #define ART_KAMUI 198
265 #define ART_GOURYU 207
266 #define ART_EOWYN 216
267 #define ART_NANACHO 248
268 #define ART_ROBINTON 251
271 #define ART_THEODEN 93
273 #define ART_OSONDIR 95
275 #define ART_RUNESPEAR 97
276 #define ART_DESTINY 98
278 #define ART_EORLINGAS 100
279 #define ART_DURIN 101
280 #define ART_EONWE 102
281 #define ART_BALLI 103
282 #define ART_LOTHARANG 104
283 #define ART_DWARVES_AXE 105
284 #define ART_BARUKKHELED 106
285 #define ART_WRATH 107
287 #define ART_AVAVIR 109
288 #define ART_BENKEI 152
289 #define ART_TAIKOBO 159
290 #define ART_TONBO 161
291 #define ART_GAEBOLG 163
292 #define ART_ARRYU 164
293 #define ART_AEGLOS 187
294 #define ART_BLOOD 199
295 #define ART_NUMAHOKO 202
297 /* The sword of the Dawn */
301 #define ART_GROND 111
302 #define ART_TOTILA 112
303 #define ART_THUNDERFIST 113
304 #define ART_BLOODSPIKE 114
305 #define ART_FIRESTAR 115
306 #define ART_TARATOL 116
309 #define ART_ERIRIL 119
310 #define ART_GANDALF 120
311 #define ART_DEATHWREAKER 121
312 #define ART_TURMIL 122
313 #define ART_MJOLLNIR 136
314 #define ART_WINBLOWS 139
315 #define ART_XIAOLONG 145
316 #define ART_NYOIBOU 157
317 #define ART_JONES 162
318 #define ART_HYOUSIGI 169
319 #define ART_MATOI 170
320 #define ART_IRON_BALL 173
321 #define ART_SAMSON 178
322 #define ART_NAMAKE_HAMMER 181
323 #define ART_BOLISHOI 188
324 #define ART_SHUTEN_DOJI 194
325 #define ART_G_HAMMER 195
326 #define ART_AEGISFANG 208
327 #define ART_HERMIT 209
328 #define ART_GOTHMOG 212
330 #define ART_FUNDIN 214
331 #define ART_AESCULAPIUS 225
334 #define ART_BELTHRONDING 124
336 #define ART_BRAND 126
337 #define ART_CRIMSON 16
338 #define ART_BUCKLAND 134
339 #define ART_YOICHI 148
340 #define ART_HARAD 180
341 #define ART_NAMAKE_BOW 182
342 #define ART_ROBIN_HOOD 221
343 #define ART_HELLFIRE 222
346 #define ART_BARD_ARROW 153
349 /* "Biases" for random artifact gen */
350 #define BIAS_ELEC 1 /*!< ランダムアーティファクトバイアス:電撃 */
351 #define BIAS_POIS 2 /*!< ランダムアーティファクトバイアス:毒 */
352 #define BIAS_FIRE 3 /*!< ランダムアーティファクトバイアス:火炎 */
353 #define BIAS_COLD 4 /*!< ランダムアーティファクトバイアス:冷気 */
354 #define BIAS_ACID 5 /*!< ランダムアーティファクトバイアス:酸 */
355 #define BIAS_STR 6 /*!< ランダムアーティファクトバイアス:腕力 */
356 #define BIAS_INT 7 /*!< ランダムアーティファクトバイアス:知力 */
357 #define BIAS_WIS 8 /*!< ランダムアーティファクトバイアス:賢さ */
358 #define BIAS_DEX 9 /*!< ランダムアーティファクトバイアス:器用さ */
359 #define BIAS_CON 10 /*!< ランダムアーティファクトバイアス:耐久 */
360 #define BIAS_CHR 11 /*!< ランダムアーティファクトバイアス:魅力 */
361 #define BIAS_CHAOS 12 /*!< ランダムアーティファクトバイアス:混沌 */
362 #define BIAS_PRIESTLY 13 /*!< ランダムアーティファクトバイアス:プリースト系 */
363 #define BIAS_NECROMANTIC 14 /*!< ランダムアーティファクトバイアス:死霊 */
364 #define BIAS_LAW 15 /*!< ランダムアーティファクトバイアス:法 */
365 #define BIAS_ROGUE 16 /*!< ランダムアーティファクトバイアス:盗賊系 */
366 #define BIAS_MAGE 17 /*!< ランダムアーティファクトバイアス:メイジ系 */
367 #define BIAS_WARRIOR 18 /*!< ランダムアーティファクトバイアス:戦士系 */
368 #define BIAS_RANGER 19 /*!< ランダムアーティファクトバイアス:レンジャー系 */
369 #define MAX_BIAS 20 /*!< ランダムアーティファクトバイアス:最大数 */