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 for (j = 0; j < F_LIT_MAX; j++)
46 f_ptr->x_attr[j] = f_ptr->d_attr[j];
47 f_ptr->x_char[j] = f_ptr->d_char[j];
51 /* Extract default attr/char code for objects */
52 for (i = 0; i < max_k_idx; i++)
54 object_kind *k_ptr = &k_info[i];
56 /* Default attr/char */
57 k_ptr->x_attr = k_ptr->d_attr;
58 k_ptr->x_char = k_ptr->d_char;
61 /* Extract default attr/char code for monsters */
62 for (i = 0; i < max_r_idx; i++)
64 monster_race *r_ptr = &r_info[i];
66 /* Default attr/char */
67 r_ptr->x_attr = r_ptr->d_attr;
68 r_ptr->x_char = r_ptr->d_char;
75 /* Process "graf.prf" */
76 process_pref_file("graf.prf");
78 /* Access the "character" pref file */
79 sprintf(buf, "graf-%s.prf", player_base);
81 /* Process "graf-<playername>.prf" */
82 process_pref_file(buf);
90 /* Process "font.prf" */
91 process_pref_file("font.prf");
93 /* Access the "character" pref file */
94 sprintf(buf, "font-%s.prf", player_base);
96 /* Process "font-<playername>.prf" */
97 process_pref_file(buf);
103 * Obtain the "flags" for an item
105 void object_flags(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
107 object_kind *k_ptr = &k_info[o_ptr->k_idx];
111 for (i = 0; i < TR_FLAG_SIZE; i++)
112 flgs[i] = k_ptr->flags[i];
117 artifact_type *a_ptr = &a_info[o_ptr->name1];
119 for (i = 0; i < TR_FLAG_SIZE; i++)
120 flgs[i] = a_ptr->flags[i];
126 ego_item_type *e_ptr = &e_info[o_ptr->name2];
128 for (i = 0; i < TR_FLAG_SIZE; i++)
129 flgs[i] |= e_ptr->flags[i];
131 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
133 remove_flag(flgs, TR_SH_FIRE);
135 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
137 remove_flag(flgs, TR_INFRA);
139 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
141 remove_flag(flgs, TR_RES_BLIND);
142 remove_flag(flgs, TR_SEE_INVIS);
146 /* Random artifact ! */
147 for (i = 0; i < TR_FLAG_SIZE; i++)
148 flgs[i] |= o_ptr->art_flags[i];
150 if (item_tester_hook_smith(o_ptr))
152 int add = o_ptr->xtra3 - 1;
154 if (add < TR_FLAG_MAX)
158 else if (add == ESSENCE_TMP_RES_ACID)
160 add_flag(flgs, TR_RES_ACID);
161 add_flag(flgs, TR_ACTIVATE);
163 else if (add == ESSENCE_TMP_RES_ELEC)
165 add_flag(flgs, TR_RES_ELEC);
166 add_flag(flgs, TR_ACTIVATE);
168 else if (add == ESSENCE_TMP_RES_FIRE)
170 add_flag(flgs, TR_RES_FIRE);
171 add_flag(flgs, TR_ACTIVATE);
173 else if (add == ESSENCE_TMP_RES_COLD)
175 add_flag(flgs, TR_RES_COLD);
176 add_flag(flgs, TR_ACTIVATE);
178 else if (add == ESSENCE_SH_FIRE)
180 add_flag(flgs, TR_RES_FIRE);
181 add_flag(flgs, TR_SH_FIRE);
183 else if (add == ESSENCE_SH_ELEC)
185 add_flag(flgs, TR_RES_ELEC);
186 add_flag(flgs, TR_SH_ELEC);
188 else if (add == ESSENCE_SH_COLD)
190 add_flag(flgs, TR_RES_COLD);
191 add_flag(flgs, TR_SH_COLD);
193 else if (add == ESSENCE_RESISTANCE)
195 add_flag(flgs, TR_RES_ACID);
196 add_flag(flgs, TR_RES_ELEC);
197 add_flag(flgs, TR_RES_FIRE);
198 add_flag(flgs, TR_RES_COLD);
200 else if (add == TR_IMPACT)
202 add_flag(flgs, TR_ACTIVATE);
210 * Obtain the "flags" for an item which are known to the player
212 void object_flags_known(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
217 object_kind *k_ptr = &k_info[o_ptr->k_idx];
220 for (i = 0; i < TR_FLAG_SIZE; i++)
223 if (!object_aware_p(o_ptr)) return;
226 for (i = 0; i < TR_FLAG_SIZE; i++)
227 flgs[i] = k_ptr->flags[i];
229 /* Must be identified */
230 if (!object_known_p(o_ptr)) return;
232 /* Ego-item (known basic flags) */
235 ego_item_type *e_ptr = &e_info[o_ptr->name2];
237 for (i = 0; i < TR_FLAG_SIZE; i++)
238 flgs[i] |= e_ptr->flags[i];
240 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
242 remove_flag(flgs, TR_SH_FIRE);
244 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
246 remove_flag(flgs, TR_INFRA);
248 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
250 remove_flag(flgs, TR_RES_BLIND);
251 remove_flag(flgs, TR_SEE_INVIS);
256 #ifdef SPOIL_ARTIFACTS
257 /* Full knowledge for some artifacts */
258 if (artifact_p(o_ptr) || o_ptr->art_name) spoil = TRUE;
259 #endif /* SPOIL_ARTIFACTS */
261 #ifdef SPOIL_EGO_ITEMS
262 /* Full knowledge for some ego-items */
263 if (ego_item_p(o_ptr)) spoil = TRUE;
264 #endif /* SPOIL_EGO_ITEMS */
266 /* Need full knowledge or spoilers */
267 if (spoil || (o_ptr->ident & IDENT_MENTAL))
272 artifact_type *a_ptr = &a_info[o_ptr->name1];
274 for (i = 0; i < TR_FLAG_SIZE; i++)
275 flgs[i] = a_ptr->flags[i];
278 /* Random artifact ! */
279 for (i = 0; i < TR_FLAG_SIZE; i++)
280 flgs[i] |= o_ptr->art_flags[i];
283 if (item_tester_hook_smith(o_ptr))
285 int add = o_ptr->xtra3 - 1;
287 if (add < TR_FLAG_MAX)
291 else if (add == ESSENCE_TMP_RES_ACID)
293 add_flag(flgs, TR_RES_ACID);
295 else if (add == ESSENCE_TMP_RES_ELEC)
297 add_flag(flgs, TR_RES_ELEC);
299 else if (add == ESSENCE_TMP_RES_FIRE)
301 add_flag(flgs, TR_RES_FIRE);
303 else if (add == ESSENCE_TMP_RES_COLD)
305 add_flag(flgs, TR_RES_COLD);
307 else if (add == ESSENCE_SH_FIRE)
309 add_flag(flgs, TR_RES_FIRE);
310 add_flag(flgs, TR_SH_FIRE);
312 else if (add == ESSENCE_SH_ELEC)
314 add_flag(flgs, TR_RES_ELEC);
315 add_flag(flgs, TR_SH_ELEC);
317 else if (add == ESSENCE_SH_COLD)
319 add_flag(flgs, TR_RES_COLD);
320 add_flag(flgs, TR_SH_COLD);
322 else if (add == ESSENCE_RESISTANCE)
324 add_flag(flgs, TR_RES_ACID);
325 add_flag(flgs, TR_RES_ELEC);
326 add_flag(flgs, TR_RES_FIRE);
327 add_flag(flgs, TR_RES_COLD);
334 * Determine the "Activation" (if any) for an artifact
335 * Return a string, or NULL for "no activation"
337 cptr item_activation(object_type *o_ptr)
339 u32b flgs[TR_FLAG_SIZE];
341 /* Extract the flags */
342 object_flags(o_ptr, flgs);
344 /* Require activation ability */
346 if (!(have_flag(flgs, TR_ACTIVATE))) return ("¤Ê¤·");
348 if (!(have_flag(flgs, TR_ACTIVATE))) return ("nothing");
354 * We need to deduce somehow that it is a random artifact -- one
355 * problem: It could be a random artifact which has NOT YET received
356 * a name. Thus we eliminate other possibilities instead of checking
360 if (!(o_ptr->name1) &&
365 switch (o_ptr->xtra2)
370 return "ÂÀÍÛ¸÷Àþ : 10 ¥¿¡¼¥óËè";
372 return "beam of sunlight every 10 turns";
379 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
381 return "magic missile (2d6) every 2 turns";
388 return "°½±À (12), Ⱦ·Â 3 , 4+d4 ¥¿¡¼¥óËè";
390 return "stinking cloud (12), rad. 3, every 4+d4 turns";
397 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
399 return "lightning bolt (4d8) every 5+d5 turns";
406 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
408 return "acid bolt (5d8) every 6+d6 turns";
415 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
417 return "frost bolt (6d8) every 7+d7 turns";
424 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
426 return "fire bolt (9d8) every 8+d8 turns";
433 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (48) : 400 ¥¿¡¼¥óËè";
435 return "ball of cold (48) every 400 turns";
442 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (72) : 400 ¥¿¡¼¥óËè";
444 return "ball of fire (72) every 400 turns";
451 return "¥Ò¥Ã¥È¥Ý¥¤¥ó¥ÈµÛ¼ý (100) : 100+d100 ¥¿¡¼¥óËè";
453 return "drain life (100) every 100+d100 turns";
460 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 300 ¥¿¡¼¥óËè";
462 return "ball of cold (100) every 300 turns";
469 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 500 ¥¿¡¼¥óËè";
471 return "ball of lightning (100) every 500 turns";
478 return "¥Ò¥Ã¥È¥Ý¥¤¥ó¥ÈµÛ¼ý(120) : 400 ¥¿¡¼¥óËè";
480 return "drain life (120) every 400 turns";
487 return "µÛ·ì¥É¥ì¥¤¥ó (3*50) : 400 ¥¿¡¼¥óËè";
489 return "vampiric drain (3*50) every 400 turns";
496 return "Ìð (150) : 90+d90 ¥¿¡¼¥óËè";
498 return "arrows (150) every 90+d90 turns";
505 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (120) : 225+d225 ¥¿¡¼¥óËè";
507 return "fire ball (120) every 225+d225 turns";
514 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (200) : 325+d325 ¥¿¡¼¥óËè";
516 return "ball of cold (200) every 325+d325 turns";
523 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (250) : 425+d425 ¥¿¡¼¥óËè";
525 return "ball of lightning (250) every 425+d425 turns";
532 return "¥«¥Þ¥¤¥¿¥Á : 250 ¥¿¡¼¥óËè";
534 return "whirlwind attack every 250 turns";
541 return "µÛ·ì¥É¥ì¥¤¥ó (3*100) : 400 ¥¿¡¼¥óËè";
543 return "vampiric drain (3*100) every 400 turns";
550 return "call chaos : 350 ¥¿¡¼¥óËè"; /*nuke me*/
552 return "call chaos every 350 turns";
559 return "¥í¥±¥Ã¥È (120+level) : 400 ¥¿¡¼¥óËè";
561 return "launch rocket (120+level) every 400 turns";
568 return "¼Ù°Â໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
570 return "dispel evil (level*5) every 300+d300 turns";
577 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300) : 500 ¥¿¡¼¥óËè";
579 return "elemental breath (300) every 500 turns";
586 return "Á±ÎÉÂ໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
588 return "dispel good (level*5) every 300+d300 turns";
595 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
597 return "confuse monster every 15 turns";
604 return "¼þ°Ï¤Î¥â¥ó¥¹¥¿¡¼¤ò̲¤é¤»¤ë : 55 ¥¿¡¼¥óËè";
606 return "sleep nearby monsters every 55 turns";
613 return "ÃÏ¿Ì (Ⱦ·Â 10) : 50 ¥¿¡¼¥óËè";
615 return "earthquake (rad 10) every 50 turns";
622 return "¶²¹² : 3 * (level+10) ¥¿¡¼¥óËè";
624 return "terror every 3 * (level+10) turns";
631 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
633 return "teleport away every 200 turns";
637 case ACT_BANISH_EVIL:
640 return "¼Ù°¾ÃÌÇ : 250+d250 ¥¿¡¼¥óËè";
642 return "banish evil every 250+d250 turns";
649 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
651 return "genocide every 500 turns";
658 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
660 return "mass genocide every 1000 turns";
664 case ACT_CHARM_ANIMAL:
667 return "ưʪ̥λ : 300 ¥¿¡¼¥óËè";
669 return "charm animal every 300 turns";
673 case ACT_CHARM_UNDEAD:
676 return "ÉԻཾ° : 333 ¥¿¡¼¥óËè";
678 return "enslave undead every 333 turns";
682 case ACT_CHARM_OTHER:
685 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 400 ¥¿¡¼¥óËè";
687 return "charm monster every 400 turns";
691 case ACT_CHARM_ANIMALS:
694 return "ưʪͧÏ : 500 ¥¿¡¼¥óËè";
696 return "animal friendship every 500 turns";
700 case ACT_CHARM_OTHERS:
703 return "¼þÊÕ̥λ : 750 ¥¿¡¼¥óËè";
705 return "mass charm every 750 turns";
709 case ACT_SUMMON_ANIMAL:
712 return "ưʪ¾¤´ : 200+d300 ¥¿¡¼¥óËè";
714 return "summon animal every 200+d300 turns";
718 case ACT_SUMMON_PHANTOM:
721 return "»È¤¤Î´ : 200+d200 ¥¿¡¼¥óËè";
723 return "summon phantasmal servant every 200+d200 turns";
727 case ACT_SUMMON_ELEMENTAL:
730 return "¥¨¥ì¥á¥ó¥¿¥ë¾¤´ : 750 ¥¿¡¼¥óËè";
732 return "summon elemental every 750 turns";
736 case ACT_SUMMON_DEMON:
739 return "°Ë⾤´ : 666+d333 ¥¿¡¼¥óËè";
741 return "summon demon every 666+d333 turns";
745 case ACT_SUMMON_UNDEAD:
748 return "ÉԻྤ´ : 666+d333 ¥¿¡¼¥óËè";
750 return "summon undead every 666+d333 turns";
757 return "ͦµ¤²óÉü & 30 hp ²óÉü : 10 ¥¿¡¼¥óËè";
759 return "remove fear & heal 30 hp every 10 turns";
766 return "4d8 hp & ½ý²óÉü : 3+d3 ¥¿¡¼¥óËè";
768 return "heal 4d8 & wounds every 3+d3 turns";
772 case ACT_CURE_POISON:
775 return "ͦµ¤²óÉü/ÆǾä· : 5 ¥¿¡¼¥óËè";
777 return "remove fear and cure poison every 5 turns";
784 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
786 return "restore life levels every 450 turns";
793 return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃͲóÉü : 750 ¥¿¡¼¥óËè";
795 return "restore stats and life levels every 750 turns";
802 return "700 hp ²óÉü : 250 ¥¿¡¼¥óËè";
804 return "heal 700 hit points every 250 turns";
811 return "1000 hp ²óÉü : 888 ¥¿¡¼¥óËè";
813 return "heal 1000 hit points every 888 turns";
820 return "°ì»þŪ¤Ê ESP (´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
822 return "temporary ESP (dur 25+d30) every 200 turns";
829 return "»Îµ¤¹âÍȤȽËÊ¡ (´ü´Ö 50+d50) : 100+d100 ¥¿¡¼¥óËè";
831 return "heroism and blessed (dur 50+d50) every 100+d100 turns";
838 return "Âмٰ·ë³¦ (´ü´Ö level*3 + d25) : 225+d225 ¥¿¡¼¥óËè";
840 return "protect evil (dur level*3 + d25) every 225+d225 turns";
847 return "±êÎä»ÀÅÅÆǤؤÎÂÑÀ (´ü´Ö 40+d40) : 200 ¥¿¡¼¥óËè";
849 return "resist elements (dur 40+d40) every 200 turns";
856 return "²Ã® (´ü´Ö 20+d20) : 250 ¥¿¡¼¥óËè";
858 return "speed (dur 20+d20) every 250 turns";
865 return "²Ã® (´ü´Ö 75+d75) : 200+d200 ¥¿¡¼¥óËè";
867 return "speed (dur 75+d75) every 200+d200 turns";
874 return "¥ì¥¤¥¹²½ (level/2 + d(level/2)) : 1000 ¥¿¡¼¥óËè";
876 return "wraith form (level/2 + d(level/2)) every 1000 turns";
883 return "̵Ũ (´ü´Ö 8+d8) : 1000 ¥¿¡¼¥óËè";
885 return "invulnerability (dur 8+d8) every 1000 turns";
892 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) : 10+d10 ¥¿¡¼¥óËè";
894 return "light area (dam 2d15) every 10+d10 turns";
901 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) & ¼þÊÕ¥Þ¥Ã¥× : 50+d50 ¥¿¡¼¥óËè";
903 return "light (dam 2d15) & map area every 50+d50 turns";
910 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
912 return "detection every 55+d55 turns";
916 case ACT_DETECT_XTRA:
919 return "Á´´¶ÃΡ¢Ãµº÷¡¢*´ÕÄê* : 1000 ¥¿¡¼¥óËè";
921 return "detection, probing and identify true every 1000 turns";
928 return "*´ÕÄê* : 750 ¥¿¡¼¥óËè";
930 return "identify true every 750 turns";
937 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
939 return "identify spell every 10 turns";
946 return "Çúȯ¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
948 return "explosive rune every 200 turns";
955 return "¼é¤ê¤Î¥ë¡¼¥ó : 400 ¥¿¡¼¥óËè";
957 return "rune of protection every 400 turns";
964 return "¶õÊ¢½¼Â : 200 ¥¿¡¼¥óËè";
966 return "satisfy hunger every 200 turns";
973 return "¥É¥¢Ç˲õ : 10 ¥¿¡¼¥óËè";
975 return "destroy doors every 10 turns";
982 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
984 return "stone to mud every 5 turns";
991 return "ºÆ½¼Å¶ : 70 ¥¿¡¼¥óËè";
993 return "recharging every 70 turns";
1000 return "Ï£¶â½Ñ : 500 ¥¿¡¼¥óËè";
1002 return "alchemy every 500 turns";
1009 return "¼¡¸µ¤ÎÈâ : 100 ¥¿¡¼¥óËè";
1011 return "dimension door every 100 turns";
1018 return "¥Æ¥ì¥Ý¡¼¥È (range 100) : 45 ¥¿¡¼¥óËè";
1020 return "teleport (range 100) every 45 turns";
1027 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1029 return "word of recall every 200 turns";
1038 return "something undefined";
1045 /* Some artifacts can be activated */
1046 switch (o_ptr->name1)
1051 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1053 return "fire bolt (9d8) every 8+d8 turns";
1060 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1062 return "frost bolt (6d8) every 7+d7 turns";
1069 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1071 return "lightning bolt (4d8) every 6+d6 turns";
1078 return "°½±À(12) : 4+d4 ¥¿¡¼¥óËè";
1080 return "stinking cloud (12) every 4+d4 turns";
1087 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(48) : 5+d5 ¥¿¡¼¥óËè";
1089 return "frost ball (48) every 5+d5 turns";
1096 return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
1098 return "remove fear and cure poison every 5 turns";
1105 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(100) : 200 ¥¿¡¼¥óËè";
1107 return "frost ball (100) every 200 turns";
1114 return "¶Ç¤Î»ÕÃľ¤´ : 500+d500 ¥¿¡¼¥óËè";
1116 return "summon the Legion of the Dawn every 500+d500 turns";
1123 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 400 ¥¿¡¼¥óËè";
1125 return "fire ball (72) every 400 turns";
1132 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 100 ¥¿¡¼¥óËè";
1134 return "large fire ball (72) every 100 turns";
1141 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(120) : 15 ¥¿¡¼¥óËè";
1143 return "large fire ball (120) every 15 turns";
1150 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 200 ¥¿¡¼¥óËè";
1152 return "haste self (20+d20 turns) every 200 turns";
1159 return "À¸Ì¿Îϵۼý(120) : 400 ¥¿¡¼¥óËè";
1161 return "drain life (120) every 400 turns";
1168 return "À¸Ì¿Îϵۼý(90) : 70 ¥¿¡¼¥óËè";
1170 return "drain life (90) every 70 turns";
1177 return "¥É¥¢/¥È¥é¥Ã¥×Ê´ºÕ : 10 ¥¿¡¼¥óËè";
1179 return "door and trap destruction every 10 turns";
1187 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1189 return "word of recall every 200 turns";
1196 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1198 return "haste self (20+d20 turns) every 100+d100 turns";
1205 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
1207 return "identify every 10 turns";
1214 return "Ä´ºº¡¢Á´´¶ÃΡ¢Á´´ÕÄê : 100 ¥¿¡¼¥óËè";
1216 return "probing, detection and full id every 100 turns";
1223 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
1225 return "mass genocide every 1000 turns";
1232 return "½ý¤Î¼£Ìþ(4d7) : 3+d3 ¥¿¡¼¥óËè";
1234 return "cure wounds (4d7) every 3+d3 turns";
1241 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
1243 return "fire branding of bolts every 999 turns";
1250 return "¥Õ¥¡¥¤¥¢¡ª : 15 ¥¿¡¼¥óËè";
1252 return "fire! every 15 turns";
1257 case ART_WEREWINDLE:
1260 return "ƨÁö : 35 ¥¿¡¼¥óËè";
1262 return "a getaway every 35 turns";
1269 return "¥Æ¥ì¥Ý¡¼¥È : 25 ¥¿¡¼¥óËè";
1271 return "a teleport every 25 turns";
1278 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1280 return "lightning ball (100) every 200 turns";
1287 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1289 return "Frost ball (100) every 200 turns";
1296 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
1298 return "stone to mud every 5 turns";
1305 return "´äÀÐÍϲò : 2 ¥¿¡¼¥óËè";
1307 return "stone to mud every 2 turns";
1311 case ART_SOULKEEPER:
1314 return "ÂÎÎϲóÉü(1000) : 888 ¥¿¡¼¥óËè";
1316 return "heal (1000) every 888 turns";
1323 return ("²óÉü (777)¡¢Ìþ¤·¡¢»Îµ¤¹âÍÈ : 300 ¥¿¡¼¥óËè");
1325 return ("heal (777), curing and heroism every 300 turns");
1332 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
1334 return "genocide every 500 turns";
1341 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
1343 return "restore life levels every 450 turns";
1350 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
1352 return "teleport away every 150 turns";
1360 return "Á´ÂÑÀ(20+d20¥¿¡¼¥ó) : 111 ¥¿¡¼¥óËè";
1362 return "resistance (20+d20 turns) every 111 turns";
1366 case ART_HOLCOLLETH:
1369 return "¥¹¥ê¡¼¥×(II) : 55 ¥¿¡¼¥óËè";
1371 return "Sleep II every 55 turns";
1378 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
1380 return "recharge item I every 70 turns";
1387 return "¥Æ¥ì¥Ý¡¼¥È : 45 ¥¿¡¼¥óËè";
1389 return "teleport every 45 turns";
1396 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
1398 return "confuse monster every 15 turns";
1402 case ART_CAMMITHRIM:
1405 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1407 return "magic missile (2d6) every 2 turns";
1414 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1416 return "fire bolt (9d8) every 8+d8 turns";
1420 case ART_PAURNIMMEN:
1423 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1425 return "frost bolt (6d8) every 7+d7 turns";
1432 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1434 return "lightning bolt (4d8) every 5+d5 turns";
1441 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
1443 return "acid bolt (5d8) every 6+d6 turns";
1450 return "ËâË¡¤ÎÌð(150) : 90+d90 ¥¿¡¼¥óËè";
1452 return "a magical arrow (150) every 90+d90 turns";
1456 case ART_HOLHENNETH:
1459 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
1461 return "detection every 55+d55 turns";
1468 return "ÂÎÎϲóÉü(700) : 250 ¥¿¡¼¥óËè";
1470 return "heal (700) every 250 turns";
1477 return "¥¹¥¿¡¼¡¦¥Ü¡¼¥ë(150) : 1000 ¥¿¡¼¥óËè";
1479 return "star ball (150) every 1000 turns";
1483 case ART_BLADETURNER:
1486 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300), »Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢ÂÑÀ";
1488 return "breathe elements (300), hero, bless, and resistance";
1495 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1497 return "illumination every 10+d10 turns";
1504 return "ËâË¡¤ÎÃϿޤȸ÷ : 50+d50 ¥¿¡¼¥óËè";
1506 return "magic mapping and light every 50+d50 turns";
1513 return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô : 20+d20 ¥¿¡¼¥óËè";
1515 return "clairvoyance and recall, draining you every 20+d20 turns";
1523 return "¼Ù°Â໶(x5) : 200+d200 ¥¿¡¼¥óËè";
1525 return "dispel evil (x5) every 200+d200 turns";
1532 return "¼Ù°Â໶(x5) : 100+d100 ¥¿¡¼¥óËè";
1534 return "dispel evil (x5) every 100+d100 turns";
1542 return "Âмٰ·ë³¦ : 225+d225 ¥¿¡¼¥óËè";
1544 return "protection from evil every 225+d225 turns";
1551 return "Ã⩹¶·â(100) : 100+d100 ¥¿¡¼¥óËè";
1553 return "a strangling attack (100) every 100+d100 turns";
1560 return "¥¹¥Ô¡¼¥É(75+d75¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1562 return "haste self (75+d75 turns) every 150+d150 turns";
1569 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(300) : 225+d225 ¥¿¡¼¥óËè";
1571 return "large fire ball (300) every 225+d225 turns";
1578 return "µðÂ祢¥¤¥¹¡¦¥Ü¡¼¥ë(400) : 325+d325 ¥¿¡¼¥óËè";
1580 return "large frost ball (400) every 325+d325 turns";
1588 return "µðÂ祵¥ó¥À¡¼¡¦¥Ü¡¼¥ë(500) : 425+d425 ¥¿¡¼¥óËè";
1590 return "large lightning ball (500) every 425+d425 turns";
1598 return "¿®¤¸Æñ¤¤¤³¤È : 450+d450 ¥¿¡¼¥óËè";
1600 return "bizarre things every 450+d450 turns";
1604 case ART_DOR: case ART_TERROR: case ART_STONEMASK:
1607 return "Á´Êý¸þ¤Ø¤Î¶²Éݤθ÷Àþ : 3*(¥ì¥Ù¥ë+10) ¥¿¡¼¥óËè";
1609 return "rays of fear in every direction every 3*(level+10) turns";
1616 return "¤³¤Î³¬¤Ë¤¤¤ë¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òɽ¼¨ : 200¥¿¡¼¥óËè";
1618 return "list of the uniques on the level every 200 turns";
1621 case ART_STONE_LORE:
1624 return "´í¸±¤òȼ¤¦´ÕÄê : ¤¤¤Ä¤Ç¤â";
1626 return "perilous identify every turn";
1632 return "³²Ãî¤Î¶î½ü : 55+d55¥¿¡¼¥óËè";
1634 return "dispel small life every 55+d55 turns";
1640 return "¥â¥ó¥¹¥¿¡¼¶²¹² : 40+d40¥¿¡¼¥óËè";
1642 return "frighten monsters every 40+d40 turns";
1648 return "Âмٰ·ë³¦ : 200+d200 ¥¿¡¼¥óËè";
1650 return "protection from evil every 200 + d200 turns";
1656 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
1658 return "a mana bolt (120) every 120+d120 turns";
1664 return "»Îµ¤¹âÍÈ, ¥¹¥Ô¡¼¥É(50+d50¥¿¡¼¥ó) : 100+d200 ¥¿¡¼¥óËè";
1666 return "hero and +10 to speed (50) every 100+200d turns";
1672 return "âÁ¤·¤¤¸÷ : 250 ¥¿¡¼¥óËè";
1674 return "blinding light every 250 turns";
1680 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
1682 return "Recharge item every 200 turns";
1688 return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë¡£";
1690 return "Increase STR (destroyed 50%)";
1696 return "ËâÎϤÎÍò(400) : 250+d250¥¿¡¼¥óËè";
1698 return "a mana storm every 250+d250 turns";
1704 return "ʪÂΤò°ú¤´ó¤»¤ë(½ÅÎÌ25kg¤Þ¤Ç) : 25+d25¥¿¡¼¥óËè";
1706 return "a telekinesis (500 lb) every 25+d25 turns";
1712 return "¥Ï¥¦¥ó¥É¾¤´ : 300+d150¥¿¡¼¥óËè";
1714 return "summon hound every 300+d150 turns";
1720 return "µðÂ祹¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 200+d200 ¥¿¡¼¥óËè";
1722 return "large star ball (200) every 200+d200 turns";
1729 return "Îã¤Î¥¢¥ì : 150+d150 ¥¿¡¼¥óËè";
1731 return "reveal your identity every 150+d150 turns";
1738 return "Çï»ÒÌÚ¤òÂǤÁ¤Ê¤é¤¹ : ¤¤¤Ä¤Ç¤â";
1740 return "beat wooden clappers every turn";
1748 return "»Îµ¤¹âÍÈ : 30+d30¥¿¡¼¥óËè";
1750 return "heroism every 30+d30 turns";
1758 return "Ìþ¤· : 100¥¿¡¼¥óËè";
1760 return "curing every 100 turns";
1768 return "ưʪ̥λ : 200¥¿¡¼¥óËè";
1770 return "charm animal every 200 turns";
1777 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(12d8) : 50 ¥¿¡¼¥óËè";
1779 return "frost bolt (12d8) every 50 turns";
1786 return "°ÀÊѹ¹ : 3333 ¥¿¡¼¥óËè";
1788 return "change zokusei every 3333 turns";
1795 return "¥¦¥©¡¼¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 250 ¥¿¡¼¥óËè";
1797 return "water ball (200) every 250 turns";
1804 return "»Í¸ÔƧ¤ß : 100+d100¥¿¡¼¥óËè";
1806 return "shiko every 100+d100 turns";
1813 return "Î䵤¤ÎÂÑÀ : 40+d40¥¿¡¼¥óËè";
1815 return "resist cold every 40+d40 turns";
1822 return "Âý¤ÎÂç·²¾¤´ : 300+d150¥¿¡¼¥óËè";
1824 return "summon octopus every 300+d150 turns";
1831 return "°Å¹õ¤ÎÍò(250) : 150+d150 ¥¿¡¼¥óËè";
1833 return "darkness storm (250) every 150+d150 turns";
1837 case ART_SACRED_KNIGHTS:
1840 return "*²ò¼ö*¤ÈÄ´ºº: ¤¤¤Ä¤Ç¤â";
1842 return "Dispel Curse and Probing every turn";
1849 return "ËâÎÏÉü³è: 777 ¥¿¡¼¥óËè";
1851 return "Restore Mana every 777 turns";
1858 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_TSURIZAO))
1861 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
1863 return "fishing : every time";
1868 if (item_tester_hook_smith(o_ptr))
1870 switch (o_ptr->xtra3 - 1)
1872 case ESSENCE_TMP_RES_ACID:
1874 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1876 return "resist acid every 50+d50 turns";
1879 case ESSENCE_TMP_RES_ELEC:
1881 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1883 return "resist elec every 50+d50 turns";
1886 case ESSENCE_TMP_RES_FIRE:
1888 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1890 return "resist fire every 50+d50 turns";
1893 case ESSENCE_TMP_RES_COLD:
1895 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1897 return "resist cold every 50+d50 turns";
1902 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1904 return "earthquake every 100+d100 turns";
1909 if (o_ptr->name2 == EGO_TRUMP)
1912 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
1914 return "teleport every 50+d50 turns";
1919 if (o_ptr->name2 == EGO_LITE_ILLUMINATION)
1922 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1924 return "illumination every 10+d10 turns";
1928 else if (o_ptr->name2 == EGO_EARTHQUAKES)
1931 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1933 return "earthquake every 100+d100 turns";
1938 else if (o_ptr->name2 == EGO_JUMP)
1941 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1943 return "blink every 10+d10 turns";
1948 if (o_ptr->tval == TV_RING)
1952 switch (o_ptr->name2)
1956 return "»Îµ¤¹âÍÈ : 100+d100¥¿¡¼¥óËè";
1958 return "heroism every 100+d100 turns";
1960 case EGO_RING_MAGIC_MIS:
1962 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1964 return "magic missile (2d6) every 2 turns";
1966 case EGO_RING_FIRE_BOLT:
1968 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1970 return "fire bolt (9d8) every 8+d8 turns";
1972 case EGO_RING_COLD_BOLT:
1974 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1976 return "frost bolt (6d8) every 7+d7 turns";
1978 case EGO_RING_ELEC_BOLT:
1980 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1982 return "lightning bolt (4d8) every 5+d5 turns";
1984 case EGO_RING_ACID_BOLT:
1986 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
1988 return "acid bolt (5d8) every 6+d6 turns";
1990 case EGO_RING_MANA_BOLT:
1992 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
1994 return "a mana bolt (120) every 120+d120 turns";
1996 case EGO_RING_FIRE_BALL:
1998 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2000 return "fire ball (100) every 80+d80 turns";
2002 case EGO_RING_COLD_BALL:
2004 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2006 return "cold ball (100) every 80+d80 turns";
2008 case EGO_RING_ELEC_BALL:
2010 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2012 return "elec ball (100) every 80+d80 turns";
2014 case EGO_RING_ACID_BALL:
2016 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2018 return "acid ball (100) every 80+d80 turns";
2020 case EGO_RING_MANA_BALL:
2022 return "ËâÎϤÎÍò (250) : 300 ¥¿¡¼¥óËè";
2024 return "mana storm (250) every 300 turns";
2026 case EGO_RING_DRAGON_F:
2027 if (o_ptr->sval == SV_RING_FLAMES)
2029 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) ¤È²Ð¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
2031 return "breath of fire (200) and resist fire every 200 turns";
2035 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2037 return "fire breath (200) every 250 turns";
2039 case EGO_RING_DRAGON_C:
2040 if (o_ptr->sval == SV_RING_ICE)
2042 return "Î䵤¤Î¥Ö¥ì¥¹ (200) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
2044 return "breath of cold (200) and resist cold every 200 turns";
2048 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2050 return "cold breath (200) every 250 turns";
2052 case EGO_RING_M_DETECT:
2054 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃÎ : 150 ¥¿¡¼¥óËè";
2056 return "detect all monsters every 150 turns";
2058 case EGO_RING_D_SPEED:
2060 return "¥¹¥Ô¡¼¥É(15+d30¥¿¡¼¥ó) : 100 ¥¿¡¼¥óËè";
2062 return "haste self (15+d30 turns) every 100 turns";
2064 case EGO_RING_BERSERKER:
2066 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
2068 return "berserk (25+d25 turns) every 75+d75 turns";
2070 case EGO_RING_TELE_AWAY:
2072 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
2074 return "teleport away every 150 turns";
2078 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ : 777 ¥¿¡¼¥óËè";
2080 return "hero, bless, and ultimate resistance every 777 turns";
2084 switch (o_ptr->sval)
2086 case SV_RING_FLAMES:
2088 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) ¤È²Ð¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2090 return "ball of fire (100) and resist fire every 50+d50 turns";
2095 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2097 return "ball of cold (100) and resist cold every 50+d50 turns";
2102 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) ¤È»À¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2104 return "ball of acid (100) and resist acid every 50+d50 turns";
2109 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) ¤ÈÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2111 return "ball of elec (100) and resist elec every 50+d50 turns";
2119 if (o_ptr->tval == TV_AMULET)
2123 switch (o_ptr->name2)
2127 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
2129 return "identify every 10 turns";
2133 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
2135 return "charm monster every 200 turns";
2139 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
2141 return "blink every 10+d10 turns";
2143 case EGO_AMU_TELEPORT:
2145 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
2147 return "teleport every 50+d50 turns";
2149 case EGO_AMU_D_DOOR:
2151 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
2153 return "dimension door every 200 turns";
2155 case EGO_AMU_RES_FIRE_:
2157 return "²Ð±ê¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2159 return "resist fire every 50+d50 turns";
2161 case EGO_AMU_RES_COLD_:
2163 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2165 return "resist cold every 50+d50 turns";
2167 case EGO_AMU_RES_ELEC_:
2169 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2171 return "resist elec every 50+d50 turns";
2173 case EGO_AMU_RES_ACID_:
2175 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2177 return "resist acid every 50+d50 turns";
2179 case EGO_AMU_DETECTION:
2181 return "Á´´¶ÃÎ : 55+d55¥¿¡¼¥óËè";
2183 return "detect all floor every 55+d55 turns";
2189 if (o_ptr->tval == TV_WHISTLE)
2192 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
2194 return "call pet every 100+d100 turns";
2198 if (o_ptr->tval == TV_CAPTURE)
2201 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
2203 return "captures or releases a monster.";
2207 /* Require dragon scale mail */
2209 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
2211 if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
2215 /* Branch on the sub-type */
2216 switch (o_ptr->sval)
2218 case SV_DRAGON_BLUE:
2221 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
2223 return "breathe lightning (100) every 150+d150 turns";
2227 case SV_DRAGON_WHITE:
2230 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
2232 return "breathe frost (110) every 150+d150 turns";
2236 case SV_DRAGON_BLACK:
2239 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
2241 return "breathe acid (130) every 150+d150 turns";
2245 case SV_DRAGON_GREEN:
2248 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
2250 return "breathe poison gas (150) every 180+d180 turns";
2257 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2259 return "breathe fire (200) every 200+d200 turns";
2263 case SV_DRAGON_MULTIHUED:
2266 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
2268 return "breathe multi-hued (250) every 200+d200 turns";
2272 case SV_DRAGON_BRONZE:
2275 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
2277 return "breathe confusion (120) every 180+d180 turns";
2281 case SV_DRAGON_GOLD:
2284 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
2286 return "breathe sound (130) every 180+d180 turns";
2290 case SV_DRAGON_CHAOS:
2293 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
2295 return "breathe chaos/disenchant (220) every 200+d200 turns";
2302 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
2304 return "breathe sound/shards (230) every 200+d200 turns";
2308 case SV_DRAGON_BALANCE:
2311 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
2313 return "breathe balance (250) every 200+d200 turns";
2317 case SV_DRAGON_SHINING:
2320 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2322 return "breathe light/darkness (200) every 200+d200 turns";
2326 case SV_DRAGON_POWER:
2329 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
2331 return "breathe the elements (300) every 200+d200 turns";
2341 return "breathe air";
2348 * Describe a "fully identified" item
2350 bool screen_object(object_type *o_ptr, bool real)
2354 u32b flgs[TR_FLAG_SIZE];
2357 char o_name[MAX_NLEN];
2360 /* Extract the flags */
2361 object_flags(o_ptr, flgs);
2363 /* Extract the description */
2367 roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
2368 (k_text + k_info[lookup_kind(o_ptr->tval, o_ptr->sval)].text),
2369 77 - 15, temp, sizeof(temp));
2370 for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
2371 { info[i] = &temp[j]; i++;}
2374 /* Mega-Hack -- describe activation */
2375 if (have_flag(flgs, TR_ACTIVATE))
2378 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
2380 info[i++] = "It can be activated for...";
2383 info[i++] = item_activation(o_ptr);
2385 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
2387 info[i++] = "...if it is being worn.";
2392 /* Figurines, a hack */
2393 if (o_ptr->tval == TV_FIGURINE)
2396 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
2398 info[i++] = "It will transform into a pet when thrown.";
2403 /* Figurines, a hack */
2404 if (o_ptr->name1 == ART_STONEMASK)
2407 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
2409 info[i++] = "It makes you turn into a vampire permanently.";
2414 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
2417 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
2419 info[i++] = "It will attempt to kill a monster instantly.";
2424 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
2427 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
2429 info[i++] = "It causes you to strike yourself sometimes.";
2433 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
2435 info[i++] = "It always penetrates invulnerability barriers.";
2439 if (o_ptr->name2 == EGO_2WEAPON)
2442 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
2444 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
2449 if (have_flag(flgs, TR_EASY_SPELL))
2452 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
2454 info[i++] = "It affects your ability to cast spells.";
2458 if (o_ptr->name2 == EGO_AMU_FOOL)
2461 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
2463 info[i++] = "It interferes with casting spells.";
2467 if (o_ptr->name2 == EGO_RING_THROW)
2470 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2472 info[i++] = "It provides great strength when you throw an item.";
2476 if (o_ptr->name2 == EGO_AMU_NAIVETY)
2479 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
2481 info[i++] = "It decreases your magic resistance.";
2485 if (o_ptr->tval == TV_STATUE)
2487 monster_race *r_ptr = &r_info[o_ptr->pval];
2489 if (o_ptr->pval == MON_BULLGATES)
2491 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
2493 info[i++] = "It is shameful.";
2495 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
2497 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
2499 info[i++] = "It is fearful.";
2503 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
2505 info[i++] = "It is cheerful.";
2509 /* Hack -- describe lite's */
2510 if (o_ptr->tval == TV_LITE)
2512 if (o_ptr->name2 == EGO_LITE_DARKNESS)
2515 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
2517 info[i++] = "It provides no light.";
2520 if (o_ptr->sval == SV_LITE_FEANOR ||
2521 o_ptr->sval == SV_LITE_LANTERN)
2524 info[i++] = "¤½¤ì¤ÏÌÀ¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
2526 info[i++] = "It decreases radius of light source by 2.";
2532 info[i++] = "¤½¤ì¤ÏÌÀ¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
2534 info[i++] = "It decreases radius of light source by 1.";
2538 else if (artifact_p(o_ptr))
2541 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2543 info[i++] = "It provides light (radius 3) forever.";
2547 else if (o_ptr->name2 == EGO_LITE_SHINE)
2549 if (o_ptr->sval == SV_LITE_FEANOR)
2552 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2554 info[i++] = "It provides light (radius 3) forever.";
2558 else if (o_ptr->sval == SV_LITE_LANTERN)
2561 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2563 info[i++] = "It provides light (radius 3) when fueled.";
2570 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2572 info[i++] = "It provides light (radius 2) when fueled.";
2579 if (o_ptr->sval == SV_LITE_FEANOR)
2582 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2584 info[i++] = "It provides light (radius 2) forever.";
2588 else if (o_ptr->sval == SV_LITE_LANTERN)
2591 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2593 info[i++] = "It provides light (radius 2) when fueled.";
2600 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
2602 info[i++] = "It provides light (radius 1) when fueled.";
2607 if (o_ptr->name2 == EGO_LITE_LONG)
2610 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
2612 info[i++] = "It provides light for much longer time.";
2618 /* And then describe it fully */
2620 if (have_flag(flgs, TR_RIDING))
2622 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
2624 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
2626 info[i++] = "It is made for use while riding.";
2630 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
2632 info[i++] = "It is suitable for use while riding.";
2636 if (have_flag(flgs, TR_STR))
2639 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2641 info[i++] = "It affects your strength.";
2645 if (have_flag(flgs, TR_INT))
2648 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2650 info[i++] = "It affects your intelligence.";
2654 if (have_flag(flgs, TR_WIS))
2657 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2659 info[i++] = "It affects your wisdom.";
2663 if (have_flag(flgs, TR_DEX))
2666 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2668 info[i++] = "It affects your dexterity.";
2672 if (have_flag(flgs, TR_CON))
2675 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2677 info[i++] = "It affects your constitution.";
2681 if (have_flag(flgs, TR_CHR))
2684 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2686 info[i++] = "It affects your charisma.";
2691 if (have_flag(flgs, TR_MAGIC_MASTERY))
2694 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2696 info[i++] = "It affects your ability to use magic devices.";
2700 if (have_flag(flgs, TR_STEALTH))
2703 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2705 info[i++] = "It affects your stealth.";
2709 if (have_flag(flgs, TR_SEARCH))
2712 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2714 info[i++] = "It affects your searching.";
2718 if (have_flag(flgs, TR_INFRA))
2721 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2723 info[i++] = "It affects your infravision.";
2727 if (have_flag(flgs, TR_TUNNEL))
2730 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2732 info[i++] = "It affects your ability to tunnel.";
2736 if (have_flag(flgs, TR_SPEED))
2739 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2741 info[i++] = "It affects your speed.";
2745 if (have_flag(flgs, TR_BLOWS))
2748 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2750 info[i++] = "It affects your attack speed.";
2755 if (have_flag(flgs, TR_BRAND_ACID))
2758 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2760 info[i++] = "It does extra damage from acid.";
2764 if (have_flag(flgs, TR_BRAND_ELEC))
2767 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2769 info[i++] = "It does extra damage from electricity.";
2773 if (have_flag(flgs, TR_BRAND_FIRE))
2776 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2778 info[i++] = "It does extra damage from fire.";
2782 if (have_flag(flgs, TR_BRAND_COLD))
2785 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2787 info[i++] = "It does extra damage from frost.";
2792 if (have_flag(flgs, TR_BRAND_POIS))
2795 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
2797 info[i++] = "It poisons your foes.";
2802 if (have_flag(flgs, TR_CHAOTIC))
2805 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
2807 info[i++] = "It produces chaotic effects.";
2812 if (have_flag(flgs, TR_VAMPIRIC))
2815 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
2817 info[i++] = "It drains life from your foes.";
2822 if (have_flag(flgs, TR_IMPACT))
2825 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
2827 info[i++] = "It can cause earthquakes.";
2832 if (have_flag(flgs, TR_VORPAL))
2835 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2837 info[i++] = "It is very sharp and can cut your foes.";
2842 if (have_flag(flgs, TR_KILL_DRAGON))
2845 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2847 info[i++] = "It is a great bane of dragons.";
2851 else if (have_flag(flgs, TR_SLAY_DRAGON))
2854 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2856 info[i++] = "It is especially deadly against dragons.";
2861 if (have_flag(flgs, TR_KILL_ORC))
2864 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2866 info[i++] = "It is a great bane of orcs.";
2870 if (have_flag(flgs, TR_SLAY_ORC))
2873 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2875 info[i++] = "It is especially deadly against orcs.";
2880 if (have_flag(flgs, TR_KILL_TROLL))
2883 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2885 info[i++] = "It is a great bane of trolls.";
2889 if (have_flag(flgs, TR_SLAY_TROLL))
2892 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2894 info[i++] = "It is especially deadly against trolls.";
2899 if (have_flag(flgs, TR_KILL_GIANT))
2902 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2904 info[i++] = "It is a great bane of giants.";
2907 else if (have_flag(flgs, TR_SLAY_GIANT))
2910 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2912 info[i++] = "It is especially deadly against giants.";
2917 if (have_flag(flgs, TR_KILL_DEMON))
2920 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2922 info[i++] = "It is a great bane of demons.";
2926 if (have_flag(flgs, TR_SLAY_DEMON))
2929 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2931 info[i++] = "It strikes at demons with holy wrath.";
2936 if (have_flag(flgs, TR_KILL_UNDEAD))
2939 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2941 info[i++] = "It is a great bane of undead.";
2945 if (have_flag(flgs, TR_SLAY_UNDEAD))
2948 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2950 info[i++] = "It strikes at undead with holy wrath.";
2955 if (have_flag(flgs, TR_KILL_EVIL))
2958 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2960 info[i++] = "It is a great bane of evil monsters.";
2964 if (have_flag(flgs, TR_SLAY_EVIL))
2967 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
2969 info[i++] = "It fights against evil with holy fury.";
2974 if (have_flag(flgs, TR_KILL_ANIMAL))
2977 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2979 info[i++] = "It is a great bane of natural creatures.";
2983 if (have_flag(flgs, TR_SLAY_ANIMAL))
2986 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2988 info[i++] = "It is especially deadly against natural creatures.";
2993 if (have_flag(flgs, TR_KILL_HUMAN))
2996 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2998 info[i++] = "It is a great bane of humans.";
3002 if (have_flag(flgs, TR_SLAY_HUMAN))
3005 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
3007 info[i++] = "It is especially deadly against humans.";
3012 if (have_flag(flgs, TR_FORCE_WEAPON))
3015 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
3017 info[i++] = "It powerfully strikes at a monster using your mana.";
3021 if (have_flag(flgs, TR_DEC_MANA))
3024 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
3026 info[i++] = "It decreases your mana consumption.";
3030 if (have_flag(flgs, TR_SUST_STR))
3033 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
3035 info[i++] = "It sustains your strength.";
3039 if (have_flag(flgs, TR_SUST_INT))
3042 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
3044 info[i++] = "It sustains your intelligence.";
3048 if (have_flag(flgs, TR_SUST_WIS))
3051 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
3053 info[i++] = "It sustains your wisdom.";
3057 if (have_flag(flgs, TR_SUST_DEX))
3060 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
3062 info[i++] = "It sustains your dexterity.";
3066 if (have_flag(flgs, TR_SUST_CON))
3069 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
3071 info[i++] = "It sustains your constitution.";
3075 if (have_flag(flgs, TR_SUST_CHR))
3078 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
3080 info[i++] = "It sustains your charisma.";
3085 if (have_flag(flgs, TR_IM_ACID))
3088 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3090 info[i++] = "It provides immunity to acid.";
3094 if (have_flag(flgs, TR_IM_ELEC))
3097 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3099 info[i++] = "It provides immunity to electricity.";
3103 if (have_flag(flgs, TR_IM_FIRE))
3106 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3108 info[i++] = "It provides immunity to fire.";
3112 if (have_flag(flgs, TR_IM_COLD))
3115 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3117 info[i++] = "It provides immunity to cold.";
3122 if (have_flag(flgs, TR_THROW))
3125 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3127 info[i++] = "It is perfectly balanced for throwing.";
3131 if (have_flag(flgs, TR_FREE_ACT))
3134 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3136 info[i++] = "It provides immunity to paralysis.";
3140 if (have_flag(flgs, TR_HOLD_LIFE))
3143 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
3145 info[i++] = "It provides resistance to life draining.";
3149 if (have_flag(flgs, TR_RES_FEAR))
3152 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3154 info[i++] = "It makes you completely fearless.";
3158 if (have_flag(flgs, TR_RES_ACID))
3161 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3163 info[i++] = "It provides resistance to acid.";
3167 if (have_flag(flgs, TR_RES_ELEC))
3170 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3172 info[i++] = "It provides resistance to electricity.";
3176 if (have_flag(flgs, TR_RES_FIRE))
3179 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3181 info[i++] = "It provides resistance to fire.";
3185 if (have_flag(flgs, TR_RES_COLD))
3188 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3190 info[i++] = "It provides resistance to cold.";
3194 if (have_flag(flgs, TR_RES_POIS))
3197 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3199 info[i++] = "It provides resistance to poison.";
3204 if (have_flag(flgs, TR_RES_LITE))
3207 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3209 info[i++] = "It provides resistance to light.";
3213 if (have_flag(flgs, TR_RES_DARK))
3216 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3218 info[i++] = "It provides resistance to dark.";
3223 if (have_flag(flgs, TR_RES_BLIND))
3226 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3228 info[i++] = "It provides resistance to blindness.";
3232 if (have_flag(flgs, TR_RES_CONF))
3235 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3237 info[i++] = "It provides resistance to confusion.";
3241 if (have_flag(flgs, TR_RES_SOUND))
3244 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3246 info[i++] = "It provides resistance to sound.";
3250 if (have_flag(flgs, TR_RES_SHARDS))
3253 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3255 info[i++] = "It provides resistance to shards.";
3260 if (have_flag(flgs, TR_RES_NETHER))
3263 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3265 info[i++] = "It provides resistance to nether.";
3269 if (have_flag(flgs, TR_RES_NEXUS))
3272 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3274 info[i++] = "It provides resistance to nexus.";
3278 if (have_flag(flgs, TR_RES_CHAOS))
3281 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3283 info[i++] = "It provides resistance to chaos.";
3287 if (have_flag(flgs, TR_RES_DISEN))
3290 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3292 info[i++] = "It provides resistance to disenchantment.";
3297 if (have_flag(flgs, TR_FEATHER))
3300 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3302 info[i++] = "It allows you to levitate.";
3306 if (have_flag(flgs, TR_LITE))
3308 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
3310 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
3312 info[i++] = "It decreases radius of your light source by 1.";
3316 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë(Ⱦ·Â¤Ë+1)¡£";
3318 info[i++] = "It provides permanent light. (radius +1)";
3322 if (have_flag(flgs, TR_SEE_INVIS))
3325 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3327 info[i++] = "It allows you to see invisible monsters.";
3331 if (have_flag(flgs, TR_TELEPATHY))
3334 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
3336 info[i++] = "It gives telepathic powers.";
3340 if (have_flag(flgs, TR_ESP_ANIMAL))
3343 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤ò´¶ÃΤ¹¤ë¡£";
3345 info[i++] = "It senses natural creatures.";
3349 if (have_flag(flgs, TR_ESP_UNDEAD))
3352 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ò´¶ÃΤ¹¤ë¡£";
3354 info[i++] = "It senses undead.";
3358 if (have_flag(flgs, TR_ESP_DEMON))
3361 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò´¶ÃΤ¹¤ë¡£";
3363 info[i++] = "It senses demons.";
3367 if (have_flag(flgs, TR_ESP_ORC))
3370 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ò´¶ÃΤ¹¤ë¡£";
3372 info[i++] = "It senses orcs.";
3376 if (have_flag(flgs, TR_ESP_TROLL))
3379 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ò´¶ÃΤ¹¤ë¡£";
3381 info[i++] = "It senses trolls.";
3385 if (have_flag(flgs, TR_ESP_GIANT))
3388 info[i++] = "¤½¤ì¤Ïµð¿Í¤ò´¶ÃΤ¹¤ë¡£";
3390 info[i++] = "It senses giants.";
3394 if (have_flag(flgs, TR_ESP_DRAGON))
3397 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò´¶ÃΤ¹¤ë¡£";
3399 info[i++] = "It senses dragons.";
3403 if (have_flag(flgs, TR_ESP_HUMAN))
3406 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ò´¶ÃΤ¹¤ë¡£";
3408 info[i++] = "It senses humans.";
3412 if (have_flag(flgs, TR_ESP_EVIL))
3415 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¸ºß¤ò´¶ÃΤ¹¤ë¡£";
3417 info[i++] = "It senses evil creatures.";
3421 if (have_flag(flgs, TR_ESP_GOOD))
3424 info[i++] = "¤½¤ì¤ÏÁ±Îɤʸºß¤ò´¶ÃΤ¹¤ë¡£";
3426 info[i++] = "It senses good creatures.";
3430 if (have_flag(flgs, TR_ESP_NONLIVING))
3433 info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤò´¶ÃΤ¹¤ë¡£";
3435 info[i++] = "It senses non-living creatures.";
3439 if (have_flag(flgs, TR_ESP_UNIQUE))
3442 info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤ò´¶ÃΤ¹¤ë¡£";
3444 info[i++] = "It senses unique monsters.";
3448 if (have_flag(flgs, TR_SLOW_DIGEST))
3451 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
3453 info[i++] = "It slows your metabolism.";
3457 if (have_flag(flgs, TR_REGEN))
3460 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
3462 info[i++] = "It speeds your regenerative powers.";
3466 if (have_flag(flgs, TR_WARNING))
3469 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
3471 info[i++] = "It warns you of danger";
3475 if (have_flag(flgs, TR_REFLECT))
3478 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
3480 info[i++] = "It reflects bolts and arrows.";
3484 if (have_flag(flgs, TR_SH_FIRE))
3487 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3489 info[i++] = "It produces a fiery sheath.";
3493 if (have_flag(flgs, TR_SH_ELEC))
3496 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3498 info[i++] = "It produces an electric sheath.";
3502 if (have_flag(flgs, TR_SH_COLD))
3505 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3507 info[i++] = "It produces a sheath of coldness.";
3511 if (have_flag(flgs, TR_NO_MAGIC))
3514 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3516 info[i++] = "It produces an anti-magic shell.";
3520 if (have_flag(flgs, TR_NO_TELE))
3523 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
3525 info[i++] = "It prevents teleportation.";
3529 if (have_flag(flgs, TR_XTRA_MIGHT))
3532 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3534 info[i++] = "It fires missiles with extra might.";
3538 if (have_flag(flgs, TR_XTRA_SHOTS))
3541 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3543 info[i++] = "It fires missiles excessively fast.";
3548 if (have_flag(flgs, TR_BLESSED))
3551 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
3553 info[i++] = "It has been blessed by the gods.";
3558 if (cursed_p(o_ptr))
3560 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
3563 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3565 info[i++] = "It is permanently cursed.";
3569 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
3572 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3574 info[i++] = "It is heavily cursed.";
3581 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
3583 info[i++] = "It is cursed.";
3589 if ((have_flag(flgs, TR_TY_CURSE)) || (o_ptr->curse_flags & TRC_TY_CURSE))
3592 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
3594 info[i++] = "It carries an ancient foul curse.";
3598 if ((have_flag(flgs, TR_AGGRAVATE)) || (o_ptr->curse_flags & TRC_AGGRAVATE))
3601 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
3603 info[i++] = "It aggravates nearby creatures.";
3607 if ((have_flag(flgs, TR_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
3610 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
3612 info[i++] = "It drains experience.";
3616 if (o_ptr->curse_flags & TRC_SLOW_REGEN)
3619 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
3621 info[i++] = "It slows your regenerative powers.";
3625 if (o_ptr->curse_flags & TRC_ADD_L_CURSE)
3628 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
3630 info[i++] = "It adds weak curses.";
3634 if (o_ptr->curse_flags & TRC_ADD_H_CURSE)
3637 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
3639 info[i++] = "It adds heavy curses.";
3643 if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
3646 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3648 info[i++] = "It attracts animals.";
3652 if (o_ptr->curse_flags & TRC_CALL_DEMON)
3655 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3657 info[i++] = "It attracts demons.";
3661 if (o_ptr->curse_flags & TRC_CALL_DRAGON)
3664 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3666 info[i++] = "It attracts dragons.";
3670 if (o_ptr->curse_flags & TRC_COWARDICE)
3673 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤µ¯¤³¤¹¡£";
3675 info[i++] = "It makes you subject to cowardice.";
3679 if ((have_flag(flgs, TR_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
3682 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
3684 info[i++] = "It induces random teleportation.";
3688 if (o_ptr->curse_flags & TRC_LOW_MELEE)
3691 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
3693 info[i++] = "It causes you to miss blows.";
3697 if (o_ptr->curse_flags & TRC_LOW_AC)
3700 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
3702 info[i++] = "It helps your enemies' blows.";
3706 if (o_ptr->curse_flags & TRC_LOW_MAGIC)
3709 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
3711 info[i++] = "It encumbers you while spellcasting.";
3715 if (o_ptr->curse_flags & TRC_FAST_DIGEST)
3718 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
3720 info[i++] = "It speeds your metabolism.";
3724 if (o_ptr->curse_flags & TRC_DRAIN_HP)
3727 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
3729 info[i++] = "It drains you.";
3733 if (o_ptr->curse_flags & TRC_DRAIN_MANA)
3736 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
3738 info[i++] = "It drains your mana.";
3743 /* Describe about this kind of object instead of THIS fake object */
3746 switch (o_ptr->tval)
3749 switch (o_ptr->sval)
3751 case SV_RING_LORDLY:
3753 info[i++] = "¤½¤ì¤Ï´ö¤Ä¤«¤Î¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3755 info[i++] = "It provides some random resistances.";
3758 case SV_RING_WARNING:
3760 info[i++] = "¤½¤ì¤Ï¤Ò¤È¤Ä¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3762 info[i++] = "It may provide a low rank ESP.";
3769 switch (o_ptr->sval)
3771 case SV_AMULET_RESISTANCE:
3773 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3775 info[i++] = "It may provides resistance to poison.";
3778 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3780 info[i++] = "It may provide a random resistances.";
3783 case SV_AMULET_THE_MAGI:
3785 info[i++] = "¤½¤ì¤ÏºÇÂç¤Ç£³¤Ä¤Þ¤Ç¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë¡£";
3787 info[i++] = "It provides up to three low rank ESPs.";
3795 if (have_flag(flgs, TR_IGNORE_ACID) &&
3796 have_flag(flgs, TR_IGNORE_ELEC) &&
3797 have_flag(flgs, TR_IGNORE_FIRE) &&
3798 have_flag(flgs, TR_IGNORE_COLD))
3801 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3803 info[i++] = "It cannot be harmed by the elements.";
3808 if (have_flag(flgs, TR_IGNORE_ACID))
3811 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3813 info[i++] = "It cannot be harmed by acid.";
3816 if (have_flag(flgs, TR_IGNORE_ELEC))
3819 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3821 info[i++] = "It cannot be harmed by electricity.";
3824 if (have_flag(flgs, TR_IGNORE_FIRE))
3827 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3829 info[i++] = "It cannot be harmed by fire.";
3832 if (have_flag(flgs, TR_IGNORE_COLD))
3835 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3837 info[i++] = "It cannot be harmed by cold.";
3842 /* No special effects */
3843 if (!i) return (FALSE);
3845 /* Save the screen */
3849 Term_get_size(&wid, &hgt);
3851 /* Display Item name */
3853 object_desc(o_name, o_ptr, 0);
3855 object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
3859 /* Erase the screen */
3860 for (k = 1; k < hgt; k++) prt("", k, 13);
3862 /* Label the information */
3863 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
3865 monster_race *r_ptr = &r_info[o_ptr->pval];
3866 int namelen = strlen(r_name + r_ptr->name);
3867 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
3868 c_prt(r_ptr->d_attr, format("%c", r_ptr->d_char), 1, 18+namelen);
3869 prt("'", 1, 19+namelen);
3873 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
3875 prt(" Item Attributes:", 1, 15);
3878 /* We will print on top of the map (column 13) */
3879 for (k = 2, j = 0; j < i; j++)
3882 prt(info[j], k++, 15);
3884 /* Every 20 entries (lines 2 to 21), start over */
3885 if ((k == hgt - 2) && (j+1 < i))
3888 prt("-- ³¤¯ --", k, 15);
3890 prt("-- more --", k, 15);
3893 for (; k > 2; k--) prt("", k, 15);
3899 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
3901 prt("[Press any key to continue]", k, 15);
3906 /* Restore the screen */
3909 /* Gave knowledge */
3916 * Convert an inventory index into a one character label
3917 * Note that the label does NOT distinguish inven/equip.
3919 char index_to_label(int i)
3921 /* Indexes for "inven" are easy */
3922 if (i < INVEN_RARM) return (I2A(i));
3924 /* Indexes for "equip" are offset */
3925 return (I2A(i - INVEN_RARM));
3930 * Convert a label into the index of an item in the "inven"
3931 * Return "-1" if the label does not indicate a real item
3933 s16b label_to_inven(int c)
3938 i = (islower(c) ? A2I(c) : -1);
3940 /* Verify the index */
3941 if ((i < 0) || (i > INVEN_PACK)) return (-1);
3943 /* Empty slots can never be chosen */
3944 if (!inventory[i].k_idx) return (-1);
3946 /* Return the index */
3952 * Convert a label into the index of a item in the "equip"
3953 * Return "-1" if the label does not indicate a real item
3955 s16b label_to_equip(int c)
3960 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
3962 /* Verify the index */
3963 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
3965 /* Empty slots can never be chosen */
3966 if (!inventory[i].k_idx) return (-1);
3968 /* Return the index */
3975 * Determine which equipment slot (if any) an item likes
3977 s16b wield_slot(object_type *o_ptr)
3979 /* Slot for equipment */
3980 switch (o_ptr->tval)
3987 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
3988 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
3989 return (INVEN_LARM);
3996 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
3997 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
3998 return (INVEN_RARM);
4008 /* Use the right hand first */
4009 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
4011 /* Use the left hand for swapping (by default) */
4012 return (INVEN_LEFT);
4018 return (INVEN_NECK);
4023 return (INVEN_LITE);
4030 return (INVEN_BODY);
4035 return (INVEN_OUTER);
4041 return (INVEN_HEAD);
4046 return (INVEN_HANDS);
4051 return (INVEN_FEET);
4055 /* No slot available */
4061 * Return a string mentioning how a given item is carried
4063 cptr mention_use(int i)
4067 /* Examine the location */
4071 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê"); break;
4073 case INVEN_RARM: p = "Wielding"; break;
4077 case INVEN_LARM: p = (left_hander ? " ±¦¼ê" : " º¸¼ê"); break;
4079 case INVEN_LARM: p = "On arm"; break;
4083 case INVEN_BOW: p = "¼Í·âÍÑ"; break;
4085 case INVEN_BOW: p = "Shooting"; break;
4089 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
4091 case INVEN_LEFT: p = "On left hand"; break;
4095 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
4097 case INVEN_RIGHT: p = "On right hand"; break;
4101 case INVEN_NECK: p = " ¼ó"; break;
4103 case INVEN_NECK: p = "Around neck"; break;
4107 case INVEN_LITE: p = " ¸÷¸»"; break;
4109 case INVEN_LITE: p = "Light source"; break;
4113 case INVEN_BODY: p = " ÂÎ"; break;
4115 case INVEN_BODY: p = "On body"; break;
4119 case INVEN_OUTER: p = "ÂΤξå"; break;
4121 case INVEN_OUTER: p = "About body"; break;
4125 case INVEN_HEAD: p = " Ƭ"; break;
4127 case INVEN_HEAD: p = "On head"; break;
4131 case INVEN_HANDS: p = " ¼ê"; break;
4133 case INVEN_HANDS: p = "On hands"; break;
4137 case INVEN_FEET: p = " "; break;
4139 case INVEN_FEET: p = "On feet"; break;
4143 default: p = "¥¶¥Ã¥¯"; break;
4145 default: p = "In pack"; break;
4150 /* Hack -- Heavy weapon */
4151 if (i == INVEN_RARM)
4153 if (p_ptr->heavy_wield[0])
4164 /* Hack -- Heavy weapon */
4165 if (i == INVEN_LARM)
4167 if (p_ptr->heavy_wield[1])
4178 /* Hack -- Heavy bow */
4182 o_ptr = &inventory[i];
4183 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
4194 /* Return the result */
4200 * Return a string describing how a given item is being worn.
4201 * Currently, only used for items in the equipment, not inventory.
4203 cptr describe_use(int i)
4210 case INVEN_RARM: p = p_ptr->ryoute ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
4212 case INVEN_RARM: p = "attacking monsters with"; break;
4216 case INVEN_LARM: p = (left_hander ? "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
4218 case INVEN_LARM: p = "wearing on your arm"; break;
4222 case INVEN_BOW: p = "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
4224 case INVEN_BOW: p = "shooting missiles with"; break;
4228 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4230 case INVEN_LEFT: p = "wearing on your left hand"; break;
4234 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4236 case INVEN_RIGHT: p = "wearing on your right hand"; break;
4240 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
4242 case INVEN_NECK: p = "wearing around your neck"; break;
4246 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
4248 case INVEN_LITE: p = "using to light the way"; break;
4252 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
4254 case INVEN_BODY: p = "wearing on your body"; break;
4258 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
4260 case INVEN_OUTER: p = "wearing on your back"; break;
4264 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
4266 case INVEN_HEAD: p = "wearing on your head"; break;
4270 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
4272 case INVEN_HANDS: p = "wearing on your hands"; break;
4276 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
4278 case INVEN_FEET: p = "wearing on your feet"; break;
4282 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
4284 default: p = "carrying in your pack"; break;
4289 /* Hack -- Heavy weapon */
4290 if (i == INVEN_RARM)
4293 int hold = adj_str_hold[p_ptr->stat_ind[A_STR]];
4295 if (p_ptr->ryoute) hold *= 2;
4296 o_ptr = &inventory[i];
4297 if (hold < o_ptr->weight / 10)
4308 /* Hack -- Heavy bow */
4312 o_ptr = &inventory[i];
4313 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
4316 p = "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î";
4324 /* Return the result */
4329 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
4331 bool check_book_realm(const byte book_tval, const byte book_sval)
4333 if (book_tval < TV_LIFE_BOOK) return FALSE;
4334 if (p_ptr->pclass == CLASS_SORCERER)
4336 return is_magic(tval2realm(book_tval));
4338 else if (p_ptr->pclass == CLASS_RED_MAGE)
4340 if (is_magic(tval2realm(book_tval)))
4341 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
4343 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
4348 * Check an item against the item tester info
4350 bool item_tester_okay(object_type *o_ptr)
4352 /* Hack -- allow listing empty slots */
4353 if (item_tester_full) return (TRUE);
4355 /* Require an item */
4356 if (!o_ptr->k_idx) return (FALSE);
4358 /* Hack -- ignore "gold" */
4359 if (o_ptr->tval == TV_GOLD) return (FALSE);
4361 /* Check the tval */
4362 if (item_tester_tval)
4364 /* Is it a spellbook? If so, we need a hack -- TY */
4365 if ((item_tester_tval <= TV_DEATH_BOOK) &&
4366 (item_tester_tval >= TV_LIFE_BOOK))
4367 return check_book_realm(o_ptr->tval, o_ptr->sval);
4369 if (item_tester_tval != o_ptr->tval) return (FALSE);
4372 /* Check the hook */
4373 if (item_tester_hook)
4375 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
4386 * Choice window "shadow" of the "show_inven()" function
4388 void display_inven(void)
4390 register int i, n, z = 0;
4392 byte attr = TERM_WHITE;
4394 char o_name[MAX_NLEN];
4398 Term_get_size(&wid, &hgt);
4400 /* Find the "final" slot */
4401 for (i = 0; i < INVEN_PACK; i++)
4403 o_ptr = &inventory[i];
4405 /* Skip non-objects */
4406 if (!o_ptr->k_idx) continue;
4412 /* Display the pack */
4413 for (i = 0; i < z; i++)
4415 /* Examine the item */
4416 o_ptr = &inventory[i];
4418 /* Start with an empty "index" */
4419 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4421 /* Is this item "acceptable"? */
4422 if (item_tester_okay(o_ptr))
4424 /* Prepare an "index" */
4425 tmp_val[0] = index_to_label(i);
4427 /* Bracket the "index" --(-- */
4431 /* Display the index (or blank space) */
4432 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
4434 /* Obtain an item description */
4435 object_desc(o_name, o_ptr, 0);
4437 /* Obtain the length of the description */
4441 attr = tval_to_attr[o_ptr->tval % 128];
4443 /* Grey out charging items */
4449 /* Display the entry itself */
4450 Term_putstr(3, i, n, attr, o_name);
4452 /* Erase the rest of the line */
4453 Term_erase(3+n, i, 255);
4455 /* Display the weight if needed */
4456 if (show_weights && o_ptr->weight)
4458 int wgt = o_ptr->weight * o_ptr->number;
4460 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
4462 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4465 prt(tmp_val, i, wid - 9);
4469 /* Erase the rest of the window */
4470 for (i = z; i < hgt; i++)
4472 /* Erase the line */
4473 Term_erase(0, i, 255);
4480 * Choice window "shadow" of the "show_equip()" function
4482 void display_equip(void)
4486 byte attr = TERM_WHITE;
4488 char o_name[MAX_NLEN];
4492 Term_get_size(&wid, &hgt);
4494 /* Display the equipment */
4495 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
4497 /* Examine the item */
4498 o_ptr = &inventory[i];
4500 /* Start with an empty "index" */
4501 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4503 /* Is this item "acceptable"? */
4504 if (item_tester_okay(o_ptr))
4506 /* Prepare an "index" */
4507 tmp_val[0] = index_to_label(i);
4509 /* Bracket the "index" --(-- */
4513 /* Display the index (or blank space) */
4514 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
4516 /* Obtain an item description */
4517 if ((i == INVEN_LARM) && p_ptr->ryoute)
4520 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
4522 strcpy(o_name, "(wielding with two-hands)");
4528 object_desc(o_name, o_ptr, 0);
4529 attr = tval_to_attr[o_ptr->tval % 128];
4532 /* Obtain the length of the description */
4535 /* Grey out charging items */
4541 /* Display the entry itself */
4542 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
4544 /* Erase the rest of the line */
4545 Term_erase(3+n, i - INVEN_RARM, 255);
4547 /* Display the weight (if needed) */
4548 if (show_weights && o_ptr->weight)
4550 int wgt = o_ptr->weight * o_ptr->number;
4552 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
4554 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4557 prt(tmp_val, i - INVEN_RARM, wid - (show_labels ? 28 : 9));
4560 /* Display the slot description (if needed) */
4563 Term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
4564 prt(mention_use(i), i - INVEN_RARM, wid - 15);
4568 /* Erase the rest of the window */
4569 for (i = INVEN_TOTAL - INVEN_RARM; i < hgt; i++)
4571 /* Clear that line */
4572 Term_erase(0, i, 255);
4578 * Find the "first" inventory object with the given "tag".
4580 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
4581 * inscription of an object. Alphabetical characters don't work as a
4584 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
4585 * and "x" is the "current" command_cmd code.
4587 static bool get_tag(int *cp, char tag, int mode)
4592 /* Extract index from mode */
4597 end = INVEN_TOTAL - 1;
4602 end = INVEN_PACK - 1;
4609 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
4611 /* Check every inventory object */
4612 for (i = start; i <= end; i++)
4614 object_type *o_ptr = &inventory[i];
4616 /* Skip non-objects */
4617 if (!o_ptr->k_idx) continue;
4619 /* Skip empty inscriptions */
4620 if (!o_ptr->inscription) continue;
4622 /* Skip non-choice */
4623 if (!item_tester_okay(o_ptr)) continue;
4626 s = my_strchr(quark_str(o_ptr->inscription), '@');
4628 /* Process all tags */
4631 /* Check the special tags */
4632 if ((s[1] == command_cmd) && (s[2] == tag))
4634 /* Save the actual inventory ID */
4641 /* Find another '@' */
4642 s = my_strchr(s + 1, '@');
4647 /**** Find a tag in the form of {@#} (allows only numerals) ***/
4649 /* Don't allow {@#} with '#' being alphabet */
4650 if (tag < '0' || '9' < tag)
4656 /* Check every object */
4657 for (i = start; i <= end; i++)
4659 object_type *o_ptr = &inventory[i];
4661 /* Skip non-objects */
4662 if (!o_ptr->k_idx) continue;
4664 /* Skip empty inscriptions */
4665 if (!o_ptr->inscription) continue;
4667 /* Skip non-choice */
4668 if (!item_tester_okay(o_ptr)) continue;
4671 s = my_strchr(quark_str(o_ptr->inscription), '@');
4673 /* Process all tags */
4676 /* Check the normal tags */
4679 /* Save the actual inventory ID */
4686 /* Find another '@' */
4687 s = my_strchr(s + 1, '@');
4697 * Find the "first" floor object with the given "tag".
4699 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
4700 * inscription of an object. Alphabetical characters don't work as a
4703 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
4704 * and "x" is the "current" command_cmd code.
4706 static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
4711 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
4713 /* Check every object in the grid */
4714 for (i = 0; i < floor_num && i < 23; i++)
4716 object_type *o_ptr = &o_list[floor_list[i]];
4718 /* Skip empty inscriptions */
4719 if (!o_ptr->inscription) continue;
4722 s = my_strchr(quark_str(o_ptr->inscription), '@');
4724 /* Process all tags */
4727 /* Check the special tags */
4728 if ((s[1] == command_cmd) && (s[2] == tag))
4730 /* Save the actual floor object ID */
4737 /* Find another '@' */
4738 s = my_strchr(s + 1, '@');
4743 /**** Find a tag in the form of {@#} (allows only numerals) ***/
4745 /* Don't allow {@#} with '#' being alphabet */
4746 if (tag < '0' || '9' < tag)
4752 /* Check every object in the grid */
4753 for (i = 0; i < floor_num && i < 23; i++)
4755 object_type *o_ptr = &o_list[floor_list[i]];
4757 /* Skip empty inscriptions */
4758 if (!o_ptr->inscription) continue;
4761 s = my_strchr(quark_str(o_ptr->inscription), '@');
4763 /* Process all tags */
4766 /* Check the normal tags */
4769 /* Save the floor object ID */
4776 /* Find another '@' */
4777 s = my_strchr(s + 1, '@');
4787 * Move around label characters with correspond tags
4789 static void prepare_label_string(char *label, int mode)
4791 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
4792 int offset = (mode == USE_EQUIP) ? INVEN_RARM : 0;
4795 /* Prepare normal labels */
4796 strcpy(label, alphabet_chars);
4798 /* Move each label */
4799 for (i = 0; i < 52; i++)
4802 char c = alphabet_chars[i];
4804 /* Find a tag with this label */
4805 if (get_tag(&index, c, mode))
4807 /* Delete the overwritten label */
4808 if (label[i] == c) label[i] = ' ';
4810 /* Move the label to the place of corresponding tag */
4811 label[index - offset] = c;
4818 * Move around label characters with correspond tags (floor version)
4820 static void prepare_label_string_floor(char *label, int floor_list[], int floor_num)
4822 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
4825 /* Prepare normal labels */
4826 strcpy(label, alphabet_chars);
4828 /* Move each label */
4829 for (i = 0; i < 52; i++)
4832 char c = alphabet_chars[i];
4834 /* Find a tag with this label */
4835 if (get_tag_floor(&index, c, floor_list, floor_num))
4837 /* Delete the overwritten label */
4838 if (label[i] == c) label[i] = ' ';
4840 /* Move the label to the place of corresponding tag */
4848 * Display the inventory.
4850 * Hack -- do not display "trailing" empty slots
4852 int show_inven(int target_item)
4854 int i, j, k, l, z = 0;
4855 int col, cur_col, len;
4857 char o_name[MAX_NLEN];
4861 char out_desc[23][MAX_NLEN];
4862 int target_item_label = 0;
4864 char inven_label[52 + 1];
4866 /* Starting column */
4870 Term_get_size(&wid, &hgt);
4872 /* Default "max-length" */
4873 len = wid - col - 1;
4876 /* Find the "final" slot */
4877 for (i = 0; i < INVEN_PACK; i++)
4879 o_ptr = &inventory[i];
4881 /* Skip non-objects */
4882 if (!o_ptr->k_idx) continue;
4888 prepare_label_string(inven_label, USE_INVEN);
4890 /* Display the inventory */
4891 for (k = 0, i = 0; i < z; i++)
4893 o_ptr = &inventory[i];
4895 /* Is this item acceptable? */
4896 if (!item_tester_okay(o_ptr)) continue;
4898 /* Describe the object */
4899 object_desc(o_name, o_ptr, 0);
4901 /* Save the object index, color, and description */
4903 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4905 /* Grey out charging items */
4908 out_color[k] = TERM_L_DARK;
4911 (void)strcpy(out_desc[k], o_name);
4913 /* Find the predicted "line length" */
4914 l = strlen(out_desc[k]) + 5;
4916 /* Be sure to account for the weight */
4917 if (show_weights) l += 9;
4919 /* Account for icon if displayed */
4920 if (show_item_graph)
4923 if (use_bigtile) l++;
4926 /* Maintain the maximum length */
4927 if (l > len) len = l;
4929 /* Advance to next "line" */
4933 /* Find the column to start in */
4934 col = (len > wid - 4) ? 0 : (wid - len - 1);
4936 /* Output each entry */
4937 for (j = 0; j < k; j++)
4943 o_ptr = &inventory[i];
4945 /* Clear the line */
4946 prt("", j + 1, col ? col - 2 : col);
4948 if (use_menu && target_item)
4950 if (j == (target_item-1))
4953 strcpy(tmp_val, "¡Õ");
4955 strcpy(tmp_val, "> ");
4957 target_item_label = i;
4959 else strcpy(tmp_val, " ");
4961 else if (i <= INVEN_PACK)
4963 /* Prepare an index --(-- */
4964 sprintf(tmp_val, "%c)", inven_label[i]);
4968 /* Prepare an index --(-- */
4969 sprintf(tmp_val, "%c)", index_to_label(i));
4972 /* Clear the line with the (possibly indented) index */
4973 put_str(tmp_val, j + 1, col);
4977 /* Display graphics for object, if desired */
4978 if (show_item_graph)
4980 byte a = object_attr(o_ptr);
4981 char c = object_char(o_ptr);
4984 if (a & 0x80) a |= 0x40;
4987 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
4988 if (use_bigtile) cur_col++;
4994 /* Display the entry itself */
4995 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
4997 /* Display the weight if needed */
5000 int wgt = o_ptr->weight * o_ptr->number;
5002 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5004 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
5007 prt(tmp_val, j + 1, wid - 9);
5011 /* Make a "shadow" below the list (only if needed) */
5012 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5014 /* Save the new column */
5017 return target_item_label;
5023 * Display the equipment.
5025 int show_equip(int target_item)
5028 int col, cur_col, len;
5031 char o_name[MAX_NLEN];
5034 char out_desc[23][MAX_NLEN];
5035 int target_item_label = 0;
5037 char equip_label[52 + 1];
5039 /* Starting column */
5043 Term_get_size(&wid, &hgt);
5045 /* Maximal length */
5046 len = wid - col - 1;
5049 /* Scan the equipment list */
5050 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
5052 o_ptr = &inventory[i];
5054 /* Is this item acceptable? */
5055 if (!item_tester_okay(o_ptr) && (!((i == INVEN_LARM) && p_ptr->ryoute) || item_tester_no_ryoute)) continue;
5058 object_desc(o_name, o_ptr, 0);
5060 if ((i == INVEN_LARM) && p_ptr->ryoute)
5063 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
5065 (void)strcpy(out_desc[k],"(wielding with two-hands)");
5071 (void)strcpy(out_desc[k], o_name);
5072 out_color[k] = tval_to_attr[o_ptr->tval % 128];
5076 /* Grey out charging items */
5079 out_color[k] = TERM_L_DARK;
5082 /* Extract the maximal length (see below) */
5084 l = strlen(out_desc[k]) + (2 + 1);
5086 l = strlen(out_desc[k]) + (2 + 3);
5090 /* Increase length for labels (if needed) */
5092 if (show_labels) l += (7 + 2);
5094 if (show_labels) l += (14 + 2);
5098 /* Increase length for weight (if needed) */
5099 if (show_weights) l += 9;
5101 if (show_item_graph) l += 2;
5103 /* Maintain the max-length */
5104 if (l > len) len = l;
5106 /* Advance the entry */
5110 /* Hack -- Find a column to start in */
5112 col = (len > wid - 6) ? 0 : (wid - len - 1);
5114 col = (len > wid - 4) ? 0 : (wid - len - 1);
5117 prepare_label_string(equip_label, USE_EQUIP);
5119 /* Output each entry */
5120 for (j = 0; j < k; j++)
5126 o_ptr = &inventory[i];
5128 /* Clear the line */
5129 prt("", j + 1, col ? col - 2 : col);
5131 if (use_menu && target_item)
5133 if (j == (target_item-1))
5136 strcpy(tmp_val, "¡Õ");
5138 strcpy(tmp_val, "> ");
5140 target_item_label = i;
5142 else strcpy(tmp_val, " ");
5144 else if (i >= INVEN_RARM)
5146 /* Prepare an index --(-- */
5147 sprintf(tmp_val, "%c)", equip_label[i - INVEN_RARM]);
5151 /* Prepare an index --(-- */
5152 sprintf(tmp_val, "%c)", index_to_label(i));
5155 /* Clear the line with the (possibly indented) index */
5156 put_str(tmp_val, j+1, col);
5160 /* Display graphics for object, if desired */
5161 if (show_item_graph)
5163 byte a = object_attr(o_ptr);
5164 char c = object_char(o_ptr);
5167 if (a & 0x80) a |= 0x40;
5170 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
5171 if (use_bigtile) cur_col++;
5179 /* Mention the use */
5181 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
5183 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
5186 put_str(tmp_val, j+1, cur_col);
5188 /* Display the entry itself */
5190 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
5192 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
5199 /* Display the entry itself */
5200 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
5203 /* Display the weight if needed */
5206 int wgt = o_ptr->weight * o_ptr->number;
5208 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5210 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
5213 prt(tmp_val, j + 1, wid - 9);
5217 /* Make a "shadow" below the list (only if needed) */
5218 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5220 /* Save the new column */
5223 return target_item_label;
5230 * Flip "inven" and "equip" in any sub-windows
5232 void toggle_inven_equip(void)
5237 for (j = 0; j < 8; j++)
5240 if (!angband_term[j]) continue;
5242 /* Flip inven to equip */
5243 if (window_flag[j] & (PW_INVEN))
5246 window_flag[j] &= ~(PW_INVEN);
5247 window_flag[j] |= (PW_EQUIP);
5250 p_ptr->window |= (PW_EQUIP);
5253 /* Flip inven to equip */
5254 else if (window_flag[j] & (PW_EQUIP))
5257 window_flag[j] &= ~(PW_EQUIP);
5258 window_flag[j] |= (PW_INVEN);
5261 p_ptr->window |= (PW_INVEN);
5269 * Verify the choice of an item.
5271 * The item can be negative to mean "item on floor".
5273 static bool verify(cptr prompt, int item)
5275 char o_name[MAX_NLEN];
5276 char out_val[MAX_NLEN+20];
5283 o_ptr = &inventory[item];
5289 o_ptr = &o_list[0 - item];
5293 object_desc(o_name, o_ptr, 0);
5297 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
5299 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
5304 return (get_check(out_val));
5309 * Hack -- allow user to "prevent" certain choices
5311 * The item can be negative to mean "item on floor".
5313 static bool get_item_allow(int item)
5319 if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
5324 o_ptr = &inventory[item];
5330 o_ptr = &o_list[0 - item];
5333 /* No inscription */
5334 if (!o_ptr->inscription) return (TRUE);
5337 s = my_strchr(quark_str(o_ptr->inscription), '!');
5339 /* Process preventions */
5342 /* Check the "restriction" */
5343 if ((s[1] == command_cmd) || (s[1] == '*'))
5345 /* Verify the choice */
5347 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
5349 if (!verify("Really try", item)) return (FALSE);
5354 /* Find another '!' */
5355 s = my_strchr(s + 1, '!');
5365 * Auxiliary function for "get_item()" -- test an index
5367 static bool get_item_okay(int i)
5370 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
5372 /* Verify the item */
5373 if (!item_tester_okay(&inventory[i])) return (FALSE);
5382 * Determine whether get_item() can get some item or not
5383 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
5385 bool can_get_item(void)
5387 int j, floor_list[23], floor_num = 0;
5389 for (j = 0; j < INVEN_TOTAL; j++)
5390 if (item_tester_okay(&inventory[j]))
5393 floor_num = scan_floor(floor_list, py, px, 0x01);
5401 * Let the user select an item, save its "index"
5403 * Return TRUE only if an acceptable item was chosen by the user.
5405 * The selected item must satisfy the "item_tester_hook()" function,
5406 * if that hook is set, and the "item_tester_tval", if that value is set.
5408 * All "item_tester" restrictions are cleared before this function returns.
5410 * The user is allowed to choose acceptable items from the equipment,
5411 * inventory, or floor, respectively, if the proper flag was given,
5412 * and there are any acceptable items in that location.
5414 * The equipment or inventory are displayed (even if no acceptable
5415 * items are in that location) if the proper flag was given.
5417 * If there are no acceptable items available anywhere, and "str" is
5418 * not NULL, then it will be used as the text of a warning message
5419 * before the function returns.
5421 * Note that the user must press "-" to specify the item on the floor,
5422 * and there is no way to "examine" the item on the floor, while the
5423 * use of "capital" letters will "examine" an inventory/equipment item,
5424 * and prompt for its use.
5426 * If a legal item is selected from the inventory, we save it in "cp"
5427 * directly (0 to 35), and return TRUE.
5429 * If a legal item is selected from the floor, we save it in "cp" as
5430 * a negative (-1 to -511), and return TRUE.
5432 * If no item is available, we do nothing to "cp", and we display a
5433 * warning message, using "str" if available, and return FALSE.
5435 * If no item is selected, we do nothing to "cp", and return FALSE.
5437 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
5438 * to allow the user to enter a command while viewing those screens, and
5439 * also to induce "auto-enter" of stores, and other such stuff.
5441 * Global "p_ptr->command_see" may be set before calling this function to start
5442 * out in "browse" mode. It is cleared before this function returns.
5444 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
5445 * If it is TRUE then we are viewing inventory, else equipment.
5447 * We always erase the prompt when we are done, leaving a blank line,
5448 * or a warning message, if appropriate, if no items are available.
5450 bool get_item(int *cp, cptr pmt, cptr str, int mode)
5452 s16b this_o_idx, next_o_idx = 0;
5456 int j, k, i1, i2, e1, e2;
5466 bool allow_floor = FALSE;
5468 bool toggle = FALSE;
5474 extern bool select_the_force;
5476 int menu_line = (use_menu ? 1 : 0);
5480 #ifdef ALLOW_EASY_FLOOR /* TNB */
5482 if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
5484 #endif /* ALLOW_EASY_FLOOR -- TNB */
5488 /* Get the item index */
5489 if (repeat_pull(cp))
5492 if (*cp == INVEN_FORCE)
5494 item_tester_tval = 0;
5495 item_tester_hook = NULL;
5496 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5508 /* Acquire object */
5511 /* Validate the item */
5512 if (item_tester_okay(o_ptr))
5514 /* Forget the item_tester_tval restriction */
5515 item_tester_tval = 0;
5517 /* Forget the item_tester_hook restriction */
5518 item_tester_hook = NULL;
5520 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5527 /* Verify the item */
5528 else if (get_item_okay(*cp))
5530 /* Forget the item_tester_tval restriction */
5531 item_tester_tval = 0;
5533 /* Forget the item_tester_hook restriction */
5534 item_tester_hook = NULL;
5536 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5543 #endif /* ALLOW_REPEAT */
5546 if (mode & (USE_EQUIP)) equip = TRUE;
5547 if (mode & (USE_INVEN)) inven = TRUE;
5548 if (mode & (USE_FLOOR)) floor = TRUE;
5551 /* Paranoia XXX XXX XXX */
5558 /* No item selected */
5562 /* Full inventory */
5564 i2 = INVEN_PACK - 1;
5566 /* Forbid inventory */
5567 if (!inven) i2 = -1;
5570 for (j = 0; j < INVEN_PACK; j++)
5571 if (item_tester_okay(&inventory[j])) max_inven++;
5574 /* Restrict inventory indexes */
5575 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5576 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5579 /* Full equipment */
5581 e2 = INVEN_TOTAL - 1;
5583 /* Forbid equipment */
5584 if (!equip) e2 = -1;
5587 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5588 if (item_tester_okay(&inventory[j])) max_equip++;
5589 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5592 /* Restrict equipment indexes */
5593 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5594 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5598 /* Restrict floor usage */
5601 /* Scan all objects in the grid */
5602 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5606 /* Acquire object */
5607 o_ptr = &o_list[this_o_idx];
5609 /* Acquire next object */
5610 next_o_idx = o_ptr->next_o_idx;
5612 /* Accept the item on the floor if legal */
5613 if (item_tester_okay(o_ptr)) allow_floor = TRUE;
5617 /* Require at least one legal choice */
5618 if (!allow_floor && (i1 > i2) && (e1 > e2))
5620 /* Cancel p_ptr->command_see */
5621 command_see = FALSE;
5629 if (select_the_force) {
5635 /* Analyze choices */
5638 /* Hack -- Start on equipment if requested */
5639 if (command_see && command_wrk && equip)
5644 /* Use inventory if allowed */
5647 command_wrk = FALSE;
5650 /* Use equipment if allowed */
5656 /* Use inventory for floor */
5659 command_wrk = FALSE;
5665 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5667 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5669 /* Hack -- start out in "display" mode */
5677 /* Repeat until done */
5680 int get_item_label = 0;
5687 for (j = 0; j < 8; j++)
5690 if (!angband_term[j]) continue;
5692 /* Count windows displaying inven */
5693 if (window_flag[j] & (PW_INVEN)) ni++;
5695 /* Count windows displaying equip */
5696 if (window_flag[j] & (PW_EQUIP)) ne++;
5699 /* Toggle if needed */
5700 if ((command_wrk && ni && !ne) ||
5701 (!command_wrk && !ni && ne))
5704 toggle_inven_equip();
5711 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5713 /* Redraw windows */
5717 /* Inventory screen */
5720 /* Redraw if needed */
5721 if (command_see) get_item_label = show_inven(menu_line);
5724 /* Equipment screen */
5727 /* Redraw if needed */
5728 if (command_see) get_item_label = show_equip(menu_line);
5731 /* Viewing inventory */
5734 /* Begin the prompt */
5736 sprintf(out_val, "»ý¤Áʪ:");
5738 sprintf(out_val, "Inven:");
5742 /* Some legal items */
5743 if ((i1 <= i2) && !use_menu)
5745 /* Build the prompt */
5747 sprintf(tmp_val, "%c-%c,'(',')',",
5749 sprintf(tmp_val, " %c-%c,'(',')',",
5752 index_to_label(i1), index_to_label(i2));
5755 strcat(out_val, tmp_val);
5758 /* Indicate ability to "view" */
5760 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5762 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5768 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
5769 else if (select_the_force)
5770 strcat(out_val, " 'w'Îýµ¤½Ñ,");
5772 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
5773 else if (select_the_force)
5774 strcat(out_val, " w for the Force,");
5779 /* Viewing equipment */
5782 /* Begin the prompt */
5784 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5786 sprintf(out_val, "Equip:");
5790 /* Some legal items */
5791 if ((e1 <= e2) && !use_menu)
5793 /* Build the prompt */
5795 sprintf(tmp_val, "%c-%c,'(',')',",
5797 sprintf(tmp_val, " %c-%c,'(',')',",
5800 index_to_label(e1), index_to_label(e2));
5803 strcat(out_val, tmp_val);
5806 /* Indicate ability to "view" */
5808 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5810 if (!command_see) strcat(out_val, " * to see,");
5816 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
5818 if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
5823 /* Indicate legality of the "floor" item */
5825 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
5827 if (allow_floor) strcat(out_val, " - for floor,");
5831 /* Finish the prompt */
5832 strcat(out_val, " ESC");
5834 /* Build the prompt */
5835 sprintf(tmp_val, "(%s) %s", out_val, pmt);
5837 /* Show the prompt */
5846 int max_line = (command_wrk ? max_equip : max_inven);
5862 menu_line += (max_line - 1);
5881 /* Verify legality */
5882 if (!inven || !equip)
5888 /* Hack -- Fix screen */
5898 /* Switch inven/equip */
5899 command_wrk = !command_wrk;
5900 max_line = (command_wrk ? max_equip : max_inven);
5901 if (menu_line > max_line) menu_line = max_line;
5903 /* Need to redraw */
5912 if (command_wrk == USE_FLOOR)
5915 (*cp) = -get_item_label;
5919 /* Validate the item */
5920 if (!get_item_okay(get_item_label))
5926 /* Allow player to "refuse" certain actions */
5927 if (!get_item_allow(get_item_label))
5933 /* Accept that choice */
5934 (*cp) = get_item_label;
5943 if (select_the_force) {
5951 if (menu_line > max_line) menu_line -= max_line;
5972 command_see = FALSE;
5992 /* Verify legality */
5993 if (!inven || !equip)
5999 /* Hack -- Fix screen */
6009 /* Switch inven/equip */
6010 command_wrk = !command_wrk;
6012 /* Need to redraw */
6018 /* Use floor item */
6021 /* Scan all objects in the grid */
6022 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
6026 /* Acquire object */
6027 o_ptr = &o_list[this_o_idx];
6029 /* Acquire next object */
6030 next_o_idx = o_ptr->next_o_idx;
6032 /* Validate the item */
6033 if (!item_tester_okay(o_ptr)) continue;
6038 /* Verify the item (if required) */
6040 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
6042 if (other_query_flag && !verify("Try", k)) continue;
6046 /* Allow player to "refuse" certain actions */
6047 if (!get_item_allow(k)) continue;
6049 /* Accept that choice */
6066 case '1': case '2': case '3':
6067 case '4': case '5': case '6':
6068 case '7': case '8': case '9':
6070 /* Look up the tag */
6071 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
6077 /* Hack -- Validate the item */
6078 if ((k < INVEN_RARM) ? !inven : !equip)
6084 /* Validate the item */
6085 if (!get_item_okay(k))
6091 /* Allow player to "refuse" certain actions */
6092 if (!get_item_allow(k))
6098 /* Accept that choice */
6109 /* Choose "default" inventory item */
6112 k = ((i1 == i2) ? i1 : -1);
6115 /* Choose "default" equipment item */
6118 k = ((e1 == e2) ? e1 : -1);
6121 /* Validate the item */
6122 if (!get_item_okay(k))
6128 /* Allow player to "refuse" certain actions */
6129 if (!get_item_allow(k))
6135 /* Accept that choice */
6145 if (select_the_force) {
6158 bool not_found = FALSE;
6160 /* Look up the alphabetical tag */
6161 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
6166 /* Hack -- Validate the item */
6167 else if ((k < INVEN_RARM) ? !inven : !equip)
6172 /* Validate the item */
6173 else if (!get_item_okay(k))
6180 /* Accept that choice */
6187 /* Extract "query" setting */
6188 ver = isupper(which);
6189 which = tolower(which);
6191 /* Convert letter to inventory index */
6194 if (which == '(') k = i1;
6195 else if (which == ')') k = i2;
6196 else k = label_to_inven(which);
6199 /* Convert letter to equipment index */
6202 if (which == '(') k = e1;
6203 else if (which == ')') k = e2;
6204 else k = label_to_equip(which);
6207 /* Validate the item */
6208 if (!get_item_okay(k))
6214 /* Verify the item */
6216 if (ver && !verify("ËÜÅö¤Ë", k))
6218 if (ver && !verify("Try", k))
6226 /* Allow player to "refuse" certain actions */
6227 if (!get_item_allow(k))
6233 /* Accept that choice */
6244 /* Fix the screen if necessary */
6250 /* Hack -- Cancel "display" */
6251 command_see = FALSE;
6255 /* Forget the item_tester_tval restriction */
6256 item_tester_tval = 0;
6258 item_tester_no_ryoute = FALSE;
6260 /* Forget the item_tester_hook restriction */
6261 item_tester_hook = NULL;
6264 /* Clean up 'show choices' */
6265 /* Toggle again if needed */
6266 if (toggle) toggle_inven_equip();
6269 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6275 /* Clear the prompt line */
6278 /* Warning if needed */
6279 if (oops && str) msg_print(str);
6285 #endif /* ALLOW_REPEAT */
6287 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6295 #ifdef ALLOW_EASY_FLOOR
6300 * Return a list of o_list[] indexes of items at the given cave
6301 * location. Valid flags are:
6303 * mode & 0x01 -- Item tester
6304 * mode & 0x02 -- Marked items only
6305 * mode & 0x04 -- Stop after first
6307 int scan_floor(int *items, int y, int x, int mode)
6309 int this_o_idx, next_o_idx;
6314 if (!in_bounds(y, x)) return 0;
6316 /* Scan all objects in the grid */
6317 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
6321 /* Acquire object */
6322 o_ptr = &o_list[this_o_idx];
6324 /* Acquire next object */
6325 next_o_idx = o_ptr->next_o_idx;
6328 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
6331 if ((mode & 0x02) && !o_ptr->marked) continue;
6333 /* Accept this item */
6334 /* XXX Hack -- Enforce limit */
6336 items[num] = this_o_idx;
6341 if (mode & 0x04) break;
6350 * Display a list of the items on the floor at the given location.
6352 int show_floor(int target_item, int y, int x, int *min_width)
6359 char o_name[MAX_NLEN];
6365 char out_desc[23][MAX_NLEN];
6366 int target_item_label = 0;
6368 int floor_list[23], floor_num;
6370 char floor_label[52 + 1];
6373 Term_get_size(&wid, &hgt);
6375 /* Default length */
6376 len = MAX((*min_width), 20);
6379 /* Scan for objects in the grid, using item_tester_okay() */
6380 floor_num = scan_floor(floor_list, y, x, 0x01);
6382 /* Display the floor objects */
6383 for (k = 0, i = 0; i < floor_num && i < 23; i++)
6385 o_ptr = &o_list[floor_list[i]];
6387 /* Describe the object */
6388 object_desc(o_name, o_ptr, 0);
6390 /* Save the index */
6393 /* Acquire inventory color */
6394 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
6396 /* Save the object description */
6397 strcpy(out_desc[k], o_name);
6399 /* Find the predicted "line length" */
6400 l = strlen(out_desc[k]) + 5;
6402 /* Be sure to account for the weight */
6403 if (show_weights) l += 9;
6405 /* Maintain the maximum length */
6406 if (l > len) len = l;
6408 /* Advance to next "line" */
6415 /* Find the column to start in */
6416 col = (len > wid - 4) ? 0 : (wid - len - 1);
6418 prepare_label_string_floor(floor_label, floor_list, floor_num);
6420 /* Output each entry */
6421 for (j = 0; j < k; j++)
6424 i = floor_list[out_index[j]];
6429 /* Clear the line */
6430 prt("", j + 1, col ? col - 2 : col);
6432 if (use_menu && target_item)
6434 if (j == (target_item-1))
6437 strcpy(tmp_val, "¡Õ");
6439 strcpy(tmp_val, "> ");
6441 target_item_label = i;
6443 else strcpy(tmp_val, " ");
6447 /* Prepare an index --(-- */
6448 sprintf(tmp_val, "%c)", floor_label[j]);
6451 /* Clear the line with the (possibly indented) index */
6452 put_str(tmp_val, j + 1, col);
6454 /* Display the entry itself */
6455 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
6457 /* Display the weight if needed */
6460 int wgt = o_ptr->weight * o_ptr->number;
6462 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
6464 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
6467 prt(tmp_val, j + 1, wid - 9);
6471 /* Make a "shadow" below the list (only if needed) */
6472 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
6474 return target_item_label;
6478 * This version of get_item() is called by get_item() when
6479 * the easy_floor is on.
6481 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
6483 char n1 = ' ', n2 = ' ', which = ' ';
6485 int j, k, i1, i2, e1, e2;
6495 bool allow_equip = FALSE;
6496 bool allow_inven = FALSE;
6497 bool allow_floor = FALSE;
6499 bool toggle = FALSE;
6504 int floor_num, floor_list[23], floor_top = 0;
6507 extern bool select_the_force;
6509 int menu_line = (use_menu ? 1 : 0);
6515 /* Get the item index */
6516 if (repeat_pull(cp))
6519 if (*cp == INVEN_FORCE)
6521 item_tester_tval = 0;
6522 item_tester_hook = NULL;
6523 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6535 /* Acquire object */
6538 /* Validate the item */
6539 if (item_tester_okay(o_ptr))
6541 /* Forget the item_tester_tval restriction */
6542 item_tester_tval = 0;
6544 /* Forget the item_tester_hook restriction */
6545 item_tester_hook = NULL;
6547 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6554 /* Verify the item */
6555 else if (get_item_okay(*cp))
6557 /* Forget the item_tester_tval restriction */
6558 item_tester_tval = 0;
6560 /* Forget the item_tester_hook restriction */
6561 item_tester_hook = NULL;
6563 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6570 #endif /* ALLOW_REPEAT */
6573 if (mode & (USE_EQUIP)) equip = TRUE;
6574 if (mode & (USE_INVEN)) inven = TRUE;
6575 if (mode & (USE_FLOOR)) floor = TRUE;
6578 /* Paranoia XXX XXX XXX */
6585 /* No item selected */
6589 /* Full inventory */
6591 i2 = INVEN_PACK - 1;
6593 /* Forbid inventory */
6594 if (!inven) i2 = -1;
6597 for (j = 0; j < INVEN_PACK; j++)
6598 if (item_tester_okay(&inventory[j])) max_inven++;
6601 /* Restrict inventory indexes */
6602 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
6603 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
6606 /* Full equipment */
6608 e2 = INVEN_TOTAL - 1;
6610 /* Forbid equipment */
6611 if (!equip) e2 = -1;
6614 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
6615 if (item_tester_okay(&inventory[j])) max_equip++;
6616 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
6619 /* Restrict equipment indexes */
6620 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
6621 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
6624 /* Count "okay" floor items */
6627 /* Restrict floor usage */
6630 /* Scan all objects in the grid */
6631 floor_num = scan_floor(floor_list, py, px, 0x01);
6634 /* Accept inventory */
6635 if (i1 <= i2) allow_inven = TRUE;
6637 /* Accept equipment */
6638 if (e1 <= e2) allow_equip = TRUE;
6641 if (floor_num) allow_floor = TRUE;
6643 /* Require at least one legal choice */
6644 if (!allow_inven && !allow_equip && !allow_floor)
6646 /* Cancel p_ptr->command_see */
6647 command_see = FALSE;
6655 if (select_the_force) {
6661 /* Analyze choices */
6664 /* Hack -- Start on equipment if requested */
6665 if (command_see && (command_wrk == (USE_EQUIP))
6668 command_wrk = (USE_EQUIP);
6671 /* Use inventory if allowed */
6672 else if (allow_inven)
6674 command_wrk = (USE_INVEN);
6677 /* Use equipment if allowed */
6678 else if (allow_equip)
6680 command_wrk = (USE_EQUIP);
6683 /* Use floor if allowed */
6684 else if (allow_floor)
6686 command_wrk = (USE_FLOOR);
6691 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
6693 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
6695 /* Hack -- start out in "display" mode */
6702 /* Repeat until done */
6705 int get_item_label = 0;
6712 for (j = 0; j < 8; j++)
6715 if (!angband_term[j]) continue;
6717 /* Count windows displaying inven */
6718 if (window_flag[j] & (PW_INVEN)) ni++;
6720 /* Count windows displaying equip */
6721 if (window_flag[j] & (PW_EQUIP)) ne++;
6724 /* Toggle if needed */
6725 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
6726 (command_wrk == (USE_INVEN) && !ni && ne))
6729 toggle_inven_equip();
6736 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6738 /* Redraw windows */
6741 /* Inventory screen */
6742 if (command_wrk == (USE_INVEN))
6744 /* Extract the legal requests */
6748 /* Redraw if needed */
6749 if (command_see) get_item_label = show_inven(menu_line);
6752 /* Equipment screen */
6753 else if (command_wrk == (USE_EQUIP))
6755 /* Extract the legal requests */
6756 n1 = I2A(e1 - INVEN_RARM);
6757 n2 = I2A(e2 - INVEN_RARM);
6759 /* Redraw if needed */
6760 if (command_see) get_item_label = show_equip(menu_line);
6764 else if (command_wrk == (USE_FLOOR))
6767 k = MIN(floor_top + 23, floor_num) - 1;
6769 /* Extract the legal requests */
6770 n1 = I2A(j - floor_top);
6771 n2 = I2A(k - floor_top);
6773 /* Redraw if needed */
6774 if (command_see) get_item_label = show_floor(menu_line, py, px, &min_width);
6777 /* Viewing inventory */
6778 if (command_wrk == (USE_INVEN))
6780 /* Begin the prompt */
6782 sprintf(out_val, "»ý¤Áʪ:");
6784 sprintf(out_val, "Inven:");
6789 /* Build the prompt */
6791 sprintf(tmp_val, "%c-%c,'(',')',",
6793 sprintf(tmp_val, " %c-%c,'(',')',",
6796 index_to_label(i1), index_to_label(i2));
6799 strcat(out_val, tmp_val);
6802 /* Indicate ability to "view" */
6804 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6806 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6815 strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
6816 else if (allow_floor)
6817 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
6819 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6821 else if (select_the_force)
6822 strcat(out_val, " 'w'Îýµ¤½Ñ,");
6827 strcat(out_val, " / for Equip,");
6828 else if (allow_floor)
6829 strcat(out_val, " 6 for Equip,");
6831 strcat(out_val, " 4 or 6 for Equip,");
6833 else if (select_the_force)
6834 strcat(out_val, " w for the Force,");
6842 strcat(out_val, " '-'¾²¾å,");
6843 else if (allow_equip)
6844 strcat(out_val, " '4' ¾²¾å,");
6846 strcat(out_val, " '4'or'6' ¾²¾å,");
6849 strcat(out_val, " - for floor,");
6850 else if (allow_equip)
6851 strcat(out_val, " 4 for floor,");
6853 strcat(out_val, " 4 or 6 for floor,");
6859 /* Viewing equipment */
6860 else if (command_wrk == (USE_EQUIP))
6862 /* Begin the prompt */
6864 sprintf(out_val, "ÁõÈ÷ÉÊ:");
6866 sprintf(out_val, "Equip:");
6872 /* Build the prompt */
6874 sprintf(tmp_val, "%c-%c,'(',')',",
6876 sprintf(tmp_val, " %c-%c,'(',')',",
6879 index_to_label(e1), index_to_label(e2));
6882 strcat(out_val, tmp_val);
6885 /* Indicate ability to "view" */
6887 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6889 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6898 strcat(out_val, " '/' »ý¤Áʪ,");
6899 else if (allow_floor)
6900 strcat(out_val, " '4' »ý¤Áʪ,");
6902 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6906 strcat(out_val, " / for Inven,");
6907 else if (allow_floor)
6908 strcat(out_val, " 4 for Inven,");
6910 strcat(out_val, " 4 or 6 for Inven,");
6919 strcat(out_val, " '-'¾²¾å,");
6920 else if (allow_inven)
6921 strcat(out_val, " '6' ¾²¾å,");
6923 strcat(out_val, " '4'or'6' ¾²¾å,");
6926 strcat(out_val, " - for floor,");
6927 else if (allow_inven)
6928 strcat(out_val, " 6 for floor,");
6930 strcat(out_val, " 4 or 6 for floor,");
6936 else if (command_wrk == (USE_FLOOR))
6938 /* Begin the prompt */
6940 sprintf(out_val, "¾²¾å:");
6942 sprintf(out_val, "Floor:");
6948 /* Build the prompt */
6950 sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
6952 sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
6957 strcat(out_val, tmp_val);
6960 /* Indicate ability to "view" */
6962 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6964 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6970 if (allow_inven && allow_equip)
6973 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
6975 strcat(out_val, " 4 for Equip, 6 for Inven,");
6979 else if (allow_inven)
6982 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6984 strcat(out_val, " 4 or 6 for Inven,");
6988 else if (allow_equip)
6991 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6993 strcat(out_val, " 4 or 6 for Equip,");
6999 else if (allow_inven)
7002 strcat(out_val, " '/' »ý¤Áʪ,");
7004 strcat(out_val, " / for Inven,");
7008 else if (allow_equip)
7011 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
7013 strcat(out_val, " / for Equip,");
7019 if (command_see && !use_menu)
7022 strcat(out_val, " Enter ¼¡,");
7024 strcat(out_val, " Enter for scroll down,");
7029 /* Finish the prompt */
7030 strcat(out_val, " ESC");
7032 /* Build the prompt */
7033 sprintf(tmp_val, "(%s) %s", out_val, pmt);
7035 /* Show the prompt */
7044 if (command_wrk == USE_INVEN) max_line = max_inven;
7045 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7046 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7062 menu_line += (max_line - 1);
7078 /* Verify legality */
7079 if (command_wrk == (USE_INVEN))
7081 if (allow_floor) command_wrk = USE_FLOOR;
7082 else if (allow_equip) command_wrk = USE_EQUIP;
7089 else if (command_wrk == (USE_EQUIP))
7091 if (allow_inven) command_wrk = USE_INVEN;
7092 else if (allow_floor) command_wrk = USE_FLOOR;
7099 else if (command_wrk == (USE_FLOOR))
7101 if (allow_equip) command_wrk = USE_EQUIP;
7102 else if (allow_inven) command_wrk = USE_INVEN;
7115 /* Hack -- Fix screen */
7125 /* Switch inven/equip */
7126 if (command_wrk == USE_INVEN) max_line = max_inven;
7127 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7128 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7129 if (menu_line > max_line) menu_line = max_line;
7131 /* Need to redraw */
7139 /* Verify legality */
7140 if (command_wrk == (USE_INVEN))
7142 if (allow_equip) command_wrk = USE_EQUIP;
7143 else if (allow_floor) command_wrk = USE_FLOOR;
7150 else if (command_wrk == (USE_EQUIP))
7152 if (allow_floor) command_wrk = USE_FLOOR;
7153 else if (allow_inven) command_wrk = USE_INVEN;
7160 else if (command_wrk == (USE_FLOOR))
7162 if (allow_inven) command_wrk = USE_INVEN;
7163 else if (allow_equip) command_wrk = USE_EQUIP;
7176 /* Hack -- Fix screen */
7186 /* Switch inven/equip */
7187 if (command_wrk == USE_INVEN) max_line = max_inven;
7188 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7189 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7190 if (menu_line > max_line) menu_line = max_line;
7192 /* Need to redraw */
7201 if (command_wrk == USE_FLOOR)
7204 (*cp) = -get_item_label;
7208 /* Validate the item */
7209 if (!get_item_okay(get_item_label))
7215 /* Allow player to "refuse" certain actions */
7216 if (!get_item_allow(get_item_label))
7222 /* Accept that choice */
7223 (*cp) = get_item_label;
7232 if (select_the_force) {
7240 if (menu_line > max_line) menu_line -= max_line;
7261 command_see = FALSE;
7284 cave_type *c_ptr = &cave[py][px];
7286 if (command_wrk != (USE_FLOOR)) break;
7288 /* Get the object being moved. */
7289 o_idx = c_ptr->o_idx;
7291 /* Only rotate a pile of two or more objects. */
7292 if (!(o_idx && o_list[o_idx].next_o_idx)) break;
7294 /* Remove the first object from the list. */
7295 excise_object_idx(o_idx);
7297 /* Find end of the list. */
7299 while (o_list[i].next_o_idx)
7300 i = o_list[i].next_o_idx;
7302 /* Add after the last object. */
7303 o_list[i].next_o_idx = o_idx;
7305 /* Re-scan floor list */
7306 floor_num = scan_floor(floor_list, py, px, 0x01);
7308 /* Hack -- Fix screen */
7323 if (command_wrk == (USE_INVEN))
7330 command_wrk = (USE_EQUIP);
7332 else if (command_wrk == (USE_EQUIP))
7339 command_wrk = (USE_INVEN);
7341 else if (command_wrk == (USE_FLOOR))
7345 command_wrk = (USE_INVEN);
7347 else if (allow_equip)
7349 command_wrk = (USE_EQUIP);
7358 /* Hack -- Fix screen */
7368 /* Need to redraw */
7381 * If we are already examining the floor, and there
7382 * is only one item, we will always select it.
7383 * If we aren't examining the floor and there is only
7384 * one item, we will select it if floor_query_flag
7389 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
7392 k = 0 - floor_list[0];
7394 /* Allow player to "refuse" certain actions */
7395 if (!get_item_allow(k))
7401 /* Accept that choice */
7410 /* Hack -- Fix screen */
7420 command_wrk = (USE_FLOOR);
7426 case '1': case '2': case '3':
7427 case '4': case '5': case '6':
7428 case '7': case '8': case '9':
7430 if (command_wrk != USE_FLOOR)
7432 /* Look up the tag */
7433 if (!get_tag(&k, which, command_wrk))
7439 /* Hack -- Validate the item */
7440 if ((k < INVEN_RARM) ? !inven : !equip)
7446 /* Validate the item */
7447 if (!get_item_okay(k))
7455 /* Look up the alphabetical tag */
7456 if (get_tag_floor(&k, which, floor_list, floor_num))
7459 k = 0 - floor_list[k];
7468 /* Allow player to "refuse" certain actions */
7469 if (!get_item_allow(k))
7475 /* Accept that choice */
7486 /* Choose "default" inventory item */
7487 if (command_wrk == (USE_INVEN))
7489 k = ((i1 == i2) ? i1 : -1);
7492 /* Choose "default" equipment item */
7493 else if (command_wrk == (USE_EQUIP))
7495 k = ((e1 == e2) ? e1 : -1);
7498 /* Choose "default" floor item */
7499 else if (command_wrk == (USE_FLOOR))
7504 k = 0 - floor_list[0];
7506 /* Allow player to "refuse" certain actions */
7507 if (!get_item_allow(k))
7513 /* Accept that choice */
7521 /* Validate the item */
7522 if (!get_item_okay(k))
7528 /* Allow player to "refuse" certain actions */
7529 if (!get_item_allow(k))
7535 /* Accept that choice */
7545 if (select_the_force) {
7559 if (command_wrk != USE_FLOOR)
7561 bool not_found = FALSE;
7563 /* Look up the alphabetical tag */
7564 if (!get_tag(&k, which, command_wrk))
7569 /* Hack -- Validate the item */
7570 else if ((k < INVEN_RARM) ? !inven : !equip)
7575 /* Validate the item */
7576 else if (!get_item_okay(k))
7583 /* Accept that choice */
7592 /* Look up the alphabetical tag */
7593 if (get_tag_floor(&k, which, floor_list, floor_num))
7596 k = 0 - floor_list[k];
7598 /* Accept that choice */
7606 /* Extract "query" setting */
7607 ver = isupper(which);
7608 which = tolower(which);
7610 /* Convert letter to inventory index */
7611 if (command_wrk == (USE_INVEN))
7613 if (which == '(') k = i1;
7614 else if (which == ')') k = i2;
7615 else k = label_to_inven(which);
7618 /* Convert letter to equipment index */
7619 else if (command_wrk == (USE_EQUIP))
7621 if (which == '(') k = e1;
7622 else if (which == ')') k = e2;
7623 else k = label_to_equip(which);
7626 /* Convert letter to floor index */
7627 else if (command_wrk == USE_FLOOR)
7629 if (which == '(') k = 0;
7630 else if (which == ')') k = floor_num - 1;
7631 else k = islower(which) ? A2I(which) : -1;
7632 if (k < 0 || k >= floor_num || k >= 23)
7639 k = 0 - floor_list[k];
7642 /* Validate the item */
7643 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
7649 /* Verify the item */
7651 if (ver && !verify("ËÜÅö¤Ë", k))
7653 if (ver && !verify("Try", k))
7661 /* Allow player to "refuse" certain actions */
7662 if (!get_item_allow(k))
7668 /* Accept that choice */
7678 /* Fix the screen if necessary */
7684 /* Hack -- Cancel "display" */
7685 command_see = FALSE;
7689 /* Forget the item_tester_tval restriction */
7690 item_tester_tval = 0;
7692 /* Forget the item_tester_hook restriction */
7693 item_tester_hook = NULL;
7696 /* Clean up 'show choices' */
7697 /* Toggle again if needed */
7698 if (toggle) toggle_inven_equip();
7701 p_ptr->window |= (PW_INVEN | PW_EQUIP);
7707 /* Clear the prompt line */
7710 /* Warning if needed */
7711 if (oops && str) msg_print(str);
7717 #endif /* ALLOW_REPEAT */
7719 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
7727 static bool py_pickup_floor_aux(void)
7735 /* Restrict the choices */
7736 item_tester_hook = inven_carry_okay;
7740 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
7741 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
7743 q = "Get which item? ";
7744 s = "You no longer have any room for the objects on the floor.";
7747 if (get_item(&item, q, s, (USE_FLOOR)))
7749 this_o_idx = 0 - item;
7756 /* Pick up the object */
7757 py_pickup_aux(this_o_idx);
7764 * Make the player carry everything in a grid
7766 * If "pickup" is FALSE then only gold will be picked up
7768 * This is called by py_pickup() when easy_floor is TRUE.
7770 void py_pickup_floor(int pickup)
7772 s16b this_o_idx, next_o_idx = 0;
7774 char o_name[MAX_NLEN];
7777 int floor_num = 0, floor_list[23], floor_o_idx = 0;
7781 /* Scan the pile of objects */
7782 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
7786 /* Access the object */
7787 o_ptr = &o_list[this_o_idx];
7789 /* Describe the object */
7790 object_desc(o_name, o_ptr, 0);
7792 /* Access the next object */
7793 next_o_idx = o_ptr->next_o_idx;
7795 /* Hack -- disturb */
7799 if (o_ptr->tval == TV_GOLD)
7803 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
7804 (long)o_ptr->pval, o_name);
7806 msg_format("You have found %ld gold pieces worth of %s.",
7807 (long) o_ptr->pval, o_name);
7811 /* Collect the gold */
7812 p_ptr->au += o_ptr->pval;
7815 p_ptr->redraw |= (PR_GOLD);
7818 p_ptr->window |= (PW_PLAYER);
7820 /* Delete the gold */
7821 delete_object_idx(this_o_idx);
7823 /* Check the next object */
7826 else if (o_ptr->marked & OM_NOMSG)
7828 /* If 0 or 1 non-NOMSG items are in the pile, the NOMSG ones are
7829 * ignored. Otherwise, they are included in the prompt. */
7830 o_ptr->marked &= ~(OM_NOMSG);
7834 /* Count non-gold objects that can be picked up. */
7835 if (inven_carry_okay(o_ptr))
7840 /* Remember this object index */
7842 floor_list[floor_num] = this_o_idx;
7844 /* Count non-gold objects */
7847 /* Remember this index */
7848 floor_o_idx = this_o_idx;
7851 /* There are no non-gold objects */
7855 /* Mention the number of objects */
7861 /* Access the object */
7862 o_ptr = &o_list[floor_o_idx];
7864 #ifdef ALLOW_EASY_SENSE
7866 /* Option: Make object sensing easy */
7869 /* Sense the object */
7870 (void) sense_object(o_ptr);
7873 #endif /* ALLOW_EASY_SENSE */
7875 /* Describe the object */
7876 object_desc(o_name, o_ptr, 0);
7880 msg_format("%s¤¬¤¢¤ë¡£", o_name);
7882 msg_format("You see %s.", o_name);
7887 /* Multiple objects */
7892 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
7894 msg_format("You see a pile of %d items.", floor_num);
7903 /* The player has no room for anything on the floor. */
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, 0);
7928 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7930 msg_format("You have no room for %s.", o_name);
7935 /* Multiple objects */
7940 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7942 msg_print("You have no room for any of the objects on the floor.");
7954 /* Hack -- query every object */
7955 if (carry_query_flag)
7957 char out_val[MAX_NLEN+20];
7959 /* Access the object */
7960 o_ptr = &o_list[floor_o_idx];
7962 #ifdef ALLOW_EASY_SENSE
7964 /* Option: Make object sensing easy */
7967 /* Sense the object */
7968 (void) sense_object(o_ptr);
7971 #endif /* ALLOW_EASY_SENSE */
7973 /* Describe the object */
7974 object_desc(o_name, o_ptr, 0);
7976 /* Build a prompt */
7978 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7980 (void) sprintf(out_val, "Pick up %s? ", o_name);
7984 /* Ask the user to confirm */
7985 if (!get_check(out_val))
7992 /* Access the object */
7993 o_ptr = &o_list[floor_o_idx];
7995 #ifdef ALLOW_EASY_SENSE
7997 /* Option: Make object sensing easy */
8000 /* Sense the object */
8001 (void) sense_object(o_ptr);
8004 #endif /* ALLOW_EASY_SENSE */
8006 /* Pick up the object */
8007 py_pickup_aux(floor_o_idx);
8010 /* Allow the user to choose an object */
8013 while (can_pickup--)
8015 if (!py_pickup_floor_aux()) break;
8020 #endif /* ALLOW_EASY_FLOOR */