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 (item_tester_hook_smith(o_ptr))
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 (item_tester_hook_smith(o_ptr))
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";
1862 return "°Å¹õ¤ÎÍò(250) : 150+d150 ¥¿¡¼¥óËè";
1864 return "darkness storm (250) every 150+d150 turns";
1868 case ART_SACRED_KNIGHTS:
1871 return "*²ò¼ö*¤ÈÄ´ºº: ¤¤¤Ä¤Ç¤â";
1873 return "Dispel Curse and Probing every turn";
1880 return "ËâÎϤÎÍò(200) : 150+d150 ¥¿¡¼¥óËè";
1882 return "mana storm (200) every 150+d150 turns";
1889 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_TSURIZAO))
1892 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
1894 return "fishing : every time";
1899 if (item_tester_hook_smith(o_ptr))
1901 switch (o_ptr->xtra3 - 1)
1903 case ESSENCE_TMP_RES_ACID:
1905 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1907 return "resist acid every 50+d50 turns";
1910 case ESSENCE_TMP_RES_ELEC:
1912 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1914 return "resist elec every 50+d50 turns";
1917 case ESSENCE_TMP_RES_FIRE:
1919 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1921 return "resist fire every 50+d50 turns";
1924 case ESSENCE_TMP_RES_COLD:
1926 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1928 return "resist cold every 50+d50 turns";
1933 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1935 return "earthquake every 100+d100 turns";
1940 if (o_ptr->name2 == EGO_TRUMP)
1943 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
1945 return "teleport every 50+d50 turns";
1950 if (o_ptr->name2 == EGO_LITE_ILLUMINATION)
1953 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1955 return "illumination every 10+d10 turns";
1959 else if (o_ptr->name2 == EGO_EARTHQUAKES)
1962 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1964 return "earthquake every 100+d100 turns";
1969 else if (o_ptr->name2 == EGO_JUMP)
1972 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1974 return "blink every 10+d10 turns";
1979 if (o_ptr->tval == TV_RING)
1983 switch (o_ptr->name2)
1987 return "»Îµ¤¹âÍÈ : 100+d100¥¿¡¼¥óËè";
1989 return "heroism every 100+d100 turns";
1991 case EGO_RING_MAGIC_MIS:
1993 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1995 return "magic missile (2d6) every 2 turns";
1997 case EGO_RING_FIRE_BOLT:
1999 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
2001 return "fire bolt (9d8) every 8+d8 turns";
2003 case EGO_RING_COLD_BOLT:
2005 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
2007 return "frost bolt (6d8) every 7+d7 turns";
2009 case EGO_RING_ELEC_BOLT:
2011 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
2013 return "lightning bolt (4d8) every 5+d5 turns";
2015 case EGO_RING_ACID_BOLT:
2017 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
2019 return "acid bolt (5d8) every 6+d6 turns";
2021 case EGO_RING_MANA_BOLT:
2023 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
2025 return "a mana bolt (120) every 120+d120 turns";
2027 case EGO_RING_FIRE_BALL:
2029 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2031 return "fire ball (100) every 80+d80 turns";
2033 case EGO_RING_COLD_BALL:
2035 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2037 return "cold ball (100) every 80+d80 turns";
2039 case EGO_RING_ELEC_BALL:
2041 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2043 return "elec ball (100) every 80+d80 turns";
2045 case EGO_RING_ACID_BALL:
2047 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2049 return "acid ball (100) every 80+d80 turns";
2051 case EGO_RING_MANA_BALL:
2053 return "ËâÎϤÎÍò (250) : 300 ¥¿¡¼¥óËè";
2055 return "mana storm (250) every 300 turns";
2057 case EGO_RING_DRAGON_F:
2058 if (o_ptr->sval == SV_RING_FLAMES)
2060 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) ¤È²Ð¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
2062 return "breath of fire (200) and resist fire every 200 turns";
2066 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2068 return "fire breath (200) every 250 turns";
2070 case EGO_RING_DRAGON_C:
2071 if (o_ptr->sval == SV_RING_ICE)
2073 return "Î䵤¤Î¥Ö¥ì¥¹ (200) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
2075 return "breath of cold (200) and resist cold every 200 turns";
2079 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2081 return "cold breath (200) every 250 turns";
2083 case EGO_RING_M_DETECT:
2085 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃÎ : 150 ¥¿¡¼¥óËè";
2087 return "detect all monsters every 150 turns";
2089 case EGO_RING_D_SPEED:
2091 return "¥¹¥Ô¡¼¥É(15+d30¥¿¡¼¥ó) : 100 ¥¿¡¼¥óËè";
2093 return "haste self (15+d30 turns) every 100 turns";
2095 case EGO_RING_BERSERKER:
2097 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
2099 return "berserk (25+d25 turns) every 75+d75 turns";
2101 case EGO_RING_TELE_AWAY:
2103 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
2105 return "teleport away every 150 turns";
2109 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ : 777 ¥¿¡¼¥óËè";
2111 return "hero, bless, and ultimate resistance every 777 turns";
2115 switch (o_ptr->sval)
2117 case SV_RING_FLAMES:
2119 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) ¤È²Ð¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2121 return "ball of fire (100) and resist fire every 50+d50 turns";
2126 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2128 return "ball of cold (100) and resist cold every 50+d50 turns";
2133 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) ¤È»À¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2135 return "ball of acid (100) and resist acid every 50+d50 turns";
2140 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) ¤ÈÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2142 return "ball of elec (100) and resist elec every 50+d50 turns";
2150 if (o_ptr->tval == TV_AMULET)
2154 switch (o_ptr->name2)
2158 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
2160 return "identify every 10 turns";
2164 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
2166 return "charm monster every 200 turns";
2170 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
2172 return "blink every 10+d10 turns";
2174 case EGO_AMU_TELEPORT:
2176 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
2178 return "teleport every 50+d50 turns";
2180 case EGO_AMU_D_DOOR:
2182 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
2184 return "dimension door every 200 turns";
2186 case EGO_AMU_RES_FIRE_:
2188 return "²Ð±ê¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2190 return "resist fire every 50+d50 turns";
2192 case EGO_AMU_RES_COLD_:
2194 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2196 return "resist cold every 50+d50 turns";
2198 case EGO_AMU_RES_ELEC_:
2200 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2202 return "resist elec every 50+d50 turns";
2204 case EGO_AMU_RES_ACID_:
2206 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2208 return "resist acid every 50+d50 turns";
2210 case EGO_AMU_DETECTION:
2212 return "Á´´¶ÃÎ : 55+d55¥¿¡¼¥óËè";
2214 return "detect all floor every 55+d55 turns";
2220 if (o_ptr->tval == TV_WHISTLE)
2223 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
2225 return "call pet every 100+d100 turns";
2229 if (o_ptr->tval == TV_CAPTURE)
2232 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
2234 return "captures or releases a monster.";
2238 /* Require dragon scale mail */
2240 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
2242 if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
2246 /* Branch on the sub-type */
2247 switch (o_ptr->sval)
2249 case SV_DRAGON_BLUE:
2252 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
2254 return "breathe lightning (100) every 150+d150 turns";
2258 case SV_DRAGON_WHITE:
2261 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
2263 return "breathe frost (110) every 150+d150 turns";
2267 case SV_DRAGON_BLACK:
2270 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
2272 return "breathe acid (130) every 150+d150 turns";
2276 case SV_DRAGON_GREEN:
2279 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
2281 return "breathe poison gas (150) every 180+d180 turns";
2288 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2290 return "breathe fire (200) every 200+d200 turns";
2294 case SV_DRAGON_MULTIHUED:
2297 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
2299 return "breathe multi-hued (250) every 200+d200 turns";
2303 case SV_DRAGON_BRONZE:
2306 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
2308 return "breathe confusion (120) every 180+d180 turns";
2312 case SV_DRAGON_GOLD:
2315 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
2317 return "breathe sound (130) every 180+d180 turns";
2321 case SV_DRAGON_CHAOS:
2324 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
2326 return "breathe chaos/disenchant (220) every 200+d200 turns";
2333 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
2335 return "breathe sound/shards (230) every 200+d200 turns";
2339 case SV_DRAGON_BALANCE:
2342 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
2344 return "breathe balance (250) every 200+d200 turns";
2348 case SV_DRAGON_SHINING:
2351 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2353 return "breathe light/darkness (200) every 200+d200 turns";
2357 case SV_DRAGON_POWER:
2360 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
2362 return "breathe the elements (300) every 200+d200 turns";
2372 return "breathe air";
2379 * Describe a "fully identified" item
2381 bool screen_object(object_type *o_ptr, bool real)
2385 u32b flgs[TR_FLAG_SIZE];
2388 char o_name[MAX_NLEN];
2391 /* Extract the flags */
2392 object_flags(o_ptr, flgs);
2394 /* Extract the description */
2398 roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
2399 (k_text + k_info[lookup_kind(o_ptr->tval, o_ptr->sval)].text),
2400 77 - 15, temp, sizeof(temp));
2401 for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
2402 { info[i] = &temp[j]; i++;}
2405 /* Mega-Hack -- describe activation */
2406 if (have_flag(flgs, TR_ACTIVATE))
2409 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
2411 info[i++] = "It can be activated for...";
2414 info[i++] = item_activation(o_ptr);
2416 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
2418 info[i++] = "...if it is being worn.";
2423 /* Figurines, a hack */
2424 if (o_ptr->tval == TV_FIGURINE)
2427 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
2429 info[i++] = "It will transform into a pet when thrown.";
2434 /* Figurines, a hack */
2435 if (o_ptr->name1 == ART_STONEMASK)
2438 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
2440 info[i++] = "It makes you turn into a vampire permanently.";
2445 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
2448 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
2450 info[i++] = "It will attempt to kill a monster instantly.";
2455 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
2458 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
2460 info[i++] = "It causes you to strike yourself sometimes.";
2464 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
2466 info[i++] = "It always penetrates invulnerability barriers.";
2470 if (o_ptr->name2 == EGO_2WEAPON)
2473 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
2475 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
2480 if (have_flag(flgs, TR_EASY_SPELL))
2483 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
2485 info[i++] = "It affects your ability to cast spells.";
2489 if (o_ptr->name2 == EGO_AMU_FOOL)
2492 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
2494 info[i++] = "It interferes with casting spells.";
2498 if (o_ptr->name2 == EGO_RING_THROW)
2501 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2503 info[i++] = "It provides great strength when you throw an item.";
2507 if (o_ptr->name2 == EGO_AMU_NAIVETY)
2510 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
2512 info[i++] = "It decreases your magic resistance.";
2516 if (o_ptr->tval == TV_STATUE)
2518 monster_race *r_ptr = &r_info[o_ptr->pval];
2520 if (o_ptr->pval == MON_BULLGATES)
2522 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
2524 info[i++] = "It is shameful.";
2526 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
2528 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
2530 info[i++] = "It is fearful.";
2534 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
2536 info[i++] = "It is cheerful.";
2540 /* Hack -- describe lite's */
2541 if (o_ptr->tval == TV_LITE)
2543 if (o_ptr->name2 == EGO_LITE_DARKNESS)
2546 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
2548 info[i++] = "It provides no light.";
2551 if (o_ptr->sval == SV_LITE_FEANOR ||
2552 o_ptr->sval == SV_LITE_LANTERN)
2555 info[i++] = "¤½¤ì¤ÏÌÀ¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
2557 info[i++] = "It decreases radius of light source by 2.";
2563 info[i++] = "¤½¤ì¤ÏÌÀ¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
2565 info[i++] = "It decreases radius of light source by 1.";
2569 else if (artifact_p(o_ptr))
2572 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2574 info[i++] = "It provides light (radius 3) forever.";
2578 else if (o_ptr->name2 == EGO_LITE_SHINE)
2580 if (o_ptr->sval == SV_LITE_FEANOR)
2583 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2585 info[i++] = "It provides light (radius 3) forever.";
2589 else if (o_ptr->sval == SV_LITE_LANTERN)
2592 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2594 info[i++] = "It provides light (radius 3) when fueled.";
2601 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2603 info[i++] = "It provides light (radius 2) when fueled.";
2610 if (o_ptr->sval == SV_LITE_FEANOR)
2613 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2615 info[i++] = "It provides light (radius 2) forever.";
2619 else if (o_ptr->sval == SV_LITE_LANTERN)
2622 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2624 info[i++] = "It provides light (radius 2) when fueled.";
2631 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
2633 info[i++] = "It provides light (radius 1) when fueled.";
2638 if (o_ptr->name2 == EGO_LITE_LONG)
2641 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
2643 info[i++] = "It provides light for much longer time.";
2649 /* And then describe it fully */
2651 if (have_flag(flgs, TR_RIDING))
2653 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
2655 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
2657 info[i++] = "It is made for use while riding.";
2661 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
2663 info[i++] = "It is suitable for use while riding.";
2667 if (have_flag(flgs, TR_STR))
2670 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2672 info[i++] = "It affects your strength.";
2676 if (have_flag(flgs, TR_INT))
2679 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2681 info[i++] = "It affects your intelligence.";
2685 if (have_flag(flgs, TR_WIS))
2688 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2690 info[i++] = "It affects your wisdom.";
2694 if (have_flag(flgs, TR_DEX))
2697 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2699 info[i++] = "It affects your dexterity.";
2703 if (have_flag(flgs, TR_CON))
2706 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2708 info[i++] = "It affects your constitution.";
2712 if (have_flag(flgs, TR_CHR))
2715 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2717 info[i++] = "It affects your charisma.";
2722 if (have_flag(flgs, TR_MAGIC_MASTERY))
2725 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2727 info[i++] = "It affects your ability to use magic devices.";
2731 if (have_flag(flgs, TR_STEALTH))
2734 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2736 info[i++] = "It affects your stealth.";
2740 if (have_flag(flgs, TR_SEARCH))
2743 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2745 info[i++] = "It affects your searching.";
2749 if (have_flag(flgs, TR_INFRA))
2752 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2754 info[i++] = "It affects your infravision.";
2758 if (have_flag(flgs, TR_TUNNEL))
2761 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2763 info[i++] = "It affects your ability to tunnel.";
2767 if (have_flag(flgs, TR_SPEED))
2770 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2772 info[i++] = "It affects your speed.";
2776 if (have_flag(flgs, TR_BLOWS))
2779 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2781 info[i++] = "It affects your attack speed.";
2786 if (have_flag(flgs, TR_BRAND_ACID))
2789 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2791 info[i++] = "It does extra damage from acid.";
2795 if (have_flag(flgs, TR_BRAND_ELEC))
2798 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2800 info[i++] = "It does extra damage from electricity.";
2804 if (have_flag(flgs, TR_BRAND_FIRE))
2807 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2809 info[i++] = "It does extra damage from fire.";
2813 if (have_flag(flgs, TR_BRAND_COLD))
2816 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2818 info[i++] = "It does extra damage from frost.";
2823 if (have_flag(flgs, TR_BRAND_POIS))
2826 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
2828 info[i++] = "It poisons your foes.";
2833 if (have_flag(flgs, TR_CHAOTIC))
2836 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
2838 info[i++] = "It produces chaotic effects.";
2843 if (have_flag(flgs, TR_VAMPIRIC))
2846 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
2848 info[i++] = "It drains life from your foes.";
2853 if (have_flag(flgs, TR_IMPACT))
2856 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
2858 info[i++] = "It can cause earthquakes.";
2863 if (have_flag(flgs, TR_VORPAL))
2866 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2868 info[i++] = "It is very sharp and can cut your foes.";
2873 if (have_flag(flgs, TR_KILL_DRAGON))
2876 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2878 info[i++] = "It is a great bane of dragons.";
2882 else if (have_flag(flgs, TR_SLAY_DRAGON))
2885 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2887 info[i++] = "It is especially deadly against dragons.";
2892 if (have_flag(flgs, TR_KILL_ORC))
2895 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2897 info[i++] = "It is a great bane of orcs.";
2901 if (have_flag(flgs, TR_SLAY_ORC))
2904 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2906 info[i++] = "It is especially deadly against orcs.";
2911 if (have_flag(flgs, TR_KILL_TROLL))
2914 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2916 info[i++] = "It is a great bane of trolls.";
2920 if (have_flag(flgs, TR_SLAY_TROLL))
2923 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2925 info[i++] = "It is especially deadly against trolls.";
2930 if (have_flag(flgs, TR_KILL_GIANT))
2933 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2935 info[i++] = "It is a great bane of giants.";
2938 else if (have_flag(flgs, TR_SLAY_GIANT))
2941 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2943 info[i++] = "It is especially deadly against giants.";
2948 if (have_flag(flgs, TR_KILL_DEMON))
2951 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2953 info[i++] = "It is a great bane of demons.";
2957 if (have_flag(flgs, TR_SLAY_DEMON))
2960 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2962 info[i++] = "It strikes at demons with holy wrath.";
2967 if (have_flag(flgs, TR_KILL_UNDEAD))
2970 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2972 info[i++] = "It is a great bane of undead.";
2976 if (have_flag(flgs, TR_SLAY_UNDEAD))
2979 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2981 info[i++] = "It strikes at undead with holy wrath.";
2986 if (have_flag(flgs, TR_KILL_EVIL))
2989 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2991 info[i++] = "It is a great bane of evil monsters.";
2995 if (have_flag(flgs, TR_SLAY_EVIL))
2998 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
3000 info[i++] = "It fights against evil with holy fury.";
3005 if (have_flag(flgs, TR_KILL_ANIMAL))
3008 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
3010 info[i++] = "It is a great bane of natural creatures.";
3014 if (have_flag(flgs, TR_SLAY_ANIMAL))
3017 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
3019 info[i++] = "It is especially deadly against natural creatures.";
3024 if (have_flag(flgs, TR_KILL_HUMAN))
3027 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
3029 info[i++] = "It is a great bane of humans.";
3033 if (have_flag(flgs, TR_SLAY_HUMAN))
3036 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
3038 info[i++] = "It is especially deadly against humans.";
3043 if (have_flag(flgs, TR_FORCE_WEAPON))
3046 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
3048 info[i++] = "It powerfully strikes at a monster using your mana.";
3052 if (have_flag(flgs, TR_DEC_MANA))
3055 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
3057 info[i++] = "It decreases your mana consumption.";
3061 if (have_flag(flgs, TR_SUST_STR))
3064 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
3066 info[i++] = "It sustains your strength.";
3070 if (have_flag(flgs, TR_SUST_INT))
3073 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
3075 info[i++] = "It sustains your intelligence.";
3079 if (have_flag(flgs, TR_SUST_WIS))
3082 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
3084 info[i++] = "It sustains your wisdom.";
3088 if (have_flag(flgs, TR_SUST_DEX))
3091 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
3093 info[i++] = "It sustains your dexterity.";
3097 if (have_flag(flgs, TR_SUST_CON))
3100 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
3102 info[i++] = "It sustains your constitution.";
3106 if (have_flag(flgs, TR_SUST_CHR))
3109 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
3111 info[i++] = "It sustains your charisma.";
3116 if (have_flag(flgs, TR_IM_ACID))
3119 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3121 info[i++] = "It provides immunity to acid.";
3125 if (have_flag(flgs, TR_IM_ELEC))
3128 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3130 info[i++] = "It provides immunity to electricity.";
3134 if (have_flag(flgs, TR_IM_FIRE))
3137 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3139 info[i++] = "It provides immunity to fire.";
3143 if (have_flag(flgs, TR_IM_COLD))
3146 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3148 info[i++] = "It provides immunity to cold.";
3153 if (have_flag(flgs, TR_THROW))
3156 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3158 info[i++] = "It is perfectly balanced for throwing.";
3162 if (have_flag(flgs, TR_FREE_ACT))
3165 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3167 info[i++] = "It provides immunity to paralysis.";
3171 if (have_flag(flgs, TR_HOLD_LIFE))
3174 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
3176 info[i++] = "It provides resistance to life draining.";
3180 if (have_flag(flgs, TR_RES_FEAR))
3183 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3185 info[i++] = "It makes you completely fearless.";
3189 if (have_flag(flgs, TR_RES_ACID))
3192 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3194 info[i++] = "It provides resistance to acid.";
3198 if (have_flag(flgs, TR_RES_ELEC))
3201 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3203 info[i++] = "It provides resistance to electricity.";
3207 if (have_flag(flgs, TR_RES_FIRE))
3210 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3212 info[i++] = "It provides resistance to fire.";
3216 if (have_flag(flgs, TR_RES_COLD))
3219 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3221 info[i++] = "It provides resistance to cold.";
3225 if (have_flag(flgs, TR_RES_POIS))
3228 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3230 info[i++] = "It provides resistance to poison.";
3235 if (have_flag(flgs, TR_RES_LITE))
3238 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3240 info[i++] = "It provides resistance to light.";
3244 if (have_flag(flgs, TR_RES_DARK))
3247 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3249 info[i++] = "It provides resistance to dark.";
3254 if (have_flag(flgs, TR_RES_BLIND))
3257 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3259 info[i++] = "It provides resistance to blindness.";
3263 if (have_flag(flgs, TR_RES_CONF))
3266 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3268 info[i++] = "It provides resistance to confusion.";
3272 if (have_flag(flgs, TR_RES_SOUND))
3275 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3277 info[i++] = "It provides resistance to sound.";
3281 if (have_flag(flgs, TR_RES_SHARDS))
3284 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3286 info[i++] = "It provides resistance to shards.";
3291 if (have_flag(flgs, TR_RES_NETHER))
3294 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3296 info[i++] = "It provides resistance to nether.";
3300 if (have_flag(flgs, TR_RES_NEXUS))
3303 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3305 info[i++] = "It provides resistance to nexus.";
3309 if (have_flag(flgs, TR_RES_CHAOS))
3312 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3314 info[i++] = "It provides resistance to chaos.";
3318 if (have_flag(flgs, TR_RES_DISEN))
3321 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3323 info[i++] = "It provides resistance to disenchantment.";
3328 if (have_flag(flgs, TR_FEATHER))
3331 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3333 info[i++] = "It allows you to levitate.";
3337 if (have_flag(flgs, TR_LITE))
3339 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
3341 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
3343 info[i++] = "It decreases radius of your light source by 1.";
3347 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë(Ⱦ·Â¤Ë+1)¡£";
3349 info[i++] = "It provides permanent light. (radius +1)";
3353 if (have_flag(flgs, TR_SEE_INVIS))
3356 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3358 info[i++] = "It allows you to see invisible monsters.";
3362 if (have_flag(flgs, TR_TELEPATHY))
3365 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
3367 info[i++] = "It gives telepathic powers.";
3371 if (have_flag(flgs, TR_ESP_ANIMAL))
3374 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤ò´¶ÃΤ¹¤ë¡£";
3376 info[i++] = "It senses natural creatures.";
3380 if (have_flag(flgs, TR_ESP_UNDEAD))
3383 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ò´¶ÃΤ¹¤ë¡£";
3385 info[i++] = "It senses undead.";
3389 if (have_flag(flgs, TR_ESP_DEMON))
3392 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò´¶ÃΤ¹¤ë¡£";
3394 info[i++] = "It senses demons.";
3398 if (have_flag(flgs, TR_ESP_ORC))
3401 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ò´¶ÃΤ¹¤ë¡£";
3403 info[i++] = "It senses orcs.";
3407 if (have_flag(flgs, TR_ESP_TROLL))
3410 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ò´¶ÃΤ¹¤ë¡£";
3412 info[i++] = "It senses trolls.";
3416 if (have_flag(flgs, TR_ESP_GIANT))
3419 info[i++] = "¤½¤ì¤Ïµð¿Í¤ò´¶ÃΤ¹¤ë¡£";
3421 info[i++] = "It senses giants.";
3425 if (have_flag(flgs, TR_ESP_DRAGON))
3428 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò´¶ÃΤ¹¤ë¡£";
3430 info[i++] = "It senses dragons.";
3434 if (have_flag(flgs, TR_ESP_HUMAN))
3437 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ò´¶ÃΤ¹¤ë¡£";
3439 info[i++] = "It senses humans.";
3443 if (have_flag(flgs, TR_ESP_EVIL))
3446 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¸ºß¤ò´¶ÃΤ¹¤ë¡£";
3448 info[i++] = "It senses evil creatures.";
3452 if (have_flag(flgs, TR_ESP_GOOD))
3455 info[i++] = "¤½¤ì¤ÏÁ±Îɤʸºß¤ò´¶ÃΤ¹¤ë¡£";
3457 info[i++] = "It senses good creatures.";
3461 if (have_flag(flgs, TR_ESP_NONLIVING))
3464 info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤò´¶ÃΤ¹¤ë¡£";
3466 info[i++] = "It senses non-living creatures.";
3470 if (have_flag(flgs, TR_ESP_UNIQUE))
3473 info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤ò´¶ÃΤ¹¤ë¡£";
3475 info[i++] = "It senses unique monsters.";
3479 if (have_flag(flgs, TR_SLOW_DIGEST))
3482 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
3484 info[i++] = "It slows your metabolism.";
3488 if (have_flag(flgs, TR_REGEN))
3491 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
3493 info[i++] = "It speeds your regenerative powers.";
3497 if (have_flag(flgs, TR_WARNING))
3500 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
3502 info[i++] = "It warns you of danger";
3506 if (have_flag(flgs, TR_REFLECT))
3509 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
3511 info[i++] = "It reflects bolts and arrows.";
3515 if (have_flag(flgs, TR_SH_FIRE))
3518 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3520 info[i++] = "It produces a fiery sheath.";
3524 if (have_flag(flgs, TR_SH_ELEC))
3527 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3529 info[i++] = "It produces an electric sheath.";
3533 if (have_flag(flgs, TR_SH_COLD))
3536 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3538 info[i++] = "It produces a sheath of coldness.";
3542 if (have_flag(flgs, TR_NO_MAGIC))
3545 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3547 info[i++] = "It produces an anti-magic shell.";
3551 if (have_flag(flgs, TR_NO_TELE))
3554 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
3556 info[i++] = "It prevents teleportation.";
3560 if (have_flag(flgs, TR_XTRA_MIGHT))
3563 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3565 info[i++] = "It fires missiles with extra might.";
3569 if (have_flag(flgs, TR_XTRA_SHOTS))
3572 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3574 info[i++] = "It fires missiles excessively fast.";
3579 if (have_flag(flgs, TR_BLESSED))
3582 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
3584 info[i++] = "It has been blessed by the gods.";
3589 if (cursed_p(o_ptr))
3591 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
3594 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3596 info[i++] = "It is permanently cursed.";
3600 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
3603 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3605 info[i++] = "It is heavily cursed.";
3612 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
3614 info[i++] = "It is cursed.";
3620 if ((have_flag(flgs, TR_TY_CURSE)) || (o_ptr->curse_flags & TRC_TY_CURSE))
3623 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
3625 info[i++] = "It carries an ancient foul curse.";
3629 if ((have_flag(flgs, TR_AGGRAVATE)) || (o_ptr->curse_flags & TRC_AGGRAVATE))
3632 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
3634 info[i++] = "It aggravates nearby creatures.";
3638 if ((have_flag(flgs, TR_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
3641 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
3643 info[i++] = "It drains experience.";
3647 if (o_ptr->curse_flags & TRC_SLOW_REGEN)
3650 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
3652 info[i++] = "It slows your regenerative powers.";
3656 if (o_ptr->curse_flags & TRC_ADD_L_CURSE)
3659 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
3661 info[i++] = "It adds weak curses.";
3665 if (o_ptr->curse_flags & TRC_ADD_H_CURSE)
3668 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
3670 info[i++] = "It adds heavy curses.";
3674 if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
3677 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3679 info[i++] = "It attracts animals.";
3683 if (o_ptr->curse_flags & TRC_CALL_DEMON)
3686 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3688 info[i++] = "It attracts demons.";
3692 if (o_ptr->curse_flags & TRC_CALL_DRAGON)
3695 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3697 info[i++] = "It attracts dragons.";
3701 if (o_ptr->curse_flags & TRC_COWARDICE)
3704 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤µ¯¤³¤¹¡£";
3706 info[i++] = "It makes you subject to cowardice.";
3710 if ((have_flag(flgs, TR_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
3713 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
3715 info[i++] = "It induces random teleportation.";
3719 if (o_ptr->curse_flags & TRC_LOW_MELEE)
3722 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
3724 info[i++] = "It causes you to miss blows.";
3728 if (o_ptr->curse_flags & TRC_LOW_AC)
3731 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
3733 info[i++] = "It helps your enemies' blows.";
3737 if (o_ptr->curse_flags & TRC_LOW_MAGIC)
3740 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
3742 info[i++] = "It encumbers you while spellcasting.";
3746 if (o_ptr->curse_flags & TRC_FAST_DIGEST)
3749 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
3751 info[i++] = "It speeds your metabolism.";
3755 if (o_ptr->curse_flags & TRC_DRAIN_HP)
3758 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
3760 info[i++] = "It drains you.";
3764 if (o_ptr->curse_flags & TRC_DRAIN_MANA)
3767 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
3769 info[i++] = "It drains your mana.";
3774 /* Describe about this kind of object instead of THIS fake object */
3777 switch (o_ptr->tval)
3780 switch (o_ptr->sval)
3782 case SV_RING_LORDLY:
3784 info[i++] = "¤½¤ì¤Ï´ö¤Ä¤«¤Î¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3786 info[i++] = "It provides some random resistances.";
3789 case SV_RING_WARNING:
3791 info[i++] = "¤½¤ì¤Ï¤Ò¤È¤Ä¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3793 info[i++] = "It may provide a low rank ESP.";
3800 switch (o_ptr->sval)
3802 case SV_AMULET_RESISTANCE:
3804 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3806 info[i++] = "It may provides resistance to poison.";
3809 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3811 info[i++] = "It may provide a random resistances.";
3814 case SV_AMULET_THE_MAGI:
3816 info[i++] = "¤½¤ì¤ÏºÇÂç¤Ç£³¤Ä¤Þ¤Ç¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë¡£";
3818 info[i++] = "It provides up to three low rank ESPs.";
3826 if (have_flag(flgs, TR_IGNORE_ACID) &&
3827 have_flag(flgs, TR_IGNORE_ELEC) &&
3828 have_flag(flgs, TR_IGNORE_FIRE) &&
3829 have_flag(flgs, TR_IGNORE_COLD))
3832 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3834 info[i++] = "It cannot be harmed by the elements.";
3839 if (have_flag(flgs, TR_IGNORE_ACID))
3842 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3844 info[i++] = "It cannot be harmed by acid.";
3847 if (have_flag(flgs, TR_IGNORE_ELEC))
3850 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3852 info[i++] = "It cannot be harmed by electricity.";
3855 if (have_flag(flgs, TR_IGNORE_FIRE))
3858 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3860 info[i++] = "It cannot be harmed by fire.";
3863 if (have_flag(flgs, TR_IGNORE_COLD))
3866 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3868 info[i++] = "It cannot be harmed by cold.";
3873 /* No special effects */
3874 if (!i) return (FALSE);
3876 /* Save the screen */
3880 Term_get_size(&wid, &hgt);
3882 /* Display Item name */
3884 object_desc(o_name, o_ptr, TRUE, 3);
3886 object_desc_store(o_name, o_ptr, TRUE, 0);
3890 /* Erase the screen */
3891 for (k = 1; k < hgt; k++) prt("", k, 13);
3893 /* Label the information */
3894 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
3896 monster_race *r_ptr = &r_info[o_ptr->pval];
3897 int namelen = strlen(r_name + r_ptr->name);
3898 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
3899 c_prt(r_ptr->d_attr, format("%c", r_ptr->d_char), 1, 18+namelen);
3900 prt("'", 1, 19+namelen);
3904 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
3906 prt(" Item Attributes:", 1, 15);
3909 /* We will print on top of the map (column 13) */
3910 for (k = 2, j = 0; j < i; j++)
3913 prt(info[j], k++, 15);
3915 /* Every 20 entries (lines 2 to 21), start over */
3916 if ((k == hgt - 2) && (j+1 < i))
3919 prt("-- ³¤¯ --", k, 15);
3921 prt("-- more --", k, 15);
3924 for (; k > 2; k--) prt("", k, 15);
3930 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
3932 prt("[Press any key to continue]", k, 15);
3937 /* Restore the screen */
3940 /* Gave knowledge */
3947 * Convert an inventory index into a one character label
3948 * Note that the label does NOT distinguish inven/equip.
3950 char index_to_label(int i)
3952 /* Indexes for "inven" are easy */
3953 if (i < INVEN_RARM) return (I2A(i));
3955 /* Indexes for "equip" are offset */
3956 return (I2A(i - INVEN_RARM));
3961 * Convert a label into the index of an item in the "inven"
3962 * Return "-1" if the label does not indicate a real item
3964 s16b label_to_inven(int c)
3969 i = (islower(c) ? A2I(c) : -1);
3971 /* Verify the index */
3972 if ((i < 0) || (i > INVEN_PACK)) return (-1);
3974 /* Empty slots can never be chosen */
3975 if (!inventory[i].k_idx) return (-1);
3977 /* Return the index */
3983 * Convert a label into the index of a item in the "equip"
3984 * Return "-1" if the label does not indicate a real item
3986 s16b label_to_equip(int c)
3991 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
3993 /* Verify the index */
3994 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
3996 /* Empty slots can never be chosen */
3997 if (!inventory[i].k_idx) return (-1);
3999 /* Return the index */
4006 * Determine which equipment slot (if any) an item likes
4008 s16b wield_slot(object_type *o_ptr)
4010 /* Slot for equipment */
4011 switch (o_ptr->tval)
4018 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
4019 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
4020 return (INVEN_LARM);
4027 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
4028 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
4029 return (INVEN_RARM);
4039 /* Use the right hand first */
4040 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
4042 /* Use the left hand for swapping (by default) */
4043 return (INVEN_LEFT);
4049 return (INVEN_NECK);
4054 return (INVEN_LITE);
4061 return (INVEN_BODY);
4066 return (INVEN_OUTER);
4072 return (INVEN_HEAD);
4077 return (INVEN_HANDS);
4082 return (INVEN_FEET);
4086 /* No slot available */
4092 * Return a string mentioning how a given item is carried
4094 cptr mention_use(int i)
4098 /* Examine the location */
4102 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê"); break;
4104 case INVEN_RARM: p = "Wielding"; break;
4108 case INVEN_LARM: p = (left_hander ? " ±¦¼ê" : " º¸¼ê"); break;
4110 case INVEN_LARM: p = "On arm"; break;
4114 case INVEN_BOW: p = "¼Í·âÍÑ"; break;
4116 case INVEN_BOW: p = "Shooting"; break;
4120 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
4122 case INVEN_LEFT: p = "On left hand"; break;
4126 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
4128 case INVEN_RIGHT: p = "On right hand"; break;
4132 case INVEN_NECK: p = " ¼ó"; break;
4134 case INVEN_NECK: p = "Around neck"; break;
4138 case INVEN_LITE: p = " ¸÷¸»"; break;
4140 case INVEN_LITE: p = "Light source"; break;
4144 case INVEN_BODY: p = " ÂÎ"; break;
4146 case INVEN_BODY: p = "On body"; break;
4150 case INVEN_OUTER: p = "ÂΤξå"; break;
4152 case INVEN_OUTER: p = "About body"; break;
4156 case INVEN_HEAD: p = " Ƭ"; break;
4158 case INVEN_HEAD: p = "On head"; break;
4162 case INVEN_HANDS: p = " ¼ê"; break;
4164 case INVEN_HANDS: p = "On hands"; break;
4168 case INVEN_FEET: p = " "; break;
4170 case INVEN_FEET: p = "On feet"; break;
4174 default: p = "¥¶¥Ã¥¯"; break;
4176 default: p = "In pack"; break;
4181 /* Hack -- Heavy weapon */
4182 if (i == INVEN_RARM)
4184 if (p_ptr->heavy_wield[0])
4195 /* Hack -- Heavy weapon */
4196 if (i == INVEN_LARM)
4198 if (p_ptr->heavy_wield[1])
4209 /* Hack -- Heavy bow */
4213 o_ptr = &inventory[i];
4214 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
4225 /* Return the result */
4231 * Return a string describing how a given item is being worn.
4232 * Currently, only used for items in the equipment, not inventory.
4234 cptr describe_use(int i)
4241 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
4243 case INVEN_RARM: p = "attacking monsters with"; break;
4247 case INVEN_LARM: p = (left_hander ? " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
4249 case INVEN_LARM: p = "wearing on your arm"; break;
4253 case INVEN_BOW: p = "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
4255 case INVEN_BOW: p = "shooting missiles with"; break;
4259 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4261 case INVEN_LEFT: p = "wearing on your left hand"; break;
4265 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4267 case INVEN_RIGHT: p = "wearing on your right hand"; break;
4271 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
4273 case INVEN_NECK: p = "wearing around your neck"; break;
4277 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
4279 case INVEN_LITE: p = "using to light the way"; break;
4283 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
4285 case INVEN_BODY: p = "wearing on your body"; break;
4289 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
4291 case INVEN_OUTER: p = "wearing on your back"; break;
4295 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
4297 case INVEN_HEAD: p = "wearing on your head"; break;
4301 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
4303 case INVEN_HANDS: p = "wearing on your hands"; break;
4307 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
4309 case INVEN_FEET: p = "wearing on your feet"; break;
4313 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
4315 default: p = "carrying in your pack"; break;
4320 /* Hack -- Heavy weapon */
4321 if (i == INVEN_RARM)
4324 int hold = adj_str_hold[p_ptr->stat_ind[A_STR]];
4326 if (p_ptr->ryoute) hold *= 2;
4327 o_ptr = &inventory[i];
4328 if (hold < o_ptr->weight / 10)
4339 /* Hack -- Heavy bow */
4343 o_ptr = &inventory[i];
4344 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
4347 p = "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î";
4355 /* Return the result */
4360 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
4362 bool check_book_realm(const byte book_tval, const byte book_sval)
4364 if (book_tval < TV_LIFE_BOOK) return FALSE;
4365 if (p_ptr->pclass == CLASS_SORCERER)
4367 return is_magic(tval2realm(book_tval));
4369 else if (p_ptr->pclass == CLASS_RED_MAGE)
4371 if (is_magic(tval2realm(book_tval)))
4372 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
4374 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
4379 * Check an item against the item tester info
4381 bool item_tester_okay(object_type *o_ptr)
4383 /* Hack -- allow listing empty slots */
4384 if (item_tester_full) return (TRUE);
4386 /* Require an item */
4387 if (!o_ptr->k_idx) return (FALSE);
4389 /* Hack -- ignore "gold" */
4390 if (o_ptr->tval == TV_GOLD) return (FALSE);
4392 /* Check the tval */
4393 if (item_tester_tval)
4395 /* Is it a spellbook? If so, we need a hack -- TY */
4396 if ((item_tester_tval <= TV_DEATH_BOOK) &&
4397 (item_tester_tval >= TV_LIFE_BOOK))
4398 return check_book_realm(o_ptr->tval, o_ptr->sval);
4400 if (item_tester_tval != o_ptr->tval) return (FALSE);
4403 /* Check the hook */
4404 if (item_tester_hook)
4406 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
4417 * Choice window "shadow" of the "show_inven()" function
4419 void display_inven(void)
4421 register int i, n, z = 0;
4423 byte attr = TERM_WHITE;
4425 char o_name[MAX_NLEN];
4429 Term_get_size(&wid, &hgt);
4431 /* Find the "final" slot */
4432 for (i = 0; i < INVEN_PACK; i++)
4434 o_ptr = &inventory[i];
4436 /* Skip non-objects */
4437 if (!o_ptr->k_idx) continue;
4443 /* Display the pack */
4444 for (i = 0; i < z; i++)
4446 /* Examine the item */
4447 o_ptr = &inventory[i];
4449 /* Start with an empty "index" */
4450 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4452 /* Is this item "acceptable"? */
4453 if (item_tester_okay(o_ptr))
4455 /* Prepare an "index" */
4456 tmp_val[0] = index_to_label(i);
4458 /* Bracket the "index" --(-- */
4462 /* Display the index (or blank space) */
4463 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
4465 /* Obtain an item description */
4466 object_desc(o_name, o_ptr, TRUE, 3);
4468 /* Obtain the length of the description */
4472 attr = tval_to_attr[o_ptr->tval % 128];
4474 /* Grey out charging items */
4480 /* Display the entry itself */
4481 Term_putstr(3, i, n, attr, o_name);
4483 /* Erase the rest of the line */
4484 Term_erase(3+n, i, 255);
4486 /* Display the weight if needed */
4487 if (show_weights && o_ptr->weight)
4489 int wgt = o_ptr->weight * o_ptr->number;
4491 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
4493 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4496 prt(tmp_val, i, wid - 9);
4500 /* Erase the rest of the window */
4501 for (i = z; i < hgt; i++)
4503 /* Erase the line */
4504 Term_erase(0, i, 255);
4511 * Choice window "shadow" of the "show_equip()" function
4513 void display_equip(void)
4517 byte attr = TERM_WHITE;
4519 char o_name[MAX_NLEN];
4523 Term_get_size(&wid, &hgt);
4525 /* Display the equipment */
4526 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
4528 /* Examine the item */
4529 o_ptr = &inventory[i];
4531 /* Start with an empty "index" */
4532 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4534 /* Is this item "acceptable"? */
4535 if (item_tester_okay(o_ptr))
4537 /* Prepare an "index" */
4538 tmp_val[0] = index_to_label(i);
4540 /* Bracket the "index" --(-- */
4544 /* Display the index (or blank space) */
4545 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
4547 /* Obtain an item description */
4548 if ((i == INVEN_LARM) && p_ptr->ryoute)
4551 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
4553 strcpy(o_name, "(wielding with two-hands)");
4559 object_desc(o_name, o_ptr, TRUE, 3);
4560 attr = tval_to_attr[o_ptr->tval % 128];
4563 /* Obtain the length of the description */
4566 /* Grey out charging items */
4572 /* Display the entry itself */
4573 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
4575 /* Erase the rest of the line */
4576 Term_erase(3+n, i - INVEN_RARM, 255);
4578 /* Display the weight (if needed) */
4579 if (show_weights && o_ptr->weight)
4581 int wgt = o_ptr->weight * o_ptr->number;
4583 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
4585 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4588 prt(tmp_val, i - INVEN_RARM, wid - (show_labels ? 28 : 9));
4591 /* Display the slot description (if needed) */
4594 Term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
4595 prt(mention_use(i), i - INVEN_RARM, wid - 15);
4599 /* Erase the rest of the window */
4600 for (i = INVEN_TOTAL - INVEN_RARM; i < hgt; i++)
4602 /* Clear that line */
4603 Term_erase(0, i, 255);
4609 * Find the "first" inventory object with the given "tag".
4611 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
4612 * inscription of an object. Alphabetical characters don't work as a
4615 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
4616 * and "x" is the "current" command_cmd code.
4618 static bool get_tag(int *cp, char tag, int mode)
4623 /* Extract index from mode */
4628 end = INVEN_TOTAL - 1;
4633 end = INVEN_PACK - 1;
4640 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
4642 /* Check every inventory object */
4643 for (i = start; i <= end; i++)
4645 object_type *o_ptr = &inventory[i];
4647 /* Skip non-objects */
4648 if (!o_ptr->k_idx) continue;
4650 /* Skip empty inscriptions */
4651 if (!o_ptr->inscription) continue;
4653 /* Skip non-choice */
4654 if (!item_tester_okay(o_ptr)) continue;
4657 s = strchr(quark_str(o_ptr->inscription), '@');
4659 /* Process all tags */
4662 /* Check the special tags */
4663 if ((s[1] == command_cmd) && (s[2] == tag))
4665 /* Save the actual inventory ID */
4672 /* Find another '@' */
4673 s = strchr(s + 1, '@');
4678 /**** Find a tag in the form of {@#} (allows only numerals) ***/
4680 /* Don't allow {@#} with '#' being alphabet */
4681 if (tag < '0' || '9' < tag)
4687 /* Check every object */
4688 for (i = start; i <= end; i++)
4690 object_type *o_ptr = &inventory[i];
4692 /* Skip non-objects */
4693 if (!o_ptr->k_idx) continue;
4695 /* Skip empty inscriptions */
4696 if (!o_ptr->inscription) continue;
4698 /* Skip non-choice */
4699 if (!item_tester_okay(o_ptr)) continue;
4702 s = strchr(quark_str(o_ptr->inscription), '@');
4704 /* Process all tags */
4707 /* Check the normal tags */
4710 /* Save the actual inventory ID */
4717 /* Find another '@' */
4718 s = strchr(s + 1, '@');
4728 * Find the "first" floor object with the given "tag".
4730 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
4731 * inscription of an object. Alphabetical characters don't work as a
4734 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
4735 * and "x" is the "current" command_cmd code.
4737 static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
4742 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
4744 /* Check every object in the grid */
4745 for (i = 0; i < floor_num && i < 23; i++)
4747 object_type *o_ptr = &o_list[floor_list[i]];
4749 /* Skip empty inscriptions */
4750 if (!o_ptr->inscription) continue;
4753 s = strchr(quark_str(o_ptr->inscription), '@');
4755 /* Process all tags */
4758 /* Check the special tags */
4759 if ((s[1] == command_cmd) && (s[2] == tag))
4761 /* Save the actual floor object ID */
4768 /* Find another '@' */
4769 s = strchr(s + 1, '@');
4774 /**** Find a tag in the form of {@#} (allows only numerals) ***/
4776 /* Don't allow {@#} with '#' being alphabet */
4777 if (tag < '0' || '9' < tag)
4783 /* Check every object in the grid */
4784 for (i = 0; i < floor_num && i < 23; i++)
4786 object_type *o_ptr = &o_list[floor_list[i]];
4788 /* Skip empty inscriptions */
4789 if (!o_ptr->inscription) continue;
4792 s = strchr(quark_str(o_ptr->inscription), '@');
4794 /* Process all tags */
4797 /* Check the normal tags */
4800 /* Save the floor object ID */
4807 /* Find another '@' */
4808 s = strchr(s + 1, '@');
4818 * Move around label characters with correspond tags
4820 static void prepare_label_string(char *label, int mode)
4822 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
4823 int offset = (mode == USE_EQUIP) ? INVEN_RARM : 0;
4826 /* Prepare normal labels */
4827 strcpy(label, alphabet_chars);
4829 /* Move each label */
4830 for (i = 0; i < 52; i++)
4833 char c = alphabet_chars[i];
4835 /* Find a tag with this label */
4836 if (get_tag(&index, c, mode))
4838 /* Delete the overwritten label */
4839 if (label[i] == c) label[i] = ' ';
4841 /* Move the label to the place of corresponding tag */
4842 label[index - offset] = c;
4849 * Move around label characters with correspond tags (floor version)
4851 static void prepare_label_string_floor(char *label, int floor_list[], int floor_num)
4853 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
4856 /* Prepare normal labels */
4857 strcpy(label, alphabet_chars);
4859 /* Move each label */
4860 for (i = 0; i < 52; i++)
4863 char c = alphabet_chars[i];
4865 /* Find a tag with this label */
4866 if (get_tag_floor(&index, c, floor_list, floor_num))
4868 /* Delete the overwritten label */
4869 if (label[i] == c) label[i] = ' ';
4871 /* Move the label to the place of corresponding tag */
4879 * Display the inventory.
4881 * Hack -- do not display "trailing" empty slots
4883 int show_inven(int target_item)
4885 int i, j, k, l, z = 0;
4886 int col, cur_col, len;
4888 char o_name[MAX_NLEN];
4892 char out_desc[23][MAX_NLEN];
4893 int target_item_label = 0;
4895 char inven_label[52 + 1];
4897 /* Starting column */
4901 Term_get_size(&wid, &hgt);
4903 /* Default "max-length" */
4904 len = wid - col - 1;
4907 /* Find the "final" slot */
4908 for (i = 0; i < INVEN_PACK; i++)
4910 o_ptr = &inventory[i];
4912 /* Skip non-objects */
4913 if (!o_ptr->k_idx) continue;
4919 prepare_label_string(inven_label, USE_INVEN);
4921 /* Display the inventory */
4922 for (k = 0, i = 0; i < z; i++)
4924 o_ptr = &inventory[i];
4926 /* Is this item acceptable? */
4927 if (!item_tester_okay(o_ptr)) continue;
4929 /* Describe the object */
4930 object_desc(o_name, o_ptr, TRUE, 3);
4932 /* Save the object index, color, and description */
4934 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4936 /* Grey out charging items */
4939 out_color[k] = TERM_L_DARK;
4942 (void)strcpy(out_desc[k], o_name);
4944 /* Find the predicted "line length" */
4945 l = strlen(out_desc[k]) + 5;
4947 /* Be sure to account for the weight */
4948 if (show_weights) l += 9;
4950 /* Account for icon if displayed */
4951 if (show_item_graph)
4954 if (use_bigtile) l++;
4957 /* Maintain the maximum length */
4958 if (l > len) len = l;
4960 /* Advance to next "line" */
4964 /* Find the column to start in */
4965 col = (len > wid - 4) ? 0 : (wid - len - 1);
4967 /* Output each entry */
4968 for (j = 0; j < k; j++)
4974 o_ptr = &inventory[i];
4976 /* Clear the line */
4977 prt("", j + 1, col ? col - 2 : col);
4979 if (use_menu && target_item)
4981 if (j == (target_item-1))
4984 strcpy(tmp_val, "¡Õ");
4986 strcpy(tmp_val, "> ");
4988 target_item_label = i;
4990 else strcpy(tmp_val, " ");
4992 else if (i <= INVEN_PACK)
4994 /* Prepare an index --(-- */
4995 sprintf(tmp_val, "%c)", inven_label[i]);
4999 /* Prepare an index --(-- */
5000 sprintf(tmp_val, "%c)", index_to_label(i));
5003 /* Clear the line with the (possibly indented) index */
5004 put_str(tmp_val, j + 1, col);
5008 /* Display graphics for object, if desired */
5009 if (show_item_graph)
5011 byte a = object_attr(o_ptr);
5012 char c = object_char(o_ptr);
5015 if (a & 0x80) a |= 0x40;
5018 Term_draw(cur_col, j + 1, a, c);
5023 Term_draw(cur_col, j + 1, 255, -1);
5029 /* Display the entry itself */
5030 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
5032 /* Display the weight if needed */
5035 int wgt = o_ptr->weight * o_ptr->number;
5037 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5039 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
5042 prt(tmp_val, j + 1, wid - 9);
5046 /* Make a "shadow" below the list (only if needed) */
5047 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5049 /* Save the new column */
5052 return target_item_label;
5058 * Display the equipment.
5060 int show_equip(int target_item)
5063 int col, cur_col, len;
5066 char o_name[MAX_NLEN];
5069 char out_desc[23][MAX_NLEN];
5070 int target_item_label = 0;
5072 char equip_label[52 + 1];
5074 /* Starting column */
5078 Term_get_size(&wid, &hgt);
5080 /* Maximal length */
5081 len = wid - col - 1;
5084 /* Scan the equipment list */
5085 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
5087 o_ptr = &inventory[i];
5089 /* Is this item acceptable? */
5090 if (!item_tester_okay(o_ptr) && (!((i == INVEN_LARM) && p_ptr->ryoute) || item_tester_no_ryoute)) continue;
5093 object_desc(o_name, o_ptr, TRUE, 3);
5095 if ((i == INVEN_LARM) && p_ptr->ryoute)
5098 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
5100 (void)strcpy(out_desc[k],"(wielding with two-hands)");
5106 (void)strcpy(out_desc[k], o_name);
5107 out_color[k] = tval_to_attr[o_ptr->tval % 128];
5111 /* Grey out charging items */
5114 out_color[k] = TERM_L_DARK;
5117 /* Extract the maximal length (see below) */
5119 l = strlen(out_desc[k]) + (2 + 1);
5121 l = strlen(out_desc[k]) + (2 + 3);
5125 /* Increase length for labels (if needed) */
5127 if (show_labels) l += (7 + 2);
5129 if (show_labels) l += (14 + 2);
5133 /* Increase length for weight (if needed) */
5134 if (show_weights) l += 9;
5136 if (show_item_graph) l += 2;
5138 /* Maintain the max-length */
5139 if (l > len) len = l;
5141 /* Advance the entry */
5145 /* Hack -- Find a column to start in */
5147 col = (len > wid - 6) ? 0 : (wid - len - 1);
5149 col = (len > wid - 4) ? 0 : (wid - len - 1);
5152 prepare_label_string(equip_label, USE_EQUIP);
5154 /* Output each entry */
5155 for (j = 0; j < k; j++)
5161 o_ptr = &inventory[i];
5163 /* Clear the line */
5164 prt("", j + 1, col ? col - 2 : col);
5166 if (use_menu && target_item)
5168 if (j == (target_item-1))
5171 strcpy(tmp_val, "¡Õ");
5173 strcpy(tmp_val, "> ");
5175 target_item_label = i;
5177 else strcpy(tmp_val, " ");
5179 else if (i >= INVEN_RARM)
5181 /* Prepare an index --(-- */
5182 sprintf(tmp_val, "%c)", equip_label[i - INVEN_RARM]);
5186 /* Prepare an index --(-- */
5187 sprintf(tmp_val, "%c)", index_to_label(i));
5190 /* Clear the line with the (possibly indented) index */
5191 put_str(tmp_val, j+1, col);
5195 /* Display graphics for object, if desired */
5196 if (show_item_graph)
5198 byte a = object_attr(o_ptr);
5199 char c = object_char(o_ptr);
5202 if (a & 0x80) a |= 0x40;
5205 Term_draw(cur_col, j + 1, a, c);
5210 Term_draw(cur_col, j + 1, 255, -1);
5218 /* Mention the use */
5220 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
5222 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
5225 put_str(tmp_val, j+1, cur_col);
5227 /* Display the entry itself */
5229 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
5231 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
5238 /* Display the entry itself */
5239 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
5242 /* Display the weight if needed */
5245 int wgt = o_ptr->weight * o_ptr->number;
5247 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5249 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
5252 prt(tmp_val, j + 1, wid - 9);
5256 /* Make a "shadow" below the list (only if needed) */
5257 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5259 /* Save the new column */
5262 return target_item_label;
5269 * Flip "inven" and "equip" in any sub-windows
5271 void toggle_inven_equip(void)
5276 for (j = 0; j < 8; j++)
5279 if (!angband_term[j]) continue;
5281 /* Flip inven to equip */
5282 if (window_flag[j] & (PW_INVEN))
5285 window_flag[j] &= ~(PW_INVEN);
5286 window_flag[j] |= (PW_EQUIP);
5289 p_ptr->window |= (PW_EQUIP);
5292 /* Flip inven to equip */
5293 else if (window_flag[j] & (PW_EQUIP))
5296 window_flag[j] &= ~(PW_EQUIP);
5297 window_flag[j] |= (PW_INVEN);
5300 p_ptr->window |= (PW_INVEN);
5308 * Verify the choice of an item.
5310 * The item can be negative to mean "item on floor".
5312 static bool verify(cptr prompt, int item)
5314 char o_name[MAX_NLEN];
5315 char out_val[MAX_NLEN+20];
5322 o_ptr = &inventory[item];
5328 o_ptr = &o_list[0 - item];
5332 object_desc(o_name, o_ptr, TRUE, 3);
5336 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
5338 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
5343 return (get_check(out_val));
5348 * Hack -- allow user to "prevent" certain choices
5350 * The item can be negative to mean "item on floor".
5352 static bool get_item_allow(int item)
5361 o_ptr = &inventory[item];
5367 o_ptr = &o_list[0 - item];
5370 /* No inscription */
5371 if (!o_ptr->inscription) return (TRUE);
5374 s = strchr(quark_str(o_ptr->inscription), '!');
5376 /* Process preventions */
5379 /* Check the "restriction" */
5380 if ((s[1] == command_cmd) || (s[1] == '*'))
5382 /* Verify the choice */
5384 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
5386 if (!verify("Really try", item)) return (FALSE);
5391 /* Find another '!' */
5392 s = strchr(s + 1, '!');
5402 * Auxiliary function for "get_item()" -- test an index
5404 static bool get_item_okay(int i)
5407 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
5409 /* Verify the item */
5410 if (!item_tester_okay(&inventory[i])) return (FALSE);
5419 * Determine whether get_item() can get some item or not
5420 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
5422 bool can_get_item(void)
5424 int j, floor_list[23], floor_num = 0;
5426 for (j = 0; j < INVEN_TOTAL; j++)
5427 if (item_tester_okay(&inventory[j]))
5430 floor_num = scan_floor(floor_list, py, px, 0x01);
5438 * Let the user select an item, save its "index"
5440 * Return TRUE only if an acceptable item was chosen by the user.
5442 * The selected item must satisfy the "item_tester_hook()" function,
5443 * if that hook is set, and the "item_tester_tval", if that value is set.
5445 * All "item_tester" restrictions are cleared before this function returns.
5447 * The user is allowed to choose acceptable items from the equipment,
5448 * inventory, or floor, respectively, if the proper flag was given,
5449 * and there are any acceptable items in that location.
5451 * The equipment or inventory are displayed (even if no acceptable
5452 * items are in that location) if the proper flag was given.
5454 * If there are no acceptable items available anywhere, and "str" is
5455 * not NULL, then it will be used as the text of a warning message
5456 * before the function returns.
5458 * Note that the user must press "-" to specify the item on the floor,
5459 * and there is no way to "examine" the item on the floor, while the
5460 * use of "capital" letters will "examine" an inventory/equipment item,
5461 * and prompt for its use.
5463 * If a legal item is selected from the inventory, we save it in "cp"
5464 * directly (0 to 35), and return TRUE.
5466 * If a legal item is selected from the floor, we save it in "cp" as
5467 * a negative (-1 to -511), and return TRUE.
5469 * If no item is available, we do nothing to "cp", and we display a
5470 * warning message, using "str" if available, and return FALSE.
5472 * If no item is selected, we do nothing to "cp", and return FALSE.
5474 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
5475 * to allow the user to enter a command while viewing those screens, and
5476 * also to induce "auto-enter" of stores, and other such stuff.
5478 * Global "p_ptr->command_see" may be set before calling this function to start
5479 * out in "browse" mode. It is cleared before this function returns.
5481 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
5482 * If it is TRUE then we are viewing inventory, else equipment.
5484 * We always erase the prompt when we are done, leaving a blank line,
5485 * or a warning message, if appropriate, if no items are available.
5487 bool get_item(int *cp, cptr pmt, cptr str, int mode)
5489 s16b this_o_idx, next_o_idx = 0;
5493 int j, k, i1, i2, e1, e2;
5503 bool allow_floor = FALSE;
5505 bool toggle = FALSE;
5511 extern bool select_the_force;
5513 int menu_line = (use_menu ? 1 : 0);
5517 #ifdef ALLOW_EASY_FLOOR /* TNB */
5519 if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
5521 #endif /* ALLOW_EASY_FLOOR -- TNB */
5525 /* Get the item index */
5526 if (repeat_pull(cp))
5529 if (*cp == INVEN_FORCE)
5531 item_tester_tval = 0;
5532 item_tester_hook = NULL;
5533 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5545 /* Acquire object */
5548 /* Validate the item */
5549 if (item_tester_okay(o_ptr))
5551 /* Forget the item_tester_tval restriction */
5552 item_tester_tval = 0;
5554 /* Forget the item_tester_hook restriction */
5555 item_tester_hook = NULL;
5557 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5564 /* Verify the item */
5565 else if (get_item_okay(*cp))
5567 /* Forget the item_tester_tval restriction */
5568 item_tester_tval = 0;
5570 /* Forget the item_tester_hook restriction */
5571 item_tester_hook = NULL;
5573 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5580 #endif /* ALLOW_REPEAT */
5583 if (mode & (USE_EQUIP)) equip = TRUE;
5584 if (mode & (USE_INVEN)) inven = TRUE;
5585 if (mode & (USE_FLOOR)) floor = TRUE;
5588 /* Paranoia XXX XXX XXX */
5595 /* No item selected */
5599 /* Full inventory */
5601 i2 = INVEN_PACK - 1;
5603 /* Forbid inventory */
5604 if (!inven) i2 = -1;
5607 for (j = 0; j < INVEN_PACK; j++)
5608 if (item_tester_okay(&inventory[j])) max_inven++;
5611 /* Restrict inventory indexes */
5612 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5613 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5616 /* Full equipment */
5618 e2 = INVEN_TOTAL - 1;
5620 /* Forbid equipment */
5621 if (!equip) e2 = -1;
5624 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5625 if (item_tester_okay(&inventory[j])) max_equip++;
5626 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5629 /* Restrict equipment indexes */
5630 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5631 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5635 /* Restrict floor usage */
5638 /* Scan all objects in the grid */
5639 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5643 /* Acquire object */
5644 o_ptr = &o_list[this_o_idx];
5646 /* Acquire next object */
5647 next_o_idx = o_ptr->next_o_idx;
5649 /* Accept the item on the floor if legal */
5650 if (item_tester_okay(o_ptr)) allow_floor = TRUE;
5654 /* Require at least one legal choice */
5655 if (!allow_floor && (i1 > i2) && (e1 > e2))
5657 /* Cancel p_ptr->command_see */
5658 command_see = FALSE;
5666 if (select_the_force) {
5672 /* Analyze choices */
5675 /* Hack -- Start on equipment if requested */
5676 if (command_see && command_wrk && equip)
5681 /* Use inventory if allowed */
5684 command_wrk = FALSE;
5687 /* Use equipment if allowed */
5693 /* Use inventory for floor */
5696 command_wrk = FALSE;
5702 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5704 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5706 /* Hack -- start out in "display" mode */
5714 /* Repeat until done */
5717 int get_item_label = 0;
5726 for (j = 0; j < 8; j++)
5729 if (!angband_term[j]) continue;
5731 /* Count windows displaying inven */
5732 if (window_flag[j] & (PW_INVEN)) ni++;
5734 /* Count windows displaying equip */
5735 if (window_flag[j] & (PW_EQUIP)) ne++;
5738 /* Toggle if needed */
5739 if ((command_wrk && ni && !ne) ||
5740 (!command_wrk && !ni && ne))
5743 toggle_inven_equip();
5750 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5752 /* Redraw windows */
5756 /* Inventory screen */
5759 /* Redraw if needed */
5760 if (command_see) get_item_label = show_inven(menu_line);
5763 /* Equipment screen */
5766 /* Redraw if needed */
5767 if (command_see) get_item_label = show_equip(menu_line);
5770 /* Viewing inventory */
5773 /* Begin the prompt */
5775 sprintf(out_val, "»ý¤Áʪ:");
5777 sprintf(out_val, "Inven:");
5781 /* Some legal items */
5782 if ((i1 <= i2) && !use_menu)
5784 /* Build the prompt */
5786 sprintf(tmp_val, "%c-%c,'(',')',",
5788 sprintf(tmp_val, " %c-%c,'(',')',",
5791 index_to_label(i1), index_to_label(i2));
5794 strcat(out_val, tmp_val);
5797 /* Indicate ability to "view" */
5799 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5801 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5807 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
5808 else if (select_the_force)
5809 strcat(out_val, " 'w'Îýµ¤½Ñ,");
5811 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
5812 else if (select_the_force)
5813 strcat(out_val, " w for the Force,");
5818 /* Viewing equipment */
5821 /* Begin the prompt */
5823 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5825 sprintf(out_val, "Equip:");
5829 /* Some legal items */
5830 if ((e1 <= e2) && !use_menu)
5832 /* Build the prompt */
5834 sprintf(tmp_val, "%c-%c,'(',')',",
5836 sprintf(tmp_val, " %c-%c,'(',')',",
5839 index_to_label(e1), index_to_label(e2));
5842 strcat(out_val, tmp_val);
5845 /* Indicate ability to "view" */
5847 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5849 if (!command_see) strcat(out_val, " * to see,");
5855 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
5857 if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
5862 /* Indicate legality of the "floor" item */
5864 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
5866 if (allow_floor) strcat(out_val, " - for floor,");
5870 /* Finish the prompt */
5871 strcat(out_val, " ESC");
5873 /* Build the prompt */
5874 sprintf(tmp_val, "(%s) %s", out_val, pmt);
5876 /* Show the prompt */
5885 int max_line = (command_wrk ? max_equip : max_inven);
5901 menu_line += (max_line - 1);
5920 /* Verify legality */
5921 if (!inven || !equip)
5927 /* Hack -- Fix screen */
5937 /* Switch inven/equip */
5938 command_wrk = !command_wrk;
5939 max_line = (command_wrk ? max_equip : max_inven);
5940 if (menu_line > max_line) menu_line = max_line;
5942 /* Need to redraw */
5951 if (command_wrk == USE_FLOOR)
5954 (*cp) = -get_item_label;
5958 /* Validate the item */
5959 if (!get_item_okay(get_item_label))
5965 /* Allow player to "refuse" certain actions */
5966 if (!get_item_allow(get_item_label))
5972 /* Accept that choice */
5973 (*cp) = get_item_label;
5982 if (select_the_force) {
5990 if (menu_line > max_line) menu_line -= max_line;
6011 command_see = FALSE;
6031 /* Verify legality */
6032 if (!inven || !equip)
6038 /* Hack -- Fix screen */
6048 /* Switch inven/equip */
6049 command_wrk = !command_wrk;
6051 /* Need to redraw */
6057 /* Use floor item */
6060 /* Scan all objects in the grid */
6061 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
6065 /* Acquire object */
6066 o_ptr = &o_list[this_o_idx];
6068 /* Acquire next object */
6069 next_o_idx = o_ptr->next_o_idx;
6071 /* Validate the item */
6072 if (!item_tester_okay(o_ptr)) continue;
6077 /* Verify the item (if required) */
6079 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
6081 if (other_query_flag && !verify("Try", k)) continue;
6085 /* Allow player to "refuse" certain actions */
6086 if (!get_item_allow(k)) continue;
6088 /* Accept that choice */
6105 case '1': case '2': case '3':
6106 case '4': case '5': case '6':
6107 case '7': case '8': case '9':
6109 /* Look up the tag */
6110 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
6116 /* Hack -- Validate the item */
6117 if ((k < INVEN_RARM) ? !inven : !equip)
6123 /* Validate the item */
6124 if (!get_item_okay(k))
6130 /* Allow player to "refuse" certain actions */
6131 if (!get_item_allow(k))
6137 /* Accept that choice */
6148 /* Choose "default" inventory item */
6151 k = ((i1 == i2) ? i1 : -1);
6154 /* Choose "default" equipment item */
6157 k = ((e1 == e2) ? e1 : -1);
6160 /* Validate the item */
6161 if (!get_item_okay(k))
6167 /* Allow player to "refuse" certain actions */
6168 if (!get_item_allow(k))
6174 /* Accept that choice */
6184 if (select_the_force) {
6197 bool not_found = FALSE;
6199 /* Look up the alphabetical tag */
6200 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
6205 /* Hack -- Validate the item */
6206 else if ((k < INVEN_RARM) ? !inven : !equip)
6211 /* Validate the item */
6212 else if (!get_item_okay(k))
6219 /* Accept that choice */
6226 /* Extract "query" setting */
6227 ver = isupper(which);
6228 which = tolower(which);
6230 /* Convert letter to inventory index */
6233 if (which == '(') k = i1;
6234 else if (which == ')') k = i2;
6235 else k = label_to_inven(which);
6238 /* Convert letter to equipment index */
6241 if (which == '(') k = e1;
6242 else if (which == ')') k = e2;
6243 else k = label_to_equip(which);
6246 /* Validate the item */
6247 if (!get_item_okay(k))
6253 /* Verify the item */
6255 if (ver && !verify("ËÜÅö¤Ë", k))
6257 if (ver && !verify("Try", k))
6265 /* Allow player to "refuse" certain actions */
6266 if (!get_item_allow(k))
6272 /* Accept that choice */
6283 /* Fix the screen if necessary */
6289 /* Hack -- Cancel "display" */
6290 command_see = FALSE;
6294 /* Forget the item_tester_tval restriction */
6295 item_tester_tval = 0;
6297 item_tester_no_ryoute = FALSE;
6299 /* Forget the item_tester_hook restriction */
6300 item_tester_hook = NULL;
6306 /* Toggle again if needed */
6307 if (toggle) toggle_inven_equip();
6310 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6317 /* Clear the prompt line */
6320 /* Warning if needed */
6321 if (oops && str) msg_print(str);
6327 #endif /* ALLOW_REPEAT */
6329 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6337 #ifdef ALLOW_EASY_FLOOR
6342 * Return a list of o_list[] indexes of items at the given cave
6343 * location. Valid flags are:
6345 * mode & 0x01 -- Item tester
6346 * mode & 0x02 -- Marked items only
6347 * mode & 0x04 -- Stop after first
6349 int scan_floor(int *items, int y, int x, int mode)
6351 int this_o_idx, next_o_idx;
6356 if (!in_bounds(y, x)) return 0;
6358 /* Scan all objects in the grid */
6359 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
6363 /* Acquire object */
6364 o_ptr = &o_list[this_o_idx];
6366 /* Acquire next object */
6367 next_o_idx = o_ptr->next_o_idx;
6370 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
6373 if ((mode & 0x02) && !o_ptr->marked) continue;
6375 /* Accept this item */
6376 /* XXX Hack -- Enforce limit */
6378 items[num] = this_o_idx;
6383 if (mode & 0x04) break;
6392 * Display a list of the items on the floor at the given location.
6394 int show_floor(int target_item, int y, int x, int *min_width)
6401 char o_name[MAX_NLEN];
6407 char out_desc[23][MAX_NLEN];
6408 int target_item_label = 0;
6410 int floor_list[23], floor_num;
6412 char floor_label[52 + 1];
6415 Term_get_size(&wid, &hgt);
6417 /* Default length */
6418 len = MAX((*min_width), 20);
6421 /* Scan for objects in the grid, using item_tester_okay() */
6422 floor_num = scan_floor(floor_list, y, x, 0x01);
6424 /* Display the floor objects */
6425 for (k = 0, i = 0; i < floor_num && i < 23; i++)
6427 o_ptr = &o_list[floor_list[i]];
6429 /* Describe the object */
6430 object_desc(o_name, o_ptr, TRUE, 3);
6432 /* Save the index */
6435 /* Acquire inventory color */
6436 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
6438 /* Save the object description */
6439 strcpy(out_desc[k], o_name);
6441 /* Find the predicted "line length" */
6442 l = strlen(out_desc[k]) + 5;
6444 /* Be sure to account for the weight */
6445 if (show_weights) l += 9;
6447 /* Maintain the maximum length */
6448 if (l > len) len = l;
6450 /* Advance to next "line" */
6457 /* Find the column to start in */
6458 col = (len > wid - 4) ? 0 : (wid - len - 1);
6460 prepare_label_string_floor(floor_label, floor_list, floor_num);
6462 /* Output each entry */
6463 for (j = 0; j < k; j++)
6466 i = floor_list[out_index[j]];
6471 /* Clear the line */
6472 prt("", j + 1, col ? col - 2 : col);
6474 if (use_menu && target_item)
6476 if (j == (target_item-1))
6479 strcpy(tmp_val, "¡Õ");
6481 strcpy(tmp_val, "> ");
6483 target_item_label = i;
6485 else strcpy(tmp_val, " ");
6489 /* Prepare an index --(-- */
6490 sprintf(tmp_val, "%c)", floor_label[j]);
6493 /* Clear the line with the (possibly indented) index */
6494 put_str(tmp_val, j + 1, col);
6496 /* Display the entry itself */
6497 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
6499 /* Display the weight if needed */
6502 int wgt = o_ptr->weight * o_ptr->number;
6504 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
6506 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
6509 prt(tmp_val, j + 1, wid - 9);
6513 /* Make a "shadow" below the list (only if needed) */
6514 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
6516 return target_item_label;
6520 * This version of get_item() is called by get_item() when
6521 * the easy_floor is on.
6523 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
6525 char n1 = ' ', n2 = ' ', which = ' ';
6527 int j, k, i1, i2, e1, e2;
6537 bool allow_equip = FALSE;
6538 bool allow_inven = FALSE;
6539 bool allow_floor = FALSE;
6541 bool toggle = FALSE;
6546 int floor_num, floor_list[23], floor_top = 0;
6549 extern bool select_the_force;
6551 int menu_line = (use_menu ? 1 : 0);
6557 /* Get the item index */
6558 if (repeat_pull(cp))
6561 if (*cp == INVEN_FORCE)
6563 item_tester_tval = 0;
6564 item_tester_hook = NULL;
6565 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6577 /* Acquire object */
6580 /* Validate the item */
6581 if (item_tester_okay(o_ptr))
6583 /* Forget the item_tester_tval restriction */
6584 item_tester_tval = 0;
6586 /* Forget the item_tester_hook restriction */
6587 item_tester_hook = NULL;
6589 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6596 /* Verify the item */
6597 else if (get_item_okay(*cp))
6599 /* Forget the item_tester_tval restriction */
6600 item_tester_tval = 0;
6602 /* Forget the item_tester_hook restriction */
6603 item_tester_hook = NULL;
6605 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6612 #endif /* ALLOW_REPEAT */
6615 if (mode & (USE_EQUIP)) equip = TRUE;
6616 if (mode & (USE_INVEN)) inven = TRUE;
6617 if (mode & (USE_FLOOR)) floor = TRUE;
6620 /* Paranoia XXX XXX XXX */
6627 /* No item selected */
6631 /* Full inventory */
6633 i2 = INVEN_PACK - 1;
6635 /* Forbid inventory */
6636 if (!inven) i2 = -1;
6639 for (j = 0; j < INVEN_PACK; j++)
6640 if (item_tester_okay(&inventory[j])) max_inven++;
6643 /* Restrict inventory indexes */
6644 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
6645 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
6648 /* Full equipment */
6650 e2 = INVEN_TOTAL - 1;
6652 /* Forbid equipment */
6653 if (!equip) e2 = -1;
6656 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
6657 if (item_tester_okay(&inventory[j])) max_equip++;
6658 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
6661 /* Restrict equipment indexes */
6662 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
6663 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
6666 /* Count "okay" floor items */
6669 /* Restrict floor usage */
6672 /* Scan all objects in the grid */
6673 floor_num = scan_floor(floor_list, py, px, 0x01);
6676 /* Accept inventory */
6677 if (i1 <= i2) allow_inven = TRUE;
6679 /* Accept equipment */
6680 if (e1 <= e2) allow_equip = TRUE;
6683 if (floor_num) allow_floor = TRUE;
6685 /* Require at least one legal choice */
6686 if (!allow_inven && !allow_equip && !allow_floor)
6688 /* Cancel p_ptr->command_see */
6689 command_see = FALSE;
6697 if (select_the_force) {
6703 /* Analyze choices */
6706 /* Hack -- Start on equipment if requested */
6707 if (command_see && (command_wrk == (USE_EQUIP))
6710 command_wrk = (USE_EQUIP);
6713 /* Use inventory if allowed */
6714 else if (allow_inven)
6716 command_wrk = (USE_INVEN);
6719 /* Use equipment if allowed */
6720 else if (allow_equip)
6722 command_wrk = (USE_EQUIP);
6725 /* Use floor if allowed */
6726 else if (allow_floor)
6728 command_wrk = (USE_FLOOR);
6733 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
6735 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
6737 /* Hack -- start out in "display" mode */
6744 /* Repeat until done */
6747 int get_item_label = 0;
6756 for (j = 0; j < 8; j++)
6759 if (!angband_term[j]) continue;
6761 /* Count windows displaying inven */
6762 if (window_flag[j] & (PW_INVEN)) ni++;
6764 /* Count windows displaying equip */
6765 if (window_flag[j] & (PW_EQUIP)) ne++;
6768 /* Toggle if needed */
6769 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
6770 (command_wrk == (USE_INVEN) && !ni && ne))
6773 toggle_inven_equip();
6780 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6782 /* Redraw windows */
6786 /* Inventory screen */
6787 if (command_wrk == (USE_INVEN))
6789 /* Extract the legal requests */
6793 /* Redraw if needed */
6794 if (command_see) get_item_label = show_inven(menu_line);
6797 /* Equipment screen */
6798 else if (command_wrk == (USE_EQUIP))
6800 /* Extract the legal requests */
6801 n1 = I2A(e1 - INVEN_RARM);
6802 n2 = I2A(e2 - INVEN_RARM);
6804 /* Redraw if needed */
6805 if (command_see) get_item_label = show_equip(menu_line);
6809 else if (command_wrk == (USE_FLOOR))
6812 k = MIN(floor_top + 23, floor_num) - 1;
6814 /* Extract the legal requests */
6815 n1 = I2A(j - floor_top);
6816 n2 = I2A(k - floor_top);
6818 /* Redraw if needed */
6819 if (command_see) get_item_label = show_floor(menu_line, py, px, &min_width);
6822 /* Viewing inventory */
6823 if (command_wrk == (USE_INVEN))
6825 /* Begin the prompt */
6827 sprintf(out_val, "»ý¤Áʪ:");
6829 sprintf(out_val, "Inven:");
6834 /* Build the prompt */
6836 sprintf(tmp_val, "%c-%c,'(',')',",
6838 sprintf(tmp_val, " %c-%c,'(',')',",
6841 index_to_label(i1), index_to_label(i2));
6844 strcat(out_val, tmp_val);
6847 /* Indicate ability to "view" */
6849 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6851 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6860 strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
6861 else if (allow_floor)
6862 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
6864 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6866 else if (select_the_force)
6867 strcat(out_val, " 'w'Îýµ¤½Ñ,");
6872 strcat(out_val, " / for Equip,");
6873 else if (allow_floor)
6874 strcat(out_val, " 6 for Equip,");
6876 strcat(out_val, " 4 or 6 for Equip,");
6878 else if (select_the_force)
6879 strcat(out_val, " w for the Force,");
6887 strcat(out_val, " '-'¾²¾å,");
6888 else if (allow_equip)
6889 strcat(out_val, " '4' ¾²¾å,");
6891 strcat(out_val, " '4'or'6' ¾²¾å,");
6894 strcat(out_val, " - for floor,");
6895 else if (allow_equip)
6896 strcat(out_val, " 4 for floor,");
6898 strcat(out_val, " 4 or 6 for floor,");
6904 /* Viewing equipment */
6905 else if (command_wrk == (USE_EQUIP))
6907 /* Begin the prompt */
6909 sprintf(out_val, "ÁõÈ÷ÉÊ:");
6911 sprintf(out_val, "Equip:");
6917 /* Build the prompt */
6919 sprintf(tmp_val, "%c-%c,'(',')',",
6921 sprintf(tmp_val, " %c-%c,'(',')',",
6924 index_to_label(e1), index_to_label(e2));
6927 strcat(out_val, tmp_val);
6930 /* Indicate ability to "view" */
6932 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6934 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6943 strcat(out_val, " '/' »ý¤Áʪ,");
6944 else if (allow_floor)
6945 strcat(out_val, " '4' »ý¤Áʪ,");
6947 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6951 strcat(out_val, " / for Inven,");
6952 else if (allow_floor)
6953 strcat(out_val, " 4 for Inven,");
6955 strcat(out_val, " 4 or 6 for Inven,");
6964 strcat(out_val, " '-'¾²¾å,");
6965 else if (allow_inven)
6966 strcat(out_val, " '6' ¾²¾å,");
6968 strcat(out_val, " '4'or'6' ¾²¾å,");
6971 strcat(out_val, " - for floor,");
6972 else if (allow_inven)
6973 strcat(out_val, " 6 for floor,");
6975 strcat(out_val, " 4 or 6 for floor,");
6981 else if (command_wrk == (USE_FLOOR))
6983 /* Begin the prompt */
6985 sprintf(out_val, "¾²¾å:");
6987 sprintf(out_val, "Floor:");
6993 /* Build the prompt */
6995 sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
6997 sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
7002 strcat(out_val, tmp_val);
7005 /* Indicate ability to "view" */
7007 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
7009 if (!command_see && !use_menu) strcat(out_val, " * to see,");
7015 if (allow_inven && allow_equip)
7018 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
7020 strcat(out_val, " 4 for Equip, 6 for Inven,");
7024 else if (allow_inven)
7027 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
7029 strcat(out_val, " 4 or 6 for Inven,");
7033 else if (allow_equip)
7036 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
7038 strcat(out_val, " 4 or 6 for Equip,");
7044 else if (allow_inven)
7047 strcat(out_val, " '/' »ý¤Áʪ,");
7049 strcat(out_val, " / for Inven,");
7053 else if (allow_equip)
7056 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
7058 strcat(out_val, " / for Equip,");
7064 if (command_see && !use_menu)
7067 strcat(out_val, " Enter ¼¡,");
7069 strcat(out_val, " Enter for scroll down,");
7074 /* Finish the prompt */
7075 strcat(out_val, " ESC");
7077 /* Build the prompt */
7078 sprintf(tmp_val, "(%s) %s", out_val, pmt);
7080 /* Show the prompt */
7089 if (command_wrk == USE_INVEN) max_line = max_inven;
7090 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7091 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7107 menu_line += (max_line - 1);
7123 /* Verify legality */
7124 if (command_wrk == (USE_INVEN))
7126 if (allow_floor) command_wrk = USE_FLOOR;
7127 else if (allow_equip) command_wrk = USE_EQUIP;
7134 else if (command_wrk == (USE_EQUIP))
7136 if (allow_inven) command_wrk = USE_INVEN;
7137 else if (allow_floor) command_wrk = USE_FLOOR;
7144 else if (command_wrk == (USE_FLOOR))
7146 if (allow_equip) command_wrk = USE_EQUIP;
7147 else if (allow_inven) command_wrk = USE_INVEN;
7160 /* Hack -- Fix screen */
7170 /* Switch inven/equip */
7171 if (command_wrk == USE_INVEN) max_line = max_inven;
7172 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7173 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7174 if (menu_line > max_line) menu_line = max_line;
7176 /* Need to redraw */
7184 /* Verify legality */
7185 if (command_wrk == (USE_INVEN))
7187 if (allow_equip) command_wrk = USE_EQUIP;
7188 else if (allow_floor) command_wrk = USE_FLOOR;
7195 else if (command_wrk == (USE_EQUIP))
7197 if (allow_floor) command_wrk = USE_FLOOR;
7198 else if (allow_inven) command_wrk = USE_INVEN;
7205 else if (command_wrk == (USE_FLOOR))
7207 if (allow_inven) command_wrk = USE_INVEN;
7208 else if (allow_equip) command_wrk = USE_EQUIP;
7221 /* Hack -- Fix screen */
7231 /* Switch inven/equip */
7232 if (command_wrk == USE_INVEN) max_line = max_inven;
7233 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7234 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7235 if (menu_line > max_line) menu_line = max_line;
7237 /* Need to redraw */
7246 if (command_wrk == USE_FLOOR)
7249 (*cp) = -get_item_label;
7253 /* Validate the item */
7254 if (!get_item_okay(get_item_label))
7260 /* Allow player to "refuse" certain actions */
7261 if (!get_item_allow(get_item_label))
7267 /* Accept that choice */
7268 (*cp) = get_item_label;
7277 if (select_the_force) {
7285 if (menu_line > max_line) menu_line -= max_line;
7306 command_see = FALSE;
7329 cave_type *c_ptr = &cave[py][px];
7331 if (command_wrk != (USE_FLOOR)) break;
7333 /* Get the object being moved. */
7334 o_idx = c_ptr->o_idx;
7336 /* Only rotate a pile of two or more objects. */
7337 if (!(o_idx && o_list[o_idx].next_o_idx)) break;
7339 /* Remove the first object from the list. */
7340 excise_object_idx(o_idx);
7342 /* Find end of the list. */
7344 while (o_list[i].next_o_idx)
7345 i = o_list[i].next_o_idx;
7347 /* Add after the last object. */
7348 o_list[i].next_o_idx = o_idx;
7350 /* Re-scan floor list */
7351 floor_num = scan_floor(floor_list, py, px, 0x01);
7353 /* Hack -- Fix screen */
7368 if (command_wrk == (USE_INVEN))
7375 command_wrk = (USE_EQUIP);
7377 else if (command_wrk == (USE_EQUIP))
7384 command_wrk = (USE_INVEN);
7386 else if (command_wrk == (USE_FLOOR))
7390 command_wrk = (USE_INVEN);
7392 else if (allow_equip)
7394 command_wrk = (USE_EQUIP);
7403 /* Hack -- Fix screen */
7413 /* Need to redraw */
7426 * If we are already examining the floor, and there
7427 * is only one item, we will always select it.
7428 * If we aren't examining the floor and there is only
7429 * one item, we will select it if floor_query_flag
7434 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
7437 k = 0 - floor_list[0];
7439 /* Allow player to "refuse" certain actions */
7440 if (!get_item_allow(k))
7446 /* Accept that choice */
7455 /* Hack -- Fix screen */
7465 command_wrk = (USE_FLOOR);
7471 case '1': case '2': case '3':
7472 case '4': case '5': case '6':
7473 case '7': case '8': case '9':
7475 if (command_wrk != USE_FLOOR)
7477 /* Look up the tag */
7478 if (!get_tag(&k, which, command_wrk))
7484 /* Hack -- Validate the item */
7485 if ((k < INVEN_RARM) ? !inven : !equip)
7491 /* Validate the item */
7492 if (!get_item_okay(k))
7500 /* Look up the alphabetical tag */
7501 if (get_tag_floor(&k, which, floor_list, floor_num))
7504 k = 0 - floor_list[k];
7513 /* Allow player to "refuse" certain actions */
7514 if (!get_item_allow(k))
7520 /* Accept that choice */
7531 /* Choose "default" inventory item */
7532 if (command_wrk == (USE_INVEN))
7534 k = ((i1 == i2) ? i1 : -1);
7537 /* Choose "default" equipment item */
7538 else if (command_wrk == (USE_EQUIP))
7540 k = ((e1 == e2) ? e1 : -1);
7543 /* Choose "default" floor item */
7544 else if (command_wrk == (USE_FLOOR))
7549 k = 0 - floor_list[0];
7551 /* Allow player to "refuse" certain actions */
7552 if (!get_item_allow(k))
7558 /* Accept that choice */
7566 /* Validate the item */
7567 if (!get_item_okay(k))
7573 /* Allow player to "refuse" certain actions */
7574 if (!get_item_allow(k))
7580 /* Accept that choice */
7590 if (select_the_force) {
7604 if (command_wrk != USE_FLOOR)
7606 bool not_found = FALSE;
7608 /* Look up the alphabetical tag */
7609 if (!get_tag(&k, which, command_wrk))
7614 /* Hack -- Validate the item */
7615 else if ((k < INVEN_RARM) ? !inven : !equip)
7620 /* Validate the item */
7621 else if (!get_item_okay(k))
7628 /* Accept that choice */
7637 /* Look up the alphabetical tag */
7638 if (get_tag_floor(&k, which, floor_list, floor_num))
7641 k = 0 - floor_list[k];
7643 /* Accept that choice */
7651 /* Extract "query" setting */
7652 ver = isupper(which);
7653 which = tolower(which);
7655 /* Convert letter to inventory index */
7656 if (command_wrk == (USE_INVEN))
7658 if (which == '(') k = i1;
7659 else if (which == ')') k = i2;
7660 else k = label_to_inven(which);
7663 /* Convert letter to equipment index */
7664 else if (command_wrk == (USE_EQUIP))
7666 if (which == '(') k = e1;
7667 else if (which == ')') k = e2;
7668 else k = label_to_equip(which);
7671 /* Convert letter to floor index */
7672 else if (command_wrk == USE_FLOOR)
7674 if (which == '(') k = 0;
7675 else if (which == ')') k = floor_num - 1;
7676 else k = islower(which) ? A2I(which) : -1;
7677 if (k < 0 || k >= floor_num || k >= 23)
7684 k = 0 - floor_list[k];
7687 /* Validate the item */
7688 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
7694 /* Verify the item */
7696 if (ver && !verify("ËÜÅö¤Ë", k))
7698 if (ver && !verify("Try", k))
7706 /* Allow player to "refuse" certain actions */
7707 if (!get_item_allow(k))
7713 /* Accept that choice */
7723 /* Fix the screen if necessary */
7729 /* Hack -- Cancel "display" */
7730 command_see = FALSE;
7734 /* Forget the item_tester_tval restriction */
7735 item_tester_tval = 0;
7737 /* Forget the item_tester_hook restriction */
7738 item_tester_hook = NULL;
7744 /* Toggle again if needed */
7745 if (toggle) toggle_inven_equip();
7748 p_ptr->window |= (PW_INVEN | PW_EQUIP);
7755 /* Clear the prompt line */
7758 /* Warning if needed */
7759 if (oops && str) msg_print(str);
7765 #endif /* ALLOW_REPEAT */
7767 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
7775 static bool py_pickup_floor_aux(void)
7783 /* Restrict the choices */
7784 item_tester_hook = inven_carry_okay;
7788 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
7789 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
7791 q = "Get which item? ";
7792 s = "You no longer have any room for the objects on the floor.";
7795 if (get_item(&item, q, s, (USE_FLOOR)))
7797 this_o_idx = 0 - item;
7804 /* Pick up the object */
7805 py_pickup_aux(this_o_idx);
7812 * Make the player carry everything in a grid
7814 * If "pickup" is FALSE then only gold will be picked up
7816 * This is called by py_pickup() when easy_floor is TRUE.
7818 void py_pickup_floor(int pickup)
7820 s16b this_o_idx, next_o_idx = 0;
7822 char o_name[MAX_NLEN];
7825 int floor_num = 0, floor_list[23], floor_o_idx = 0;
7829 /* Scan the pile of objects */
7830 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
7834 /* Access the object */
7835 o_ptr = &o_list[this_o_idx];
7837 /* Describe the object */
7838 object_desc(o_name, o_ptr, TRUE, 3);
7840 /* Access the next object */
7841 next_o_idx = o_ptr->next_o_idx;
7843 /* Hack -- disturb */
7847 if (o_ptr->tval == TV_GOLD)
7851 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
7852 (long)o_ptr->pval, o_name);
7854 msg_format("You have found %ld gold pieces worth of %s.",
7855 (long) o_ptr->pval, o_name);
7859 /* Collect the gold */
7860 p_ptr->au += o_ptr->pval;
7863 p_ptr->redraw |= (PR_GOLD);
7866 p_ptr->window |= (PW_PLAYER);
7868 /* Delete the gold */
7869 delete_object_idx(this_o_idx);
7871 /* Check the next object */
7874 else if (o_ptr->marked & OM_NOMSG)
7876 /* If 0 or 1 non-NOMSG items are in the pile, the NOMSG ones are
7877 * ignored. Otherwise, they are included in the prompt. */
7878 o_ptr->marked &= ~(OM_NOMSG);
7882 /* Count non-gold objects that can be picked up. */
7883 if (inven_carry_okay(o_ptr))
7888 /* Remember this object index */
7890 floor_list[floor_num] = this_o_idx;
7892 /* Count non-gold objects */
7895 /* Remember this index */
7896 floor_o_idx = this_o_idx;
7899 /* There are no non-gold objects */
7903 /* Mention the number of objects */
7909 /* Access the object */
7910 o_ptr = &o_list[floor_o_idx];
7912 #ifdef ALLOW_EASY_SENSE
7914 /* Option: Make object sensing easy */
7917 /* Sense the object */
7918 (void) sense_object(o_ptr);
7921 #endif /* ALLOW_EASY_SENSE */
7923 /* Describe the object */
7924 object_desc(o_name, o_ptr, TRUE, 3);
7928 msg_format("%s¤¬¤¢¤ë¡£", o_name);
7930 msg_format("You see %s.", o_name);
7935 /* Multiple objects */
7940 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
7942 msg_format("You see a pile of %d items.", floor_num);
7951 /* The player has no room for anything on the floor. */
7957 /* Access the object */
7958 o_ptr = &o_list[floor_o_idx];
7960 #ifdef ALLOW_EASY_SENSE
7962 /* Option: Make object sensing easy */
7965 /* Sense the object */
7966 (void) sense_object(o_ptr);
7969 #endif /* ALLOW_EASY_SENSE */
7971 /* Describe the object */
7972 object_desc(o_name, o_ptr, TRUE, 3);
7976 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7978 msg_format("You have no room for %s.", o_name);
7983 /* Multiple objects */
7988 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7990 msg_print("You have no room for any of the objects on the floor.");
8002 /* Hack -- query every object */
8003 if (carry_query_flag)
8005 char out_val[MAX_NLEN+20];
8007 /* Access the object */
8008 o_ptr = &o_list[floor_o_idx];
8010 #ifdef ALLOW_EASY_SENSE
8012 /* Option: Make object sensing easy */
8015 /* Sense the object */
8016 (void) sense_object(o_ptr);
8019 #endif /* ALLOW_EASY_SENSE */
8021 /* Describe the object */
8022 object_desc(o_name, o_ptr, TRUE, 3);
8024 /* Build a prompt */
8026 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
8028 (void) sprintf(out_val, "Pick up %s? ", o_name);
8032 /* Ask the user to confirm */
8033 if (!get_check(out_val))
8040 /* Access the object */
8041 o_ptr = &o_list[floor_o_idx];
8043 #ifdef ALLOW_EASY_SENSE
8045 /* Option: Make object sensing easy */
8048 /* Sense the object */
8049 (void) sense_object(o_ptr);
8052 #endif /* ALLOW_EASY_SENSE */
8054 /* Pick up the object */
8055 py_pickup_aux(floor_o_idx);
8058 /* Allow the user to choose an object */
8061 while (can_pickup--)
8063 if (!py_pickup_floor_aux()) break;
8068 #endif /* ALLOW_EASY_FLOOR */