3 /* Purpose: Object code, part 1 */
6 * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke
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.
21 * Reset the "visual" lists
23 * This involves resetting various things to their "default" state.
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.
29 * The features, objects, and monsters, should all be encoded in the
30 * relevant "font.pref" and/or "graf.prf" files. XXX XXX XXX
32 * The "prefs" parameter is no longer meaningful. XXX XXX XXX
34 void reset_visuals(void)
38 /* Extract some info about terrain features */
39 for (i = 0; i < max_f_idx; i++)
41 feature_type *f_ptr = &f_info[i];
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;
48 /* Extract default attr/char code for objects */
49 for (i = 0; i < max_k_idx; i++)
51 object_kind *k_ptr = &k_info[i];
53 /* Default attr/char */
54 k_ptr->x_attr = k_ptr->d_attr;
55 k_ptr->x_char = k_ptr->d_char;
58 /* Extract default attr/char code for monsters */
59 for (i = 0; i < max_r_idx; i++)
61 monster_race *r_ptr = &r_info[i];
63 /* Default attr/char */
64 r_ptr->x_attr = r_ptr->d_attr;
65 r_ptr->x_char = r_ptr->d_char;
72 /* Process "graf.prf" */
73 process_pref_file("graf.prf");
75 /* Access the "character" pref file */
76 sprintf(buf, "graf-%s.prf", player_base);
78 /* Process "graf-<playername>.prf" */
79 process_pref_file(buf);
87 /* Process "font.prf" */
88 process_pref_file("font.prf");
90 /* Access the "character" pref file */
91 sprintf(buf, "font-%s.prf", player_base);
93 /* Process "font-<playername>.prf" */
94 process_pref_file(buf);
100 * Obtain the "flags" for an item
102 void object_flags(object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3)
104 object_kind *k_ptr = &k_info[o_ptr->k_idx];
107 (*f1) = k_ptr->flags1;
108 (*f2) = k_ptr->flags2;
109 (*f3) = k_ptr->flags3;
114 artifact_type *a_ptr = &a_info[o_ptr->name1];
116 (*f1) = a_ptr->flags1;
117 (*f2) = a_ptr->flags2;
118 (*f3) = a_ptr->flags3;
124 ego_item_type *e_ptr = &e_info[o_ptr->name2];
126 (*f1) |= e_ptr->flags1;
127 (*f2) |= e_ptr->flags2;
128 (*f3) |= e_ptr->flags3;
130 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
132 (*f3) &= ~(TR3_SH_FIRE);
134 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
136 (*f1) &= ~(TR1_INFRA);
138 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
140 (*f2) &= ~(TR2_RES_BLIND);
141 (*f3) &= ~(TR3_SEE_INVIS);
145 /* Random artifact ! */
146 if (o_ptr->art_flags1 || o_ptr->art_flags2 || o_ptr->art_flags3)
148 (*f1) |= o_ptr->art_flags1;
149 (*f2) |= o_ptr->art_flags2;
150 (*f3) |= o_ptr->art_flags3;
153 if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
155 if (o_ptr->xtra3 < 33)
157 (*f1) |= (0x00000001 << (o_ptr->xtra3-1));
159 else if (o_ptr->xtra3 < 65)
161 (*f2) |= (0x00000001 << (o_ptr->xtra3-33));
163 else if (o_ptr->xtra3 < 97)
165 (*f3) |= (0x00000001 << (o_ptr->xtra3-65));
167 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ACID)
169 (*f2) |= TR2_RES_ACID;
171 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ELEC)
173 (*f2) |= TR2_RES_ELEC;
175 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_FIRE)
177 (*f2) |= TR2_RES_FIRE;
179 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_COLD)
181 (*f2) |= TR2_RES_COLD;
183 else if (o_ptr->xtra3 == ESSENCE_SH_FIRE)
185 (*f2) |= TR2_RES_FIRE;
186 (*f3) |= TR3_SH_FIRE;
188 else if (o_ptr->xtra3 == ESSENCE_SH_ELEC)
190 (*f2) |= TR2_RES_ELEC;
191 (*f3) |= TR3_SH_ELEC;
193 else if (o_ptr->xtra3 == ESSENCE_SH_COLD)
195 (*f2) |= TR2_RES_COLD;
196 (*f3) |= TR3_SH_COLD;
198 else if (o_ptr->xtra3 == ESSENCE_RESISTANCE)
200 (*f2) |= (TR2_RES_ACID | TR2_RES_ELEC | TR2_RES_FIRE | TR2_RES_COLD);;
208 * Obtain the "flags" for an item which are known to the player
210 void object_flags_known(object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3)
214 object_kind *k_ptr = &k_info[o_ptr->k_idx];
217 (*f1) = (*f2) = (*f3) = 0L;
219 if (!object_aware_p(o_ptr)) return;
222 (*f1) = k_ptr->flags1;
223 (*f2) = k_ptr->flags2;
224 (*f3) = k_ptr->flags3;
226 /* Must be identified */
227 if (!object_known_p(o_ptr)) return;
229 /* Ego-item (known basic flags) */
232 ego_item_type *e_ptr = &e_info[o_ptr->name2];
234 (*f1) |= e_ptr->flags1;
235 (*f2) |= e_ptr->flags2;
236 (*f3) |= e_ptr->flags3;
238 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
240 (*f3) &= ~(TR3_SH_FIRE);
242 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
244 (*f1) &= ~(TR1_INFRA);
246 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
248 (*f2) &= ~(TR2_RES_BLIND);
249 (*f3) &= ~(TR3_SEE_INVIS);
254 #ifdef SPOIL_ARTIFACTS
255 /* Full knowledge for some artifacts */
256 if (artifact_p(o_ptr) || o_ptr->art_name) spoil = TRUE;
257 #endif /* SPOIL_ARTIFACTS */
259 #ifdef SPOIL_EGO_ITEMS
260 /* Full knowledge for some ego-items */
261 if (ego_item_p(o_ptr)) spoil = TRUE;
262 #endif /* SPOIL_EGO_ITEMS */
264 /* Need full knowledge or spoilers */
265 if (spoil || (o_ptr->ident & IDENT_MENTAL))
270 artifact_type *a_ptr = &a_info[o_ptr->name1];
272 (*f1) = a_ptr->flags1;
273 (*f2) = a_ptr->flags2;
274 (*f3) = a_ptr->flags3;
277 /* Random artifact ! */
278 if (o_ptr->art_flags1 || o_ptr->art_flags2 || o_ptr->art_flags3)
280 (*f1) |= o_ptr->art_flags1;
281 (*f2) |= o_ptr->art_flags2;
282 (*f3) |= o_ptr->art_flags3;
286 if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
288 if (o_ptr->xtra3 < 33)
290 (*f1) |= (0x00000001 << (o_ptr->xtra3-1));
292 else if (o_ptr->xtra3 < 65)
294 (*f2) |= (0x00000001 << (o_ptr->xtra3-33));
296 else if (o_ptr->xtra3 < 97)
298 (*f3) |= (0x00000001 << (o_ptr->xtra3-65));
300 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ACID)
302 (*f2) |= TR2_RES_ACID;
304 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ELEC)
306 (*f2) |= TR2_RES_ELEC;
308 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_FIRE)
310 (*f2) |= TR2_RES_FIRE;
312 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_COLD)
314 (*f2) |= TR2_RES_COLD;
316 else if (o_ptr->xtra3 == ESSENCE_SH_FIRE)
318 (*f2) |= TR2_RES_FIRE;
319 (*f3) |= TR3_SH_FIRE;
321 else if (o_ptr->xtra3 == ESSENCE_SH_ELEC)
323 (*f2) |= TR2_RES_ELEC;
324 (*f3) |= TR3_SH_ELEC;
326 else if (o_ptr->xtra3 == ESSENCE_SH_COLD)
328 (*f2) |= TR2_RES_COLD;
329 (*f3) |= TR3_SH_COLD;
331 else if (o_ptr->xtra3 == ESSENCE_RESISTANCE)
333 (*f2) |= (TR2_RES_ACID | TR2_RES_ELEC | TR2_RES_FIRE | TR2_RES_COLD);;
340 * Hack -- describe an item currently in a store's inventory
341 * This allows an item to *look* like the player is "aware" of it
343 void object_desc_store(char *buf, object_type *o_ptr, int pref, int mode)
345 /* Save the "aware" flag */
346 bool hack_aware = object_aware_p(o_ptr);
348 /* Save the "known" flag */
349 bool hack_known = (o_ptr->ident & (IDENT_KNOWN)) ? TRUE : FALSE;
352 /* Set the "known" flag */
353 o_ptr->ident |= (IDENT_KNOWN);
355 /* Force "aware" for description */
356 k_info[o_ptr->k_idx].aware = TRUE;
359 /* Describe the object */
360 object_desc(buf, o_ptr, pref, mode);
363 /* Restore "aware" flag */
364 k_info[o_ptr->k_idx].aware = hack_aware;
366 /* Clear the known flag */
367 if (!hack_known) o_ptr->ident &= ~(IDENT_KNOWN);
374 * Determine the "Activation" (if any) for an artifact
375 * Return a string, or NULL for "no activation"
377 cptr item_activation(object_type *o_ptr)
381 /* Extract the flags */
382 object_flags(o_ptr, &f1, &f2, &f3);
384 /* Require activation ability */
386 if (!(f3 & (TR3_ACTIVATE))) return ("¤Ê¤·");
388 if (!(f3 & (TR3_ACTIVATE))) return ("nothing");
394 * We need to deduce somehow that it is a random artifact -- one
395 * problem: It could be a random artifact which has NOT YET received
396 * a name. Thus we eliminate other possibilities instead of checking
400 if (!(o_ptr->name1) &&
405 switch (o_ptr->xtra2)
410 return "ÂÀÍÛ¸÷Àþ : 10 ¥¿¡¼¥óËè";
412 return "beam of sunlight every 10 turns";
419 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
421 return "magic missile (2d6) every 2 turns";
428 return "°½±À (12), Ⱦ·Â 3 , 4+d4 ¥¿¡¼¥óËè";
430 return "stinking cloud (12), rad. 3, every 4+d4 turns";
437 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
439 return "lightning bolt (4d8) every 5+d5 turns";
446 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
448 return "acid bolt (5d8) every 6+d6 turns";
455 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
457 return "frost bolt (6d8) every 7+d7 turns";
464 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
466 return "fire bolt (9d8) every 8+d8 turns";
473 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (48) : 400 ¥¿¡¼¥óËè";
475 return "ball of cold (48) every 400 turns";
482 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (72) : 400 ¥¿¡¼¥óËè";
484 return "ball of fire (72) every 400 turns";
491 return "¥Ò¥Ã¥È¥Ý¥¤¥ó¥ÈµÛ¼ý (100) : 100+d100 ¥¿¡¼¥óËè";
493 return "drain life (100) every 100+d100 turns";
500 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 300 ¥¿¡¼¥óËè";
502 return "ball of cold (100) every 300 turns";
509 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 500 ¥¿¡¼¥óËè";
511 return "ball of lightning (100) every 500 turns";
518 return "¥Ò¥Ã¥È¥Ý¥¤¥ó¥ÈµÛ¼ý(120) : 400 ¥¿¡¼¥óËè";
520 return "drain life (120) every 400 turns";
527 return "µÛ·ì¥É¥ì¥¤¥ó (3*50) : 400 ¥¿¡¼¥óËè";
529 return "vampiric drain (3*50) every 400 turns";
536 return "Ìð (150) : 90+d90 ¥¿¡¼¥óËè";
538 return "arrows (150) every 90+d90 turns";
545 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (120) : 225+d225 ¥¿¡¼¥óËè";
547 return "fire ball (120) every 225+d225 turns";
554 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (200) : 325+d325 ¥¿¡¼¥óËè";
556 return "ball of cold (200) every 325+d325 turns";
563 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (250) : 425+d425 ¥¿¡¼¥óËè";
565 return "ball of lightning (250) every 425+d425 turns";
572 return "¥«¥Þ¥¤¥¿¥Á : 250 ¥¿¡¼¥óËè";
574 return "whirlwind attack every 250 turns";
581 return "µÛ·ì¥É¥ì¥¤¥ó (3*100) : 400 ¥¿¡¼¥óËè";
583 return "vampiric drain (3*100) every 400 turns";
590 return "call chaos : 350 ¥¿¡¼¥óËè"; /*nuke me*/
592 return "call chaos every 350 turns";
599 return "¥í¥±¥Ã¥È (120+level) : 400 ¥¿¡¼¥óËè";
601 return "launch rocket (120+level) every 400 turns";
608 return "¼Ù°Â໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
610 return "dispel evil (level*5) every 300+d300 turns";
617 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300) : 500 ¥¿¡¼¥óËè";
619 return "elemental breath (300) every 500 turns";
626 return "Á±ÎÉÂ໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
628 return "dispel good (level*5) every 300+d300 turns";
635 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
637 return "confuse monster every 15 turns";
644 return "¼þ°Ï¤Î¥â¥ó¥¹¥¿¡¼¤ò̲¤é¤»¤ë : 55 ¥¿¡¼¥óËè";
646 return "sleep nearby monsters every 55 turns";
653 return "ÃÏ¿Ì (Ⱦ·Â 10) : 50 ¥¿¡¼¥óËè";
655 return "earthquake (rad 10) every 50 turns";
662 return "¶²¹² : 3 * (level+10) ¥¿¡¼¥óËè";
664 return "terror every 3 * (level+10) turns";
671 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
673 return "teleport away every 200 turns";
677 case ACT_BANISH_EVIL:
680 return "¼Ù°¾ÃÌÇ : 250+d250 ¥¿¡¼¥óËè";
682 return "banish evil every 250+d250 turns";
689 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
691 return "genocide every 500 turns";
698 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
700 return "mass genocide every 1000 turns";
704 case ACT_CHARM_ANIMAL:
707 return "ưʪ̥λ : 300 ¥¿¡¼¥óËè";
709 return "charm animal every 300 turns";
713 case ACT_CHARM_UNDEAD:
716 return "ÉԻཾ° : 333 ¥¿¡¼¥óËè";
718 return "enslave undead every 333 turns";
722 case ACT_CHARM_OTHER:
725 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 400 ¥¿¡¼¥óËè";
727 return "charm monster every 400 turns";
731 case ACT_CHARM_ANIMALS:
734 return "ưʪͧÏ : 500 ¥¿¡¼¥óËè";
736 return "animal friendship every 500 turns";
740 case ACT_CHARM_OTHERS:
743 return "¼þÊÕ̥λ : 750 ¥¿¡¼¥óËè";
745 return "mass charm every 750 turns";
749 case ACT_SUMMON_ANIMAL:
752 return "ưʪ¾¤´ : 200+d300 ¥¿¡¼¥óËè";
754 return "summon animal every 200+d300 turns";
758 case ACT_SUMMON_PHANTOM:
761 return "»È¤¤Î´ : 200+d200 ¥¿¡¼¥óËè";
763 return "summon phantasmal servant every 200+d200 turns";
767 case ACT_SUMMON_ELEMENTAL:
770 return "¥¨¥ì¥á¥ó¥¿¥ë¾¤´ : 750 ¥¿¡¼¥óËè";
772 return "summon elemental every 750 turns";
776 case ACT_SUMMON_DEMON:
779 return "°Ë⾤´ : 666+d333 ¥¿¡¼¥óËè";
781 return "summon demon every 666+d333 turns";
785 case ACT_SUMMON_UNDEAD:
788 return "ÉԻྤ´ : 666+d333 ¥¿¡¼¥óËè";
790 return "summon undead every 666+d333 turns";
797 return "ͦµ¤²óÉü & 30 hp ²óÉü : 10 ¥¿¡¼¥óËè";
799 return "remove fear & heal 30 hp every 10 turns";
806 return "4d8 hp & ½ý²óÉü : 3+d3 ¥¿¡¼¥óËè";
808 return "heal 4d8 & wounds every 3+d3 turns";
812 case ACT_CURE_POISON:
815 return "ͦµ¤²óÉü/ÆǾä· : 5 ¥¿¡¼¥óËè";
817 return "remove fear and cure poison every 5 turns";
824 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
826 return "restore life levels every 450 turns";
833 return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃͲóÉü : 750 ¥¿¡¼¥óËè";
835 return "restore stats and life levels every 750 turns";
842 return "700 hp ²óÉü : 250 ¥¿¡¼¥óËè";
844 return "heal 700 hit points every 250 turns";
851 return "1000 hp ²óÉü : 888 ¥¿¡¼¥óËè";
853 return "heal 1000 hit points every 888 turns";
860 return "°ì»þŪ¤Ê ESP (´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
862 return "temporary ESP (dur 25+d30) every 200 turns";
869 return "»Îµ¤¹âÍȤȽËÊ¡ (´ü´Ö 50+d50) : 100+d100 ¥¿¡¼¥óËè";
871 return "heroism and blessed (dur 50+d50) every 100+d100 turns";
878 return "Âмٰ·ë³¦ (´ü´Ö level*3 + d25) : 225+d225 ¥¿¡¼¥óËè";
880 return "protect evil (dur level*3 + d25) every 225+d225 turns";
887 return "±êÎä»ÀÅÅÆǤؤÎÂÑÀ (´ü´Ö 40+d40) : 200 ¥¿¡¼¥óËè";
889 return "resist elements (dur 40+d40) every 200 turns";
896 return "²Ã® (´ü´Ö 20+d20) : 250 ¥¿¡¼¥óËè";
898 return "speed (dur 20+d20) every 250 turns";
905 return "²Ã® (´ü´Ö 75+d75) : 200+d200 ¥¿¡¼¥óËè";
907 return "speed (dur 75+d75) every 200+d200 turns";
914 return "¥ì¥¤¥¹²½ (level/2 + d(level/2)) : 1000 ¥¿¡¼¥óËè";
916 return "wraith form (level/2 + d(level/2)) every 1000 turns";
923 return "̵Ũ (´ü´Ö 8+d8) : 1000 ¥¿¡¼¥óËè";
925 return "invulnerability (dur 8+d8) every 1000 turns";
932 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) : 10+d10 ¥¿¡¼¥óËè";
934 return "light area (dam 2d15) every 10+d10 turns";
941 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) & ¼þÊÕ¥Þ¥Ã¥× : 50+d50 ¥¿¡¼¥óËè";
943 return "light (dam 2d15) & map area every 50+d50 turns";
950 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
952 return "detection every 55+d55 turns";
956 case ACT_DETECT_XTRA:
959 return "Á´´¶ÃΡ¢Ãµº÷¡¢*´ÕÄê* : 1000 ¥¿¡¼¥óËè";
961 return "detection, probing and identify true every 1000 turns";
968 return "*´ÕÄê* : 750 ¥¿¡¼¥óËè";
970 return "identify true every 750 turns";
977 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
979 return "identify spell every 10 turns";
986 return "Çúȯ¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
988 return "explosive rune every 200 turns";
995 return "¼é¤ê¤Î¥ë¡¼¥ó : 400 ¥¿¡¼¥óËè";
997 return "rune of protection every 400 turns";
1004 return "¶õÊ¢½¼Â : 200 ¥¿¡¼¥óËè";
1006 return "satisfy hunger every 200 turns";
1013 return "¥É¥¢Ç˲õ : 10 ¥¿¡¼¥óËè";
1015 return "destroy doors every 10 turns";
1022 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
1024 return "stone to mud every 5 turns";
1031 return "ºÆ½¼Å¶ : 70 ¥¿¡¼¥óËè";
1033 return "recharging every 70 turns";
1040 return "Ï£¶â½Ñ : 500 ¥¿¡¼¥óËè";
1042 return "alchemy every 500 turns";
1049 return "¼¡¸µ¤ÎÈâ : 100 ¥¿¡¼¥óËè";
1051 return "dimension door every 100 turns";
1058 return "¥Æ¥ì¥Ý¡¼¥È (range 100) : 45 ¥¿¡¼¥óËè";
1060 return "teleport (range 100) every 45 turns";
1067 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1069 return "word of recall every 200 turns";
1078 return "something undefined";
1085 /* Some artifacts can be activated */
1086 switch (o_ptr->name1)
1091 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1093 return "fire bolt (9d8) every 8+d8 turns";
1100 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1102 return "frost bolt (6d8) every 7+d7 turns";
1109 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1111 return "lightning bolt (4d8) every 6+d6 turns";
1118 return "°½±À(12) : 4+d4 ¥¿¡¼¥óËè";
1120 return "stinking cloud (12) every 4+d4 turns";
1127 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(48) : 5+d5 ¥¿¡¼¥óËè";
1129 return "frost ball (48) every 5+d5 turns";
1136 return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
1138 return "remove fear and cure poison every 5 turns";
1145 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(100) : 200 ¥¿¡¼¥óËè";
1147 return "frost ball (100) every 200 turns";
1154 return "¶Ç¤Î»ÕÃľ¤´ : 500+d500 ¥¿¡¼¥óËè";
1156 return "summon the Legion of the Dawn every 500+d500 turns";
1163 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 400 ¥¿¡¼¥óËè";
1165 return "fire ball (72) every 400 turns";
1172 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 100 ¥¿¡¼¥óËè";
1174 return "large fire ball (72) every 100 turns";
1181 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(120) : 15 ¥¿¡¼¥óËè";
1183 return "large fire ball (120) every 15 turns";
1190 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 200 ¥¿¡¼¥óËè";
1192 return "haste self (20+d20 turns) every 200 turns";
1199 return "À¸Ì¿Îϵۼý(120) : 400 ¥¿¡¼¥óËè";
1201 return "drain life (120) every 400 turns";
1208 return "À¸Ì¿Îϵۼý(90) : 70 ¥¿¡¼¥óËè";
1210 return "drain life (90) every 70 turns";
1217 return "¥É¥¢/¥È¥é¥Ã¥×Ê´ºÕ : 10 ¥¿¡¼¥óËè";
1219 return "door and trap destruction every 10 turns";
1227 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1229 return "word of recall every 200 turns";
1236 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1238 return "haste self (20+d20 turns) every 100+d100 turns";
1245 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
1247 return "identify every 10 turns";
1254 return "õº÷¡¢Á´´¶ÃΡ¢Á´´ÕÄê : 1000 ¥¿¡¼¥óËè";
1256 return "probing, detection and full id every 1000 turns";
1263 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
1265 return "mass genocide every 1000 turns";
1272 return "½ý¤Î¼£Ìþ(4d7) : 3+d3 ¥¿¡¼¥óËè";
1274 return "cure wounds (4d7) every 3+d3 turns";
1281 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
1283 return "fire branding of bolts every 999 turns";
1290 return "¥Õ¥¡¥¤¥¢¡ª : 15 ¥¿¡¼¥óËè";
1292 return "fire! every 15 turns";
1297 case ART_WEREWINDLE:
1300 return "ƨÁö : 35 ¥¿¡¼¥óËè";
1302 return "a getaway every 35 turns";
1309 return "¥Æ¥ì¥Ý¡¼¥È : 25 ¥¿¡¼¥óËè";
1311 return "a teleport every 25 turns";
1318 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1320 return "lightning ball (100) every 200 turns";
1327 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1329 return "Frost ball (100) every 200 turns";
1336 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
1338 return "stone to mud every 5 turns";
1345 return "´äÀÐÍϲò : 2 ¥¿¡¼¥óËè";
1347 return "stone to mud every 2 turns";
1351 case ART_SOULKEEPER:
1354 return "ÂÎÎϲóÉü(1000) : 888 ¥¿¡¼¥óËè";
1356 return "heal (1000) every 888 turns";
1363 return ("²óÉü (777)¡¢Ìþ¤·¡¢»Îµ¤¹âÍÈ : 300 ¥¿¡¼¥óËè");
1365 return ("heal (777), curing and heroism every 300 turns");
1372 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
1374 return "genocide every 500 turns";
1381 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
1383 return "restore life levels every 450 turns";
1390 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
1392 return "teleport away every 150 turns";
1400 return "Á´ÂÑÀ(20+d20¥¿¡¼¥ó) : 111 ¥¿¡¼¥óËè";
1402 return "resistance (20+d20 turns) every 111 turns";
1406 case ART_HOLCOLLETH:
1409 return "¥¹¥ê¡¼¥×(II) : 55 ¥¿¡¼¥óËè";
1411 return "Sleep II every 55 turns";
1418 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
1420 return "recharge item I every 70 turns";
1427 return "¥Æ¥ì¥Ý¡¼¥È : 45 ¥¿¡¼¥óËè";
1429 return "teleport every 45 turns";
1436 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
1438 return "confuse monster every 15 turns";
1442 case ART_CAMMITHRIM:
1445 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1447 return "magic missile (2d6) every 2 turns";
1454 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1456 return "fire bolt (9d8) every 8+d8 turns";
1460 case ART_PAURNIMMEN:
1463 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1465 return "frost bolt (6d8) every 7+d7 turns";
1472 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1474 return "lightning bolt (4d8) every 5+d5 turns";
1481 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
1483 return "acid bolt (5d8) every 6+d6 turns";
1490 return "ËâË¡¤ÎÌð(150) : 90+d90 ¥¿¡¼¥óËè";
1492 return "a magical arrow (150) every 90+d90 turns";
1496 case ART_HOLHENNETH:
1499 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
1501 return "detection every 55+d55 turns";
1508 return "ÂÎÎϲóÉü(500) : 500 ¥¿¡¼¥óËè";
1510 return "heal (700) every 250 turns";
1517 return "¥¹¥¿¡¼¡¦¥Ü¡¼¥ë(150) : 1000 ¥¿¡¼¥óËè";
1519 return "star ball (150) every 1000 turns";
1523 case ART_BLADETURNER:
1526 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300), »Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢ÂÑÀ";
1528 return "breathe elements (300), hero, bless, and resistance";
1535 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1537 return "illumination every 10+d10 turns";
1544 return "ËâË¡¤ÎÃϿޤȸ÷ : 50+d50 ¥¿¡¼¥óËè";
1546 return "magic mapping and light every 50+d50 turns";
1553 return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô";
1555 return "clairvoyance and recall, draining you";
1563 return "¼Ù°Â໶(x5) : 200+d200 ¥¿¡¼¥óËè";
1565 return "dispel evil (x5) every 200+d200 turns";
1572 return "¼Ù°Â໶(x5) : 100+d100 ¥¿¡¼¥óËè";
1574 return "dispel evil (x5) every 100+d100 turns";
1582 return "Âмٰ·ë³¦ : 225+d225 ¥¿¡¼¥óËè";
1584 return "protection from evil every 225+d225 turns";
1591 return "Ã⩹¶·â(100) : 100+d100 ¥¿¡¼¥óËè";
1593 return "a strangling attack (100) every 100+d100 turns";
1600 return "¥¹¥Ô¡¼¥É(75+d75¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1602 return "haste self (75+d75 turns) every 150+d150 turns";
1609 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(300) : 225+d225 ¥¿¡¼¥óËè";
1611 return "large fire ball (300) every 225+d225 turns";
1618 return "µðÂ祢¥¤¥¹¡¦¥Ü¡¼¥ë(400) : 325+d325 ¥¿¡¼¥óËè";
1620 return "large frost ball (400) every 325+d325 turns";
1628 return "µðÂ祵¥ó¥À¡¼¡¦¥Ü¡¼¥ë(500) : 425+d425 ¥¿¡¼¥óËè";
1630 return "large lightning ball (500) every 425+d425 turns";
1638 return "¿®¤¸Æñ¤¤¤³¤È : 450+d450 ¥¿¡¼¥óËè";
1640 return "bizarre things every 450+d450 turns";
1644 case ART_DOR: case ART_TERROR: case ART_STONEMASK:
1647 return "Á´Êý¸þ¤Ø¤Î¶²Éݤθ÷Àþ";
1649 return "rays of fear in every direction";
1656 return "¤³¤Î³¬¤Ë¤¤¤ë¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òɽ¼¨ : 200¥¿¡¼¥óËè";
1658 return "list of the uniques on the level every 200 turns";
1661 case ART_STONE_LORE:
1664 return "´í¸±¤òȼ¤¦´ÕÄê : ¤¤¤Ä¤Ç¤â";
1666 return "perilous identify every turn";
1672 return "³²Ãî¤Î¶î½ü : 55+d55¥¿¡¼¥óËè";
1674 return "dispel small life every 55+d55 turns";
1680 return "¥â¥ó¥¹¥¿¡¼¶²¹² : 40+d40¥¿¡¼¥óËè";
1682 return "frighten monsters every 40+d40 turns";
1688 return "Âмٰ·ë³¦ : 200+d200 ¥¿¡¼¥óËè";
1690 return "protection from evil every 200 + d200 turns";
1696 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
1698 return "a mana bolt (120) every 120+d120 turns";
1704 return "»Îµ¤¹âÍÈ, ¥¹¥Ô¡¼¥É(50+d50¥¿¡¼¥ó) : 100+d200 ¥¿¡¼¥óËè";
1706 return "hero and +10 to speed (50) every 100+200d turns";
1712 return "âÁ¤·¤¤¸÷ : 250 ¥¿¡¼¥óËè";
1714 return "blinding light every 250 turns";
1720 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
1722 return "Recharge item every 200 turns";
1728 return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë¡£";
1730 return "Increase STR (destroyed 50%)";
1736 return "ËâÎϤÎÍò(400) : 250+d250¥¿¡¼¥óËè";
1738 return "a mana storm every 250+d250 turns";
1744 return "ʪÂΤò°ú¤´ó¤»¤ë(½ÅÎÌ25kg¤Þ¤Ç) : 25+d25¥¿¡¼¥óËè";
1746 return "a telekinesis (500 lb) every 25+d25 turns";
1752 return "¥Ï¥¦¥ó¥É¾¤´ : 300+d150¥¿¡¼¥óËè";
1754 return "summon hound every 300+d150 turns";
1760 return "µðÂ祹¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 200+d200 ¥¿¡¼¥óËè";
1762 return "large star ball (200) every 200+d200 turns";
1769 return "Îã¤Î¥¢¥ì : 150+d150 ¥¿¡¼¥óËè";
1771 return "reveal your identity every 150+d150 turns";
1778 return "Çï»ÒÌÚ¤òÂǤÁ¤Ê¤é¤¹ : ¤¤¤Ä¤Ç¤â";
1780 return "beat wooden clappers every turn";
1788 return "»Îµ¤¹âÍÈ : 30+d30¥¿¡¼¥óËè";
1790 return "heroism every 30+d30 turns";
1798 return "Ìþ¤· : 100¥¿¡¼¥óËè";
1800 return "curing every 100 turns";
1808 return "ưʪ̥λ : 200¥¿¡¼¥óËè";
1810 return "charm animal every 200 turns";
1817 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(12d8) : 50 ¥¿¡¼¥óËè";
1819 return "frost bolt (12d8) every 50 turns";
1826 return "°ÀÊѹ¹ : 3333 ¥¿¡¼¥óËè";
1828 return "change zokusei every 3333 turns";
1835 return "¥¦¥©¡¼¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 250 ¥¿¡¼¥óËè";
1837 return "water ball (200) every 250 turns";
1844 return "»Í¸ÔƧ¤ß : 100+d100¥¿¡¼¥óËè";
1846 return "shiko every 100+d100 turns";
1853 return "Î䵤¤ÎÂÑÀ : 40+d40¥¿¡¼¥óËè";
1855 return "resist cold every 40+d40 turns";
1862 return "Âý¤ÎÂç·²¾¤´ : 300+d150¥¿¡¼¥óËè";
1864 return "summon octopus every 300+d150 turns";
1870 return "°Å¹õ¤ÎÍò(250) : 150+d150 ¥¿¡¼¥óËè";
1872 return "darkness storm (250) every 150+d150 turns";
1879 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_TSURIZAO))
1882 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
1884 return "fishing : every time";
1889 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_ACID))
1892 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1894 return "resist acid every 50+d50 turns";
1898 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_ELEC))
1901 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1903 return "resist elec every 50+d50 turns";
1907 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_FIRE))
1910 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1912 return "resist fire every 50+d50 turns";
1916 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_COLD))
1919 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1921 return "resist cold every 50+d50 turns";
1925 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_EARTHQUAKE))
1928 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1930 return "earthquake every 100+d100 turns";
1934 if (o_ptr->name2 == EGO_TRUMP)
1937 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
1939 return "teleport every 50+d50 turns";
1944 if (o_ptr->name2 == EGO_LITE_ILLUMINATION)
1947 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1949 return "illumination every 10+d10 turns";
1953 else if (o_ptr->name2 == EGO_EARTHQUAKES)
1956 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1958 return "earthquake every 100+d100 turns";
1963 else if (o_ptr->name2 == EGO_JUMP)
1966 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1968 return "blink every 10+d10 turns";
1973 if (o_ptr->tval == TV_RING)
1977 switch (o_ptr->name2)
1981 return "»Îµ¤¹âÍÈ : 100+d100¥¿¡¼¥óËè";
1983 return "heroism every 100+d100 turns";
1985 case EGO_RING_MAGIC_MIS:
1987 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1989 return "magic missile (2d6) every 2 turns";
1991 case EGO_RING_FIRE_BOLT:
1993 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1995 return "fire bolt (9d8) every 8+d8 turns";
1997 case EGO_RING_COLD_BOLT:
1999 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
2001 return "frost bolt (6d8) every 7+d7 turns";
2003 case EGO_RING_ELEC_BOLT:
2005 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
2007 return "lightning bolt (4d8) every 5+d5 turns";
2009 case EGO_RING_ACID_BOLT:
2011 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
2013 return "acid bolt (5d8) every 6+d6 turns";
2015 case EGO_RING_MANA_BOLT:
2017 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
2019 return "a mana bolt (120) every 120+d120 turns";
2021 case EGO_RING_FIRE_BALL:
2023 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2025 return "fire ball (100) every 80+d80 turns";
2027 case EGO_RING_COLD_BALL:
2029 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2031 return "cold ball (100) every 80+d80 turns";
2033 case EGO_RING_ELEC_BALL:
2035 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2037 return "elec ball (100) every 80+d80 turns";
2039 case EGO_RING_ACID_BALL:
2041 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2043 return "acid ball (100) every 80+d80 turns";
2045 case EGO_RING_MANA_BALL:
2047 return "ËâÎϤÎÍò (250) : 300 ¥¿¡¼¥óËè";
2049 return "mana storm (250) every 300 turns";
2051 case EGO_RING_DRAGON_F:
2052 if (o_ptr->sval == SV_RING_FLAMES)
2054 return "²Ð±ê¤Î¥Ö¥ì¥¹¤È²Ð¤Ø¤ÎÂÑÀ";
2056 return "breath of fire and resist fire";
2060 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2062 return "fire breath (200) every 250 turns";
2064 case EGO_RING_DRAGON_C:
2065 if (o_ptr->sval == SV_RING_ICE)
2067 return "Î䵤¤Î¥Ö¥ì¥¹¤ÈÎ䵤¤Ø¤ÎÂÑÀ";
2069 return "breath of cold and resist cold";
2073 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2075 return "cold breath (200) every 250 turns";
2077 case EGO_RING_M_DETECT:
2079 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃÎ : 150 ¥¿¡¼¥óËè";
2081 return "detect all monsters every 150 turns";
2083 case EGO_RING_D_SPEED:
2085 return "¥¹¥Ô¡¼¥É(15+d30¥¿¡¼¥ó) : 100 ¥¿¡¼¥óËè";
2087 return "haste self (15+d30 turns) every 100 turns";
2089 case EGO_RING_BERSERKER:
2091 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
2093 return "berserk (25+d25 turns) every 75+d75 turns";
2095 case EGO_RING_TELE_AWAY:
2097 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
2099 return "teleport away every 150 turns";
2103 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ";
2105 return "hero, bless, and ultimate resistance";
2109 switch (o_ptr->sval)
2111 case SV_RING_FLAMES:
2113 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤È²Ð¤Ø¤ÎÂÑÀ";
2115 return "ball of fire and resist fire";
2120 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë¤ÈÎ䵤¤Ø¤ÎÂÑÀ";
2122 return "ball of cold and resist cold";
2127 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤È»À¤Ø¤ÎÂÑÀ";
2129 return "ball of acid and resist acid";
2134 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤ÈÅÅ·â¤Ø¤ÎÂÑÀ";
2136 return "ball of elec and resist elec";
2144 if (o_ptr->tval == TV_AMULET)
2148 switch (o_ptr->name2)
2152 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
2154 return "identify every 10 turns";
2159 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
2161 return "charm monster every 200 turns";
2166 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
2168 return "blink every 10+d10 turns";
2171 case EGO_AMU_TELEPORT:
2173 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
2175 return "teleport every 50+d50 turns";
2178 case EGO_AMU_D_DOOR:
2180 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
2182 return "dimension door every 200 turns";
2185 case EGO_AMU_RES_FIRE_:
2187 return "²Ð±ê¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2189 return "resist fire every 50+d50 turns";
2192 case EGO_AMU_RES_COLD_:
2194 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2196 return "resist cold every 50+d50 turns";
2199 case EGO_AMU_RES_ELEC_:
2201 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2203 return "resist elec every 50+d50 turns";
2206 case EGO_AMU_RES_ACID_:
2208 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2210 return "resist acid every 50+d50 turns";
2213 case EGO_AMU_DETECTION:
2215 return "Á´´¶ÃÎ : 55+d55¥¿¡¼¥óËè";
2217 return "detect all floor every 55+d55 turns";
2224 if (o_ptr->tval == TV_WHISTLE)
2227 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
2229 return "call pet every 100+d100 turns";
2233 if (o_ptr->tval == TV_CAPTURE)
2236 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
2238 return "captures or releases a monster.";
2242 /* Require dragon scale mail */
2244 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
2246 if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
2250 /* Branch on the sub-type */
2251 switch (o_ptr->sval)
2253 case SV_DRAGON_BLUE:
2256 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
2258 return "breathe lightning (100) every 150+d150 turns";
2262 case SV_DRAGON_WHITE:
2265 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
2267 return "breathe frost (110) every 150+d150 turns";
2271 case SV_DRAGON_BLACK:
2274 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
2276 return "breathe acid (130) every 150+d150 turns";
2280 case SV_DRAGON_GREEN:
2283 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
2285 return "breathe poison gas (150) every 180+d180 turns";
2292 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2294 return "breathe fire (200) every 200+d200 turns";
2298 case SV_DRAGON_MULTIHUED:
2301 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
2303 return "breathe multi-hued (250) every 200+d200 turns";
2307 case SV_DRAGON_BRONZE:
2310 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
2312 return "breathe confusion (120) every 180+d180 turns";
2316 case SV_DRAGON_GOLD:
2319 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
2321 return "breathe sound (130) every 180+d180 turns";
2325 case SV_DRAGON_CHAOS:
2328 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
2330 return "breathe chaos/disenchant (220) every 200+d200 turns";
2337 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
2339 return "breathe sound/shards (230) every 200+d200 turns";
2343 case SV_DRAGON_BALANCE:
2346 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
2348 return "breathe balance (250) every 200+d200 turns";
2352 case SV_DRAGON_SHINING:
2355 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2357 return "breathe light/darkness (200) every 200+d200 turns";
2361 case SV_DRAGON_POWER:
2364 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
2366 return "breathe the elements (300) every 200+d200 turns";
2376 return "breathe air";
2383 * Describe a "fully identified" item
2385 bool identify_fully_aux(object_type *o_ptr)
2393 char o_name[MAX_NLEN];
2396 /* Extract the flags */
2397 object_flags(o_ptr, &f1, &f2, &f3);
2403 roff_to_buf( a_text + a_info[ o_ptr->name1 ].text ,77-15,temp);
2404 for(j=0;temp[j];j+=1+strlen(&temp[j]))
2405 { info[i]=&temp[j];i++;}
2408 /* Mega-Hack -- describe activation */
2409 if (f3 & (TR3_ACTIVATE))
2412 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
2414 info[i++] = "It can be activated for...";
2417 info[i++] = item_activation(o_ptr);
2419 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
2421 info[i++] = "...if it is being worn.";
2426 /* Figurines, a hack */
2427 if (o_ptr->tval == TV_FIGURINE)
2430 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
2432 info[i++] = "It will transform into a pet when thrown.";
2437 /* Figurines, a hack */
2438 if (o_ptr->name1 == ART_STONEMASK)
2441 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
2443 info[i++] = "It makes you turn into a vampire permanently.";
2448 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
2451 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
2453 info[i++] = "It will attempts to kill a monster instantly.";
2458 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
2461 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
2463 info[i++] = "It strikes yourself sometimes.";
2467 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
2469 info[i++] = "It will always penetrates invulnerability barrier.";
2473 if (o_ptr->name2 == EGO_2WEAPON)
2476 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
2478 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
2483 if (o_ptr->name2 == EGO_RING_WIZARD)
2486 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
2488 info[i++] = "It affects your ability to use magic devices.";
2492 if (o_ptr->name2 == EGO_AMU_FOOL)
2495 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
2497 info[i++] = "It prevents you from using magic items.";
2501 if (o_ptr->name2 == EGO_RING_THROW)
2504 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2506 info[i++] = "It provides great strength when you throw an item.";
2510 if (o_ptr->name2 == EGO_AMU_NAIVETY)
2513 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
2515 info[i++] = "It decreases your magic resistance.";
2519 if (o_ptr->tval == TV_STATUE)
2521 monster_race *r_ptr = &r_info[o_ptr->pval];
2523 if (o_ptr->pval == MON_BULLGATES)
2525 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
2527 info[i++] = "It is shameful.";
2529 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
2531 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
2533 info[i++] = "It is fearful.";
2537 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
2539 info[i++] = "It is cheerful.";
2543 /* Hack -- describe lite's */
2544 if (o_ptr->tval == TV_LITE)
2546 if (o_ptr->name2 == EGO_LITE_DARKNESS)
2549 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
2551 info[i++] = "It provides no light..";
2554 else if (artifact_p(o_ptr))
2557 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2559 info[i++] = "It provides light (radius 3) forever.";
2563 else if (o_ptr->name2 == EGO_LITE_SHINE)
2565 if (o_ptr->sval == SV_LITE_FEANOR)
2568 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2570 info[i++] = "It provides light (radius 3) forever.";
2574 else if (o_ptr->sval == SV_LITE_LANTERN)
2577 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2579 info[i++] = "It provides light (radius 3) when fueled.";
2586 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2588 info[i++] = "It provides light (radius 2) when fueled.";
2595 if (o_ptr->sval == SV_LITE_FEANOR)
2598 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2600 info[i++] = "It provides light (radius 2) forever.";
2604 else if (o_ptr->sval == SV_LITE_LANTERN)
2607 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2609 info[i++] = "It provides light (radius 2) when fueled.";
2616 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
2618 info[i++] = "It provides light (radius 1) when fueled.";
2623 if (o_ptr->name2 == EGO_LITE_LONG)
2626 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
2628 info[i++] = "It provides light for much longer time.";
2634 /* And then describe it fully */
2636 if (f2 & (TR2_RIDING))
2638 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
2640 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
2642 info[i++] = "It is made for riding.";
2646 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
2648 info[i++] = "It is suitable for riding.";
2655 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2657 info[i++] = "It affects your strength.";
2664 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2666 info[i++] = "It affects your intelligence.";
2673 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2675 info[i++] = "It affects your wisdom.";
2682 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2684 info[i++] = "It affects your dexterity.";
2691 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2693 info[i++] = "It affects your constitution.";
2700 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2702 info[i++] = "It affects your charisma.";
2707 if (f1 & (TR1_MAGIC_MASTERY))
2710 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2712 info[i++] = "It affects your ability to use magic devices.";
2716 if (f1 & (TR1_STEALTH))
2719 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2721 info[i++] = "It affects your stealth.";
2725 if (f1 & (TR1_SEARCH))
2728 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2730 info[i++] = "It affects your searching.";
2734 if (f1 & (TR1_INFRA))
2737 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2739 info[i++] = "It affects your infravision.";
2743 if (f1 & (TR1_TUNNEL))
2746 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2748 info[i++] = "It affects your ability to tunnel.";
2752 if (f1 & (TR1_SPEED))
2755 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2757 info[i++] = "It affects your speed.";
2761 if (f1 & (TR1_BLOWS))
2764 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2766 info[i++] = "It affects your attack speed.";
2771 if (f1 & (TR1_BRAND_ACID))
2774 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2776 info[i++] = "It does extra damage from acid.";
2780 if (f1 & (TR1_BRAND_ELEC))
2783 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2785 info[i++] = "It does extra damage from electricity.";
2789 if (f1 & (TR1_BRAND_FIRE))
2792 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2794 info[i++] = "It does extra damage from fire.";
2798 if (f1 & (TR1_BRAND_COLD))
2801 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2803 info[i++] = "It does extra damage from frost.";
2808 if (f1 & (TR1_BRAND_POIS))
2811 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
2813 info[i++] = "It poisons your foes.";
2818 if (f1 & (TR1_CHAOTIC))
2821 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
2823 info[i++] = "It produces chaotic effects.";
2828 if (f1 & (TR1_VAMPIRIC))
2831 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
2833 info[i++] = "It drains life from your foes.";
2838 if (f1 & (TR1_IMPACT))
2841 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
2843 info[i++] = "It can cause earthquakes.";
2848 if (f1 & (TR1_VORPAL))
2851 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2853 info[i++] = "It is very sharp and can cut your foes.";
2858 if (f1 & (TR1_KILL_DRAGON))
2861 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2863 info[i++] = "It is a great bane of dragons.";
2867 else if (f1 & (TR1_SLAY_DRAGON))
2870 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2872 info[i++] = "It is especially deadly against dragons.";
2876 if (f1 & (TR1_SLAY_ORC))
2879 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2881 info[i++] = "It is especially deadly against orcs.";
2885 if (f1 & (TR1_SLAY_TROLL))
2888 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2890 info[i++] = "It is especially deadly against trolls.";
2894 if (f1 & (TR1_SLAY_GIANT))
2896 if (o_ptr->name1 == ART_HRUNTING)
2898 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2900 info[i++] = "It is a great bane of giants.";
2904 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2906 info[i++] = "It is especially deadly against giants.";
2910 if (f1 & (TR1_SLAY_DEMON))
2913 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2915 info[i++] = "It strikes at demons with holy wrath.";
2919 if (f1 & (TR1_SLAY_UNDEAD))
2922 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2924 info[i++] = "It strikes at undead with holy wrath.";
2928 if (f1 & (TR1_SLAY_EVIL))
2931 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
2933 info[i++] = "It fights against evil with holy fury.";
2937 if (f1 & (TR1_SLAY_ANIMAL))
2940 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2942 info[i++] = "It is especially deadly against natural creatures.";
2947 if (f1 & (TR1_FORCE_WEAPON))
2950 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
2952 info[i++] = "It powerfully strikes at a monster using your mana.";
2956 if (f3 & (TR3_DEC_MANA))
2959 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
2961 info[i++] = "It decreases your mana consumption.";
2965 if (f2 & (TR2_SUST_STR))
2968 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
2970 info[i++] = "It sustains your strength.";
2974 if (f2 & (TR2_SUST_INT))
2977 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
2979 info[i++] = "It sustains your intelligence.";
2983 if (f2 & (TR2_SUST_WIS))
2986 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
2988 info[i++] = "It sustains your wisdom.";
2992 if (f2 & (TR2_SUST_DEX))
2995 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
2997 info[i++] = "It sustains your dexterity.";
3001 if (f2 & (TR2_SUST_CON))
3004 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
3006 info[i++] = "It sustains your constitution.";
3010 if (f2 & (TR2_SUST_CHR))
3013 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
3015 info[i++] = "It sustains your charisma.";
3020 if (f2 & (TR2_IM_ACID))
3023 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3025 info[i++] = "It provides immunity to acid.";
3029 if (f2 & (TR2_IM_ELEC))
3032 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3034 info[i++] = "It provides immunity to electricity.";
3038 if (f2 & (TR2_IM_FIRE))
3041 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3043 info[i++] = "It provides immunity to fire.";
3047 if (f2 & (TR2_IM_COLD))
3050 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3052 info[i++] = "It provides immunity to cold.";
3057 if (f2 & (TR2_THROW))
3060 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3062 info[i++] = "It is perfectly balanced for throwing.";
3066 if (f2 & (TR2_FREE_ACT))
3069 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3071 info[i++] = "It provides immunity to paralysis.";
3075 if (f2 & (TR2_HOLD_LIFE))
3078 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
3080 info[i++] = "It provides resistance to life draining.";
3084 if (f2 & (TR2_RES_FEAR))
3087 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3089 info[i++] = "It makes you completely fearless.";
3093 if (f2 & (TR2_RES_ACID))
3096 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3098 info[i++] = "It provides resistance to acid.";
3102 if (f2 & (TR2_RES_ELEC))
3105 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3107 info[i++] = "It provides resistance to electricity.";
3111 if (f2 & (TR2_RES_FIRE))
3114 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3116 info[i++] = "It provides resistance to fire.";
3120 if (f2 & (TR2_RES_COLD))
3123 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3125 info[i++] = "It provides resistance to cold.";
3129 if (f2 & (TR2_RES_POIS))
3132 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3134 info[i++] = "It provides resistance to poison.";
3139 if (f2 & (TR2_RES_LITE))
3142 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3144 info[i++] = "It provides resistance to light.";
3148 if (f2 & (TR2_RES_DARK))
3151 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3153 info[i++] = "It provides resistance to dark.";
3158 if (f2 & (TR2_RES_BLIND))
3161 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3163 info[i++] = "It provides resistance to blindness.";
3167 if (f2 & (TR2_RES_CONF))
3170 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3172 info[i++] = "It provides resistance to confusion.";
3176 if (f2 & (TR2_RES_SOUND))
3179 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3181 info[i++] = "It provides resistance to sound.";
3185 if (f2 & (TR2_RES_SHARDS))
3188 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3190 info[i++] = "It provides resistance to shards.";
3195 if (f2 & (TR2_RES_NETHER))
3198 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3200 info[i++] = "It provides resistance to nether.";
3204 if (f2 & (TR2_RES_NEXUS))
3207 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3209 info[i++] = "It provides resistance to nexus.";
3213 if (f2 & (TR2_RES_CHAOS))
3216 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3218 info[i++] = "It provides resistance to chaos.";
3222 if (f2 & (TR2_RES_DISEN))
3225 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3227 info[i++] = "It provides resistance to disenchantment.";
3232 if (f3 & (TR3_FEATHER))
3235 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3237 info[i++] = "It allows you to levitate.";
3241 if (f3 & (TR3_LITE))
3243 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
3245 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë¡£";
3247 info[i++] = "It decreases radius of your light source.";
3251 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
3253 info[i++] = "It provides permanent light.";
3257 if (f3 & (TR3_SEE_INVIS))
3260 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3262 info[i++] = "It allows you to see invisible monsters.";
3266 if (f3 & (TR3_TELEPATHY))
3269 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
3271 info[i++] = "It gives telepathic powers.";
3275 if (f3 & (TR3_SLOW_DIGEST))
3278 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
3280 info[i++] = "It slows your metabolism.";
3284 if (f3 & (TR3_REGEN))
3287 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
3289 info[i++] = "It speeds your regenerative powers.";
3293 if (f3 & (TR3_WARNING))
3296 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
3298 info[i++] = "It warns you of danger";
3302 if (f2 & (TR2_REFLECT))
3305 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
3307 info[i++] = "It reflects bolts and arrows.";
3311 if (f3 & (TR3_SH_FIRE))
3314 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3316 info[i++] = "It produces a fiery sheath.";
3320 if (f3 & (TR3_SH_ELEC))
3323 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3325 info[i++] = "It produces an electric sheath.";
3329 if (f3 & (TR3_SH_COLD))
3332 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3334 info[i++] = "It produces a coldly sheath.";
3338 if (f3 & (TR3_NO_MAGIC))
3341 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3343 info[i++] = "It produces an anti-magic shell.";
3347 if (f3 & (TR3_NO_TELE))
3350 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
3352 info[i++] = "It prevents teleportation.";
3356 if (f3 & (TR3_XTRA_MIGHT))
3359 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3361 info[i++] = "It fires missiles with extra might.";
3365 if (f3 & (TR3_XTRA_SHOTS))
3368 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3370 info[i++] = "It fires missiles excessively fast.";
3375 if (f3 & TR3_BLESSED)
3378 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
3380 info[i++] = "It has been blessed by the gods.";
3385 if (cursed_p(o_ptr))
3387 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
3390 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3392 info[i++] = "It is permanently cursed.";
3396 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
3399 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3401 info[i++] = "It is heavily cursed.";
3408 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
3410 info[i++] = "It is cursed.";
3416 if ((f3 & TR3_TY_CURSE) || (o_ptr->curse_flags & TRC_TY_CURSE))
3419 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
3421 info[i++] = "It carries an ancient foul curse.";
3425 if ((f3 & TR3_AGGRAVATE) || (o_ptr->curse_flags & TRC_AGGRAVATE))
3428 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
3430 info[i++] = "It aggravates nearby creatures.";
3434 if ((f3 & (TR3_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
3437 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
3439 info[i++] = "It drains experience.";
3443 if (o_ptr->curse_flags & TRC_SLOW_REGEN)
3446 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
3448 info[i++] = "It nanka.";
3452 if (o_ptr->curse_flags & TRC_ADD_L_CURSE)
3455 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
3457 info[i++] = "It nanka.";
3461 if (o_ptr->curse_flags & TRC_ADD_H_CURSE)
3464 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
3466 info[i++] = "It nanka.";
3470 if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
3473 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3475 info[i++] = "It nanka.";
3479 if (o_ptr->curse_flags & TRC_CALL_DEMON)
3482 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3484 info[i++] = "It nanka.";
3488 if (o_ptr->curse_flags & TRC_CALL_DRAGON)
3491 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3493 info[i++] = "It nanka.";
3497 if (o_ptr->curse_flags & TRC_COWARDICE)
3500 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤µ¯¤³¤¹¡£";
3502 info[i++] = "It nanka.";
3506 if ((f3 & (TR3_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
3509 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
3511 info[i++] = "It induces random teleportation.";
3515 if (o_ptr->curse_flags & TRC_LOW_MELEE)
3518 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
3520 info[i++] = "It nanka.";
3524 if (o_ptr->curse_flags & TRC_LOW_AC)
3527 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
3529 info[i++] = "It nanka.";
3533 if (o_ptr->curse_flags & TRC_LOW_MAGIC)
3536 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
3538 info[i++] = "It nanka.";
3542 if (o_ptr->curse_flags & TRC_FAST_DIGEST)
3545 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
3547 info[i++] = "It nanka.";
3551 if (o_ptr->curse_flags & TRC_DRAIN_HP)
3554 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
3556 info[i++] = "It nanka.";
3560 if (o_ptr->curse_flags & TRC_DRAIN_MANA)
3563 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
3565 info[i++] = "It nanka.";
3570 /* XTRA HACK ARTDESC */
3571 flag = TR3_IGNORE_ACID | TR3_IGNORE_ELEC | TR3_IGNORE_FIRE | TR3_IGNORE_COLD ;
3572 if ((f3 & flag) == flag)
3575 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3577 info[i++] = "It cannot be harmed by the elements.";
3580 if (f3 & (TR3_IGNORE_ACID))
3583 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3585 info[i++] = "It cannot be harmed by acid.";
3589 if (f3 & (TR3_IGNORE_ELEC))
3592 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3594 info[i++] = "It cannot be harmed by electricity.";
3598 if (f3 & (TR3_IGNORE_FIRE))
3601 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3603 info[i++] = "It cannot be harmed by fire.";
3607 if (f3 & (TR3_IGNORE_COLD))
3610 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3612 info[i++] = "It cannot be harmed by cold.";
3617 /* XTRA HACK ARTDESC */
3620 /* No special effects */
3621 if (!i) return (FALSE);
3623 /* Save the screen */
3627 Term_get_size(&wid, &hgt);
3629 /* Display Item name */
3630 object_desc(o_name, o_ptr, TRUE, 3);
3631 prt(format("%s", o_name), 0, 0);
3633 /* Erase the screen */
3634 for (k = 1; k < hgt; k++) prt("", k, 13);
3636 /* Label the information */
3637 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
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);
3647 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
3649 prt(" Item Attributes:", 1, 15);
3652 /* We will print on top of the map (column 13) */
3653 for (k = 2, j = 0; j < i; j++)
3656 prt(info[j], k++, 15);
3658 /* Every 20 entries (lines 2 to 21), start over */
3659 if ((k == hgt - 2) && (j+1 < i))
3662 prt("-- ³¤¯ --", k, 15);
3664 prt("-- more --", k, 15);
3667 for (; k > 2; k--) prt("", k, 15);
3673 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
3675 prt("[Press any key to continue]", k, 15);
3680 /* Restore the screen */
3683 /* Gave knowledge */
3690 * Convert an inventory index into a one character label
3691 * Note that the label does NOT distinguish inven/equip.
3693 char index_to_label(int i)
3695 /* Indexes for "inven" are easy */
3696 if (i < INVEN_RARM) return (I2A(i));
3698 /* Indexes for "equip" are offset */
3699 return (I2A(i - INVEN_RARM));
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
3707 s16b label_to_inven(int c)
3712 i = (islower(c) ? A2I(c) : -1);
3714 /* Verify the index */
3715 if ((i < 0) || (i > INVEN_PACK)) return (-1);
3717 /* Empty slots can never be chosen */
3718 if (!inventory[i].k_idx) return (-1);
3720 /* Return the index */
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
3729 s16b label_to_equip(int c)
3734 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
3736 /* Verify the index */
3737 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
3739 /* Empty slots can never be chosen */
3740 if (!inventory[i].k_idx) return (-1);
3742 /* Return the index */
3749 * Determine which equipment slot (if any) an item likes
3751 s16b wield_slot(object_type *o_ptr)
3753 /* Slot for equipment */
3754 switch (o_ptr->tval)
3761 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
3762 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
3763 return (INVEN_LARM);
3770 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
3771 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
3772 return (INVEN_RARM);
3782 /* Use the right hand first */
3783 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
3785 /* Use the left hand for swapping (by default) */
3786 return (INVEN_LEFT);
3792 return (INVEN_NECK);
3797 return (INVEN_LITE);
3804 return (INVEN_BODY);
3809 return (INVEN_OUTER);
3815 return (INVEN_HEAD);
3820 return (INVEN_HANDS);
3825 return (INVEN_FEET);
3829 /* No slot available */
3835 * Return a string mentioning how a given item is carried
3837 cptr mention_use(int i)
3841 /* Examine the location */
3845 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê"); break;
3847 case INVEN_RARM: p = "Wielding"; break;
3851 case INVEN_LARM: p = (left_hander ? " ±¦¼ê" : " º¸¼ê"); break;
3853 case INVEN_LARM: p = "On arm"; break;
3857 case INVEN_BOW: p = "¼Í·âÍÑ"; break;
3859 case INVEN_BOW: p = "Shooting"; break;
3863 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
3865 case INVEN_LEFT: p = "On left hand"; break;
3869 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
3871 case INVEN_RIGHT: p = "On right hand"; break;
3875 case INVEN_NECK: p = " ¼ó"; break;
3877 case INVEN_NECK: p = "Around neck"; break;
3881 case INVEN_LITE: p = " ¸÷¸»"; break;
3883 case INVEN_LITE: p = "Light source"; break;
3887 case INVEN_BODY: p = " ÂÎ"; break;
3889 case INVEN_BODY: p = "On body"; break;
3893 case INVEN_OUTER: p = "ÂΤξå"; break;
3895 case INVEN_OUTER: p = "About body"; break;
3899 case INVEN_HEAD: p = " Ƭ"; break;
3901 case INVEN_HEAD: p = "On head"; break;
3905 case INVEN_HANDS: p = " ¼ê"; break;
3907 case INVEN_HANDS: p = "On hands"; break;
3911 case INVEN_FEET: p = " "; break;
3913 case INVEN_FEET: p = "On feet"; break;
3917 default: p = "¥¶¥Ã¥¯"; break;
3919 default: p = "In pack"; break;
3924 /* Hack -- Heavy weapon */
3925 if (i == INVEN_RARM)
3927 if (p_ptr->heavy_wield[0])
3938 /* Hack -- Heavy weapon */
3939 if (i == INVEN_LARM)
3941 if (p_ptr->heavy_wield[1])
3952 /* Hack -- Heavy bow */
3956 o_ptr = &inventory[i];
3957 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
3968 /* Return the result */
3974 * Return a string describing how a given item is being worn.
3975 * Currently, only used for items in the equipment, not inventory.
3977 cptr describe_use(int i)
3984 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
3986 case INVEN_RARM: p = "attacking monsters with"; break;
3990 case INVEN_LARM: p = (left_hander ? " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
3992 case INVEN_LARM: p = "wearing on your arm"; break;
3996 case INVEN_BOW: p = "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
3998 case INVEN_BOW: p = "shooting missiles with"; break;
4002 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4004 case INVEN_LEFT: p = "wearing on your left hand"; break;
4008 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4010 case INVEN_RIGHT: p = "wearing on your right hand"; break;
4014 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
4016 case INVEN_NECK: p = "wearing around your neck"; break;
4020 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
4022 case INVEN_LITE: p = "using to light the way"; break;
4026 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
4028 case INVEN_BODY: p = "wearing on your body"; break;
4032 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
4034 case INVEN_OUTER: p = "wearing on your back"; break;
4038 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
4040 case INVEN_HEAD: p = "wearing on your head"; break;
4044 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
4046 case INVEN_HANDS: p = "wearing on your hands"; break;
4050 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
4052 case INVEN_FEET: p = "wearing on your feet"; break;
4056 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
4058 default: p = "carrying in your pack"; break;
4063 /* Hack -- Heavy weapon */
4064 if (i == INVEN_RARM)
4067 int hold = adj_str_hold[p_ptr->stat_ind[A_STR]];
4069 if (p_ptr->ryoute) hold *= 2;
4070 o_ptr = &inventory[i];
4071 if (hold < o_ptr->weight / 10)
4082 /* Hack -- Heavy bow */
4086 o_ptr = &inventory[i];
4087 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
4090 p = "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î";
4098 /* Return the result */
4103 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
4105 bool check_book_realm(const byte book_tval, const byte book_sval)
4107 if (book_tval < TV_LIFE_BOOK) return FALSE;
4108 if (p_ptr->pclass == CLASS_SORCERER)
4110 return is_magic(tval2realm(book_tval));
4112 else if (p_ptr->pclass == CLASS_RED_MAGE)
4114 if (is_magic(tval2realm(book_tval)))
4115 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
4117 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
4122 * Check an item against the item tester info
4124 bool item_tester_okay(object_type *o_ptr)
4126 /* Hack -- allow listing empty slots */
4127 if (item_tester_full) return (TRUE);
4129 /* Require an item */
4130 if (!o_ptr->k_idx) return (FALSE);
4132 /* Hack -- ignore "gold" */
4133 if (o_ptr->tval == TV_GOLD) return (FALSE);
4135 /* Check the tval */
4136 if (item_tester_tval)
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);
4143 if (item_tester_tval != o_ptr->tval) return (FALSE);
4146 /* Check the hook */
4147 if (item_tester_hook)
4149 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
4160 * Choice window "shadow" of the "show_inven()" function
4162 void display_inven(void)
4164 register int i, n, z = 0;
4166 byte attr = TERM_WHITE;
4168 char o_name[MAX_NLEN];
4171 /* Find the "final" slot */
4172 for (i = 0; i < INVEN_PACK; i++)
4174 o_ptr = &inventory[i];
4176 /* Skip non-objects */
4177 if (!o_ptr->k_idx) continue;
4183 /* Display the pack */
4184 for (i = 0; i < z; i++)
4186 /* Examine the item */
4187 o_ptr = &inventory[i];
4189 /* Start with an empty "index" */
4190 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4192 /* Is this item "acceptable"? */
4193 if (item_tester_okay(o_ptr))
4195 /* Prepare an "index" */
4196 tmp_val[0] = index_to_label(i);
4198 /* Bracket the "index" --(-- */
4202 /* Display the index (or blank space) */
4203 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
4205 /* Obtain an item description */
4206 object_desc(o_name, o_ptr, TRUE, 3);
4208 /* Obtain the length of the description */
4212 attr = tval_to_attr[o_ptr->tval % 128];
4214 /* Grey out charging items */
4220 /* Display the entry itself */
4221 Term_putstr(3, i, n, attr, o_name);
4223 /* Erase the rest of the line */
4224 Term_erase(3+n, i, 255);
4226 /* Display the weight if needed */
4227 if (show_weights && o_ptr->weight)
4229 int wgt = o_ptr->weight * o_ptr->number;
4231 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
4233 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4236 Term_putstr(71, i, -1, TERM_WHITE, tmp_val);
4240 /* Erase the rest of the window */
4241 for (i = z; i < Term->hgt; i++)
4243 /* Erase the line */
4244 Term_erase(0, i, 255);
4251 * Choice window "shadow" of the "show_equip()" function
4253 void display_equip(void)
4257 byte attr = TERM_WHITE;
4259 char o_name[MAX_NLEN];
4262 /* Display the equipment */
4263 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
4265 /* Examine the item */
4266 o_ptr = &inventory[i];
4268 /* Start with an empty "index" */
4269 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4271 /* Is this item "acceptable"? */
4272 if (item_tester_okay(o_ptr))
4274 /* Prepare an "index" */
4275 tmp_val[0] = index_to_label(i);
4277 /* Bracket the "index" --(-- */
4281 /* Display the index (or blank space) */
4282 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
4284 /* Obtain an item description */
4285 if ((i == INVEN_LARM) && p_ptr->ryoute)
4288 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
4290 strcpy(o_name, "(wielding with two-hands)");
4296 object_desc(o_name, o_ptr, TRUE, 3);
4297 attr = tval_to_attr[o_ptr->tval % 128];
4300 /* Obtain the length of the description */
4303 /* Grey out charging items */
4309 /* Display the entry itself */
4310 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
4312 /* Erase the rest of the line */
4313 Term_erase(3+n, i - INVEN_RARM, 255);
4315 /* Display the slot description (if needed) */
4318 Term_putstr(61, i - INVEN_RARM, -1, TERM_WHITE, "<--");
4319 Term_putstr(65, i - INVEN_RARM, -1, TERM_WHITE, mention_use(i));
4322 /* Display the weight (if needed) */
4323 if (show_weights && o_ptr->weight)
4325 int wgt = o_ptr->weight * o_ptr->number;
4326 int col = (show_labels ? 52 : 71);
4328 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
4330 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4333 Term_putstr(col, i - INVEN_RARM, -1, TERM_WHITE, tmp_val);
4337 /* Erase the rest of the window */
4338 for (i = INVEN_TOTAL - INVEN_RARM; i < Term->hgt; i++)
4340 /* Clear that line */
4341 Term_erase(0, i, 255);
4351 * Display the inventory.
4353 * Hack -- do not display "trailing" empty slots
4355 int show_inven(int target_item)
4357 int i, j, k, l, z = 0;
4358 int col, cur_col, len, lim;
4360 char o_name[MAX_NLEN];
4364 char out_desc[23][MAX_NLEN];
4365 int target_item_label = 0;
4369 /* Starting column */
4373 Term_get_size(&wid, &hgt);
4375 /* Default "max-length" */
4376 len = wid - col - 1;
4378 /* Maximum space allowed for descriptions */
4381 /* Require space for weight (if needed) */
4382 if (show_weights) lim -= 9;
4384 /* Require space for icon */
4385 if (show_item_graph)
4388 if (use_bigtile) lim--;
4391 /* Find the "final" slot */
4392 for (i = 0; i < INVEN_PACK; i++)
4394 o_ptr = &inventory[i];
4396 /* Skip non-objects */
4397 if (!o_ptr->k_idx) continue;
4403 /* Display the inventory */
4404 for (k = 0, i = 0; i < z; i++)
4406 o_ptr = &inventory[i];
4408 /* Is this item acceptable? */
4409 if (!item_tester_okay(o_ptr)) continue;
4411 /* Describe the object */
4412 object_desc(o_name, o_ptr, TRUE, 3);
4414 /* Hack -- enforce max length */
4417 /* Save the object index, color, and description */
4419 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4421 /* Grey out charging items */
4424 out_color[k] = TERM_L_DARK;
4427 (void)strcpy(out_desc[k], o_name);
4429 /* Find the predicted "line length" */
4430 l = strlen(out_desc[k]) + 5;
4432 /* Be sure to account for the weight */
4433 if (show_weights) l += 9;
4435 /* Account for icon if displayed */
4436 if (show_item_graph)
4439 if (use_bigtile) l++;
4442 /* Maintain the maximum length */
4443 if (l > len) len = l;
4445 /* Advance to next "line" */
4449 /* Find the column to start in */
4450 col = (len > wid - 4) ? 0 : (wid - len - 1);
4452 /* Output each entry */
4453 for (j = 0; j < k; j++)
4459 o_ptr = &inventory[i];
4461 /* Clear the line */
4462 prt("", j + 1, col ? col - 2 : col);
4464 if (use_menu && target_item)
4466 if (j == (target_item-1))
4469 strcpy(tmp_val, "¡Õ");
4471 strcpy(tmp_val, "> ");
4473 target_item_label = i;
4475 else strcpy(tmp_val, " ");
4478 /* Prepare an index --(-- */
4479 sprintf(tmp_val, "%c)", index_to_label(i));
4481 /* Clear the line with the (possibly indented) index */
4482 put_str(tmp_val, j + 1, col);
4486 /* Display graphics for object, if desired */
4487 if (show_item_graph)
4489 byte a = object_attr(o_ptr);
4490 char c = object_char(o_ptr);
4493 if (a & 0x80) a |= 0x40;
4496 Term_draw(cur_col, j + 1, a, c);
4501 Term_draw(cur_col, j + 1, 255, 255);
4507 /* Display the entry itself */
4508 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
4510 /* Display the weight if needed */
4513 int wgt = o_ptr->weight * o_ptr->number;
4515 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4517 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4520 put_str(tmp_val, j + 1, wid - 9);
4524 /* Make a "shadow" below the list (only if needed) */
4525 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4527 /* Save the new column */
4530 return target_item_label;
4536 * Display the equipment.
4538 int show_equip(int target_item)
4541 int col, cur_col, len, lim;
4544 char o_name[MAX_NLEN];
4547 char out_desc[23][MAX_NLEN];
4548 int target_item_label = 0;
4552 /* Starting column */
4556 Term_get_size(&wid, &hgt);
4558 /* Maximal length */
4559 len = wid - col - 1;
4561 /* Maximum space allowed for descriptions */
4564 /* Require space for labels (if needed) */
4566 if (show_labels) lim -= (7 + 2);
4568 if (show_labels) lim -= (14 + 2);
4572 /* Require space for weight (if needed) */
4574 if (show_weights) lim -= 10;
4576 if (show_weights) lim -= 9;
4580 if (show_item_graph) lim -= 2;
4582 /* Scan the equipment list */
4583 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
4585 o_ptr = &inventory[i];
4587 /* Is this item acceptable? */
4588 if (!item_tester_okay(o_ptr) && (!((i == INVEN_LARM) && p_ptr->ryoute) || item_tester_no_ryoute)) continue;
4591 object_desc(o_name, o_ptr, TRUE, 3);
4593 /* Truncate the description */
4596 if ((i == INVEN_LARM) && p_ptr->ryoute)
4599 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
4601 (void)strcpy(out_desc[k],"(wielding with two-hands)");
4607 (void)strcpy(out_desc[k], o_name);
4608 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4612 /* Grey out charging items */
4615 out_color[k] = TERM_L_DARK;
4618 /* Extract the maximal length (see below) */
4620 l = strlen(out_desc[k]) + (2 + 1);
4622 l = strlen(out_desc[k]) + (2 + 3);
4626 /* Increase length for labels (if needed) */
4628 if (show_labels) l += (7 + 2);
4630 if (show_labels) l += (14 + 2);
4634 /* Increase length for weight (if needed) */
4635 if (show_weights) l += 9;
4637 if (show_item_graph) l += 2;
4639 /* Maintain the max-length */
4640 if (l > len) len = l;
4642 /* Advance the entry */
4646 /* Hack -- Find a column to start in */
4648 col = (len > wid - 6) ? 0 : (wid - len - 1);
4650 col = (len > wid - 4) ? 0 : (wid - len - 1);
4654 /* Output each entry */
4655 for (j = 0; j < k; j++)
4661 o_ptr = &inventory[i];
4663 /* Clear the line */
4664 prt("", j + 1, col ? col - 2 : col);
4666 if (use_menu && target_item)
4668 if (j == (target_item-1))
4671 strcpy(tmp_val, "¡Õ");
4673 strcpy(tmp_val, "> ");
4675 target_item_label = i;
4677 else strcpy(tmp_val, " ");
4680 /* Prepare an index --(-- */
4681 sprintf(tmp_val, "%c)", index_to_label(i));
4683 /* Clear the line with the (possibly indented) index */
4684 put_str(tmp_val, j+1, col);
4688 /* Display graphics for object, if desired */
4689 if (show_item_graph)
4691 byte a = object_attr(o_ptr);
4692 char c = object_char(o_ptr);
4695 if (a & 0x80) a |= 0x40;
4698 Term_draw(cur_col, j + 1, a, c);
4703 Term_draw(cur_col, j + 1, 255, 255);
4711 /* Mention the use */
4713 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
4715 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
4718 put_str(tmp_val, j+1, cur_col);
4720 /* Display the entry itself */
4722 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
4724 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
4731 /* Display the entry itself */
4732 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
4735 /* Display the weight if needed */
4738 int wgt = o_ptr->weight * o_ptr->number;
4740 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4742 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
4745 put_str(tmp_val, j+1, wid - 9);
4749 /* Make a "shadow" below the list (only if needed) */
4750 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4752 /* Save the new column */
4755 return target_item_label;
4762 * Flip "inven" and "equip" in any sub-windows
4764 void toggle_inven_equip(void)
4769 for (j = 0; j < 8; j++)
4772 if (!angband_term[j]) continue;
4774 /* Flip inven to equip */
4775 if (window_flag[j] & (PW_INVEN))
4778 window_flag[j] &= ~(PW_INVEN);
4779 window_flag[j] |= (PW_EQUIP);
4782 p_ptr->window |= (PW_EQUIP);
4785 /* Flip inven to equip */
4786 else if (window_flag[j] & (PW_EQUIP))
4789 window_flag[j] &= ~(PW_EQUIP);
4790 window_flag[j] |= (PW_INVEN);
4793 p_ptr->window |= (PW_INVEN);
4801 * Verify the choice of an item.
4803 * The item can be negative to mean "item on floor".
4805 static bool verify(cptr prompt, int item)
4807 char o_name[MAX_NLEN];
4808 char out_val[MAX_NLEN+20];
4815 o_ptr = &inventory[item];
4821 o_ptr = &o_list[0 - item];
4825 object_desc(o_name, o_ptr, TRUE, 3);
4829 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
4831 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
4836 return (get_check(out_val));
4841 * Hack -- allow user to "prevent" certain choices
4843 * The item can be negative to mean "item on floor".
4845 static bool get_item_allow(int item)
4854 o_ptr = &inventory[item];
4860 o_ptr = &o_list[0 - item];
4863 /* No inscription */
4864 if (!o_ptr->inscription) return (TRUE);
4867 s = strchr(quark_str(o_ptr->inscription), '!');
4869 /* Process preventions */
4872 /* Check the "restriction" */
4873 if ((s[1] == command_cmd) || (s[1] == '*'))
4875 /* Verify the choice */
4877 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
4879 if (!verify("Really try", item)) return (FALSE);
4884 /* Find another '!' */
4885 s = strchr(s + 1, '!');
4895 * Auxiliary function for "get_item()" -- test an index
4897 static bool get_item_okay(int i)
4900 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
4902 /* Verify the item */
4903 if (!item_tester_okay(&inventory[i])) return (FALSE);
4912 * Find the "first" inventory object with the given "tag".
4914 * A "tag" is a char "n" appearing as "@n" anywhere in the
4915 * inscription of an object.
4917 * Also, the tag "@xn" will work as well, where "n" is a tag-char,
4918 * and "x" is the "current" command_cmd code.
4920 static int get_tag(int *cp, char tag)
4925 /* Check every object */
4926 for (i = 0; i < INVEN_TOTAL; ++i)
4928 object_type *o_ptr = &inventory[i];
4930 /* Skip non-objects */
4931 if (!o_ptr->k_idx) continue;
4933 /* Skip empty inscriptions */
4934 if (!o_ptr->inscription) continue;
4936 /* Skip non-choice */
4937 if (!item_tester_okay(o_ptr)) continue;
4940 s = strchr(quark_str(o_ptr->inscription), '@');
4942 /* Process all tags */
4945 /* Check the special tags */
4946 if ((s[1] == command_cmd) && (s[2] == tag))
4948 /* Save the actual inventory ID */
4955 /* Find another '@' */
4956 s = strchr(s + 1, '@');
4960 /* Check every object */
4961 for (i = 0; i < INVEN_TOTAL; ++i)
4963 object_type *o_ptr = &inventory[i];
4965 /* Skip non-objects */
4966 if (!o_ptr->k_idx) continue;
4968 /* Skip empty inscriptions */
4969 if (!o_ptr->inscription) continue;
4971 /* Skip non-choice */
4972 if (!item_tester_okay(o_ptr)) continue;
4975 s = strchr(quark_str(o_ptr->inscription), '@');
4977 /* Process all tags */
4980 /* Check the normal tags */
4981 if (s[1] == tag && !((s[2] >= '0' && s[2] <= '9') || (s[2] >= 'a' && s[2] <= 'z') || (s[2] >= 'A' && s[2] <= 'Z')))
4983 /* Save the actual inventory ID */
4990 /* Find another '@' */
4991 s = strchr(s + 1, '@');
5000 * Determine whether get_item() can get some item or not
5001 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
5003 bool can_get_item(void)
5005 int j, floor_list[23], floor_num = 0;
5007 for (j = 0; j < INVEN_TOTAL; j++)
5008 if (item_tester_okay(&inventory[j]))
5011 (void)scan_floor(floor_list, &floor_num, py, px, 0x01);
5019 * Let the user select an item, save its "index"
5021 * Return TRUE only if an acceptable item was chosen by the user.
5023 * The selected item must satisfy the "item_tester_hook()" function,
5024 * if that hook is set, and the "item_tester_tval", if that value is set.
5026 * All "item_tester" restrictions are cleared before this function returns.
5028 * The user is allowed to choose acceptable items from the equipment,
5029 * inventory, or floor, respectively, if the proper flag was given,
5030 * and there are any acceptable items in that location.
5032 * The equipment or inventory are displayed (even if no acceptable
5033 * items are in that location) if the proper flag was given.
5035 * If there are no acceptable items available anywhere, and "str" is
5036 * not NULL, then it will be used as the text of a warning message
5037 * before the function returns.
5039 * Note that the user must press "-" to specify the item on the floor,
5040 * and there is no way to "examine" the item on the floor, while the
5041 * use of "capital" letters will "examine" an inventory/equipment item,
5042 * and prompt for its use.
5044 * If a legal item is selected from the inventory, we save it in "cp"
5045 * directly (0 to 35), and return TRUE.
5047 * If a legal item is selected from the floor, we save it in "cp" as
5048 * a negative (-1 to -511), and return TRUE.
5050 * If no item is available, we do nothing to "cp", and we display a
5051 * warning message, using "str" if available, and return FALSE.
5053 * If no item is selected, we do nothing to "cp", and return FALSE.
5055 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
5056 * to allow the user to enter a command while viewing those screens, and
5057 * also to induce "auto-enter" of stores, and other such stuff.
5059 * Global "p_ptr->command_see" may be set before calling this function to start
5060 * out in "browse" mode. It is cleared before this function returns.
5062 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
5063 * If it is TRUE then we are viewing inventory, else equipment.
5065 * We always erase the prompt when we are done, leaving a blank line,
5066 * or a warning message, if appropriate, if no items are available.
5068 bool get_item(int *cp, cptr pmt, cptr str, int mode)
5070 s16b this_o_idx, next_o_idx = 0;
5072 char n1, n2, which = ' ';
5074 int j, k, i1, i2, e1, e2;
5084 bool allow_floor = FALSE;
5086 bool toggle = FALSE;
5092 extern bool select_spellbook;
5093 extern bool select_the_force;
5095 int menu_line = (use_menu ? 1 : 0);
5099 #ifdef ALLOW_EASY_FLOOR /* TNB */
5101 if (easy_floor) return get_item_floor(cp, pmt, str, mode);
5103 #endif /* ALLOW_EASY_FLOOR -- TNB */
5107 /* Get the item index */
5108 if (repeat_pull(cp))
5110 if (*cp == 1111) { /* the_force */
5111 item_tester_tval = 0;
5112 item_tester_hook = NULL;
5123 /* Acquire object */
5126 /* Validate the item */
5127 if (item_tester_okay(o_ptr))
5129 /* Forget the item_tester_tval restriction */
5130 item_tester_tval = 0;
5132 /* Forget the item_tester_hook restriction */
5133 item_tester_hook = NULL;
5140 /* Verify the item */
5141 else if (get_item_okay(*cp))
5143 /* Forget the item_tester_tval restriction */
5144 item_tester_tval = 0;
5146 /* Forget the item_tester_hook restriction */
5147 item_tester_hook = NULL;
5154 #endif /* ALLOW_REPEAT */
5157 if (mode & (USE_EQUIP)) equip = TRUE;
5158 if (mode & (USE_INVEN)) inven = TRUE;
5159 if (mode & (USE_FLOOR)) floor = TRUE;
5162 /* Paranoia XXX XXX XXX */
5169 /* No item selected */
5173 /* Full inventory */
5175 i2 = INVEN_PACK - 1;
5177 /* Forbid inventory */
5178 if (!inven) i2 = -1;
5181 for (j = 0; j < INVEN_PACK; j++)
5182 if (item_tester_okay(&inventory[j])) max_inven++;
5185 /* Restrict inventory indexes */
5186 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5187 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5190 /* Full equipment */
5192 e2 = INVEN_TOTAL - 1;
5194 /* Forbid equipment */
5195 if (!equip) e2 = -1;
5198 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5199 if (item_tester_okay(&inventory[j])) max_equip++;
5200 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5203 /* Restrict equipment indexes */
5204 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5205 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5209 /* Restrict floor usage */
5212 /* Scan all objects in the grid */
5213 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5217 /* Acquire object */
5218 o_ptr = &o_list[this_o_idx];
5220 /* Acquire next object */
5221 next_o_idx = o_ptr->next_o_idx;
5223 /* Accept the item on the floor if legal */
5224 if (item_tester_okay(o_ptr)) allow_floor = TRUE;
5229 /* Require at least one legal choice */
5230 if (!allow_floor && (i1 > i2) && (e1 > e2))
5232 /* Cancel p_ptr->command_see */
5233 command_see = FALSE;
5241 if (select_the_force) {
5247 /* Analyze choices */
5250 /* Hack -- Start on equipment if requested */
5251 if (command_see && command_wrk && equip)
5257 /* Use inventory if allowed */
5260 command_wrk = FALSE;
5263 /* Use equipment if allowed */
5269 /* Use inventory for floor */
5272 command_wrk = FALSE;
5278 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5280 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5282 /* Hack -- start out in "display" mode */
5290 /* Repeat until done */
5293 int get_item_label = 0;
5302 for (j = 0; j < 8; j++)
5305 if (!angband_term[j]) continue;
5307 /* Count windows displaying inven */
5308 if (window_flag[j] & (PW_INVEN)) ni++;
5310 /* Count windows displaying equip */
5311 if (window_flag[j] & (PW_EQUIP)) ne++;
5314 /* Toggle if needed */
5315 if ((command_wrk && ni && !ne) ||
5316 (!command_wrk && !ni && ne))
5319 toggle_inven_equip();
5326 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5328 /* Redraw windows */
5332 /* Inventory screen */
5335 /* Extract the legal requests */
5339 /* Redraw if needed */
5340 if (command_see) get_item_label = show_inven(menu_line);
5343 /* Equipment screen */
5346 /* Extract the legal requests */
5347 n1 = I2A(e1 - INVEN_RARM);
5348 n2 = I2A(e2 - INVEN_RARM);
5350 /* Redraw if needed */
5351 if (command_see) get_item_label = show_equip(menu_line);
5354 /* Viewing inventory */
5357 /* Begin the prompt */
5359 sprintf(out_val, "»ý¤Áʪ:");
5361 sprintf(out_val, "Inven:");
5365 /* Some legal items */
5366 if ((i1 <= i2) && !use_menu)
5368 /* Build the prompt */
5370 sprintf(tmp_val, "%c-%c,",
5372 sprintf(tmp_val, " %c-%c,",
5375 index_to_label(i1), index_to_label(i2));
5378 strcat(out_val, tmp_val);
5381 /* Indicate ability to "view" */
5383 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5385 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5391 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
5392 else if (select_the_force)
5393 strcat(out_val, " 'w'Îýµ¤½Ñ,");
5395 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
5396 else if (select_the_force)
5397 strcat(out_val, " w for the Force,");
5402 /* Viewing equipment */
5405 /* Begin the prompt */
5407 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5409 sprintf(out_val, "Equip:");
5413 /* Some legal items */
5414 if ((e1 <= e2) && !use_menu)
5416 /* Build the prompt */
5418 sprintf(tmp_val, "%c-%c,",
5420 sprintf(tmp_val, " %c-%c,",
5423 index_to_label(e1), index_to_label(e2));
5426 strcat(out_val, tmp_val);
5429 /* Indicate ability to "view" */
5431 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5433 if (!command_see) strcat(out_val, " * to see,");
5439 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
5441 if (inven) strcat(out_val, " / for Inven,");
5446 /* Indicate legality of the "floor" item */
5448 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
5450 if (allow_floor) strcat(out_val, " - for floor,");
5454 /* Finish the prompt */
5455 strcat(out_val, " ESC");
5457 /* Build the prompt */
5458 sprintf(tmp_val, "(%s) %s", out_val, pmt);
5460 /* Show the prompt */
5469 int max_line = (command_wrk ? max_equip : max_inven);
5485 menu_line += (max_line - 1);
5504 /* Verify legality */
5505 if (!inven || !equip)
5511 /* Hack -- Fix screen */
5521 /* Switch inven/equip */
5522 command_wrk = !command_wrk;
5523 max_line = (command_wrk ? max_equip : max_inven);
5524 if (menu_line > max_line) menu_line = max_line;
5526 /* Need to redraw */
5535 /* Validate the item */
5536 if (!get_item_okay(get_item_label))
5542 /* Allow player to "refuse" certain actions */
5543 if (!get_item_allow(get_item_label))
5549 /* Accept that choice */
5550 (*cp) = get_item_label;
5557 if (select_the_force) {
5565 if (menu_line > max_line) menu_line -= max_line;
5586 command_see = FALSE;
5606 /* Verify legality */
5607 if (!inven || !equip)
5613 /* Hack -- Fix screen */
5623 /* Switch inven/equip */
5624 command_wrk = !command_wrk;
5626 /* Need to redraw */
5632 /* Use floor item */
5635 /* Scan all objects in the grid */
5636 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5640 /* Acquire object */
5641 o_ptr = &o_list[this_o_idx];
5643 /* Acquire next object */
5644 next_o_idx = o_ptr->next_o_idx;
5646 /* Validate the item */
5647 if (!item_tester_okay(o_ptr)) continue;
5652 /* Verify the item (if required) */
5654 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
5656 if (other_query_flag && !verify("Try", k)) continue;
5660 /* Allow player to "refuse" certain actions */
5661 if (!get_item_allow(k)) continue;
5663 /* Accept that choice */
5680 case '1': case '2': case '3':
5681 case '4': case '5': case '6':
5682 case '7': case '8': case '9':
5684 /* Look up the tag */
5685 if (!get_tag(&k, which))
5691 /* Hack -- Validate the item */
5692 if ((k < INVEN_RARM) ? !inven : !equip)
5698 /* Validate the item */
5699 if (!get_item_okay(k))
5705 /* Allow player to "refuse" certain actions */
5706 if (!get_item_allow(k))
5712 /* Accept that choice */
5724 /* Choose "default" inventory item */
5727 k = ((i1 == i2) ? i1 : -1);
5730 /* Choose "default" equipment item */
5733 k = ((e1 == e2) ? e1 : -1);
5736 /* Validate the item */
5737 if (!get_item_okay(k))
5743 /* Allow player to "refuse" certain actions */
5744 if (!get_item_allow(k))
5750 /* Accept that choice */
5759 if (select_the_force) {
5771 if(select_spellbook){
5772 bool not_found = FALSE;
5773 /* Look up the tag */
5774 if (!get_tag(&k, which))
5779 /* Hack -- Validate the item */
5780 if ((k < INVEN_RARM) ? !inven : !equip)
5785 /* Validate the item */
5786 if (!get_item_okay(k))
5792 /* Accept that choice */
5800 /* Extract "query" setting */
5801 ver = isupper(which);
5802 which = tolower(which);
5804 /* Convert letter to inventory index */
5807 k = label_to_inven(which);
5810 /* Convert letter to equipment index */
5813 k = label_to_equip(which);
5816 /* Validate the item */
5817 if (!get_item_okay(k))
5823 /* Verify the item */
5825 if (ver && !verify("ËÜÅö¤Ë", k))
5827 if (ver && !verify("Try", k))
5835 /* Allow player to "refuse" certain actions */
5836 if (!get_item_allow(k))
5842 /* Accept that choice */
5853 /* Fix the screen if necessary */
5859 /* Hack -- Cancel "display" */
5860 command_see = FALSE;
5864 /* Forget the item_tester_tval restriction */
5865 item_tester_tval = 0;
5867 item_tester_no_ryoute = FALSE;
5869 /* Forget the item_tester_hook restriction */
5870 item_tester_hook = NULL;
5876 /* Toggle again if needed */
5877 if (toggle) toggle_inven_equip();
5880 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5887 /* Clear the prompt line */
5890 /* Warning if needed */
5891 if (oops && str) msg_print(str);
5894 if (item) repeat_push(*cp);
5895 #endif /* ALLOW_REPEAT */
5902 #ifdef ALLOW_EASY_FLOOR
5907 * Return a list of o_list[] indexes of items at the given cave
5908 * location. Valid flags are:
5910 * mode & 0x01 -- Item tester
5911 * mode & 0x02 -- Marked items only
5912 * mode & 0x04 -- Stop after first
5914 bool scan_floor(int *items, int *item_num, int y, int x, int mode)
5916 int this_o_idx, next_o_idx;
5923 if (!in_bounds(y, x)) return (FALSE);
5925 /* Scan all objects in the grid */
5926 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
5930 /* Acquire object */
5931 o_ptr = &o_list[this_o_idx];
5933 /* Acquire next object */
5934 next_o_idx = o_ptr->next_o_idx;
5937 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
5940 if ((mode & 0x02) && !o_ptr->marked) continue;
5942 /* Accept this item */
5943 items[num++] = this_o_idx;
5946 if (mode & 0x04) break;
5948 /* XXX Hack -- Enforce limit */
5949 if (num == 23) break;
5952 /* Number of items */
5960 * Display a list of the items on the floor at the given location.
5962 int show_floor(int target_item, int y, int x)
5969 char o_name[MAX_NLEN];
5975 char out_desc[23][MAX_NLEN];
5976 int target_item_label = 0;
5978 int floor_list[23], floor_num;
5982 Term_get_size(&wid, &hgt);
5984 /* Default length */
5987 /* Maximum space allowed for descriptions */
5990 /* Require space for weight (if needed) */
5991 if (show_weights) lim -= 9;
5993 /* Scan for objects in the grid, using item_tester_okay() */
5994 (void) scan_floor(floor_list, &floor_num, y, x, 0x01);
5996 /* Display the inventory */
5997 for (k = 0, i = 0; i < floor_num; i++)
5999 o_ptr = &o_list[floor_list[i]];
6001 /* Describe the object */
6002 object_desc(o_name, o_ptr, TRUE, 3);
6004 /* Hack -- enforce max length */
6007 /* Save the index */
6010 /* Acquire inventory color */
6011 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
6013 /* Save the object description */
6014 strcpy(out_desc[k], o_name);
6016 /* Find the predicted "line length" */
6017 l = strlen(out_desc[k]) + 5;
6019 /* Be sure to account for the weight */
6020 if (show_weights) l += 9;
6022 /* Maintain the maximum length */
6023 if (l > len) len = l;
6025 /* Advance to next "line" */
6029 /* Find the column to start in */
6030 col = (len > wid - 4) ? 0 : (wid - len - 1);
6032 /* Output each entry */
6033 for (j = 0; j < k; j++)
6036 i = floor_list[out_index[j]];
6041 /* Clear the line */
6042 prt("", j + 1, col ? col - 2 : col);
6044 if (use_menu && target_item)
6046 if (j == (target_item-1))
6049 strcpy(tmp_val, "¡Õ");
6051 strcpy(tmp_val, "> ");
6053 target_item_label = i;
6055 else strcpy(tmp_val, " ");
6058 /* Prepare an index --(-- */
6059 sprintf(tmp_val, "%c)", index_to_label(j));
6061 /* Clear the line with the (possibly indented) index */
6062 put_str(tmp_val, j + 1, col);
6064 /* Display the entry itself */
6065 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
6067 /* Display the weight if needed */
6070 int wgt = o_ptr->weight * o_ptr->number;
6072 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
6074 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
6077 put_str(tmp_val, j + 1, wid - 9);
6081 /* Make a "shadow" below the list (only if needed) */
6082 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
6084 return target_item_label;
6088 * This version of get_item() is called by get_item() when
6089 * the easy_floor is on.
6091 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
6093 char n1 = ' ', n2 = ' ', which = ' ';
6095 int j, k, i1, i2, e1, e2;
6105 bool allow_equip = FALSE;
6106 bool allow_inven = FALSE;
6107 bool allow_floor = FALSE;
6109 bool toggle = FALSE;
6114 int floor_num, floor_list[23], floor_top = 0;
6116 extern bool select_spellbook;
6117 extern bool select_the_force;
6119 int menu_line = (use_menu ? 1 : 0);
6125 /* Get the item index */
6126 if (repeat_pull(cp))
6128 if (*cp == 1111) { /* the_force */
6129 item_tester_tval = 0;
6130 item_tester_hook = NULL;
6141 /* Acquire object */
6144 /* Validate the item */
6145 if (item_tester_okay(o_ptr))
6147 /* Forget the item_tester_tval restriction */
6148 item_tester_tval = 0;
6150 /* Forget the item_tester_hook restriction */
6151 item_tester_hook = NULL;
6158 /* Verify the item */
6159 else if (get_item_okay(*cp))
6161 /* Forget the item_tester_tval restriction */
6162 item_tester_tval = 0;
6164 /* Forget the item_tester_hook restriction */
6165 item_tester_hook = NULL;
6172 #endif /* ALLOW_REPEAT */
6175 if (mode & (USE_EQUIP)) equip = TRUE;
6176 if (mode & (USE_INVEN)) inven = TRUE;
6177 if (mode & (USE_FLOOR)) floor = TRUE;
6180 /* Paranoia XXX XXX XXX */
6187 /* No item selected */
6191 /* Full inventory */
6193 i2 = INVEN_PACK - 1;
6195 /* Forbid inventory */
6196 if (!inven) i2 = -1;
6199 for (j = 0; j < INVEN_PACK; j++)
6200 if (item_tester_okay(&inventory[j])) max_inven++;
6203 /* Restrict inventory indexes */
6204 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
6205 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
6208 /* Full equipment */
6210 e2 = INVEN_TOTAL - 1;
6212 /* Forbid equipment */
6213 if (!equip) e2 = -1;
6216 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
6217 if (item_tester_okay(&inventory[j])) max_equip++;
6218 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
6221 /* Restrict equipment indexes */
6222 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
6223 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
6226 /* Count "okay" floor items */
6229 /* Restrict floor usage */
6232 /* Scan all objects in the grid */
6233 (void) scan_floor(floor_list, &floor_num, py, px, 0x01);
6236 /* Accept inventory */
6237 if (i1 <= i2) allow_inven = TRUE;
6239 /* Accept equipment */
6240 if (e1 <= e2) allow_equip = TRUE;
6243 if (floor_num) allow_floor = TRUE;
6245 /* Require at least one legal choice */
6246 if (!allow_inven && !allow_equip && !allow_floor)
6248 /* Cancel p_ptr->command_see */
6249 command_see = FALSE;
6257 if (select_the_force) {
6263 /* Analyze choices */
6266 /* Hack -- Start on equipment if requested */
6267 if (command_see && (command_wrk == (USE_EQUIP))
6270 command_wrk = (USE_EQUIP);
6273 /* Use inventory if allowed */
6274 else if (allow_inven)
6276 command_wrk = (USE_INVEN);
6279 /* Use equipment if allowed */
6280 else if (allow_equip)
6282 command_wrk = (USE_EQUIP);
6285 /* Use floor if allowed */
6286 else if (allow_floor)
6288 command_wrk = (USE_FLOOR);
6293 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
6295 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
6297 /* Hack -- start out in "display" mode */
6304 /* Repeat until done */
6307 int get_item_label = 0;
6316 for (j = 0; j < 8; j++)
6319 if (!angband_term[j]) continue;
6321 /* Count windows displaying inven */
6322 if (window_flag[j] & (PW_INVEN)) ni++;
6324 /* Count windows displaying equip */
6325 if (window_flag[j] & (PW_EQUIP)) ne++;
6328 /* Toggle if needed */
6329 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
6330 (command_wrk == (USE_INVEN) && !ni && ne))
6333 toggle_inven_equip();
6340 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6342 /* Redraw windows */
6346 /* Inventory screen */
6347 if (command_wrk == (USE_INVEN))
6349 /* Extract the legal requests */
6353 /* Redraw if needed */
6354 if (command_see) get_item_label = show_inven(menu_line);
6357 /* Equipment screen */
6358 else if (command_wrk == (USE_EQUIP))
6360 /* Extract the legal requests */
6361 n1 = I2A(e1 - INVEN_RARM);
6362 n2 = I2A(e2 - INVEN_RARM);
6364 /* Redraw if needed */
6365 if (command_see) get_item_label = show_equip(menu_line);
6369 else if (command_wrk == (USE_FLOOR))
6372 k = MIN(floor_top + 23, floor_num) - 1;
6374 /* Extract the legal requests */
6375 n1 = I2A(j - floor_top);
6376 n2 = I2A(k - floor_top);
6378 /* Redraw if needed */
6379 if (command_see) get_item_label = show_floor(menu_line, py, px);
6382 /* Viewing inventory */
6383 if (command_wrk == (USE_INVEN))
6385 /* Begin the prompt */
6387 sprintf(out_val, "»ý¤Áʪ:");
6389 sprintf(out_val, "Inven:");
6394 /* Build the prompt */
6396 sprintf(tmp_val, "%c-%c,",
6398 sprintf(tmp_val, " %c-%c,",
6401 index_to_label(i1), index_to_label(i2));
6404 strcat(out_val, tmp_val);
6407 /* Indicate ability to "view" */
6409 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6411 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6422 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
6424 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6426 else strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
6428 else if (select_the_force)
6429 strcat(out_val, " 'w'Îýµ¤½Ñ,");
6436 strcat(out_val, " 6 for Equip,");
6438 strcat(out_val, " 4 or 6 for Equip,");
6440 else strcat(out_val, " / for Equip,");
6442 else if (select_the_force)
6443 strcat(out_val, " w for the Force,");
6453 strcat(out_val, " '4' ¾²¾å,");
6455 strcat(out_val, " '4'or'6' ¾²¾å,");
6457 else strcat(out_val, " '-'¾²¾å,");
6460 if (allow_floor) strcat(out_val, " - for floor,");
6465 /* Viewing equipment */
6466 else if (command_wrk == (USE_EQUIP))
6468 /* Begin the prompt */
6470 sprintf(out_val, "ÁõÈ÷ÉÊ:");
6472 sprintf(out_val, "Equip:");
6478 /* Build the prompt */
6480 sprintf(tmp_val, "%c-%c,",
6482 sprintf(tmp_val, " %c-%c,",
6485 index_to_label(e1), index_to_label(e2));
6488 strcat(out_val, tmp_val);
6491 /* Indicate ability to "view" */
6493 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6495 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6506 strcat(out_val, " '4' »ý¤Áʪ,");
6508 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6510 else strcat(out_val, " '/' »ý¤Áʪ,");
6513 if (allow_inven) strcat(out_val, " / for Inven,");
6524 strcat(out_val, " '6' ¾²¾å,");
6526 strcat(out_val, " '4'or'6' ¾²¾å,");
6528 else strcat(out_val, " '-'¾²¾å,");
6531 if (allow_floor) strcat(out_val, " - for floor,");
6537 else if (command_wrk == (USE_FLOOR))
6539 /* Begin the prompt */
6541 sprintf(out_val, "¾²¾å:");
6543 sprintf(out_val, "Floor:");
6549 /* Build the prompt */
6551 sprintf(tmp_val, "%c-%c,", n1, n2);
6553 sprintf(tmp_val, " %c-%c,", n1, n2);
6558 strcat(out_val, tmp_val);
6561 /* Indicate ability to "view" */
6563 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6565 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6571 if (allow_inven && allow_equip)
6574 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
6576 strcat(out_val, " / for Inven,");
6580 else if (allow_inven)
6583 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6585 strcat(out_val, " / for Inven,");
6589 else if (allow_equip)
6592 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6594 strcat(out_val, " / for Equip,");
6600 else if (allow_inven)
6603 strcat(out_val, " '/' »ý¤Áʪ,");
6605 strcat(out_val, " / for Inven,");
6609 else if (allow_equip)
6612 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6614 strcat(out_val, " / for Equip,");
6620 /* Finish the prompt */
6621 strcat(out_val, " ESC");
6623 /* Build the prompt */
6624 sprintf(tmp_val, "(%s) %s", out_val, pmt);
6626 /* Show the prompt */
6635 if (command_wrk == USE_INVEN) max_line = max_inven;
6636 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6637 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6653 menu_line += (max_line - 1);
6669 /* Verify legality */
6670 if (command_wrk == (USE_INVEN))
6672 if (allow_floor) command_wrk = USE_FLOOR;
6673 else if (allow_equip) command_wrk = USE_EQUIP;
6680 else if (command_wrk == (USE_EQUIP))
6682 if (allow_inven) command_wrk = USE_INVEN;
6683 else if (allow_floor) command_wrk = USE_FLOOR;
6690 else if (command_wrk == (USE_FLOOR))
6692 if (allow_equip) command_wrk = USE_EQUIP;
6693 else if (allow_inven) command_wrk = USE_INVEN;
6706 /* Hack -- Fix screen */
6716 /* Switch inven/equip */
6717 if (command_wrk == USE_INVEN) max_line = max_inven;
6718 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6719 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6720 if (menu_line > max_line) menu_line = max_line;
6722 /* Need to redraw */
6730 /* Verify legality */
6731 if (command_wrk == (USE_INVEN))
6733 if (allow_equip) command_wrk = USE_EQUIP;
6734 else if (allow_floor) command_wrk = USE_FLOOR;
6741 else if (command_wrk == (USE_EQUIP))
6743 if (allow_floor) command_wrk = USE_FLOOR;
6744 else if (allow_inven) command_wrk = USE_INVEN;
6751 else if (command_wrk == (USE_FLOOR))
6753 if (allow_inven) command_wrk = USE_INVEN;
6754 else if (allow_equip) command_wrk = USE_EQUIP;
6767 /* Hack -- Fix screen */
6777 /* Switch inven/equip */
6778 if (command_wrk == USE_INVEN) max_line = max_inven;
6779 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6780 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6781 if (menu_line > max_line) menu_line = max_line;
6783 /* Need to redraw */
6792 /* Validate the item */
6793 if (!get_item_okay(get_item_label))
6799 /* Allow player to "refuse" certain actions */
6800 if (!get_item_allow(get_item_label))
6806 /* Accept that choice */
6807 (*cp) = get_item_label;
6814 if (select_the_force) {
6822 if (menu_line > max_line) menu_line -= max_line;
6843 command_see = FALSE;
6863 if (command_wrk == (USE_INVEN))
6870 command_wrk = (USE_EQUIP);
6872 else if (command_wrk == (USE_EQUIP))
6879 command_wrk = (USE_INVEN);
6881 else if (command_wrk == (USE_FLOOR))
6885 command_wrk = (USE_INVEN);
6887 else if (allow_equip)
6889 command_wrk = (USE_EQUIP);
6898 /* Hack -- Fix screen */
6908 /* Need to redraw */
6921 * If we are already examining the floor, and there
6922 * is only one item, we will always select it.
6923 * If we aren't examining the floor and there is only
6924 * one item, we will select it if floor_query_flag
6929 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
6932 k = 0 - floor_list[0];
6934 /* Allow player to "refuse" certain actions */
6935 if (!get_item_allow(k))
6941 /* Accept that choice */
6950 /* Hack -- Fix screen */
6960 command_wrk = (USE_FLOOR);
6966 case '1': case '2': case '3':
6967 case '4': case '5': case '6':
6968 case '7': case '8': case '9':
6970 /* Look up the tag */
6971 if (!get_tag(&k, which))
6977 /* Hack -- Validate the item */
6978 if ((k < INVEN_RARM) ? !inven : !equip)
6984 /* Validate the item */
6985 if (!get_item_okay(k))
6991 /* Allow player to "refuse" certain actions */
6992 if (!get_item_allow(k))
6998 /* Accept that choice */
7010 /* Choose "default" inventory item */
7011 if (command_wrk == (USE_INVEN))
7013 k = ((i1 == i2) ? i1 : -1);
7016 /* Choose "default" equipment item */
7017 else if (command_wrk == (USE_EQUIP))
7019 k = ((e1 == e2) ? e1 : -1);
7022 /* Choose "default" floor item */
7023 else if (command_wrk == (USE_FLOOR))
7028 k = 0 - floor_list[0];
7030 /* Allow player to "refuse" certain actions */
7031 if (!get_item_allow(k))
7037 /* Accept that choice */
7045 /* Validate the item */
7046 if (!get_item_okay(k))
7052 /* Allow player to "refuse" certain actions */
7053 if (!get_item_allow(k))
7059 /* Accept that choice */
7068 if (select_the_force) {
7080 if(select_spellbook){
7081 bool not_found = FALSE;
7082 /* Look up the tag */
7083 if (!get_tag(&k, which))
7088 /* Hack -- Validate the item */
7089 if ((k < INVEN_RARM) ? !inven : !equip)
7094 /* Validate the item */
7095 if (!get_item_okay(k))
7101 /* Accept that choice */
7109 /* Extract "query" setting */
7110 ver = isupper(which);
7111 which = tolower(which);
7113 /* Convert letter to inventory index */
7114 if (command_wrk == (USE_INVEN))
7116 k = label_to_inven(which);
7119 /* Convert letter to equipment index */
7120 else if (command_wrk == (USE_EQUIP))
7122 k = label_to_equip(which);
7125 /* Convert letter to floor index */
7126 else if (command_wrk == USE_FLOOR)
7128 k = islower(which) ? A2I(which) : -1;
7129 if (k < 0 || k >= floor_num)
7136 k = 0 - floor_list[k];
7139 /* Validate the item */
7140 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
7146 /* Verify the item */
7148 if (ver && !verify("ËÜÅö¤Ë", k))
7150 if (ver && !verify("Try", k))
7158 /* Allow player to "refuse" certain actions */
7159 if (!get_item_allow(k))
7165 /* Accept that choice */
7175 /* Fix the screen if necessary */
7181 /* Hack -- Cancel "display" */
7182 command_see = FALSE;
7186 /* Forget the item_tester_tval restriction */
7187 item_tester_tval = 0;
7189 /* Forget the item_tester_hook restriction */
7190 item_tester_hook = NULL;
7196 /* Toggle again if needed */
7197 if (toggle) toggle_inven_equip();
7200 p_ptr->window |= (PW_INVEN | PW_EQUIP);
7207 /* Clear the prompt line */
7210 /* Warning if needed */
7211 if (oops && str) msg_print(str);
7214 if (item) repeat_push(*cp);
7215 #endif /* ALLOW_REPEAT */
7222 bool py_pickup_floor_aux(void)
7232 /* Restrict the choices */
7233 item_tester_hook = inven_carry_okay;
7237 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
7238 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
7240 q = "Get which item? ";
7241 s = "You no longer have any room for the objects on the floor.";
7244 if (get_item(&item, q, s, (USE_FLOOR)))
7246 this_o_idx = 0 - item;
7253 /* Access the object */
7254 o_ptr = &o_list[this_o_idx];
7256 /* Pick up the object */
7257 py_pickup_aux(this_o_idx);
7264 * Make the player carry everything in a grid
7266 * If "pickup" is FALSE then only gold will be picked up
7268 * This is called by py_pickup() when easy_floor is TRUE.
7270 void py_pickup_floor(int pickup)
7272 s16b this_o_idx, next_o_idx = 0;
7274 char o_name[MAX_NLEN];
7277 int floor_num = 0, floor_list[23], floor_o_idx = 0;
7281 /* Scan the pile of objects */
7282 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
7286 /* Access the object */
7287 o_ptr = &o_list[this_o_idx];
7289 /* Describe the object */
7290 object_desc(o_name, o_ptr, TRUE, 3);
7292 /* Access the next object */
7293 next_o_idx = o_ptr->next_o_idx;
7295 /* Hack -- disturb */
7299 if (o_ptr->tval == TV_GOLD)
7303 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
7304 (long)o_ptr->pval, o_name);
7306 msg_format("You have found %ld gold pieces worth of %s.",
7307 (long) o_ptr->pval, o_name);
7311 /* Collect the gold */
7312 p_ptr->au += o_ptr->pval;
7315 p_ptr->redraw |= (PR_GOLD);
7318 p_ptr->window |= (PW_PLAYER);
7320 /* Delete the gold */
7321 delete_object_idx(this_o_idx);
7323 /* Check the next object */
7327 /* Count non-gold objects that can be picked up. */
7328 if (inven_carry_okay(o_ptr))
7333 /* Remember this object index */
7334 floor_list[floor_num] = this_o_idx;
7336 /* Count non-gold objects */
7339 if (floor_num == 23) break;
7341 /* Remember this index */
7342 floor_o_idx = this_o_idx;
7345 /* There are no non-gold objects */
7349 /* Mention the number of objects */
7355 /* Access the object */
7356 o_ptr = &o_list[floor_o_idx];
7358 #ifdef ALLOW_EASY_SENSE
7360 /* Option: Make object sensing easy */
7363 /* Sense the object */
7364 (void) sense_object(o_ptr);
7367 #endif /* ALLOW_EASY_SENSE */
7369 /* Describe the object */
7370 object_desc(o_name, o_ptr, TRUE, 3);
7374 msg_format("%s¤¬¤¢¤ë¡£", o_name);
7376 msg_format("You see %s.", o_name);
7381 /* Multiple objects */
7386 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
7388 msg_format("You see a pile of %d items.", floor_num);
7397 /* The player has no room for anything on the floor. */
7403 /* Access the object */
7404 o_ptr = &o_list[floor_o_idx];
7406 #ifdef ALLOW_EASY_SENSE
7408 /* Option: Make object sensing easy */
7411 /* Sense the object */
7412 (void) sense_object(o_ptr);
7415 #endif /* ALLOW_EASY_SENSE */
7417 /* Describe the object */
7418 object_desc(o_name, o_ptr, TRUE, 3);
7422 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7424 msg_format("You have no room for %s.", o_name);
7429 /* Multiple objects */
7434 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7436 msg_print("You have no room for any of the objects on the floor.");
7448 /* Hack -- query every object */
7449 if (carry_query_flag)
7451 char out_val[MAX_NLEN+20];
7453 /* Access the object */
7454 o_ptr = &o_list[floor_o_idx];
7456 #ifdef ALLOW_EASY_SENSE
7458 /* Option: Make object sensing easy */
7461 /* Sense the object */
7462 (void) sense_object(o_ptr);
7465 #endif /* ALLOW_EASY_SENSE */
7467 /* Describe the object */
7468 object_desc(o_name, o_ptr, TRUE, 3);
7470 /* Build a prompt */
7472 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7474 (void) sprintf(out_val, "Pick up %s? ", o_name);
7478 /* Ask the user to confirm */
7479 if (!get_check(out_val))
7486 /* Access the object */
7487 o_ptr = &o_list[floor_o_idx];
7489 #ifdef ALLOW_EASY_SENSE
7491 /* Option: Make object sensing easy */
7494 /* Sense the object */
7495 (void) sense_object(o_ptr);
7498 #endif /* ALLOW_EASY_SENSE */
7500 /* Pick up the object */
7501 py_pickup_aux(floor_o_idx);
7504 /* Allow the user to choose an object */
7507 while (can_pickup--)
7509 if (!py_pickup_floor_aux()) break;
7514 #endif /* ALLOW_EASY_FLOOR */