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 /* Give priority to weaponsmith's essential activations */
359 if (object_is_smith(o_ptr))
361 switch (o_ptr->xtra3 - 1)
363 case ESSENCE_TMP_RES_ACID:
365 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
367 return "resist acid every 50+d50 turns";
369 case ESSENCE_TMP_RES_ELEC:
371 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
373 return "resist elec every 50+d50 turns";
375 case ESSENCE_TMP_RES_FIRE:
377 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
379 return "resist fire every 50+d50 turns";
381 case ESSENCE_TMP_RES_COLD:
383 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
385 return "resist cold every 50+d50 turns";
389 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
391 return "earthquake every 100+d100 turns";
396 /* Paranoia - Set activation index for older save data */
397 if (object_is_fixed_artifact(o_ptr))
399 if (!o_ptr->xtra2) o_ptr->xtra2 = a_info[o_ptr->name1].act_idx;
401 if (object_is_ego(o_ptr))
403 if (!o_ptr->xtra2) o_ptr->xtra2 = e_info[o_ptr->name2].act_idx;
406 if ((object_is_artifact(o_ptr) || object_is_ego(o_ptr)) &&
409 switch (o_ptr->xtra2)
412 /* General activation */
415 return "ÂÀÍÛ¸÷Àþ : 10 ¥¿¡¼¥óËè";
417 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
419 return "°½±À(12) : 4+d4 ¥¿¡¼¥óËè";
421 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
423 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
425 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
427 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
429 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(48) : 6+d6 ¥¿¡¼¥óËè";
431 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 9+d9 ¥¿¡¼¥óËè";
433 return "Ã⩹¶·â(100) : 100+d100 ¥¿¡¼¥óËè";
435 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(100) : 12+d12 ¥¿¡¼¥óËè";
437 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë(100) : 12+d12 ¥¿¡¼¥óËè";
439 return "À¸Ì¿Îϵۼý(120) : 400 ¥¿¡¼¥óËè";
441 return "µÛ·ì¥É¥ì¥¤¥ó(3*50) : 400 ¥¿¡¼¥óËè";
443 return "Ìð(150) : 90+d90 ¥¿¡¼¥óËè";
445 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(300) : 225+d225 ¥¿¡¼¥óËè";
447 return "µðÂ祢¥¤¥¹¡¦¥Ü¡¼¥ë(400) : 325+d325 ¥¿¡¼¥óËè";
449 return "µðÂ祵¥ó¥À¡¼¡¦¥Ü¡¼¥ë(500) : 425+d425 ¥¿¡¼¥óËè";
451 return "¥«¥Þ¥¤¥¿¥Á : 250 ¥¿¡¼¥óËè";
453 return "µÛ·ì¥É¥ì¥¤¥ó(3*100) : 400 ¥¿¡¼¥óËè";
455 return "º®ÆÙ¾¤Íè : 350 ¥¿¡¼¥óËè"; /*nuke me*/
457 return "¥í¥±¥Ã¥È(120+¥ì¥Ù¥ë) : 400 ¥¿¡¼¥óËè";
459 return "¼Ù°Â໶(x5) : 100+d100 ¥¿¡¼¥óËè";
461 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 500 ¥¿¡¼¥óËè";
463 return "Á±ÎÉÂ໶(x5) : 100+d100 ¥¿¡¼¥óËè";
465 return "ËâË¡¤ÎÌð(150) : 90+d90 ¥¿¡¼¥óËè";
467 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(120) : 15 ¥¿¡¼¥óËè";
469 return "¥¦¥©¡¼¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 250 ¥¿¡¼¥óËè";
471 return "µðÂ祹¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 200+d200 ¥¿¡¼¥óËè";
473 return "°Å¹õ¤ÎÍò(250) : 150+d150 ¥¿¡¼¥óËè";
475 return "ËâÎϤÎÍò(250) : 150+d150 ¥¿¡¼¥óËè";
477 return "³²Ãî¤Î¶î½ü : 55+d55¥¿¡¼¥óËè";
478 case ACT_BLINDING_LIGHT:
479 return "âÁ¤·¤¤¸÷ : 250 ¥¿¡¼¥óËè";
481 return "¿®¤¸Æñ¤¤¤³¤È : 450+d450 ¥¿¡¼¥óËè";
482 case ACT_CAST_BA_STAR:
483 return "¥¹¥¿¡¼¡¦¥Ü¡¼¥ë¡¦¥À¥¹¥È(150) : 1000 ¥¿¡¼¥óËè";
484 case ACT_BLADETURNER:
485 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300), »Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢ÂÑÀ";
487 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë(100) : 12+d12 ¥¿¡¼¥óËè";
489 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES))
490 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) ¤È²Ð¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
491 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
493 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE))
494 return "Î䵤¤Î¥Ö¥ì¥¹ (200) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
495 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
498 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
500 return "¼þ°Ï¤Î¥â¥ó¥¹¥¿¡¼¤ò̲¤é¤»¤ë : 55 ¥¿¡¼¥óËè";
502 return "ÃÏ¿Ì : 50 ¥¿¡¼¥óËè";
504 return "¶²¹² : 3*(¥ì¥Ù¥ë+10) ¥¿¡¼¥óËè";
506 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
507 case ACT_BANISH_EVIL:
508 return "¼Ù°¾ÃÌÇ : 250+d250 ¥¿¡¼¥óËè";
510 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
512 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
514 return "¥â¥ó¥¹¥¿¡¼¶²¹² : 40+d40¥¿¡¼¥óËè";
516 if(o_ptr->name1 != ART_HYOUSIGI) return "¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë : ¤¤¤Ä¤Ç¤â";
517 return "Çï»ÒÌÚ¤òÂǤÁ¤Ê¤é¤¹ : ¤¤¤Ä¤Ç¤â";
518 case ACT_CHARM_ANIMAL:
519 return "ưʪ̥λ : 200 ¥¿¡¼¥óËè";
520 case ACT_CHARM_UNDEAD:
521 return "¥¢¥ó¥Ç¥Ã¥É½¾Â° : 333 ¥¿¡¼¥óËè";
522 case ACT_CHARM_OTHER:
523 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 400 ¥¿¡¼¥óËè";
524 case ACT_CHARM_ANIMALS:
525 return "ưʪͧÏ : 500 ¥¿¡¼¥óËè";
526 case ACT_CHARM_OTHERS:
527 return "¼þÊÕ̥λ : 750 ¥¿¡¼¥óËè";
528 case ACT_SUMMON_ANIMAL:
529 return "ưʪ¾¤´ : 200+d300 ¥¿¡¼¥óËè";
530 case ACT_SUMMON_PHANTOM:
531 return "¸¸Î´ : 200+d200 ¥¿¡¼¥óËè";
532 case ACT_SUMMON_ELEMENTAL:
533 return "¥¨¥ì¥á¥ó¥¿¥ë¾¤´ : 750 ¥¿¡¼¥óËè";
534 case ACT_SUMMON_DEMON:
535 return "°Ë⾤´ : 666+d333 ¥¿¡¼¥óËè";
536 case ACT_SUMMON_UNDEAD:
537 return "¥¢¥ó¥Ç¥Ã¥É¾¤´ : 666+d333 ¥¿¡¼¥óËè";
538 case ACT_SUMMON_HOUND:
539 return "¥Ï¥¦¥ó¥É¾¤´ : 300+d150 ¥¿¡¼¥óËè";
540 case ACT_SUMMON_DAWN:
541 return "¶Ç¤Î»ÕÃľ¤´ : 500+d500 ¥¿¡¼¥óËè";
542 case ACT_SUMMON_OCTOPUS:
543 return "Âý¤ÎÂç·²¾¤´ : 300+d150¥¿¡¼¥óËè";
545 case ACT_CHOIR_SINGS:
546 return "²óÉü(777)¡¢Ìþ¤·¡¢»Îµ¤¹âÍÈ : 300 ¥¿¡¼¥óËè";
548 return "¶²Éݽüµî/ÂÎÎϲóÉü(30) : 10 ¥¿¡¼¥óËè";
550 return "½ý²óÉü(4d8) : 3+d3 ¥¿¡¼¥óËè";
551 case ACT_CURE_POISON:
552 return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
554 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
556 return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃÍÉü³è : 750 ¥¿¡¼¥óËè";
558 return "ÂÎÎϲóÉü(700) : 250 ¥¿¡¼¥óËè";
560 return "ÂÎÎϲóÉü(1000) : 888 ¥¿¡¼¥óËè";
562 return "Ìþ¤· : 100¥¿¡¼¥óËè";
563 case ACT_CURE_MANA_FULL:
564 return "ËâÎÏÉü³è: 777 ¥¿¡¼¥óËè";
566 return "¥Æ¥ì¥Ñ¥·¡¼(´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
568 /* return "»Îµ¤¹âÍȤȽËÊ¡(´ü´Ö 50+d50) : 100+d100 ¥¿¡¼¥óËè"; */
569 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
571 return "Âмٰ·ë³¦(´ü´Ö 3*¥ì¥Ù¥ë+d25) : 200+d200 ¥¿¡¼¥óËè";
573 return "Á´ÂÑÀ(´ü´Ö 20+d20) : 111 ¥¿¡¼¥óËè";
575 return "²Ã®(´ü´Ö 20+d20) : 250 ¥¿¡¼¥óËè";
577 return "²Ã®(´ü´Ö 75+d75) : 200+d200 ¥¿¡¼¥óËè";
579 return "Í©Âβ½(´ü´Ö (¥ì¥Ù¥ë/2)+d(¥ì¥Ù¥ë/2)) : 1000 ¥¿¡¼¥óËè";
581 return "̵Ũ²½(´ü´Ö 8+d8) : 1000 ¥¿¡¼¥óËè";
583 return "»Îµ¤¹âÍÈ : 30+d30¥¿¡¼¥óËè";
585 return "»Îµ¤¹âÍÈ, ¥¹¥Ô¡¼¥É(´ü´Ö 50+d50¥¿¡¼¥ó) : 100+d200 ¥¿¡¼¥óËè";
586 case ACT_RESIST_ACID:
587 return "»À¤Ø¤ÎÂÑÀ(´ü´Ö 20+d20) : 40+d40 ¥¿¡¼¥óËè";
588 case ACT_RESIST_FIRE:
589 return "²Ð±ê¤Ø¤ÎÂÑÀ(´ü´Ö 20+d20) : 40+d40 ¥¿¡¼¥óËè";
590 case ACT_RESIST_COLD:
591 return "Î䵤¤Ø¤ÎÂÑÀ(´ü´Ö 20+d20) : 40+d40 ¥¿¡¼¥óËè";
592 case ACT_RESIST_ELEC:
593 return "ÅÅ·â¤Ø¤ÎÂÑÀ(´ü´Ö 20+d20) : 40+d40 ¥¿¡¼¥óËè";
594 case ACT_RESIST_POIS:
595 return "ÆǤؤÎÂÑÀ(´ü´Ö 20+d20) : 40+d40 ¥¿¡¼¥óËè";
598 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
600 return "ËâË¡¤ÎÃϿޤȸ÷ : 50+d50 ¥¿¡¼¥óËè";
602 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
603 case ACT_DETECT_XTRA:
604 return "Á´´¶ÃΡ¢Ãµº÷¡¢*´ÕÄê* : 100 ¥¿¡¼¥óËè";
606 return "*´ÕÄê* : 75 ¥¿¡¼¥óËè";
608 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
610 return "Çúȯ¤Î¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
612 return "¼é¤ê¤Î¥ë¡¼¥ó : 400 ¥¿¡¼¥óËè";
614 return "¶õÊ¢½¼Â : 200 ¥¿¡¼¥óËè";
616 return "¥É¥¢Ç˲õ : 10 ¥¿¡¼¥óËè";
618 return "´äÀÐÍϲò : 3 ¥¿¡¼¥óËè";
620 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
622 return "Ï£¶â½Ñ : 500 ¥¿¡¼¥óËè";
624 return "¼¡¸µ¤ÎÈâ : 100 ¥¿¡¼¥óËè";
626 return "¥Æ¥ì¥Ý¡¼¥È : 25 ¥¿¡¼¥óËè";
628 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
630 return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô : 20+d20 ¥¿¡¼¥óËè";
631 case ACT_TELEKINESIS:
632 return "ʪÂΤò°ú¤´ó¤»¤ë(½ÅÎÌ25kg¤Þ¤Ç) : 25+d25¥¿¡¼¥óËè";
633 case ACT_DETECT_UNIQUE:
634 return "¤³¤Î³¬¤Ë¤¤¤ë¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òɽ¼¨ : 200¥¿¡¼¥óËè";
636 return "ƨÁö : 35 ¥¿¡¼¥óËè";
637 case ACT_DISP_CURSE_XTRA:
638 return "*²ò¼ö*¤ÈÄ´ºº: ¤¤¤Ä¤Ç¤â";
639 case ACT_BRAND_FIRE_BOLTS:
640 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
641 case ACT_RECHARGE_XTRA:
642 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
644 return "´í¸±¤òȼ¤¦´ÕÄê : ¤¤¤Ä¤Ç¤â";
646 return "»Í¸ÔƧ¤ß : 100+d100 ¥¿¡¼¥óËè";
648 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10 ¥¿¡¼¥óËè";
649 case ACT_DETECT_ALL_MONS:
650 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃÎ : 150 ¥¿¡¼¥óËè";
651 case ACT_ULTIMATE_RESIST:
652 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ : 777 ¥¿¡¼¥óËè";
654 /* Unique activation */
656 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
658 return "Îã¤Î¥¢¥ì : 150+d150 ¥¿¡¼¥óËè";
660 return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë";
661 case ACT_BLOODY_MOON:
662 return "°ÀÊѹ¹ : 3333 ¥¿¡¼¥óËè";
664 return "¥Õ¥¡¥¤¥¢¡ª : 15 ¥¿¡¼¥óËè";
669 /* General activation */
672 return "beam of sunlight every 10 turns";
674 return "magic missile (2d6) every 2 turns";
676 return "stinking cloud (12) every 4+d4 turns";
678 return "lightning bolt (4d8) every 5+d5 turns";
680 return "acid bolt (5d8) every 6+d6 turns";
682 return "frost bolt (6d8) every 7+d7 turns";
684 return "fire bolt (9d8) every 8+d8 turns";
686 return "ball of cold (48) every 6+d6 turns";
688 return "ball of fire (72) every 9+d9 turns";
690 return "a strangling attack (100) every 100+d100 turns";
692 return "ball of cold (100) every 12+d12 turns";
694 return "ball of lightning (100) every 12+d12 turns";
696 return "drain life (120) every 400 turns";
698 return "vampiric drain (3*50) every 400 turns";
700 return "arrows (150) every 90+d90 turns";
702 return "fire ball (300) every 225+d225 turns";
704 return "ball of cold (400) every 325+d325 turns";
706 return "ball of lightning (500) every 425+d425 turns";
708 return "whirlwind attack every 250 turns";
710 return "vampiric drain (3*100) every 400 turns";
712 return "call chaos every 350 turns";
714 return "launch rocket (120+level) every 400 turns";
716 return "dispel evil (x5) every 100+d100 turns";
718 return "elemental breath (300) every 500 turns";
720 return "dispel good (x5) every 100+d100 turns";
722 return "a magical arrow (150) every 90+d90 turns";
724 return "large fire ball (120) every 15 turns";
726 return "water ball (200) every 250 turns";
728 return "large star ball (200) every 200+d200 turns";
730 return "darkness storm (250) every 150+d150 turns";
732 return "a mana storm (250) every 150+d150 turns";
734 return "dispel small life every 55+d55 turns";
735 case ACT_BLINDING_LIGHT:
736 return "blinding light every 250 turns";
738 return "bizarre things every 450+d450 turns";
739 case ACT_CAST_BA_STAR:
740 return "cast star balls (150) every 1000 turns";
741 case ACT_BLADETURNER:
742 return "breathe elements (300), hero, bless, and resistance";
744 return "ball of acid (100) every 12+d12 turns";
746 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES))
747 return "breath of fire (200) and resist fire every 200 turns";
748 return "fire breath (200) every 250 turns";
750 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE))
751 return "breath of cold (200) and resist cold every 200 turns";
752 return "cold breath (200) every 250 turns";
755 return "confuse monster every 15 turns";
757 return "sleep nearby monsters every 55 turns";
759 return "earthquake every 50 turns";
761 return "terror every 3 * (level+10) turns";
763 return "teleport away every 200 turns";
764 case ACT_BANISH_EVIL:
765 return "banish evil every 250+d250 turns";
767 return "genocide every 500 turns";
769 return "mass genocide every 1000 turns";
771 return "frighten monsters every 40+d40 turns";
773 if (o_ptr->name1 == ART_HYOUSIGI) return "beat wooden clappers every turn";
774 return "aggravete monsters every turn";
776 case ACT_CHARM_ANIMAL:
777 return "charm animal every 200 turns";
778 case ACT_CHARM_UNDEAD:
779 return "enslave undead every 333 turns";
780 case ACT_CHARM_OTHER:
781 return "charm monster every 400 turns";
782 case ACT_CHARM_ANIMALS:
783 return "animal friendship every 500 turns";
784 case ACT_CHARM_OTHERS:
785 return "mass charm every 750 turns";
786 case ACT_SUMMON_ANIMAL:
787 return "summon animal every 200+d300 turns";
788 case ACT_SUMMON_PHANTOM:
789 return "summon phantasmal servant every 200+d200 turns";
790 case ACT_SUMMON_ELEMENTAL:
791 return "summon elemental every 750 turns";
792 case ACT_SUMMON_DEMON:
793 return "summon demon every 666+d333 turns";
794 case ACT_SUMMON_UNDEAD:
795 return "summon undead every 666+d333 turns";
796 case ACT_SUMMON_HOUND:
797 return "summon hound every 300+d150 turns";
798 case ACT_SUMMON_DAWN:
799 return "summon the Legion of the Dawn every 500+d500 turns";
800 case ACT_SUMMON_OCTOPUS:
801 return "summon octopus every 300+d150 turns";
803 case ACT_CHOIR_SINGS:
804 return "heal 777 hit points, curing and heloism every 300 turns";
806 return "remove fear and heal 30 hp every 10 turns";
808 return "heal 4d8 and wounds every 3+d3 turns";
809 case ACT_CURE_POISON:
810 return "remove fear and cure poison every 5 turns";
812 return "restore life levels every 450 turns";
814 return "restore stats and life levels every 750 turns";
816 return "heal 700 hit points every 250 turns";
818 return "heal 1000 hit points every 888 turns";
820 return "curing every 100 turns";
821 case ACT_CURE_MANA_FULL:
822 return "restore mana every 777 turns";
824 return "telepathy (dur 25+d30) every 200 turns";
826 /* return "heroism and blessed (dur 50+d50) every 100+d100 turns"; */
827 return "berserk (25+d25 turns) every 75+d75 turns";
829 return "protect evil (dur level*3 + d25) every 200+d200 turns";
831 return "resist elements (dur 20+d20) every 111 turns";
833 return "speed (dur 20+d20) every 100+d100 turns";
835 return "speed (dur 75+d75) every 100+d100 turns";
837 return "wraith form (dur level/2 + d(level/2)) every 1000 turns";
839 return "invulnerability (dur 8+d8) every 1000 turns";
841 return "heroism every 30+d30 turns";
843 return "hero and +10 to speed (50) every 100+200d turns";
844 case ACT_RESIST_ACID:
845 return "resist acid (dur 20+d20) every 40+d40 turns";
846 case ACT_RESIST_FIRE:
847 return "resist fire (dur 20+d20) every 40+d40 turns";
848 case ACT_RESIST_COLD:
849 return "resist cold (dur 20+d20) every 40+d40 turns";
850 case ACT_RESIST_ELEC:
851 return "resist thunder (dur 20+d20) every 40+d40 turns";
852 case ACT_RESIST_POIS:
853 return "resist poison (dur 20+d20) every 40+d40 turns";
856 return "light area (dam 2d15) every 10+d10 turns";
858 return "light (dam 2d15) & map area every 50+d50 turns";
860 return "detection every 55+d55 turns";
861 case ACT_DETECT_XTRA:
862 return "detection, probing and identify true every 100 turns";
864 return "identify true every 75 turns";
866 return "identify spell every 10 turns";
868 return "explosive rune every 200 turns";
870 return "rune of protection every 400 turns";
872 return "satisfy hunger every 200 turns";
874 return "destroy doors every 10 turns";
876 return "stone to mud every 3 turns";
878 return "recharging every 70 turns";
880 return "alchemy every 500 turns";
882 return "dimension door every 100 turns";
884 return "teleport every 25 turns";
886 return "word of recall every 200 turns";
887 case ACT_TELEKINESIS:
888 return "a telekinesis (500 lb) every 25+d25 turns";
890 return "clairvoyance and recall, draining you every 20+d20 turns";
891 case ACT_DETECT_UNIQUE:
892 return "list of the uniques on the level every 200 turns";
894 return "a getaway every 35 turns";
895 case ACT_DISP_CURSE_XTRA:
896 return "dispel curse and probing every turn";
897 case ACT_BRAND_FIRE_BOLTS:
898 return "fire branding of bolts every 999 turns";
899 case ACT_RECHARGE_XTRA:
900 return "recharge item every 200 turns";
902 return "perilous identify every turn";
904 return "shiko every 100+d100 turns";
906 return "blink every 10 turns";
907 case ACT_DETECT_ALL_MONS:
908 return "detect all monsters every 150 turns";
909 case ACT_ULTIMATE_RESIST:
910 return "hero, bless, and ultimate resistance every 777 turns";
912 /* Unique activation */
914 return "fishing : every time";
916 return "reveal your identity every 150+d150 turns";
918 return "increase STR (destroyed 50%)";
919 case ACT_BLOODY_MOON:
920 return "change zokusei every 3333 turns";
922 return "fire! every 15 turns";
925 return "something undefined";
930 if (o_ptr->tval == TV_RING)
936 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) ¤È²Ð¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
938 return "ball of fire (100) and resist fire every 50+d50 turns";
943 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
945 return "ball of cold (100) and resist cold every 50+d50 turns";
950 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) ¤È»À¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
952 return "ball of acid (100) and resist acid every 50+d50 turns";
957 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) ¤ÈÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
959 return "ball of elec (100) and resist elec every 50+d50 turns";
967 if (o_ptr->tval == TV_AMULET)
969 if (object_is_ego(o_ptr))
971 switch (o_ptr->name2)
975 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
977 return "identify every 10 turns";
981 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
983 return "charm monster every 200 turns";
987 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
989 return "blink every 10+d10 turns";
991 case EGO_AMU_TELEPORT:
993 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
995 return "teleport every 50+d50 turns";
999 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
1001 return "dimension door every 200 turns";
1003 case EGO_AMU_RES_FIRE_:
1005 return "²Ð±ê¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1007 return "resist fire every 50+d50 turns";
1009 case EGO_AMU_RES_COLD_:
1011 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1013 return "resist cold every 50+d50 turns";
1015 case EGO_AMU_RES_ELEC_:
1017 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1019 return "resist elec every 50+d50 turns";
1021 case EGO_AMU_RES_ACID_:
1023 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1025 return "resist acid every 50+d50 turns";
1027 case EGO_AMU_DETECTION:
1029 return "Á´´¶ÃÎ : 55+d55¥¿¡¼¥óËè";
1031 return "detect all floor every 55+d55 turns";
1037 if (o_ptr->tval == TV_WHISTLE)
1040 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
1042 return "call pet every 100+d100 turns";
1046 if (o_ptr->tval == TV_CAPTURE)
1049 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
1051 return "captures or releases a monster.";
1055 /* Require dragon scale mail */
1057 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
1059 if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
1063 /* Branch on the sub-type */
1064 switch (o_ptr->sval)
1066 case SV_DRAGON_BLUE:
1069 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
1071 return "breathe lightning (100) every 150+d150 turns";
1075 case SV_DRAGON_WHITE:
1078 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
1080 return "breathe frost (110) every 150+d150 turns";
1084 case SV_DRAGON_BLACK:
1087 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
1089 return "breathe acid (130) every 150+d150 turns";
1093 case SV_DRAGON_GREEN:
1096 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
1098 return "breathe poison gas (150) every 180+d180 turns";
1105 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
1107 return "breathe fire (200) every 200+d200 turns";
1111 case SV_DRAGON_MULTIHUED:
1114 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
1116 return "breathe multi-hued (250) every 200+d200 turns";
1120 case SV_DRAGON_BRONZE:
1123 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
1125 return "breathe confusion (120) every 180+d180 turns";
1129 case SV_DRAGON_GOLD:
1132 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
1134 return "breathe sound (130) every 180+d180 turns";
1138 case SV_DRAGON_CHAOS:
1141 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
1143 return "breathe chaos/disenchant (220) every 200+d200 turns";
1150 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
1152 return "breathe sound/shards (230) every 200+d200 turns";
1156 case SV_DRAGON_BALANCE:
1159 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
1161 return "breathe balance (250) every 200+d200 turns";
1165 case SV_DRAGON_SHINING:
1168 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
1170 return "breathe light/darkness (200) every 200+d200 turns";
1174 case SV_DRAGON_POWER:
1177 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
1179 return "breathe the elements (300) every 200+d200 turns";
1189 return "breathe air";
1196 * Describe a "fully identified" item
1198 bool screen_object(object_type *o_ptr, u32b mode)
1202 u32b flgs[TR_FLAG_SIZE];
1206 char o_name[MAX_NLEN];
1209 int trivial_info = 0;
1211 /* Extract the flags */
1212 object_flags(o_ptr, flgs);
1214 /* Extract the description */
1216 roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
1217 (k_text + k_info[o_ptr->k_idx].text),
1218 77 - 15, temp, sizeof(temp));
1219 for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
1220 { info[i] = &temp[j]; i++;}
1223 if (object_is_equipment(o_ptr))
1225 /* Descriptions of a basic equipment is just a flavor */
1229 /* Mega-Hack -- describe activation */
1230 if (have_flag(flgs, TR_ACTIVATE))
1233 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
1235 info[i++] = "It can be activated for...";
1238 info[i++] = item_activation(o_ptr);
1240 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
1242 info[i++] = "...if it is being worn.";
1247 /* Figurines, a hack */
1248 if (o_ptr->tval == TV_FIGURINE)
1251 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
1253 info[i++] = "It will transform into a pet when thrown.";
1258 /* Figurines, a hack */
1259 if (o_ptr->name1 == ART_STONEMASK)
1262 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
1264 info[i++] = "It makes you turn into a vampire permanently.";
1269 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
1272 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
1274 info[i++] = "It will attempt to kill a monster instantly.";
1279 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
1282 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
1284 info[i++] = "It causes you to strike yourself sometimes.";
1288 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
1290 info[i++] = "It always penetrates invulnerability barriers.";
1294 if (o_ptr->name2 == EGO_2WEAPON)
1297 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
1299 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
1304 if (have_flag(flgs, TR_EASY_SPELL))
1307 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
1309 info[i++] = "It affects your ability to cast spells.";
1313 if (o_ptr->name2 == EGO_AMU_FOOL)
1316 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
1318 info[i++] = "It interferes with casting spells.";
1322 if (o_ptr->name2 == EGO_RING_THROW)
1325 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
1327 info[i++] = "It provides great strength when you throw an item.";
1331 if (o_ptr->name2 == EGO_AMU_NAIVETY)
1334 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
1336 info[i++] = "It decreases your magic resistance.";
1340 if (o_ptr->tval == TV_STATUE)
1342 monster_race *r_ptr = &r_info[o_ptr->pval];
1344 if (o_ptr->pval == MON_BULLGATES)
1346 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
1348 info[i++] = "It is shameful.";
1350 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
1352 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
1354 info[i++] = "It is fearful.";
1358 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
1360 info[i++] = "It is cheerful.";
1364 /* Hack -- describe lite's */
1365 if (o_ptr->tval == TV_LITE)
1367 if (o_ptr->name2 == EGO_LITE_DARKNESS)
1370 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
1372 info[i++] = "It provides no light.";
1375 if (o_ptr->sval == SV_LITE_FEANOR)
1378 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-3)¡£";
1380 info[i++] = "It decreases radius of light source by 3.";
1383 else if (o_ptr->sval == SV_LITE_LANTERN)
1386 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
1388 info[i++] = "It decreases radius of light source by 2.";
1394 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
1396 info[i++] = "It decreases radius of light source by 1.";
1400 else if (object_is_fixed_artifact(o_ptr))
1403 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1405 info[i++] = "It provides light (radius 3) forever.";
1409 else if (o_ptr->name2 == EGO_LITE_SHINE)
1411 if (o_ptr->sval == SV_LITE_FEANOR)
1414 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1416 info[i++] = "It provides light (radius 3) forever.";
1420 else if (o_ptr->sval == SV_LITE_LANTERN)
1423 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1425 info[i++] = "It provides light (radius 3) when fueled.";
1432 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1434 info[i++] = "It provides light (radius 2) when fueled.";
1441 if (o_ptr->sval == SV_LITE_FEANOR)
1444 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1446 info[i++] = "It provides light (radius 2) forever.";
1450 else if (o_ptr->sval == SV_LITE_LANTERN)
1453 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1455 info[i++] = "It provides light (radius 2) when fueled.";
1462 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
1464 info[i++] = "It provides light (radius 1) when fueled.";
1469 if (o_ptr->name2 == EGO_LITE_LONG)
1472 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
1474 info[i++] = "It provides light for much longer time.";
1480 /* And then describe it fully */
1482 if (have_flag(flgs, TR_RIDING))
1484 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
1486 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
1488 info[i++] = "It is made for use while riding.";
1493 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
1495 info[i++] = "It is suitable for use while riding.";
1497 /* This information is not important enough */
1501 if (have_flag(flgs, TR_STR))
1504 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1506 info[i++] = "It affects your strength.";
1510 if (have_flag(flgs, TR_INT))
1513 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1515 info[i++] = "It affects your intelligence.";
1519 if (have_flag(flgs, TR_WIS))
1522 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1524 info[i++] = "It affects your wisdom.";
1528 if (have_flag(flgs, TR_DEX))
1531 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1533 info[i++] = "It affects your dexterity.";
1537 if (have_flag(flgs, TR_CON))
1540 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1542 info[i++] = "It affects your constitution.";
1546 if (have_flag(flgs, TR_CHR))
1549 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1551 info[i++] = "It affects your charisma.";
1556 if (have_flag(flgs, TR_MAGIC_MASTERY))
1559 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1561 info[i++] = "It affects your ability to use magic devices.";
1565 if (have_flag(flgs, TR_STEALTH))
1568 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1570 info[i++] = "It affects your stealth.";
1574 if (have_flag(flgs, TR_SEARCH))
1577 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1579 info[i++] = "It affects your searching.";
1583 if (have_flag(flgs, TR_INFRA))
1586 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1588 info[i++] = "It affects your infravision.";
1592 if (have_flag(flgs, TR_TUNNEL))
1595 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1597 info[i++] = "It affects your ability to tunnel.";
1601 if (have_flag(flgs, TR_SPEED))
1604 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1606 info[i++] = "It affects your speed.";
1610 if (have_flag(flgs, TR_BLOWS))
1613 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1615 info[i++] = "It affects your attack speed.";
1620 if (have_flag(flgs, TR_BRAND_ACID))
1623 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1625 info[i++] = "It does extra damage from acid.";
1629 if (have_flag(flgs, TR_BRAND_ELEC))
1632 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1634 info[i++] = "It does extra damage from electricity.";
1638 if (have_flag(flgs, TR_BRAND_FIRE))
1641 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1643 info[i++] = "It does extra damage from fire.";
1647 if (have_flag(flgs, TR_BRAND_COLD))
1650 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1652 info[i++] = "It does extra damage from frost.";
1657 if (have_flag(flgs, TR_BRAND_POIS))
1660 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
1662 info[i++] = "It poisons your foes.";
1667 if (have_flag(flgs, TR_CHAOTIC))
1670 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
1672 info[i++] = "It produces chaotic effects.";
1677 if (have_flag(flgs, TR_VAMPIRIC))
1680 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
1682 info[i++] = "It drains life from your foes.";
1687 if (have_flag(flgs, TR_IMPACT))
1690 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
1692 info[i++] = "It can cause earthquakes.";
1697 if (have_flag(flgs, TR_VORPAL))
1700 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1702 info[i++] = "It is very sharp and can cut your foes.";
1707 if (have_flag(flgs, TR_KILL_DRAGON))
1710 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1712 info[i++] = "It is a great bane of dragons.";
1716 else if (have_flag(flgs, TR_SLAY_DRAGON))
1719 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1721 info[i++] = "It is especially deadly against dragons.";
1726 if (have_flag(flgs, TR_KILL_ORC))
1729 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1731 info[i++] = "It is a great bane of orcs.";
1735 if (have_flag(flgs, TR_SLAY_ORC))
1738 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1740 info[i++] = "It is especially deadly against orcs.";
1745 if (have_flag(flgs, TR_KILL_TROLL))
1748 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1750 info[i++] = "It is a great bane of trolls.";
1754 if (have_flag(flgs, TR_SLAY_TROLL))
1757 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1759 info[i++] = "It is especially deadly against trolls.";
1764 if (have_flag(flgs, TR_KILL_GIANT))
1767 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1769 info[i++] = "It is a great bane of giants.";
1772 else if (have_flag(flgs, TR_SLAY_GIANT))
1775 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1777 info[i++] = "It is especially deadly against giants.";
1782 if (have_flag(flgs, TR_KILL_DEMON))
1785 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1787 info[i++] = "It is a great bane of demons.";
1791 if (have_flag(flgs, TR_SLAY_DEMON))
1794 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
1796 info[i++] = "It strikes at demons with holy wrath.";
1801 if (have_flag(flgs, TR_KILL_UNDEAD))
1804 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1806 info[i++] = "It is a great bane of undead.";
1810 if (have_flag(flgs, TR_SLAY_UNDEAD))
1813 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
1815 info[i++] = "It strikes at undead with holy wrath.";
1820 if (have_flag(flgs, TR_KILL_EVIL))
1823 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1825 info[i++] = "It is a great bane of evil monsters.";
1829 if (have_flag(flgs, TR_SLAY_EVIL))
1832 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
1834 info[i++] = "It fights against evil with holy fury.";
1839 if (have_flag(flgs, TR_KILL_ANIMAL))
1842 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1844 info[i++] = "It is a great bane of natural creatures.";
1848 if (have_flag(flgs, TR_SLAY_ANIMAL))
1851 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1853 info[i++] = "It is especially deadly against natural creatures.";
1858 if (have_flag(flgs, TR_KILL_HUMAN))
1861 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1863 info[i++] = "It is a great bane of humans.";
1867 if (have_flag(flgs, TR_SLAY_HUMAN))
1870 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1872 info[i++] = "It is especially deadly against humans.";
1877 if (have_flag(flgs, TR_FORCE_WEAPON))
1880 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
1882 info[i++] = "It powerfully strikes at a monster using your mana.";
1886 if (have_flag(flgs, TR_DEC_MANA))
1889 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
1891 info[i++] = "It decreases your mana consumption.";
1895 if (have_flag(flgs, TR_SUST_STR))
1898 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
1900 info[i++] = "It sustains your strength.";
1904 if (have_flag(flgs, TR_SUST_INT))
1907 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
1909 info[i++] = "It sustains your intelligence.";
1913 if (have_flag(flgs, TR_SUST_WIS))
1916 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
1918 info[i++] = "It sustains your wisdom.";
1922 if (have_flag(flgs, TR_SUST_DEX))
1925 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
1927 info[i++] = "It sustains your dexterity.";
1931 if (have_flag(flgs, TR_SUST_CON))
1934 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
1936 info[i++] = "It sustains your constitution.";
1940 if (have_flag(flgs, TR_SUST_CHR))
1943 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
1945 info[i++] = "It sustains your charisma.";
1950 if (have_flag(flgs, TR_IM_ACID))
1953 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
1955 info[i++] = "It provides immunity to acid.";
1959 if (have_flag(flgs, TR_IM_ELEC))
1962 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
1964 info[i++] = "It provides immunity to electricity.";
1968 if (have_flag(flgs, TR_IM_FIRE))
1971 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
1973 info[i++] = "It provides immunity to fire.";
1977 if (have_flag(flgs, TR_IM_COLD))
1980 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
1982 info[i++] = "It provides immunity to cold.";
1987 if (have_flag(flgs, TR_THROW))
1990 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1992 info[i++] = "It is perfectly balanced for throwing.";
1996 if (have_flag(flgs, TR_FREE_ACT))
1999 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2001 info[i++] = "It provides immunity to paralysis.";
2005 if (have_flag(flgs, TR_HOLD_LIFE))
2008 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
2010 info[i++] = "It provides resistance to life draining.";
2014 if (have_flag(flgs, TR_RES_FEAR))
2017 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
2019 info[i++] = "It makes you completely fearless.";
2023 if (have_flag(flgs, TR_RES_ACID))
2026 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2028 info[i++] = "It provides resistance to acid.";
2032 if (have_flag(flgs, TR_RES_ELEC))
2035 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2037 info[i++] = "It provides resistance to electricity.";
2041 if (have_flag(flgs, TR_RES_FIRE))
2044 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2046 info[i++] = "It provides resistance to fire.";
2050 if (have_flag(flgs, TR_RES_COLD))
2053 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2055 info[i++] = "It provides resistance to cold.";
2059 if (have_flag(flgs, TR_RES_POIS))
2062 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2064 info[i++] = "It provides resistance to poison.";
2069 if (have_flag(flgs, TR_RES_LITE))
2072 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2074 info[i++] = "It provides resistance to light.";
2078 if (have_flag(flgs, TR_RES_DARK))
2081 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2083 info[i++] = "It provides resistance to dark.";
2088 if (have_flag(flgs, TR_RES_BLIND))
2091 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2093 info[i++] = "It provides resistance to blindness.";
2097 if (have_flag(flgs, TR_RES_CONF))
2100 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2102 info[i++] = "It provides resistance to confusion.";
2106 if (have_flag(flgs, TR_RES_SOUND))
2109 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2111 info[i++] = "It provides resistance to sound.";
2115 if (have_flag(flgs, TR_RES_SHARDS))
2118 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2120 info[i++] = "It provides resistance to shards.";
2125 if (have_flag(flgs, TR_RES_NETHER))
2128 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2130 info[i++] = "It provides resistance to nether.";
2134 if (have_flag(flgs, TR_RES_NEXUS))
2137 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2139 info[i++] = "It provides resistance to nexus.";
2143 if (have_flag(flgs, TR_RES_CHAOS))
2146 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2148 info[i++] = "It provides resistance to chaos.";
2152 if (have_flag(flgs, TR_RES_DISEN))
2155 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2157 info[i++] = "It provides resistance to disenchantment.";
2162 if (have_flag(flgs, TR_LEVITATION))
2165 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2167 info[i++] = "It allows you to levitate.";
2171 if (have_flag(flgs, TR_LITE))
2173 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
2175 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
2177 info[i++] = "It decreases radius of your light source by 1.";
2181 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë(Ⱦ·Â¤Ë+1)¡£";
2183 info[i++] = "It provides permanent light. (radius +1)";
2187 if (have_flag(flgs, TR_SEE_INVIS))
2190 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2192 info[i++] = "It allows you to see invisible monsters.";
2196 if (have_flag(flgs, TR_TELEPATHY))
2199 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
2201 info[i++] = "It gives telepathic powers.";
2205 if (have_flag(flgs, TR_ESP_ANIMAL))
2208 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤ò´¶ÃΤ¹¤ë¡£";
2210 info[i++] = "It senses natural creatures.";
2214 if (have_flag(flgs, TR_ESP_UNDEAD))
2217 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ò´¶ÃΤ¹¤ë¡£";
2219 info[i++] = "It senses undead.";
2223 if (have_flag(flgs, TR_ESP_DEMON))
2226 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò´¶ÃΤ¹¤ë¡£";
2228 info[i++] = "It senses demons.";
2232 if (have_flag(flgs, TR_ESP_ORC))
2235 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ò´¶ÃΤ¹¤ë¡£";
2237 info[i++] = "It senses orcs.";
2241 if (have_flag(flgs, TR_ESP_TROLL))
2244 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ò´¶ÃΤ¹¤ë¡£";
2246 info[i++] = "It senses trolls.";
2250 if (have_flag(flgs, TR_ESP_GIANT))
2253 info[i++] = "¤½¤ì¤Ïµð¿Í¤ò´¶ÃΤ¹¤ë¡£";
2255 info[i++] = "It senses giants.";
2259 if (have_flag(flgs, TR_ESP_DRAGON))
2262 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò´¶ÃΤ¹¤ë¡£";
2264 info[i++] = "It senses dragons.";
2268 if (have_flag(flgs, TR_ESP_HUMAN))
2271 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ò´¶ÃΤ¹¤ë¡£";
2273 info[i++] = "It senses humans.";
2277 if (have_flag(flgs, TR_ESP_EVIL))
2280 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¸ºß¤ò´¶ÃΤ¹¤ë¡£";
2282 info[i++] = "It senses evil creatures.";
2286 if (have_flag(flgs, TR_ESP_GOOD))
2289 info[i++] = "¤½¤ì¤ÏÁ±Îɤʸºß¤ò´¶ÃΤ¹¤ë¡£";
2291 info[i++] = "It senses good creatures.";
2295 if (have_flag(flgs, TR_ESP_NONLIVING))
2298 info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤò´¶ÃΤ¹¤ë¡£";
2300 info[i++] = "It senses non-living creatures.";
2304 if (have_flag(flgs, TR_ESP_UNIQUE))
2307 info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤ò´¶ÃΤ¹¤ë¡£";
2309 info[i++] = "It senses unique monsters.";
2313 if (have_flag(flgs, TR_SLOW_DIGEST))
2316 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
2318 info[i++] = "It slows your metabolism.";
2322 if (have_flag(flgs, TR_REGEN))
2325 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
2327 info[i++] = "It speeds your regenerative powers.";
2331 if (have_flag(flgs, TR_WARNING))
2334 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
2336 info[i++] = "It warns you of danger";
2340 if (have_flag(flgs, TR_REFLECT))
2343 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
2345 info[i++] = "It reflects bolts and arrows.";
2349 if (have_flag(flgs, TR_SH_FIRE))
2352 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2354 info[i++] = "It produces a fiery sheath.";
2358 if (have_flag(flgs, TR_SH_ELEC))
2361 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2363 info[i++] = "It produces an electric sheath.";
2367 if (have_flag(flgs, TR_SH_COLD))
2370 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2372 info[i++] = "It produces a sheath of coldness.";
2376 if (have_flag(flgs, TR_NO_MAGIC))
2379 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2381 info[i++] = "It produces an anti-magic shell.";
2385 if (have_flag(flgs, TR_NO_TELE))
2388 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
2390 info[i++] = "It prevents teleportation.";
2394 if (have_flag(flgs, TR_XTRA_MIGHT))
2397 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2399 info[i++] = "It fires missiles with extra might.";
2403 if (have_flag(flgs, TR_XTRA_SHOTS))
2406 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2408 info[i++] = "It fires missiles excessively fast.";
2413 if (have_flag(flgs, TR_BLESSED))
2416 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
2418 info[i++] = "It has been blessed by the gods.";
2423 if (object_is_cursed(o_ptr))
2425 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
2428 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
2430 info[i++] = "It is permanently cursed.";
2434 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
2437 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
2439 info[i++] = "It is heavily cursed.";
2446 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
2448 info[i++] = "It is cursed.";
2452 * It's a trivial infomation since there is
2453 * fake inscription {cursed}
2459 if ((have_flag(flgs, TR_TY_CURSE)) || (o_ptr->curse_flags & TRC_TY_CURSE))
2462 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
2464 info[i++] = "It carries an ancient foul curse.";
2468 if ((have_flag(flgs, TR_AGGRAVATE)) || (o_ptr->curse_flags & TRC_AGGRAVATE))
2471 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
2473 info[i++] = "It aggravates nearby creatures.";
2477 if ((have_flag(flgs, TR_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
2480 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
2482 info[i++] = "It drains experience.";
2486 if (o_ptr->curse_flags & TRC_SLOW_REGEN)
2489 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
2491 info[i++] = "It slows your regenerative powers.";
2495 if ((o_ptr->curse_flags & TRC_ADD_L_CURSE) || have_flag(flgs, TR_ADD_L_CURSE))
2498 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
2500 info[i++] = "It adds weak curses.";
2504 if ((o_ptr->curse_flags & TRC_ADD_H_CURSE) || have_flag(flgs, TR_ADD_H_CURSE))
2507 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
2509 info[i++] = "It adds heavy curses.";
2513 if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
2516 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2518 info[i++] = "It attracts animals.";
2522 if (o_ptr->curse_flags & TRC_CALL_DEMON)
2525 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2527 info[i++] = "It attracts demons.";
2531 if (o_ptr->curse_flags & TRC_CALL_DRAGON)
2534 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2536 info[i++] = "It attracts dragons.";
2540 if (o_ptr->curse_flags & TRC_COWARDICE)
2543 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤µ¯¤³¤¹¡£";
2545 info[i++] = "It makes you subject to cowardice.";
2549 if ((have_flag(flgs, TR_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
2552 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
2554 info[i++] = "It induces random teleportation.";
2558 if (o_ptr->curse_flags & TRC_LOW_MELEE)
2561 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
2563 info[i++] = "It causes you to miss blows.";
2567 if (o_ptr->curse_flags & TRC_LOW_AC)
2570 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
2572 info[i++] = "It helps your enemies' blows.";
2576 if (o_ptr->curse_flags & TRC_LOW_MAGIC)
2579 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
2581 info[i++] = "It encumbers you while spellcasting.";
2585 if (o_ptr->curse_flags & TRC_FAST_DIGEST)
2588 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
2590 info[i++] = "It speeds your metabolism.";
2594 if (o_ptr->curse_flags & TRC_DRAIN_HP)
2597 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
2599 info[i++] = "It drains you.";
2603 if (o_ptr->curse_flags & TRC_DRAIN_MANA)
2606 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
2608 info[i++] = "It drains your mana.";
2613 /* Describe about this kind of object instead of THIS fake object */
2614 if (mode & SCROBJ_FAKE_OBJECT)
2616 switch (o_ptr->tval)
2619 switch (o_ptr->sval)
2621 case SV_RING_LORDLY:
2623 info[i++] = "¤½¤ì¤Ï´ö¤Ä¤«¤Î¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
2625 info[i++] = "It provides some random resistances.";
2628 case SV_RING_WARNING:
2630 info[i++] = "¤½¤ì¤Ï¤Ò¤È¤Ä¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2632 info[i++] = "It may provide a low rank ESP.";
2639 switch (o_ptr->sval)
2641 case SV_AMULET_RESISTANCE:
2643 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2645 info[i++] = "It may provides resistance to poison.";
2648 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2650 info[i++] = "It may provide a random resistances.";
2653 case SV_AMULET_THE_MAGI:
2655 info[i++] = "¤½¤ì¤ÏºÇÂç¤Ç£³¤Ä¤Þ¤Ç¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë¡£";
2657 info[i++] = "It provides up to three low rank ESPs.";
2665 if (have_flag(flgs, TR_IGNORE_ACID) &&
2666 have_flag(flgs, TR_IGNORE_ELEC) &&
2667 have_flag(flgs, TR_IGNORE_FIRE) &&
2668 have_flag(flgs, TR_IGNORE_COLD))
2671 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2673 info[i++] = "It cannot be harmed by the elements.";
2678 if (have_flag(flgs, TR_IGNORE_ACID))
2681 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2683 info[i++] = "It cannot be harmed by acid.";
2686 if (have_flag(flgs, TR_IGNORE_ELEC))
2689 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2691 info[i++] = "It cannot be harmed by electricity.";
2694 if (have_flag(flgs, TR_IGNORE_FIRE))
2697 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2699 info[i++] = "It cannot be harmed by fire.";
2702 if (have_flag(flgs, TR_IGNORE_COLD))
2705 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2707 info[i++] = "It cannot be harmed by cold.";
2712 if (mode & SCROBJ_FORCE_DETAIL) trivial_info = 0;
2714 /* No relevant informations */
2715 if (i <= trivial_info) return (FALSE);
2717 /* Save the screen */
2721 Term_get_size(&wid, &hgt);
2723 /* Display Item name */
2724 if (!(mode & SCROBJ_FAKE_OBJECT))
2725 object_desc(o_name, o_ptr, 0);
2727 object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
2731 /* Erase the screen */
2732 for (k = 1; k < hgt; k++) prt("", k, 13);
2734 /* Label the information */
2735 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
2737 monster_race *r_ptr = &r_info[o_ptr->pval];
2738 int namelen = strlen(r_name + r_ptr->name);
2739 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
2740 Term_queue_bigchar(18 + namelen, 1, r_ptr->x_attr, r_ptr->x_char, 0, 0);
2741 prt("'", 1, (use_bigtile ? 20 : 19) + namelen);
2745 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
2747 prt(" Item Attributes:", 1, 15);
2750 /* We will print on top of the map (column 13) */
2751 for (k = 2, j = 0; j < i; j++)
2754 prt(info[j], k++, 15);
2756 /* Every 20 entries (lines 2 to 21), start over */
2757 if ((k == hgt - 2) && (j+1 < i))
2760 prt("-- ³¤¯ --", k, 15);
2762 prt("-- more --", k, 15);
2765 for (; k > 2; k--) prt("", k, 15);
2771 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
2773 prt("[Press any key to continue]", k, 15);
2778 /* Restore the screen */
2781 /* Gave knowledge */
2788 * Convert an inventory index into a one character label
2789 * Note that the label does NOT distinguish inven/equip.
2791 char index_to_label(int i)
2793 /* Indexes for "inven" are easy */
2794 if (i < INVEN_RARM) return (I2A(i));
2796 /* Indexes for "equip" are offset */
2797 return (I2A(i - INVEN_RARM));
2802 * Convert a label into the index of an item in the "inven"
2803 * Return "-1" if the label does not indicate a real item
2805 s16b label_to_inven(int c)
2810 i = (islower(c) ? A2I(c) : -1);
2812 /* Verify the index */
2813 if ((i < 0) || (i > INVEN_PACK)) return (-1);
2815 /* Empty slots can never be chosen */
2816 if (!inventory[i].k_idx) return (-1);
2818 /* Return the index */
2824 extern bool select_ring_slot;
2827 static bool is_ring_slot(int i)
2829 return (i == INVEN_RIGHT) || (i == INVEN_LEFT);
2834 * Convert a label into the index of a item in the "equip"
2835 * Return "-1" if the label does not indicate a real item
2837 s16b label_to_equip(int c)
2842 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
2844 /* Verify the index */
2845 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
2847 if (select_ring_slot) return is_ring_slot(i) ? i : -1;
2849 /* Empty slots can never be chosen */
2850 if (!inventory[i].k_idx) return (-1);
2852 /* Return the index */
2859 * Determine which equipment slot (if any) an item likes
2861 s16b wield_slot(object_type *o_ptr)
2863 /* Slot for equipment */
2864 switch (o_ptr->tval)
2871 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
2872 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
2873 return (INVEN_LARM);
2880 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
2881 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
2882 return (INVEN_RARM);
2892 /* Use the right hand first */
2893 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
2895 /* Use the left hand for swapping (by default) */
2896 return (INVEN_LEFT);
2902 return (INVEN_NECK);
2907 return (INVEN_LITE);
2914 return (INVEN_BODY);
2919 return (INVEN_OUTER);
2925 return (INVEN_HEAD);
2930 return (INVEN_HANDS);
2935 return (INVEN_FEET);
2939 /* No slot available */
2945 * Return a string mentioning how a given item is carried
2947 cptr mention_use(int i)
2951 /* Examine the location */
2955 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->migite) ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê")); break;
2957 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "Just lifting" : (p_ptr->migite ? "Wielding" : "On arm"); break;
2961 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->hidarite) ? " ξ¼ê" : (left_hander ? " ±¦¼ê" : " º¸¼ê")); break;
2963 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "Just lifting" : (p_ptr->hidarite ? "Wielding" : "On arm"); break;
2967 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "±¿ÈÂÃæ" : "¼Í·âÍÑ"; break;
2969 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "Just holding" : "Shooting"; break;
2973 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
2975 case INVEN_RIGHT: p = (left_hander ? "On left hand" : "On right hand"); break;
2979 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
2981 case INVEN_LEFT: p = (left_hander ? "On right hand" : "On left hand"); break;
2985 case INVEN_NECK: p = " ¼ó"; break;
2987 case INVEN_NECK: p = "Around neck"; break;
2991 case INVEN_LITE: p = " ¸÷¸»"; break;
2993 case INVEN_LITE: p = "Light source"; break;
2997 case INVEN_BODY: p = " ÂÎ"; break;
2999 case INVEN_BODY: p = "On body"; break;
3003 case INVEN_OUTER: p = "ÂΤξå"; break;
3005 case INVEN_OUTER: p = "About body"; break;
3009 case INVEN_HEAD: p = " Ƭ"; break;
3011 case INVEN_HEAD: p = "On head"; break;
3015 case INVEN_HANDS: p = " ¼ê"; break;
3017 case INVEN_HANDS: p = "On hands"; break;
3021 case INVEN_FEET: p = " "; break;
3023 case INVEN_FEET: p = "On feet"; break;
3027 default: p = "¥¶¥Ã¥¯"; break;
3029 default: p = "In pack"; break;
3033 /* Return the result */
3039 * Return a string describing how a given item is being worn.
3040 * Currently, only used for items in the equipment, not inventory.
3042 cptr describe_use(int i)
3049 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->migite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
3051 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "just lifting" : (p_ptr->migite ? "attacking monsters with" : "wearing on your arm"); break;
3055 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->hidarite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
3057 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "just lifting" : (p_ptr->hidarite ? "attacking monsters with" : "wearing on your arm"); break;
3061 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î" : "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
3063 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "just holding" : "shooting missiles with"; break;
3067 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3069 case INVEN_RIGHT: p = (left_hander ? "wearing on your left hand" : "wearing on your right hand"); break;
3073 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3075 case INVEN_LEFT: p = (left_hander ? "wearing on your right hand" : "wearing on your left hand"); break;
3079 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
3081 case INVEN_NECK: p = "wearing around your neck"; break;
3085 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
3087 case INVEN_LITE: p = "using to light the way"; break;
3091 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
3093 case INVEN_BODY: p = "wearing on your body"; break;
3097 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
3099 case INVEN_OUTER: p = "wearing on your back"; break;
3103 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
3105 case INVEN_HEAD: p = "wearing on your head"; break;
3109 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
3111 case INVEN_HANDS: p = "wearing on your hands"; break;
3115 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
3117 case INVEN_FEET: p = "wearing on your feet"; break;
3121 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
3123 default: p = "carrying in your pack"; break;
3127 /* Return the result */
3132 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
3134 bool check_book_realm(const byte book_tval, const byte book_sval)
3136 if (book_tval < TV_LIFE_BOOK) return FALSE;
3137 if (p_ptr->pclass == CLASS_SORCERER)
3139 return is_magic(tval2realm(book_tval));
3141 else if (p_ptr->pclass == CLASS_RED_MAGE)
3143 if (is_magic(tval2realm(book_tval)))
3144 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
3146 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
3151 * Check an item against the item tester info
3153 bool item_tester_okay(object_type *o_ptr)
3155 /* Hack -- allow listing empty slots */
3156 if (item_tester_full) return (TRUE);
3158 /* Require an item */
3159 if (!o_ptr->k_idx) return (FALSE);
3161 /* Hack -- ignore "gold" */
3162 if (o_ptr->tval == TV_GOLD)
3165 extern bool show_gold_on_floor;
3167 if (!show_gold_on_floor) return (FALSE);
3170 /* Check the tval */
3171 if (item_tester_tval)
3173 /* Is it a spellbook? If so, we need a hack -- TY */
3174 if ((item_tester_tval <= TV_DEATH_BOOK) &&
3175 (item_tester_tval >= TV_LIFE_BOOK))
3176 return check_book_realm(o_ptr->tval, o_ptr->sval);
3178 if (item_tester_tval != o_ptr->tval) return (FALSE);
3181 /* Check the hook */
3182 if (item_tester_hook)
3184 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
3195 * Choice window "shadow" of the "show_inven()" function
3197 void display_inven(void)
3199 register int i, n, z = 0;
3201 byte attr = TERM_WHITE;
3203 char o_name[MAX_NLEN];
3207 Term_get_size(&wid, &hgt);
3209 /* Find the "final" slot */
3210 for (i = 0; i < INVEN_PACK; i++)
3212 o_ptr = &inventory[i];
3214 /* Skip non-objects */
3215 if (!o_ptr->k_idx) continue;
3221 /* Display the pack */
3222 for (i = 0; i < z; i++)
3224 /* Examine the item */
3225 o_ptr = &inventory[i];
3227 /* Start with an empty "index" */
3228 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
3230 /* Is this item "acceptable"? */
3231 if (item_tester_okay(o_ptr))
3233 /* Prepare an "index" */
3234 tmp_val[0] = index_to_label(i);
3236 /* Bracket the "index" --(-- */
3240 /* Display the index (or blank space) */
3241 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
3243 /* Obtain an item description */
3244 object_desc(o_name, o_ptr, 0);
3246 /* Obtain the length of the description */
3250 attr = tval_to_attr[o_ptr->tval % 128];
3252 /* Grey out charging items */
3258 /* Display the entry itself */
3259 Term_putstr(3, i, n, attr, o_name);
3261 /* Erase the rest of the line */
3262 Term_erase(3+n, i, 255);
3264 /* Display the weight if needed */
3267 int wgt = o_ptr->weight * o_ptr->number;
3269 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
3271 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3274 prt(tmp_val, i, wid - 9);
3278 /* Erase the rest of the window */
3279 for (i = z; i < hgt; i++)
3281 /* Erase the line */
3282 Term_erase(0, i, 255);
3289 * Choice window "shadow" of the "show_equip()" function
3291 void display_equip(void)
3295 byte attr = TERM_WHITE;
3297 char o_name[MAX_NLEN];
3301 Term_get_size(&wid, &hgt);
3303 /* Display the equipment */
3304 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
3306 /* Examine the item */
3307 o_ptr = &inventory[i];
3309 /* Start with an empty "index" */
3310 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
3312 /* Is this item "acceptable"? */
3313 if (select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr))
3315 /* Prepare an "index" */
3316 tmp_val[0] = index_to_label(i);
3318 /* Bracket the "index" --(-- */
3322 /* Display the index (or blank space) */
3323 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
3325 /* Obtain an item description */
3326 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
3329 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
3331 strcpy(o_name, "(wielding with two-hands)");
3337 object_desc(o_name, o_ptr, 0);
3338 attr = tval_to_attr[o_ptr->tval % 128];
3341 /* Obtain the length of the description */
3344 /* Grey out charging items */
3350 /* Display the entry itself */
3351 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
3353 /* Erase the rest of the line */
3354 Term_erase(3+n, i - INVEN_RARM, 255);
3356 /* Display the weight (if needed) */
3359 int wgt = o_ptr->weight * o_ptr->number;
3361 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
3363 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3366 prt(tmp_val, i - INVEN_RARM, wid - (show_labels ? 28 : 9));
3369 /* Display the slot description (if needed) */
3372 Term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
3373 prt(mention_use(i), i - INVEN_RARM, wid - 15);
3377 /* Erase the rest of the window */
3378 for (i = INVEN_TOTAL - INVEN_RARM; i < hgt; i++)
3380 /* Clear that line */
3381 Term_erase(0, i, 255);
3387 * Find the "first" inventory object with the given "tag".
3389 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
3390 * inscription of an object. Alphabetical characters don't work as a
3393 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
3394 * and "x" is the "current" command_cmd code.
3396 static bool get_tag(int *cp, char tag, int mode)
3401 /* Extract index from mode */
3406 end = INVEN_TOTAL - 1;
3411 end = INVEN_PACK - 1;
3418 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
3420 /* Check every inventory object */
3421 for (i = start; i <= end; i++)
3423 object_type *o_ptr = &inventory[i];
3425 /* Skip non-objects */
3426 if (!o_ptr->k_idx) continue;
3428 /* Skip empty inscriptions */
3429 if (!o_ptr->inscription) continue;
3431 /* Skip non-choice */
3432 if (!item_tester_okay(o_ptr)) continue;
3435 s = my_strchr(quark_str(o_ptr->inscription), '@');
3437 /* Process all tags */
3440 /* Check the special tags */
3441 if ((s[1] == command_cmd) && (s[2] == tag))
3443 /* Save the actual inventory ID */
3450 /* Find another '@' */
3451 s = my_strchr(s + 1, '@');
3456 /**** Find a tag in the form of {@#} (allows only numerals) ***/
3458 /* Don't allow {@#} with '#' being alphabet */
3459 if (tag < '0' || '9' < tag)
3465 /* Check every object */
3466 for (i = start; i <= end; i++)
3468 object_type *o_ptr = &inventory[i];
3470 /* Skip non-objects */
3471 if (!o_ptr->k_idx) continue;
3473 /* Skip empty inscriptions */
3474 if (!o_ptr->inscription) continue;
3476 /* Skip non-choice */
3477 if (!item_tester_okay(o_ptr)) continue;
3480 s = my_strchr(quark_str(o_ptr->inscription), '@');
3482 /* Process all tags */
3485 /* Check the normal tags */
3488 /* Save the actual inventory ID */
3495 /* Find another '@' */
3496 s = my_strchr(s + 1, '@');
3506 * Find the "first" floor object with the given "tag".
3508 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
3509 * inscription of an object. Alphabetical characters don't work as a
3512 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
3513 * and "x" is the "current" command_cmd code.
3515 static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
3520 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
3522 /* Check every object in the grid */
3523 for (i = 0; i < floor_num && i < 23; i++)
3525 object_type *o_ptr = &o_list[floor_list[i]];
3527 /* Skip empty inscriptions */
3528 if (!o_ptr->inscription) continue;
3531 s = my_strchr(quark_str(o_ptr->inscription), '@');
3533 /* Process all tags */
3536 /* Check the special tags */
3537 if ((s[1] == command_cmd) && (s[2] == tag))
3539 /* Save the actual floor object ID */
3546 /* Find another '@' */
3547 s = my_strchr(s + 1, '@');
3552 /**** Find a tag in the form of {@#} (allows only numerals) ***/
3554 /* Don't allow {@#} with '#' being alphabet */
3555 if (tag < '0' || '9' < tag)
3561 /* Check every object in the grid */
3562 for (i = 0; i < floor_num && i < 23; i++)
3564 object_type *o_ptr = &o_list[floor_list[i]];
3566 /* Skip empty inscriptions */
3567 if (!o_ptr->inscription) continue;
3570 s = my_strchr(quark_str(o_ptr->inscription), '@');
3572 /* Process all tags */
3575 /* Check the normal tags */
3578 /* Save the floor object ID */
3585 /* Find another '@' */
3586 s = my_strchr(s + 1, '@');
3596 * Move around label characters with correspond tags
3598 static void prepare_label_string(char *label, int mode)
3600 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
3601 int offset = (mode == USE_EQUIP) ? INVEN_RARM : 0;
3604 /* Prepare normal labels */
3605 strcpy(label, alphabet_chars);
3607 /* Move each label */
3608 for (i = 0; i < 52; i++)
3611 char c = alphabet_chars[i];
3613 /* Find a tag with this label */
3614 if (get_tag(&index, c, mode))
3616 /* Delete the overwritten label */
3617 if (label[i] == c) label[i] = ' ';
3619 /* Move the label to the place of corresponding tag */
3620 label[index - offset] = c;
3627 * Move around label characters with correspond tags (floor version)
3629 static void prepare_label_string_floor(char *label, int floor_list[], int floor_num)
3631 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
3634 /* Prepare normal labels */
3635 strcpy(label, alphabet_chars);
3637 /* Move each label */
3638 for (i = 0; i < 52; i++)
3641 char c = alphabet_chars[i];
3643 /* Find a tag with this label */
3644 if (get_tag_floor(&index, c, floor_list, floor_num))
3646 /* Delete the overwritten label */
3647 if (label[i] == c) label[i] = ' ';
3649 /* Move the label to the place of corresponding tag */
3657 * Display the inventory.
3659 * Hack -- do not display "trailing" empty slots
3661 int show_inven(int target_item)
3663 int i, j, k, l, z = 0;
3664 int col, cur_col, len;
3666 char o_name[MAX_NLEN];
3670 char out_desc[23][MAX_NLEN];
3671 int target_item_label = 0;
3673 char inven_label[52 + 1];
3675 /* Starting column */
3679 Term_get_size(&wid, &hgt);
3681 /* Default "max-length" */
3682 len = wid - col - 1;
3685 /* Find the "final" slot */
3686 for (i = 0; i < INVEN_PACK; i++)
3688 o_ptr = &inventory[i];
3690 /* Skip non-objects */
3691 if (!o_ptr->k_idx) continue;
3697 prepare_label_string(inven_label, USE_INVEN);
3699 /* Display the inventory */
3700 for (k = 0, i = 0; i < z; i++)
3702 o_ptr = &inventory[i];
3704 /* Is this item acceptable? */
3705 if (!item_tester_okay(o_ptr)) continue;
3707 /* Describe the object */
3708 object_desc(o_name, o_ptr, 0);
3710 /* Save the object index, color, and description */
3712 out_color[k] = tval_to_attr[o_ptr->tval % 128];
3714 /* Grey out charging items */
3717 out_color[k] = TERM_L_DARK;
3720 (void)strcpy(out_desc[k], o_name);
3722 /* Find the predicted "line length" */
3723 l = strlen(out_desc[k]) + 5;
3725 /* Be sure to account for the weight */
3726 if (show_weights) l += 9;
3728 /* Account for icon if displayed */
3729 if (show_item_graph)
3732 if (use_bigtile) l++;
3735 /* Maintain the maximum length */
3736 if (l > len) len = l;
3738 /* Advance to next "line" */
3742 /* Find the column to start in */
3743 col = (len > wid - 4) ? 0 : (wid - len - 1);
3745 /* Output each entry */
3746 for (j = 0; j < k; j++)
3752 o_ptr = &inventory[i];
3754 /* Clear the line */
3755 prt("", j + 1, col ? col - 2 : col);
3757 if (use_menu && target_item)
3759 if (j == (target_item-1))
3762 strcpy(tmp_val, "¡Õ");
3764 strcpy(tmp_val, "> ");
3766 target_item_label = i;
3768 else strcpy(tmp_val, " ");
3770 else if (i <= INVEN_PACK)
3772 /* Prepare an index --(-- */
3773 sprintf(tmp_val, "%c)", inven_label[i]);
3777 /* Prepare an index --(-- */
3778 sprintf(tmp_val, "%c)", index_to_label(i));
3781 /* Clear the line with the (possibly indented) index */
3782 put_str(tmp_val, j + 1, col);
3786 /* Display graphics for object, if desired */
3787 if (show_item_graph)
3789 byte a = object_attr(o_ptr);
3790 char c = object_char(o_ptr);
3793 if (a & 0x80) a |= 0x40;
3796 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
3797 if (use_bigtile) cur_col++;
3803 /* Display the entry itself */
3804 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
3806 /* Display the weight if needed */
3809 int wgt = o_ptr->weight * o_ptr->number;
3811 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
3813 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3816 prt(tmp_val, j + 1, wid - 9);
3820 /* Make a "shadow" below the list (only if needed) */
3821 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
3823 /* Save the new column */
3826 return target_item_label;
3832 * Display the equipment.
3834 int show_equip(int target_item)
3837 int col, cur_col, len;
3840 char o_name[MAX_NLEN];
3843 char out_desc[23][MAX_NLEN];
3844 int target_item_label = 0;
3846 char equip_label[52 + 1];
3848 /* Starting column */
3852 Term_get_size(&wid, &hgt);
3854 /* Maximal length */
3855 len = wid - col - 1;
3858 /* Scan the equipment list */
3859 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
3861 o_ptr = &inventory[i];
3863 /* Is this item acceptable? */
3864 if (!(select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr)) &&
3865 (!((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute) ||
3866 item_tester_no_ryoute)) continue;
3869 object_desc(o_name, o_ptr, 0);
3871 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
3874 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
3876 (void)strcpy(out_desc[k],"(wielding with two-hands)");
3878 out_color[k] = TERM_WHITE;
3882 (void)strcpy(out_desc[k], o_name);
3883 out_color[k] = tval_to_attr[o_ptr->tval % 128];
3887 /* Grey out charging items */
3890 out_color[k] = TERM_L_DARK;
3893 /* Extract the maximal length (see below) */
3895 l = strlen(out_desc[k]) + (2 + 1);
3897 l = strlen(out_desc[k]) + (2 + 3);
3901 /* Increase length for labels (if needed) */
3903 if (show_labels) l += (7 + 2);
3905 if (show_labels) l += (14 + 2);
3909 /* Increase length for weight (if needed) */
3910 if (show_weights) l += 9;
3912 if (show_item_graph) l += 2;
3914 /* Maintain the max-length */
3915 if (l > len) len = l;
3917 /* Advance the entry */
3921 /* Hack -- Find a column to start in */
3923 col = (len > wid - 6) ? 0 : (wid - len - 1);
3925 col = (len > wid - 4) ? 0 : (wid - len - 1);
3928 prepare_label_string(equip_label, USE_EQUIP);
3930 /* Output each entry */
3931 for (j = 0; j < k; j++)
3937 o_ptr = &inventory[i];
3939 /* Clear the line */
3940 prt("", j + 1, col ? col - 2 : col);
3942 if (use_menu && target_item)
3944 if (j == (target_item-1))
3947 strcpy(tmp_val, "¡Õ");
3949 strcpy(tmp_val, "> ");
3951 target_item_label = i;
3953 else strcpy(tmp_val, " ");
3955 else if (i >= INVEN_RARM)
3957 /* Prepare an index --(-- */
3958 sprintf(tmp_val, "%c)", equip_label[i - INVEN_RARM]);
3962 /* Prepare an index --(-- */
3963 sprintf(tmp_val, "%c)", index_to_label(i));
3966 /* Clear the line with the (possibly indented) index */
3967 put_str(tmp_val, j+1, col);
3971 /* Display graphics for object, if desired */
3972 if (show_item_graph)
3974 byte a = object_attr(o_ptr);
3975 char c = object_char(o_ptr);
3978 if (a & 0x80) a |= 0x40;
3981 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
3982 if (use_bigtile) cur_col++;
3990 /* Mention the use */
3992 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
3994 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
3997 put_str(tmp_val, j+1, cur_col);
3999 /* Display the entry itself */
4001 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
4003 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
4010 /* Display the entry itself */
4011 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
4014 /* Display the weight if needed */
4017 int wgt = o_ptr->weight * o_ptr->number;
4019 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4021 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
4024 prt(tmp_val, j + 1, wid - 9);
4028 /* Make a "shadow" below the list (only if needed) */
4029 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4031 /* Save the new column */
4034 return target_item_label;
4041 * Flip "inven" and "equip" in any sub-windows
4043 void toggle_inven_equip(void)
4048 for (j = 0; j < 8; j++)
4051 if (!angband_term[j]) continue;
4053 /* Flip inven to equip */
4054 if (window_flag[j] & (PW_INVEN))
4057 window_flag[j] &= ~(PW_INVEN);
4058 window_flag[j] |= (PW_EQUIP);
4061 p_ptr->window |= (PW_EQUIP);
4064 /* Flip inven to equip */
4065 else if (window_flag[j] & (PW_EQUIP))
4068 window_flag[j] &= ~(PW_EQUIP);
4069 window_flag[j] |= (PW_INVEN);
4072 p_ptr->window |= (PW_INVEN);
4080 * Verify the choice of an item.
4082 * The item can be negative to mean "item on floor".
4084 static bool verify(cptr prompt, int item)
4086 char o_name[MAX_NLEN];
4087 char out_val[MAX_NLEN+20];
4094 o_ptr = &inventory[item];
4100 o_ptr = &o_list[0 - item];
4104 object_desc(o_name, o_ptr, 0);
4108 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
4110 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
4115 return (get_check(out_val));
4120 * Hack -- allow user to "prevent" certain choices
4122 * The item can be negative to mean "item on floor".
4124 static bool get_item_allow(int item)
4130 if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
4135 o_ptr = &inventory[item];
4141 o_ptr = &o_list[0 - item];
4144 /* No inscription */
4145 if (!o_ptr->inscription) return (TRUE);
4148 s = my_strchr(quark_str(o_ptr->inscription), '!');
4150 /* Process preventions */
4153 /* Check the "restriction" */
4154 if ((s[1] == command_cmd) || (s[1] == '*'))
4156 /* Verify the choice */
4158 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
4160 if (!verify("Really try", item)) return (FALSE);
4165 /* Find another '!' */
4166 s = my_strchr(s + 1, '!');
4176 * Auxiliary function for "get_item()" -- test an index
4178 static bool get_item_okay(int i)
4181 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
4183 if (select_ring_slot) return is_ring_slot(i);
4185 /* Verify the item */
4186 if (!item_tester_okay(&inventory[i])) return (FALSE);
4195 * Determine whether get_item() can get some item or not
4196 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
4198 bool can_get_item(void)
4200 int j, floor_list[23], floor_num = 0;
4202 for (j = 0; j < INVEN_TOTAL; j++)
4203 if (item_tester_okay(&inventory[j]))
4206 floor_num = scan_floor(floor_list, py, px, 0x03);
4214 * Let the user select an item, save its "index"
4216 * Return TRUE only if an acceptable item was chosen by the user.
4218 * The selected item must satisfy the "item_tester_hook()" function,
4219 * if that hook is set, and the "item_tester_tval", if that value is set.
4221 * All "item_tester" restrictions are cleared before this function returns.
4223 * The user is allowed to choose acceptable items from the equipment,
4224 * inventory, or floor, respectively, if the proper flag was given,
4225 * and there are any acceptable items in that location.
4227 * The equipment or inventory are displayed (even if no acceptable
4228 * items are in that location) if the proper flag was given.
4230 * If there are no acceptable items available anywhere, and "str" is
4231 * not NULL, then it will be used as the text of a warning message
4232 * before the function returns.
4234 * Note that the user must press "-" to specify the item on the floor,
4235 * and there is no way to "examine" the item on the floor, while the
4236 * use of "capital" letters will "examine" an inventory/equipment item,
4237 * and prompt for its use.
4239 * If a legal item is selected from the inventory, we save it in "cp"
4240 * directly (0 to 35), and return TRUE.
4242 * If a legal item is selected from the floor, we save it in "cp" as
4243 * a negative (-1 to -511), and return TRUE.
4245 * If no item is available, we do nothing to "cp", and we display a
4246 * warning message, using "str" if available, and return FALSE.
4248 * If no item is selected, we do nothing to "cp", and return FALSE.
4250 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
4251 * to allow the user to enter a command while viewing those screens, and
4252 * also to induce "auto-enter" of stores, and other such stuff.
4254 * Global "p_ptr->command_see" may be set before calling this function to start
4255 * out in "browse" mode. It is cleared before this function returns.
4257 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
4258 * If it is TRUE then we are viewing inventory, else equipment.
4260 * We always erase the prompt when we are done, leaving a blank line,
4261 * or a warning message, if appropriate, if no items are available.
4263 bool get_item(int *cp, cptr pmt, cptr str, int mode)
4265 s16b this_o_idx, next_o_idx = 0;
4269 int j, k, i1, i2, e1, e2;
4279 bool allow_floor = FALSE;
4281 bool toggle = FALSE;
4287 extern bool select_the_force;
4289 int menu_line = (use_menu ? 1 : 0);
4295 static char prev_tag = '\0';
4296 char cur_tag = '\0';
4298 #endif /* ALLOW_REPEAT */
4300 #ifdef ALLOW_EASY_FLOOR /* TNB */
4302 if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
4304 #endif /* ALLOW_EASY_FLOOR -- TNB */
4307 if (mode & USE_EQUIP) equip = TRUE;
4308 if (mode & USE_INVEN) inven = TRUE;
4309 if (mode & USE_FLOOR) floor = TRUE;
4313 /* Get the item index */
4314 if (repeat_pull(cp))
4317 if (select_the_force && (*cp == INVEN_FORCE))
4319 item_tester_tval = 0;
4320 item_tester_hook = NULL;
4321 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4326 else if (floor && (*cp < 0))
4333 /* Acquire object */
4336 /* Validate the item */
4337 if (item_tester_okay(o_ptr))
4339 /* Forget restrictions */
4340 item_tester_tval = 0;
4341 item_tester_hook = NULL;
4342 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4349 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
4350 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
4352 if (prev_tag && command_cmd)
4354 /* Look up the tag and validate the item */
4355 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
4356 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
4357 else if (!get_item_okay(k)) /* Reject */;
4360 /* Accept that choice */
4363 /* Forget restrictions */
4364 item_tester_tval = 0;
4365 item_tester_hook = NULL;
4366 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4372 prev_tag = '\0'; /* prev_tag is no longer effective */
4375 /* Verify the item */
4376 else if (get_item_okay(*cp))
4378 /* Forget restrictions */
4379 item_tester_tval = 0;
4380 item_tester_hook = NULL;
4381 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4389 #endif /* ALLOW_REPEAT */
4392 /* Paranoia XXX XXX XXX */
4399 /* No item selected */
4403 /* Full inventory */
4405 i2 = INVEN_PACK - 1;
4407 /* Forbid inventory */
4408 if (!inven) i2 = -1;
4411 for (j = 0; j < INVEN_PACK; j++)
4412 if (item_tester_okay(&inventory[j])) max_inven++;
4415 /* Restrict inventory indexes */
4416 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
4417 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
4420 /* Full equipment */
4422 e2 = INVEN_TOTAL - 1;
4424 /* Forbid equipment */
4425 if (!equip) e2 = -1;
4428 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
4429 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
4430 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
4433 /* Restrict equipment indexes */
4434 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
4435 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
4437 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
4441 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
4443 else if (p_ptr->hidarite) e1 = INVEN_RARM;
4447 /* Restrict floor usage */
4450 /* Scan all objects in the grid */
4451 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
4455 /* Acquire object */
4456 o_ptr = &o_list[this_o_idx];
4458 /* Acquire next object */
4459 next_o_idx = o_ptr->next_o_idx;
4461 /* Accept the item on the floor if legal */
4462 if (item_tester_okay(o_ptr) && (o_ptr->marked & OM_FOUND)) allow_floor = TRUE;
4466 /* Require at least one legal choice */
4467 if (!allow_floor && (i1 > i2) && (e1 > e2))
4469 /* Cancel p_ptr->command_see */
4470 command_see = FALSE;
4478 if (select_the_force) {
4484 /* Analyze choices */
4487 /* Hack -- Start on equipment if requested */
4488 if (command_see && command_wrk && equip)
4493 /* Use inventory if allowed */
4496 command_wrk = FALSE;
4499 /* Use equipment if allowed */
4505 /* Use inventory for floor */
4508 command_wrk = FALSE;
4514 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
4516 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
4518 /* Hack -- start out in "display" mode */
4526 /* Repeat until done */
4529 int get_item_label = 0;
4536 for (j = 0; j < 8; j++)
4539 if (!angband_term[j]) continue;
4541 /* Count windows displaying inven */
4542 if (window_flag[j] & (PW_INVEN)) ni++;
4544 /* Count windows displaying equip */
4545 if (window_flag[j] & (PW_EQUIP)) ne++;
4548 /* Toggle if needed */
4549 if ((command_wrk && ni && !ne) ||
4550 (!command_wrk && !ni && ne))
4553 toggle_inven_equip();
4560 p_ptr->window |= (PW_INVEN | PW_EQUIP);
4562 /* Redraw windows */
4566 /* Inventory screen */
4569 /* Redraw if needed */
4570 if (command_see) get_item_label = show_inven(menu_line);
4573 /* Equipment screen */
4576 /* Redraw if needed */
4577 if (command_see) get_item_label = show_equip(menu_line);
4580 /* Viewing inventory */
4583 /* Begin the prompt */
4585 sprintf(out_val, "»ý¤Áʪ:");
4587 sprintf(out_val, "Inven:");
4590 /* Some legal items */
4591 if ((i1 <= i2) && !use_menu)
4593 /* Build the prompt */
4595 sprintf(tmp_val, "%c-%c,'(',')',",
4597 sprintf(tmp_val, " %c-%c,'(',')',",
4599 index_to_label(i1), index_to_label(i2));
4602 strcat(out_val, tmp_val);
4605 /* Indicate ability to "view" */
4607 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
4609 if (!command_see && !use_menu) strcat(out_val, " * to see,");
4614 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
4616 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
4620 /* Viewing equipment */
4623 /* Begin the prompt */
4625 sprintf(out_val, "ÁõÈ÷ÉÊ:");
4627 sprintf(out_val, "Equip:");
4630 /* Some legal items */
4631 if ((e1 <= e2) && !use_menu)
4633 /* Build the prompt */
4635 sprintf(tmp_val, "%c-%c,'(',')',",
4637 sprintf(tmp_val, " %c-%c,'(',')',",
4639 index_to_label(e1), index_to_label(e2));
4642 strcat(out_val, tmp_val);
4645 /* Indicate ability to "view" */
4647 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
4649 if (!command_see) strcat(out_val, " * to see,");
4654 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
4656 if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
4660 /* Indicate legality of the "floor" item */
4662 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
4663 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
4665 if (allow_floor) strcat(out_val, " - for floor,");
4666 if (select_the_force) strcat(out_val, " w for the Force,");
4669 /* Finish the prompt */
4670 strcat(out_val, " ESC");
4672 /* Build the prompt */
4673 sprintf(tmp_val, "(%s) %s", out_val, pmt);
4675 /* Show the prompt */
4683 int max_line = (command_wrk ? max_equip : max_inven);
4699 menu_line += (max_line - 1);
4718 /* Verify legality */
4719 if (!inven || !equip)
4725 /* Hack -- Fix screen */
4735 /* Switch inven/equip */
4736 command_wrk = !command_wrk;
4737 max_line = (command_wrk ? max_equip : max_inven);
4738 if (menu_line > max_line) menu_line = max_line;
4740 /* Need to redraw */
4749 if (command_wrk == USE_FLOOR)
4752 (*cp) = -get_item_label;
4756 /* Validate the item */
4757 if (!get_item_okay(get_item_label))
4763 /* Allow player to "refuse" certain actions */
4764 if (!get_item_allow(get_item_label))
4770 /* Accept that choice */
4771 (*cp) = get_item_label;
4780 if (select_the_force) {
4788 if (menu_line > max_line) menu_line -= max_line;
4809 command_see = FALSE;
4829 /* Verify legality */
4830 if (!inven || !equip)
4836 /* Hack -- Fix screen */
4846 /* Switch inven/equip */
4847 command_wrk = !command_wrk;
4849 /* Need to redraw */
4855 /* Use floor item */
4858 /* Scan all objects in the grid */
4859 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
4863 /* Acquire object */
4864 o_ptr = &o_list[this_o_idx];
4866 /* Acquire next object */
4867 next_o_idx = o_ptr->next_o_idx;
4869 /* Validate the item */
4870 if (!item_tester_okay(o_ptr)) continue;
4875 /* Verify the item (if required) */
4877 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
4879 if (other_query_flag && !verify("Try", k)) continue;
4883 /* Allow player to "refuse" certain actions */
4884 if (!get_item_allow(k)) continue;
4886 /* Accept that choice */
4903 case '1': case '2': case '3':
4904 case '4': case '5': case '6':
4905 case '7': case '8': case '9':
4907 /* Look up the tag */
4908 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
4914 /* Hack -- Validate the item */
4915 if ((k < INVEN_RARM) ? !inven : !equip)
4921 /* Validate the item */
4922 if (!get_item_okay(k))
4928 /* Allow player to "refuse" certain actions */
4929 if (!get_item_allow(k))
4935 /* Accept that choice */
4941 #endif /* ALLOW_REPEAT */
4949 /* Choose "default" inventory item */
4952 k = ((i1 == i2) ? i1 : -1);
4955 /* Choose "default" equipment item */
4958 k = ((e1 == e2) ? e1 : -1);
4961 /* Validate the item */
4962 if (!get_item_okay(k))
4968 /* Allow player to "refuse" certain actions */
4969 if (!get_item_allow(k))
4975 /* Accept that choice */
4985 if (select_the_force) {
4998 bool not_found = FALSE;
5000 /* Look up the alphabetical tag */
5001 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
5006 /* Hack -- Validate the item */
5007 else if ((k < INVEN_RARM) ? !inven : !equip)
5012 /* Validate the item */
5013 else if (!get_item_okay(k))
5020 /* Accept that choice */
5026 #endif /* ALLOW_REPEAT */
5030 /* Extract "query" setting */
5031 ver = isupper(which);
5032 which = tolower(which);
5034 /* Convert letter to inventory index */
5037 if (which == '(') k = i1;
5038 else if (which == ')') k = i2;
5039 else k = label_to_inven(which);
5042 /* Convert letter to equipment index */
5045 if (which == '(') k = e1;
5046 else if (which == ')') k = e2;
5047 else k = label_to_equip(which);
5050 /* Validate the item */
5051 if (!get_item_okay(k))
5057 /* Verify the item */
5059 if (ver && !verify("ËÜÅö¤Ë", k))
5061 if (ver && !verify("Try", k))
5069 /* Allow player to "refuse" certain actions */
5070 if (!get_item_allow(k))
5076 /* Accept that choice */
5087 /* Fix the screen if necessary */
5093 /* Hack -- Cancel "display" */
5094 command_see = FALSE;
5098 /* Forget the item_tester_tval restriction */
5099 item_tester_tval = 0;
5101 item_tester_no_ryoute = FALSE;
5103 /* Forget the item_tester_hook restriction */
5104 item_tester_hook = NULL;
5107 /* Clean up 'show choices' */
5108 /* Toggle again if needed */
5109 if (toggle) toggle_inven_equip();
5112 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5118 /* Clear the prompt line */
5121 /* Warning if needed */
5122 if (oops && str) msg_print(str);
5128 if (command_cmd) prev_tag = cur_tag;
5129 #endif /* ALLOW_REPEAT */
5131 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5139 #ifdef ALLOW_EASY_FLOOR
5144 * Return a list of o_list[] indexes of items at the given cave
5145 * location. Valid flags are:
5147 * mode & 0x01 -- Item tester
5148 * mode & 0x02 -- Marked items only
5149 * mode & 0x04 -- Stop after first
5151 int scan_floor(int *items, int y, int x, int mode)
5153 int this_o_idx, next_o_idx;
5158 if (!in_bounds(y, x)) return 0;
5160 /* Scan all objects in the grid */
5161 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
5165 /* Acquire object */
5166 o_ptr = &o_list[this_o_idx];
5168 /* Acquire next object */
5169 next_o_idx = o_ptr->next_o_idx;
5172 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
5175 if ((mode & 0x02) && !(o_ptr->marked & OM_FOUND)) continue;
5177 /* Accept this item */
5178 /* XXX Hack -- Enforce limit */
5180 items[num] = this_o_idx;
5185 if (mode & 0x04) break;
5194 * Display a list of the items on the floor at the given location.
5196 int show_floor(int target_item, int y, int x, int *min_width)
5203 char o_name[MAX_NLEN];
5209 char out_desc[23][MAX_NLEN];
5210 int target_item_label = 0;
5212 int floor_list[23], floor_num;
5214 char floor_label[52 + 1];
5216 bool dont_need_to_show_weights = TRUE;
5219 Term_get_size(&wid, &hgt);
5221 /* Default length */
5222 len = MAX((*min_width), 20);
5225 /* Scan for objects in the grid, using item_tester_okay() */
5226 floor_num = scan_floor(floor_list, y, x, 0x03);
5228 /* Display the floor objects */
5229 for (k = 0, i = 0; i < floor_num && i < 23; i++)
5231 o_ptr = &o_list[floor_list[i]];
5233 /* Describe the object */
5234 object_desc(o_name, o_ptr, 0);
5236 /* Save the index */
5239 /* Acquire inventory color */
5240 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
5242 /* Save the object description */
5243 strcpy(out_desc[k], o_name);
5245 /* Find the predicted "line length" */
5246 l = strlen(out_desc[k]) + 5;
5248 /* Be sure to account for the weight */
5249 if (show_weights) l += 9;
5251 if (o_ptr->tval != TV_GOLD) dont_need_to_show_weights = FALSE;
5253 /* Maintain the maximum length */
5254 if (l > len) len = l;
5256 /* Advance to next "line" */
5260 if (show_weights && dont_need_to_show_weights) len -= 9;
5265 /* Find the column to start in */
5266 col = (len > wid - 4) ? 0 : (wid - len - 1);
5268 prepare_label_string_floor(floor_label, floor_list, floor_num);
5270 /* Output each entry */
5271 for (j = 0; j < k; j++)
5274 i = floor_list[out_index[j]];
5279 /* Clear the line */
5280 prt("", j + 1, col ? col - 2 : col);
5282 if (use_menu && target_item)
5284 if (j == (target_item-1))
5287 strcpy(tmp_val, "¡Õ");
5289 strcpy(tmp_val, "> ");
5291 target_item_label = i;
5293 else strcpy(tmp_val, " ");
5297 /* Prepare an index --(-- */
5298 sprintf(tmp_val, "%c)", floor_label[j]);
5301 /* Clear the line with the (possibly indented) index */
5302 put_str(tmp_val, j + 1, col);
5304 /* Display the entry itself */
5305 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
5307 /* Display the weight if needed */
5308 if (show_weights && (o_ptr->tval != TV_GOLD))
5310 int wgt = o_ptr->weight * o_ptr->number;
5312 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5314 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
5317 prt(tmp_val, j + 1, wid - 9);
5321 /* Make a "shadow" below the list (only if needed) */
5322 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5324 return target_item_label;
5328 * This version of get_item() is called by get_item() when
5329 * the easy_floor is on.
5331 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
5333 char n1 = ' ', n2 = ' ', which = ' ';
5335 int j, k, i1, i2, e1, e2;
5342 bool equip = (mode & USE_EQUIP) ? TRUE : FALSE;
5343 bool inven = (mode & USE_INVEN) ? TRUE : FALSE;
5344 bool floor = (mode & USE_FLOOR) ? TRUE : FALSE;
5346 bool allow_equip = FALSE;
5347 bool allow_inven = FALSE;
5348 bool allow_floor = FALSE;
5350 bool toggle = FALSE;
5355 int floor_num, floor_list[23], floor_top = 0;
5358 extern bool select_the_force;
5360 int menu_line = (use_menu ? 1 : 0);
5366 static char prev_tag = '\0';
5367 char cur_tag = '\0';
5369 /* Get the item index */
5370 if (repeat_pull(cp))
5373 if (select_the_force && (*cp == INVEN_FORCE))
5375 item_tester_tval = 0;
5376 item_tester_hook = NULL;
5377 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5382 else if (floor && (*cp < 0))
5384 if (prev_tag && command_cmd)
5386 /* Scan all objects in the grid */
5387 floor_num = scan_floor(floor_list, py, px, 0x03);
5389 /* Look up the tag */
5390 if (get_tag_floor(&k, prev_tag, floor_list, floor_num))
5392 /* Accept that choice */
5393 (*cp) = 0 - floor_list[k];
5395 /* Forget restrictions */
5396 item_tester_tval = 0;
5397 item_tester_hook = NULL;
5398 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5404 prev_tag = '\0'; /* prev_tag is no longer effective */
5407 /* Validate the item */
5408 else if (item_tester_okay(&o_list[0 - (*cp)]))
5410 /* Forget restrictions */
5411 item_tester_tval = 0;
5412 item_tester_hook = NULL;
5413 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5420 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
5421 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
5423 if (prev_tag && command_cmd)
5425 /* Look up the tag and validate the item */
5426 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
5427 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
5428 else if (!get_item_okay(k)) /* Reject */;
5431 /* Accept that choice */
5434 /* Forget restrictions */
5435 item_tester_tval = 0;
5436 item_tester_hook = NULL;
5437 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5443 prev_tag = '\0'; /* prev_tag is no longer effective */
5446 /* Verify the item */
5447 else if (get_item_okay(*cp))
5449 /* Forget restrictions */
5450 item_tester_tval = 0;
5451 item_tester_hook = NULL;
5452 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5460 #endif /* ALLOW_REPEAT */
5463 /* Paranoia XXX XXX XXX */
5470 /* No item selected */
5474 /* Full inventory */
5476 i2 = INVEN_PACK - 1;
5478 /* Forbid inventory */
5479 if (!inven) i2 = -1;
5482 for (j = 0; j < INVEN_PACK; j++)
5483 if (item_tester_okay(&inventory[j])) max_inven++;
5486 /* Restrict inventory indexes */
5487 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5488 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5491 /* Full equipment */
5493 e2 = INVEN_TOTAL - 1;
5495 /* Forbid equipment */
5496 if (!equip) e2 = -1;
5499 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5500 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
5501 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5504 /* Restrict equipment indexes */
5505 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5506 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5508 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
5512 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
5514 else if (p_ptr->hidarite) e1 = INVEN_RARM;
5518 /* Count "okay" floor items */
5521 /* Restrict floor usage */
5524 /* Scan all objects in the grid */
5525 floor_num = scan_floor(floor_list, py, px, 0x03);
5528 /* Accept inventory */
5529 if (i1 <= i2) allow_inven = TRUE;
5531 /* Accept equipment */
5532 if (e1 <= e2) allow_equip = TRUE;
5535 if (floor_num) allow_floor = TRUE;
5537 /* Require at least one legal choice */
5538 if (!allow_inven && !allow_equip && !allow_floor)
5540 /* Cancel p_ptr->command_see */
5541 command_see = FALSE;
5549 if (select_the_force) {
5555 /* Analyze choices */
5558 /* Hack -- Start on equipment if requested */
5559 if (command_see && (command_wrk == (USE_EQUIP))
5562 command_wrk = (USE_EQUIP);
5565 /* Use inventory if allowed */
5566 else if (allow_inven)
5568 command_wrk = (USE_INVEN);
5571 /* Use equipment if allowed */
5572 else if (allow_equip)
5574 command_wrk = (USE_EQUIP);
5577 /* Use floor if allowed */
5578 else if (allow_floor)
5580 command_wrk = (USE_FLOOR);
5585 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5587 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5589 /* Hack -- start out in "display" mode */
5596 /* Repeat until done */
5599 int get_item_label = 0;
5606 for (j = 0; j < 8; j++)
5609 if (!angband_term[j]) continue;
5611 /* Count windows displaying inven */
5612 if (window_flag[j] & (PW_INVEN)) ni++;
5614 /* Count windows displaying equip */
5615 if (window_flag[j] & (PW_EQUIP)) ne++;
5618 /* Toggle if needed */
5619 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
5620 (command_wrk == (USE_INVEN) && !ni && ne))
5623 toggle_inven_equip();
5630 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5632 /* Redraw windows */
5635 /* Inventory screen */
5636 if (command_wrk == (USE_INVEN))
5638 /* Extract the legal requests */
5642 /* Redraw if needed */
5643 if (command_see) get_item_label = show_inven(menu_line);
5646 /* Equipment screen */
5647 else if (command_wrk == (USE_EQUIP))
5649 /* Extract the legal requests */
5650 n1 = I2A(e1 - INVEN_RARM);
5651 n2 = I2A(e2 - INVEN_RARM);
5653 /* Redraw if needed */
5654 if (command_see) get_item_label = show_equip(menu_line);
5658 else if (command_wrk == (USE_FLOOR))
5661 k = MIN(floor_top + 23, floor_num) - 1;
5663 /* Extract the legal requests */
5664 n1 = I2A(j - floor_top);
5665 n2 = I2A(k - floor_top);
5667 /* Redraw if needed */
5668 if (command_see) get_item_label = show_floor(menu_line, py, px, &min_width);
5671 /* Viewing inventory */
5672 if (command_wrk == (USE_INVEN))
5674 /* Begin the prompt */
5676 sprintf(out_val, "»ý¤Áʪ:");
5678 sprintf(out_val, "Inven:");
5683 /* Build the prompt */
5685 sprintf(tmp_val, "%c-%c,'(',')',",
5687 sprintf(tmp_val, " %c-%c,'(',')',",
5689 index_to_label(i1), index_to_label(i2));
5692 strcat(out_val, tmp_val);
5695 /* Indicate ability to "view" */
5697 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5699 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5707 strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
5708 else if (allow_floor)
5709 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
5711 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
5714 strcat(out_val, " / for Equip,");
5715 else if (allow_floor)
5716 strcat(out_val, " 6 for Equip,");
5718 strcat(out_val, " 4 or 6 for Equip,");
5727 strcat(out_val, " '-'¾²¾å,");
5728 else if (allow_equip)
5729 strcat(out_val, " '4' ¾²¾å,");
5731 strcat(out_val, " '4'or'6' ¾²¾å,");
5734 strcat(out_val, " - for floor,");
5735 else if (allow_equip)
5736 strcat(out_val, " 4 for floor,");
5738 strcat(out_val, " 4 or 6 for floor,");
5743 /* Viewing equipment */
5744 else if (command_wrk == (USE_EQUIP))
5746 /* Begin the prompt */
5748 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5750 sprintf(out_val, "Equip:");
5755 /* Build the prompt */
5757 sprintf(tmp_val, "%c-%c,'(',')',",
5759 sprintf(tmp_val, " %c-%c,'(',')',",
5761 index_to_label(e1), index_to_label(e2));
5764 strcat(out_val, tmp_val);
5767 /* Indicate ability to "view" */
5769 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5771 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5779 strcat(out_val, " '/' »ý¤Áʪ,");
5780 else if (allow_floor)
5781 strcat(out_val, " '4' »ý¤Áʪ,");
5783 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
5786 strcat(out_val, " / for Inven,");
5787 else if (allow_floor)
5788 strcat(out_val, " 4 for Inven,");
5790 strcat(out_val, " 4 or 6 for Inven,");
5799 strcat(out_val, " '-'¾²¾å,");
5800 else if (allow_inven)
5801 strcat(out_val, " '6' ¾²¾å,");
5803 strcat(out_val, " '4'or'6' ¾²¾å,");
5806 strcat(out_val, " - for floor,");
5807 else if (allow_inven)
5808 strcat(out_val, " 6 for floor,");
5810 strcat(out_val, " 4 or 6 for floor,");
5816 else if (command_wrk == (USE_FLOOR))
5818 /* Begin the prompt */
5820 sprintf(out_val, "¾²¾å:");
5822 sprintf(out_val, "Floor:");
5827 /* Build the prompt */
5829 sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
5831 sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
5835 strcat(out_val, tmp_val);
5838 /* Indicate ability to "view" */
5840 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5842 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5847 if (allow_inven && allow_equip)
5850 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
5852 strcat(out_val, " 4 for Equip, 6 for Inven,");
5855 else if (allow_inven)
5858 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
5860 strcat(out_val, " 4 or 6 for Inven,");
5863 else if (allow_equip)
5866 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
5868 strcat(out_val, " 4 or 6 for Equip,");
5873 else if (allow_inven)
5876 strcat(out_val, " '/' »ý¤Áʪ,");
5878 strcat(out_val, " / for Inven,");
5881 else if (allow_equip)
5884 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
5886 strcat(out_val, " / for Equip,");
5891 if (command_see && !use_menu)
5894 strcat(out_val, " Enter ¼¡,");
5896 strcat(out_val, " Enter for scroll down,");
5903 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
5905 if (select_the_force) strcat(out_val, " w for the Force,");
5908 /* Finish the prompt */
5909 strcat(out_val, " ESC");
5911 /* Build the prompt */
5912 sprintf(tmp_val, "(%s) %s", out_val, pmt);
5914 /* Show the prompt */
5923 if (command_wrk == USE_INVEN) max_line = max_inven;
5924 else if (command_wrk == USE_EQUIP) max_line = max_equip;
5925 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
5941 menu_line += (max_line - 1);
5957 /* Verify legality */
5958 if (command_wrk == (USE_INVEN))
5960 if (allow_floor) command_wrk = USE_FLOOR;
5961 else if (allow_equip) command_wrk = USE_EQUIP;
5968 else if (command_wrk == (USE_EQUIP))
5970 if (allow_inven) command_wrk = USE_INVEN;
5971 else if (allow_floor) command_wrk = USE_FLOOR;
5978 else if (command_wrk == (USE_FLOOR))
5980 if (allow_equip) command_wrk = USE_EQUIP;
5981 else if (allow_inven) command_wrk = USE_INVEN;
5994 /* Hack -- Fix screen */
6004 /* Switch inven/equip */
6005 if (command_wrk == USE_INVEN) max_line = max_inven;
6006 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6007 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6008 if (menu_line > max_line) menu_line = max_line;
6010 /* Need to redraw */
6018 /* Verify legality */
6019 if (command_wrk == (USE_INVEN))
6021 if (allow_equip) command_wrk = USE_EQUIP;
6022 else if (allow_floor) command_wrk = USE_FLOOR;
6029 else if (command_wrk == (USE_EQUIP))
6031 if (allow_floor) command_wrk = USE_FLOOR;
6032 else if (allow_inven) command_wrk = USE_INVEN;
6039 else if (command_wrk == (USE_FLOOR))
6041 if (allow_inven) command_wrk = USE_INVEN;
6042 else if (allow_equip) command_wrk = USE_EQUIP;
6055 /* Hack -- Fix screen */
6065 /* Switch inven/equip */
6066 if (command_wrk == USE_INVEN) max_line = max_inven;
6067 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6068 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6069 if (menu_line > max_line) menu_line = max_line;
6071 /* Need to redraw */
6080 if (command_wrk == USE_FLOOR)
6083 (*cp) = -get_item_label;
6087 /* Validate the item */
6088 if (!get_item_okay(get_item_label))
6094 /* Allow player to "refuse" certain actions */
6095 if (!get_item_allow(get_item_label))
6101 /* Accept that choice */
6102 (*cp) = get_item_label;
6111 if (select_the_force) {
6119 if (menu_line > max_line) menu_line -= max_line;
6140 command_see = FALSE;
6163 cave_type *c_ptr = &cave[py][px];
6165 if (command_wrk != (USE_FLOOR)) break;
6167 /* Get the object being moved. */
6168 o_idx = c_ptr->o_idx;
6170 /* Only rotate a pile of two or more objects. */
6171 if (!(o_idx && o_list[o_idx].next_o_idx)) break;
6173 /* Remove the first object from the list. */
6174 excise_object_idx(o_idx);
6176 /* Find end of the list. */
6178 while (o_list[i].next_o_idx)
6179 i = o_list[i].next_o_idx;
6181 /* Add after the last object. */
6182 o_list[i].next_o_idx = o_idx;
6184 /* Re-scan floor list */
6185 floor_num = scan_floor(floor_list, py, px, 0x03);
6187 /* Hack -- Fix screen */
6202 if (command_wrk == (USE_INVEN))
6209 command_wrk = (USE_EQUIP);
6211 else if (command_wrk == (USE_EQUIP))
6218 command_wrk = (USE_INVEN);
6220 else if (command_wrk == (USE_FLOOR))
6224 command_wrk = (USE_INVEN);
6226 else if (allow_equip)
6228 command_wrk = (USE_EQUIP);
6237 /* Hack -- Fix screen */
6247 /* Need to redraw */
6260 * If we are already examining the floor, and there
6261 * is only one item, we will always select it.
6262 * If we aren't examining the floor and there is only
6263 * one item, we will select it if floor_query_flag
6268 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
6271 k = 0 - floor_list[0];
6273 /* Allow player to "refuse" certain actions */
6274 if (!get_item_allow(k))
6280 /* Accept that choice */
6289 /* Hack -- Fix screen */
6299 command_wrk = (USE_FLOOR);
6305 case '1': case '2': case '3':
6306 case '4': case '5': case '6':
6307 case '7': case '8': case '9':
6309 if (command_wrk != USE_FLOOR)
6311 /* Look up the tag */
6312 if (!get_tag(&k, which, command_wrk))
6318 /* Hack -- Validate the item */
6319 if ((k < INVEN_RARM) ? !inven : !equip)
6325 /* Validate the item */
6326 if (!get_item_okay(k))
6334 /* Look up the alphabetical tag */
6335 if (get_tag_floor(&k, which, floor_list, floor_num))
6338 k = 0 - floor_list[k];
6347 /* Allow player to "refuse" certain actions */
6348 if (!get_item_allow(k))
6354 /* Accept that choice */
6360 #endif /* ALLOW_REPEAT */
6368 /* Choose "default" inventory item */
6369 if (command_wrk == (USE_INVEN))
6371 k = ((i1 == i2) ? i1 : -1);
6374 /* Choose "default" equipment item */
6375 else if (command_wrk == (USE_EQUIP))
6377 k = ((e1 == e2) ? e1 : -1);
6380 /* Choose "default" floor item */
6381 else if (command_wrk == (USE_FLOOR))
6386 k = 0 - floor_list[0];
6388 /* Allow player to "refuse" certain actions */
6389 if (!get_item_allow(k))
6395 /* Accept that choice */
6403 /* Validate the item */
6404 if (!get_item_okay(k))
6410 /* Allow player to "refuse" certain actions */
6411 if (!get_item_allow(k))
6417 /* Accept that choice */
6427 if (select_the_force) {
6441 if (command_wrk != USE_FLOOR)
6443 bool not_found = FALSE;
6445 /* Look up the alphabetical tag */
6446 if (!get_tag(&k, which, command_wrk))
6451 /* Hack -- Validate the item */
6452 else if ((k < INVEN_RARM) ? !inven : !equip)
6457 /* Validate the item */
6458 else if (!get_item_okay(k))
6465 /* Accept that choice */
6471 #endif /* ALLOW_REPEAT */
6477 /* Look up the alphabetical tag */
6478 if (get_tag_floor(&k, which, floor_list, floor_num))
6481 k = 0 - floor_list[k];
6483 /* Accept that choice */
6489 #endif /* ALLOW_REPEAT */
6494 /* Extract "query" setting */
6495 ver = isupper(which);
6496 which = tolower(which);
6498 /* Convert letter to inventory index */
6499 if (command_wrk == (USE_INVEN))
6501 if (which == '(') k = i1;
6502 else if (which == ')') k = i2;
6503 else k = label_to_inven(which);
6506 /* Convert letter to equipment index */
6507 else if (command_wrk == (USE_EQUIP))
6509 if (which == '(') k = e1;
6510 else if (which == ')') k = e2;
6511 else k = label_to_equip(which);
6514 /* Convert letter to floor index */
6515 else if (command_wrk == USE_FLOOR)
6517 if (which == '(') k = 0;
6518 else if (which == ')') k = floor_num - 1;
6519 else k = islower(which) ? A2I(which) : -1;
6520 if (k < 0 || k >= floor_num || k >= 23)
6527 k = 0 - floor_list[k];
6530 /* Validate the item */
6531 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
6537 /* Verify the item */
6539 if (ver && !verify("ËÜÅö¤Ë", k))
6541 if (ver && !verify("Try", k))
6549 /* Allow player to "refuse" certain actions */
6550 if (!get_item_allow(k))
6556 /* Accept that choice */
6566 /* Fix the screen if necessary */
6572 /* Hack -- Cancel "display" */
6573 command_see = FALSE;
6577 /* Forget the item_tester_tval restriction */
6578 item_tester_tval = 0;
6580 /* Forget the item_tester_hook restriction */
6581 item_tester_hook = NULL;
6584 /* Clean up 'show choices' */
6585 /* Toggle again if needed */
6586 if (toggle) toggle_inven_equip();
6589 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6595 /* Clear the prompt line */
6598 /* Warning if needed */
6599 if (oops && str) msg_print(str);
6605 if (command_cmd) prev_tag = cur_tag;
6606 #endif /* ALLOW_REPEAT */
6608 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6616 static bool py_pickup_floor_aux(void)
6624 /* Restrict the choices */
6625 item_tester_hook = inven_carry_okay;
6629 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
6630 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
6632 q = "Get which item? ";
6633 s = "You no longer have any room for the objects on the floor.";
6636 if (get_item(&item, q, s, (USE_FLOOR)))
6638 this_o_idx = 0 - item;
6645 /* Pick up the object */
6646 py_pickup_aux(this_o_idx);
6653 * Make the player carry everything in a grid
6655 * If "pickup" is FALSE then only gold will be picked up
6657 * This is called by py_pickup() when easy_floor is TRUE.
6659 void py_pickup_floor(bool pickup)
6661 s16b this_o_idx, next_o_idx = 0;
6663 char o_name[MAX_NLEN];
6666 int floor_num = 0, floor_list[23], floor_o_idx = 0;
6670 /* Scan the pile of objects */
6671 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
6675 /* Access the object */
6676 o_ptr = &o_list[this_o_idx];
6678 /* Describe the object */
6679 object_desc(o_name, o_ptr, 0);
6681 /* Access the next object */
6682 next_o_idx = o_ptr->next_o_idx;
6684 /* Hack -- disturb */
6688 if (o_ptr->tval == TV_GOLD)
6692 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
6693 (long)o_ptr->pval, o_name);
6695 msg_format("You have found %ld gold pieces worth of %s.",
6696 (long) o_ptr->pval, o_name);
6700 /* Collect the gold */
6701 p_ptr->au += o_ptr->pval;
6704 p_ptr->redraw |= (PR_GOLD);
6707 p_ptr->window |= (PW_PLAYER);
6709 /* Delete the gold */
6710 delete_object_idx(this_o_idx);
6712 /* Check the next object */
6715 else if (o_ptr->marked & OM_NOMSG)
6717 /* If 0 or 1 non-NOMSG items are in the pile, the NOMSG ones are
6718 * ignored. Otherwise, they are included in the prompt. */
6719 o_ptr->marked &= ~(OM_NOMSG);
6723 /* Count non-gold objects that can be picked up. */
6724 if (inven_carry_okay(o_ptr))
6729 /* Remember this object index */
6731 floor_list[floor_num] = this_o_idx;
6733 /* Count non-gold objects */
6736 /* Remember this index */
6737 floor_o_idx = this_o_idx;
6740 /* There are no non-gold objects */
6744 /* Mention the number of objects */
6750 /* Access the object */
6751 o_ptr = &o_list[floor_o_idx];
6753 #ifdef ALLOW_EASY_SENSE
6755 /* Option: Make object sensing easy */
6758 /* Sense the object */
6759 (void) sense_object(o_ptr);
6762 #endif /* ALLOW_EASY_SENSE */
6764 /* Describe the object */
6765 object_desc(o_name, o_ptr, 0);
6769 msg_format("%s¤¬¤¢¤ë¡£", o_name);
6771 msg_format("You see %s.", o_name);
6776 /* Multiple objects */
6781 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
6783 msg_format("You see a pile of %d items.", floor_num);
6792 /* The player has no room for anything on the floor. */
6798 /* Access the object */
6799 o_ptr = &o_list[floor_o_idx];
6801 #ifdef ALLOW_EASY_SENSE
6803 /* Option: Make object sensing easy */
6806 /* Sense the object */
6807 (void) sense_object(o_ptr);
6810 #endif /* ALLOW_EASY_SENSE */
6812 /* Describe the object */
6813 object_desc(o_name, o_ptr, 0);
6817 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
6819 msg_format("You have no room for %s.", o_name);
6824 /* Multiple objects */
6829 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
6831 msg_print("You have no room for any of the objects on the floor.");
6843 /* Hack -- query every object */
6844 if (carry_query_flag)
6846 char out_val[MAX_NLEN+20];
6848 /* Access the object */
6849 o_ptr = &o_list[floor_o_idx];
6851 #ifdef ALLOW_EASY_SENSE
6853 /* Option: Make object sensing easy */
6856 /* Sense the object */
6857 (void) sense_object(o_ptr);
6860 #endif /* ALLOW_EASY_SENSE */
6862 /* Describe the object */
6863 object_desc(o_name, o_ptr, 0);
6865 /* Build a prompt */
6867 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
6869 (void) sprintf(out_val, "Pick up %s? ", o_name);
6873 /* Ask the user to confirm */
6874 if (!get_check(out_val))
6881 /* Access the object */
6882 o_ptr = &o_list[floor_o_idx];
6884 #ifdef ALLOW_EASY_SENSE
6886 /* Option: Make object sensing easy */
6889 /* Sense the object */
6890 (void) sense_object(o_ptr);
6893 #endif /* ALLOW_EASY_SENSE */
6895 /* Pick up the object */
6896 py_pickup_aux(floor_o_idx);
6899 /* Allow the user to choose an object */
6902 while (can_pickup--)
6904 if (!py_pickup_floor_aux()) break;
6909 #endif /* ALLOW_EASY_FLOOR */