OSDN Git Service

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