OSDN Git Service

暗黒光源の*鑑定*時の表示に関する修正.
[hengband/hengband.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                         {
2530 #ifdef JP
2531                                 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-3)¡£";
2532 #else
2533                                 info[i++] = "It decreases radius of light source by 3.";
2534 #endif
2535                         }
2536                         else if (o_ptr->sval == SV_LITE_LANTERN)
2537                         {
2538 #ifdef JP
2539                                 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
2540 #else
2541                                 info[i++] = "It decreases radius of light source by 2.";
2542 #endif
2543                         }
2544                         else
2545                         {
2546 #ifdef JP
2547                                 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
2548 #else
2549                                 info[i++] = "It decreases radius of light source by 1.";
2550 #endif
2551                         }
2552                 }
2553                 else if (object_is_fixed_artifact(o_ptr))
2554                 {
2555 #ifdef JP
2556 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2557 #else
2558                         info[i++] = "It provides light (radius 3) forever.";
2559 #endif
2560
2561                 }
2562                 else if (o_ptr->name2 == EGO_LITE_SHINE)
2563                 {
2564                         if (o_ptr->sval == SV_LITE_FEANOR)
2565                         {
2566 #ifdef JP
2567 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2568 #else
2569                                 info[i++] = "It provides light (radius 3) forever.";
2570 #endif
2571
2572                         }
2573                         else if (o_ptr->sval == SV_LITE_LANTERN)
2574                         {
2575 #ifdef JP
2576 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2577 #else
2578                                 info[i++] = "It provides light (radius 3) when fueled.";
2579 #endif
2580
2581                         }
2582                         else
2583                         {
2584 #ifdef JP
2585 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2586 #else
2587                                 info[i++] = "It provides light (radius 2) when fueled.";
2588 #endif
2589
2590                         }
2591                 }
2592                 else
2593                 {
2594                         if (o_ptr->sval == SV_LITE_FEANOR)
2595                         {
2596 #ifdef JP
2597 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2598 #else
2599                                 info[i++] = "It provides light (radius 2) forever.";
2600 #endif
2601
2602                         }
2603                         else if (o_ptr->sval == SV_LITE_LANTERN)
2604                         {
2605 #ifdef JP
2606 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2607 #else
2608                                 info[i++] = "It provides light (radius 2) when fueled.";
2609 #endif
2610
2611                         }
2612                         else
2613                         {
2614 #ifdef JP
2615 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
2616 #else
2617                                 info[i++] = "It provides light (radius 1) when fueled.";
2618 #endif
2619
2620                         }
2621                 }
2622                 if (o_ptr->name2 == EGO_LITE_LONG)
2623                 {
2624 #ifdef JP
2625 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
2626 #else
2627                         info[i++] = "It provides light for much longer time.";
2628 #endif
2629                 }
2630         }
2631
2632
2633         /* And then describe it fully */
2634
2635         if (have_flag(flgs, TR_RIDING))
2636         {
2637                 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
2638 #ifdef JP
2639 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
2640 #else
2641                         info[i++] = "It is made for use while riding.";
2642 #endif
2643                 else
2644                 {
2645 #ifdef JP
2646                         info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
2647 #else
2648                         info[i++] = "It is suitable for use while riding.";
2649 #endif
2650                         /* This information is not important enough */
2651                         trivial_info++;
2652                 }
2653         }
2654         if (have_flag(flgs, TR_STR))
2655         {
2656 #ifdef JP
2657 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2658 #else
2659                 info[i++] = "It affects your strength.";
2660 #endif
2661
2662         }
2663         if (have_flag(flgs, TR_INT))
2664         {
2665 #ifdef JP
2666 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2667 #else
2668                 info[i++] = "It affects your intelligence.";
2669 #endif
2670
2671         }
2672         if (have_flag(flgs, TR_WIS))
2673         {
2674 #ifdef JP
2675 info[i++] = "¤½¤ì¤Ï¸­¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2676 #else
2677                 info[i++] = "It affects your wisdom.";
2678 #endif
2679
2680         }
2681         if (have_flag(flgs, TR_DEX))
2682         {
2683 #ifdef JP
2684 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2685 #else
2686                 info[i++] = "It affects your dexterity.";
2687 #endif
2688
2689         }
2690         if (have_flag(flgs, TR_CON))
2691         {
2692 #ifdef JP
2693 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2694 #else
2695                 info[i++] = "It affects your constitution.";
2696 #endif
2697
2698         }
2699         if (have_flag(flgs, TR_CHR))
2700         {
2701 #ifdef JP
2702 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2703 #else
2704                 info[i++] = "It affects your charisma.";
2705 #endif
2706
2707         }
2708
2709         if (have_flag(flgs, TR_MAGIC_MASTERY))
2710         {
2711 #ifdef JP
2712 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2713 #else
2714                 info[i++] = "It affects your ability to use magic devices.";
2715 #endif
2716
2717         }
2718         if (have_flag(flgs, TR_STEALTH))
2719         {
2720 #ifdef JP
2721 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2722 #else
2723                 info[i++] = "It affects your stealth.";
2724 #endif
2725
2726         }
2727         if (have_flag(flgs, TR_SEARCH))
2728         {
2729 #ifdef JP
2730 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2731 #else
2732                 info[i++] = "It affects your searching.";
2733 #endif
2734
2735         }
2736         if (have_flag(flgs, TR_INFRA))
2737         {
2738 #ifdef JP
2739 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2740 #else
2741                 info[i++] = "It affects your infravision.";
2742 #endif
2743
2744         }
2745         if (have_flag(flgs, TR_TUNNEL))
2746         {
2747 #ifdef JP
2748 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2749 #else
2750                 info[i++] = "It affects your ability to tunnel.";
2751 #endif
2752
2753         }
2754         if (have_flag(flgs, TR_SPEED))
2755         {
2756 #ifdef JP
2757 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2758 #else
2759                 info[i++] = "It affects your speed.";
2760 #endif
2761
2762         }
2763         if (have_flag(flgs, TR_BLOWS))
2764         {
2765 #ifdef JP
2766 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2767 #else
2768                 info[i++] = "It affects your attack speed.";
2769 #endif
2770
2771         }
2772
2773         if (have_flag(flgs, TR_BRAND_ACID))
2774         {
2775 #ifdef JP
2776 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礭¤Ê¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
2777 #else
2778                 info[i++] = "It does extra damage from acid.";
2779 #endif
2780
2781         }
2782         if (have_flag(flgs, TR_BRAND_ELEC))
2783         {
2784 #ifdef JP
2785 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礭¤Ê¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
2786 #else
2787                 info[i++] = "It does extra damage from electricity.";
2788 #endif
2789
2790         }
2791         if (have_flag(flgs, TR_BRAND_FIRE))
2792         {
2793 #ifdef JP
2794 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礭¤Ê¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
2795 #else
2796                 info[i++] = "It does extra damage from fire.";
2797 #endif
2798
2799         }
2800         if (have_flag(flgs, TR_BRAND_COLD))
2801         {
2802 #ifdef JP
2803 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礭¤Ê¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
2804 #else
2805                 info[i++] = "It does extra damage from frost.";
2806 #endif
2807
2808         }
2809
2810         if (have_flag(flgs, TR_BRAND_POIS))
2811         {
2812 #ifdef JP
2813 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
2814 #else
2815                 info[i++] = "It poisons your foes.";
2816 #endif
2817
2818         }
2819
2820         if (have_flag(flgs, TR_CHAOTIC))
2821         {
2822 #ifdef JP
2823 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
2824 #else
2825                 info[i++] = "It produces chaotic effects.";
2826 #endif
2827
2828         }
2829
2830         if (have_flag(flgs, TR_VAMPIRIC))
2831         {
2832 #ifdef JP
2833 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
2834 #else
2835                 info[i++] = "It drains life from your foes.";
2836 #endif
2837
2838         }
2839
2840         if (have_flag(flgs, TR_IMPACT))
2841         {
2842 #ifdef JP
2843 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤­¤ë¡£";
2844 #else
2845                 info[i++] = "It can cause earthquakes.";
2846 #endif
2847
2848         }
2849
2850         if (have_flag(flgs, TR_VORPAL))
2851         {
2852 #ifdef JP
2853 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
2854 #else
2855                 info[i++] = "It is very sharp and can cut your foes.";
2856 #endif
2857
2858         }
2859
2860         if (have_flag(flgs, TR_KILL_DRAGON))
2861         {
2862 #ifdef JP
2863 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2864 #else
2865                 info[i++] = "It is a great bane of dragons.";
2866 #endif
2867
2868         }
2869         else if (have_flag(flgs, TR_SLAY_DRAGON))
2870         {
2871 #ifdef JP
2872 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤­ÎϤòȯ´ø¤¹¤ë¡£";
2873 #else
2874                 info[i++] = "It is especially deadly against dragons.";
2875 #endif
2876
2877         }
2878
2879         if (have_flag(flgs, TR_KILL_ORC))
2880         {
2881 #ifdef JP
2882 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2883 #else
2884                 info[i++] = "It is a great bane of orcs.";
2885 #endif
2886
2887         }
2888         if (have_flag(flgs, TR_SLAY_ORC))
2889         {
2890 #ifdef JP
2891 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤­ÎϤòȯ´ø¤¹¤ë¡£";
2892 #else
2893                 info[i++] = "It is especially deadly against orcs.";
2894 #endif
2895
2896         }
2897
2898         if (have_flag(flgs, TR_KILL_TROLL))
2899         {
2900 #ifdef JP
2901 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2902 #else
2903                 info[i++] = "It is a great bane of trolls.";
2904 #endif
2905
2906         }
2907         if (have_flag(flgs, TR_SLAY_TROLL))
2908         {
2909 #ifdef JP
2910 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤­ÎϤòȯ´ø¤¹¤ë¡£";
2911 #else
2912                 info[i++] = "It is especially deadly against trolls.";
2913 #endif
2914
2915         }
2916
2917         if (have_flag(flgs, TR_KILL_GIANT))
2918         {
2919 #ifdef JP
2920 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2921 #else
2922                 info[i++] = "It is a great bane of giants.";
2923 #endif
2924         }
2925         else if (have_flag(flgs, TR_SLAY_GIANT))
2926         {
2927 #ifdef JP
2928 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤­ÎϤòȯ´ø¤¹¤ë¡£";
2929 #else
2930                 info[i++] = "It is especially deadly against giants.";
2931 #endif
2932
2933         }
2934
2935         if (have_flag(flgs, TR_KILL_DEMON))
2936         {
2937 #ifdef JP
2938 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2939 #else
2940                 info[i++] = "It is a great bane of demons.";
2941 #endif
2942
2943         }
2944         if (have_flag(flgs, TR_SLAY_DEMON))
2945         {
2946 #ifdef JP
2947 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2948 #else
2949                 info[i++] = "It strikes at demons with holy wrath.";
2950 #endif
2951
2952         }
2953
2954         if (have_flag(flgs, TR_KILL_UNDEAD))
2955         {
2956 #ifdef JP
2957 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2958 #else
2959                 info[i++] = "It is a great bane of undead.";
2960 #endif
2961
2962         }
2963         if (have_flag(flgs, TR_SLAY_UNDEAD))
2964         {
2965 #ifdef JP
2966 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2967 #else
2968                 info[i++] = "It strikes at undead with holy wrath.";
2969 #endif
2970
2971         }
2972
2973         if (have_flag(flgs, TR_KILL_EVIL))
2974         {
2975 #ifdef JP
2976 info[i++] = "¤½¤ì¤Ï¼Ù°­¤Ê¤ë¸ºß¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2977 #else
2978                 info[i++] = "It is a great bane of evil monsters.";
2979 #endif
2980
2981         }
2982         if (have_flag(flgs, TR_SLAY_EVIL))
2983         {
2984 #ifdef JP
2985 info[i++] = "¤½¤ì¤Ï¼Ù°­¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
2986 #else
2987                 info[i++] = "It fights against evil with holy fury.";
2988 #endif
2989
2990         }
2991
2992         if (have_flag(flgs, TR_KILL_ANIMAL))
2993         {
2994 #ifdef JP
2995 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2996 #else
2997                 info[i++] = "It is a great bane of natural creatures.";
2998 #endif
2999
3000         }
3001         if (have_flag(flgs, TR_SLAY_ANIMAL))
3002         {
3003 #ifdef JP
3004 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤­ÎϤòȯ´ø¤¹¤ë¡£";
3005 #else
3006                 info[i++] = "It is especially deadly against natural creatures.";
3007 #endif
3008
3009         }
3010
3011         if (have_flag(flgs, TR_KILL_HUMAN))
3012         {
3013 #ifdef JP
3014 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
3015 #else
3016                 info[i++] = "It is a great bane of humans.";
3017 #endif
3018
3019         }
3020         if (have_flag(flgs, TR_SLAY_HUMAN))
3021         {
3022 #ifdef JP
3023 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤­ÎϤòȯ´ø¤¹¤ë¡£";
3024 #else
3025                 info[i++] = "It is especially deadly against humans.";
3026 #endif
3027
3028         }
3029
3030         if (have_flag(flgs, TR_FORCE_WEAPON))
3031         {
3032 #ifdef JP
3033 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
3034 #else
3035                 info[i++] = "It powerfully strikes at a monster using your mana.";
3036 #endif
3037
3038         }
3039         if (have_flag(flgs, TR_DEC_MANA))
3040         {
3041 #ifdef JP
3042 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
3043 #else
3044                 info[i++] = "It decreases your mana consumption.";
3045 #endif
3046
3047         }
3048         if (have_flag(flgs, TR_SUST_STR))
3049         {
3050 #ifdef JP
3051 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
3052 #else
3053                 info[i++] = "It sustains your strength.";
3054 #endif
3055
3056         }
3057         if (have_flag(flgs, TR_SUST_INT))
3058         {
3059 #ifdef JP
3060 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
3061 #else
3062                 info[i++] = "It sustains your intelligence.";
3063 #endif
3064
3065         }
3066         if (have_flag(flgs, TR_SUST_WIS))
3067         {
3068 #ifdef JP
3069 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸­¤µ¤ò°Ý»ý¤¹¤ë¡£";
3070 #else
3071                 info[i++] = "It sustains your wisdom.";
3072 #endif
3073
3074         }
3075         if (have_flag(flgs, TR_SUST_DEX))
3076         {
3077 #ifdef JP
3078 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
3079 #else
3080                 info[i++] = "It sustains your dexterity.";
3081 #endif
3082
3083         }
3084         if (have_flag(flgs, TR_SUST_CON))
3085         {
3086 #ifdef JP
3087 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
3088 #else
3089                 info[i++] = "It sustains your constitution.";
3090 #endif
3091
3092         }
3093         if (have_flag(flgs, TR_SUST_CHR))
3094         {
3095 #ifdef JP
3096 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
3097 #else
3098                 info[i++] = "It sustains your charisma.";
3099 #endif
3100
3101         }
3102
3103         if (have_flag(flgs, TR_IM_ACID))
3104         {
3105 #ifdef JP
3106 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3107 #else
3108                 info[i++] = "It provides immunity to acid.";
3109 #endif
3110
3111         }
3112         if (have_flag(flgs, TR_IM_ELEC))
3113         {
3114 #ifdef JP
3115 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3116 #else
3117                 info[i++] = "It provides immunity to electricity.";
3118 #endif
3119
3120         }
3121         if (have_flag(flgs, TR_IM_FIRE))
3122         {
3123 #ifdef JP
3124 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3125 #else
3126                 info[i++] = "It provides immunity to fire.";
3127 #endif
3128
3129         }
3130         if (have_flag(flgs, TR_IM_COLD))
3131         {
3132 #ifdef JP
3133 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3134 #else
3135                 info[i++] = "It provides immunity to cold.";
3136 #endif
3137
3138         }
3139
3140         if (have_flag(flgs, TR_THROW))
3141         {
3142 #ifdef JP
3143 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礭¤Ê¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
3144 #else
3145                 info[i++] = "It is perfectly balanced for throwing.";
3146 #endif
3147         }
3148
3149         if (have_flag(flgs, TR_FREE_ACT))
3150         {
3151 #ifdef JP
3152 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3153 #else
3154                 info[i++] = "It provides immunity to paralysis.";
3155 #endif
3156
3157         }
3158         if (have_flag(flgs, TR_HOLD_LIFE))
3159         {
3160 #ifdef JP
3161 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ­¤ò¼ø¤±¤ë¡£";
3162 #else
3163                 info[i++] = "It provides resistance to life draining.";
3164 #endif
3165
3166         }
3167         if (have_flag(flgs, TR_RES_FEAR))
3168         {
3169 #ifdef JP
3170 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ­¤ò¼ø¤±¤ë¡£";
3171 #else
3172                 info[i++] = "It makes you completely fearless.";
3173 #endif
3174
3175         }
3176         if (have_flag(flgs, TR_RES_ACID))
3177         {
3178 #ifdef JP
3179 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3180 #else
3181                 info[i++] = "It provides resistance to acid.";
3182 #endif
3183
3184         }
3185         if (have_flag(flgs, TR_RES_ELEC))
3186         {
3187 #ifdef JP
3188 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3189 #else
3190                 info[i++] = "It provides resistance to electricity.";
3191 #endif
3192
3193         }
3194         if (have_flag(flgs, TR_RES_FIRE))
3195         {
3196 #ifdef JP
3197 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3198 #else
3199                 info[i++] = "It provides resistance to fire.";
3200 #endif
3201
3202         }
3203         if (have_flag(flgs, TR_RES_COLD))
3204         {
3205 #ifdef JP
3206 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3207 #else
3208                 info[i++] = "It provides resistance to cold.";
3209 #endif
3210
3211         }
3212         if (have_flag(flgs, TR_RES_POIS))
3213         {
3214 #ifdef JP
3215 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3216 #else
3217                 info[i++] = "It provides resistance to poison.";
3218 #endif
3219
3220         }
3221
3222         if (have_flag(flgs, TR_RES_LITE))
3223         {
3224 #ifdef JP
3225 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3226 #else
3227                 info[i++] = "It provides resistance to light.";
3228 #endif
3229
3230         }
3231         if (have_flag(flgs, TR_RES_DARK))
3232         {
3233 #ifdef JP
3234 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3235 #else
3236                 info[i++] = "It provides resistance to dark.";
3237 #endif
3238
3239         }
3240
3241         if (have_flag(flgs, TR_RES_BLIND))
3242         {
3243 #ifdef JP
3244 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3245 #else
3246                 info[i++] = "It provides resistance to blindness.";
3247 #endif
3248
3249         }
3250         if (have_flag(flgs, TR_RES_CONF))
3251         {
3252 #ifdef JP
3253 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3254 #else
3255                 info[i++] = "It provides resistance to confusion.";
3256 #endif
3257
3258         }
3259         if (have_flag(flgs, TR_RES_SOUND))
3260         {
3261 #ifdef JP
3262 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3263 #else
3264                 info[i++] = "It provides resistance to sound.";
3265 #endif
3266
3267         }
3268         if (have_flag(flgs, TR_RES_SHARDS))
3269         {
3270 #ifdef JP
3271 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3272 #else
3273                 info[i++] = "It provides resistance to shards.";
3274 #endif
3275
3276         }
3277
3278         if (have_flag(flgs, TR_RES_NETHER))
3279         {
3280 #ifdef JP
3281 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3282 #else
3283                 info[i++] = "It provides resistance to nether.";
3284 #endif
3285
3286         }
3287         if (have_flag(flgs, TR_RES_NEXUS))
3288         {
3289 #ifdef JP
3290 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3291 #else
3292                 info[i++] = "It provides resistance to nexus.";
3293 #endif
3294
3295         }
3296         if (have_flag(flgs, TR_RES_CHAOS))
3297         {
3298 #ifdef JP
3299 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3300 #else
3301                 info[i++] = "It provides resistance to chaos.";
3302 #endif
3303
3304         }
3305         if (have_flag(flgs, TR_RES_DISEN))
3306         {
3307 #ifdef JP
3308 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ­¤ò¼ø¤±¤ë¡£";
3309 #else
3310                 info[i++] = "It provides resistance to disenchantment.";
3311 #endif
3312
3313         }
3314
3315         if (have_flag(flgs, TR_LEVITATION))
3316         {
3317 #ifdef JP
3318 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3319 #else
3320                 info[i++] = "It allows you to levitate.";
3321 #endif
3322
3323         }
3324         if (have_flag(flgs, TR_LITE))
3325         {
3326                 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
3327 #ifdef JP
3328 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
3329 #else
3330                         info[i++] = "It decreases radius of your light source by 1.";
3331 #endif
3332                 else
3333 #ifdef JP
3334 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë(Ⱦ·Â¤Ë+1)¡£";
3335 #else
3336                         info[i++] = "It provides permanent light. (radius +1)";
3337 #endif
3338
3339         }
3340         if (have_flag(flgs, TR_SEE_INVIS))
3341         {
3342 #ifdef JP
3343 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3344 #else
3345                 info[i++] = "It allows you to see invisible monsters.";
3346 #endif
3347
3348         }
3349         if (have_flag(flgs, TR_TELEPATHY))
3350         {
3351 #ifdef JP
3352 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
3353 #else
3354                 info[i++] = "It gives telepathic powers.";
3355 #endif
3356
3357         }
3358         if (have_flag(flgs, TR_ESP_ANIMAL))
3359         {
3360 #ifdef JP
3361 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤ò´¶ÃΤ¹¤ë¡£";
3362 #else
3363                 info[i++] = "It senses natural creatures.";
3364 #endif
3365
3366         }
3367         if (have_flag(flgs, TR_ESP_UNDEAD))
3368         {
3369 #ifdef JP
3370 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ò´¶ÃΤ¹¤ë¡£";
3371 #else
3372                 info[i++] = "It senses undead.";
3373 #endif
3374
3375         }
3376         if (have_flag(flgs, TR_ESP_DEMON))
3377         {
3378 #ifdef JP
3379 info[i++] = "¤½¤ì¤Ï°­Ëâ¤ò´¶ÃΤ¹¤ë¡£";
3380 #else
3381                 info[i++] = "It senses demons.";
3382 #endif
3383
3384         }
3385         if (have_flag(flgs, TR_ESP_ORC))
3386         {
3387 #ifdef JP
3388 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ò´¶ÃΤ¹¤ë¡£";
3389 #else
3390                 info[i++] = "It senses orcs.";
3391 #endif
3392
3393         }
3394         if (have_flag(flgs, TR_ESP_TROLL))
3395         {
3396 #ifdef JP
3397 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ò´¶ÃΤ¹¤ë¡£";
3398 #else
3399                 info[i++] = "It senses trolls.";
3400 #endif
3401
3402         }
3403         if (have_flag(flgs, TR_ESP_GIANT))
3404         {
3405 #ifdef JP
3406 info[i++] = "¤½¤ì¤Ïµð¿Í¤ò´¶ÃΤ¹¤ë¡£";
3407 #else
3408                 info[i++] = "It senses giants.";
3409 #endif
3410
3411         }
3412         if (have_flag(flgs, TR_ESP_DRAGON))
3413         {
3414 #ifdef JP
3415 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò´¶ÃΤ¹¤ë¡£";
3416 #else
3417                 info[i++] = "It senses dragons.";
3418 #endif
3419
3420         }
3421         if (have_flag(flgs, TR_ESP_HUMAN))
3422         {
3423 #ifdef JP
3424 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ò´¶ÃΤ¹¤ë¡£";
3425 #else
3426                 info[i++] = "It senses humans.";
3427 #endif
3428
3429         }
3430         if (have_flag(flgs, TR_ESP_EVIL))
3431         {
3432 #ifdef JP
3433 info[i++] = "¤½¤ì¤Ï¼Ù°­¤Ê¸ºß¤ò´¶ÃΤ¹¤ë¡£";
3434 #else
3435                 info[i++] = "It senses evil creatures.";
3436 #endif
3437
3438         }
3439         if (have_flag(flgs, TR_ESP_GOOD))
3440         {
3441 #ifdef JP
3442 info[i++] = "¤½¤ì¤ÏÁ±Îɤʸºß¤ò´¶ÃΤ¹¤ë¡£";
3443 #else
3444                 info[i++] = "It senses good creatures.";
3445 #endif
3446
3447         }
3448         if (have_flag(flgs, TR_ESP_NONLIVING))
3449         {
3450 #ifdef JP
3451 info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤò´¶ÃΤ¹¤ë¡£";
3452 #else
3453                 info[i++] = "It senses non-living creatures.";
3454 #endif
3455
3456         }
3457         if (have_flag(flgs, TR_ESP_UNIQUE))
3458         {
3459 #ifdef JP
3460 info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤ò´¶ÃΤ¹¤ë¡£";
3461 #else
3462                 info[i++] = "It senses unique monsters.";
3463 #endif
3464
3465         }
3466         if (have_flag(flgs, TR_SLOW_DIGEST))
3467         {
3468 #ifdef JP
3469 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
3470 #else
3471                 info[i++] = "It slows your metabolism.";
3472 #endif
3473
3474         }
3475         if (have_flag(flgs, TR_REGEN))
3476         {
3477 #ifdef JP
3478 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
3479 #else
3480                 info[i++] = "It speeds your regenerative powers.";
3481 #endif
3482
3483         }
3484         if (have_flag(flgs, TR_WARNING))
3485         {
3486 #ifdef JP
3487 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
3488 #else
3489                 info[i++] = "It warns you of danger";
3490 #endif
3491
3492         }
3493         if (have_flag(flgs, TR_REFLECT))
3494         {
3495 #ifdef JP
3496 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
3497 #else
3498                 info[i++] = "It reflects bolts and arrows.";
3499 #endif
3500
3501         }
3502         if (have_flag(flgs, TR_SH_FIRE))
3503         {
3504 #ifdef JP
3505 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3506 #else
3507                 info[i++] = "It produces a fiery sheath.";
3508 #endif
3509
3510         }
3511         if (have_flag(flgs, TR_SH_ELEC))
3512         {
3513 #ifdef JP
3514 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3515 #else
3516                 info[i++] = "It produces an electric sheath.";
3517 #endif
3518
3519         }
3520         if (have_flag(flgs, TR_SH_COLD))
3521         {
3522 #ifdef JP
3523 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3524 #else
3525                 info[i++] = "It produces a sheath of coldness.";
3526 #endif
3527
3528         }
3529         if (have_flag(flgs, TR_NO_MAGIC))
3530         {
3531 #ifdef JP
3532 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3533 #else
3534                 info[i++] = "It produces an anti-magic shell.";
3535 #endif
3536
3537         }
3538         if (have_flag(flgs, TR_NO_TELE))
3539         {
3540 #ifdef JP
3541 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
3542 #else
3543                 info[i++] = "It prevents teleportation.";
3544 #endif
3545
3546         }
3547         if (have_flag(flgs, TR_XTRA_MIGHT))
3548         {
3549 #ifdef JP
3550 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
3551 #else
3552                 info[i++] = "It fires missiles with extra might.";
3553 #endif
3554
3555         }
3556         if (have_flag(flgs, TR_XTRA_SHOTS))
3557         {
3558 #ifdef JP
3559 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
3560 #else
3561                 info[i++] = "It fires missiles excessively fast.";
3562 #endif
3563
3564         }
3565
3566         if (have_flag(flgs, TR_BLESSED))
3567         {
3568 #ifdef JP
3569 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
3570 #else
3571                 info[i++] = "It has been blessed by the gods.";
3572 #endif
3573
3574         }
3575
3576         if (object_is_cursed(o_ptr))
3577         {
3578                 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
3579                 {
3580 #ifdef JP
3581 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3582 #else
3583                         info[i++] = "It is permanently cursed.";
3584 #endif
3585
3586                 }
3587                 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
3588                 {
3589 #ifdef JP
3590 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3591 #else
3592                         info[i++] = "It is heavily cursed.";
3593 #endif
3594
3595                 }
3596                 else
3597                 {
3598 #ifdef JP
3599 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
3600 #else
3601                         info[i++] = "It is cursed.";
3602 #endif
3603
3604                         /*
3605                          * It's a trivial infomation since there is
3606                          * fake inscription {cursed}
3607                          */
3608                         trivial_info++;
3609                 }
3610         }
3611
3612         if ((have_flag(flgs, TR_TY_CURSE)) || (o_ptr->curse_flags & TRC_TY_CURSE))
3613         {
3614 #ifdef JP
3615 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
3616 #else
3617                 info[i++] = "It carries an ancient foul curse.";
3618 #endif
3619
3620         }
3621         if ((have_flag(flgs, TR_AGGRAVATE)) || (o_ptr->curse_flags & TRC_AGGRAVATE))
3622         {
3623 #ifdef JP
3624 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
3625 #else
3626                 info[i++] = "It aggravates nearby creatures.";
3627 #endif
3628
3629         }
3630         if ((have_flag(flgs, TR_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
3631         {
3632 #ifdef JP
3633 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
3634 #else
3635                 info[i++] = "It drains experience.";
3636 #endif
3637
3638         }
3639         if (o_ptr->curse_flags & TRC_SLOW_REGEN)
3640         {
3641 #ifdef JP
3642 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
3643 #else
3644                 info[i++] = "It slows your regenerative powers.";
3645 #endif
3646
3647         }
3648         if (o_ptr->curse_flags & TRC_ADD_L_CURSE)
3649         {
3650 #ifdef JP
3651 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
3652 #else
3653                 info[i++] = "It adds weak curses.";
3654 #endif
3655
3656         }
3657         if (o_ptr->curse_flags & TRC_ADD_H_CURSE)
3658         {
3659 #ifdef JP
3660 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
3661 #else
3662                 info[i++] = "It adds heavy curses.";
3663 #endif
3664
3665         }
3666         if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
3667         {
3668 #ifdef JP
3669 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3670 #else
3671                 info[i++] = "It attracts animals.";
3672 #endif
3673
3674         }
3675         if (o_ptr->curse_flags & TRC_CALL_DEMON)
3676         {
3677 #ifdef JP
3678 info[i++] = "¤½¤ì¤Ï°­Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3679 #else
3680                 info[i++] = "It attracts demons.";
3681 #endif
3682
3683         }
3684         if (o_ptr->curse_flags & TRC_CALL_DRAGON)
3685         {
3686 #ifdef JP
3687 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3688 #else
3689                 info[i++] = "It attracts dragons.";
3690 #endif
3691
3692         }
3693         if (o_ptr->curse_flags & TRC_COWARDICE)
3694         {
3695 #ifdef JP
3696 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤­µ¯¤³¤¹¡£";
3697 #else
3698                 info[i++] = "It makes you subject to cowardice.";
3699 #endif
3700
3701         }
3702         if ((have_flag(flgs, TR_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
3703         {
3704 #ifdef JP
3705 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤­µ¯¤³¤¹¡£";
3706 #else
3707                 info[i++] = "It induces random teleportation.";
3708 #endif
3709
3710         }
3711         if (o_ptr->curse_flags & TRC_LOW_MELEE)
3712         {
3713 #ifdef JP
3714 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
3715 #else
3716                 info[i++] = "It causes you to miss blows.";
3717 #endif
3718
3719         }
3720         if (o_ptr->curse_flags & TRC_LOW_AC)
3721         {
3722 #ifdef JP
3723 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
3724 #else
3725                 info[i++] = "It helps your enemies' blows.";
3726 #endif
3727
3728         }
3729         if (o_ptr->curse_flags & TRC_LOW_MAGIC)
3730         {
3731 #ifdef JP
3732 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
3733 #else
3734                 info[i++] = "It encumbers you while spellcasting.";
3735 #endif
3736
3737         }
3738         if (o_ptr->curse_flags & TRC_FAST_DIGEST)
3739         {
3740 #ifdef JP
3741 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
3742 #else
3743                 info[i++] = "It speeds your metabolism.";
3744 #endif
3745
3746         }
3747         if (o_ptr->curse_flags & TRC_DRAIN_HP)
3748         {
3749 #ifdef JP
3750 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
3751 #else
3752                 info[i++] = "It drains you.";
3753 #endif
3754
3755         }
3756         if (o_ptr->curse_flags & TRC_DRAIN_MANA)
3757         {
3758 #ifdef JP
3759 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
3760 #else
3761                 info[i++] = "It drains your mana.";
3762 #endif
3763
3764         }
3765
3766         /* Describe about this kind of object instead of THIS fake object */
3767         if (mode & SCROBJ_FAKE_OBJECT)
3768         {
3769                 switch (o_ptr->tval)
3770                 {
3771                 case TV_RING:
3772                         switch (o_ptr->sval)
3773                         {
3774                         case SV_RING_LORDLY:
3775 #ifdef JP
3776                                 info[i++] = "¤½¤ì¤Ï´ö¤Ä¤«¤Î¥é¥ó¥À¥à¤ÊÂÑÀ­¤ò¼ø¤±¤ë¡£";
3777 #else
3778                                 info[i++] = "It provides some random resistances.";
3779 #endif
3780                                 break;
3781                         case SV_RING_WARNING:
3782 #ifdef JP
3783                                 info[i++] = "¤½¤ì¤Ï¤Ò¤È¤Ä¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3784 #else
3785                                 info[i++] = "It may provide a low rank ESP.";
3786 #endif
3787                                 break;
3788                         }
3789                         break;
3790
3791                 case TV_AMULET:
3792                         switch (o_ptr->sval)
3793                         {
3794                         case SV_AMULET_RESISTANCE:
3795 #ifdef JP
3796                                 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ­¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3797 #else
3798                                 info[i++] = "It may provides resistance to poison.";
3799 #endif
3800 #ifdef JP
3801                                 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤ÊÂÑÀ­¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3802 #else
3803                                 info[i++] = "It may provide a random resistances.";
3804 #endif
3805                                 break;
3806                         case SV_AMULET_THE_MAGI:
3807 #ifdef JP
3808                                 info[i++] = "¤½¤ì¤ÏºÇÂç¤Ç£³¤Ä¤Þ¤Ç¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë¡£";
3809 #else
3810                                 info[i++] = "It provides up to three low rank ESPs.";
3811 #endif
3812                                 break;
3813                         }
3814                         break;
3815                 }
3816         }
3817
3818         if (have_flag(flgs, TR_IGNORE_ACID) &&
3819             have_flag(flgs, TR_IGNORE_ELEC) &&
3820             have_flag(flgs, TR_IGNORE_FIRE) &&
3821             have_flag(flgs, TR_IGNORE_COLD))
3822         {
3823 #ifdef JP
3824                 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3825 #else
3826                 info[i++] = "It cannot be harmed by the elements.";
3827 #endif
3828         }
3829         else
3830         {
3831                 if (have_flag(flgs, TR_IGNORE_ACID))
3832                 {
3833 #ifdef JP
3834                         info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3835 #else
3836                         info[i++] = "It cannot be harmed by acid.";
3837 #endif
3838                 }
3839                 if (have_flag(flgs, TR_IGNORE_ELEC))
3840                 {
3841 #ifdef JP
3842                         info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3843 #else
3844                         info[i++] = "It cannot be harmed by electricity.";
3845 #endif
3846                 }
3847                 if (have_flag(flgs, TR_IGNORE_FIRE))
3848                 {
3849 #ifdef JP
3850                         info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3851 #else
3852                         info[i++] = "It cannot be harmed by fire.";
3853 #endif
3854                 }
3855                 if (have_flag(flgs, TR_IGNORE_COLD))
3856                 {
3857 #ifdef JP
3858                         info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3859 #else
3860                         info[i++] = "It cannot be harmed by cold.";
3861 #endif
3862                 }
3863         }
3864
3865         if (mode & SCROBJ_FORCE_DETAIL) trivial_info = 0;
3866
3867         /* No relevant informations */
3868         if (i <= trivial_info) return (FALSE);
3869
3870         /* Save the screen */
3871         screen_save();
3872
3873         /* Get size */
3874         Term_get_size(&wid, &hgt);
3875
3876         /* Display Item name */
3877         if (!(mode & SCROBJ_FAKE_OBJECT))
3878                 object_desc(o_name, o_ptr, 0);
3879         else
3880                 object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
3881
3882         prt(o_name, 0, 0);
3883
3884         /* Erase the screen */
3885         for (k = 1; k < hgt; k++) prt("", k, 13);
3886
3887         /* Label the information */
3888         if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
3889         {
3890                 monster_race *r_ptr = &r_info[o_ptr->pval];
3891                 int namelen = strlen(r_name + r_ptr->name);
3892                 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
3893                 Term_queue_bigchar(18 + namelen, 1, r_ptr->x_attr, r_ptr->x_char, 0, 0);
3894                 prt("'", 1, (use_bigtile ? 20 : 19) + namelen);
3895         }
3896         else
3897 #ifdef JP
3898 prt("     ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
3899 #else
3900         prt("     Item Attributes:", 1, 15);
3901 #endif
3902
3903         /* We will print on top of the map (column 13) */
3904         for (k = 2, j = 0; j < i; j++)
3905         {
3906                 /* Show the info */
3907                 prt(info[j], k++, 15);
3908
3909                 /* Every 20 entries (lines 2 to 21), start over */
3910                 if ((k == hgt - 2) && (j+1 < i))
3911                 {
3912 #ifdef JP
3913 prt("-- Â³¤¯ --", k, 15);
3914 #else
3915                         prt("-- more --", k, 15);
3916 #endif
3917                         inkey();
3918                         for (; k > 2; k--) prt("", k, 15);
3919                 }
3920         }
3921
3922         /* Wait for it */
3923 #ifdef JP
3924 prt("[²¿¤«¥­¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
3925 #else
3926         prt("[Press any key to continue]", k, 15);
3927 #endif
3928
3929         inkey();
3930
3931         /* Restore the screen */
3932         screen_load();
3933
3934         /* Gave knowledge */
3935         return (TRUE);
3936 }
3937
3938
3939
3940 /*
3941  * Convert an inventory index into a one character label
3942  * Note that the label does NOT distinguish inven/equip.
3943  */
3944 char index_to_label(int i)
3945 {
3946         /* Indexes for "inven" are easy */
3947         if (i < INVEN_RARM) return (I2A(i));
3948
3949         /* Indexes for "equip" are offset */
3950         return (I2A(i - INVEN_RARM));
3951 }
3952
3953
3954 /*
3955  * Convert a label into the index of an item in the "inven"
3956  * Return "-1" if the label does not indicate a real item
3957  */
3958 s16b label_to_inven(int c)
3959 {
3960         int i;
3961
3962         /* Convert */
3963         i = (islower(c) ? A2I(c) : -1);
3964
3965         /* Verify the index */
3966         if ((i < 0) || (i > INVEN_PACK)) return (-1);
3967
3968         /* Empty slots can never be chosen */
3969         if (!inventory[i].k_idx) return (-1);
3970
3971         /* Return the index */
3972         return (i);
3973 }
3974
3975
3976 /* See cmd5.c */
3977 extern bool select_ring_slot;
3978
3979
3980 static bool is_ring_slot(int i)
3981 {
3982         return (i == INVEN_RIGHT) || (i == INVEN_LEFT);
3983 }
3984
3985
3986 /*
3987  * Convert a label into the index of a item in the "equip"
3988  * Return "-1" if the label does not indicate a real item
3989  */
3990 s16b label_to_equip(int c)
3991 {
3992         int i;
3993
3994         /* Convert */
3995         i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
3996
3997         /* Verify the index */
3998         if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
3999
4000         if (select_ring_slot) return is_ring_slot(i) ? i : -1;
4001
4002         /* Empty slots can never be chosen */
4003         if (!inventory[i].k_idx) return (-1);
4004
4005         /* Return the index */
4006         return (i);
4007 }
4008
4009
4010
4011 /*
4012  * Determine which equipment slot (if any) an item likes
4013  */
4014 s16b wield_slot(object_type *o_ptr)
4015 {
4016         /* Slot for equipment */
4017         switch (o_ptr->tval)
4018         {
4019                 case TV_DIGGING:
4020                 case TV_HAFTED:
4021                 case TV_POLEARM:
4022                 case TV_SWORD:
4023                 {
4024                         if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
4025                         if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
4026                         return (INVEN_LARM);
4027                 }
4028
4029                 case TV_CAPTURE:
4030                 case TV_CARD:
4031                 case TV_SHIELD:
4032                 {
4033                         if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
4034                         if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
4035                         return (INVEN_RARM);
4036                 }
4037
4038                 case TV_BOW:
4039                 {
4040                         return (INVEN_BOW);
4041                 }
4042
4043                 case TV_RING:
4044                 {
4045                         /* Use the right hand first */
4046                         if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
4047
4048                         /* Use the left hand for swapping (by default) */
4049                         return (INVEN_LEFT);
4050                 }
4051
4052                 case TV_AMULET:
4053                 case TV_WHISTLE:
4054                 {
4055                         return (INVEN_NECK);
4056                 }
4057
4058                 case TV_LITE:
4059                 {
4060                         return (INVEN_LITE);
4061                 }
4062
4063                 case TV_DRAG_ARMOR:
4064                 case TV_HARD_ARMOR:
4065                 case TV_SOFT_ARMOR:
4066                 {
4067                         return (INVEN_BODY);
4068                 }
4069
4070                 case TV_CLOAK:
4071                 {
4072                         return (INVEN_OUTER);
4073                 }
4074
4075                 case TV_CROWN:
4076                 case TV_HELM:
4077                 {
4078                         return (INVEN_HEAD);
4079                 }
4080
4081                 case TV_GLOVES:
4082                 {
4083                         return (INVEN_HANDS);
4084                 }
4085
4086                 case TV_BOOTS:
4087                 {
4088                         return (INVEN_FEET);
4089                 }
4090         }
4091
4092         /* No slot available */
4093         return (-1);
4094 }
4095
4096
4097 /*
4098  * Return a string mentioning how a given item is carried
4099  */
4100 cptr mention_use(int i)
4101 {
4102         cptr p;
4103
4104         /* Examine the location */
4105         switch (i)
4106         {
4107 #ifdef JP
4108                 case INVEN_RARM:  p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->migite) ? " Î¾¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê")); break;
4109 #else
4110                 case INVEN_RARM:  p = p_ptr->heavy_wield[0] ? "Just lifting" : (p_ptr->migite ? "Wielding" : "On arm"); break;
4111 #endif
4112
4113 #ifdef JP
4114                 case INVEN_LARM:  p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->hidarite) ? " Î¾¼ê" : (left_hander ? " ±¦¼ê" : " º¸¼ê")); break;
4115 #else
4116                 case INVEN_LARM:  p = p_ptr->heavy_wield[1] ? "Just lifting" : (p_ptr->hidarite ? "Wielding" : "On arm"); break;
4117 #endif
4118
4119 #ifdef JP
4120                 case INVEN_BOW:   p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "±¿ÈÂÃæ" : "¼Í·âÍÑ"; break;
4121 #else
4122                 case INVEN_BOW:   p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "Just holding" : "Shooting"; break;
4123 #endif
4124
4125 #ifdef JP
4126                 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
4127 #else
4128                 case INVEN_RIGHT: p = (left_hander ? "On left hand" : "On right hand"); break;
4129 #endif
4130
4131 #ifdef JP
4132                 case INVEN_LEFT:  p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
4133 #else
4134                 case INVEN_LEFT:  p = (left_hander ? "On right hand" : "On left hand"); break;
4135 #endif
4136
4137 #ifdef JP
4138                 case INVEN_NECK:  p = "  ¼ó"; break;
4139 #else
4140                 case INVEN_NECK:  p = "Around neck"; break;
4141 #endif
4142
4143 #ifdef JP
4144                 case INVEN_LITE:  p = " ¸÷¸»"; break;
4145 #else
4146                 case INVEN_LITE:  p = "Light source"; break;
4147 #endif
4148
4149 #ifdef JP
4150                 case INVEN_BODY:  p = "  ÂÎ"; break;
4151 #else
4152                 case INVEN_BODY:  p = "On body"; break;
4153 #endif
4154
4155 #ifdef JP
4156                 case INVEN_OUTER: p = "ÂΤξå"; break;
4157 #else
4158                 case INVEN_OUTER: p = "About body"; break;
4159 #endif
4160
4161 #ifdef JP
4162                 case INVEN_HEAD:  p = "  Ƭ"; break;
4163 #else
4164                 case INVEN_HEAD:  p = "On head"; break;
4165 #endif
4166
4167 #ifdef JP
4168                 case INVEN_HANDS: p = "  ¼ê"; break;
4169 #else
4170                 case INVEN_HANDS: p = "On hands"; break;
4171 #endif
4172
4173 #ifdef JP
4174                 case INVEN_FEET:  p = "  ­"; break;
4175 #else
4176                 case INVEN_FEET:  p = "On feet"; break;
4177 #endif
4178
4179 #ifdef JP
4180                 default:          p = "¥¶¥Ã¥¯"; break;
4181 #else
4182                 default:          p = "In pack"; break;
4183 #endif
4184         }
4185
4186         /* Return the result */
4187         return p;
4188 }
4189
4190
4191 /*
4192  * Return a string describing how a given item is being worn.
4193  * Currently, only used for items in the equipment, not inventory.
4194  */
4195 cptr describe_use(int i)
4196 {
4197         cptr p;
4198
4199         switch (i)
4200         {
4201 #ifdef JP
4202                 case INVEN_RARM:  p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->migite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
4203 #else
4204                 case INVEN_RARM:  p = p_ptr->heavy_wield[0] ? "just lifting" : (p_ptr->migite ? "attacking monsters with" : "wearing on your arm"); break;
4205 #endif
4206
4207 #ifdef JP
4208                 case INVEN_LARM:  p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->hidarite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
4209 #else
4210                 case INVEN_LARM:  p = p_ptr->heavy_wield[1] ? "just lifting" : (p_ptr->hidarite ? "attacking monsters with" : "wearing on your arm"); break;
4211 #endif
4212
4213 #ifdef JP
4214                 case INVEN_BOW:   p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î" : "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
4215 #else
4216                 case INVEN_BOW:   p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "just holding" : "shooting missiles with"; break;
4217 #endif
4218
4219 #ifdef JP
4220                 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4221 #else
4222                 case INVEN_RIGHT: p = (left_hander ? "wearing on your left hand" : "wearing on your right hand"); break;
4223 #endif
4224
4225 #ifdef JP
4226                 case INVEN_LEFT:  p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4227 #else
4228                 case INVEN_LEFT:  p = (left_hander ? "wearing on your right hand" : "wearing on your left hand"); break;
4229 #endif
4230
4231 #ifdef JP
4232                 case INVEN_NECK:  p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
4233 #else
4234                 case INVEN_NECK:  p = "wearing around your neck"; break;
4235 #endif
4236
4237 #ifdef JP
4238                 case INVEN_LITE:  p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
4239 #else
4240                 case INVEN_LITE:  p = "using to light the way"; break;
4241 #endif
4242
4243 #ifdef JP
4244                 case INVEN_BODY:  p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
4245 #else
4246                 case INVEN_BODY:  p = "wearing on your body"; break;
4247 #endif
4248
4249 #ifdef JP
4250                 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
4251 #else
4252                 case INVEN_OUTER: p = "wearing on your back"; break;
4253 #endif
4254
4255 #ifdef JP
4256                 case INVEN_HEAD:  p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
4257 #else
4258                 case INVEN_HEAD:  p = "wearing on your head"; break;
4259 #endif
4260
4261 #ifdef JP
4262                 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
4263 #else
4264                 case INVEN_HANDS: p = "wearing on your hands"; break;
4265 #endif
4266
4267 #ifdef JP
4268                 case INVEN_FEET:  p = "­¤Ë¤Ï¤¤¤Æ¤¤¤ë"; break;
4269 #else
4270                 case INVEN_FEET:  p = "wearing on your feet"; break;
4271 #endif
4272
4273 #ifdef JP
4274                 default:          p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
4275 #else
4276                 default:          p = "carrying in your pack"; break;
4277 #endif
4278         }
4279
4280         /* Return the result */
4281         return p;
4282 }
4283
4284
4285 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
4286
4287 bool check_book_realm(const byte book_tval, const byte book_sval)
4288 {
4289         if (book_tval < TV_LIFE_BOOK) return FALSE;
4290         if (p_ptr->pclass == CLASS_SORCERER)
4291         {
4292                 return is_magic(tval2realm(book_tval));
4293         }
4294         else if (p_ptr->pclass == CLASS_RED_MAGE)
4295         {
4296                 if (is_magic(tval2realm(book_tval)))
4297                         return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
4298         }
4299         return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
4300 }
4301
4302
4303 /*
4304  * Check an item against the item tester info
4305  */
4306 bool item_tester_okay(object_type *o_ptr)
4307 {
4308         /* Hack -- allow listing empty slots */
4309         if (item_tester_full) return (TRUE);
4310
4311         /* Require an item */
4312         if (!o_ptr->k_idx) return (FALSE);
4313
4314         /* Hack -- ignore "gold" */
4315         if (o_ptr->tval == TV_GOLD)
4316         {
4317                 /* See xtra2.c */
4318                 extern bool show_gold_on_floor;
4319
4320                 if (!show_gold_on_floor) return (FALSE);
4321         }
4322
4323         /* Check the tval */
4324         if (item_tester_tval)
4325         {
4326                 /* Is it a spellbook? If so, we need a hack -- TY */
4327                 if ((item_tester_tval <= TV_DEATH_BOOK) &&
4328                         (item_tester_tval >= TV_LIFE_BOOK))
4329                         return check_book_realm(o_ptr->tval, o_ptr->sval);
4330                 else
4331                         if (item_tester_tval != o_ptr->tval) return (FALSE);
4332         }
4333
4334         /* Check the hook */
4335         if (item_tester_hook)
4336         {
4337                 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
4338         }
4339
4340         /* Assume okay */
4341         return (TRUE);
4342 }
4343
4344
4345
4346
4347 /*
4348  * Choice window "shadow" of the "show_inven()" function
4349  */
4350 void display_inven(void)
4351 {
4352         register        int i, n, z = 0;
4353         object_type     *o_ptr;
4354         byte            attr = TERM_WHITE;
4355         char            tmp_val[80];
4356         char            o_name[MAX_NLEN];
4357         int             wid, hgt;
4358
4359         /* Get size */
4360         Term_get_size(&wid, &hgt);
4361
4362         /* Find the "final" slot */
4363         for (i = 0; i < INVEN_PACK; i++)
4364         {
4365                 o_ptr = &inventory[i];
4366
4367                 /* Skip non-objects */
4368                 if (!o_ptr->k_idx) continue;
4369
4370                 /* Track */
4371                 z = i + 1;
4372         }
4373
4374         /* Display the pack */
4375         for (i = 0; i < z; i++)
4376         {
4377                 /* Examine the item */
4378                 o_ptr = &inventory[i];
4379
4380                 /* Start with an empty "index" */
4381                 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4382
4383                 /* Is this item "acceptable"? */
4384                 if (item_tester_okay(o_ptr))
4385                 {
4386                         /* Prepare an "index" */
4387                         tmp_val[0] = index_to_label(i);
4388
4389                         /* Bracket the "index" --(-- */
4390                         tmp_val[1] = ')';
4391                 }
4392
4393                 /* Display the index (or blank space) */
4394                 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
4395
4396                 /* Obtain an item description */
4397                 object_desc(o_name, o_ptr, 0);
4398
4399                 /* Obtain the length of the description */
4400                 n = strlen(o_name);
4401
4402                 /* Get a color */
4403                 attr = tval_to_attr[o_ptr->tval % 128];
4404
4405                 /* Grey out charging items */
4406                 if (o_ptr->timeout)
4407                 {
4408                         attr = TERM_L_DARK;
4409                 }
4410
4411                 /* Display the entry itself */
4412                 Term_putstr(3, i, n, attr, o_name);
4413
4414                 /* Erase the rest of the line */
4415                 Term_erase(3+n, i, 255);
4416
4417                 /* Display the weight if needed */
4418                 if (show_weights && o_ptr->weight)
4419                 {
4420                         int wgt = o_ptr->weight * o_ptr->number;
4421 #ifdef JP
4422                         sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
4423 #else
4424                         sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4425 #endif
4426
4427                         prt(tmp_val, i, wid - 9);
4428                 }
4429         }
4430
4431         /* Erase the rest of the window */
4432         for (i = z; i < hgt; i++)
4433         {
4434                 /* Erase the line */
4435                 Term_erase(0, i, 255);
4436         }
4437 }
4438
4439
4440
4441 /*
4442  * Choice window "shadow" of the "show_equip()" function
4443  */
4444 void display_equip(void)
4445 {
4446         register        int i, n;
4447         object_type     *o_ptr;
4448         byte            attr = TERM_WHITE;
4449         char            tmp_val[80];
4450         char            o_name[MAX_NLEN];
4451         int             wid, hgt;
4452
4453         /* Get size */
4454         Term_get_size(&wid, &hgt);
4455
4456         /* Display the equipment */
4457         for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
4458         {
4459                 /* Examine the item */
4460                 o_ptr = &inventory[i];
4461
4462                 /* Start with an empty "index" */
4463                 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4464
4465                 /* Is this item "acceptable"? */
4466                 if (select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr))
4467                 {
4468                         /* Prepare an "index" */
4469                         tmp_val[0] = index_to_label(i);
4470
4471                         /* Bracket the "index" --(-- */
4472                         tmp_val[1] = ')';
4473                 }
4474
4475                 /* Display the index (or blank space) */
4476                 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
4477
4478                 /* Obtain an item description */
4479                 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
4480                 {
4481 #ifdef JP
4482                         strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
4483 #else
4484                         strcpy(o_name, "(wielding with two-hands)");
4485 #endif
4486                         attr = TERM_WHITE;
4487                 }
4488                 else
4489                 {
4490                         object_desc(o_name, o_ptr, 0);
4491                         attr = tval_to_attr[o_ptr->tval % 128];
4492                 }
4493
4494                 /* Obtain the length of the description */
4495                 n = strlen(o_name);
4496
4497                 /* Grey out charging items */
4498                 if (o_ptr->timeout)
4499                 {
4500                         attr = TERM_L_DARK;
4501                 }
4502
4503                 /* Display the entry itself */
4504                 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
4505
4506                 /* Erase the rest of the line */
4507                 Term_erase(3+n, i - INVEN_RARM, 255);
4508
4509                 /* Display the weight (if needed) */
4510                 if (show_weights && o_ptr->weight)
4511                 {
4512                         int wgt = o_ptr->weight * o_ptr->number;
4513 #ifdef JP
4514                         sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
4515 #else
4516                         sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4517 #endif
4518
4519                         prt(tmp_val, i - INVEN_RARM, wid - (show_labels ? 28 : 9));
4520                 }
4521
4522                 /* Display the slot description (if needed) */
4523                 if (show_labels)
4524                 {
4525                         Term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
4526                         prt(mention_use(i), i - INVEN_RARM, wid - 15);
4527                 }
4528         }
4529
4530         /* Erase the rest of the window */
4531         for (i = INVEN_TOTAL - INVEN_RARM; i < hgt; i++)
4532         {
4533                 /* Clear that line */
4534                 Term_erase(0, i, 255);
4535         }
4536 }
4537
4538
4539 /*
4540  * Find the "first" inventory object with the given "tag".
4541  *
4542  * A "tag" is a numeral "n" appearing as "@n" anywhere in the
4543  * inscription of an object.  Alphabetical characters don't work as a
4544  * tag in this form.
4545  *
4546  * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
4547  * and "x" is the "current" command_cmd code.
4548  */
4549 static bool get_tag(int *cp, char tag, int mode)
4550 {
4551         int i, start, end;
4552         cptr s;
4553
4554         /* Extract index from mode */
4555         switch (mode)
4556         {
4557         case USE_EQUIP:
4558                 start = INVEN_RARM;
4559                 end = INVEN_TOTAL - 1;
4560                 break;
4561
4562         case USE_INVEN:
4563                 start = 0;
4564                 end = INVEN_PACK - 1;
4565                 break;
4566
4567         default:
4568                 return FALSE;
4569         }
4570
4571         /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
4572
4573         /* Check every inventory object */
4574         for (i = start; i <= end; i++)
4575         {
4576                 object_type *o_ptr = &inventory[i];
4577
4578                 /* Skip non-objects */
4579                 if (!o_ptr->k_idx) continue;
4580
4581                 /* Skip empty inscriptions */
4582                 if (!o_ptr->inscription) continue;
4583
4584                 /* Skip non-choice */
4585                 if (!item_tester_okay(o_ptr)) continue;
4586
4587                 /* Find a '@' */
4588                 s = my_strchr(quark_str(o_ptr->inscription), '@');
4589
4590                 /* Process all tags */
4591                 while (s)
4592                 {
4593                         /* Check the special tags */
4594                         if ((s[1] == command_cmd) && (s[2] == tag))
4595                         {
4596                                 /* Save the actual inventory ID */
4597                                 *cp = i;
4598
4599                                 /* Success */
4600                                 return (TRUE);
4601                         }
4602
4603                         /* Find another '@' */
4604                         s = my_strchr(s + 1, '@');
4605                 }
4606         }
4607
4608
4609         /**** Find a tag in the form of {@#} (allows only numerals)  ***/
4610
4611         /* Don't allow {@#} with '#' being alphabet */
4612         if (tag < '0' || '9' < tag)
4613         {
4614                 /* No such tag */
4615                 return FALSE;
4616         }
4617
4618         /* Check every object */
4619         for (i = start; i <= end; i++)
4620         {
4621                 object_type *o_ptr = &inventory[i];
4622
4623                 /* Skip non-objects */
4624                 if (!o_ptr->k_idx) continue;
4625
4626                 /* Skip empty inscriptions */
4627                 if (!o_ptr->inscription) continue;
4628
4629                 /* Skip non-choice */
4630                 if (!item_tester_okay(o_ptr)) continue;
4631
4632                 /* Find a '@' */
4633                 s = my_strchr(quark_str(o_ptr->inscription), '@');
4634
4635                 /* Process all tags */
4636                 while (s)
4637                 {
4638                         /* Check the normal tags */
4639                         if (s[1] == tag)
4640                         {
4641                                 /* Save the actual inventory ID */
4642                                 *cp = i;
4643
4644                                 /* Success */
4645                                 return (TRUE);
4646                         }
4647
4648                         /* Find another '@' */
4649                         s = my_strchr(s + 1, '@');
4650                 }
4651         }
4652
4653         /* No such tag */
4654         return (FALSE);
4655 }
4656
4657
4658 /*
4659  * Find the "first" floor object with the given "tag".
4660  *
4661  * A "tag" is a numeral "n" appearing as "@n" anywhere in the
4662  * inscription of an object.  Alphabetical characters don't work as a
4663  * tag in this form.
4664  *
4665  * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
4666  * and "x" is the "current" command_cmd code.
4667  */
4668 static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
4669 {
4670         int i;
4671         cptr s;
4672
4673         /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
4674
4675         /* Check every object in the grid */
4676         for (i = 0; i < floor_num && i < 23; i++)
4677         {
4678                 object_type *o_ptr = &o_list[floor_list[i]];
4679
4680                 /* Skip empty inscriptions */
4681                 if (!o_ptr->inscription) continue;
4682
4683                 /* Find a '@' */
4684                 s = my_strchr(quark_str(o_ptr->inscription), '@');
4685
4686                 /* Process all tags */
4687                 while (s)
4688                 {
4689                         /* Check the special tags */
4690                         if ((s[1] == command_cmd) && (s[2] == tag))
4691                         {
4692                                 /* Save the actual floor object ID */
4693                                 *cp = i;
4694
4695                                 /* Success */
4696                                 return (TRUE);
4697                         }
4698
4699                         /* Find another '@' */
4700                         s = my_strchr(s + 1, '@');
4701                 }
4702         }
4703
4704
4705         /**** Find a tag in the form of {@#} (allows only numerals)  ***/
4706
4707         /* Don't allow {@#} with '#' being alphabet */
4708         if (tag < '0' || '9' < tag)
4709         {
4710                 /* No such tag */
4711                 return FALSE;
4712         }
4713
4714         /* Check every object in the grid */
4715         for (i = 0; i < floor_num && i < 23; i++)
4716         {
4717                 object_type *o_ptr = &o_list[floor_list[i]];
4718
4719                 /* Skip empty inscriptions */
4720                 if (!o_ptr->inscription) continue;
4721
4722                 /* Find a '@' */
4723                 s = my_strchr(quark_str(o_ptr->inscription), '@');
4724
4725                 /* Process all tags */
4726                 while (s)
4727                 {
4728                         /* Check the normal tags */
4729                         if (s[1] == tag)
4730                         {
4731                                 /* Save the floor object ID */
4732                                 *cp = i;
4733
4734                                 /* Success */
4735                                 return (TRUE);
4736                         }
4737
4738                         /* Find another '@' */
4739                         s = my_strchr(s + 1, '@');
4740                 }
4741         }
4742
4743         /* No such tag */
4744         return (FALSE);
4745 }
4746
4747
4748 /*
4749  * Move around label characters with correspond tags
4750  */
4751 static void prepare_label_string(char *label, int mode)
4752 {
4753         cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
4754         int  offset = (mode == USE_EQUIP) ? INVEN_RARM : 0;
4755         int  i;
4756
4757         /* Prepare normal labels */
4758         strcpy(label, alphabet_chars);
4759
4760         /* Move each label */
4761         for (i = 0; i < 52; i++)
4762         {
4763                 int index;
4764                 char c = alphabet_chars[i];
4765
4766                 /* Find a tag with this label */
4767                 if (get_tag(&index, c, mode))
4768                 {
4769                         /* Delete the overwritten label */
4770                         if (label[i] == c) label[i] = ' ';
4771
4772                         /* Move the label to the place of corresponding tag */
4773                         label[index - offset] = c;
4774                 }
4775         }
4776 }
4777
4778
4779 /*
4780  * Move around label characters with correspond tags (floor version)
4781  */
4782 static void prepare_label_string_floor(char *label, int floor_list[], int floor_num)
4783 {
4784         cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
4785         int  i;
4786
4787         /* Prepare normal labels */
4788         strcpy(label, alphabet_chars);
4789
4790         /* Move each label */
4791         for (i = 0; i < 52; i++)
4792         {
4793                 int index;
4794                 char c = alphabet_chars[i];
4795
4796                 /* Find a tag with this label */
4797                 if (get_tag_floor(&index, c, floor_list, floor_num))
4798                 {
4799                         /* Delete the overwritten label */
4800                         if (label[i] == c) label[i] = ' ';
4801
4802                         /* Move the label to the place of corresponding tag */
4803                         label[index] = c;
4804                 }
4805         }
4806 }
4807
4808
4809 /*
4810  * Display the inventory.
4811  *
4812  * Hack -- do not display "trailing" empty slots
4813  */
4814 int show_inven(int target_item)
4815 {
4816         int             i, j, k, l, z = 0;
4817         int             col, cur_col, len;
4818         object_type     *o_ptr;
4819         char            o_name[MAX_NLEN];
4820         char            tmp_val[80];
4821         int             out_index[23];
4822         byte            out_color[23];
4823         char            out_desc[23][MAX_NLEN];
4824         int             target_item_label = 0;
4825         int             wid, hgt;
4826         char            inven_label[52 + 1];
4827
4828         /* Starting column */
4829         col = command_gap;
4830
4831         /* Get size */
4832         Term_get_size(&wid, &hgt);
4833
4834         /* Default "max-length" */
4835         len = wid - col - 1;
4836
4837
4838         /* Find the "final" slot */
4839         for (i = 0; i < INVEN_PACK; i++)
4840         {
4841                 o_ptr = &inventory[i];
4842
4843                 /* Skip non-objects */
4844                 if (!o_ptr->k_idx) continue;
4845
4846                 /* Track */
4847                 z = i + 1;
4848         }
4849
4850         prepare_label_string(inven_label, USE_INVEN);
4851
4852         /* Display the inventory */
4853         for (k = 0, i = 0; i < z; i++)
4854         {
4855                 o_ptr = &inventory[i];
4856
4857                 /* Is this item acceptable? */
4858                 if (!item_tester_okay(o_ptr)) continue;
4859
4860                 /* Describe the object */
4861                 object_desc(o_name, o_ptr, 0);
4862
4863                 /* Save the object index, color, and description */
4864                 out_index[k] = i;
4865                 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4866
4867                 /* Grey out charging items */
4868                 if (o_ptr->timeout)
4869                 {
4870                         out_color[k] = TERM_L_DARK;
4871                 }
4872
4873                 (void)strcpy(out_desc[k], o_name);
4874
4875                 /* Find the predicted "line length" */
4876                 l = strlen(out_desc[k]) + 5;
4877
4878                 /* Be sure to account for the weight */
4879                 if (show_weights) l += 9;
4880
4881                 /* Account for icon if displayed */
4882                 if (show_item_graph)
4883                 {
4884                         l += 2;
4885                         if (use_bigtile) l++;
4886                 }
4887
4888                 /* Maintain the maximum length */
4889                 if (l > len) len = l;
4890
4891                 /* Advance to next "line" */
4892                 k++;
4893         }
4894
4895         /* Find the column to start in */
4896         col = (len > wid - 4) ? 0 : (wid - len - 1);
4897
4898         /* Output each entry */
4899         for (j = 0; j < k; j++)
4900         {
4901                 /* Get the index */
4902                 i = out_index[j];
4903
4904                 /* Get the item */
4905                 o_ptr = &inventory[i];
4906
4907                 /* Clear the line */
4908                 prt("", j + 1, col ? col - 2 : col);
4909
4910                 if (use_menu && target_item)
4911                 {
4912                         if (j == (target_item-1))
4913                         {
4914 #ifdef JP
4915                                 strcpy(tmp_val, "¡Õ");
4916 #else
4917                                 strcpy(tmp_val, "> ");
4918 #endif
4919                                 target_item_label = i;
4920                         }
4921                         else strcpy(tmp_val, "  ");
4922                 }
4923                 else if (i <= INVEN_PACK)
4924                 {
4925                         /* Prepare an index --(-- */
4926                         sprintf(tmp_val, "%c)", inven_label[i]);
4927                 }
4928                 else
4929                 {
4930                         /* Prepare an index --(-- */
4931                         sprintf(tmp_val, "%c)", index_to_label(i));
4932                 }
4933
4934                 /* Clear the line with the (possibly indented) index */
4935                 put_str(tmp_val, j + 1, col);
4936
4937                 cur_col = col + 3;
4938
4939                 /* Display graphics for object, if desired */
4940                 if (show_item_graph)
4941                 {
4942                         byte  a = object_attr(o_ptr);
4943                         char c = object_char(o_ptr);
4944
4945 #ifdef AMIGA
4946                         if (a & 0x80) a |= 0x40;
4947 #endif
4948
4949                         Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
4950                         if (use_bigtile) cur_col++;
4951
4952                         cur_col += 2;
4953                 }
4954
4955
4956                 /* Display the entry itself */
4957                 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
4958
4959                 /* Display the weight if needed */
4960                 if (show_weights)
4961                 {
4962                         int wgt = o_ptr->weight * o_ptr->number;
4963 #ifdef JP
4964                         (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4965 #else
4966                         (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4967 #endif
4968
4969                         prt(tmp_val, j + 1, wid - 9);
4970                 }
4971         }
4972
4973         /* Make a "shadow" below the list (only if needed) */
4974         if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4975
4976         /* Save the new column */
4977         command_gap = col;
4978
4979         return target_item_label;
4980 }
4981
4982
4983
4984 /*
4985  * Display the equipment.
4986  */
4987 int show_equip(int target_item)
4988 {
4989         int             i, j, k, l;
4990         int             col, cur_col, len;
4991         object_type     *o_ptr;
4992         char            tmp_val[80];
4993         char            o_name[MAX_NLEN];
4994         int             out_index[23];
4995         byte            out_color[23];
4996         char            out_desc[23][MAX_NLEN];
4997         int             target_item_label = 0;
4998         int             wid, hgt;
4999         char            equip_label[52 + 1];
5000
5001         /* Starting column */
5002         col = command_gap;
5003
5004         /* Get size */
5005         Term_get_size(&wid, &hgt);
5006
5007         /* Maximal length */
5008         len = wid - col - 1;
5009
5010
5011         /* Scan the equipment list */
5012         for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
5013         {
5014                 o_ptr = &inventory[i];
5015
5016                 /* Is this item acceptable? */
5017                 if (!(select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr)) &&
5018                     (!((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute) ||
5019                      item_tester_no_ryoute)) continue;
5020
5021                 /* Description */
5022                 object_desc(o_name, o_ptr, 0);
5023
5024                 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
5025                 {
5026 #ifdef JP
5027                         (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
5028 #else
5029                         (void)strcpy(out_desc[k],"(wielding with two-hands)");
5030 #endif
5031                         out_color[k] = TERM_WHITE;
5032                 }
5033                 else
5034                 {
5035                         (void)strcpy(out_desc[k], o_name);
5036                         out_color[k] = tval_to_attr[o_ptr->tval % 128];
5037                 }
5038
5039                 out_index[k] = i;
5040                 /* Grey out charging items */
5041                 if (o_ptr->timeout)
5042                 {
5043                         out_color[k] = TERM_L_DARK;
5044                 }
5045
5046                 /* Extract the maximal length (see below) */
5047 #ifdef JP
5048                 l = strlen(out_desc[k]) + (2 + 1);
5049 #else
5050                 l = strlen(out_desc[k]) + (2 + 3);
5051 #endif
5052
5053
5054                 /* Increase length for labels (if needed) */
5055 #ifdef JP
5056                 if (show_labels) l += (7 + 2);
5057 #else
5058                 if (show_labels) l += (14 + 2);
5059 #endif
5060
5061
5062                 /* Increase length for weight (if needed) */
5063                 if (show_weights) l += 9;
5064
5065                 if (show_item_graph) l += 2;
5066
5067                 /* Maintain the max-length */
5068                 if (l > len) len = l;
5069
5070                 /* Advance the entry */
5071                 k++;
5072         }
5073
5074         /* Hack -- Find a column to start in */
5075 #ifdef JP
5076         col = (len > wid - 6) ? 0 : (wid - len - 1);
5077 #else
5078         col = (len > wid - 4) ? 0 : (wid - len - 1);
5079 #endif
5080
5081         prepare_label_string(equip_label, USE_EQUIP);
5082
5083         /* Output each entry */
5084         for (j = 0; j < k; j++)
5085         {
5086                 /* Get the index */
5087                 i = out_index[j];
5088
5089                 /* Get the item */
5090                 o_ptr = &inventory[i];
5091
5092                 /* Clear the line */
5093                 prt("", j + 1, col ? col - 2 : col);
5094
5095                 if (use_menu && target_item)
5096                 {
5097                         if (j == (target_item-1))
5098                         {
5099 #ifdef JP
5100                                 strcpy(tmp_val, "¡Õ");
5101 #else
5102                                 strcpy(tmp_val, "> ");
5103 #endif
5104                                 target_item_label = i;
5105                         }
5106                         else strcpy(tmp_val, "  ");
5107                 }
5108                 else if (i >= INVEN_RARM)
5109                 {
5110                         /* Prepare an index --(-- */
5111                         sprintf(tmp_val, "%c)", equip_label[i - INVEN_RARM]);
5112                 }
5113                 else /* Paranoia */
5114                 {
5115                         /* Prepare an index --(-- */
5116                         sprintf(tmp_val, "%c)", index_to_label(i));
5117                 }
5118
5119                 /* Clear the line with the (possibly indented) index */
5120                 put_str(tmp_val, j+1, col);
5121
5122                 cur_col = col + 3;
5123
5124                 /* Display graphics for object, if desired */
5125                 if (show_item_graph)
5126                 {
5127                         byte a = object_attr(o_ptr);
5128                         char c = object_char(o_ptr);
5129
5130 #ifdef AMIGA
5131                         if (a & 0x80) a |= 0x40;
5132 #endif
5133
5134                         Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
5135                         if (use_bigtile) cur_col++;
5136
5137                         cur_col += 2;
5138                 }
5139
5140                 /* Use labels */
5141                 if (show_labels)
5142                 {
5143                         /* Mention the use */
5144 #ifdef JP
5145                         (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
5146 #else
5147                         (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
5148 #endif
5149
5150                         put_str(tmp_val, j+1, cur_col);
5151
5152                         /* Display the entry itself */
5153 #ifdef JP
5154                         c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
5155 #else
5156                         c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
5157 #endif
5158                 }
5159
5160                 /* No labels */
5161                 else
5162                 {
5163                         /* Display the entry itself */
5164                         c_put_str(out_color[j], out_desc[j], j+1, cur_col);
5165                 }
5166
5167                 /* Display the weight if needed */
5168                 if (show_weights)
5169                 {
5170                         int wgt = o_ptr->weight * o_ptr->number;
5171 #ifdef JP
5172                         (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5173 #else
5174                         (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
5175 #endif
5176
5177                         prt(tmp_val, j + 1, wid - 9);
5178                 }
5179         }
5180
5181         /* Make a "shadow" below the list (only if needed) */
5182         if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5183
5184         /* Save the new column */
5185         command_gap = col;
5186
5187         return target_item_label;
5188 }
5189
5190
5191
5192
5193 /*
5194  * Flip "inven" and "equip" in any sub-windows
5195  */
5196 void toggle_inven_equip(void)
5197 {
5198         int j;
5199
5200         /* Scan windows */
5201         for (j = 0; j < 8; j++)
5202         {
5203                 /* Unused */
5204                 if (!angband_term[j]) continue;
5205
5206                 /* Flip inven to equip */
5207                 if (window_flag[j] & (PW_INVEN))
5208                 {
5209                         /* Flip flags */
5210                         window_flag[j] &= ~(PW_INVEN);
5211                         window_flag[j] |= (PW_EQUIP);
5212
5213                         /* Window stuff */
5214                         p_ptr->window |= (PW_EQUIP);
5215                 }
5216
5217                 /* Flip inven to equip */
5218                 else if (window_flag[j] & (PW_EQUIP))
5219                 {
5220                         /* Flip flags */
5221                         window_flag[j] &= ~(PW_EQUIP);
5222                         window_flag[j] |= (PW_INVEN);
5223
5224                         /* Window stuff */
5225                         p_ptr->window |= (PW_INVEN);
5226                 }
5227         }
5228 }
5229
5230
5231
5232 /*
5233  * Verify the choice of an item.
5234  *
5235  * The item can be negative to mean "item on floor".
5236  */
5237 static bool verify(cptr prompt, int item)
5238 {
5239         char        o_name[MAX_NLEN];
5240         char        out_val[MAX_NLEN+20];
5241         object_type *o_ptr;
5242
5243
5244         /* Inventory */
5245         if (item >= 0)
5246         {
5247                 o_ptr = &inventory[item];
5248         }
5249
5250         /* Floor */
5251         else
5252         {
5253                 o_ptr = &o_list[0 - item];
5254         }
5255
5256         /* Describe */
5257         object_desc(o_name, o_ptr, 0);
5258
5259         /* Prompt */
5260 #ifdef JP
5261 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
5262 #else
5263         (void)sprintf(out_val, "%s %s? ", prompt, o_name);
5264 #endif
5265
5266
5267         /* Query */
5268         return (get_check(out_val));
5269 }
5270
5271
5272 /*
5273  * Hack -- allow user to "prevent" certain choices
5274  *
5275  * The item can be negative to mean "item on floor".
5276  */
5277 static bool get_item_allow(int item)
5278 {
5279         cptr s;
5280
5281         object_type *o_ptr;
5282
5283         if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
5284
5285         /* Inventory */
5286         if (item >= 0)
5287         {
5288                 o_ptr = &inventory[item];
5289         }
5290
5291         /* Floor */
5292         else
5293         {
5294                 o_ptr = &o_list[0 - item];
5295         }
5296
5297         /* No inscription */
5298         if (!o_ptr->inscription) return (TRUE);
5299
5300         /* Find a '!' */
5301         s = my_strchr(quark_str(o_ptr->inscription), '!');
5302
5303         /* Process preventions */
5304         while (s)
5305         {
5306                 /* Check the "restriction" */
5307                 if ((s[1] == command_cmd) || (s[1] == '*'))
5308                 {
5309                         /* Verify the choice */
5310 #ifdef JP
5311 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
5312 #else
5313                         if (!verify("Really try", item)) return (FALSE);
5314 #endif
5315
5316                 }
5317
5318                 /* Find another '!' */
5319                 s = my_strchr(s + 1, '!');
5320         }
5321
5322         /* Allow it */
5323         return (TRUE);
5324 }
5325
5326
5327
5328 /*
5329  * Auxiliary function for "get_item()" -- test an index
5330  */
5331 static bool get_item_okay(int i)
5332 {
5333         /* Illegal items */
5334         if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
5335
5336         if (select_ring_slot) return is_ring_slot(i);
5337
5338         /* Verify the item */
5339         if (!item_tester_okay(&inventory[i])) return (FALSE);
5340
5341         /* Assume okay */
5342         return (TRUE);
5343 }
5344
5345
5346
5347 /*
5348  * Determine whether get_item() can get some item or not
5349  * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
5350  */
5351 bool can_get_item(void)
5352 {
5353         int j, floor_list[23], floor_num = 0;
5354
5355         for (j = 0; j < INVEN_TOTAL; j++)
5356                 if (item_tester_okay(&inventory[j]))
5357                         return TRUE;
5358
5359         floor_num = scan_floor(floor_list, py, px, 0x03);
5360         if (floor_num)
5361                 return TRUE;
5362
5363         return FALSE;
5364 }
5365
5366 /*
5367  * Let the user select an item, save its "index"
5368  *
5369  * Return TRUE only if an acceptable item was chosen by the user.
5370  *
5371  * The selected item must satisfy the "item_tester_hook()" function,
5372  * if that hook is set, and the "item_tester_tval", if that value is set.
5373  *
5374  * All "item_tester" restrictions are cleared before this function returns.
5375  *
5376  * The user is allowed to choose acceptable items from the equipment,
5377  * inventory, or floor, respectively, if the proper flag was given,
5378  * and there are any acceptable items in that location.
5379  *
5380  * The equipment or inventory are displayed (even if no acceptable
5381  * items are in that location) if the proper flag was given.
5382  *
5383  * If there are no acceptable items available anywhere, and "str" is
5384  * not NULL, then it will be used as the text of a warning message
5385  * before the function returns.
5386  *
5387  * Note that the user must press "-" to specify the item on the floor,
5388  * and there is no way to "examine" the item on the floor, while the
5389  * use of "capital" letters will "examine" an inventory/equipment item,
5390  * and prompt for its use.
5391  *
5392  * If a legal item is selected from the inventory, we save it in "cp"
5393  * directly (0 to 35), and return TRUE.
5394  *
5395  * If a legal item is selected from the floor, we save it in "cp" as
5396  * a negative (-1 to -511), and return TRUE.
5397  *
5398  * If no item is available, we do nothing to "cp", and we display a
5399  * warning message, using "str" if available, and return FALSE.
5400  *
5401  * If no item is selected, we do nothing to "cp", and return FALSE.
5402  *
5403  * Global "p_ptr->command_new" is used when viewing the inventory or equipment
5404  * to allow the user to enter a command while viewing those screens, and
5405  * also to induce "auto-enter" of stores, and other such stuff.
5406  *
5407  * Global "p_ptr->command_see" may be set before calling this function to start
5408  * out in "browse" mode.  It is cleared before this function returns.
5409  *
5410  * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
5411  * If it is TRUE then we are viewing inventory, else equipment.
5412  *
5413  * We always erase the prompt when we are done, leaving a blank line,
5414  * or a warning message, if appropriate, if no items are available.
5415  */
5416 bool get_item(int *cp, cptr pmt, cptr str, int mode)
5417 {
5418         s16b this_o_idx, next_o_idx = 0;
5419
5420         char which = ' ';
5421
5422         int j, k, i1, i2, e1, e2;
5423
5424         bool done, item;
5425
5426         bool oops = FALSE;
5427
5428         bool equip = FALSE;
5429         bool inven = FALSE;
5430         bool floor = FALSE;
5431
5432         bool allow_floor = FALSE;
5433
5434         bool toggle = FALSE;
5435
5436         char tmp_val[160];
5437         char out_val[160];
5438
5439         /* See cmd5.c */
5440         extern bool select_the_force;
5441
5442         int menu_line = (use_menu ? 1 : 0);
5443         int max_inven = 0;
5444         int max_equip = 0;
5445
5446 #ifdef ALLOW_EASY_FLOOR /* TNB */
5447
5448         if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
5449
5450 #endif /* ALLOW_EASY_FLOOR -- TNB */
5451
5452         /* Extract args */
5453         if (mode & USE_EQUIP) equip = TRUE;
5454         if (mode & USE_INVEN) inven = TRUE;
5455         if (mode & USE_FLOOR) floor = TRUE;
5456
5457 #ifdef ALLOW_REPEAT
5458
5459         /* Get the item index */
5460         if (repeat_pull(cp))
5461         {
5462                 /* the_force */
5463                 if (select_the_force && (*cp == INVEN_FORCE))
5464                 {
5465                         item_tester_tval = 0;
5466                         item_tester_hook = NULL;
5467                         command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5468                         return (TRUE);
5469                 }
5470
5471                 /* Floor item? */
5472                 else if (floor && (*cp < 0))
5473                 {
5474                         object_type *o_ptr;
5475
5476                         /* Special index */
5477                         k = 0 - (*cp);
5478
5479                         /* Acquire object */
5480                         o_ptr = &o_list[k];
5481
5482                         /* Validate the item */
5483                         if (item_tester_okay(o_ptr))
5484                         {
5485                                 /* Forget the item_tester_tval restriction */
5486                                 item_tester_tval = 0;
5487
5488                                 /* Forget the item_tester_hook restriction */
5489                                 item_tester_hook = NULL;
5490
5491                                 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5492
5493                                 /* Success */
5494                                 return (TRUE);
5495                         }
5496                 }
5497
5498                 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
5499                          (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
5500                 {
5501                         /* Verify the item */
5502                         if (get_item_okay(*cp))
5503                         {
5504                                 /* Forget the item_tester_tval restriction */
5505                                 item_tester_tval = 0;
5506
5507                                 /* Forget the item_tester_hook restriction */
5508                                 item_tester_hook = NULL;
5509
5510                                 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5511
5512                                 /* Success */
5513                                 return (TRUE);
5514                         }
5515                 }
5516         }
5517
5518 #endif /* ALLOW_REPEAT */
5519
5520
5521         /* Paranoia XXX XXX XXX */
5522         msg_print(NULL);
5523
5524
5525         /* Not done */
5526         done = FALSE;
5527
5528         /* No item selected */
5529         item = FALSE;
5530
5531
5532         /* Full inventory */
5533         i1 = 0;
5534         i2 = INVEN_PACK - 1;
5535
5536         /* Forbid inventory */
5537         if (!inven) i2 = -1;
5538         else if (use_menu)
5539         {
5540                 for (j = 0; j < INVEN_PACK; j++)
5541                         if (item_tester_okay(&inventory[j])) max_inven++;
5542         }
5543
5544         /* Restrict inventory indexes */
5545         while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5546         while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5547
5548
5549         /* Full equipment */
5550         e1 = INVEN_RARM;
5551         e2 = INVEN_TOTAL - 1;
5552
5553         /* Forbid equipment */
5554         if (!equip) e2 = -1;
5555         else if (use_menu)
5556         {
5557                 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5558                         if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
5559                 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5560         }
5561
5562         /* Restrict equipment indexes */
5563         while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5564         while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5565
5566         if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
5567         {
5568                 if (p_ptr->migite)
5569                 {
5570                         if (e2 < INVEN_LARM) e2 = INVEN_LARM;
5571                 }
5572                 else if (p_ptr->hidarite) e1 = INVEN_RARM;
5573         }
5574
5575
5576         /* Restrict floor usage */
5577         if (floor)
5578         {
5579                 /* Scan all objects in the grid */
5580                 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5581                 {
5582                         object_type *o_ptr;
5583
5584                         /* Acquire object */
5585                         o_ptr = &o_list[this_o_idx];
5586
5587                         /* Acquire next object */
5588                         next_o_idx = o_ptr->next_o_idx;
5589
5590                         /* Accept the item on the floor if legal */
5591                         if (item_tester_okay(o_ptr) && (o_ptr->marked & OM_FOUND)) allow_floor = TRUE;
5592                 }
5593         }
5594
5595         /* Require at least one legal choice */
5596         if (!allow_floor && (i1 > i2) && (e1 > e2))
5597         {
5598                 /* Cancel p_ptr->command_see */
5599                 command_see = FALSE;
5600
5601                 /* Oops */
5602                 oops = TRUE;
5603
5604                 /* Done */
5605                 done = TRUE;
5606
5607                 if (select_the_force) {
5608                     *cp = INVEN_FORCE;
5609                     item = TRUE;
5610                 }
5611         }
5612
5613         /* Analyze choices */
5614         else
5615         {
5616                 /* Hack -- Start on equipment if requested */
5617                 if (command_see && command_wrk && equip)
5618                 {
5619                         command_wrk = TRUE;
5620                 }
5621
5622                 /* Use inventory if allowed */
5623                 else if (inven)
5624                 {
5625                         command_wrk = FALSE;
5626                 }
5627
5628                 /* Use equipment if allowed */
5629                 else if (equip)
5630                 {
5631                         command_wrk = TRUE;
5632                 }
5633
5634                 /* Use inventory for floor */
5635                 else
5636                 {
5637                         command_wrk = FALSE;
5638                 }
5639         }
5640
5641
5642         /*
5643          * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5644          */
5645         if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5646
5647         /* Hack -- start out in "display" mode */
5648         if (command_see)
5649         {
5650                 /* Save screen */
5651                 screen_save();
5652         }
5653
5654
5655         /* Repeat until done */
5656         while (!done)
5657         {
5658                 int get_item_label = 0;
5659
5660                 /* Show choices */
5661                 int ni = 0;
5662                 int ne = 0;
5663
5664                 /* Scan windows */
5665                 for (j = 0; j < 8; j++)
5666                 {
5667                         /* Unused */
5668                         if (!angband_term[j]) continue;
5669
5670                         /* Count windows displaying inven */
5671                         if (window_flag[j] & (PW_INVEN)) ni++;
5672
5673                         /* Count windows displaying equip */
5674                         if (window_flag[j] & (PW_EQUIP)) ne++;
5675                 }
5676
5677                 /* Toggle if needed */
5678                 if ((command_wrk && ni && !ne) ||
5679                     (!command_wrk && !ni && ne))
5680                 {
5681                         /* Toggle */
5682                         toggle_inven_equip();
5683
5684                         /* Track toggles */
5685                         toggle = !toggle;
5686                 }
5687
5688                 /* Update */
5689                 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5690
5691                 /* Redraw windows */
5692                 window_stuff();
5693
5694
5695                 /* Inventory screen */
5696                 if (!command_wrk)
5697                 {
5698                         /* Redraw if needed */
5699                         if (command_see) get_item_label = show_inven(menu_line);
5700                 }
5701
5702                 /* Equipment screen */
5703                 else
5704                 {
5705                         /* Redraw if needed */
5706                         if (command_see) get_item_label = show_equip(menu_line);
5707                 }
5708
5709                 /* Viewing inventory */
5710                 if (!command_wrk)
5711                 {
5712                         /* Begin the prompt */
5713 #ifdef JP
5714                         sprintf(out_val, "»ý¤Áʪ:");
5715 #else
5716                         sprintf(out_val, "Inven:");
5717 #endif
5718
5719                         /* Some legal items */
5720                         if ((i1 <= i2) && !use_menu)
5721                         {
5722                                 /* Build the prompt */
5723 #ifdef JP
5724                                 sprintf(tmp_val, "%c-%c,'(',')',",
5725 #else
5726                                 sprintf(tmp_val, " %c-%c,'(',')',",
5727 #endif
5728                                         index_to_label(i1), index_to_label(i2));
5729
5730                                 /* Append */
5731                                 strcat(out_val, tmp_val);
5732                         }
5733
5734                         /* Indicate ability to "view" */
5735 #ifdef JP
5736                         if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5737 #else
5738                         if (!command_see && !use_menu) strcat(out_val, " * to see,");
5739 #endif
5740
5741                         /* Append */
5742 #ifdef JP
5743                         if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
5744 #else
5745                         if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
5746 #endif
5747                 }
5748
5749                 /* Viewing equipment */
5750                 else
5751                 {
5752                         /* Begin the prompt */
5753 #ifdef JP
5754                         sprintf(out_val, "ÁõÈ÷ÉÊ:");
5755 #else
5756                         sprintf(out_val, "Equip:");
5757 #endif
5758
5759                         /* Some legal items */
5760                         if ((e1 <= e2) && !use_menu)
5761                         {
5762                                 /* Build the prompt */
5763 #ifdef JP
5764                                 sprintf(tmp_val, "%c-%c,'(',')',",
5765 #else
5766                                 sprintf(tmp_val, " %c-%c,'(',')',",
5767 #endif
5768                                         index_to_label(e1), index_to_label(e2));
5769
5770                                 /* Append */
5771                                 strcat(out_val, tmp_val);
5772                         }
5773
5774                         /* Indicate ability to "view" */
5775 #ifdef JP
5776                         if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5777 #else
5778                         if (!command_see) strcat(out_val, " * to see,");
5779 #endif
5780
5781                         /* Append */
5782 #ifdef JP
5783                         if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
5784 #else
5785                         if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
5786 #endif
5787                 }
5788
5789                 /* Indicate legality of the "floor" item */
5790 #ifdef JP
5791                 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
5792                 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
5793 #else
5794                 if (allow_floor) strcat(out_val, " - for floor,");
5795                 if (select_the_force) strcat(out_val, " w for the Force,");
5796 #endif
5797
5798                 /* Finish the prompt */
5799                 strcat(out_val, " ESC");
5800
5801                 /* Build the prompt */
5802                 sprintf(tmp_val, "(%s) %s", out_val, pmt);
5803
5804                 /* Show the prompt */
5805                 prt(tmp_val, 0, 0);
5806
5807                 /* Get a key */
5808                 which = inkey();
5809
5810                 if (use_menu)
5811                 {
5812                 int max_line = (command_wrk ? max_equip : max_inven);
5813                 switch (which)
5814                 {
5815                         case ESCAPE:
5816                         case 'z':
5817                         case 'Z':
5818                         case '0':
5819                         {
5820                                 done = TRUE;
5821                                 break;
5822                         }
5823
5824                         case '8':
5825                         case 'k':
5826                         case 'K':
5827                         {
5828                                 menu_line += (max_line - 1);
5829                                 break;
5830                         }
5831
5832                         case '2':
5833                         case 'j':
5834                         case 'J':
5835                         {
5836                                 menu_line++;
5837                                 break;
5838                         }
5839
5840                         case '4':
5841                         case '6':
5842                         case 'h':
5843                         case 'H':
5844                         case 'l':
5845                         case 'L':
5846                         {
5847                                 /* Verify legality */
5848                                 if (!inven || !equip)
5849                                 {
5850                                         bell();
5851                                         break;
5852                                 }
5853
5854                                 /* Hack -- Fix screen */
5855                                 if (command_see)
5856                                 {
5857                                         /* Load screen */
5858                                         screen_load();
5859
5860                                         /* Save screen */
5861                                         screen_save();
5862                                 }
5863
5864                                 /* Switch inven/equip */
5865                                 command_wrk = !command_wrk;
5866                                 max_line = (command_wrk ? max_equip : max_inven);
5867                                 if (menu_line > max_line) menu_line = max_line;
5868
5869                                 /* Need to redraw */
5870                                 break;
5871                         }
5872
5873                         case 'x':
5874                         case 'X':
5875                         case '\r':
5876                         case '\n':
5877                         {
5878                                 if (command_wrk == USE_FLOOR)
5879                                 {
5880                                         /* Special index */
5881                                         (*cp) = -get_item_label;
5882                                 }
5883                                 else
5884                                 {
5885                                         /* Validate the item */
5886                                         if (!get_item_okay(get_item_label))
5887                                         {
5888                                                 bell();
5889                                                 break;
5890                                         }
5891
5892                                         /* Allow player to "refuse" certain actions */
5893                                         if (!get_item_allow(get_item_label))
5894                                         {
5895                                                 done = TRUE;
5896                                                 break;
5897                                         }
5898
5899                                         /* Accept that choice */
5900                                         (*cp) = get_item_label;
5901                                 }
5902
5903                                 item = TRUE;
5904                                 done = TRUE;
5905                                 break;
5906                         }
5907                         case 'w':
5908                         {
5909                                 if (select_the_force) {
5910                                         *cp = INVEN_FORCE;
5911                                         item = TRUE;
5912                                         done = TRUE;
5913                                         break;
5914                                 }
5915                         }
5916                 }
5917                 if (menu_line > max_line) menu_line -= max_line;
5918                 }
5919                 else
5920                 {
5921                 /* Parse it */
5922                 switch (which)
5923                 {
5924                         case ESCAPE:
5925                         {
5926                                 done = TRUE;
5927                                 break;
5928                         }
5929
5930                         case '*':
5931                         case '?':
5932                         case ' ':
5933                         {
5934                                 /* Hide the list */
5935                                 if (command_see)
5936                                 {
5937                                         /* Flip flag */
5938                                         command_see = FALSE;
5939
5940                                         /* Load screen */
5941                                         screen_load();
5942                                 }
5943
5944                                 /* Show the list */
5945                                 else
5946                                 {
5947                                         /* Save screen */
5948                                         screen_save();
5949
5950                                         /* Flip flag */
5951                                         command_see = TRUE;
5952                                 }
5953                                 break;
5954                         }
5955
5956                         case '/':
5957                         {
5958                                 /* Verify legality */
5959                                 if (!inven || !equip)
5960                                 {
5961                                         bell();
5962                                         break;
5963                                 }
5964
5965                                 /* Hack -- Fix screen */
5966                                 if (command_see)
5967                                 {
5968                                         /* Load screen */
5969                                         screen_load();
5970
5971                                         /* Save screen */
5972                                         screen_save();
5973                                 }
5974
5975                                 /* Switch inven/equip */
5976                                 command_wrk = !command_wrk;
5977
5978                                 /* Need to redraw */
5979                                 break;
5980                         }
5981
5982                         case '-':
5983                         {
5984                                 /* Use floor item */
5985                                 if (allow_floor)
5986                                 {
5987                                         /* Scan all objects in the grid */
5988                                         for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5989                                         {
5990                                                 object_type *o_ptr;
5991
5992                                                 /* Acquire object */
5993                                                 o_ptr = &o_list[this_o_idx];
5994
5995                                                 /* Acquire next object */
5996                                                 next_o_idx = o_ptr->next_o_idx;
5997
5998                                                 /* Validate the item */
5999                                                 if (!item_tester_okay(o_ptr)) continue;
6000
6001                                                 /* Special index */
6002                                                 k = 0 - this_o_idx;
6003
6004                                                 /* Verify the item (if required) */
6005 #ifdef JP
6006 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
6007 #else
6008                                                 if (other_query_flag && !verify("Try", k)) continue;
6009 #endif
6010
6011
6012                                                 /* Allow player to "refuse" certain actions */
6013                                                 if (!get_item_allow(k)) continue;
6014
6015                                                 /* Accept that choice */
6016                                                 (*cp) = k;
6017                                                 item = TRUE;
6018                                                 done = TRUE;
6019                                                 break;
6020                                         }
6021
6022                                         /* Outer break */
6023                                         if (done) break;
6024                                 }
6025
6026                                 /* Oops */
6027                                 bell();
6028                                 break;
6029                         }
6030
6031                         case '0':
6032                         case '1': case '2': case '3':
6033                         case '4': case '5': case '6':
6034                         case '7': case '8': case '9':
6035                         {
6036                                 /* Look up the tag */
6037                                 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
6038                                 {
6039                                         bell();
6040                                         break;
6041                                 }
6042
6043                                 /* Hack -- Validate the item */
6044                                 if ((k < INVEN_RARM) ? !inven : !equip)
6045                                 {
6046                                         bell();
6047                                         break;
6048                                 }
6049
6050                                 /* Validate the item */
6051                                 if (!get_item_okay(k))
6052                                 {
6053                                         bell();
6054                                         break;
6055                                 }
6056
6057                                 /* Allow player to "refuse" certain actions */
6058                                 if (!get_item_allow(k))
6059                                 {
6060                                         done = TRUE;
6061                                         break;
6062                                 }
6063
6064                                 /* Accept that choice */
6065                                 (*cp) = k;
6066                                 item = TRUE;
6067                                 done = TRUE;
6068                                 break;
6069                         }
6070
6071 #if 0
6072                         case '\n':
6073                         case '\r':
6074                         {
6075                                 /* Choose "default" inventory item */
6076                                 if (!command_wrk)
6077                                 {
6078                                         k = ((i1 == i2) ? i1 : -1);
6079                                 }
6080
6081                                 /* Choose "default" equipment item */
6082                                 else
6083                                 {
6084                                         k = ((e1 == e2) ? e1 : -1);
6085                                 }
6086
6087                                 /* Validate the item */
6088                                 if (!get_item_okay(k))
6089                                 {
6090                                         bell();
6091                                         break;
6092                                 }
6093
6094                                 /* Allow player to "refuse" certain actions */
6095                                 if (!get_item_allow(k))
6096                                 {
6097                                         done = TRUE;
6098                                         break;
6099                                 }
6100
6101                                 /* Accept that choice */
6102                                 (*cp) = k;
6103                                 item = TRUE;
6104                                 done = TRUE;
6105                                 break;
6106                         }
6107 #endif
6108
6109                         case 'w':
6110                         {
6111                                 if (select_the_force) {
6112                                         *cp = INVEN_FORCE;
6113                                         item = TRUE;
6114                                         done = TRUE;
6115                                         break;
6116                                 }
6117
6118                                 /* Fall through */
6119                         }
6120
6121                         default:
6122                         {
6123                                 int ver;
6124                                 bool not_found = FALSE;
6125
6126                                 /* Look up the alphabetical tag */
6127                                 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
6128                                 {
6129                                         not_found = TRUE;
6130                                 }
6131
6132                                 /* Hack -- Validate the item */
6133                                 else if ((k < INVEN_RARM) ? !inven : !equip)
6134                                 {
6135                                         not_found = TRUE;
6136                                 }
6137
6138                                 /* Validate the item */
6139                                 else if (!get_item_okay(k))
6140                                 {
6141                                         not_found = TRUE;
6142                                 }
6143
6144                                 if (!not_found)
6145                                 {
6146                                         /* Accept that choice */
6147                                         (*cp) = k;
6148                                         item = TRUE;
6149                                         done = TRUE;
6150                                         break;
6151                                 }
6152
6153                                 /* Extract "query" setting */
6154                                 ver = isupper(which);
6155                                 which = tolower(which);
6156
6157                                 /* Convert letter to inventory index */
6158                                 if (!command_wrk)
6159                                 {
6160                                         if (which == '(') k = i1;
6161                                         else if (which == ')') k = i2;
6162                                         else k = label_to_inven(which);
6163                                 }
6164
6165                                 /* Convert letter to equipment index */
6166                                 else
6167                                 {
6168                                         if (which == '(') k = e1;
6169                                         else if (which == ')') k = e2;
6170                                         else k = label_to_equip(which);
6171                                 }
6172
6173                                 /* Validate the item */
6174                                 if (!get_item_okay(k))
6175                                 {
6176                                         bell();
6177                                         break;
6178                                 }
6179
6180                                 /* Verify the item */
6181 #ifdef JP
6182 if (ver && !verify("ËÜÅö¤Ë", k))
6183 #else
6184                                 if (ver && !verify("Try", k))
6185 #endif
6186
6187                                 {
6188                                         done = TRUE;
6189                                         break;
6190                                 }
6191
6192                                 /* Allow player to "refuse" certain actions */
6193                                 if (!get_item_allow(k))
6194                                 {
6195                                         done = TRUE;
6196                                         break;
6197                                 }
6198
6199                                 /* Accept that choice */
6200                                 (*cp) = k;
6201                                 item = TRUE;
6202                                 done = TRUE;
6203                                 break;
6204                         }
6205                 }
6206                 }
6207         }
6208
6209
6210         /* Fix the screen if necessary */
6211         if (command_see)
6212         {
6213                 /* Load screen */
6214                 screen_load();
6215
6216                 /* Hack -- Cancel "display" */
6217                 command_see = FALSE;
6218         }
6219
6220
6221         /* Forget the item_tester_tval restriction */
6222         item_tester_tval = 0;
6223
6224         item_tester_no_ryoute = FALSE;
6225
6226         /* Forget the item_tester_hook restriction */
6227         item_tester_hook = NULL;
6228
6229
6230         /* Clean up  'show choices' */
6231         /* Toggle again if needed */
6232         if (toggle) toggle_inven_equip();
6233
6234         /* Update */
6235         p_ptr->window |= (PW_INVEN | PW_EQUIP);
6236
6237         /* Window stuff */
6238         window_stuff();
6239
6240
6241         /* Clear the prompt line */
6242         prt("", 0, 0);
6243
6244         /* Warning if needed */
6245         if (oops && str) msg_print(str);
6246
6247         if (item)
6248         {
6249 #ifdef ALLOW_REPEAT
6250                 repeat_push(*cp);
6251 #endif /* ALLOW_REPEAT */
6252
6253                 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6254         }
6255
6256         /* Result */
6257         return (item);
6258 }
6259
6260
6261 #ifdef ALLOW_EASY_FLOOR
6262
6263 /*
6264  * scan_floor --
6265  *
6266  * Return a list of o_list[] indexes of items at the given cave
6267  * location. Valid flags are:
6268  *
6269  *              mode & 0x01 -- Item tester
6270  *              mode & 0x02 -- Marked items only
6271  *              mode & 0x04 -- Stop after first
6272  */
6273 int scan_floor(int *items, int y, int x, int mode)
6274 {
6275         int this_o_idx, next_o_idx;
6276
6277         int num = 0;
6278
6279         /* Sanity */
6280         if (!in_bounds(y, x)) return 0;
6281
6282         /* Scan all objects in the grid */
6283         for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
6284         {
6285                 object_type *o_ptr;
6286
6287                 /* Acquire object */
6288                 o_ptr = &o_list[this_o_idx];
6289
6290                 /* Acquire next object */
6291                 next_o_idx = o_ptr->next_o_idx;
6292
6293                 /* Item tester */
6294                 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
6295
6296                 /* Marked */
6297                 if ((mode & 0x02) && !(o_ptr->marked & OM_FOUND)) continue;
6298
6299                 /* Accept this item */
6300                 /* XXX Hack -- Enforce limit */
6301                 if (num < 23)
6302                         items[num] = this_o_idx;
6303
6304                 num++;
6305
6306                 /* Only one */
6307                 if (mode & 0x04) break;
6308         }
6309
6310         /* Result */
6311         return num;
6312 }
6313
6314
6315 /*
6316  * Display a list of the items on the floor at the given location.
6317  */
6318 int show_floor(int target_item, int y, int x, int *min_width)
6319 {
6320         int i, j, k, l;
6321         int col, len;
6322
6323         object_type *o_ptr;
6324
6325         char o_name[MAX_NLEN];
6326
6327         char tmp_val[80];
6328
6329         int out_index[23];
6330         byte out_color[23];
6331         char out_desc[23][MAX_NLEN];
6332         int target_item_label = 0;
6333
6334         int floor_list[23], floor_num;
6335         int wid, hgt;
6336         char floor_label[52 + 1];
6337
6338         bool dont_need_to_show_weights = TRUE;
6339
6340         /* Get size */
6341         Term_get_size(&wid, &hgt);
6342
6343         /* Default length */
6344         len = MAX((*min_width), 20);
6345
6346
6347         /* Scan for objects in the grid, using item_tester_okay() */
6348         floor_num = scan_floor(floor_list, y, x, 0x03);
6349
6350         /* Display the floor objects */
6351         for (k = 0, i = 0; i < floor_num && i < 23; i++)
6352         {
6353                 o_ptr = &o_list[floor_list[i]];
6354
6355                 /* Describe the object */
6356                 object_desc(o_name, o_ptr, 0);
6357
6358                 /* Save the index */
6359                 out_index[k] = i;
6360
6361                 /* Acquire inventory color */
6362                 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
6363
6364                 /* Save the object description */
6365                 strcpy(out_desc[k], o_name);
6366
6367                 /* Find the predicted "line length" */
6368                 l = strlen(out_desc[k]) + 5;
6369
6370                 /* Be sure to account for the weight */
6371                 if (show_weights) l += 9;
6372
6373                 if (o_ptr->tval != TV_GOLD) dont_need_to_show_weights = FALSE;
6374
6375                 /* Maintain the maximum length */
6376                 if (l > len) len = l;
6377
6378                 /* Advance to next "line" */
6379                 k++;
6380         }
6381
6382         if (show_weights && dont_need_to_show_weights) len -= 9;
6383
6384         /* Save width */
6385         *min_width = len;
6386
6387         /* Find the column to start in */
6388         col = (len > wid - 4) ? 0 : (wid - len - 1);
6389
6390         prepare_label_string_floor(floor_label, floor_list, floor_num);
6391
6392         /* Output each entry */
6393         for (j = 0; j < k; j++)
6394         {
6395                 /* Get the index */
6396                 i = floor_list[out_index[j]];
6397
6398                 /* Get the item */
6399                 o_ptr = &o_list[i];
6400
6401                 /* Clear the line */
6402                 prt("", j + 1, col ? col - 2 : col);
6403
6404                 if (use_menu && target_item)
6405                 {
6406                         if (j == (target_item-1))
6407                         {
6408 #ifdef JP
6409                                 strcpy(tmp_val, "¡Õ");
6410 #else
6411                                 strcpy(tmp_val, "> ");
6412 #endif
6413                                 target_item_label = i;
6414                         }
6415                         else strcpy(tmp_val, "   ");
6416                 }
6417                 else
6418                 {
6419                         /* Prepare an index --(-- */
6420                         sprintf(tmp_val, "%c)", floor_label[j]);
6421                 }
6422
6423                 /* Clear the line with the (possibly indented) index */
6424                 put_str(tmp_val, j + 1, col);
6425
6426                 /* Display the entry itself */
6427                 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
6428
6429                 /* Display the weight if needed */
6430                 if (show_weights && (o_ptr->tval != TV_GOLD))
6431                 {
6432                         int wgt = o_ptr->weight * o_ptr->number;
6433 #ifdef JP
6434                         sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
6435 #else
6436                         sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
6437 #endif
6438
6439                         prt(tmp_val, j + 1, wid - 9);
6440                 }
6441         }
6442
6443         /* Make a "shadow" below the list (only if needed) */
6444         if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
6445
6446         return target_item_label;
6447 }
6448
6449 /*
6450  * This version of get_item() is called by get_item() when
6451  * the easy_floor is on.
6452  */
6453 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
6454 {
6455         char n1 = ' ', n2 = ' ', which = ' ';
6456
6457         int j, k, i1, i2, e1, e2;
6458
6459         bool done, item;
6460
6461         bool oops = FALSE;
6462
6463         /* Extract args */
6464         bool equip = (mode & USE_EQUIP) ? TRUE : FALSE;
6465         bool inven = (mode & USE_INVEN) ? TRUE : FALSE;
6466         bool floor = (mode & USE_FLOOR) ? TRUE : FALSE;
6467
6468         bool allow_equip = FALSE;
6469         bool allow_inven = FALSE;
6470         bool allow_floor = FALSE;
6471
6472         bool toggle = FALSE;
6473
6474         char tmp_val[160];
6475         char out_val[160];
6476
6477         int floor_num, floor_list[23], floor_top = 0;
6478         int min_width = 0;
6479
6480         extern bool select_the_force;
6481
6482         int menu_line = (use_menu ? 1 : 0);
6483         int max_inven = 0;
6484         int max_equip = 0;
6485
6486 #ifdef ALLOW_REPEAT
6487
6488         /* Get the item index */
6489         if (repeat_pull(cp))
6490         {
6491                 /* the_force */
6492                 if (select_the_force && (*cp == INVEN_FORCE))
6493                 {
6494                         item_tester_tval = 0;
6495                         item_tester_hook = NULL;
6496                         command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6497                         return (TRUE);
6498                 }
6499
6500                 /* Floor item? */
6501                 else if (floor && (*cp < 0))
6502                 {
6503                         object_type *o_ptr;
6504
6505                         /* Special index */
6506                         k = 0 - (*cp);
6507
6508                         /* Acquire object */
6509                         o_ptr = &o_list[k];
6510
6511                         /* Validate the item */
6512                         if (item_tester_okay(o_ptr))
6513                         {
6514                                 /* Forget the item_tester_tval restriction */
6515                                 item_tester_tval = 0;
6516
6517                                 /* Forget the item_tester_hook restriction */
6518                                 item_tester_hook = NULL;
6519
6520                                 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6521
6522                                 /* Success */
6523                                 return (TRUE);
6524                         }
6525                 }
6526
6527                 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
6528                          (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
6529                 {
6530                         /* Verify the item */
6531                         if (get_item_okay(*cp))
6532                         {
6533                                 /* Forget the item_tester_tval restriction */
6534                                 item_tester_tval = 0;
6535
6536                                 /* Forget the item_tester_hook restriction */
6537                                 item_tester_hook = NULL;
6538
6539                                 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6540
6541                                 /* Success */
6542                                 return (TRUE);
6543                         }
6544                 }
6545         }
6546
6547 #endif /* ALLOW_REPEAT */
6548
6549
6550         /* Paranoia XXX XXX XXX */
6551         msg_print(NULL);
6552
6553
6554         /* Not done */
6555         done = FALSE;
6556
6557         /* No item selected */
6558         item = FALSE;
6559
6560
6561         /* Full inventory */
6562         i1 = 0;
6563         i2 = INVEN_PACK - 1;
6564
6565         /* Forbid inventory */
6566         if (!inven) i2 = -1;
6567         else if (use_menu)
6568         {
6569                 for (j = 0; j < INVEN_PACK; j++)
6570                         if (item_tester_okay(&inventory[j])) max_inven++;
6571         }
6572
6573         /* Restrict inventory indexes */
6574         while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
6575         while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
6576
6577
6578         /* Full equipment */
6579         e1 = INVEN_RARM;
6580         e2 = INVEN_TOTAL - 1;
6581
6582         /* Forbid equipment */
6583         if (!equip) e2 = -1;
6584         else if (use_menu)
6585         {
6586                 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
6587                         if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
6588                 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
6589         }
6590
6591         /* Restrict equipment indexes */
6592         while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
6593         while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
6594
6595         if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
6596         {
6597                 if (p_ptr->migite)
6598                 {
6599                         if (e2 < INVEN_LARM) e2 = INVEN_LARM;
6600                 }
6601                 else if (p_ptr->hidarite) e1 = INVEN_RARM;
6602         }
6603
6604
6605         /* Count "okay" floor items */
6606         floor_num = 0;
6607
6608         /* Restrict floor usage */
6609         if (floor)
6610         {
6611                 /* Scan all objects in the grid */
6612                 floor_num = scan_floor(floor_list, py, px, 0x03);
6613         }
6614
6615         /* Accept inventory */
6616         if (i1 <= i2) allow_inven = TRUE;
6617
6618         /* Accept equipment */
6619         if (e1 <= e2) allow_equip = TRUE;
6620
6621         /* Accept floor */
6622         if (floor_num) allow_floor = TRUE;
6623
6624         /* Require at least one legal choice */
6625         if (!allow_inven && !allow_equip && !allow_floor)
6626         {
6627                 /* Cancel p_ptr->command_see */
6628                 command_see = FALSE;
6629
6630                 /* Oops */
6631                 oops = TRUE;
6632
6633                 /* Done */
6634                 done = TRUE;
6635
6636                 if (select_the_force) {
6637                     *cp = INVEN_FORCE;
6638                     item = TRUE;
6639                 }
6640         }
6641
6642         /* Analyze choices */
6643         else
6644         {
6645                 /* Hack -- Start on equipment if requested */
6646                 if (command_see && (command_wrk == (USE_EQUIP))
6647                         && allow_equip)
6648                 {
6649                         command_wrk = (USE_EQUIP);
6650                 }
6651
6652                 /* Use inventory if allowed */
6653                 else if (allow_inven)
6654                 {
6655                         command_wrk = (USE_INVEN);
6656                 }
6657
6658                 /* Use equipment if allowed */
6659                 else if (allow_equip)
6660                 {
6661                         command_wrk = (USE_EQUIP);
6662                 }
6663
6664                 /* Use floor if allowed */
6665                 else if (allow_floor)
6666                 {
6667                         command_wrk = (USE_FLOOR);
6668                 }
6669         }
6670
6671         /*
6672          * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
6673          */
6674         if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
6675
6676         /* Hack -- start out in "display" mode */
6677         if (command_see)
6678         {
6679                 /* Save screen */
6680                 screen_save();
6681         }
6682
6683         /* Repeat until done */
6684         while (!done)
6685         {
6686                 int get_item_label = 0;
6687
6688                 /* Show choices */
6689                 int ni = 0;
6690                 int ne = 0;
6691
6692                 /* Scan windows */
6693                 for (j = 0; j < 8; j++)
6694                 {
6695                         /* Unused */
6696                         if (!angband_term[j]) continue;
6697
6698                         /* Count windows displaying inven */
6699                         if (window_flag[j] & (PW_INVEN)) ni++;
6700
6701                         /* Count windows displaying equip */
6702                         if (window_flag[j] & (PW_EQUIP)) ne++;
6703                 }
6704
6705                 /* Toggle if needed */
6706                 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
6707                     (command_wrk == (USE_INVEN) && !ni && ne))
6708                 {
6709                         /* Toggle */
6710                         toggle_inven_equip();
6711
6712                         /* Track toggles */
6713                         toggle = !toggle;
6714                 }
6715
6716                 /* Update */
6717                 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6718
6719                 /* Redraw windows */
6720                 window_stuff();
6721
6722                 /* Inventory screen */
6723                 if (command_wrk == (USE_INVEN))
6724                 {
6725                         /* Extract the legal requests */
6726                         n1 = I2A(i1);
6727                         n2 = I2A(i2);
6728
6729                         /* Redraw if needed */
6730                         if (command_see) get_item_label = show_inven(menu_line);
6731                 }
6732
6733                 /* Equipment screen */
6734                 else if (command_wrk == (USE_EQUIP))
6735                 {
6736                         /* Extract the legal requests */
6737                         n1 = I2A(e1 - INVEN_RARM);
6738                         n2 = I2A(e2 - INVEN_RARM);
6739
6740                         /* Redraw if needed */
6741                         if (command_see) get_item_label = show_equip(menu_line);
6742                 }
6743
6744                 /* Floor screen */
6745                 else if (command_wrk == (USE_FLOOR))
6746                 {
6747                         j = floor_top;
6748                         k = MIN(floor_top + 23, floor_num) - 1;
6749
6750                         /* Extract the legal requests */
6751                         n1 = I2A(j - floor_top);
6752                         n2 = I2A(k - floor_top);
6753
6754                         /* Redraw if needed */
6755                         if (command_see) get_item_label = show_floor(menu_line, py, px, &min_width);
6756                 }
6757
6758                 /* Viewing inventory */
6759                 if (command_wrk == (USE_INVEN))
6760                 {
6761                         /* Begin the prompt */
6762 #ifdef JP
6763                         sprintf(out_val, "»ý¤Áʪ:");
6764 #else
6765                         sprintf(out_val, "Inven:");
6766 #endif
6767
6768                         if (!use_menu)
6769                         {
6770                                 /* Build the prompt */
6771 #ifdef JP
6772                                 sprintf(tmp_val, "%c-%c,'(',')',",
6773 #else
6774                                 sprintf(tmp_val, " %c-%c,'(',')',",
6775 #endif
6776                                         index_to_label(i1), index_to_label(i2));
6777
6778                                 /* Append */
6779                                 strcat(out_val, tmp_val);
6780                         }
6781
6782                         /* Indicate ability to "view" */
6783 #ifdef JP
6784                         if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6785 #else
6786                         if (!command_see && !use_menu) strcat(out_val, " * to see,");
6787 #endif
6788
6789                         /* Append */
6790                         if (allow_equip)
6791                         {
6792 #ifdef JP
6793                                 if (!use_menu)
6794                                         strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
6795                                 else if (allow_floor)
6796                                         strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
6797                                 else
6798                                         strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6799 #else
6800                                 if (!use_menu)
6801                                         strcat(out_val, " / for Equip,");
6802                                 else if (allow_floor)
6803                                         strcat(out_val, " 6 for Equip,");
6804                                 else
6805                                         strcat(out_val, " 4 or 6 for Equip,");
6806 #endif
6807                         }
6808
6809                         /* Append */
6810                         if (allow_floor)
6811                         {
6812 #ifdef JP
6813                                 if (!use_menu)
6814                                         strcat(out_val, " '-'¾²¾å,");
6815                                 else if (allow_equip)
6816                                         strcat(out_val, " '4' ¾²¾å,");
6817                                 else
6818                                         strcat(out_val, " '4'or'6' ¾²¾å,");
6819 #else
6820                                 if (!use_menu)
6821                                         strcat(out_val, " - for floor,");
6822                                 else if (allow_equip)
6823                                         strcat(out_val, " 4 for floor,");
6824                                 else
6825                                         strcat(out_val, " 4 or 6 for floor,");
6826 #endif
6827                         }
6828                 }
6829
6830                 /* Viewing equipment */
6831                 else if (command_wrk == (USE_EQUIP))
6832                 {
6833                         /* Begin the prompt */
6834 #ifdef JP
6835                         sprintf(out_val, "ÁõÈ÷ÉÊ:");
6836 #else
6837                         sprintf(out_val, "Equip:");
6838 #endif
6839
6840                         if (!use_menu)
6841                         {
6842                                 /* Build the prompt */
6843 #ifdef JP
6844                                 sprintf(tmp_val, "%c-%c,'(',')',",
6845 #else
6846                                 sprintf(tmp_val, " %c-%c,'(',')',",
6847 #endif
6848                                         index_to_label(e1), index_to_label(e2));
6849
6850                                 /* Append */
6851                                 strcat(out_val, tmp_val);
6852                         }
6853
6854                         /* Indicate ability to "view" */
6855 #ifdef JP
6856                         if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6857 #else
6858                         if (!command_see && !use_menu) strcat(out_val, " * to see,");
6859 #endif
6860
6861                         /* Append */
6862                         if (allow_inven)
6863                         {
6864 #ifdef JP
6865                                 if (!use_menu)
6866                                         strcat(out_val, " '/' »ý¤Áʪ,");
6867                                 else if (allow_floor)
6868                                         strcat(out_val, " '4' »ý¤Áʪ,");
6869                                 else
6870                                         strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6871 #else
6872                                 if (!use_menu)
6873                                         strcat(out_val, " / for Inven,");
6874                                 else if (allow_floor)
6875                                         strcat(out_val, " 4 for Inven,");
6876                                 else
6877                                         strcat(out_val, " 4 or 6 for Inven,");
6878 #endif
6879                         }
6880
6881                         /* Append */
6882                         if (allow_floor)
6883                         {
6884 #ifdef JP
6885                                 if (!use_menu)
6886                                         strcat(out_val, " '-'¾²¾å,");
6887                                 else if (allow_inven)
6888                                         strcat(out_val, " '6' ¾²¾å,");
6889                                 else
6890                                         strcat(out_val, " '4'or'6' ¾²¾å,");
6891 #else
6892                                 if (!use_menu)
6893                                         strcat(out_val, " - for floor,");
6894                                 else if (allow_inven)
6895                                         strcat(out_val, " 6 for floor,");
6896                                 else
6897                                         strcat(out_val, " 4 or 6 for floor,");
6898 #endif
6899                         }
6900                 }
6901
6902                 /* Viewing floor */
6903                 else if (command_wrk == (USE_FLOOR))
6904                 {
6905                         /* Begin the prompt */
6906 #ifdef JP
6907                         sprintf(out_val, "¾²¾å:");
6908 #else
6909                         sprintf(out_val, "Floor:");
6910 #endif
6911
6912                         if (!use_menu)
6913                         {
6914                                 /* Build the prompt */
6915 #ifdef JP
6916                                 sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
6917 #else
6918                                 sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
6919 #endif
6920
6921                                 /* Append */
6922                                 strcat(out_val, tmp_val);
6923                         }
6924
6925                         /* Indicate ability to "view" */
6926 #ifdef JP
6927                         if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6928 #else
6929                         if (!command_see && !use_menu) strcat(out_val, " * to see,");
6930 #endif
6931
6932                         if (use_menu)
6933                         {
6934                                 if (allow_inven && allow_equip)
6935                                 {
6936 #ifdef JP
6937                                         strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
6938 #else
6939                                         strcat(out_val, " 4 for Equip, 6 for Inven,");
6940 #endif
6941                                 }
6942                                 else if (allow_inven)
6943                                 {
6944 #ifdef JP
6945                                         strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6946 #else
6947                                         strcat(out_val, " 4 or 6 for Inven,");
6948 #endif
6949                                 }
6950                                 else if (allow_equip)
6951                                 {
6952 #ifdef JP
6953                                         strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6954 #else
6955                                         strcat(out_val, " 4 or 6 for Equip,");
6956 #endif
6957                                 }
6958                         }
6959                         /* Append */
6960                         else if (allow_inven)
6961                         {
6962 #ifdef JP
6963                                 strcat(out_val, " '/' »ý¤Áʪ,");
6964 #else
6965                                 strcat(out_val, " / for Inven,");
6966 #endif
6967                         }
6968                         else if (allow_equip)
6969                         {
6970 #ifdef JP
6971                                 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6972 #else
6973                                 strcat(out_val, " / for Equip,");
6974 #endif
6975                         }
6976
6977                         /* Append */
6978                         if (command_see && !use_menu)
6979                         {
6980 #ifdef JP
6981                                 strcat(out_val, " Enter ¼¡,");
6982 #else
6983                                 strcat(out_val, " Enter for scroll down,");
6984 #endif
6985                         }
6986                 }
6987
6988                 /* Append */
6989 #ifdef JP
6990                 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
6991 #else
6992                 if (select_the_force) strcat(out_val, " w for the Force,");
6993 #endif
6994
6995                 /* Finish the prompt */
6996                 strcat(out_val, " ESC");
6997
6998                 /* Build the prompt */
6999                 sprintf(tmp_val, "(%s) %s", out_val, pmt);
7000
7001                 /* Show the prompt */
7002                 prt(tmp_val, 0, 0);
7003
7004                 /* Get a key */
7005                 which = inkey();
7006
7007                 if (use_menu)
7008                 {
7009                 int max_line = 1;
7010                 if (command_wrk == USE_INVEN) max_line = max_inven;
7011                 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7012                 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7013                 switch (which)
7014                 {
7015                         case ESCAPE:
7016                         case 'z':
7017                         case 'Z':
7018                         case '0':
7019                         {
7020                                 done = TRUE;
7021                                 break;
7022                         }
7023
7024                         case '8':
7025                         case 'k':
7026                         case 'K':
7027                         {
7028                                 menu_line += (max_line - 1);
7029                                 break;
7030                         }
7031
7032                         case '2':
7033                         case 'j':
7034                         case 'J':
7035                         {
7036                                 menu_line++;
7037                                 break;
7038                         }
7039
7040                         case '4':
7041                         case 'h':
7042                         case 'H':
7043                         {
7044                                 /* Verify legality */
7045                                 if (command_wrk == (USE_INVEN))
7046                                 {
7047                                         if (allow_floor) command_wrk = USE_FLOOR;
7048                                         else if (allow_equip) command_wrk = USE_EQUIP;
7049                                         else
7050                                         {
7051                                                 bell();
7052                                                 break;
7053                                         }
7054                                 }
7055                                 else if (command_wrk == (USE_EQUIP))
7056                                 {
7057                                         if (allow_inven) command_wrk = USE_INVEN;
7058                                         else if (allow_floor) command_wrk = USE_FLOOR;
7059                                         else
7060                                         {
7061                                                 bell();
7062                                                 break;
7063                                         }
7064                                 }
7065                                 else if (command_wrk == (USE_FLOOR))
7066                                 {
7067                                         if (allow_equip) command_wrk = USE_EQUIP;
7068                                         else if (allow_inven) command_wrk = USE_INVEN;
7069                                         else
7070                                         {
7071                                                 bell();
7072                                                 break;
7073                                         }
7074                                 }
7075                                 else
7076                                 {
7077                                         bell();
7078                                         break;
7079                                 }
7080
7081                                 /* Hack -- Fix screen */
7082                                 if (command_see)
7083                                 {
7084                                         /* Load screen */
7085                                         screen_load();
7086
7087                                         /* Save screen */
7088                                         screen_save();
7089                                 }
7090
7091                                 /* Switch inven/equip */
7092                                 if (command_wrk == USE_INVEN) max_line = max_inven;
7093                                 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7094                                 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7095                                 if (menu_line > max_line) menu_line = max_line;
7096
7097                                 /* Need to redraw */
7098                                 break;
7099                         }
7100
7101                         case '6':
7102                         case 'l':
7103                         case 'L':
7104                         {
7105                                 /* Verify legality */
7106                                 if (command_wrk == (USE_INVEN))
7107                                 {
7108                                         if (allow_equip) command_wrk = USE_EQUIP;
7109                                         else if (allow_floor) command_wrk = USE_FLOOR;
7110                                         else
7111                                         {
7112                                                 bell();
7113                                                 break;
7114                                         }
7115                                 }
7116                                 else if (command_wrk == (USE_EQUIP))
7117                                 {
7118                                         if (allow_floor) command_wrk = USE_FLOOR;
7119                                         else if (allow_inven) command_wrk = USE_INVEN;
7120                                         else
7121                                         {
7122                                                 bell();
7123                                                 break;
7124                                         }
7125                                 }
7126                                 else if (command_wrk == (USE_FLOOR))
7127                                 {
7128                                         if (allow_inven) command_wrk = USE_INVEN;
7129                                         else if (allow_equip) command_wrk = USE_EQUIP;
7130                                         else
7131                                         {
7132                                                 bell();
7133                                                 break;
7134                                         }
7135                                 }
7136                                 else
7137                                 {
7138                                         bell();
7139                                         break;
7140                                 }
7141
7142                                 /* Hack -- Fix screen */
7143                                 if (command_see)
7144                                 {
7145                                         /* Load screen */
7146                                         screen_load();
7147
7148                                         /* Save screen */
7149                                         screen_save();
7150                                 }
7151
7152                                 /* Switch inven/equip */
7153                                 if (command_wrk == USE_INVEN) max_line = max_inven;
7154                                 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7155                                 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7156                                 if (menu_line > max_line) menu_line = max_line;
7157
7158                                 /* Need to redraw */
7159                                 break;
7160                         }
7161
7162                         case 'x':
7163                         case 'X':
7164                         case '\r':
7165                         case '\n':
7166                         {
7167                                 if (command_wrk == USE_FLOOR)
7168                                 {
7169                                         /* Special index */
7170                                         (*cp) = -get_item_label;
7171                                 }
7172                                 else
7173                                 {
7174                                         /* Validate the item */
7175                                         if (!get_item_okay(get_item_label))
7176                                         {
7177                                                 bell();
7178                                                 break;
7179                                         }
7180
7181                                         /* Allow player to "refuse" certain actions */
7182                                         if (!get_item_allow(get_item_label))
7183                                         {
7184                                                 done = TRUE;
7185                                                 break;
7186                                         }
7187
7188                                         /* Accept that choice */
7189                                         (*cp) = get_item_label;
7190                                 }
7191
7192                                 item = TRUE;
7193                                 done = TRUE;
7194                                 break;
7195                         }
7196                         case 'w':
7197                         {
7198                                 if (select_the_force) {
7199                                         *cp = INVEN_FORCE;
7200                                         item = TRUE;
7201                                         done = TRUE;
7202                                         break;
7203                                 }
7204                         }
7205                 }
7206                 if (menu_line > max_line) menu_line -= max_line;
7207                 }
7208                 else
7209                 {
7210                 /* Parse it */
7211                 switch (which)
7212                 {
7213                         case ESCAPE:
7214                         {
7215                                 done = TRUE;
7216                                 break;
7217                         }
7218
7219                         case '*':
7220                         case '?':
7221                         case ' ':
7222                         {
7223                                 /* Hide the list */
7224                                 if (command_see)
7225                                 {
7226                                         /* Flip flag */
7227                                         command_see = FALSE;
7228
7229                                         /* Load screen */
7230                                         screen_load();
7231                                 }
7232
7233                                 /* Show the list */
7234                                 else
7235                                 {
7236                                         /* Save screen */
7237                                         screen_save();
7238
7239                                         /* Flip flag */
7240                                         command_see = TRUE;
7241                                 }
7242                                 break;
7243                         }
7244
7245                         case '\n':
7246                         case '\r':
7247                         case '+':
7248                         {
7249                                 int i, o_idx;
7250                                 cave_type *c_ptr = &cave[py][px];
7251
7252                                 if (command_wrk != (USE_FLOOR)) break;
7253
7254                                 /* Get the object being moved. */
7255                                 o_idx = c_ptr->o_idx;
7256
7257                                 /* Only rotate a pile of two or more objects. */
7258                                 if (!(o_idx && o_list[o_idx].next_o_idx)) break;
7259
7260                                 /* Remove the first object from the list. */
7261                                 excise_object_idx(o_idx);
7262
7263                                 /* Find end of the list. */
7264                                 i = c_ptr->o_idx;
7265                                 while (o_list[i].next_o_idx)
7266                                         i = o_list[i].next_o_idx;
7267
7268                                 /* Add after the last object. */
7269                                 o_list[i].next_o_idx = o_idx;
7270
7271                                 /* Re-scan floor list */ 
7272                                 floor_num = scan_floor(floor_list, py, px, 0x03);
7273
7274                                 /* Hack -- Fix screen */
7275                                 if (command_see)
7276                                 {
7277                                         /* Load screen */
7278                                         screen_load();
7279
7280                                         /* Save screen */
7281                                         screen_save();
7282                                 }
7283
7284                                 break;
7285                         }
7286
7287                         case '/':
7288                         {
7289                                 if (command_wrk == (USE_INVEN))
7290                                 {
7291                                         if (!allow_equip)
7292                                         {
7293                                                 bell();
7294                                                 break;
7295                                         }
7296                                         command_wrk = (USE_EQUIP);
7297                                 }
7298                                 else if (command_wrk == (USE_EQUIP))
7299                                 {
7300                                         if (!allow_inven)
7301                                         {
7302                                                 bell();
7303                                                 break;
7304                                         }
7305                                         command_wrk = (USE_INVEN);
7306                                 }
7307                                 else if (command_wrk == (USE_FLOOR))
7308                                 {
7309                                         if (allow_inven)
7310                                         {
7311                                                 command_wrk = (USE_INVEN);
7312                                         }
7313                                         else if (allow_equip)
7314                                         {
7315                                                 command_wrk = (USE_EQUIP);
7316                                         }
7317                                         else
7318                                         {
7319                                                 bell();
7320                                                 break;
7321                                         }
7322                                 }
7323
7324                                 /* Hack -- Fix screen */
7325                                 if (command_see)
7326                                 {
7327                                         /* Load screen */
7328                                         screen_load();
7329
7330                                         /* Save screen */
7331                                         screen_save();
7332                                 }
7333
7334                                 /* Need to redraw */
7335                                 break;
7336                         }
7337
7338                         case '-':
7339                         {
7340                                 if (!allow_floor)
7341                                 {
7342                                         bell();
7343                                         break;
7344                                 }
7345
7346                                 /*
7347                                  * If we are already examining the floor, and there
7348                                  * is only one item, we will always select it.
7349                                  * If we aren't examining the floor and there is only
7350                                  * one item, we will select it if floor_query_flag
7351                                  * is FALSE.
7352                                  */
7353                                 if (floor_num == 1)
7354                                 {
7355                                         if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
7356                                         {
7357                                                 /* Special index */
7358                                                 k = 0 - floor_list[0];
7359
7360                                                 /* Allow player to "refuse" certain actions */
7361                                                 if (!get_item_allow(k))
7362                                                 {
7363                                                         done = TRUE;
7364                                                         break;
7365                                                 }
7366
7367                                                 /* Accept that choice */
7368                                                 (*cp) = k;
7369                                                 item = TRUE;
7370                                                 done = TRUE;
7371
7372                                                 break;
7373                                         }
7374                                 }
7375
7376                                 /* Hack -- Fix screen */
7377                                 if (command_see)
7378                                 {
7379                                         /* Load screen */
7380                                         screen_load();
7381
7382                                         /* Save screen */
7383                                         screen_save();
7384                                 }
7385
7386                                 command_wrk = (USE_FLOOR);
7387
7388                                 break;
7389                         }
7390
7391                         case '0':
7392                         case '1': case '2': case '3':
7393                         case '4': case '5': case '6':
7394                         case '7': case '8': case '9':
7395                         {
7396                                 if (command_wrk != USE_FLOOR)
7397                                 {
7398                                         /* Look up the tag */
7399                                         if (!get_tag(&k, which, command_wrk))
7400                                         {
7401                                                 bell();
7402                                                 break;
7403                                         }
7404
7405                                         /* Hack -- Validate the item */
7406                                         if ((k < INVEN_RARM) ? !inven : !equip)
7407                                         {
7408                                                 bell();
7409                                                 break;
7410                                         }
7411
7412                                         /* Validate the item */
7413                                         if (!get_item_okay(k))
7414                                         {
7415                                                 bell();
7416                                                 break;
7417                                         }
7418                                 }
7419                                 else
7420                                 {
7421                                         /* Look up the alphabetical tag */
7422                                         if (get_tag_floor(&k, which, floor_list, floor_num))
7423                                         {
7424                                                 /* Special index */
7425                                                 k = 0 - floor_list[k];
7426                                         }
7427                                         else
7428                                         {
7429                                                 bell();
7430                                                 break;
7431                                         }
7432                                 }
7433
7434                                 /* Allow player to "refuse" certain actions */
7435                                 if (!get_item_allow(k))
7436                                 {
7437                                         done = TRUE;
7438                                         break;
7439                                 }
7440
7441                                 /* Accept that choice */
7442                                 (*cp) = k;
7443                                 item = TRUE;
7444                                 done = TRUE;
7445                                 break;
7446                         }
7447
7448 #if 0
7449                         case '\n':
7450                         case '\r':
7451                         {
7452                                 /* Choose "default" inventory item */
7453                                 if (command_wrk == (USE_INVEN))
7454                                 {
7455                                         k = ((i1 == i2) ? i1 : -1);
7456                                 }
7457
7458                                 /* Choose "default" equipment item */
7459                                 else if (command_wrk == (USE_EQUIP))
7460                                 {
7461                                         k = ((e1 == e2) ? e1 : -1);
7462                                 }
7463
7464                                 /* Choose "default" floor item */
7465                                 else if (command_wrk == (USE_FLOOR))
7466                                 {
7467                                         if (floor_num == 1)
7468                                         {
7469                                                 /* Special index */
7470                                                 k = 0 - floor_list[0];
7471
7472                                                 /* Allow player to "refuse" certain actions */
7473                                                 if (!get_item_allow(k))
7474                                                 {
7475                                                         done = TRUE;
7476                                                         break;
7477                                                 }
7478
7479                                                 /* Accept that choice */
7480                                                 (*cp) = k;
7481                                                 item = TRUE;
7482                                                 done = TRUE;
7483                                         }
7484                                         break;
7485                                 }
7486
7487                                 /* Validate the item */
7488                                 if (!get_item_okay(k))
7489                                 {
7490                                         bell();
7491                                         break;
7492                                 }
7493
7494                                 /* Allow player to "refuse" certain actions */
7495                                 if (!get_item_allow(k))
7496                                 {
7497                                         done = TRUE;
7498                                         break;
7499                                 }
7500
7501                                 /* Accept that choice */
7502                                 (*cp) = k;
7503                                 item = TRUE;
7504                                 done = TRUE;
7505                                 break;
7506                         }
7507 #endif
7508
7509                         case 'w':
7510                         {
7511                                 if (select_the_force) {
7512                                         *cp = INVEN_FORCE;
7513                                         item = TRUE;
7514                                         done = TRUE;
7515                                         break;
7516                                 }
7517
7518                                 /* Fall through */
7519                         }
7520
7521                         default:
7522                         {
7523                                 int ver;
7524
7525                                 if (command_wrk != USE_FLOOR)
7526                                 {
7527                                         bool not_found = FALSE;
7528
7529                                         /* Look up the alphabetical tag */
7530                                         if (!get_tag(&k, which, command_wrk))
7531                                         {
7532                                                 not_found = TRUE;
7533                                         }
7534
7535                                         /* Hack -- Validate the item */
7536                                         else if ((k < INVEN_RARM) ? !inven : !equip)
7537                                         {
7538                                                 not_found = TRUE;
7539                                         }
7540
7541                                         /* Validate the item */
7542                                         else if (!get_item_okay(k))
7543                                         {
7544                                                 not_found = TRUE;
7545                                         }
7546
7547                                         if (!not_found)
7548                                         {
7549                                                 /* Accept that choice */
7550                                                 (*cp) = k;
7551                                                 item = TRUE;
7552                                                 done = TRUE;
7553                                                 break;
7554                                         }
7555                                 }
7556                                 else
7557                                 {
7558                                         /* Look up the alphabetical tag */
7559                                         if (get_tag_floor(&k, which, floor_list, floor_num))
7560                                         {
7561                                                 /* Special index */
7562                                                 k = 0 - floor_list[k];
7563
7564                                                 /* Accept that choice */
7565                                                 (*cp) = k;
7566                                                 item = TRUE;
7567                                                 done = TRUE;
7568                                                 break;
7569                                         }
7570                                 }
7571
7572                                 /* Extract "query" setting */
7573                                 ver = isupper(which);
7574                                 which = tolower(which);
7575
7576                                 /* Convert letter to inventory index */
7577                                 if (command_wrk == (USE_INVEN))
7578                                 {
7579                                         if (which == '(') k = i1;
7580                                         else if (which == ')') k = i2;
7581                                         else k = label_to_inven(which);
7582                                 }
7583
7584                                 /* Convert letter to equipment index */
7585                                 else if (command_wrk == (USE_EQUIP))
7586                                 {
7587                                         if (which == '(') k = e1;
7588                                         else if (which == ')') k = e2;
7589                                         else k = label_to_equip(which);
7590                                 }
7591
7592                                 /* Convert letter to floor index */
7593                                 else if (command_wrk == USE_FLOOR)
7594                                 {
7595                                         if (which == '(') k = 0;
7596                                         else if (which == ')') k = floor_num - 1;
7597                                         else k = islower(which) ? A2I(which) : -1;
7598                                         if (k < 0 || k >= floor_num || k >= 23)
7599                                         {
7600                                                 bell();
7601                                                 break;
7602                                         }
7603
7604                                         /* Special index */
7605                                         k = 0 - floor_list[k];
7606                                 }
7607
7608                                 /* Validate the item */
7609                                 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
7610                                 {
7611                                         bell();
7612                                         break;
7613                                 }
7614
7615                                 /* Verify the item */
7616 #ifdef JP
7617 if (ver && !verify("ËÜÅö¤Ë", k))
7618 #else
7619                                 if (ver && !verify("Try", k))
7620 #endif
7621
7622                                 {
7623                                         done = TRUE;
7624                                         break;
7625                                 }
7626
7627                                 /* Allow player to "refuse" certain actions */
7628                                 if (!get_item_allow(k))
7629                                 {
7630                                         done = TRUE;
7631                                         break;
7632                                 }
7633
7634                                 /* Accept that choice */
7635                                 (*cp) = k;
7636                                 item = TRUE;
7637                                 done = TRUE;
7638                                 break;
7639                         }
7640                 }
7641                 }
7642         }
7643
7644         /* Fix the screen if necessary */
7645         if (command_see)
7646         {
7647                 /* Load screen */
7648                 screen_load();
7649
7650                 /* Hack -- Cancel "display" */
7651                 command_see = FALSE;
7652         }
7653
7654
7655         /* Forget the item_tester_tval restriction */
7656         item_tester_tval = 0;
7657
7658         /* Forget the item_tester_hook restriction */
7659         item_tester_hook = NULL;
7660
7661
7662         /* Clean up  'show choices' */
7663         /* Toggle again if needed */
7664         if (toggle) toggle_inven_equip();
7665
7666         /* Update */
7667         p_ptr->window |= (PW_INVEN | PW_EQUIP);
7668
7669         /* Window stuff */
7670         window_stuff();
7671
7672
7673         /* Clear the prompt line */
7674         prt("", 0, 0);
7675
7676         /* Warning if needed */
7677         if (oops && str) msg_print(str);
7678
7679         if (item)
7680         {
7681 #ifdef ALLOW_REPEAT
7682                 repeat_push(*cp);
7683 #endif /* ALLOW_REPEAT */
7684
7685                 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
7686         }
7687
7688         /* Result */
7689         return (item);
7690 }
7691
7692
7693 static bool py_pickup_floor_aux(void)
7694 {
7695         s16b this_o_idx;
7696
7697         cptr q, s;
7698
7699         int item;
7700
7701         /* Restrict the choices */
7702         item_tester_hook = inven_carry_okay;
7703
7704         /* Get an object */
7705 #ifdef JP
7706         q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
7707         s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
7708 #else
7709         q = "Get which item? ";
7710         s = "You no longer have any room for the objects on the floor.";
7711 #endif
7712
7713         if (get_item(&item, q, s, (USE_FLOOR)))
7714         {
7715                 this_o_idx = 0 - item;
7716         }
7717         else
7718         {
7719                 return (FALSE);
7720         }
7721
7722         /* Pick up the object */
7723         py_pickup_aux(this_o_idx);
7724
7725         return (TRUE);
7726 }
7727
7728
7729 /*
7730  * Make the player carry everything in a grid
7731  *
7732  * If "pickup" is FALSE then only gold will be picked up
7733  *
7734  * This is called by py_pickup() when easy_floor is TRUE.
7735  */
7736 void py_pickup_floor(bool pickup)
7737 {
7738         s16b this_o_idx, next_o_idx = 0;
7739
7740         char o_name[MAX_NLEN];
7741         object_type *o_ptr;
7742
7743         int floor_num = 0, floor_list[23], floor_o_idx = 0;
7744
7745         int can_pickup = 0;
7746
7747         /* Scan the pile of objects */
7748         for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
7749         {
7750                 object_type *o_ptr;
7751
7752                 /* Access the object */
7753                 o_ptr = &o_list[this_o_idx];
7754
7755                 /* Describe the object */
7756                 object_desc(o_name, o_ptr, 0);
7757
7758                 /* Access the next object */
7759                 next_o_idx = o_ptr->next_o_idx;
7760
7761                 /* Hack -- disturb */
7762                 disturb(0, 0);
7763
7764                 /* Pick up gold */
7765                 if (o_ptr->tval == TV_GOLD)
7766                 {
7767                         /* Message */
7768 #ifdef JP
7769                 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
7770                            (long)o_ptr->pval, o_name);
7771 #else
7772                         msg_format("You have found %ld gold pieces worth of %s.",
7773                                 (long) o_ptr->pval, o_name);
7774 #endif
7775
7776
7777                         /* Collect the gold */
7778                         p_ptr->au += o_ptr->pval;
7779
7780                         /* Redraw gold */
7781                         p_ptr->redraw |= (PR_GOLD);
7782
7783                         /* Window stuff */
7784                         p_ptr->window |= (PW_PLAYER);
7785
7786                         /* Delete the gold */
7787                         delete_object_idx(this_o_idx);
7788
7789                         /* Check the next object */
7790                         continue;
7791                 }
7792                 else if (o_ptr->marked & OM_NOMSG)
7793                 {
7794                         /* If 0 or 1 non-NOMSG items are in the pile, the NOMSG ones are
7795                          * ignored. Otherwise, they are included in the prompt. */
7796                         o_ptr->marked &= ~(OM_NOMSG);
7797                         continue;
7798                 }
7799
7800                 /* Count non-gold objects that can be picked up. */
7801                 if (inven_carry_okay(o_ptr))
7802                 {
7803                         can_pickup++;
7804                 }
7805
7806                 /* Remember this object index */
7807                 if (floor_num < 23)
7808                         floor_list[floor_num] = this_o_idx;
7809
7810                 /* Count non-gold objects */
7811                 floor_num++;
7812
7813                 /* Remember this index */
7814                 floor_o_idx = this_o_idx;
7815         }
7816
7817         /* There are no non-gold objects */
7818         if (!floor_num)
7819                 return;
7820
7821         /* Mention the number of objects */
7822         if (!pickup)
7823         {
7824                 /* One object */
7825                 if (floor_num == 1)
7826                 {
7827                         /* Access the object */
7828                         o_ptr = &o_list[floor_o_idx];
7829
7830 #ifdef ALLOW_EASY_SENSE
7831
7832                         /* Option: Make object sensing easy */
7833                         if (easy_sense)
7834                         {
7835                                 /* Sense the object */
7836                                 (void) sense_object(o_ptr);
7837                         }
7838
7839 #endif /* ALLOW_EASY_SENSE */
7840
7841                         /* Describe the object */
7842                         object_desc(o_name, o_ptr, 0);
7843
7844                         /* Message */
7845 #ifdef JP
7846                                 msg_format("%s¤¬¤¢¤ë¡£", o_name);
7847 #else
7848                         msg_format("You see %s.", o_name);
7849 #endif
7850
7851                 }
7852
7853                 /* Multiple objects */
7854                 else
7855                 {
7856                         /* Message */
7857 #ifdef JP
7858                         msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
7859 #else
7860                         msg_format("You see a pile of %d items.", floor_num);
7861 #endif
7862
7863                 }
7864
7865                 /* Done */
7866                 return;
7867         }
7868
7869         /* The player has no room for anything on the floor. */
7870         if (!can_pickup)
7871         {
7872                 /* One object */
7873                 if (floor_num == 1)
7874                 {
7875                         /* Access the object */
7876                         o_ptr = &o_list[floor_o_idx];
7877
7878 #ifdef ALLOW_EASY_SENSE
7879
7880                         /* Option: Make object sensing easy */
7881                         if (easy_sense)
7882                         {
7883                                 /* Sense the object */
7884                                 (void) sense_object(o_ptr);
7885                         }
7886
7887 #endif /* ALLOW_EASY_SENSE */
7888
7889                         /* Describe the object */
7890                         object_desc(o_name, o_ptr, 0);
7891
7892                         /* Message */
7893 #ifdef JP
7894                                 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7895 #else
7896                         msg_format("You have no room for %s.", o_name);
7897 #endif
7898
7899                 }
7900
7901                 /* Multiple objects */
7902                 else
7903                 {
7904                         /* Message */
7905 #ifdef JP
7906                         msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7907 #else
7908                         msg_print("You have no room for any of the objects on the floor.");
7909 #endif
7910
7911                 }
7912
7913                 /* Done */
7914                 return;
7915         }
7916
7917         /* One object */
7918         if (floor_num == 1)
7919         {
7920                 /* Hack -- query every object */
7921                 if (carry_query_flag)
7922                 {
7923                         char out_val[MAX_NLEN+20];
7924
7925                         /* Access the object */
7926                         o_ptr = &o_list[floor_o_idx];
7927
7928 #ifdef ALLOW_EASY_SENSE
7929
7930                         /* Option: Make object sensing easy */
7931                         if (easy_sense)
7932                         {
7933                                 /* Sense the object */
7934                                 (void) sense_object(o_ptr);
7935                         }
7936
7937 #endif /* ALLOW_EASY_SENSE */
7938
7939                         /* Describe the object */
7940                         object_desc(o_name, o_ptr, 0);
7941
7942                         /* Build a prompt */
7943 #ifdef JP
7944                         (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7945 #else
7946                         (void) sprintf(out_val, "Pick up %s? ", o_name);
7947 #endif
7948
7949
7950                         /* Ask the user to confirm */
7951                         if (!get_check(out_val))
7952                         {
7953                                 /* Done */
7954                                 return;
7955                         }
7956                 }
7957
7958                 /* Access the object */
7959                 o_ptr = &o_list[floor_o_idx];
7960
7961 #ifdef ALLOW_EASY_SENSE
7962
7963                 /* Option: Make object sensing easy */
7964                 if (easy_sense)
7965                 {
7966                         /* Sense the object */
7967                         (void) sense_object(o_ptr);
7968                 }
7969
7970 #endif /* ALLOW_EASY_SENSE */
7971
7972                 /* Pick up the object */
7973                 py_pickup_aux(floor_o_idx);
7974         }
7975
7976         /* Allow the user to choose an object */
7977         else
7978         {
7979                 while (can_pickup--)
7980                 {
7981                         if (!py_pickup_floor_aux()) break;
7982                 }
7983         }
7984 }
7985
7986 #endif /* ALLOW_EASY_FLOOR */