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 */
15 #if defined(MACINTOSH) || defined(MACH_O_CARBON)
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];
115 if (object_is_fixed_artifact(o_ptr))
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];
124 if (object_is_ego(o_ptr))
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 (object_is_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_is_aware(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_is_known(o_ptr)) return;
232 /* Ego-item (known basic flags) */
233 if (object_is_ego(o_ptr))
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 (object_is_artifact(o_ptr)) spoil = TRUE;
259 #endif /* SPOIL_ARTIFACTS */
261 #ifdef SPOIL_EGO_ITEMS
262 /* Full knowledge for some ego-items */
263 if (object_is_ego(o_ptr)) spoil = TRUE;
264 #endif /* SPOIL_EGO_ITEMS */
266 /* Need full knowledge or spoilers */
267 if (spoil || (o_ptr->ident & IDENT_MENTAL))
270 if (object_is_fixed_artifact(o_ptr))
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 (object_is_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 (!object_is_fixed_artifact(o_ptr) &&
361 !object_is_ego(o_ptr) &&
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 "º®ÆÙ¾¤Íè : 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 "¥Æ¥ì¥Ñ¥·¡¼ (´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
822 return "telepathy (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 (dur 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 "½ý¤Î¼£Ìþ(4d8) : 3+d3 ¥¿¡¼¥óËè";
1234 return "cure wounds (4d8) 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 (object_is_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)
1950 if (object_is_ego(o_ptr))
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)
2121 if (object_is_ego(o_ptr))
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, u32b mode)
2354 u32b flgs[TR_FLAG_SIZE];
2357 char o_name[MAX_NLEN];
2360 int trivial_info = 0;
2362 /* Extract the flags */
2363 object_flags(o_ptr, flgs);
2365 /* Extract the description */
2369 roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
2370 (k_text + k_info[o_ptr->k_idx].text),
2371 77 - 15, temp, sizeof(temp));
2372 for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
2373 { info[i] = &temp[j]; i++;}
2376 if (object_is_equipment(o_ptr))
2378 /* Descriptions of a basic equipment is just a flavor */
2382 /* Mega-Hack -- describe activation */
2383 if (have_flag(flgs, TR_ACTIVATE))
2386 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
2388 info[i++] = "It can be activated for...";
2391 info[i++] = item_activation(o_ptr);
2393 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
2395 info[i++] = "...if it is being worn.";
2400 /* Figurines, a hack */
2401 if (o_ptr->tval == TV_FIGURINE)
2404 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
2406 info[i++] = "It will transform into a pet when thrown.";
2411 /* Figurines, a hack */
2412 if (o_ptr->name1 == ART_STONEMASK)
2415 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
2417 info[i++] = "It makes you turn into a vampire permanently.";
2422 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
2425 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
2427 info[i++] = "It will attempt to kill a monster instantly.";
2432 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
2435 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
2437 info[i++] = "It causes you to strike yourself sometimes.";
2441 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
2443 info[i++] = "It always penetrates invulnerability barriers.";
2447 if (o_ptr->name2 == EGO_2WEAPON)
2450 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
2452 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
2457 if (have_flag(flgs, TR_EASY_SPELL))
2460 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
2462 info[i++] = "It affects your ability to cast spells.";
2466 if (o_ptr->name2 == EGO_AMU_FOOL)
2469 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
2471 info[i++] = "It interferes with casting spells.";
2475 if (o_ptr->name2 == EGO_RING_THROW)
2478 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2480 info[i++] = "It provides great strength when you throw an item.";
2484 if (o_ptr->name2 == EGO_AMU_NAIVETY)
2487 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
2489 info[i++] = "It decreases your magic resistance.";
2493 if (o_ptr->tval == TV_STATUE)
2495 monster_race *r_ptr = &r_info[o_ptr->pval];
2497 if (o_ptr->pval == MON_BULLGATES)
2499 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
2501 info[i++] = "It is shameful.";
2503 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
2505 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
2507 info[i++] = "It is fearful.";
2511 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
2513 info[i++] = "It is cheerful.";
2517 /* Hack -- describe lite's */
2518 if (o_ptr->tval == TV_LITE)
2520 if (o_ptr->name2 == EGO_LITE_DARKNESS)
2523 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
2525 info[i++] = "It provides no light.";
2528 if (o_ptr->sval == SV_LITE_FEANOR)
2531 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-3)¡£";
2533 info[i++] = "It decreases radius of light source by 3.";
2536 else if (o_ptr->sval == SV_LITE_LANTERN)
2539 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
2541 info[i++] = "It decreases radius of light source by 2.";
2547 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
2549 info[i++] = "It decreases radius of light source by 1.";
2553 else if (object_is_fixed_artifact(o_ptr))
2556 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2558 info[i++] = "It provides light (radius 3) forever.";
2562 else if (o_ptr->name2 == EGO_LITE_SHINE)
2564 if (o_ptr->sval == SV_LITE_FEANOR)
2567 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2569 info[i++] = "It provides light (radius 3) forever.";
2573 else if (o_ptr->sval == SV_LITE_LANTERN)
2576 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2578 info[i++] = "It provides light (radius 3) when fueled.";
2585 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2587 info[i++] = "It provides light (radius 2) when fueled.";
2594 if (o_ptr->sval == SV_LITE_FEANOR)
2597 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2599 info[i++] = "It provides light (radius 2) forever.";
2603 else if (o_ptr->sval == SV_LITE_LANTERN)
2606 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2608 info[i++] = "It provides light (radius 2) when fueled.";
2615 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
2617 info[i++] = "It provides light (radius 1) when fueled.";
2622 if (o_ptr->name2 == EGO_LITE_LONG)
2625 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
2627 info[i++] = "It provides light for much longer time.";
2633 /* And then describe it fully */
2635 if (have_flag(flgs, TR_RIDING))
2637 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
2639 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
2641 info[i++] = "It is made for use while riding.";
2646 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
2648 info[i++] = "It is suitable for use while riding.";
2650 /* This information is not important enough */
2654 if (have_flag(flgs, TR_STR))
2657 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2659 info[i++] = "It affects your strength.";
2663 if (have_flag(flgs, TR_INT))
2666 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2668 info[i++] = "It affects your intelligence.";
2672 if (have_flag(flgs, TR_WIS))
2675 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2677 info[i++] = "It affects your wisdom.";
2681 if (have_flag(flgs, TR_DEX))
2684 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2686 info[i++] = "It affects your dexterity.";
2690 if (have_flag(flgs, TR_CON))
2693 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2695 info[i++] = "It affects your constitution.";
2699 if (have_flag(flgs, TR_CHR))
2702 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2704 info[i++] = "It affects your charisma.";
2709 if (have_flag(flgs, TR_MAGIC_MASTERY))
2712 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2714 info[i++] = "It affects your ability to use magic devices.";
2718 if (have_flag(flgs, TR_STEALTH))
2721 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2723 info[i++] = "It affects your stealth.";
2727 if (have_flag(flgs, TR_SEARCH))
2730 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2732 info[i++] = "It affects your searching.";
2736 if (have_flag(flgs, TR_INFRA))
2739 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2741 info[i++] = "It affects your infravision.";
2745 if (have_flag(flgs, TR_TUNNEL))
2748 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2750 info[i++] = "It affects your ability to tunnel.";
2754 if (have_flag(flgs, TR_SPEED))
2757 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2759 info[i++] = "It affects your speed.";
2763 if (have_flag(flgs, TR_BLOWS))
2766 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2768 info[i++] = "It affects your attack speed.";
2773 if (have_flag(flgs, TR_BRAND_ACID))
2776 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
2778 info[i++] = "It does extra damage from acid.";
2782 if (have_flag(flgs, TR_BRAND_ELEC))
2785 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
2787 info[i++] = "It does extra damage from electricity.";
2791 if (have_flag(flgs, TR_BRAND_FIRE))
2794 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
2796 info[i++] = "It does extra damage from fire.";
2800 if (have_flag(flgs, TR_BRAND_COLD))
2803 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
2805 info[i++] = "It does extra damage from frost.";
2810 if (have_flag(flgs, TR_BRAND_POIS))
2813 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
2815 info[i++] = "It poisons your foes.";
2820 if (have_flag(flgs, TR_CHAOTIC))
2823 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
2825 info[i++] = "It produces chaotic effects.";
2830 if (have_flag(flgs, TR_VAMPIRIC))
2833 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
2835 info[i++] = "It drains life from your foes.";
2840 if (have_flag(flgs, TR_IMPACT))
2843 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
2845 info[i++] = "It can cause earthquakes.";
2850 if (have_flag(flgs, TR_VORPAL))
2853 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2855 info[i++] = "It is very sharp and can cut your foes.";
2860 if (have_flag(flgs, TR_KILL_DRAGON))
2863 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2865 info[i++] = "It is a great bane of dragons.";
2869 else if (have_flag(flgs, TR_SLAY_DRAGON))
2872 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2874 info[i++] = "It is especially deadly against dragons.";
2879 if (have_flag(flgs, TR_KILL_ORC))
2882 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2884 info[i++] = "It is a great bane of orcs.";
2888 if (have_flag(flgs, TR_SLAY_ORC))
2891 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2893 info[i++] = "It is especially deadly against orcs.";
2898 if (have_flag(flgs, TR_KILL_TROLL))
2901 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2903 info[i++] = "It is a great bane of trolls.";
2907 if (have_flag(flgs, TR_SLAY_TROLL))
2910 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2912 info[i++] = "It is especially deadly against trolls.";
2917 if (have_flag(flgs, TR_KILL_GIANT))
2920 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2922 info[i++] = "It is a great bane of giants.";
2925 else if (have_flag(flgs, TR_SLAY_GIANT))
2928 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2930 info[i++] = "It is especially deadly against giants.";
2935 if (have_flag(flgs, TR_KILL_DEMON))
2938 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2940 info[i++] = "It is a great bane of demons.";
2944 if (have_flag(flgs, TR_SLAY_DEMON))
2947 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2949 info[i++] = "It strikes at demons with holy wrath.";
2954 if (have_flag(flgs, TR_KILL_UNDEAD))
2957 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2959 info[i++] = "It is a great bane of undead.";
2963 if (have_flag(flgs, TR_SLAY_UNDEAD))
2966 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2968 info[i++] = "It strikes at undead with holy wrath.";
2973 if (have_flag(flgs, TR_KILL_EVIL))
2976 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2978 info[i++] = "It is a great bane of evil monsters.";
2982 if (have_flag(flgs, TR_SLAY_EVIL))
2985 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
2987 info[i++] = "It fights against evil with holy fury.";
2992 if (have_flag(flgs, TR_KILL_ANIMAL))
2995 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2997 info[i++] = "It is a great bane of natural creatures.";
3001 if (have_flag(flgs, TR_SLAY_ANIMAL))
3004 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
3006 info[i++] = "It is especially deadly against natural creatures.";
3011 if (have_flag(flgs, TR_KILL_HUMAN))
3014 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
3016 info[i++] = "It is a great bane of humans.";
3020 if (have_flag(flgs, TR_SLAY_HUMAN))
3023 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
3025 info[i++] = "It is especially deadly against humans.";
3030 if (have_flag(flgs, TR_FORCE_WEAPON))
3033 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
3035 info[i++] = "It powerfully strikes at a monster using your mana.";
3039 if (have_flag(flgs, TR_DEC_MANA))
3042 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
3044 info[i++] = "It decreases your mana consumption.";
3048 if (have_flag(flgs, TR_SUST_STR))
3051 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
3053 info[i++] = "It sustains your strength.";
3057 if (have_flag(flgs, TR_SUST_INT))
3060 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
3062 info[i++] = "It sustains your intelligence.";
3066 if (have_flag(flgs, TR_SUST_WIS))
3069 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
3071 info[i++] = "It sustains your wisdom.";
3075 if (have_flag(flgs, TR_SUST_DEX))
3078 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
3080 info[i++] = "It sustains your dexterity.";
3084 if (have_flag(flgs, TR_SUST_CON))
3087 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
3089 info[i++] = "It sustains your constitution.";
3093 if (have_flag(flgs, TR_SUST_CHR))
3096 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
3098 info[i++] = "It sustains your charisma.";
3103 if (have_flag(flgs, TR_IM_ACID))
3106 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3108 info[i++] = "It provides immunity to acid.";
3112 if (have_flag(flgs, TR_IM_ELEC))
3115 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3117 info[i++] = "It provides immunity to electricity.";
3121 if (have_flag(flgs, TR_IM_FIRE))
3124 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3126 info[i++] = "It provides immunity to fire.";
3130 if (have_flag(flgs, TR_IM_COLD))
3133 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3135 info[i++] = "It provides immunity to cold.";
3140 if (have_flag(flgs, TR_THROW))
3143 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3145 info[i++] = "It is perfectly balanced for throwing.";
3149 if (have_flag(flgs, TR_FREE_ACT))
3152 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3154 info[i++] = "It provides immunity to paralysis.";
3158 if (have_flag(flgs, TR_HOLD_LIFE))
3161 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
3163 info[i++] = "It provides resistance to life draining.";
3167 if (have_flag(flgs, TR_RES_FEAR))
3170 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3172 info[i++] = "It makes you completely fearless.";
3176 if (have_flag(flgs, TR_RES_ACID))
3179 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3181 info[i++] = "It provides resistance to acid.";
3185 if (have_flag(flgs, TR_RES_ELEC))
3188 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3190 info[i++] = "It provides resistance to electricity.";
3194 if (have_flag(flgs, TR_RES_FIRE))
3197 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3199 info[i++] = "It provides resistance to fire.";
3203 if (have_flag(flgs, TR_RES_COLD))
3206 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3208 info[i++] = "It provides resistance to cold.";
3212 if (have_flag(flgs, TR_RES_POIS))
3215 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3217 info[i++] = "It provides resistance to poison.";
3222 if (have_flag(flgs, TR_RES_LITE))
3225 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3227 info[i++] = "It provides resistance to light.";
3231 if (have_flag(flgs, TR_RES_DARK))
3234 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3236 info[i++] = "It provides resistance to dark.";
3241 if (have_flag(flgs, TR_RES_BLIND))
3244 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3246 info[i++] = "It provides resistance to blindness.";
3250 if (have_flag(flgs, TR_RES_CONF))
3253 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3255 info[i++] = "It provides resistance to confusion.";
3259 if (have_flag(flgs, TR_RES_SOUND))
3262 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3264 info[i++] = "It provides resistance to sound.";
3268 if (have_flag(flgs, TR_RES_SHARDS))
3271 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3273 info[i++] = "It provides resistance to shards.";
3278 if (have_flag(flgs, TR_RES_NETHER))
3281 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3283 info[i++] = "It provides resistance to nether.";
3287 if (have_flag(flgs, TR_RES_NEXUS))
3290 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3292 info[i++] = "It provides resistance to nexus.";
3296 if (have_flag(flgs, TR_RES_CHAOS))
3299 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3301 info[i++] = "It provides resistance to chaos.";
3305 if (have_flag(flgs, TR_RES_DISEN))
3308 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3310 info[i++] = "It provides resistance to disenchantment.";
3315 if (have_flag(flgs, TR_LEVITATION))
3318 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3320 info[i++] = "It allows you to levitate.";
3324 if (have_flag(flgs, TR_LITE))
3326 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
3328 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
3330 info[i++] = "It decreases radius of your light source by 1.";
3334 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë(Ⱦ·Â¤Ë+1)¡£";
3336 info[i++] = "It provides permanent light. (radius +1)";
3340 if (have_flag(flgs, TR_SEE_INVIS))
3343 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3345 info[i++] = "It allows you to see invisible monsters.";
3349 if (have_flag(flgs, TR_TELEPATHY))
3352 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
3354 info[i++] = "It gives telepathic powers.";
3358 if (have_flag(flgs, TR_ESP_ANIMAL))
3361 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤ò´¶ÃΤ¹¤ë¡£";
3363 info[i++] = "It senses natural creatures.";
3367 if (have_flag(flgs, TR_ESP_UNDEAD))
3370 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ò´¶ÃΤ¹¤ë¡£";
3372 info[i++] = "It senses undead.";
3376 if (have_flag(flgs, TR_ESP_DEMON))
3379 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò´¶ÃΤ¹¤ë¡£";
3381 info[i++] = "It senses demons.";
3385 if (have_flag(flgs, TR_ESP_ORC))
3388 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ò´¶ÃΤ¹¤ë¡£";
3390 info[i++] = "It senses orcs.";
3394 if (have_flag(flgs, TR_ESP_TROLL))
3397 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ò´¶ÃΤ¹¤ë¡£";
3399 info[i++] = "It senses trolls.";
3403 if (have_flag(flgs, TR_ESP_GIANT))
3406 info[i++] = "¤½¤ì¤Ïµð¿Í¤ò´¶ÃΤ¹¤ë¡£";
3408 info[i++] = "It senses giants.";
3412 if (have_flag(flgs, TR_ESP_DRAGON))
3415 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò´¶ÃΤ¹¤ë¡£";
3417 info[i++] = "It senses dragons.";
3421 if (have_flag(flgs, TR_ESP_HUMAN))
3424 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ò´¶ÃΤ¹¤ë¡£";
3426 info[i++] = "It senses humans.";
3430 if (have_flag(flgs, TR_ESP_EVIL))
3433 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¸ºß¤ò´¶ÃΤ¹¤ë¡£";
3435 info[i++] = "It senses evil creatures.";
3439 if (have_flag(flgs, TR_ESP_GOOD))
3442 info[i++] = "¤½¤ì¤ÏÁ±Îɤʸºß¤ò´¶ÃΤ¹¤ë¡£";
3444 info[i++] = "It senses good creatures.";
3448 if (have_flag(flgs, TR_ESP_NONLIVING))
3451 info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤò´¶ÃΤ¹¤ë¡£";
3453 info[i++] = "It senses non-living creatures.";
3457 if (have_flag(flgs, TR_ESP_UNIQUE))
3460 info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤ò´¶ÃΤ¹¤ë¡£";
3462 info[i++] = "It senses unique monsters.";
3466 if (have_flag(flgs, TR_SLOW_DIGEST))
3469 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
3471 info[i++] = "It slows your metabolism.";
3475 if (have_flag(flgs, TR_REGEN))
3478 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
3480 info[i++] = "It speeds your regenerative powers.";
3484 if (have_flag(flgs, TR_WARNING))
3487 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
3489 info[i++] = "It warns you of danger";
3493 if (have_flag(flgs, TR_REFLECT))
3496 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
3498 info[i++] = "It reflects bolts and arrows.";
3502 if (have_flag(flgs, TR_SH_FIRE))
3505 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3507 info[i++] = "It produces a fiery sheath.";
3511 if (have_flag(flgs, TR_SH_ELEC))
3514 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3516 info[i++] = "It produces an electric sheath.";
3520 if (have_flag(flgs, TR_SH_COLD))
3523 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3525 info[i++] = "It produces a sheath of coldness.";
3529 if (have_flag(flgs, TR_NO_MAGIC))
3532 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3534 info[i++] = "It produces an anti-magic shell.";
3538 if (have_flag(flgs, TR_NO_TELE))
3541 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
3543 info[i++] = "It prevents teleportation.";
3547 if (have_flag(flgs, TR_XTRA_MIGHT))
3550 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3552 info[i++] = "It fires missiles with extra might.";
3556 if (have_flag(flgs, TR_XTRA_SHOTS))
3559 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3561 info[i++] = "It fires missiles excessively fast.";
3566 if (have_flag(flgs, TR_BLESSED))
3569 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
3571 info[i++] = "It has been blessed by the gods.";
3576 if (object_is_cursed(o_ptr))
3578 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
3581 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3583 info[i++] = "It is permanently cursed.";
3587 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
3590 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3592 info[i++] = "It is heavily cursed.";
3599 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
3601 info[i++] = "It is cursed.";
3605 * It's a trivial infomation since there is
3606 * fake inscription {cursed}
3612 if ((have_flag(flgs, TR_TY_CURSE)) || (o_ptr->curse_flags & TRC_TY_CURSE))
3615 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
3617 info[i++] = "It carries an ancient foul curse.";
3621 if ((have_flag(flgs, TR_AGGRAVATE)) || (o_ptr->curse_flags & TRC_AGGRAVATE))
3624 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
3626 info[i++] = "It aggravates nearby creatures.";
3630 if ((have_flag(flgs, TR_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
3633 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
3635 info[i++] = "It drains experience.";
3639 if (o_ptr->curse_flags & TRC_SLOW_REGEN)
3642 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
3644 info[i++] = "It slows your regenerative powers.";
3648 if (o_ptr->curse_flags & TRC_ADD_L_CURSE)
3651 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
3653 info[i++] = "It adds weak curses.";
3657 if (o_ptr->curse_flags & TRC_ADD_H_CURSE)
3660 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
3662 info[i++] = "It adds heavy curses.";
3666 if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
3669 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3671 info[i++] = "It attracts animals.";
3675 if (o_ptr->curse_flags & TRC_CALL_DEMON)
3678 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3680 info[i++] = "It attracts demons.";
3684 if (o_ptr->curse_flags & TRC_CALL_DRAGON)
3687 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3689 info[i++] = "It attracts dragons.";
3693 if (o_ptr->curse_flags & TRC_COWARDICE)
3696 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤µ¯¤³¤¹¡£";
3698 info[i++] = "It makes you subject to cowardice.";
3702 if ((have_flag(flgs, TR_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
3705 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
3707 info[i++] = "It induces random teleportation.";
3711 if (o_ptr->curse_flags & TRC_LOW_MELEE)
3714 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
3716 info[i++] = "It causes you to miss blows.";
3720 if (o_ptr->curse_flags & TRC_LOW_AC)
3723 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
3725 info[i++] = "It helps your enemies' blows.";
3729 if (o_ptr->curse_flags & TRC_LOW_MAGIC)
3732 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
3734 info[i++] = "It encumbers you while spellcasting.";
3738 if (o_ptr->curse_flags & TRC_FAST_DIGEST)
3741 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
3743 info[i++] = "It speeds your metabolism.";
3747 if (o_ptr->curse_flags & TRC_DRAIN_HP)
3750 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
3752 info[i++] = "It drains you.";
3756 if (o_ptr->curse_flags & TRC_DRAIN_MANA)
3759 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
3761 info[i++] = "It drains your mana.";
3766 /* Describe about this kind of object instead of THIS fake object */
3767 if (mode & SCROBJ_FAKE_OBJECT)
3769 switch (o_ptr->tval)
3772 switch (o_ptr->sval)
3774 case SV_RING_LORDLY:
3776 info[i++] = "¤½¤ì¤Ï´ö¤Ä¤«¤Î¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3778 info[i++] = "It provides some random resistances.";
3781 case SV_RING_WARNING:
3783 info[i++] = "¤½¤ì¤Ï¤Ò¤È¤Ä¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3785 info[i++] = "It may provide a low rank ESP.";
3792 switch (o_ptr->sval)
3794 case SV_AMULET_RESISTANCE:
3796 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3798 info[i++] = "It may provides resistance to poison.";
3801 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3803 info[i++] = "It may provide a random resistances.";
3806 case SV_AMULET_THE_MAGI:
3808 info[i++] = "¤½¤ì¤ÏºÇÂç¤Ç£³¤Ä¤Þ¤Ç¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë¡£";
3810 info[i++] = "It provides up to three low rank ESPs.";
3818 if (have_flag(flgs, TR_IGNORE_ACID) &&
3819 have_flag(flgs, TR_IGNORE_ELEC) &&
3820 have_flag(flgs, TR_IGNORE_FIRE) &&
3821 have_flag(flgs, TR_IGNORE_COLD))
3824 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3826 info[i++] = "It cannot be harmed by the elements.";
3831 if (have_flag(flgs, TR_IGNORE_ACID))
3834 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3836 info[i++] = "It cannot be harmed by acid.";
3839 if (have_flag(flgs, TR_IGNORE_ELEC))
3842 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3844 info[i++] = "It cannot be harmed by electricity.";
3847 if (have_flag(flgs, TR_IGNORE_FIRE))
3850 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3852 info[i++] = "It cannot be harmed by fire.";
3855 if (have_flag(flgs, TR_IGNORE_COLD))
3858 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3860 info[i++] = "It cannot be harmed by cold.";
3865 if (mode & SCROBJ_FORCE_DETAIL) trivial_info = 0;
3867 /* No relevant informations */
3868 if (i <= trivial_info) return (FALSE);
3870 /* Save the screen */
3874 Term_get_size(&wid, &hgt);
3876 /* Display Item name */
3877 if (!(mode & SCROBJ_FAKE_OBJECT))
3878 object_desc(o_name, o_ptr, 0);
3880 object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
3884 /* Erase the screen */
3885 for (k = 1; k < hgt; k++) prt("", k, 13);
3887 /* Label the information */
3888 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
3890 monster_race *r_ptr = &r_info[o_ptr->pval];
3891 int namelen = strlen(r_name + r_ptr->name);
3892 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
3893 Term_queue_bigchar(18 + namelen, 1, r_ptr->x_attr, r_ptr->x_char, 0, 0);
3894 prt("'", 1, (use_bigtile ? 20 : 19) + namelen);
3898 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
3900 prt(" Item Attributes:", 1, 15);
3903 /* We will print on top of the map (column 13) */
3904 for (k = 2, j = 0; j < i; j++)
3907 prt(info[j], k++, 15);
3909 /* Every 20 entries (lines 2 to 21), start over */
3910 if ((k == hgt - 2) && (j+1 < i))
3913 prt("-- ³¤¯ --", k, 15);
3915 prt("-- more --", k, 15);
3918 for (; k > 2; k--) prt("", k, 15);
3924 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
3926 prt("[Press any key to continue]", k, 15);
3931 /* Restore the screen */
3934 /* Gave knowledge */
3941 * Convert an inventory index into a one character label
3942 * Note that the label does NOT distinguish inven/equip.
3944 char index_to_label(int i)
3946 /* Indexes for "inven" are easy */
3947 if (i < INVEN_RARM) return (I2A(i));
3949 /* Indexes for "equip" are offset */
3950 return (I2A(i - INVEN_RARM));
3955 * Convert a label into the index of an item in the "inven"
3956 * Return "-1" if the label does not indicate a real item
3958 s16b label_to_inven(int c)
3963 i = (islower(c) ? A2I(c) : -1);
3965 /* Verify the index */
3966 if ((i < 0) || (i > INVEN_PACK)) return (-1);
3968 /* Empty slots can never be chosen */
3969 if (!inventory[i].k_idx) return (-1);
3971 /* Return the index */
3977 extern bool select_ring_slot;
3980 static bool is_ring_slot(int i)
3982 return (i == INVEN_RIGHT) || (i == INVEN_LEFT);
3987 * Convert a label into the index of a item in the "equip"
3988 * Return "-1" if the label does not indicate a real item
3990 s16b label_to_equip(int c)
3995 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
3997 /* Verify the index */
3998 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
4000 if (select_ring_slot) return is_ring_slot(i) ? i : -1;
4002 /* Empty slots can never be chosen */
4003 if (!inventory[i].k_idx) return (-1);
4005 /* Return the index */
4012 * Determine which equipment slot (if any) an item likes
4014 s16b wield_slot(object_type *o_ptr)
4016 /* Slot for equipment */
4017 switch (o_ptr->tval)
4024 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
4025 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
4026 return (INVEN_LARM);
4033 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
4034 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
4035 return (INVEN_RARM);
4045 /* Use the right hand first */
4046 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
4048 /* Use the left hand for swapping (by default) */
4049 return (INVEN_LEFT);
4055 return (INVEN_NECK);
4060 return (INVEN_LITE);
4067 return (INVEN_BODY);
4072 return (INVEN_OUTER);
4078 return (INVEN_HEAD);
4083 return (INVEN_HANDS);
4088 return (INVEN_FEET);
4092 /* No slot available */
4098 * Return a string mentioning how a given item is carried
4100 cptr mention_use(int i)
4104 /* Examine the location */
4108 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->migite) ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê")); break;
4110 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "Just lifting" : (p_ptr->migite ? "Wielding" : "On arm"); break;
4114 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->hidarite) ? " ξ¼ê" : (left_hander ? " ±¦¼ê" : " º¸¼ê")); break;
4116 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "Just lifting" : (p_ptr->hidarite ? "Wielding" : "On arm"); break;
4120 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "±¿ÈÂÃæ" : "¼Í·âÍÑ"; break;
4122 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "Just holding" : "Shooting"; break;
4126 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
4128 case INVEN_RIGHT: p = (left_hander ? "On left hand" : "On right hand"); break;
4132 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
4134 case INVEN_LEFT: p = (left_hander ? "On right hand" : "On left hand"); break;
4138 case INVEN_NECK: p = " ¼ó"; break;
4140 case INVEN_NECK: p = "Around neck"; break;
4144 case INVEN_LITE: p = " ¸÷¸»"; break;
4146 case INVEN_LITE: p = "Light source"; break;
4150 case INVEN_BODY: p = " ÂÎ"; break;
4152 case INVEN_BODY: p = "On body"; break;
4156 case INVEN_OUTER: p = "ÂΤξå"; break;
4158 case INVEN_OUTER: p = "About body"; break;
4162 case INVEN_HEAD: p = " Ƭ"; break;
4164 case INVEN_HEAD: p = "On head"; break;
4168 case INVEN_HANDS: p = " ¼ê"; break;
4170 case INVEN_HANDS: p = "On hands"; break;
4174 case INVEN_FEET: p = " "; break;
4176 case INVEN_FEET: p = "On feet"; break;
4180 default: p = "¥¶¥Ã¥¯"; break;
4182 default: p = "In pack"; break;
4186 /* Return the result */
4192 * Return a string describing how a given item is being worn.
4193 * Currently, only used for items in the equipment, not inventory.
4195 cptr describe_use(int i)
4202 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->migite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
4204 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "just lifting" : (p_ptr->migite ? "attacking monsters with" : "wearing on your arm"); break;
4208 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->hidarite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
4210 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "just lifting" : (p_ptr->hidarite ? "attacking monsters with" : "wearing on your arm"); break;
4214 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î" : "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
4216 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "just holding" : "shooting missiles with"; break;
4220 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4222 case INVEN_RIGHT: p = (left_hander ? "wearing on your left hand" : "wearing on your right hand"); break;
4226 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4228 case INVEN_LEFT: p = (left_hander ? "wearing on your right hand" : "wearing on your left hand"); break;
4232 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
4234 case INVEN_NECK: p = "wearing around your neck"; break;
4238 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
4240 case INVEN_LITE: p = "using to light the way"; break;
4244 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
4246 case INVEN_BODY: p = "wearing on your body"; break;
4250 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
4252 case INVEN_OUTER: p = "wearing on your back"; break;
4256 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
4258 case INVEN_HEAD: p = "wearing on your head"; break;
4262 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
4264 case INVEN_HANDS: p = "wearing on your hands"; break;
4268 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
4270 case INVEN_FEET: p = "wearing on your feet"; break;
4274 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
4276 default: p = "carrying in your pack"; break;
4280 /* Return the result */
4285 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
4287 bool check_book_realm(const byte book_tval, const byte book_sval)
4289 if (book_tval < TV_LIFE_BOOK) return FALSE;
4290 if (p_ptr->pclass == CLASS_SORCERER)
4292 return is_magic(tval2realm(book_tval));
4294 else if (p_ptr->pclass == CLASS_RED_MAGE)
4296 if (is_magic(tval2realm(book_tval)))
4297 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
4299 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
4304 * Check an item against the item tester info
4306 bool item_tester_okay(object_type *o_ptr)
4308 /* Hack -- allow listing empty slots */
4309 if (item_tester_full) return (TRUE);
4311 /* Require an item */
4312 if (!o_ptr->k_idx) return (FALSE);
4314 /* Hack -- ignore "gold" */
4315 if (o_ptr->tval == TV_GOLD)
4318 extern bool show_gold_on_floor;
4320 if (!show_gold_on_floor) return (FALSE);
4323 /* Check the tval */
4324 if (item_tester_tval)
4326 /* Is it a spellbook? If so, we need a hack -- TY */
4327 if ((item_tester_tval <= TV_DEATH_BOOK) &&
4328 (item_tester_tval >= TV_LIFE_BOOK))
4329 return check_book_realm(o_ptr->tval, o_ptr->sval);
4331 if (item_tester_tval != o_ptr->tval) return (FALSE);
4334 /* Check the hook */
4335 if (item_tester_hook)
4337 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
4348 * Choice window "shadow" of the "show_inven()" function
4350 void display_inven(void)
4352 register int i, n, z = 0;
4354 byte attr = TERM_WHITE;
4356 char o_name[MAX_NLEN];
4360 Term_get_size(&wid, &hgt);
4362 /* Find the "final" slot */
4363 for (i = 0; i < INVEN_PACK; i++)
4365 o_ptr = &inventory[i];
4367 /* Skip non-objects */
4368 if (!o_ptr->k_idx) continue;
4374 /* Display the pack */
4375 for (i = 0; i < z; i++)
4377 /* Examine the item */
4378 o_ptr = &inventory[i];
4380 /* Start with an empty "index" */
4381 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4383 /* Is this item "acceptable"? */
4384 if (item_tester_okay(o_ptr))
4386 /* Prepare an "index" */
4387 tmp_val[0] = index_to_label(i);
4389 /* Bracket the "index" --(-- */
4393 /* Display the index (or blank space) */
4394 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
4396 /* Obtain an item description */
4397 object_desc(o_name, o_ptr, 0);
4399 /* Obtain the length of the description */
4403 attr = tval_to_attr[o_ptr->tval % 128];
4405 /* Grey out charging items */
4411 /* Display the entry itself */
4412 Term_putstr(3, i, n, attr, o_name);
4414 /* Erase the rest of the line */
4415 Term_erase(3+n, i, 255);
4417 /* Display the weight if needed */
4418 if (show_weights && o_ptr->weight)
4420 int wgt = o_ptr->weight * o_ptr->number;
4422 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
4424 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4427 prt(tmp_val, i, wid - 9);
4431 /* Erase the rest of the window */
4432 for (i = z; i < hgt; i++)
4434 /* Erase the line */
4435 Term_erase(0, i, 255);
4442 * Choice window "shadow" of the "show_equip()" function
4444 void display_equip(void)
4448 byte attr = TERM_WHITE;
4450 char o_name[MAX_NLEN];
4454 Term_get_size(&wid, &hgt);
4456 /* Display the equipment */
4457 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
4459 /* Examine the item */
4460 o_ptr = &inventory[i];
4462 /* Start with an empty "index" */
4463 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4465 /* Is this item "acceptable"? */
4466 if (select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr))
4468 /* Prepare an "index" */
4469 tmp_val[0] = index_to_label(i);
4471 /* Bracket the "index" --(-- */
4475 /* Display the index (or blank space) */
4476 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
4478 /* Obtain an item description */
4479 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
4482 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
4484 strcpy(o_name, "(wielding with two-hands)");
4490 object_desc(o_name, o_ptr, 0);
4491 attr = tval_to_attr[o_ptr->tval % 128];
4494 /* Obtain the length of the description */
4497 /* Grey out charging items */
4503 /* Display the entry itself */
4504 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
4506 /* Erase the rest of the line */
4507 Term_erase(3+n, i - INVEN_RARM, 255);
4509 /* Display the weight (if needed) */
4510 if (show_weights && o_ptr->weight)
4512 int wgt = o_ptr->weight * o_ptr->number;
4514 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
4516 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4519 prt(tmp_val, i - INVEN_RARM, wid - (show_labels ? 28 : 9));
4522 /* Display the slot description (if needed) */
4525 Term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
4526 prt(mention_use(i), i - INVEN_RARM, wid - 15);
4530 /* Erase the rest of the window */
4531 for (i = INVEN_TOTAL - INVEN_RARM; i < hgt; i++)
4533 /* Clear that line */
4534 Term_erase(0, i, 255);
4540 * Find the "first" inventory object with the given "tag".
4542 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
4543 * inscription of an object. Alphabetical characters don't work as a
4546 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
4547 * and "x" is the "current" command_cmd code.
4549 static bool get_tag(int *cp, char tag, int mode)
4554 /* Extract index from mode */
4559 end = INVEN_TOTAL - 1;
4564 end = INVEN_PACK - 1;
4571 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
4573 /* Check every inventory object */
4574 for (i = start; i <= end; i++)
4576 object_type *o_ptr = &inventory[i];
4578 /* Skip non-objects */
4579 if (!o_ptr->k_idx) continue;
4581 /* Skip empty inscriptions */
4582 if (!o_ptr->inscription) continue;
4584 /* Skip non-choice */
4585 if (!item_tester_okay(o_ptr)) continue;
4588 s = my_strchr(quark_str(o_ptr->inscription), '@');
4590 /* Process all tags */
4593 /* Check the special tags */
4594 if ((s[1] == command_cmd) && (s[2] == tag))
4596 /* Save the actual inventory ID */
4603 /* Find another '@' */
4604 s = my_strchr(s + 1, '@');
4609 /**** Find a tag in the form of {@#} (allows only numerals) ***/
4611 /* Don't allow {@#} with '#' being alphabet */
4612 if (tag < '0' || '9' < tag)
4618 /* Check every object */
4619 for (i = start; i <= end; i++)
4621 object_type *o_ptr = &inventory[i];
4623 /* Skip non-objects */
4624 if (!o_ptr->k_idx) continue;
4626 /* Skip empty inscriptions */
4627 if (!o_ptr->inscription) continue;
4629 /* Skip non-choice */
4630 if (!item_tester_okay(o_ptr)) continue;
4633 s = my_strchr(quark_str(o_ptr->inscription), '@');
4635 /* Process all tags */
4638 /* Check the normal tags */
4641 /* Save the actual inventory ID */
4648 /* Find another '@' */
4649 s = my_strchr(s + 1, '@');
4659 * Find the "first" floor object with the given "tag".
4661 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
4662 * inscription of an object. Alphabetical characters don't work as a
4665 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
4666 * and "x" is the "current" command_cmd code.
4668 static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
4673 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
4675 /* Check every object in the grid */
4676 for (i = 0; i < floor_num && i < 23; i++)
4678 object_type *o_ptr = &o_list[floor_list[i]];
4680 /* Skip empty inscriptions */
4681 if (!o_ptr->inscription) continue;
4684 s = my_strchr(quark_str(o_ptr->inscription), '@');
4686 /* Process all tags */
4689 /* Check the special tags */
4690 if ((s[1] == command_cmd) && (s[2] == tag))
4692 /* Save the actual floor object ID */
4699 /* Find another '@' */
4700 s = my_strchr(s + 1, '@');
4705 /**** Find a tag in the form of {@#} (allows only numerals) ***/
4707 /* Don't allow {@#} with '#' being alphabet */
4708 if (tag < '0' || '9' < tag)
4714 /* Check every object in the grid */
4715 for (i = 0; i < floor_num && i < 23; i++)
4717 object_type *o_ptr = &o_list[floor_list[i]];
4719 /* Skip empty inscriptions */
4720 if (!o_ptr->inscription) continue;
4723 s = my_strchr(quark_str(o_ptr->inscription), '@');
4725 /* Process all tags */
4728 /* Check the normal tags */
4731 /* Save the floor object ID */
4738 /* Find another '@' */
4739 s = my_strchr(s + 1, '@');
4749 * Move around label characters with correspond tags
4751 static void prepare_label_string(char *label, int mode)
4753 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
4754 int offset = (mode == USE_EQUIP) ? INVEN_RARM : 0;
4757 /* Prepare normal labels */
4758 strcpy(label, alphabet_chars);
4760 /* Move each label */
4761 for (i = 0; i < 52; i++)
4764 char c = alphabet_chars[i];
4766 /* Find a tag with this label */
4767 if (get_tag(&index, c, mode))
4769 /* Delete the overwritten label */
4770 if (label[i] == c) label[i] = ' ';
4772 /* Move the label to the place of corresponding tag */
4773 label[index - offset] = c;
4780 * Move around label characters with correspond tags (floor version)
4782 static void prepare_label_string_floor(char *label, int floor_list[], int floor_num)
4784 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
4787 /* Prepare normal labels */
4788 strcpy(label, alphabet_chars);
4790 /* Move each label */
4791 for (i = 0; i < 52; i++)
4794 char c = alphabet_chars[i];
4796 /* Find a tag with this label */
4797 if (get_tag_floor(&index, c, floor_list, floor_num))
4799 /* Delete the overwritten label */
4800 if (label[i] == c) label[i] = ' ';
4802 /* Move the label to the place of corresponding tag */
4810 * Display the inventory.
4812 * Hack -- do not display "trailing" empty slots
4814 int show_inven(int target_item)
4816 int i, j, k, l, z = 0;
4817 int col, cur_col, len;
4819 char o_name[MAX_NLEN];
4823 char out_desc[23][MAX_NLEN];
4824 int target_item_label = 0;
4826 char inven_label[52 + 1];
4828 /* Starting column */
4832 Term_get_size(&wid, &hgt);
4834 /* Default "max-length" */
4835 len = wid - col - 1;
4838 /* Find the "final" slot */
4839 for (i = 0; i < INVEN_PACK; i++)
4841 o_ptr = &inventory[i];
4843 /* Skip non-objects */
4844 if (!o_ptr->k_idx) continue;
4850 prepare_label_string(inven_label, USE_INVEN);
4852 /* Display the inventory */
4853 for (k = 0, i = 0; i < z; i++)
4855 o_ptr = &inventory[i];
4857 /* Is this item acceptable? */
4858 if (!item_tester_okay(o_ptr)) continue;
4860 /* Describe the object */
4861 object_desc(o_name, o_ptr, 0);
4863 /* Save the object index, color, and description */
4865 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4867 /* Grey out charging items */
4870 out_color[k] = TERM_L_DARK;
4873 (void)strcpy(out_desc[k], o_name);
4875 /* Find the predicted "line length" */
4876 l = strlen(out_desc[k]) + 5;
4878 /* Be sure to account for the weight */
4879 if (show_weights) l += 9;
4881 /* Account for icon if displayed */
4882 if (show_item_graph)
4885 if (use_bigtile) l++;
4888 /* Maintain the maximum length */
4889 if (l > len) len = l;
4891 /* Advance to next "line" */
4895 /* Find the column to start in */
4896 col = (len > wid - 4) ? 0 : (wid - len - 1);
4898 /* Output each entry */
4899 for (j = 0; j < k; j++)
4905 o_ptr = &inventory[i];
4907 /* Clear the line */
4908 prt("", j + 1, col ? col - 2 : col);
4910 if (use_menu && target_item)
4912 if (j == (target_item-1))
4915 strcpy(tmp_val, "¡Õ");
4917 strcpy(tmp_val, "> ");
4919 target_item_label = i;
4921 else strcpy(tmp_val, " ");
4923 else if (i <= INVEN_PACK)
4925 /* Prepare an index --(-- */
4926 sprintf(tmp_val, "%c)", inven_label[i]);
4930 /* Prepare an index --(-- */
4931 sprintf(tmp_val, "%c)", index_to_label(i));
4934 /* Clear the line with the (possibly indented) index */
4935 put_str(tmp_val, j + 1, col);
4939 /* Display graphics for object, if desired */
4940 if (show_item_graph)
4942 byte a = object_attr(o_ptr);
4943 char c = object_char(o_ptr);
4946 if (a & 0x80) a |= 0x40;
4949 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
4950 if (use_bigtile) cur_col++;
4956 /* Display the entry itself */
4957 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
4959 /* Display the weight if needed */
4962 int wgt = o_ptr->weight * o_ptr->number;
4964 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4966 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4969 prt(tmp_val, j + 1, wid - 9);
4973 /* Make a "shadow" below the list (only if needed) */
4974 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4976 /* Save the new column */
4979 return target_item_label;
4985 * Display the equipment.
4987 int show_equip(int target_item)
4990 int col, cur_col, len;
4993 char o_name[MAX_NLEN];
4996 char out_desc[23][MAX_NLEN];
4997 int target_item_label = 0;
4999 char equip_label[52 + 1];
5001 /* Starting column */
5005 Term_get_size(&wid, &hgt);
5007 /* Maximal length */
5008 len = wid - col - 1;
5011 /* Scan the equipment list */
5012 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
5014 o_ptr = &inventory[i];
5016 /* Is this item acceptable? */
5017 if (!(select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr)) &&
5018 (!((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute) ||
5019 item_tester_no_ryoute)) continue;
5022 object_desc(o_name, o_ptr, 0);
5024 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
5027 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
5029 (void)strcpy(out_desc[k],"(wielding with two-hands)");
5031 out_color[k] = TERM_WHITE;
5035 (void)strcpy(out_desc[k], o_name);
5036 out_color[k] = tval_to_attr[o_ptr->tval % 128];
5040 /* Grey out charging items */
5043 out_color[k] = TERM_L_DARK;
5046 /* Extract the maximal length (see below) */
5048 l = strlen(out_desc[k]) + (2 + 1);
5050 l = strlen(out_desc[k]) + (2 + 3);
5054 /* Increase length for labels (if needed) */
5056 if (show_labels) l += (7 + 2);
5058 if (show_labels) l += (14 + 2);
5062 /* Increase length for weight (if needed) */
5063 if (show_weights) l += 9;
5065 if (show_item_graph) l += 2;
5067 /* Maintain the max-length */
5068 if (l > len) len = l;
5070 /* Advance the entry */
5074 /* Hack -- Find a column to start in */
5076 col = (len > wid - 6) ? 0 : (wid - len - 1);
5078 col = (len > wid - 4) ? 0 : (wid - len - 1);
5081 prepare_label_string(equip_label, USE_EQUIP);
5083 /* Output each entry */
5084 for (j = 0; j < k; j++)
5090 o_ptr = &inventory[i];
5092 /* Clear the line */
5093 prt("", j + 1, col ? col - 2 : col);
5095 if (use_menu && target_item)
5097 if (j == (target_item-1))
5100 strcpy(tmp_val, "¡Õ");
5102 strcpy(tmp_val, "> ");
5104 target_item_label = i;
5106 else strcpy(tmp_val, " ");
5108 else if (i >= INVEN_RARM)
5110 /* Prepare an index --(-- */
5111 sprintf(tmp_val, "%c)", equip_label[i - INVEN_RARM]);
5115 /* Prepare an index --(-- */
5116 sprintf(tmp_val, "%c)", index_to_label(i));
5119 /* Clear the line with the (possibly indented) index */
5120 put_str(tmp_val, j+1, col);
5124 /* Display graphics for object, if desired */
5125 if (show_item_graph)
5127 byte a = object_attr(o_ptr);
5128 char c = object_char(o_ptr);
5131 if (a & 0x80) a |= 0x40;
5134 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
5135 if (use_bigtile) cur_col++;
5143 /* Mention the use */
5145 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
5147 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
5150 put_str(tmp_val, j+1, cur_col);
5152 /* Display the entry itself */
5154 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
5156 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
5163 /* Display the entry itself */
5164 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
5167 /* Display the weight if needed */
5170 int wgt = o_ptr->weight * o_ptr->number;
5172 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5174 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
5177 prt(tmp_val, j + 1, wid - 9);
5181 /* Make a "shadow" below the list (only if needed) */
5182 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5184 /* Save the new column */
5187 return target_item_label;
5194 * Flip "inven" and "equip" in any sub-windows
5196 void toggle_inven_equip(void)
5201 for (j = 0; j < 8; j++)
5204 if (!angband_term[j]) continue;
5206 /* Flip inven to equip */
5207 if (window_flag[j] & (PW_INVEN))
5210 window_flag[j] &= ~(PW_INVEN);
5211 window_flag[j] |= (PW_EQUIP);
5214 p_ptr->window |= (PW_EQUIP);
5217 /* Flip inven to equip */
5218 else if (window_flag[j] & (PW_EQUIP))
5221 window_flag[j] &= ~(PW_EQUIP);
5222 window_flag[j] |= (PW_INVEN);
5225 p_ptr->window |= (PW_INVEN);
5233 * Verify the choice of an item.
5235 * The item can be negative to mean "item on floor".
5237 static bool verify(cptr prompt, int item)
5239 char o_name[MAX_NLEN];
5240 char out_val[MAX_NLEN+20];
5247 o_ptr = &inventory[item];
5253 o_ptr = &o_list[0 - item];
5257 object_desc(o_name, o_ptr, 0);
5261 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
5263 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
5268 return (get_check(out_val));
5273 * Hack -- allow user to "prevent" certain choices
5275 * The item can be negative to mean "item on floor".
5277 static bool get_item_allow(int item)
5283 if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
5288 o_ptr = &inventory[item];
5294 o_ptr = &o_list[0 - item];
5297 /* No inscription */
5298 if (!o_ptr->inscription) return (TRUE);
5301 s = my_strchr(quark_str(o_ptr->inscription), '!');
5303 /* Process preventions */
5306 /* Check the "restriction" */
5307 if ((s[1] == command_cmd) || (s[1] == '*'))
5309 /* Verify the choice */
5311 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
5313 if (!verify("Really try", item)) return (FALSE);
5318 /* Find another '!' */
5319 s = my_strchr(s + 1, '!');
5329 * Auxiliary function for "get_item()" -- test an index
5331 static bool get_item_okay(int i)
5334 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
5336 if (select_ring_slot) return is_ring_slot(i);
5338 /* Verify the item */
5339 if (!item_tester_okay(&inventory[i])) return (FALSE);
5348 * Determine whether get_item() can get some item or not
5349 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
5351 bool can_get_item(void)
5353 int j, floor_list[23], floor_num = 0;
5355 for (j = 0; j < INVEN_TOTAL; j++)
5356 if (item_tester_okay(&inventory[j]))
5359 floor_num = scan_floor(floor_list, py, px, 0x03);
5367 * Let the user select an item, save its "index"
5369 * Return TRUE only if an acceptable item was chosen by the user.
5371 * The selected item must satisfy the "item_tester_hook()" function,
5372 * if that hook is set, and the "item_tester_tval", if that value is set.
5374 * All "item_tester" restrictions are cleared before this function returns.
5376 * The user is allowed to choose acceptable items from the equipment,
5377 * inventory, or floor, respectively, if the proper flag was given,
5378 * and there are any acceptable items in that location.
5380 * The equipment or inventory are displayed (even if no acceptable
5381 * items are in that location) if the proper flag was given.
5383 * If there are no acceptable items available anywhere, and "str" is
5384 * not NULL, then it will be used as the text of a warning message
5385 * before the function returns.
5387 * Note that the user must press "-" to specify the item on the floor,
5388 * and there is no way to "examine" the item on the floor, while the
5389 * use of "capital" letters will "examine" an inventory/equipment item,
5390 * and prompt for its use.
5392 * If a legal item is selected from the inventory, we save it in "cp"
5393 * directly (0 to 35), and return TRUE.
5395 * If a legal item is selected from the floor, we save it in "cp" as
5396 * a negative (-1 to -511), and return TRUE.
5398 * If no item is available, we do nothing to "cp", and we display a
5399 * warning message, using "str" if available, and return FALSE.
5401 * If no item is selected, we do nothing to "cp", and return FALSE.
5403 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
5404 * to allow the user to enter a command while viewing those screens, and
5405 * also to induce "auto-enter" of stores, and other such stuff.
5407 * Global "p_ptr->command_see" may be set before calling this function to start
5408 * out in "browse" mode. It is cleared before this function returns.
5410 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
5411 * If it is TRUE then we are viewing inventory, else equipment.
5413 * We always erase the prompt when we are done, leaving a blank line,
5414 * or a warning message, if appropriate, if no items are available.
5416 bool get_item(int *cp, cptr pmt, cptr str, int mode)
5418 s16b this_o_idx, next_o_idx = 0;
5422 int j, k, i1, i2, e1, e2;
5432 bool allow_floor = FALSE;
5434 bool toggle = FALSE;
5440 extern bool select_the_force;
5442 int menu_line = (use_menu ? 1 : 0);
5448 static char prev_tag = '\0';
5449 char cur_tag = '\0';
5451 #endif /* ALLOW_REPEAT */
5453 #ifdef ALLOW_EASY_FLOOR /* TNB */
5455 if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
5457 #endif /* ALLOW_EASY_FLOOR -- TNB */
5460 if (mode & USE_EQUIP) equip = TRUE;
5461 if (mode & USE_INVEN) inven = TRUE;
5462 if (mode & USE_FLOOR) floor = TRUE;
5466 /* Get the item index */
5467 if (repeat_pull(cp))
5470 if (select_the_force && (*cp == INVEN_FORCE))
5472 item_tester_tval = 0;
5473 item_tester_hook = NULL;
5474 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5479 else if (floor && (*cp < 0))
5486 /* Acquire object */
5489 /* Validate the item */
5490 if (item_tester_okay(o_ptr))
5492 /* Forget restrictions */
5493 item_tester_tval = 0;
5494 item_tester_hook = NULL;
5495 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5502 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
5503 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
5505 if (prev_tag && command_cmd)
5507 /* Look up the tag and validate the item */
5508 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
5509 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
5510 else if (!get_item_okay(k)) /* Reject */;
5513 /* Accept that choice */
5516 /* Forget restrictions */
5517 item_tester_tval = 0;
5518 item_tester_hook = NULL;
5519 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5525 prev_tag = '\0'; /* prev_tag is no longer effective */
5528 /* Verify the item */
5529 else if (get_item_okay(*cp))
5531 /* Forget restrictions */
5532 item_tester_tval = 0;
5533 item_tester_hook = NULL;
5534 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5542 #endif /* ALLOW_REPEAT */
5545 /* Paranoia XXX XXX XXX */
5552 /* No item selected */
5556 /* Full inventory */
5558 i2 = INVEN_PACK - 1;
5560 /* Forbid inventory */
5561 if (!inven) i2 = -1;
5564 for (j = 0; j < INVEN_PACK; j++)
5565 if (item_tester_okay(&inventory[j])) max_inven++;
5568 /* Restrict inventory indexes */
5569 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5570 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5573 /* Full equipment */
5575 e2 = INVEN_TOTAL - 1;
5577 /* Forbid equipment */
5578 if (!equip) e2 = -1;
5581 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5582 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
5583 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5586 /* Restrict equipment indexes */
5587 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5588 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5590 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
5594 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
5596 else if (p_ptr->hidarite) e1 = INVEN_RARM;
5600 /* Restrict floor usage */
5603 /* Scan all objects in the grid */
5604 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5608 /* Acquire object */
5609 o_ptr = &o_list[this_o_idx];
5611 /* Acquire next object */
5612 next_o_idx = o_ptr->next_o_idx;
5614 /* Accept the item on the floor if legal */
5615 if (item_tester_okay(o_ptr) && (o_ptr->marked & OM_FOUND)) allow_floor = TRUE;
5619 /* Require at least one legal choice */
5620 if (!allow_floor && (i1 > i2) && (e1 > e2))
5622 /* Cancel p_ptr->command_see */
5623 command_see = FALSE;
5631 if (select_the_force) {
5637 /* Analyze choices */
5640 /* Hack -- Start on equipment if requested */
5641 if (command_see && command_wrk && equip)
5646 /* Use inventory if allowed */
5649 command_wrk = FALSE;
5652 /* Use equipment if allowed */
5658 /* Use inventory for floor */
5661 command_wrk = FALSE;
5667 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5669 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5671 /* Hack -- start out in "display" mode */
5679 /* Repeat until done */
5682 int get_item_label = 0;
5689 for (j = 0; j < 8; j++)
5692 if (!angband_term[j]) continue;
5694 /* Count windows displaying inven */
5695 if (window_flag[j] & (PW_INVEN)) ni++;
5697 /* Count windows displaying equip */
5698 if (window_flag[j] & (PW_EQUIP)) ne++;
5701 /* Toggle if needed */
5702 if ((command_wrk && ni && !ne) ||
5703 (!command_wrk && !ni && ne))
5706 toggle_inven_equip();
5713 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5715 /* Redraw windows */
5719 /* Inventory screen */
5722 /* Redraw if needed */
5723 if (command_see) get_item_label = show_inven(menu_line);
5726 /* Equipment screen */
5729 /* Redraw if needed */
5730 if (command_see) get_item_label = show_equip(menu_line);
5733 /* Viewing inventory */
5736 /* Begin the prompt */
5738 sprintf(out_val, "»ý¤Áʪ:");
5740 sprintf(out_val, "Inven:");
5743 /* Some legal items */
5744 if ((i1 <= i2) && !use_menu)
5746 /* Build the prompt */
5748 sprintf(tmp_val, "%c-%c,'(',')',",
5750 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,");
5767 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
5769 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
5773 /* Viewing equipment */
5776 /* Begin the prompt */
5778 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5780 sprintf(out_val, "Equip:");
5783 /* Some legal items */
5784 if ((e1 <= e2) && !use_menu)
5786 /* Build the prompt */
5788 sprintf(tmp_val, "%c-%c,'(',')',",
5790 sprintf(tmp_val, " %c-%c,'(',')',",
5792 index_to_label(e1), index_to_label(e2));
5795 strcat(out_val, tmp_val);
5798 /* Indicate ability to "view" */
5800 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5802 if (!command_see) strcat(out_val, " * to see,");
5807 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
5809 if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
5813 /* Indicate legality of the "floor" item */
5815 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
5816 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
5818 if (allow_floor) strcat(out_val, " - for floor,");
5819 if (select_the_force) strcat(out_val, " w for the Force,");
5822 /* Finish the prompt */
5823 strcat(out_val, " ESC");
5825 /* Build the prompt */
5826 sprintf(tmp_val, "(%s) %s", out_val, pmt);
5828 /* Show the prompt */
5836 int max_line = (command_wrk ? max_equip : max_inven);
5852 menu_line += (max_line - 1);
5871 /* Verify legality */
5872 if (!inven || !equip)
5878 /* Hack -- Fix screen */
5888 /* Switch inven/equip */
5889 command_wrk = !command_wrk;
5890 max_line = (command_wrk ? max_equip : max_inven);
5891 if (menu_line > max_line) menu_line = max_line;
5893 /* Need to redraw */
5902 if (command_wrk == USE_FLOOR)
5905 (*cp) = -get_item_label;
5909 /* Validate the item */
5910 if (!get_item_okay(get_item_label))
5916 /* Allow player to "refuse" certain actions */
5917 if (!get_item_allow(get_item_label))
5923 /* Accept that choice */
5924 (*cp) = get_item_label;
5933 if (select_the_force) {
5941 if (menu_line > max_line) menu_line -= max_line;
5962 command_see = FALSE;
5982 /* Verify legality */
5983 if (!inven || !equip)
5989 /* Hack -- Fix screen */
5999 /* Switch inven/equip */
6000 command_wrk = !command_wrk;
6002 /* Need to redraw */
6008 /* Use floor item */
6011 /* Scan all objects in the grid */
6012 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
6016 /* Acquire object */
6017 o_ptr = &o_list[this_o_idx];
6019 /* Acquire next object */
6020 next_o_idx = o_ptr->next_o_idx;
6022 /* Validate the item */
6023 if (!item_tester_okay(o_ptr)) continue;
6028 /* Verify the item (if required) */
6030 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
6032 if (other_query_flag && !verify("Try", k)) continue;
6036 /* Allow player to "refuse" certain actions */
6037 if (!get_item_allow(k)) continue;
6039 /* Accept that choice */
6056 case '1': case '2': case '3':
6057 case '4': case '5': case '6':
6058 case '7': case '8': case '9':
6060 /* Look up the tag */
6061 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
6067 /* Hack -- Validate the item */
6068 if ((k < INVEN_RARM) ? !inven : !equip)
6074 /* Validate the item */
6075 if (!get_item_okay(k))
6081 /* Allow player to "refuse" certain actions */
6082 if (!get_item_allow(k))
6088 /* Accept that choice */
6094 #endif /* ALLOW_REPEAT */
6102 /* Choose "default" inventory item */
6105 k = ((i1 == i2) ? i1 : -1);
6108 /* Choose "default" equipment item */
6111 k = ((e1 == e2) ? e1 : -1);
6114 /* Validate the item */
6115 if (!get_item_okay(k))
6121 /* Allow player to "refuse" certain actions */
6122 if (!get_item_allow(k))
6128 /* Accept that choice */
6138 if (select_the_force) {
6151 bool not_found = FALSE;
6153 /* Look up the alphabetical tag */
6154 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
6159 /* Hack -- Validate the item */
6160 else if ((k < INVEN_RARM) ? !inven : !equip)
6165 /* Validate the item */
6166 else if (!get_item_okay(k))
6173 /* Accept that choice */
6179 #endif /* ALLOW_REPEAT */
6183 /* Extract "query" setting */
6184 ver = isupper(which);
6185 which = tolower(which);
6187 /* Convert letter to inventory index */
6190 if (which == '(') k = i1;
6191 else if (which == ')') k = i2;
6192 else k = label_to_inven(which);
6195 /* Convert letter to equipment index */
6198 if (which == '(') k = e1;
6199 else if (which == ')') k = e2;
6200 else k = label_to_equip(which);
6203 /* Validate the item */
6204 if (!get_item_okay(k))
6210 /* Verify the item */
6212 if (ver && !verify("ËÜÅö¤Ë", k))
6214 if (ver && !verify("Try", k))
6222 /* Allow player to "refuse" certain actions */
6223 if (!get_item_allow(k))
6229 /* Accept that choice */
6240 /* Fix the screen if necessary */
6246 /* Hack -- Cancel "display" */
6247 command_see = FALSE;
6251 /* Forget the item_tester_tval restriction */
6252 item_tester_tval = 0;
6254 item_tester_no_ryoute = FALSE;
6256 /* Forget the item_tester_hook restriction */
6257 item_tester_hook = NULL;
6260 /* Clean up 'show choices' */
6261 /* Toggle again if needed */
6262 if (toggle) toggle_inven_equip();
6265 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6271 /* Clear the prompt line */
6274 /* Warning if needed */
6275 if (oops && str) msg_print(str);
6281 if (command_cmd) prev_tag = cur_tag;
6282 #endif /* ALLOW_REPEAT */
6284 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6292 #ifdef ALLOW_EASY_FLOOR
6297 * Return a list of o_list[] indexes of items at the given cave
6298 * location. Valid flags are:
6300 * mode & 0x01 -- Item tester
6301 * mode & 0x02 -- Marked items only
6302 * mode & 0x04 -- Stop after first
6304 int scan_floor(int *items, int y, int x, int mode)
6306 int this_o_idx, next_o_idx;
6311 if (!in_bounds(y, x)) return 0;
6313 /* Scan all objects in the grid */
6314 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
6318 /* Acquire object */
6319 o_ptr = &o_list[this_o_idx];
6321 /* Acquire next object */
6322 next_o_idx = o_ptr->next_o_idx;
6325 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
6328 if ((mode & 0x02) && !(o_ptr->marked & OM_FOUND)) continue;
6330 /* Accept this item */
6331 /* XXX Hack -- Enforce limit */
6333 items[num] = this_o_idx;
6338 if (mode & 0x04) break;
6347 * Display a list of the items on the floor at the given location.
6349 int show_floor(int target_item, int y, int x, int *min_width)
6356 char o_name[MAX_NLEN];
6362 char out_desc[23][MAX_NLEN];
6363 int target_item_label = 0;
6365 int floor_list[23], floor_num;
6367 char floor_label[52 + 1];
6369 bool dont_need_to_show_weights = TRUE;
6372 Term_get_size(&wid, &hgt);
6374 /* Default length */
6375 len = MAX((*min_width), 20);
6378 /* Scan for objects in the grid, using item_tester_okay() */
6379 floor_num = scan_floor(floor_list, y, x, 0x03);
6381 /* Display the floor objects */
6382 for (k = 0, i = 0; i < floor_num && i < 23; i++)
6384 o_ptr = &o_list[floor_list[i]];
6386 /* Describe the object */
6387 object_desc(o_name, o_ptr, 0);
6389 /* Save the index */
6392 /* Acquire inventory color */
6393 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
6395 /* Save the object description */
6396 strcpy(out_desc[k], o_name);
6398 /* Find the predicted "line length" */
6399 l = strlen(out_desc[k]) + 5;
6401 /* Be sure to account for the weight */
6402 if (show_weights) l += 9;
6404 if (o_ptr->tval != TV_GOLD) dont_need_to_show_weights = FALSE;
6406 /* Maintain the maximum length */
6407 if (l > len) len = l;
6409 /* Advance to next "line" */
6413 if (show_weights && dont_need_to_show_weights) len -= 9;
6418 /* Find the column to start in */
6419 col = (len > wid - 4) ? 0 : (wid - len - 1);
6421 prepare_label_string_floor(floor_label, floor_list, floor_num);
6423 /* Output each entry */
6424 for (j = 0; j < k; j++)
6427 i = floor_list[out_index[j]];
6432 /* Clear the line */
6433 prt("", j + 1, col ? col - 2 : col);
6435 if (use_menu && target_item)
6437 if (j == (target_item-1))
6440 strcpy(tmp_val, "¡Õ");
6442 strcpy(tmp_val, "> ");
6444 target_item_label = i;
6446 else strcpy(tmp_val, " ");
6450 /* Prepare an index --(-- */
6451 sprintf(tmp_val, "%c)", floor_label[j]);
6454 /* Clear the line with the (possibly indented) index */
6455 put_str(tmp_val, j + 1, col);
6457 /* Display the entry itself */
6458 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
6460 /* Display the weight if needed */
6461 if (show_weights && (o_ptr->tval != TV_GOLD))
6463 int wgt = o_ptr->weight * o_ptr->number;
6465 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
6467 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
6470 prt(tmp_val, j + 1, wid - 9);
6474 /* Make a "shadow" below the list (only if needed) */
6475 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
6477 return target_item_label;
6481 * This version of get_item() is called by get_item() when
6482 * the easy_floor is on.
6484 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
6486 char n1 = ' ', n2 = ' ', which = ' ';
6488 int j, k, i1, i2, e1, e2;
6495 bool equip = (mode & USE_EQUIP) ? TRUE : FALSE;
6496 bool inven = (mode & USE_INVEN) ? TRUE : FALSE;
6497 bool floor = (mode & USE_FLOOR) ? TRUE : FALSE;
6499 bool allow_equip = FALSE;
6500 bool allow_inven = FALSE;
6501 bool allow_floor = FALSE;
6503 bool toggle = FALSE;
6508 int floor_num, floor_list[23], floor_top = 0;
6511 extern bool select_the_force;
6513 int menu_line = (use_menu ? 1 : 0);
6519 static char prev_tag = '\0';
6520 char cur_tag = '\0';
6522 /* Get the item index */
6523 if (repeat_pull(cp))
6526 if (select_the_force && (*cp == INVEN_FORCE))
6528 item_tester_tval = 0;
6529 item_tester_hook = NULL;
6530 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6535 else if (floor && (*cp < 0))
6537 if (prev_tag && command_cmd)
6539 /* Scan all objects in the grid */
6540 floor_num = scan_floor(floor_list, py, px, 0x03);
6542 /* Look up the tag */
6543 if (get_tag_floor(&k, prev_tag, floor_list, floor_num))
6545 /* Accept that choice */
6546 (*cp) = 0 - floor_list[k];
6548 /* Forget restrictions */
6549 item_tester_tval = 0;
6550 item_tester_hook = NULL;
6551 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6557 prev_tag = '\0'; /* prev_tag is no longer effective */
6560 /* Validate the item */
6561 else if (item_tester_okay(&o_list[0 - (*cp)]))
6563 /* Forget restrictions */
6564 item_tester_tval = 0;
6565 item_tester_hook = NULL;
6566 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6573 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
6574 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
6576 if (prev_tag && command_cmd)
6578 /* Look up the tag and validate the item */
6579 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
6580 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
6581 else if (!get_item_okay(k)) /* Reject */;
6584 /* Accept that choice */
6587 /* Forget restrictions */
6588 item_tester_tval = 0;
6589 item_tester_hook = NULL;
6590 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6596 prev_tag = '\0'; /* prev_tag is no longer effective */
6599 /* Verify the item */
6600 else if (get_item_okay(*cp))
6602 /* Forget restrictions */
6603 item_tester_tval = 0;
6604 item_tester_hook = NULL;
6605 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6613 #endif /* ALLOW_REPEAT */
6616 /* Paranoia XXX XXX XXX */
6623 /* No item selected */
6627 /* Full inventory */
6629 i2 = INVEN_PACK - 1;
6631 /* Forbid inventory */
6632 if (!inven) i2 = -1;
6635 for (j = 0; j < INVEN_PACK; j++)
6636 if (item_tester_okay(&inventory[j])) max_inven++;
6639 /* Restrict inventory indexes */
6640 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
6641 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
6644 /* Full equipment */
6646 e2 = INVEN_TOTAL - 1;
6648 /* Forbid equipment */
6649 if (!equip) e2 = -1;
6652 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
6653 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
6654 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
6657 /* Restrict equipment indexes */
6658 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
6659 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
6661 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
6665 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
6667 else if (p_ptr->hidarite) e1 = INVEN_RARM;
6671 /* Count "okay" floor items */
6674 /* Restrict floor usage */
6677 /* Scan all objects in the grid */
6678 floor_num = scan_floor(floor_list, py, px, 0x03);
6681 /* Accept inventory */
6682 if (i1 <= i2) allow_inven = TRUE;
6684 /* Accept equipment */
6685 if (e1 <= e2) allow_equip = TRUE;
6688 if (floor_num) allow_floor = TRUE;
6690 /* Require at least one legal choice */
6691 if (!allow_inven && !allow_equip && !allow_floor)
6693 /* Cancel p_ptr->command_see */
6694 command_see = FALSE;
6702 if (select_the_force) {
6708 /* Analyze choices */
6711 /* Hack -- Start on equipment if requested */
6712 if (command_see && (command_wrk == (USE_EQUIP))
6715 command_wrk = (USE_EQUIP);
6718 /* Use inventory if allowed */
6719 else if (allow_inven)
6721 command_wrk = (USE_INVEN);
6724 /* Use equipment if allowed */
6725 else if (allow_equip)
6727 command_wrk = (USE_EQUIP);
6730 /* Use floor if allowed */
6731 else if (allow_floor)
6733 command_wrk = (USE_FLOOR);
6738 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
6740 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
6742 /* Hack -- start out in "display" mode */
6749 /* Repeat until done */
6752 int get_item_label = 0;
6759 for (j = 0; j < 8; j++)
6762 if (!angband_term[j]) continue;
6764 /* Count windows displaying inven */
6765 if (window_flag[j] & (PW_INVEN)) ni++;
6767 /* Count windows displaying equip */
6768 if (window_flag[j] & (PW_EQUIP)) ne++;
6771 /* Toggle if needed */
6772 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
6773 (command_wrk == (USE_INVEN) && !ni && ne))
6776 toggle_inven_equip();
6783 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6785 /* Redraw windows */
6788 /* Inventory screen */
6789 if (command_wrk == (USE_INVEN))
6791 /* Extract the legal requests */
6795 /* Redraw if needed */
6796 if (command_see) get_item_label = show_inven(menu_line);
6799 /* Equipment screen */
6800 else if (command_wrk == (USE_EQUIP))
6802 /* Extract the legal requests */
6803 n1 = I2A(e1 - INVEN_RARM);
6804 n2 = I2A(e2 - INVEN_RARM);
6806 /* Redraw if needed */
6807 if (command_see) get_item_label = show_equip(menu_line);
6811 else if (command_wrk == (USE_FLOOR))
6814 k = MIN(floor_top + 23, floor_num) - 1;
6816 /* Extract the legal requests */
6817 n1 = I2A(j - floor_top);
6818 n2 = I2A(k - floor_top);
6820 /* Redraw if needed */
6821 if (command_see) get_item_label = show_floor(menu_line, py, px, &min_width);
6824 /* Viewing inventory */
6825 if (command_wrk == (USE_INVEN))
6827 /* Begin the prompt */
6829 sprintf(out_val, "»ý¤Áʪ:");
6831 sprintf(out_val, "Inven:");
6836 /* Build the prompt */
6838 sprintf(tmp_val, "%c-%c,'(',')',",
6840 sprintf(tmp_val, " %c-%c,'(',')',",
6842 index_to_label(i1), index_to_label(i2));
6845 strcat(out_val, tmp_val);
6848 /* Indicate ability to "view" */
6850 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6852 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6860 strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
6861 else if (allow_floor)
6862 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
6864 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6867 strcat(out_val, " / for Equip,");
6868 else if (allow_floor)
6869 strcat(out_val, " 6 for Equip,");
6871 strcat(out_val, " 4 or 6 for Equip,");
6880 strcat(out_val, " '-'¾²¾å,");
6881 else if (allow_equip)
6882 strcat(out_val, " '4' ¾²¾å,");
6884 strcat(out_val, " '4'or'6' ¾²¾å,");
6887 strcat(out_val, " - for floor,");
6888 else if (allow_equip)
6889 strcat(out_val, " 4 for floor,");
6891 strcat(out_val, " 4 or 6 for floor,");
6896 /* Viewing equipment */
6897 else if (command_wrk == (USE_EQUIP))
6899 /* Begin the prompt */
6901 sprintf(out_val, "ÁõÈ÷ÉÊ:");
6903 sprintf(out_val, "Equip:");
6908 /* Build the prompt */
6910 sprintf(tmp_val, "%c-%c,'(',')',",
6912 sprintf(tmp_val, " %c-%c,'(',')',",
6914 index_to_label(e1), index_to_label(e2));
6917 strcat(out_val, tmp_val);
6920 /* Indicate ability to "view" */
6922 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6924 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6932 strcat(out_val, " '/' »ý¤Áʪ,");
6933 else if (allow_floor)
6934 strcat(out_val, " '4' »ý¤Áʪ,");
6936 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6939 strcat(out_val, " / for Inven,");
6940 else if (allow_floor)
6941 strcat(out_val, " 4 for Inven,");
6943 strcat(out_val, " 4 or 6 for Inven,");
6952 strcat(out_val, " '-'¾²¾å,");
6953 else if (allow_inven)
6954 strcat(out_val, " '6' ¾²¾å,");
6956 strcat(out_val, " '4'or'6' ¾²¾å,");
6959 strcat(out_val, " - for floor,");
6960 else if (allow_inven)
6961 strcat(out_val, " 6 for floor,");
6963 strcat(out_val, " 4 or 6 for floor,");
6969 else if (command_wrk == (USE_FLOOR))
6971 /* Begin the prompt */
6973 sprintf(out_val, "¾²¾å:");
6975 sprintf(out_val, "Floor:");
6980 /* Build the prompt */
6982 sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
6984 sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
6988 strcat(out_val, tmp_val);
6991 /* Indicate ability to "view" */
6993 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6995 if (!command_see && !use_menu) strcat(out_val, " * to see,");
7000 if (allow_inven && allow_equip)
7003 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
7005 strcat(out_val, " 4 for Equip, 6 for Inven,");
7008 else if (allow_inven)
7011 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
7013 strcat(out_val, " 4 or 6 for Inven,");
7016 else if (allow_equip)
7019 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
7021 strcat(out_val, " 4 or 6 for Equip,");
7026 else if (allow_inven)
7029 strcat(out_val, " '/' »ý¤Áʪ,");
7031 strcat(out_val, " / for Inven,");
7034 else if (allow_equip)
7037 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
7039 strcat(out_val, " / for Equip,");
7044 if (command_see && !use_menu)
7047 strcat(out_val, " Enter ¼¡,");
7049 strcat(out_val, " Enter for scroll down,");
7056 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
7058 if (select_the_force) strcat(out_val, " w for the Force,");
7061 /* Finish the prompt */
7062 strcat(out_val, " ESC");
7064 /* Build the prompt */
7065 sprintf(tmp_val, "(%s) %s", out_val, pmt);
7067 /* Show the prompt */
7076 if (command_wrk == USE_INVEN) max_line = max_inven;
7077 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7078 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7094 menu_line += (max_line - 1);
7110 /* Verify legality */
7111 if (command_wrk == (USE_INVEN))
7113 if (allow_floor) command_wrk = USE_FLOOR;
7114 else if (allow_equip) command_wrk = USE_EQUIP;
7121 else if (command_wrk == (USE_EQUIP))
7123 if (allow_inven) command_wrk = USE_INVEN;
7124 else if (allow_floor) command_wrk = USE_FLOOR;
7131 else if (command_wrk == (USE_FLOOR))
7133 if (allow_equip) command_wrk = USE_EQUIP;
7134 else if (allow_inven) command_wrk = USE_INVEN;
7147 /* Hack -- Fix screen */
7157 /* Switch inven/equip */
7158 if (command_wrk == USE_INVEN) max_line = max_inven;
7159 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7160 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7161 if (menu_line > max_line) menu_line = max_line;
7163 /* Need to redraw */
7171 /* Verify legality */
7172 if (command_wrk == (USE_INVEN))
7174 if (allow_equip) command_wrk = USE_EQUIP;
7175 else if (allow_floor) command_wrk = USE_FLOOR;
7182 else if (command_wrk == (USE_EQUIP))
7184 if (allow_floor) command_wrk = USE_FLOOR;
7185 else if (allow_inven) command_wrk = USE_INVEN;
7192 else if (command_wrk == (USE_FLOOR))
7194 if (allow_inven) command_wrk = USE_INVEN;
7195 else if (allow_equip) command_wrk = USE_EQUIP;
7208 /* Hack -- Fix screen */
7218 /* Switch inven/equip */
7219 if (command_wrk == USE_INVEN) max_line = max_inven;
7220 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7221 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7222 if (menu_line > max_line) menu_line = max_line;
7224 /* Need to redraw */
7233 if (command_wrk == USE_FLOOR)
7236 (*cp) = -get_item_label;
7240 /* Validate the item */
7241 if (!get_item_okay(get_item_label))
7247 /* Allow player to "refuse" certain actions */
7248 if (!get_item_allow(get_item_label))
7254 /* Accept that choice */
7255 (*cp) = get_item_label;
7264 if (select_the_force) {
7272 if (menu_line > max_line) menu_line -= max_line;
7293 command_see = FALSE;
7316 cave_type *c_ptr = &cave[py][px];
7318 if (command_wrk != (USE_FLOOR)) break;
7320 /* Get the object being moved. */
7321 o_idx = c_ptr->o_idx;
7323 /* Only rotate a pile of two or more objects. */
7324 if (!(o_idx && o_list[o_idx].next_o_idx)) break;
7326 /* Remove the first object from the list. */
7327 excise_object_idx(o_idx);
7329 /* Find end of the list. */
7331 while (o_list[i].next_o_idx)
7332 i = o_list[i].next_o_idx;
7334 /* Add after the last object. */
7335 o_list[i].next_o_idx = o_idx;
7337 /* Re-scan floor list */
7338 floor_num = scan_floor(floor_list, py, px, 0x03);
7340 /* Hack -- Fix screen */
7355 if (command_wrk == (USE_INVEN))
7362 command_wrk = (USE_EQUIP);
7364 else if (command_wrk == (USE_EQUIP))
7371 command_wrk = (USE_INVEN);
7373 else if (command_wrk == (USE_FLOOR))
7377 command_wrk = (USE_INVEN);
7379 else if (allow_equip)
7381 command_wrk = (USE_EQUIP);
7390 /* Hack -- Fix screen */
7400 /* Need to redraw */
7413 * If we are already examining the floor, and there
7414 * is only one item, we will always select it.
7415 * If we aren't examining the floor and there is only
7416 * one item, we will select it if floor_query_flag
7421 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
7424 k = 0 - floor_list[0];
7426 /* Allow player to "refuse" certain actions */
7427 if (!get_item_allow(k))
7433 /* Accept that choice */
7442 /* Hack -- Fix screen */
7452 command_wrk = (USE_FLOOR);
7458 case '1': case '2': case '3':
7459 case '4': case '5': case '6':
7460 case '7': case '8': case '9':
7462 if (command_wrk != USE_FLOOR)
7464 /* Look up the tag */
7465 if (!get_tag(&k, which, command_wrk))
7471 /* Hack -- Validate the item */
7472 if ((k < INVEN_RARM) ? !inven : !equip)
7478 /* Validate the item */
7479 if (!get_item_okay(k))
7487 /* Look up the alphabetical tag */
7488 if (get_tag_floor(&k, which, floor_list, floor_num))
7491 k = 0 - floor_list[k];
7500 /* Allow player to "refuse" certain actions */
7501 if (!get_item_allow(k))
7507 /* Accept that choice */
7513 #endif /* ALLOW_REPEAT */
7521 /* Choose "default" inventory item */
7522 if (command_wrk == (USE_INVEN))
7524 k = ((i1 == i2) ? i1 : -1);
7527 /* Choose "default" equipment item */
7528 else if (command_wrk == (USE_EQUIP))
7530 k = ((e1 == e2) ? e1 : -1);
7533 /* Choose "default" floor item */
7534 else if (command_wrk == (USE_FLOOR))
7539 k = 0 - floor_list[0];
7541 /* Allow player to "refuse" certain actions */
7542 if (!get_item_allow(k))
7548 /* Accept that choice */
7556 /* Validate the item */
7557 if (!get_item_okay(k))
7563 /* Allow player to "refuse" certain actions */
7564 if (!get_item_allow(k))
7570 /* Accept that choice */
7580 if (select_the_force) {
7594 if (command_wrk != USE_FLOOR)
7596 bool not_found = FALSE;
7598 /* Look up the alphabetical tag */
7599 if (!get_tag(&k, which, command_wrk))
7604 /* Hack -- Validate the item */
7605 else if ((k < INVEN_RARM) ? !inven : !equip)
7610 /* Validate the item */
7611 else if (!get_item_okay(k))
7618 /* Accept that choice */
7624 #endif /* ALLOW_REPEAT */
7630 /* Look up the alphabetical tag */
7631 if (get_tag_floor(&k, which, floor_list, floor_num))
7634 k = 0 - floor_list[k];
7636 /* Accept that choice */
7642 #endif /* ALLOW_REPEAT */
7647 /* Extract "query" setting */
7648 ver = isupper(which);
7649 which = tolower(which);
7651 /* Convert letter to inventory index */
7652 if (command_wrk == (USE_INVEN))
7654 if (which == '(') k = i1;
7655 else if (which == ')') k = i2;
7656 else k = label_to_inven(which);
7659 /* Convert letter to equipment index */
7660 else if (command_wrk == (USE_EQUIP))
7662 if (which == '(') k = e1;
7663 else if (which == ')') k = e2;
7664 else k = label_to_equip(which);
7667 /* Convert letter to floor index */
7668 else if (command_wrk == USE_FLOOR)
7670 if (which == '(') k = 0;
7671 else if (which == ')') k = floor_num - 1;
7672 else k = islower(which) ? A2I(which) : -1;
7673 if (k < 0 || k >= floor_num || k >= 23)
7680 k = 0 - floor_list[k];
7683 /* Validate the item */
7684 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
7690 /* Verify the item */
7692 if (ver && !verify("ËÜÅö¤Ë", k))
7694 if (ver && !verify("Try", k))
7702 /* Allow player to "refuse" certain actions */
7703 if (!get_item_allow(k))
7709 /* Accept that choice */
7719 /* Fix the screen if necessary */
7725 /* Hack -- Cancel "display" */
7726 command_see = FALSE;
7730 /* Forget the item_tester_tval restriction */
7731 item_tester_tval = 0;
7733 /* Forget the item_tester_hook restriction */
7734 item_tester_hook = NULL;
7737 /* Clean up 'show choices' */
7738 /* Toggle again if needed */
7739 if (toggle) toggle_inven_equip();
7742 p_ptr->window |= (PW_INVEN | PW_EQUIP);
7748 /* Clear the prompt line */
7751 /* Warning if needed */
7752 if (oops && str) msg_print(str);
7758 if (command_cmd) prev_tag = cur_tag;
7759 #endif /* ALLOW_REPEAT */
7761 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
7769 static bool py_pickup_floor_aux(void)
7777 /* Restrict the choices */
7778 item_tester_hook = inven_carry_okay;
7782 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
7783 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
7785 q = "Get which item? ";
7786 s = "You no longer have any room for the objects on the floor.";
7789 if (get_item(&item, q, s, (USE_FLOOR)))
7791 this_o_idx = 0 - item;
7798 /* Pick up the object */
7799 py_pickup_aux(this_o_idx);
7806 * Make the player carry everything in a grid
7808 * If "pickup" is FALSE then only gold will be picked up
7810 * This is called by py_pickup() when easy_floor is TRUE.
7812 void py_pickup_floor(bool pickup)
7814 s16b this_o_idx, next_o_idx = 0;
7816 char o_name[MAX_NLEN];
7819 int floor_num = 0, floor_list[23], floor_o_idx = 0;
7823 /* Scan the pile of objects */
7824 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
7828 /* Access the object */
7829 o_ptr = &o_list[this_o_idx];
7831 /* Describe the object */
7832 object_desc(o_name, o_ptr, 0);
7834 /* Access the next object */
7835 next_o_idx = o_ptr->next_o_idx;
7837 /* Hack -- disturb */
7841 if (o_ptr->tval == TV_GOLD)
7845 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
7846 (long)o_ptr->pval, o_name);
7848 msg_format("You have found %ld gold pieces worth of %s.",
7849 (long) o_ptr->pval, o_name);
7853 /* Collect the gold */
7854 p_ptr->au += o_ptr->pval;
7857 p_ptr->redraw |= (PR_GOLD);
7860 p_ptr->window |= (PW_PLAYER);
7862 /* Delete the gold */
7863 delete_object_idx(this_o_idx);
7865 /* Check the next object */
7868 else if (o_ptr->marked & OM_NOMSG)
7870 /* If 0 or 1 non-NOMSG items are in the pile, the NOMSG ones are
7871 * ignored. Otherwise, they are included in the prompt. */
7872 o_ptr->marked &= ~(OM_NOMSG);
7876 /* Count non-gold objects that can be picked up. */
7877 if (inven_carry_okay(o_ptr))
7882 /* Remember this object index */
7884 floor_list[floor_num] = this_o_idx;
7886 /* Count non-gold objects */
7889 /* Remember this index */
7890 floor_o_idx = this_o_idx;
7893 /* There are no non-gold objects */
7897 /* Mention the number of objects */
7903 /* Access the object */
7904 o_ptr = &o_list[floor_o_idx];
7906 #ifdef ALLOW_EASY_SENSE
7908 /* Option: Make object sensing easy */
7911 /* Sense the object */
7912 (void) sense_object(o_ptr);
7915 #endif /* ALLOW_EASY_SENSE */
7917 /* Describe the object */
7918 object_desc(o_name, o_ptr, 0);
7922 msg_format("%s¤¬¤¢¤ë¡£", o_name);
7924 msg_format("You see %s.", o_name);
7929 /* Multiple objects */
7934 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
7936 msg_format("You see a pile of %d items.", floor_num);
7945 /* The player has no room for anything on the floor. */
7951 /* Access the object */
7952 o_ptr = &o_list[floor_o_idx];
7954 #ifdef ALLOW_EASY_SENSE
7956 /* Option: Make object sensing easy */
7959 /* Sense the object */
7960 (void) sense_object(o_ptr);
7963 #endif /* ALLOW_EASY_SENSE */
7965 /* Describe the object */
7966 object_desc(o_name, o_ptr, 0);
7970 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7972 msg_format("You have no room for %s.", o_name);
7977 /* Multiple objects */
7982 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7984 msg_print("You have no room for any of the objects on the floor.");
7996 /* Hack -- query every object */
7997 if (carry_query_flag)
7999 char out_val[MAX_NLEN+20];
8001 /* Access the object */
8002 o_ptr = &o_list[floor_o_idx];
8004 #ifdef ALLOW_EASY_SENSE
8006 /* Option: Make object sensing easy */
8009 /* Sense the object */
8010 (void) sense_object(o_ptr);
8013 #endif /* ALLOW_EASY_SENSE */
8015 /* Describe the object */
8016 object_desc(o_name, o_ptr, 0);
8018 /* Build a prompt */
8020 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
8022 (void) sprintf(out_val, "Pick up %s? ", o_name);
8026 /* Ask the user to confirm */
8027 if (!get_check(out_val))
8034 /* Access the object */
8035 o_ptr = &o_list[floor_o_idx];
8037 #ifdef ALLOW_EASY_SENSE
8039 /* Option: Make object sensing easy */
8042 /* Sense the object */
8043 (void) sense_object(o_ptr);
8046 #endif /* ALLOW_EASY_SENSE */
8048 /* Pick up the object */
8049 py_pickup_aux(floor_o_idx);
8052 /* Allow the user to choose an object */
8055 while (can_pickup--)
8057 if (!py_pickup_floor_aux()) break;
8062 #endif /* ALLOW_EASY_FLOOR */