OSDN Git Service

fe9564f2cdca6caf174adf8d0cc4739c566a952a
[hengbandforosx/hengbandosx.git] / src / object1.c
1 /* File: object1.c */
2
3 /*
4  * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
5  *
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.
9  */
10
11 /* Purpose: Object code, part 1 */
12
13 #include "angband.h"
14
15 #if defined(MACINTOSH) || defined(MACH_O_CARBON)
16 #ifdef verify
17 #undef verify
18 #endif
19 #endif
20 /*
21  * Reset the "visual" lists
22  *
23  * This involves resetting various things to their "default" state.
24  *
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.
28  *
29  * The features, objects, and monsters, should all be encoded in the
30  * relevant "font.pref" and/or "graf.prf" files.  XXX XXX XXX
31  *
32  * The "prefs" parameter is no longer meaningful.  XXX XXX XXX
33  */
34 void reset_visuals(void)
35 {
36         int i, j;
37
38         /* Extract some info about terrain features */
39         for (i = 0; i < max_f_idx; i++)
40         {
41                 feature_type *f_ptr = &f_info[i];
42
43                 /* Assume we will use the underlying values */
44                 for (j = 0; j < F_LIT_MAX; j++)
45                 {
46                         f_ptr->x_attr[j] = f_ptr->d_attr[j];
47                         f_ptr->x_char[j] = f_ptr->d_char[j];
48                 }
49         }
50
51         /* Extract default attr/char code for objects */
52         for (i = 0; i < max_k_idx; i++)
53         {
54                 object_kind *k_ptr = &k_info[i];
55
56                 /* Default attr/char */
57                 k_ptr->x_attr = k_ptr->d_attr;
58                 k_ptr->x_char = k_ptr->d_char;
59         }
60
61         /* Extract default attr/char code for monsters */
62         for (i = 0; i < max_r_idx; i++)
63         {
64                 monster_race *r_ptr = &r_info[i];
65
66                 /* Default attr/char */
67                 r_ptr->x_attr = r_ptr->d_attr;
68                 r_ptr->x_char = r_ptr->d_char;
69         }
70
71         if (use_graphics)
72         {
73                 char buf[1024];
74
75                 /* Process "graf.prf" */
76                 process_pref_file("graf.prf");
77
78                 /* Access the "character" pref file */
79                 sprintf(buf, "graf-%s.prf", player_base);
80
81                 /* Process "graf-<playername>.prf" */
82                 process_pref_file(buf);
83         }
84
85         /* Normal symbols */
86         else
87         {
88                 char buf[1024];
89
90                 /* Process "font.prf" */
91                 process_pref_file("font.prf");
92
93                 /* Access the "character" pref file */
94                 sprintf(buf, "font-%s.prf", player_base);
95
96                 /* Process "font-<playername>.prf" */
97                 process_pref_file(buf);
98         }
99 }
100
101
102 /*
103  * Obtain the "flags" for an item
104  */
105 void object_flags(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
106 {
107         object_kind *k_ptr = &k_info[o_ptr->k_idx];
108         int i;
109
110         /* Base object */
111         for (i = 0; i < TR_FLAG_SIZE; i++)
112                 flgs[i] = k_ptr->flags[i];
113
114         /* Artifact */
115         if (object_is_fixed_artifact(o_ptr))
116         {
117                 artifact_type *a_ptr = &a_info[o_ptr->name1];
118
119                 for (i = 0; i < TR_FLAG_SIZE; i++)
120                         flgs[i] = a_ptr->flags[i];
121         }
122
123         /* Ego-item */
124         if (object_is_ego(o_ptr))
125         {
126                 ego_item_type *e_ptr = &e_info[o_ptr->name2];
127
128                 for (i = 0; i < TR_FLAG_SIZE; i++)
129                         flgs[i] |= e_ptr->flags[i];
130
131                 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
132                 {
133                         remove_flag(flgs, TR_SH_FIRE);
134                 }
135                 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
136                 {
137                         remove_flag(flgs, TR_INFRA);
138                 }
139                 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
140                 {
141                         remove_flag(flgs, TR_RES_BLIND);
142                         remove_flag(flgs, TR_SEE_INVIS);
143                 }
144         }
145
146         /* Random artifact ! */
147         for (i = 0; i < TR_FLAG_SIZE; i++)
148                 flgs[i] |= o_ptr->art_flags[i];
149
150         if (object_is_smith(o_ptr))
151         {
152                 int add = o_ptr->xtra3 - 1;
153
154                 if (add < TR_FLAG_MAX)
155                 {
156                         add_flag(flgs, add);
157                 }
158                 else if (add == ESSENCE_TMP_RES_ACID)
159                 {
160                         add_flag(flgs, TR_RES_ACID);
161                         add_flag(flgs, TR_ACTIVATE);
162                 }
163                 else if (add == ESSENCE_TMP_RES_ELEC)
164                 {
165                         add_flag(flgs, TR_RES_ELEC);
166                         add_flag(flgs, TR_ACTIVATE);
167                 }
168                 else if (add == ESSENCE_TMP_RES_FIRE)
169                 {
170                         add_flag(flgs, TR_RES_FIRE);
171                         add_flag(flgs, TR_ACTIVATE);
172                 }
173                 else if (add == ESSENCE_TMP_RES_COLD)
174                 {
175                         add_flag(flgs, TR_RES_COLD);
176                         add_flag(flgs, TR_ACTIVATE);
177                 }
178                 else if (add == ESSENCE_SH_FIRE)
179                 {
180                         add_flag(flgs, TR_RES_FIRE);
181                         add_flag(flgs, TR_SH_FIRE);
182                 }
183                 else if (add == ESSENCE_SH_ELEC)
184                 {
185                         add_flag(flgs, TR_RES_ELEC);
186                         add_flag(flgs, TR_SH_ELEC);
187                 }
188                 else if (add == ESSENCE_SH_COLD)
189                 {
190                         add_flag(flgs, TR_RES_COLD);
191                         add_flag(flgs, TR_SH_COLD);
192                 }
193                 else if (add == ESSENCE_RESISTANCE)
194                 {
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);
199                 }
200                 else if (add == TR_IMPACT)
201                 {
202                         add_flag(flgs, TR_ACTIVATE);
203                 }
204         }
205 }
206
207
208
209 /*
210  * Obtain the "flags" for an item which are known to the player
211  */
212 void object_flags_known(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
213 {
214         bool spoil = FALSE;
215         int i;
216
217         object_kind *k_ptr = &k_info[o_ptr->k_idx];
218
219         /* Clear */
220         for (i = 0; i < TR_FLAG_SIZE; i++)
221                 flgs[i] = 0;
222
223         if (!object_is_aware(o_ptr)) return;
224
225         /* Base object */
226         for (i = 0; i < TR_FLAG_SIZE; i++)
227                 flgs[i] = k_ptr->flags[i];
228
229         /* Must be identified */
230         if (!object_is_known(o_ptr)) return;
231
232         /* Ego-item (known basic flags) */
233         if (object_is_ego(o_ptr))
234         {
235                 ego_item_type *e_ptr = &e_info[o_ptr->name2];
236
237                 for (i = 0; i < TR_FLAG_SIZE; i++)
238                         flgs[i] |= e_ptr->flags[i];
239
240                 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
241                 {
242                         remove_flag(flgs, TR_SH_FIRE);
243                 }
244                 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
245                 {
246                         remove_flag(flgs, TR_INFRA);
247                 }
248                 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
249                 {
250                         remove_flag(flgs, TR_RES_BLIND);
251                         remove_flag(flgs, TR_SEE_INVIS);
252                 }
253         }
254
255
256 #ifdef SPOIL_ARTIFACTS
257         /* Full knowledge for some artifacts */
258         if (object_is_artifact(o_ptr)) spoil = TRUE;
259 #endif /* SPOIL_ARTIFACTS */
260
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 */
265
266         /* Need full knowledge or spoilers */
267         if (spoil || (o_ptr->ident & IDENT_MENTAL))
268         {
269                 /* Artifact */
270                 if (object_is_fixed_artifact(o_ptr))
271                 {
272                         artifact_type *a_ptr = &a_info[o_ptr->name1];
273
274                         for (i = 0; i < TR_FLAG_SIZE; i++)
275                                 flgs[i] = a_ptr->flags[i];
276                 }
277
278                 /* Random artifact ! */
279                 for (i = 0; i < TR_FLAG_SIZE; i++)
280                         flgs[i] |= o_ptr->art_flags[i];
281         }
282
283         if (object_is_smith(o_ptr))
284         {
285                 int add = o_ptr->xtra3 - 1;
286
287                 if (add < TR_FLAG_MAX)
288                 {
289                         add_flag(flgs, add);
290                 }
291                 else if (add == ESSENCE_TMP_RES_ACID)
292                 {
293                         add_flag(flgs, TR_RES_ACID);
294                 }
295                 else if (add == ESSENCE_TMP_RES_ELEC)
296                 {
297                         add_flag(flgs, TR_RES_ELEC);
298                 }
299                 else if (add == ESSENCE_TMP_RES_FIRE)
300                 {
301                         add_flag(flgs, TR_RES_FIRE);
302                 }
303                 else if (add == ESSENCE_TMP_RES_COLD)
304                 {
305                         add_flag(flgs, TR_RES_COLD);
306                 }
307                 else if (add == ESSENCE_SH_FIRE)
308                 {
309                         add_flag(flgs, TR_RES_FIRE);
310                         add_flag(flgs, TR_SH_FIRE);
311                 }
312                 else if (add == ESSENCE_SH_ELEC)
313                 {
314                         add_flag(flgs, TR_RES_ELEC);
315                         add_flag(flgs, TR_SH_ELEC);
316                 }
317                 else if (add == ESSENCE_SH_COLD)
318                 {
319                         add_flag(flgs, TR_RES_COLD);
320                         add_flag(flgs, TR_SH_COLD);
321                 }
322                 else if (add == ESSENCE_RESISTANCE)
323                 {
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);
328                 }
329         }
330 }
331
332
333 /*
334  * Determine the "Activation" (if any) for an artifact
335  * Return a string, or NULL for "no activation"
336  */
337 cptr item_activation(object_type *o_ptr)
338 {
339         u32b flgs[TR_FLAG_SIZE];
340
341         /* Extract the flags */
342         object_flags(o_ptr, flgs);
343
344         /* Require activation ability */
345 #ifdef JP
346 if (!(have_flag(flgs, TR_ACTIVATE))) return ("¤Ê¤·");
347 #else
348         if (!(have_flag(flgs, TR_ACTIVATE))) return ("nothing");
349 #endif
350
351
352
353         /*
354          * We need to deduce somehow that it is a random artifact -- one
355          * problem: It could be a random artifact which has NOT YET received
356          * a name. Thus we eliminate other possibilities instead of checking
357          * for art_name
358          */
359
360         if (!object_is_fixed_artifact(o_ptr) &&
361             !object_is_ego(o_ptr) &&
362             !(o_ptr->xtra1) &&
363             (o_ptr->xtra2))
364         {
365                 switch (o_ptr->xtra2)
366                 {
367                         case ACT_SUNLIGHT:
368                         {
369 #ifdef JP
370 return "ÂÀÍÛ¸÷Àþ : 10 ¥¿¡¼¥óËè";
371 #else
372                                 return "beam of sunlight every 10 turns";
373 #endif
374
375                         }
376                         case ACT_BO_MISS_1:
377                         {
378 #ifdef JP
379 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
380 #else
381                                 return "magic missile (2d6) every 2 turns";
382 #endif
383
384                         }
385                         case ACT_BA_POIS_1:
386                         {
387 #ifdef JP
388 return "°­½­±À (12), È¾·Â 3 , 4+d4 ¥¿¡¼¥óËè";
389 #else
390                                 return "stinking cloud (12), rad. 3, every 4+d4 turns";
391 #endif
392
393                         }
394                         case ACT_BO_ELEC_1:
395                         {
396 #ifdef JP
397 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
398 #else
399                                 return "lightning bolt (4d8) every 5+d5 turns";
400 #endif
401
402                         }
403                         case ACT_BO_ACID_1:
404                         {
405 #ifdef JP
406 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
407 #else
408                                 return "acid bolt (5d8) every 6+d6 turns";
409 #endif
410
411                         }
412                         case ACT_BO_COLD_1:
413                         {
414 #ifdef JP
415 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
416 #else
417                                 return "frost bolt (6d8) every 7+d7 turns";
418 #endif
419
420                         }
421                         case ACT_BO_FIRE_1:
422                         {
423 #ifdef JP
424 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
425 #else
426                                 return "fire bolt (9d8) every 8+d8 turns";
427 #endif
428
429                         }
430                         case ACT_BA_COLD_1:
431                         {
432 #ifdef JP
433 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (48) : 400 ¥¿¡¼¥óËè";
434 #else
435                                 return "ball of cold (48) every 400 turns";
436 #endif
437
438                         }
439                         case ACT_BA_FIRE_1:
440                         {
441 #ifdef JP
442 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (72) : 400 ¥¿¡¼¥óËè";
443 #else
444                                 return "ball of fire (72) every 400 turns";
445 #endif
446
447                         }
448                         case ACT_DRAIN_1:
449                         {
450 #ifdef JP
451 return "À¸Ì¿Îϵۼý (100) : 100+d100 ¥¿¡¼¥óËè";
452 #else
453                                 return "drain life (100) every 100+d100 turns";
454 #endif
455
456                         }
457                         case ACT_BA_COLD_2:
458                         {
459 #ifdef JP
460 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 300 ¥¿¡¼¥óËè";
461 #else
462                                 return "ball of cold (100) every 300 turns";
463 #endif
464
465                         }
466                         case ACT_BA_ELEC_2:
467                         {
468 #ifdef JP
469 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 500 ¥¿¡¼¥óËè";
470 #else
471                                 return "ball of lightning (100) every 500 turns";
472 #endif
473
474                         }
475                         case ACT_DRAIN_2:
476                         {
477 #ifdef JP
478 return "À¸Ì¿Îϵۼý(120) : 400 ¥¿¡¼¥óËè";
479 #else
480                                 return "drain life (120) every 400 turns";
481 #endif
482
483                         }
484                         case ACT_VAMPIRE_1:
485                         {
486 #ifdef JP
487 return "µÛ·ì¥É¥ì¥¤¥ó (3*50) : 400 ¥¿¡¼¥óËè";
488 #else
489                                 return "vampiric drain (3*50) every 400 turns";
490 #endif
491
492                         }
493                         case ACT_BO_MISS_2:
494                         {
495 #ifdef JP
496 return "Ìð (150) : 90+d90 ¥¿¡¼¥óËè";
497 #else
498                                 return "arrows (150) every 90+d90 turns";
499 #endif
500
501                         }
502                         case ACT_BA_FIRE_2:
503                         {
504 #ifdef JP
505 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (120) : 225+d225 ¥¿¡¼¥óËè";
506 #else
507                                 return "fire ball (120) every 225+d225 turns";
508 #endif
509
510                         }
511                         case ACT_BA_COLD_3:
512                         {
513 #ifdef JP
514 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (200) : 325+d325 ¥¿¡¼¥óËè";
515 #else
516                                 return "ball of cold (200) every 325+d325 turns";
517 #endif
518
519                         }
520                         case ACT_BA_ELEC_3:
521                         {
522 #ifdef JP
523 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (250) : 425+d425 ¥¿¡¼¥óËè";
524 #else
525                                 return "ball of lightning (250) every 425+d425 turns";
526 #endif
527
528                         }
529                         case ACT_WHIRLWIND:
530                         {
531 #ifdef JP
532 return "¥«¥Þ¥¤¥¿¥Á : 250 ¥¿¡¼¥óËè";
533 #else
534                                 return "whirlwind attack every 250 turns";
535 #endif
536
537                         }
538                         case ACT_VAMPIRE_2:
539                         {
540 #ifdef JP
541 return "µÛ·ì¥É¥ì¥¤¥ó (3*100) : 400 ¥¿¡¼¥óËè";
542 #else
543                                 return "vampiric drain (3*100) every 400 turns";
544 #endif
545
546                         }
547                         case ACT_CALL_CHAOS:
548                         {
549 #ifdef JP
550 return "º®ÆÙ¾¤Íè : 350 ¥¿¡¼¥óËè"; /*nuke me*/
551 #else
552                                 return "call chaos every 350 turns";
553 #endif
554
555                         }
556                         case ACT_ROCKET:
557                         {
558 #ifdef JP
559 return "¥í¥±¥Ã¥È (120+level) : 400 ¥¿¡¼¥óËè";
560 #else
561                                 return "launch rocket (120+level) every 400 turns";
562 #endif
563
564                         }
565                         case ACT_DISP_EVIL:
566                         {
567 #ifdef JP
568 return "¼Ù°­Â໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
569 #else
570                                 return "dispel evil (level*5) every 300+d300 turns";
571 #endif
572
573                         }
574                         case ACT_BA_MISS_3:
575                         {
576 #ifdef JP
577 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300) : 500 ¥¿¡¼¥óËè";
578 #else
579                                 return "elemental breath (300) every 500 turns";
580 #endif
581
582                         }
583                         case ACT_DISP_GOOD:
584                         {
585 #ifdef JP
586 return "Á±ÎÉÂ໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
587 #else
588                                 return "dispel good (level*5) every 300+d300 turns";
589 #endif
590
591                         }
592                         case ACT_CONFUSE:
593                         {
594 #ifdef JP
595 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
596 #else
597                                 return "confuse monster every 15 turns";
598 #endif
599
600                         }
601                         case ACT_SLEEP:
602                         {
603 #ifdef JP
604 return "¼þ°Ï¤Î¥â¥ó¥¹¥¿¡¼¤ò̲¤é¤»¤ë : 55 ¥¿¡¼¥óËè";
605 #else
606                                 return "sleep nearby monsters every 55 turns";
607 #endif
608
609                         }
610                         case ACT_QUAKE:
611                         {
612 #ifdef JP
613 return "ÃÏ¿Ì (Ⱦ·Â 10) : 50 ¥¿¡¼¥óËè";
614 #else
615                                 return "earthquake (rad 10) every 50 turns";
616 #endif
617
618                         }
619                         case ACT_TERROR:
620                         {
621 #ifdef JP
622 return "¶²¹² : 3 * (level+10) ¥¿¡¼¥óËè";
623 #else
624                                 return "terror every 3 * (level+10) turns";
625 #endif
626
627                         }
628                         case ACT_TELE_AWAY:
629                         {
630 #ifdef JP
631 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
632 #else
633                                 return "teleport away every 200 turns";
634 #endif
635
636                         }
637                         case ACT_BANISH_EVIL:
638                         {
639 #ifdef JP
640 return "¼Ù°­¾ÃÌÇ : 250+d250 ¥¿¡¼¥óËè";
641 #else
642                                 return "banish evil every 250+d250 turns";
643 #endif
644
645                         }
646                         case ACT_GENOCIDE:
647                         {
648 #ifdef JP
649 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
650 #else
651                                 return "genocide every 500 turns";
652 #endif
653
654                         }
655                         case ACT_MASS_GENO:
656                         {
657 #ifdef JP
658 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
659 #else
660                                 return "mass genocide every 1000 turns";
661 #endif
662
663                         }
664                         case ACT_CHARM_ANIMAL:
665                         {
666 #ifdef JP
667 return "ưʪ̥λ : 300 ¥¿¡¼¥óËè";
668 #else
669                                 return "charm animal every 300 turns";
670 #endif
671
672                         }
673                         case ACT_CHARM_UNDEAD:
674                         {
675 #ifdef JP
676 return "¥¢¥ó¥Ç¥Ã¥É½¾Â° : 333 ¥¿¡¼¥óËè";
677 #else
678                                 return "enslave undead every 333 turns";
679 #endif
680
681                         }
682                         case ACT_CHARM_OTHER:
683                         {
684 #ifdef JP
685 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 400 ¥¿¡¼¥óËè";
686 #else
687                                 return "charm monster every 400 turns";
688 #endif
689
690                         }
691                         case ACT_CHARM_ANIMALS:
692                         {
693 #ifdef JP
694 return "ưʪͧÏ : 500 ¥¿¡¼¥óËè";
695 #else
696                                 return "animal friendship every 500 turns";
697 #endif
698
699                         }
700                         case ACT_CHARM_OTHERS:
701                         {
702 #ifdef JP
703 return "¼þÊÕ̥λ : 750 ¥¿¡¼¥óËè";
704 #else
705                                 return "mass charm every 750 turns";
706 #endif
707
708                         }
709                         case ACT_SUMMON_ANIMAL:
710                         {
711 #ifdef JP
712 return "ưʪ¾¤´­ : 200+d300 ¥¿¡¼¥óËè";
713 #else
714                                 return "summon animal every 200+d300 turns";
715 #endif
716
717                         }
718                         case ACT_SUMMON_PHANTOM:
719                         {
720 #ifdef JP
721 return "¸¸Î´­ : 200+d200 ¥¿¡¼¥óËè";
722 #else
723                                 return "summon phantasmal servant every 200+d200 turns";
724 #endif
725
726                         }
727                         case ACT_SUMMON_ELEMENTAL:
728                         {
729 #ifdef JP
730 return "¥¨¥ì¥á¥ó¥¿¥ë¾¤´­ : 750 ¥¿¡¼¥óËè";
731 #else
732                                 return "summon elemental every 750 turns";
733 #endif
734
735                         }
736                         case ACT_SUMMON_DEMON:
737                         {
738 #ifdef JP
739 return "°­Ë⾤´­ : 666+d333 ¥¿¡¼¥óËè";
740 #else
741                                 return "summon demon every 666+d333 turns";
742 #endif
743
744                         }
745                         case ACT_SUMMON_UNDEAD:
746                         {
747 #ifdef JP
748 return "¥¢¥ó¥Ç¥Ã¥É¾¤´­ : 666+d333 ¥¿¡¼¥óËè";
749 #else
750                                 return "summon undead every 666+d333 turns";
751 #endif
752
753                         }
754                         case ACT_CURE_LW:
755                         {
756 #ifdef JP
757 return "¶²Éݽüµî & 30 hp ²óÉü : 10 ¥¿¡¼¥óËè";
758 #else
759                                 return "remove fear & heal 30 hp every 10 turns";
760 #endif
761
762                         }
763                         case ACT_CURE_MW:
764                         {
765 #ifdef JP
766 return "4d8 hp & ½ý²óÉü : 3+d3 ¥¿¡¼¥óËè";
767 #else
768                                 return "heal 4d8 & wounds every 3+d3 turns";
769 #endif
770
771                         }
772                         case ACT_CURE_POISON:
773                         {
774 #ifdef JP
775 return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
776 #else
777                                 return "remove fear and cure poison every 5 turns";
778 #endif
779
780                         }
781                         case ACT_REST_LIFE:
782                         {
783 #ifdef JP
784 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
785 #else
786                                 return "restore life levels every 450 turns";
787 #endif
788
789                         }
790                         case ACT_REST_ALL:
791                         {
792 #ifdef JP
793 return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃÍÉü³è : 750 ¥¿¡¼¥óËè";
794 #else
795                                 return "restore stats and life levels every 750 turns";
796 #endif
797
798                         }
799                         case ACT_CURE_700:
800                         {
801 #ifdef JP
802 return "700 hp ²óÉü : 250 ¥¿¡¼¥óËè";
803 #else
804                                 return "heal 700 hit points every 250 turns";
805 #endif
806
807                         }
808                         case ACT_CURE_1000:
809                         {
810 #ifdef JP
811 return "1000 hp ²óÉü : 888 ¥¿¡¼¥óËè";
812 #else
813                                 return "heal 1000 hit points every 888 turns";
814 #endif
815
816                         }
817                         case ACT_ESP:
818                         {
819 #ifdef JP
820 return "¥Æ¥ì¥Ñ¥·¡¼ (´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
821 #else
822                                 return "telepathy (dur 25+d30) every 200 turns";
823 #endif
824
825                         }
826                         case ACT_BERSERK:
827                         {
828 #ifdef JP
829 return "»Îµ¤¹âÍȤȽËÊ¡ (´ü´Ö 50+d50) : 100+d100 ¥¿¡¼¥óËè";
830 #else
831                                 return "heroism and blessed (dur 50+d50) every 100+d100 turns";
832 #endif
833
834                         }
835                         case ACT_PROT_EVIL:
836                         {
837 #ifdef JP
838 return "Âмٰ­·ë³¦ (´ü´Ö level*3 + d25) : 225+d225 ¥¿¡¼¥óËè";
839 #else
840                                 return "protect evil (dur level*3 + d25) every 225+d225 turns";
841 #endif
842
843                         }
844                         case ACT_RESIST_ALL:
845                         {
846 #ifdef JP
847 return "Á´ÂÑÀ­ (´ü´Ö 40+d40) : 200 ¥¿¡¼¥óËè";
848 #else
849                                 return "resist elements (dur 40+d40) every 200 turns";
850 #endif
851
852                         }
853                         case ACT_SPEED:
854                         {
855 #ifdef JP
856 return "²Ã® (´ü´Ö 20+d20) : 250 ¥¿¡¼¥óËè";
857 #else
858                                 return "speed (dur 20+d20) every 250 turns";
859 #endif
860
861                         }
862                         case ACT_XTRA_SPEED:
863                         {
864 #ifdef JP
865 return "²Ã® (´ü´Ö 75+d75) : 200+d200 ¥¿¡¼¥óËè";
866 #else
867                                 return "speed (dur 75+d75) every 200+d200 turns";
868 #endif
869
870                         }
871                         case ACT_WRAITH:
872                         {
873 #ifdef JP
874 return "Í©Âβ½ (´ü´Ö level/2 + d(level/2)) : 1000 ¥¿¡¼¥óËè";
875 #else
876                                 return "wraith form (dur level/2 + d(level/2)) every 1000 turns";
877 #endif
878
879                         }
880                         case ACT_INVULN:
881                         {
882 #ifdef JP
883 return "̵Ũ²½ (´ü´Ö 8+d8) : 1000 ¥¿¡¼¥óËè";
884 #else
885                                 return "invulnerability (dur 8+d8) every 1000 turns";
886 #endif
887
888                         }
889                         case ACT_LIGHT:
890                         {
891 #ifdef JP
892 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) : 10+d10 ¥¿¡¼¥óËè";
893 #else
894                                 return "light area (dam 2d15) every 10+d10 turns";
895 #endif
896
897                         }
898                         case ACT_MAP_LIGHT:
899                         {
900 #ifdef JP
901 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) & ¼þÊեޥåנ: 50+d50 ¥¿¡¼¥óËè";
902 #else
903                                 return "light (dam 2d15) & map area every 50+d50 turns";
904 #endif
905
906                         }
907                         case ACT_DETECT_ALL:
908                         {
909 #ifdef JP
910 return "Á´´¶ÃΠ: 55+d55 ¥¿¡¼¥óËè";
911 #else
912                                 return "detection every 55+d55 turns";
913 #endif
914
915                         }
916                         case ACT_DETECT_XTRA:
917                         {
918 #ifdef JP
919 return "Á´´¶ÃΡ¢Ãµº÷¡¢*´ÕÄê* : 1000 ¥¿¡¼¥óËè";
920 #else
921                                 return "detection, probing and identify true every 1000 turns";
922 #endif
923
924                         }
925                         case ACT_ID_FULL:
926                         {
927 #ifdef JP
928 return "*´ÕÄê* : 750 ¥¿¡¼¥óËè";
929 #else
930                                 return "identify true every 750 turns";
931 #endif
932
933                         }
934                         case ACT_ID_PLAIN:
935                         {
936 #ifdef JP
937 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
938 #else
939                                 return "identify spell every 10 turns";
940 #endif
941
942                         }
943                         case ACT_RUNE_EXPLO:
944                         {
945 #ifdef JP
946 return "Çúȯ¤Î¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
947 #else
948                                 return "explosive rune every 200 turns";
949 #endif
950
951                         }
952                         case ACT_RUNE_PROT:
953                         {
954 #ifdef JP
955 return "¼é¤ê¤Î¥ë¡¼¥ó : 400 ¥¿¡¼¥óËè";
956 #else
957                                 return "rune of protection every 400 turns";
958 #endif
959
960                         }
961                         case ACT_SATIATE:
962                         {
963 #ifdef JP
964 return "¶õÊ¢½¼Â­ : 200 ¥¿¡¼¥óËè";
965 #else
966                                 return "satisfy hunger every 200 turns";
967 #endif
968
969                         }
970                         case ACT_DEST_DOOR:
971                         {
972 #ifdef JP
973 return "¥É¥¢Ç˲õ : 10 ¥¿¡¼¥óËè";
974 #else
975                                 return "destroy doors every 10 turns";
976 #endif
977
978                         }
979                         case ACT_STONE_MUD:
980                         {
981 #ifdef JP
982 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
983 #else
984                                 return "stone to mud every 5 turns";
985 #endif
986
987                         }
988                         case ACT_RECHARGE:
989                         {
990 #ifdef JP
991 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
992 #else
993                                 return "recharging every 70 turns";
994 #endif
995
996                         }
997                         case ACT_ALCHEMY:
998                         {
999 #ifdef JP
1000 return "Ï£¶â½Ñ : 500 ¥¿¡¼¥óËè";
1001 #else
1002                                 return "alchemy every 500 turns";
1003 #endif
1004
1005                         }
1006                         case ACT_DIM_DOOR:
1007                         {
1008 #ifdef JP
1009 return "¼¡¸µ¤ÎÈâ : 100 ¥¿¡¼¥óËè";
1010 #else
1011                                 return "dimension door every 100 turns";
1012 #endif
1013
1014                         }
1015                         case ACT_TELEPORT:
1016                         {
1017 #ifdef JP
1018 return "¥Æ¥ì¥Ý¡¼¥È (range 100) : 45 ¥¿¡¼¥óËè";
1019 #else
1020                                 return "teleport (range 100) every 45 turns";
1021 #endif
1022
1023                         }
1024                         case ACT_RECALL:
1025                         {
1026 #ifdef JP
1027 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1028 #else
1029                                 return "word of recall every 200 turns";
1030 #endif
1031
1032                         }
1033                         default:
1034                         {
1035 #ifdef JP
1036 return "̤ÄêµÁ";
1037 #else
1038                                 return "something undefined";
1039 #endif
1040
1041                         }
1042                 }
1043         }
1044
1045         /* Some artifacts can be activated */
1046         switch (o_ptr->name1)
1047         {
1048                 case ART_NARTHANC:
1049                 {
1050 #ifdef JP
1051 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1052 #else
1053                         return "fire bolt (9d8) every 8+d8 turns";
1054 #endif
1055
1056                 }
1057                 case ART_NIMTHANC:
1058                 {
1059 #ifdef JP
1060 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1061 #else
1062                         return "frost bolt (6d8) every 7+d7 turns";
1063 #endif
1064
1065                 }
1066                 case ART_DETHANC:
1067                 {
1068 #ifdef JP
1069 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1070 #else
1071                         return "lightning bolt (4d8) every 6+d6 turns";
1072 #endif
1073
1074                 }
1075                 case ART_RILIA:
1076                 {
1077 #ifdef JP
1078 return "°­½­±À(12) : 4+d4 ¥¿¡¼¥óËè";
1079 #else
1080                         return "stinking cloud (12) every 4+d4 turns";
1081 #endif
1082
1083                 }
1084                 case ART_FIONA:
1085                 {
1086 #ifdef JP
1087 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(48) : 5+d5 ¥¿¡¼¥óËè";
1088 #else
1089                         return "frost ball (48) every 5+d5 turns";
1090 #endif
1091
1092                 }
1093                 case ART_FLORA:
1094                 {
1095 #ifdef JP
1096 return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
1097 #else
1098                         return "remove fear and cure poison every 5 turns";
1099 #endif
1100
1101                 }
1102                 case ART_RINGIL:
1103                 {
1104 #ifdef JP
1105 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(100) : 200 ¥¿¡¼¥óËè";
1106 #else
1107                         return "frost ball (100) every 200 turns";
1108 #endif
1109
1110                 }
1111                 case ART_DAWN:
1112                 {
1113 #ifdef JP
1114 return "¶Ç¤Î»ÕÃľ¤´­ : 500+d500 ¥¿¡¼¥óËè";
1115 #else
1116                         return "summon the Legion of the Dawn every 500+d500 turns";
1117 #endif
1118
1119                 }
1120                 case ART_ANDURIL:
1121                 {
1122 #ifdef JP
1123 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 400 ¥¿¡¼¥óËè";
1124 #else
1125                         return "fire ball (72) every 400 turns";
1126 #endif
1127
1128                 }
1129                 case ART_FIRESTAR:
1130                 {
1131 #ifdef JP
1132 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 100 ¥¿¡¼¥óËè";
1133 #else
1134                         return "large fire ball (72) every 100 turns";
1135 #endif
1136
1137                 }
1138                 case ART_GOTHMOG:
1139                 {
1140 #ifdef JP
1141 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(120) : 15 ¥¿¡¼¥óËè";
1142 #else
1143                         return "large fire ball (120) every 15 turns";
1144 #endif
1145
1146                 }
1147                 case ART_FEANOR:
1148                 {
1149 #ifdef JP
1150 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 200 ¥¿¡¼¥óËè";
1151 #else
1152                         return "haste self (20+d20 turns) every 200 turns";
1153 #endif
1154
1155                 }
1156                 case ART_THEODEN:
1157                 {
1158 #ifdef JP
1159 return "À¸Ì¿Îϵۼý(120) : 400 ¥¿¡¼¥óËè";
1160 #else
1161                         return "drain life (120) every 400 turns";
1162 #endif
1163
1164                 }
1165                 case ART_TURMIL:
1166                 {
1167 #ifdef JP
1168 return "À¸Ì¿Îϵۼý(90) : 70 ¥¿¡¼¥óËè";
1169 #else
1170                         return "drain life (90) every 70 turns";
1171 #endif
1172
1173                 }
1174                 case ART_CASPANION:
1175                 {
1176 #ifdef JP
1177 return "¥É¥¢/¥È¥é¥Ã¥×Ê´ºÕ : 10 ¥¿¡¼¥óËè";
1178 #else
1179                         return "door and trap destruction every 10 turns";
1180 #endif
1181
1182                 }
1183                 case ART_AVAVIR:
1184                 case ART_MAGATAMA:
1185                 {
1186 #ifdef JP
1187 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1188 #else
1189                         return "word of recall every 200 turns";
1190 #endif
1191
1192                 }
1193                 case ART_TARATOL:
1194                 {
1195 #ifdef JP
1196 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1197 #else
1198                         return "haste self (20+d20 turns) every 100+d100 turns";
1199 #endif
1200
1201                 }
1202                 case ART_ERIRIL:
1203                 {
1204 #ifdef JP
1205 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
1206 #else
1207                         return "identify every 10 turns";
1208 #endif
1209
1210                 }
1211                 case ART_GANDALF:
1212                 {
1213 #ifdef JP
1214 return "Ä´ºº¡¢Á´´¶ÃΡ¢Á´´ÕÄê : 100 ¥¿¡¼¥óËè";
1215 #else
1216                         return "probing, detection and full id every 100 turns";
1217 #endif
1218
1219                 }
1220                 case ART_EONWE:
1221                 {
1222 #ifdef JP
1223 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
1224 #else
1225                         return "mass genocide every 1000 turns";
1226 #endif
1227
1228                 }
1229                 case ART_LOTHARANG:
1230                 {
1231 #ifdef JP
1232 return "½ý¤Î¼£Ìþ(4d8) : 3+d3 ¥¿¡¼¥óËè";
1233 #else
1234                         return "cure wounds (4d8) every 3+d3 turns";
1235 #endif
1236
1237                 }
1238                 case ART_BRAND:
1239                 {
1240 #ifdef JP
1241 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
1242 #else
1243                         return "fire branding of bolts every 999 turns";
1244 #endif
1245
1246                 }
1247                 case ART_CRIMSON:
1248                 {
1249 #ifdef JP
1250 return "¥Õ¥¡¥¤¥¢¡ª : 15 ¥¿¡¼¥óËè";
1251 #else
1252                         return "fire! every 15 turns";
1253 #endif
1254
1255                 }
1256                 case ART_KUSANAGI:
1257                 case ART_WEREWINDLE:
1258                 {
1259 #ifdef JP
1260 return "ƨÁö : 35 ¥¿¡¼¥óËè";
1261 #else
1262                         return "a getaway every 35 turns";
1263 #endif
1264
1265                 }
1266                 case ART_KAMUI:
1267                 {
1268 #ifdef JP
1269 return "¥Æ¥ì¥Ý¡¼¥È : 25 ¥¿¡¼¥óËè";
1270 #else
1271                         return "a teleport every 25 turns";
1272 #endif
1273
1274                 }
1275                 case ART_RUNESPEAR:
1276                 {
1277 #ifdef JP
1278 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1279 #else
1280                         return "lightning ball (100) every 200 turns";
1281 #endif
1282
1283                 }
1284                 case ART_AEGLOS:
1285                 {
1286 #ifdef JP
1287 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1288 #else
1289                         return "frost ball (100) every 200 turns";
1290 #endif
1291
1292                 }
1293                 case ART_DESTINY:
1294                 {
1295 #ifdef JP
1296 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
1297 #else
1298                         return "stone to mud every 5 turns";
1299 #endif
1300
1301                 }
1302                 case ART_NAIN:
1303                 {
1304 #ifdef JP
1305 return "´äÀÐÍϲò : 2 ¥¿¡¼¥óËè";
1306 #else
1307                         return "stone to mud every 2 turns";
1308 #endif
1309
1310                 }
1311                 case ART_SOULKEEPER:
1312                 {
1313 #ifdef JP
1314 return "ÂÎÎϲóÉü(1000) : 888 ¥¿¡¼¥óËè";
1315 #else
1316                         return "heal (1000) every 888 turns";
1317 #endif
1318
1319                 }
1320                 case ART_LOHENGRIN:
1321                 {
1322 #ifdef JP
1323 return ("²óÉü (777)¡¢Ìþ¤·¡¢»Îµ¤¹âÍÈ : 300 ¥¿¡¼¥óËè");
1324 #else
1325                         return ("heal (777), curing and heroism every 300 turns");
1326 #endif
1327
1328                 }
1329                 case ART_JULIAN:
1330                 {
1331 #ifdef JP
1332 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
1333 #else
1334                         return "genocide every 500 turns";
1335 #endif
1336
1337                 }
1338                 case ART_LUTHIEN:
1339                 {
1340 #ifdef JP
1341 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
1342 #else
1343                         return "restore life levels every 450 turns";
1344 #endif
1345
1346                 }
1347                 case ART_ULMO:
1348                 {
1349 #ifdef JP
1350 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
1351 #else
1352                         return "teleport away every 150 turns";
1353 #endif
1354
1355                 }
1356                 case ART_COLLUIN:
1357                 case ART_SEIRYU:
1358                 {
1359 #ifdef JP
1360 return "Á´ÂÑÀ­(20+d20¥¿¡¼¥ó) : 111 ¥¿¡¼¥óËè";
1361 #else
1362                         return "resistance (20+d20 turns) every 111 turns";
1363 #endif
1364
1365                 }
1366                 case ART_HOLCOLLETH:
1367                 {
1368 #ifdef JP
1369 return "¥¹¥ê¡¼¥×(II) : 55 ¥¿¡¼¥óËè";
1370 #else
1371                         return "sleep II every 55 turns";
1372 #endif
1373
1374                 }
1375                 case ART_THINGOL:
1376                 {
1377 #ifdef JP
1378 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
1379 #else
1380                         return "recharge item I every 70 turns";
1381 #endif
1382
1383                 }
1384                 case ART_COLANNON:
1385                 {
1386 #ifdef JP
1387 return "¥Æ¥ì¥Ý¡¼¥È : 45 ¥¿¡¼¥óËè";
1388 #else
1389                         return "teleport every 45 turns";
1390 #endif
1391
1392                 }
1393                 case ART_TOTILA:
1394                 {
1395 #ifdef JP
1396 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
1397 #else
1398                         return "confuse monster every 15 turns";
1399 #endif
1400
1401                 }
1402                 case ART_CAMMITHRIM:
1403                 {
1404 #ifdef JP
1405 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1406 #else
1407                         return "magic missile (2d6) every 2 turns";
1408 #endif
1409
1410                 }
1411                 case ART_PAURHACH:
1412                 {
1413 #ifdef JP
1414 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1415 #else
1416                         return "fire bolt (9d8) every 8+d8 turns";
1417 #endif
1418
1419                 }
1420                 case ART_PAURNIMMEN:
1421                 {
1422 #ifdef JP
1423 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1424 #else
1425                         return "frost bolt (6d8) every 7+d7 turns";
1426 #endif
1427
1428                 }
1429                 case ART_PAURAEGEN:
1430                 {
1431 #ifdef JP
1432 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1433 #else
1434                         return "lightning bolt (4d8) every 5+d5 turns";
1435 #endif
1436
1437                 }
1438                 case ART_PAURNEN:
1439                 {
1440 #ifdef JP
1441 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
1442 #else
1443                         return "acid bolt (5d8) every 6+d6 turns";
1444 #endif
1445
1446                 }
1447                 case ART_FINGOLFIN:
1448                 {
1449 #ifdef JP
1450 return "ËâË¡¤ÎÌð(150) : 90+d90 ¥¿¡¼¥óËè";
1451 #else
1452                         return "a magical arrow (150) every 90+d90 turns";
1453 #endif
1454
1455                 }
1456                 case ART_HOLHENNETH:
1457                 {
1458 #ifdef JP
1459 return "Á´´¶ÃΠ: 55+d55 ¥¿¡¼¥óËè";
1460 #else
1461                         return "detection every 55+d55 turns";
1462 #endif
1463
1464                 }
1465                 case ART_AMBER:
1466                 {
1467 #ifdef JP
1468 return "ÂÎÎϲóÉü(700) : 250 ¥¿¡¼¥óËè";
1469 #else
1470                         return "heal (700) every 250 turns";
1471 #endif
1472
1473                 }
1474                 case ART_RAZORBACK:
1475                 {
1476 #ifdef JP
1477 return "¥¹¥¿¡¼¡¦¥Ü¡¼¥ë(150) : 1000 ¥¿¡¼¥óËè";
1478 #else
1479                         return "star ball (150) every 1000 turns";
1480 #endif
1481
1482                 }
1483                 case ART_BLADETURNER:
1484                 {
1485 #ifdef JP
1486 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300), »Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢ÂÑÀ­";
1487 #else
1488                         return "breathe elements (300), hero, bless, and resistance";
1489 #endif
1490
1491                 }
1492                 case ART_GALADRIEL:
1493                 {
1494 #ifdef JP
1495 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1496 #else
1497                         return "illumination every 10+d10 turns";
1498 #endif
1499
1500                 }
1501                 case ART_ELENDIL:
1502                 {
1503 #ifdef JP
1504 return "ËâË¡¤ÎÃϿޤȸ÷ : 50+d50 ¥¿¡¼¥óËè";
1505 #else
1506                         return "magic mapping and light every 50+d50 turns";
1507 #endif
1508
1509                 }
1510                 case ART_JUDGE:
1511                 {
1512 #ifdef JP
1513 return "ÂÎÎϤȰú¤­Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô : 20+d20 ¥¿¡¼¥óËè";
1514 #else
1515                         return "clairvoyance and recall, draining you every 20+d20 turns";
1516 #endif
1517
1518                 }
1519                 case ART_INGWE:
1520                 case ART_YATA:
1521                 {
1522 #ifdef JP
1523 return "¼Ù°­Â໶(x5) : 200+d200 ¥¿¡¼¥óËè";
1524 #else
1525                         return "dispel evil (x5) every 200+d200 turns";
1526 #endif
1527
1528                 }
1529                 case ART_FUNDIN:
1530                 {
1531 #ifdef JP
1532 return "¼Ù°­Â໶(x5) : 100+d100 ¥¿¡¼¥óËè";
1533 #else
1534                         return "dispel evil (x5) every 100+d100 turns";
1535 #endif
1536
1537                 }
1538                 case ART_CARLAMMAS:
1539                 case ART_HERMIT:
1540                 {
1541 #ifdef JP
1542 return "Âмٰ­·ë³¦ : 225+d225 ¥¿¡¼¥óËè";
1543 #else
1544                         return "protection from evil every 225+d225 turns";
1545 #endif
1546
1547                 }
1548                 case ART_FRAKIR:
1549                 {
1550 #ifdef JP
1551 return "Ã⩹¶·â(100) : 100+d100 ¥¿¡¼¥óËè";
1552 #else
1553                         return "a strangling attack (100) every 100+d100 turns";
1554 #endif
1555
1556                 }
1557                 case ART_TULKAS:
1558                 {
1559 #ifdef JP
1560 return "¥¹¥Ô¡¼¥É(75+d75¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1561 #else
1562                         return "haste self (75+d75 turns) every 150+d150 turns";
1563 #endif
1564
1565                 }
1566                 case ART_NARYA:
1567                 {
1568 #ifdef JP
1569 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(300) : 225+d225 ¥¿¡¼¥óËè";
1570 #else
1571                         return "large fire ball (300) every 225+d225 turns";
1572 #endif
1573
1574                 }
1575                 case ART_NENYA:
1576                 {
1577 #ifdef JP
1578 return "µðÂ祢¥¤¥¹¡¦¥Ü¡¼¥ë(400) : 325+d325 ¥¿¡¼¥óËè";
1579 #else
1580                         return "large frost ball (400) every 325+d325 turns";
1581 #endif
1582
1583                 }
1584                 case ART_VILYA:
1585                 case ART_GOURYU:
1586                 {
1587 #ifdef JP
1588 return "µðÂ祵¥ó¥À¡¼¡¦¥Ü¡¼¥ë(500) : 425+d425 ¥¿¡¼¥óËè";
1589 #else
1590                         return "large lightning ball (500) every 425+d425 turns";
1591 #endif
1592
1593                 }
1594                 case ART_POWER:
1595                 case ART_AHO:
1596                 {
1597 #ifdef JP
1598 return "¿®¤¸Æñ¤¤¤³¤È : 450+d450 ¥¿¡¼¥óËè";
1599 #else
1600                         return "bizarre things every 450+d450 turns";
1601 #endif
1602
1603                 }
1604                 case ART_DOR: case ART_TERROR: case ART_STONEMASK:
1605                 {
1606 #ifdef JP
1607                         return "Á´Êý¸þ¤Ø¤Î¶²Éݤθ÷Àþ : 3*(¥ì¥Ù¥ë+10) ¥¿¡¼¥óËè";
1608 #else
1609                         return "rays of fear in every direction every 3*(level+10) turns";
1610 #endif
1611
1612                 }
1613                 case ART_PALANTIR:
1614                 {
1615 #ifdef JP
1616 return "¤³¤Î³¬¤Ë¤¤¤ë¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òɽ¼¨ : 200¥¿¡¼¥óËè";
1617 #else
1618                         return "list of the uniques on the level every 200 turns";
1619 #endif
1620                 }
1621                 case ART_STONE_LORE:
1622                 {
1623 #ifdef JP
1624 return "´í¸±¤òȼ¤¦´ÕÄê : ¤¤¤Ä¤Ç¤â";
1625 #else
1626                         return "perilous identify every turn";
1627 #endif
1628                 }
1629                 case ART_FARAMIR:
1630                 {
1631 #ifdef JP
1632 return "³²Ãî¤Î¶î½ü : 55+d55¥¿¡¼¥óËè";
1633 #else
1634                         return "dispel small life every 55+d55 turns";
1635 #endif
1636                 }
1637                 case ART_BOROMIR:
1638                 {
1639 #ifdef JP
1640 return "¥â¥ó¥¹¥¿¡¼¶²¹² : 40+d40¥¿¡¼¥óËè";
1641 #else
1642                         return "frighten monsters every 40+d40 turns";
1643 #endif
1644                 }
1645                 case ART_HIMRING:
1646                 {
1647 #ifdef JP
1648 return "Âмٰ­·ë³¦ : 200+d200 ¥¿¡¼¥óËè";
1649 #else
1650                         return "protection from evil every 200 + d200 turns";
1651 #endif
1652                 }
1653                 case ART_ICANUS:
1654                 {
1655 #ifdef JP
1656 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
1657 #else
1658                         return "a mana bolt (120) every 120+d120 turns";
1659 #endif
1660                 }
1661                 case ART_HURIN:
1662                 {
1663 #ifdef JP
1664 return "»Îµ¤¹âÍÈ, ¥¹¥Ô¡¼¥É(50+d50¥¿¡¼¥ó) : 100+d200 ¥¿¡¼¥óËè";
1665 #else
1666                         return "hero and +10 to speed (50) every 100+200d turns";
1667 #endif
1668                 }
1669                 case ART_GIL_GALAD:
1670                 {
1671 #ifdef JP
1672 return "âÁ¤·¤¤¸÷ : 250 ¥¿¡¼¥óËè";
1673 #else
1674                         return "blinding light every 250 turns";
1675 #endif
1676                 }
1677                 case ART_YENDOR:
1678                 {
1679 #ifdef JP
1680 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
1681 #else
1682                         return "recharge item every 200 turns";
1683 #endif
1684                 }
1685                 case ART_MURAMASA:
1686                 {
1687 #ifdef JP
1688 return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë";
1689 #else
1690                         return "increase STR (destroyed 50%)";
1691 #endif
1692                 }
1693                 case ART_FLY_STONE:
1694                 {
1695 #ifdef JP
1696 return "ËâÎϤÎÍò(400) : 250+d250¥¿¡¼¥óËè";
1697 #else
1698                         return "a mana storm every 250+d250 turns";
1699 #endif
1700                 }
1701                 case ART_JONES:
1702                 {
1703 #ifdef JP
1704 return "ʪÂΤò°ú¤­´ó¤»¤ë(½ÅÎÌ25kg¤Þ¤Ç) : 25+d25¥¿¡¼¥óËè";
1705 #else
1706                         return "a telekinesis (500 lb) every 25+d25 turns";
1707 #endif
1708                 }
1709                 case ART_ARRYU:
1710                 {
1711 #ifdef JP
1712 return "¥Ï¥¦¥ó¥É¾¤´­ : 300+d150¥¿¡¼¥óËè";
1713 #else
1714                         return "summon hound every 300+d150 turns";
1715 #endif
1716                 }
1717                 case ART_GAEBOLG:
1718                 {
1719 #ifdef JP
1720 return "µðÂ祹¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 200+d200 ¥¿¡¼¥óËè";
1721 #else
1722                         return "large star ball (200) every 200+d200 turns";
1723 #endif
1724
1725                 }
1726                 case ART_INROU:
1727                 {
1728 #ifdef JP
1729 return "Îã¤Î¥¢¥ì : 150+d150 ¥¿¡¼¥óËè";
1730 #else
1731                         return "reveal your identity every 150+d150 turns";
1732 #endif
1733
1734                 }
1735                 case ART_HYOUSIGI:
1736                 {
1737 #ifdef JP
1738 return "Çï»ÒÌÚ¤òÂǤÁ¤Ê¤é¤¹ : ¤¤¤Ä¤Ç¤â";
1739 #else
1740                         return "beat wooden clappers every turn";
1741 #endif
1742
1743                 }
1744                 case ART_MATOI:
1745                 case ART_AEGISFANG:
1746                 {
1747 #ifdef JP
1748 return "»Îµ¤¹âÍÈ : 30+d30¥¿¡¼¥óËè";
1749 #else
1750                         return "heroism every 30+d30 turns";
1751 #endif
1752
1753                 }
1754
1755                 case ART_EARENDIL:
1756                 {
1757 #ifdef JP
1758 return "Ìþ¤· : 100¥¿¡¼¥óËè";
1759 #else
1760                         return "curing every 100 turns";
1761 #endif
1762
1763                 }
1764
1765                 case ART_BOLISHOI:
1766                 {
1767 #ifdef JP
1768 return "ưʪ̥λ : 200¥¿¡¼¥óËè";
1769 #else
1770                         return "charm animal every 200 turns";
1771 #endif
1772
1773                 }
1774                 case ART_ARUNRUTH:
1775                 {
1776 #ifdef JP
1777 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(12d8) : 50 ¥¿¡¼¥óËè";
1778 #else
1779                         return "frost bolt (12d8) every 50 turns";
1780 #endif
1781
1782                 }
1783                 case ART_BLOOD:
1784                 {
1785 #ifdef JP
1786 return "°À­Êѹ¹ : 3333 ¥¿¡¼¥óËè";
1787 #else
1788                         return "change zokusei every 3333 turns";
1789 #endif
1790
1791                 }
1792                 case ART_NUMAHOKO:
1793                 {
1794 #ifdef JP
1795 return "¥¦¥©¡¼¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 250 ¥¿¡¼¥óËè";
1796 #else
1797                         return "water ball (200) every 250 turns";
1798 #endif
1799
1800                 }
1801                 case ART_KESHO:
1802                 {
1803 #ifdef JP
1804 return "»Í¸ÔƧ¤ß : 100+d100¥¿¡¼¥óËè";
1805 #else
1806                         return "shiko every 100+d100 turns";
1807 #endif
1808
1809                 }
1810                 case ART_MOOK:
1811                 {
1812 #ifdef JP
1813 return "Î䵤¤ÎÂÑÀ­ : 40+d40¥¿¡¼¥óËè";
1814 #else
1815                         return "resist cold every 40+d40 turns";
1816 #endif
1817
1818                 }
1819                 case ART_JIZO:
1820                 {
1821 #ifdef JP
1822 return "Âý¤ÎÂç·²¾¤´­ : 300+d150¥¿¡¼¥óËè";
1823 #else
1824                         return "summon octopus every 300+d150 turns";
1825 #endif
1826                 }
1827                 case ART_NIGHT:
1828                 case ART_HELL:
1829                 {
1830 #ifdef JP
1831 return "°Å¹õ¤ÎÍò(250) : 150+d150 ¥¿¡¼¥óËè";
1832 #else
1833                         return "darkness storm (250) every 150+d150 turns";
1834 #endif
1835
1836                 }
1837                 case ART_SACRED_KNIGHTS:
1838                 {
1839 #ifdef JP
1840 return "*²ò¼ö*¤ÈÄ´ºº: ¤¤¤Ä¤Ç¤â";
1841 #else
1842                         return "dispel curse and probing every turn";
1843 #endif
1844
1845                 }
1846                 case ART_CHARMED:
1847                 {
1848 #ifdef JP
1849 return "ËâÎÏÉü³è: 777 ¥¿¡¼¥óËè";
1850 #else
1851                         return "restore mana every 777 turns";
1852 #endif
1853
1854                 }
1855         }
1856
1857
1858         if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_TSURIZAO))
1859         {
1860 #ifdef JP
1861 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
1862 #else
1863                 return "fishing : every time";
1864 #endif
1865
1866         }
1867
1868         if (object_is_smith(o_ptr))
1869         {
1870                 switch (o_ptr->xtra3 - 1)
1871                 {
1872                 case ESSENCE_TMP_RES_ACID:
1873 #ifdef JP
1874                         return "»À¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
1875 #else
1876                         return "resist acid every 50+d50 turns";
1877 #endif
1878
1879                 case ESSENCE_TMP_RES_ELEC:
1880 #ifdef JP
1881                         return "ÅÅ·â¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
1882 #else
1883                         return "resist elec every 50+d50 turns";
1884 #endif
1885
1886                 case ESSENCE_TMP_RES_FIRE:
1887 #ifdef JP
1888                         return "²Ð¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
1889 #else
1890                         return "resist fire every 50+d50 turns";
1891 #endif
1892
1893                 case ESSENCE_TMP_RES_COLD:
1894 #ifdef JP
1895                         return "Î䵤¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
1896 #else
1897                         return "resist cold every 50+d50 turns";
1898 #endif
1899
1900                 case TR_IMPACT:
1901 #ifdef JP
1902                         return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1903 #else
1904                         return "earthquake every 100+d100 turns";
1905 #endif
1906                 }
1907         }
1908
1909         if (o_ptr->name2 == EGO_TRUMP)
1910         {
1911 #ifdef JP
1912 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
1913 #else
1914                 return "teleport every 50+d50 turns";
1915 #endif
1916
1917         }
1918
1919         if (o_ptr->name2 == EGO_LITE_ILLUMINATION)
1920         {
1921 #ifdef JP
1922 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1923 #else
1924                         return "illumination every 10+d10 turns";
1925 #endif
1926         }
1927
1928         else if (o_ptr->name2 == EGO_EARTHQUAKES)
1929         {
1930 #ifdef JP
1931 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1932 #else
1933                 return "earthquake every 100+d100 turns";
1934 #endif
1935
1936         }
1937
1938         else if (o_ptr->name2 == EGO_JUMP)
1939         {
1940 #ifdef JP
1941 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1942 #else
1943                 return "blink every 10+d10 turns";
1944 #endif
1945
1946         }
1947
1948         if (o_ptr->tval == TV_RING)
1949         {
1950                 if (object_is_ego(o_ptr))
1951                 {
1952                         switch (o_ptr->name2)
1953                         {
1954                         case EGO_RING_HERO:
1955 #ifdef JP
1956 return "»Îµ¤¹âÍÈ : 100+d100¥¿¡¼¥óËè";
1957 #else
1958                                 return "heroism every 100+d100 turns";
1959 #endif
1960                         case EGO_RING_MAGIC_MIS:
1961 #ifdef JP
1962 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1963 #else
1964                         return "magic missile (2d6) every 2 turns";
1965 #endif
1966                         case EGO_RING_FIRE_BOLT:
1967 #ifdef JP
1968 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1969 #else
1970                         return "fire bolt (9d8) every 8+d8 turns";
1971 #endif
1972                         case EGO_RING_COLD_BOLT:
1973 #ifdef JP
1974 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1975 #else
1976                                 return "frost bolt (6d8) every 7+d7 turns";
1977 #endif
1978                         case EGO_RING_ELEC_BOLT:
1979 #ifdef JP
1980 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1981 #else
1982                                 return "lightning bolt (4d8) every 5+d5 turns";
1983 #endif
1984                         case EGO_RING_ACID_BOLT:
1985 #ifdef JP
1986 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
1987 #else
1988                                 return "acid bolt (5d8) every 6+d6 turns";
1989 #endif
1990                         case EGO_RING_MANA_BOLT:
1991 #ifdef JP
1992 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
1993 #else
1994                         return "a mana bolt (120) every 120+d120 turns";
1995 #endif
1996                         case EGO_RING_FIRE_BALL:
1997 #ifdef JP
1998 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1999 #else
2000                                 return "fire ball (100) every 80+d80 turns";
2001 #endif
2002                         case EGO_RING_COLD_BALL:
2003 #ifdef JP
2004 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2005 #else
2006                                 return "cold ball (100) every 80+d80 turns";
2007 #endif
2008                         case EGO_RING_ELEC_BALL:
2009 #ifdef JP
2010 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2011 #else
2012                                 return "elec ball (100) every 80+d80 turns";
2013 #endif
2014                         case EGO_RING_ACID_BALL:
2015 #ifdef JP
2016 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2017 #else
2018                                 return "acid ball (100) every 80+d80 turns";
2019 #endif
2020                         case EGO_RING_MANA_BALL:
2021 #ifdef JP
2022 return "ËâÎϤÎÍò (250) : 300 ¥¿¡¼¥óËè";
2023 #else
2024                                 return "mana storm (250) every 300 turns";
2025 #endif
2026                         case EGO_RING_DRAGON_F:
2027                                 if (o_ptr->sval == SV_RING_FLAMES)
2028 #ifdef JP
2029 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) ¤È²Ð¤Ø¤ÎÂÑÀ­ : 200 ¥¿¡¼¥óËè";
2030 #else
2031                                         return "breath of fire (200) and resist fire every 200 turns";
2032 #endif
2033                                 else
2034 #ifdef JP
2035 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2036 #else
2037                                         return "fire breath (200) every 250 turns";
2038 #endif
2039                         case EGO_RING_DRAGON_C:
2040                                 if (o_ptr->sval == SV_RING_ICE)
2041 #ifdef JP
2042 return "Î䵤¤Î¥Ö¥ì¥¹ (200) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ­ : 200 ¥¿¡¼¥óËè";
2043 #else
2044                                         return "breath of cold (200) and resist cold every 200 turns";
2045 #endif
2046                                 else
2047 #ifdef JP
2048 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2049 #else
2050                                         return "cold breath (200) every 250 turns";
2051 #endif
2052                         case EGO_RING_M_DETECT:
2053 #ifdef JP
2054 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃΠ: 150 ¥¿¡¼¥óËè";
2055 #else
2056                                 return "detect all monsters every 150 turns";
2057 #endif
2058                         case EGO_RING_D_SPEED:
2059 #ifdef JP
2060 return "¥¹¥Ô¡¼¥É(15+d30¥¿¡¼¥ó) : 100 ¥¿¡¼¥óËè";
2061 #else
2062                                 return "haste self (15+d30 turns) every 100 turns";
2063 #endif
2064                         case EGO_RING_BERSERKER:
2065 #ifdef JP
2066 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
2067 #else
2068                                 return "berserk (25+d25 turns) every 75+d75 turns";
2069 #endif
2070                         case EGO_RING_TELE_AWAY:
2071 #ifdef JP
2072 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
2073 #else
2074                         return "teleport away every 150 turns";
2075 #endif
2076                         case EGO_RING_TRUE:
2077 #ifdef JP
2078 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ­ : 777 ¥¿¡¼¥óËè";
2079 #else
2080                         return "hero, bless, and ultimate resistance every 777 turns";
2081 #endif
2082                         }
2083                 }
2084                 switch (o_ptr->sval)
2085                 {
2086                         case SV_RING_FLAMES:
2087 #ifdef JP
2088 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) ¤È²Ð¤Ø¤ÎÂÑÀ­ : 50+d50 ¥¿¡¼¥óËè";
2089 #else
2090                                 return "ball of fire (100) and resist fire every 50+d50 turns";
2091 #endif
2092
2093                         case SV_RING_ICE:
2094 #ifdef JP
2095 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ­ : 50+d50 ¥¿¡¼¥óËè";
2096 #else
2097                                 return "ball of cold (100) and resist cold every 50+d50 turns";
2098 #endif
2099
2100                         case SV_RING_ACID:
2101 #ifdef JP
2102 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) ¤È»À¤Ø¤ÎÂÑÀ­ : 50+d50 ¥¿¡¼¥óËè";
2103 #else
2104                                 return "ball of acid (100) and resist acid every 50+d50 turns";
2105 #endif
2106
2107                         case SV_RING_ELEC:
2108 #ifdef JP
2109 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) ¤ÈÅÅ·â¤Ø¤ÎÂÑÀ­ : 50+d50 ¥¿¡¼¥óËè";
2110 #else
2111                                 return "ball of elec (100) and resist elec every 50+d50 turns";
2112 #endif
2113
2114                         default:
2115                                 return NULL;
2116                 }
2117         }
2118
2119         if (o_ptr->tval == TV_AMULET)
2120         {
2121                 if (object_is_ego(o_ptr))
2122                 {
2123                         switch (o_ptr->name2)
2124                         {
2125                         case EGO_AMU_IDENT:
2126 #ifdef JP
2127                                 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
2128 #else
2129                                 return "identify every 10 turns";
2130 #endif
2131                         case EGO_AMU_CHARM:
2132 #ifdef JP
2133                                 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
2134 #else
2135                                 return "charm monster every 200 turns";
2136 #endif
2137                         case EGO_AMU_JUMP:
2138 #ifdef JP
2139                                 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
2140 #else
2141                                 return "blink every 10+d10 turns";
2142 #endif
2143                         case EGO_AMU_TELEPORT:
2144 #ifdef JP
2145                                 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
2146 #else
2147                                 return "teleport every 50+d50 turns";
2148 #endif
2149                         case EGO_AMU_D_DOOR:
2150 #ifdef JP
2151                                 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
2152 #else
2153                                 return "dimension door every 200 turns";
2154 #endif
2155                         case EGO_AMU_RES_FIRE_:
2156 #ifdef JP
2157                                 return "²Ð±ê¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
2158 #else
2159                                 return "resist fire every 50+d50 turns";
2160 #endif
2161                         case EGO_AMU_RES_COLD_:
2162 #ifdef JP
2163                                 return "Î䵤¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
2164 #else
2165                                 return "resist cold every 50+d50 turns";
2166 #endif
2167                         case EGO_AMU_RES_ELEC_:
2168 #ifdef JP
2169                                 return "ÅÅ·â¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
2170 #else
2171                                 return "resist elec every 50+d50 turns";
2172 #endif
2173                         case EGO_AMU_RES_ACID_:
2174 #ifdef JP
2175                                 return "»À¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
2176 #else
2177                                 return "resist acid every 50+d50 turns";
2178 #endif
2179                         case EGO_AMU_DETECTION:
2180 #ifdef JP
2181                                 return "Á´´¶ÃΠ: 55+d55¥¿¡¼¥óËè";
2182 #else
2183                                 return "detect all floor every 55+d55 turns";
2184 #endif
2185                         }
2186                 }
2187         }
2188
2189         if (o_ptr->tval == TV_WHISTLE)
2190         {
2191 #ifdef JP
2192 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
2193 #else
2194                 return "call pet every 100+d100 turns";
2195 #endif
2196         }
2197
2198         if (o_ptr->tval == TV_CAPTURE)
2199         {
2200 #ifdef JP
2201 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
2202 #else
2203                 return "captures or releases a monster.";
2204 #endif
2205         }
2206
2207         /* Require dragon scale mail */
2208 #ifdef JP
2209 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
2210 #else
2211         if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
2212 #endif
2213
2214
2215         /* Branch on the sub-type */
2216         switch (o_ptr->sval)
2217         {
2218                 case SV_DRAGON_BLUE:
2219                 {
2220 #ifdef JP
2221 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
2222 #else
2223                         return "breathe lightning (100) every 150+d150 turns";
2224 #endif
2225
2226                 }
2227                 case SV_DRAGON_WHITE:
2228                 {
2229 #ifdef JP
2230 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
2231 #else
2232                         return "breathe frost (110) every 150+d150 turns";
2233 #endif
2234
2235                 }
2236                 case SV_DRAGON_BLACK:
2237                 {
2238 #ifdef JP
2239 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
2240 #else
2241                         return "breathe acid (130) every 150+d150 turns";
2242 #endif
2243
2244                 }
2245                 case SV_DRAGON_GREEN:
2246                 {
2247 #ifdef JP
2248 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
2249 #else
2250                         return "breathe poison gas (150) every 180+d180 turns";
2251 #endif
2252
2253                 }
2254                 case SV_DRAGON_RED:
2255                 {
2256 #ifdef JP
2257 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2258 #else
2259                         return "breathe fire (200) every 200+d200 turns";
2260 #endif
2261
2262                 }
2263                 case SV_DRAGON_MULTIHUED:
2264                 {
2265 #ifdef JP
2266 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
2267 #else
2268                         return "breathe multi-hued (250) every 200+d200 turns";
2269 #endif
2270
2271                 }
2272                 case SV_DRAGON_BRONZE:
2273                 {
2274 #ifdef JP
2275 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
2276 #else
2277                         return "breathe confusion (120) every 180+d180 turns";
2278 #endif
2279
2280                 }
2281                 case SV_DRAGON_GOLD:
2282                 {
2283 #ifdef JP
2284 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
2285 #else
2286                         return "breathe sound (130) every 180+d180 turns";
2287 #endif
2288
2289                 }
2290                 case SV_DRAGON_CHAOS:
2291                 {
2292 #ifdef JP
2293 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
2294 #else
2295                         return "breathe chaos/disenchant (220) every 200+d200 turns";
2296 #endif
2297
2298                 }
2299                 case SV_DRAGON_LAW:
2300                 {
2301 #ifdef JP
2302 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
2303 #else
2304                         return "breathe sound/shards (230) every 200+d200 turns";
2305 #endif
2306
2307                 }
2308                 case SV_DRAGON_BALANCE:
2309                 {
2310 #ifdef JP
2311 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
2312 #else
2313                         return "breathe balance (250) every 200+d200 turns";
2314 #endif
2315
2316                 }
2317                 case SV_DRAGON_SHINING:
2318                 {
2319 #ifdef JP
2320 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2321 #else
2322                         return "breathe light/darkness (200) every 200+d200 turns";
2323 #endif
2324
2325                 }
2326                 case SV_DRAGON_POWER:
2327                 {
2328 #ifdef JP
2329 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
2330 #else
2331                         return "breathe the elements (300) every 200+d200 turns";
2332 #endif
2333
2334                 }
2335         }
2336
2337         /* Oops */
2338 #ifdef JP
2339 return "¶õµ¤¤Î©";
2340 #else
2341         return "breathe air";
2342 #endif
2343
2344 }
2345
2346
2347 /*
2348  * Describe a "fully identified" item
2349  */
2350 bool screen_object(object_type *o_ptr, u32b mode)
2351 {
2352         int                     i = 0, j, k;
2353
2354         u32b flgs[TR_FLAG_SIZE];
2355
2356         cptr            info[128];
2357         char o_name[MAX_NLEN];
2358         int wid, hgt;
2359
2360         int trivial_info = 0;
2361
2362         /* Extract the flags */
2363         object_flags(o_ptr, flgs);
2364
2365         /* Extract the description */
2366         {
2367                 char temp[70 * 20];
2368
2369                 roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
2370                             (k_text + k_info[o_ptr->k_idx].text),
2371                             77 - 15, temp, sizeof(temp));
2372                 for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
2373                 { info[i] = &temp[j]; i++;}
2374         }
2375
2376         if (object_is_equipment(o_ptr))
2377         {
2378                 /* Descriptions of a basic equipment is just a flavor */
2379                 trivial_info = i;
2380         }
2381
2382         /* Mega-Hack -- describe activation */
2383         if (have_flag(flgs, TR_ACTIVATE))
2384         {
2385 #ifdef JP
2386 info[i++] = "»ÏÆ°¤·¤¿¤È¤­¤Î¸ú²Ì...";
2387 #else
2388                 info[i++] = "It can be activated for...";
2389 #endif
2390
2391                 info[i++] = item_activation(o_ptr);
2392 #ifdef JP
2393 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
2394 #else
2395                 info[i++] = "...if it is being worn.";
2396 #endif
2397
2398         }
2399
2400         /* Figurines, a hack */
2401         if (o_ptr->tval == TV_FIGURINE)
2402         {
2403 #ifdef JP
2404 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
2405 #else
2406                 info[i++] = "It will transform into a pet when thrown.";
2407 #endif
2408
2409         }
2410
2411         /* Figurines, a hack */
2412         if (o_ptr->name1 == ART_STONEMASK)
2413         {
2414 #ifdef JP
2415 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
2416 #else
2417                 info[i++] = "It makes you turn into a vampire permanently.";
2418 #endif
2419
2420         }
2421
2422         if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
2423         {
2424 #ifdef JP
2425 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
2426 #else
2427                 info[i++] = "It will attempt to kill a monster instantly.";
2428 #endif
2429
2430         }
2431
2432         if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
2433         {
2434 #ifdef JP
2435 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
2436 #else
2437                 info[i++] = "It causes you to strike yourself sometimes.";
2438 #endif
2439
2440 #ifdef JP
2441 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
2442 #else
2443                 info[i++] = "It always penetrates invulnerability barriers.";
2444 #endif
2445         }
2446
2447         if (o_ptr->name2 == EGO_2WEAPON)
2448         {
2449 #ifdef JP
2450 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
2451 #else
2452                 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
2453 #endif
2454
2455         }
2456
2457         if (have_flag(flgs, TR_EASY_SPELL))
2458         {
2459 #ifdef JP
2460 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
2461 #else
2462                 info[i++] = "It affects your ability to cast spells.";
2463 #endif
2464         }
2465
2466         if (o_ptr->name2 == EGO_AMU_FOOL)
2467         {
2468 #ifdef JP
2469 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
2470 #else
2471                 info[i++] = "It interferes with casting spells.";
2472 #endif
2473         }
2474
2475         if (o_ptr->name2 == EGO_RING_THROW)
2476         {
2477 #ifdef JP
2478 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2479 #else
2480                 info[i++] = "It provides great strength when you throw an item.";
2481 #endif
2482         }
2483
2484         if (o_ptr->name2 == EGO_AMU_NAIVETY)
2485         {
2486 #ifdef JP
2487 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
2488 #else
2489                 info[i++] = "It decreases your magic resistance.";
2490 #endif
2491         }
2492
2493         if (o_ptr->tval == TV_STATUE)
2494         {
2495                 monster_race *r_ptr = &r_info[o_ptr->pval];
2496
2497                 if (o_ptr->pval == MON_BULLGATES)
2498 #ifdef JP
2499                         info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
2500 #else
2501                         info[i++] = "It is shameful.";
2502 #endif
2503                 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
2504 #ifdef JP
2505                         info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
2506 #else
2507                 info[i++] = "It is fearful.";
2508 #endif
2509                 else
2510 #ifdef JP
2511                         info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
2512 #else
2513                 info[i++] = "It is cheerful.";
2514 #endif
2515         }
2516         
2517         /* Hack -- describe lite's */
2518         if (o_ptr->tval == TV_LITE)
2519         {
2520                 if (o_ptr->name2 == EGO_LITE_DARKNESS)
2521                 {
2522 #ifdef JP
2523                         info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
2524 #else
2525                         info[i++] = "It provides no light.";
2526 #endif
2527
2528                         if (o_ptr->sval == SV_LITE_FEANOR ||
2529                             o_ptr->sval == SV_LITE_LANTERN)
2530                         {
2531 #ifdef JP
2532                                 info[i++] = "¤½¤ì¤ÏÌÀ¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
2533 #else
2534                                 info[i++] = "It decreases radius of light source by 2.";
2535 #endif
2536                         }
2537                         else
2538                         {
2539 #ifdef JP
2540                                 info[i++] = "¤½¤ì¤ÏÌÀ¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
2541 #else
2542                                 info[i++] = "It decreases radius of light source by 1.";
2543 #endif
2544                         }
2545                 }
2546                 else if (object_is_fixed_artifact(o_ptr))
2547                 {
2548 #ifdef JP
2549 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2550 #else
2551                         info[i++] = "It provides light (radius 3) forever.";
2552 #endif
2553
2554                 }
2555                 else if (o_ptr->name2 == EGO_LITE_SHINE)
2556                 {
2557                         if (o_ptr->sval == SV_LITE_FEANOR)
2558                         {
2559 #ifdef JP
2560 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2561 #else
2562                                 info[i++] = "It provides light (radius 3) forever.";
2563 #endif
2564
2565                         }
2566                         else if (o_ptr->sval == SV_LITE_LANTERN)
2567                         {
2568 #ifdef JP
2569 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2570 #else
2571                                 info[i++] = "It provides light (radius 3) when fueled.";
2572 #endif
2573
2574                         }
2575                         else
2576                         {
2577 #ifdef JP
2578 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2579 #else
2580                                 info[i++] = "It provides light (radius 2) when fueled.";
2581 #endif
2582
2583                         }
2584                 }
2585                 else
2586                 {
2587                         if (o_ptr->sval == SV_LITE_FEANOR)
2588                         {
2589 #ifdef JP
2590 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2591 #else
2592                                 info[i++] = "It provides light (radius 2) forever.";
2593 #endif
2594
2595                         }
2596                         else if (o_ptr->sval == SV_LITE_LANTERN)
2597                         {
2598 #ifdef JP
2599 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2600 #else
2601                                 info[i++] = "It provides light (radius 2) when fueled.";
2602 #endif
2603
2604                         }
2605                         else
2606                         {
2607 #ifdef JP
2608 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
2609 #else
2610                                 info[i++] = "It provides light (radius 1) when fueled.";
2611 #endif
2612
2613                         }
2614                 }
2615                 if (o_ptr->name2 == EGO_LITE_LONG)
2616                 {
2617 #ifdef JP
2618 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
2619 #else
2620                         info[i++] = "It provides light for much longer time.";
2621 #endif
2622                 }
2623         }
2624
2625
2626         /* And then describe it fully */
2627
2628         if (have_flag(flgs, TR_RIDING))
2629         {
2630                 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
2631 #ifdef JP
2632 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
2633 #else
2634                         info[i++] = "It is made for use while riding.";
2635 #endif
2636                 else
2637                 {
2638 #ifdef JP
2639                         info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
2640 #else
2641                         info[i++] = "It is suitable for use while riding.";
2642 #endif
2643                         /* This information is not important enough */
2644                         trivial_info++;
2645                 }
2646         }
2647         if (have_flag(flgs, TR_STR))
2648         {
2649 #ifdef JP
2650 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2651 #else
2652                 info[i++] = "It affects your strength.";
2653 #endif
2654
2655         }
2656         if (have_flag(flgs, TR_INT))
2657         {
2658 #ifdef JP
2659 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2660 #else
2661                 info[i++] = "It affects your intelligence.";
2662 #endif
2663
2664         }
2665         if (have_flag(flgs, TR_WIS))
2666         {
2667 #ifdef JP
2668 info[i++] = "¤½¤ì¤Ï¸­¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2669 #else
2670                 info[i++] = "It affects your wisdom.";
2671 #endif
2672
2673         }
2674         if (have_flag(flgs, TR_DEX))
2675         {
2676 #ifdef JP
2677 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2678 #else
2679                 info[i++] = "It affects your dexterity.";
2680 #endif
2681
2682         }
2683         if (have_flag(flgs, TR_CON))
2684         {
2685 #ifdef JP
2686 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2687 #else
2688                 info[i++] = "It affects your constitution.";
2689 #endif
2690
2691         }
2692         if (have_flag(flgs, TR_CHR))
2693         {
2694 #ifdef JP
2695 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2696 #else
2697                 info[i++] = "It affects your charisma.";
2698 #endif
2699
2700         }
2701
2702         if (have_flag(flgs, TR_MAGIC_MASTERY))
2703         {
2704 #ifdef JP
2705 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2706 #else
2707                 info[i++] = "It affects your ability to use magic devices.";
2708 #endif
2709
2710         }
2711         if (have_flag(flgs, TR_STEALTH))
2712         {
2713 #ifdef JP
2714 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2715 #else
2716                 info[i++] = "It affects your stealth.";
2717 #endif
2718
2719         }
2720         if (have_flag(flgs, TR_SEARCH))
2721         {
2722 #ifdef JP
2723 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2724 #else
2725                 info[i++] = "It affects your searching.";
2726 #endif
2727
2728         }
2729         if (have_flag(flgs, TR_INFRA))
2730         {
2731 #ifdef JP
2732 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2733 #else
2734                 info[i++] = "It affects your infravision.";
2735 #endif
2736
2737         }
2738         if (have_flag(flgs, TR_TUNNEL))
2739         {
2740 #ifdef JP
2741 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2742 #else
2743                 info[i++] = "It affects your ability to tunnel.";
2744 #endif
2745
2746         }
2747         if (have_flag(flgs, TR_SPEED))
2748         {
2749 #ifdef JP
2750 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2751 #else
2752                 info[i++] = "It affects your speed.";
2753 #endif
2754
2755         }
2756         if (have_flag(flgs, TR_BLOWS))
2757         {
2758 #ifdef JP
2759 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2760 #else
2761                 info[i++] = "It affects your attack speed.";
2762 #endif
2763
2764         }
2765
2766         if (have_flag(flgs, TR_BRAND_ACID))
2767         {
2768 #ifdef JP
2769 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礭¤Ê¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
2770 #else
2771                 info[i++] = "It does extra damage from acid.";
2772 #endif
2773
2774         }
2775         if (have_flag(flgs, TR_BRAND_ELEC))
2776         {
2777 #ifdef JP
2778 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礭¤Ê¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
2779 #else
2780                 info[i++] = "It does extra damage from electricity.";
2781 #endif
2782
2783         }
2784         if (have_flag(flgs, TR_BRAND_FIRE))
2785         {
2786 #ifdef JP
2787 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礭¤Ê¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
2788 #else
2789                 info[i++] = "It does extra damage from fire.";
2790 #endif
2791
2792         }
2793         if (have_flag(flgs, TR_BRAND_COLD))
2794         {
2795 #ifdef JP
2796 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礭¤Ê¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
2797 #else
2798                 info[i++] = "It does extra damage from frost.";
2799 #endif
2800
2801         }
2802
2803         if (have_flag(flgs, TR_BRAND_POIS))
2804         {
2805 #ifdef JP
2806 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
2807 #else
2808                 info[i++] = "It poisons your foes.";
2809 #endif
2810
2811         }
2812
2813         if (have_flag(flgs, TR_CHAOTIC))
2814         {
2815 #ifdef JP
2816 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
2817 #else
2818                 info[i++] = "It produces chaotic effects.";
2819 #endif
2820
2821         }
2822
2823         if (have_flag(flgs, TR_VAMPIRIC))
2824         {
2825 #ifdef JP
2826 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
2827 #else
2828                 info[i++] = "It drains life from your foes.";
2829 #endif
2830
2831         }
2832
2833         if (have_flag(flgs, TR_IMPACT))
2834         {
2835 #ifdef JP
2836 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤­¤ë¡£";
2837 #else
2838                 info[i++] = "It can cause earthquakes.";
2839 #endif
2840
2841         }
2842
2843         if (have_flag(flgs, TR_VORPAL))
2844         {
2845 #ifdef JP
2846 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
2847 #else
2848                 info[i++] = "It is very sharp and can cut your foes.";
2849 #endif
2850
2851         }
2852
2853         if (have_flag(flgs, TR_KILL_DRAGON))
2854         {
2855 #ifdef JP
2856 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2857 #else
2858                 info[i++] = "It is a great bane of dragons.";
2859 #endif
2860
2861         }
2862         else if (have_flag(flgs, TR_SLAY_DRAGON))
2863         {
2864 #ifdef JP
2865 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤­ÎϤòȯ´ø¤¹¤ë¡£";
2866 #else
2867                 info[i++] = "It is especially deadly against dragons.";
2868 #endif
2869
2870         }
2871
2872         if (have_flag(flgs, TR_KILL_ORC))
2873         {
2874 #ifdef JP
2875 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2876 #else
2877                 info[i++] = "It is a great bane of orcs.";
2878 #endif
2879
2880         }
2881         if (have_flag(flgs, TR_SLAY_ORC))
2882         {
2883 #ifdef JP
2884 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤­ÎϤòȯ´ø¤¹¤ë¡£";
2885 #else
2886                 info[i++] = "It is especially deadly against orcs.";
2887 #endif
2888
2889         }
2890
2891         if (have_flag(flgs, TR_KILL_TROLL))
2892         {
2893 #ifdef JP
2894 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2895 #else
2896                 info[i++] = "It is a great bane of trolls.";
2897 #endif
2898
2899         }
2900         if (have_flag(flgs, TR_SLAY_TROLL))
2901         {
2902 #ifdef JP
2903 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤­ÎϤòȯ´ø¤¹¤ë¡£";
2904 #else
2905                 info[i++] = "It is especially deadly against trolls.";
2906 #endif
2907
2908         }
2909
2910         if (have_flag(flgs, TR_KILL_GIANT))
2911         {
2912 #ifdef JP
2913 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2914 #else
2915                 info[i++] = "It is a great bane of giants.";
2916 #endif
2917         }
2918         else if (have_flag(flgs, TR_SLAY_GIANT))
2919         {
2920 #ifdef JP
2921 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤­ÎϤòȯ´ø¤¹¤ë¡£";
2922 #else
2923                 info[i++] = "It is especially deadly against giants.";
2924 #endif
2925
2926         }
2927
2928         if (have_flag(flgs, TR_KILL_DEMON))
2929         {
2930 #ifdef JP
2931 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2932 #else
2933                 info[i++] = "It is a great bane of demons.";
2934 #endif
2935
2936         }
2937         if (have_flag(flgs, TR_SLAY_DEMON))
2938         {
2939 #ifdef JP
2940 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2941 #else
2942                 info[i++] = "It strikes at demons with holy wrath.";
2943 #endif
2944
2945         }
2946
2947         if (have_flag(flgs, TR_KILL_UNDEAD))
2948         {
2949 #ifdef JP
2950 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2951 #else
2952                 info[i++] = "It is a great bane of undead.";
2953 #endif
2954
2955         }
2956         if (have_flag(flgs, TR_SLAY_UNDEAD))
2957         {
2958 #ifdef JP
2959 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2960 #else
2961                 info[i++] = "It strikes at undead with holy wrath.";
2962 #endif
2963
2964         }
2965
2966         if (have_flag(flgs, TR_KILL_EVIL))
2967         {
2968 #ifdef JP
2969 info[i++] = "¤½¤ì¤Ï¼Ù°­¤Ê¤ë¸ºß¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2970 #else
2971                 info[i++] = "It is a great bane of evil monsters.";
2972 #endif
2973
2974         }
2975         if (have_flag(flgs, TR_SLAY_EVIL))
2976         {
2977 #ifdef JP
2978 info[i++] = "¤½¤ì¤Ï¼Ù°­¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
2979 #else
2980                 info[i++] = "It fights against evil with holy fury.";
2981 #endif
2982
2983         }
2984
2985         if (have_flag(flgs, TR_KILL_ANIMAL))
2986         {
2987 #ifdef JP
2988 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2989 #else
2990                 info[i++] = "It is a great bane of natural creatures.";
2991 #endif
2992
2993         }
2994         if (have_flag(flgs, TR_SLAY_ANIMAL))
2995         {
2996 #ifdef JP
2997 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤­ÎϤòȯ´ø¤¹¤ë¡£";
2998 #else
2999                 info[i++] = "It is especially deadly against natural creatures.";
3000 #endif
3001
3002         }
3003
3004         if (have_flag(flgs, TR_KILL_HUMAN))
3005         {
3006 #ifdef JP
3007 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
3008 #else
3009                 info[i++] = "It is a great bane of humans.";
3010 #endif
3011
3012         }
3013         if (have_flag(flgs, TR_SLAY_HUMAN))
3014         {
3015 #ifdef JP
3016 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤­ÎϤòȯ´ø¤¹¤ë¡£";
3017 #else
3018                 info[i++] = "It is especially deadly against humans.";
3019 #endif
3020
3021         }
3022
3023         if (have_flag(flgs, TR_FORCE_WEAPON))
3024         {
3025 #ifdef JP
3026 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
3027 #else
3028                 info[i++] = "It powerfully strikes at a monster using your mana.";
3029 #endif
3030
3031         }
3032         if (have_flag(flgs, TR_DEC_MANA))
3033         {
3034 #ifdef JP
3035 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
3036 #else
3037                 info[i++] = "It decreases your mana consumption.";
3038 #endif
3039
3040         }
3041         if (have_flag(flgs, TR_SUST_STR))
3042         {
3043 #ifdef JP
3044 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
3045 #else
3046                 info[i++] = "It sustains your strength.";
3047 #endif
3048
3049         }
3050         if (have_flag(flgs, TR_SUST_INT))
3051         {
3052 #ifdef JP
3053 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
3054 #else
3055                 info[i++] = "It sustains your intelligence.";
3056 #endif
3057
3058         }
3059         if (have_flag(flgs, TR_SUST_WIS))
3060         {
3061 #ifdef JP
3062 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸­¤µ¤ò°Ý»ý¤¹¤ë¡£";
3063 #else
3064                 info[i++] = "It sustains your wisdom.";
3065 #endif
3066
3067         }
3068         if (have_flag(flgs, TR_SUST_DEX))
3069         {
3070 #ifdef JP
3071 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
3072 #else
3073                 info[i++] = "It sustains your dexterity.";
3074 #endif
3075
3076         }
3077         if (have_flag(flgs, TR_SUST_CON))
3078         {
3079 #ifdef JP
3080 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
3081 #else
3082                 info[i++] = "It sustains your constitution.";
3083 #endif
3084
3085         }
3086         if (have_flag(flgs, TR_SUST_CHR))
3087         {
3088 #ifdef JP
3089 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
3090 #else
3091                 info[i++] = "It sustains your charisma.";
3092 #endif
3093
3094         }
3095
3096         if (have_flag(flgs, TR_IM_ACID))
3097         {
3098 #ifdef JP
3099 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3100 #else
3101                 info[i++] = "It provides immunity to acid.";
3102 #endif
3103
3104         }
3105         if (have_flag(flgs, TR_IM_ELEC))
3106         {
3107 #ifdef JP
3108 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3109 #else
3110                 info[i++] = "It provides immunity to electricity.";
3111 #endif
3112
3113         }
3114         if (have_flag(flgs, TR_IM_FIRE))
3115         {
3116 #ifdef JP
3117 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3118 #else
3119                 info[i++] = "It provides immunity to fire.";
3120 #endif
3121
3122         }
3123         if (have_flag(flgs, TR_IM_COLD))
3124         {
3125 #ifdef JP
3126 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3127 #else
3128                 info[i++] = "It provides immunity to cold.";
3129 #endif
3130
3131         }
3132
3133         if (have_flag(flgs, TR_THROW))
3134         {
3135 #ifdef JP
3136 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礭¤Ê¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
3137 #else
3138                 info[i++] = "It is perfectly balanced for throwing.";
3139 #endif
3140         }
3141
3142         if (have_flag(flgs, TR_FREE_ACT))
3143         {
3144 #ifdef JP
3145 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3146 #else
3147                 info[i++] = "It provides immunity to paralysis.";
3148 #endif
3149
3150         }
3151         if (have_flag(flgs, TR_HOLD_LIFE))
3152         {
3153 #ifdef JP
3154 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ­¤ò¼ø¤±¤ë¡£";
3155 #else
3156                 info[i++] = "It provides resistance to life draining.";
3157 #endif
3158
3159         }
3160         if (have_flag(flgs, TR_RES_FEAR))
3161         {
3162 #ifdef JP
3163 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ­¤ò¼ø¤±¤ë¡£";
3164 #else
3165                 info[i++] = "It makes you completely fearless.";
3166 #endif
3167
3168         }
3169         if (have_flag(flgs, TR_RES_ACID))
3170         {
3171 #ifdef JP
3172 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3173 #else
3174                 info[i++] = "It provides resistance to acid.";
3175 #endif
3176
3177         }
3178         if (have_flag(flgs, TR_RES_ELEC))
3179         {
3180 #ifdef JP
3181 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3182 #else
3183                 info[i++] = "It provides resistance to electricity.";
3184 #endif
3185
3186         }
3187         if (have_flag(flgs, TR_RES_FIRE))
3188         {
3189 #ifdef JP
3190 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3191 #else
3192                 info[i++] = "It provides resistance to fire.";
3193 #endif
3194
3195         }
3196         if (have_flag(flgs, TR_RES_COLD))
3197         {
3198 #ifdef JP
3199 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3200 #else
3201                 info[i++] = "It provides resistance to cold.";
3202 #endif
3203
3204         }
3205         if (have_flag(flgs, TR_RES_POIS))
3206         {
3207 #ifdef JP
3208 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3209 #else
3210                 info[i++] = "It provides resistance to poison.";
3211 #endif
3212
3213         }
3214
3215         if (have_flag(flgs, TR_RES_LITE))
3216         {
3217 #ifdef JP
3218 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3219 #else
3220                 info[i++] = "It provides resistance to light.";
3221 #endif
3222
3223         }
3224         if (have_flag(flgs, TR_RES_DARK))
3225         {
3226 #ifdef JP
3227 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3228 #else
3229                 info[i++] = "It provides resistance to dark.";
3230 #endif
3231
3232         }
3233
3234         if (have_flag(flgs, TR_RES_BLIND))
3235         {
3236 #ifdef JP
3237 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3238 #else
3239                 info[i++] = "It provides resistance to blindness.";
3240 #endif
3241
3242         }
3243         if (have_flag(flgs, TR_RES_CONF))
3244         {
3245 #ifdef JP
3246 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3247 #else
3248                 info[i++] = "It provides resistance to confusion.";
3249 #endif
3250
3251         }
3252         if (have_flag(flgs, TR_RES_SOUND))
3253         {
3254 #ifdef JP
3255 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3256 #else
3257                 info[i++] = "It provides resistance to sound.";
3258 #endif
3259
3260         }
3261         if (have_flag(flgs, TR_RES_SHARDS))
3262         {
3263 #ifdef JP
3264 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3265 #else
3266                 info[i++] = "It provides resistance to shards.";
3267 #endif
3268
3269         }
3270
3271         if (have_flag(flgs, TR_RES_NETHER))
3272         {
3273 #ifdef JP
3274 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3275 #else
3276                 info[i++] = "It provides resistance to nether.";
3277 #endif
3278
3279         }
3280         if (have_flag(flgs, TR_RES_NEXUS))
3281         {
3282 #ifdef JP
3283 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3284 #else
3285                 info[i++] = "It provides resistance to nexus.";
3286 #endif
3287
3288         }
3289         if (have_flag(flgs, TR_RES_CHAOS))
3290         {
3291 #ifdef JP
3292 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3293 #else
3294                 info[i++] = "It provides resistance to chaos.";
3295 #endif
3296
3297         }
3298         if (have_flag(flgs, TR_RES_DISEN))
3299         {
3300 #ifdef JP
3301 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3302 #else
3303                 info[i++] = "It provides resistance to disenchantment.";
3304 #endif
3305
3306         }
3307
3308         if (have_flag(flgs, TR_LEVITATION))
3309         {
3310 #ifdef JP
3311 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3312 #else
3313                 info[i++] = "It allows you to levitate.";
3314 #endif
3315
3316         }
3317         if (have_flag(flgs, TR_LITE))
3318         {
3319                 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
3320 #ifdef JP
3321 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
3322 #else
3323                         info[i++] = "It decreases radius of your light source by 1.";
3324 #endif
3325                 else
3326 #ifdef JP
3327 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë(Ⱦ·Â¤Ë+1)¡£";
3328 #else
3329                         info[i++] = "It provides permanent light. (radius +1)";
3330 #endif
3331
3332         }
3333         if (have_flag(flgs, TR_SEE_INVIS))
3334         {
3335 #ifdef JP
3336 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3337 #else
3338                 info[i++] = "It allows you to see invisible monsters.";
3339 #endif
3340
3341         }
3342         if (have_flag(flgs, TR_TELEPATHY))
3343         {
3344 #ifdef JP
3345 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
3346 #else
3347                 info[i++] = "It gives telepathic powers.";
3348 #endif
3349
3350         }
3351         if (have_flag(flgs, TR_ESP_ANIMAL))
3352         {
3353 #ifdef JP
3354 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤ò´¶ÃΤ¹¤ë¡£";
3355 #else
3356                 info[i++] = "It senses natural creatures.";
3357 #endif
3358
3359         }
3360         if (have_flag(flgs, TR_ESP_UNDEAD))
3361         {
3362 #ifdef JP
3363 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ò´¶ÃΤ¹¤ë¡£";
3364 #else
3365                 info[i++] = "It senses undead.";
3366 #endif
3367
3368         }
3369         if (have_flag(flgs, TR_ESP_DEMON))
3370         {
3371 #ifdef JP
3372 info[i++] = "¤½¤ì¤Ï°­Ëâ¤ò´¶ÃΤ¹¤ë¡£";
3373 #else
3374                 info[i++] = "It senses demons.";
3375 #endif
3376
3377         }
3378         if (have_flag(flgs, TR_ESP_ORC))
3379         {
3380 #ifdef JP
3381 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ò´¶ÃΤ¹¤ë¡£";
3382 #else
3383                 info[i++] = "It senses orcs.";
3384 #endif
3385
3386         }
3387         if (have_flag(flgs, TR_ESP_TROLL))
3388         {
3389 #ifdef JP
3390 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ò´¶ÃΤ¹¤ë¡£";
3391 #else
3392                 info[i++] = "It senses trolls.";
3393 #endif
3394
3395         }
3396         if (have_flag(flgs, TR_ESP_GIANT))
3397         {
3398 #ifdef JP
3399 info[i++] = "¤½¤ì¤Ïµð¿Í¤ò´¶ÃΤ¹¤ë¡£";
3400 #else
3401                 info[i++] = "It senses giants.";
3402 #endif
3403
3404         }
3405         if (have_flag(flgs, TR_ESP_DRAGON))
3406         {
3407 #ifdef JP
3408 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò´¶ÃΤ¹¤ë¡£";
3409 #else
3410                 info[i++] = "It senses dragons.";
3411 #endif
3412
3413         }
3414         if (have_flag(flgs, TR_ESP_HUMAN))
3415         {
3416 #ifdef JP
3417 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ò´¶ÃΤ¹¤ë¡£";
3418 #else
3419                 info[i++] = "It senses humans.";
3420 #endif
3421
3422         }
3423         if (have_flag(flgs, TR_ESP_EVIL))
3424         {
3425 #ifdef JP
3426 info[i++] = "¤½¤ì¤Ï¼Ù°­¤Ê¸ºß¤ò´¶ÃΤ¹¤ë¡£";
3427 #else
3428                 info[i++] = "It senses evil creatures.";
3429 #endif
3430
3431         }
3432         if (have_flag(flgs, TR_ESP_GOOD))
3433         {
3434 #ifdef JP
3435 info[i++] = "¤½¤ì¤ÏÁ±Îɤʸºß¤ò´¶ÃΤ¹¤ë¡£";
3436 #else
3437                 info[i++] = "It senses good creatures.";
3438 #endif
3439
3440         }
3441         if (have_flag(flgs, TR_ESP_NONLIVING))
3442         {
3443 #ifdef JP
3444 info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤò´¶ÃΤ¹¤ë¡£";
3445 #else
3446                 info[i++] = "It senses non-living creatures.";
3447 #endif
3448
3449         }
3450         if (have_flag(flgs, TR_ESP_UNIQUE))
3451         {
3452 #ifdef JP
3453 info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤ò´¶ÃΤ¹¤ë¡£";
3454 #else
3455                 info[i++] = "It senses unique monsters.";
3456 #endif
3457
3458         }
3459         if (have_flag(flgs, TR_SLOW_DIGEST))
3460         {
3461 #ifdef JP
3462 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
3463 #else
3464                 info[i++] = "It slows your metabolism.";
3465 #endif
3466
3467         }
3468         if (have_flag(flgs, TR_REGEN))
3469         {
3470 #ifdef JP
3471 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
3472 #else
3473                 info[i++] = "It speeds your regenerative powers.";
3474 #endif
3475
3476         }
3477         if (have_flag(flgs, TR_WARNING))
3478         {
3479 #ifdef JP
3480 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
3481 #else
3482                 info[i++] = "It warns you of danger";
3483 #endif
3484
3485         }
3486         if (have_flag(flgs, TR_REFLECT))
3487         {
3488 #ifdef JP
3489 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
3490 #else
3491                 info[i++] = "It reflects bolts and arrows.";
3492 #endif
3493
3494         }
3495         if (have_flag(flgs, TR_SH_FIRE))
3496         {
3497 #ifdef JP
3498 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3499 #else
3500                 info[i++] = "It produces a fiery sheath.";
3501 #endif
3502
3503         }
3504         if (have_flag(flgs, TR_SH_ELEC))
3505         {
3506 #ifdef JP
3507 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3508 #else
3509                 info[i++] = "It produces an electric sheath.";
3510 #endif
3511
3512         }
3513         if (have_flag(flgs, TR_SH_COLD))
3514         {
3515 #ifdef JP
3516 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3517 #else
3518                 info[i++] = "It produces a sheath of coldness.";
3519 #endif
3520
3521         }
3522         if (have_flag(flgs, TR_NO_MAGIC))
3523         {
3524 #ifdef JP
3525 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3526 #else
3527                 info[i++] = "It produces an anti-magic shell.";
3528 #endif
3529
3530         }
3531         if (have_flag(flgs, TR_NO_TELE))
3532         {
3533 #ifdef JP
3534 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
3535 #else
3536                 info[i++] = "It prevents teleportation.";
3537 #endif
3538
3539         }
3540         if (have_flag(flgs, TR_XTRA_MIGHT))
3541         {
3542 #ifdef JP
3543 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
3544 #else
3545                 info[i++] = "It fires missiles with extra might.";
3546 #endif
3547
3548         }
3549         if (have_flag(flgs, TR_XTRA_SHOTS))
3550         {
3551 #ifdef JP
3552 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
3553 #else
3554                 info[i++] = "It fires missiles excessively fast.";
3555 #endif
3556
3557         }
3558
3559         if (have_flag(flgs, TR_BLESSED))
3560         {
3561 #ifdef JP
3562 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
3563 #else
3564                 info[i++] = "It has been blessed by the gods.";
3565 #endif
3566
3567         }
3568
3569         if (object_is_cursed(o_ptr))
3570         {
3571                 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
3572                 {
3573 #ifdef JP
3574 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3575 #else
3576                         info[i++] = "It is permanently cursed.";
3577 #endif
3578
3579                 }
3580                 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
3581                 {
3582 #ifdef JP
3583 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3584 #else
3585                         info[i++] = "It is heavily cursed.";
3586 #endif
3587
3588                 }
3589                 else
3590                 {
3591 #ifdef JP
3592 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
3593 #else
3594                         info[i++] = "It is cursed.";
3595 #endif
3596
3597                         /*
3598                          * It's a trivial infomation since there is
3599                          * fake inscription {cursed}
3600                          */
3601                         trivial_info++;
3602                 }
3603         }
3604
3605         if ((have_flag(flgs, TR_TY_CURSE)) || (o_ptr->curse_flags & TRC_TY_CURSE))
3606         {
3607 #ifdef JP
3608 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
3609 #else
3610                 info[i++] = "It carries an ancient foul curse.";
3611 #endif
3612
3613         }
3614         if ((have_flag(flgs, TR_AGGRAVATE)) || (o_ptr->curse_flags & TRC_AGGRAVATE))
3615         {
3616 #ifdef JP
3617 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
3618 #else
3619                 info[i++] = "It aggravates nearby creatures.";
3620 #endif
3621
3622         }
3623         if ((have_flag(flgs, TR_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
3624         {
3625 #ifdef JP
3626 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
3627 #else
3628                 info[i++] = "It drains experience.";
3629 #endif
3630
3631         }
3632         if (o_ptr->curse_flags & TRC_SLOW_REGEN)
3633         {
3634 #ifdef JP
3635 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
3636 #else
3637                 info[i++] = "It slows your regenerative powers.";
3638 #endif
3639
3640         }
3641         if (o_ptr->curse_flags & TRC_ADD_L_CURSE)
3642         {
3643 #ifdef JP
3644 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
3645 #else
3646                 info[i++] = "It adds weak curses.";
3647 #endif
3648
3649         }
3650         if (o_ptr->curse_flags & TRC_ADD_H_CURSE)
3651         {
3652 #ifdef JP
3653 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
3654 #else
3655                 info[i++] = "It adds heavy curses.";
3656 #endif
3657
3658         }
3659         if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
3660         {
3661 #ifdef JP
3662 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3663 #else
3664                 info[i++] = "It attracts animals.";
3665 #endif
3666
3667         }
3668         if (o_ptr->curse_flags & TRC_CALL_DEMON)
3669         {
3670 #ifdef JP
3671 info[i++] = "¤½¤ì¤Ï°­Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3672 #else
3673                 info[i++] = "It attracts demons.";
3674 #endif
3675
3676         }
3677         if (o_ptr->curse_flags & TRC_CALL_DRAGON)
3678         {
3679 #ifdef JP
3680 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3681 #else
3682                 info[i++] = "It attracts dragons.";
3683 #endif
3684
3685         }
3686         if (o_ptr->curse_flags & TRC_COWARDICE)
3687         {
3688 #ifdef JP
3689 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤­µ¯¤³¤¹¡£";
3690 #else
3691                 info[i++] = "It makes you subject to cowardice.";
3692 #endif
3693
3694         }
3695         if ((have_flag(flgs, TR_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
3696         {
3697 #ifdef JP
3698 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤­µ¯¤³¤¹¡£";
3699 #else
3700                 info[i++] = "It induces random teleportation.";
3701 #endif
3702
3703         }
3704         if (o_ptr->curse_flags & TRC_LOW_MELEE)
3705         {
3706 #ifdef JP
3707 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
3708 #else
3709                 info[i++] = "It causes you to miss blows.";
3710 #endif
3711
3712         }
3713         if (o_ptr->curse_flags & TRC_LOW_AC)
3714         {
3715 #ifdef JP
3716 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
3717 #else
3718                 info[i++] = "It helps your enemies' blows.";
3719 #endif
3720
3721         }
3722         if (o_ptr->curse_flags & TRC_LOW_MAGIC)
3723         {
3724 #ifdef JP
3725 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
3726 #else
3727                 info[i++] = "It encumbers you while spellcasting.";
3728 #endif
3729
3730         }
3731         if (o_ptr->curse_flags & TRC_FAST_DIGEST)
3732         {
3733 #ifdef JP
3734 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
3735 #else
3736                 info[i++] = "It speeds your metabolism.";
3737 #endif
3738
3739         }
3740         if (o_ptr->curse_flags & TRC_DRAIN_HP)
3741         {
3742 #ifdef JP
3743 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
3744 #else
3745                 info[i++] = "It drains you.";
3746 #endif
3747
3748         }
3749         if (o_ptr->curse_flags & TRC_DRAIN_MANA)
3750         {
3751 #ifdef JP
3752 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
3753 #else
3754                 info[i++] = "It drains your mana.";
3755 #endif
3756
3757         }
3758
3759         /* Describe about this kind of object instead of THIS fake object */
3760         if (mode & SCROBJ_FAKE_OBJECT)
3761         {
3762                 switch (o_ptr->tval)
3763                 {
3764                 case TV_RING:
3765                         switch (o_ptr->sval)
3766                         {
3767                         case SV_RING_LORDLY:
3768 #ifdef JP
3769                                 info[i++] = "¤½¤ì¤Ï´ö¤Ä¤«¤Î¥é¥ó¥À¥à¤ÊÂÑÀ­¤ò¼ø¤±¤ë¡£";
3770 #else
3771                                 info[i++] = "It provides some random resistances.";
3772 #endif
3773                                 break;
3774                         case SV_RING_WARNING:
3775 #ifdef JP
3776                                 info[i++] = "¤½¤ì¤Ï¤Ò¤È¤Ä¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3777 #else
3778                                 info[i++] = "It may provide a low rank ESP.";
3779 #endif
3780                                 break;
3781                         }
3782                         break;
3783
3784                 case TV_AMULET:
3785                         switch (o_ptr->sval)
3786                         {
3787                         case SV_AMULET_RESISTANCE:
3788 #ifdef JP
3789                                 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ­¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3790 #else
3791                                 info[i++] = "It may provides resistance to poison.";
3792 #endif
3793 #ifdef JP
3794                                 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤ÊÂÑÀ­¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3795 #else
3796                                 info[i++] = "It may provide a random resistances.";
3797 #endif
3798                                 break;
3799                         case SV_AMULET_THE_MAGI:
3800 #ifdef JP
3801                                 info[i++] = "¤½¤ì¤ÏºÇÂç¤Ç£³¤Ä¤Þ¤Ç¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë¡£";
3802 #else
3803                                 info[i++] = "It provides up to three low rank ESPs.";
3804 #endif
3805                                 break;
3806                         }
3807                         break;
3808                 }
3809         }
3810
3811         if (have_flag(flgs, TR_IGNORE_ACID) &&
3812             have_flag(flgs, TR_IGNORE_ELEC) &&
3813             have_flag(flgs, TR_IGNORE_FIRE) &&
3814             have_flag(flgs, TR_IGNORE_COLD))
3815         {
3816 #ifdef JP
3817                 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3818 #else
3819                 info[i++] = "It cannot be harmed by the elements.";
3820 #endif
3821         }
3822         else
3823         {
3824                 if (have_flag(flgs, TR_IGNORE_ACID))
3825                 {
3826 #ifdef JP
3827                         info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3828 #else
3829                         info[i++] = "It cannot be harmed by acid.";
3830 #endif
3831                 }
3832                 if (have_flag(flgs, TR_IGNORE_ELEC))
3833                 {
3834 #ifdef JP
3835                         info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3836 #else
3837                         info[i++] = "It cannot be harmed by electricity.";
3838 #endif
3839                 }
3840                 if (have_flag(flgs, TR_IGNORE_FIRE))
3841                 {
3842 #ifdef JP
3843                         info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3844 #else
3845                         info[i++] = "It cannot be harmed by fire.";
3846 #endif
3847                 }
3848                 if (have_flag(flgs, TR_IGNORE_COLD))
3849                 {
3850 #ifdef JP
3851                         info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3852 #else
3853                         info[i++] = "It cannot be harmed by cold.";
3854 #endif
3855                 }
3856         }
3857
3858         if (mode & SCROBJ_FORCE_DETAIL) trivial_info = 0;
3859
3860         /* No relevant informations */
3861         if (i <= trivial_info) return (FALSE);
3862
3863         /* Save the screen */
3864         screen_save();
3865
3866         /* Get size */
3867         Term_get_size(&wid, &hgt);
3868
3869         /* Display Item name */
3870         if (!(mode & SCROBJ_FAKE_OBJECT))
3871                 object_desc(o_name, o_ptr, 0);
3872         else
3873                 object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
3874
3875         prt(o_name, 0, 0);
3876
3877         /* Erase the screen */
3878         for (k = 1; k < hgt; k++) prt("", k, 13);
3879
3880         /* Label the information */
3881         if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
3882         {
3883                 monster_race *r_ptr = &r_info[o_ptr->pval];
3884                 int namelen = strlen(r_name + r_ptr->name);
3885                 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
3886                 Term_queue_bigchar(18 + namelen, 1, r_ptr->x_attr, r_ptr->x_char, 0, 0);
3887                 prt("'", 1, (use_bigtile ? 20 : 19) + namelen);
3888         }
3889         else
3890 #ifdef JP
3891 prt("     ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
3892 #else
3893         prt("     Item Attributes:", 1, 15);
3894 #endif
3895
3896         /* We will print on top of the map (column 13) */
3897         for (k = 2, j = 0; j < i; j++)
3898         {
3899                 /* Show the info */
3900                 prt(info[j], k++, 15);
3901
3902                 /* Every 20 entries (lines 2 to 21), start over */
3903                 if ((k == hgt - 2) && (j+1 < i))
3904                 {
3905 #ifdef JP
3906 prt("-- Â³¤¯ --", k, 15);
3907 #else
3908                         prt("-- more --", k, 15);
3909 #endif
3910                         inkey();
3911                         for (; k > 2; k--) prt("", k, 15);
3912                 }
3913         }
3914
3915         /* Wait for it */
3916 #ifdef JP
3917 prt("[²¿¤«¥­¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
3918 #else
3919         prt("[Press any key to continue]", k, 15);
3920 #endif
3921
3922         inkey();
3923
3924         /* Restore the screen */
3925         screen_load();
3926
3927         /* Gave knowledge */
3928         return (TRUE);
3929 }
3930
3931
3932
3933 /*
3934  * Convert an inventory index into a one character label
3935  * Note that the label does NOT distinguish inven/equip.
3936  */
3937 char index_to_label(int i)
3938 {
3939         /* Indexes for "inven" are easy */
3940         if (i < INVEN_RARM) return (I2A(i));
3941
3942         /* Indexes for "equip" are offset */
3943         return (I2A(i - INVEN_RARM));
3944 }
3945
3946
3947 /*
3948  * Convert a label into the index of an item in the "inven"
3949  * Return "-1" if the label does not indicate a real item
3950  */
3951 s16b label_to_inven(int c)
3952 {
3953         int i;
3954
3955         /* Convert */
3956         i = (islower(c) ? A2I(c) : -1);
3957
3958         /* Verify the index */
3959         if ((i < 0) || (i > INVEN_PACK)) return (-1);
3960
3961         /* Empty slots can never be chosen */
3962         if (!inventory[i].k_idx) return (-1);
3963
3964         /* Return the index */
3965         return (i);
3966 }
3967
3968
3969 /* See cmd5.c */
3970 extern bool select_ring_slot;
3971
3972
3973 static bool is_ring_slot(int i)
3974 {
3975         return (i == INVEN_RIGHT) || (i == INVEN_LEFT);
3976 }
3977
3978
3979 /*
3980  * Convert a label into the index of a item in the "equip"
3981  * Return "-1" if the label does not indicate a real item
3982  */
3983 s16b label_to_equip(int c)
3984 {
3985         int i;
3986
3987         /* Convert */
3988         i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
3989
3990         /* Verify the index */
3991         if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
3992
3993         if (select_ring_slot) return is_ring_slot(i) ? i : -1;
3994
3995         /* Empty slots can never be chosen */
3996         if (!inventory[i].k_idx) return (-1);
3997
3998         /* Return the index */
3999         return (i);
4000 }
4001
4002
4003
4004 /*
4005  * Determine which equipment slot (if any) an item likes
4006  */
4007 s16b wield_slot(object_type *o_ptr)
4008 {
4009         /* Slot for equipment */
4010         switch (o_ptr->tval)
4011         {
4012                 case TV_DIGGING:
4013                 case TV_HAFTED:
4014                 case TV_POLEARM:
4015                 case TV_SWORD:
4016                 {
4017                         if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
4018                         if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
4019                         return (INVEN_LARM);
4020                 }
4021
4022                 case TV_CAPTURE:
4023                 case TV_CARD:
4024                 case TV_SHIELD:
4025                 {
4026                         if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
4027                         if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
4028                         return (INVEN_RARM);
4029                 }
4030
4031                 case TV_BOW:
4032                 {
4033                         return (INVEN_BOW);
4034                 }
4035
4036                 case TV_RING:
4037                 {
4038                         /* Use the right hand first */
4039                         if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
4040
4041                         /* Use the left hand for swapping (by default) */
4042                         return (INVEN_LEFT);
4043                 }
4044
4045                 case TV_AMULET:
4046                 case TV_WHISTLE:
4047                 {
4048                         return (INVEN_NECK);
4049                 }
4050
4051                 case TV_LITE:
4052                 {
4053                         return (INVEN_LITE);
4054                 }
4055
4056                 case TV_DRAG_ARMOR:
4057                 case TV_HARD_ARMOR:
4058                 case TV_SOFT_ARMOR:
4059                 {
4060                         return (INVEN_BODY);
4061                 }
4062
4063                 case TV_CLOAK:
4064                 {
4065                         return (INVEN_OUTER);
4066                 }
4067
4068                 case TV_CROWN:
4069                 case TV_HELM:
4070                 {
4071                         return (INVEN_HEAD);
4072                 }
4073
4074                 case TV_GLOVES:
4075                 {
4076                         return (INVEN_HANDS);
4077                 }
4078
4079                 case TV_BOOTS:
4080                 {
4081                         return (INVEN_FEET);
4082                 }
4083         }
4084
4085         /* No slot available */
4086         return (-1);
4087 }
4088
4089
4090 /*
4091  * Return a string mentioning how a given item is carried
4092  */
4093 cptr mention_use(int i)
4094 {
4095         cptr p;
4096
4097         /* Examine the location */
4098         switch (i)
4099         {
4100 #ifdef JP
4101                 case INVEN_RARM:  p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->migite) ? " Î¾¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê")); break;
4102 #else
4103                 case INVEN_RARM:  p = p_ptr->heavy_wield[0] ? "Just lifting" : (p_ptr->migite ? "Wielding" : "On arm"); break;
4104 #endif
4105
4106 #ifdef JP
4107                 case INVEN_LARM:  p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->hidarite) ? " Î¾¼ê" : (left_hander ? " ±¦¼ê" : " º¸¼ê")); break;
4108 #else
4109                 case INVEN_LARM:  p = p_ptr->heavy_wield[1] ? "Just lifting" : (p_ptr->hidarite ? "Wielding" : "On arm"); break;
4110 #endif
4111
4112 #ifdef JP
4113                 case INVEN_BOW:   p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "±¿ÈÂÃæ" : "¼Í·âÍÑ"; break;
4114 #else
4115                 case INVEN_BOW:   p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "Just holding" : "Shooting"; break;
4116 #endif
4117
4118 #ifdef JP
4119                 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
4120 #else
4121                 case INVEN_RIGHT: p = (left_hander ? "On left hand" : "On right hand"); break;
4122 #endif
4123
4124 #ifdef JP
4125                 case INVEN_LEFT:  p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
4126 #else
4127                 case INVEN_LEFT:  p = (left_hander ? "On right hand" : "On left hand"); break;
4128 #endif
4129
4130 #ifdef JP
4131                 case INVEN_NECK:  p = "  ¼ó"; break;
4132 #else
4133                 case INVEN_NECK:  p = "Around neck"; break;
4134 #endif
4135
4136 #ifdef JP
4137                 case INVEN_LITE:  p = " ¸÷¸»"; break;
4138 #else
4139                 case INVEN_LITE:  p = "Light source"; break;
4140 #endif
4141
4142 #ifdef JP
4143                 case INVEN_BODY:  p = "  ÂÎ"; break;
4144 #else
4145                 case INVEN_BODY:  p = "On body"; break;
4146 #endif
4147
4148 #ifdef JP
4149                 case INVEN_OUTER: p = "ÂΤξå"; break;
4150 #else
4151                 case INVEN_OUTER: p = "About body"; break;
4152 #endif
4153
4154 #ifdef JP
4155                 case INVEN_HEAD:  p = "  Ƭ"; break;
4156 #else
4157                 case INVEN_HEAD:  p = "On head"; break;
4158 #endif
4159
4160 #ifdef JP
4161                 case INVEN_HANDS: p = "  ¼ê"; break;
4162 #else
4163                 case INVEN_HANDS: p = "On hands"; break;
4164 #endif
4165
4166 #ifdef JP
4167                 case INVEN_FEET:  p = "  ­"; break;
4168 #else
4169                 case INVEN_FEET:  p = "On feet"; break;
4170 #endif
4171
4172 #ifdef JP
4173                 default:          p = "¥¶¥Ã¥¯"; break;
4174 #else
4175                 default:          p = "In pack"; break;
4176 #endif
4177         }
4178
4179         /* Return the result */
4180         return p;
4181 }
4182
4183
4184 /*
4185  * Return a string describing how a given item is being worn.
4186  * Currently, only used for items in the equipment, not inventory.
4187  */
4188 cptr describe_use(int i)
4189 {
4190         cptr p;
4191
4192         switch (i)
4193         {
4194 #ifdef JP
4195                 case INVEN_RARM:  p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->migite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
4196 #else
4197                 case INVEN_RARM:  p = p_ptr->heavy_wield[0] ? "just lifting" : (p_ptr->migite ? "attacking monsters with" : "wearing on your arm"); break;
4198 #endif
4199
4200 #ifdef JP
4201                 case INVEN_LARM:  p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->hidarite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
4202 #else
4203                 case INVEN_LARM:  p = p_ptr->heavy_wield[1] ? "just lifting" : (p_ptr->hidarite ? "attacking monsters with" : "wearing on your arm"); break;
4204 #endif
4205
4206 #ifdef JP
4207                 case INVEN_BOW:   p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î" : "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
4208 #else
4209                 case INVEN_BOW:   p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "just holding" : "shooting missiles with"; break;
4210 #endif
4211
4212 #ifdef JP
4213                 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4214 #else
4215                 case INVEN_RIGHT: p = (left_hander ? "wearing on your left hand" : "wearing on your right hand"); break;
4216 #endif
4217
4218 #ifdef JP
4219                 case INVEN_LEFT:  p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4220 #else
4221                 case INVEN_LEFT:  p = (left_hander ? "wearing on your right hand" : "wearing on your left hand"); break;
4222 #endif
4223
4224 #ifdef JP
4225                 case INVEN_NECK:  p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
4226 #else
4227                 case INVEN_NECK:  p = "wearing around your neck"; break;
4228 #endif
4229
4230 #ifdef JP
4231                 case INVEN_LITE:  p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
4232 #else
4233                 case INVEN_LITE:  p = "using to light the way"; break;
4234 #endif
4235
4236 #ifdef JP
4237                 case INVEN_BODY:  p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
4238 #else
4239                 case INVEN_BODY:  p = "wearing on your body"; break;
4240 #endif
4241
4242 #ifdef JP
4243                 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
4244 #else
4245                 case INVEN_OUTER: p = "wearing on your back"; break;
4246 #endif
4247
4248 #ifdef JP
4249                 case INVEN_HEAD:  p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
4250 #else
4251                 case INVEN_HEAD:  p = "wearing on your head"; break;
4252 #endif
4253
4254 #ifdef JP
4255                 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
4256 #else
4257                 case INVEN_HANDS: p = "wearing on your hands"; break;
4258 #endif
4259
4260 #ifdef JP
4261                 case INVEN_FEET:  p = "­¤Ë¤Ï¤¤¤Æ¤¤¤ë"; break;
4262 #else
4263                 case INVEN_FEET:  p = "wearing on your feet"; break;
4264 #endif
4265
4266 #ifdef JP
4267                 default:          p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
4268 #else
4269                 default:          p = "carrying in your pack"; break;
4270 #endif
4271         }
4272
4273         /* Return the result */
4274         return p;
4275 }
4276
4277
4278 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
4279
4280 bool check_book_realm(const byte book_tval, const byte book_sval)
4281 {
4282         if (book_tval < TV_LIFE_BOOK) return FALSE;
4283         if (p_ptr->pclass == CLASS_SORCERER)
4284         {
4285                 return is_magic(tval2realm(book_tval));
4286         }
4287         else if (p_ptr->pclass == CLASS_RED_MAGE)
4288         {
4289                 if (is_magic(tval2realm(book_tval)))
4290                         return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
4291         }
4292         return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
4293 }
4294
4295
4296 /*
4297  * Check an item against the item tester info
4298  */
4299 bool item_tester_okay(object_type *o_ptr)
4300 {
4301         /* Hack -- allow listing empty slots */
4302         if (item_tester_full) return (TRUE);
4303
4304         /* Require an item */
4305         if (!o_ptr->k_idx) return (FALSE);
4306
4307         /* Hack -- ignore "gold" */
4308         if (o_ptr->tval == TV_GOLD)
4309         {
4310                 /* See xtra2.c */
4311                 extern bool show_gold_on_floor;
4312
4313                 if (!show_gold_on_floor) return (FALSE);
4314         }
4315
4316         /* Check the tval */
4317         if (item_tester_tval)
4318         {
4319                 /* Is it a spellbook? If so, we need a hack -- TY */
4320                 if ((item_tester_tval <= TV_DEATH_BOOK) &&
4321                         (item_tester_tval >= TV_LIFE_BOOK))
4322                         return check_book_realm(o_ptr->tval, o_ptr->sval);
4323                 else
4324                         if (item_tester_tval != o_ptr->tval) return (FALSE);
4325         }
4326
4327         /* Check the hook */
4328         if (item_tester_hook)
4329         {
4330                 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
4331         }
4332
4333         /* Assume okay */
4334         return (TRUE);
4335 }
4336
4337
4338
4339
4340 /*
4341  * Choice window "shadow" of the "show_inven()" function
4342  */
4343 void display_inven(void)
4344 {
4345         register        int i, n, z = 0;
4346         object_type     *o_ptr;
4347         byte            attr = TERM_WHITE;
4348         char            tmp_val[80];
4349         char            o_name[MAX_NLEN];
4350         int             wid, hgt;
4351
4352         /* Get size */
4353         Term_get_size(&wid, &hgt);
4354
4355         /* Find the "final" slot */
4356         for (i = 0; i < INVEN_PACK; i++)
4357         {
4358                 o_ptr = &inventory[i];
4359
4360                 /* Skip non-objects */
4361                 if (!o_ptr->k_idx) continue;
4362
4363                 /* Track */
4364                 z = i + 1;
4365         }
4366
4367         /* Display the pack */
4368         for (i = 0; i < z; i++)
4369         {
4370                 /* Examine the item */
4371                 o_ptr = &inventory[i];
4372
4373                 /* Start with an empty "index" */
4374                 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4375
4376                 /* Is this item "acceptable"? */
4377                 if (item_tester_okay(o_ptr))
4378                 {
4379                         /* Prepare an "index" */
4380                         tmp_val[0] = index_to_label(i);
4381
4382                         /* Bracket the "index" --(-- */
4383                         tmp_val[1] = ')';
4384                 }
4385
4386                 /* Display the index (or blank space) */
4387                 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
4388
4389                 /* Obtain an item description */
4390                 object_desc(o_name, o_ptr, 0);
4391
4392                 /* Obtain the length of the description */
4393                 n = strlen(o_name);
4394
4395                 /* Get a color */
4396                 attr = tval_to_attr[o_ptr->tval % 128];
4397
4398                 /* Grey out charging items */
4399                 if (o_ptr->timeout)
4400                 {
4401                         attr = TERM_L_DARK;
4402                 }
4403
4404                 /* Display the entry itself */
4405                 Term_putstr(3, i, n, attr, o_name);
4406
4407                 /* Erase the rest of the line */
4408                 Term_erase(3+n, i, 255);
4409
4410                 /* Display the weight if needed */
4411                 if (show_weights && o_ptr->weight)
4412                 {
4413                         int wgt = o_ptr->weight * o_ptr->number;
4414 #ifdef JP
4415                         sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
4416 #else
4417                         sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4418 #endif
4419
4420                         prt(tmp_val, i, wid - 9);
4421                 }
4422         }
4423
4424         /* Erase the rest of the window */
4425         for (i = z; i < hgt; i++)
4426         {
4427                 /* Erase the line */
4428                 Term_erase(0, i, 255);
4429         }
4430 }
4431
4432
4433
4434 /*
4435  * Choice window "shadow" of the "show_equip()" function
4436  */
4437 void display_equip(void)
4438 {
4439         register        int i, n;
4440         object_type     *o_ptr;
4441         byte            attr = TERM_WHITE;
4442         char            tmp_val[80];
4443         char            o_name[MAX_NLEN];
4444         int             wid, hgt;
4445
4446         /* Get size */
4447         Term_get_size(&wid, &hgt);
4448
4449         /* Display the equipment */
4450         for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
4451         {
4452                 /* Examine the item */
4453                 o_ptr = &inventory[i];
4454
4455                 /* Start with an empty "index" */
4456                 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4457
4458                 /* Is this item "acceptable"? */
4459                 if (select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr))
4460                 {
4461                         /* Prepare an "index" */
4462                         tmp_val[0] = index_to_label(i);
4463
4464                         /* Bracket the "index" --(-- */
4465                         tmp_val[1] = ')';
4466                 }
4467
4468                 /* Display the index (or blank space) */
4469                 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
4470
4471                 /* Obtain an item description */
4472                 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
4473                 {
4474 #ifdef JP
4475                         strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
4476 #else
4477                         strcpy(o_name, "(wielding with two-hands)");
4478 #endif
4479                         attr = TERM_WHITE;
4480                 }
4481                 else
4482                 {
4483                         object_desc(o_name, o_ptr, 0);
4484                         attr = tval_to_attr[o_ptr->tval % 128];
4485                 }
4486
4487                 /* Obtain the length of the description */
4488                 n = strlen(o_name);
4489
4490                 /* Grey out charging items */
4491                 if (o_ptr->timeout)
4492                 {
4493                         attr = TERM_L_DARK;
4494                 }
4495
4496                 /* Display the entry itself */
4497                 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
4498
4499                 /* Erase the rest of the line */
4500                 Term_erase(3+n, i - INVEN_RARM, 255);
4501
4502                 /* Display the weight (if needed) */
4503                 if (show_weights && o_ptr->weight)
4504                 {
4505                         int wgt = o_ptr->weight * o_ptr->number;
4506 #ifdef JP
4507                         sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
4508 #else
4509                         sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4510 #endif
4511
4512                         prt(tmp_val, i - INVEN_RARM, wid - (show_labels ? 28 : 9));
4513                 }
4514
4515                 /* Display the slot description (if needed) */
4516                 if (show_labels)
4517                 {
4518                         Term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
4519                         prt(mention_use(i), i - INVEN_RARM, wid - 15);
4520                 }
4521         }
4522
4523         /* Erase the rest of the window */
4524         for (i = INVEN_TOTAL - INVEN_RARM; i < hgt; i++)
4525         {
4526                 /* Clear that line */
4527                 Term_erase(0, i, 255);
4528         }
4529 }
4530
4531
4532 /*
4533  * Find the "first" inventory object with the given "tag".
4534  *
4535  * A "tag" is a numeral "n" appearing as "@n" anywhere in the
4536  * inscription of an object.  Alphabetical characters don't work as a
4537  * tag in this form.
4538  *
4539  * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
4540  * and "x" is the "current" command_cmd code.
4541  */
4542 static bool get_tag(int *cp, char tag, int mode)
4543 {
4544         int i, start, end;
4545         cptr s;
4546
4547         /* Extract index from mode */
4548         switch (mode)
4549         {
4550         case USE_EQUIP:
4551                 start = INVEN_RARM;
4552                 end = INVEN_TOTAL - 1;
4553                 break;
4554
4555         case USE_INVEN:
4556                 start = 0;
4557                 end = INVEN_PACK - 1;
4558                 break;
4559
4560         default:
4561                 return FALSE;
4562         }
4563
4564         /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
4565
4566         /* Check every inventory object */
4567         for (i = start; i <= end; i++)
4568         {
4569                 object_type *o_ptr = &inventory[i];
4570
4571                 /* Skip non-objects */
4572                 if (!o_ptr->k_idx) continue;
4573
4574                 /* Skip empty inscriptions */
4575                 if (!o_ptr->inscription) continue;
4576
4577                 /* Skip non-choice */
4578                 if (!item_tester_okay(o_ptr)) continue;
4579
4580                 /* Find a '@' */
4581                 s = my_strchr(quark_str(o_ptr->inscription), '@');
4582
4583                 /* Process all tags */
4584                 while (s)
4585                 {
4586                         /* Check the special tags */
4587                         if ((s[1] == command_cmd) && (s[2] == tag))
4588                         {
4589                                 /* Save the actual inventory ID */
4590                                 *cp = i;
4591
4592                                 /* Success */
4593                                 return (TRUE);
4594                         }
4595
4596                         /* Find another '@' */
4597                         s = my_strchr(s + 1, '@');
4598                 }
4599         }
4600
4601
4602         /**** Find a tag in the form of {@#} (allows only numerals)  ***/
4603
4604         /* Don't allow {@#} with '#' being alphabet */
4605         if (tag < '0' || '9' < tag)
4606         {
4607                 /* No such tag */
4608                 return FALSE;
4609         }
4610
4611         /* Check every object */
4612         for (i = start; i <= end; i++)
4613         {
4614                 object_type *o_ptr = &inventory[i];
4615
4616                 /* Skip non-objects */
4617                 if (!o_ptr->k_idx) continue;
4618
4619                 /* Skip empty inscriptions */
4620                 if (!o_ptr->inscription) continue;
4621
4622                 /* Skip non-choice */
4623                 if (!item_tester_okay(o_ptr)) continue;
4624
4625                 /* Find a '@' */
4626                 s = my_strchr(quark_str(o_ptr->inscription), '@');
4627
4628                 /* Process all tags */
4629                 while (s)
4630                 {
4631                         /* Check the normal tags */
4632                         if (s[1] == tag)
4633                         {
4634                                 /* Save the actual inventory ID */
4635                                 *cp = i;
4636
4637                                 /* Success */
4638                                 return (TRUE);
4639                         }
4640
4641                         /* Find another '@' */
4642                         s = my_strchr(s + 1, '@');
4643                 }
4644         }
4645
4646         /* No such tag */
4647         return (FALSE);
4648 }
4649
4650
4651 /*
4652  * Find the "first" floor object with the given "tag".
4653  *
4654  * A "tag" is a numeral "n" appearing as "@n" anywhere in the
4655  * inscription of an object.  Alphabetical characters don't work as a
4656  * tag in this form.
4657  *
4658  * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
4659  * and "x" is the "current" command_cmd code.
4660  */
4661 static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
4662 {
4663         int i;
4664         cptr s;
4665
4666         /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
4667
4668         /* Check every object in the grid */
4669         for (i = 0; i < floor_num && i < 23; i++)
4670         {
4671                 object_type *o_ptr = &o_list[floor_list[i]];
4672
4673                 /* Skip empty inscriptions */
4674                 if (!o_ptr->inscription) continue;
4675
4676                 /* Find a '@' */
4677                 s = my_strchr(quark_str(o_ptr->inscription), '@');
4678
4679                 /* Process all tags */
4680                 while (s)
4681                 {
4682                         /* Check the special tags */
4683                         if ((s[1] == command_cmd) && (s[2] == tag))
4684                         {
4685                                 /* Save the actual floor object ID */
4686                                 *cp = i;
4687
4688                                 /* Success */
4689                                 return (TRUE);
4690                         }
4691
4692                         /* Find another '@' */
4693                         s = my_strchr(s + 1, '@');
4694                 }
4695         }
4696
4697
4698         /**** Find a tag in the form of {@#} (allows only numerals)  ***/
4699
4700         /* Don't allow {@#} with '#' being alphabet */
4701         if (tag < '0' || '9' < tag)
4702         {
4703                 /* No such tag */
4704                 return FALSE;
4705         }
4706
4707         /* Check every object in the grid */
4708         for (i = 0; i < floor_num && i < 23; i++)
4709         {
4710                 object_type *o_ptr = &o_list[floor_list[i]];
4711
4712                 /* Skip empty inscriptions */
4713                 if (!o_ptr->inscription) continue;
4714
4715                 /* Find a '@' */
4716                 s = my_strchr(quark_str(o_ptr->inscription), '@');
4717
4718                 /* Process all tags */
4719                 while (s)
4720                 {
4721                         /* Check the normal tags */
4722                         if (s[1] == tag)
4723                         {
4724                                 /* Save the floor object ID */
4725                                 *cp = i;
4726
4727                                 /* Success */
4728                                 return (TRUE);
4729                         }
4730
4731                         /* Find another '@' */
4732                         s = my_strchr(s + 1, '@');
4733                 }
4734         }
4735
4736         /* No such tag */
4737         return (FALSE);
4738 }
4739
4740
4741 /*
4742  * Move around label characters with correspond tags
4743  */
4744 static void prepare_label_string(char *label, int mode)
4745 {
4746         cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
4747         int  offset = (mode == USE_EQUIP) ? INVEN_RARM : 0;
4748         int  i;
4749
4750         /* Prepare normal labels */
4751         strcpy(label, alphabet_chars);
4752
4753         /* Move each label */
4754         for (i = 0; i < 52; i++)
4755         {
4756                 int index;
4757                 char c = alphabet_chars[i];
4758
4759                 /* Find a tag with this label */
4760                 if (get_tag(&index, c, mode))
4761                 {
4762                         /* Delete the overwritten label */
4763                         if (label[i] == c) label[i] = ' ';
4764
4765                         /* Move the label to the place of corresponding tag */
4766                         label[index - offset] = c;
4767                 }
4768         }
4769 }
4770
4771
4772 /*
4773  * Move around label characters with correspond tags (floor version)
4774  */
4775 static void prepare_label_string_floor(char *label, int floor_list[], int floor_num)
4776 {
4777         cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
4778         int  i;
4779
4780         /* Prepare normal labels */
4781         strcpy(label, alphabet_chars);
4782
4783         /* Move each label */
4784         for (i = 0; i < 52; i++)
4785         {
4786                 int index;
4787                 char c = alphabet_chars[i];
4788
4789                 /* Find a tag with this label */
4790                 if (get_tag_floor(&index, c, floor_list, floor_num))
4791                 {
4792                         /* Delete the overwritten label */
4793                         if (label[i] == c) label[i] = ' ';
4794
4795                         /* Move the label to the place of corresponding tag */
4796                         label[index] = c;
4797                 }
4798         }
4799 }
4800
4801
4802 /*
4803  * Display the inventory.
4804  *
4805  * Hack -- do not display "trailing" empty slots
4806  */
4807 int show_inven(int target_item)
4808 {
4809         int             i, j, k, l, z = 0;
4810         int             col, cur_col, len;
4811         object_type     *o_ptr;
4812         char            o_name[MAX_NLEN];
4813         char            tmp_val[80];
4814         int             out_index[23];
4815         byte            out_color[23];
4816         char            out_desc[23][MAX_NLEN];
4817         int             target_item_label = 0;
4818         int             wid, hgt;
4819         char            inven_label[52 + 1];
4820
4821         /* Starting column */
4822         col = command_gap;
4823
4824         /* Get size */
4825         Term_get_size(&wid, &hgt);
4826
4827         /* Default "max-length" */
4828         len = wid - col - 1;
4829
4830
4831         /* Find the "final" slot */
4832         for (i = 0; i < INVEN_PACK; i++)
4833         {
4834                 o_ptr = &inventory[i];
4835
4836                 /* Skip non-objects */
4837                 if (!o_ptr->k_idx) continue;
4838
4839                 /* Track */
4840                 z = i + 1;
4841         }
4842
4843         prepare_label_string(inven_label, USE_INVEN);
4844
4845         /* Display the inventory */
4846         for (k = 0, i = 0; i < z; i++)
4847         {
4848                 o_ptr = &inventory[i];
4849
4850                 /* Is this item acceptable? */
4851                 if (!item_tester_okay(o_ptr)) continue;
4852
4853                 /* Describe the object */
4854                 object_desc(o_name, o_ptr, 0);
4855
4856                 /* Save the object index, color, and description */
4857                 out_index[k] = i;
4858                 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4859
4860                 /* Grey out charging items */
4861                 if (o_ptr->timeout)
4862                 {
4863                         out_color[k] = TERM_L_DARK;
4864                 }
4865
4866                 (void)strcpy(out_desc[k], o_name);
4867
4868                 /* Find the predicted "line length" */
4869                 l = strlen(out_desc[k]) + 5;
4870
4871                 /* Be sure to account for the weight */
4872                 if (show_weights) l += 9;
4873
4874                 /* Account for icon if displayed */
4875                 if (show_item_graph)
4876                 {
4877                         l += 2;
4878                         if (use_bigtile) l++;
4879                 }
4880
4881                 /* Maintain the maximum length */
4882                 if (l > len) len = l;
4883
4884                 /* Advance to next "line" */
4885                 k++;
4886         }
4887
4888         /* Find the column to start in */
4889         col = (len > wid - 4) ? 0 : (wid - len - 1);
4890
4891         /* Output each entry */
4892         for (j = 0; j < k; j++)
4893         {
4894                 /* Get the index */
4895                 i = out_index[j];
4896
4897                 /* Get the item */
4898                 o_ptr = &inventory[i];
4899
4900                 /* Clear the line */
4901                 prt("", j + 1, col ? col - 2 : col);
4902
4903                 if (use_menu && target_item)
4904                 {
4905                         if (j == (target_item-1))
4906                         {
4907 #ifdef JP
4908                                 strcpy(tmp_val, "¡Õ");
4909 #else
4910                                 strcpy(tmp_val, "> ");
4911 #endif
4912                                 target_item_label = i;
4913                         }
4914                         else strcpy(tmp_val, "  ");
4915                 }
4916                 else if (i <= INVEN_PACK)
4917                 {
4918                         /* Prepare an index --(-- */
4919                         sprintf(tmp_val, "%c)", inven_label[i]);
4920                 }
4921                 else
4922                 {
4923                         /* Prepare an index --(-- */
4924                         sprintf(tmp_val, "%c)", index_to_label(i));
4925                 }
4926
4927                 /* Clear the line with the (possibly indented) index */
4928                 put_str(tmp_val, j + 1, col);
4929
4930                 cur_col = col + 3;
4931
4932                 /* Display graphics for object, if desired */
4933                 if (show_item_graph)
4934                 {
4935                         byte  a = object_attr(o_ptr);
4936                         char c = object_char(o_ptr);
4937
4938 #ifdef AMIGA
4939                         if (a & 0x80) a |= 0x40;
4940 #endif
4941
4942                         Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
4943                         if (use_bigtile) cur_col++;
4944
4945                         cur_col += 2;
4946                 }
4947
4948
4949                 /* Display the entry itself */
4950                 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
4951
4952                 /* Display the weight if needed */
4953                 if (show_weights)
4954                 {
4955                         int wgt = o_ptr->weight * o_ptr->number;
4956 #ifdef JP
4957                         (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4958 #else
4959                         (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4960 #endif
4961
4962                         prt(tmp_val, j + 1, wid - 9);
4963                 }
4964         }
4965
4966         /* Make a "shadow" below the list (only if needed) */
4967         if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4968
4969         /* Save the new column */
4970         command_gap = col;
4971
4972         return target_item_label;
4973 }
4974
4975
4976
4977 /*
4978  * Display the equipment.
4979  */
4980 int show_equip(int target_item)
4981 {
4982         int             i, j, k, l;
4983         int             col, cur_col, len;
4984         object_type     *o_ptr;
4985         char            tmp_val[80];
4986         char            o_name[MAX_NLEN];
4987         int             out_index[23];
4988         byte            out_color[23];
4989         char            out_desc[23][MAX_NLEN];
4990         int             target_item_label = 0;
4991         int             wid, hgt;
4992         char            equip_label[52 + 1];
4993
4994         /* Starting column */
4995         col = command_gap;
4996
4997         /* Get size */
4998         Term_get_size(&wid, &hgt);
4999
5000         /* Maximal length */
5001         len = wid - col - 1;
5002
5003
5004         /* Scan the equipment list */
5005         for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
5006         {
5007                 o_ptr = &inventory[i];
5008
5009                 /* Is this item acceptable? */
5010                 if (!(select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr)) &&
5011                     (!((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute) ||
5012                      item_tester_no_ryoute)) continue;
5013
5014                 /* Description */
5015                 object_desc(o_name, o_ptr, 0);
5016
5017                 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
5018                 {
5019 #ifdef JP
5020                         (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
5021 #else
5022                         (void)strcpy(out_desc[k],"(wielding with two-hands)");
5023 #endif
5024                         out_color[k] = TERM_WHITE;
5025                 }
5026                 else
5027                 {
5028                         (void)strcpy(out_desc[k], o_name);
5029                         out_color[k] = tval_to_attr[o_ptr->tval % 128];
5030                 }
5031
5032                 out_index[k] = i;
5033                 /* Grey out charging items */
5034                 if (o_ptr->timeout)
5035                 {
5036                         out_color[k] = TERM_L_DARK;
5037                 }
5038
5039                 /* Extract the maximal length (see below) */
5040 #ifdef JP
5041                 l = strlen(out_desc[k]) + (2 + 1);
5042 #else
5043                 l = strlen(out_desc[k]) + (2 + 3);
5044 #endif
5045
5046
5047                 /* Increase length for labels (if needed) */
5048 #ifdef JP
5049                 if (show_labels) l += (7 + 2);
5050 #else
5051                 if (show_labels) l += (14 + 2);
5052 #endif
5053
5054
5055                 /* Increase length for weight (if needed) */
5056                 if (show_weights) l += 9;
5057
5058                 if (show_item_graph) l += 2;
5059
5060                 /* Maintain the max-length */
5061                 if (l > len) len = l;
5062
5063                 /* Advance the entry */
5064                 k++;
5065         }
5066
5067         /* Hack -- Find a column to start in */
5068 #ifdef JP
5069         col = (len > wid - 6) ? 0 : (wid - len - 1);
5070 #else
5071         col = (len > wid - 4) ? 0 : (wid - len - 1);
5072 #endif
5073
5074         prepare_label_string(equip_label, USE_EQUIP);
5075
5076         /* Output each entry */
5077         for (j = 0; j < k; j++)
5078         {
5079                 /* Get the index */
5080                 i = out_index[j];
5081
5082                 /* Get the item */
5083                 o_ptr = &inventory[i];
5084
5085                 /* Clear the line */
5086                 prt("", j + 1, col ? col - 2 : col);
5087
5088                 if (use_menu && target_item)
5089                 {
5090                         if (j == (target_item-1))
5091                         {
5092 #ifdef JP
5093                                 strcpy(tmp_val, "¡Õ");
5094 #else
5095                                 strcpy(tmp_val, "> ");
5096 #endif
5097                                 target_item_label = i;
5098                         }
5099                         else strcpy(tmp_val, "  ");
5100                 }
5101                 else if (i >= INVEN_RARM)
5102                 {
5103                         /* Prepare an index --(-- */
5104                         sprintf(tmp_val, "%c)", equip_label[i - INVEN_RARM]);
5105                 }
5106                 else /* Paranoia */
5107                 {
5108                         /* Prepare an index --(-- */
5109                         sprintf(tmp_val, "%c)", index_to_label(i));
5110                 }
5111
5112                 /* Clear the line with the (possibly indented) index */
5113                 put_str(tmp_val, j+1, col);
5114
5115                 cur_col = col + 3;
5116
5117                 /* Display graphics for object, if desired */
5118                 if (show_item_graph)
5119                 {
5120                         byte a = object_attr(o_ptr);
5121                         char c = object_char(o_ptr);
5122
5123 #ifdef AMIGA
5124                         if (a & 0x80) a |= 0x40;
5125 #endif
5126
5127                         Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
5128                         if (use_bigtile) cur_col++;
5129
5130                         cur_col += 2;
5131                 }
5132
5133                 /* Use labels */
5134                 if (show_labels)
5135                 {
5136                         /* Mention the use */
5137 #ifdef JP
5138                         (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
5139 #else
5140                         (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
5141 #endif
5142
5143                         put_str(tmp_val, j+1, cur_col);
5144
5145                         /* Display the entry itself */
5146 #ifdef JP
5147                         c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
5148 #else
5149                         c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
5150 #endif
5151                 }
5152
5153                 /* No labels */
5154                 else
5155                 {
5156                         /* Display the entry itself */
5157                         c_put_str(out_color[j], out_desc[j], j+1, cur_col);
5158                 }
5159
5160                 /* Display the weight if needed */
5161                 if (show_weights)
5162                 {
5163                         int wgt = o_ptr->weight * o_ptr->number;
5164 #ifdef JP
5165                         (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5166 #else
5167                         (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
5168 #endif
5169
5170                         prt(tmp_val, j + 1, wid - 9);
5171                 }
5172         }
5173
5174         /* Make a "shadow" below the list (only if needed) */
5175         if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5176
5177         /* Save the new column */
5178         command_gap = col;
5179
5180         return target_item_label;
5181 }
5182
5183
5184
5185
5186 /*
5187  * Flip "inven" and "equip" in any sub-windows
5188  */
5189 void toggle_inven_equip(void)
5190 {
5191         int j;
5192
5193         /* Scan windows */
5194         for (j = 0; j < 8; j++)
5195         {
5196                 /* Unused */
5197                 if (!angband_term[j]) continue;
5198
5199                 /* Flip inven to equip */
5200                 if (window_flag[j] & (PW_INVEN))
5201                 {
5202                         /* Flip flags */
5203                         window_flag[j] &= ~(PW_INVEN);
5204                         window_flag[j] |= (PW_EQUIP);
5205
5206                         /* Window stuff */
5207                         p_ptr->window |= (PW_EQUIP);
5208                 }
5209
5210                 /* Flip inven to equip */
5211                 else if (window_flag[j] & (PW_EQUIP))
5212                 {
5213                         /* Flip flags */
5214                         window_flag[j] &= ~(PW_EQUIP);
5215                         window_flag[j] |= (PW_INVEN);
5216
5217                         /* Window stuff */
5218                         p_ptr->window |= (PW_INVEN);
5219                 }
5220         }
5221 }
5222
5223
5224
5225 /*
5226  * Verify the choice of an item.
5227  *
5228  * The item can be negative to mean "item on floor".
5229  */
5230 static bool verify(cptr prompt, int item)
5231 {
5232         char        o_name[MAX_NLEN];
5233         char        out_val[MAX_NLEN+20];
5234         object_type *o_ptr;
5235
5236
5237         /* Inventory */
5238         if (item >= 0)
5239         {
5240                 o_ptr = &inventory[item];
5241         }
5242
5243         /* Floor */
5244         else
5245         {
5246                 o_ptr = &o_list[0 - item];
5247         }
5248
5249         /* Describe */
5250         object_desc(o_name, o_ptr, 0);
5251
5252         /* Prompt */
5253 #ifdef JP
5254 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
5255 #else
5256         (void)sprintf(out_val, "%s %s? ", prompt, o_name);
5257 #endif
5258
5259
5260         /* Query */
5261         return (get_check(out_val));
5262 }
5263
5264
5265 /*
5266  * Hack -- allow user to "prevent" certain choices
5267  *
5268  * The item can be negative to mean "item on floor".
5269  */
5270 static bool get_item_allow(int item)
5271 {
5272         cptr s;
5273
5274         object_type *o_ptr;
5275
5276         if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
5277
5278         /* Inventory */
5279         if (item >= 0)
5280         {
5281                 o_ptr = &inventory[item];
5282         }
5283
5284         /* Floor */
5285         else
5286         {
5287                 o_ptr = &o_list[0 - item];
5288         }
5289
5290         /* No inscription */
5291         if (!o_ptr->inscription) return (TRUE);
5292
5293         /* Find a '!' */
5294         s = my_strchr(quark_str(o_ptr->inscription), '!');
5295
5296         /* Process preventions */
5297         while (s)
5298         {
5299                 /* Check the "restriction" */
5300                 if ((s[1] == command_cmd) || (s[1] == '*'))
5301                 {
5302                         /* Verify the choice */
5303 #ifdef JP
5304 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
5305 #else
5306                         if (!verify("Really try", item)) return (FALSE);
5307 #endif
5308
5309                 }
5310
5311                 /* Find another '!' */
5312                 s = my_strchr(s + 1, '!');
5313         }
5314
5315         /* Allow it */
5316         return (TRUE);
5317 }
5318
5319
5320
5321 /*
5322  * Auxiliary function for "get_item()" -- test an index
5323  */
5324 static bool get_item_okay(int i)
5325 {
5326         /* Illegal items */
5327         if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
5328
5329         if (select_ring_slot) return is_ring_slot(i);
5330
5331         /* Verify the item */
5332         if (!item_tester_okay(&inventory[i])) return (FALSE);
5333
5334         /* Assume okay */
5335         return (TRUE);
5336 }
5337
5338
5339
5340 /*
5341  * Determine whether get_item() can get some item or not
5342  * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
5343  */
5344 bool can_get_item(void)
5345 {
5346         int j, floor_list[23], floor_num = 0;
5347
5348         for (j = 0; j < INVEN_TOTAL; j++)
5349                 if (item_tester_okay(&inventory[j]))
5350                         return TRUE;
5351
5352         floor_num = scan_floor(floor_list, py, px, 0x03);
5353         if (floor_num)
5354                 return TRUE;
5355
5356         return FALSE;
5357 }
5358
5359 /*
5360  * Let the user select an item, save its "index"
5361  *
5362  * Return TRUE only if an acceptable item was chosen by the user.
5363  *
5364  * The selected item must satisfy the "item_tester_hook()" function,
5365  * if that hook is set, and the "item_tester_tval", if that value is set.
5366  *
5367  * All "item_tester" restrictions are cleared before this function returns.
5368  *
5369  * The user is allowed to choose acceptable items from the equipment,
5370  * inventory, or floor, respectively, if the proper flag was given,
5371  * and there are any acceptable items in that location.
5372  *
5373  * The equipment or inventory are displayed (even if no acceptable
5374  * items are in that location) if the proper flag was given.
5375  *
5376  * If there are no acceptable items available anywhere, and "str" is
5377  * not NULL, then it will be used as the text of a warning message
5378  * before the function returns.
5379  *
5380  * Note that the user must press "-" to specify the item on the floor,
5381  * and there is no way to "examine" the item on the floor, while the
5382  * use of "capital" letters will "examine" an inventory/equipment item,
5383  * and prompt for its use.
5384  *
5385  * If a legal item is selected from the inventory, we save it in "cp"
5386  * directly (0 to 35), and return TRUE.
5387  *
5388  * If a legal item is selected from the floor, we save it in "cp" as
5389  * a negative (-1 to -511), and return TRUE.
5390  *
5391  * If no item is available, we do nothing to "cp", and we display a
5392  * warning message, using "str" if available, and return FALSE.
5393  *
5394  * If no item is selected, we do nothing to "cp", and return FALSE.
5395  *
5396  * Global "p_ptr->command_new" is used when viewing the inventory or equipment
5397  * to allow the user to enter a command while viewing those screens, and
5398  * also to induce "auto-enter" of stores, and other such stuff.
5399  *
5400  * Global "p_ptr->command_see" may be set before calling this function to start
5401  * out in "browse" mode.  It is cleared before this function returns.
5402  *
5403  * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
5404  * If it is TRUE then we are viewing inventory, else equipment.
5405  *
5406  * We always erase the prompt when we are done, leaving a blank line,
5407  * or a warning message, if appropriate, if no items are available.
5408  */
5409 bool get_item(int *cp, cptr pmt, cptr str, int mode)
5410 {
5411         s16b this_o_idx, next_o_idx = 0;
5412
5413         char which = ' ';
5414
5415         int j, k, i1, i2, e1, e2;
5416
5417         bool done, item;
5418
5419         bool oops = FALSE;
5420
5421         bool equip = FALSE;
5422         bool inven = FALSE;
5423         bool floor = FALSE;
5424
5425         bool allow_floor = FALSE;
5426
5427         bool toggle = FALSE;
5428
5429         char tmp_val[160];
5430         char out_val[160];
5431
5432         /* See cmd5.c */
5433         extern bool select_the_force;
5434
5435         int menu_line = (use_menu ? 1 : 0);
5436         int max_inven = 0;
5437         int max_equip = 0;
5438
5439 #ifdef ALLOW_EASY_FLOOR /* TNB */
5440
5441         if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
5442
5443 #endif /* ALLOW_EASY_FLOOR -- TNB */
5444
5445         /* Extract args */
5446         if (mode & USE_EQUIP) equip = TRUE;
5447         if (mode & USE_INVEN) inven = TRUE;
5448         if (mode & USE_FLOOR) floor = TRUE;
5449
5450 #ifdef ALLOW_REPEAT
5451
5452         /* Get the item index */
5453         if (repeat_pull(cp))
5454         {
5455                 /* the_force */
5456                 if (select_the_force && (*cp == INVEN_FORCE))
5457                 {
5458                         item_tester_tval = 0;
5459                         item_tester_hook = NULL;
5460                         command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5461                         return (TRUE);
5462                 }
5463
5464                 /* Floor item? */
5465                 else if (floor && (*cp < 0))
5466                 {
5467                         object_type *o_ptr;
5468
5469                         /* Special index */
5470                         k = 0 - (*cp);
5471
5472                         /* Acquire object */
5473                         o_ptr = &o_list[k];
5474
5475                         /* Validate the item */
5476                         if (item_tester_okay(o_ptr))
5477                         {
5478                                 /* Forget the item_tester_tval restriction */
5479                                 item_tester_tval = 0;
5480
5481                                 /* Forget the item_tester_hook restriction */
5482                                 item_tester_hook = NULL;
5483
5484                                 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5485
5486                                 /* Success */
5487                                 return (TRUE);
5488                         }
5489                 }
5490
5491                 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
5492                          (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
5493                 {
5494                         /* Verify the item */
5495                         if (get_item_okay(*cp))
5496                         {
5497                                 /* Forget the item_tester_tval restriction */
5498                                 item_tester_tval = 0;
5499
5500                                 /* Forget the item_tester_hook restriction */
5501                                 item_tester_hook = NULL;
5502
5503                                 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5504
5505                                 /* Success */
5506                                 return (TRUE);
5507                         }
5508                 }
5509         }
5510
5511 #endif /* ALLOW_REPEAT */
5512
5513
5514         /* Paranoia XXX XXX XXX */
5515         msg_print(NULL);
5516
5517
5518         /* Not done */
5519         done = FALSE;
5520
5521         /* No item selected */
5522         item = FALSE;
5523
5524
5525         /* Full inventory */
5526         i1 = 0;
5527         i2 = INVEN_PACK - 1;
5528
5529         /* Forbid inventory */
5530         if (!inven) i2 = -1;
5531         else if (use_menu)
5532         {
5533                 for (j = 0; j < INVEN_PACK; j++)
5534                         if (item_tester_okay(&inventory[j])) max_inven++;
5535         }
5536
5537         /* Restrict inventory indexes */
5538         while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5539         while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5540
5541
5542         /* Full equipment */
5543         e1 = INVEN_RARM;
5544         e2 = INVEN_TOTAL - 1;
5545
5546         /* Forbid equipment */
5547         if (!equip) e2 = -1;
5548         else if (use_menu)
5549         {
5550                 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5551                         if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
5552                 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5553         }
5554
5555         /* Restrict equipment indexes */
5556         while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5557         while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5558
5559         if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
5560         {
5561                 if (p_ptr->migite)
5562                 {
5563                         if (e2 < INVEN_LARM) e2 = INVEN_LARM;
5564                 }
5565                 else if (p_ptr->hidarite) e1 = INVEN_RARM;
5566         }
5567
5568
5569         /* Restrict floor usage */
5570         if (floor)
5571         {
5572                 /* Scan all objects in the grid */
5573                 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5574                 {
5575                         object_type *o_ptr;
5576
5577                         /* Acquire object */
5578                         o_ptr = &o_list[this_o_idx];
5579
5580                         /* Acquire next object */
5581                         next_o_idx = o_ptr->next_o_idx;
5582
5583                         /* Accept the item on the floor if legal */
5584                         if (item_tester_okay(o_ptr) && (o_ptr->marked & OM_FOUND)) allow_floor = TRUE;
5585                 }
5586         }
5587
5588         /* Require at least one legal choice */
5589         if (!allow_floor && (i1 > i2) && (e1 > e2))
5590         {
5591                 /* Cancel p_ptr->command_see */
5592                 command_see = FALSE;
5593
5594                 /* Oops */
5595                 oops = TRUE;
5596
5597                 /* Done */
5598                 done = TRUE;
5599
5600                 if (select_the_force) {
5601                     *cp = INVEN_FORCE;
5602                     item = TRUE;
5603                 }
5604         }
5605
5606         /* Analyze choices */
5607         else
5608         {
5609                 /* Hack -- Start on equipment if requested */
5610                 if (command_see && command_wrk && equip)
5611                 {
5612                         command_wrk = TRUE;
5613                 }
5614
5615                 /* Use inventory if allowed */
5616                 else if (inven)
5617                 {
5618                         command_wrk = FALSE;
5619                 }
5620
5621                 /* Use equipment if allowed */
5622                 else if (equip)
5623                 {
5624                         command_wrk = TRUE;
5625                 }
5626
5627                 /* Use inventory for floor */
5628                 else
5629                 {
5630                         command_wrk = FALSE;
5631                 }
5632         }
5633
5634
5635         /*
5636          * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5637          */
5638         if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5639
5640         /* Hack -- start out in "display" mode */
5641         if (command_see)
5642         {
5643                 /* Save screen */
5644                 screen_save();
5645         }
5646
5647
5648         /* Repeat until done */
5649         while (!done)
5650         {
5651                 int get_item_label = 0;
5652
5653                 /* Show choices */
5654                 int ni = 0;
5655                 int ne = 0;
5656
5657                 /* Scan windows */
5658                 for (j = 0; j < 8; j++)
5659                 {
5660                         /* Unused */
5661                         if (!angband_term[j]) continue;
5662
5663                         /* Count windows displaying inven */
5664                         if (window_flag[j] & (PW_INVEN)) ni++;
5665
5666                         /* Count windows displaying equip */
5667                         if (window_flag[j] & (PW_EQUIP)) ne++;
5668                 }
5669
5670                 /* Toggle if needed */
5671                 if ((command_wrk && ni && !ne) ||
5672                     (!command_wrk && !ni && ne))
5673                 {
5674                         /* Toggle */
5675                         toggle_inven_equip();
5676
5677                         /* Track toggles */
5678                         toggle = !toggle;
5679                 }
5680
5681                 /* Update */
5682                 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5683
5684                 /* Redraw windows */
5685                 window_stuff();
5686
5687
5688                 /* Inventory screen */
5689                 if (!command_wrk)
5690                 {
5691                         /* Redraw if needed */
5692                         if (command_see) get_item_label = show_inven(menu_line);
5693                 }
5694
5695                 /* Equipment screen */
5696                 else
5697                 {
5698                         /* Redraw if needed */
5699                         if (command_see) get_item_label = show_equip(menu_line);
5700                 }
5701
5702                 /* Viewing inventory */
5703                 if (!command_wrk)
5704                 {
5705                         /* Begin the prompt */
5706 #ifdef JP
5707                         sprintf(out_val, "»ý¤Áʪ:");
5708 #else
5709                         sprintf(out_val, "Inven:");
5710 #endif
5711
5712                         /* Some legal items */
5713                         if ((i1 <= i2) && !use_menu)
5714                         {
5715                                 /* Build the prompt */
5716 #ifdef JP
5717                                 sprintf(tmp_val, "%c-%c,'(',')',",
5718 #else
5719                                 sprintf(tmp_val, " %c-%c,'(',')',",
5720 #endif
5721                                         index_to_label(i1), index_to_label(i2));
5722
5723                                 /* Append */
5724                                 strcat(out_val, tmp_val);
5725                         }
5726
5727                         /* Indicate ability to "view" */
5728 #ifdef JP
5729                         if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5730 #else
5731                         if (!command_see && !use_menu) strcat(out_val, " * to see,");
5732 #endif
5733
5734                         /* Append */
5735 #ifdef JP
5736                         if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
5737 #else
5738                         if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
5739 #endif
5740                 }
5741
5742                 /* Viewing equipment */
5743                 else
5744                 {
5745                         /* Begin the prompt */
5746 #ifdef JP
5747                         sprintf(out_val, "ÁõÈ÷ÉÊ:");
5748 #else
5749                         sprintf(out_val, "Equip:");
5750 #endif
5751
5752                         /* Some legal items */
5753                         if ((e1 <= e2) && !use_menu)
5754                         {
5755                                 /* Build the prompt */
5756 #ifdef JP
5757                                 sprintf(tmp_val, "%c-%c,'(',')',",
5758 #else
5759                                 sprintf(tmp_val, " %c-%c,'(',')',",
5760 #endif
5761                                         index_to_label(e1), index_to_label(e2));
5762
5763                                 /* Append */
5764                                 strcat(out_val, tmp_val);
5765                         }
5766
5767                         /* Indicate ability to "view" */
5768 #ifdef JP
5769                         if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5770 #else
5771                         if (!command_see) strcat(out_val, " * to see,");
5772 #endif
5773
5774                         /* Append */
5775 #ifdef JP
5776                         if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
5777 #else
5778                         if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
5779 #endif
5780                 }
5781
5782                 /* Indicate legality of the "floor" item */
5783 #ifdef JP
5784                 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
5785                 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
5786 #else
5787                 if (allow_floor) strcat(out_val, " - for floor,");
5788                 if (select_the_force) strcat(out_val, " w for the Force,");
5789 #endif
5790
5791                 /* Finish the prompt */
5792                 strcat(out_val, " ESC");
5793
5794                 /* Build the prompt */
5795                 sprintf(tmp_val, "(%s) %s", out_val, pmt);
5796
5797                 /* Show the prompt */
5798                 prt(tmp_val, 0, 0);
5799
5800                 /* Get a key */
5801                 which = inkey();
5802
5803                 if (use_menu)
5804                 {
5805                 int max_line = (command_wrk ? max_equip : max_inven);
5806                 switch (which)
5807                 {
5808                         case ESCAPE:
5809                         case 'z':
5810                         case 'Z':
5811                         case '0':
5812                         {
5813                                 done = TRUE;
5814                                 break;
5815                         }
5816
5817                         case '8':
5818                         case 'k':
5819                         case 'K':
5820                         {
5821                                 menu_line += (max_line - 1);
5822                                 break;
5823                         }
5824
5825                         case '2':
5826                         case 'j':
5827                         case 'J':
5828                         {
5829                                 menu_line++;
5830                                 break;
5831                         }
5832
5833                         case '4':
5834                         case '6':
5835                         case 'h':
5836                         case 'H':
5837                         case 'l':
5838                         case 'L':
5839                         {
5840                                 /* Verify legality */
5841                                 if (!inven || !equip)
5842                                 {
5843                                         bell();
5844                                         break;
5845                                 }
5846
5847                                 /* Hack -- Fix screen */
5848                                 if (command_see)
5849                                 {
5850                                         /* Load screen */
5851                                         screen_load();
5852
5853                                         /* Save screen */
5854                                         screen_save();
5855                                 }
5856
5857                                 /* Switch inven/equip */
5858                                 command_wrk = !command_wrk;
5859                                 max_line = (command_wrk ? max_equip : max_inven);
5860                                 if (menu_line > max_line) menu_line = max_line;
5861
5862                                 /* Need to redraw */
5863                                 break;
5864                         }
5865
5866                         case 'x':
5867                         case 'X':
5868                         case '\r':
5869                         case '\n':
5870                         {
5871                                 if (command_wrk == USE_FLOOR)
5872                                 {
5873                                         /* Special index */
5874                                         (*cp) = -get_item_label;
5875                                 }
5876                                 else
5877                                 {
5878                                         /* Validate the item */
5879                                         if (!get_item_okay(get_item_label))
5880                                         {
5881                                                 bell();
5882                                                 break;
5883                                         }
5884
5885                                         /* Allow player to "refuse" certain actions */
5886                                         if (!get_item_allow(get_item_label))
5887                                         {
5888                                                 done = TRUE;
5889                                                 break;
5890                                         }
5891
5892                                         /* Accept that choice */
5893                                         (*cp) = get_item_label;
5894                                 }
5895
5896                                 item = TRUE;
5897                                 done = TRUE;
5898                                 break;
5899                         }
5900                         case 'w':
5901                         {
5902                                 if (select_the_force) {
5903                                         *cp = INVEN_FORCE;
5904                                         item = TRUE;
5905                                         done = TRUE;
5906                                         break;
5907                                 }
5908                         }
5909                 }
5910                 if (menu_line > max_line) menu_line -= max_line;
5911                 }
5912                 else
5913                 {
5914                 /* Parse it */
5915                 switch (which)
5916                 {
5917                         case ESCAPE:
5918                         {
5919                                 done = TRUE;
5920                                 break;
5921                         }
5922
5923                         case '*':
5924                         case '?':
5925                         case ' ':
5926                         {
5927                                 /* Hide the list */
5928                                 if (command_see)
5929                                 {
5930                                         /* Flip flag */
5931                                         command_see = FALSE;
5932
5933                                         /* Load screen */
5934                                         screen_load();
5935                                 }
5936
5937                                 /* Show the list */
5938                                 else
5939                                 {
5940                                         /* Save screen */
5941                                         screen_save();
5942
5943                                         /* Flip flag */
5944                                         command_see = TRUE;
5945                                 }
5946                                 break;
5947                         }
5948
5949                         case '/':
5950                         {
5951                                 /* Verify legality */
5952                                 if (!inven || !equip)
5953                                 {
5954                                         bell();
5955                                         break;
5956                                 }
5957
5958                                 /* Hack -- Fix screen */
5959                                 if (command_see)
5960                                 {
5961                                         /* Load screen */
5962                                         screen_load();
5963
5964                                         /* Save screen */
5965                                         screen_save();
5966                                 }
5967
5968                                 /* Switch inven/equip */
5969                                 command_wrk = !command_wrk;
5970
5971                                 /* Need to redraw */
5972                                 break;
5973                         }
5974
5975                         case '-':
5976                         {
5977                                 /* Use floor item */
5978                                 if (allow_floor)
5979                                 {
5980                                         /* Scan all objects in the grid */
5981                                         for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5982                                         {
5983                                                 object_type *o_ptr;
5984
5985                                                 /* Acquire object */
5986                                                 o_ptr = &o_list[this_o_idx];
5987
5988                                                 /* Acquire next object */
5989                                                 next_o_idx = o_ptr->next_o_idx;
5990
5991                                                 /* Validate the item */
5992                                                 if (!item_tester_okay(o_ptr)) continue;
5993
5994                                                 /* Special index */
5995                                                 k = 0 - this_o_idx;
5996
5997                                                 /* Verify the item (if required) */
5998 #ifdef JP
5999 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
6000 #else
6001                                                 if (other_query_flag && !verify("Try", k)) continue;
6002 #endif
6003
6004
6005                                                 /* Allow player to "refuse" certain actions */
6006                                                 if (!get_item_allow(k)) continue;
6007
6008                                                 /* Accept that choice */
6009                                                 (*cp) = k;
6010                                                 item = TRUE;
6011                                                 done = TRUE;
6012                                                 break;
6013                                         }
6014
6015                                         /* Outer break */
6016                                         if (done) break;
6017                                 }
6018
6019                                 /* Oops */
6020                                 bell();
6021                                 break;
6022                         }
6023
6024                         case '0':
6025                         case '1': case '2': case '3':
6026                         case '4': case '5': case '6':
6027                         case '7': case '8': case '9':
6028                         {
6029                                 /* Look up the tag */
6030                                 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
6031                                 {
6032                                         bell();
6033                                         break;
6034                                 }
6035
6036                                 /* Hack -- Validate the item */
6037                                 if ((k < INVEN_RARM) ? !inven : !equip)
6038                                 {
6039                                         bell();
6040                                         break;
6041                                 }
6042
6043                                 /* Validate the item */
6044                                 if (!get_item_okay(k))
6045                                 {
6046                                         bell();
6047                                         break;
6048                                 }
6049
6050                                 /* Allow player to "refuse" certain actions */
6051                                 if (!get_item_allow(k))
6052                                 {
6053                                         done = TRUE;
6054                                         break;
6055                                 }
6056
6057                                 /* Accept that choice */
6058                                 (*cp) = k;
6059                                 item = TRUE;
6060                                 done = TRUE;
6061                                 break;
6062                         }
6063
6064 #if 0
6065                         case '\n':
6066                         case '\r':
6067                         {
6068                                 /* Choose "default" inventory item */
6069                                 if (!command_wrk)
6070                                 {
6071                                         k = ((i1 == i2) ? i1 : -1);
6072                                 }
6073
6074                                 /* Choose "default" equipment item */
6075                                 else
6076                                 {
6077                                         k = ((e1 == e2) ? e1 : -1);
6078                                 }
6079
6080                                 /* Validate the item */
6081                                 if (!get_item_okay(k))
6082                                 {
6083                                         bell();
6084                                         break;
6085                                 }
6086
6087                                 /* Allow player to "refuse" certain actions */
6088                                 if (!get_item_allow(k))
6089                                 {
6090                                         done = TRUE;
6091                                         break;
6092                                 }
6093
6094                                 /* Accept that choice */
6095                                 (*cp) = k;
6096                                 item = TRUE;
6097                                 done = TRUE;
6098                                 break;
6099                         }
6100 #endif
6101
6102                         case 'w':
6103                         {
6104                                 if (select_the_force) {
6105                                         *cp = INVEN_FORCE;
6106                                         item = TRUE;
6107                                         done = TRUE;
6108                                         break;
6109                                 }
6110
6111                                 /* Fall through */
6112                         }
6113
6114                         default:
6115                         {
6116                                 int ver;
6117                                 bool not_found = FALSE;
6118
6119                                 /* Look up the alphabetical tag */
6120                                 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
6121                                 {
6122                                         not_found = TRUE;
6123                                 }
6124
6125                                 /* Hack -- Validate the item */
6126                                 else if ((k < INVEN_RARM) ? !inven : !equip)
6127                                 {
6128                                         not_found = TRUE;
6129                                 }
6130
6131                                 /* Validate the item */
6132                                 else if (!get_item_okay(k))
6133                                 {
6134                                         not_found = TRUE;
6135                                 }
6136
6137                                 if (!not_found)
6138                                 {
6139                                         /* Accept that choice */
6140                                         (*cp) = k;
6141                                         item = TRUE;
6142                                         done = TRUE;
6143                                         break;
6144                                 }
6145
6146                                 /* Extract "query" setting */
6147                                 ver = isupper(which);
6148                                 which = tolower(which);
6149
6150                                 /* Convert letter to inventory index */
6151                                 if (!command_wrk)
6152                                 {
6153                                         if (which == '(') k = i1;
6154                                         else if (which == ')') k = i2;
6155                                         else k = label_to_inven(which);
6156                                 }
6157
6158                                 /* Convert letter to equipment index */
6159                                 else
6160                                 {
6161                                         if (which == '(') k = e1;
6162                                         else if (which == ')') k = e2;
6163                                         else k = label_to_equip(which);
6164                                 }
6165
6166                                 /* Validate the item */
6167                                 if (!get_item_okay(k))
6168                                 {
6169                                         bell();
6170                                         break;
6171                                 }
6172
6173                                 /* Verify the item */
6174 #ifdef JP
6175 if (ver && !verify("ËÜÅö¤Ë", k))
6176 #else
6177                                 if (ver && !verify("Try", k))
6178 #endif
6179
6180                                 {
6181                                         done = TRUE;
6182                                         break;
6183                                 }
6184
6185                                 /* Allow player to "refuse" certain actions */
6186                                 if (!get_item_allow(k))
6187                                 {
6188                                         done = TRUE;
6189                                         break;
6190                                 }
6191
6192                                 /* Accept that choice */
6193                                 (*cp) = k;
6194                                 item = TRUE;
6195                                 done = TRUE;
6196                                 break;
6197                         }
6198                 }
6199                 }
6200         }
6201
6202
6203         /* Fix the screen if necessary */
6204         if (command_see)
6205         {
6206                 /* Load screen */
6207                 screen_load();
6208
6209                 /* Hack -- Cancel "display" */
6210                 command_see = FALSE;
6211         }
6212
6213
6214         /* Forget the item_tester_tval restriction */
6215         item_tester_tval = 0;
6216
6217         item_tester_no_ryoute = FALSE;
6218
6219         /* Forget the item_tester_hook restriction */
6220         item_tester_hook = NULL;
6221
6222
6223         /* Clean up  'show choices' */
6224         /* Toggle again if needed */
6225         if (toggle) toggle_inven_equip();
6226
6227         /* Update */
6228         p_ptr->window |= (PW_INVEN | PW_EQUIP);
6229
6230         /* Window stuff */
6231         window_stuff();
6232
6233
6234         /* Clear the prompt line */
6235         prt("", 0, 0);
6236
6237         /* Warning if needed */
6238         if (oops && str) msg_print(str);
6239
6240         if (item)
6241         {
6242 #ifdef ALLOW_REPEAT
6243                 repeat_push(*cp);
6244 #endif /* ALLOW_REPEAT */
6245
6246                 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6247         }
6248
6249         /* Result */
6250         return (item);
6251 }
6252
6253
6254 #ifdef ALLOW_EASY_FLOOR
6255
6256 /*
6257  * scan_floor --
6258  *
6259  * Return a list of o_list[] indexes of items at the given cave
6260  * location. Valid flags are:
6261  *
6262  *              mode & 0x01 -- Item tester
6263  *              mode & 0x02 -- Marked items only
6264  *              mode & 0x04 -- Stop after first
6265  */
6266 int scan_floor(int *items, int y, int x, int mode)
6267 {
6268         int this_o_idx, next_o_idx;
6269
6270         int num = 0;
6271
6272         /* Sanity */
6273         if (!in_bounds(y, x)) return 0;
6274
6275         /* Scan all objects in the grid */
6276         for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
6277         {
6278                 object_type *o_ptr;
6279
6280                 /* Acquire object */
6281                 o_ptr = &o_list[this_o_idx];
6282
6283                 /* Acquire next object */
6284                 next_o_idx = o_ptr->next_o_idx;
6285
6286                 /* Item tester */
6287                 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
6288
6289                 /* Marked */
6290                 if ((mode & 0x02) && !(o_ptr->marked & OM_FOUND)) continue;
6291
6292                 /* Accept this item */
6293                 /* XXX Hack -- Enforce limit */
6294                 if (num < 23)
6295                         items[num] = this_o_idx;
6296
6297                 num++;
6298
6299                 /* Only one */
6300                 if (mode & 0x04) break;
6301         }
6302
6303         /* Result */
6304         return num;
6305 }
6306
6307
6308 /*
6309  * Display a list of the items on the floor at the given location.
6310  */
6311 int show_floor(int target_item, int y, int x, int *min_width)
6312 {
6313         int i, j, k, l;
6314         int col, len;
6315
6316         object_type *o_ptr;
6317
6318         char o_name[MAX_NLEN];
6319
6320         char tmp_val[80];
6321
6322         int out_index[23];
6323         byte out_color[23];
6324         char out_desc[23][MAX_NLEN];
6325         int target_item_label = 0;
6326
6327         int floor_list[23], floor_num;
6328         int wid, hgt;
6329         char floor_label[52 + 1];
6330
6331         bool dont_need_to_show_weights = TRUE;
6332
6333         /* Get size */
6334         Term_get_size(&wid, &hgt);
6335
6336         /* Default length */
6337         len = MAX((*min_width), 20);
6338
6339
6340         /* Scan for objects in the grid, using item_tester_okay() */
6341         floor_num = scan_floor(floor_list, y, x, 0x03);
6342
6343         /* Display the floor objects */
6344         for (k = 0, i = 0; i < floor_num && i < 23; i++)
6345         {
6346                 o_ptr = &o_list[floor_list[i]];
6347
6348                 /* Describe the object */
6349                 object_desc(o_name, o_ptr, 0);
6350
6351                 /* Save the index */
6352                 out_index[k] = i;
6353
6354                 /* Acquire inventory color */
6355                 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
6356
6357                 /* Save the object description */
6358                 strcpy(out_desc[k], o_name);
6359
6360                 /* Find the predicted "line length" */
6361                 l = strlen(out_desc[k]) + 5;
6362
6363                 /* Be sure to account for the weight */
6364                 if (show_weights) l += 9;
6365
6366                 if (o_ptr->tval != TV_GOLD) dont_need_to_show_weights = FALSE;
6367
6368                 /* Maintain the maximum length */
6369                 if (l > len) len = l;
6370
6371                 /* Advance to next "line" */
6372                 k++;
6373         }
6374
6375         if (show_weights && dont_need_to_show_weights) len -= 9;
6376
6377         /* Save width */
6378         *min_width = len;
6379
6380         /* Find the column to start in */
6381         col = (len > wid - 4) ? 0 : (wid - len - 1);
6382
6383         prepare_label_string_floor(floor_label, floor_list, floor_num);
6384
6385         /* Output each entry */
6386         for (j = 0; j < k; j++)
6387         {
6388                 /* Get the index */
6389                 i = floor_list[out_index[j]];
6390
6391                 /* Get the item */
6392                 o_ptr = &o_list[i];
6393
6394                 /* Clear the line */
6395                 prt("", j + 1, col ? col - 2 : col);
6396
6397                 if (use_menu && target_item)
6398                 {
6399                         if (j == (target_item-1))
6400                         {
6401 #ifdef JP
6402                                 strcpy(tmp_val, "¡Õ");
6403 #else
6404                                 strcpy(tmp_val, "> ");
6405 #endif
6406                                 target_item_label = i;
6407                         }
6408                         else strcpy(tmp_val, "   ");
6409                 }
6410                 else
6411                 {
6412                         /* Prepare an index --(-- */
6413                         sprintf(tmp_val, "%c)", floor_label[j]);
6414                 }
6415
6416                 /* Clear the line with the (possibly indented) index */
6417                 put_str(tmp_val, j + 1, col);
6418
6419                 /* Display the entry itself */
6420                 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
6421
6422                 /* Display the weight if needed */
6423                 if (show_weights && (o_ptr->tval != TV_GOLD))
6424                 {
6425                         int wgt = o_ptr->weight * o_ptr->number;
6426 #ifdef JP
6427                         sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
6428 #else
6429                         sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
6430 #endif
6431
6432                         prt(tmp_val, j + 1, wid - 9);
6433                 }
6434         }
6435
6436         /* Make a "shadow" below the list (only if needed) */
6437         if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
6438
6439         return target_item_label;
6440 }
6441
6442 /*
6443  * This version of get_item() is called by get_item() when
6444  * the easy_floor is on.
6445  */
6446 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
6447 {
6448         char n1 = ' ', n2 = ' ', which = ' ';
6449
6450         int j, k, i1, i2, e1, e2;
6451
6452         bool done, item;
6453
6454         bool oops = FALSE;
6455
6456         /* Extract args */
6457         bool equip = (mode & USE_EQUIP) ? TRUE : FALSE;
6458         bool inven = (mode & USE_INVEN) ? TRUE : FALSE;
6459         bool floor = (mode & USE_FLOOR) ? TRUE : FALSE;
6460
6461         bool allow_equip = FALSE;
6462         bool allow_inven = FALSE;
6463         bool allow_floor = FALSE;
6464
6465         bool toggle = FALSE;
6466
6467         char tmp_val[160];
6468         char out_val[160];
6469
6470         int floor_num, floor_list[23], floor_top = 0;
6471         int min_width = 0;
6472
6473         extern bool select_the_force;
6474
6475         int menu_line = (use_menu ? 1 : 0);
6476         int max_inven = 0;
6477         int max_equip = 0;
6478
6479 #ifdef ALLOW_REPEAT
6480
6481         /* Get the item index */
6482         if (repeat_pull(cp))
6483         {
6484                 /* the_force */
6485                 if (select_the_force && (*cp == INVEN_FORCE))
6486                 {
6487                         item_tester_tval = 0;
6488                         item_tester_hook = NULL;
6489                         command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6490                         return (TRUE);
6491                 }
6492
6493                 /* Floor item? */
6494                 else if (floor && (*cp < 0))
6495                 {
6496                         object_type *o_ptr;
6497
6498                         /* Special index */
6499                         k = 0 - (*cp);
6500
6501                         /* Acquire object */
6502                         o_ptr = &o_list[k];
6503
6504                         /* Validate the item */
6505                         if (item_tester_okay(o_ptr))
6506                         {
6507                                 /* Forget the item_tester_tval restriction */
6508                                 item_tester_tval = 0;
6509
6510                                 /* Forget the item_tester_hook restriction */
6511                                 item_tester_hook = NULL;
6512
6513                                 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6514
6515                                 /* Success */
6516                                 return (TRUE);
6517                         }
6518                 }
6519
6520                 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
6521                          (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
6522                 {
6523                         /* Verify the item */
6524                         if (get_item_okay(*cp))
6525                         {
6526                                 /* Forget the item_tester_tval restriction */
6527                                 item_tester_tval = 0;
6528
6529                                 /* Forget the item_tester_hook restriction */
6530                                 item_tester_hook = NULL;
6531
6532                                 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6533
6534                                 /* Success */
6535                                 return (TRUE);
6536                         }
6537                 }
6538         }
6539
6540 #endif /* ALLOW_REPEAT */
6541
6542
6543         /* Paranoia XXX XXX XXX */
6544         msg_print(NULL);
6545
6546
6547         /* Not done */
6548         done = FALSE;
6549
6550         /* No item selected */
6551         item = FALSE;
6552
6553
6554         /* Full inventory */
6555         i1 = 0;
6556         i2 = INVEN_PACK - 1;
6557
6558         /* Forbid inventory */
6559         if (!inven) i2 = -1;
6560         else if (use_menu)
6561         {
6562                 for (j = 0; j < INVEN_PACK; j++)
6563                         if (item_tester_okay(&inventory[j])) max_inven++;
6564         }
6565
6566         /* Restrict inventory indexes */
6567         while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
6568         while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
6569
6570
6571         /* Full equipment */
6572         e1 = INVEN_RARM;
6573         e2 = INVEN_TOTAL - 1;
6574
6575         /* Forbid equipment */
6576         if (!equip) e2 = -1;
6577         else if (use_menu)
6578         {
6579                 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
6580                         if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
6581                 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
6582         }
6583
6584         /* Restrict equipment indexes */
6585         while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
6586         while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
6587
6588         if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
6589         {
6590                 if (p_ptr->migite)
6591                 {
6592                         if (e2 < INVEN_LARM) e2 = INVEN_LARM;
6593                 }
6594                 else if (p_ptr->hidarite) e1 = INVEN_RARM;
6595         }
6596
6597
6598         /* Count "okay" floor items */
6599         floor_num = 0;
6600
6601         /* Restrict floor usage */
6602         if (floor)
6603         {
6604                 /* Scan all objects in the grid */
6605                 floor_num = scan_floor(floor_list, py, px, 0x03);
6606         }
6607
6608         /* Accept inventory */
6609         if (i1 <= i2) allow_inven = TRUE;
6610
6611         /* Accept equipment */
6612         if (e1 <= e2) allow_equip = TRUE;
6613
6614         /* Accept floor */
6615         if (floor_num) allow_floor = TRUE;
6616
6617         /* Require at least one legal choice */
6618         if (!allow_inven && !allow_equip && !allow_floor)
6619         {
6620                 /* Cancel p_ptr->command_see */
6621                 command_see = FALSE;
6622
6623                 /* Oops */
6624                 oops = TRUE;
6625
6626                 /* Done */
6627                 done = TRUE;
6628
6629                 if (select_the_force) {
6630                     *cp = INVEN_FORCE;
6631                     item = TRUE;
6632                 }
6633         }
6634
6635         /* Analyze choices */
6636         else
6637         {
6638                 /* Hack -- Start on equipment if requested */
6639                 if (command_see && (command_wrk == (USE_EQUIP))
6640                         && allow_equip)
6641                 {
6642                         command_wrk = (USE_EQUIP);
6643                 }
6644
6645                 /* Use inventory if allowed */
6646                 else if (allow_inven)
6647                 {
6648                         command_wrk = (USE_INVEN);
6649                 }
6650
6651                 /* Use equipment if allowed */
6652                 else if (allow_equip)
6653                 {
6654                         command_wrk = (USE_EQUIP);
6655                 }
6656
6657                 /* Use floor if allowed */
6658                 else if (allow_floor)
6659                 {
6660                         command_wrk = (USE_FLOOR);
6661                 }
6662         }
6663
6664         /*
6665          * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
6666          */
6667         if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
6668
6669         /* Hack -- start out in "display" mode */
6670         if (command_see)
6671         {
6672                 /* Save screen */
6673                 screen_save();
6674         }
6675
6676         /* Repeat until done */
6677         while (!done)
6678         {
6679                 int get_item_label = 0;
6680
6681                 /* Show choices */
6682                 int ni = 0;
6683                 int ne = 0;
6684
6685                 /* Scan windows */
6686                 for (j = 0; j < 8; j++)
6687                 {
6688                         /* Unused */
6689                         if (!angband_term[j]) continue;
6690
6691                         /* Count windows displaying inven */
6692                         if (window_flag[j] & (PW_INVEN)) ni++;
6693
6694                         /* Count windows displaying equip */
6695                         if (window_flag[j] & (PW_EQUIP)) ne++;
6696                 }
6697
6698                 /* Toggle if needed */
6699                 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
6700                     (command_wrk == (USE_INVEN) && !ni && ne))
6701                 {
6702                         /* Toggle */
6703                         toggle_inven_equip();
6704
6705                         /* Track toggles */
6706                         toggle = !toggle;
6707                 }
6708
6709                 /* Update */
6710                 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6711
6712                 /* Redraw windows */
6713                 window_stuff();
6714
6715                 /* Inventory screen */
6716                 if (command_wrk == (USE_INVEN))
6717                 {
6718                         /* Extract the legal requests */
6719                         n1 = I2A(i1);
6720                         n2 = I2A(i2);
6721
6722                         /* Redraw if needed */
6723                         if (command_see) get_item_label = show_inven(menu_line);
6724                 }
6725
6726                 /* Equipment screen */
6727                 else if (command_wrk == (USE_EQUIP))
6728                 {
6729                         /* Extract the legal requests */
6730                         n1 = I2A(e1 - INVEN_RARM);
6731                         n2 = I2A(e2 - INVEN_RARM);
6732
6733                         /* Redraw if needed */
6734                         if (command_see) get_item_label = show_equip(menu_line);
6735                 }
6736
6737                 /* Floor screen */
6738                 else if (command_wrk == (USE_FLOOR))
6739                 {
6740                         j = floor_top;
6741                         k = MIN(floor_top + 23, floor_num) - 1;
6742
6743                         /* Extract the legal requests */
6744                         n1 = I2A(j - floor_top);
6745                         n2 = I2A(k - floor_top);
6746
6747                         /* Redraw if needed */
6748                         if (command_see) get_item_label = show_floor(menu_line, py, px, &min_width);
6749                 }
6750
6751                 /* Viewing inventory */
6752                 if (command_wrk == (USE_INVEN))
6753                 {
6754                         /* Begin the prompt */
6755 #ifdef JP
6756                         sprintf(out_val, "»ý¤Áʪ:");
6757 #else
6758                         sprintf(out_val, "Inven:");
6759 #endif
6760
6761                         if (!use_menu)
6762                         {
6763                                 /* Build the prompt */
6764 #ifdef JP
6765                                 sprintf(tmp_val, "%c-%c,'(',')',",
6766 #else
6767                                 sprintf(tmp_val, " %c-%c,'(',')',",
6768 #endif
6769                                         index_to_label(i1), index_to_label(i2));
6770
6771                                 /* Append */
6772                                 strcat(out_val, tmp_val);
6773                         }
6774
6775                         /* Indicate ability to "view" */
6776 #ifdef JP
6777                         if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6778 #else
6779                         if (!command_see && !use_menu) strcat(out_val, " * to see,");
6780 #endif
6781
6782                         /* Append */
6783                         if (allow_equip)
6784                         {
6785 #ifdef JP
6786                                 if (!use_menu)
6787                                         strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
6788                                 else if (allow_floor)
6789                                         strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
6790                                 else
6791                                         strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6792 #else
6793                                 if (!use_menu)
6794                                         strcat(out_val, " / for Equip,");
6795                                 else if (allow_floor)
6796                                         strcat(out_val, " 6 for Equip,");
6797                                 else
6798                                         strcat(out_val, " 4 or 6 for Equip,");
6799 #endif
6800                         }
6801
6802                         /* Append */
6803                         if (allow_floor)
6804                         {
6805 #ifdef JP
6806                                 if (!use_menu)
6807                                         strcat(out_val, " '-'¾²¾å,");
6808                                 else if (allow_equip)
6809                                         strcat(out_val, " '4' ¾²¾å,");
6810                                 else
6811                                         strcat(out_val, " '4'or'6' ¾²¾å,");
6812 #else
6813                                 if (!use_menu)
6814                                         strcat(out_val, " - for floor,");
6815                                 else if (allow_equip)
6816                                         strcat(out_val, " 4 for floor,");
6817                                 else
6818                                         strcat(out_val, " 4 or 6 for floor,");
6819 #endif
6820                         }
6821                 }
6822
6823                 /* Viewing equipment */
6824                 else if (command_wrk == (USE_EQUIP))
6825                 {
6826                         /* Begin the prompt */
6827 #ifdef JP
6828                         sprintf(out_val, "ÁõÈ÷ÉÊ:");
6829 #else
6830                         sprintf(out_val, "Equip:");
6831 #endif
6832
6833                         if (!use_menu)
6834                         {
6835                                 /* Build the prompt */
6836 #ifdef JP
6837                                 sprintf(tmp_val, "%c-%c,'(',')',",
6838 #else
6839                                 sprintf(tmp_val, " %c-%c,'(',')',",
6840 #endif
6841                                         index_to_label(e1), index_to_label(e2));
6842
6843                                 /* Append */
6844                                 strcat(out_val, tmp_val);
6845                         }
6846
6847                         /* Indicate ability to "view" */
6848 #ifdef JP
6849                         if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6850 #else
6851                         if (!command_see && !use_menu) strcat(out_val, " * to see,");
6852 #endif
6853
6854                         /* Append */
6855                         if (allow_inven)
6856                         {
6857 #ifdef JP
6858                                 if (!use_menu)
6859                                         strcat(out_val, " '/' »ý¤Áʪ,");
6860                                 else if (allow_floor)
6861                                         strcat(out_val, " '4' »ý¤Áʪ,");
6862                                 else
6863                                         strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6864 #else
6865                                 if (!use_menu)
6866                                         strcat(out_val, " / for Inven,");
6867                                 else if (allow_floor)
6868                                         strcat(out_val, " 4 for Inven,");
6869                                 else
6870                                         strcat(out_val, " 4 or 6 for Inven,");
6871 #endif
6872                         }
6873
6874                         /* Append */
6875                         if (allow_floor)
6876                         {
6877 #ifdef JP
6878                                 if (!use_menu)
6879                                         strcat(out_val, " '-'¾²¾å,");
6880                                 else if (allow_inven)
6881                                         strcat(out_val, " '6' ¾²¾å,");
6882                                 else
6883                                         strcat(out_val, " '4'or'6' ¾²¾å,");
6884 #else
6885                                 if (!use_menu)
6886                                         strcat(out_val, " - for floor,");
6887                                 else if (allow_inven)
6888                                         strcat(out_val, " 6 for floor,");
6889                                 else
6890                                         strcat(out_val, " 4 or 6 for floor,");
6891 #endif
6892                         }
6893                 }
6894
6895                 /* Viewing floor */
6896                 else if (command_wrk == (USE_FLOOR))
6897                 {
6898                         /* Begin the prompt */
6899 #ifdef JP
6900                         sprintf(out_val, "¾²¾å:");
6901 #else
6902                         sprintf(out_val, "Floor:");
6903 #endif
6904
6905                         if (!use_menu)
6906                         {
6907                                 /* Build the prompt */
6908 #ifdef JP
6909                                 sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
6910 #else
6911                                 sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
6912 #endif
6913
6914                                 /* Append */
6915                                 strcat(out_val, tmp_val);
6916                         }
6917
6918                         /* Indicate ability to "view" */
6919 #ifdef JP
6920                         if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6921 #else
6922                         if (!command_see && !use_menu) strcat(out_val, " * to see,");
6923 #endif
6924
6925                         if (use_menu)
6926                         {
6927                                 if (allow_inven && allow_equip)
6928                                 {
6929 #ifdef JP
6930                                         strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
6931 #else
6932                                         strcat(out_val, " 4 for Equip, 6 for Inven,");
6933 #endif
6934                                 }
6935                                 else if (allow_inven)
6936                                 {
6937 #ifdef JP
6938                                         strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6939 #else
6940                                         strcat(out_val, " 4 or 6 for Inven,");
6941 #endif
6942                                 }
6943                                 else if (allow_equip)
6944                                 {
6945 #ifdef JP
6946                                         strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6947 #else
6948                                         strcat(out_val, " 4 or 6 for Equip,");
6949 #endif
6950                                 }
6951                         }
6952                         /* Append */
6953                         else if (allow_inven)
6954                         {
6955 #ifdef JP
6956                                 strcat(out_val, " '/' »ý¤Áʪ,");
6957 #else
6958                                 strcat(out_val, " / for Inven,");
6959 #endif
6960                         }
6961                         else if (allow_equip)
6962                         {
6963 #ifdef JP
6964                                 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6965 #else
6966                                 strcat(out_val, " / for Equip,");
6967 #endif
6968                         }
6969
6970                         /* Append */
6971                         if (command_see && !use_menu)
6972                         {
6973 #ifdef JP
6974                                 strcat(out_val, " Enter ¼¡,");
6975 #else
6976                                 strcat(out_val, " Enter for scroll down,");
6977 #endif
6978                         }
6979                 }
6980
6981                 /* Append */
6982 #ifdef JP
6983                 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
6984 #else
6985                 if (select_the_force) strcat(out_val, " w for the Force,");
6986 #endif
6987
6988                 /* Finish the prompt */
6989                 strcat(out_val, " ESC");
6990
6991                 /* Build the prompt */
6992                 sprintf(tmp_val, "(%s) %s", out_val, pmt);
6993
6994                 /* Show the prompt */
6995                 prt(tmp_val, 0, 0);
6996
6997                 /* Get a key */
6998                 which = inkey();
6999
7000                 if (use_menu)
7001                 {
7002                 int max_line = 1;
7003                 if (command_wrk == USE_INVEN) max_line = max_inven;
7004                 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7005                 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7006                 switch (which)
7007                 {
7008                         case ESCAPE:
7009                         case 'z':
7010                         case 'Z':
7011                         case '0':
7012                         {
7013                                 done = TRUE;
7014                                 break;
7015                         }
7016
7017                         case '8':
7018                         case 'k':
7019                         case 'K':
7020                         {
7021                                 menu_line += (max_line - 1);
7022                                 break;
7023                         }
7024
7025                         case '2':
7026                         case 'j':
7027                         case 'J':
7028                         {
7029                                 menu_line++;
7030                                 break;
7031                         }
7032
7033                         case '4':
7034                         case 'h':
7035                         case 'H':
7036                         {
7037                                 /* Verify legality */
7038                                 if (command_wrk == (USE_INVEN))
7039                                 {
7040                                         if (allow_floor) command_wrk = USE_FLOOR;
7041                                         else if (allow_equip) command_wrk = USE_EQUIP;
7042                                         else
7043                                         {
7044                                                 bell();
7045                                                 break;
7046                                         }
7047                                 }
7048                                 else if (command_wrk == (USE_EQUIP))
7049                                 {
7050                                         if (allow_inven) command_wrk = USE_INVEN;
7051                                         else if (allow_floor) command_wrk = USE_FLOOR;
7052                                         else
7053                                         {
7054                                                 bell();
7055                                                 break;
7056                                         }
7057                                 }
7058                                 else if (command_wrk == (USE_FLOOR))
7059                                 {
7060                                         if (allow_equip) command_wrk = USE_EQUIP;
7061                                         else if (allow_inven) command_wrk = USE_INVEN;
7062                                         else
7063                                         {
7064                                                 bell();
7065                                                 break;
7066                                         }
7067                                 }
7068                                 else
7069                                 {
7070                                         bell();
7071                                         break;
7072                                 }
7073
7074                                 /* Hack -- Fix screen */
7075                                 if (command_see)
7076                                 {
7077                                         /* Load screen */
7078                                         screen_load();
7079
7080                                         /* Save screen */
7081                                         screen_save();
7082                                 }
7083
7084                                 /* Switch inven/equip */
7085                                 if (command_wrk == USE_INVEN) max_line = max_inven;
7086                                 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7087                                 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7088                                 if (menu_line > max_line) menu_line = max_line;
7089
7090                                 /* Need to redraw */
7091                                 break;
7092                         }
7093
7094                         case '6':
7095                         case 'l':
7096                         case 'L':
7097                         {
7098                                 /* Verify legality */
7099                                 if (command_wrk == (USE_INVEN))
7100                                 {
7101                                         if (allow_equip) command_wrk = USE_EQUIP;
7102                                         else if (allow_floor) command_wrk = USE_FLOOR;
7103                                         else
7104                                         {
7105                                                 bell();
7106                                                 break;
7107                                         }
7108                                 }
7109                                 else if (command_wrk == (USE_EQUIP))
7110                                 {
7111                                         if (allow_floor) command_wrk = USE_FLOOR;
7112                                         else if (allow_inven) command_wrk = USE_INVEN;
7113                                         else
7114                                         {
7115                                                 bell();
7116                                                 break;
7117                                         }
7118                                 }
7119                                 else if (command_wrk == (USE_FLOOR))
7120                                 {
7121                                         if (allow_inven) command_wrk = USE_INVEN;
7122                                         else if (allow_equip) command_wrk = USE_EQUIP;
7123                                         else
7124                                         {
7125                                                 bell();
7126                                                 break;
7127                                         }
7128                                 }
7129                                 else
7130                                 {
7131                                         bell();
7132                                         break;
7133                                 }
7134
7135                                 /* Hack -- Fix screen */
7136                                 if (command_see)
7137                                 {
7138                                         /* Load screen */
7139                                         screen_load();
7140
7141                                         /* Save screen */
7142                                         screen_save();
7143                                 }
7144
7145                                 /* Switch inven/equip */
7146                                 if (command_wrk == USE_INVEN) max_line = max_inven;
7147                                 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7148                                 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7149                                 if (menu_line > max_line) menu_line = max_line;
7150
7151                                 /* Need to redraw */
7152                                 break;
7153                         }
7154
7155                         case 'x':
7156                         case 'X':
7157                         case '\r':
7158                         case '\n':
7159                         {
7160                                 if (command_wrk == USE_FLOOR)
7161                                 {
7162                                         /* Special index */
7163                                         (*cp) = -get_item_label;
7164                                 }
7165                                 else
7166                                 {
7167                                         /* Validate the item */
7168                                         if (!get_item_okay(get_item_label))
7169                                         {
7170                                                 bell();
7171                                                 break;
7172                                         }
7173
7174                                         /* Allow player to "refuse" certain actions */
7175                                         if (!get_item_allow(get_item_label))
7176                                         {
7177                                                 done = TRUE;
7178                                                 break;
7179                                         }
7180
7181                                         /* Accept that choice */
7182                                         (*cp) = get_item_label;
7183                                 }
7184
7185                                 item = TRUE;
7186                                 done = TRUE;
7187                                 break;
7188                         }
7189                         case 'w':
7190                         {
7191                                 if (select_the_force) {
7192                                         *cp = INVEN_FORCE;
7193                                         item = TRUE;
7194                                         done = TRUE;
7195                                         break;
7196                                 }
7197                         }
7198                 }
7199                 if (menu_line > max_line) menu_line -= max_line;
7200                 }
7201                 else
7202                 {
7203                 /* Parse it */
7204                 switch (which)
7205                 {
7206                         case ESCAPE:
7207                         {
7208                                 done = TRUE;
7209                                 break;
7210                         }
7211
7212                         case '*':
7213                         case '?':
7214                         case ' ':
7215                         {
7216                                 /* Hide the list */
7217                                 if (command_see)
7218                                 {
7219                                         /* Flip flag */
7220                                         command_see = FALSE;
7221
7222                                         /* Load screen */
7223                                         screen_load();
7224                                 }
7225
7226                                 /* Show the list */
7227                                 else
7228                                 {
7229                                         /* Save screen */
7230                                         screen_save();
7231
7232                                         /* Flip flag */
7233                                         command_see = TRUE;
7234                                 }
7235                                 break;
7236                         }
7237
7238                         case '\n':
7239                         case '\r':
7240                         case '+':
7241                         {
7242                                 int i, o_idx;
7243                                 cave_type *c_ptr = &cave[py][px];
7244
7245                                 if (command_wrk != (USE_FLOOR)) break;
7246
7247                                 /* Get the object being moved. */
7248                                 o_idx = c_ptr->o_idx;
7249
7250                                 /* Only rotate a pile of two or more objects. */
7251                                 if (!(o_idx && o_list[o_idx].next_o_idx)) break;
7252
7253                                 /* Remove the first object from the list. */
7254                                 excise_object_idx(o_idx);
7255
7256                                 /* Find end of the list. */
7257                                 i = c_ptr->o_idx;
7258                                 while (o_list[i].next_o_idx)
7259                                         i = o_list[i].next_o_idx;
7260
7261                                 /* Add after the last object. */
7262                                 o_list[i].next_o_idx = o_idx;
7263
7264                                 /* Re-scan floor list */ 
7265                                 floor_num = scan_floor(floor_list, py, px, 0x03);
7266
7267                                 /* Hack -- Fix screen */
7268                                 if (command_see)
7269                                 {
7270                                         /* Load screen */
7271                                         screen_load();
7272
7273                                         /* Save screen */
7274                                         screen_save();
7275                                 }
7276
7277                                 break;
7278                         }
7279
7280                         case '/':
7281                         {
7282                                 if (command_wrk == (USE_INVEN))
7283                                 {
7284                                         if (!allow_equip)
7285                                         {
7286                                                 bell();
7287                                                 break;
7288                                         }
7289                                         command_wrk = (USE_EQUIP);
7290                                 }
7291                                 else if (command_wrk == (USE_EQUIP))
7292                                 {
7293                                         if (!allow_inven)
7294                                         {
7295                                                 bell();
7296                                                 break;
7297                                         }
7298                                         command_wrk = (USE_INVEN);
7299                                 }
7300                                 else if (command_wrk == (USE_FLOOR))
7301                                 {
7302                                         if (allow_inven)
7303                                         {
7304                                                 command_wrk = (USE_INVEN);
7305                                         }
7306                                         else if (allow_equip)
7307                                         {
7308                                                 command_wrk = (USE_EQUIP);
7309                                         }
7310                                         else
7311                                         {
7312                                                 bell();
7313                                                 break;
7314                                         }
7315                                 }
7316
7317                                 /* Hack -- Fix screen */
7318                                 if (command_see)
7319                                 {
7320                                         /* Load screen */
7321                                         screen_load();
7322
7323                                         /* Save screen */
7324                                         screen_save();
7325                                 }
7326
7327                                 /* Need to redraw */
7328                                 break;
7329                         }
7330
7331                         case '-':
7332                         {
7333                                 if (!allow_floor)
7334                                 {
7335                                         bell();
7336                                         break;
7337                                 }
7338
7339                                 /*
7340                                  * If we are already examining the floor, and there
7341                                  * is only one item, we will always select it.
7342                                  * If we aren't examining the floor and there is only
7343                                  * one item, we will select it if floor_query_flag
7344                                  * is FALSE.
7345                                  */
7346                                 if (floor_num == 1)
7347                                 {
7348                                         if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
7349                                         {
7350                                                 /* Special index */
7351                                                 k = 0 - floor_list[0];
7352
7353                                                 /* Allow player to "refuse" certain actions */
7354                                                 if (!get_item_allow(k))
7355                                                 {
7356                                                         done = TRUE;
7357                                                         break;
7358                                                 }
7359
7360                                                 /* Accept that choice */
7361                                                 (*cp) = k;
7362                                                 item = TRUE;
7363                                                 done = TRUE;
7364
7365                                                 break;
7366                                         }
7367                                 }
7368
7369                                 /* Hack -- Fix screen */
7370                                 if (command_see)
7371                                 {
7372                                         /* Load screen */
7373                                         screen_load();
7374
7375                                         /* Save screen */
7376                                         screen_save();
7377                                 }
7378
7379                                 command_wrk = (USE_FLOOR);
7380
7381                                 break;
7382                         }
7383
7384                         case '0':
7385                         case '1': case '2': case '3':
7386                         case '4': case '5': case '6':
7387                         case '7': case '8': case '9':
7388                         {
7389                                 if (command_wrk != USE_FLOOR)
7390                                 {
7391                                         /* Look up the tag */
7392                                         if (!get_tag(&k, which, command_wrk))
7393                                         {
7394                                                 bell();
7395                                                 break;
7396                                         }
7397
7398                                         /* Hack -- Validate the item */
7399                                         if ((k < INVEN_RARM) ? !inven : !equip)
7400                                         {
7401                                                 bell();
7402                                                 break;
7403                                         }
7404
7405                                         /* Validate the item */
7406                                         if (!get_item_okay(k))
7407                                         {
7408                                                 bell();
7409                                                 break;
7410                                         }
7411                                 }
7412                                 else
7413                                 {
7414                                         /* Look up the alphabetical tag */
7415                                         if (get_tag_floor(&k, which, floor_list, floor_num))
7416                                         {
7417                                                 /* Special index */
7418                                                 k = 0 - floor_list[k];
7419                                         }
7420                                         else
7421                                         {
7422                                                 bell();
7423                                                 break;
7424                                         }
7425                                 }
7426
7427                                 /* Allow player to "refuse" certain actions */
7428                                 if (!get_item_allow(k))
7429                                 {
7430                                         done = TRUE;
7431                                         break;
7432                                 }
7433
7434                                 /* Accept that choice */
7435                                 (*cp) = k;
7436                                 item = TRUE;
7437                                 done = TRUE;
7438                                 break;
7439                         }
7440
7441 #if 0
7442                         case '\n':
7443                         case '\r':
7444                         {
7445                                 /* Choose "default" inventory item */
7446                                 if (command_wrk == (USE_INVEN))
7447                                 {
7448                                         k = ((i1 == i2) ? i1 : -1);
7449                                 }
7450
7451                                 /* Choose "default" equipment item */
7452                                 else if (command_wrk == (USE_EQUIP))
7453                                 {
7454                                         k = ((e1 == e2) ? e1 : -1);
7455                                 }
7456
7457                                 /* Choose "default" floor item */
7458                                 else if (command_wrk == (USE_FLOOR))
7459                                 {
7460                                         if (floor_num == 1)
7461                                         {
7462                                                 /* Special index */
7463                                                 k = 0 - floor_list[0];
7464
7465                                                 /* Allow player to "refuse" certain actions */
7466                                                 if (!get_item_allow(k))
7467                                                 {
7468                                                         done = TRUE;
7469                                                         break;
7470                                                 }
7471
7472                                                 /* Accept that choice */
7473                                                 (*cp) = k;
7474                                                 item = TRUE;
7475                                                 done = TRUE;
7476                                         }
7477                                         break;
7478                                 }
7479
7480                                 /* Validate the item */
7481                                 if (!get_item_okay(k))
7482                                 {
7483                                         bell();
7484                                         break;
7485                                 }
7486
7487                                 /* Allow player to "refuse" certain actions */
7488                                 if (!get_item_allow(k))
7489                                 {
7490                                         done = TRUE;
7491                                         break;
7492                                 }
7493
7494                                 /* Accept that choice */
7495                                 (*cp) = k;
7496                                 item = TRUE;
7497                                 done = TRUE;
7498                                 break;
7499                         }
7500 #endif
7501
7502                         case 'w':
7503                         {
7504                                 if (select_the_force) {
7505                                         *cp = INVEN_FORCE;
7506                                         item = TRUE;
7507                                         done = TRUE;
7508                                         break;
7509                                 }
7510
7511                                 /* Fall through */
7512                         }
7513
7514                         default:
7515                         {
7516                                 int ver;
7517
7518                                 if (command_wrk != USE_FLOOR)
7519                                 {
7520                                         bool not_found = FALSE;
7521
7522                                         /* Look up the alphabetical tag */
7523                                         if (!get_tag(&k, which, command_wrk))
7524                                         {
7525                                                 not_found = TRUE;
7526                                         }
7527
7528                                         /* Hack -- Validate the item */
7529                                         else if ((k < INVEN_RARM) ? !inven : !equip)
7530                                         {
7531                                                 not_found = TRUE;
7532                                         }
7533
7534                                         /* Validate the item */
7535                                         else if (!get_item_okay(k))
7536                                         {
7537                                                 not_found = TRUE;
7538                                         }
7539
7540                                         if (!not_found)
7541                                         {
7542                                                 /* Accept that choice */
7543                                                 (*cp) = k;
7544                                                 item = TRUE;
7545                                                 done = TRUE;
7546                                                 break;
7547                                         }
7548                                 }
7549                                 else
7550                                 {
7551                                         /* Look up the alphabetical tag */
7552                                         if (get_tag_floor(&k, which, floor_list, floor_num))
7553                                         {
7554                                                 /* Special index */
7555                                                 k = 0 - floor_list[k];
7556
7557                                                 /* Accept that choice */
7558                                                 (*cp) = k;
7559                                                 item = TRUE;
7560                                                 done = TRUE;
7561                                                 break;
7562                                         }
7563                                 }
7564
7565                                 /* Extract "query" setting */
7566                                 ver = isupper(which);
7567                                 which = tolower(which);
7568
7569                                 /* Convert letter to inventory index */
7570                                 if (command_wrk == (USE_INVEN))
7571                                 {
7572                                         if (which == '(') k = i1;
7573                                         else if (which == ')') k = i2;
7574                                         else k = label_to_inven(which);
7575                                 }
7576
7577                                 /* Convert letter to equipment index */
7578                                 else if (command_wrk == (USE_EQUIP))
7579                                 {
7580                                         if (which == '(') k = e1;
7581                                         else if (which == ')') k = e2;
7582                                         else k = label_to_equip(which);
7583                                 }
7584
7585                                 /* Convert letter to floor index */
7586                                 else if (command_wrk == USE_FLOOR)
7587                                 {
7588                                         if (which == '(') k = 0;
7589                                         else if (which == ')') k = floor_num - 1;
7590                                         else k = islower(which) ? A2I(which) : -1;
7591                                         if (k < 0 || k >= floor_num || k >= 23)
7592                                         {
7593                                                 bell();
7594                                                 break;
7595                                         }
7596
7597                                         /* Special index */
7598                                         k = 0 - floor_list[k];
7599                                 }
7600
7601                                 /* Validate the item */
7602                                 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
7603                                 {
7604                                         bell();
7605                                         break;
7606                                 }
7607
7608                                 /* Verify the item */
7609 #ifdef JP
7610 if (ver && !verify("ËÜÅö¤Ë", k))
7611 #else
7612                                 if (ver && !verify("Try", k))
7613 #endif
7614
7615                                 {
7616                                         done = TRUE;
7617                                         break;
7618                                 }
7619
7620                                 /* Allow player to "refuse" certain actions */
7621                                 if (!get_item_allow(k))
7622                                 {
7623                                         done = TRUE;
7624                                         break;
7625                                 }
7626
7627                                 /* Accept that choice */
7628                                 (*cp) = k;
7629                                 item = TRUE;
7630                                 done = TRUE;
7631                                 break;
7632                         }
7633                 }
7634                 }
7635         }
7636
7637         /* Fix the screen if necessary */
7638         if (command_see)
7639         {
7640                 /* Load screen */
7641                 screen_load();
7642
7643                 /* Hack -- Cancel "display" */
7644                 command_see = FALSE;
7645         }
7646
7647
7648         /* Forget the item_tester_tval restriction */
7649         item_tester_tval = 0;
7650
7651         /* Forget the item_tester_hook restriction */
7652         item_tester_hook = NULL;
7653
7654
7655         /* Clean up  'show choices' */
7656         /* Toggle again if needed */
7657         if (toggle) toggle_inven_equip();
7658
7659         /* Update */
7660         p_ptr->window |= (PW_INVEN | PW_EQUIP);
7661
7662         /* Window stuff */
7663         window_stuff();
7664
7665
7666         /* Clear the prompt line */
7667         prt("", 0, 0);
7668
7669         /* Warning if needed */
7670         if (oops && str) msg_print(str);
7671
7672         if (item)
7673         {
7674 #ifdef ALLOW_REPEAT
7675                 repeat_push(*cp);
7676 #endif /* ALLOW_REPEAT */
7677
7678                 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
7679         }
7680
7681         /* Result */
7682         return (item);
7683 }
7684
7685
7686 static bool py_pickup_floor_aux(void)
7687 {
7688         s16b this_o_idx;
7689
7690         cptr q, s;
7691
7692         int item;
7693
7694         /* Restrict the choices */
7695         item_tester_hook = inven_carry_okay;
7696
7697         /* Get an object */
7698 #ifdef JP
7699         q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
7700         s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
7701 #else
7702         q = "Get which item? ";
7703         s = "You no longer have any room for the objects on the floor.";
7704 #endif
7705
7706         if (get_item(&item, q, s, (USE_FLOOR)))
7707         {
7708                 this_o_idx = 0 - item;
7709         }
7710         else
7711         {
7712                 return (FALSE);
7713         }
7714
7715         /* Pick up the object */
7716         py_pickup_aux(this_o_idx);
7717
7718         return (TRUE);
7719 }
7720
7721
7722 /*
7723  * Make the player carry everything in a grid
7724  *
7725  * If "pickup" is FALSE then only gold will be picked up
7726  *
7727  * This is called by py_pickup() when easy_floor is TRUE.
7728  */
7729 void py_pickup_floor(bool pickup)
7730 {
7731         s16b this_o_idx, next_o_idx = 0;
7732
7733         char o_name[MAX_NLEN];
7734         object_type *o_ptr;
7735
7736         int floor_num = 0, floor_list[23], floor_o_idx = 0;
7737
7738         int can_pickup = 0;
7739
7740         /* Scan the pile of objects */
7741         for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
7742         {
7743                 object_type *o_ptr;
7744
7745                 /* Access the object */
7746                 o_ptr = &o_list[this_o_idx];
7747
7748                 /* Describe the object */
7749                 object_desc(o_name, o_ptr, 0);
7750
7751                 /* Access the next object */
7752                 next_o_idx = o_ptr->next_o_idx;
7753
7754                 /* Hack -- disturb */
7755                 disturb(0, 0);
7756
7757                 /* Pick up gold */
7758                 if (o_ptr->tval == TV_GOLD)
7759                 {
7760                         /* Message */
7761 #ifdef JP
7762                 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
7763                            (long)o_ptr->pval, o_name);
7764 #else
7765                         msg_format("You have found %ld gold pieces worth of %s.",
7766                                 (long) o_ptr->pval, o_name);
7767 #endif
7768
7769
7770                         /* Collect the gold */
7771                         p_ptr->au += o_ptr->pval;
7772
7773                         /* Redraw gold */
7774                         p_ptr->redraw |= (PR_GOLD);
7775
7776                         /* Window stuff */
7777                         p_ptr->window |= (PW_PLAYER);
7778
7779                         /* Delete the gold */
7780                         delete_object_idx(this_o_idx);
7781
7782                         /* Check the next object */
7783                         continue;
7784                 }
7785                 else if (o_ptr->marked & OM_NOMSG)
7786                 {
7787                         /* If 0 or 1 non-NOMSG items are in the pile, the NOMSG ones are
7788                          * ignored. Otherwise, they are included in the prompt. */
7789                         o_ptr->marked &= ~(OM_NOMSG);
7790                         continue;
7791                 }
7792
7793                 /* Count non-gold objects that can be picked up. */
7794                 if (inven_carry_okay(o_ptr))
7795                 {
7796                         can_pickup++;
7797                 }
7798
7799                 /* Remember this object index */
7800                 if (floor_num < 23)
7801                         floor_list[floor_num] = this_o_idx;
7802
7803                 /* Count non-gold objects */
7804                 floor_num++;
7805
7806                 /* Remember this index */
7807                 floor_o_idx = this_o_idx;
7808         }
7809
7810         /* There are no non-gold objects */
7811         if (!floor_num)
7812                 return;
7813
7814         /* Mention the number of objects */
7815         if (!pickup)
7816         {
7817                 /* One object */
7818                 if (floor_num == 1)
7819                 {
7820                         /* Access the object */
7821                         o_ptr = &o_list[floor_o_idx];
7822
7823 #ifdef ALLOW_EASY_SENSE
7824
7825                         /* Option: Make object sensing easy */
7826                         if (easy_sense)
7827                         {
7828                                 /* Sense the object */
7829                                 (void) sense_object(o_ptr);
7830                         }
7831
7832 #endif /* ALLOW_EASY_SENSE */
7833
7834                         /* Describe the object */
7835                         object_desc(o_name, o_ptr, 0);
7836
7837                         /* Message */
7838 #ifdef JP
7839                                 msg_format("%s¤¬¤¢¤ë¡£", o_name);
7840 #else
7841                         msg_format("You see %s.", o_name);
7842 #endif
7843
7844                 }
7845
7846                 /* Multiple objects */
7847                 else
7848                 {
7849                         /* Message */
7850 #ifdef JP
7851                         msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
7852 #else
7853                         msg_format("You see a pile of %d items.", floor_num);
7854 #endif
7855
7856                 }
7857
7858                 /* Done */
7859                 return;
7860         }
7861
7862         /* The player has no room for anything on the floor. */
7863         if (!can_pickup)
7864         {
7865                 /* One object */
7866                 if (floor_num == 1)
7867                 {
7868                         /* Access the object */
7869                         o_ptr = &o_list[floor_o_idx];
7870
7871 #ifdef ALLOW_EASY_SENSE
7872
7873                         /* Option: Make object sensing easy */
7874                         if (easy_sense)
7875                         {
7876                                 /* Sense the object */
7877                                 (void) sense_object(o_ptr);
7878                         }
7879
7880 #endif /* ALLOW_EASY_SENSE */
7881
7882                         /* Describe the object */
7883                         object_desc(o_name, o_ptr, 0);
7884
7885                         /* Message */
7886 #ifdef JP
7887                                 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7888 #else
7889                         msg_format("You have no room for %s.", o_name);
7890 #endif
7891
7892                 }
7893
7894                 /* Multiple objects */
7895                 else
7896                 {
7897                         /* Message */
7898 #ifdef JP
7899                         msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7900 #else
7901                         msg_print("You have no room for any of the objects on the floor.");
7902 #endif
7903
7904                 }
7905
7906                 /* Done */
7907                 return;
7908         }
7909
7910         /* One object */
7911         if (floor_num == 1)
7912         {
7913                 /* Hack -- query every object */
7914                 if (carry_query_flag)
7915                 {
7916                         char out_val[MAX_NLEN+20];
7917
7918                         /* Access the object */
7919                         o_ptr = &o_list[floor_o_idx];
7920
7921 #ifdef ALLOW_EASY_SENSE
7922
7923                         /* Option: Make object sensing easy */
7924                         if (easy_sense)
7925                         {
7926                                 /* Sense the object */
7927                                 (void) sense_object(o_ptr);
7928                         }
7929
7930 #endif /* ALLOW_EASY_SENSE */
7931
7932                         /* Describe the object */
7933                         object_desc(o_name, o_ptr, 0);
7934
7935                         /* Build a prompt */
7936 #ifdef JP
7937                         (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7938 #else
7939                         (void) sprintf(out_val, "Pick up %s? ", o_name);
7940 #endif
7941
7942
7943                         /* Ask the user to confirm */
7944                         if (!get_check(out_val))
7945                         {
7946                                 /* Done */
7947                                 return;
7948                         }
7949                 }
7950
7951                 /* Access the object */
7952                 o_ptr = &o_list[floor_o_idx];
7953
7954 #ifdef ALLOW_EASY_SENSE
7955
7956                 /* Option: Make object sensing easy */
7957                 if (easy_sense)
7958                 {
7959                         /* Sense the object */
7960                         (void) sense_object(o_ptr);
7961                 }
7962
7963 #endif /* ALLOW_EASY_SENSE */
7964
7965                 /* Pick up the object */
7966                 py_pickup_aux(floor_o_idx);
7967         }
7968
7969         /* Allow the user to choose an object */
7970         else
7971         {
7972                 while (can_pickup--)
7973                 {
7974                         if (!py_pickup_floor_aux()) break;
7975                 }
7976         }
7977 }
7978
7979 #endif /* ALLOW_EASY_FLOOR */