OSDN Git Service

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