OSDN Git Service

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