4 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
6 * This software may be copied and distributed for educational, research,
7 * and not for profit purposes provided that this copyright and statement
8 * are included in all such copies. Other copyrights may also apply.
11 /* Purpose: Object code, part 1 */
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 flgs[TR_FLAG_SIZE])
104 object_kind *k_ptr = &k_info[o_ptr->k_idx];
108 for (i = 0; i < TR_FLAG_SIZE; i++)
109 flgs[i] = k_ptr->flags[i];
114 artifact_type *a_ptr = &a_info[o_ptr->name1];
116 for (i = 0; i < TR_FLAG_SIZE; i++)
117 flgs[i] = a_ptr->flags[i];
123 ego_item_type *e_ptr = &e_info[o_ptr->name2];
125 for (i = 0; i < TR_FLAG_SIZE; i++)
126 flgs[i] |= e_ptr->flags[i];
128 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
130 remove_flag(flgs, TR_SH_FIRE);
132 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
134 remove_flag(flgs, TR_INFRA);
136 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
138 remove_flag(flgs, TR_RES_BLIND);
139 remove_flag(flgs, TR_SEE_INVIS);
143 /* Random artifact ! */
144 for (i = 0; i < TR_FLAG_SIZE; i++)
145 flgs[i] |= o_ptr->art_flags[i];
147 if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
149 int add = o_ptr->xtra3 - 1;
151 if (add < TR_FLAG_MAX)
155 else if (add == ESSENCE_TMP_RES_ACID)
157 add_flag(flgs, TR_RES_ACID);
158 add_flag(flgs, TR_ACTIVATE);
160 else if (add == ESSENCE_TMP_RES_ELEC)
162 add_flag(flgs, TR_RES_ELEC);
163 add_flag(flgs, TR_ACTIVATE);
165 else if (add == ESSENCE_TMP_RES_FIRE)
167 add_flag(flgs, TR_RES_FIRE);
168 add_flag(flgs, TR_ACTIVATE);
170 else if (add == ESSENCE_TMP_RES_COLD)
172 add_flag(flgs, TR_RES_COLD);
173 add_flag(flgs, TR_ACTIVATE);
175 else if (add == ESSENCE_SH_FIRE)
177 add_flag(flgs, TR_RES_FIRE);
178 add_flag(flgs, TR_SH_FIRE);
180 else if (add == ESSENCE_SH_ELEC)
182 add_flag(flgs, TR_RES_ELEC);
183 add_flag(flgs, TR_SH_ELEC);
185 else if (add == ESSENCE_SH_COLD)
187 add_flag(flgs, TR_RES_COLD);
188 add_flag(flgs, TR_SH_COLD);
190 else if (add == ESSENCE_RESISTANCE)
192 add_flag(flgs, TR_RES_ACID);
193 add_flag(flgs, TR_RES_ELEC);
194 add_flag(flgs, TR_RES_FIRE);
195 add_flag(flgs, TR_RES_COLD);
197 else if (add == TR_IMPACT)
199 add_flag(flgs, TR_ACTIVATE);
207 * Obtain the "flags" for an item which are known to the player
209 void object_flags_known(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
214 object_kind *k_ptr = &k_info[o_ptr->k_idx];
217 for (i = 0; i < TR_FLAG_SIZE; i++)
220 if (!object_aware_p(o_ptr)) return;
223 for (i = 0; i < TR_FLAG_SIZE; i++)
224 flgs[i] = k_ptr->flags[i];
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 for (i = 0; i < TR_FLAG_SIZE; i++)
235 flgs[i] |= e_ptr->flags[i];
237 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
239 remove_flag(flgs, TR_SH_FIRE);
241 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
243 remove_flag(flgs, TR_INFRA);
245 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
247 remove_flag(flgs, TR_RES_BLIND);
248 remove_flag(flgs, TR_SEE_INVIS);
253 #ifdef SPOIL_ARTIFACTS
254 /* Full knowledge for some artifacts */
255 if (artifact_p(o_ptr) || o_ptr->art_name) spoil = TRUE;
256 #endif /* SPOIL_ARTIFACTS */
258 #ifdef SPOIL_EGO_ITEMS
259 /* Full knowledge for some ego-items */
260 if (ego_item_p(o_ptr)) spoil = TRUE;
261 #endif /* SPOIL_EGO_ITEMS */
263 /* Need full knowledge or spoilers */
264 if (spoil || (o_ptr->ident & IDENT_MENTAL))
269 artifact_type *a_ptr = &a_info[o_ptr->name1];
271 for (i = 0; i < TR_FLAG_SIZE; i++)
272 flgs[i] = a_ptr->flags[i];
275 /* Random artifact ! */
276 for (i = 0; i < TR_FLAG_SIZE; i++)
277 flgs[i] |= o_ptr->art_flags[i];
280 if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
282 int add = o_ptr->xtra3 - 1;
284 if (add < TR_FLAG_MAX)
288 else if (add == ESSENCE_TMP_RES_ACID)
290 add_flag(flgs, TR_RES_ACID);
292 else if (add == ESSENCE_TMP_RES_ELEC)
294 add_flag(flgs, TR_RES_ELEC);
296 else if (add == ESSENCE_TMP_RES_FIRE)
298 add_flag(flgs, TR_RES_FIRE);
300 else if (add == ESSENCE_TMP_RES_COLD)
302 add_flag(flgs, TR_RES_COLD);
304 else if (add == ESSENCE_SH_FIRE)
306 add_flag(flgs, TR_RES_FIRE);
307 add_flag(flgs, TR_SH_FIRE);
309 else if (add == ESSENCE_SH_ELEC)
311 add_flag(flgs, TR_RES_ELEC);
312 add_flag(flgs, TR_SH_ELEC);
314 else if (add == ESSENCE_SH_COLD)
316 add_flag(flgs, TR_RES_COLD);
317 add_flag(flgs, TR_SH_COLD);
319 else if (add == ESSENCE_RESISTANCE)
321 add_flag(flgs, TR_RES_ACID);
322 add_flag(flgs, TR_RES_ELEC);
323 add_flag(flgs, TR_RES_FIRE);
324 add_flag(flgs, TR_RES_COLD);
331 * Hack -- describe an item currently in a store's inventory
332 * This allows an item to *look* like the player is "aware" of it
334 void object_desc_store(char *buf, object_type *o_ptr, int pref, int mode)
336 /* Save the "aware" flag */
337 bool hack_aware = object_aware_p(o_ptr);
339 /* Save the "known" flag */
340 bool hack_known = (o_ptr->ident & (IDENT_KNOWN)) ? TRUE : FALSE;
343 /* Set the "known" flag */
344 o_ptr->ident |= (IDENT_KNOWN);
346 /* Force "aware" for description */
347 k_info[o_ptr->k_idx].aware = TRUE;
350 /* Describe the object */
351 object_desc(buf, o_ptr, pref, mode);
354 /* Restore "aware" flag */
355 k_info[o_ptr->k_idx].aware = hack_aware;
357 /* Clear the known flag */
358 if (!hack_known) o_ptr->ident &= ~(IDENT_KNOWN);
365 * Determine the "Activation" (if any) for an artifact
366 * Return a string, or NULL for "no activation"
368 cptr item_activation(object_type *o_ptr)
370 u32b flgs[TR_FLAG_SIZE];
372 /* Extract the flags */
373 object_flags(o_ptr, flgs);
375 /* Require activation ability */
377 if (!(have_flag(flgs, TR_ACTIVATE))) return ("¤Ê¤·");
379 if (!(have_flag(flgs, TR_ACTIVATE))) return ("nothing");
385 * We need to deduce somehow that it is a random artifact -- one
386 * problem: It could be a random artifact which has NOT YET received
387 * a name. Thus we eliminate other possibilities instead of checking
391 if (!(o_ptr->name1) &&
396 switch (o_ptr->xtra2)
401 return "ÂÀÍÛ¸÷Àþ : 10 ¥¿¡¼¥óËè";
403 return "beam of sunlight every 10 turns";
410 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
412 return "magic missile (2d6) every 2 turns";
419 return "°½±À (12), Ⱦ·Â 3 , 4+d4 ¥¿¡¼¥óËè";
421 return "stinking cloud (12), rad. 3, every 4+d4 turns";
428 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
430 return "lightning bolt (4d8) every 5+d5 turns";
437 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
439 return "acid bolt (5d8) every 6+d6 turns";
446 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
448 return "frost bolt (6d8) every 7+d7 turns";
455 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
457 return "fire bolt (9d8) every 8+d8 turns";
464 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (48) : 400 ¥¿¡¼¥óËè";
466 return "ball of cold (48) every 400 turns";
473 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (72) : 400 ¥¿¡¼¥óËè";
475 return "ball of fire (72) every 400 turns";
482 return "¥Ò¥Ã¥È¥Ý¥¤¥ó¥ÈµÛ¼ý (100) : 100+d100 ¥¿¡¼¥óËè";
484 return "drain life (100) every 100+d100 turns";
491 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 300 ¥¿¡¼¥óËè";
493 return "ball of cold (100) every 300 turns";
500 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 500 ¥¿¡¼¥óËè";
502 return "ball of lightning (100) every 500 turns";
509 return "¥Ò¥Ã¥È¥Ý¥¤¥ó¥ÈµÛ¼ý(120) : 400 ¥¿¡¼¥óËè";
511 return "drain life (120) every 400 turns";
518 return "µÛ·ì¥É¥ì¥¤¥ó (3*50) : 400 ¥¿¡¼¥óËè";
520 return "vampiric drain (3*50) every 400 turns";
527 return "Ìð (150) : 90+d90 ¥¿¡¼¥óËè";
529 return "arrows (150) every 90+d90 turns";
536 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (120) : 225+d225 ¥¿¡¼¥óËè";
538 return "fire ball (120) every 225+d225 turns";
545 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (200) : 325+d325 ¥¿¡¼¥óËè";
547 return "ball of cold (200) every 325+d325 turns";
554 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (250) : 425+d425 ¥¿¡¼¥óËè";
556 return "ball of lightning (250) every 425+d425 turns";
563 return "¥«¥Þ¥¤¥¿¥Á : 250 ¥¿¡¼¥óËè";
565 return "whirlwind attack every 250 turns";
572 return "µÛ·ì¥É¥ì¥¤¥ó (3*100) : 400 ¥¿¡¼¥óËè";
574 return "vampiric drain (3*100) every 400 turns";
581 return "call chaos : 350 ¥¿¡¼¥óËè"; /*nuke me*/
583 return "call chaos every 350 turns";
590 return "¥í¥±¥Ã¥È (120+level) : 400 ¥¿¡¼¥óËè";
592 return "launch rocket (120+level) every 400 turns";
599 return "¼Ù°Â໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
601 return "dispel evil (level*5) every 300+d300 turns";
608 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300) : 500 ¥¿¡¼¥óËè";
610 return "elemental breath (300) every 500 turns";
617 return "Á±ÎÉÂ໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
619 return "dispel good (level*5) every 300+d300 turns";
626 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
628 return "confuse monster every 15 turns";
635 return "¼þ°Ï¤Î¥â¥ó¥¹¥¿¡¼¤ò̲¤é¤»¤ë : 55 ¥¿¡¼¥óËè";
637 return "sleep nearby monsters every 55 turns";
644 return "ÃÏ¿Ì (Ⱦ·Â 10) : 50 ¥¿¡¼¥óËè";
646 return "earthquake (rad 10) every 50 turns";
653 return "¶²¹² : 3 * (level+10) ¥¿¡¼¥óËè";
655 return "terror every 3 * (level+10) turns";
662 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
664 return "teleport away every 200 turns";
668 case ACT_BANISH_EVIL:
671 return "¼Ù°¾ÃÌÇ : 250+d250 ¥¿¡¼¥óËè";
673 return "banish evil every 250+d250 turns";
680 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
682 return "genocide every 500 turns";
689 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
691 return "mass genocide every 1000 turns";
695 case ACT_CHARM_ANIMAL:
698 return "ưʪ̥λ : 300 ¥¿¡¼¥óËè";
700 return "charm animal every 300 turns";
704 case ACT_CHARM_UNDEAD:
707 return "ÉԻཾ° : 333 ¥¿¡¼¥óËè";
709 return "enslave undead every 333 turns";
713 case ACT_CHARM_OTHER:
716 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 400 ¥¿¡¼¥óËè";
718 return "charm monster every 400 turns";
722 case ACT_CHARM_ANIMALS:
725 return "ưʪͧÏ : 500 ¥¿¡¼¥óËè";
727 return "animal friendship every 500 turns";
731 case ACT_CHARM_OTHERS:
734 return "¼þÊÕ̥λ : 750 ¥¿¡¼¥óËè";
736 return "mass charm every 750 turns";
740 case ACT_SUMMON_ANIMAL:
743 return "ưʪ¾¤´ : 200+d300 ¥¿¡¼¥óËè";
745 return "summon animal every 200+d300 turns";
749 case ACT_SUMMON_PHANTOM:
752 return "»È¤¤Î´ : 200+d200 ¥¿¡¼¥óËè";
754 return "summon phantasmal servant every 200+d200 turns";
758 case ACT_SUMMON_ELEMENTAL:
761 return "¥¨¥ì¥á¥ó¥¿¥ë¾¤´ : 750 ¥¿¡¼¥óËè";
763 return "summon elemental every 750 turns";
767 case ACT_SUMMON_DEMON:
770 return "°Ë⾤´ : 666+d333 ¥¿¡¼¥óËè";
772 return "summon demon every 666+d333 turns";
776 case ACT_SUMMON_UNDEAD:
779 return "ÉԻྤ´ : 666+d333 ¥¿¡¼¥óËè";
781 return "summon undead every 666+d333 turns";
788 return "ͦµ¤²óÉü & 30 hp ²óÉü : 10 ¥¿¡¼¥óËè";
790 return "remove fear & heal 30 hp every 10 turns";
797 return "4d8 hp & ½ý²óÉü : 3+d3 ¥¿¡¼¥óËè";
799 return "heal 4d8 & wounds every 3+d3 turns";
803 case ACT_CURE_POISON:
806 return "ͦµ¤²óÉü/ÆǾä· : 5 ¥¿¡¼¥óËè";
808 return "remove fear and cure poison every 5 turns";
815 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
817 return "restore life levels every 450 turns";
824 return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃͲóÉü : 750 ¥¿¡¼¥óËè";
826 return "restore stats and life levels every 750 turns";
833 return "700 hp ²óÉü : 250 ¥¿¡¼¥óËè";
835 return "heal 700 hit points every 250 turns";
842 return "1000 hp ²óÉü : 888 ¥¿¡¼¥óËè";
844 return "heal 1000 hit points every 888 turns";
851 return "°ì»þŪ¤Ê ESP (´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
853 return "temporary ESP (dur 25+d30) every 200 turns";
860 return "»Îµ¤¹âÍȤȽËÊ¡ (´ü´Ö 50+d50) : 100+d100 ¥¿¡¼¥óËè";
862 return "heroism and blessed (dur 50+d50) every 100+d100 turns";
869 return "Âмٰ·ë³¦ (´ü´Ö level*3 + d25) : 225+d225 ¥¿¡¼¥óËè";
871 return "protect evil (dur level*3 + d25) every 225+d225 turns";
878 return "±êÎä»ÀÅÅÆǤؤÎÂÑÀ (´ü´Ö 40+d40) : 200 ¥¿¡¼¥óËè";
880 return "resist elements (dur 40+d40) every 200 turns";
887 return "²Ã® (´ü´Ö 20+d20) : 250 ¥¿¡¼¥óËè";
889 return "speed (dur 20+d20) every 250 turns";
896 return "²Ã® (´ü´Ö 75+d75) : 200+d200 ¥¿¡¼¥óËè";
898 return "speed (dur 75+d75) every 200+d200 turns";
905 return "¥ì¥¤¥¹²½ (level/2 + d(level/2)) : 1000 ¥¿¡¼¥óËè";
907 return "wraith form (level/2 + d(level/2)) every 1000 turns";
914 return "̵Ũ (´ü´Ö 8+d8) : 1000 ¥¿¡¼¥óËè";
916 return "invulnerability (dur 8+d8) every 1000 turns";
923 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) : 10+d10 ¥¿¡¼¥óËè";
925 return "light area (dam 2d15) every 10+d10 turns";
932 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) & ¼þÊÕ¥Þ¥Ã¥× : 50+d50 ¥¿¡¼¥óËè";
934 return "light (dam 2d15) & map area every 50+d50 turns";
941 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
943 return "detection every 55+d55 turns";
947 case ACT_DETECT_XTRA:
950 return "Á´´¶ÃΡ¢Ãµº÷¡¢*´ÕÄê* : 1000 ¥¿¡¼¥óËè";
952 return "detection, probing and identify true every 1000 turns";
959 return "*´ÕÄê* : 750 ¥¿¡¼¥óËè";
961 return "identify true every 750 turns";
968 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
970 return "identify spell every 10 turns";
977 return "Çúȯ¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
979 return "explosive rune every 200 turns";
986 return "¼é¤ê¤Î¥ë¡¼¥ó : 400 ¥¿¡¼¥óËè";
988 return "rune of protection every 400 turns";
995 return "¶õÊ¢½¼Â : 200 ¥¿¡¼¥óËè";
997 return "satisfy hunger every 200 turns";
1004 return "¥É¥¢Ç˲õ : 10 ¥¿¡¼¥óËè";
1006 return "destroy doors every 10 turns";
1013 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
1015 return "stone to mud every 5 turns";
1022 return "ºÆ½¼Å¶ : 70 ¥¿¡¼¥óËè";
1024 return "recharging every 70 turns";
1031 return "Ï£¶â½Ñ : 500 ¥¿¡¼¥óËè";
1033 return "alchemy every 500 turns";
1040 return "¼¡¸µ¤ÎÈâ : 100 ¥¿¡¼¥óËè";
1042 return "dimension door every 100 turns";
1049 return "¥Æ¥ì¥Ý¡¼¥È (range 100) : 45 ¥¿¡¼¥óËè";
1051 return "teleport (range 100) every 45 turns";
1058 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1060 return "word of recall every 200 turns";
1069 return "something undefined";
1076 /* Some artifacts can be activated */
1077 switch (o_ptr->name1)
1082 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1084 return "fire bolt (9d8) every 8+d8 turns";
1091 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1093 return "frost bolt (6d8) every 7+d7 turns";
1100 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1102 return "lightning bolt (4d8) every 6+d6 turns";
1109 return "°½±À(12) : 4+d4 ¥¿¡¼¥óËè";
1111 return "stinking cloud (12) every 4+d4 turns";
1118 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(48) : 5+d5 ¥¿¡¼¥óËè";
1120 return "frost ball (48) every 5+d5 turns";
1127 return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
1129 return "remove fear and cure poison every 5 turns";
1136 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(100) : 200 ¥¿¡¼¥óËè";
1138 return "frost ball (100) every 200 turns";
1145 return "¶Ç¤Î»ÕÃľ¤´ : 500+d500 ¥¿¡¼¥óËè";
1147 return "summon the Legion of the Dawn every 500+d500 turns";
1154 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 400 ¥¿¡¼¥óËè";
1156 return "fire ball (72) every 400 turns";
1163 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 100 ¥¿¡¼¥óËè";
1165 return "large fire ball (72) every 100 turns";
1172 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(120) : 15 ¥¿¡¼¥óËè";
1174 return "large fire ball (120) every 15 turns";
1181 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 200 ¥¿¡¼¥óËè";
1183 return "haste self (20+d20 turns) every 200 turns";
1190 return "À¸Ì¿Îϵۼý(120) : 400 ¥¿¡¼¥óËè";
1192 return "drain life (120) every 400 turns";
1199 return "À¸Ì¿Îϵۼý(90) : 70 ¥¿¡¼¥óËè";
1201 return "drain life (90) every 70 turns";
1208 return "¥É¥¢/¥È¥é¥Ã¥×Ê´ºÕ : 10 ¥¿¡¼¥óËè";
1210 return "door and trap destruction every 10 turns";
1218 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1220 return "word of recall every 200 turns";
1227 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1229 return "haste self (20+d20 turns) every 100+d100 turns";
1236 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
1238 return "identify every 10 turns";
1245 return "õº÷¡¢Á´´¶ÃΡ¢Á´´ÕÄê : 1000 ¥¿¡¼¥óËè";
1247 return "probing, detection and full id every 1000 turns";
1254 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
1256 return "mass genocide every 1000 turns";
1263 return "½ý¤Î¼£Ìþ(4d7) : 3+d3 ¥¿¡¼¥óËè";
1265 return "cure wounds (4d7) every 3+d3 turns";
1272 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
1274 return "fire branding of bolts every 999 turns";
1281 return "¥Õ¥¡¥¤¥¢¡ª : 15 ¥¿¡¼¥óËè";
1283 return "fire! every 15 turns";
1288 case ART_WEREWINDLE:
1291 return "ƨÁö : 35 ¥¿¡¼¥óËè";
1293 return "a getaway every 35 turns";
1300 return "¥Æ¥ì¥Ý¡¼¥È : 25 ¥¿¡¼¥óËè";
1302 return "a teleport every 25 turns";
1309 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1311 return "lightning ball (100) every 200 turns";
1318 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1320 return "Frost ball (100) every 200 turns";
1327 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
1329 return "stone to mud every 5 turns";
1336 return "´äÀÐÍϲò : 2 ¥¿¡¼¥óËè";
1338 return "stone to mud every 2 turns";
1342 case ART_SOULKEEPER:
1345 return "ÂÎÎϲóÉü(1000) : 888 ¥¿¡¼¥óËè";
1347 return "heal (1000) every 888 turns";
1354 return ("²óÉü (777)¡¢Ìþ¤·¡¢»Îµ¤¹âÍÈ : 300 ¥¿¡¼¥óËè");
1356 return ("heal (777), curing and heroism every 300 turns");
1363 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
1365 return "genocide every 500 turns";
1372 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
1374 return "restore life levels every 450 turns";
1381 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
1383 return "teleport away every 150 turns";
1391 return "Á´ÂÑÀ(20+d20¥¿¡¼¥ó) : 111 ¥¿¡¼¥óËè";
1393 return "resistance (20+d20 turns) every 111 turns";
1397 case ART_HOLCOLLETH:
1400 return "¥¹¥ê¡¼¥×(II) : 55 ¥¿¡¼¥óËè";
1402 return "Sleep II every 55 turns";
1409 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
1411 return "recharge item I every 70 turns";
1418 return "¥Æ¥ì¥Ý¡¼¥È : 45 ¥¿¡¼¥óËè";
1420 return "teleport every 45 turns";
1427 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
1429 return "confuse monster every 15 turns";
1433 case ART_CAMMITHRIM:
1436 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1438 return "magic missile (2d6) every 2 turns";
1445 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1447 return "fire bolt (9d8) every 8+d8 turns";
1451 case ART_PAURNIMMEN:
1454 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1456 return "frost bolt (6d8) every 7+d7 turns";
1463 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1465 return "lightning bolt (4d8) every 5+d5 turns";
1472 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
1474 return "acid bolt (5d8) every 6+d6 turns";
1481 return "ËâË¡¤ÎÌð(150) : 90+d90 ¥¿¡¼¥óËè";
1483 return "a magical arrow (150) every 90+d90 turns";
1487 case ART_HOLHENNETH:
1490 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
1492 return "detection every 55+d55 turns";
1499 return "ÂÎÎϲóÉü(700) : 250 ¥¿¡¼¥óËè";
1501 return "heal (700) every 250 turns";
1508 return "¥¹¥¿¡¼¡¦¥Ü¡¼¥ë(150) : 1000 ¥¿¡¼¥óËè";
1510 return "star ball (150) every 1000 turns";
1514 case ART_BLADETURNER:
1517 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300), »Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢ÂÑÀ";
1519 return "breathe elements (300), hero, bless, and resistance";
1526 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1528 return "illumination every 10+d10 turns";
1535 return "ËâË¡¤ÎÃϿޤȸ÷ : 50+d50 ¥¿¡¼¥óËè";
1537 return "magic mapping and light every 50+d50 turns";
1544 return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô : 20+d20 ¥¿¡¼¥óËè";
1546 return "clairvoyance and recall, draining you every 20+d20 turns";
1554 return "¼Ù°Â໶(x5) : 200+d200 ¥¿¡¼¥óËè";
1556 return "dispel evil (x5) every 200+d200 turns";
1563 return "¼Ù°Â໶(x5) : 100+d100 ¥¿¡¼¥óËè";
1565 return "dispel evil (x5) every 100+d100 turns";
1573 return "Âмٰ·ë³¦ : 225+d225 ¥¿¡¼¥óËè";
1575 return "protection from evil every 225+d225 turns";
1582 return "Ã⩹¶·â(100) : 100+d100 ¥¿¡¼¥óËè";
1584 return "a strangling attack (100) every 100+d100 turns";
1591 return "¥¹¥Ô¡¼¥É(75+d75¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1593 return "haste self (75+d75 turns) every 150+d150 turns";
1600 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(300) : 225+d225 ¥¿¡¼¥óËè";
1602 return "large fire ball (300) every 225+d225 turns";
1609 return "µðÂ祢¥¤¥¹¡¦¥Ü¡¼¥ë(400) : 325+d325 ¥¿¡¼¥óËè";
1611 return "large frost ball (400) every 325+d325 turns";
1619 return "µðÂ祵¥ó¥À¡¼¡¦¥Ü¡¼¥ë(500) : 425+d425 ¥¿¡¼¥óËè";
1621 return "large lightning ball (500) every 425+d425 turns";
1629 return "¿®¤¸Æñ¤¤¤³¤È : 450+d450 ¥¿¡¼¥óËè";
1631 return "bizarre things every 450+d450 turns";
1635 case ART_DOR: case ART_TERROR: case ART_STONEMASK:
1638 return "Á´Êý¸þ¤Ø¤Î¶²Éݤθ÷Àþ : 3*(¥ì¥Ù¥ë+10) ¥¿¡¼¥óËè";
1640 return "rays of fear in every direction every 3*(level+10) turns";
1647 return "¤³¤Î³¬¤Ë¤¤¤ë¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òɽ¼¨ : 200¥¿¡¼¥óËè";
1649 return "list of the uniques on the level every 200 turns";
1652 case ART_STONE_LORE:
1655 return "´í¸±¤òȼ¤¦´ÕÄê : ¤¤¤Ä¤Ç¤â";
1657 return "perilous identify every turn";
1663 return "³²Ãî¤Î¶î½ü : 55+d55¥¿¡¼¥óËè";
1665 return "dispel small life every 55+d55 turns";
1671 return "¥â¥ó¥¹¥¿¡¼¶²¹² : 40+d40¥¿¡¼¥óËè";
1673 return "frighten monsters every 40+d40 turns";
1679 return "Âмٰ·ë³¦ : 200+d200 ¥¿¡¼¥óËè";
1681 return "protection from evil every 200 + d200 turns";
1687 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
1689 return "a mana bolt (120) every 120+d120 turns";
1695 return "»Îµ¤¹âÍÈ, ¥¹¥Ô¡¼¥É(50+d50¥¿¡¼¥ó) : 100+d200 ¥¿¡¼¥óËè";
1697 return "hero and +10 to speed (50) every 100+200d turns";
1703 return "âÁ¤·¤¤¸÷ : 250 ¥¿¡¼¥óËè";
1705 return "blinding light every 250 turns";
1711 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
1713 return "Recharge item every 200 turns";
1719 return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë¡£";
1721 return "Increase STR (destroyed 50%)";
1727 return "ËâÎϤÎÍò(400) : 250+d250¥¿¡¼¥óËè";
1729 return "a mana storm every 250+d250 turns";
1735 return "ʪÂΤò°ú¤´ó¤»¤ë(½ÅÎÌ25kg¤Þ¤Ç) : 25+d25¥¿¡¼¥óËè";
1737 return "a telekinesis (500 lb) every 25+d25 turns";
1743 return "¥Ï¥¦¥ó¥É¾¤´ : 300+d150¥¿¡¼¥óËè";
1745 return "summon hound every 300+d150 turns";
1751 return "µðÂ祹¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 200+d200 ¥¿¡¼¥óËè";
1753 return "large star ball (200) every 200+d200 turns";
1760 return "Îã¤Î¥¢¥ì : 150+d150 ¥¿¡¼¥óËè";
1762 return "reveal your identity every 150+d150 turns";
1769 return "Çï»ÒÌÚ¤òÂǤÁ¤Ê¤é¤¹ : ¤¤¤Ä¤Ç¤â";
1771 return "beat wooden clappers every turn";
1779 return "»Îµ¤¹âÍÈ : 30+d30¥¿¡¼¥óËè";
1781 return "heroism every 30+d30 turns";
1789 return "Ìþ¤· : 100¥¿¡¼¥óËè";
1791 return "curing every 100 turns";
1799 return "ưʪ̥λ : 200¥¿¡¼¥óËè";
1801 return "charm animal every 200 turns";
1808 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(12d8) : 50 ¥¿¡¼¥óËè";
1810 return "frost bolt (12d8) every 50 turns";
1817 return "°ÀÊѹ¹ : 3333 ¥¿¡¼¥óËè";
1819 return "change zokusei every 3333 turns";
1826 return "¥¦¥©¡¼¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 250 ¥¿¡¼¥óËè";
1828 return "water ball (200) every 250 turns";
1835 return "»Í¸ÔƧ¤ß : 100+d100¥¿¡¼¥óËè";
1837 return "shiko every 100+d100 turns";
1844 return "Î䵤¤ÎÂÑÀ : 40+d40¥¿¡¼¥óËè";
1846 return "resist cold every 40+d40 turns";
1853 return "Âý¤ÎÂç·²¾¤´ : 300+d150¥¿¡¼¥óËè";
1855 return "summon octopus every 300+d150 turns";
1861 return "°Å¹õ¤ÎÍò(250) : 150+d150 ¥¿¡¼¥óËè";
1863 return "darkness storm (250) every 150+d150 turns";
1870 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_TSURIZAO))
1873 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
1875 return "fishing : every time";
1880 if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
1882 switch (o_ptr->xtra3 - 1)
1884 case ESSENCE_TMP_RES_ACID:
1886 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1888 return "resist acid every 50+d50 turns";
1892 case ESSENCE_TMP_RES_ELEC:
1894 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1896 return "resist elec every 50+d50 turns";
1900 case ESSENCE_TMP_RES_FIRE:
1902 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1904 return "resist fire every 50+d50 turns";
1908 case ESSENCE_TMP_RES_COLD:
1910 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1912 return "resist cold every 50+d50 turns";
1918 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1920 return "earthquake every 100+d100 turns";
1926 if (o_ptr->name2 == EGO_TRUMP)
1929 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
1931 return "teleport every 50+d50 turns";
1936 if (o_ptr->name2 == EGO_LITE_ILLUMINATION)
1939 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1941 return "illumination every 10+d10 turns";
1945 else if (o_ptr->name2 == EGO_EARTHQUAKES)
1948 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1950 return "earthquake every 100+d100 turns";
1955 else if (o_ptr->name2 == EGO_JUMP)
1958 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1960 return "blink every 10+d10 turns";
1965 if (o_ptr->tval == TV_RING)
1969 switch (o_ptr->name2)
1973 return "»Îµ¤¹âÍÈ : 100+d100¥¿¡¼¥óËè";
1975 return "heroism every 100+d100 turns";
1977 case EGO_RING_MAGIC_MIS:
1979 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1981 return "magic missile (2d6) every 2 turns";
1983 case EGO_RING_FIRE_BOLT:
1985 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1987 return "fire bolt (9d8) every 8+d8 turns";
1989 case EGO_RING_COLD_BOLT:
1991 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1993 return "frost bolt (6d8) every 7+d7 turns";
1995 case EGO_RING_ELEC_BOLT:
1997 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1999 return "lightning bolt (4d8) every 5+d5 turns";
2001 case EGO_RING_ACID_BOLT:
2003 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
2005 return "acid bolt (5d8) every 6+d6 turns";
2007 case EGO_RING_MANA_BOLT:
2009 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
2011 return "a mana bolt (120) every 120+d120 turns";
2013 case EGO_RING_FIRE_BALL:
2015 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2017 return "fire ball (100) every 80+d80 turns";
2019 case EGO_RING_COLD_BALL:
2021 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2023 return "cold ball (100) every 80+d80 turns";
2025 case EGO_RING_ELEC_BALL:
2027 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2029 return "elec ball (100) every 80+d80 turns";
2031 case EGO_RING_ACID_BALL:
2033 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2035 return "acid ball (100) every 80+d80 turns";
2037 case EGO_RING_MANA_BALL:
2039 return "ËâÎϤÎÍò (250) : 300 ¥¿¡¼¥óËè";
2041 return "mana storm (250) every 300 turns";
2043 case EGO_RING_DRAGON_F:
2044 if (o_ptr->sval == SV_RING_FLAMES)
2046 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) ¤È²Ð¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
2048 return "breath of fire (200) and resist fire every 200 turns";
2052 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2054 return "fire breath (200) every 250 turns";
2056 case EGO_RING_DRAGON_C:
2057 if (o_ptr->sval == SV_RING_ICE)
2059 return "Î䵤¤Î¥Ö¥ì¥¹ (200) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
2061 return "breath of cold (200) and resist cold every 200 turns";
2065 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2067 return "cold breath (200) every 250 turns";
2069 case EGO_RING_M_DETECT:
2071 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃÎ : 150 ¥¿¡¼¥óËè";
2073 return "detect all monsters every 150 turns";
2075 case EGO_RING_D_SPEED:
2077 return "¥¹¥Ô¡¼¥É(15+d30¥¿¡¼¥ó) : 100 ¥¿¡¼¥óËè";
2079 return "haste self (15+d30 turns) every 100 turns";
2081 case EGO_RING_BERSERKER:
2083 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
2085 return "berserk (25+d25 turns) every 75+d75 turns";
2087 case EGO_RING_TELE_AWAY:
2089 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
2091 return "teleport away every 150 turns";
2095 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ : 777 ¥¿¡¼¥óËè";
2097 return "hero, bless, and ultimate resistance every 777 turns";
2101 switch (o_ptr->sval)
2103 case SV_RING_FLAMES:
2105 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) ¤È²Ð¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2107 return "ball of fire (100) and resist fire every 50+d50 turns";
2112 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2114 return "ball of cold (100) and resist cold every 50+d50 turns";
2119 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) ¤È»À¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2121 return "ball of acid (100) and resist acid every 50+d50 turns";
2126 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) ¤ÈÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2128 return "ball of elec (100) and resist elec every 50+d50 turns";
2136 if (o_ptr->tval == TV_AMULET)
2140 switch (o_ptr->name2)
2144 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
2146 return "identify every 10 turns";
2151 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
2153 return "charm monster every 200 turns";
2158 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
2160 return "blink every 10+d10 turns";
2163 case EGO_AMU_TELEPORT:
2165 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
2167 return "teleport every 50+d50 turns";
2170 case EGO_AMU_D_DOOR:
2172 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
2174 return "dimension door every 200 turns";
2177 case EGO_AMU_RES_FIRE_:
2179 return "²Ð±ê¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2181 return "resist fire every 50+d50 turns";
2184 case EGO_AMU_RES_COLD_:
2186 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2188 return "resist cold every 50+d50 turns";
2191 case EGO_AMU_RES_ELEC_:
2193 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2195 return "resist elec every 50+d50 turns";
2198 case EGO_AMU_RES_ACID_:
2200 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2202 return "resist acid every 50+d50 turns";
2205 case EGO_AMU_DETECTION:
2207 return "Á´´¶ÃÎ : 55+d55¥¿¡¼¥óËè";
2209 return "detect all floor every 55+d55 turns";
2216 if (o_ptr->tval == TV_WHISTLE)
2219 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
2221 return "call pet every 100+d100 turns";
2225 if (o_ptr->tval == TV_CAPTURE)
2228 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
2230 return "captures or releases a monster.";
2234 /* Require dragon scale mail */
2236 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
2238 if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
2242 /* Branch on the sub-type */
2243 switch (o_ptr->sval)
2245 case SV_DRAGON_BLUE:
2248 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
2250 return "breathe lightning (100) every 150+d150 turns";
2254 case SV_DRAGON_WHITE:
2257 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
2259 return "breathe frost (110) every 150+d150 turns";
2263 case SV_DRAGON_BLACK:
2266 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
2268 return "breathe acid (130) every 150+d150 turns";
2272 case SV_DRAGON_GREEN:
2275 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
2277 return "breathe poison gas (150) every 180+d180 turns";
2284 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2286 return "breathe fire (200) every 200+d200 turns";
2290 case SV_DRAGON_MULTIHUED:
2293 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
2295 return "breathe multi-hued (250) every 200+d200 turns";
2299 case SV_DRAGON_BRONZE:
2302 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
2304 return "breathe confusion (120) every 180+d180 turns";
2308 case SV_DRAGON_GOLD:
2311 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
2313 return "breathe sound (130) every 180+d180 turns";
2317 case SV_DRAGON_CHAOS:
2320 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
2322 return "breathe chaos/disenchant (220) every 200+d200 turns";
2329 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
2331 return "breathe sound/shards (230) every 200+d200 turns";
2335 case SV_DRAGON_BALANCE:
2338 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
2340 return "breathe balance (250) every 200+d200 turns";
2344 case SV_DRAGON_SHINING:
2347 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2349 return "breathe light/darkness (200) every 200+d200 turns";
2353 case SV_DRAGON_POWER:
2356 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
2358 return "breathe the elements (300) every 200+d200 turns";
2368 return "breathe air";
2375 * Describe a "fully identified" item
2377 bool screen_object(object_type *o_ptr, bool real)
2381 u32b flgs[TR_FLAG_SIZE];
2384 char o_name[MAX_NLEN];
2387 /* Extract the flags */
2388 object_flags(o_ptr, flgs);
2390 /* Extract the description */
2394 roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
2395 (k_text + k_info[lookup_kind(o_ptr->tval, o_ptr->sval)].text),
2396 77 - 15, temp, sizeof(temp));
2397 for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
2398 { info[i] = &temp[j]; i++;}
2401 /* Mega-Hack -- describe activation */
2402 if (have_flag(flgs, TR_ACTIVATE))
2405 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
2407 info[i++] = "It can be activated for...";
2410 info[i++] = item_activation(o_ptr);
2412 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
2414 info[i++] = "...if it is being worn.";
2419 /* Figurines, a hack */
2420 if (o_ptr->tval == TV_FIGURINE)
2423 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
2425 info[i++] = "It will transform into a pet when thrown.";
2430 /* Figurines, a hack */
2431 if (o_ptr->name1 == ART_STONEMASK)
2434 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
2436 info[i++] = "It makes you turn into a vampire permanently.";
2441 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
2444 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
2446 info[i++] = "It will attempt to kill a monster instantly.";
2451 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
2454 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
2456 info[i++] = "It causes you to strike yourself sometimes.";
2460 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
2462 info[i++] = "It always penetrates invulnerability barriers.";
2466 if (o_ptr->name2 == EGO_2WEAPON)
2469 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
2471 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
2476 if (have_flag(flgs, TR_EASY_SPELL))
2479 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
2481 info[i++] = "It affects your ability to cast spells.";
2485 if (o_ptr->name2 == EGO_AMU_FOOL)
2488 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
2490 info[i++] = "It interferes with casting spells.";
2494 if (o_ptr->name2 == EGO_RING_THROW)
2497 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2499 info[i++] = "It provides great strength when you throw an item.";
2503 if (o_ptr->name2 == EGO_AMU_NAIVETY)
2506 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
2508 info[i++] = "It decreases your magic resistance.";
2512 if (o_ptr->tval == TV_STATUE)
2514 monster_race *r_ptr = &r_info[o_ptr->pval];
2516 if (o_ptr->pval == MON_BULLGATES)
2518 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
2520 info[i++] = "It is shameful.";
2522 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
2524 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
2526 info[i++] = "It is fearful.";
2530 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
2532 info[i++] = "It is cheerful.";
2536 /* Hack -- describe lite's */
2537 if (o_ptr->tval == TV_LITE)
2539 if (o_ptr->name2 == EGO_LITE_DARKNESS)
2542 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
2544 info[i++] = "It provides no light.";
2547 if (o_ptr->sval == SV_LITE_FEANOR ||
2548 o_ptr->sval == SV_LITE_LANTERN)
2551 info[i++] = "¤½¤ì¤ÏÌÀ¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
2553 info[i++] = "It decreases radius of light source by 2.";
2559 info[i++] = "¤½¤ì¤ÏÌÀ¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
2561 info[i++] = "It decreases radius of light source by 1.";
2565 else if (artifact_p(o_ptr))
2568 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2570 info[i++] = "It provides light (radius 3) forever.";
2574 else if (o_ptr->name2 == EGO_LITE_SHINE)
2576 if (o_ptr->sval == SV_LITE_FEANOR)
2579 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2581 info[i++] = "It provides light (radius 3) forever.";
2585 else if (o_ptr->sval == SV_LITE_LANTERN)
2588 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2590 info[i++] = "It provides light (radius 3) when fueled.";
2597 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2599 info[i++] = "It provides light (radius 2) when fueled.";
2606 if (o_ptr->sval == SV_LITE_FEANOR)
2609 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2611 info[i++] = "It provides light (radius 2) forever.";
2615 else if (o_ptr->sval == SV_LITE_LANTERN)
2618 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2620 info[i++] = "It provides light (radius 2) when fueled.";
2627 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
2629 info[i++] = "It provides light (radius 1) when fueled.";
2634 if (o_ptr->name2 == EGO_LITE_LONG)
2637 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
2639 info[i++] = "It provides light for much longer time.";
2645 /* And then describe it fully */
2647 if (have_flag(flgs, TR_RIDING))
2649 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
2651 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
2653 info[i++] = "It is made for use while riding.";
2657 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
2659 info[i++] = "It is suitable for use while riding.";
2663 if (have_flag(flgs, TR_STR))
2666 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2668 info[i++] = "It affects your strength.";
2672 if (have_flag(flgs, TR_INT))
2675 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2677 info[i++] = "It affects your intelligence.";
2681 if (have_flag(flgs, TR_WIS))
2684 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2686 info[i++] = "It affects your wisdom.";
2690 if (have_flag(flgs, TR_DEX))
2693 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2695 info[i++] = "It affects your dexterity.";
2699 if (have_flag(flgs, TR_CON))
2702 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2704 info[i++] = "It affects your constitution.";
2708 if (have_flag(flgs, TR_CHR))
2711 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2713 info[i++] = "It affects your charisma.";
2718 if (have_flag(flgs, TR_MAGIC_MASTERY))
2721 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2723 info[i++] = "It affects your ability to use magic devices.";
2727 if (have_flag(flgs, TR_STEALTH))
2730 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2732 info[i++] = "It affects your stealth.";
2736 if (have_flag(flgs, TR_SEARCH))
2739 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2741 info[i++] = "It affects your searching.";
2745 if (have_flag(flgs, TR_INFRA))
2748 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2750 info[i++] = "It affects your infravision.";
2754 if (have_flag(flgs, TR_TUNNEL))
2757 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2759 info[i++] = "It affects your ability to tunnel.";
2763 if (have_flag(flgs, TR_SPEED))
2766 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2768 info[i++] = "It affects your speed.";
2772 if (have_flag(flgs, TR_BLOWS))
2775 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2777 info[i++] = "It affects your attack speed.";
2782 if (have_flag(flgs, TR_BRAND_ACID))
2785 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2787 info[i++] = "It does extra damage from acid.";
2791 if (have_flag(flgs, TR_BRAND_ELEC))
2794 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2796 info[i++] = "It does extra damage from electricity.";
2800 if (have_flag(flgs, TR_BRAND_FIRE))
2803 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2805 info[i++] = "It does extra damage from fire.";
2809 if (have_flag(flgs, TR_BRAND_COLD))
2812 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2814 info[i++] = "It does extra damage from frost.";
2819 if (have_flag(flgs, TR_BRAND_POIS))
2822 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
2824 info[i++] = "It poisons your foes.";
2829 if (have_flag(flgs, TR_CHAOTIC))
2832 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
2834 info[i++] = "It produces chaotic effects.";
2839 if (have_flag(flgs, TR_VAMPIRIC))
2842 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
2844 info[i++] = "It drains life from your foes.";
2849 if (have_flag(flgs, TR_IMPACT))
2852 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
2854 info[i++] = "It can cause earthquakes.";
2859 if (have_flag(flgs, TR_VORPAL))
2862 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2864 info[i++] = "It is very sharp and can cut your foes.";
2869 if (have_flag(flgs, TR_KILL_DRAGON))
2872 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2874 info[i++] = "It is a great bane of dragons.";
2878 else if (have_flag(flgs, TR_SLAY_DRAGON))
2881 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2883 info[i++] = "It is especially deadly against dragons.";
2888 if (have_flag(flgs, TR_KILL_ORC))
2891 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2893 info[i++] = "It is a great bane of orcs.";
2897 if (have_flag(flgs, TR_SLAY_ORC))
2900 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2902 info[i++] = "It is especially deadly against orcs.";
2907 if (have_flag(flgs, TR_KILL_TROLL))
2910 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2912 info[i++] = "It is a great bane of trolls.";
2916 if (have_flag(flgs, TR_SLAY_TROLL))
2919 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2921 info[i++] = "It is especially deadly against trolls.";
2926 if (have_flag(flgs, TR_KILL_GIANT))
2929 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2931 info[i++] = "It is a great bane of giants.";
2934 else if (have_flag(flgs, TR_SLAY_GIANT))
2937 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2939 info[i++] = "It is especially deadly against giants.";
2944 if (have_flag(flgs, TR_KILL_DEMON))
2947 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2949 info[i++] = "It is a great bane of demons.";
2953 if (have_flag(flgs, TR_SLAY_DEMON))
2956 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2958 info[i++] = "It strikes at demons with holy wrath.";
2963 if (have_flag(flgs, TR_KILL_UNDEAD))
2966 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2968 info[i++] = "It is a great bane of undead.";
2972 if (have_flag(flgs, TR_SLAY_UNDEAD))
2975 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2977 info[i++] = "It strikes at undead with holy wrath.";
2982 if (have_flag(flgs, TR_KILL_EVIL))
2985 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2987 info[i++] = "It is a great bane of evil monsters.";
2991 if (have_flag(flgs, TR_SLAY_EVIL))
2994 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
2996 info[i++] = "It fights against evil with holy fury.";
3001 if (have_flag(flgs, TR_KILL_ANIMAL))
3004 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
3006 info[i++] = "It is a great bane of natural creatures.";
3010 if (have_flag(flgs, TR_SLAY_ANIMAL))
3013 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
3015 info[i++] = "It is especially deadly against natural creatures.";
3020 if (have_flag(flgs, TR_KILL_HUMAN))
3023 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
3025 info[i++] = "It is a great bane of humans.";
3029 if (have_flag(flgs, TR_SLAY_HUMAN))
3032 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
3034 info[i++] = "It is especially deadly against humans.";
3039 if (have_flag(flgs, TR_FORCE_WEAPON))
3042 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
3044 info[i++] = "It powerfully strikes at a monster using your mana.";
3048 if (have_flag(flgs, TR_DEC_MANA))
3051 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
3053 info[i++] = "It decreases your mana consumption.";
3057 if (have_flag(flgs, TR_SUST_STR))
3060 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
3062 info[i++] = "It sustains your strength.";
3066 if (have_flag(flgs, TR_SUST_INT))
3069 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
3071 info[i++] = "It sustains your intelligence.";
3075 if (have_flag(flgs, TR_SUST_WIS))
3078 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
3080 info[i++] = "It sustains your wisdom.";
3084 if (have_flag(flgs, TR_SUST_DEX))
3087 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
3089 info[i++] = "It sustains your dexterity.";
3093 if (have_flag(flgs, TR_SUST_CON))
3096 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
3098 info[i++] = "It sustains your constitution.";
3102 if (have_flag(flgs, TR_SUST_CHR))
3105 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
3107 info[i++] = "It sustains your charisma.";
3112 if (have_flag(flgs, TR_IM_ACID))
3115 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3117 info[i++] = "It provides immunity to acid.";
3121 if (have_flag(flgs, TR_IM_ELEC))
3124 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3126 info[i++] = "It provides immunity to electricity.";
3130 if (have_flag(flgs, TR_IM_FIRE))
3133 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3135 info[i++] = "It provides immunity to fire.";
3139 if (have_flag(flgs, TR_IM_COLD))
3142 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3144 info[i++] = "It provides immunity to cold.";
3149 if (have_flag(flgs, TR_THROW))
3152 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3154 info[i++] = "It is perfectly balanced for throwing.";
3158 if (have_flag(flgs, TR_FREE_ACT))
3161 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3163 info[i++] = "It provides immunity to paralysis.";
3167 if (have_flag(flgs, TR_HOLD_LIFE))
3170 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
3172 info[i++] = "It provides resistance to life draining.";
3176 if (have_flag(flgs, TR_RES_FEAR))
3179 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3181 info[i++] = "It makes you completely fearless.";
3185 if (have_flag(flgs, TR_RES_ACID))
3188 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3190 info[i++] = "It provides resistance to acid.";
3194 if (have_flag(flgs, TR_RES_ELEC))
3197 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3199 info[i++] = "It provides resistance to electricity.";
3203 if (have_flag(flgs, TR_RES_FIRE))
3206 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3208 info[i++] = "It provides resistance to fire.";
3212 if (have_flag(flgs, TR_RES_COLD))
3215 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3217 info[i++] = "It provides resistance to cold.";
3221 if (have_flag(flgs, TR_RES_POIS))
3224 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3226 info[i++] = "It provides resistance to poison.";
3231 if (have_flag(flgs, TR_RES_LITE))
3234 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3236 info[i++] = "It provides resistance to light.";
3240 if (have_flag(flgs, TR_RES_DARK))
3243 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3245 info[i++] = "It provides resistance to dark.";
3250 if (have_flag(flgs, TR_RES_BLIND))
3253 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3255 info[i++] = "It provides resistance to blindness.";
3259 if (have_flag(flgs, TR_RES_CONF))
3262 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3264 info[i++] = "It provides resistance to confusion.";
3268 if (have_flag(flgs, TR_RES_SOUND))
3271 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3273 info[i++] = "It provides resistance to sound.";
3277 if (have_flag(flgs, TR_RES_SHARDS))
3280 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3282 info[i++] = "It provides resistance to shards.";
3287 if (have_flag(flgs, TR_RES_NETHER))
3290 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3292 info[i++] = "It provides resistance to nether.";
3296 if (have_flag(flgs, TR_RES_NEXUS))
3299 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3301 info[i++] = "It provides resistance to nexus.";
3305 if (have_flag(flgs, TR_RES_CHAOS))
3308 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3310 info[i++] = "It provides resistance to chaos.";
3314 if (have_flag(flgs, TR_RES_DISEN))
3317 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3319 info[i++] = "It provides resistance to disenchantment.";
3324 if (have_flag(flgs, TR_FEATHER))
3327 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3329 info[i++] = "It allows you to levitate.";
3333 if (have_flag(flgs, TR_LITE))
3335 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
3337 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
3339 info[i++] = "It decreases radius of your light source by 1.";
3343 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë(Ⱦ·Â¤Ë+1)¡£";
3345 info[i++] = "It provides permanent light. (radius +1)";
3349 if (have_flag(flgs, TR_SEE_INVIS))
3352 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3354 info[i++] = "It allows you to see invisible monsters.";
3358 if (have_flag(flgs, TR_TELEPATHY))
3361 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
3363 info[i++] = "It gives telepathic powers.";
3367 if (have_flag(flgs, TR_ESP_ANIMAL))
3370 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤ò´¶ÃΤ¹¤ë¡£";
3372 info[i++] = "It senses natural creatures.";
3376 if (have_flag(flgs, TR_ESP_UNDEAD))
3379 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ò´¶ÃΤ¹¤ë¡£";
3381 info[i++] = "It senses undead.";
3385 if (have_flag(flgs, TR_ESP_DEMON))
3388 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò´¶ÃΤ¹¤ë¡£";
3390 info[i++] = "It senses demons.";
3394 if (have_flag(flgs, TR_ESP_ORC))
3397 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ò´¶ÃΤ¹¤ë¡£";
3399 info[i++] = "It senses orcs.";
3403 if (have_flag(flgs, TR_ESP_TROLL))
3406 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ò´¶ÃΤ¹¤ë¡£";
3408 info[i++] = "It senses trolls.";
3412 if (have_flag(flgs, TR_ESP_GIANT))
3415 info[i++] = "¤½¤ì¤Ïµð¿Í¤ò´¶ÃΤ¹¤ë¡£";
3417 info[i++] = "It senses giants.";
3421 if (have_flag(flgs, TR_ESP_DRAGON))
3424 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò´¶ÃΤ¹¤ë¡£";
3426 info[i++] = "It senses dragons.";
3430 if (have_flag(flgs, TR_ESP_HUMAN))
3433 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ò´¶ÃΤ¹¤ë¡£";
3435 info[i++] = "It senses humans.";
3439 if (have_flag(flgs, TR_ESP_EVIL))
3442 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¸ºß¤ò´¶ÃΤ¹¤ë¡£";
3444 info[i++] = "It senses evil creatures.";
3448 if (have_flag(flgs, TR_ESP_GOOD))
3451 info[i++] = "¤½¤ì¤ÏÁ±Îɤʸºß¤ò´¶ÃΤ¹¤ë¡£";
3453 info[i++] = "It senses good creatures.";
3457 if (have_flag(flgs, TR_ESP_NONLIVING))
3460 info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤò´¶ÃΤ¹¤ë¡£";
3462 info[i++] = "It senses non-living creatures.";
3466 if (have_flag(flgs, TR_ESP_UNIQUE))
3469 info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤ò´¶ÃΤ¹¤ë¡£";
3471 info[i++] = "It senses unique monsters.";
3475 if (have_flag(flgs, TR_SLOW_DIGEST))
3478 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
3480 info[i++] = "It slows your metabolism.";
3484 if (have_flag(flgs, TR_REGEN))
3487 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
3489 info[i++] = "It speeds your regenerative powers.";
3493 if (have_flag(flgs, TR_WARNING))
3496 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
3498 info[i++] = "It warns you of danger";
3502 if (have_flag(flgs, TR_REFLECT))
3505 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
3507 info[i++] = "It reflects bolts and arrows.";
3511 if (have_flag(flgs, TR_SH_FIRE))
3514 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3516 info[i++] = "It produces a fiery sheath.";
3520 if (have_flag(flgs, TR_SH_ELEC))
3523 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3525 info[i++] = "It produces an electric sheath.";
3529 if (have_flag(flgs, TR_SH_COLD))
3532 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3534 info[i++] = "It produces a sheath of coldness.";
3538 if (have_flag(flgs, TR_NO_MAGIC))
3541 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3543 info[i++] = "It produces an anti-magic shell.";
3547 if (have_flag(flgs, TR_NO_TELE))
3550 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
3552 info[i++] = "It prevents teleportation.";
3556 if (have_flag(flgs, TR_XTRA_MIGHT))
3559 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3561 info[i++] = "It fires missiles with extra might.";
3565 if (have_flag(flgs, TR_XTRA_SHOTS))
3568 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3570 info[i++] = "It fires missiles excessively fast.";
3575 if (have_flag(flgs, TR_BLESSED))
3578 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
3580 info[i++] = "It has been blessed by the gods.";
3585 if (cursed_p(o_ptr))
3587 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
3590 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3592 info[i++] = "It is permanently cursed.";
3596 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
3599 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3601 info[i++] = "It is heavily cursed.";
3608 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
3610 info[i++] = "It is cursed.";
3616 if ((have_flag(flgs, TR_TY_CURSE)) || (o_ptr->curse_flags & TRC_TY_CURSE))
3619 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
3621 info[i++] = "It carries an ancient foul curse.";
3625 if ((have_flag(flgs, TR_AGGRAVATE)) || (o_ptr->curse_flags & TRC_AGGRAVATE))
3628 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
3630 info[i++] = "It aggravates nearby creatures.";
3634 if ((have_flag(flgs, TR_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
3637 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
3639 info[i++] = "It drains experience.";
3643 if (o_ptr->curse_flags & TRC_SLOW_REGEN)
3646 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
3648 info[i++] = "It slows your regenerative powers.";
3652 if (o_ptr->curse_flags & TRC_ADD_L_CURSE)
3655 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
3657 info[i++] = "It adds weak curses.";
3661 if (o_ptr->curse_flags & TRC_ADD_H_CURSE)
3664 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
3666 info[i++] = "It adds heavy curses.";
3670 if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
3673 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3675 info[i++] = "It attracts animals.";
3679 if (o_ptr->curse_flags & TRC_CALL_DEMON)
3682 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3684 info[i++] = "It attracts demons.";
3688 if (o_ptr->curse_flags & TRC_CALL_DRAGON)
3691 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3693 info[i++] = "It attracts dragons.";
3697 if (o_ptr->curse_flags & TRC_COWARDICE)
3700 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤µ¯¤³¤¹¡£";
3702 info[i++] = "It makes you subject to cowardice.";
3706 if ((have_flag(flgs, TR_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
3709 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
3711 info[i++] = "It induces random teleportation.";
3715 if (o_ptr->curse_flags & TRC_LOW_MELEE)
3718 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
3720 info[i++] = "It causes you to miss blows.";
3724 if (o_ptr->curse_flags & TRC_LOW_AC)
3727 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
3729 info[i++] = "It helps your enemies' blows.";
3733 if (o_ptr->curse_flags & TRC_LOW_MAGIC)
3736 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
3738 info[i++] = "It encumbers you while spellcasting.";
3742 if (o_ptr->curse_flags & TRC_FAST_DIGEST)
3745 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
3747 info[i++] = "It speeds your metabolism.";
3751 if (o_ptr->curse_flags & TRC_DRAIN_HP)
3754 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
3756 info[i++] = "It drains you.";
3760 if (o_ptr->curse_flags & TRC_DRAIN_MANA)
3763 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
3765 info[i++] = "It drains your mana.";
3770 /* Describe about this kind of object instead of THIS fake object */
3773 switch (o_ptr->tval)
3776 switch (o_ptr->sval)
3778 case SV_RING_LORDLY:
3780 info[i++] = "¤½¤ì¤Ï´ö¤Ä¤«¤Î¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3782 info[i++] = "It provides some random resistances.";
3785 case SV_RING_WARNING:
3787 info[i++] = "¤½¤ì¤Ï¤Ò¤È¤Ä¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3789 info[i++] = "It may provide a low rank ESP.";
3796 switch (o_ptr->sval)
3798 case SV_AMULET_RESISTANCE:
3800 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3802 info[i++] = "It may provides resistance to poison.";
3805 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3807 info[i++] = "It may provide a random resistances.";
3810 case SV_AMULET_THE_MAGI:
3812 info[i++] = "¤½¤ì¤ÏºÇÂç¤Ç£³¤Ä¤Þ¤Ç¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë¡£";
3814 info[i++] = "It provides up to three low rank ESPs.";
3822 if (have_flag(flgs, TR_IGNORE_ACID) &&
3823 have_flag(flgs, TR_IGNORE_ELEC) &&
3824 have_flag(flgs, TR_IGNORE_FIRE) &&
3825 have_flag(flgs, TR_IGNORE_COLD))
3828 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3830 info[i++] = "It cannot be harmed by the elements.";
3835 if (have_flag(flgs, TR_IGNORE_ACID))
3838 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3840 info[i++] = "It cannot be harmed by acid.";
3843 if (have_flag(flgs, TR_IGNORE_ELEC))
3846 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3848 info[i++] = "It cannot be harmed by electricity.";
3851 if (have_flag(flgs, TR_IGNORE_FIRE))
3854 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3856 info[i++] = "It cannot be harmed by fire.";
3859 if (have_flag(flgs, TR_IGNORE_COLD))
3862 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3864 info[i++] = "It cannot be harmed by cold.";
3869 /* No special effects */
3870 if (!i) return (FALSE);
3872 /* Save the screen */
3876 Term_get_size(&wid, &hgt);
3878 /* Display Item name */
3880 object_desc(o_name, o_ptr, TRUE, 3);
3882 object_desc_store(o_name, o_ptr, TRUE, 0);
3886 /* Erase the screen */
3887 for (k = 1; k < hgt; k++) prt("", k, 13);
3889 /* Label the information */
3890 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
3892 monster_race *r_ptr = &r_info[o_ptr->pval];
3893 int namelen = strlen(r_name + r_ptr->name);
3894 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
3895 c_prt(r_ptr->d_attr, format("%c", r_ptr->d_char), 1, 18+namelen);
3896 prt("'", 1, 19+namelen);
3900 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
3902 prt(" Item Attributes:", 1, 15);
3905 /* We will print on top of the map (column 13) */
3906 for (k = 2, j = 0; j < i; j++)
3909 prt(info[j], k++, 15);
3911 /* Every 20 entries (lines 2 to 21), start over */
3912 if ((k == hgt - 2) && (j+1 < i))
3915 prt("-- ³¤¯ --", k, 15);
3917 prt("-- more --", k, 15);
3920 for (; k > 2; k--) prt("", k, 15);
3926 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
3928 prt("[Press any key to continue]", k, 15);
3933 /* Restore the screen */
3936 /* Gave knowledge */
3943 * Convert an inventory index into a one character label
3944 * Note that the label does NOT distinguish inven/equip.
3946 char index_to_label(int i)
3948 /* Indexes for "inven" are easy */
3949 if (i < INVEN_RARM) return (I2A(i));
3951 /* Indexes for "equip" are offset */
3952 return (I2A(i - INVEN_RARM));
3957 * Convert a label into the index of an item in the "inven"
3958 * Return "-1" if the label does not indicate a real item
3960 s16b label_to_inven(int c)
3965 i = (islower(c) ? A2I(c) : -1);
3967 /* Verify the index */
3968 if ((i < 0) || (i > INVEN_PACK)) return (-1);
3970 /* Empty slots can never be chosen */
3971 if (!inventory[i].k_idx) return (-1);
3973 /* Return the index */
3979 * Convert a label into the index of a item in the "equip"
3980 * Return "-1" if the label does not indicate a real item
3982 s16b label_to_equip(int c)
3987 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
3989 /* Verify the index */
3990 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
3992 /* Empty slots can never be chosen */
3993 if (!inventory[i].k_idx) return (-1);
3995 /* Return the index */
4002 * Determine which equipment slot (if any) an item likes
4004 s16b wield_slot(object_type *o_ptr)
4006 /* Slot for equipment */
4007 switch (o_ptr->tval)
4014 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
4015 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
4016 return (INVEN_LARM);
4023 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
4024 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
4025 return (INVEN_RARM);
4035 /* Use the right hand first */
4036 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
4038 /* Use the left hand for swapping (by default) */
4039 return (INVEN_LEFT);
4045 return (INVEN_NECK);
4050 return (INVEN_LITE);
4057 return (INVEN_BODY);
4062 return (INVEN_OUTER);
4068 return (INVEN_HEAD);
4073 return (INVEN_HANDS);
4078 return (INVEN_FEET);
4082 /* No slot available */
4088 * Return a string mentioning how a given item is carried
4090 cptr mention_use(int i)
4094 /* Examine the location */
4098 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê"); break;
4100 case INVEN_RARM: p = "Wielding"; break;
4104 case INVEN_LARM: p = (left_hander ? " ±¦¼ê" : " º¸¼ê"); break;
4106 case INVEN_LARM: p = "On arm"; break;
4110 case INVEN_BOW: p = "¼Í·âÍÑ"; break;
4112 case INVEN_BOW: p = "Shooting"; break;
4116 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
4118 case INVEN_LEFT: p = "On left hand"; break;
4122 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
4124 case INVEN_RIGHT: p = "On right hand"; break;
4128 case INVEN_NECK: p = " ¼ó"; break;
4130 case INVEN_NECK: p = "Around neck"; break;
4134 case INVEN_LITE: p = " ¸÷¸»"; break;
4136 case INVEN_LITE: p = "Light source"; break;
4140 case INVEN_BODY: p = " ÂÎ"; break;
4142 case INVEN_BODY: p = "On body"; break;
4146 case INVEN_OUTER: p = "ÂΤξå"; break;
4148 case INVEN_OUTER: p = "About body"; break;
4152 case INVEN_HEAD: p = " Ƭ"; break;
4154 case INVEN_HEAD: p = "On head"; break;
4158 case INVEN_HANDS: p = " ¼ê"; break;
4160 case INVEN_HANDS: p = "On hands"; break;
4164 case INVEN_FEET: p = " "; break;
4166 case INVEN_FEET: p = "On feet"; break;
4170 default: p = "¥¶¥Ã¥¯"; break;
4172 default: p = "In pack"; break;
4177 /* Hack -- Heavy weapon */
4178 if (i == INVEN_RARM)
4180 if (p_ptr->heavy_wield[0])
4191 /* Hack -- Heavy weapon */
4192 if (i == INVEN_LARM)
4194 if (p_ptr->heavy_wield[1])
4205 /* Hack -- Heavy bow */
4209 o_ptr = &inventory[i];
4210 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
4221 /* Return the result */
4227 * Return a string describing how a given item is being worn.
4228 * Currently, only used for items in the equipment, not inventory.
4230 cptr describe_use(int i)
4237 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
4239 case INVEN_RARM: p = "attacking monsters with"; break;
4243 case INVEN_LARM: p = (left_hander ? " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
4245 case INVEN_LARM: p = "wearing on your arm"; break;
4249 case INVEN_BOW: p = "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
4251 case INVEN_BOW: p = "shooting missiles with"; break;
4255 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4257 case INVEN_LEFT: p = "wearing on your left hand"; break;
4261 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4263 case INVEN_RIGHT: p = "wearing on your right hand"; break;
4267 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
4269 case INVEN_NECK: p = "wearing around your neck"; break;
4273 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
4275 case INVEN_LITE: p = "using to light the way"; break;
4279 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
4281 case INVEN_BODY: p = "wearing on your body"; break;
4285 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
4287 case INVEN_OUTER: p = "wearing on your back"; break;
4291 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
4293 case INVEN_HEAD: p = "wearing on your head"; break;
4297 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
4299 case INVEN_HANDS: p = "wearing on your hands"; break;
4303 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
4305 case INVEN_FEET: p = "wearing on your feet"; break;
4309 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
4311 default: p = "carrying in your pack"; break;
4316 /* Hack -- Heavy weapon */
4317 if (i == INVEN_RARM)
4320 int hold = adj_str_hold[p_ptr->stat_ind[A_STR]];
4322 if (p_ptr->ryoute) hold *= 2;
4323 o_ptr = &inventory[i];
4324 if (hold < o_ptr->weight / 10)
4335 /* Hack -- Heavy bow */
4339 o_ptr = &inventory[i];
4340 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
4343 p = "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î";
4351 /* Return the result */
4356 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
4358 bool check_book_realm(const byte book_tval, const byte book_sval)
4360 if (book_tval < TV_LIFE_BOOK) return FALSE;
4361 if (p_ptr->pclass == CLASS_SORCERER)
4363 return is_magic(tval2realm(book_tval));
4365 else if (p_ptr->pclass == CLASS_RED_MAGE)
4367 if (is_magic(tval2realm(book_tval)))
4368 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
4370 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
4375 * Check an item against the item tester info
4377 bool item_tester_okay(object_type *o_ptr)
4379 /* Hack -- allow listing empty slots */
4380 if (item_tester_full) return (TRUE);
4382 /* Require an item */
4383 if (!o_ptr->k_idx) return (FALSE);
4385 /* Hack -- ignore "gold" */
4386 if (o_ptr->tval == TV_GOLD) return (FALSE);
4388 /* Check the tval */
4389 if (item_tester_tval)
4391 /* Is it a spellbook? If so, we need a hack -- TY */
4392 if ((item_tester_tval <= TV_DEATH_BOOK) &&
4393 (item_tester_tval >= TV_LIFE_BOOK))
4394 return check_book_realm(o_ptr->tval, o_ptr->sval);
4396 if (item_tester_tval != o_ptr->tval) return (FALSE);
4399 /* Check the hook */
4400 if (item_tester_hook)
4402 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
4413 * Choice window "shadow" of the "show_inven()" function
4415 void display_inven(void)
4417 register int i, n, z = 0;
4419 byte attr = TERM_WHITE;
4421 char o_name[MAX_NLEN];
4424 /* Find the "final" slot */
4425 for (i = 0; i < INVEN_PACK; i++)
4427 o_ptr = &inventory[i];
4429 /* Skip non-objects */
4430 if (!o_ptr->k_idx) continue;
4436 /* Display the pack */
4437 for (i = 0; i < z; i++)
4439 /* Examine the item */
4440 o_ptr = &inventory[i];
4442 /* Start with an empty "index" */
4443 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4445 /* Is this item "acceptable"? */
4446 if (item_tester_okay(o_ptr))
4448 /* Prepare an "index" */
4449 tmp_val[0] = index_to_label(i);
4451 /* Bracket the "index" --(-- */
4455 /* Display the index (or blank space) */
4456 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
4458 /* Obtain an item description */
4459 object_desc(o_name, o_ptr, TRUE, 3);
4461 /* Obtain the length of the description */
4465 attr = tval_to_attr[o_ptr->tval % 128];
4467 /* Grey out charging items */
4473 /* Display the entry itself */
4474 Term_putstr(3, i, n, attr, o_name);
4476 /* Erase the rest of the line */
4477 Term_erase(3+n, i, 255);
4479 /* Display the weight if needed */
4480 if (show_weights && o_ptr->weight)
4482 int wgt = o_ptr->weight * o_ptr->number;
4484 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
4486 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4489 Term_putstr(71, i, -1, TERM_WHITE, tmp_val);
4493 /* Erase the rest of the window */
4494 for (i = z; i < Term->hgt; i++)
4496 /* Erase the line */
4497 Term_erase(0, i, 255);
4504 * Choice window "shadow" of the "show_equip()" function
4506 void display_equip(void)
4510 byte attr = TERM_WHITE;
4512 char o_name[MAX_NLEN];
4515 /* Display the equipment */
4516 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
4518 /* Examine the item */
4519 o_ptr = &inventory[i];
4521 /* Start with an empty "index" */
4522 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4524 /* Is this item "acceptable"? */
4525 if (item_tester_okay(o_ptr))
4527 /* Prepare an "index" */
4528 tmp_val[0] = index_to_label(i);
4530 /* Bracket the "index" --(-- */
4534 /* Display the index (or blank space) */
4535 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
4537 /* Obtain an item description */
4538 if ((i == INVEN_LARM) && p_ptr->ryoute)
4541 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
4543 strcpy(o_name, "(wielding with two-hands)");
4549 object_desc(o_name, o_ptr, TRUE, 3);
4550 attr = tval_to_attr[o_ptr->tval % 128];
4553 /* Obtain the length of the description */
4556 /* Grey out charging items */
4562 /* Display the entry itself */
4563 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
4565 /* Erase the rest of the line */
4566 Term_erase(3+n, i - INVEN_RARM, 255);
4568 /* Display the slot description (if needed) */
4571 Term_putstr(61, i - INVEN_RARM, -1, TERM_WHITE, "<--");
4572 Term_putstr(65, i - INVEN_RARM, -1, TERM_WHITE, mention_use(i));
4575 /* Display the weight (if needed) */
4576 if (show_weights && o_ptr->weight)
4578 int wgt = o_ptr->weight * o_ptr->number;
4579 int col = (show_labels ? 52 : 71);
4581 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
4583 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4586 Term_putstr(col, i - INVEN_RARM, -1, TERM_WHITE, tmp_val);
4590 /* Erase the rest of the window */
4591 for (i = INVEN_TOTAL - INVEN_RARM; i < Term->hgt; i++)
4593 /* Clear that line */
4594 Term_erase(0, i, 255);
4601 * Find the "first" inventory object with the given "tag".
4603 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
4604 * inscription of an object. Alphabetical characters don't work as a
4607 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
4608 * and "x" is the "current" command_cmd code.
4610 static int get_tag(int *cp, char tag)
4616 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
4618 /* Check every object */
4619 for (i = 0; i < INVEN_TOTAL; ++i)
4621 object_type *o_ptr = &inventory[i];
4623 /* Skip non-objects */
4624 if (!o_ptr->k_idx) continue;
4626 /* Skip empty inscriptions */
4627 if (!o_ptr->inscription) continue;
4629 /* Skip non-choice */
4630 if (!item_tester_okay(o_ptr)) continue;
4633 s = strchr(quark_str(o_ptr->inscription), '@');
4635 /* Process all tags */
4638 /* Check the special tags */
4639 if ((s[1] == command_cmd) && (s[2] == tag))
4641 /* Save the actual inventory ID */
4648 /* Find another '@' */
4649 s = strchr(s + 1, '@');
4654 /**** Find a tag in the form of {@#} (allows only numerals) ***/
4656 /* Don't allow {@#} with '#' being alphabet */
4657 if (tag < '0' || '9' < tag)
4663 /* Check every object */
4664 for (i = 0; i < INVEN_TOTAL; ++i)
4666 object_type *o_ptr = &inventory[i];
4668 /* Skip non-objects */
4669 if (!o_ptr->k_idx) continue;
4671 /* Skip empty inscriptions */
4672 if (!o_ptr->inscription) continue;
4674 /* Skip non-choice */
4675 if (!item_tester_okay(o_ptr)) continue;
4678 s = strchr(quark_str(o_ptr->inscription), '@');
4680 /* Process all tags */
4683 /* Check the normal tags */
4686 /* Save the actual inventory ID */
4693 /* Find another '@' */
4694 s = strchr(s + 1, '@');
4705 * Display the inventory.
4707 * Hack -- do not display "trailing" empty slots
4709 int show_inven(int target_item)
4711 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
4712 int i, j, k, l, z = 0;
4713 int col, cur_col, len;
4715 char o_name[MAX_NLEN];
4719 char out_desc[23][MAX_NLEN];
4720 int target_item_label = 0;
4722 char inven_spellbook_label[52+1];
4726 /* Starting column */
4730 Term_get_size(&wid, &hgt);
4732 /* Default "max-length" */
4733 len = wid - col - 1;
4736 /* Find the "final" slot */
4737 for (i = 0; i < INVEN_PACK; i++)
4739 o_ptr = &inventory[i];
4741 /* Skip non-objects */
4742 if (!o_ptr->k_idx) continue;
4748 /*** Move around label characters with correspond tags ***/
4750 /* Prepare normal labels */
4751 strcpy(inven_spellbook_label, alphabet_chars);
4753 /* Move each label */
4754 for (i = 0; i < 52; i++)
4757 char c = alphabet_chars[i];
4759 /* Find a tag with this label */
4760 if (get_tag(&index, c))
4762 /* Delete the over writen label */
4763 if (inven_spellbook_label[i] == c)
4764 inven_spellbook_label[i] = ' ';
4766 /* Move the label to the place of correspond tag */
4767 inven_spellbook_label[index] = c;
4771 /* Display the inventory */
4772 for (k = 0, i = 0; i < z; i++)
4774 o_ptr = &inventory[i];
4776 /* Is this item acceptable? */
4777 if (!item_tester_okay(o_ptr)) continue;
4779 /* Describe the object */
4780 object_desc(o_name, o_ptr, TRUE, 3);
4782 /* Save the object index, color, and description */
4784 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4786 /* Grey out charging items */
4789 out_color[k] = TERM_L_DARK;
4792 (void)strcpy(out_desc[k], o_name);
4794 /* Find the predicted "line length" */
4795 l = strlen(out_desc[k]) + 5;
4797 /* Be sure to account for the weight */
4798 if (show_weights) l += 9;
4800 /* Account for icon if displayed */
4801 if (show_item_graph)
4804 if (use_bigtile) l++;
4807 /* Maintain the maximum length */
4808 if (l > len) len = l;
4810 /* Advance to next "line" */
4814 /* Find the column to start in */
4815 col = (len > wid - 4) ? 0 : (wid - len - 1);
4817 /* Output each entry */
4818 for (j = 0; j < k; j++)
4824 o_ptr = &inventory[i];
4826 /* Clear the line */
4827 prt("", j + 1, col ? col - 2 : col);
4829 if (use_menu && target_item)
4831 if (j == (target_item-1))
4834 strcpy(tmp_val, "¡Õ");
4836 strcpy(tmp_val, "> ");
4838 target_item_label = i;
4840 else strcpy(tmp_val, " ");
4842 else if (i <= INVEN_PACK)
4844 sprintf(tmp_val, "%c)", inven_spellbook_label[i]);
4848 /* Prepare an index --(-- */
4849 sprintf(tmp_val, "%c)", index_to_label(i));
4852 /* Clear the line with the (possibly indented) index */
4853 put_str(tmp_val, j + 1, col);
4857 /* Display graphics for object, if desired */
4858 if (show_item_graph)
4860 byte a = object_attr(o_ptr);
4861 char c = object_char(o_ptr);
4864 if (a & 0x80) a |= 0x40;
4867 Term_draw(cur_col, j + 1, a, c);
4872 Term_draw(cur_col, j + 1, 255, -1);
4878 /* Display the entry itself */
4879 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
4881 /* Display the weight if needed */
4884 int wgt = o_ptr->weight * o_ptr->number;
4886 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4888 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4891 put_str(tmp_val, j + 1, wid - 9);
4895 /* Make a "shadow" below the list (only if needed) */
4896 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4898 /* Save the new column */
4901 return target_item_label;
4907 * Display the equipment.
4909 int show_equip(int target_item)
4912 int col, cur_col, len;
4915 char o_name[MAX_NLEN];
4918 char out_desc[23][MAX_NLEN];
4919 int target_item_label = 0;
4923 /* Starting column */
4927 Term_get_size(&wid, &hgt);
4929 /* Maximal length */
4930 len = wid - col - 1;
4933 /* Scan the equipment list */
4934 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
4936 o_ptr = &inventory[i];
4938 /* Is this item acceptable? */
4939 if (!item_tester_okay(o_ptr) && (!((i == INVEN_LARM) && p_ptr->ryoute) || item_tester_no_ryoute)) continue;
4942 object_desc(o_name, o_ptr, TRUE, 3);
4944 if ((i == INVEN_LARM) && p_ptr->ryoute)
4947 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
4949 (void)strcpy(out_desc[k],"(wielding with two-hands)");
4955 (void)strcpy(out_desc[k], o_name);
4956 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4960 /* Grey out charging items */
4963 out_color[k] = TERM_L_DARK;
4966 /* Extract the maximal length (see below) */
4968 l = strlen(out_desc[k]) + (2 + 1);
4970 l = strlen(out_desc[k]) + (2 + 3);
4974 /* Increase length for labels (if needed) */
4976 if (show_labels) l += (7 + 2);
4978 if (show_labels) l += (14 + 2);
4982 /* Increase length for weight (if needed) */
4983 if (show_weights) l += 9;
4985 if (show_item_graph) l += 2;
4987 /* Maintain the max-length */
4988 if (l > len) len = l;
4990 /* Advance the entry */
4994 /* Hack -- Find a column to start in */
4996 col = (len > wid - 6) ? 0 : (wid - len - 1);
4998 col = (len > wid - 4) ? 0 : (wid - len - 1);
5002 /* Output each entry */
5003 for (j = 0; j < k; j++)
5009 o_ptr = &inventory[i];
5011 /* Clear the line */
5012 prt("", j + 1, col ? col - 2 : col);
5014 if (use_menu && target_item)
5016 if (j == (target_item-1))
5019 strcpy(tmp_val, "¡Õ");
5021 strcpy(tmp_val, "> ");
5023 target_item_label = i;
5025 else strcpy(tmp_val, " ");
5028 /* Prepare an index --(-- */
5029 sprintf(tmp_val, "%c)", index_to_label(i));
5031 /* Clear the line with the (possibly indented) index */
5032 put_str(tmp_val, j+1, col);
5036 /* Display graphics for object, if desired */
5037 if (show_item_graph)
5039 byte a = object_attr(o_ptr);
5040 char c = object_char(o_ptr);
5043 if (a & 0x80) a |= 0x40;
5046 Term_draw(cur_col, j + 1, a, c);
5051 Term_draw(cur_col, j + 1, 255, -1);
5059 /* Mention the use */
5061 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
5063 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
5066 put_str(tmp_val, j+1, cur_col);
5068 /* Display the entry itself */
5070 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
5072 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
5079 /* Display the entry itself */
5080 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
5083 /* Display the weight if needed */
5086 int wgt = o_ptr->weight * o_ptr->number;
5088 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5090 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
5093 put_str(tmp_val, j+1, wid - 9);
5097 /* Make a "shadow" below the list (only if needed) */
5098 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5100 /* Save the new column */
5103 return target_item_label;
5110 * Flip "inven" and "equip" in any sub-windows
5112 void toggle_inven_equip(void)
5117 for (j = 0; j < 8; j++)
5120 if (!angband_term[j]) continue;
5122 /* Flip inven to equip */
5123 if (window_flag[j] & (PW_INVEN))
5126 window_flag[j] &= ~(PW_INVEN);
5127 window_flag[j] |= (PW_EQUIP);
5130 p_ptr->window |= (PW_EQUIP);
5133 /* Flip inven to equip */
5134 else if (window_flag[j] & (PW_EQUIP))
5137 window_flag[j] &= ~(PW_EQUIP);
5138 window_flag[j] |= (PW_INVEN);
5141 p_ptr->window |= (PW_INVEN);
5149 * Verify the choice of an item.
5151 * The item can be negative to mean "item on floor".
5153 static bool verify(cptr prompt, int item)
5155 char o_name[MAX_NLEN];
5156 char out_val[MAX_NLEN+20];
5163 o_ptr = &inventory[item];
5169 o_ptr = &o_list[0 - item];
5173 object_desc(o_name, o_ptr, TRUE, 3);
5177 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
5179 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
5184 return (get_check(out_val));
5189 * Hack -- allow user to "prevent" certain choices
5191 * The item can be negative to mean "item on floor".
5193 static bool get_item_allow(int item)
5202 o_ptr = &inventory[item];
5208 o_ptr = &o_list[0 - item];
5211 /* No inscription */
5212 if (!o_ptr->inscription) return (TRUE);
5215 s = strchr(quark_str(o_ptr->inscription), '!');
5217 /* Process preventions */
5220 /* Check the "restriction" */
5221 if ((s[1] == command_cmd) || (s[1] == '*'))
5223 /* Verify the choice */
5225 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
5227 if (!verify("Really try", item)) return (FALSE);
5232 /* Find another '!' */
5233 s = strchr(s + 1, '!');
5243 * Auxiliary function for "get_item()" -- test an index
5245 static bool get_item_okay(int i)
5248 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
5250 /* Verify the item */
5251 if (!item_tester_okay(&inventory[i])) return (FALSE);
5260 * Determine whether get_item() can get some item or not
5261 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
5263 bool can_get_item(void)
5265 int j, floor_list[23], floor_num = 0;
5267 for (j = 0; j < INVEN_TOTAL; j++)
5268 if (item_tester_okay(&inventory[j]))
5271 floor_num = scan_floor(floor_list, py, px, 0x01);
5279 * Let the user select an item, save its "index"
5281 * Return TRUE only if an acceptable item was chosen by the user.
5283 * The selected item must satisfy the "item_tester_hook()" function,
5284 * if that hook is set, and the "item_tester_tval", if that value is set.
5286 * All "item_tester" restrictions are cleared before this function returns.
5288 * The user is allowed to choose acceptable items from the equipment,
5289 * inventory, or floor, respectively, if the proper flag was given,
5290 * and there are any acceptable items in that location.
5292 * The equipment or inventory are displayed (even if no acceptable
5293 * items are in that location) if the proper flag was given.
5295 * If there are no acceptable items available anywhere, and "str" is
5296 * not NULL, then it will be used as the text of a warning message
5297 * before the function returns.
5299 * Note that the user must press "-" to specify the item on the floor,
5300 * and there is no way to "examine" the item on the floor, while the
5301 * use of "capital" letters will "examine" an inventory/equipment item,
5302 * and prompt for its use.
5304 * If a legal item is selected from the inventory, we save it in "cp"
5305 * directly (0 to 35), and return TRUE.
5307 * If a legal item is selected from the floor, we save it in "cp" as
5308 * a negative (-1 to -511), and return TRUE.
5310 * If no item is available, we do nothing to "cp", and we display a
5311 * warning message, using "str" if available, and return FALSE.
5313 * If no item is selected, we do nothing to "cp", and return FALSE.
5315 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
5316 * to allow the user to enter a command while viewing those screens, and
5317 * also to induce "auto-enter" of stores, and other such stuff.
5319 * Global "p_ptr->command_see" may be set before calling this function to start
5320 * out in "browse" mode. It is cleared before this function returns.
5322 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
5323 * If it is TRUE then we are viewing inventory, else equipment.
5325 * We always erase the prompt when we are done, leaving a blank line,
5326 * or a warning message, if appropriate, if no items are available.
5328 bool get_item(int *cp, cptr pmt, cptr str, int mode)
5330 s16b this_o_idx, next_o_idx = 0;
5332 char n1, n2, which = ' ';
5334 int j, k, i1, i2, e1, e2;
5344 bool allow_floor = FALSE;
5346 bool toggle = FALSE;
5352 extern bool select_the_force;
5354 int menu_line = (use_menu ? 1 : 0);
5358 #ifdef ALLOW_EASY_FLOOR /* TNB */
5360 if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
5362 #endif /* ALLOW_EASY_FLOOR -- TNB */
5366 /* Get the item index */
5367 if (repeat_pull(cp))
5369 if (*cp == INVEN_FORCE) { /* the_force */
5370 item_tester_tval = 0;
5371 item_tester_hook = NULL;
5382 /* Acquire object */
5385 /* Validate the item */
5386 if (item_tester_okay(o_ptr))
5388 /* Forget the item_tester_tval restriction */
5389 item_tester_tval = 0;
5391 /* Forget the item_tester_hook restriction */
5392 item_tester_hook = NULL;
5399 /* Verify the item */
5400 else if (get_item_okay(*cp))
5402 /* Forget the item_tester_tval restriction */
5403 item_tester_tval = 0;
5405 /* Forget the item_tester_hook restriction */
5406 item_tester_hook = NULL;
5413 #endif /* ALLOW_REPEAT */
5416 if (mode & (USE_EQUIP)) equip = TRUE;
5417 if (mode & (USE_INVEN)) inven = TRUE;
5418 if (mode & (USE_FLOOR)) floor = TRUE;
5421 /* Paranoia XXX XXX XXX */
5428 /* No item selected */
5432 /* Full inventory */
5434 i2 = INVEN_PACK - 1;
5436 /* Forbid inventory */
5437 if (!inven) i2 = -1;
5440 for (j = 0; j < INVEN_PACK; j++)
5441 if (item_tester_okay(&inventory[j])) max_inven++;
5444 /* Restrict inventory indexes */
5445 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5446 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5449 /* Full equipment */
5451 e2 = INVEN_TOTAL - 1;
5453 /* Forbid equipment */
5454 if (!equip) e2 = -1;
5457 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5458 if (item_tester_okay(&inventory[j])) max_equip++;
5459 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5462 /* Restrict equipment indexes */
5463 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5464 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5468 /* Restrict floor usage */
5471 /* Scan all objects in the grid */
5472 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5476 /* Acquire object */
5477 o_ptr = &o_list[this_o_idx];
5479 /* Acquire next object */
5480 next_o_idx = o_ptr->next_o_idx;
5482 /* Accept the item on the floor if legal */
5483 if (item_tester_okay(o_ptr)) allow_floor = TRUE;
5487 /* Require at least one legal choice */
5488 if (!allow_floor && (i1 > i2) && (e1 > e2))
5490 /* Cancel p_ptr->command_see */
5491 command_see = FALSE;
5499 if (select_the_force) {
5505 /* Analyze choices */
5508 /* Hack -- Start on equipment if requested */
5509 if (command_see && command_wrk && equip)
5515 /* Use inventory if allowed */
5518 command_wrk = FALSE;
5521 /* Use equipment if allowed */
5527 /* Use inventory for floor */
5530 command_wrk = FALSE;
5536 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5538 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5540 /* Hack -- start out in "display" mode */
5548 /* Repeat until done */
5551 int get_item_label = 0;
5560 for (j = 0; j < 8; j++)
5563 if (!angband_term[j]) continue;
5565 /* Count windows displaying inven */
5566 if (window_flag[j] & (PW_INVEN)) ni++;
5568 /* Count windows displaying equip */
5569 if (window_flag[j] & (PW_EQUIP)) ne++;
5572 /* Toggle if needed */
5573 if ((command_wrk && ni && !ne) ||
5574 (!command_wrk && !ni && ne))
5577 toggle_inven_equip();
5584 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5586 /* Redraw windows */
5590 /* Inventory screen */
5593 /* Extract the legal requests */
5597 /* Redraw if needed */
5598 if (command_see) get_item_label = show_inven(menu_line);
5601 /* Equipment screen */
5604 /* Extract the legal requests */
5605 n1 = I2A(e1 - INVEN_RARM);
5606 n2 = I2A(e2 - INVEN_RARM);
5608 /* Redraw if needed */
5609 if (command_see) get_item_label = show_equip(menu_line);
5612 /* Viewing inventory */
5615 /* Begin the prompt */
5617 sprintf(out_val, "»ý¤Áʪ:");
5619 sprintf(out_val, "Inven:");
5623 /* Some legal items */
5624 if ((i1 <= i2) && !use_menu)
5626 /* Build the prompt */
5628 sprintf(tmp_val, "%c-%c,'(',')',",
5630 sprintf(tmp_val, " %c-%c,'(',')',",
5633 index_to_label(i1), index_to_label(i2));
5636 strcat(out_val, tmp_val);
5639 /* Indicate ability to "view" */
5641 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5643 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5649 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
5650 else if (select_the_force)
5651 strcat(out_val, " 'w'Îýµ¤½Ñ,");
5653 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
5654 else if (select_the_force)
5655 strcat(out_val, " w for the Force,");
5660 /* Viewing equipment */
5663 /* Begin the prompt */
5665 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5667 sprintf(out_val, "Equip:");
5671 /* Some legal items */
5672 if ((e1 <= e2) && !use_menu)
5674 /* Build the prompt */
5676 sprintf(tmp_val, "%c-%c,'(',')',",
5678 sprintf(tmp_val, " %c-%c,'(',')',",
5681 index_to_label(e1), index_to_label(e2));
5684 strcat(out_val, tmp_val);
5687 /* Indicate ability to "view" */
5689 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5691 if (!command_see) strcat(out_val, " * to see,");
5697 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
5699 if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
5704 /* Indicate legality of the "floor" item */
5706 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
5708 if (allow_floor) strcat(out_val, " - for floor,");
5712 /* Finish the prompt */
5713 strcat(out_val, " ESC");
5715 /* Build the prompt */
5716 sprintf(tmp_val, "(%s) %s", out_val, pmt);
5718 /* Show the prompt */
5727 int max_line = (command_wrk ? max_equip : max_inven);
5743 menu_line += (max_line - 1);
5762 /* Verify legality */
5763 if (!inven || !equip)
5769 /* Hack -- Fix screen */
5779 /* Switch inven/equip */
5780 command_wrk = !command_wrk;
5781 max_line = (command_wrk ? max_equip : max_inven);
5782 if (menu_line > max_line) menu_line = max_line;
5784 /* Need to redraw */
5793 if (command_wrk == USE_FLOOR)
5796 (*cp) = -get_item_label;
5800 /* Validate the item */
5801 if (!get_item_okay(get_item_label))
5807 /* Allow player to "refuse" certain actions */
5808 if (!get_item_allow(get_item_label))
5814 /* Accept that choice */
5815 (*cp) = get_item_label;
5824 if (select_the_force) {
5832 if (menu_line > max_line) menu_line -= max_line;
5853 command_see = FALSE;
5873 /* Verify legality */
5874 if (!inven || !equip)
5880 /* Hack -- Fix screen */
5890 /* Switch inven/equip */
5891 command_wrk = !command_wrk;
5893 /* Need to redraw */
5899 /* Use floor item */
5902 /* Scan all objects in the grid */
5903 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5907 /* Acquire object */
5908 o_ptr = &o_list[this_o_idx];
5910 /* Acquire next object */
5911 next_o_idx = o_ptr->next_o_idx;
5913 /* Validate the item */
5914 if (!item_tester_okay(o_ptr)) continue;
5919 /* Verify the item (if required) */
5921 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
5923 if (other_query_flag && !verify("Try", k)) continue;
5927 /* Allow player to "refuse" certain actions */
5928 if (!get_item_allow(k)) continue;
5930 /* Accept that choice */
5947 case '1': case '2': case '3':
5948 case '4': case '5': case '6':
5949 case '7': case '8': case '9':
5951 /* Look up the tag */
5952 if (!get_tag(&k, which))
5958 /* Hack -- Validate the item */
5959 if ((k < INVEN_RARM) ? !inven : !equip)
5965 /* Validate the item */
5966 if (!get_item_okay(k))
5972 /* Allow player to "refuse" certain actions */
5973 if (!get_item_allow(k))
5979 /* Accept that choice */
5991 /* Choose "default" inventory item */
5994 k = ((i1 == i2) ? i1 : -1);
5997 /* Choose "default" equipment item */
6000 k = ((e1 == e2) ? e1 : -1);
6003 /* Validate the item */
6004 if (!get_item_okay(k))
6010 /* Allow player to "refuse" certain actions */
6011 if (!get_item_allow(k))
6017 /* Accept that choice */
6026 if (select_the_force) {
6039 bool not_found = FALSE;
6041 /* Look up the alphabetical tag */
6042 if (!get_tag(&k, which))
6047 /* Hack -- Validate the item */
6048 if ((k < INVEN_RARM) ? !inven : !equip)
6053 /* Validate the item */
6054 if (!get_item_okay(k))
6061 /* Accept that choice */
6068 /* Extract "query" setting */
6069 ver = isupper(which);
6070 which = tolower(which);
6072 /* Convert letter to inventory index */
6075 if (which == '(') k = i1;
6076 else if (which == ')') k = i2;
6077 else k = label_to_inven(which);
6080 /* Convert letter to equipment index */
6083 if (which == '(') k = e1;
6084 else if (which == ')') k = e2;
6085 else k = label_to_equip(which);
6088 /* Validate the item */
6089 if (!get_item_okay(k))
6095 /* Verify the item */
6097 if (ver && !verify("ËÜÅö¤Ë", k))
6099 if (ver && !verify("Try", k))
6107 /* Allow player to "refuse" certain actions */
6108 if (!get_item_allow(k))
6114 /* Accept that choice */
6125 /* Fix the screen if necessary */
6131 /* Hack -- Cancel "display" */
6132 command_see = FALSE;
6136 /* Forget the item_tester_tval restriction */
6137 item_tester_tval = 0;
6139 item_tester_no_ryoute = FALSE;
6141 /* Forget the item_tester_hook restriction */
6142 item_tester_hook = NULL;
6148 /* Toggle again if needed */
6149 if (toggle) toggle_inven_equip();
6152 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6159 /* Clear the prompt line */
6162 /* Warning if needed */
6163 if (oops && str) msg_print(str);
6166 if (item) repeat_push(*cp);
6167 #endif /* ALLOW_REPEAT */
6174 #ifdef ALLOW_EASY_FLOOR
6179 * Return a list of o_list[] indexes of items at the given cave
6180 * location. Valid flags are:
6182 * mode & 0x01 -- Item tester
6183 * mode & 0x02 -- Marked items only
6184 * mode & 0x04 -- Stop after first
6186 int scan_floor(int *items, int y, int x, int mode)
6188 int this_o_idx, next_o_idx;
6193 if (!in_bounds(y, x)) return 0;
6195 /* Scan all objects in the grid */
6196 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
6200 /* Acquire object */
6201 o_ptr = &o_list[this_o_idx];
6203 /* Acquire next object */
6204 next_o_idx = o_ptr->next_o_idx;
6207 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
6210 if ((mode & 0x02) && !o_ptr->marked) continue;
6212 /* Accept this item */
6213 /* XXX Hack -- Enforce limit */
6215 items[num] = this_o_idx;
6220 if (mode & 0x04) break;
6228 * Display a list of the items on the floor at the given location.
6230 int show_floor(int target_item, int y, int x, int *min_width)
6237 char o_name[MAX_NLEN];
6243 char out_desc[23][MAX_NLEN];
6244 int target_item_label = 0;
6246 int floor_list[23], floor_num;
6250 Term_get_size(&wid, &hgt);
6252 /* Default length */
6253 len = MAX((*min_width), 20);
6256 /* Scan for objects in the grid, using item_tester_okay() */
6257 floor_num = scan_floor(floor_list, y, x, 0x01);
6259 /* Display the inventory */
6260 for (k = 0, i = 0; i < floor_num && i < 23; i++)
6262 o_ptr = &o_list[floor_list[i]];
6264 /* Describe the object */
6265 object_desc(o_name, o_ptr, TRUE, 3);
6267 /* Save the index */
6270 /* Acquire inventory color */
6271 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
6273 /* Save the object description */
6274 strcpy(out_desc[k], o_name);
6276 /* Find the predicted "line length" */
6277 l = strlen(out_desc[k]) + 5;
6279 /* Be sure to account for the weight */
6280 if (show_weights) l += 9;
6282 /* Maintain the maximum length */
6283 if (l > len) len = l;
6285 /* Advance to next "line" */
6292 /* Find the column to start in */
6293 col = (len > wid - 4) ? 0 : (wid - len - 1);
6295 /* Output each entry */
6296 for (j = 0; j < k; j++)
6299 i = floor_list[out_index[j]];
6304 /* Clear the line */
6305 prt("", j + 1, col ? col - 2 : col);
6307 if (use_menu && target_item)
6309 if (j == (target_item-1))
6312 strcpy(tmp_val, "¡Õ");
6314 strcpy(tmp_val, "> ");
6316 target_item_label = i;
6318 else strcpy(tmp_val, " ");
6321 /* Prepare an index --(-- */
6322 sprintf(tmp_val, "%c)", index_to_label(j));
6324 /* Clear the line with the (possibly indented) index */
6325 put_str(tmp_val, j + 1, col);
6327 /* Display the entry itself */
6328 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
6330 /* Display the weight if needed */
6333 int wgt = o_ptr->weight * o_ptr->number;
6335 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
6337 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
6340 put_str(tmp_val, j + 1, wid - 9);
6344 /* Make a "shadow" below the list (only if needed) */
6345 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
6347 return target_item_label;
6351 * This version of get_item() is called by get_item() when
6352 * the easy_floor is on.
6354 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
6356 char n1 = ' ', n2 = ' ', which = ' ';
6358 int j, k, i1, i2, e1, e2;
6368 bool allow_equip = FALSE;
6369 bool allow_inven = FALSE;
6370 bool allow_floor = FALSE;
6372 bool toggle = FALSE;
6377 int floor_num, floor_list[23], floor_top = 0;
6380 extern bool select_the_force;
6382 int menu_line = (use_menu ? 1 : 0);
6388 /* Get the item index */
6389 if (repeat_pull(cp))
6391 if (*cp == INVEN_FORCE) { /* the_force */
6392 item_tester_tval = 0;
6393 item_tester_hook = NULL;
6404 /* Acquire object */
6407 /* Validate the item */
6408 if (item_tester_okay(o_ptr))
6410 /* Forget the item_tester_tval restriction */
6411 item_tester_tval = 0;
6413 /* Forget the item_tester_hook restriction */
6414 item_tester_hook = NULL;
6421 /* Verify the item */
6422 else if (get_item_okay(*cp))
6424 /* Forget the item_tester_tval restriction */
6425 item_tester_tval = 0;
6427 /* Forget the item_tester_hook restriction */
6428 item_tester_hook = NULL;
6435 #endif /* ALLOW_REPEAT */
6438 if (mode & (USE_EQUIP)) equip = TRUE;
6439 if (mode & (USE_INVEN)) inven = TRUE;
6440 if (mode & (USE_FLOOR)) floor = TRUE;
6443 /* Paranoia XXX XXX XXX */
6450 /* No item selected */
6454 /* Full inventory */
6456 i2 = INVEN_PACK - 1;
6458 /* Forbid inventory */
6459 if (!inven) i2 = -1;
6462 for (j = 0; j < INVEN_PACK; j++)
6463 if (item_tester_okay(&inventory[j])) max_inven++;
6466 /* Restrict inventory indexes */
6467 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
6468 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
6471 /* Full equipment */
6473 e2 = INVEN_TOTAL - 1;
6475 /* Forbid equipment */
6476 if (!equip) e2 = -1;
6479 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
6480 if (item_tester_okay(&inventory[j])) max_equip++;
6481 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
6484 /* Restrict equipment indexes */
6485 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
6486 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
6489 /* Count "okay" floor items */
6492 /* Restrict floor usage */
6495 /* Scan all objects in the grid */
6496 floor_num = scan_floor(floor_list, py, px, 0x01);
6499 /* Accept inventory */
6500 if (i1 <= i2) allow_inven = TRUE;
6502 /* Accept equipment */
6503 if (e1 <= e2) allow_equip = TRUE;
6506 if (floor_num) allow_floor = TRUE;
6508 /* Require at least one legal choice */
6509 if (!allow_inven && !allow_equip && !allow_floor)
6511 /* Cancel p_ptr->command_see */
6512 command_see = FALSE;
6520 if (select_the_force) {
6526 /* Analyze choices */
6529 /* Hack -- Start on equipment if requested */
6530 if (command_see && (command_wrk == (USE_EQUIP))
6533 command_wrk = (USE_EQUIP);
6536 /* Use inventory if allowed */
6537 else if (allow_inven)
6539 command_wrk = (USE_INVEN);
6542 /* Use equipment if allowed */
6543 else if (allow_equip)
6545 command_wrk = (USE_EQUIP);
6548 /* Use floor if allowed */
6549 else if (allow_floor)
6551 command_wrk = (USE_FLOOR);
6556 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
6558 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
6560 /* Hack -- start out in "display" mode */
6567 /* Repeat until done */
6570 int get_item_label = 0;
6579 for (j = 0; j < 8; j++)
6582 if (!angband_term[j]) continue;
6584 /* Count windows displaying inven */
6585 if (window_flag[j] & (PW_INVEN)) ni++;
6587 /* Count windows displaying equip */
6588 if (window_flag[j] & (PW_EQUIP)) ne++;
6591 /* Toggle if needed */
6592 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
6593 (command_wrk == (USE_INVEN) && !ni && ne))
6596 toggle_inven_equip();
6603 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6605 /* Redraw windows */
6609 /* Inventory screen */
6610 if (command_wrk == (USE_INVEN))
6612 /* Extract the legal requests */
6616 /* Redraw if needed */
6617 if (command_see) get_item_label = show_inven(menu_line);
6620 /* Equipment screen */
6621 else if (command_wrk == (USE_EQUIP))
6623 /* Extract the legal requests */
6624 n1 = I2A(e1 - INVEN_RARM);
6625 n2 = I2A(e2 - INVEN_RARM);
6627 /* Redraw if needed */
6628 if (command_see) get_item_label = show_equip(menu_line);
6632 else if (command_wrk == (USE_FLOOR))
6635 k = MIN(floor_top + 23, floor_num) - 1;
6637 /* Extract the legal requests */
6638 n1 = I2A(j - floor_top);
6639 n2 = I2A(k - floor_top);
6641 /* Redraw if needed */
6642 if (command_see) get_item_label = show_floor(menu_line, py, px, &min_width);
6645 /* Viewing inventory */
6646 if (command_wrk == (USE_INVEN))
6648 /* Begin the prompt */
6650 sprintf(out_val, "»ý¤Áʪ:");
6652 sprintf(out_val, "Inven:");
6657 /* Build the prompt */
6659 sprintf(tmp_val, "%c-%c,'(',')',",
6661 sprintf(tmp_val, " %c-%c,'(',')',",
6664 index_to_label(i1), index_to_label(i2));
6667 strcat(out_val, tmp_val);
6670 /* Indicate ability to "view" */
6672 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6674 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6683 strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
6684 else if (allow_floor)
6685 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
6687 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6689 else if (select_the_force)
6690 strcat(out_val, " 'w'Îýµ¤½Ñ,");
6695 strcat(out_val, " / for Equip,");
6696 else if (allow_floor)
6697 strcat(out_val, " 6 for Equip,");
6699 strcat(out_val, " 4 or 6 for Equip,");
6701 else if (select_the_force)
6702 strcat(out_val, " w for the Force,");
6710 strcat(out_val, " '-'¾²¾å,");
6711 else if (allow_equip)
6712 strcat(out_val, " '4' ¾²¾å,");
6714 strcat(out_val, " '4'or'6' ¾²¾å,");
6717 strcat(out_val, " - for floor,");
6718 else if (allow_equip)
6719 strcat(out_val, " 4 for floor,");
6721 strcat(out_val, " 4 or 6 for floor,");
6727 /* Viewing equipment */
6728 else if (command_wrk == (USE_EQUIP))
6730 /* Begin the prompt */
6732 sprintf(out_val, "ÁõÈ÷ÉÊ:");
6734 sprintf(out_val, "Equip:");
6740 /* Build the prompt */
6742 sprintf(tmp_val, "%c-%c,'(',')',",
6744 sprintf(tmp_val, " %c-%c,'(',')',",
6747 index_to_label(e1), index_to_label(e2));
6750 strcat(out_val, tmp_val);
6753 /* Indicate ability to "view" */
6755 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6757 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6766 strcat(out_val, " '/' »ý¤Áʪ,");
6767 else if (allow_floor)
6768 strcat(out_val, " '4' »ý¤Áʪ,");
6770 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6774 strcat(out_val, " / for Inven,");
6775 else if (allow_floor)
6776 strcat(out_val, " 4 for Inven,");
6778 strcat(out_val, " 4 or 6 for Inven,");
6787 strcat(out_val, " '-'¾²¾å,");
6788 else if (allow_inven)
6789 strcat(out_val, " '6' ¾²¾å,");
6791 strcat(out_val, " '4'or'6' ¾²¾å,");
6794 strcat(out_val, " - for floor,");
6795 else if (allow_inven)
6796 strcat(out_val, " 6 for floor,");
6798 strcat(out_val, " 4 or 6 for floor,");
6804 else if (command_wrk == (USE_FLOOR))
6806 /* Begin the prompt */
6808 sprintf(out_val, "¾²¾å:");
6810 sprintf(out_val, "Floor:");
6816 /* Build the prompt */
6818 sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
6820 sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
6825 strcat(out_val, tmp_val);
6828 /* Indicate ability to "view" */
6830 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6832 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6838 if (allow_inven && allow_equip)
6841 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
6843 strcat(out_val, " 4 for Equip, 6 for Inven,");
6847 else if (allow_inven)
6850 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6852 strcat(out_val, " 4 or 6 for Inven,");
6856 else if (allow_equip)
6859 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6861 strcat(out_val, " 4 or 6 for Equip,");
6867 else if (allow_inven)
6870 strcat(out_val, " '/' »ý¤Áʪ,");
6872 strcat(out_val, " / for Inven,");
6876 else if (allow_equip)
6879 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6881 strcat(out_val, " / for Equip,");
6887 if (command_see && !use_menu)
6890 strcat(out_val, " Enter ¼¡,");
6892 strcat(out_val, " Enter for scroll down,");
6897 /* Finish the prompt */
6898 strcat(out_val, " ESC");
6900 /* Build the prompt */
6901 sprintf(tmp_val, "(%s) %s", out_val, pmt);
6903 /* Show the prompt */
6912 if (command_wrk == USE_INVEN) max_line = max_inven;
6913 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6914 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6930 menu_line += (max_line - 1);
6946 /* Verify legality */
6947 if (command_wrk == (USE_INVEN))
6949 if (allow_floor) command_wrk = USE_FLOOR;
6950 else if (allow_equip) command_wrk = USE_EQUIP;
6957 else if (command_wrk == (USE_EQUIP))
6959 if (allow_inven) command_wrk = USE_INVEN;
6960 else if (allow_floor) command_wrk = USE_FLOOR;
6967 else if (command_wrk == (USE_FLOOR))
6969 if (allow_equip) command_wrk = USE_EQUIP;
6970 else if (allow_inven) command_wrk = USE_INVEN;
6983 /* Hack -- Fix screen */
6993 /* Switch inven/equip */
6994 if (command_wrk == USE_INVEN) max_line = max_inven;
6995 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6996 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6997 if (menu_line > max_line) menu_line = max_line;
6999 /* Need to redraw */
7007 /* Verify legality */
7008 if (command_wrk == (USE_INVEN))
7010 if (allow_equip) command_wrk = USE_EQUIP;
7011 else if (allow_floor) command_wrk = USE_FLOOR;
7018 else if (command_wrk == (USE_EQUIP))
7020 if (allow_floor) command_wrk = USE_FLOOR;
7021 else if (allow_inven) command_wrk = USE_INVEN;
7028 else if (command_wrk == (USE_FLOOR))
7030 if (allow_inven) command_wrk = USE_INVEN;
7031 else if (allow_equip) command_wrk = USE_EQUIP;
7044 /* Hack -- Fix screen */
7054 /* Switch inven/equip */
7055 if (command_wrk == USE_INVEN) max_line = max_inven;
7056 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7057 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7058 if (menu_line > max_line) menu_line = max_line;
7060 /* Need to redraw */
7069 if (command_wrk == USE_FLOOR)
7072 (*cp) = -get_item_label;
7076 /* Validate the item */
7077 if (!get_item_okay(get_item_label))
7083 /* Allow player to "refuse" certain actions */
7084 if (!get_item_allow(get_item_label))
7090 /* Accept that choice */
7091 (*cp) = get_item_label;
7100 if (select_the_force) {
7108 if (menu_line > max_line) menu_line -= max_line;
7129 command_see = FALSE;
7152 cave_type *c_ptr = &cave[py][px];
7154 if (command_wrk != (USE_FLOOR)) break;
7156 /* Get the object being moved. */
7157 o_idx = c_ptr->o_idx;
7159 /* Only rotate a pile of two or more objects. */
7160 if (!(o_idx && o_list[o_idx].next_o_idx)) break;
7162 /* Remove the first object from the list. */
7163 excise_object_idx(o_idx);
7165 /* Find end of the list. */
7167 while (o_list[i].next_o_idx)
7168 i = o_list[i].next_o_idx;
7170 /* Add after the last object. */
7171 o_list[i].next_o_idx = o_idx;
7173 /* Re-scan floor list */
7174 floor_num = scan_floor(floor_list, py, px, 0x01);
7176 /* Hack -- Fix screen */
7191 if (command_wrk == (USE_INVEN))
7198 command_wrk = (USE_EQUIP);
7200 else if (command_wrk == (USE_EQUIP))
7207 command_wrk = (USE_INVEN);
7209 else if (command_wrk == (USE_FLOOR))
7213 command_wrk = (USE_INVEN);
7215 else if (allow_equip)
7217 command_wrk = (USE_EQUIP);
7226 /* Hack -- Fix screen */
7236 /* Need to redraw */
7249 * If we are already examining the floor, and there
7250 * is only one item, we will always select it.
7251 * If we aren't examining the floor and there is only
7252 * one item, we will select it if floor_query_flag
7257 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
7260 k = 0 - floor_list[0];
7262 /* Allow player to "refuse" certain actions */
7263 if (!get_item_allow(k))
7269 /* Accept that choice */
7278 /* Hack -- Fix screen */
7288 command_wrk = (USE_FLOOR);
7294 case '1': case '2': case '3':
7295 case '4': case '5': case '6':
7296 case '7': case '8': case '9':
7298 /* Look up the tag */
7299 if (!get_tag(&k, which))
7305 /* Hack -- Validate the item */
7306 if ((k < INVEN_RARM) ? !inven : !equip)
7312 /* Validate the item */
7313 if (!get_item_okay(k))
7319 /* Allow player to "refuse" certain actions */
7320 if (!get_item_allow(k))
7326 /* Accept that choice */
7337 /* Choose "default" inventory item */
7338 if (command_wrk == (USE_INVEN))
7340 k = ((i1 == i2) ? i1 : -1);
7343 /* Choose "default" equipment item */
7344 else if (command_wrk == (USE_EQUIP))
7346 k = ((e1 == e2) ? e1 : -1);
7349 /* Choose "default" floor item */
7350 else if (command_wrk == (USE_FLOOR))
7355 k = 0 - floor_list[0];
7357 /* Allow player to "refuse" certain actions */
7358 if (!get_item_allow(k))
7364 /* Accept that choice */
7372 /* Validate the item */
7373 if (!get_item_okay(k))
7379 /* Allow player to "refuse" certain actions */
7380 if (!get_item_allow(k))
7386 /* Accept that choice */
7396 if (select_the_force) {
7407 bool not_found = FALSE;
7409 /* Look up the alphabetical tag */
7410 if (!get_tag(&k, which))
7415 /* Hack -- Validate the item */
7416 if ((k < INVEN_RARM) ? !inven : !equip)
7421 /* Validate the item */
7422 if (!get_item_okay(k))
7429 /* Accept that choice */
7436 /* Extract "query" setting */
7437 ver = isupper(which);
7438 which = tolower(which);
7440 /* Convert letter to inventory index */
7441 if (command_wrk == (USE_INVEN))
7443 if (which == '(') k = i1;
7444 else if (which == ')') k = i2;
7445 else k = label_to_inven(which);
7448 /* Convert letter to equipment index */
7449 else if (command_wrk == (USE_EQUIP))
7451 if (which == '(') k = e1;
7452 else if (which == ')') k = e2;
7453 else k = label_to_equip(which);
7456 /* Convert letter to floor index */
7457 else if (command_wrk == USE_FLOOR)
7459 if (which == '(') k = 0;
7460 else if (which == ')') k = floor_num - 1;
7461 else k = islower(which) ? A2I(which) : -1;
7462 if (k < 0 || k >= floor_num || k >= 23)
7469 k = 0 - floor_list[k];
7472 /* Validate the item */
7473 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
7479 /* Verify the item */
7481 if (ver && !verify("ËÜÅö¤Ë", k))
7483 if (ver && !verify("Try", k))
7491 /* Allow player to "refuse" certain actions */
7492 if (!get_item_allow(k))
7498 /* Accept that choice */
7508 /* Fix the screen if necessary */
7514 /* Hack -- Cancel "display" */
7515 command_see = FALSE;
7519 /* Forget the item_tester_tval restriction */
7520 item_tester_tval = 0;
7522 /* Forget the item_tester_hook restriction */
7523 item_tester_hook = NULL;
7529 /* Toggle again if needed */
7530 if (toggle) toggle_inven_equip();
7533 p_ptr->window |= (PW_INVEN | PW_EQUIP);
7540 /* Clear the prompt line */
7543 /* Warning if needed */
7544 if (oops && str) msg_print(str);
7547 if (item) repeat_push(*cp);
7548 #endif /* ALLOW_REPEAT */
7555 static bool py_pickup_floor_aux(void)
7565 /* Restrict the choices */
7566 item_tester_hook = inven_carry_okay;
7570 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
7571 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
7573 q = "Get which item? ";
7574 s = "You no longer have any room for the objects on the floor.";
7577 if (get_item(&item, q, s, (USE_FLOOR)))
7579 this_o_idx = 0 - item;
7586 /* Access the object */
7587 o_ptr = &o_list[this_o_idx];
7589 /* Pick up the object */
7590 py_pickup_aux(this_o_idx);
7597 * Make the player carry everything in a grid
7599 * If "pickup" is FALSE then only gold will be picked up
7601 * This is called by py_pickup() when easy_floor is TRUE.
7603 void py_pickup_floor(int pickup)
7605 s16b this_o_idx, next_o_idx = 0;
7607 char o_name[MAX_NLEN];
7610 int floor_num = 0, floor_list[23], floor_o_idx = 0;
7614 /* Scan the pile of objects */
7615 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
7619 /* Access the object */
7620 o_ptr = &o_list[this_o_idx];
7622 /* Describe the object */
7623 object_desc(o_name, o_ptr, TRUE, 3);
7625 /* Access the next object */
7626 next_o_idx = o_ptr->next_o_idx;
7628 /* Hack -- disturb */
7632 if (o_ptr->tval == TV_GOLD)
7636 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
7637 (long)o_ptr->pval, o_name);
7639 msg_format("You have found %ld gold pieces worth of %s.",
7640 (long) o_ptr->pval, o_name);
7644 /* Collect the gold */
7645 p_ptr->au += o_ptr->pval;
7648 p_ptr->redraw |= (PR_GOLD);
7651 p_ptr->window |= (PW_PLAYER);
7653 /* Delete the gold */
7654 delete_object_idx(this_o_idx);
7656 /* Check the next object */
7659 else if (o_ptr->marked & OM_NOMSG)
7661 /* If 0 or 1 non-NOMSG items are in the pile, the NOMSG ones are
7662 * ignored. Otherwise, they are included in the prompt. */
7663 o_ptr->marked &= ~(OM_NOMSG);
7667 /* Count non-gold objects that can be picked up. */
7668 if (inven_carry_okay(o_ptr))
7673 /* Remember this object index */
7675 floor_list[floor_num] = this_o_idx;
7677 /* Count non-gold objects */
7680 /* Remember this index */
7681 floor_o_idx = this_o_idx;
7684 /* There are no non-gold objects */
7688 /* Mention the number of objects */
7694 /* Access the object */
7695 o_ptr = &o_list[floor_o_idx];
7697 #ifdef ALLOW_EASY_SENSE
7699 /* Option: Make object sensing easy */
7702 /* Sense the object */
7703 (void) sense_object(o_ptr);
7706 #endif /* ALLOW_EASY_SENSE */
7708 /* Describe the object */
7709 object_desc(o_name, o_ptr, TRUE, 3);
7713 msg_format("%s¤¬¤¢¤ë¡£", o_name);
7715 msg_format("You see %s.", o_name);
7720 /* Multiple objects */
7725 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
7727 msg_format("You see a pile of %d items.", floor_num);
7736 /* The player has no room for anything on the floor. */
7742 /* Access the object */
7743 o_ptr = &o_list[floor_o_idx];
7745 #ifdef ALLOW_EASY_SENSE
7747 /* Option: Make object sensing easy */
7750 /* Sense the object */
7751 (void) sense_object(o_ptr);
7754 #endif /* ALLOW_EASY_SENSE */
7756 /* Describe the object */
7757 object_desc(o_name, o_ptr, TRUE, 3);
7761 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7763 msg_format("You have no room for %s.", o_name);
7768 /* Multiple objects */
7773 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7775 msg_print("You have no room for any of the objects on the floor.");
7787 /* Hack -- query every object */
7788 if (carry_query_flag)
7790 char out_val[MAX_NLEN+20];
7792 /* Access the object */
7793 o_ptr = &o_list[floor_o_idx];
7795 #ifdef ALLOW_EASY_SENSE
7797 /* Option: Make object sensing easy */
7800 /* Sense the object */
7801 (void) sense_object(o_ptr);
7804 #endif /* ALLOW_EASY_SENSE */
7806 /* Describe the object */
7807 object_desc(o_name, o_ptr, TRUE, 3);
7809 /* Build a prompt */
7811 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7813 (void) sprintf(out_val, "Pick up %s? ", o_name);
7817 /* Ask the user to confirm */
7818 if (!get_check(out_val))
7825 /* Access the object */
7826 o_ptr = &o_list[floor_o_idx];
7828 #ifdef ALLOW_EASY_SENSE
7830 /* Option: Make object sensing easy */
7833 /* Sense the object */
7834 (void) sense_object(o_ptr);
7837 #endif /* ALLOW_EASY_SENSE */
7839 /* Pick up the object */
7840 py_pickup_aux(floor_o_idx);
7843 /* Allow the user to choose an object */
7846 while (can_pickup--)
7848 if (!py_pickup_floor_aux()) break;
7853 #endif /* ALLOW_EASY_FLOOR */