4 * Object information, for a specific object.
6 * Note that a "discount" on an item is permanent and never goes away.
8 * Note that inscriptions are now handled via the "quark_str()" function
9 * applied to the "note" field, which will return NULL if "note" is zero.
11 * Note that "object" records are "copied" on a fairly regular basis,
12 * and care must be taken when handling such objects.
14 * Note that "object flags" must now be derived from the object kind,
15 * the artifact and ego-item indexes, and the two "xtra" fields.
17 * Each grid points to one (or zero) objects via the "o_idx"
18 * field (above). Each object then points to one (or zero) objects
19 * via the "next_o_idx" field, forming a singly linked list, which
20 * in game terms, represents a "stack" of objects in the same grid.
22 * Each monster points to one (or zero) objects via the "hold_o_idx"
23 * field (below). Each object then points to one (or zero) objects
24 * via the "next_o_idx" field, forming a singly linked list, which
25 * in game terms, represents a pile of objects held by the monster.
27 * The "held_m_idx" field is used to indicate which monster, if any,
28 * is holding the object. Objects being held have "ix=0" and "iy=0".
31 #define TR_STR 0 /* STR += "pval" */
32 #define TR_INT 1 /* INT += "pval" */
33 #define TR_WIS 2 /* WIS += "pval" */
34 #define TR_DEX 3 /* DEX += "pval" */
35 #define TR_CON 4 /* CON += "pval" */
36 #define TR_CHR 5 /* CHR += "pval" */
37 #define TR_MAGIC_MASTERY 6 /* Later */
38 #define TR_FORCE_WEAPON 7 /* Later */
39 #define TR_STEALTH 8 /* Stealth += "pval" */
40 #define TR_SEARCH 9 /* Search += "pval" */
41 #define TR_INFRA 10 /* Infra += "pval" */
42 #define TR_TUNNEL 11 /* Tunnel += "pval" */
43 #define TR_SPEED 12 /* Speed += "pval" */
44 #define TR_BLOWS 13 /* Blows += "pval" */
46 #define TR_VAMPIRIC 15
47 #define TR_SLAY_ANIMAL 16
48 #define TR_SLAY_EVIL 17
49 #define TR_SLAY_UNDEAD 18
50 #define TR_SLAY_DEMON 19
51 #define TR_SLAY_ORC 20
52 #define TR_SLAY_TROLL 21
53 #define TR_SLAY_GIANT 22
54 #define TR_SLAY_DRAGON 23
55 #define TR_KILL_DRAGON 24 /* Execute Dragon */
56 #define TR_VORPAL 25 /* Later */
57 #define TR_IMPACT 26 /* Cause Earthquakes */
58 #define TR_BRAND_POIS 27
59 #define TR_BRAND_ACID 28
60 #define TR_BRAND_ELEC 29
61 #define TR_BRAND_FIRE 30
62 #define TR_BRAND_COLD 31
64 #define TR_SUST_STR 32
65 #define TR_SUST_INT 33
66 #define TR_SUST_WIS 34
67 #define TR_SUST_DEX 35
68 #define TR_SUST_CON 36
69 #define TR_SUST_CHR 37
71 #define TR_EASY_SPELL 39
76 #define TR_THROW 44 /* Later */
77 #define TR_REFLECT 45 /* Reflect 'bolts' */
78 #define TR_FREE_ACT 46 /* Free Action */
79 #define TR_HOLD_EXP 47 /* Hold EXP */
80 #define TR_RES_ACID 48
81 #define TR_RES_ELEC 49
82 #define TR_RES_FIRE 50
83 #define TR_RES_COLD 51
84 #define TR_RES_POIS 52
85 #define TR_RES_FEAR 53 /* Added for Zangband */
86 #define TR_RES_LITE 54
87 #define TR_RES_DARK 55
88 #define TR_RES_BLIND 56
89 #define TR_RES_CONF 57
90 #define TR_RES_SOUND 58
91 #define TR_RES_SHARDS 59
92 #define TR_RES_NETHER 60
93 #define TR_RES_NEXUS 61
94 #define TR_RES_CHAOS 62
95 #define TR_RES_DISEN 63
97 #define TR_SH_FIRE 64 /* Immolation (Fire) */
98 #define TR_SH_ELEC 65 /* Electric Sheath */
99 #define TR_SLAY_HUMAN 66 /* Slay human */
100 #define TR_SH_COLD 67 /* cold aura */
101 #define TR_NO_TELE 68 /* Anti-teleportation */
102 #define TR_NO_MAGIC 69 /* Anti-magic */
103 #define TR_DEC_MANA 70 /* ??? */
104 #define TR_TY_CURSE 71 /* The Ancient Curse */
105 #define TR_WARNING 72 /* Warning */
106 #define TR_HIDE_TYPE 73 /* Hide "pval" description */
107 #define TR_SHOW_MODS 74 /* Always show Tohit/Todam */
108 #define TR_SLAY_GOOD 75
109 #define TR_LEVITATION 76 /* Feather Falling */
110 #define TR_LITE_1 77 /* Light Radius 1*/
111 #define TR_SEE_INVIS 78 /* See Invisible */
112 #define TR_TELEPATHY 79 /* Telepathy */
113 #define TR_SLOW_DIGEST 80 /* Item slows down digestion */
114 #define TR_REGEN 81 /* Item induces regeneration */
115 #define TR_XTRA_MIGHT 82 /* Bows get extra multiplier */
116 #define TR_XTRA_SHOTS 83 /* Bows get extra shots */
117 #define TR_IGNORE_ACID 84 /* Item ignores Acid Damage */
118 #define TR_IGNORE_ELEC 85 /* Item ignores Elec Damage */
119 #define TR_IGNORE_FIRE 86 /* Item ignores Fire Damage */
120 #define TR_IGNORE_COLD 87 /* Item ignores Cold Damage */
121 #define TR_ACTIVATE 88 /* Item can be activated */
122 #define TR_DRAIN_EXP 89 /* Item drains Experience */
123 #define TR_TELEPORT 90 /* Item teleports player */
124 #define TR_AGGRAVATE 91 /* Item aggravates monsters */
125 #define TR_BLESSED 92 /* Item is Blessed */
126 #define TR_ES_ATTACK 93 /* Fake flag for Smith */
127 #define TR_ES_AC 94 /* Fake flag for Smith */
128 #define TR_KILL_GOOD 95
130 #define TR_KILL_ANIMAL 96
131 #define TR_KILL_EVIL 97
132 #define TR_KILL_UNDEAD 98
133 #define TR_KILL_DEMON 99
134 #define TR_KILL_ORC 100
135 #define TR_KILL_TROLL 101
136 #define TR_KILL_GIANT 102
137 #define TR_KILL_HUMAN 103
138 #define TR_ESP_ANIMAL 104
139 #define TR_ESP_UNDEAD 105
140 #define TR_ESP_DEMON 106
141 #define TR_ESP_ORC 107
142 #define TR_ESP_TROLL 108
143 #define TR_ESP_GIANT 109
144 #define TR_ESP_DRAGON 110
145 #define TR_ESP_HUMAN 111
146 #define TR_ESP_EVIL 112
147 #define TR_ESP_GOOD 113
148 #define TR_ESP_NONLIVING 114
149 #define TR_ESP_UNIQUE 115
150 #define TR_FULL_NAME 116
151 #define TR_FIXED_FLAVOR 117
152 #define TR_ADD_L_CURSE 118
153 #define TR_ADD_H_CURSE 119
154 #define TR_DRAIN_HP 120
155 #define TR_DRAIN_MANA 121
156 #define TR_LITE_2 122
157 #define TR_LITE_3 123
158 #define TR_LITE_M1 124 /* Permanent decrease Light Area (-1) */
159 #define TR_LITE_M2 125 /* Permanent decrease Light Area (-1) */
160 #define TR_LITE_M3 126 /* Permanent decrease Light Area (-1) */
161 #define TR_LITE_FUEL 127 /* Lights need Fuels */
163 #define TR_CALL_ANIMAL 128
164 #define TR_CALL_DEMON 129
165 #define TR_CALL_DRAGON 130
166 #define TR_CALL_UNDEAD 131
167 #define TR_COWARDICE 132
168 #define TR_LOW_MELEE 133
169 #define TR_LOW_AC 134
170 #define TR_LOW_MAGIC 135
171 #define TR_FAST_DIGEST 136
172 #define TR_SLOW_REGEN 137
174 #define TR_FLAG_MAX 138
175 #define TR_FLAG_SIZE 5
177 #define OBJ_GOLD_LIST 480 /* First "gold" entry */
178 #define MAX_GOLD 18 /* Number of "gold" entries */
180 /* Lite flag macro */
181 #define HAVE_LITE_FLAG(ARRAY) \
182 (have_flag(ARRAY, TR_LITE_1) || have_flag(ARRAY, TR_LITE_2) || have_flag(ARRAY, TR_LITE_3))
184 #define HAVE_DARK_FLAG(ARRAY) \
185 (have_flag(ARRAY, TR_LITE_M1) || have_flag(ARRAY, TR_LITE_M2) || have_flag(ARRAY, TR_LITE_M3))
187 typedef struct object_type object_type;
191 KIND_OBJECT_IDX k_idx; /* Kind index (zero if "dead") */
193 POSITION iy; /* Y-position on map, or zero */
194 POSITION ix; /* X-position on map, or zero */
197 * The values for the "tval" field of various objects.
199 * This value is the primary means by which items are sorted in the
200 * player inventory_list, followed by "sval" and "cost".
202 * Note that a "BOW" with tval = 19 and sval S = 10*N+P takes a missile
203 * weapon with tval = 16+N, and does (xP) damage when so combined. This
204 * fact is not actually used in the source, but it kind of interesting.
206 * Note that as of 2.7.8, the "item flags" apply to all items, though
207 * only armor and weapons and a few other items use any of these flags.
210 #define TV_SKELETON 1 /* Skeletons ('s'), not specified */
211 #define TV_BOTTLE 2 /* Empty bottles ('!') */
212 #define TV_JUNK 3 /* Sticks, Pottery, etc ('~') */
213 #define TV_WHISTLE 4 /* Whistle ('~') */
214 #define TV_SPIKE 5 /* Spikes ('~') */
215 #define TV_CHEST 7 /* Chests ('&') */
216 #define TV_FIGURINE 8 /* Magical figurines */
217 #define TV_STATUE 9 /* Statue, what a silly object... */
218 #define TV_CORPSE 10 /* Corpses and Skeletons, specific */
219 #define TV_CAPTURE 11 /* Monster ball */
220 #define TV_NO_AMMO 15 /* Ammo for crimson */
221 #define TV_SHOT 16 /* Ammo for slings */
222 #define TV_ARROW 17 /* Ammo for bows */
223 #define TV_BOLT 18 /* Ammo for x-bows */
224 #define TV_BOW 19 /* Slings/Bows/Xbows */
225 #define TV_DIGGING 20 /* Shovels/Picks */
226 #define TV_HAFTED 21 /* Priest Weapons */
227 #define TV_POLEARM 22 /* Axes and Pikes */
228 #define TV_SWORD 23 /* Edged Weapons */
229 #define TV_BOOTS 30 /* Boots */
230 #define TV_GLOVES 31 /* Gloves */
231 #define TV_HELM 32 /* Helms */
232 #define TV_CROWN 33 /* Crowns */
233 #define TV_SHIELD 34 /* Shields */
234 #define TV_CLOAK 35 /* Cloaks */
235 #define TV_SOFT_ARMOR 36 /* Soft Armor */
236 #define TV_HARD_ARMOR 37 /* Hard Armor */
237 #define TV_DRAG_ARMOR 38 /* Dragon Scale Mail */
238 #define TV_LITE 39 /* Lites (including Specials) */
239 #define TV_AMULET 40 /* Amulets (including Specials) */
240 #define TV_RING 45 /* Rings (including Specials) */
245 #define TV_PARCHMENT 69
250 #define TV_LIFE_BOOK 90
251 #define TV_SORCERY_BOOK 91
252 #define TV_NATURE_BOOK 92
253 #define TV_CHAOS_BOOK 93
254 #define TV_DEATH_BOOK 94
255 #define TV_TRUMP_BOOK 95
256 #define TV_ARCANE_BOOK 96
257 #define TV_CRAFT_BOOK 97
258 #define TV_DAEMON_BOOK 98
259 #define TV_CRUSADE_BOOK 99
260 #define TV_MUSIC_BOOK 105
261 #define TV_HISSATSU_BOOK 106
262 #define TV_HEX_BOOK 107
263 #define TV_GOLD 127 /* Gold can only be picked up by players */
265 #define TV_EQUIP_BEGIN TV_SHOT
266 #define TV_EQUIP_END TV_CARD
267 #define TV_MISSILE_BEGIN TV_SHOT
268 #define TV_MISSILE_END TV_BOLT
269 #define TV_WEARABLE_BEGIN TV_BOW
270 #define TV_WEARABLE_END TV_CARD
271 #define TV_WEAPON_BEGIN TV_BOW
272 #define TV_WEAPON_END TV_SWORD
273 #define TV_ARMOR_BEGIN TV_BOOTS
274 #define TV_ARMOR_END TV_DRAG_ARMOR
275 OBJECT_TYPE_VALUE tval; /* Item type (from kind) */
277 OBJECT_SUBTYPE_VALUE sval; /* Item sub-type (from kind) */
279 PARAMETER_VALUE pval; /* Item extra-parameter */
281 DISCOUNT_RATE discount; /* Discount (if any) */
283 ITEM_NUMBER number; /* Number of items */
285 WEIGHT weight; /* Item weight */
287 ARTIFACT_IDX name1; /* Artifact type, if any */
288 EGO_IDX name2; /* Ego-Item type, if any */
292 * 変愚ver1.5.0以前に使われていたアイテムの追加特性フラグ / Hack -- special "xtra" object powers
294 #define EGO_XTRA_SUSTAIN 1 /*!< 旧版アイテムフラグ(非推奨): 追加維持能力 / Sustain one stat */
295 #define EGO_XTRA_POWER 2 /*!< 旧版アイテムフラグ(非推奨): 追加上級耐性 / High resist */
296 #define EGO_XTRA_ABILITY 3 /*!< 旧版アイテムフラグ(非推奨): 追加能力 / Special ability */
297 XTRA8 xtra1; /* Extra info type (now unused) */
299 XTRA8 xtra2; /* Extra info activation index */
300 XTRA8 xtra3; /*!< 複数の使用用途 捕らえたモンスターの速度,付加した特殊なエッセンスID / Extra info for weaponsmith */
301 XTRA16 xtra4; /*!< 複数の使用用途 光源の残り寿命、あるいは捕らえたモンスターの現HP / Extra info fuel or captured monster's current HP */
302 XTRA16 xtra5; /*!< 複数の使用用途 捕らえたモンスターの最大HP / Extra info captured monster's max HP */
304 HIT_PROB to_h; /* Plusses to hit */
305 HIT_POINT to_d; /* Plusses to damage */
306 ARMOUR_CLASS to_a; /* Plusses to AC */
308 ARMOUR_CLASS ac; /* Normal AC */
311 DICE_SID ds; /* Damage dice/sides */
313 TIME_EFFECT timeout; /* Timeout Counter */
316 * Special Object Flags
318 #define IDENT_SENSE 0x01 /* Item has been "sensed" */
319 #define IDENT_FIXED 0x02 /* Item has been "haggled" */
320 #define IDENT_EMPTY 0x04 /* Item charges are known */
321 #define IDENT_KNOWN 0x08 /* Item abilities are known */
322 #define IDENT_STORE 0x10 /* Item is storebought !!!! */
323 #define IDENT_FULL_KNOWN 0x20 /* Item information is known */
324 #define IDENT_BROKEN 0x80 /* Item is permanently worthless */
325 byte ident; /* Special flags */
328 * How object is marked (flags in object_type.mark)
329 * OM_FOUND --- original boolean flag
330 * OM_NOMSG --- temporary flag to suppress messages which were
331 * already printed in autopick_pickup_items().
333 #define OM_FOUND 0x01 /*!< アイテムを一度でも視界に収めたことがあるか */
334 #define OM_NOMSG 0x02 /* temporary flag to suppress messages */
335 #define OM_NO_QUERY 0x04 /* Query for auto-pick was already answered as 'No' */
336 #define OM_AUTODESTROY 0x08 /* Destroy later to avoid illegal inventry shift */
337 #define OM_TOUCHED 0x10 /* Object was touched by player */
338 byte marked; /* Object is marked */
340 u16b inscription; /* Inscription index */
341 u16b art_name; /* Artifact name (random artifacts) */
343 byte feeling; /* Game generated inscription number (eg, pseudo-id) */
345 BIT_FLAGS art_flags[TR_FLAG_SIZE]; /* Extra Flags for ego and artifacts */
347 #define TRC_CURSED 0x00000001L
348 #define TRC_HEAVY_CURSE 0x00000002L
349 #define TRC_PERMA_CURSE 0x00000004L
350 #define TRC_XXX1 0x00000008L
351 #define TRC_TY_CURSE 0x00000010L
352 #define TRC_AGGRAVATE 0x00000020L
353 #define TRC_DRAIN_EXP 0x00000040L
354 #define TRC_SLOW_REGEN 0x00000080L
355 #define TRC_ADD_L_CURSE 0x00000100L
356 #define TRC_ADD_H_CURSE 0x00000200L
357 #define TRC_CALL_ANIMAL 0x00000400L
358 #define TRC_CALL_DEMON 0x00000800L
359 #define TRC_CALL_DRAGON 0x00001000L
360 #define TRC_COWARDICE 0x00002000L
361 #define TRC_TELEPORT 0x00004000L
362 #define TRC_LOW_MELEE 0x00008000L
363 #define TRC_LOW_AC 0x00010000L
364 #define TRC_LOW_MAGIC 0x00020000L
365 #define TRC_FAST_DIGEST 0x00040000L
366 #define TRC_DRAIN_HP 0x00080000L
367 #define TRC_DRAIN_MANA 0x00100000L
368 #define TRC_CALL_UNDEAD 0x00200000L
370 #define TRC_TELEPORT_SELF 0x00000001L
371 #define TRC_CHAINSWORD 0x00000002L
372 #define TRC_SPECIAL_MASK \
373 (TRC_TY_CURSE | TRC_AGGRAVATE)
374 #define TRC_HEAVY_MASK \
375 (TRC_TY_CURSE | TRC_AGGRAVATE | TRC_DRAIN_EXP | TRC_ADD_H_CURSE | \
376 TRC_CALL_DEMON | TRC_CALL_DRAGON | TRC_CALL_UNDEAD | TRC_TELEPORT)
377 #define TRC_P_FLAG_MASK \
378 (TRC_TELEPORT_SELF | TRC_CHAINSWORD | \
379 TRC_TY_CURSE | TRC_DRAIN_EXP | TRC_ADD_L_CURSE | TRC_ADD_H_CURSE | \
380 TRC_CALL_ANIMAL | TRC_CALL_DEMON | TRC_CALL_DRAGON | TRC_COWARDICE | \
381 TRC_TELEPORT | TRC_DRAIN_HP | TRC_DRAIN_MANA | TRC_CALL_UNDEAD)
382 BIT_FLAGS curse_flags; /* Flags for curse */
384 OBJECT_IDX next_o_idx; /* Next object in stack (if any) */
385 MONSTER_IDX held_m_idx; /*!< アイテムを所持しているモンスターID (いないなら 0) / Monster holding us (if any) */
387 ARTIFACT_BIAS_IDX artifact_bias; /*!< ランダムアーティファクト生成時のバイアスID */
390 extern bool(*item_tester_hook)(object_type *o_ptr);
391 extern OBJECT_TYPE_VALUE item_tester_tval;
392 extern bool(*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
395 extern void reset_visuals(player_type *owner_ptr);
396 extern void object_flags(object_type *o_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE]);
397 extern void object_flags_known(object_type *o_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE]);
398 extern concptr item_activation(object_type *o_ptr);
400 #define SCROBJ_FAKE_OBJECT 0x00000001
401 #define SCROBJ_FORCE_DETAIL 0x00000002
402 extern bool screen_object(player_type *player_ptr, object_type *o_ptr, BIT_FLAGS mode);
404 extern char index_to_label(int i);
405 extern s16b wield_slot(player_type *owner_ptr, object_type *o_ptr);
407 extern bool check_book_realm(player_type *owner_ptr, const OBJECT_TYPE_VALUE book_tval, const OBJECT_SUBTYPE_VALUE book_sval);
410 * get_item()関数でアイテムの選択を行うフラグ / Bit flags for the "get_item" function
412 #define USE_EQUIP 0x01 /*!< アイテム表示/選択範囲: 装備品からの選択を許可する / Allow equip items */
413 #define USE_INVEN 0x02 /*!< アイテム表示/選択範囲: 所持品からの選択を許可する / Allow inven items */
414 #define USE_FLOOR 0x04 /*!< アイテム表示/選択範囲: 床下のアイテムからの選択を許可する / Allow floor items */
415 #define USE_FORCE 0x08 /*!< 特殊: wキーで錬気術への切り替えを許可する */
416 #define IGNORE_BOTHHAND_SLOT 0x10 /*!< アイテム表示/選択範囲: 両手持ちスロットを選択に含めない */
417 #define USE_FULL 0x20 /*!< アイテム表示/選択範囲: 空欄まですべて表示する*/
419 #define REF_ITEM(P_PTR, FLOOR_PTR, ID) ((ID >= 0 ? &(P_PTR)->inventory_list[ID] : &(FLOOR_PTR)->o_list[0 - item]))
421 extern int bow_tval_ammo(object_type *o_ptr);
424 * todo ここに置くとコンパイルは通る (このファイルの冒頭やobject2.cでincludeするとコンパイルエラー)、しかし圧倒的にダメなので要調整
429 extern void excise_object_idx(floor_type *floor_ptr, OBJECT_IDX o_idx);
430 extern void delete_object_idx(player_type *owner_ptr, OBJECT_IDX o_idx);
431 extern void delete_object(player_type *owner_ptr, POSITION y, POSITION x);
433 extern OBJECT_IDX o_pop(floor_type *floor_ptr);
434 extern OBJECT_IDX get_obj_num(player_type *o_ptr, DEPTH level, BIT_FLAGS mode);
435 extern void object_known(object_type *o_ptr);
436 extern void object_aware(player_type *owner_ptr, object_type *o_ptr);
437 extern void object_tried(object_type *o_ptr);
440 * アイテムの簡易鑑定定義 / Game generated inscription indices. These are stored in the object,
441 * and are used to index the string array from tables.c.
443 #define FEEL_NONE 0 /*!< 簡易鑑定: 未鑑定 */
444 #define FEEL_BROKEN 1 /*!< 簡易鑑定: 壊れている */
445 #define FEEL_TERRIBLE 2 /*!< 簡易鑑定: 恐ろしい */
446 #define FEEL_WORTHLESS 3 /*!< 簡易鑑定: 無価値 */
447 #define FEEL_CURSED 4 /*!< 簡易鑑定: 呪われている */
448 #define FEEL_UNCURSED 5 /*!< 簡易鑑定: 呪われていない */
449 #define FEEL_AVERAGE 6 /*!< 簡易鑑定: 並 */
450 #define FEEL_GOOD 7 /*!< 簡易鑑定: 上質 */
451 #define FEEL_EXCELLENT 8 /*!< 簡易鑑定: 高級 */
452 #define FEEL_SPECIAL 9 /*!< 簡易鑑定: 特別 */
453 #define FEEL_MAX 9 /*!< 簡易鑑定の種別数 */
454 extern byte value_check_aux1(object_type *o_ptr);
455 extern byte value_check_aux2(object_type *o_ptr);
457 extern PRICE object_value(object_type *o_ptr);
458 extern PRICE object_value_real(object_type *o_ptr);
459 extern void distribute_charges(object_type *o_ptr, object_type *q_ptr, int amt);
460 extern void reduce_charges(object_type *o_ptr, int amt);
461 extern int object_similar_part(object_type *o_ptr, object_type *j_ptr);
462 extern bool object_similar(object_type *o_ptr, object_type *j_ptr);
463 extern void object_absorb(object_type *o_ptr, object_type *j_ptr);
464 extern IDX lookup_kind(OBJECT_TYPE_VALUE tval, OBJECT_SUBTYPE_VALUE sval);
465 extern void object_wipe(object_type *o_ptr);
466 extern void object_prep(object_type *o_ptr, KIND_OBJECT_IDX k_idx);
467 extern void object_copy(object_type *o_ptr, object_type *j_ptr);
470 * Bit flags for apply_magic() (etc)
472 #define AM_NO_FIXED_ART 0x00000001 /*!< Don't allow roll for fixed artifacts */
473 #define AM_GOOD 0x00000002 /*!< Generate good items */
474 #define AM_GREAT 0x00000004 /*!< Generate great items */
475 #define AM_SPECIAL 0x00000008 /*!< Generate artifacts (for debug mode only) */
476 #define AM_CURSED 0x00000010 /*!< Generate cursed/worthless items */
477 #define AM_FORBID_CHEST 0x00000020 /*!< 箱からさらに箱が出現することを抑止する */
478 extern void apply_magic(player_type *owner_type, object_type *o_ptr, DEPTH lev, BIT_FLAGS mode);
480 extern OBJECT_SUBTYPE_VALUE coin_type;
482 extern bool make_object(player_type *owner_ptr, object_type *j_ptr, BIT_FLAGS mode);
483 extern bool make_gold(floor_type *floor_ptr, object_type *j_ptr);
484 extern OBJECT_IDX drop_near(player_type *owner_type, object_type *o_ptr, PERCENTAGE chance, POSITION y, POSITION x);
485 extern void vary_item(player_type *owner_ptr, INVENTORY_IDX item, ITEM_NUMBER num);
486 extern void inven_item_charges(player_type *owner_ptr, INVENTORY_IDX item);
487 extern void inven_item_describe(player_type *owner_ptr, INVENTORY_IDX item);
488 extern void inven_item_increase(player_type *owner_ptr, INVENTORY_IDX item, ITEM_NUMBER num);
489 extern void inven_item_optimize(player_type *owner_ptr, INVENTORY_IDX item);
490 extern void floor_item_charges(floor_type *owner_ptr, INVENTORY_IDX item);
491 extern void floor_item_increase(floor_type *floor_ptr, INVENTORY_IDX item, ITEM_NUMBER num);
492 extern void floor_item_optimize(player_type *owner_ptr, INVENTORY_IDX item);
493 extern bool inven_carry_okay(object_type *o_ptr);
494 extern bool object_sort_comp(object_type *o_ptr, s32b o_value, object_type *j_ptr);
495 extern s16b inven_carry(player_type *owner_ptr, object_type *o_ptr);
496 extern INVENTORY_IDX inven_takeoff(player_type *owner_ptr, INVENTORY_IDX item, ITEM_NUMBER amt);
497 extern void drop_from_inventory(player_type *owner_type, INVENTORY_IDX item, ITEM_NUMBER amt);
498 extern void combine_pack(player_type *owner_ptr);
499 extern void reorder_pack(player_type *owner_ptr);
500 extern void display_koff(player_type *owner_ptr, KIND_OBJECT_IDX k_idx);
501 extern void torch_flags(object_type *o_ptr, BIT_FLAGS *flgs);
502 extern void torch_dice(object_type *o_ptr, DICE_NUMBER *dd, DICE_SID *ds);
503 extern void torch_lost_fuel(object_type *o_ptr);
504 extern concptr essence_name[];
506 extern s32b flag_cost(object_type *o_ptr, int plusses);
509 * Return the "attr" for a given item.
510 * Use "flavor" if available.
511 * Default to user definitions.
513 #define object_attr(T) \
514 ((k_info[(T)->k_idx].flavor) ? \
515 (k_info[k_info[(T)->k_idx].flavor].x_attr) : \
516 ((!(T)->k_idx || ((T)->tval != TV_CORPSE) || ((T)->sval != SV_CORPSE) || \
517 (k_info[(T)->k_idx].x_attr != TERM_DARK)) ? \
518 (k_info[(T)->k_idx].x_attr) : (r_info[(T)->pval].x_attr)))
521 /*** Object "sval" codes ***/
526 /* The "sval" codes for TV_FIGURINE */
527 #define SV_FIGURINE_NORMAL 0
529 #define SV_CAPTURE_NONE 0
531 /* The "sval" codes for TV_STATUE */
532 #define SV_WOODEN_STATUE 0
533 #define SV_CLAY_STATUE 1
534 #define SV_STONE_STATUE 2
535 #define SV_IRON_STATUE 3
536 #define SV_COPPER_STATUE 4
537 #define SV_SILVER_STATUE 5
538 #define SV_GOLDEN_STATUE 6
539 #define SV_IVORY_STATUE 7
540 #define SV_MITHRIL_STATUE 8
541 #define SV_ORNATE_STATUE 9
544 /* The "sval" codes for TV_CORPSE */
545 #define SV_SKELETON 0
548 /* The "sval" codes for TV_SHOT/TV_ARROW/TV_BOLT */
549 #define SV_AMMO_LIGHT 0 /* pebbles */
550 #define SV_AMMO_NORMAL 1 /* shots, arrows, bolts */
551 #define SV_AMMO_HEAVY 2 /* seeker arrows and bolts, mithril shots */
553 /* The "sval" codes for TV_BOW (note information in "sval") */
554 #define SV_SLING 2 /* (x2) */
555 #define SV_SHORT_BOW 12 /* (x2) */
556 #define SV_LONG_BOW 13 /* (x3) */
557 #define SV_LIGHT_XBOW 23 /* (x3) */
558 #define SV_HEAVY_XBOW 24 /* (x4) */
559 #define SV_CRIMSON 50 /* (x0) */
560 #define SV_HARP 51 /* (x0) */
561 #define SV_NAMAKE_BOW 63 /* (x3) */
563 /* The "sval" codes for TV_DIGGING */
565 #define SV_GNOMISH_SHOVEL 2
566 #define SV_DWARVEN_SHOVEL 3
568 #define SV_ORCISH_PICK 5
569 #define SV_DWARVEN_PICK 6
572 /* The "sval" values for TV_HAFTED */
573 #define SV_CLUB 1 /* 1d4 */
574 #define SV_WHIP 2 /* 1d6 */
575 #define SV_QUARTERSTAFF 3 /* 1d9 */
576 #define SV_NUNCHAKU 4 /* 2d3 */
577 #define SV_MACE 5 /* 2d4 */
578 #define SV_BALL_AND_CHAIN 6 /* 2d4 */
579 #define SV_JO_STAFF 7 /* 1d7 */
580 #define SV_WAR_HAMMER 8 /* 3d3 */
581 #define SV_THREE_PIECE_ROD 11 /* 3d3 */
582 #define SV_MORNING_STAR 12 /* 2d6 */
583 #define SV_FLAIL 13 /* 2d6 */
584 #define SV_BO_STAFF 14 /* 1d11 */
585 #define SV_LEAD_FILLED_MACE 15 /* 3d4 */
586 #define SV_TETSUBO 16 /* 2d7 */
587 #define SV_TWO_HANDED_FLAIL 18 /* 3d6 */
588 #define SV_GREAT_HAMMER 19 /* 4d6 */
589 #define SV_MACE_OF_DISRUPTION 20 /* 5d8 */
590 #define SV_WIZSTAFF 21 /* 1d2 */
591 #define SV_GROND 50 /* 3d9 */
592 #define SV_NAMAKE_HAMMER 63 /* 1d77 */
594 /* The "sval" values for TV_POLEARM */
595 #define SV_HATCHET 1 /* 1d5 */
596 #define SV_SPEAR 2 /* 1d6 */
597 #define SV_SICKLE 3 /* 2d3 */
598 #define SV_AWL_PIKE 4 /* 1d8 */
599 #define SV_TRIDENT 5 /* 1d9 */
600 #define SV_FAUCHARD 6 /* 1d10 */
601 #define SV_BROAD_SPEAR 7 /* 1d9 */
602 #define SV_PIKE 8 /* 2d5 */
603 #define SV_NAGINATA 9 /* 2d6 */
604 #define SV_BEAKED_AXE 10 /* 2d6 */
605 #define SV_BROAD_AXE 11 /* 2d6 */
606 #define SV_LUCERNE_HAMMER 12 /* 2d5 */
607 #define SV_GLAIVE 13 /* 2d6 */
608 #define SV_LAJATANG 14 /* 2d7 */
609 #define SV_HALBERD 15 /* 3d4 */
610 #define SV_GUISARME 16 /* 2d5 */
611 #define SV_SCYTHE 17 /* 5d3 */
612 #define SV_LANCE 20 /* 2d8 */
613 #define SV_BATTLE_AXE 22 /* 2d8 */
614 #define SV_GREAT_AXE 25 /* 4d4 */
615 #define SV_TRIFURCATE_SPEAR 26 /* 2d9 */
616 #define SV_LOCHABER_AXE 28 /* 3d8 */
617 #define SV_HEAVY_LANCE 29 /* 4d8 */
618 #define SV_SCYTHE_OF_SLICING 30 /* 8d4 */
619 #define SV_TSURIZAO 40 /* 1d1 */
620 #define SV_DEATH_SCYTHE 50 /* 10d10 */
622 /* The "sval" codes for TV_SWORD */
623 #define SV_BROKEN_DAGGER 1 /* 1d1 */
624 #define SV_BROKEN_SWORD 2 /* 1d2 */
625 #define SV_DAGGER 4 /* 1d4 */
626 #define SV_MAIN_GAUCHE 5 /* 1d5 */
627 #define SV_TANTO 6 /* 1d5 */
628 #define SV_RAPIER 7 /* 1d6 */
629 #define SV_SMALL_SWORD 8 /* 1d6 */
630 #define SV_BASILLARD 9 /* 1d8 */
631 #define SV_SHORT_SWORD 10 /* 1d7 */
632 #define SV_SABRE 11 /* 1d7 */
633 #define SV_CUTLASS 12 /* 1d7 */
634 #define SV_WAKIZASHI 13 /* 2d4 */
635 #define SV_KHOPESH 14 /* 2d4 */
636 #define SV_TULWAR 15 /* 2d4 */
637 #define SV_BROAD_SWORD 16 /* 2d5 */
638 #define SV_LONG_SWORD 17 /* 2d5 */
639 #define SV_SCIMITAR 18 /* 2d5 */
640 #define SV_NINJATO 19 /* 1d9 */
641 #define SV_KATANA 20 /* 3d4 */
642 #define SV_BASTARD_SWORD 21 /* 3d4 */
643 #define SV_GREAT_SCIMITAR 22 /* 4d5 */
644 #define SV_CLAYMORE 23 /* 2d8 */
645 #define SV_ESPADON 24 /* 2d9 */
646 #define SV_TWO_HANDED_SWORD 25 /* 3d6 */
647 #define SV_FLAMBERGE 26 /* 3d7 */
648 #define SV_NO_DACHI 27 /* 5d4 */
649 #define SV_EXECUTIONERS_SWORD 28 /* 4d5 */
650 #define SV_ZWEIHANDER 29 /* 4d6 */
651 #define SV_BLADE_OF_CHAOS 30 /* 6d5 */
652 #define SV_DIAMOND_EDGE 31 /* 7d5 */
653 #define SV_POISON_NEEDLE 32 /* 1d1 */
654 #define SV_HAYABUSA 33 /* 1d6 */
656 /* The "sval" codes for TV_SHIELD */
657 #define SV_SMALL_LEATHER_SHIELD 2
658 #define SV_SMALL_METAL_SHIELD 3
659 #define SV_LARGE_LEATHER_SHIELD 4
660 #define SV_LARGE_METAL_SHIELD 5
661 #define SV_DRAGON_SHIELD 6
662 #define SV_KNIGHT_SHIELD 7
663 #define SV_MIRROR_SHIELD 10
664 #define SV_YATA_MIRROR 50
666 /* The "sval" codes for TV_HELM */
667 #define SV_HARD_LEATHER_CAP 2
668 #define SV_METAL_CAP 3
669 #define SV_JINGASA 4 /* 4 */
670 #define SV_IRON_HELM 5
671 #define SV_STEEL_HELM 6
672 #define SV_DRAGON_HELM 7
673 #define SV_KABUTO 8 /* 7 */
675 /* The "sval" codes for TV_CROWN */
676 #define SV_IRON_CROWN 10
677 #define SV_GOLDEN_CROWN 11
678 #define SV_JEWELED_CROWN 12
681 /* The "sval" codes for TV_BOOTS */
682 #define SV_PAIR_OF_SOFT_LEATHER_BOOTS 2
683 #define SV_PAIR_OF_HARD_LEATHER_BOOTS 3
684 #define SV_PAIR_OF_DRAGON_GREAVE 4
685 #define SV_PAIR_OF_METAL_SHOD_BOOTS 6
687 /* The "sval" codes for TV_CLOAK */
689 #define SV_ELVEN_CLOAK 2
690 #define SV_FUR_CLOAK 3
691 #define SV_ETHEREAL_CLOAK 5
692 #define SV_SHADOW_CLOAK 6
694 /* The "sval" codes for TV_GLOVES */
695 #define SV_SET_OF_LEATHER_GLOVES 1
696 #define SV_SET_OF_GAUNTLETS 2
697 #define SV_SET_OF_DRAGON_GLOVES 3
698 #define SV_SET_OF_CESTI 5
700 /* The "sval" codes for TV_SOFT_ARMOR */
702 #define SV_FILTHY_RAG 1
704 #define SV_PAPER_ARMOR 3 /* 4 */
705 #define SV_SOFT_LEATHER_ARMOR 4
706 #define SV_SOFT_STUDDED_LEATHER 5
707 #define SV_HARD_LEATHER_ARMOR 6
708 #define SV_HARD_STUDDED_LEATHER 7
709 #define SV_RHINO_HIDE_ARMOR 8
710 #define SV_CORD_ARMOR 9 /* 6 */
711 #define SV_PADDED_ARMOR 10 /* 4 */
712 #define SV_LEATHER_SCALE_MAIL 11
713 #define SV_LEATHER_JACK 12
714 #define SV_KUROSHOUZOKU 13
715 #define SV_STONE_AND_HIDE_ARMOR 15 /* 15 */
716 #define SV_ABUNAI_MIZUGI 50
717 #define SV_YOIYAMI_ROBE 60
718 #define SV_NAMAKE_ARMOR 63
720 /* The "sval" codes for TV_HARD_ARMOR */
721 #define SV_RUSTY_CHAIN_MAIL 1 /* 14- */
722 #define SV_RING_MAIL 2 /* 12 */
723 #define SV_METAL_SCALE_MAIL 3 /* 13 */
724 #define SV_CHAIN_MAIL 4 /* 14 */
725 #define SV_DOUBLE_RING_MAIL 5 /* 15 */
726 #define SV_AUGMENTED_CHAIN_MAIL 6 /* 16 */
727 #define SV_DOUBLE_CHAIN_MAIL 7 /* 16 */
728 #define SV_BAR_CHAIN_MAIL 8 /* 18 */
729 #define SV_METAL_BRIGANDINE_ARMOUR 9 /* 19 */
730 #define SV_SPLINT_MAIL 10 /* 19 */
731 #define SV_DO_MARU 11 /* 20 */
732 #define SV_PARTIAL_PLATE_ARMOUR 12 /* 22 */
733 #define SV_METAL_LAMELLAR_ARMOUR 13 /* 23 */
734 #define SV_HARAMAKIDO 14 /* 17 */
735 #define SV_FULL_PLATE_ARMOUR 15 /* 25 */
736 #define SV_O_YOROI 16 /* 24 */
737 #define SV_RIBBED_PLATE_ARMOUR 18 /* 28 */
738 #define SV_MITHRIL_CHAIN_MAIL 20 /* 28+ */
739 #define SV_MITHRIL_PLATE_MAIL 25 /* 35+ */
740 #define SV_ADAMANTITE_PLATE_MAIL 30 /* 40+ */
742 /* The "sval" codes for TV_DRAG_ARMOR */
743 #define SV_DRAGON_BLACK 1
744 #define SV_DRAGON_BLUE 2
745 #define SV_DRAGON_WHITE 3
746 #define SV_DRAGON_RED 4
747 #define SV_DRAGON_GREEN 5
748 #define SV_DRAGON_MULTIHUED 6
749 #define SV_DRAGON_SHINING 10
750 #define SV_DRAGON_LAW 12
751 #define SV_DRAGON_BRONZE 14
752 #define SV_DRAGON_GOLD 16
753 #define SV_DRAGON_CHAOS 18
754 #define SV_DRAGON_BALANCE 20
755 #define SV_DRAGON_POWER 30
757 /* The sval codes for TV_LITE */
758 #define SV_LITE_TORCH 0
759 #define SV_LITE_LANTERN 1
760 #define SV_LITE_FEANOR 2
761 #define SV_LITE_EDISON 3
762 #define SV_LITE_GALADRIEL 4
763 #define SV_LITE_ELENDIL 5
764 #define SV_LITE_JUDGE 6
765 #define SV_LITE_LORE 7
766 #define SV_LITE_PALANTIR 8
767 #define SV_LITE_FLY_STONE 9
769 /* The "sval" codes for TV_AMULET */
770 #define SV_AMULET_DOOM 0
771 #define SV_AMULET_TELEPORT 1
772 #define SV_AMULET_ADORNMENT 2
773 #define SV_AMULET_SLOW_DIGEST 3
774 #define SV_AMULET_RESIST_ACID 4
775 #define SV_AMULET_SEARCHING 5
776 #define SV_AMULET_BRILLIANCE 6
777 #define SV_AMULET_CHARISMA 7
778 #define SV_AMULET_THE_MAGI 8
779 #define SV_AMULET_REFLECTION 9
780 #define SV_AMULET_CARLAMMAS 10
781 #define SV_AMULET_INGWE 11
782 #define SV_AMULET_DWARVES 12
783 #define SV_AMULET_NO_MAGIC 13
784 #define SV_AMULET_NO_TELE 14
785 #define SV_AMULET_RESISTANCE 15
786 #define SV_AMULET_TELEPATHY 16
787 #define SV_AMULET_FARAMIR 17
788 #define SV_AMULET_BOROMIR 18
789 #define SV_AMULET_MAGATAMA 19
790 #define SV_AMULET_INROU 20
791 #define SV_AMULET_INTELLIGENCE 21
792 #define SV_AMULET_WISDOM 22
793 #define SV_AMULET_MAGIC_MASTERY 23
794 #define SV_AMULET_NIGHT 24
796 /* The sval codes for TV_RING */
797 #define SV_RING_WOE 0
798 #define SV_RING_AGGRAVATION 1
799 #define SV_RING_WEAKNESS 2
800 #define SV_RING_STUPIDITY 3
801 #define SV_RING_TELEPORTATION 4
802 #define SV_RING_SLOW_DIGESTION 6
803 #define SV_RING_LEVITATION_FALL 7
804 #define SV_RING_RESIST_FIRE 8
805 #define SV_RING_RESIST_COLD 9
806 #define SV_RING_SUSTAIN_STR 10
807 #define SV_RING_SUSTAIN_INT 11
808 #define SV_RING_SUSTAIN_WIS 12
809 #define SV_RING_SUSTAIN_CON 13
810 #define SV_RING_SUSTAIN_DEX 14
811 #define SV_RING_SUSTAIN_CHR 15
812 #define SV_RING_PROTECTION 16
813 #define SV_RING_ACID 17
814 #define SV_RING_FLAMES 18
815 #define SV_RING_ICE 19
816 #define SV_RING_RESIST_POIS 20
817 #define SV_RING_FREE_ACTION 21
818 #define SV_RING_SEE_INVIS 22
819 #define SV_RING_SEARCHING 23
820 #define SV_RING_STR 24
821 #define SV_RING_ELEC 25
822 #define SV_RING_DEX 26
823 #define SV_RING_CON 27
824 #define SV_RING_ACCURACY 28
825 #define SV_RING_DAMAGE 29
826 #define SV_RING_SLAYING 30
827 #define SV_RING_SPEED 31
828 #define SV_RING_FRAKIR 32
829 #define SV_RING_TULKAS 33
830 #define SV_RING_NARYA 34
831 #define SV_RING_NENYA 35
832 #define SV_RING_VILYA 36
833 #define SV_RING_POWER 37
834 #define SV_RING_RES_FEAR 38
835 #define SV_RING_RES_LD 39
836 #define SV_RING_RES_NETHER 40
837 #define SV_RING_RES_NEXUS 41
838 #define SV_RING_RES_SOUND 42
839 #define SV_RING_RES_CONFUSION 43
840 #define SV_RING_RES_SHARDS 44
841 #define SV_RING_RES_DISENCHANT 45
842 #define SV_RING_RES_CHAOS 46
843 #define SV_RING_RES_BLINDNESS 47
844 #define SV_RING_LORDLY 48
845 #define SV_RING_ATTACKS 49
846 #define SV_RING_AHO 50
847 #define SV_RING_SHOTS 51
848 #define SV_RING_SUSTAIN 52
849 #define SV_RING_DEC_MANA 53
850 #define SV_RING_WARNING 54
851 #define SV_RING_MUSCLE 55
853 #define SV_EXPRESS_CARD 0
855 /* The "sval" codes for TV_STAFF */
856 #define SV_STAFF_DARKNESS 0
857 #define SV_STAFF_SLOWNESS 1
858 #define SV_STAFF_HASTE_MONSTERS 2
859 #define SV_STAFF_SUMMONING 3
860 #define SV_STAFF_TELEPORTATION 4
861 #define SV_STAFF_IDENTIFY 5
862 #define SV_STAFF_REMOVE_CURSE 6
863 #define SV_STAFF_STARLITE 7
864 #define SV_STAFF_LITE 8
865 #define SV_STAFF_MAPPING 9
866 #define SV_STAFF_DETECT_GOLD 10
867 #define SV_STAFF_DETECT_ITEM 11
868 #define SV_STAFF_DETECT_TRAP 12
869 #define SV_STAFF_DETECT_DOOR 13
870 #define SV_STAFF_DETECT_INVIS 14
871 #define SV_STAFF_DETECT_EVIL 15
872 #define SV_STAFF_CURE_LIGHT 16
873 #define SV_STAFF_CURING 17
874 #define SV_STAFF_HEALING 18
875 #define SV_STAFF_THE_MAGI 19
876 #define SV_STAFF_SLEEP_MONSTERS 20
877 #define SV_STAFF_SLOW_MONSTERS 21
878 #define SV_STAFF_SPEED 22
879 #define SV_STAFF_PROBING 23
880 #define SV_STAFF_DISPEL_EVIL 24
881 #define SV_STAFF_POWER 25
882 #define SV_STAFF_HOLINESS 26
883 #define SV_STAFF_GENOCIDE 27
884 #define SV_STAFF_EARTHQUAKES 28
885 #define SV_STAFF_DESTRUCTION 29
886 #define SV_STAFF_ANIMATE_DEAD 30
887 #define SV_STAFF_MSTORM 31
888 #define SV_STAFF_NOTHING 32
891 /* The "sval" codes for TV_WAND */
892 #define SV_WAND_HEAL_MONSTER 0
893 #define SV_WAND_HASTE_MONSTER 1
894 #define SV_WAND_CLONE_MONSTER 2
895 #define SV_WAND_TELEPORT_AWAY 3
896 #define SV_WAND_DISARMING 4
897 #define SV_WAND_TRAP_DOOR_DEST 5
898 #define SV_WAND_STONE_TO_MUD 6
899 #define SV_WAND_LITE 7
900 #define SV_WAND_SLEEP_MONSTER 8
901 #define SV_WAND_SLOW_MONSTER 9
902 #define SV_WAND_CONFUSE_MONSTER 10
903 #define SV_WAND_FEAR_MONSTER 11
904 #define SV_WAND_HYPODYNAMIA 12
905 #define SV_WAND_POLYMORPH 13
906 #define SV_WAND_STINKING_CLOUD 14
907 #define SV_WAND_MAGIC_MISSILE 15
908 #define SV_WAND_ACID_BOLT 16
909 #define SV_WAND_CHARM_MONSTER 17
910 #define SV_WAND_FIRE_BOLT 18
911 #define SV_WAND_COLD_BOLT 19
912 #define SV_WAND_ACID_BALL 20
913 #define SV_WAND_ELEC_BALL 21
914 #define SV_WAND_FIRE_BALL 22
915 #define SV_WAND_COLD_BALL 23
916 #define SV_WAND_WONDER 24
917 #define SV_WAND_DISINTEGRATE 25
918 #define SV_WAND_DRAGON_FIRE 26
919 #define SV_WAND_DRAGON_COLD 27
920 #define SV_WAND_DRAGON_BREATH 28
921 #define SV_WAND_ROCKETS 29
922 #define SV_WAND_STRIKING 30
923 #define SV_WAND_GENOCIDE 31
925 /* The "sval" codes for TV_ROD */
926 #define SV_ROD_DETECT_TRAP 0
927 #define SV_ROD_DETECT_DOOR 1
928 #define SV_ROD_IDENTIFY 2
929 #define SV_ROD_RECALL 3
930 #define SV_ROD_ILLUMINATION 4
931 #define SV_ROD_MAPPING 5
932 #define SV_ROD_DETECTION 6
933 #define SV_ROD_PROBING 7
934 #define SV_ROD_CURING 8
935 #define SV_ROD_HEALING 9
936 #define SV_ROD_RESTORATION 10
937 #define SV_ROD_SPEED 11
938 #define SV_ROD_PESTICIDE 12
939 #define SV_ROD_TELEPORT_AWAY 13
940 #define SV_ROD_DISARMING 14
941 #define SV_ROD_LITE 15
942 #define SV_ROD_SLEEP_MONSTER 16
943 #define SV_ROD_SLOW_MONSTER 17
944 #define SV_ROD_HYPODYNAMIA 18
945 #define SV_ROD_POLYMORPH 19
946 #define SV_ROD_ACID_BOLT 20
947 #define SV_ROD_ELEC_BOLT 21
948 #define SV_ROD_FIRE_BOLT 22
949 #define SV_ROD_COLD_BOLT 23
950 #define SV_ROD_ACID_BALL 24
951 #define SV_ROD_ELEC_BALL 25
952 #define SV_ROD_FIRE_BALL 26
953 #define SV_ROD_COLD_BALL 27
954 #define SV_ROD_HAVOC 28
955 #define SV_ROD_STONE_TO_MUD 29
956 #define SV_ROD_AGGRAVATE 30
959 /* The "sval" codes for TV_SCROLL */
961 #define SV_SCROLL_DARKNESS 0
962 #define SV_SCROLL_AGGRAVATE_MONSTER 1
963 #define SV_SCROLL_CURSE_ARMOR 2
964 #define SV_SCROLL_CURSE_WEAPON 3
965 #define SV_SCROLL_SUMMON_MONSTER 4
966 #define SV_SCROLL_SUMMON_UNDEAD 5
967 #define SV_SCROLL_SUMMON_PET 6
968 #define SV_SCROLL_TRAP_CREATION 7
969 #define SV_SCROLL_PHASE_DOOR 8
970 #define SV_SCROLL_TELEPORT 9
971 #define SV_SCROLL_TELEPORT_LEVEL 10
972 #define SV_SCROLL_WORD_OF_RECALL 11
973 #define SV_SCROLL_IDENTIFY 12
974 #define SV_SCROLL_STAR_IDENTIFY 13
975 #define SV_SCROLL_REMOVE_CURSE 14
976 #define SV_SCROLL_STAR_REMOVE_CURSE 15
977 #define SV_SCROLL_ENCHANT_ARMOR 16
978 #define SV_SCROLL_ENCHANT_WEAPON_TO_HIT 17
979 #define SV_SCROLL_ENCHANT_WEAPON_TO_DAM 18
980 /* xxx enchant missile? */
981 #define SV_SCROLL_STAR_ENCHANT_ARMOR 20
982 #define SV_SCROLL_STAR_ENCHANT_WEAPON 21
983 #define SV_SCROLL_RECHARGING 22
984 #define SV_SCROLL_MUNDANITY 23
985 #define SV_SCROLL_LIGHT 24
986 #define SV_SCROLL_MAPPING 25
987 #define SV_SCROLL_DETECT_GOLD 26
988 #define SV_SCROLL_DETECT_ITEM 27
989 #define SV_SCROLL_DETECT_TRAP 28
990 #define SV_SCROLL_DETECT_DOOR 29
991 #define SV_SCROLL_DETECT_INVIS 30
992 /* xxx (detect evil?) */
993 #define SV_SCROLL_SATISFY_HUNGER 32
994 #define SV_SCROLL_BLESSING 33
995 #define SV_SCROLL_HOLY_CHANT 34
996 #define SV_SCROLL_HOLY_PRAYER 35
997 #define SV_SCROLL_MONSTER_CONFUSION 36
998 #define SV_SCROLL_PROTECTION_FROM_EVIL 37
999 #define SV_SCROLL_RUNE_OF_PROTECTION 38
1000 #define SV_SCROLL_TRAP_DOOR_DESTRUCTION 39
1002 #define SV_SCROLL_STAR_DESTRUCTION 41
1003 #define SV_SCROLL_DISPEL_UNDEAD 42
1004 #define SV_SCROLL_SPELL 43
1005 #define SV_SCROLL_GENOCIDE 44
1006 #define SV_SCROLL_MASS_GENOCIDE 45
1007 #define SV_SCROLL_ACQUIREMENT 46
1008 #define SV_SCROLL_STAR_ACQUIREMENT 47
1009 #define SV_SCROLL_FIRE 48
1010 #define SV_SCROLL_ICE 49
1011 #define SV_SCROLL_CHAOS 50
1012 #define SV_SCROLL_RUMOR 51
1013 #define SV_SCROLL_ARTIFACT 52
1014 #define SV_SCROLL_RESET_RECALL 53
1015 #define SV_SCROLL_SUMMON_KIN 54
1016 #define SV_SCROLL_AMUSEMENT 55
1017 #define SV_SCROLL_STAR_AMUSEMENT 56
1019 /* The "sval" codes for TV_POTION */
1020 #define SV_POTION_WATER 0
1021 #define SV_POTION_APPLE_JUICE 1
1022 #define SV_POTION_SLIME_MOLD 2
1023 /* xxx (fixed color) */
1024 #define SV_POTION_SLOWNESS 4
1025 #define SV_POTION_SALT_WATER 5
1026 #define SV_POTION_POISON 6
1027 #define SV_POTION_BLINDNESS 7
1029 #define SV_POTION_BOOZE 9
1031 #define SV_POTION_SLEEP 11
1033 #define SV_POTION_LOSE_MEMORIES 13
1035 #define SV_POTION_RUINATION 15
1036 #define SV_POTION_DEC_STR 16
1037 #define SV_POTION_DEC_INT 17
1038 #define SV_POTION_DEC_WIS 18
1039 #define SV_POTION_DEC_DEX 19
1040 #define SV_POTION_DEC_CON 20
1041 #define SV_POTION_DEC_CHR 21
1042 #define SV_POTION_DETONATIONS 22
1043 #define SV_POTION_DEATH 23
1044 #define SV_POTION_INFRAVISION 24
1045 #define SV_POTION_DETECT_INVIS 25
1046 #define SV_POTION_SLOW_POISON 26
1047 #define SV_POTION_CURE_POISON 27
1048 #define SV_POTION_BOLDNESS 28
1049 #define SV_POTION_SPEED 29
1050 #define SV_POTION_RESIST_HEAT 30
1051 #define SV_POTION_RESIST_COLD 31
1052 #define SV_POTION_HEROISM 32
1053 #define SV_POTION_BESERK_STRENGTH 33
1054 #define SV_POTION_CURE_LIGHT 34
1055 #define SV_POTION_CURE_SERIOUS 35
1056 #define SV_POTION_CURE_CRITICAL 36
1057 #define SV_POTION_HEALING 37
1058 #define SV_POTION_STAR_HEALING 38
1059 #define SV_POTION_LIFE 39
1060 #define SV_POTION_RESTORE_MANA 40
1061 #define SV_POTION_RESTORE_EXP 41
1062 #define SV_POTION_RES_STR 42
1063 #define SV_POTION_RES_INT 43
1064 #define SV_POTION_RES_WIS 44
1065 #define SV_POTION_RES_DEX 45
1066 #define SV_POTION_RES_CON 46
1067 #define SV_POTION_RES_CHR 47
1068 #define SV_POTION_INC_STR 48
1069 #define SV_POTION_INC_INT 49
1070 #define SV_POTION_INC_WIS 50
1071 #define SV_POTION_INC_DEX 51
1072 #define SV_POTION_INC_CON 52
1073 #define SV_POTION_INC_CHR 53
1075 #define SV_POTION_AUGMENTATION 55
1076 #define SV_POTION_ENLIGHTENMENT 56
1077 #define SV_POTION_STAR_ENLIGHTENMENT 57
1078 #define SV_POTION_SELF_KNOWLEDGE 58
1079 #define SV_POTION_EXPERIENCE 59
1080 #define SV_POTION_RESISTANCE 60
1081 #define SV_POTION_CURING 61
1082 #define SV_POTION_INVULNERABILITY 62
1083 #define SV_POTION_NEW_LIFE 63
1084 #define SV_POTION_NEO_TSUYOSHI 64
1085 #define SV_POTION_TSUYOSHI 65
1086 #define SV_POTION_POLYMORPH 66
1088 /* The "sval" codes for TV_FLASK */
1089 #define SV_FLASK_OIL 0
1091 /* The "sval" codes for TV_FOOD */
1092 #define SV_FOOD_POISON 0
1093 #define SV_FOOD_BLINDNESS 1
1094 #define SV_FOOD_PARANOIA 2
1095 #define SV_FOOD_CONFUSION 3
1096 #define SV_FOOD_HALLUCINATION 4
1097 #define SV_FOOD_PARALYSIS 5
1098 #define SV_FOOD_WEAKNESS 6
1099 #define SV_FOOD_SICKNESS 7
1100 #define SV_FOOD_STUPIDITY 8
1101 #define SV_FOOD_NAIVETY 9
1102 #define SV_FOOD_UNHEALTH 10
1103 #define SV_FOOD_DISEASE 11
1104 #define SV_FOOD_CURE_POISON 12
1105 #define SV_FOOD_CURE_BLINDNESS 13
1106 #define SV_FOOD_CURE_PARANOIA 14
1107 #define SV_FOOD_CURE_CONFUSION 15
1108 #define SV_FOOD_CURE_SERIOUS 16
1109 #define SV_FOOD_RESTORE_STR 17
1110 #define SV_FOOD_RESTORE_CON 18
1111 #define SV_FOOD_RESTORING 19
1112 /* many missing mushrooms */
1113 #define SV_FOOD_BISCUIT 32
1114 #define SV_FOOD_JERKY 33
1115 #define SV_FOOD_RATION 35
1116 #define SV_FOOD_SLIME_MOLD 36
1117 #define SV_FOOD_WAYBREAD 37
1118 #define SV_FOOD_PINT_OF_ALE 38
1119 #define SV_FOOD_PINT_OF_WINE 39
1122 #define SV_ROD_MIN_DIRECTION 12 /*!< この値以降の小項目IDを持ったロッドは使用時にターゲットを要求する / Special "sval" limit -- first "aimed" rod */
1124 #define SV_CHEST_MIN_LARGE 4 /*!< この値以降の小項目IDを持った箱は大型の箱としてドロップ数を増やす / Special "sval" limit -- first "large" chest */
1125 #define SV_CHEST_KANDUME 50 /*!< 箱アイテムの小項目ID: おもちゃのカンヅメ */
1128 * Special "sval" limit -- first "good" magic/prayer book
1130 #define SV_BOOK_MIN_GOOD 2