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";
1185 case ART_HEAVENLY_MAIDEN:
1188 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1190 return "word of recall every 200 turns";
1197 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1199 return "haste self (20+d20 turns) every 100+d100 turns";
1206 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
1208 return "identify every 10 turns";
1215 return "Ä´ºº¡¢Á´´¶ÃΡ¢Á´´ÕÄê : 100 ¥¿¡¼¥óËè";
1217 return "probing, detection and full id every 100 turns";
1224 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
1226 return "mass genocide every 1000 turns";
1233 return "½ý¤Î¼£Ìþ(4d8) : 3+d3 ¥¿¡¼¥óËè";
1235 return "cure wounds (4d8) every 3+d3 turns";
1243 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
1245 return "fire branding of bolts every 999 turns";
1252 return "¥Õ¥¡¥¤¥¢¡ª : 15 ¥¿¡¼¥óËè";
1254 return "fire! every 15 turns";
1259 case ART_WEREWINDLE:
1262 return "ƨÁö : 35 ¥¿¡¼¥óËè";
1264 return "a getaway every 35 turns";
1271 return "¥Æ¥ì¥Ý¡¼¥È : 25 ¥¿¡¼¥óËè";
1273 return "a teleport every 25 turns";
1280 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1282 return "lightning ball (100) every 200 turns";
1289 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1291 return "frost ball (100) every 200 turns";
1298 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
1300 return "stone to mud every 5 turns";
1307 return "´äÀÐÍϲò : 2 ¥¿¡¼¥óËè";
1309 return "stone to mud every 2 turns";
1313 case ART_SOULKEEPER:
1316 return "ÂÎÎϲóÉü(1000) : 888 ¥¿¡¼¥óËè";
1318 return "heal (1000) every 888 turns";
1325 return ("²óÉü (777)¡¢Ìþ¤·¡¢»Îµ¤¹âÍÈ : 300 ¥¿¡¼¥óËè");
1327 return ("heal (777), curing and heroism every 300 turns");
1334 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
1336 return "genocide every 500 turns";
1343 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
1345 return "restore life levels every 450 turns";
1352 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
1354 return "teleport away every 150 turns";
1362 return "Á´ÂÑÀ(20+d20¥¿¡¼¥ó) : 111 ¥¿¡¼¥óËè";
1364 return "resistance (20+d20 turns) every 111 turns";
1368 case ART_HOLCOLLETH:
1371 return "¥¹¥ê¡¼¥×(II) : 55 ¥¿¡¼¥óËè";
1373 return "sleep II every 55 turns";
1380 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
1382 return "recharge item I every 70 turns";
1389 return "¥Æ¥ì¥Ý¡¼¥È : 45 ¥¿¡¼¥óËè";
1391 return "teleport every 45 turns";
1398 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
1400 return "confuse monster every 15 turns";
1404 case ART_CAMMITHRIM:
1407 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1409 return "magic missile (2d6) every 2 turns";
1416 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1418 return "fire bolt (9d8) every 8+d8 turns";
1422 case ART_PAURNIMMEN:
1425 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1427 return "frost bolt (6d8) every 7+d7 turns";
1434 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1436 return "lightning bolt (4d8) every 5+d5 turns";
1443 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
1445 return "acid bolt (5d8) every 6+d6 turns";
1452 return "ËâË¡¤ÎÌð(150) : 90+d90 ¥¿¡¼¥óËè";
1454 return "a magical arrow (150) every 90+d90 turns";
1458 case ART_HOLHENNETH:
1461 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
1463 return "detection every 55+d55 turns";
1470 return "ÂÎÎϲóÉü(700) : 250 ¥¿¡¼¥óËè";
1472 return "heal (700) every 250 turns";
1479 return "¥¹¥¿¡¼¡¦¥Ü¡¼¥ë(150) : 1000 ¥¿¡¼¥óËè";
1481 return "star ball (150) every 1000 turns";
1485 case ART_BLADETURNER:
1488 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300), »Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢ÂÑÀ";
1490 return "breathe elements (300), hero, bless, and resistance";
1497 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1499 return "illumination every 10+d10 turns";
1506 return "ËâË¡¤ÎÃϿޤȸ÷ : 50+d50 ¥¿¡¼¥óËè";
1508 return "magic mapping and light every 50+d50 turns";
1515 return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô : 20+d20 ¥¿¡¼¥óËè";
1517 return "clairvoyance and recall, draining you every 20+d20 turns";
1525 return "¼Ù°Â໶(x5) : 200+d200 ¥¿¡¼¥óËè";
1527 return "dispel evil (x5) every 200+d200 turns";
1534 return "¼Ù°Â໶(x5) : 100+d100 ¥¿¡¼¥óËè";
1536 return "dispel evil (x5) every 100+d100 turns";
1544 return "Âмٰ·ë³¦ : 225+d225 ¥¿¡¼¥óËè";
1546 return "protection from evil every 225+d225 turns";
1553 return "Ã⩹¶·â(100) : 100+d100 ¥¿¡¼¥óËè";
1555 return "a strangling attack (100) every 100+d100 turns";
1562 return "¥¹¥Ô¡¼¥É(75+d75¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1564 return "haste self (75+d75 turns) every 150+d150 turns";
1571 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(300) : 225+d225 ¥¿¡¼¥óËè";
1573 return "large fire ball (300) every 225+d225 turns";
1580 return "µðÂ祢¥¤¥¹¡¦¥Ü¡¼¥ë(400) : 325+d325 ¥¿¡¼¥óËè";
1582 return "large frost ball (400) every 325+d325 turns";
1590 return "µðÂ祵¥ó¥À¡¼¡¦¥Ü¡¼¥ë(500) : 425+d425 ¥¿¡¼¥óËè";
1592 return "large lightning ball (500) every 425+d425 turns";
1600 return "¿®¤¸Æñ¤¤¤³¤È : 450+d450 ¥¿¡¼¥óËè";
1602 return "bizarre things every 450+d450 turns";
1606 case ART_DOR: case ART_TERROR: case ART_STONEMASK:
1609 return "Á´Êý¸þ¤Ø¤Î¶²Éݤθ÷Àþ : 3*(¥ì¥Ù¥ë+10) ¥¿¡¼¥óËè";
1611 return "rays of fear in every direction every 3*(level+10) turns";
1618 return "¤³¤Î³¬¤Ë¤¤¤ë¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òɽ¼¨ : 200¥¿¡¼¥óËè";
1620 return "list of the uniques on the level every 200 turns";
1623 case ART_STONE_LORE:
1626 return "´í¸±¤òȼ¤¦´ÕÄê : ¤¤¤Ä¤Ç¤â";
1628 return "perilous identify every turn";
1634 return "³²Ãî¤Î¶î½ü : 55+d55¥¿¡¼¥óËè";
1636 return "dispel small life every 55+d55 turns";
1642 return "¥â¥ó¥¹¥¿¡¼¶²¹² : 40+d40¥¿¡¼¥óËè";
1644 return "frighten monsters every 40+d40 turns";
1650 return "Âмٰ·ë³¦ : 200+d200 ¥¿¡¼¥óËè";
1652 return "protection from evil every 200 + d200 turns";
1658 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
1660 return "a mana bolt (120) every 120+d120 turns";
1666 return "»Îµ¤¹âÍÈ, ¥¹¥Ô¡¼¥É(50+d50¥¿¡¼¥ó) : 100+d200 ¥¿¡¼¥óËè";
1668 return "hero and +10 to speed (50) every 100+200d turns";
1674 return "âÁ¤·¤¤¸÷ : 250 ¥¿¡¼¥óËè";
1676 return "blinding light every 250 turns";
1682 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
1684 return "recharge item every 200 turns";
1690 return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë";
1692 return "increase STR (destroyed 50%)";
1698 return "ËâÎϤÎÍò(400) : 250+d250¥¿¡¼¥óËè";
1700 return "a mana storm every 250+d250 turns";
1706 return "ʪÂΤò°ú¤´ó¤»¤ë(½ÅÎÌ25kg¤Þ¤Ç) : 25+d25¥¿¡¼¥óËè";
1708 return "a telekinesis (500 lb) every 25+d25 turns";
1714 return "¥Ï¥¦¥ó¥É¾¤´ : 300+d150¥¿¡¼¥óËè";
1716 return "summon hound every 300+d150 turns";
1722 return "µðÂ祹¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 200+d200 ¥¿¡¼¥óËè";
1724 return "large star ball (200) every 200+d200 turns";
1731 return "Îã¤Î¥¢¥ì : 150+d150 ¥¿¡¼¥óËè";
1733 return "reveal your identity every 150+d150 turns";
1740 return "Çï»ÒÌÚ¤òÂǤÁ¤Ê¤é¤¹ : ¤¤¤Ä¤Ç¤â";
1742 return "beat wooden clappers every turn";
1750 return "»Îµ¤¹âÍÈ : 30+d30¥¿¡¼¥óËè";
1752 return "heroism every 30+d30 turns";
1760 return "Ìþ¤· : 100¥¿¡¼¥óËè";
1762 return "curing every 100 turns";
1770 return "ưʪ̥λ : 200¥¿¡¼¥óËè";
1772 return "charm animal every 200 turns";
1779 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(12d8) : 50 ¥¿¡¼¥óËè";
1781 return "frost bolt (12d8) every 50 turns";
1788 return "°ÀÊѹ¹ : 3333 ¥¿¡¼¥óËè";
1790 return "change zokusei every 3333 turns";
1797 return "¥¦¥©¡¼¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 250 ¥¿¡¼¥óËè";
1799 return "water ball (200) every 250 turns";
1806 return "»Í¸ÔƧ¤ß : 100+d100¥¿¡¼¥óËè";
1808 return "shiko every 100+d100 turns";
1815 return "Î䵤¤ÎÂÑÀ : 40+d40¥¿¡¼¥óËè";
1817 return "resist cold every 40+d40 turns";
1824 return "Âý¤ÎÂç·²¾¤´ : 300+d150¥¿¡¼¥óËè";
1826 return "summon octopus every 300+d150 turns";
1833 return "°Å¹õ¤ÎÍò(250) : 150+d150 ¥¿¡¼¥óËè";
1835 return "darkness storm (250) every 150+d150 turns";
1839 case ART_SACRED_KNIGHTS:
1842 return "*²ò¼ö*¤ÈÄ´ºº: ¤¤¤Ä¤Ç¤â";
1844 return "dispel curse and probing every turn";
1851 return "ËâÎÏÉü³è: 777 ¥¿¡¼¥óËè";
1853 return "restore mana every 777 turns";
1857 case ART_AESCULAPIUS:
1860 return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃÍÉü³è : 750 ¥¿¡¼¥óËè";
1862 return "restore stats and life levels every 750 turns";
1868 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_TSURIZAO))
1871 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
1873 return "fishing : every time";
1878 if (object_is_smith(o_ptr))
1880 switch (o_ptr->xtra3 - 1)
1882 case ESSENCE_TMP_RES_ACID:
1884 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1886 return "resist acid every 50+d50 turns";
1889 case ESSENCE_TMP_RES_ELEC:
1891 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1893 return "resist elec every 50+d50 turns";
1896 case ESSENCE_TMP_RES_FIRE:
1898 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1900 return "resist fire every 50+d50 turns";
1903 case ESSENCE_TMP_RES_COLD:
1905 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1907 return "resist cold every 50+d50 turns";
1912 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1914 return "earthquake every 100+d100 turns";
1919 if (o_ptr->name2 == EGO_TRUMP)
1922 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
1924 return "teleport every 50+d50 turns";
1929 if (o_ptr->name2 == EGO_LITE_ILLUMINATION)
1932 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1934 return "illumination every 10+d10 turns";
1938 else if (o_ptr->name2 == EGO_EARTHQUAKES)
1941 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1943 return "earthquake every 100+d100 turns";
1948 else if (o_ptr->name2 == EGO_JUMP)
1951 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1953 return "blink every 10+d10 turns";
1958 if (o_ptr->tval == TV_RING)
1960 if (object_is_ego(o_ptr))
1962 switch (o_ptr->name2)
1966 return "»Îµ¤¹âÍÈ : 100+d100¥¿¡¼¥óËè";
1968 return "heroism every 100+d100 turns";
1970 case EGO_RING_MAGIC_MIS:
1972 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1974 return "magic missile (2d6) every 2 turns";
1976 case EGO_RING_FIRE_BOLT:
1978 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1980 return "fire bolt (9d8) every 8+d8 turns";
1982 case EGO_RING_COLD_BOLT:
1984 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1986 return "frost bolt (6d8) every 7+d7 turns";
1988 case EGO_RING_ELEC_BOLT:
1990 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1992 return "lightning bolt (4d8) every 5+d5 turns";
1994 case EGO_RING_ACID_BOLT:
1996 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
1998 return "acid bolt (5d8) every 6+d6 turns";
2000 case EGO_RING_MANA_BOLT:
2002 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
2004 return "a mana bolt (120) every 120+d120 turns";
2006 case EGO_RING_FIRE_BALL:
2008 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2010 return "fire ball (100) every 80+d80 turns";
2012 case EGO_RING_COLD_BALL:
2014 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2016 return "cold ball (100) every 80+d80 turns";
2018 case EGO_RING_ELEC_BALL:
2020 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2022 return "elec ball (100) every 80+d80 turns";
2024 case EGO_RING_ACID_BALL:
2026 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2028 return "acid ball (100) every 80+d80 turns";
2030 case EGO_RING_MANA_BALL:
2032 return "ËâÎϤÎÍò (250) : 300 ¥¿¡¼¥óËè";
2034 return "mana storm (250) every 300 turns";
2036 case EGO_RING_DRAGON_F:
2037 if (o_ptr->sval == SV_RING_FLAMES)
2039 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) ¤È²Ð¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
2041 return "breath of fire (200) and resist fire every 200 turns";
2045 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2047 return "fire breath (200) every 250 turns";
2049 case EGO_RING_DRAGON_C:
2050 if (o_ptr->sval == SV_RING_ICE)
2052 return "Î䵤¤Î¥Ö¥ì¥¹ (200) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
2054 return "breath of cold (200) and resist cold every 200 turns";
2058 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2060 return "cold breath (200) every 250 turns";
2062 case EGO_RING_M_DETECT:
2064 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃÎ : 150 ¥¿¡¼¥óËè";
2066 return "detect all monsters every 150 turns";
2068 case EGO_RING_D_SPEED:
2070 return "¥¹¥Ô¡¼¥É(15+d30¥¿¡¼¥ó) : 100 ¥¿¡¼¥óËè";
2072 return "haste self (15+d30 turns) every 100 turns";
2074 case EGO_RING_BERSERKER:
2076 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
2078 return "berserk (25+d25 turns) every 75+d75 turns";
2080 case EGO_RING_TELE_AWAY:
2082 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
2084 return "teleport away every 150 turns";
2088 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ : 777 ¥¿¡¼¥óËè";
2090 return "hero, bless, and ultimate resistance every 777 turns";
2094 switch (o_ptr->sval)
2096 case SV_RING_FLAMES:
2098 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) ¤È²Ð¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2100 return "ball of fire (100) and resist fire every 50+d50 turns";
2105 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2107 return "ball of cold (100) and resist cold every 50+d50 turns";
2112 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) ¤È»À¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2114 return "ball of acid (100) and resist acid every 50+d50 turns";
2119 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) ¤ÈÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2121 return "ball of elec (100) and resist elec every 50+d50 turns";
2129 if (o_ptr->tval == TV_AMULET)
2131 if (object_is_ego(o_ptr))
2133 switch (o_ptr->name2)
2137 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
2139 return "identify every 10 turns";
2143 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
2145 return "charm monster every 200 turns";
2149 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
2151 return "blink every 10+d10 turns";
2153 case EGO_AMU_TELEPORT:
2155 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
2157 return "teleport every 50+d50 turns";
2159 case EGO_AMU_D_DOOR:
2161 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
2163 return "dimension door every 200 turns";
2165 case EGO_AMU_RES_FIRE_:
2167 return "²Ð±ê¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2169 return "resist fire every 50+d50 turns";
2171 case EGO_AMU_RES_COLD_:
2173 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2175 return "resist cold every 50+d50 turns";
2177 case EGO_AMU_RES_ELEC_:
2179 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2181 return "resist elec every 50+d50 turns";
2183 case EGO_AMU_RES_ACID_:
2185 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2187 return "resist acid every 50+d50 turns";
2189 case EGO_AMU_DETECTION:
2191 return "Á´´¶ÃÎ : 55+d55¥¿¡¼¥óËè";
2193 return "detect all floor every 55+d55 turns";
2199 if (o_ptr->tval == TV_WHISTLE)
2202 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
2204 return "call pet every 100+d100 turns";
2208 if (o_ptr->tval == TV_CAPTURE)
2211 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
2213 return "captures or releases a monster.";
2217 /* Require dragon scale mail */
2219 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
2221 if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
2225 /* Branch on the sub-type */
2226 switch (o_ptr->sval)
2228 case SV_DRAGON_BLUE:
2231 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
2233 return "breathe lightning (100) every 150+d150 turns";
2237 case SV_DRAGON_WHITE:
2240 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
2242 return "breathe frost (110) every 150+d150 turns";
2246 case SV_DRAGON_BLACK:
2249 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
2251 return "breathe acid (130) every 150+d150 turns";
2255 case SV_DRAGON_GREEN:
2258 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
2260 return "breathe poison gas (150) every 180+d180 turns";
2267 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2269 return "breathe fire (200) every 200+d200 turns";
2273 case SV_DRAGON_MULTIHUED:
2276 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
2278 return "breathe multi-hued (250) every 200+d200 turns";
2282 case SV_DRAGON_BRONZE:
2285 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
2287 return "breathe confusion (120) every 180+d180 turns";
2291 case SV_DRAGON_GOLD:
2294 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
2296 return "breathe sound (130) every 180+d180 turns";
2300 case SV_DRAGON_CHAOS:
2303 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
2305 return "breathe chaos/disenchant (220) every 200+d200 turns";
2312 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
2314 return "breathe sound/shards (230) every 200+d200 turns";
2318 case SV_DRAGON_BALANCE:
2321 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
2323 return "breathe balance (250) every 200+d200 turns";
2327 case SV_DRAGON_SHINING:
2330 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2332 return "breathe light/darkness (200) every 200+d200 turns";
2336 case SV_DRAGON_POWER:
2339 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
2341 return "breathe the elements (300) every 200+d200 turns";
2351 return "breathe air";
2358 * Describe a "fully identified" item
2360 bool screen_object(object_type *o_ptr, u32b mode)
2364 u32b flgs[TR_FLAG_SIZE];
2368 char o_name[MAX_NLEN];
2371 int trivial_info = 0;
2373 /* Extract the flags */
2374 object_flags(o_ptr, flgs);
2376 /* Extract the description */
2378 roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
2379 (k_text + k_info[o_ptr->k_idx].text),
2380 77 - 15, temp, sizeof(temp));
2381 for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
2382 { info[i] = &temp[j]; i++;}
2385 if (object_is_equipment(o_ptr))
2387 /* Descriptions of a basic equipment is just a flavor */
2391 /* Mega-Hack -- describe activation */
2392 if (have_flag(flgs, TR_ACTIVATE))
2395 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
2397 info[i++] = "It can be activated for...";
2400 info[i++] = item_activation(o_ptr);
2402 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
2404 info[i++] = "...if it is being worn.";
2409 /* Figurines, a hack */
2410 if (o_ptr->tval == TV_FIGURINE)
2413 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
2415 info[i++] = "It will transform into a pet when thrown.";
2420 /* Figurines, a hack */
2421 if (o_ptr->name1 == ART_STONEMASK)
2424 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
2426 info[i++] = "It makes you turn into a vampire permanently.";
2431 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
2434 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
2436 info[i++] = "It will attempt to kill a monster instantly.";
2441 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
2444 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
2446 info[i++] = "It causes you to strike yourself sometimes.";
2450 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
2452 info[i++] = "It always penetrates invulnerability barriers.";
2456 if (o_ptr->name2 == EGO_2WEAPON)
2459 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
2461 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
2466 if (have_flag(flgs, TR_EASY_SPELL))
2469 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
2471 info[i++] = "It affects your ability to cast spells.";
2475 if (o_ptr->name2 == EGO_AMU_FOOL)
2478 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
2480 info[i++] = "It interferes with casting spells.";
2484 if (o_ptr->name2 == EGO_RING_THROW)
2487 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2489 info[i++] = "It provides great strength when you throw an item.";
2493 if (o_ptr->name2 == EGO_AMU_NAIVETY)
2496 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
2498 info[i++] = "It decreases your magic resistance.";
2502 if (o_ptr->tval == TV_STATUE)
2504 monster_race *r_ptr = &r_info[o_ptr->pval];
2506 if (o_ptr->pval == MON_BULLGATES)
2508 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
2510 info[i++] = "It is shameful.";
2512 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
2514 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
2516 info[i++] = "It is fearful.";
2520 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
2522 info[i++] = "It is cheerful.";
2526 /* Hack -- describe lite's */
2527 if (o_ptr->tval == TV_LITE)
2529 if (o_ptr->name2 == EGO_LITE_DARKNESS)
2532 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
2534 info[i++] = "It provides no light.";
2537 if (o_ptr->sval == SV_LITE_FEANOR)
2540 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-3)¡£";
2542 info[i++] = "It decreases radius of light source by 3.";
2545 else if (o_ptr->sval == SV_LITE_LANTERN)
2548 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
2550 info[i++] = "It decreases radius of light source by 2.";
2556 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
2558 info[i++] = "It decreases radius of light source by 1.";
2562 else if (object_is_fixed_artifact(o_ptr))
2565 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2567 info[i++] = "It provides light (radius 3) forever.";
2571 else if (o_ptr->name2 == EGO_LITE_SHINE)
2573 if (o_ptr->sval == SV_LITE_FEANOR)
2576 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2578 info[i++] = "It provides light (radius 3) forever.";
2582 else if (o_ptr->sval == SV_LITE_LANTERN)
2585 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2587 info[i++] = "It provides light (radius 3) when fueled.";
2594 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2596 info[i++] = "It provides light (radius 2) when fueled.";
2603 if (o_ptr->sval == SV_LITE_FEANOR)
2606 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2608 info[i++] = "It provides light (radius 2) forever.";
2612 else if (o_ptr->sval == SV_LITE_LANTERN)
2615 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2617 info[i++] = "It provides light (radius 2) when fueled.";
2624 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
2626 info[i++] = "It provides light (radius 1) when fueled.";
2631 if (o_ptr->name2 == EGO_LITE_LONG)
2634 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
2636 info[i++] = "It provides light for much longer time.";
2642 /* And then describe it fully */
2644 if (have_flag(flgs, TR_RIDING))
2646 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
2648 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
2650 info[i++] = "It is made for use while riding.";
2655 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
2657 info[i++] = "It is suitable for use while riding.";
2659 /* This information is not important enough */
2663 if (have_flag(flgs, TR_STR))
2666 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2668 info[i++] = "It affects your strength.";
2672 if (have_flag(flgs, TR_INT))
2675 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2677 info[i++] = "It affects your intelligence.";
2681 if (have_flag(flgs, TR_WIS))
2684 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2686 info[i++] = "It affects your wisdom.";
2690 if (have_flag(flgs, TR_DEX))
2693 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2695 info[i++] = "It affects your dexterity.";
2699 if (have_flag(flgs, TR_CON))
2702 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2704 info[i++] = "It affects your constitution.";
2708 if (have_flag(flgs, TR_CHR))
2711 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2713 info[i++] = "It affects your charisma.";
2718 if (have_flag(flgs, TR_MAGIC_MASTERY))
2721 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2723 info[i++] = "It affects your ability to use magic devices.";
2727 if (have_flag(flgs, TR_STEALTH))
2730 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2732 info[i++] = "It affects your stealth.";
2736 if (have_flag(flgs, TR_SEARCH))
2739 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2741 info[i++] = "It affects your searching.";
2745 if (have_flag(flgs, TR_INFRA))
2748 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2750 info[i++] = "It affects your infravision.";
2754 if (have_flag(flgs, TR_TUNNEL))
2757 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
2759 info[i++] = "It affects your ability to tunnel.";
2763 if (have_flag(flgs, TR_SPEED))
2766 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2768 info[i++] = "It affects your speed.";
2772 if (have_flag(flgs, TR_BLOWS))
2775 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
2777 info[i++] = "It affects your attack speed.";
2782 if (have_flag(flgs, TR_BRAND_ACID))
2785 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
2787 info[i++] = "It does extra damage from acid.";
2791 if (have_flag(flgs, TR_BRAND_ELEC))
2794 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
2796 info[i++] = "It does extra damage from electricity.";
2800 if (have_flag(flgs, TR_BRAND_FIRE))
2803 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
2805 info[i++] = "It does extra damage from fire.";
2809 if (have_flag(flgs, TR_BRAND_COLD))
2812 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
2814 info[i++] = "It does extra damage from frost.";
2819 if (have_flag(flgs, TR_BRAND_POIS))
2822 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
2824 info[i++] = "It poisons your foes.";
2829 if (have_flag(flgs, TR_CHAOTIC))
2832 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
2834 info[i++] = "It produces chaotic effects.";
2839 if (have_flag(flgs, TR_VAMPIRIC))
2842 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
2844 info[i++] = "It drains life from your foes.";
2849 if (have_flag(flgs, TR_IMPACT))
2852 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
2854 info[i++] = "It can cause earthquakes.";
2859 if (have_flag(flgs, TR_VORPAL))
2862 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2864 info[i++] = "It is very sharp and can cut your foes.";
2869 if (have_flag(flgs, TR_KILL_DRAGON))
2872 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2874 info[i++] = "It is a great bane of dragons.";
2878 else if (have_flag(flgs, TR_SLAY_DRAGON))
2881 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2883 info[i++] = "It is especially deadly against dragons.";
2888 if (have_flag(flgs, TR_KILL_ORC))
2891 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2893 info[i++] = "It is a great bane of orcs.";
2897 if (have_flag(flgs, TR_SLAY_ORC))
2900 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2902 info[i++] = "It is especially deadly against orcs.";
2907 if (have_flag(flgs, TR_KILL_TROLL))
2910 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2912 info[i++] = "It is a great bane of trolls.";
2916 if (have_flag(flgs, TR_SLAY_TROLL))
2919 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2921 info[i++] = "It is especially deadly against trolls.";
2926 if (have_flag(flgs, TR_KILL_GIANT))
2929 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2931 info[i++] = "It is a great bane of giants.";
2934 else if (have_flag(flgs, TR_SLAY_GIANT))
2937 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2939 info[i++] = "It is especially deadly against giants.";
2944 if (have_flag(flgs, TR_KILL_DEMON))
2947 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2949 info[i++] = "It is a great bane of demons.";
2953 if (have_flag(flgs, TR_SLAY_DEMON))
2956 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2958 info[i++] = "It strikes at demons with holy wrath.";
2963 if (have_flag(flgs, TR_KILL_UNDEAD))
2966 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2968 info[i++] = "It is a great bane of undead.";
2972 if (have_flag(flgs, TR_SLAY_UNDEAD))
2975 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2977 info[i++] = "It strikes at undead with holy wrath.";
2982 if (have_flag(flgs, TR_KILL_EVIL))
2985 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2987 info[i++] = "It is a great bane of evil monsters.";
2991 if (have_flag(flgs, TR_SLAY_EVIL))
2994 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
2996 info[i++] = "It fights against evil with holy fury.";
3001 if (have_flag(flgs, TR_KILL_ANIMAL))
3004 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
3006 info[i++] = "It is a great bane of natural creatures.";
3010 if (have_flag(flgs, TR_SLAY_ANIMAL))
3013 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
3015 info[i++] = "It is especially deadly against natural creatures.";
3020 if (have_flag(flgs, TR_KILL_HUMAN))
3023 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
3025 info[i++] = "It is a great bane of humans.";
3029 if (have_flag(flgs, TR_SLAY_HUMAN))
3032 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
3034 info[i++] = "It is especially deadly against humans.";
3039 if (have_flag(flgs, TR_FORCE_WEAPON))
3042 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
3044 info[i++] = "It powerfully strikes at a monster using your mana.";
3048 if (have_flag(flgs, TR_DEC_MANA))
3051 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
3053 info[i++] = "It decreases your mana consumption.";
3057 if (have_flag(flgs, TR_SUST_STR))
3060 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
3062 info[i++] = "It sustains your strength.";
3066 if (have_flag(flgs, TR_SUST_INT))
3069 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
3071 info[i++] = "It sustains your intelligence.";
3075 if (have_flag(flgs, TR_SUST_WIS))
3078 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
3080 info[i++] = "It sustains your wisdom.";
3084 if (have_flag(flgs, TR_SUST_DEX))
3087 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
3089 info[i++] = "It sustains your dexterity.";
3093 if (have_flag(flgs, TR_SUST_CON))
3096 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
3098 info[i++] = "It sustains your constitution.";
3102 if (have_flag(flgs, TR_SUST_CHR))
3105 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
3107 info[i++] = "It sustains your charisma.";
3112 if (have_flag(flgs, TR_IM_ACID))
3115 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3117 info[i++] = "It provides immunity to acid.";
3121 if (have_flag(flgs, TR_IM_ELEC))
3124 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3126 info[i++] = "It provides immunity to electricity.";
3130 if (have_flag(flgs, TR_IM_FIRE))
3133 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3135 info[i++] = "It provides immunity to fire.";
3139 if (have_flag(flgs, TR_IM_COLD))
3142 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3144 info[i++] = "It provides immunity to cold.";
3149 if (have_flag(flgs, TR_THROW))
3152 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3154 info[i++] = "It is perfectly balanced for throwing.";
3158 if (have_flag(flgs, TR_FREE_ACT))
3161 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3163 info[i++] = "It provides immunity to paralysis.";
3167 if (have_flag(flgs, TR_HOLD_LIFE))
3170 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
3172 info[i++] = "It provides resistance to life draining.";
3176 if (have_flag(flgs, TR_RES_FEAR))
3179 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3181 info[i++] = "It makes you completely fearless.";
3185 if (have_flag(flgs, TR_RES_ACID))
3188 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3190 info[i++] = "It provides resistance to acid.";
3194 if (have_flag(flgs, TR_RES_ELEC))
3197 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3199 info[i++] = "It provides resistance to electricity.";
3203 if (have_flag(flgs, TR_RES_FIRE))
3206 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3208 info[i++] = "It provides resistance to fire.";
3212 if (have_flag(flgs, TR_RES_COLD))
3215 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3217 info[i++] = "It provides resistance to cold.";
3221 if (have_flag(flgs, TR_RES_POIS))
3224 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3226 info[i++] = "It provides resistance to poison.";
3231 if (have_flag(flgs, TR_RES_LITE))
3234 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3236 info[i++] = "It provides resistance to light.";
3240 if (have_flag(flgs, TR_RES_DARK))
3243 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3245 info[i++] = "It provides resistance to dark.";
3250 if (have_flag(flgs, TR_RES_BLIND))
3253 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3255 info[i++] = "It provides resistance to blindness.";
3259 if (have_flag(flgs, TR_RES_CONF))
3262 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3264 info[i++] = "It provides resistance to confusion.";
3268 if (have_flag(flgs, TR_RES_SOUND))
3271 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3273 info[i++] = "It provides resistance to sound.";
3277 if (have_flag(flgs, TR_RES_SHARDS))
3280 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3282 info[i++] = "It provides resistance to shards.";
3287 if (have_flag(flgs, TR_RES_NETHER))
3290 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3292 info[i++] = "It provides resistance to nether.";
3296 if (have_flag(flgs, TR_RES_NEXUS))
3299 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3301 info[i++] = "It provides resistance to nexus.";
3305 if (have_flag(flgs, TR_RES_CHAOS))
3308 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3310 info[i++] = "It provides resistance to chaos.";
3314 if (have_flag(flgs, TR_RES_DISEN))
3317 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3319 info[i++] = "It provides resistance to disenchantment.";
3324 if (have_flag(flgs, TR_LEVITATION))
3327 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3329 info[i++] = "It allows you to levitate.";
3333 if (have_flag(flgs, TR_LITE))
3335 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
3337 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
3339 info[i++] = "It decreases radius of your light source by 1.";
3343 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë(Ⱦ·Â¤Ë+1)¡£";
3345 info[i++] = "It provides permanent light. (radius +1)";
3349 if (have_flag(flgs, TR_SEE_INVIS))
3352 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3354 info[i++] = "It allows you to see invisible monsters.";
3358 if (have_flag(flgs, TR_TELEPATHY))
3361 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
3363 info[i++] = "It gives telepathic powers.";
3367 if (have_flag(flgs, TR_ESP_ANIMAL))
3370 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤ò´¶ÃΤ¹¤ë¡£";
3372 info[i++] = "It senses natural creatures.";
3376 if (have_flag(flgs, TR_ESP_UNDEAD))
3379 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ò´¶ÃΤ¹¤ë¡£";
3381 info[i++] = "It senses undead.";
3385 if (have_flag(flgs, TR_ESP_DEMON))
3388 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò´¶ÃΤ¹¤ë¡£";
3390 info[i++] = "It senses demons.";
3394 if (have_flag(flgs, TR_ESP_ORC))
3397 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ò´¶ÃΤ¹¤ë¡£";
3399 info[i++] = "It senses orcs.";
3403 if (have_flag(flgs, TR_ESP_TROLL))
3406 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ò´¶ÃΤ¹¤ë¡£";
3408 info[i++] = "It senses trolls.";
3412 if (have_flag(flgs, TR_ESP_GIANT))
3415 info[i++] = "¤½¤ì¤Ïµð¿Í¤ò´¶ÃΤ¹¤ë¡£";
3417 info[i++] = "It senses giants.";
3421 if (have_flag(flgs, TR_ESP_DRAGON))
3424 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò´¶ÃΤ¹¤ë¡£";
3426 info[i++] = "It senses dragons.";
3430 if (have_flag(flgs, TR_ESP_HUMAN))
3433 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ò´¶ÃΤ¹¤ë¡£";
3435 info[i++] = "It senses humans.";
3439 if (have_flag(flgs, TR_ESP_EVIL))
3442 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¸ºß¤ò´¶ÃΤ¹¤ë¡£";
3444 info[i++] = "It senses evil creatures.";
3448 if (have_flag(flgs, TR_ESP_GOOD))
3451 info[i++] = "¤½¤ì¤ÏÁ±Îɤʸºß¤ò´¶ÃΤ¹¤ë¡£";
3453 info[i++] = "It senses good creatures.";
3457 if (have_flag(flgs, TR_ESP_NONLIVING))
3460 info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤò´¶ÃΤ¹¤ë¡£";
3462 info[i++] = "It senses non-living creatures.";
3466 if (have_flag(flgs, TR_ESP_UNIQUE))
3469 info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤ò´¶ÃΤ¹¤ë¡£";
3471 info[i++] = "It senses unique monsters.";
3475 if (have_flag(flgs, TR_SLOW_DIGEST))
3478 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
3480 info[i++] = "It slows your metabolism.";
3484 if (have_flag(flgs, TR_REGEN))
3487 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
3489 info[i++] = "It speeds your regenerative powers.";
3493 if (have_flag(flgs, TR_WARNING))
3496 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
3498 info[i++] = "It warns you of danger";
3502 if (have_flag(flgs, TR_REFLECT))
3505 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
3507 info[i++] = "It reflects bolts and arrows.";
3511 if (have_flag(flgs, TR_SH_FIRE))
3514 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3516 info[i++] = "It produces a fiery sheath.";
3520 if (have_flag(flgs, TR_SH_ELEC))
3523 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3525 info[i++] = "It produces an electric sheath.";
3529 if (have_flag(flgs, TR_SH_COLD))
3532 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3534 info[i++] = "It produces a sheath of coldness.";
3538 if (have_flag(flgs, TR_NO_MAGIC))
3541 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3543 info[i++] = "It produces an anti-magic shell.";
3547 if (have_flag(flgs, TR_NO_TELE))
3550 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
3552 info[i++] = "It prevents teleportation.";
3556 if (have_flag(flgs, TR_XTRA_MIGHT))
3559 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3561 info[i++] = "It fires missiles with extra might.";
3565 if (have_flag(flgs, TR_XTRA_SHOTS))
3568 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3570 info[i++] = "It fires missiles excessively fast.";
3575 if (have_flag(flgs, TR_BLESSED))
3578 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
3580 info[i++] = "It has been blessed by the gods.";
3585 if (object_is_cursed(o_ptr))
3587 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
3590 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3592 info[i++] = "It is permanently cursed.";
3596 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
3599 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3601 info[i++] = "It is heavily cursed.";
3608 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
3610 info[i++] = "It is cursed.";
3614 * It's a trivial infomation since there is
3615 * fake inscription {cursed}
3621 if ((have_flag(flgs, TR_TY_CURSE)) || (o_ptr->curse_flags & TRC_TY_CURSE))
3624 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
3626 info[i++] = "It carries an ancient foul curse.";
3630 if ((have_flag(flgs, TR_AGGRAVATE)) || (o_ptr->curse_flags & TRC_AGGRAVATE))
3633 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
3635 info[i++] = "It aggravates nearby creatures.";
3639 if ((have_flag(flgs, TR_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
3642 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
3644 info[i++] = "It drains experience.";
3648 if (o_ptr->curse_flags & TRC_SLOW_REGEN)
3651 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
3653 info[i++] = "It slows your regenerative powers.";
3657 if (o_ptr->curse_flags & TRC_ADD_L_CURSE)
3660 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
3662 info[i++] = "It adds weak curses.";
3666 if (o_ptr->curse_flags & TRC_ADD_H_CURSE)
3669 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
3671 info[i++] = "It adds heavy curses.";
3675 if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
3678 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3680 info[i++] = "It attracts animals.";
3684 if (o_ptr->curse_flags & TRC_CALL_DEMON)
3687 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3689 info[i++] = "It attracts demons.";
3693 if (o_ptr->curse_flags & TRC_CALL_DRAGON)
3696 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3698 info[i++] = "It attracts dragons.";
3702 if (o_ptr->curse_flags & TRC_COWARDICE)
3705 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤µ¯¤³¤¹¡£";
3707 info[i++] = "It makes you subject to cowardice.";
3711 if ((have_flag(flgs, TR_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
3714 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
3716 info[i++] = "It induces random teleportation.";
3720 if (o_ptr->curse_flags & TRC_LOW_MELEE)
3723 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
3725 info[i++] = "It causes you to miss blows.";
3729 if (o_ptr->curse_flags & TRC_LOW_AC)
3732 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
3734 info[i++] = "It helps your enemies' blows.";
3738 if (o_ptr->curse_flags & TRC_LOW_MAGIC)
3741 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
3743 info[i++] = "It encumbers you while spellcasting.";
3747 if (o_ptr->curse_flags & TRC_FAST_DIGEST)
3750 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
3752 info[i++] = "It speeds your metabolism.";
3756 if (o_ptr->curse_flags & TRC_DRAIN_HP)
3759 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
3761 info[i++] = "It drains you.";
3765 if (o_ptr->curse_flags & TRC_DRAIN_MANA)
3768 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
3770 info[i++] = "It drains your mana.";
3775 /* Describe about this kind of object instead of THIS fake object */
3776 if (mode & SCROBJ_FAKE_OBJECT)
3778 switch (o_ptr->tval)
3781 switch (o_ptr->sval)
3783 case SV_RING_LORDLY:
3785 info[i++] = "¤½¤ì¤Ï´ö¤Ä¤«¤Î¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3787 info[i++] = "It provides some random resistances.";
3790 case SV_RING_WARNING:
3792 info[i++] = "¤½¤ì¤Ï¤Ò¤È¤Ä¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3794 info[i++] = "It may provide a low rank ESP.";
3801 switch (o_ptr->sval)
3803 case SV_AMULET_RESISTANCE:
3805 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3807 info[i++] = "It may provides resistance to poison.";
3810 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3812 info[i++] = "It may provide a random resistances.";
3815 case SV_AMULET_THE_MAGI:
3817 info[i++] = "¤½¤ì¤ÏºÇÂç¤Ç£³¤Ä¤Þ¤Ç¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë¡£";
3819 info[i++] = "It provides up to three low rank ESPs.";
3827 if (have_flag(flgs, TR_IGNORE_ACID) &&
3828 have_flag(flgs, TR_IGNORE_ELEC) &&
3829 have_flag(flgs, TR_IGNORE_FIRE) &&
3830 have_flag(flgs, TR_IGNORE_COLD))
3833 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3835 info[i++] = "It cannot be harmed by the elements.";
3840 if (have_flag(flgs, TR_IGNORE_ACID))
3843 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3845 info[i++] = "It cannot be harmed by acid.";
3848 if (have_flag(flgs, TR_IGNORE_ELEC))
3851 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3853 info[i++] = "It cannot be harmed by electricity.";
3856 if (have_flag(flgs, TR_IGNORE_FIRE))
3859 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3861 info[i++] = "It cannot be harmed by fire.";
3864 if (have_flag(flgs, TR_IGNORE_COLD))
3867 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3869 info[i++] = "It cannot be harmed by cold.";
3874 if (mode & SCROBJ_FORCE_DETAIL) trivial_info = 0;
3876 /* No relevant informations */
3877 if (i <= trivial_info) return (FALSE);
3879 /* Save the screen */
3883 Term_get_size(&wid, &hgt);
3885 /* Display Item name */
3886 if (!(mode & SCROBJ_FAKE_OBJECT))
3887 object_desc(o_name, o_ptr, 0);
3889 object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
3893 /* Erase the screen */
3894 for (k = 1; k < hgt; k++) prt("", k, 13);
3896 /* Label the information */
3897 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
3899 monster_race *r_ptr = &r_info[o_ptr->pval];
3900 int namelen = strlen(r_name + r_ptr->name);
3901 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
3902 Term_queue_bigchar(18 + namelen, 1, r_ptr->x_attr, r_ptr->x_char, 0, 0);
3903 prt("'", 1, (use_bigtile ? 20 : 19) + namelen);
3907 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
3909 prt(" Item Attributes:", 1, 15);
3912 /* We will print on top of the map (column 13) */
3913 for (k = 2, j = 0; j < i; j++)
3916 prt(info[j], k++, 15);
3918 /* Every 20 entries (lines 2 to 21), start over */
3919 if ((k == hgt - 2) && (j+1 < i))
3922 prt("-- ³¤¯ --", k, 15);
3924 prt("-- more --", k, 15);
3927 for (; k > 2; k--) prt("", k, 15);
3933 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
3935 prt("[Press any key to continue]", k, 15);
3940 /* Restore the screen */
3943 /* Gave knowledge */
3950 * Convert an inventory index into a one character label
3951 * Note that the label does NOT distinguish inven/equip.
3953 char index_to_label(int i)
3955 /* Indexes for "inven" are easy */
3956 if (i < INVEN_RARM) return (I2A(i));
3958 /* Indexes for "equip" are offset */
3959 return (I2A(i - INVEN_RARM));
3964 * Convert a label into the index of an item in the "inven"
3965 * Return "-1" if the label does not indicate a real item
3967 s16b label_to_inven(int c)
3972 i = (islower(c) ? A2I(c) : -1);
3974 /* Verify the index */
3975 if ((i < 0) || (i > INVEN_PACK)) return (-1);
3977 /* Empty slots can never be chosen */
3978 if (!inventory[i].k_idx) return (-1);
3980 /* Return the index */
3986 extern bool select_ring_slot;
3989 static bool is_ring_slot(int i)
3991 return (i == INVEN_RIGHT) || (i == INVEN_LEFT);
3996 * Convert a label into the index of a item in the "equip"
3997 * Return "-1" if the label does not indicate a real item
3999 s16b label_to_equip(int c)
4004 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
4006 /* Verify the index */
4007 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
4009 if (select_ring_slot) return is_ring_slot(i) ? i : -1;
4011 /* Empty slots can never be chosen */
4012 if (!inventory[i].k_idx) return (-1);
4014 /* Return the index */
4021 * Determine which equipment slot (if any) an item likes
4023 s16b wield_slot(object_type *o_ptr)
4025 /* Slot for equipment */
4026 switch (o_ptr->tval)
4033 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
4034 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
4035 return (INVEN_LARM);
4042 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
4043 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
4044 return (INVEN_RARM);
4054 /* Use the right hand first */
4055 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
4057 /* Use the left hand for swapping (by default) */
4058 return (INVEN_LEFT);
4064 return (INVEN_NECK);
4069 return (INVEN_LITE);
4076 return (INVEN_BODY);
4081 return (INVEN_OUTER);
4087 return (INVEN_HEAD);
4092 return (INVEN_HANDS);
4097 return (INVEN_FEET);
4101 /* No slot available */
4107 * Return a string mentioning how a given item is carried
4109 cptr mention_use(int i)
4113 /* Examine the location */
4117 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->migite) ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê")); break;
4119 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "Just lifting" : (p_ptr->migite ? "Wielding" : "On arm"); break;
4123 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->hidarite) ? " ξ¼ê" : (left_hander ? " ±¦¼ê" : " º¸¼ê")); break;
4125 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "Just lifting" : (p_ptr->hidarite ? "Wielding" : "On arm"); break;
4129 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "±¿ÈÂÃæ" : "¼Í·âÍÑ"; break;
4131 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "Just holding" : "Shooting"; break;
4135 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
4137 case INVEN_RIGHT: p = (left_hander ? "On left hand" : "On right hand"); break;
4141 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
4143 case INVEN_LEFT: p = (left_hander ? "On right hand" : "On left hand"); break;
4147 case INVEN_NECK: p = " ¼ó"; break;
4149 case INVEN_NECK: p = "Around neck"; break;
4153 case INVEN_LITE: p = " ¸÷¸»"; break;
4155 case INVEN_LITE: p = "Light source"; break;
4159 case INVEN_BODY: p = " ÂÎ"; break;
4161 case INVEN_BODY: p = "On body"; break;
4165 case INVEN_OUTER: p = "ÂΤξå"; break;
4167 case INVEN_OUTER: p = "About body"; break;
4171 case INVEN_HEAD: p = " Ƭ"; break;
4173 case INVEN_HEAD: p = "On head"; break;
4177 case INVEN_HANDS: p = " ¼ê"; break;
4179 case INVEN_HANDS: p = "On hands"; break;
4183 case INVEN_FEET: p = " "; break;
4185 case INVEN_FEET: p = "On feet"; break;
4189 default: p = "¥¶¥Ã¥¯"; break;
4191 default: p = "In pack"; break;
4195 /* Return the result */
4201 * Return a string describing how a given item is being worn.
4202 * Currently, only used for items in the equipment, not inventory.
4204 cptr describe_use(int i)
4211 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->migite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
4213 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "just lifting" : (p_ptr->migite ? "attacking monsters with" : "wearing on your arm"); break;
4217 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->hidarite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
4219 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "just lifting" : (p_ptr->hidarite ? "attacking monsters with" : "wearing on your arm"); break;
4223 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î" : "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
4225 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "just holding" : "shooting missiles with"; break;
4229 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4231 case INVEN_RIGHT: p = (left_hander ? "wearing on your left hand" : "wearing on your right hand"); break;
4235 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4237 case INVEN_LEFT: p = (left_hander ? "wearing on your right hand" : "wearing on your left hand"); break;
4241 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
4243 case INVEN_NECK: p = "wearing around your neck"; break;
4247 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
4249 case INVEN_LITE: p = "using to light the way"; break;
4253 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
4255 case INVEN_BODY: p = "wearing on your body"; break;
4259 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
4261 case INVEN_OUTER: p = "wearing on your back"; break;
4265 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
4267 case INVEN_HEAD: p = "wearing on your head"; break;
4271 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
4273 case INVEN_HANDS: p = "wearing on your hands"; break;
4277 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
4279 case INVEN_FEET: p = "wearing on your feet"; break;
4283 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
4285 default: p = "carrying in your pack"; break;
4289 /* Return the result */
4294 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
4296 bool check_book_realm(const byte book_tval, const byte book_sval)
4298 if (book_tval < TV_LIFE_BOOK) return FALSE;
4299 if (p_ptr->pclass == CLASS_SORCERER)
4301 return is_magic(tval2realm(book_tval));
4303 else if (p_ptr->pclass == CLASS_RED_MAGE)
4305 if (is_magic(tval2realm(book_tval)))
4306 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
4308 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
4313 * Check an item against the item tester info
4315 bool item_tester_okay(object_type *o_ptr)
4317 /* Hack -- allow listing empty slots */
4318 if (item_tester_full) return (TRUE);
4320 /* Require an item */
4321 if (!o_ptr->k_idx) return (FALSE);
4323 /* Hack -- ignore "gold" */
4324 if (o_ptr->tval == TV_GOLD)
4327 extern bool show_gold_on_floor;
4329 if (!show_gold_on_floor) return (FALSE);
4332 /* Check the tval */
4333 if (item_tester_tval)
4335 /* Is it a spellbook? If so, we need a hack -- TY */
4336 if ((item_tester_tval <= TV_DEATH_BOOK) &&
4337 (item_tester_tval >= TV_LIFE_BOOK))
4338 return check_book_realm(o_ptr->tval, o_ptr->sval);
4340 if (item_tester_tval != o_ptr->tval) return (FALSE);
4343 /* Check the hook */
4344 if (item_tester_hook)
4346 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
4357 * Choice window "shadow" of the "show_inven()" function
4359 void display_inven(void)
4361 register int i, n, z = 0;
4363 byte attr = TERM_WHITE;
4365 char o_name[MAX_NLEN];
4369 Term_get_size(&wid, &hgt);
4371 /* Find the "final" slot */
4372 for (i = 0; i < INVEN_PACK; i++)
4374 o_ptr = &inventory[i];
4376 /* Skip non-objects */
4377 if (!o_ptr->k_idx) continue;
4383 /* Display the pack */
4384 for (i = 0; i < z; i++)
4386 /* Examine the item */
4387 o_ptr = &inventory[i];
4389 /* Start with an empty "index" */
4390 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4392 /* Is this item "acceptable"? */
4393 if (item_tester_okay(o_ptr))
4395 /* Prepare an "index" */
4396 tmp_val[0] = index_to_label(i);
4398 /* Bracket the "index" --(-- */
4402 /* Display the index (or blank space) */
4403 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
4405 /* Obtain an item description */
4406 object_desc(o_name, o_ptr, 0);
4408 /* Obtain the length of the description */
4412 attr = tval_to_attr[o_ptr->tval % 128];
4414 /* Grey out charging items */
4420 /* Display the entry itself */
4421 Term_putstr(3, i, n, attr, o_name);
4423 /* Erase the rest of the line */
4424 Term_erase(3+n, i, 255);
4426 /* Display the weight if needed */
4429 int wgt = o_ptr->weight * o_ptr->number;
4431 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
4433 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4436 prt(tmp_val, i, wid - 9);
4440 /* Erase the rest of the window */
4441 for (i = z; i < hgt; i++)
4443 /* Erase the line */
4444 Term_erase(0, i, 255);
4451 * Choice window "shadow" of the "show_equip()" function
4453 void display_equip(void)
4457 byte attr = TERM_WHITE;
4459 char o_name[MAX_NLEN];
4463 Term_get_size(&wid, &hgt);
4465 /* Display the equipment */
4466 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
4468 /* Examine the item */
4469 o_ptr = &inventory[i];
4471 /* Start with an empty "index" */
4472 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4474 /* Is this item "acceptable"? */
4475 if (select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr))
4477 /* Prepare an "index" */
4478 tmp_val[0] = index_to_label(i);
4480 /* Bracket the "index" --(-- */
4484 /* Display the index (or blank space) */
4485 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
4487 /* Obtain an item description */
4488 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
4491 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
4493 strcpy(o_name, "(wielding with two-hands)");
4499 object_desc(o_name, o_ptr, 0);
4500 attr = tval_to_attr[o_ptr->tval % 128];
4503 /* Obtain the length of the description */
4506 /* Grey out charging items */
4512 /* Display the entry itself */
4513 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
4515 /* Erase the rest of the line */
4516 Term_erase(3+n, i - INVEN_RARM, 255);
4518 /* Display the weight (if needed) */
4521 int wgt = o_ptr->weight * o_ptr->number;
4523 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
4525 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4528 prt(tmp_val, i - INVEN_RARM, wid - (show_labels ? 28 : 9));
4531 /* Display the slot description (if needed) */
4534 Term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
4535 prt(mention_use(i), i - INVEN_RARM, wid - 15);
4539 /* Erase the rest of the window */
4540 for (i = INVEN_TOTAL - INVEN_RARM; i < hgt; i++)
4542 /* Clear that line */
4543 Term_erase(0, i, 255);
4549 * Find the "first" inventory object with the given "tag".
4551 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
4552 * inscription of an object. Alphabetical characters don't work as a
4555 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
4556 * and "x" is the "current" command_cmd code.
4558 static bool get_tag(int *cp, char tag, int mode)
4563 /* Extract index from mode */
4568 end = INVEN_TOTAL - 1;
4573 end = INVEN_PACK - 1;
4580 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
4582 /* Check every inventory object */
4583 for (i = start; i <= end; i++)
4585 object_type *o_ptr = &inventory[i];
4587 /* Skip non-objects */
4588 if (!o_ptr->k_idx) continue;
4590 /* Skip empty inscriptions */
4591 if (!o_ptr->inscription) continue;
4593 /* Skip non-choice */
4594 if (!item_tester_okay(o_ptr)) continue;
4597 s = my_strchr(quark_str(o_ptr->inscription), '@');
4599 /* Process all tags */
4602 /* Check the special tags */
4603 if ((s[1] == command_cmd) && (s[2] == tag))
4605 /* Save the actual inventory ID */
4612 /* Find another '@' */
4613 s = my_strchr(s + 1, '@');
4618 /**** Find a tag in the form of {@#} (allows only numerals) ***/
4620 /* Don't allow {@#} with '#' being alphabet */
4621 if (tag < '0' || '9' < tag)
4627 /* Check every object */
4628 for (i = start; i <= end; i++)
4630 object_type *o_ptr = &inventory[i];
4632 /* Skip non-objects */
4633 if (!o_ptr->k_idx) continue;
4635 /* Skip empty inscriptions */
4636 if (!o_ptr->inscription) continue;
4638 /* Skip non-choice */
4639 if (!item_tester_okay(o_ptr)) continue;
4642 s = my_strchr(quark_str(o_ptr->inscription), '@');
4644 /* Process all tags */
4647 /* Check the normal tags */
4650 /* Save the actual inventory ID */
4657 /* Find another '@' */
4658 s = my_strchr(s + 1, '@');
4668 * Find the "first" floor object with the given "tag".
4670 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
4671 * inscription of an object. Alphabetical characters don't work as a
4674 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
4675 * and "x" is the "current" command_cmd code.
4677 static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
4682 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
4684 /* Check every object in the grid */
4685 for (i = 0; i < floor_num && i < 23; i++)
4687 object_type *o_ptr = &o_list[floor_list[i]];
4689 /* Skip empty inscriptions */
4690 if (!o_ptr->inscription) continue;
4693 s = my_strchr(quark_str(o_ptr->inscription), '@');
4695 /* Process all tags */
4698 /* Check the special tags */
4699 if ((s[1] == command_cmd) && (s[2] == tag))
4701 /* Save the actual floor object ID */
4708 /* Find another '@' */
4709 s = my_strchr(s + 1, '@');
4714 /**** Find a tag in the form of {@#} (allows only numerals) ***/
4716 /* Don't allow {@#} with '#' being alphabet */
4717 if (tag < '0' || '9' < tag)
4723 /* Check every object in the grid */
4724 for (i = 0; i < floor_num && i < 23; i++)
4726 object_type *o_ptr = &o_list[floor_list[i]];
4728 /* Skip empty inscriptions */
4729 if (!o_ptr->inscription) continue;
4732 s = my_strchr(quark_str(o_ptr->inscription), '@');
4734 /* Process all tags */
4737 /* Check the normal tags */
4740 /* Save the floor object ID */
4747 /* Find another '@' */
4748 s = my_strchr(s + 1, '@');
4758 * Move around label characters with correspond tags
4760 static void prepare_label_string(char *label, int mode)
4762 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
4763 int offset = (mode == USE_EQUIP) ? INVEN_RARM : 0;
4766 /* Prepare normal labels */
4767 strcpy(label, alphabet_chars);
4769 /* Move each label */
4770 for (i = 0; i < 52; i++)
4773 char c = alphabet_chars[i];
4775 /* Find a tag with this label */
4776 if (get_tag(&index, c, mode))
4778 /* Delete the overwritten label */
4779 if (label[i] == c) label[i] = ' ';
4781 /* Move the label to the place of corresponding tag */
4782 label[index - offset] = c;
4789 * Move around label characters with correspond tags (floor version)
4791 static void prepare_label_string_floor(char *label, int floor_list[], int floor_num)
4793 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
4796 /* Prepare normal labels */
4797 strcpy(label, alphabet_chars);
4799 /* Move each label */
4800 for (i = 0; i < 52; i++)
4803 char c = alphabet_chars[i];
4805 /* Find a tag with this label */
4806 if (get_tag_floor(&index, c, floor_list, floor_num))
4808 /* Delete the overwritten label */
4809 if (label[i] == c) label[i] = ' ';
4811 /* Move the label to the place of corresponding tag */
4819 * Display the inventory.
4821 * Hack -- do not display "trailing" empty slots
4823 int show_inven(int target_item)
4825 int i, j, k, l, z = 0;
4826 int col, cur_col, len;
4828 char o_name[MAX_NLEN];
4832 char out_desc[23][MAX_NLEN];
4833 int target_item_label = 0;
4835 char inven_label[52 + 1];
4837 /* Starting column */
4841 Term_get_size(&wid, &hgt);
4843 /* Default "max-length" */
4844 len = wid - col - 1;
4847 /* Find the "final" slot */
4848 for (i = 0; i < INVEN_PACK; i++)
4850 o_ptr = &inventory[i];
4852 /* Skip non-objects */
4853 if (!o_ptr->k_idx) continue;
4859 prepare_label_string(inven_label, USE_INVEN);
4861 /* Display the inventory */
4862 for (k = 0, i = 0; i < z; i++)
4864 o_ptr = &inventory[i];
4866 /* Is this item acceptable? */
4867 if (!item_tester_okay(o_ptr)) continue;
4869 /* Describe the object */
4870 object_desc(o_name, o_ptr, 0);
4872 /* Save the object index, color, and description */
4874 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4876 /* Grey out charging items */
4879 out_color[k] = TERM_L_DARK;
4882 (void)strcpy(out_desc[k], o_name);
4884 /* Find the predicted "line length" */
4885 l = strlen(out_desc[k]) + 5;
4887 /* Be sure to account for the weight */
4888 if (show_weights) l += 9;
4890 /* Account for icon if displayed */
4891 if (show_item_graph)
4894 if (use_bigtile) l++;
4897 /* Maintain the maximum length */
4898 if (l > len) len = l;
4900 /* Advance to next "line" */
4904 /* Find the column to start in */
4905 col = (len > wid - 4) ? 0 : (wid - len - 1);
4907 /* Output each entry */
4908 for (j = 0; j < k; j++)
4914 o_ptr = &inventory[i];
4916 /* Clear the line */
4917 prt("", j + 1, col ? col - 2 : col);
4919 if (use_menu && target_item)
4921 if (j == (target_item-1))
4924 strcpy(tmp_val, "¡Õ");
4926 strcpy(tmp_val, "> ");
4928 target_item_label = i;
4930 else strcpy(tmp_val, " ");
4932 else if (i <= INVEN_PACK)
4934 /* Prepare an index --(-- */
4935 sprintf(tmp_val, "%c)", inven_label[i]);
4939 /* Prepare an index --(-- */
4940 sprintf(tmp_val, "%c)", index_to_label(i));
4943 /* Clear the line with the (possibly indented) index */
4944 put_str(tmp_val, j + 1, col);
4948 /* Display graphics for object, if desired */
4949 if (show_item_graph)
4951 byte a = object_attr(o_ptr);
4952 char c = object_char(o_ptr);
4955 if (a & 0x80) a |= 0x40;
4958 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
4959 if (use_bigtile) cur_col++;
4965 /* Display the entry itself */
4966 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
4968 /* Display the weight if needed */
4971 int wgt = o_ptr->weight * o_ptr->number;
4973 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4975 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4978 prt(tmp_val, j + 1, wid - 9);
4982 /* Make a "shadow" below the list (only if needed) */
4983 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4985 /* Save the new column */
4988 return target_item_label;
4994 * Display the equipment.
4996 int show_equip(int target_item)
4999 int col, cur_col, len;
5002 char o_name[MAX_NLEN];
5005 char out_desc[23][MAX_NLEN];
5006 int target_item_label = 0;
5008 char equip_label[52 + 1];
5010 /* Starting column */
5014 Term_get_size(&wid, &hgt);
5016 /* Maximal length */
5017 len = wid - col - 1;
5020 /* Scan the equipment list */
5021 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
5023 o_ptr = &inventory[i];
5025 /* Is this item acceptable? */
5026 if (!(select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr)) &&
5027 (!((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute) ||
5028 item_tester_no_ryoute)) continue;
5031 object_desc(o_name, o_ptr, 0);
5033 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
5036 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
5038 (void)strcpy(out_desc[k],"(wielding with two-hands)");
5040 out_color[k] = TERM_WHITE;
5044 (void)strcpy(out_desc[k], o_name);
5045 out_color[k] = tval_to_attr[o_ptr->tval % 128];
5049 /* Grey out charging items */
5052 out_color[k] = TERM_L_DARK;
5055 /* Extract the maximal length (see below) */
5057 l = strlen(out_desc[k]) + (2 + 1);
5059 l = strlen(out_desc[k]) + (2 + 3);
5063 /* Increase length for labels (if needed) */
5065 if (show_labels) l += (7 + 2);
5067 if (show_labels) l += (14 + 2);
5071 /* Increase length for weight (if needed) */
5072 if (show_weights) l += 9;
5074 if (show_item_graph) l += 2;
5076 /* Maintain the max-length */
5077 if (l > len) len = l;
5079 /* Advance the entry */
5083 /* Hack -- Find a column to start in */
5085 col = (len > wid - 6) ? 0 : (wid - len - 1);
5087 col = (len > wid - 4) ? 0 : (wid - len - 1);
5090 prepare_label_string(equip_label, USE_EQUIP);
5092 /* Output each entry */
5093 for (j = 0; j < k; j++)
5099 o_ptr = &inventory[i];
5101 /* Clear the line */
5102 prt("", j + 1, col ? col - 2 : col);
5104 if (use_menu && target_item)
5106 if (j == (target_item-1))
5109 strcpy(tmp_val, "¡Õ");
5111 strcpy(tmp_val, "> ");
5113 target_item_label = i;
5115 else strcpy(tmp_val, " ");
5117 else if (i >= INVEN_RARM)
5119 /* Prepare an index --(-- */
5120 sprintf(tmp_val, "%c)", equip_label[i - INVEN_RARM]);
5124 /* Prepare an index --(-- */
5125 sprintf(tmp_val, "%c)", index_to_label(i));
5128 /* Clear the line with the (possibly indented) index */
5129 put_str(tmp_val, j+1, col);
5133 /* Display graphics for object, if desired */
5134 if (show_item_graph)
5136 byte a = object_attr(o_ptr);
5137 char c = object_char(o_ptr);
5140 if (a & 0x80) a |= 0x40;
5143 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
5144 if (use_bigtile) cur_col++;
5152 /* Mention the use */
5154 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
5156 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
5159 put_str(tmp_val, j+1, cur_col);
5161 /* Display the entry itself */
5163 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
5165 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
5172 /* Display the entry itself */
5173 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
5176 /* Display the weight if needed */
5179 int wgt = o_ptr->weight * o_ptr->number;
5181 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5183 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
5186 prt(tmp_val, j + 1, wid - 9);
5190 /* Make a "shadow" below the list (only if needed) */
5191 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5193 /* Save the new column */
5196 return target_item_label;
5203 * Flip "inven" and "equip" in any sub-windows
5205 void toggle_inven_equip(void)
5210 for (j = 0; j < 8; j++)
5213 if (!angband_term[j]) continue;
5215 /* Flip inven to equip */
5216 if (window_flag[j] & (PW_INVEN))
5219 window_flag[j] &= ~(PW_INVEN);
5220 window_flag[j] |= (PW_EQUIP);
5223 p_ptr->window |= (PW_EQUIP);
5226 /* Flip inven to equip */
5227 else if (window_flag[j] & (PW_EQUIP))
5230 window_flag[j] &= ~(PW_EQUIP);
5231 window_flag[j] |= (PW_INVEN);
5234 p_ptr->window |= (PW_INVEN);
5242 * Verify the choice of an item.
5244 * The item can be negative to mean "item on floor".
5246 static bool verify(cptr prompt, int item)
5248 char o_name[MAX_NLEN];
5249 char out_val[MAX_NLEN+20];
5256 o_ptr = &inventory[item];
5262 o_ptr = &o_list[0 - item];
5266 object_desc(o_name, o_ptr, 0);
5270 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
5272 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
5277 return (get_check(out_val));
5282 * Hack -- allow user to "prevent" certain choices
5284 * The item can be negative to mean "item on floor".
5286 static bool get_item_allow(int item)
5292 if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
5297 o_ptr = &inventory[item];
5303 o_ptr = &o_list[0 - item];
5306 /* No inscription */
5307 if (!o_ptr->inscription) return (TRUE);
5310 s = my_strchr(quark_str(o_ptr->inscription), '!');
5312 /* Process preventions */
5315 /* Check the "restriction" */
5316 if ((s[1] == command_cmd) || (s[1] == '*'))
5318 /* Verify the choice */
5320 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
5322 if (!verify("Really try", item)) return (FALSE);
5327 /* Find another '!' */
5328 s = my_strchr(s + 1, '!');
5338 * Auxiliary function for "get_item()" -- test an index
5340 static bool get_item_okay(int i)
5343 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
5345 if (select_ring_slot) return is_ring_slot(i);
5347 /* Verify the item */
5348 if (!item_tester_okay(&inventory[i])) return (FALSE);
5357 * Determine whether get_item() can get some item or not
5358 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
5360 bool can_get_item(void)
5362 int j, floor_list[23], floor_num = 0;
5364 for (j = 0; j < INVEN_TOTAL; j++)
5365 if (item_tester_okay(&inventory[j]))
5368 floor_num = scan_floor(floor_list, py, px, 0x03);
5376 * Let the user select an item, save its "index"
5378 * Return TRUE only if an acceptable item was chosen by the user.
5380 * The selected item must satisfy the "item_tester_hook()" function,
5381 * if that hook is set, and the "item_tester_tval", if that value is set.
5383 * All "item_tester" restrictions are cleared before this function returns.
5385 * The user is allowed to choose acceptable items from the equipment,
5386 * inventory, or floor, respectively, if the proper flag was given,
5387 * and there are any acceptable items in that location.
5389 * The equipment or inventory are displayed (even if no acceptable
5390 * items are in that location) if the proper flag was given.
5392 * If there are no acceptable items available anywhere, and "str" is
5393 * not NULL, then it will be used as the text of a warning message
5394 * before the function returns.
5396 * Note that the user must press "-" to specify the item on the floor,
5397 * and there is no way to "examine" the item on the floor, while the
5398 * use of "capital" letters will "examine" an inventory/equipment item,
5399 * and prompt for its use.
5401 * If a legal item is selected from the inventory, we save it in "cp"
5402 * directly (0 to 35), and return TRUE.
5404 * If a legal item is selected from the floor, we save it in "cp" as
5405 * a negative (-1 to -511), and return TRUE.
5407 * If no item is available, we do nothing to "cp", and we display a
5408 * warning message, using "str" if available, and return FALSE.
5410 * If no item is selected, we do nothing to "cp", and return FALSE.
5412 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
5413 * to allow the user to enter a command while viewing those screens, and
5414 * also to induce "auto-enter" of stores, and other such stuff.
5416 * Global "p_ptr->command_see" may be set before calling this function to start
5417 * out in "browse" mode. It is cleared before this function returns.
5419 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
5420 * If it is TRUE then we are viewing inventory, else equipment.
5422 * We always erase the prompt when we are done, leaving a blank line,
5423 * or a warning message, if appropriate, if no items are available.
5425 bool get_item(int *cp, cptr pmt, cptr str, int mode)
5427 s16b this_o_idx, next_o_idx = 0;
5431 int j, k, i1, i2, e1, e2;
5441 bool allow_floor = FALSE;
5443 bool toggle = FALSE;
5449 extern bool select_the_force;
5451 int menu_line = (use_menu ? 1 : 0);
5457 static char prev_tag = '\0';
5458 char cur_tag = '\0';
5460 #endif /* ALLOW_REPEAT */
5462 #ifdef ALLOW_EASY_FLOOR /* TNB */
5464 if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
5466 #endif /* ALLOW_EASY_FLOOR -- TNB */
5469 if (mode & USE_EQUIP) equip = TRUE;
5470 if (mode & USE_INVEN) inven = TRUE;
5471 if (mode & USE_FLOOR) floor = TRUE;
5475 /* Get the item index */
5476 if (repeat_pull(cp))
5479 if (select_the_force && (*cp == INVEN_FORCE))
5481 item_tester_tval = 0;
5482 item_tester_hook = NULL;
5483 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5488 else if (floor && (*cp < 0))
5495 /* Acquire object */
5498 /* Validate the item */
5499 if (item_tester_okay(o_ptr))
5501 /* Forget restrictions */
5502 item_tester_tval = 0;
5503 item_tester_hook = NULL;
5504 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5511 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
5512 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
5514 if (prev_tag && command_cmd)
5516 /* Look up the tag and validate the item */
5517 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
5518 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
5519 else if (!get_item_okay(k)) /* Reject */;
5522 /* Accept that choice */
5525 /* Forget restrictions */
5526 item_tester_tval = 0;
5527 item_tester_hook = NULL;
5528 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5534 prev_tag = '\0'; /* prev_tag is no longer effective */
5537 /* Verify the item */
5538 else if (get_item_okay(*cp))
5540 /* Forget restrictions */
5541 item_tester_tval = 0;
5542 item_tester_hook = NULL;
5543 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5551 #endif /* ALLOW_REPEAT */
5554 /* Paranoia XXX XXX XXX */
5561 /* No item selected */
5565 /* Full inventory */
5567 i2 = INVEN_PACK - 1;
5569 /* Forbid inventory */
5570 if (!inven) i2 = -1;
5573 for (j = 0; j < INVEN_PACK; j++)
5574 if (item_tester_okay(&inventory[j])) max_inven++;
5577 /* Restrict inventory indexes */
5578 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5579 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5582 /* Full equipment */
5584 e2 = INVEN_TOTAL - 1;
5586 /* Forbid equipment */
5587 if (!equip) e2 = -1;
5590 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5591 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
5592 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5595 /* Restrict equipment indexes */
5596 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5597 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5599 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
5603 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
5605 else if (p_ptr->hidarite) e1 = INVEN_RARM;
5609 /* Restrict floor usage */
5612 /* Scan all objects in the grid */
5613 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5617 /* Acquire object */
5618 o_ptr = &o_list[this_o_idx];
5620 /* Acquire next object */
5621 next_o_idx = o_ptr->next_o_idx;
5623 /* Accept the item on the floor if legal */
5624 if (item_tester_okay(o_ptr) && (o_ptr->marked & OM_FOUND)) allow_floor = TRUE;
5628 /* Require at least one legal choice */
5629 if (!allow_floor && (i1 > i2) && (e1 > e2))
5631 /* Cancel p_ptr->command_see */
5632 command_see = FALSE;
5640 if (select_the_force) {
5646 /* Analyze choices */
5649 /* Hack -- Start on equipment if requested */
5650 if (command_see && command_wrk && equip)
5655 /* Use inventory if allowed */
5658 command_wrk = FALSE;
5661 /* Use equipment if allowed */
5667 /* Use inventory for floor */
5670 command_wrk = FALSE;
5676 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5678 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5680 /* Hack -- start out in "display" mode */
5688 /* Repeat until done */
5691 int get_item_label = 0;
5698 for (j = 0; j < 8; j++)
5701 if (!angband_term[j]) continue;
5703 /* Count windows displaying inven */
5704 if (window_flag[j] & (PW_INVEN)) ni++;
5706 /* Count windows displaying equip */
5707 if (window_flag[j] & (PW_EQUIP)) ne++;
5710 /* Toggle if needed */
5711 if ((command_wrk && ni && !ne) ||
5712 (!command_wrk && !ni && ne))
5715 toggle_inven_equip();
5722 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5724 /* Redraw windows */
5728 /* Inventory screen */
5731 /* Redraw if needed */
5732 if (command_see) get_item_label = show_inven(menu_line);
5735 /* Equipment screen */
5738 /* Redraw if needed */
5739 if (command_see) get_item_label = show_equip(menu_line);
5742 /* Viewing inventory */
5745 /* Begin the prompt */
5747 sprintf(out_val, "»ý¤Áʪ:");
5749 sprintf(out_val, "Inven:");
5752 /* Some legal items */
5753 if ((i1 <= i2) && !use_menu)
5755 /* Build the prompt */
5757 sprintf(tmp_val, "%c-%c,'(',')',",
5759 sprintf(tmp_val, " %c-%c,'(',')',",
5761 index_to_label(i1), index_to_label(i2));
5764 strcat(out_val, tmp_val);
5767 /* Indicate ability to "view" */
5769 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5771 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5776 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
5778 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
5782 /* Viewing equipment */
5785 /* Begin the prompt */
5787 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5789 sprintf(out_val, "Equip:");
5792 /* Some legal items */
5793 if ((e1 <= e2) && !use_menu)
5795 /* Build the prompt */
5797 sprintf(tmp_val, "%c-%c,'(',')',",
5799 sprintf(tmp_val, " %c-%c,'(',')',",
5801 index_to_label(e1), index_to_label(e2));
5804 strcat(out_val, tmp_val);
5807 /* Indicate ability to "view" */
5809 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5811 if (!command_see) strcat(out_val, " * to see,");
5816 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
5818 if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
5822 /* Indicate legality of the "floor" item */
5824 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
5825 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
5827 if (allow_floor) strcat(out_val, " - for floor,");
5828 if (select_the_force) strcat(out_val, " w for the Force,");
5831 /* Finish the prompt */
5832 strcat(out_val, " ESC");
5834 /* Build the prompt */
5835 sprintf(tmp_val, "(%s) %s", out_val, pmt);
5837 /* Show the prompt */
5845 int max_line = (command_wrk ? max_equip : max_inven);
5861 menu_line += (max_line - 1);
5880 /* Verify legality */
5881 if (!inven || !equip)
5887 /* Hack -- Fix screen */
5897 /* Switch inven/equip */
5898 command_wrk = !command_wrk;
5899 max_line = (command_wrk ? max_equip : max_inven);
5900 if (menu_line > max_line) menu_line = max_line;
5902 /* Need to redraw */
5911 if (command_wrk == USE_FLOOR)
5914 (*cp) = -get_item_label;
5918 /* Validate the item */
5919 if (!get_item_okay(get_item_label))
5925 /* Allow player to "refuse" certain actions */
5926 if (!get_item_allow(get_item_label))
5932 /* Accept that choice */
5933 (*cp) = get_item_label;
5942 if (select_the_force) {
5950 if (menu_line > max_line) menu_line -= max_line;
5971 command_see = FALSE;
5991 /* Verify legality */
5992 if (!inven || !equip)
5998 /* Hack -- Fix screen */
6008 /* Switch inven/equip */
6009 command_wrk = !command_wrk;
6011 /* Need to redraw */
6017 /* Use floor item */
6020 /* Scan all objects in the grid */
6021 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
6025 /* Acquire object */
6026 o_ptr = &o_list[this_o_idx];
6028 /* Acquire next object */
6029 next_o_idx = o_ptr->next_o_idx;
6031 /* Validate the item */
6032 if (!item_tester_okay(o_ptr)) continue;
6037 /* Verify the item (if required) */
6039 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
6041 if (other_query_flag && !verify("Try", k)) continue;
6045 /* Allow player to "refuse" certain actions */
6046 if (!get_item_allow(k)) continue;
6048 /* Accept that choice */
6065 case '1': case '2': case '3':
6066 case '4': case '5': case '6':
6067 case '7': case '8': case '9':
6069 /* Look up the tag */
6070 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
6076 /* Hack -- Validate the item */
6077 if ((k < INVEN_RARM) ? !inven : !equip)
6083 /* Validate the item */
6084 if (!get_item_okay(k))
6090 /* Allow player to "refuse" certain actions */
6091 if (!get_item_allow(k))
6097 /* Accept that choice */
6103 #endif /* ALLOW_REPEAT */
6111 /* Choose "default" inventory item */
6114 k = ((i1 == i2) ? i1 : -1);
6117 /* Choose "default" equipment item */
6120 k = ((e1 == e2) ? e1 : -1);
6123 /* Validate the item */
6124 if (!get_item_okay(k))
6130 /* Allow player to "refuse" certain actions */
6131 if (!get_item_allow(k))
6137 /* Accept that choice */
6147 if (select_the_force) {
6160 bool not_found = FALSE;
6162 /* Look up the alphabetical tag */
6163 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
6168 /* Hack -- Validate the item */
6169 else if ((k < INVEN_RARM) ? !inven : !equip)
6174 /* Validate the item */
6175 else if (!get_item_okay(k))
6182 /* Accept that choice */
6188 #endif /* ALLOW_REPEAT */
6192 /* Extract "query" setting */
6193 ver = isupper(which);
6194 which = tolower(which);
6196 /* Convert letter to inventory index */
6199 if (which == '(') k = i1;
6200 else if (which == ')') k = i2;
6201 else k = label_to_inven(which);
6204 /* Convert letter to equipment index */
6207 if (which == '(') k = e1;
6208 else if (which == ')') k = e2;
6209 else k = label_to_equip(which);
6212 /* Validate the item */
6213 if (!get_item_okay(k))
6219 /* Verify the item */
6221 if (ver && !verify("ËÜÅö¤Ë", k))
6223 if (ver && !verify("Try", k))
6231 /* Allow player to "refuse" certain actions */
6232 if (!get_item_allow(k))
6238 /* Accept that choice */
6249 /* Fix the screen if necessary */
6255 /* Hack -- Cancel "display" */
6256 command_see = FALSE;
6260 /* Forget the item_tester_tval restriction */
6261 item_tester_tval = 0;
6263 item_tester_no_ryoute = FALSE;
6265 /* Forget the item_tester_hook restriction */
6266 item_tester_hook = NULL;
6269 /* Clean up 'show choices' */
6270 /* Toggle again if needed */
6271 if (toggle) toggle_inven_equip();
6274 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6280 /* Clear the prompt line */
6283 /* Warning if needed */
6284 if (oops && str) msg_print(str);
6290 if (command_cmd) prev_tag = cur_tag;
6291 #endif /* ALLOW_REPEAT */
6293 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6301 #ifdef ALLOW_EASY_FLOOR
6306 * Return a list of o_list[] indexes of items at the given cave
6307 * location. Valid flags are:
6309 * mode & 0x01 -- Item tester
6310 * mode & 0x02 -- Marked items only
6311 * mode & 0x04 -- Stop after first
6313 int scan_floor(int *items, int y, int x, int mode)
6315 int this_o_idx, next_o_idx;
6320 if (!in_bounds(y, x)) return 0;
6322 /* Scan all objects in the grid */
6323 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
6327 /* Acquire object */
6328 o_ptr = &o_list[this_o_idx];
6330 /* Acquire next object */
6331 next_o_idx = o_ptr->next_o_idx;
6334 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
6337 if ((mode & 0x02) && !(o_ptr->marked & OM_FOUND)) continue;
6339 /* Accept this item */
6340 /* XXX Hack -- Enforce limit */
6342 items[num] = this_o_idx;
6347 if (mode & 0x04) break;
6356 * Display a list of the items on the floor at the given location.
6358 int show_floor(int target_item, int y, int x, int *min_width)
6365 char o_name[MAX_NLEN];
6371 char out_desc[23][MAX_NLEN];
6372 int target_item_label = 0;
6374 int floor_list[23], floor_num;
6376 char floor_label[52 + 1];
6378 bool dont_need_to_show_weights = TRUE;
6381 Term_get_size(&wid, &hgt);
6383 /* Default length */
6384 len = MAX((*min_width), 20);
6387 /* Scan for objects in the grid, using item_tester_okay() */
6388 floor_num = scan_floor(floor_list, y, x, 0x03);
6390 /* Display the floor objects */
6391 for (k = 0, i = 0; i < floor_num && i < 23; i++)
6393 o_ptr = &o_list[floor_list[i]];
6395 /* Describe the object */
6396 object_desc(o_name, o_ptr, 0);
6398 /* Save the index */
6401 /* Acquire inventory color */
6402 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
6404 /* Save the object description */
6405 strcpy(out_desc[k], o_name);
6407 /* Find the predicted "line length" */
6408 l = strlen(out_desc[k]) + 5;
6410 /* Be sure to account for the weight */
6411 if (show_weights) l += 9;
6413 if (o_ptr->tval != TV_GOLD) dont_need_to_show_weights = FALSE;
6415 /* Maintain the maximum length */
6416 if (l > len) len = l;
6418 /* Advance to next "line" */
6422 if (show_weights && dont_need_to_show_weights) len -= 9;
6427 /* Find the column to start in */
6428 col = (len > wid - 4) ? 0 : (wid - len - 1);
6430 prepare_label_string_floor(floor_label, floor_list, floor_num);
6432 /* Output each entry */
6433 for (j = 0; j < k; j++)
6436 i = floor_list[out_index[j]];
6441 /* Clear the line */
6442 prt("", j + 1, col ? col - 2 : col);
6444 if (use_menu && target_item)
6446 if (j == (target_item-1))
6449 strcpy(tmp_val, "¡Õ");
6451 strcpy(tmp_val, "> ");
6453 target_item_label = i;
6455 else strcpy(tmp_val, " ");
6459 /* Prepare an index --(-- */
6460 sprintf(tmp_val, "%c)", floor_label[j]);
6463 /* Clear the line with the (possibly indented) index */
6464 put_str(tmp_val, j + 1, col);
6466 /* Display the entry itself */
6467 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
6469 /* Display the weight if needed */
6470 if (show_weights && (o_ptr->tval != TV_GOLD))
6472 int wgt = o_ptr->weight * o_ptr->number;
6474 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
6476 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
6479 prt(tmp_val, j + 1, wid - 9);
6483 /* Make a "shadow" below the list (only if needed) */
6484 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
6486 return target_item_label;
6490 * This version of get_item() is called by get_item() when
6491 * the easy_floor is on.
6493 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
6495 char n1 = ' ', n2 = ' ', which = ' ';
6497 int j, k, i1, i2, e1, e2;
6504 bool equip = (mode & USE_EQUIP) ? TRUE : FALSE;
6505 bool inven = (mode & USE_INVEN) ? TRUE : FALSE;
6506 bool floor = (mode & USE_FLOOR) ? TRUE : FALSE;
6508 bool allow_equip = FALSE;
6509 bool allow_inven = FALSE;
6510 bool allow_floor = FALSE;
6512 bool toggle = FALSE;
6517 int floor_num, floor_list[23], floor_top = 0;
6520 extern bool select_the_force;
6522 int menu_line = (use_menu ? 1 : 0);
6528 static char prev_tag = '\0';
6529 char cur_tag = '\0';
6531 /* Get the item index */
6532 if (repeat_pull(cp))
6535 if (select_the_force && (*cp == INVEN_FORCE))
6537 item_tester_tval = 0;
6538 item_tester_hook = NULL;
6539 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6544 else if (floor && (*cp < 0))
6546 if (prev_tag && command_cmd)
6548 /* Scan all objects in the grid */
6549 floor_num = scan_floor(floor_list, py, px, 0x03);
6551 /* Look up the tag */
6552 if (get_tag_floor(&k, prev_tag, floor_list, floor_num))
6554 /* Accept that choice */
6555 (*cp) = 0 - floor_list[k];
6557 /* Forget restrictions */
6558 item_tester_tval = 0;
6559 item_tester_hook = NULL;
6560 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6566 prev_tag = '\0'; /* prev_tag is no longer effective */
6569 /* Validate the item */
6570 else if (item_tester_okay(&o_list[0 - (*cp)]))
6572 /* Forget restrictions */
6573 item_tester_tval = 0;
6574 item_tester_hook = NULL;
6575 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6582 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
6583 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
6585 if (prev_tag && command_cmd)
6587 /* Look up the tag and validate the item */
6588 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
6589 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
6590 else if (!get_item_okay(k)) /* Reject */;
6593 /* Accept that choice */
6596 /* Forget restrictions */
6597 item_tester_tval = 0;
6598 item_tester_hook = NULL;
6599 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6605 prev_tag = '\0'; /* prev_tag is no longer effective */
6608 /* Verify the item */
6609 else if (get_item_okay(*cp))
6611 /* Forget restrictions */
6612 item_tester_tval = 0;
6613 item_tester_hook = NULL;
6614 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6622 #endif /* ALLOW_REPEAT */
6625 /* Paranoia XXX XXX XXX */
6632 /* No item selected */
6636 /* Full inventory */
6638 i2 = INVEN_PACK - 1;
6640 /* Forbid inventory */
6641 if (!inven) i2 = -1;
6644 for (j = 0; j < INVEN_PACK; j++)
6645 if (item_tester_okay(&inventory[j])) max_inven++;
6648 /* Restrict inventory indexes */
6649 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
6650 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
6653 /* Full equipment */
6655 e2 = INVEN_TOTAL - 1;
6657 /* Forbid equipment */
6658 if (!equip) e2 = -1;
6661 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
6662 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
6663 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
6666 /* Restrict equipment indexes */
6667 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
6668 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
6670 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
6674 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
6676 else if (p_ptr->hidarite) e1 = INVEN_RARM;
6680 /* Count "okay" floor items */
6683 /* Restrict floor usage */
6686 /* Scan all objects in the grid */
6687 floor_num = scan_floor(floor_list, py, px, 0x03);
6690 /* Accept inventory */
6691 if (i1 <= i2) allow_inven = TRUE;
6693 /* Accept equipment */
6694 if (e1 <= e2) allow_equip = TRUE;
6697 if (floor_num) allow_floor = TRUE;
6699 /* Require at least one legal choice */
6700 if (!allow_inven && !allow_equip && !allow_floor)
6702 /* Cancel p_ptr->command_see */
6703 command_see = FALSE;
6711 if (select_the_force) {
6717 /* Analyze choices */
6720 /* Hack -- Start on equipment if requested */
6721 if (command_see && (command_wrk == (USE_EQUIP))
6724 command_wrk = (USE_EQUIP);
6727 /* Use inventory if allowed */
6728 else if (allow_inven)
6730 command_wrk = (USE_INVEN);
6733 /* Use equipment if allowed */
6734 else if (allow_equip)
6736 command_wrk = (USE_EQUIP);
6739 /* Use floor if allowed */
6740 else if (allow_floor)
6742 command_wrk = (USE_FLOOR);
6747 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
6749 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
6751 /* Hack -- start out in "display" mode */
6758 /* Repeat until done */
6761 int get_item_label = 0;
6768 for (j = 0; j < 8; j++)
6771 if (!angband_term[j]) continue;
6773 /* Count windows displaying inven */
6774 if (window_flag[j] & (PW_INVEN)) ni++;
6776 /* Count windows displaying equip */
6777 if (window_flag[j] & (PW_EQUIP)) ne++;
6780 /* Toggle if needed */
6781 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
6782 (command_wrk == (USE_INVEN) && !ni && ne))
6785 toggle_inven_equip();
6792 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6794 /* Redraw windows */
6797 /* Inventory screen */
6798 if (command_wrk == (USE_INVEN))
6800 /* Extract the legal requests */
6804 /* Redraw if needed */
6805 if (command_see) get_item_label = show_inven(menu_line);
6808 /* Equipment screen */
6809 else if (command_wrk == (USE_EQUIP))
6811 /* Extract the legal requests */
6812 n1 = I2A(e1 - INVEN_RARM);
6813 n2 = I2A(e2 - INVEN_RARM);
6815 /* Redraw if needed */
6816 if (command_see) get_item_label = show_equip(menu_line);
6820 else if (command_wrk == (USE_FLOOR))
6823 k = MIN(floor_top + 23, floor_num) - 1;
6825 /* Extract the legal requests */
6826 n1 = I2A(j - floor_top);
6827 n2 = I2A(k - floor_top);
6829 /* Redraw if needed */
6830 if (command_see) get_item_label = show_floor(menu_line, py, px, &min_width);
6833 /* Viewing inventory */
6834 if (command_wrk == (USE_INVEN))
6836 /* Begin the prompt */
6838 sprintf(out_val, "»ý¤Áʪ:");
6840 sprintf(out_val, "Inven:");
6845 /* Build the prompt */
6847 sprintf(tmp_val, "%c-%c,'(',')',",
6849 sprintf(tmp_val, " %c-%c,'(',')',",
6851 index_to_label(i1), index_to_label(i2));
6854 strcat(out_val, tmp_val);
6857 /* Indicate ability to "view" */
6859 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6861 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6869 strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
6870 else if (allow_floor)
6871 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
6873 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6876 strcat(out_val, " / for Equip,");
6877 else if (allow_floor)
6878 strcat(out_val, " 6 for Equip,");
6880 strcat(out_val, " 4 or 6 for Equip,");
6889 strcat(out_val, " '-'¾²¾å,");
6890 else if (allow_equip)
6891 strcat(out_val, " '4' ¾²¾å,");
6893 strcat(out_val, " '4'or'6' ¾²¾å,");
6896 strcat(out_val, " - for floor,");
6897 else if (allow_equip)
6898 strcat(out_val, " 4 for floor,");
6900 strcat(out_val, " 4 or 6 for floor,");
6905 /* Viewing equipment */
6906 else if (command_wrk == (USE_EQUIP))
6908 /* Begin the prompt */
6910 sprintf(out_val, "ÁõÈ÷ÉÊ:");
6912 sprintf(out_val, "Equip:");
6917 /* Build the prompt */
6919 sprintf(tmp_val, "%c-%c,'(',')',",
6921 sprintf(tmp_val, " %c-%c,'(',')',",
6923 index_to_label(e1), index_to_label(e2));
6926 strcat(out_val, tmp_val);
6929 /* Indicate ability to "view" */
6931 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6933 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6941 strcat(out_val, " '/' »ý¤Áʪ,");
6942 else if (allow_floor)
6943 strcat(out_val, " '4' »ý¤Áʪ,");
6945 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6948 strcat(out_val, " / for Inven,");
6949 else if (allow_floor)
6950 strcat(out_val, " 4 for Inven,");
6952 strcat(out_val, " 4 or 6 for Inven,");
6961 strcat(out_val, " '-'¾²¾å,");
6962 else if (allow_inven)
6963 strcat(out_val, " '6' ¾²¾å,");
6965 strcat(out_val, " '4'or'6' ¾²¾å,");
6968 strcat(out_val, " - for floor,");
6969 else if (allow_inven)
6970 strcat(out_val, " 6 for floor,");
6972 strcat(out_val, " 4 or 6 for floor,");
6978 else if (command_wrk == (USE_FLOOR))
6980 /* Begin the prompt */
6982 sprintf(out_val, "¾²¾å:");
6984 sprintf(out_val, "Floor:");
6989 /* Build the prompt */
6991 sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
6993 sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
6997 strcat(out_val, tmp_val);
7000 /* Indicate ability to "view" */
7002 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
7004 if (!command_see && !use_menu) strcat(out_val, " * to see,");
7009 if (allow_inven && allow_equip)
7012 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
7014 strcat(out_val, " 4 for Equip, 6 for Inven,");
7017 else if (allow_inven)
7020 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
7022 strcat(out_val, " 4 or 6 for Inven,");
7025 else if (allow_equip)
7028 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
7030 strcat(out_val, " 4 or 6 for Equip,");
7035 else if (allow_inven)
7038 strcat(out_val, " '/' »ý¤Áʪ,");
7040 strcat(out_val, " / for Inven,");
7043 else if (allow_equip)
7046 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
7048 strcat(out_val, " / for Equip,");
7053 if (command_see && !use_menu)
7056 strcat(out_val, " Enter ¼¡,");
7058 strcat(out_val, " Enter for scroll down,");
7065 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
7067 if (select_the_force) strcat(out_val, " w for the Force,");
7070 /* Finish the prompt */
7071 strcat(out_val, " ESC");
7073 /* Build the prompt */
7074 sprintf(tmp_val, "(%s) %s", out_val, pmt);
7076 /* Show the prompt */
7085 if (command_wrk == USE_INVEN) max_line = max_inven;
7086 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7087 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7103 menu_line += (max_line - 1);
7119 /* Verify legality */
7120 if (command_wrk == (USE_INVEN))
7122 if (allow_floor) command_wrk = USE_FLOOR;
7123 else if (allow_equip) command_wrk = USE_EQUIP;
7130 else if (command_wrk == (USE_EQUIP))
7132 if (allow_inven) command_wrk = USE_INVEN;
7133 else if (allow_floor) command_wrk = USE_FLOOR;
7140 else if (command_wrk == (USE_FLOOR))
7142 if (allow_equip) command_wrk = USE_EQUIP;
7143 else if (allow_inven) command_wrk = USE_INVEN;
7156 /* Hack -- Fix screen */
7166 /* Switch inven/equip */
7167 if (command_wrk == USE_INVEN) max_line = max_inven;
7168 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7169 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7170 if (menu_line > max_line) menu_line = max_line;
7172 /* Need to redraw */
7180 /* Verify legality */
7181 if (command_wrk == (USE_INVEN))
7183 if (allow_equip) command_wrk = USE_EQUIP;
7184 else if (allow_floor) command_wrk = USE_FLOOR;
7191 else if (command_wrk == (USE_EQUIP))
7193 if (allow_floor) command_wrk = USE_FLOOR;
7194 else if (allow_inven) command_wrk = USE_INVEN;
7201 else if (command_wrk == (USE_FLOOR))
7203 if (allow_inven) command_wrk = USE_INVEN;
7204 else if (allow_equip) command_wrk = USE_EQUIP;
7217 /* Hack -- Fix screen */
7227 /* Switch inven/equip */
7228 if (command_wrk == USE_INVEN) max_line = max_inven;
7229 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7230 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7231 if (menu_line > max_line) menu_line = max_line;
7233 /* Need to redraw */
7242 if (command_wrk == USE_FLOOR)
7245 (*cp) = -get_item_label;
7249 /* Validate the item */
7250 if (!get_item_okay(get_item_label))
7256 /* Allow player to "refuse" certain actions */
7257 if (!get_item_allow(get_item_label))
7263 /* Accept that choice */
7264 (*cp) = get_item_label;
7273 if (select_the_force) {
7281 if (menu_line > max_line) menu_line -= max_line;
7302 command_see = FALSE;
7325 cave_type *c_ptr = &cave[py][px];
7327 if (command_wrk != (USE_FLOOR)) break;
7329 /* Get the object being moved. */
7330 o_idx = c_ptr->o_idx;
7332 /* Only rotate a pile of two or more objects. */
7333 if (!(o_idx && o_list[o_idx].next_o_idx)) break;
7335 /* Remove the first object from the list. */
7336 excise_object_idx(o_idx);
7338 /* Find end of the list. */
7340 while (o_list[i].next_o_idx)
7341 i = o_list[i].next_o_idx;
7343 /* Add after the last object. */
7344 o_list[i].next_o_idx = o_idx;
7346 /* Re-scan floor list */
7347 floor_num = scan_floor(floor_list, py, px, 0x03);
7349 /* Hack -- Fix screen */
7364 if (command_wrk == (USE_INVEN))
7371 command_wrk = (USE_EQUIP);
7373 else if (command_wrk == (USE_EQUIP))
7380 command_wrk = (USE_INVEN);
7382 else if (command_wrk == (USE_FLOOR))
7386 command_wrk = (USE_INVEN);
7388 else if (allow_equip)
7390 command_wrk = (USE_EQUIP);
7399 /* Hack -- Fix screen */
7409 /* Need to redraw */
7422 * If we are already examining the floor, and there
7423 * is only one item, we will always select it.
7424 * If we aren't examining the floor and there is only
7425 * one item, we will select it if floor_query_flag
7430 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
7433 k = 0 - floor_list[0];
7435 /* Allow player to "refuse" certain actions */
7436 if (!get_item_allow(k))
7442 /* Accept that choice */
7451 /* Hack -- Fix screen */
7461 command_wrk = (USE_FLOOR);
7467 case '1': case '2': case '3':
7468 case '4': case '5': case '6':
7469 case '7': case '8': case '9':
7471 if (command_wrk != USE_FLOOR)
7473 /* Look up the tag */
7474 if (!get_tag(&k, which, command_wrk))
7480 /* Hack -- Validate the item */
7481 if ((k < INVEN_RARM) ? !inven : !equip)
7487 /* Validate the item */
7488 if (!get_item_okay(k))
7496 /* Look up the alphabetical tag */
7497 if (get_tag_floor(&k, which, floor_list, floor_num))
7500 k = 0 - floor_list[k];
7509 /* Allow player to "refuse" certain actions */
7510 if (!get_item_allow(k))
7516 /* Accept that choice */
7522 #endif /* ALLOW_REPEAT */
7530 /* Choose "default" inventory item */
7531 if (command_wrk == (USE_INVEN))
7533 k = ((i1 == i2) ? i1 : -1);
7536 /* Choose "default" equipment item */
7537 else if (command_wrk == (USE_EQUIP))
7539 k = ((e1 == e2) ? e1 : -1);
7542 /* Choose "default" floor item */
7543 else if (command_wrk == (USE_FLOOR))
7548 k = 0 - floor_list[0];
7550 /* Allow player to "refuse" certain actions */
7551 if (!get_item_allow(k))
7557 /* Accept that choice */
7565 /* Validate the item */
7566 if (!get_item_okay(k))
7572 /* Allow player to "refuse" certain actions */
7573 if (!get_item_allow(k))
7579 /* Accept that choice */
7589 if (select_the_force) {
7603 if (command_wrk != USE_FLOOR)
7605 bool not_found = FALSE;
7607 /* Look up the alphabetical tag */
7608 if (!get_tag(&k, which, command_wrk))
7613 /* Hack -- Validate the item */
7614 else if ((k < INVEN_RARM) ? !inven : !equip)
7619 /* Validate the item */
7620 else if (!get_item_okay(k))
7627 /* Accept that choice */
7633 #endif /* ALLOW_REPEAT */
7639 /* Look up the alphabetical tag */
7640 if (get_tag_floor(&k, which, floor_list, floor_num))
7643 k = 0 - floor_list[k];
7645 /* Accept that choice */
7651 #endif /* ALLOW_REPEAT */
7656 /* Extract "query" setting */
7657 ver = isupper(which);
7658 which = tolower(which);
7660 /* Convert letter to inventory index */
7661 if (command_wrk == (USE_INVEN))
7663 if (which == '(') k = i1;
7664 else if (which == ')') k = i2;
7665 else k = label_to_inven(which);
7668 /* Convert letter to equipment index */
7669 else if (command_wrk == (USE_EQUIP))
7671 if (which == '(') k = e1;
7672 else if (which == ')') k = e2;
7673 else k = label_to_equip(which);
7676 /* Convert letter to floor index */
7677 else if (command_wrk == USE_FLOOR)
7679 if (which == '(') k = 0;
7680 else if (which == ')') k = floor_num - 1;
7681 else k = islower(which) ? A2I(which) : -1;
7682 if (k < 0 || k >= floor_num || k >= 23)
7689 k = 0 - floor_list[k];
7692 /* Validate the item */
7693 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
7699 /* Verify the item */
7701 if (ver && !verify("ËÜÅö¤Ë", k))
7703 if (ver && !verify("Try", k))
7711 /* Allow player to "refuse" certain actions */
7712 if (!get_item_allow(k))
7718 /* Accept that choice */
7728 /* Fix the screen if necessary */
7734 /* Hack -- Cancel "display" */
7735 command_see = FALSE;
7739 /* Forget the item_tester_tval restriction */
7740 item_tester_tval = 0;
7742 /* Forget the item_tester_hook restriction */
7743 item_tester_hook = NULL;
7746 /* Clean up 'show choices' */
7747 /* Toggle again if needed */
7748 if (toggle) toggle_inven_equip();
7751 p_ptr->window |= (PW_INVEN | PW_EQUIP);
7757 /* Clear the prompt line */
7760 /* Warning if needed */
7761 if (oops && str) msg_print(str);
7767 if (command_cmd) prev_tag = cur_tag;
7768 #endif /* ALLOW_REPEAT */
7770 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
7778 static bool py_pickup_floor_aux(void)
7786 /* Restrict the choices */
7787 item_tester_hook = inven_carry_okay;
7791 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
7792 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
7794 q = "Get which item? ";
7795 s = "You no longer have any room for the objects on the floor.";
7798 if (get_item(&item, q, s, (USE_FLOOR)))
7800 this_o_idx = 0 - item;
7807 /* Pick up the object */
7808 py_pickup_aux(this_o_idx);
7815 * Make the player carry everything in a grid
7817 * If "pickup" is FALSE then only gold will be picked up
7819 * This is called by py_pickup() when easy_floor is TRUE.
7821 void py_pickup_floor(bool pickup)
7823 s16b this_o_idx, next_o_idx = 0;
7825 char o_name[MAX_NLEN];
7828 int floor_num = 0, floor_list[23], floor_o_idx = 0;
7832 /* Scan the pile of objects */
7833 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
7837 /* Access the object */
7838 o_ptr = &o_list[this_o_idx];
7840 /* Describe the object */
7841 object_desc(o_name, o_ptr, 0);
7843 /* Access the next object */
7844 next_o_idx = o_ptr->next_o_idx;
7846 /* Hack -- disturb */
7850 if (o_ptr->tval == TV_GOLD)
7854 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
7855 (long)o_ptr->pval, o_name);
7857 msg_format("You have found %ld gold pieces worth of %s.",
7858 (long) o_ptr->pval, o_name);
7862 /* Collect the gold */
7863 p_ptr->au += o_ptr->pval;
7866 p_ptr->redraw |= (PR_GOLD);
7869 p_ptr->window |= (PW_PLAYER);
7871 /* Delete the gold */
7872 delete_object_idx(this_o_idx);
7874 /* Check the next object */
7877 else if (o_ptr->marked & OM_NOMSG)
7879 /* If 0 or 1 non-NOMSG items are in the pile, the NOMSG ones are
7880 * ignored. Otherwise, they are included in the prompt. */
7881 o_ptr->marked &= ~(OM_NOMSG);
7885 /* Count non-gold objects that can be picked up. */
7886 if (inven_carry_okay(o_ptr))
7891 /* Remember this object index */
7893 floor_list[floor_num] = this_o_idx;
7895 /* Count non-gold objects */
7898 /* Remember this index */
7899 floor_o_idx = this_o_idx;
7902 /* There are no non-gold objects */
7906 /* Mention the number of objects */
7912 /* Access the object */
7913 o_ptr = &o_list[floor_o_idx];
7915 #ifdef ALLOW_EASY_SENSE
7917 /* Option: Make object sensing easy */
7920 /* Sense the object */
7921 (void) sense_object(o_ptr);
7924 #endif /* ALLOW_EASY_SENSE */
7926 /* Describe the object */
7927 object_desc(o_name, o_ptr, 0);
7931 msg_format("%s¤¬¤¢¤ë¡£", o_name);
7933 msg_format("You see %s.", o_name);
7938 /* Multiple objects */
7943 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
7945 msg_format("You see a pile of %d items.", floor_num);
7954 /* The player has no room for anything on the floor. */
7960 /* Access the object */
7961 o_ptr = &o_list[floor_o_idx];
7963 #ifdef ALLOW_EASY_SENSE
7965 /* Option: Make object sensing easy */
7968 /* Sense the object */
7969 (void) sense_object(o_ptr);
7972 #endif /* ALLOW_EASY_SENSE */
7974 /* Describe the object */
7975 object_desc(o_name, o_ptr, 0);
7979 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7981 msg_format("You have no room for %s.", o_name);
7986 /* Multiple objects */
7991 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7993 msg_print("You have no room for any of the objects on the floor.");
8005 /* Hack -- query every object */
8006 if (carry_query_flag)
8008 char out_val[MAX_NLEN+20];
8010 /* Access the object */
8011 o_ptr = &o_list[floor_o_idx];
8013 #ifdef ALLOW_EASY_SENSE
8015 /* Option: Make object sensing easy */
8018 /* Sense the object */
8019 (void) sense_object(o_ptr);
8022 #endif /* ALLOW_EASY_SENSE */
8024 /* Describe the object */
8025 object_desc(o_name, o_ptr, 0);
8027 /* Build a prompt */
8029 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
8031 (void) sprintf(out_val, "Pick up %s? ", o_name);
8035 /* Ask the user to confirm */
8036 if (!get_check(out_val))
8043 /* Access the object */
8044 o_ptr = &o_list[floor_o_idx];
8046 #ifdef ALLOW_EASY_SENSE
8048 /* Option: Make object sensing easy */
8051 /* Sense the object */
8052 (void) sense_object(o_ptr);
8055 #endif /* ALLOW_EASY_SENSE */
8057 /* Pick up the object */
8058 py_pickup_aux(floor_o_idx);
8061 /* Allow the user to choose an object */
8064 while (can_pickup--)
8066 if (!py_pickup_floor_aux()) break;
8071 #endif /* ALLOW_EASY_FLOOR */