4 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
6 * This software may be copied and distributed for educational, research,
7 * and not for profit purposes provided that this copyright and statement
8 * are included in all such copies. Other copyrights may also apply.
11 /* Purpose: Object code, part 1 */
15 #if defined(MACINTOSH) || defined(MACH_O_CARBON)
21 * Reset the "visual" lists
23 * This involves resetting various things to their "default" state.
25 * If the "prefs" flag is TRUE, then we will also load the appropriate
26 * "user pref file" based on the current setting of the "use_graphics"
27 * flag. This is useful for switching "graphics" on/off.
29 * The features, objects, and monsters, should all be encoded in the
30 * relevant "font.pref" and/or "graf.prf" files. XXX XXX XXX
32 * The "prefs" parameter is no longer meaningful. XXX XXX XXX
34 void reset_visuals(void)
38 /* Extract some info about terrain features */
39 for (i = 0; i < max_f_idx; i++)
41 feature_type *f_ptr = &f_info[i];
43 /* Assume we will use the underlying values */
44 for (j = 0; j < F_LIT_MAX; j++)
46 f_ptr->x_attr[j] = f_ptr->d_attr[j];
47 f_ptr->x_char[j] = f_ptr->d_char[j];
51 /* Extract default attr/char code for objects */
52 for (i = 0; i < max_k_idx; i++)
54 object_kind *k_ptr = &k_info[i];
56 /* Default attr/char */
57 k_ptr->x_attr = k_ptr->d_attr;
58 k_ptr->x_char = k_ptr->d_char;
61 /* Extract default attr/char code for monsters */
62 for (i = 0; i < max_r_idx; i++)
64 monster_race *r_ptr = &r_info[i];
66 /* Default attr/char */
67 r_ptr->x_attr = r_ptr->d_attr;
68 r_ptr->x_char = r_ptr->d_char;
75 /* Process "graf.prf" */
76 process_pref_file("graf.prf");
78 /* Access the "character" pref file */
79 sprintf(buf, "graf-%s.prf", player_base);
81 /* Process "graf-<playername>.prf" */
82 process_pref_file(buf);
90 /* Process "font.prf" */
91 process_pref_file("font.prf");
93 /* Access the "character" pref file */
94 sprintf(buf, "font-%s.prf", player_base);
96 /* Process "font-<playername>.prf" */
97 process_pref_file(buf);
103 * Obtain the "flags" for an item
105 void object_flags(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
107 object_kind *k_ptr = &k_info[o_ptr->k_idx];
111 for (i = 0; i < TR_FLAG_SIZE; i++)
112 flgs[i] = k_ptr->flags[i];
115 if (object_is_fixed_artifact(o_ptr))
117 artifact_type *a_ptr = &a_info[o_ptr->name1];
119 for (i = 0; i < TR_FLAG_SIZE; i++)
120 flgs[i] = a_ptr->flags[i];
124 if (object_is_ego(o_ptr))
126 ego_item_type *e_ptr = &e_info[o_ptr->name2];
128 for (i = 0; i < TR_FLAG_SIZE; i++)
129 flgs[i] |= e_ptr->flags[i];
131 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
133 remove_flag(flgs, TR_SH_FIRE);
135 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
137 remove_flag(flgs, TR_INFRA);
139 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
141 remove_flag(flgs, TR_RES_BLIND);
142 remove_flag(flgs, TR_SEE_INVIS);
146 /* Random artifact ! */
147 for (i = 0; i < TR_FLAG_SIZE; i++)
148 flgs[i] |= o_ptr->art_flags[i];
150 if (object_is_smith(o_ptr))
152 int add = o_ptr->xtra3 - 1;
154 if (add < TR_FLAG_MAX)
158 else if (add == ESSENCE_TMP_RES_ACID)
160 add_flag(flgs, TR_RES_ACID);
161 add_flag(flgs, TR_ACTIVATE);
163 else if (add == ESSENCE_TMP_RES_ELEC)
165 add_flag(flgs, TR_RES_ELEC);
166 add_flag(flgs, TR_ACTIVATE);
168 else if (add == ESSENCE_TMP_RES_FIRE)
170 add_flag(flgs, TR_RES_FIRE);
171 add_flag(flgs, TR_ACTIVATE);
173 else if (add == ESSENCE_TMP_RES_COLD)
175 add_flag(flgs, TR_RES_COLD);
176 add_flag(flgs, TR_ACTIVATE);
178 else if (add == ESSENCE_SH_FIRE)
180 add_flag(flgs, TR_RES_FIRE);
181 add_flag(flgs, TR_SH_FIRE);
183 else if (add == ESSENCE_SH_ELEC)
185 add_flag(flgs, TR_RES_ELEC);
186 add_flag(flgs, TR_SH_ELEC);
188 else if (add == ESSENCE_SH_COLD)
190 add_flag(flgs, TR_RES_COLD);
191 add_flag(flgs, TR_SH_COLD);
193 else if (add == ESSENCE_RESISTANCE)
195 add_flag(flgs, TR_RES_ACID);
196 add_flag(flgs, TR_RES_ELEC);
197 add_flag(flgs, TR_RES_FIRE);
198 add_flag(flgs, TR_RES_COLD);
200 else if (add == TR_IMPACT)
202 add_flag(flgs, TR_ACTIVATE);
210 * Obtain the "flags" for an item which are known to the player
212 void object_flags_known(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
217 object_kind *k_ptr = &k_info[o_ptr->k_idx];
220 for (i = 0; i < TR_FLAG_SIZE; i++)
223 if (!object_is_aware(o_ptr)) return;
226 for (i = 0; i < TR_FLAG_SIZE; i++)
227 flgs[i] = k_ptr->flags[i];
229 /* Must be identified */
230 if (!object_is_known(o_ptr)) return;
232 /* Ego-item (known basic flags) */
233 if (object_is_ego(o_ptr))
235 ego_item_type *e_ptr = &e_info[o_ptr->name2];
237 for (i = 0; i < TR_FLAG_SIZE; i++)
238 flgs[i] |= e_ptr->flags[i];
240 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
242 remove_flag(flgs, TR_SH_FIRE);
244 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
246 remove_flag(flgs, TR_INFRA);
248 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
250 remove_flag(flgs, TR_RES_BLIND);
251 remove_flag(flgs, TR_SEE_INVIS);
256 #ifdef SPOIL_ARTIFACTS
257 /* Full knowledge for some artifacts */
258 if (object_is_artifact(o_ptr)) spoil = TRUE;
259 #endif /* SPOIL_ARTIFACTS */
261 #ifdef SPOIL_EGO_ITEMS
262 /* Full knowledge for some ego-items */
263 if (object_is_ego(o_ptr)) spoil = TRUE;
264 #endif /* SPOIL_EGO_ITEMS */
266 /* Need full knowledge or spoilers */
267 if (spoil || (o_ptr->ident & IDENT_MENTAL))
270 if (object_is_fixed_artifact(o_ptr))
272 artifact_type *a_ptr = &a_info[o_ptr->name1];
274 for (i = 0; i < TR_FLAG_SIZE; i++)
275 flgs[i] = a_ptr->flags[i];
278 /* Random artifact ! */
279 for (i = 0; i < TR_FLAG_SIZE; i++)
280 flgs[i] |= o_ptr->art_flags[i];
283 if (object_is_smith(o_ptr))
285 int add = o_ptr->xtra3 - 1;
287 if (add < TR_FLAG_MAX)
291 else if (add == ESSENCE_TMP_RES_ACID)
293 add_flag(flgs, TR_RES_ACID);
295 else if (add == ESSENCE_TMP_RES_ELEC)
297 add_flag(flgs, TR_RES_ELEC);
299 else if (add == ESSENCE_TMP_RES_FIRE)
301 add_flag(flgs, TR_RES_FIRE);
303 else if (add == ESSENCE_TMP_RES_COLD)
305 add_flag(flgs, TR_RES_COLD);
307 else if (add == ESSENCE_SH_FIRE)
309 add_flag(flgs, TR_RES_FIRE);
310 add_flag(flgs, TR_SH_FIRE);
312 else if (add == ESSENCE_SH_ELEC)
314 add_flag(flgs, TR_RES_ELEC);
315 add_flag(flgs, TR_SH_ELEC);
317 else if (add == ESSENCE_SH_COLD)
319 add_flag(flgs, TR_RES_COLD);
320 add_flag(flgs, TR_SH_COLD);
322 else if (add == ESSENCE_RESISTANCE)
324 add_flag(flgs, TR_RES_ACID);
325 add_flag(flgs, TR_RES_ELEC);
326 add_flag(flgs, TR_RES_FIRE);
327 add_flag(flgs, TR_RES_COLD);
334 * Determine the "Activation" (if any) for an artifact
335 * Return a string, or NULL for "no activation"
337 cptr item_activation(object_type *o_ptr)
339 u32b flgs[TR_FLAG_SIZE];
341 /* Extract the flags */
342 object_flags(o_ptr, flgs);
344 /* Require activation ability */
346 if (!(have_flag(flgs, TR_ACTIVATE))) return ("¤Ê¤·");
348 if (!(have_flag(flgs, TR_ACTIVATE))) return ("nothing");
352 * We need to deduce somehow that it is a random artifact -- one
353 * problem: It could be a random artifact which has NOT YET received
354 * a name. Thus we eliminate other possibilities instead of checking
358 if (object_is_fixed_artifact(o_ptr))
360 if (!o_ptr->xtra2) o_ptr->xtra2 = a_info[o_ptr->name1].act_idx;
363 if ((object_is_artifact(o_ptr) || object_is_ego(o_ptr)) &&
366 switch (o_ptr->xtra2)
369 /* General activation */
372 return "ÂÀÍÛ¸÷Àþ : 10 ¥¿¡¼¥óËè";
374 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
376 return "°½±À (12) : 4+d4 ¥¿¡¼¥óËè";
378 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
380 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
382 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
384 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
386 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (48) : 6+d6 ¥¿¡¼¥óËè";
388 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (72) : 9+d9 ¥¿¡¼¥óËè";
390 return "Ã⩹¶·â(100) : 100+d100 ¥¿¡¼¥óËè";
392 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 12+d12 ¥¿¡¼¥óËè";
394 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 12+d12 ¥¿¡¼¥óËè";
396 return "À¸Ì¿Îϵۼý(120) : 400 ¥¿¡¼¥óËè";
398 return "µÛ·ì¥É¥ì¥¤¥ó (3*50) : 400 ¥¿¡¼¥óËè";
400 return "Ìð (150) : 90+d90 ¥¿¡¼¥óËè";
402 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (300) : 225+d225 ¥¿¡¼¥óËè";
404 return "µðÂ祢¥¤¥¹¡¦¥Ü¡¼¥ë (400) : 325+d325 ¥¿¡¼¥óËè";
406 return "µðÂ祵¥ó¥À¡¼¡¦¥Ü¡¼¥ë (500) : 425+d425 ¥¿¡¼¥óËè";
408 return "¥«¥Þ¥¤¥¿¥Á : 250 ¥¿¡¼¥óËè";
410 return "µÛ·ì¥É¥ì¥¤¥ó (3*100) : 400 ¥¿¡¼¥óËè";
412 return "º®ÆÙ¾¤Íè : 350 ¥¿¡¼¥óËè"; /*nuke me*/
414 return "¥í¥±¥Ã¥È (120+level) : 400 ¥¿¡¼¥óËè";
416 return "¼Ù°Â໶ (x5) : 100+d100 ¥¿¡¼¥óËè";
418 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300) : 500 ¥¿¡¼¥óËè";
420 return "Á±ÎÉÂ໶ (x5) : 100+d100 ¥¿¡¼¥óËè";
422 return "ËâË¡¤ÎÌð(150) : 90+d90 ¥¿¡¼¥óËè";
424 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(120) : 15 ¥¿¡¼¥óËè";
426 return "¥¦¥©¡¼¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 250 ¥¿¡¼¥óËè";
428 return "µðÂ祹¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 200+d200 ¥¿¡¼¥óËè";
430 return "°Å¹õ¤ÎÍò(250) : 150+d150 ¥¿¡¼¥óËè";
432 return "ËâÎϤÎÍò(400) : 250+d250¥¿¡¼¥óËè";
434 return "³²Ãî¤Î¶î½ü : 55+d55¥¿¡¼¥óËè";
435 case ACT_BLINDING_LIGHT:
436 return "âÁ¤·¤¤¸÷ : 250 ¥¿¡¼¥óËè";
438 return "¿®¤¸Æñ¤¤¤³¤È : 450+d450 ¥¿¡¼¥óËè";
439 case ACT_CAST_BA_STAR:
440 return "¥¹¥¿¡¼¡¦¥Ü¡¼¥ë¡¦¥À¥¹¥È(150) : 1000 ¥¿¡¼¥óËè";
441 case ACT_BLADETURNER:
442 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300), »Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢ÂÑÀ";
444 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
446 return "¼þ°Ï¤Î¥â¥ó¥¹¥¿¡¼¤ò̲¤é¤»¤ë : 55 ¥¿¡¼¥óËè";
448 return "ÃÏ¿Ì (Ⱦ·Â 10) : 50 ¥¿¡¼¥óËè";
450 return "¶²¹² : 3 * (level+10) ¥¿¡¼¥óËè";
452 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
453 case ACT_BANISH_EVIL:
454 return "¼Ù°¾ÃÌÇ : 250+d250 ¥¿¡¼¥óËè";
456 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
458 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
460 case ACT_CHARM_ANIMAL:
461 return "ưʪ̥λ : 200 ¥¿¡¼¥óËè";
462 case ACT_CHARM_UNDEAD:
463 return "¥¢¥ó¥Ç¥Ã¥É½¾Â° : 333 ¥¿¡¼¥óËè";
464 case ACT_CHARM_OTHER:
465 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 400 ¥¿¡¼¥óËè";
466 case ACT_CHARM_ANIMALS:
467 return "ưʪͧÏ : 500 ¥¿¡¼¥óËè";
468 case ACT_CHARM_OTHERS:
469 return "¼þÊÕ̥λ : 750 ¥¿¡¼¥óËè";
470 case ACT_SUMMON_ANIMAL:
471 return "ưʪ¾¤´ : 200+d300 ¥¿¡¼¥óËè";
472 case ACT_SUMMON_PHANTOM:
473 return "¸¸Î´ : 200+d200 ¥¿¡¼¥óËè";
474 case ACT_SUMMON_ELEMENTAL:
475 return "¥¨¥ì¥á¥ó¥¿¥ë¾¤´ : 750 ¥¿¡¼¥óËè";
476 case ACT_SUMMON_DEMON:
477 return "°Ë⾤´ : 666+d333 ¥¿¡¼¥óËè";
478 case ACT_SUMMON_UNDEAD:
479 return "¥¢¥ó¥Ç¥Ã¥É¾¤´ : 666+d333 ¥¿¡¼¥óËè";
480 case ACT_SUMMON_HOUND:
481 return "¥Ï¥¦¥ó¥É¾¤´ : 300+d150 ¥¿¡¼¥óËè";
482 case ACT_SUMMON_DAWN:
483 return "¶Ç¤Î»ÕÃľ¤´ : 500+d500 ¥¿¡¼¥óËè";
484 case ACT_SUMMON_OCTOPUS:
485 return "Âý¤ÎÂç·²¾¤´ : 300+d150¥¿¡¼¥óËè";
487 case ACT_CHOIR_SINGS:
488 return "²óÉü (777)¡¢Ìþ¤·¡¢»Îµ¤¹âÍÈ : 300 ¥¿¡¼¥óËè";
490 return "¶²Éݽüµî/ÂÎÎϲóÉü(30) : 10 ¥¿¡¼¥óËè";
492 return "½ý²óÉü(4d8) : 3+d3 ¥¿¡¼¥óËè";
493 case ACT_CURE_POISON:
494 return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
496 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
498 return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃÍÉü³è : 750 ¥¿¡¼¥óËè";
500 return "ÂÎÎϲóÉü(700) : 250 ¥¿¡¼¥óËè";
502 return "ÂÎÎϲóÉü(1000) : 888 ¥¿¡¼¥óËè";
504 return "Ìþ¤· : 100¥¿¡¼¥óËè";
505 case ACT_CURE_MANA_FULL:
506 return "ËâÎÏÉü³è: 777 ¥¿¡¼¥óËè";
508 return "¥Æ¥ì¥Ñ¥·¡¼ (´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
510 return "»Îµ¤¹âÍȤȽËÊ¡ (´ü´Ö 50+d50) : 100+d100 ¥¿¡¼¥óËè";
512 return "Âмٰ·ë³¦ (´ü´Ö level*3 + d25) : 200+d200 ¥¿¡¼¥óËè";
514 return "Á´ÂÑÀ (´ü´Ö 20+d20) : 111 ¥¿¡¼¥óËè";
516 return "²Ã® (´ü´Ö 20+d20) : 250 ¥¿¡¼¥óËè";
518 return "²Ã® (´ü´Ö 75+d75) : 200+d200 ¥¿¡¼¥óËè";
520 return "Í©Âβ½ (´ü´Ö level/2 + d(level/2)) : 1000 ¥¿¡¼¥óËè";
522 return "̵Ũ²½ (´ü´Ö 8+d8) : 1000 ¥¿¡¼¥óËè";
524 return "»Îµ¤¹âÍÈ : 30+d30¥¿¡¼¥óËè";
526 return "»Îµ¤¹âÍÈ, ¥¹¥Ô¡¼¥É(50+d50¥¿¡¼¥ó) : 100+d200 ¥¿¡¼¥óËè";
528 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
530 return "ËâË¡¤ÎÃϿޤȸ÷ : 50+d50 ¥¿¡¼¥óËè";
532 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
533 case ACT_DETECT_XTRA:
534 return "Á´´¶ÃΡ¢Ãµº÷¡¢*´ÕÄê* : 100 ¥¿¡¼¥óËè";
536 return "*´ÕÄê* : 75 ¥¿¡¼¥óËè";
538 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
540 return "Çúȯ¤Î¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
542 return "¼é¤ê¤Î¥ë¡¼¥ó : 400 ¥¿¡¼¥óËè";
544 return "¶õÊ¢½¼Â : 200 ¥¿¡¼¥óËè";
546 return "¥É¥¢Ç˲õ : 10 ¥¿¡¼¥óËè";
548 return "´äÀÐÍϲò : 3 ¥¿¡¼¥óËè";
550 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
552 return "Ï£¶â½Ñ : 500 ¥¿¡¼¥óËè";
554 return "¼¡¸µ¤ÎÈâ : 100 ¥¿¡¼¥óËè";
556 return "¥Æ¥ì¥Ý¡¼¥È (range 100) : 25 ¥¿¡¼¥óËè";
558 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
560 return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô : 20+d20 ¥¿¡¼¥óËè";
561 case ACT_TELEKINESIS:
562 return "ʪÂΤò°ú¤´ó¤»¤ë(½ÅÎÌ25kg¤Þ¤Ç) : 25+d25¥¿¡¼¥óËè";
563 case ACT_DETECT_UNIQUE:
564 return "¤³¤Î³¬¤Ë¤¤¤ë¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òɽ¼¨ : 200¥¿¡¼¥óËè";
566 return "ƨÁö : 35 ¥¿¡¼¥óËè";
567 case ACT_DISP_CURSE_XTRA:
568 return "*²ò¼ö*¤ÈÄ´ºº: ¤¤¤Ä¤Ç¤â";
569 case ACT_BRAND_FIRE_BOLTS:
570 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
571 case ACT_RECHARGE_XTRA:
572 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
574 return "´í¸±¤òȼ¤¦´ÕÄê : ¤¤¤Ä¤Ç¤â";
576 return "»Í¸ÔƧ¤ß : 100+d100¥¿¡¼¥óËè";
578 /* Unique activation */
580 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
585 /* General activation */
588 return "beam of sunlight every 10 turns";
590 return "magic missile (2d6) every 2 turns";
592 return "stinking cloud (12) every 4+d4 turns";
594 return "lightning bolt (4d8) every 5+d5 turns";
596 return "acid bolt (5d8) every 6+d6 turns";
598 return "frost bolt (6d8) every 7+d7 turns";
600 return "fire bolt (9d8) every 8+d8 turns";
602 return "ball of cold (48) every 6+d6 turns";
604 return "ball of fire (72) every 9+d9 turns";
606 return "a strangling attack (100) every 100+d100 turns";
608 return "ball of cold (100) every 12+d12 turns";
610 return "ball of lightning (100) every 12+d12 turns";
612 return "drain life (120) every 400 turns";
614 return "vampiric drain (3*50) every 400 turns";
616 return "arrows (150) every 90+d90 turns";
618 return "fire ball (300) every 225+d225 turns";
620 return "ball of cold (400) every 325+d325 turns";
622 return "ball of lightning (500) every 425+d425 turns";
624 return "whirlwind attack every 250 turns";
626 return "vampiric drain (3*100) every 400 turns";
628 return "call chaos every 350 turns";
630 return "launch rocket (120+level) every 400 turns";
632 return "dispel evil (x5) every 100+d100 turns";
634 return "elemental breath (300) every 500 turns";
636 return "dispel good (x5) every 100+d100 turns";
638 return "a magical arrow (150) every 90+d90 turns";
640 return "large fire ball (120) every 15 turns";
642 return "water ball (200) every 250 turns";
644 return "large star ball (200) every 200+d200 turns";
646 return "darkness storm (250) every 150+d150 turns";
648 return "a mana storm every 250+d250 turns";
650 return "dispel small life every 55+d55 turns";
651 case ACT_BLINDING_LIGHT:
652 return "blinding light every 250 turns";
654 return "bizarre things every 450+d450 turns";
655 case ACT_CAST_BA_STAR:
656 return "cast star balls (150) every 1000 turns";
657 case ACT_BLADETURNER:
658 return "breathe elements (300), hero, bless, and resistance";
661 return "confuse monster every 15 turns";
663 return "sleep nearby monsters every 55 turns";
665 return "earthquake (rad 10) every 50 turns";
667 return "terror every 3 * (level+10) turns";
669 return "teleport away every 200 turns";
670 case ACT_BANISH_EVIL:
671 return "banish evil every 250+d250 turns";
673 return "genocide every 500 turns";
675 return "mass genocide every 1000 turns";
677 case ACT_CHARM_ANIMAL:
678 return "charm animal every 200 turns";
679 case ACT_CHARM_UNDEAD:
680 return "enslave undead every 333 turns";
681 case ACT_CHARM_OTHER:
682 return "charm monster every 400 turns";
683 case ACT_CHARM_ANIMALS:
684 return "animal friendship every 500 turns";
685 case ACT_CHARM_OTHERS:
686 return "mass charm every 750 turns";
687 case ACT_SUMMON_ANIMAL:
688 return "summon animal every 200+d300 turns";
689 case ACT_SUMMON_PHANTOM:
690 return "summon phantasmal servant every 200+d200 turns";
691 case ACT_SUMMON_ELEMENTAL:
692 return "summon elemental every 750 turns";
693 case ACT_SUMMON_DEMON:
694 return "summon demon every 666+d333 turns";
695 case ACT_SUMMON_UNDEAD:
696 return "summon undead every 666+d333 turns";
697 case ACT_SUMMON_HOUND:
698 return "summon hound every 300+d150 turns";
699 case ACT_SUMMON_DAWN:
700 return "summon the Legion of the Dawn every 500+d500 turns";
701 case ACT_SUMMON_OCTOPUS:
702 return "summon octopus every 300+d150 turns";
704 case ACT_CHOIR_SINGS:
705 return "heal 777 hit points, curing and heloism every 300 turns";
707 return "remove fear and heal 30 hp every 10 turns";
709 return "heal 4d8 and wounds every 3+d3 turns";
710 case ACT_CURE_POISON:
711 return "remove fear and cure poison every 5 turns";
713 return "restore life levels every 450 turns";
715 return "restore stats and life levels every 750 turns";
717 return "heal 700 hit points every 250 turns";
719 return "heal 1000 hit points every 888 turns";
721 return "curing every 100 turns";
722 case ACT_CURE_MANA_FULL:
723 return "restore mana every 777 turns";
725 return "telepathy (dur 25+d30) every 200 turns";
727 return "heroism and blessed (dur 50+d50) every 100+d100 turns";
729 return "protect evil (dur level*3 + d25) every 200+d200 turns";
731 return "resist elements (dur 20+d20) every 111 turns";
733 return "speed (dur 20+d20) every 100+d100 turns";
735 return "speed (dur 75+d75) every 100+d100 turns";
737 return "wraith form (dur level/2 + d(level/2)) every 1000 turns";
739 return "invulnerability (dur 8+d8) every 1000 turns";
741 return "heroism every 30+d30 turns";
743 return "hero and +10 to speed (50) every 100+200d turns";
744 case ACT_RESIST_ACID:
745 return "resist acid (dur 20+d20) every 40+d40 turns";
746 case ACT_RESIST_FIRE:
747 return "resist fire (dur 20+d20) every 40+d40 turns";
748 case ACT_RESIST_COLD:
749 return "resist cold (dur 20+d20) every 40+d40 turns";
750 case ACT_RESIST_ELEC:
751 return "resist thunder (dur 20+d20) every 40+d40 turns";
752 case ACT_RESIST_POIS:
753 return "resist poison (dur 20+d20) every 40+d40 turns";
755 return "light area (dam 2d15) every 10+d10 turns";
757 return "light (dam 2d15) & map area every 50+d50 turns";
759 return "detection every 55+d55 turns";
760 case ACT_DETECT_XTRA:
761 return "detection, probing and identify true every 100 turns";
763 return "identify true every 75 turns";
765 return "identify spell every 10 turns";
767 return "explosive rune every 200 turns";
769 return "rune of protection every 400 turns";
771 return "satisfy hunger every 200 turns";
773 return "destroy doors every 10 turns";
775 return "stone to mud every 3 turns";
777 return "recharging every 70 turns";
779 return "alchemy every 500 turns";
781 return "dimension door every 100 turns";
783 return "teleport (range 100) every 25 turns";
785 return "word of recall every 200 turns";
786 case ACT_TELEKINESIS:
787 return "a telekinesis (500 lb) every 25+d25 turns";
789 return "clairvoyance and recall, draining you every 20+d20 turns";
790 case ACT_DETECT_UNIQUE:
791 return "list of the uniques on the level every 200 turns";
793 return "a getaway every 35 turns";
794 case ACT_DISP_CURSE_XTRA:
795 return "dispel curse and probing every turn";
796 case ACT_BRAND_FIRE_BOLTS:
797 return "fire branding of bolts every 999 turns";
798 case ACT_RECHARGE_XTRA:
799 return "recharge item every 200 turns";
801 return "perilous identify every turn";
803 return "shiko every 100+d100 turns";
805 /* Unique activation */
807 return "fishing : every time";
810 return "something undefined";
815 /* Some artifacts can be activated */
816 switch (o_ptr->name1)
821 return "¥Õ¥¡¥¤¥¢¡ª : 15 ¥¿¡¼¥óËè";
823 return "fire! every 15 turns";
829 return "¥â¥ó¥¹¥¿¡¼¶²¹² : 40+d40¥¿¡¼¥óËè";
831 return "frighten monsters every 40+d40 turns";
837 return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë";
839 return "increase STR (destroyed 50%)";
845 return "Îã¤Î¥¢¥ì : 150+d150 ¥¿¡¼¥óËè";
847 return "reveal your identity every 150+d150 turns";
853 return "Çï»ÒÌÚ¤òÂǤÁ¤Ê¤é¤¹ : ¤¤¤Ä¤Ç¤â";
855 return "beat wooden clappers every turn";
861 return "°ÀÊѹ¹ : 3333 ¥¿¡¼¥óËè";
863 return "change zokusei every 3333 turns";
869 if (object_is_smith(o_ptr))
871 switch (o_ptr->xtra3 - 1)
873 case ESSENCE_TMP_RES_ACID:
875 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
877 return "resist acid every 50+d50 turns";
880 case ESSENCE_TMP_RES_ELEC:
882 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
884 return "resist elec every 50+d50 turns";
887 case ESSENCE_TMP_RES_FIRE:
889 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
891 return "resist fire every 50+d50 turns";
894 case ESSENCE_TMP_RES_COLD:
896 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
898 return "resist cold every 50+d50 turns";
903 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
905 return "earthquake every 100+d100 turns";
910 if (o_ptr->name2 == EGO_TRUMP)
913 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
915 return "teleport every 50+d50 turns";
920 if (o_ptr->name2 == EGO_LITE_ILLUMINATION)
923 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
925 return "illumination every 10+d10 turns";
929 else if (o_ptr->name2 == EGO_EARTHQUAKES)
932 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
934 return "earthquake every 100+d100 turns";
939 else if (o_ptr->name2 == EGO_JUMP)
942 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
944 return "blink every 10+d10 turns";
949 if (o_ptr->tval == TV_RING)
951 if (object_is_ego(o_ptr))
953 switch (o_ptr->name2)
957 return "»Îµ¤¹âÍÈ : 100+d100¥¿¡¼¥óËè";
959 return "heroism every 100+d100 turns";
961 case EGO_RING_MAGIC_MIS:
963 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
965 return "magic missile (2d6) every 2 turns";
967 case EGO_RING_FIRE_BOLT:
969 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
971 return "fire bolt (9d8) every 8+d8 turns";
973 case EGO_RING_COLD_BOLT:
975 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
977 return "frost bolt (6d8) every 7+d7 turns";
979 case EGO_RING_ELEC_BOLT:
981 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
983 return "lightning bolt (4d8) every 5+d5 turns";
985 case EGO_RING_ACID_BOLT:
987 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
989 return "acid bolt (5d8) every 6+d6 turns";
991 case EGO_RING_MANA_BOLT:
993 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
995 return "a mana bolt (120) every 120+d120 turns";
997 case EGO_RING_FIRE_BALL:
999 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1001 return "fire ball (100) every 80+d80 turns";
1003 case EGO_RING_COLD_BALL:
1005 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1007 return "cold ball (100) every 80+d80 turns";
1009 case EGO_RING_ELEC_BALL:
1011 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1013 return "elec ball (100) every 80+d80 turns";
1015 case EGO_RING_ACID_BALL:
1017 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1019 return "acid ball (100) every 80+d80 turns";
1021 case EGO_RING_MANA_BALL:
1023 return "ËâÎϤÎÍò (250) : 300 ¥¿¡¼¥óËè";
1025 return "mana storm (250) every 300 turns";
1027 case EGO_RING_DRAGON_F:
1028 if (o_ptr->sval == SV_RING_FLAMES)
1030 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) ¤È²Ð¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
1032 return "breath of fire (200) and resist fire every 200 turns";
1036 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
1038 return "fire breath (200) every 250 turns";
1040 case EGO_RING_DRAGON_C:
1041 if (o_ptr->sval == SV_RING_ICE)
1043 return "Î䵤¤Î¥Ö¥ì¥¹ (200) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
1045 return "breath of cold (200) and resist cold every 200 turns";
1049 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
1051 return "cold breath (200) every 250 turns";
1053 case EGO_RING_M_DETECT:
1055 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃÎ : 150 ¥¿¡¼¥óËè";
1057 return "detect all monsters every 150 turns";
1059 case EGO_RING_D_SPEED:
1061 return "¥¹¥Ô¡¼¥É(15+d30¥¿¡¼¥ó) : 100 ¥¿¡¼¥óËè";
1063 return "haste self (15+d30 turns) every 100 turns";
1065 case EGO_RING_BERSERKER:
1067 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
1069 return "berserk (25+d25 turns) every 75+d75 turns";
1071 case EGO_RING_TELE_AWAY:
1073 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
1075 return "teleport away every 150 turns";
1079 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ : 777 ¥¿¡¼¥óËè";
1081 return "hero, bless, and ultimate resistance every 777 turns";
1085 switch (o_ptr->sval)
1087 case SV_RING_FLAMES:
1089 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) ¤È²Ð¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1091 return "ball of fire (100) and resist fire every 50+d50 turns";
1096 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1098 return "ball of cold (100) and resist cold every 50+d50 turns";
1103 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) ¤È»À¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1105 return "ball of acid (100) and resist acid every 50+d50 turns";
1110 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) ¤ÈÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1112 return "ball of elec (100) and resist elec every 50+d50 turns";
1120 if (o_ptr->tval == TV_AMULET)
1122 if (object_is_ego(o_ptr))
1124 switch (o_ptr->name2)
1128 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
1130 return "identify every 10 turns";
1134 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
1136 return "charm monster every 200 turns";
1140 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1142 return "blink every 10+d10 turns";
1144 case EGO_AMU_TELEPORT:
1146 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
1148 return "teleport every 50+d50 turns";
1150 case EGO_AMU_D_DOOR:
1152 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
1154 return "dimension door every 200 turns";
1156 case EGO_AMU_RES_FIRE_:
1158 return "²Ð±ê¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1160 return "resist fire every 50+d50 turns";
1162 case EGO_AMU_RES_COLD_:
1164 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1166 return "resist cold every 50+d50 turns";
1168 case EGO_AMU_RES_ELEC_:
1170 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1172 return "resist elec every 50+d50 turns";
1174 case EGO_AMU_RES_ACID_:
1176 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1178 return "resist acid every 50+d50 turns";
1180 case EGO_AMU_DETECTION:
1182 return "Á´´¶ÃÎ : 55+d55¥¿¡¼¥óËè";
1184 return "detect all floor every 55+d55 turns";
1190 if (o_ptr->tval == TV_WHISTLE)
1193 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
1195 return "call pet every 100+d100 turns";
1199 if (o_ptr->tval == TV_CAPTURE)
1202 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
1204 return "captures or releases a monster.";
1208 /* Require dragon scale mail */
1210 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
1212 if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
1216 /* Branch on the sub-type */
1217 switch (o_ptr->sval)
1219 case SV_DRAGON_BLUE:
1222 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
1224 return "breathe lightning (100) every 150+d150 turns";
1228 case SV_DRAGON_WHITE:
1231 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
1233 return "breathe frost (110) every 150+d150 turns";
1237 case SV_DRAGON_BLACK:
1240 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
1242 return "breathe acid (130) every 150+d150 turns";
1246 case SV_DRAGON_GREEN:
1249 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
1251 return "breathe poison gas (150) every 180+d180 turns";
1258 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
1260 return "breathe fire (200) every 200+d200 turns";
1264 case SV_DRAGON_MULTIHUED:
1267 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
1269 return "breathe multi-hued (250) every 200+d200 turns";
1273 case SV_DRAGON_BRONZE:
1276 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
1278 return "breathe confusion (120) every 180+d180 turns";
1282 case SV_DRAGON_GOLD:
1285 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
1287 return "breathe sound (130) every 180+d180 turns";
1291 case SV_DRAGON_CHAOS:
1294 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
1296 return "breathe chaos/disenchant (220) every 200+d200 turns";
1303 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
1305 return "breathe sound/shards (230) every 200+d200 turns";
1309 case SV_DRAGON_BALANCE:
1312 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
1314 return "breathe balance (250) every 200+d200 turns";
1318 case SV_DRAGON_SHINING:
1321 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
1323 return "breathe light/darkness (200) every 200+d200 turns";
1327 case SV_DRAGON_POWER:
1330 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
1332 return "breathe the elements (300) every 200+d200 turns";
1342 return "breathe air";
1349 * Describe a "fully identified" item
1351 bool screen_object(object_type *o_ptr, u32b mode)
1355 u32b flgs[TR_FLAG_SIZE];
1359 char o_name[MAX_NLEN];
1362 int trivial_info = 0;
1364 /* Extract the flags */
1365 object_flags(o_ptr, flgs);
1367 /* Extract the description */
1369 roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
1370 (k_text + k_info[o_ptr->k_idx].text),
1371 77 - 15, temp, sizeof(temp));
1372 for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
1373 { info[i] = &temp[j]; i++;}
1376 if (object_is_equipment(o_ptr))
1378 /* Descriptions of a basic equipment is just a flavor */
1382 /* Mega-Hack -- describe activation */
1383 if (have_flag(flgs, TR_ACTIVATE))
1386 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
1388 info[i++] = "It can be activated for...";
1391 info[i++] = item_activation(o_ptr);
1393 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
1395 info[i++] = "...if it is being worn.";
1400 /* Figurines, a hack */
1401 if (o_ptr->tval == TV_FIGURINE)
1404 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
1406 info[i++] = "It will transform into a pet when thrown.";
1411 /* Figurines, a hack */
1412 if (o_ptr->name1 == ART_STONEMASK)
1415 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
1417 info[i++] = "It makes you turn into a vampire permanently.";
1422 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
1425 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
1427 info[i++] = "It will attempt to kill a monster instantly.";
1432 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
1435 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
1437 info[i++] = "It causes you to strike yourself sometimes.";
1441 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
1443 info[i++] = "It always penetrates invulnerability barriers.";
1447 if (o_ptr->name2 == EGO_2WEAPON)
1450 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
1452 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
1457 if (have_flag(flgs, TR_EASY_SPELL))
1460 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
1462 info[i++] = "It affects your ability to cast spells.";
1466 if (o_ptr->name2 == EGO_AMU_FOOL)
1469 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
1471 info[i++] = "It interferes with casting spells.";
1475 if (o_ptr->name2 == EGO_RING_THROW)
1478 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
1480 info[i++] = "It provides great strength when you throw an item.";
1484 if (o_ptr->name2 == EGO_AMU_NAIVETY)
1487 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
1489 info[i++] = "It decreases your magic resistance.";
1493 if (o_ptr->tval == TV_STATUE)
1495 monster_race *r_ptr = &r_info[o_ptr->pval];
1497 if (o_ptr->pval == MON_BULLGATES)
1499 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
1501 info[i++] = "It is shameful.";
1503 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
1505 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
1507 info[i++] = "It is fearful.";
1511 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
1513 info[i++] = "It is cheerful.";
1517 /* Hack -- describe lite's */
1518 if (o_ptr->tval == TV_LITE)
1520 if (o_ptr->name2 == EGO_LITE_DARKNESS)
1523 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
1525 info[i++] = "It provides no light.";
1528 if (o_ptr->sval == SV_LITE_FEANOR)
1531 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-3)¡£";
1533 info[i++] = "It decreases radius of light source by 3.";
1536 else if (o_ptr->sval == SV_LITE_LANTERN)
1539 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
1541 info[i++] = "It decreases radius of light source by 2.";
1547 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
1549 info[i++] = "It decreases radius of light source by 1.";
1553 else if (object_is_fixed_artifact(o_ptr))
1556 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1558 info[i++] = "It provides light (radius 3) forever.";
1562 else if (o_ptr->name2 == EGO_LITE_SHINE)
1564 if (o_ptr->sval == SV_LITE_FEANOR)
1567 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1569 info[i++] = "It provides light (radius 3) forever.";
1573 else if (o_ptr->sval == SV_LITE_LANTERN)
1576 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1578 info[i++] = "It provides light (radius 3) when fueled.";
1585 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1587 info[i++] = "It provides light (radius 2) when fueled.";
1594 if (o_ptr->sval == SV_LITE_FEANOR)
1597 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1599 info[i++] = "It provides light (radius 2) forever.";
1603 else if (o_ptr->sval == SV_LITE_LANTERN)
1606 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1608 info[i++] = "It provides light (radius 2) when fueled.";
1615 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
1617 info[i++] = "It provides light (radius 1) when fueled.";
1622 if (o_ptr->name2 == EGO_LITE_LONG)
1625 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
1627 info[i++] = "It provides light for much longer time.";
1633 /* And then describe it fully */
1635 if (have_flag(flgs, TR_RIDING))
1637 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
1639 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
1641 info[i++] = "It is made for use while riding.";
1646 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
1648 info[i++] = "It is suitable for use while riding.";
1650 /* This information is not important enough */
1654 if (have_flag(flgs, TR_STR))
1657 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1659 info[i++] = "It affects your strength.";
1663 if (have_flag(flgs, TR_INT))
1666 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1668 info[i++] = "It affects your intelligence.";
1672 if (have_flag(flgs, TR_WIS))
1675 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1677 info[i++] = "It affects your wisdom.";
1681 if (have_flag(flgs, TR_DEX))
1684 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1686 info[i++] = "It affects your dexterity.";
1690 if (have_flag(flgs, TR_CON))
1693 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1695 info[i++] = "It affects your constitution.";
1699 if (have_flag(flgs, TR_CHR))
1702 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1704 info[i++] = "It affects your charisma.";
1709 if (have_flag(flgs, TR_MAGIC_MASTERY))
1712 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1714 info[i++] = "It affects your ability to use magic devices.";
1718 if (have_flag(flgs, TR_STEALTH))
1721 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1723 info[i++] = "It affects your stealth.";
1727 if (have_flag(flgs, TR_SEARCH))
1730 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1732 info[i++] = "It affects your searching.";
1736 if (have_flag(flgs, TR_INFRA))
1739 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1741 info[i++] = "It affects your infravision.";
1745 if (have_flag(flgs, TR_TUNNEL))
1748 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1750 info[i++] = "It affects your ability to tunnel.";
1754 if (have_flag(flgs, TR_SPEED))
1757 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1759 info[i++] = "It affects your speed.";
1763 if (have_flag(flgs, TR_BLOWS))
1766 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1768 info[i++] = "It affects your attack speed.";
1773 if (have_flag(flgs, TR_BRAND_ACID))
1776 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1778 info[i++] = "It does extra damage from acid.";
1782 if (have_flag(flgs, TR_BRAND_ELEC))
1785 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1787 info[i++] = "It does extra damage from electricity.";
1791 if (have_flag(flgs, TR_BRAND_FIRE))
1794 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1796 info[i++] = "It does extra damage from fire.";
1800 if (have_flag(flgs, TR_BRAND_COLD))
1803 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1805 info[i++] = "It does extra damage from frost.";
1810 if (have_flag(flgs, TR_BRAND_POIS))
1813 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
1815 info[i++] = "It poisons your foes.";
1820 if (have_flag(flgs, TR_CHAOTIC))
1823 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
1825 info[i++] = "It produces chaotic effects.";
1830 if (have_flag(flgs, TR_VAMPIRIC))
1833 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
1835 info[i++] = "It drains life from your foes.";
1840 if (have_flag(flgs, TR_IMPACT))
1843 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
1845 info[i++] = "It can cause earthquakes.";
1850 if (have_flag(flgs, TR_VORPAL))
1853 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1855 info[i++] = "It is very sharp and can cut your foes.";
1860 if (have_flag(flgs, TR_KILL_DRAGON))
1863 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1865 info[i++] = "It is a great bane of dragons.";
1869 else if (have_flag(flgs, TR_SLAY_DRAGON))
1872 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1874 info[i++] = "It is especially deadly against dragons.";
1879 if (have_flag(flgs, TR_KILL_ORC))
1882 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1884 info[i++] = "It is a great bane of orcs.";
1888 if (have_flag(flgs, TR_SLAY_ORC))
1891 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1893 info[i++] = "It is especially deadly against orcs.";
1898 if (have_flag(flgs, TR_KILL_TROLL))
1901 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1903 info[i++] = "It is a great bane of trolls.";
1907 if (have_flag(flgs, TR_SLAY_TROLL))
1910 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1912 info[i++] = "It is especially deadly against trolls.";
1917 if (have_flag(flgs, TR_KILL_GIANT))
1920 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1922 info[i++] = "It is a great bane of giants.";
1925 else if (have_flag(flgs, TR_SLAY_GIANT))
1928 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1930 info[i++] = "It is especially deadly against giants.";
1935 if (have_flag(flgs, TR_KILL_DEMON))
1938 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1940 info[i++] = "It is a great bane of demons.";
1944 if (have_flag(flgs, TR_SLAY_DEMON))
1947 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
1949 info[i++] = "It strikes at demons with holy wrath.";
1954 if (have_flag(flgs, TR_KILL_UNDEAD))
1957 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1959 info[i++] = "It is a great bane of undead.";
1963 if (have_flag(flgs, TR_SLAY_UNDEAD))
1966 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
1968 info[i++] = "It strikes at undead with holy wrath.";
1973 if (have_flag(flgs, TR_KILL_EVIL))
1976 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1978 info[i++] = "It is a great bane of evil monsters.";
1982 if (have_flag(flgs, TR_SLAY_EVIL))
1985 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
1987 info[i++] = "It fights against evil with holy fury.";
1992 if (have_flag(flgs, TR_KILL_ANIMAL))
1995 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1997 info[i++] = "It is a great bane of natural creatures.";
2001 if (have_flag(flgs, TR_SLAY_ANIMAL))
2004 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2006 info[i++] = "It is especially deadly against natural creatures.";
2011 if (have_flag(flgs, TR_KILL_HUMAN))
2014 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2016 info[i++] = "It is a great bane of humans.";
2020 if (have_flag(flgs, TR_SLAY_HUMAN))
2023 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2025 info[i++] = "It is especially deadly against humans.";
2030 if (have_flag(flgs, TR_FORCE_WEAPON))
2033 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
2035 info[i++] = "It powerfully strikes at a monster using your mana.";
2039 if (have_flag(flgs, TR_DEC_MANA))
2042 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
2044 info[i++] = "It decreases your mana consumption.";
2048 if (have_flag(flgs, TR_SUST_STR))
2051 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
2053 info[i++] = "It sustains your strength.";
2057 if (have_flag(flgs, TR_SUST_INT))
2060 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
2062 info[i++] = "It sustains your intelligence.";
2066 if (have_flag(flgs, TR_SUST_WIS))
2069 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
2071 info[i++] = "It sustains your wisdom.";
2075 if (have_flag(flgs, TR_SUST_DEX))
2078 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
2080 info[i++] = "It sustains your dexterity.";
2084 if (have_flag(flgs, TR_SUST_CON))
2087 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
2089 info[i++] = "It sustains your constitution.";
2093 if (have_flag(flgs, TR_SUST_CHR))
2096 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
2098 info[i++] = "It sustains your charisma.";
2103 if (have_flag(flgs, TR_IM_ACID))
2106 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2108 info[i++] = "It provides immunity to acid.";
2112 if (have_flag(flgs, TR_IM_ELEC))
2115 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2117 info[i++] = "It provides immunity to electricity.";
2121 if (have_flag(flgs, TR_IM_FIRE))
2124 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2126 info[i++] = "It provides immunity to fire.";
2130 if (have_flag(flgs, TR_IM_COLD))
2133 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2135 info[i++] = "It provides immunity to cold.";
2140 if (have_flag(flgs, TR_THROW))
2143 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2145 info[i++] = "It is perfectly balanced for throwing.";
2149 if (have_flag(flgs, TR_FREE_ACT))
2152 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2154 info[i++] = "It provides immunity to paralysis.";
2158 if (have_flag(flgs, TR_HOLD_LIFE))
2161 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
2163 info[i++] = "It provides resistance to life draining.";
2167 if (have_flag(flgs, TR_RES_FEAR))
2170 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
2172 info[i++] = "It makes you completely fearless.";
2176 if (have_flag(flgs, TR_RES_ACID))
2179 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2181 info[i++] = "It provides resistance to acid.";
2185 if (have_flag(flgs, TR_RES_ELEC))
2188 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2190 info[i++] = "It provides resistance to electricity.";
2194 if (have_flag(flgs, TR_RES_FIRE))
2197 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2199 info[i++] = "It provides resistance to fire.";
2203 if (have_flag(flgs, TR_RES_COLD))
2206 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2208 info[i++] = "It provides resistance to cold.";
2212 if (have_flag(flgs, TR_RES_POIS))
2215 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2217 info[i++] = "It provides resistance to poison.";
2222 if (have_flag(flgs, TR_RES_LITE))
2225 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2227 info[i++] = "It provides resistance to light.";
2231 if (have_flag(flgs, TR_RES_DARK))
2234 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2236 info[i++] = "It provides resistance to dark.";
2241 if (have_flag(flgs, TR_RES_BLIND))
2244 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2246 info[i++] = "It provides resistance to blindness.";
2250 if (have_flag(flgs, TR_RES_CONF))
2253 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2255 info[i++] = "It provides resistance to confusion.";
2259 if (have_flag(flgs, TR_RES_SOUND))
2262 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2264 info[i++] = "It provides resistance to sound.";
2268 if (have_flag(flgs, TR_RES_SHARDS))
2271 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2273 info[i++] = "It provides resistance to shards.";
2278 if (have_flag(flgs, TR_RES_NETHER))
2281 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2283 info[i++] = "It provides resistance to nether.";
2287 if (have_flag(flgs, TR_RES_NEXUS))
2290 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2292 info[i++] = "It provides resistance to nexus.";
2296 if (have_flag(flgs, TR_RES_CHAOS))
2299 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2301 info[i++] = "It provides resistance to chaos.";
2305 if (have_flag(flgs, TR_RES_DISEN))
2308 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2310 info[i++] = "It provides resistance to disenchantment.";
2315 if (have_flag(flgs, TR_LEVITATION))
2318 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2320 info[i++] = "It allows you to levitate.";
2324 if (have_flag(flgs, TR_LITE))
2326 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
2328 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
2330 info[i++] = "It decreases radius of your light source by 1.";
2334 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë(Ⱦ·Â¤Ë+1)¡£";
2336 info[i++] = "It provides permanent light. (radius +1)";
2340 if (have_flag(flgs, TR_SEE_INVIS))
2343 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2345 info[i++] = "It allows you to see invisible monsters.";
2349 if (have_flag(flgs, TR_TELEPATHY))
2352 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
2354 info[i++] = "It gives telepathic powers.";
2358 if (have_flag(flgs, TR_ESP_ANIMAL))
2361 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤ò´¶ÃΤ¹¤ë¡£";
2363 info[i++] = "It senses natural creatures.";
2367 if (have_flag(flgs, TR_ESP_UNDEAD))
2370 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ò´¶ÃΤ¹¤ë¡£";
2372 info[i++] = "It senses undead.";
2376 if (have_flag(flgs, TR_ESP_DEMON))
2379 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò´¶ÃΤ¹¤ë¡£";
2381 info[i++] = "It senses demons.";
2385 if (have_flag(flgs, TR_ESP_ORC))
2388 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ò´¶ÃΤ¹¤ë¡£";
2390 info[i++] = "It senses orcs.";
2394 if (have_flag(flgs, TR_ESP_TROLL))
2397 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ò´¶ÃΤ¹¤ë¡£";
2399 info[i++] = "It senses trolls.";
2403 if (have_flag(flgs, TR_ESP_GIANT))
2406 info[i++] = "¤½¤ì¤Ïµð¿Í¤ò´¶ÃΤ¹¤ë¡£";
2408 info[i++] = "It senses giants.";
2412 if (have_flag(flgs, TR_ESP_DRAGON))
2415 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò´¶ÃΤ¹¤ë¡£";
2417 info[i++] = "It senses dragons.";
2421 if (have_flag(flgs, TR_ESP_HUMAN))
2424 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ò´¶ÃΤ¹¤ë¡£";
2426 info[i++] = "It senses humans.";
2430 if (have_flag(flgs, TR_ESP_EVIL))
2433 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¸ºß¤ò´¶ÃΤ¹¤ë¡£";
2435 info[i++] = "It senses evil creatures.";
2439 if (have_flag(flgs, TR_ESP_GOOD))
2442 info[i++] = "¤½¤ì¤ÏÁ±Îɤʸºß¤ò´¶ÃΤ¹¤ë¡£";
2444 info[i++] = "It senses good creatures.";
2448 if (have_flag(flgs, TR_ESP_NONLIVING))
2451 info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤò´¶ÃΤ¹¤ë¡£";
2453 info[i++] = "It senses non-living creatures.";
2457 if (have_flag(flgs, TR_ESP_UNIQUE))
2460 info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤ò´¶ÃΤ¹¤ë¡£";
2462 info[i++] = "It senses unique monsters.";
2466 if (have_flag(flgs, TR_SLOW_DIGEST))
2469 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
2471 info[i++] = "It slows your metabolism.";
2475 if (have_flag(flgs, TR_REGEN))
2478 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
2480 info[i++] = "It speeds your regenerative powers.";
2484 if (have_flag(flgs, TR_WARNING))
2487 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
2489 info[i++] = "It warns you of danger";
2493 if (have_flag(flgs, TR_REFLECT))
2496 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
2498 info[i++] = "It reflects bolts and arrows.";
2502 if (have_flag(flgs, TR_SH_FIRE))
2505 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2507 info[i++] = "It produces a fiery sheath.";
2511 if (have_flag(flgs, TR_SH_ELEC))
2514 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2516 info[i++] = "It produces an electric sheath.";
2520 if (have_flag(flgs, TR_SH_COLD))
2523 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2525 info[i++] = "It produces a sheath of coldness.";
2529 if (have_flag(flgs, TR_NO_MAGIC))
2532 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2534 info[i++] = "It produces an anti-magic shell.";
2538 if (have_flag(flgs, TR_NO_TELE))
2541 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
2543 info[i++] = "It prevents teleportation.";
2547 if (have_flag(flgs, TR_XTRA_MIGHT))
2550 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2552 info[i++] = "It fires missiles with extra might.";
2556 if (have_flag(flgs, TR_XTRA_SHOTS))
2559 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2561 info[i++] = "It fires missiles excessively fast.";
2566 if (have_flag(flgs, TR_BLESSED))
2569 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
2571 info[i++] = "It has been blessed by the gods.";
2576 if (object_is_cursed(o_ptr))
2578 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
2581 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
2583 info[i++] = "It is permanently cursed.";
2587 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
2590 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
2592 info[i++] = "It is heavily cursed.";
2599 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
2601 info[i++] = "It is cursed.";
2605 * It's a trivial infomation since there is
2606 * fake inscription {cursed}
2612 if ((have_flag(flgs, TR_TY_CURSE)) || (o_ptr->curse_flags & TRC_TY_CURSE))
2615 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
2617 info[i++] = "It carries an ancient foul curse.";
2621 if ((have_flag(flgs, TR_AGGRAVATE)) || (o_ptr->curse_flags & TRC_AGGRAVATE))
2624 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
2626 info[i++] = "It aggravates nearby creatures.";
2630 if ((have_flag(flgs, TR_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
2633 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
2635 info[i++] = "It drains experience.";
2639 if (o_ptr->curse_flags & TRC_SLOW_REGEN)
2642 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
2644 info[i++] = "It slows your regenerative powers.";
2648 if (o_ptr->curse_flags & TRC_ADD_L_CURSE)
2651 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
2653 info[i++] = "It adds weak curses.";
2657 if (o_ptr->curse_flags & TRC_ADD_H_CURSE)
2660 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
2662 info[i++] = "It adds heavy curses.";
2666 if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
2669 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2671 info[i++] = "It attracts animals.";
2675 if (o_ptr->curse_flags & TRC_CALL_DEMON)
2678 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2680 info[i++] = "It attracts demons.";
2684 if (o_ptr->curse_flags & TRC_CALL_DRAGON)
2687 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2689 info[i++] = "It attracts dragons.";
2693 if (o_ptr->curse_flags & TRC_COWARDICE)
2696 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤µ¯¤³¤¹¡£";
2698 info[i++] = "It makes you subject to cowardice.";
2702 if ((have_flag(flgs, TR_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
2705 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
2707 info[i++] = "It induces random teleportation.";
2711 if (o_ptr->curse_flags & TRC_LOW_MELEE)
2714 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
2716 info[i++] = "It causes you to miss blows.";
2720 if (o_ptr->curse_flags & TRC_LOW_AC)
2723 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
2725 info[i++] = "It helps your enemies' blows.";
2729 if (o_ptr->curse_flags & TRC_LOW_MAGIC)
2732 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
2734 info[i++] = "It encumbers you while spellcasting.";
2738 if (o_ptr->curse_flags & TRC_FAST_DIGEST)
2741 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
2743 info[i++] = "It speeds your metabolism.";
2747 if (o_ptr->curse_flags & TRC_DRAIN_HP)
2750 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
2752 info[i++] = "It drains you.";
2756 if (o_ptr->curse_flags & TRC_DRAIN_MANA)
2759 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
2761 info[i++] = "It drains your mana.";
2766 /* Describe about this kind of object instead of THIS fake object */
2767 if (mode & SCROBJ_FAKE_OBJECT)
2769 switch (o_ptr->tval)
2772 switch (o_ptr->sval)
2774 case SV_RING_LORDLY:
2776 info[i++] = "¤½¤ì¤Ï´ö¤Ä¤«¤Î¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
2778 info[i++] = "It provides some random resistances.";
2781 case SV_RING_WARNING:
2783 info[i++] = "¤½¤ì¤Ï¤Ò¤È¤Ä¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2785 info[i++] = "It may provide a low rank ESP.";
2792 switch (o_ptr->sval)
2794 case SV_AMULET_RESISTANCE:
2796 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2798 info[i++] = "It may provides resistance to poison.";
2801 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2803 info[i++] = "It may provide a random resistances.";
2806 case SV_AMULET_THE_MAGI:
2808 info[i++] = "¤½¤ì¤ÏºÇÂç¤Ç£³¤Ä¤Þ¤Ç¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë¡£";
2810 info[i++] = "It provides up to three low rank ESPs.";
2818 if (have_flag(flgs, TR_IGNORE_ACID) &&
2819 have_flag(flgs, TR_IGNORE_ELEC) &&
2820 have_flag(flgs, TR_IGNORE_FIRE) &&
2821 have_flag(flgs, TR_IGNORE_COLD))
2824 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2826 info[i++] = "It cannot be harmed by the elements.";
2831 if (have_flag(flgs, TR_IGNORE_ACID))
2834 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2836 info[i++] = "It cannot be harmed by acid.";
2839 if (have_flag(flgs, TR_IGNORE_ELEC))
2842 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2844 info[i++] = "It cannot be harmed by electricity.";
2847 if (have_flag(flgs, TR_IGNORE_FIRE))
2850 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2852 info[i++] = "It cannot be harmed by fire.";
2855 if (have_flag(flgs, TR_IGNORE_COLD))
2858 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2860 info[i++] = "It cannot be harmed by cold.";
2865 if (mode & SCROBJ_FORCE_DETAIL) trivial_info = 0;
2867 /* No relevant informations */
2868 if (i <= trivial_info) return (FALSE);
2870 /* Save the screen */
2874 Term_get_size(&wid, &hgt);
2876 /* Display Item name */
2877 if (!(mode & SCROBJ_FAKE_OBJECT))
2878 object_desc(o_name, o_ptr, 0);
2880 object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
2884 /* Erase the screen */
2885 for (k = 1; k < hgt; k++) prt("", k, 13);
2887 /* Label the information */
2888 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
2890 monster_race *r_ptr = &r_info[o_ptr->pval];
2891 int namelen = strlen(r_name + r_ptr->name);
2892 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
2893 Term_queue_bigchar(18 + namelen, 1, r_ptr->x_attr, r_ptr->x_char, 0, 0);
2894 prt("'", 1, (use_bigtile ? 20 : 19) + namelen);
2898 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
2900 prt(" Item Attributes:", 1, 15);
2903 /* We will print on top of the map (column 13) */
2904 for (k = 2, j = 0; j < i; j++)
2907 prt(info[j], k++, 15);
2909 /* Every 20 entries (lines 2 to 21), start over */
2910 if ((k == hgt - 2) && (j+1 < i))
2913 prt("-- ³¤¯ --", k, 15);
2915 prt("-- more --", k, 15);
2918 for (; k > 2; k--) prt("", k, 15);
2924 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
2926 prt("[Press any key to continue]", k, 15);
2931 /* Restore the screen */
2934 /* Gave knowledge */
2941 * Convert an inventory index into a one character label
2942 * Note that the label does NOT distinguish inven/equip.
2944 char index_to_label(int i)
2946 /* Indexes for "inven" are easy */
2947 if (i < INVEN_RARM) return (I2A(i));
2949 /* Indexes for "equip" are offset */
2950 return (I2A(i - INVEN_RARM));
2955 * Convert a label into the index of an item in the "inven"
2956 * Return "-1" if the label does not indicate a real item
2958 s16b label_to_inven(int c)
2963 i = (islower(c) ? A2I(c) : -1);
2965 /* Verify the index */
2966 if ((i < 0) || (i > INVEN_PACK)) return (-1);
2968 /* Empty slots can never be chosen */
2969 if (!inventory[i].k_idx) return (-1);
2971 /* Return the index */
2977 extern bool select_ring_slot;
2980 static bool is_ring_slot(int i)
2982 return (i == INVEN_RIGHT) || (i == INVEN_LEFT);
2987 * Convert a label into the index of a item in the "equip"
2988 * Return "-1" if the label does not indicate a real item
2990 s16b label_to_equip(int c)
2995 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
2997 /* Verify the index */
2998 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
3000 if (select_ring_slot) return is_ring_slot(i) ? i : -1;
3002 /* Empty slots can never be chosen */
3003 if (!inventory[i].k_idx) return (-1);
3005 /* Return the index */
3012 * Determine which equipment slot (if any) an item likes
3014 s16b wield_slot(object_type *o_ptr)
3016 /* Slot for equipment */
3017 switch (o_ptr->tval)
3024 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
3025 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
3026 return (INVEN_LARM);
3033 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
3034 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
3035 return (INVEN_RARM);
3045 /* Use the right hand first */
3046 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
3048 /* Use the left hand for swapping (by default) */
3049 return (INVEN_LEFT);
3055 return (INVEN_NECK);
3060 return (INVEN_LITE);
3067 return (INVEN_BODY);
3072 return (INVEN_OUTER);
3078 return (INVEN_HEAD);
3083 return (INVEN_HANDS);
3088 return (INVEN_FEET);
3092 /* No slot available */
3098 * Return a string mentioning how a given item is carried
3100 cptr mention_use(int i)
3104 /* Examine the location */
3108 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->migite) ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê")); break;
3110 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "Just lifting" : (p_ptr->migite ? "Wielding" : "On arm"); break;
3114 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->hidarite) ? " ξ¼ê" : (left_hander ? " ±¦¼ê" : " º¸¼ê")); break;
3116 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "Just lifting" : (p_ptr->hidarite ? "Wielding" : "On arm"); break;
3120 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "±¿ÈÂÃæ" : "¼Í·âÍÑ"; break;
3122 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "Just holding" : "Shooting"; break;
3126 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
3128 case INVEN_RIGHT: p = (left_hander ? "On left hand" : "On right hand"); break;
3132 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
3134 case INVEN_LEFT: p = (left_hander ? "On right hand" : "On left hand"); break;
3138 case INVEN_NECK: p = " ¼ó"; break;
3140 case INVEN_NECK: p = "Around neck"; break;
3144 case INVEN_LITE: p = " ¸÷¸»"; break;
3146 case INVEN_LITE: p = "Light source"; break;
3150 case INVEN_BODY: p = " ÂÎ"; break;
3152 case INVEN_BODY: p = "On body"; break;
3156 case INVEN_OUTER: p = "ÂΤξå"; break;
3158 case INVEN_OUTER: p = "About body"; break;
3162 case INVEN_HEAD: p = " Ƭ"; break;
3164 case INVEN_HEAD: p = "On head"; break;
3168 case INVEN_HANDS: p = " ¼ê"; break;
3170 case INVEN_HANDS: p = "On hands"; break;
3174 case INVEN_FEET: p = " "; break;
3176 case INVEN_FEET: p = "On feet"; break;
3180 default: p = "¥¶¥Ã¥¯"; break;
3182 default: p = "In pack"; break;
3186 /* Return the result */
3192 * Return a string describing how a given item is being worn.
3193 * Currently, only used for items in the equipment, not inventory.
3195 cptr describe_use(int i)
3202 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->migite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
3204 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "just lifting" : (p_ptr->migite ? "attacking monsters with" : "wearing on your arm"); break;
3208 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->hidarite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
3210 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "just lifting" : (p_ptr->hidarite ? "attacking monsters with" : "wearing on your arm"); break;
3214 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î" : "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
3216 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "just holding" : "shooting missiles with"; break;
3220 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3222 case INVEN_RIGHT: p = (left_hander ? "wearing on your left hand" : "wearing on your right hand"); break;
3226 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3228 case INVEN_LEFT: p = (left_hander ? "wearing on your right hand" : "wearing on your left hand"); break;
3232 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
3234 case INVEN_NECK: p = "wearing around your neck"; break;
3238 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
3240 case INVEN_LITE: p = "using to light the way"; break;
3244 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
3246 case INVEN_BODY: p = "wearing on your body"; break;
3250 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
3252 case INVEN_OUTER: p = "wearing on your back"; break;
3256 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
3258 case INVEN_HEAD: p = "wearing on your head"; break;
3262 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
3264 case INVEN_HANDS: p = "wearing on your hands"; break;
3268 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
3270 case INVEN_FEET: p = "wearing on your feet"; break;
3274 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
3276 default: p = "carrying in your pack"; break;
3280 /* Return the result */
3285 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
3287 bool check_book_realm(const byte book_tval, const byte book_sval)
3289 if (book_tval < TV_LIFE_BOOK) return FALSE;
3290 if (p_ptr->pclass == CLASS_SORCERER)
3292 return is_magic(tval2realm(book_tval));
3294 else if (p_ptr->pclass == CLASS_RED_MAGE)
3296 if (is_magic(tval2realm(book_tval)))
3297 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
3299 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
3304 * Check an item against the item tester info
3306 bool item_tester_okay(object_type *o_ptr)
3308 /* Hack -- allow listing empty slots */
3309 if (item_tester_full) return (TRUE);
3311 /* Require an item */
3312 if (!o_ptr->k_idx) return (FALSE);
3314 /* Hack -- ignore "gold" */
3315 if (o_ptr->tval == TV_GOLD)
3318 extern bool show_gold_on_floor;
3320 if (!show_gold_on_floor) return (FALSE);
3323 /* Check the tval */
3324 if (item_tester_tval)
3326 /* Is it a spellbook? If so, we need a hack -- TY */
3327 if ((item_tester_tval <= TV_DEATH_BOOK) &&
3328 (item_tester_tval >= TV_LIFE_BOOK))
3329 return check_book_realm(o_ptr->tval, o_ptr->sval);
3331 if (item_tester_tval != o_ptr->tval) return (FALSE);
3334 /* Check the hook */
3335 if (item_tester_hook)
3337 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
3348 * Choice window "shadow" of the "show_inven()" function
3350 void display_inven(void)
3352 register int i, n, z = 0;
3354 byte attr = TERM_WHITE;
3356 char o_name[MAX_NLEN];
3360 Term_get_size(&wid, &hgt);
3362 /* Find the "final" slot */
3363 for (i = 0; i < INVEN_PACK; i++)
3365 o_ptr = &inventory[i];
3367 /* Skip non-objects */
3368 if (!o_ptr->k_idx) continue;
3374 /* Display the pack */
3375 for (i = 0; i < z; i++)
3377 /* Examine the item */
3378 o_ptr = &inventory[i];
3380 /* Start with an empty "index" */
3381 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
3383 /* Is this item "acceptable"? */
3384 if (item_tester_okay(o_ptr))
3386 /* Prepare an "index" */
3387 tmp_val[0] = index_to_label(i);
3389 /* Bracket the "index" --(-- */
3393 /* Display the index (or blank space) */
3394 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
3396 /* Obtain an item description */
3397 object_desc(o_name, o_ptr, 0);
3399 /* Obtain the length of the description */
3403 attr = tval_to_attr[o_ptr->tval % 128];
3405 /* Grey out charging items */
3411 /* Display the entry itself */
3412 Term_putstr(3, i, n, attr, o_name);
3414 /* Erase the rest of the line */
3415 Term_erase(3+n, i, 255);
3417 /* Display the weight if needed */
3420 int wgt = o_ptr->weight * o_ptr->number;
3422 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
3424 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3427 prt(tmp_val, i, wid - 9);
3431 /* Erase the rest of the window */
3432 for (i = z; i < hgt; i++)
3434 /* Erase the line */
3435 Term_erase(0, i, 255);
3442 * Choice window "shadow" of the "show_equip()" function
3444 void display_equip(void)
3448 byte attr = TERM_WHITE;
3450 char o_name[MAX_NLEN];
3454 Term_get_size(&wid, &hgt);
3456 /* Display the equipment */
3457 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
3459 /* Examine the item */
3460 o_ptr = &inventory[i];
3462 /* Start with an empty "index" */
3463 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
3465 /* Is this item "acceptable"? */
3466 if (select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr))
3468 /* Prepare an "index" */
3469 tmp_val[0] = index_to_label(i);
3471 /* Bracket the "index" --(-- */
3475 /* Display the index (or blank space) */
3476 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
3478 /* Obtain an item description */
3479 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
3482 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
3484 strcpy(o_name, "(wielding with two-hands)");
3490 object_desc(o_name, o_ptr, 0);
3491 attr = tval_to_attr[o_ptr->tval % 128];
3494 /* Obtain the length of the description */
3497 /* Grey out charging items */
3503 /* Display the entry itself */
3504 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
3506 /* Erase the rest of the line */
3507 Term_erase(3+n, i - INVEN_RARM, 255);
3509 /* Display the weight (if needed) */
3512 int wgt = o_ptr->weight * o_ptr->number;
3514 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
3516 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3519 prt(tmp_val, i - INVEN_RARM, wid - (show_labels ? 28 : 9));
3522 /* Display the slot description (if needed) */
3525 Term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
3526 prt(mention_use(i), i - INVEN_RARM, wid - 15);
3530 /* Erase the rest of the window */
3531 for (i = INVEN_TOTAL - INVEN_RARM; i < hgt; i++)
3533 /* Clear that line */
3534 Term_erase(0, i, 255);
3540 * Find the "first" inventory object with the given "tag".
3542 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
3543 * inscription of an object. Alphabetical characters don't work as a
3546 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
3547 * and "x" is the "current" command_cmd code.
3549 static bool get_tag(int *cp, char tag, int mode)
3554 /* Extract index from mode */
3559 end = INVEN_TOTAL - 1;
3564 end = INVEN_PACK - 1;
3571 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
3573 /* Check every inventory object */
3574 for (i = start; i <= end; i++)
3576 object_type *o_ptr = &inventory[i];
3578 /* Skip non-objects */
3579 if (!o_ptr->k_idx) continue;
3581 /* Skip empty inscriptions */
3582 if (!o_ptr->inscription) continue;
3584 /* Skip non-choice */
3585 if (!item_tester_okay(o_ptr)) continue;
3588 s = my_strchr(quark_str(o_ptr->inscription), '@');
3590 /* Process all tags */
3593 /* Check the special tags */
3594 if ((s[1] == command_cmd) && (s[2] == tag))
3596 /* Save the actual inventory ID */
3603 /* Find another '@' */
3604 s = my_strchr(s + 1, '@');
3609 /**** Find a tag in the form of {@#} (allows only numerals) ***/
3611 /* Don't allow {@#} with '#' being alphabet */
3612 if (tag < '0' || '9' < tag)
3618 /* Check every object */
3619 for (i = start; i <= end; i++)
3621 object_type *o_ptr = &inventory[i];
3623 /* Skip non-objects */
3624 if (!o_ptr->k_idx) continue;
3626 /* Skip empty inscriptions */
3627 if (!o_ptr->inscription) continue;
3629 /* Skip non-choice */
3630 if (!item_tester_okay(o_ptr)) continue;
3633 s = my_strchr(quark_str(o_ptr->inscription), '@');
3635 /* Process all tags */
3638 /* Check the normal tags */
3641 /* Save the actual inventory ID */
3648 /* Find another '@' */
3649 s = my_strchr(s + 1, '@');
3659 * Find the "first" floor object with the given "tag".
3661 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
3662 * inscription of an object. Alphabetical characters don't work as a
3665 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
3666 * and "x" is the "current" command_cmd code.
3668 static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
3673 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
3675 /* Check every object in the grid */
3676 for (i = 0; i < floor_num && i < 23; i++)
3678 object_type *o_ptr = &o_list[floor_list[i]];
3680 /* Skip empty inscriptions */
3681 if (!o_ptr->inscription) continue;
3684 s = my_strchr(quark_str(o_ptr->inscription), '@');
3686 /* Process all tags */
3689 /* Check the special tags */
3690 if ((s[1] == command_cmd) && (s[2] == tag))
3692 /* Save the actual floor object ID */
3699 /* Find another '@' */
3700 s = my_strchr(s + 1, '@');
3705 /**** Find a tag in the form of {@#} (allows only numerals) ***/
3707 /* Don't allow {@#} with '#' being alphabet */
3708 if (tag < '0' || '9' < tag)
3714 /* Check every object in the grid */
3715 for (i = 0; i < floor_num && i < 23; i++)
3717 object_type *o_ptr = &o_list[floor_list[i]];
3719 /* Skip empty inscriptions */
3720 if (!o_ptr->inscription) continue;
3723 s = my_strchr(quark_str(o_ptr->inscription), '@');
3725 /* Process all tags */
3728 /* Check the normal tags */
3731 /* Save the floor object ID */
3738 /* Find another '@' */
3739 s = my_strchr(s + 1, '@');
3749 * Move around label characters with correspond tags
3751 static void prepare_label_string(char *label, int mode)
3753 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
3754 int offset = (mode == USE_EQUIP) ? INVEN_RARM : 0;
3757 /* Prepare normal labels */
3758 strcpy(label, alphabet_chars);
3760 /* Move each label */
3761 for (i = 0; i < 52; i++)
3764 char c = alphabet_chars[i];
3766 /* Find a tag with this label */
3767 if (get_tag(&index, c, mode))
3769 /* Delete the overwritten label */
3770 if (label[i] == c) label[i] = ' ';
3772 /* Move the label to the place of corresponding tag */
3773 label[index - offset] = c;
3780 * Move around label characters with correspond tags (floor version)
3782 static void prepare_label_string_floor(char *label, int floor_list[], int floor_num)
3784 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
3787 /* Prepare normal labels */
3788 strcpy(label, alphabet_chars);
3790 /* Move each label */
3791 for (i = 0; i < 52; i++)
3794 char c = alphabet_chars[i];
3796 /* Find a tag with this label */
3797 if (get_tag_floor(&index, c, floor_list, floor_num))
3799 /* Delete the overwritten label */
3800 if (label[i] == c) label[i] = ' ';
3802 /* Move the label to the place of corresponding tag */
3810 * Display the inventory.
3812 * Hack -- do not display "trailing" empty slots
3814 int show_inven(int target_item)
3816 int i, j, k, l, z = 0;
3817 int col, cur_col, len;
3819 char o_name[MAX_NLEN];
3823 char out_desc[23][MAX_NLEN];
3824 int target_item_label = 0;
3826 char inven_label[52 + 1];
3828 /* Starting column */
3832 Term_get_size(&wid, &hgt);
3834 /* Default "max-length" */
3835 len = wid - col - 1;
3838 /* Find the "final" slot */
3839 for (i = 0; i < INVEN_PACK; i++)
3841 o_ptr = &inventory[i];
3843 /* Skip non-objects */
3844 if (!o_ptr->k_idx) continue;
3850 prepare_label_string(inven_label, USE_INVEN);
3852 /* Display the inventory */
3853 for (k = 0, i = 0; i < z; i++)
3855 o_ptr = &inventory[i];
3857 /* Is this item acceptable? */
3858 if (!item_tester_okay(o_ptr)) continue;
3860 /* Describe the object */
3861 object_desc(o_name, o_ptr, 0);
3863 /* Save the object index, color, and description */
3865 out_color[k] = tval_to_attr[o_ptr->tval % 128];
3867 /* Grey out charging items */
3870 out_color[k] = TERM_L_DARK;
3873 (void)strcpy(out_desc[k], o_name);
3875 /* Find the predicted "line length" */
3876 l = strlen(out_desc[k]) + 5;
3878 /* Be sure to account for the weight */
3879 if (show_weights) l += 9;
3881 /* Account for icon if displayed */
3882 if (show_item_graph)
3885 if (use_bigtile) l++;
3888 /* Maintain the maximum length */
3889 if (l > len) len = l;
3891 /* Advance to next "line" */
3895 /* Find the column to start in */
3896 col = (len > wid - 4) ? 0 : (wid - len - 1);
3898 /* Output each entry */
3899 for (j = 0; j < k; j++)
3905 o_ptr = &inventory[i];
3907 /* Clear the line */
3908 prt("", j + 1, col ? col - 2 : col);
3910 if (use_menu && target_item)
3912 if (j == (target_item-1))
3915 strcpy(tmp_val, "¡Õ");
3917 strcpy(tmp_val, "> ");
3919 target_item_label = i;
3921 else strcpy(tmp_val, " ");
3923 else if (i <= INVEN_PACK)
3925 /* Prepare an index --(-- */
3926 sprintf(tmp_val, "%c)", inven_label[i]);
3930 /* Prepare an index --(-- */
3931 sprintf(tmp_val, "%c)", index_to_label(i));
3934 /* Clear the line with the (possibly indented) index */
3935 put_str(tmp_val, j + 1, col);
3939 /* Display graphics for object, if desired */
3940 if (show_item_graph)
3942 byte a = object_attr(o_ptr);
3943 char c = object_char(o_ptr);
3946 if (a & 0x80) a |= 0x40;
3949 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
3950 if (use_bigtile) cur_col++;
3956 /* Display the entry itself */
3957 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
3959 /* Display the weight if needed */
3962 int wgt = o_ptr->weight * o_ptr->number;
3964 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
3966 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3969 prt(tmp_val, j + 1, wid - 9);
3973 /* Make a "shadow" below the list (only if needed) */
3974 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
3976 /* Save the new column */
3979 return target_item_label;
3985 * Display the equipment.
3987 int show_equip(int target_item)
3990 int col, cur_col, len;
3993 char o_name[MAX_NLEN];
3996 char out_desc[23][MAX_NLEN];
3997 int target_item_label = 0;
3999 char equip_label[52 + 1];
4001 /* Starting column */
4005 Term_get_size(&wid, &hgt);
4007 /* Maximal length */
4008 len = wid - col - 1;
4011 /* Scan the equipment list */
4012 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
4014 o_ptr = &inventory[i];
4016 /* Is this item acceptable? */
4017 if (!(select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr)) &&
4018 (!((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute) ||
4019 item_tester_no_ryoute)) continue;
4022 object_desc(o_name, o_ptr, 0);
4024 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
4027 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
4029 (void)strcpy(out_desc[k],"(wielding with two-hands)");
4031 out_color[k] = TERM_WHITE;
4035 (void)strcpy(out_desc[k], o_name);
4036 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4040 /* Grey out charging items */
4043 out_color[k] = TERM_L_DARK;
4046 /* Extract the maximal length (see below) */
4048 l = strlen(out_desc[k]) + (2 + 1);
4050 l = strlen(out_desc[k]) + (2 + 3);
4054 /* Increase length for labels (if needed) */
4056 if (show_labels) l += (7 + 2);
4058 if (show_labels) l += (14 + 2);
4062 /* Increase length for weight (if needed) */
4063 if (show_weights) l += 9;
4065 if (show_item_graph) l += 2;
4067 /* Maintain the max-length */
4068 if (l > len) len = l;
4070 /* Advance the entry */
4074 /* Hack -- Find a column to start in */
4076 col = (len > wid - 6) ? 0 : (wid - len - 1);
4078 col = (len > wid - 4) ? 0 : (wid - len - 1);
4081 prepare_label_string(equip_label, USE_EQUIP);
4083 /* Output each entry */
4084 for (j = 0; j < k; j++)
4090 o_ptr = &inventory[i];
4092 /* Clear the line */
4093 prt("", j + 1, col ? col - 2 : col);
4095 if (use_menu && target_item)
4097 if (j == (target_item-1))
4100 strcpy(tmp_val, "¡Õ");
4102 strcpy(tmp_val, "> ");
4104 target_item_label = i;
4106 else strcpy(tmp_val, " ");
4108 else if (i >= INVEN_RARM)
4110 /* Prepare an index --(-- */
4111 sprintf(tmp_val, "%c)", equip_label[i - INVEN_RARM]);
4115 /* Prepare an index --(-- */
4116 sprintf(tmp_val, "%c)", index_to_label(i));
4119 /* Clear the line with the (possibly indented) index */
4120 put_str(tmp_val, j+1, col);
4124 /* Display graphics for object, if desired */
4125 if (show_item_graph)
4127 byte a = object_attr(o_ptr);
4128 char c = object_char(o_ptr);
4131 if (a & 0x80) a |= 0x40;
4134 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
4135 if (use_bigtile) cur_col++;
4143 /* Mention the use */
4145 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
4147 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
4150 put_str(tmp_val, j+1, cur_col);
4152 /* Display the entry itself */
4154 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
4156 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
4163 /* Display the entry itself */
4164 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
4167 /* Display the weight if needed */
4170 int wgt = o_ptr->weight * o_ptr->number;
4172 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4174 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
4177 prt(tmp_val, j + 1, wid - 9);
4181 /* Make a "shadow" below the list (only if needed) */
4182 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4184 /* Save the new column */
4187 return target_item_label;
4194 * Flip "inven" and "equip" in any sub-windows
4196 void toggle_inven_equip(void)
4201 for (j = 0; j < 8; j++)
4204 if (!angband_term[j]) continue;
4206 /* Flip inven to equip */
4207 if (window_flag[j] & (PW_INVEN))
4210 window_flag[j] &= ~(PW_INVEN);
4211 window_flag[j] |= (PW_EQUIP);
4214 p_ptr->window |= (PW_EQUIP);
4217 /* Flip inven to equip */
4218 else if (window_flag[j] & (PW_EQUIP))
4221 window_flag[j] &= ~(PW_EQUIP);
4222 window_flag[j] |= (PW_INVEN);
4225 p_ptr->window |= (PW_INVEN);
4233 * Verify the choice of an item.
4235 * The item can be negative to mean "item on floor".
4237 static bool verify(cptr prompt, int item)
4239 char o_name[MAX_NLEN];
4240 char out_val[MAX_NLEN+20];
4247 o_ptr = &inventory[item];
4253 o_ptr = &o_list[0 - item];
4257 object_desc(o_name, o_ptr, 0);
4261 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
4263 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
4268 return (get_check(out_val));
4273 * Hack -- allow user to "prevent" certain choices
4275 * The item can be negative to mean "item on floor".
4277 static bool get_item_allow(int item)
4283 if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
4288 o_ptr = &inventory[item];
4294 o_ptr = &o_list[0 - item];
4297 /* No inscription */
4298 if (!o_ptr->inscription) return (TRUE);
4301 s = my_strchr(quark_str(o_ptr->inscription), '!');
4303 /* Process preventions */
4306 /* Check the "restriction" */
4307 if ((s[1] == command_cmd) || (s[1] == '*'))
4309 /* Verify the choice */
4311 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
4313 if (!verify("Really try", item)) return (FALSE);
4318 /* Find another '!' */
4319 s = my_strchr(s + 1, '!');
4329 * Auxiliary function for "get_item()" -- test an index
4331 static bool get_item_okay(int i)
4334 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
4336 if (select_ring_slot) return is_ring_slot(i);
4338 /* Verify the item */
4339 if (!item_tester_okay(&inventory[i])) return (FALSE);
4348 * Determine whether get_item() can get some item or not
4349 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
4351 bool can_get_item(void)
4353 int j, floor_list[23], floor_num = 0;
4355 for (j = 0; j < INVEN_TOTAL; j++)
4356 if (item_tester_okay(&inventory[j]))
4359 floor_num = scan_floor(floor_list, py, px, 0x03);
4367 * Let the user select an item, save its "index"
4369 * Return TRUE only if an acceptable item was chosen by the user.
4371 * The selected item must satisfy the "item_tester_hook()" function,
4372 * if that hook is set, and the "item_tester_tval", if that value is set.
4374 * All "item_tester" restrictions are cleared before this function returns.
4376 * The user is allowed to choose acceptable items from the equipment,
4377 * inventory, or floor, respectively, if the proper flag was given,
4378 * and there are any acceptable items in that location.
4380 * The equipment or inventory are displayed (even if no acceptable
4381 * items are in that location) if the proper flag was given.
4383 * If there are no acceptable items available anywhere, and "str" is
4384 * not NULL, then it will be used as the text of a warning message
4385 * before the function returns.
4387 * Note that the user must press "-" to specify the item on the floor,
4388 * and there is no way to "examine" the item on the floor, while the
4389 * use of "capital" letters will "examine" an inventory/equipment item,
4390 * and prompt for its use.
4392 * If a legal item is selected from the inventory, we save it in "cp"
4393 * directly (0 to 35), and return TRUE.
4395 * If a legal item is selected from the floor, we save it in "cp" as
4396 * a negative (-1 to -511), and return TRUE.
4398 * If no item is available, we do nothing to "cp", and we display a
4399 * warning message, using "str" if available, and return FALSE.
4401 * If no item is selected, we do nothing to "cp", and return FALSE.
4403 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
4404 * to allow the user to enter a command while viewing those screens, and
4405 * also to induce "auto-enter" of stores, and other such stuff.
4407 * Global "p_ptr->command_see" may be set before calling this function to start
4408 * out in "browse" mode. It is cleared before this function returns.
4410 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
4411 * If it is TRUE then we are viewing inventory, else equipment.
4413 * We always erase the prompt when we are done, leaving a blank line,
4414 * or a warning message, if appropriate, if no items are available.
4416 bool get_item(int *cp, cptr pmt, cptr str, int mode)
4418 s16b this_o_idx, next_o_idx = 0;
4422 int j, k, i1, i2, e1, e2;
4432 bool allow_floor = FALSE;
4434 bool toggle = FALSE;
4440 extern bool select_the_force;
4442 int menu_line = (use_menu ? 1 : 0);
4448 static char prev_tag = '\0';
4449 char cur_tag = '\0';
4451 #endif /* ALLOW_REPEAT */
4453 #ifdef ALLOW_EASY_FLOOR /* TNB */
4455 if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
4457 #endif /* ALLOW_EASY_FLOOR -- TNB */
4460 if (mode & USE_EQUIP) equip = TRUE;
4461 if (mode & USE_INVEN) inven = TRUE;
4462 if (mode & USE_FLOOR) floor = TRUE;
4466 /* Get the item index */
4467 if (repeat_pull(cp))
4470 if (select_the_force && (*cp == INVEN_FORCE))
4472 item_tester_tval = 0;
4473 item_tester_hook = NULL;
4474 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4479 else if (floor && (*cp < 0))
4486 /* Acquire object */
4489 /* Validate the item */
4490 if (item_tester_okay(o_ptr))
4492 /* Forget restrictions */
4493 item_tester_tval = 0;
4494 item_tester_hook = NULL;
4495 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4502 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
4503 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
4505 if (prev_tag && command_cmd)
4507 /* Look up the tag and validate the item */
4508 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
4509 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
4510 else if (!get_item_okay(k)) /* Reject */;
4513 /* Accept that choice */
4516 /* Forget restrictions */
4517 item_tester_tval = 0;
4518 item_tester_hook = NULL;
4519 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4525 prev_tag = '\0'; /* prev_tag is no longer effective */
4528 /* Verify the item */
4529 else if (get_item_okay(*cp))
4531 /* Forget restrictions */
4532 item_tester_tval = 0;
4533 item_tester_hook = NULL;
4534 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4542 #endif /* ALLOW_REPEAT */
4545 /* Paranoia XXX XXX XXX */
4552 /* No item selected */
4556 /* Full inventory */
4558 i2 = INVEN_PACK - 1;
4560 /* Forbid inventory */
4561 if (!inven) i2 = -1;
4564 for (j = 0; j < INVEN_PACK; j++)
4565 if (item_tester_okay(&inventory[j])) max_inven++;
4568 /* Restrict inventory indexes */
4569 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
4570 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
4573 /* Full equipment */
4575 e2 = INVEN_TOTAL - 1;
4577 /* Forbid equipment */
4578 if (!equip) e2 = -1;
4581 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
4582 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
4583 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
4586 /* Restrict equipment indexes */
4587 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
4588 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
4590 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
4594 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
4596 else if (p_ptr->hidarite) e1 = INVEN_RARM;
4600 /* Restrict floor usage */
4603 /* Scan all objects in the grid */
4604 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
4608 /* Acquire object */
4609 o_ptr = &o_list[this_o_idx];
4611 /* Acquire next object */
4612 next_o_idx = o_ptr->next_o_idx;
4614 /* Accept the item on the floor if legal */
4615 if (item_tester_okay(o_ptr) && (o_ptr->marked & OM_FOUND)) allow_floor = TRUE;
4619 /* Require at least one legal choice */
4620 if (!allow_floor && (i1 > i2) && (e1 > e2))
4622 /* Cancel p_ptr->command_see */
4623 command_see = FALSE;
4631 if (select_the_force) {
4637 /* Analyze choices */
4640 /* Hack -- Start on equipment if requested */
4641 if (command_see && command_wrk && equip)
4646 /* Use inventory if allowed */
4649 command_wrk = FALSE;
4652 /* Use equipment if allowed */
4658 /* Use inventory for floor */
4661 command_wrk = FALSE;
4667 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
4669 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
4671 /* Hack -- start out in "display" mode */
4679 /* Repeat until done */
4682 int get_item_label = 0;
4689 for (j = 0; j < 8; j++)
4692 if (!angband_term[j]) continue;
4694 /* Count windows displaying inven */
4695 if (window_flag[j] & (PW_INVEN)) ni++;
4697 /* Count windows displaying equip */
4698 if (window_flag[j] & (PW_EQUIP)) ne++;
4701 /* Toggle if needed */
4702 if ((command_wrk && ni && !ne) ||
4703 (!command_wrk && !ni && ne))
4706 toggle_inven_equip();
4713 p_ptr->window |= (PW_INVEN | PW_EQUIP);
4715 /* Redraw windows */
4719 /* Inventory screen */
4722 /* Redraw if needed */
4723 if (command_see) get_item_label = show_inven(menu_line);
4726 /* Equipment screen */
4729 /* Redraw if needed */
4730 if (command_see) get_item_label = show_equip(menu_line);
4733 /* Viewing inventory */
4736 /* Begin the prompt */
4738 sprintf(out_val, "»ý¤Áʪ:");
4740 sprintf(out_val, "Inven:");
4743 /* Some legal items */
4744 if ((i1 <= i2) && !use_menu)
4746 /* Build the prompt */
4748 sprintf(tmp_val, "%c-%c,'(',')',",
4750 sprintf(tmp_val, " %c-%c,'(',')',",
4752 index_to_label(i1), index_to_label(i2));
4755 strcat(out_val, tmp_val);
4758 /* Indicate ability to "view" */
4760 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
4762 if (!command_see && !use_menu) strcat(out_val, " * to see,");
4767 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
4769 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
4773 /* Viewing equipment */
4776 /* Begin the prompt */
4778 sprintf(out_val, "ÁõÈ÷ÉÊ:");
4780 sprintf(out_val, "Equip:");
4783 /* Some legal items */
4784 if ((e1 <= e2) && !use_menu)
4786 /* Build the prompt */
4788 sprintf(tmp_val, "%c-%c,'(',')',",
4790 sprintf(tmp_val, " %c-%c,'(',')',",
4792 index_to_label(e1), index_to_label(e2));
4795 strcat(out_val, tmp_val);
4798 /* Indicate ability to "view" */
4800 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
4802 if (!command_see) strcat(out_val, " * to see,");
4807 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
4809 if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
4813 /* Indicate legality of the "floor" item */
4815 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
4816 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
4818 if (allow_floor) strcat(out_val, " - for floor,");
4819 if (select_the_force) strcat(out_val, " w for the Force,");
4822 /* Finish the prompt */
4823 strcat(out_val, " ESC");
4825 /* Build the prompt */
4826 sprintf(tmp_val, "(%s) %s", out_val, pmt);
4828 /* Show the prompt */
4836 int max_line = (command_wrk ? max_equip : max_inven);
4852 menu_line += (max_line - 1);
4871 /* Verify legality */
4872 if (!inven || !equip)
4878 /* Hack -- Fix screen */
4888 /* Switch inven/equip */
4889 command_wrk = !command_wrk;
4890 max_line = (command_wrk ? max_equip : max_inven);
4891 if (menu_line > max_line) menu_line = max_line;
4893 /* Need to redraw */
4902 if (command_wrk == USE_FLOOR)
4905 (*cp) = -get_item_label;
4909 /* Validate the item */
4910 if (!get_item_okay(get_item_label))
4916 /* Allow player to "refuse" certain actions */
4917 if (!get_item_allow(get_item_label))
4923 /* Accept that choice */
4924 (*cp) = get_item_label;
4933 if (select_the_force) {
4941 if (menu_line > max_line) menu_line -= max_line;
4962 command_see = FALSE;
4982 /* Verify legality */
4983 if (!inven || !equip)
4989 /* Hack -- Fix screen */
4999 /* Switch inven/equip */
5000 command_wrk = !command_wrk;
5002 /* Need to redraw */
5008 /* Use floor item */
5011 /* Scan all objects in the grid */
5012 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5016 /* Acquire object */
5017 o_ptr = &o_list[this_o_idx];
5019 /* Acquire next object */
5020 next_o_idx = o_ptr->next_o_idx;
5022 /* Validate the item */
5023 if (!item_tester_okay(o_ptr)) continue;
5028 /* Verify the item (if required) */
5030 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
5032 if (other_query_flag && !verify("Try", k)) continue;
5036 /* Allow player to "refuse" certain actions */
5037 if (!get_item_allow(k)) continue;
5039 /* Accept that choice */
5056 case '1': case '2': case '3':
5057 case '4': case '5': case '6':
5058 case '7': case '8': case '9':
5060 /* Look up the tag */
5061 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
5067 /* Hack -- Validate the item */
5068 if ((k < INVEN_RARM) ? !inven : !equip)
5074 /* Validate the item */
5075 if (!get_item_okay(k))
5081 /* Allow player to "refuse" certain actions */
5082 if (!get_item_allow(k))
5088 /* Accept that choice */
5094 #endif /* ALLOW_REPEAT */
5102 /* Choose "default" inventory item */
5105 k = ((i1 == i2) ? i1 : -1);
5108 /* Choose "default" equipment item */
5111 k = ((e1 == e2) ? e1 : -1);
5114 /* Validate the item */
5115 if (!get_item_okay(k))
5121 /* Allow player to "refuse" certain actions */
5122 if (!get_item_allow(k))
5128 /* Accept that choice */
5138 if (select_the_force) {
5151 bool not_found = FALSE;
5153 /* Look up the alphabetical tag */
5154 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
5159 /* Hack -- Validate the item */
5160 else if ((k < INVEN_RARM) ? !inven : !equip)
5165 /* Validate the item */
5166 else if (!get_item_okay(k))
5173 /* Accept that choice */
5179 #endif /* ALLOW_REPEAT */
5183 /* Extract "query" setting */
5184 ver = isupper(which);
5185 which = tolower(which);
5187 /* Convert letter to inventory index */
5190 if (which == '(') k = i1;
5191 else if (which == ')') k = i2;
5192 else k = label_to_inven(which);
5195 /* Convert letter to equipment index */
5198 if (which == '(') k = e1;
5199 else if (which == ')') k = e2;
5200 else k = label_to_equip(which);
5203 /* Validate the item */
5204 if (!get_item_okay(k))
5210 /* Verify the item */
5212 if (ver && !verify("ËÜÅö¤Ë", k))
5214 if (ver && !verify("Try", k))
5222 /* Allow player to "refuse" certain actions */
5223 if (!get_item_allow(k))
5229 /* Accept that choice */
5240 /* Fix the screen if necessary */
5246 /* Hack -- Cancel "display" */
5247 command_see = FALSE;
5251 /* Forget the item_tester_tval restriction */
5252 item_tester_tval = 0;
5254 item_tester_no_ryoute = FALSE;
5256 /* Forget the item_tester_hook restriction */
5257 item_tester_hook = NULL;
5260 /* Clean up 'show choices' */
5261 /* Toggle again if needed */
5262 if (toggle) toggle_inven_equip();
5265 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5271 /* Clear the prompt line */
5274 /* Warning if needed */
5275 if (oops && str) msg_print(str);
5281 if (command_cmd) prev_tag = cur_tag;
5282 #endif /* ALLOW_REPEAT */
5284 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5292 #ifdef ALLOW_EASY_FLOOR
5297 * Return a list of o_list[] indexes of items at the given cave
5298 * location. Valid flags are:
5300 * mode & 0x01 -- Item tester
5301 * mode & 0x02 -- Marked items only
5302 * mode & 0x04 -- Stop after first
5304 int scan_floor(int *items, int y, int x, int mode)
5306 int this_o_idx, next_o_idx;
5311 if (!in_bounds(y, x)) return 0;
5313 /* Scan all objects in the grid */
5314 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
5318 /* Acquire object */
5319 o_ptr = &o_list[this_o_idx];
5321 /* Acquire next object */
5322 next_o_idx = o_ptr->next_o_idx;
5325 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
5328 if ((mode & 0x02) && !(o_ptr->marked & OM_FOUND)) continue;
5330 /* Accept this item */
5331 /* XXX Hack -- Enforce limit */
5333 items[num] = this_o_idx;
5338 if (mode & 0x04) break;
5347 * Display a list of the items on the floor at the given location.
5349 int show_floor(int target_item, int y, int x, int *min_width)
5356 char o_name[MAX_NLEN];
5362 char out_desc[23][MAX_NLEN];
5363 int target_item_label = 0;
5365 int floor_list[23], floor_num;
5367 char floor_label[52 + 1];
5369 bool dont_need_to_show_weights = TRUE;
5372 Term_get_size(&wid, &hgt);
5374 /* Default length */
5375 len = MAX((*min_width), 20);
5378 /* Scan for objects in the grid, using item_tester_okay() */
5379 floor_num = scan_floor(floor_list, y, x, 0x03);
5381 /* Display the floor objects */
5382 for (k = 0, i = 0; i < floor_num && i < 23; i++)
5384 o_ptr = &o_list[floor_list[i]];
5386 /* Describe the object */
5387 object_desc(o_name, o_ptr, 0);
5389 /* Save the index */
5392 /* Acquire inventory color */
5393 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
5395 /* Save the object description */
5396 strcpy(out_desc[k], o_name);
5398 /* Find the predicted "line length" */
5399 l = strlen(out_desc[k]) + 5;
5401 /* Be sure to account for the weight */
5402 if (show_weights) l += 9;
5404 if (o_ptr->tval != TV_GOLD) dont_need_to_show_weights = FALSE;
5406 /* Maintain the maximum length */
5407 if (l > len) len = l;
5409 /* Advance to next "line" */
5413 if (show_weights && dont_need_to_show_weights) len -= 9;
5418 /* Find the column to start in */
5419 col = (len > wid - 4) ? 0 : (wid - len - 1);
5421 prepare_label_string_floor(floor_label, floor_list, floor_num);
5423 /* Output each entry */
5424 for (j = 0; j < k; j++)
5427 i = floor_list[out_index[j]];
5432 /* Clear the line */
5433 prt("", j + 1, col ? col - 2 : col);
5435 if (use_menu && target_item)
5437 if (j == (target_item-1))
5440 strcpy(tmp_val, "¡Õ");
5442 strcpy(tmp_val, "> ");
5444 target_item_label = i;
5446 else strcpy(tmp_val, " ");
5450 /* Prepare an index --(-- */
5451 sprintf(tmp_val, "%c)", floor_label[j]);
5454 /* Clear the line with the (possibly indented) index */
5455 put_str(tmp_val, j + 1, col);
5457 /* Display the entry itself */
5458 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
5460 /* Display the weight if needed */
5461 if (show_weights && (o_ptr->tval != TV_GOLD))
5463 int wgt = o_ptr->weight * o_ptr->number;
5465 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5467 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
5470 prt(tmp_val, j + 1, wid - 9);
5474 /* Make a "shadow" below the list (only if needed) */
5475 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5477 return target_item_label;
5481 * This version of get_item() is called by get_item() when
5482 * the easy_floor is on.
5484 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
5486 char n1 = ' ', n2 = ' ', which = ' ';
5488 int j, k, i1, i2, e1, e2;
5495 bool equip = (mode & USE_EQUIP) ? TRUE : FALSE;
5496 bool inven = (mode & USE_INVEN) ? TRUE : FALSE;
5497 bool floor = (mode & USE_FLOOR) ? TRUE : FALSE;
5499 bool allow_equip = FALSE;
5500 bool allow_inven = FALSE;
5501 bool allow_floor = FALSE;
5503 bool toggle = FALSE;
5508 int floor_num, floor_list[23], floor_top = 0;
5511 extern bool select_the_force;
5513 int menu_line = (use_menu ? 1 : 0);
5519 static char prev_tag = '\0';
5520 char cur_tag = '\0';
5522 /* Get the item index */
5523 if (repeat_pull(cp))
5526 if (select_the_force && (*cp == INVEN_FORCE))
5528 item_tester_tval = 0;
5529 item_tester_hook = NULL;
5530 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5535 else if (floor && (*cp < 0))
5537 if (prev_tag && command_cmd)
5539 /* Scan all objects in the grid */
5540 floor_num = scan_floor(floor_list, py, px, 0x03);
5542 /* Look up the tag */
5543 if (get_tag_floor(&k, prev_tag, floor_list, floor_num))
5545 /* Accept that choice */
5546 (*cp) = 0 - floor_list[k];
5548 /* Forget restrictions */
5549 item_tester_tval = 0;
5550 item_tester_hook = NULL;
5551 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5557 prev_tag = '\0'; /* prev_tag is no longer effective */
5560 /* Validate the item */
5561 else if (item_tester_okay(&o_list[0 - (*cp)]))
5563 /* Forget restrictions */
5564 item_tester_tval = 0;
5565 item_tester_hook = NULL;
5566 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5573 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
5574 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
5576 if (prev_tag && command_cmd)
5578 /* Look up the tag and validate the item */
5579 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
5580 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
5581 else if (!get_item_okay(k)) /* Reject */;
5584 /* Accept that choice */
5587 /* Forget restrictions */
5588 item_tester_tval = 0;
5589 item_tester_hook = NULL;
5590 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5596 prev_tag = '\0'; /* prev_tag is no longer effective */
5599 /* Verify the item */
5600 else if (get_item_okay(*cp))
5602 /* Forget restrictions */
5603 item_tester_tval = 0;
5604 item_tester_hook = NULL;
5605 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5613 #endif /* ALLOW_REPEAT */
5616 /* Paranoia XXX XXX XXX */
5623 /* No item selected */
5627 /* Full inventory */
5629 i2 = INVEN_PACK - 1;
5631 /* Forbid inventory */
5632 if (!inven) i2 = -1;
5635 for (j = 0; j < INVEN_PACK; j++)
5636 if (item_tester_okay(&inventory[j])) max_inven++;
5639 /* Restrict inventory indexes */
5640 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5641 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5644 /* Full equipment */
5646 e2 = INVEN_TOTAL - 1;
5648 /* Forbid equipment */
5649 if (!equip) e2 = -1;
5652 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5653 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
5654 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5657 /* Restrict equipment indexes */
5658 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5659 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5661 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
5665 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
5667 else if (p_ptr->hidarite) e1 = INVEN_RARM;
5671 /* Count "okay" floor items */
5674 /* Restrict floor usage */
5677 /* Scan all objects in the grid */
5678 floor_num = scan_floor(floor_list, py, px, 0x03);
5681 /* Accept inventory */
5682 if (i1 <= i2) allow_inven = TRUE;
5684 /* Accept equipment */
5685 if (e1 <= e2) allow_equip = TRUE;
5688 if (floor_num) allow_floor = TRUE;
5690 /* Require at least one legal choice */
5691 if (!allow_inven && !allow_equip && !allow_floor)
5693 /* Cancel p_ptr->command_see */
5694 command_see = FALSE;
5702 if (select_the_force) {
5708 /* Analyze choices */
5711 /* Hack -- Start on equipment if requested */
5712 if (command_see && (command_wrk == (USE_EQUIP))
5715 command_wrk = (USE_EQUIP);
5718 /* Use inventory if allowed */
5719 else if (allow_inven)
5721 command_wrk = (USE_INVEN);
5724 /* Use equipment if allowed */
5725 else if (allow_equip)
5727 command_wrk = (USE_EQUIP);
5730 /* Use floor if allowed */
5731 else if (allow_floor)
5733 command_wrk = (USE_FLOOR);
5738 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5740 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5742 /* Hack -- start out in "display" mode */
5749 /* Repeat until done */
5752 int get_item_label = 0;
5759 for (j = 0; j < 8; j++)
5762 if (!angband_term[j]) continue;
5764 /* Count windows displaying inven */
5765 if (window_flag[j] & (PW_INVEN)) ni++;
5767 /* Count windows displaying equip */
5768 if (window_flag[j] & (PW_EQUIP)) ne++;
5771 /* Toggle if needed */
5772 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
5773 (command_wrk == (USE_INVEN) && !ni && ne))
5776 toggle_inven_equip();
5783 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5785 /* Redraw windows */
5788 /* Inventory screen */
5789 if (command_wrk == (USE_INVEN))
5791 /* Extract the legal requests */
5795 /* Redraw if needed */
5796 if (command_see) get_item_label = show_inven(menu_line);
5799 /* Equipment screen */
5800 else if (command_wrk == (USE_EQUIP))
5802 /* Extract the legal requests */
5803 n1 = I2A(e1 - INVEN_RARM);
5804 n2 = I2A(e2 - INVEN_RARM);
5806 /* Redraw if needed */
5807 if (command_see) get_item_label = show_equip(menu_line);
5811 else if (command_wrk == (USE_FLOOR))
5814 k = MIN(floor_top + 23, floor_num) - 1;
5816 /* Extract the legal requests */
5817 n1 = I2A(j - floor_top);
5818 n2 = I2A(k - floor_top);
5820 /* Redraw if needed */
5821 if (command_see) get_item_label = show_floor(menu_line, py, px, &min_width);
5824 /* Viewing inventory */
5825 if (command_wrk == (USE_INVEN))
5827 /* Begin the prompt */
5829 sprintf(out_val, "»ý¤Áʪ:");
5831 sprintf(out_val, "Inven:");
5836 /* Build the prompt */
5838 sprintf(tmp_val, "%c-%c,'(',')',",
5840 sprintf(tmp_val, " %c-%c,'(',')',",
5842 index_to_label(i1), index_to_label(i2));
5845 strcat(out_val, tmp_val);
5848 /* Indicate ability to "view" */
5850 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5852 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5860 strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
5861 else if (allow_floor)
5862 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
5864 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
5867 strcat(out_val, " / for Equip,");
5868 else if (allow_floor)
5869 strcat(out_val, " 6 for Equip,");
5871 strcat(out_val, " 4 or 6 for Equip,");
5880 strcat(out_val, " '-'¾²¾å,");
5881 else if (allow_equip)
5882 strcat(out_val, " '4' ¾²¾å,");
5884 strcat(out_val, " '4'or'6' ¾²¾å,");
5887 strcat(out_val, " - for floor,");
5888 else if (allow_equip)
5889 strcat(out_val, " 4 for floor,");
5891 strcat(out_val, " 4 or 6 for floor,");
5896 /* Viewing equipment */
5897 else if (command_wrk == (USE_EQUIP))
5899 /* Begin the prompt */
5901 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5903 sprintf(out_val, "Equip:");
5908 /* Build the prompt */
5910 sprintf(tmp_val, "%c-%c,'(',')',",
5912 sprintf(tmp_val, " %c-%c,'(',')',",
5914 index_to_label(e1), index_to_label(e2));
5917 strcat(out_val, tmp_val);
5920 /* Indicate ability to "view" */
5922 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5924 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5932 strcat(out_val, " '/' »ý¤Áʪ,");
5933 else if (allow_floor)
5934 strcat(out_val, " '4' »ý¤Áʪ,");
5936 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
5939 strcat(out_val, " / for Inven,");
5940 else if (allow_floor)
5941 strcat(out_val, " 4 for Inven,");
5943 strcat(out_val, " 4 or 6 for Inven,");
5952 strcat(out_val, " '-'¾²¾å,");
5953 else if (allow_inven)
5954 strcat(out_val, " '6' ¾²¾å,");
5956 strcat(out_val, " '4'or'6' ¾²¾å,");
5959 strcat(out_val, " - for floor,");
5960 else if (allow_inven)
5961 strcat(out_val, " 6 for floor,");
5963 strcat(out_val, " 4 or 6 for floor,");
5969 else if (command_wrk == (USE_FLOOR))
5971 /* Begin the prompt */
5973 sprintf(out_val, "¾²¾å:");
5975 sprintf(out_val, "Floor:");
5980 /* Build the prompt */
5982 sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
5984 sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
5988 strcat(out_val, tmp_val);
5991 /* Indicate ability to "view" */
5993 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5995 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6000 if (allow_inven && allow_equip)
6003 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
6005 strcat(out_val, " 4 for Equip, 6 for Inven,");
6008 else if (allow_inven)
6011 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6013 strcat(out_val, " 4 or 6 for Inven,");
6016 else if (allow_equip)
6019 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6021 strcat(out_val, " 4 or 6 for Equip,");
6026 else if (allow_inven)
6029 strcat(out_val, " '/' »ý¤Áʪ,");
6031 strcat(out_val, " / for Inven,");
6034 else if (allow_equip)
6037 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6039 strcat(out_val, " / for Equip,");
6044 if (command_see && !use_menu)
6047 strcat(out_val, " Enter ¼¡,");
6049 strcat(out_val, " Enter for scroll down,");
6056 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
6058 if (select_the_force) strcat(out_val, " w for the Force,");
6061 /* Finish the prompt */
6062 strcat(out_val, " ESC");
6064 /* Build the prompt */
6065 sprintf(tmp_val, "(%s) %s", out_val, pmt);
6067 /* Show the prompt */
6076 if (command_wrk == USE_INVEN) max_line = max_inven;
6077 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6078 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6094 menu_line += (max_line - 1);
6110 /* Verify legality */
6111 if (command_wrk == (USE_INVEN))
6113 if (allow_floor) command_wrk = USE_FLOOR;
6114 else if (allow_equip) command_wrk = USE_EQUIP;
6121 else if (command_wrk == (USE_EQUIP))
6123 if (allow_inven) command_wrk = USE_INVEN;
6124 else if (allow_floor) command_wrk = USE_FLOOR;
6131 else if (command_wrk == (USE_FLOOR))
6133 if (allow_equip) command_wrk = USE_EQUIP;
6134 else if (allow_inven) command_wrk = USE_INVEN;
6147 /* Hack -- Fix screen */
6157 /* Switch inven/equip */
6158 if (command_wrk == USE_INVEN) max_line = max_inven;
6159 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6160 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6161 if (menu_line > max_line) menu_line = max_line;
6163 /* Need to redraw */
6171 /* Verify legality */
6172 if (command_wrk == (USE_INVEN))
6174 if (allow_equip) command_wrk = USE_EQUIP;
6175 else if (allow_floor) command_wrk = USE_FLOOR;
6182 else if (command_wrk == (USE_EQUIP))
6184 if (allow_floor) command_wrk = USE_FLOOR;
6185 else if (allow_inven) command_wrk = USE_INVEN;
6192 else if (command_wrk == (USE_FLOOR))
6194 if (allow_inven) command_wrk = USE_INVEN;
6195 else if (allow_equip) command_wrk = USE_EQUIP;
6208 /* Hack -- Fix screen */
6218 /* Switch inven/equip */
6219 if (command_wrk == USE_INVEN) max_line = max_inven;
6220 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6221 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6222 if (menu_line > max_line) menu_line = max_line;
6224 /* Need to redraw */
6233 if (command_wrk == USE_FLOOR)
6236 (*cp) = -get_item_label;
6240 /* Validate the item */
6241 if (!get_item_okay(get_item_label))
6247 /* Allow player to "refuse" certain actions */
6248 if (!get_item_allow(get_item_label))
6254 /* Accept that choice */
6255 (*cp) = get_item_label;
6264 if (select_the_force) {
6272 if (menu_line > max_line) menu_line -= max_line;
6293 command_see = FALSE;
6316 cave_type *c_ptr = &cave[py][px];
6318 if (command_wrk != (USE_FLOOR)) break;
6320 /* Get the object being moved. */
6321 o_idx = c_ptr->o_idx;
6323 /* Only rotate a pile of two or more objects. */
6324 if (!(o_idx && o_list[o_idx].next_o_idx)) break;
6326 /* Remove the first object from the list. */
6327 excise_object_idx(o_idx);
6329 /* Find end of the list. */
6331 while (o_list[i].next_o_idx)
6332 i = o_list[i].next_o_idx;
6334 /* Add after the last object. */
6335 o_list[i].next_o_idx = o_idx;
6337 /* Re-scan floor list */
6338 floor_num = scan_floor(floor_list, py, px, 0x03);
6340 /* Hack -- Fix screen */
6355 if (command_wrk == (USE_INVEN))
6362 command_wrk = (USE_EQUIP);
6364 else if (command_wrk == (USE_EQUIP))
6371 command_wrk = (USE_INVEN);
6373 else if (command_wrk == (USE_FLOOR))
6377 command_wrk = (USE_INVEN);
6379 else if (allow_equip)
6381 command_wrk = (USE_EQUIP);
6390 /* Hack -- Fix screen */
6400 /* Need to redraw */
6413 * If we are already examining the floor, and there
6414 * is only one item, we will always select it.
6415 * If we aren't examining the floor and there is only
6416 * one item, we will select it if floor_query_flag
6421 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
6424 k = 0 - floor_list[0];
6426 /* Allow player to "refuse" certain actions */
6427 if (!get_item_allow(k))
6433 /* Accept that choice */
6442 /* Hack -- Fix screen */
6452 command_wrk = (USE_FLOOR);
6458 case '1': case '2': case '3':
6459 case '4': case '5': case '6':
6460 case '7': case '8': case '9':
6462 if (command_wrk != USE_FLOOR)
6464 /* Look up the tag */
6465 if (!get_tag(&k, which, command_wrk))
6471 /* Hack -- Validate the item */
6472 if ((k < INVEN_RARM) ? !inven : !equip)
6478 /* Validate the item */
6479 if (!get_item_okay(k))
6487 /* Look up the alphabetical tag */
6488 if (get_tag_floor(&k, which, floor_list, floor_num))
6491 k = 0 - floor_list[k];
6500 /* Allow player to "refuse" certain actions */
6501 if (!get_item_allow(k))
6507 /* Accept that choice */
6513 #endif /* ALLOW_REPEAT */
6521 /* Choose "default" inventory item */
6522 if (command_wrk == (USE_INVEN))
6524 k = ((i1 == i2) ? i1 : -1);
6527 /* Choose "default" equipment item */
6528 else if (command_wrk == (USE_EQUIP))
6530 k = ((e1 == e2) ? e1 : -1);
6533 /* Choose "default" floor item */
6534 else if (command_wrk == (USE_FLOOR))
6539 k = 0 - floor_list[0];
6541 /* Allow player to "refuse" certain actions */
6542 if (!get_item_allow(k))
6548 /* Accept that choice */
6556 /* Validate the item */
6557 if (!get_item_okay(k))
6563 /* Allow player to "refuse" certain actions */
6564 if (!get_item_allow(k))
6570 /* Accept that choice */
6580 if (select_the_force) {
6594 if (command_wrk != USE_FLOOR)
6596 bool not_found = FALSE;
6598 /* Look up the alphabetical tag */
6599 if (!get_tag(&k, which, command_wrk))
6604 /* Hack -- Validate the item */
6605 else if ((k < INVEN_RARM) ? !inven : !equip)
6610 /* Validate the item */
6611 else if (!get_item_okay(k))
6618 /* Accept that choice */
6624 #endif /* ALLOW_REPEAT */
6630 /* Look up the alphabetical tag */
6631 if (get_tag_floor(&k, which, floor_list, floor_num))
6634 k = 0 - floor_list[k];
6636 /* Accept that choice */
6642 #endif /* ALLOW_REPEAT */
6647 /* Extract "query" setting */
6648 ver = isupper(which);
6649 which = tolower(which);
6651 /* Convert letter to inventory index */
6652 if (command_wrk == (USE_INVEN))
6654 if (which == '(') k = i1;
6655 else if (which == ')') k = i2;
6656 else k = label_to_inven(which);
6659 /* Convert letter to equipment index */
6660 else if (command_wrk == (USE_EQUIP))
6662 if (which == '(') k = e1;
6663 else if (which == ')') k = e2;
6664 else k = label_to_equip(which);
6667 /* Convert letter to floor index */
6668 else if (command_wrk == USE_FLOOR)
6670 if (which == '(') k = 0;
6671 else if (which == ')') k = floor_num - 1;
6672 else k = islower(which) ? A2I(which) : -1;
6673 if (k < 0 || k >= floor_num || k >= 23)
6680 k = 0 - floor_list[k];
6683 /* Validate the item */
6684 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
6690 /* Verify the item */
6692 if (ver && !verify("ËÜÅö¤Ë", k))
6694 if (ver && !verify("Try", k))
6702 /* Allow player to "refuse" certain actions */
6703 if (!get_item_allow(k))
6709 /* Accept that choice */
6719 /* Fix the screen if necessary */
6725 /* Hack -- Cancel "display" */
6726 command_see = FALSE;
6730 /* Forget the item_tester_tval restriction */
6731 item_tester_tval = 0;
6733 /* Forget the item_tester_hook restriction */
6734 item_tester_hook = NULL;
6737 /* Clean up 'show choices' */
6738 /* Toggle again if needed */
6739 if (toggle) toggle_inven_equip();
6742 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6748 /* Clear the prompt line */
6751 /* Warning if needed */
6752 if (oops && str) msg_print(str);
6758 if (command_cmd) prev_tag = cur_tag;
6759 #endif /* ALLOW_REPEAT */
6761 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6769 static bool py_pickup_floor_aux(void)
6777 /* Restrict the choices */
6778 item_tester_hook = inven_carry_okay;
6782 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
6783 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
6785 q = "Get which item? ";
6786 s = "You no longer have any room for the objects on the floor.";
6789 if (get_item(&item, q, s, (USE_FLOOR)))
6791 this_o_idx = 0 - item;
6798 /* Pick up the object */
6799 py_pickup_aux(this_o_idx);
6806 * Make the player carry everything in a grid
6808 * If "pickup" is FALSE then only gold will be picked up
6810 * This is called by py_pickup() when easy_floor is TRUE.
6812 void py_pickup_floor(bool pickup)
6814 s16b this_o_idx, next_o_idx = 0;
6816 char o_name[MAX_NLEN];
6819 int floor_num = 0, floor_list[23], floor_o_idx = 0;
6823 /* Scan the pile of objects */
6824 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
6828 /* Access the object */
6829 o_ptr = &o_list[this_o_idx];
6831 /* Describe the object */
6832 object_desc(o_name, o_ptr, 0);
6834 /* Access the next object */
6835 next_o_idx = o_ptr->next_o_idx;
6837 /* Hack -- disturb */
6841 if (o_ptr->tval == TV_GOLD)
6845 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
6846 (long)o_ptr->pval, o_name);
6848 msg_format("You have found %ld gold pieces worth of %s.",
6849 (long) o_ptr->pval, o_name);
6853 /* Collect the gold */
6854 p_ptr->au += o_ptr->pval;
6857 p_ptr->redraw |= (PR_GOLD);
6860 p_ptr->window |= (PW_PLAYER);
6862 /* Delete the gold */
6863 delete_object_idx(this_o_idx);
6865 /* Check the next object */
6868 else if (o_ptr->marked & OM_NOMSG)
6870 /* If 0 or 1 non-NOMSG items are in the pile, the NOMSG ones are
6871 * ignored. Otherwise, they are included in the prompt. */
6872 o_ptr->marked &= ~(OM_NOMSG);
6876 /* Count non-gold objects that can be picked up. */
6877 if (inven_carry_okay(o_ptr))
6882 /* Remember this object index */
6884 floor_list[floor_num] = this_o_idx;
6886 /* Count non-gold objects */
6889 /* Remember this index */
6890 floor_o_idx = this_o_idx;
6893 /* There are no non-gold objects */
6897 /* Mention the number of objects */
6903 /* Access the object */
6904 o_ptr = &o_list[floor_o_idx];
6906 #ifdef ALLOW_EASY_SENSE
6908 /* Option: Make object sensing easy */
6911 /* Sense the object */
6912 (void) sense_object(o_ptr);
6915 #endif /* ALLOW_EASY_SENSE */
6917 /* Describe the object */
6918 object_desc(o_name, o_ptr, 0);
6922 msg_format("%s¤¬¤¢¤ë¡£", o_name);
6924 msg_format("You see %s.", o_name);
6929 /* Multiple objects */
6934 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
6936 msg_format("You see a pile of %d items.", floor_num);
6945 /* The player has no room for anything on the floor. */
6951 /* Access the object */
6952 o_ptr = &o_list[floor_o_idx];
6954 #ifdef ALLOW_EASY_SENSE
6956 /* Option: Make object sensing easy */
6959 /* Sense the object */
6960 (void) sense_object(o_ptr);
6963 #endif /* ALLOW_EASY_SENSE */
6965 /* Describe the object */
6966 object_desc(o_name, o_ptr, 0);
6970 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
6972 msg_format("You have no room for %s.", o_name);
6977 /* Multiple objects */
6982 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
6984 msg_print("You have no room for any of the objects on the floor.");
6996 /* Hack -- query every object */
6997 if (carry_query_flag)
6999 char out_val[MAX_NLEN+20];
7001 /* Access the object */
7002 o_ptr = &o_list[floor_o_idx];
7004 #ifdef ALLOW_EASY_SENSE
7006 /* Option: Make object sensing easy */
7009 /* Sense the object */
7010 (void) sense_object(o_ptr);
7013 #endif /* ALLOW_EASY_SENSE */
7015 /* Describe the object */
7016 object_desc(o_name, o_ptr, 0);
7018 /* Build a prompt */
7020 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7022 (void) sprintf(out_val, "Pick up %s? ", o_name);
7026 /* Ask the user to confirm */
7027 if (!get_check(out_val))
7034 /* Access the object */
7035 o_ptr = &o_list[floor_o_idx];
7037 #ifdef ALLOW_EASY_SENSE
7039 /* Option: Make object sensing easy */
7042 /* Sense the object */
7043 (void) sense_object(o_ptr);
7046 #endif /* ALLOW_EASY_SENSE */
7048 /* Pick up the object */
7049 py_pickup_aux(floor_o_idx);
7052 /* Allow the user to choose an object */
7055 while (can_pickup--)
7057 if (!py_pickup_floor_aux()) break;
7062 #endif /* ALLOW_EASY_FLOOR */