4 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
6 * This software may be copied and distributed for educational, research,
7 * and not for profit purposes provided that this copyright and statement
8 * are included in all such copies. Other copyrights may also apply.
11 /* Purpose: Object code, part 1 */
21 * Reset the "visual" lists
23 * This involves resetting various things to their "default" state.
25 * If the "prefs" flag is TRUE, then we will also load the appropriate
26 * "user pref file" based on the current setting of the "use_graphics"
27 * flag. This is useful for switching "graphics" on/off.
29 * The features, objects, and monsters, should all be encoded in the
30 * relevant "font.pref" and/or "graf.prf" files. XXX XXX XXX
32 * The "prefs" parameter is no longer meaningful. XXX XXX XXX
34 void reset_visuals(void)
38 /* Extract some info about terrain features */
39 for (i = 0; i < max_f_idx; i++)
41 feature_type *f_ptr = &f_info[i];
43 /* Assume we will use the underlying values */
44 for (j = 0; j < F_LIT_MAX; j++)
46 f_ptr->x_attr[j] = f_ptr->d_attr[j];
47 f_ptr->x_char[j] = f_ptr->d_char[j];
51 /* Extract default attr/char code for objects */
52 for (i = 0; i < max_k_idx; i++)
54 object_kind *k_ptr = &k_info[i];
56 /* Default attr/char */
57 k_ptr->x_attr = k_ptr->d_attr;
58 k_ptr->x_char = k_ptr->d_char;
61 /* Extract default attr/char code for monsters */
62 for (i = 0; i < max_r_idx; i++)
64 monster_race *r_ptr = &r_info[i];
66 /* Default attr/char */
67 r_ptr->x_attr = r_ptr->d_attr;
68 r_ptr->x_char = r_ptr->d_char;
75 /* Process "graf.prf" */
76 process_pref_file("graf.prf");
78 /* Access the "character" pref file */
79 sprintf(buf, "graf-%s.prf", player_base);
81 /* Process "graf-<playername>.prf" */
82 process_pref_file(buf);
90 /* Process "font.prf" */
91 process_pref_file("font.prf");
93 /* Access the "character" pref file */
94 sprintf(buf, "font-%s.prf", player_base);
96 /* Process "font-<playername>.prf" */
97 process_pref_file(buf);
103 * Obtain the "flags" for an item
105 void object_flags(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
107 object_kind *k_ptr = &k_info[o_ptr->k_idx];
111 for (i = 0; i < TR_FLAG_SIZE; i++)
112 flgs[i] = k_ptr->flags[i];
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 "call chaos : 350 ¥¿¡¼¥óËè"; /*nuke me*/
552 return "call chaos every 350 turns";
559 return "¥í¥±¥Ã¥È (120+level) : 400 ¥¿¡¼¥óËè";
561 return "launch rocket (120+level) every 400 turns";
568 return "¼Ù°Â໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
570 return "dispel evil (level*5) every 300+d300 turns";
577 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300) : 500 ¥¿¡¼¥óËè";
579 return "elemental breath (300) every 500 turns";
586 return "Á±ÎÉÂ໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
588 return "dispel good (level*5) every 300+d300 turns";
595 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
597 return "confuse monster every 15 turns";
604 return "¼þ°Ï¤Î¥â¥ó¥¹¥¿¡¼¤ò̲¤é¤»¤ë : 55 ¥¿¡¼¥óËè";
606 return "sleep nearby monsters every 55 turns";
613 return "ÃÏ¿Ì (Ⱦ·Â 10) : 50 ¥¿¡¼¥óËè";
615 return "earthquake (rad 10) every 50 turns";
622 return "¶²¹² : 3 * (level+10) ¥¿¡¼¥óËè";
624 return "terror every 3 * (level+10) turns";
631 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
633 return "teleport away every 200 turns";
637 case ACT_BANISH_EVIL:
640 return "¼Ù°¾ÃÌÇ : 250+d250 ¥¿¡¼¥óËè";
642 return "banish evil every 250+d250 turns";
649 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
651 return "genocide every 500 turns";
658 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
660 return "mass genocide every 1000 turns";
664 case ACT_CHARM_ANIMAL:
667 return "ưʪ̥λ : 300 ¥¿¡¼¥óËè";
669 return "charm animal every 300 turns";
673 case ACT_CHARM_UNDEAD:
676 return "ÉԻཾ° : 333 ¥¿¡¼¥óËè";
678 return "enslave undead every 333 turns";
682 case ACT_CHARM_OTHER:
685 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 400 ¥¿¡¼¥óËè";
687 return "charm monster every 400 turns";
691 case ACT_CHARM_ANIMALS:
694 return "ưʪͧÏ : 500 ¥¿¡¼¥óËè";
696 return "animal friendship every 500 turns";
700 case ACT_CHARM_OTHERS:
703 return "¼þÊÕ̥λ : 750 ¥¿¡¼¥óËè";
705 return "mass charm every 750 turns";
709 case ACT_SUMMON_ANIMAL:
712 return "ưʪ¾¤´ : 200+d300 ¥¿¡¼¥óËè";
714 return "summon animal every 200+d300 turns";
718 case ACT_SUMMON_PHANTOM:
721 return "»È¤¤Î´ : 200+d200 ¥¿¡¼¥óËè";
723 return "summon phantasmal servant every 200+d200 turns";
727 case ACT_SUMMON_ELEMENTAL:
730 return "¥¨¥ì¥á¥ó¥¿¥ë¾¤´ : 750 ¥¿¡¼¥óËè";
732 return "summon elemental every 750 turns";
736 case ACT_SUMMON_DEMON:
739 return "°Ë⾤´ : 666+d333 ¥¿¡¼¥óËè";
741 return "summon demon every 666+d333 turns";
745 case ACT_SUMMON_UNDEAD:
748 return "ÉԻྤ´ : 666+d333 ¥¿¡¼¥óËè";
750 return "summon undead every 666+d333 turns";
757 return "ͦµ¤²óÉü & 30 hp ²óÉü : 10 ¥¿¡¼¥óËè";
759 return "remove fear & heal 30 hp every 10 turns";
766 return "4d8 hp & ½ý²óÉü : 3+d3 ¥¿¡¼¥óËè";
768 return "heal 4d8 & wounds every 3+d3 turns";
772 case ACT_CURE_POISON:
775 return "ͦµ¤²óÉü/ÆǾä· : 5 ¥¿¡¼¥óËè";
777 return "remove fear and cure poison every 5 turns";
784 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
786 return "restore life levels every 450 turns";
793 return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃͲóÉü : 750 ¥¿¡¼¥óËè";
795 return "restore stats and life levels every 750 turns";
802 return "700 hp ²óÉü : 250 ¥¿¡¼¥óËè";
804 return "heal 700 hit points every 250 turns";
811 return "1000 hp ²óÉü : 888 ¥¿¡¼¥óËè";
813 return "heal 1000 hit points every 888 turns";
820 return "°ì»þŪ¤Ê ESP (´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
822 return "temporary ESP (dur 25+d30) every 200 turns";
829 return "»Îµ¤¹âÍȤȽËÊ¡ (´ü´Ö 50+d50) : 100+d100 ¥¿¡¼¥óËè";
831 return "heroism and blessed (dur 50+d50) every 100+d100 turns";
838 return "Âмٰ·ë³¦ (´ü´Ö level*3 + d25) : 225+d225 ¥¿¡¼¥óËè";
840 return "protect evil (dur level*3 + d25) every 225+d225 turns";
847 return "±êÎä»ÀÅÅÆǤؤÎÂÑÀ (´ü´Ö 40+d40) : 200 ¥¿¡¼¥óËè";
849 return "resist elements (dur 40+d40) every 200 turns";
856 return "²Ã® (´ü´Ö 20+d20) : 250 ¥¿¡¼¥óËè";
858 return "speed (dur 20+d20) every 250 turns";
865 return "²Ã® (´ü´Ö 75+d75) : 200+d200 ¥¿¡¼¥óËè";
867 return "speed (dur 75+d75) every 200+d200 turns";
874 return "¥ì¥¤¥¹²½ (level/2 + d(level/2)) : 1000 ¥¿¡¼¥óËè";
876 return "wraith form (level/2 + d(level/2)) every 1000 turns";
883 return "̵Ũ (´ü´Ö 8+d8) : 1000 ¥¿¡¼¥óËè";
885 return "invulnerability (dur 8+d8) every 1000 turns";
892 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) : 10+d10 ¥¿¡¼¥óËè";
894 return "light area (dam 2d15) every 10+d10 turns";
901 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) & ¼þÊÕ¥Þ¥Ã¥× : 50+d50 ¥¿¡¼¥óËè";
903 return "light (dam 2d15) & map area every 50+d50 turns";
910 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
912 return "detection every 55+d55 turns";
916 case ACT_DETECT_XTRA:
919 return "Á´´¶ÃΡ¢Ãµº÷¡¢*´ÕÄê* : 1000 ¥¿¡¼¥óËè";
921 return "detection, probing and identify true every 1000 turns";
928 return "*´ÕÄê* : 750 ¥¿¡¼¥óËè";
930 return "identify true every 750 turns";
937 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
939 return "identify spell every 10 turns";
946 return "Çúȯ¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
948 return "explosive rune every 200 turns";
955 return "¼é¤ê¤Î¥ë¡¼¥ó : 400 ¥¿¡¼¥óËè";
957 return "rune of protection every 400 turns";
964 return "¶õÊ¢½¼Â : 200 ¥¿¡¼¥óËè";
966 return "satisfy hunger every 200 turns";
973 return "¥É¥¢Ç˲õ : 10 ¥¿¡¼¥óËè";
975 return "destroy doors every 10 turns";
982 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
984 return "stone to mud every 5 turns";
991 return "ºÆ½¼Å¶ : 70 ¥¿¡¼¥óËè";
993 return "recharging every 70 turns";
1000 return "Ï£¶â½Ñ : 500 ¥¿¡¼¥óËè";
1002 return "alchemy every 500 turns";
1009 return "¼¡¸µ¤ÎÈâ : 100 ¥¿¡¼¥óËè";
1011 return "dimension door every 100 turns";
1018 return "¥Æ¥ì¥Ý¡¼¥È (range 100) : 45 ¥¿¡¼¥óËè";
1020 return "teleport (range 100) every 45 turns";
1027 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1029 return "word of recall every 200 turns";
1038 return "something undefined";
1045 /* Some artifacts can be activated */
1046 switch (o_ptr->name1)
1051 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1053 return "fire bolt (9d8) every 8+d8 turns";
1060 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1062 return "frost bolt (6d8) every 7+d7 turns";
1069 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1071 return "lightning bolt (4d8) every 6+d6 turns";
1078 return "°½±À(12) : 4+d4 ¥¿¡¼¥óËè";
1080 return "stinking cloud (12) every 4+d4 turns";
1087 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(48) : 5+d5 ¥¿¡¼¥óËè";
1089 return "frost ball (48) every 5+d5 turns";
1096 return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
1098 return "remove fear and cure poison every 5 turns";
1105 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(100) : 200 ¥¿¡¼¥óËè";
1107 return "frost ball (100) every 200 turns";
1114 return "¶Ç¤Î»ÕÃľ¤´ : 500+d500 ¥¿¡¼¥óËè";
1116 return "summon the Legion of the Dawn every 500+d500 turns";
1123 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 400 ¥¿¡¼¥óËè";
1125 return "fire ball (72) every 400 turns";
1132 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 100 ¥¿¡¼¥óËè";
1134 return "large fire ball (72) every 100 turns";
1141 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(120) : 15 ¥¿¡¼¥óËè";
1143 return "large fire ball (120) every 15 turns";
1150 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 200 ¥¿¡¼¥óËè";
1152 return "haste self (20+d20 turns) every 200 turns";
1159 return "À¸Ì¿Îϵۼý(120) : 400 ¥¿¡¼¥óËè";
1161 return "drain life (120) every 400 turns";
1168 return "À¸Ì¿Îϵۼý(90) : 70 ¥¿¡¼¥óËè";
1170 return "drain life (90) every 70 turns";
1177 return "¥É¥¢/¥È¥é¥Ã¥×Ê´ºÕ : 10 ¥¿¡¼¥óËè";
1179 return "door and trap destruction every 10 turns";
1187 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1189 return "word of recall every 200 turns";
1196 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1198 return "haste self (20+d20 turns) every 100+d100 turns";
1205 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
1207 return "identify every 10 turns";
1214 return "Ä´ºº¡¢Á´´¶ÃΡ¢Á´´ÕÄê : 100 ¥¿¡¼¥óËè";
1216 return "probing, detection and full id every 100 turns";
1223 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
1225 return "mass genocide every 1000 turns";
1232 return "½ý¤Î¼£Ìþ(4d7) : 3+d3 ¥¿¡¼¥óËè";
1234 return "cure wounds (4d7) every 3+d3 turns";
1241 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
1243 return "fire branding of bolts every 999 turns";
1250 return "¥Õ¥¡¥¤¥¢¡ª : 15 ¥¿¡¼¥óËè";
1252 return "fire! every 15 turns";
1257 case ART_WEREWINDLE:
1260 return "ƨÁö : 35 ¥¿¡¼¥óËè";
1262 return "a getaway every 35 turns";
1269 return "¥Æ¥ì¥Ý¡¼¥È : 25 ¥¿¡¼¥óËè";
1271 return "a teleport every 25 turns";
1278 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1280 return "lightning ball (100) every 200 turns";
1287 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1289 return "Frost ball (100) every 200 turns";
1296 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
1298 return "stone to mud every 5 turns";
1305 return "´äÀÐÍϲò : 2 ¥¿¡¼¥óËè";
1307 return "stone to mud every 2 turns";
1311 case ART_SOULKEEPER:
1314 return "ÂÎÎϲóÉü(1000) : 888 ¥¿¡¼¥óËè";
1316 return "heal (1000) every 888 turns";
1323 return ("²óÉü (777)¡¢Ìþ¤·¡¢»Îµ¤¹âÍÈ : 300 ¥¿¡¼¥óËè");
1325 return ("heal (777), curing and heroism every 300 turns");
1332 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
1334 return "genocide every 500 turns";
1341 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
1343 return "restore life levels every 450 turns";
1350 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
1352 return "teleport away every 150 turns";
1360 return "Á´ÂÑÀ(20+d20¥¿¡¼¥ó) : 111 ¥¿¡¼¥óËè";
1362 return "resistance (20+d20 turns) every 111 turns";
1366 case ART_HOLCOLLETH:
1369 return "¥¹¥ê¡¼¥×(II) : 55 ¥¿¡¼¥óËè";
1371 return "Sleep II every 55 turns";
1378 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
1380 return "recharge item I every 70 turns";
1387 return "¥Æ¥ì¥Ý¡¼¥È : 45 ¥¿¡¼¥óËè";
1389 return "teleport every 45 turns";
1396 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
1398 return "confuse monster every 15 turns";
1402 case ART_CAMMITHRIM:
1405 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1407 return "magic missile (2d6) every 2 turns";
1414 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1416 return "fire bolt (9d8) every 8+d8 turns";
1420 case ART_PAURNIMMEN:
1423 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1425 return "frost bolt (6d8) every 7+d7 turns";
1432 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1434 return "lightning bolt (4d8) every 5+d5 turns";
1441 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
1443 return "acid bolt (5d8) every 6+d6 turns";
1450 return "ËâË¡¤ÎÌð(150) : 90+d90 ¥¿¡¼¥óËè";
1452 return "a magical arrow (150) every 90+d90 turns";
1456 case ART_HOLHENNETH:
1459 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
1461 return "detection every 55+d55 turns";
1468 return "ÂÎÎϲóÉü(700) : 250 ¥¿¡¼¥óËè";
1470 return "heal (700) every 250 turns";
1477 return "¥¹¥¿¡¼¡¦¥Ü¡¼¥ë(150) : 1000 ¥¿¡¼¥óËè";
1479 return "star ball (150) every 1000 turns";
1483 case ART_BLADETURNER:
1486 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300), »Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢ÂÑÀ";
1488 return "breathe elements (300), hero, bless, and resistance";
1495 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1497 return "illumination every 10+d10 turns";
1504 return "ËâË¡¤ÎÃϿޤȸ÷ : 50+d50 ¥¿¡¼¥óËè";
1506 return "magic mapping and light every 50+d50 turns";
1513 return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô : 20+d20 ¥¿¡¼¥óËè";
1515 return "clairvoyance and recall, draining you every 20+d20 turns";
1523 return "¼Ù°Â໶(x5) : 200+d200 ¥¿¡¼¥óËè";
1525 return "dispel evil (x5) every 200+d200 turns";
1532 return "¼Ù°Â໶(x5) : 100+d100 ¥¿¡¼¥óËè";
1534 return "dispel evil (x5) every 100+d100 turns";
1542 return "Âмٰ·ë³¦ : 225+d225 ¥¿¡¼¥óËè";
1544 return "protection from evil every 225+d225 turns";
1551 return "Ã⩹¶·â(100) : 100+d100 ¥¿¡¼¥óËè";
1553 return "a strangling attack (100) every 100+d100 turns";
1560 return "¥¹¥Ô¡¼¥É(75+d75¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1562 return "haste self (75+d75 turns) every 150+d150 turns";
1569 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(300) : 225+d225 ¥¿¡¼¥óËè";
1571 return "large fire ball (300) every 225+d225 turns";
1578 return "µðÂ祢¥¤¥¹¡¦¥Ü¡¼¥ë(400) : 325+d325 ¥¿¡¼¥óËè";
1580 return "large frost ball (400) every 325+d325 turns";
1588 return "µðÂ祵¥ó¥À¡¼¡¦¥Ü¡¼¥ë(500) : 425+d425 ¥¿¡¼¥óËè";
1590 return "large lightning ball (500) every 425+d425 turns";
1598 return "¿®¤¸Æñ¤¤¤³¤È : 450+d450 ¥¿¡¼¥óËè";
1600 return "bizarre things every 450+d450 turns";
1604 case ART_DOR: case ART_TERROR: case ART_STONEMASK:
1607 return "Á´Êý¸þ¤Ø¤Î¶²Éݤθ÷Àþ : 3*(¥ì¥Ù¥ë+10) ¥¿¡¼¥óËè";
1609 return "rays of fear in every direction every 3*(level+10) turns";
1616 return "¤³¤Î³¬¤Ë¤¤¤ë¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òɽ¼¨ : 200¥¿¡¼¥óËè";
1618 return "list of the uniques on the level every 200 turns";
1621 case ART_STONE_LORE:
1624 return "´í¸±¤òȼ¤¦´ÕÄê : ¤¤¤Ä¤Ç¤â";
1626 return "perilous identify every turn";
1632 return "³²Ãî¤Î¶î½ü : 55+d55¥¿¡¼¥óËè";
1634 return "dispel small life every 55+d55 turns";
1640 return "¥â¥ó¥¹¥¿¡¼¶²¹² : 40+d40¥¿¡¼¥óËè";
1642 return "frighten monsters every 40+d40 turns";
1648 return "Âмٰ·ë³¦ : 200+d200 ¥¿¡¼¥óËè";
1650 return "protection from evil every 200 + d200 turns";
1656 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
1658 return "a mana bolt (120) every 120+d120 turns";
1664 return "»Îµ¤¹âÍÈ, ¥¹¥Ô¡¼¥É(50+d50¥¿¡¼¥ó) : 100+d200 ¥¿¡¼¥óËè";
1666 return "hero and +10 to speed (50) every 100+200d turns";
1672 return "âÁ¤·¤¤¸÷ : 250 ¥¿¡¼¥óËè";
1674 return "blinding light every 250 turns";
1680 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
1682 return "Recharge item every 200 turns";
1688 return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë¡£";
1690 return "Increase STR (destroyed 50%)";
1696 return "ËâÎϤÎÍò(400) : 250+d250¥¿¡¼¥óËè";
1698 return "a mana storm every 250+d250 turns";
1704 return "ʪÂΤò°ú¤´ó¤»¤ë(½ÅÎÌ25kg¤Þ¤Ç) : 25+d25¥¿¡¼¥óËè";
1706 return "a telekinesis (500 lb) every 25+d25 turns";
1712 return "¥Ï¥¦¥ó¥É¾¤´ : 300+d150¥¿¡¼¥óËè";
1714 return "summon hound every 300+d150 turns";
1720 return "µðÂ祹¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 200+d200 ¥¿¡¼¥óËè";
1722 return "large star ball (200) every 200+d200 turns";
1729 return "Îã¤Î¥¢¥ì : 150+d150 ¥¿¡¼¥óËè";
1731 return "reveal your identity every 150+d150 turns";
1738 return "Çï»ÒÌÚ¤òÂǤÁ¤Ê¤é¤¹ : ¤¤¤Ä¤Ç¤â";
1740 return "beat wooden clappers every turn";
1748 return "»Îµ¤¹âÍÈ : 30+d30¥¿¡¼¥óËè";
1750 return "heroism every 30+d30 turns";
1758 return "Ìþ¤· : 100¥¿¡¼¥óËè";
1760 return "curing every 100 turns";
1768 return "ưʪ̥λ : 200¥¿¡¼¥óËè";
1770 return "charm animal every 200 turns";
1777 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(12d8) : 50 ¥¿¡¼¥óËè";
1779 return "frost bolt (12d8) every 50 turns";
1786 return "°ÀÊѹ¹ : 3333 ¥¿¡¼¥óËè";
1788 return "change zokusei every 3333 turns";
1795 return "¥¦¥©¡¼¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 250 ¥¿¡¼¥óËè";
1797 return "water ball (200) every 250 turns";
1804 return "»Í¸ÔƧ¤ß : 100+d100¥¿¡¼¥óËè";
1806 return "shiko every 100+d100 turns";
1813 return "Î䵤¤ÎÂÑÀ : 40+d40¥¿¡¼¥óËè";
1815 return "resist cold every 40+d40 turns";
1822 return "Âý¤ÎÂç·²¾¤´ : 300+d150¥¿¡¼¥óËè";
1824 return "summon octopus every 300+d150 turns";
1831 return "°Å¹õ¤ÎÍò(250) : 150+d150 ¥¿¡¼¥óËè";
1833 return "darkness storm (250) every 150+d150 turns";
1837 case ART_SACRED_KNIGHTS:
1840 return "*²ò¼ö*¤ÈÄ´ºº: ¤¤¤Ä¤Ç¤â";
1842 return "Dispel Curse and Probing every turn";
1849 return "ËâÎÏÉü³è: 777 ¥¿¡¼¥óËè";
1851 return "Restore Mana every 777 turns";
1858 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_TSURIZAO))
1861 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
1863 return "fishing : every time";
1868 if (object_is_smith(o_ptr))
1870 switch (o_ptr->xtra3 - 1)
1872 case ESSENCE_TMP_RES_ACID:
1874 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1876 return "resist acid every 50+d50 turns";
1879 case ESSENCE_TMP_RES_ELEC:
1881 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1883 return "resist elec every 50+d50 turns";
1886 case ESSENCE_TMP_RES_FIRE:
1888 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1890 return "resist fire every 50+d50 turns";
1893 case ESSENCE_TMP_RES_COLD:
1895 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1897 return "resist cold every 50+d50 turns";
1902 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1904 return "earthquake every 100+d100 turns";
1909 if (o_ptr->name2 == EGO_TRUMP)
1912 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
1914 return "teleport every 50+d50 turns";
1919 if (o_ptr->name2 == EGO_LITE_ILLUMINATION)
1922 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1924 return "illumination every 10+d10 turns";
1928 else if (o_ptr->name2 == EGO_EARTHQUAKES)
1931 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1933 return "earthquake every 100+d100 turns";
1938 else if (o_ptr->name2 == EGO_JUMP)
1941 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1943 return "blink every 10+d10 turns";
1948 if (o_ptr->tval == TV_RING)
1950 if (object_is_ego(o_ptr))
1952 switch (o_ptr->name2)
1956 return "»Îµ¤¹âÍÈ : 100+d100¥¿¡¼¥óËè";
1958 return "heroism every 100+d100 turns";
1960 case EGO_RING_MAGIC_MIS:
1962 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1964 return "magic missile (2d6) every 2 turns";
1966 case EGO_RING_FIRE_BOLT:
1968 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1970 return "fire bolt (9d8) every 8+d8 turns";
1972 case EGO_RING_COLD_BOLT:
1974 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1976 return "frost bolt (6d8) every 7+d7 turns";
1978 case EGO_RING_ELEC_BOLT:
1980 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1982 return "lightning bolt (4d8) every 5+d5 turns";
1984 case EGO_RING_ACID_BOLT:
1986 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
1988 return "acid bolt (5d8) every 6+d6 turns";
1990 case EGO_RING_MANA_BOLT:
1992 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
1994 return "a mana bolt (120) every 120+d120 turns";
1996 case EGO_RING_FIRE_BALL:
1998 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2000 return "fire ball (100) every 80+d80 turns";
2002 case EGO_RING_COLD_BALL:
2004 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2006 return "cold ball (100) every 80+d80 turns";
2008 case EGO_RING_ELEC_BALL:
2010 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2012 return "elec ball (100) every 80+d80 turns";
2014 case EGO_RING_ACID_BALL:
2016 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2018 return "acid ball (100) every 80+d80 turns";
2020 case EGO_RING_MANA_BALL:
2022 return "ËâÎϤÎÍò (250) : 300 ¥¿¡¼¥óËè";
2024 return "mana storm (250) every 300 turns";
2026 case EGO_RING_DRAGON_F:
2027 if (o_ptr->sval == SV_RING_FLAMES)
2029 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) ¤È²Ð¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
2031 return "breath of fire (200) and resist fire every 200 turns";
2035 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2037 return "fire breath (200) every 250 turns";
2039 case EGO_RING_DRAGON_C:
2040 if (o_ptr->sval == SV_RING_ICE)
2042 return "Î䵤¤Î¥Ö¥ì¥¹ (200) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
2044 return "breath of cold (200) and resist cold every 200 turns";
2048 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2050 return "cold breath (200) every 250 turns";
2052 case EGO_RING_M_DETECT:
2054 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃÎ : 150 ¥¿¡¼¥óËè";
2056 return "detect all monsters every 150 turns";
2058 case EGO_RING_D_SPEED:
2060 return "¥¹¥Ô¡¼¥É(15+d30¥¿¡¼¥ó) : 100 ¥¿¡¼¥óËè";
2062 return "haste self (15+d30 turns) every 100 turns";
2064 case EGO_RING_BERSERKER:
2066 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
2068 return "berserk (25+d25 turns) every 75+d75 turns";
2070 case EGO_RING_TELE_AWAY:
2072 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
2074 return "teleport away every 150 turns";
2078 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ : 777 ¥¿¡¼¥óËè";
2080 return "hero, bless, and ultimate resistance every 777 turns";
2084 switch (o_ptr->sval)
2086 case SV_RING_FLAMES:
2088 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) ¤È²Ð¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2090 return "ball of fire (100) and resist fire every 50+d50 turns";
2095 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2097 return "ball of cold (100) and resist cold every 50+d50 turns";
2102 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) ¤È»À¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2104 return "ball of acid (100) and resist acid every 50+d50 turns";
2109 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) ¤ÈÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2111 return "ball of elec (100) and resist elec every 50+d50 turns";
2119 if (o_ptr->tval == TV_AMULET)
2121 if (object_is_ego(o_ptr))
2123 switch (o_ptr->name2)
2127 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
2129 return "identify every 10 turns";
2133 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
2135 return "charm monster every 200 turns";
2139 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
2141 return "blink every 10+d10 turns";
2143 case EGO_AMU_TELEPORT:
2145 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
2147 return "teleport every 50+d50 turns";
2149 case EGO_AMU_D_DOOR:
2151 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
2153 return "dimension door every 200 turns";
2155 case EGO_AMU_RES_FIRE_:
2157 return "²Ð±ê¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2159 return "resist fire every 50+d50 turns";
2161 case EGO_AMU_RES_COLD_:
2163 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2165 return "resist cold every 50+d50 turns";
2167 case EGO_AMU_RES_ELEC_:
2169 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2171 return "resist elec every 50+d50 turns";
2173 case EGO_AMU_RES_ACID_:
2175 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2177 return "resist acid every 50+d50 turns";
2179 case EGO_AMU_DETECTION:
2181 return "Á´´¶ÃÎ : 55+d55¥¿¡¼¥óËè";
2183 return "detect all floor every 55+d55 turns";
2189 if (o_ptr->tval == TV_WHISTLE)
2192 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
2194 return "call pet every 100+d100 turns";
2198 if (o_ptr->tval == TV_CAPTURE)
2201 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
2203 return "captures or releases a monster.";
2207 /* Require dragon scale mail */
2209 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
2211 if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
2215 /* Branch on the sub-type */
2216 switch (o_ptr->sval)
2218 case SV_DRAGON_BLUE:
2221 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
2223 return "breathe lightning (100) every 150+d150 turns";
2227 case SV_DRAGON_WHITE:
2230 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
2232 return "breathe frost (110) every 150+d150 turns";
2236 case SV_DRAGON_BLACK:
2239 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
2241 return "breathe acid (130) every 150+d150 turns";
2245 case SV_DRAGON_GREEN:
2248 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
2250 return "breathe poison gas (150) every 180+d180 turns";
2257 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2259 return "breathe fire (200) every 200+d200 turns";
2263 case SV_DRAGON_MULTIHUED:
2266 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
2268 return "breathe multi-hued (250) every 200+d200 turns";
2272 case SV_DRAGON_BRONZE:
2275 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
2277 return "breathe confusion (120) every 180+d180 turns";
2281 case SV_DRAGON_GOLD:
2284 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
2286 return "breathe sound (130) every 180+d180 turns";
2290 case SV_DRAGON_CHAOS:
2293 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
2295 return "breathe chaos/disenchant (220) every 200+d200 turns";
2302 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
2304 return "breathe sound/shards (230) every 200+d200 turns";
2308 case SV_DRAGON_BALANCE:
2311 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
2313 return "breathe balance (250) every 200+d200 turns";
2317 case SV_DRAGON_SHINING:
2320 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2322 return "breathe light/darkness (200) every 200+d200 turns";
2326 case SV_DRAGON_POWER:
2329 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
2331 return "breathe the elements (300) every 200+d200 turns";
2341 return "breathe air";
2348 * Describe a "fully identified" item
2350 bool screen_object(object_type *o_ptr, bool real)
2354 u32b flgs[TR_FLAG_SIZE];
2357 char o_name[MAX_NLEN];
2360 int trivial_info = 0;
2362 /* Extract the flags */
2363 object_flags(o_ptr, flgs);
2365 /* Extract the description */
2369 roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
2370 (k_text + k_info[lookup_kind(o_ptr->tval, o_ptr->sval)].text),
2371 77 - 15, temp, sizeof(temp));
2372 for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
2373 { info[i] = &temp[j]; i++;}
2376 if (object_is_equipment(o_ptr))
2378 /* Descriptions of a basic equipment is just a flavor */
2382 /* Mega-Hack -- describe activation */
2383 if (have_flag(flgs, TR_ACTIVATE))
2386 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
2388 info[i++] = "It can be activated for...";
2391 info[i++] = item_activation(o_ptr);
2393 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
2395 info[i++] = "...if it is being worn.";
2400 /* Figurines, a hack */
2401 if (o_ptr->tval == TV_FIGURINE)
2404 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
2406 info[i++] = "It will transform into a pet when thrown.";
2411 /* Figurines, a hack */
2412 if (o_ptr->name1 == ART_STONEMASK)
2415 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
2417 info[i++] = "It makes you turn into a vampire permanently.";
2422 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
2425 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
2427 info[i++] = "It will attempt to kill a monster instantly.";
2432 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
2435 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
2437 info[i++] = "It causes you to strike yourself sometimes.";
2441 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
2443 info[i++] = "It always penetrates invulnerability barriers.";
2447 if (o_ptr->name2 == EGO_2WEAPON)
2450 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
2452 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
2457 if (have_flag(flgs, TR_EASY_SPELL))
2460 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
2462 info[i++] = "It affects your ability to cast spells.";
2466 if (o_ptr->name2 == EGO_AMU_FOOL)
2469 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
2471 info[i++] = "It interferes with casting spells.";
2475 if (o_ptr->name2 == EGO_RING_THROW)
2478 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2480 info[i++] = "It provides great strength when you throw an item.";
2484 if (o_ptr->name2 == EGO_AMU_NAIVETY)
2487 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
2489 info[i++] = "It decreases your magic resistance.";
2493 if (o_ptr->tval == TV_STATUE)
2495 monster_race *r_ptr = &r_info[o_ptr->pval];
2497 if (o_ptr->pval == MON_BULLGATES)
2499 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
2501 info[i++] = "It is shameful.";
2503 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
2505 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
2507 info[i++] = "It is fearful.";
2511 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
2513 info[i++] = "It is cheerful.";
2517 /* Hack -- describe lite's */
2518 if (o_ptr->tval == TV_LITE)
2520 if (o_ptr->name2 == EGO_LITE_DARKNESS)
2523 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
2525 info[i++] = "It provides no light.";
2528 if (o_ptr->sval == SV_LITE_FEANOR ||
2529 o_ptr->sval == SV_LITE_LANTERN)
2532 info[i++] = "¤½¤ì¤ÏÌÀ¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
2534 info[i++] = "It decreases radius of light source by 2.";
2540 info[i++] = "¤½¤ì¤ÏÌÀ¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
2542 info[i++] = "It decreases radius of light source by 1.";
2546 else if (object_is_fixed_artifact(o_ptr))
2549 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2551 info[i++] = "It provides light (radius 3) forever.";
2555 else if (o_ptr->name2 == EGO_LITE_SHINE)
2557 if (o_ptr->sval == SV_LITE_FEANOR)
2560 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2562 info[i++] = "It provides light (radius 3) forever.";
2566 else if (o_ptr->sval == SV_LITE_LANTERN)
2569 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2571 info[i++] = "It provides light (radius 3) when fueled.";
2578 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2580 info[i++] = "It provides light (radius 2) when fueled.";
2587 if (o_ptr->sval == SV_LITE_FEANOR)
2590 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2592 info[i++] = "It provides light (radius 2) forever.";
2596 else if (o_ptr->sval == SV_LITE_LANTERN)
2599 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2601 info[i++] = "It provides light (radius 2) when fueled.";
2608 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
2610 info[i++] = "It provides light (radius 1) when fueled.";
2615 if (o_ptr->name2 == EGO_LITE_LONG)
2618 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
2620 info[i++] = "It provides light for much longer time.";
2626 /* And then describe it fully */
2628 if (have_flag(flgs, TR_RIDING))
2630 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
2632 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
2634 info[i++] = "It is made for use while riding.";
2639 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
2641 info[i++] = "It is suitable for use while riding.";
2643 /* This information is not important enough */
2647 if (have_flag(flgs, TR_STR))
2650 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2652 info[i++] = "It affects your strength.";
2656 if (have_flag(flgs, TR_INT))
2659 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2661 info[i++] = "It affects your intelligence.";
2665 if (have_flag(flgs, TR_WIS))
2668 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2670 info[i++] = "It affects your wisdom.";
2674 if (have_flag(flgs, TR_DEX))
2677 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2679 info[i++] = "It affects your dexterity.";
2683 if (have_flag(flgs, TR_CON))
2686 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2688 info[i++] = "It affects your constitution.";
2692 if (have_flag(flgs, TR_CHR))
2695 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2697 info[i++] = "It affects your charisma.";
2702 if (have_flag(flgs, TR_MAGIC_MASTERY))
2705 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2707 info[i++] = "It affects your ability to use magic devices.";
2711 if (have_flag(flgs, TR_STEALTH))
2714 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2716 info[i++] = "It affects your stealth.";
2720 if (have_flag(flgs, TR_SEARCH))
2723 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2725 info[i++] = "It affects your searching.";
2729 if (have_flag(flgs, TR_INFRA))
2732 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2734 info[i++] = "It affects your infravision.";
2738 if (have_flag(flgs, TR_TUNNEL))
2741 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2743 info[i++] = "It affects your ability to tunnel.";
2747 if (have_flag(flgs, TR_SPEED))
2750 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2752 info[i++] = "It affects your speed.";
2756 if (have_flag(flgs, TR_BLOWS))
2759 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2761 info[i++] = "It affects your attack speed.";
2766 if (have_flag(flgs, TR_BRAND_ACID))
2769 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2771 info[i++] = "It does extra damage from acid.";
2775 if (have_flag(flgs, TR_BRAND_ELEC))
2778 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2780 info[i++] = "It does extra damage from electricity.";
2784 if (have_flag(flgs, TR_BRAND_FIRE))
2787 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2789 info[i++] = "It does extra damage from fire.";
2793 if (have_flag(flgs, TR_BRAND_COLD))
2796 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2798 info[i++] = "It does extra damage from frost.";
2803 if (have_flag(flgs, TR_BRAND_POIS))
2806 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
2808 info[i++] = "It poisons your foes.";
2813 if (have_flag(flgs, TR_CHAOTIC))
2816 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
2818 info[i++] = "It produces chaotic effects.";
2823 if (have_flag(flgs, TR_VAMPIRIC))
2826 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
2828 info[i++] = "It drains life from your foes.";
2833 if (have_flag(flgs, TR_IMPACT))
2836 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
2838 info[i++] = "It can cause earthquakes.";
2843 if (have_flag(flgs, TR_VORPAL))
2846 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2848 info[i++] = "It is very sharp and can cut your foes.";
2853 if (have_flag(flgs, TR_KILL_DRAGON))
2856 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2858 info[i++] = "It is a great bane of dragons.";
2862 else if (have_flag(flgs, TR_SLAY_DRAGON))
2865 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2867 info[i++] = "It is especially deadly against dragons.";
2872 if (have_flag(flgs, TR_KILL_ORC))
2875 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2877 info[i++] = "It is a great bane of orcs.";
2881 if (have_flag(flgs, TR_SLAY_ORC))
2884 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2886 info[i++] = "It is especially deadly against orcs.";
2891 if (have_flag(flgs, TR_KILL_TROLL))
2894 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2896 info[i++] = "It is a great bane of trolls.";
2900 if (have_flag(flgs, TR_SLAY_TROLL))
2903 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2905 info[i++] = "It is especially deadly against trolls.";
2910 if (have_flag(flgs, TR_KILL_GIANT))
2913 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2915 info[i++] = "It is a great bane of giants.";
2918 else if (have_flag(flgs, TR_SLAY_GIANT))
2921 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2923 info[i++] = "It is especially deadly against giants.";
2928 if (have_flag(flgs, TR_KILL_DEMON))
2931 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2933 info[i++] = "It is a great bane of demons.";
2937 if (have_flag(flgs, TR_SLAY_DEMON))
2940 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2942 info[i++] = "It strikes at demons with holy wrath.";
2947 if (have_flag(flgs, TR_KILL_UNDEAD))
2950 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2952 info[i++] = "It is a great bane of undead.";
2956 if (have_flag(flgs, TR_SLAY_UNDEAD))
2959 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2961 info[i++] = "It strikes at undead with holy wrath.";
2966 if (have_flag(flgs, TR_KILL_EVIL))
2969 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2971 info[i++] = "It is a great bane of evil monsters.";
2975 if (have_flag(flgs, TR_SLAY_EVIL))
2978 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
2980 info[i++] = "It fights against evil with holy fury.";
2985 if (have_flag(flgs, TR_KILL_ANIMAL))
2988 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2990 info[i++] = "It is a great bane of natural creatures.";
2994 if (have_flag(flgs, TR_SLAY_ANIMAL))
2997 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2999 info[i++] = "It is especially deadly against natural creatures.";
3004 if (have_flag(flgs, TR_KILL_HUMAN))
3007 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
3009 info[i++] = "It is a great bane of humans.";
3013 if (have_flag(flgs, TR_SLAY_HUMAN))
3016 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
3018 info[i++] = "It is especially deadly against humans.";
3023 if (have_flag(flgs, TR_FORCE_WEAPON))
3026 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
3028 info[i++] = "It powerfully strikes at a monster using your mana.";
3032 if (have_flag(flgs, TR_DEC_MANA))
3035 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
3037 info[i++] = "It decreases your mana consumption.";
3041 if (have_flag(flgs, TR_SUST_STR))
3044 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
3046 info[i++] = "It sustains your strength.";
3050 if (have_flag(flgs, TR_SUST_INT))
3053 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
3055 info[i++] = "It sustains your intelligence.";
3059 if (have_flag(flgs, TR_SUST_WIS))
3062 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
3064 info[i++] = "It sustains your wisdom.";
3068 if (have_flag(flgs, TR_SUST_DEX))
3071 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
3073 info[i++] = "It sustains your dexterity.";
3077 if (have_flag(flgs, TR_SUST_CON))
3080 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
3082 info[i++] = "It sustains your constitution.";
3086 if (have_flag(flgs, TR_SUST_CHR))
3089 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
3091 info[i++] = "It sustains your charisma.";
3096 if (have_flag(flgs, TR_IM_ACID))
3099 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3101 info[i++] = "It provides immunity to acid.";
3105 if (have_flag(flgs, TR_IM_ELEC))
3108 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3110 info[i++] = "It provides immunity to electricity.";
3114 if (have_flag(flgs, TR_IM_FIRE))
3117 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3119 info[i++] = "It provides immunity to fire.";
3123 if (have_flag(flgs, TR_IM_COLD))
3126 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3128 info[i++] = "It provides immunity to cold.";
3133 if (have_flag(flgs, TR_THROW))
3136 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3138 info[i++] = "It is perfectly balanced for throwing.";
3142 if (have_flag(flgs, TR_FREE_ACT))
3145 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3147 info[i++] = "It provides immunity to paralysis.";
3151 if (have_flag(flgs, TR_HOLD_LIFE))
3154 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
3156 info[i++] = "It provides resistance to life draining.";
3160 if (have_flag(flgs, TR_RES_FEAR))
3163 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3165 info[i++] = "It makes you completely fearless.";
3169 if (have_flag(flgs, TR_RES_ACID))
3172 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3174 info[i++] = "It provides resistance to acid.";
3178 if (have_flag(flgs, TR_RES_ELEC))
3181 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3183 info[i++] = "It provides resistance to electricity.";
3187 if (have_flag(flgs, TR_RES_FIRE))
3190 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3192 info[i++] = "It provides resistance to fire.";
3196 if (have_flag(flgs, TR_RES_COLD))
3199 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3201 info[i++] = "It provides resistance to cold.";
3205 if (have_flag(flgs, TR_RES_POIS))
3208 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3210 info[i++] = "It provides resistance to poison.";
3215 if (have_flag(flgs, TR_RES_LITE))
3218 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3220 info[i++] = "It provides resistance to light.";
3224 if (have_flag(flgs, TR_RES_DARK))
3227 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3229 info[i++] = "It provides resistance to dark.";
3234 if (have_flag(flgs, TR_RES_BLIND))
3237 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3239 info[i++] = "It provides resistance to blindness.";
3243 if (have_flag(flgs, TR_RES_CONF))
3246 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3248 info[i++] = "It provides resistance to confusion.";
3252 if (have_flag(flgs, TR_RES_SOUND))
3255 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3257 info[i++] = "It provides resistance to sound.";
3261 if (have_flag(flgs, TR_RES_SHARDS))
3264 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3266 info[i++] = "It provides resistance to shards.";
3271 if (have_flag(flgs, TR_RES_NETHER))
3274 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3276 info[i++] = "It provides resistance to nether.";
3280 if (have_flag(flgs, TR_RES_NEXUS))
3283 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3285 info[i++] = "It provides resistance to nexus.";
3289 if (have_flag(flgs, TR_RES_CHAOS))
3292 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3294 info[i++] = "It provides resistance to chaos.";
3298 if (have_flag(flgs, TR_RES_DISEN))
3301 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3303 info[i++] = "It provides resistance to disenchantment.";
3308 if (have_flag(flgs, TR_LEVITATION))
3311 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3313 info[i++] = "It allows you to levitate.";
3317 if (have_flag(flgs, TR_LITE))
3319 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
3321 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
3323 info[i++] = "It decreases radius of your light source by 1.";
3327 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë(Ⱦ·Â¤Ë+1)¡£";
3329 info[i++] = "It provides permanent light. (radius +1)";
3333 if (have_flag(flgs, TR_SEE_INVIS))
3336 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3338 info[i++] = "It allows you to see invisible monsters.";
3342 if (have_flag(flgs, TR_TELEPATHY))
3345 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
3347 info[i++] = "It gives telepathic powers.";
3351 if (have_flag(flgs, TR_ESP_ANIMAL))
3354 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤ò´¶ÃΤ¹¤ë¡£";
3356 info[i++] = "It senses natural creatures.";
3360 if (have_flag(flgs, TR_ESP_UNDEAD))
3363 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ò´¶ÃΤ¹¤ë¡£";
3365 info[i++] = "It senses undead.";
3369 if (have_flag(flgs, TR_ESP_DEMON))
3372 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò´¶ÃΤ¹¤ë¡£";
3374 info[i++] = "It senses demons.";
3378 if (have_flag(flgs, TR_ESP_ORC))
3381 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ò´¶ÃΤ¹¤ë¡£";
3383 info[i++] = "It senses orcs.";
3387 if (have_flag(flgs, TR_ESP_TROLL))
3390 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ò´¶ÃΤ¹¤ë¡£";
3392 info[i++] = "It senses trolls.";
3396 if (have_flag(flgs, TR_ESP_GIANT))
3399 info[i++] = "¤½¤ì¤Ïµð¿Í¤ò´¶ÃΤ¹¤ë¡£";
3401 info[i++] = "It senses giants.";
3405 if (have_flag(flgs, TR_ESP_DRAGON))
3408 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò´¶ÃΤ¹¤ë¡£";
3410 info[i++] = "It senses dragons.";
3414 if (have_flag(flgs, TR_ESP_HUMAN))
3417 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ò´¶ÃΤ¹¤ë¡£";
3419 info[i++] = "It senses humans.";
3423 if (have_flag(flgs, TR_ESP_EVIL))
3426 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¸ºß¤ò´¶ÃΤ¹¤ë¡£";
3428 info[i++] = "It senses evil creatures.";
3432 if (have_flag(flgs, TR_ESP_GOOD))
3435 info[i++] = "¤½¤ì¤ÏÁ±Îɤʸºß¤ò´¶ÃΤ¹¤ë¡£";
3437 info[i++] = "It senses good creatures.";
3441 if (have_flag(flgs, TR_ESP_NONLIVING))
3444 info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤò´¶ÃΤ¹¤ë¡£";
3446 info[i++] = "It senses non-living creatures.";
3450 if (have_flag(flgs, TR_ESP_UNIQUE))
3453 info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤ò´¶ÃΤ¹¤ë¡£";
3455 info[i++] = "It senses unique monsters.";
3459 if (have_flag(flgs, TR_SLOW_DIGEST))
3462 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
3464 info[i++] = "It slows your metabolism.";
3468 if (have_flag(flgs, TR_REGEN))
3471 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
3473 info[i++] = "It speeds your regenerative powers.";
3477 if (have_flag(flgs, TR_WARNING))
3480 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
3482 info[i++] = "It warns you of danger";
3486 if (have_flag(flgs, TR_REFLECT))
3489 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
3491 info[i++] = "It reflects bolts and arrows.";
3495 if (have_flag(flgs, TR_SH_FIRE))
3498 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3500 info[i++] = "It produces a fiery sheath.";
3504 if (have_flag(flgs, TR_SH_ELEC))
3507 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3509 info[i++] = "It produces an electric sheath.";
3513 if (have_flag(flgs, TR_SH_COLD))
3516 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3518 info[i++] = "It produces a sheath of coldness.";
3522 if (have_flag(flgs, TR_NO_MAGIC))
3525 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3527 info[i++] = "It produces an anti-magic shell.";
3531 if (have_flag(flgs, TR_NO_TELE))
3534 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
3536 info[i++] = "It prevents teleportation.";
3540 if (have_flag(flgs, TR_XTRA_MIGHT))
3543 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3545 info[i++] = "It fires missiles with extra might.";
3549 if (have_flag(flgs, TR_XTRA_SHOTS))
3552 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3554 info[i++] = "It fires missiles excessively fast.";
3559 if (have_flag(flgs, TR_BLESSED))
3562 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
3564 info[i++] = "It has been blessed by the gods.";
3569 if (object_is_cursed(o_ptr))
3571 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
3574 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3576 info[i++] = "It is permanently cursed.";
3580 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
3583 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3585 info[i++] = "It is heavily cursed.";
3592 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
3594 info[i++] = "It is cursed.";
3598 * It's a trivial infomation since there is
3599 * fake inscription {cursed}
3605 if ((have_flag(flgs, TR_TY_CURSE)) || (o_ptr->curse_flags & TRC_TY_CURSE))
3608 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
3610 info[i++] = "It carries an ancient foul curse.";
3614 if ((have_flag(flgs, TR_AGGRAVATE)) || (o_ptr->curse_flags & TRC_AGGRAVATE))
3617 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
3619 info[i++] = "It aggravates nearby creatures.";
3623 if ((have_flag(flgs, TR_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
3626 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
3628 info[i++] = "It drains experience.";
3632 if (o_ptr->curse_flags & TRC_SLOW_REGEN)
3635 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
3637 info[i++] = "It slows your regenerative powers.";
3641 if (o_ptr->curse_flags & TRC_ADD_L_CURSE)
3644 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
3646 info[i++] = "It adds weak curses.";
3650 if (o_ptr->curse_flags & TRC_ADD_H_CURSE)
3653 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
3655 info[i++] = "It adds heavy curses.";
3659 if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
3662 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3664 info[i++] = "It attracts animals.";
3668 if (o_ptr->curse_flags & TRC_CALL_DEMON)
3671 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3673 info[i++] = "It attracts demons.";
3677 if (o_ptr->curse_flags & TRC_CALL_DRAGON)
3680 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3682 info[i++] = "It attracts dragons.";
3686 if (o_ptr->curse_flags & TRC_COWARDICE)
3689 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤µ¯¤³¤¹¡£";
3691 info[i++] = "It makes you subject to cowardice.";
3695 if ((have_flag(flgs, TR_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
3698 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
3700 info[i++] = "It induces random teleportation.";
3704 if (o_ptr->curse_flags & TRC_LOW_MELEE)
3707 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
3709 info[i++] = "It causes you to miss blows.";
3713 if (o_ptr->curse_flags & TRC_LOW_AC)
3716 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
3718 info[i++] = "It helps your enemies' blows.";
3722 if (o_ptr->curse_flags & TRC_LOW_MAGIC)
3725 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
3727 info[i++] = "It encumbers you while spellcasting.";
3731 if (o_ptr->curse_flags & TRC_FAST_DIGEST)
3734 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
3736 info[i++] = "It speeds your metabolism.";
3740 if (o_ptr->curse_flags & TRC_DRAIN_HP)
3743 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
3745 info[i++] = "It drains you.";
3749 if (o_ptr->curse_flags & TRC_DRAIN_MANA)
3752 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
3754 info[i++] = "It drains your mana.";
3759 /* Describe about this kind of object instead of THIS fake object */
3762 switch (o_ptr->tval)
3765 switch (o_ptr->sval)
3767 case SV_RING_LORDLY:
3769 info[i++] = "¤½¤ì¤Ï´ö¤Ä¤«¤Î¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3771 info[i++] = "It provides some random resistances.";
3774 case SV_RING_WARNING:
3776 info[i++] = "¤½¤ì¤Ï¤Ò¤È¤Ä¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3778 info[i++] = "It may provide a low rank ESP.";
3785 switch (o_ptr->sval)
3787 case SV_AMULET_RESISTANCE:
3789 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3791 info[i++] = "It may provides resistance to poison.";
3794 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
3796 info[i++] = "It may provide a random resistances.";
3799 case SV_AMULET_THE_MAGI:
3801 info[i++] = "¤½¤ì¤ÏºÇÂç¤Ç£³¤Ä¤Þ¤Ç¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë¡£";
3803 info[i++] = "It provides up to three low rank ESPs.";
3811 if (have_flag(flgs, TR_IGNORE_ACID) &&
3812 have_flag(flgs, TR_IGNORE_ELEC) &&
3813 have_flag(flgs, TR_IGNORE_FIRE) &&
3814 have_flag(flgs, TR_IGNORE_COLD))
3817 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3819 info[i++] = "It cannot be harmed by the elements.";
3824 if (have_flag(flgs, TR_IGNORE_ACID))
3827 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3829 info[i++] = "It cannot be harmed by acid.";
3832 if (have_flag(flgs, TR_IGNORE_ELEC))
3835 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3837 info[i++] = "It cannot be harmed by electricity.";
3840 if (have_flag(flgs, TR_IGNORE_FIRE))
3843 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3845 info[i++] = "It cannot be harmed by fire.";
3848 if (have_flag(flgs, TR_IGNORE_COLD))
3851 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3853 info[i++] = "It cannot be harmed by cold.";
3858 /* No relevant informations */
3859 if (i <= trivial_info) return (FALSE);
3861 /* Save the screen */
3865 Term_get_size(&wid, &hgt);
3867 /* Display Item name */
3869 object_desc(o_name, o_ptr, 0);
3871 object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
3875 /* Erase the screen */
3876 for (k = 1; k < hgt; k++) prt("", k, 13);
3878 /* Label the information */
3879 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
3881 monster_race *r_ptr = &r_info[o_ptr->pval];
3882 int namelen = strlen(r_name + r_ptr->name);
3883 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
3884 c_prt(r_ptr->d_attr, format("%c", r_ptr->d_char), 1, 18+namelen);
3885 prt("'", 1, 19+namelen);
3889 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
3891 prt(" Item Attributes:", 1, 15);
3894 /* We will print on top of the map (column 13) */
3895 for (k = 2, j = 0; j < i; j++)
3898 prt(info[j], k++, 15);
3900 /* Every 20 entries (lines 2 to 21), start over */
3901 if ((k == hgt - 2) && (j+1 < i))
3904 prt("-- ³¤¯ --", k, 15);
3906 prt("-- more --", k, 15);
3909 for (; k > 2; k--) prt("", k, 15);
3915 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
3917 prt("[Press any key to continue]", k, 15);
3922 /* Restore the screen */
3925 /* Gave knowledge */
3932 * Convert an inventory index into a one character label
3933 * Note that the label does NOT distinguish inven/equip.
3935 char index_to_label(int i)
3937 /* Indexes for "inven" are easy */
3938 if (i < INVEN_RARM) return (I2A(i));
3940 /* Indexes for "equip" are offset */
3941 return (I2A(i - INVEN_RARM));
3946 * Convert a label into the index of an item in the "inven"
3947 * Return "-1" if the label does not indicate a real item
3949 s16b label_to_inven(int c)
3954 i = (islower(c) ? A2I(c) : -1);
3956 /* Verify the index */
3957 if ((i < 0) || (i > INVEN_PACK)) return (-1);
3959 /* Empty slots can never be chosen */
3960 if (!inventory[i].k_idx) return (-1);
3962 /* Return the index */
3968 extern bool select_ring_slot;
3971 static bool is_ring_slot(int i)
3973 return (i == INVEN_RIGHT) || (i == INVEN_LEFT);
3978 * Convert a label into the index of a item in the "equip"
3979 * Return "-1" if the label does not indicate a real item
3981 s16b label_to_equip(int c)
3986 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
3988 /* Verify the index */
3989 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
3991 if (select_ring_slot) return is_ring_slot(i) ? i : -1;
3993 /* Empty slots can never be chosen */
3994 if (!inventory[i].k_idx) return (-1);
3996 /* Return the index */
4003 * Determine which equipment slot (if any) an item likes
4005 s16b wield_slot(object_type *o_ptr)
4007 /* Slot for equipment */
4008 switch (o_ptr->tval)
4015 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
4016 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
4017 return (INVEN_LARM);
4024 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
4025 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
4026 return (INVEN_RARM);
4036 /* Use the right hand first */
4037 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
4039 /* Use the left hand for swapping (by default) */
4040 return (INVEN_LEFT);
4046 return (INVEN_NECK);
4051 return (INVEN_LITE);
4058 return (INVEN_BODY);
4063 return (INVEN_OUTER);
4069 return (INVEN_HEAD);
4074 return (INVEN_HANDS);
4079 return (INVEN_FEET);
4083 /* No slot available */
4089 * Return a string mentioning how a given item is carried
4091 cptr mention_use(int i)
4095 /* Examine the location */
4099 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->migite) ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê")); break;
4101 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "Just lifting" : (p_ptr->migite ? "Wielding" : "On arm"); break;
4105 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->hidarite) ? " ξ¼ê" : (left_hander ? " ±¦¼ê" : " º¸¼ê")); break;
4107 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "Just lifting" : (p_ptr->hidarite ? "Wielding" : "On arm"); break;
4111 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "±¿ÈÂÃæ" : "¼Í·âÍÑ"; break;
4113 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "Just holding" : "Shooting"; break;
4117 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
4119 case INVEN_RIGHT: p = (left_hander ? "On left hand" : "On right hand"); break;
4123 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
4125 case INVEN_LEFT: p = (left_hander ? "On right hand" : "On left hand"); break;
4129 case INVEN_NECK: p = " ¼ó"; break;
4131 case INVEN_NECK: p = "Around neck"; break;
4135 case INVEN_LITE: p = " ¸÷¸»"; break;
4137 case INVEN_LITE: p = "Light source"; break;
4141 case INVEN_BODY: p = " ÂÎ"; break;
4143 case INVEN_BODY: p = "On body"; break;
4147 case INVEN_OUTER: p = "ÂΤξå"; break;
4149 case INVEN_OUTER: p = "About body"; break;
4153 case INVEN_HEAD: p = " Ƭ"; break;
4155 case INVEN_HEAD: p = "On head"; break;
4159 case INVEN_HANDS: p = " ¼ê"; break;
4161 case INVEN_HANDS: p = "On hands"; break;
4165 case INVEN_FEET: p = " "; break;
4167 case INVEN_FEET: p = "On feet"; break;
4171 default: p = "¥¶¥Ã¥¯"; break;
4173 default: p = "In pack"; break;
4177 /* Return the result */
4183 * Return a string describing how a given item is being worn.
4184 * Currently, only used for items in the equipment, not inventory.
4186 cptr describe_use(int i)
4193 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->migite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
4195 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "just lifting" : (p_ptr->migite ? "attacking monsters with" : "wearing on your arm"); break;
4199 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->hidarite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
4201 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "just lifting" : (p_ptr->hidarite ? "attacking monsters with" : "wearing on your arm"); break;
4205 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î" : "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
4207 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "just holding" : "shooting missiles with"; break;
4211 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4213 case INVEN_RIGHT: p = (left_hander ? "wearing on your left hand" : "wearing on your right hand"); break;
4217 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4219 case INVEN_LEFT: p = (left_hander ? "wearing on your right hand" : "wearing on your left hand"); break;
4223 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
4225 case INVEN_NECK: p = "wearing around your neck"; break;
4229 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
4231 case INVEN_LITE: p = "using to light the way"; break;
4235 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
4237 case INVEN_BODY: p = "wearing on your body"; break;
4241 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
4243 case INVEN_OUTER: p = "wearing on your back"; break;
4247 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
4249 case INVEN_HEAD: p = "wearing on your head"; break;
4253 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
4255 case INVEN_HANDS: p = "wearing on your hands"; break;
4259 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
4261 case INVEN_FEET: p = "wearing on your feet"; break;
4265 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
4267 default: p = "carrying in your pack"; break;
4271 /* Return the result */
4276 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
4278 bool check_book_realm(const byte book_tval, const byte book_sval)
4280 if (book_tval < TV_LIFE_BOOK) return FALSE;
4281 if (p_ptr->pclass == CLASS_SORCERER)
4283 return is_magic(tval2realm(book_tval));
4285 else if (p_ptr->pclass == CLASS_RED_MAGE)
4287 if (is_magic(tval2realm(book_tval)))
4288 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
4290 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
4295 * Check an item against the item tester info
4297 bool item_tester_okay(object_type *o_ptr)
4299 /* Hack -- allow listing empty slots */
4300 if (item_tester_full) return (TRUE);
4302 /* Require an item */
4303 if (!o_ptr->k_idx) return (FALSE);
4305 /* Hack -- ignore "gold" */
4306 if (o_ptr->tval == TV_GOLD) return (FALSE);
4308 /* Check the tval */
4309 if (item_tester_tval)
4311 /* Is it a spellbook? If so, we need a hack -- TY */
4312 if ((item_tester_tval <= TV_DEATH_BOOK) &&
4313 (item_tester_tval >= TV_LIFE_BOOK))
4314 return check_book_realm(o_ptr->tval, o_ptr->sval);
4316 if (item_tester_tval != o_ptr->tval) return (FALSE);
4319 /* Check the hook */
4320 if (item_tester_hook)
4322 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
4333 * Choice window "shadow" of the "show_inven()" function
4335 void display_inven(void)
4337 register int i, n, z = 0;
4339 byte attr = TERM_WHITE;
4341 char o_name[MAX_NLEN];
4345 Term_get_size(&wid, &hgt);
4347 /* Find the "final" slot */
4348 for (i = 0; i < INVEN_PACK; i++)
4350 o_ptr = &inventory[i];
4352 /* Skip non-objects */
4353 if (!o_ptr->k_idx) continue;
4359 /* Display the pack */
4360 for (i = 0; i < z; i++)
4362 /* Examine the item */
4363 o_ptr = &inventory[i];
4365 /* Start with an empty "index" */
4366 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4368 /* Is this item "acceptable"? */
4369 if (item_tester_okay(o_ptr))
4371 /* Prepare an "index" */
4372 tmp_val[0] = index_to_label(i);
4374 /* Bracket the "index" --(-- */
4378 /* Display the index (or blank space) */
4379 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
4381 /* Obtain an item description */
4382 object_desc(o_name, o_ptr, 0);
4384 /* Obtain the length of the description */
4388 attr = tval_to_attr[o_ptr->tval % 128];
4390 /* Grey out charging items */
4396 /* Display the entry itself */
4397 Term_putstr(3, i, n, attr, o_name);
4399 /* Erase the rest of the line */
4400 Term_erase(3+n, i, 255);
4402 /* Display the weight if needed */
4403 if (show_weights && o_ptr->weight)
4405 int wgt = o_ptr->weight * o_ptr->number;
4407 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
4409 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4412 prt(tmp_val, i, wid - 9);
4416 /* Erase the rest of the window */
4417 for (i = z; i < hgt; i++)
4419 /* Erase the line */
4420 Term_erase(0, i, 255);
4427 * Choice window "shadow" of the "show_equip()" function
4429 void display_equip(void)
4433 byte attr = TERM_WHITE;
4435 char o_name[MAX_NLEN];
4439 Term_get_size(&wid, &hgt);
4441 /* Display the equipment */
4442 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
4444 /* Examine the item */
4445 o_ptr = &inventory[i];
4447 /* Start with an empty "index" */
4448 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4450 /* Is this item "acceptable"? */
4451 if (select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr))
4453 /* Prepare an "index" */
4454 tmp_val[0] = index_to_label(i);
4456 /* Bracket the "index" --(-- */
4460 /* Display the index (or blank space) */
4461 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
4463 /* Obtain an item description */
4464 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
4467 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
4469 strcpy(o_name, "(wielding with two-hands)");
4475 object_desc(o_name, o_ptr, 0);
4476 attr = tval_to_attr[o_ptr->tval % 128];
4479 /* Obtain the length of the description */
4482 /* Grey out charging items */
4488 /* Display the entry itself */
4489 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
4491 /* Erase the rest of the line */
4492 Term_erase(3+n, i - INVEN_RARM, 255);
4494 /* Display the weight (if needed) */
4495 if (show_weights && o_ptr->weight)
4497 int wgt = o_ptr->weight * o_ptr->number;
4499 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
4501 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4504 prt(tmp_val, i - INVEN_RARM, wid - (show_labels ? 28 : 9));
4507 /* Display the slot description (if needed) */
4510 Term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
4511 prt(mention_use(i), i - INVEN_RARM, wid - 15);
4515 /* Erase the rest of the window */
4516 for (i = INVEN_TOTAL - INVEN_RARM; i < hgt; i++)
4518 /* Clear that line */
4519 Term_erase(0, i, 255);
4525 * Find the "first" inventory object with the given "tag".
4527 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
4528 * inscription of an object. Alphabetical characters don't work as a
4531 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
4532 * and "x" is the "current" command_cmd code.
4534 static bool get_tag(int *cp, char tag, int mode)
4539 /* Extract index from mode */
4544 end = INVEN_TOTAL - 1;
4549 end = INVEN_PACK - 1;
4556 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
4558 /* Check every inventory object */
4559 for (i = start; i <= end; i++)
4561 object_type *o_ptr = &inventory[i];
4563 /* Skip non-objects */
4564 if (!o_ptr->k_idx) continue;
4566 /* Skip empty inscriptions */
4567 if (!o_ptr->inscription) continue;
4569 /* Skip non-choice */
4570 if (!item_tester_okay(o_ptr)) continue;
4573 s = my_strchr(quark_str(o_ptr->inscription), '@');
4575 /* Process all tags */
4578 /* Check the special tags */
4579 if ((s[1] == command_cmd) && (s[2] == tag))
4581 /* Save the actual inventory ID */
4588 /* Find another '@' */
4589 s = my_strchr(s + 1, '@');
4594 /**** Find a tag in the form of {@#} (allows only numerals) ***/
4596 /* Don't allow {@#} with '#' being alphabet */
4597 if (tag < '0' || '9' < tag)
4603 /* Check every object */
4604 for (i = start; i <= end; i++)
4606 object_type *o_ptr = &inventory[i];
4608 /* Skip non-objects */
4609 if (!o_ptr->k_idx) continue;
4611 /* Skip empty inscriptions */
4612 if (!o_ptr->inscription) continue;
4614 /* Skip non-choice */
4615 if (!item_tester_okay(o_ptr)) continue;
4618 s = my_strchr(quark_str(o_ptr->inscription), '@');
4620 /* Process all tags */
4623 /* Check the normal tags */
4626 /* Save the actual inventory ID */
4633 /* Find another '@' */
4634 s = my_strchr(s + 1, '@');
4644 * Find the "first" floor object with the given "tag".
4646 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
4647 * inscription of an object. Alphabetical characters don't work as a
4650 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
4651 * and "x" is the "current" command_cmd code.
4653 static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
4658 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
4660 /* Check every object in the grid */
4661 for (i = 0; i < floor_num && i < 23; i++)
4663 object_type *o_ptr = &o_list[floor_list[i]];
4665 /* Skip empty inscriptions */
4666 if (!o_ptr->inscription) continue;
4669 s = my_strchr(quark_str(o_ptr->inscription), '@');
4671 /* Process all tags */
4674 /* Check the special tags */
4675 if ((s[1] == command_cmd) && (s[2] == tag))
4677 /* Save the actual floor object ID */
4684 /* Find another '@' */
4685 s = my_strchr(s + 1, '@');
4690 /**** Find a tag in the form of {@#} (allows only numerals) ***/
4692 /* Don't allow {@#} with '#' being alphabet */
4693 if (tag < '0' || '9' < tag)
4699 /* Check every object in the grid */
4700 for (i = 0; i < floor_num && i < 23; i++)
4702 object_type *o_ptr = &o_list[floor_list[i]];
4704 /* Skip empty inscriptions */
4705 if (!o_ptr->inscription) continue;
4708 s = my_strchr(quark_str(o_ptr->inscription), '@');
4710 /* Process all tags */
4713 /* Check the normal tags */
4716 /* Save the floor object ID */
4723 /* Find another '@' */
4724 s = my_strchr(s + 1, '@');
4734 * Move around label characters with correspond tags
4736 static void prepare_label_string(char *label, int mode)
4738 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
4739 int offset = (mode == USE_EQUIP) ? INVEN_RARM : 0;
4742 /* Prepare normal labels */
4743 strcpy(label, alphabet_chars);
4745 /* Move each label */
4746 for (i = 0; i < 52; i++)
4749 char c = alphabet_chars[i];
4751 /* Find a tag with this label */
4752 if (get_tag(&index, c, mode))
4754 /* Delete the overwritten label */
4755 if (label[i] == c) label[i] = ' ';
4757 /* Move the label to the place of corresponding tag */
4758 label[index - offset] = c;
4765 * Move around label characters with correspond tags (floor version)
4767 static void prepare_label_string_floor(char *label, int floor_list[], int floor_num)
4769 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
4772 /* Prepare normal labels */
4773 strcpy(label, alphabet_chars);
4775 /* Move each label */
4776 for (i = 0; i < 52; i++)
4779 char c = alphabet_chars[i];
4781 /* Find a tag with this label */
4782 if (get_tag_floor(&index, c, floor_list, floor_num))
4784 /* Delete the overwritten label */
4785 if (label[i] == c) label[i] = ' ';
4787 /* Move the label to the place of corresponding tag */
4795 * Display the inventory.
4797 * Hack -- do not display "trailing" empty slots
4799 int show_inven(int target_item)
4801 int i, j, k, l, z = 0;
4802 int col, cur_col, len;
4804 char o_name[MAX_NLEN];
4808 char out_desc[23][MAX_NLEN];
4809 int target_item_label = 0;
4811 char inven_label[52 + 1];
4813 /* Starting column */
4817 Term_get_size(&wid, &hgt);
4819 /* Default "max-length" */
4820 len = wid - col - 1;
4823 /* Find the "final" slot */
4824 for (i = 0; i < INVEN_PACK; i++)
4826 o_ptr = &inventory[i];
4828 /* Skip non-objects */
4829 if (!o_ptr->k_idx) continue;
4835 prepare_label_string(inven_label, USE_INVEN);
4837 /* Display the inventory */
4838 for (k = 0, i = 0; i < z; i++)
4840 o_ptr = &inventory[i];
4842 /* Is this item acceptable? */
4843 if (!item_tester_okay(o_ptr)) continue;
4845 /* Describe the object */
4846 object_desc(o_name, o_ptr, 0);
4848 /* Save the object index, color, and description */
4850 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4852 /* Grey out charging items */
4855 out_color[k] = TERM_L_DARK;
4858 (void)strcpy(out_desc[k], o_name);
4860 /* Find the predicted "line length" */
4861 l = strlen(out_desc[k]) + 5;
4863 /* Be sure to account for the weight */
4864 if (show_weights) l += 9;
4866 /* Account for icon if displayed */
4867 if (show_item_graph)
4870 if (use_bigtile) l++;
4873 /* Maintain the maximum length */
4874 if (l > len) len = l;
4876 /* Advance to next "line" */
4880 /* Find the column to start in */
4881 col = (len > wid - 4) ? 0 : (wid - len - 1);
4883 /* Output each entry */
4884 for (j = 0; j < k; j++)
4890 o_ptr = &inventory[i];
4892 /* Clear the line */
4893 prt("", j + 1, col ? col - 2 : col);
4895 if (use_menu && target_item)
4897 if (j == (target_item-1))
4900 strcpy(tmp_val, "¡Õ");
4902 strcpy(tmp_val, "> ");
4904 target_item_label = i;
4906 else strcpy(tmp_val, " ");
4908 else if (i <= INVEN_PACK)
4910 /* Prepare an index --(-- */
4911 sprintf(tmp_val, "%c)", inven_label[i]);
4915 /* Prepare an index --(-- */
4916 sprintf(tmp_val, "%c)", index_to_label(i));
4919 /* Clear the line with the (possibly indented) index */
4920 put_str(tmp_val, j + 1, col);
4924 /* Display graphics for object, if desired */
4925 if (show_item_graph)
4927 byte a = object_attr(o_ptr);
4928 char c = object_char(o_ptr);
4931 if (a & 0x80) a |= 0x40;
4934 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
4935 if (use_bigtile) cur_col++;
4941 /* Display the entry itself */
4942 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
4944 /* Display the weight if needed */
4947 int wgt = o_ptr->weight * o_ptr->number;
4949 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4951 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4954 prt(tmp_val, j + 1, wid - 9);
4958 /* Make a "shadow" below the list (only if needed) */
4959 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4961 /* Save the new column */
4964 return target_item_label;
4970 * Display the equipment.
4972 int show_equip(int target_item)
4975 int col, cur_col, len;
4978 char o_name[MAX_NLEN];
4981 char out_desc[23][MAX_NLEN];
4982 int target_item_label = 0;
4984 char equip_label[52 + 1];
4986 /* Starting column */
4990 Term_get_size(&wid, &hgt);
4992 /* Maximal length */
4993 len = wid - col - 1;
4996 /* Scan the equipment list */
4997 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
4999 o_ptr = &inventory[i];
5001 /* Is this item acceptable? */
5002 if (!(select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr)) &&
5003 (!((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute) ||
5004 item_tester_no_ryoute)) continue;
5007 object_desc(o_name, o_ptr, 0);
5009 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
5012 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
5014 (void)strcpy(out_desc[k],"(wielding with two-hands)");
5016 out_color[k] = TERM_WHITE;
5020 (void)strcpy(out_desc[k], o_name);
5021 out_color[k] = tval_to_attr[o_ptr->tval % 128];
5025 /* Grey out charging items */
5028 out_color[k] = TERM_L_DARK;
5031 /* Extract the maximal length (see below) */
5033 l = strlen(out_desc[k]) + (2 + 1);
5035 l = strlen(out_desc[k]) + (2 + 3);
5039 /* Increase length for labels (if needed) */
5041 if (show_labels) l += (7 + 2);
5043 if (show_labels) l += (14 + 2);
5047 /* Increase length for weight (if needed) */
5048 if (show_weights) l += 9;
5050 if (show_item_graph) l += 2;
5052 /* Maintain the max-length */
5053 if (l > len) len = l;
5055 /* Advance the entry */
5059 /* Hack -- Find a column to start in */
5061 col = (len > wid - 6) ? 0 : (wid - len - 1);
5063 col = (len > wid - 4) ? 0 : (wid - len - 1);
5066 prepare_label_string(equip_label, USE_EQUIP);
5068 /* Output each entry */
5069 for (j = 0; j < k; j++)
5075 o_ptr = &inventory[i];
5077 /* Clear the line */
5078 prt("", j + 1, col ? col - 2 : col);
5080 if (use_menu && target_item)
5082 if (j == (target_item-1))
5085 strcpy(tmp_val, "¡Õ");
5087 strcpy(tmp_val, "> ");
5089 target_item_label = i;
5091 else strcpy(tmp_val, " ");
5093 else if (i >= INVEN_RARM)
5095 /* Prepare an index --(-- */
5096 sprintf(tmp_val, "%c)", equip_label[i - INVEN_RARM]);
5100 /* Prepare an index --(-- */
5101 sprintf(tmp_val, "%c)", index_to_label(i));
5104 /* Clear the line with the (possibly indented) index */
5105 put_str(tmp_val, j+1, col);
5109 /* Display graphics for object, if desired */
5110 if (show_item_graph)
5112 byte a = object_attr(o_ptr);
5113 char c = object_char(o_ptr);
5116 if (a & 0x80) a |= 0x40;
5119 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
5120 if (use_bigtile) cur_col++;
5128 /* Mention the use */
5130 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
5132 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
5135 put_str(tmp_val, j+1, cur_col);
5137 /* Display the entry itself */
5139 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
5141 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
5148 /* Display the entry itself */
5149 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
5152 /* Display the weight if needed */
5155 int wgt = o_ptr->weight * o_ptr->number;
5157 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5159 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
5162 prt(tmp_val, j + 1, wid - 9);
5166 /* Make a "shadow" below the list (only if needed) */
5167 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5169 /* Save the new column */
5172 return target_item_label;
5179 * Flip "inven" and "equip" in any sub-windows
5181 void toggle_inven_equip(void)
5186 for (j = 0; j < 8; j++)
5189 if (!angband_term[j]) continue;
5191 /* Flip inven to equip */
5192 if (window_flag[j] & (PW_INVEN))
5195 window_flag[j] &= ~(PW_INVEN);
5196 window_flag[j] |= (PW_EQUIP);
5199 p_ptr->window |= (PW_EQUIP);
5202 /* Flip inven to equip */
5203 else if (window_flag[j] & (PW_EQUIP))
5206 window_flag[j] &= ~(PW_EQUIP);
5207 window_flag[j] |= (PW_INVEN);
5210 p_ptr->window |= (PW_INVEN);
5218 * Verify the choice of an item.
5220 * The item can be negative to mean "item on floor".
5222 static bool verify(cptr prompt, int item)
5224 char o_name[MAX_NLEN];
5225 char out_val[MAX_NLEN+20];
5232 o_ptr = &inventory[item];
5238 o_ptr = &o_list[0 - item];
5242 object_desc(o_name, o_ptr, 0);
5246 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
5248 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
5253 return (get_check(out_val));
5258 * Hack -- allow user to "prevent" certain choices
5260 * The item can be negative to mean "item on floor".
5262 static bool get_item_allow(int item)
5268 if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
5273 o_ptr = &inventory[item];
5279 o_ptr = &o_list[0 - item];
5282 /* No inscription */
5283 if (!o_ptr->inscription) return (TRUE);
5286 s = my_strchr(quark_str(o_ptr->inscription), '!');
5288 /* Process preventions */
5291 /* Check the "restriction" */
5292 if ((s[1] == command_cmd) || (s[1] == '*'))
5294 /* Verify the choice */
5296 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
5298 if (!verify("Really try", item)) return (FALSE);
5303 /* Find another '!' */
5304 s = my_strchr(s + 1, '!');
5314 * Auxiliary function for "get_item()" -- test an index
5316 static bool get_item_okay(int i)
5319 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
5321 if (select_ring_slot) return is_ring_slot(i);
5323 /* Verify the item */
5324 if (!item_tester_okay(&inventory[i])) return (FALSE);
5333 * Determine whether get_item() can get some item or not
5334 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
5336 bool can_get_item(void)
5338 int j, floor_list[23], floor_num = 0;
5340 for (j = 0; j < INVEN_TOTAL; j++)
5341 if (item_tester_okay(&inventory[j]))
5344 floor_num = scan_floor(floor_list, py, px, 0x01);
5352 * Let the user select an item, save its "index"
5354 * Return TRUE only if an acceptable item was chosen by the user.
5356 * The selected item must satisfy the "item_tester_hook()" function,
5357 * if that hook is set, and the "item_tester_tval", if that value is set.
5359 * All "item_tester" restrictions are cleared before this function returns.
5361 * The user is allowed to choose acceptable items from the equipment,
5362 * inventory, or floor, respectively, if the proper flag was given,
5363 * and there are any acceptable items in that location.
5365 * The equipment or inventory are displayed (even if no acceptable
5366 * items are in that location) if the proper flag was given.
5368 * If there are no acceptable items available anywhere, and "str" is
5369 * not NULL, then it will be used as the text of a warning message
5370 * before the function returns.
5372 * Note that the user must press "-" to specify the item on the floor,
5373 * and there is no way to "examine" the item on the floor, while the
5374 * use of "capital" letters will "examine" an inventory/equipment item,
5375 * and prompt for its use.
5377 * If a legal item is selected from the inventory, we save it in "cp"
5378 * directly (0 to 35), and return TRUE.
5380 * If a legal item is selected from the floor, we save it in "cp" as
5381 * a negative (-1 to -511), and return TRUE.
5383 * If no item is available, we do nothing to "cp", and we display a
5384 * warning message, using "str" if available, and return FALSE.
5386 * If no item is selected, we do nothing to "cp", and return FALSE.
5388 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
5389 * to allow the user to enter a command while viewing those screens, and
5390 * also to induce "auto-enter" of stores, and other such stuff.
5392 * Global "p_ptr->command_see" may be set before calling this function to start
5393 * out in "browse" mode. It is cleared before this function returns.
5395 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
5396 * If it is TRUE then we are viewing inventory, else equipment.
5398 * We always erase the prompt when we are done, leaving a blank line,
5399 * or a warning message, if appropriate, if no items are available.
5401 bool get_item(int *cp, cptr pmt, cptr str, int mode)
5403 s16b this_o_idx, next_o_idx = 0;
5407 int j, k, i1, i2, e1, e2;
5417 bool allow_floor = FALSE;
5419 bool toggle = FALSE;
5425 extern bool select_the_force;
5427 int menu_line = (use_menu ? 1 : 0);
5431 #ifdef ALLOW_EASY_FLOOR /* TNB */
5433 if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
5435 #endif /* ALLOW_EASY_FLOOR -- TNB */
5439 /* Get the item index */
5440 if (repeat_pull(cp))
5443 if (*cp == INVEN_FORCE)
5445 item_tester_tval = 0;
5446 item_tester_hook = NULL;
5447 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5459 /* Acquire object */
5462 /* Validate the item */
5463 if (item_tester_okay(o_ptr))
5465 /* Forget the item_tester_tval restriction */
5466 item_tester_tval = 0;
5468 /* Forget the item_tester_hook restriction */
5469 item_tester_hook = NULL;
5471 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5478 /* Verify the item */
5479 else if (get_item_okay(*cp))
5481 /* Forget the item_tester_tval restriction */
5482 item_tester_tval = 0;
5484 /* Forget the item_tester_hook restriction */
5485 item_tester_hook = NULL;
5487 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5494 #endif /* ALLOW_REPEAT */
5497 if (mode & (USE_EQUIP)) equip = TRUE;
5498 if (mode & (USE_INVEN)) inven = TRUE;
5499 if (mode & (USE_FLOOR)) floor = TRUE;
5502 /* Paranoia XXX XXX XXX */
5509 /* No item selected */
5513 /* Full inventory */
5515 i2 = INVEN_PACK - 1;
5517 /* Forbid inventory */
5518 if (!inven) i2 = -1;
5521 for (j = 0; j < INVEN_PACK; j++)
5522 if (item_tester_okay(&inventory[j])) max_inven++;
5525 /* Restrict inventory indexes */
5526 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5527 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5530 /* Full equipment */
5532 e2 = INVEN_TOTAL - 1;
5534 /* Forbid equipment */
5535 if (!equip) e2 = -1;
5538 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5539 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
5540 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5543 /* Restrict equipment indexes */
5544 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5545 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5547 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
5551 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
5553 else if (p_ptr->hidarite) e1 = INVEN_RARM;
5557 /* Restrict floor usage */
5560 /* Scan all objects in the grid */
5561 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5565 /* Acquire object */
5566 o_ptr = &o_list[this_o_idx];
5568 /* Acquire next object */
5569 next_o_idx = o_ptr->next_o_idx;
5571 /* Accept the item on the floor if legal */
5572 if (item_tester_okay(o_ptr)) allow_floor = TRUE;
5576 /* Require at least one legal choice */
5577 if (!allow_floor && (i1 > i2) && (e1 > e2))
5579 /* Cancel p_ptr->command_see */
5580 command_see = FALSE;
5588 if (select_the_force) {
5594 /* Analyze choices */
5597 /* Hack -- Start on equipment if requested */
5598 if (command_see && command_wrk && equip)
5603 /* Use inventory if allowed */
5606 command_wrk = FALSE;
5609 /* Use equipment if allowed */
5615 /* Use inventory for floor */
5618 command_wrk = FALSE;
5624 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5626 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5628 /* Hack -- start out in "display" mode */
5636 /* Repeat until done */
5639 int get_item_label = 0;
5646 for (j = 0; j < 8; j++)
5649 if (!angband_term[j]) continue;
5651 /* Count windows displaying inven */
5652 if (window_flag[j] & (PW_INVEN)) ni++;
5654 /* Count windows displaying equip */
5655 if (window_flag[j] & (PW_EQUIP)) ne++;
5658 /* Toggle if needed */
5659 if ((command_wrk && ni && !ne) ||
5660 (!command_wrk && !ni && ne))
5663 toggle_inven_equip();
5670 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5672 /* Redraw windows */
5676 /* Inventory screen */
5679 /* Redraw if needed */
5680 if (command_see) get_item_label = show_inven(menu_line);
5683 /* Equipment screen */
5686 /* Redraw if needed */
5687 if (command_see) get_item_label = show_equip(menu_line);
5690 /* Viewing inventory */
5693 /* Begin the prompt */
5695 sprintf(out_val, "»ý¤Áʪ:");
5697 sprintf(out_val, "Inven:");
5701 /* Some legal items */
5702 if ((i1 <= i2) && !use_menu)
5704 /* Build the prompt */
5706 sprintf(tmp_val, "%c-%c,'(',')',",
5708 sprintf(tmp_val, " %c-%c,'(',')',",
5711 index_to_label(i1), index_to_label(i2));
5714 strcat(out_val, tmp_val);
5717 /* Indicate ability to "view" */
5719 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5721 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5727 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
5728 else if (select_the_force)
5729 strcat(out_val, " 'w'Îýµ¤½Ñ,");
5731 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
5732 else if (select_the_force)
5733 strcat(out_val, " w for the Force,");
5738 /* Viewing equipment */
5741 /* Begin the prompt */
5743 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5745 sprintf(out_val, "Equip:");
5749 /* Some legal items */
5750 if ((e1 <= e2) && !use_menu)
5752 /* Build the prompt */
5754 sprintf(tmp_val, "%c-%c,'(',')',",
5756 sprintf(tmp_val, " %c-%c,'(',')',",
5759 index_to_label(e1), index_to_label(e2));
5762 strcat(out_val, tmp_val);
5765 /* Indicate ability to "view" */
5767 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5769 if (!command_see) strcat(out_val, " * to see,");
5775 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
5777 if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
5782 /* Indicate legality of the "floor" item */
5784 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
5786 if (allow_floor) strcat(out_val, " - for floor,");
5790 /* Finish the prompt */
5791 strcat(out_val, " ESC");
5793 /* Build the prompt */
5794 sprintf(tmp_val, "(%s) %s", out_val, pmt);
5796 /* Show the prompt */
5805 int max_line = (command_wrk ? max_equip : max_inven);
5821 menu_line += (max_line - 1);
5840 /* Verify legality */
5841 if (!inven || !equip)
5847 /* Hack -- Fix screen */
5857 /* Switch inven/equip */
5858 command_wrk = !command_wrk;
5859 max_line = (command_wrk ? max_equip : max_inven);
5860 if (menu_line > max_line) menu_line = max_line;
5862 /* Need to redraw */
5871 if (command_wrk == USE_FLOOR)
5874 (*cp) = -get_item_label;
5878 /* Validate the item */
5879 if (!get_item_okay(get_item_label))
5885 /* Allow player to "refuse" certain actions */
5886 if (!get_item_allow(get_item_label))
5892 /* Accept that choice */
5893 (*cp) = get_item_label;
5902 if (select_the_force) {
5910 if (menu_line > max_line) menu_line -= max_line;
5931 command_see = FALSE;
5951 /* Verify legality */
5952 if (!inven || !equip)
5958 /* Hack -- Fix screen */
5968 /* Switch inven/equip */
5969 command_wrk = !command_wrk;
5971 /* Need to redraw */
5977 /* Use floor item */
5980 /* Scan all objects in the grid */
5981 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5985 /* Acquire object */
5986 o_ptr = &o_list[this_o_idx];
5988 /* Acquire next object */
5989 next_o_idx = o_ptr->next_o_idx;
5991 /* Validate the item */
5992 if (!item_tester_okay(o_ptr)) continue;
5997 /* Verify the item (if required) */
5999 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
6001 if (other_query_flag && !verify("Try", k)) continue;
6005 /* Allow player to "refuse" certain actions */
6006 if (!get_item_allow(k)) continue;
6008 /* Accept that choice */
6025 case '1': case '2': case '3':
6026 case '4': case '5': case '6':
6027 case '7': case '8': case '9':
6029 /* Look up the tag */
6030 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
6036 /* Hack -- Validate the item */
6037 if ((k < INVEN_RARM) ? !inven : !equip)
6043 /* Validate the item */
6044 if (!get_item_okay(k))
6050 /* Allow player to "refuse" certain actions */
6051 if (!get_item_allow(k))
6057 /* Accept that choice */
6068 /* Choose "default" inventory item */
6071 k = ((i1 == i2) ? i1 : -1);
6074 /* Choose "default" equipment item */
6077 k = ((e1 == e2) ? e1 : -1);
6080 /* Validate the item */
6081 if (!get_item_okay(k))
6087 /* Allow player to "refuse" certain actions */
6088 if (!get_item_allow(k))
6094 /* Accept that choice */
6104 if (select_the_force) {
6117 bool not_found = FALSE;
6119 /* Look up the alphabetical tag */
6120 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
6125 /* Hack -- Validate the item */
6126 else if ((k < INVEN_RARM) ? !inven : !equip)
6131 /* Validate the item */
6132 else if (!get_item_okay(k))
6139 /* Accept that choice */
6146 /* Extract "query" setting */
6147 ver = isupper(which);
6148 which = tolower(which);
6150 /* Convert letter to inventory index */
6153 if (which == '(') k = i1;
6154 else if (which == ')') k = i2;
6155 else k = label_to_inven(which);
6158 /* Convert letter to equipment index */
6161 if (which == '(') k = e1;
6162 else if (which == ')') k = e2;
6163 else k = label_to_equip(which);
6166 /* Validate the item */
6167 if (!get_item_okay(k))
6173 /* Verify the item */
6175 if (ver && !verify("ËÜÅö¤Ë", k))
6177 if (ver && !verify("Try", k))
6185 /* Allow player to "refuse" certain actions */
6186 if (!get_item_allow(k))
6192 /* Accept that choice */
6203 /* Fix the screen if necessary */
6209 /* Hack -- Cancel "display" */
6210 command_see = FALSE;
6214 /* Forget the item_tester_tval restriction */
6215 item_tester_tval = 0;
6217 item_tester_no_ryoute = FALSE;
6219 /* Forget the item_tester_hook restriction */
6220 item_tester_hook = NULL;
6223 /* Clean up 'show choices' */
6224 /* Toggle again if needed */
6225 if (toggle) toggle_inven_equip();
6228 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6234 /* Clear the prompt line */
6237 /* Warning if needed */
6238 if (oops && str) msg_print(str);
6244 #endif /* ALLOW_REPEAT */
6246 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6254 #ifdef ALLOW_EASY_FLOOR
6259 * Return a list of o_list[] indexes of items at the given cave
6260 * location. Valid flags are:
6262 * mode & 0x01 -- Item tester
6263 * mode & 0x02 -- Marked items only
6264 * mode & 0x04 -- Stop after first
6266 int scan_floor(int *items, int y, int x, int mode)
6268 int this_o_idx, next_o_idx;
6273 if (!in_bounds(y, x)) return 0;
6275 /* Scan all objects in the grid */
6276 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
6280 /* Acquire object */
6281 o_ptr = &o_list[this_o_idx];
6283 /* Acquire next object */
6284 next_o_idx = o_ptr->next_o_idx;
6287 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
6290 if ((mode & 0x02) && !o_ptr->marked) continue;
6292 /* Accept this item */
6293 /* XXX Hack -- Enforce limit */
6295 items[num] = this_o_idx;
6300 if (mode & 0x04) break;
6309 * Display a list of the items on the floor at the given location.
6311 int show_floor(int target_item, int y, int x, int *min_width)
6318 char o_name[MAX_NLEN];
6324 char out_desc[23][MAX_NLEN];
6325 int target_item_label = 0;
6327 int floor_list[23], floor_num;
6329 char floor_label[52 + 1];
6332 Term_get_size(&wid, &hgt);
6334 /* Default length */
6335 len = MAX((*min_width), 20);
6338 /* Scan for objects in the grid, using item_tester_okay() */
6339 floor_num = scan_floor(floor_list, y, x, 0x01);
6341 /* Display the floor objects */
6342 for (k = 0, i = 0; i < floor_num && i < 23; i++)
6344 o_ptr = &o_list[floor_list[i]];
6346 /* Describe the object */
6347 object_desc(o_name, o_ptr, 0);
6349 /* Save the index */
6352 /* Acquire inventory color */
6353 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
6355 /* Save the object description */
6356 strcpy(out_desc[k], o_name);
6358 /* Find the predicted "line length" */
6359 l = strlen(out_desc[k]) + 5;
6361 /* Be sure to account for the weight */
6362 if (show_weights) l += 9;
6364 /* Maintain the maximum length */
6365 if (l > len) len = l;
6367 /* Advance to next "line" */
6374 /* Find the column to start in */
6375 col = (len > wid - 4) ? 0 : (wid - len - 1);
6377 prepare_label_string_floor(floor_label, floor_list, floor_num);
6379 /* Output each entry */
6380 for (j = 0; j < k; j++)
6383 i = floor_list[out_index[j]];
6388 /* Clear the line */
6389 prt("", j + 1, col ? col - 2 : col);
6391 if (use_menu && target_item)
6393 if (j == (target_item-1))
6396 strcpy(tmp_val, "¡Õ");
6398 strcpy(tmp_val, "> ");
6400 target_item_label = i;
6402 else strcpy(tmp_val, " ");
6406 /* Prepare an index --(-- */
6407 sprintf(tmp_val, "%c)", floor_label[j]);
6410 /* Clear the line with the (possibly indented) index */
6411 put_str(tmp_val, j + 1, col);
6413 /* Display the entry itself */
6414 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
6416 /* Display the weight if needed */
6419 int wgt = o_ptr->weight * o_ptr->number;
6421 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
6423 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
6426 prt(tmp_val, j + 1, wid - 9);
6430 /* Make a "shadow" below the list (only if needed) */
6431 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
6433 return target_item_label;
6437 * This version of get_item() is called by get_item() when
6438 * the easy_floor is on.
6440 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
6442 char n1 = ' ', n2 = ' ', which = ' ';
6444 int j, k, i1, i2, e1, e2;
6454 bool allow_equip = FALSE;
6455 bool allow_inven = FALSE;
6456 bool allow_floor = FALSE;
6458 bool toggle = FALSE;
6463 int floor_num, floor_list[23], floor_top = 0;
6466 extern bool select_the_force;
6468 int menu_line = (use_menu ? 1 : 0);
6474 /* Get the item index */
6475 if (repeat_pull(cp))
6478 if (*cp == INVEN_FORCE)
6480 item_tester_tval = 0;
6481 item_tester_hook = NULL;
6482 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6494 /* Acquire object */
6497 /* Validate the item */
6498 if (item_tester_okay(o_ptr))
6500 /* Forget the item_tester_tval restriction */
6501 item_tester_tval = 0;
6503 /* Forget the item_tester_hook restriction */
6504 item_tester_hook = NULL;
6506 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6513 /* Verify the item */
6514 else if (get_item_okay(*cp))
6516 /* Forget the item_tester_tval restriction */
6517 item_tester_tval = 0;
6519 /* Forget the item_tester_hook restriction */
6520 item_tester_hook = NULL;
6522 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6529 #endif /* ALLOW_REPEAT */
6532 if (mode & (USE_EQUIP)) equip = TRUE;
6533 if (mode & (USE_INVEN)) inven = TRUE;
6534 if (mode & (USE_FLOOR)) floor = TRUE;
6537 /* Paranoia XXX XXX XXX */
6544 /* No item selected */
6548 /* Full inventory */
6550 i2 = INVEN_PACK - 1;
6552 /* Forbid inventory */
6553 if (!inven) i2 = -1;
6556 for (j = 0; j < INVEN_PACK; j++)
6557 if (item_tester_okay(&inventory[j])) max_inven++;
6560 /* Restrict inventory indexes */
6561 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
6562 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
6565 /* Full equipment */
6567 e2 = INVEN_TOTAL - 1;
6569 /* Forbid equipment */
6570 if (!equip) e2 = -1;
6573 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
6574 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
6575 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
6578 /* Restrict equipment indexes */
6579 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
6580 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
6582 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
6586 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
6588 else if (p_ptr->hidarite) e1 = INVEN_RARM;
6592 /* Count "okay" floor items */
6595 /* Restrict floor usage */
6598 /* Scan all objects in the grid */
6599 floor_num = scan_floor(floor_list, py, px, 0x01);
6602 /* Accept inventory */
6603 if (i1 <= i2) allow_inven = TRUE;
6605 /* Accept equipment */
6606 if (e1 <= e2) allow_equip = TRUE;
6609 if (floor_num) allow_floor = TRUE;
6611 /* Require at least one legal choice */
6612 if (!allow_inven && !allow_equip && !allow_floor)
6614 /* Cancel p_ptr->command_see */
6615 command_see = FALSE;
6623 if (select_the_force) {
6629 /* Analyze choices */
6632 /* Hack -- Start on equipment if requested */
6633 if (command_see && (command_wrk == (USE_EQUIP))
6636 command_wrk = (USE_EQUIP);
6639 /* Use inventory if allowed */
6640 else if (allow_inven)
6642 command_wrk = (USE_INVEN);
6645 /* Use equipment if allowed */
6646 else if (allow_equip)
6648 command_wrk = (USE_EQUIP);
6651 /* Use floor if allowed */
6652 else if (allow_floor)
6654 command_wrk = (USE_FLOOR);
6659 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
6661 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
6663 /* Hack -- start out in "display" mode */
6670 /* Repeat until done */
6673 int get_item_label = 0;
6680 for (j = 0; j < 8; j++)
6683 if (!angband_term[j]) continue;
6685 /* Count windows displaying inven */
6686 if (window_flag[j] & (PW_INVEN)) ni++;
6688 /* Count windows displaying equip */
6689 if (window_flag[j] & (PW_EQUIP)) ne++;
6692 /* Toggle if needed */
6693 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
6694 (command_wrk == (USE_INVEN) && !ni && ne))
6697 toggle_inven_equip();
6704 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6706 /* Redraw windows */
6709 /* Inventory screen */
6710 if (command_wrk == (USE_INVEN))
6712 /* Extract the legal requests */
6716 /* Redraw if needed */
6717 if (command_see) get_item_label = show_inven(menu_line);
6720 /* Equipment screen */
6721 else if (command_wrk == (USE_EQUIP))
6723 /* Extract the legal requests */
6724 n1 = I2A(e1 - INVEN_RARM);
6725 n2 = I2A(e2 - INVEN_RARM);
6727 /* Redraw if needed */
6728 if (command_see) get_item_label = show_equip(menu_line);
6732 else if (command_wrk == (USE_FLOOR))
6735 k = MIN(floor_top + 23, floor_num) - 1;
6737 /* Extract the legal requests */
6738 n1 = I2A(j - floor_top);
6739 n2 = I2A(k - floor_top);
6741 /* Redraw if needed */
6742 if (command_see) get_item_label = show_floor(menu_line, py, px, &min_width);
6745 /* Viewing inventory */
6746 if (command_wrk == (USE_INVEN))
6748 /* Begin the prompt */
6750 sprintf(out_val, "»ý¤Áʪ:");
6752 sprintf(out_val, "Inven:");
6757 /* Build the prompt */
6759 sprintf(tmp_val, "%c-%c,'(',')',",
6761 sprintf(tmp_val, " %c-%c,'(',')',",
6764 index_to_label(i1), index_to_label(i2));
6767 strcat(out_val, tmp_val);
6770 /* Indicate ability to "view" */
6772 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6774 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6783 strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
6784 else if (allow_floor)
6785 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
6787 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6789 else if (select_the_force)
6790 strcat(out_val, " 'w'Îýµ¤½Ñ,");
6795 strcat(out_val, " / for Equip,");
6796 else if (allow_floor)
6797 strcat(out_val, " 6 for Equip,");
6799 strcat(out_val, " 4 or 6 for Equip,");
6801 else if (select_the_force)
6802 strcat(out_val, " w for the Force,");
6810 strcat(out_val, " '-'¾²¾å,");
6811 else if (allow_equip)
6812 strcat(out_val, " '4' ¾²¾å,");
6814 strcat(out_val, " '4'or'6' ¾²¾å,");
6817 strcat(out_val, " - for floor,");
6818 else if (allow_equip)
6819 strcat(out_val, " 4 for floor,");
6821 strcat(out_val, " 4 or 6 for floor,");
6827 /* Viewing equipment */
6828 else if (command_wrk == (USE_EQUIP))
6830 /* Begin the prompt */
6832 sprintf(out_val, "ÁõÈ÷ÉÊ:");
6834 sprintf(out_val, "Equip:");
6840 /* Build the prompt */
6842 sprintf(tmp_val, "%c-%c,'(',')',",
6844 sprintf(tmp_val, " %c-%c,'(',')',",
6847 index_to_label(e1), index_to_label(e2));
6850 strcat(out_val, tmp_val);
6853 /* Indicate ability to "view" */
6855 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6857 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6866 strcat(out_val, " '/' »ý¤Áʪ,");
6867 else if (allow_floor)
6868 strcat(out_val, " '4' »ý¤Áʪ,");
6870 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6874 strcat(out_val, " / for Inven,");
6875 else if (allow_floor)
6876 strcat(out_val, " 4 for Inven,");
6878 strcat(out_val, " 4 or 6 for Inven,");
6887 strcat(out_val, " '-'¾²¾å,");
6888 else if (allow_inven)
6889 strcat(out_val, " '6' ¾²¾å,");
6891 strcat(out_val, " '4'or'6' ¾²¾å,");
6894 strcat(out_val, " - for floor,");
6895 else if (allow_inven)
6896 strcat(out_val, " 6 for floor,");
6898 strcat(out_val, " 4 or 6 for floor,");
6904 else if (command_wrk == (USE_FLOOR))
6906 /* Begin the prompt */
6908 sprintf(out_val, "¾²¾å:");
6910 sprintf(out_val, "Floor:");
6916 /* Build the prompt */
6918 sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
6920 sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
6925 strcat(out_val, tmp_val);
6928 /* Indicate ability to "view" */
6930 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6932 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6938 if (allow_inven && allow_equip)
6941 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
6943 strcat(out_val, " 4 for Equip, 6 for Inven,");
6947 else if (allow_inven)
6950 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6952 strcat(out_val, " 4 or 6 for Inven,");
6956 else if (allow_equip)
6959 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6961 strcat(out_val, " 4 or 6 for Equip,");
6967 else if (allow_inven)
6970 strcat(out_val, " '/' »ý¤Áʪ,");
6972 strcat(out_val, " / for Inven,");
6976 else if (allow_equip)
6979 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6981 strcat(out_val, " / for Equip,");
6987 if (command_see && !use_menu)
6990 strcat(out_val, " Enter ¼¡,");
6992 strcat(out_val, " Enter for scroll down,");
6997 /* Finish the prompt */
6998 strcat(out_val, " ESC");
7000 /* Build the prompt */
7001 sprintf(tmp_val, "(%s) %s", out_val, pmt);
7003 /* Show the prompt */
7012 if (command_wrk == USE_INVEN) max_line = max_inven;
7013 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7014 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7030 menu_line += (max_line - 1);
7046 /* Verify legality */
7047 if (command_wrk == (USE_INVEN))
7049 if (allow_floor) command_wrk = USE_FLOOR;
7050 else if (allow_equip) command_wrk = USE_EQUIP;
7057 else if (command_wrk == (USE_EQUIP))
7059 if (allow_inven) command_wrk = USE_INVEN;
7060 else if (allow_floor) command_wrk = USE_FLOOR;
7067 else if (command_wrk == (USE_FLOOR))
7069 if (allow_equip) command_wrk = USE_EQUIP;
7070 else if (allow_inven) command_wrk = USE_INVEN;
7083 /* Hack -- Fix screen */
7093 /* Switch inven/equip */
7094 if (command_wrk == USE_INVEN) max_line = max_inven;
7095 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7096 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7097 if (menu_line > max_line) menu_line = max_line;
7099 /* Need to redraw */
7107 /* Verify legality */
7108 if (command_wrk == (USE_INVEN))
7110 if (allow_equip) command_wrk = USE_EQUIP;
7111 else if (allow_floor) command_wrk = USE_FLOOR;
7118 else if (command_wrk == (USE_EQUIP))
7120 if (allow_floor) command_wrk = USE_FLOOR;
7121 else if (allow_inven) command_wrk = USE_INVEN;
7128 else if (command_wrk == (USE_FLOOR))
7130 if (allow_inven) command_wrk = USE_INVEN;
7131 else if (allow_equip) command_wrk = USE_EQUIP;
7144 /* Hack -- Fix screen */
7154 /* Switch inven/equip */
7155 if (command_wrk == USE_INVEN) max_line = max_inven;
7156 else if (command_wrk == USE_EQUIP) max_line = max_equip;
7157 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
7158 if (menu_line > max_line) menu_line = max_line;
7160 /* Need to redraw */
7169 if (command_wrk == USE_FLOOR)
7172 (*cp) = -get_item_label;
7176 /* Validate the item */
7177 if (!get_item_okay(get_item_label))
7183 /* Allow player to "refuse" certain actions */
7184 if (!get_item_allow(get_item_label))
7190 /* Accept that choice */
7191 (*cp) = get_item_label;
7200 if (select_the_force) {
7208 if (menu_line > max_line) menu_line -= max_line;
7229 command_see = FALSE;
7252 cave_type *c_ptr = &cave[py][px];
7254 if (command_wrk != (USE_FLOOR)) break;
7256 /* Get the object being moved. */
7257 o_idx = c_ptr->o_idx;
7259 /* Only rotate a pile of two or more objects. */
7260 if (!(o_idx && o_list[o_idx].next_o_idx)) break;
7262 /* Remove the first object from the list. */
7263 excise_object_idx(o_idx);
7265 /* Find end of the list. */
7267 while (o_list[i].next_o_idx)
7268 i = o_list[i].next_o_idx;
7270 /* Add after the last object. */
7271 o_list[i].next_o_idx = o_idx;
7273 /* Re-scan floor list */
7274 floor_num = scan_floor(floor_list, py, px, 0x01);
7276 /* Hack -- Fix screen */
7291 if (command_wrk == (USE_INVEN))
7298 command_wrk = (USE_EQUIP);
7300 else if (command_wrk == (USE_EQUIP))
7307 command_wrk = (USE_INVEN);
7309 else if (command_wrk == (USE_FLOOR))
7313 command_wrk = (USE_INVEN);
7315 else if (allow_equip)
7317 command_wrk = (USE_EQUIP);
7326 /* Hack -- Fix screen */
7336 /* Need to redraw */
7349 * If we are already examining the floor, and there
7350 * is only one item, we will always select it.
7351 * If we aren't examining the floor and there is only
7352 * one item, we will select it if floor_query_flag
7357 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
7360 k = 0 - floor_list[0];
7362 /* Allow player to "refuse" certain actions */
7363 if (!get_item_allow(k))
7369 /* Accept that choice */
7378 /* Hack -- Fix screen */
7388 command_wrk = (USE_FLOOR);
7394 case '1': case '2': case '3':
7395 case '4': case '5': case '6':
7396 case '7': case '8': case '9':
7398 if (command_wrk != USE_FLOOR)
7400 /* Look up the tag */
7401 if (!get_tag(&k, which, command_wrk))
7407 /* Hack -- Validate the item */
7408 if ((k < INVEN_RARM) ? !inven : !equip)
7414 /* Validate the item */
7415 if (!get_item_okay(k))
7423 /* Look up the alphabetical tag */
7424 if (get_tag_floor(&k, which, floor_list, floor_num))
7427 k = 0 - floor_list[k];
7436 /* Allow player to "refuse" certain actions */
7437 if (!get_item_allow(k))
7443 /* Accept that choice */
7454 /* Choose "default" inventory item */
7455 if (command_wrk == (USE_INVEN))
7457 k = ((i1 == i2) ? i1 : -1);
7460 /* Choose "default" equipment item */
7461 else if (command_wrk == (USE_EQUIP))
7463 k = ((e1 == e2) ? e1 : -1);
7466 /* Choose "default" floor item */
7467 else if (command_wrk == (USE_FLOOR))
7472 k = 0 - floor_list[0];
7474 /* Allow player to "refuse" certain actions */
7475 if (!get_item_allow(k))
7481 /* Accept that choice */
7489 /* Validate the item */
7490 if (!get_item_okay(k))
7496 /* Allow player to "refuse" certain actions */
7497 if (!get_item_allow(k))
7503 /* Accept that choice */
7513 if (select_the_force) {
7527 if (command_wrk != USE_FLOOR)
7529 bool not_found = FALSE;
7531 /* Look up the alphabetical tag */
7532 if (!get_tag(&k, which, command_wrk))
7537 /* Hack -- Validate the item */
7538 else if ((k < INVEN_RARM) ? !inven : !equip)
7543 /* Validate the item */
7544 else if (!get_item_okay(k))
7551 /* Accept that choice */
7560 /* Look up the alphabetical tag */
7561 if (get_tag_floor(&k, which, floor_list, floor_num))
7564 k = 0 - floor_list[k];
7566 /* Accept that choice */
7574 /* Extract "query" setting */
7575 ver = isupper(which);
7576 which = tolower(which);
7578 /* Convert letter to inventory index */
7579 if (command_wrk == (USE_INVEN))
7581 if (which == '(') k = i1;
7582 else if (which == ')') k = i2;
7583 else k = label_to_inven(which);
7586 /* Convert letter to equipment index */
7587 else if (command_wrk == (USE_EQUIP))
7589 if (which == '(') k = e1;
7590 else if (which == ')') k = e2;
7591 else k = label_to_equip(which);
7594 /* Convert letter to floor index */
7595 else if (command_wrk == USE_FLOOR)
7597 if (which == '(') k = 0;
7598 else if (which == ')') k = floor_num - 1;
7599 else k = islower(which) ? A2I(which) : -1;
7600 if (k < 0 || k >= floor_num || k >= 23)
7607 k = 0 - floor_list[k];
7610 /* Validate the item */
7611 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
7617 /* Verify the item */
7619 if (ver && !verify("ËÜÅö¤Ë", k))
7621 if (ver && !verify("Try", k))
7629 /* Allow player to "refuse" certain actions */
7630 if (!get_item_allow(k))
7636 /* Accept that choice */
7646 /* Fix the screen if necessary */
7652 /* Hack -- Cancel "display" */
7653 command_see = FALSE;
7657 /* Forget the item_tester_tval restriction */
7658 item_tester_tval = 0;
7660 /* Forget the item_tester_hook restriction */
7661 item_tester_hook = NULL;
7664 /* Clean up 'show choices' */
7665 /* Toggle again if needed */
7666 if (toggle) toggle_inven_equip();
7669 p_ptr->window |= (PW_INVEN | PW_EQUIP);
7675 /* Clear the prompt line */
7678 /* Warning if needed */
7679 if (oops && str) msg_print(str);
7685 #endif /* ALLOW_REPEAT */
7687 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
7695 static bool py_pickup_floor_aux(void)
7703 /* Restrict the choices */
7704 item_tester_hook = inven_carry_okay;
7708 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
7709 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
7711 q = "Get which item? ";
7712 s = "You no longer have any room for the objects on the floor.";
7715 if (get_item(&item, q, s, (USE_FLOOR)))
7717 this_o_idx = 0 - item;
7724 /* Pick up the object */
7725 py_pickup_aux(this_o_idx);
7732 * Make the player carry everything in a grid
7734 * If "pickup" is FALSE then only gold will be picked up
7736 * This is called by py_pickup() when easy_floor is TRUE.
7738 void py_pickup_floor(bool pickup)
7740 s16b this_o_idx, next_o_idx = 0;
7742 char o_name[MAX_NLEN];
7745 int floor_num = 0, floor_list[23], floor_o_idx = 0;
7749 /* Scan the pile of objects */
7750 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
7754 /* Access the object */
7755 o_ptr = &o_list[this_o_idx];
7757 /* Describe the object */
7758 object_desc(o_name, o_ptr, 0);
7760 /* Access the next object */
7761 next_o_idx = o_ptr->next_o_idx;
7763 /* Hack -- disturb */
7767 if (o_ptr->tval == TV_GOLD)
7771 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
7772 (long)o_ptr->pval, o_name);
7774 msg_format("You have found %ld gold pieces worth of %s.",
7775 (long) o_ptr->pval, o_name);
7779 /* Collect the gold */
7780 p_ptr->au += o_ptr->pval;
7783 p_ptr->redraw |= (PR_GOLD);
7786 p_ptr->window |= (PW_PLAYER);
7788 /* Delete the gold */
7789 delete_object_idx(this_o_idx);
7791 /* Check the next object */
7794 else if (o_ptr->marked & OM_NOMSG)
7796 /* If 0 or 1 non-NOMSG items are in the pile, the NOMSG ones are
7797 * ignored. Otherwise, they are included in the prompt. */
7798 o_ptr->marked &= ~(OM_NOMSG);
7802 /* Count non-gold objects that can be picked up. */
7803 if (inven_carry_okay(o_ptr))
7808 /* Remember this object index */
7810 floor_list[floor_num] = this_o_idx;
7812 /* Count non-gold objects */
7815 /* Remember this index */
7816 floor_o_idx = this_o_idx;
7819 /* There are no non-gold objects */
7823 /* Mention the number of objects */
7829 /* Access the object */
7830 o_ptr = &o_list[floor_o_idx];
7832 #ifdef ALLOW_EASY_SENSE
7834 /* Option: Make object sensing easy */
7837 /* Sense the object */
7838 (void) sense_object(o_ptr);
7841 #endif /* ALLOW_EASY_SENSE */
7843 /* Describe the object */
7844 object_desc(o_name, o_ptr, 0);
7848 msg_format("%s¤¬¤¢¤ë¡£", o_name);
7850 msg_format("You see %s.", o_name);
7855 /* Multiple objects */
7860 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
7862 msg_format("You see a pile of %d items.", floor_num);
7871 /* The player has no room for anything on the floor. */
7877 /* Access the object */
7878 o_ptr = &o_list[floor_o_idx];
7880 #ifdef ALLOW_EASY_SENSE
7882 /* Option: Make object sensing easy */
7885 /* Sense the object */
7886 (void) sense_object(o_ptr);
7889 #endif /* ALLOW_EASY_SENSE */
7891 /* Describe the object */
7892 object_desc(o_name, o_ptr, 0);
7896 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7898 msg_format("You have no room for %s.", o_name);
7903 /* Multiple objects */
7908 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7910 msg_print("You have no room for any of the objects on the floor.");
7922 /* Hack -- query every object */
7923 if (carry_query_flag)
7925 char out_val[MAX_NLEN+20];
7927 /* Access the object */
7928 o_ptr = &o_list[floor_o_idx];
7930 #ifdef ALLOW_EASY_SENSE
7932 /* Option: Make object sensing easy */
7935 /* Sense the object */
7936 (void) sense_object(o_ptr);
7939 #endif /* ALLOW_EASY_SENSE */
7941 /* Describe the object */
7942 object_desc(o_name, o_ptr, 0);
7944 /* Build a prompt */
7946 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7948 (void) sprintf(out_val, "Pick up %s? ", o_name);
7952 /* Ask the user to confirm */
7953 if (!get_check(out_val))
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 /* Pick up the object */
7975 py_pickup_aux(floor_o_idx);
7978 /* Allow the user to choose an object */
7981 while (can_pickup--)
7983 if (!py_pickup_floor_aux()) break;
7988 #endif /* ALLOW_EASY_FLOOR */