OSDN Git Service

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