3 /* Purpose: Object code, part 1 */
6 * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke
8 * This software may be copied and distributed for educational, research, and
9 * not for profit purposes provided that this copyright and statement are
10 * included in all such copies.
21 * Reset the "visual" lists
23 * This involves resetting various things to their "default" state.
25 * If the "prefs" flag is TRUE, then we will also load the appropriate
26 * "user pref file" based on the current setting of the "use_graphics"
27 * flag. This is useful for switching "graphics" on/off.
29 * The features, objects, and monsters, should all be encoded in the
30 * relevant "font.pref" and/or "graf.prf" files. XXX XXX XXX
32 * The "prefs" parameter is no longer meaningful. XXX XXX XXX
34 void reset_visuals(void)
38 /* Extract some info about terrain features */
39 for (i = 0; i < max_f_idx; i++)
41 feature_type *f_ptr = &f_info[i];
43 /* Assume we will use the underlying values */
44 f_ptr->x_attr = f_ptr->d_attr;
45 f_ptr->x_char = f_ptr->d_char;
48 /* Extract default attr/char code for objects */
49 for (i = 0; i < max_k_idx; i++)
51 object_kind *k_ptr = &k_info[i];
53 /* Default attr/char */
54 k_ptr->x_attr = k_ptr->d_attr;
55 k_ptr->x_char = k_ptr->d_char;
58 /* Extract default attr/char code for monsters */
59 for (i = 0; i < max_r_idx; i++)
61 monster_race *r_ptr = &r_info[i];
63 /* Default attr/char */
64 r_ptr->x_attr = r_ptr->d_attr;
65 r_ptr->x_char = r_ptr->d_char;
72 /* Process "graf.prf" */
73 process_pref_file("graf.prf");
75 /* Access the "character" pref file */
76 sprintf(buf, "graf-%s.prf", player_base);
78 /* Process "graf-<playername>.prf" */
79 process_pref_file(buf);
87 /* Process "font.prf" */
88 process_pref_file("font.prf");
90 /* Access the "character" pref file */
91 sprintf(buf, "font-%s.prf", player_base);
93 /* Process "font-<playername>.prf" */
94 process_pref_file(buf);
100 * Obtain the "flags" for an item
102 void object_flags(object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3)
104 object_kind *k_ptr = &k_info[o_ptr->k_idx];
107 (*f1) = k_ptr->flags1;
108 (*f2) = k_ptr->flags2;
109 (*f3) = k_ptr->flags3;
114 artifact_type *a_ptr = &a_info[o_ptr->name1];
116 (*f1) = a_ptr->flags1;
117 (*f2) = a_ptr->flags2;
118 (*f3) = a_ptr->flags3;
119 if (!cursed_p(o_ptr))
121 (*f3) &= ~(TR3_HEAVY_CURSE | TR3_CURSED);
128 ego_item_type *e_ptr = &e_info[o_ptr->name2];
130 (*f1) |= e_ptr->flags1;
131 (*f2) |= e_ptr->flags2;
132 (*f3) |= e_ptr->flags3;
134 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
136 (*f3) &= ~(TR3_SH_FIRE);
138 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
140 (*f1) &= ~(TR1_INFRA);
142 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
144 (*f2) &= ~(TR2_RES_BLIND);
145 (*f3) &= ~(TR3_SEE_INVIS);
149 /* Random artifact ! */
150 if (o_ptr->art_flags1 || o_ptr->art_flags2 || o_ptr->art_flags3)
152 (*f1) |= o_ptr->art_flags1;
153 (*f2) |= o_ptr->art_flags2;
154 (*f3) |= o_ptr->art_flags3;
157 if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
159 if (o_ptr->xtra3 < 33)
161 (*f1) |= (0x00000001 << (o_ptr->xtra3-1));
163 else if (o_ptr->xtra3 < 65)
165 (*f2) |= (0x00000001 << (o_ptr->xtra3-33));
167 else if (o_ptr->xtra3 < 97)
169 (*f3) |= (0x00000001 << (o_ptr->xtra3-65));
171 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ACID)
173 (*f2) |= TR2_RES_ACID;
175 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ELEC)
177 (*f2) |= TR2_RES_ELEC;
179 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_FIRE)
181 (*f2) |= TR2_RES_FIRE;
183 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_COLD)
185 (*f2) |= TR2_RES_COLD;
187 else if (o_ptr->xtra3 == ESSENCE_SH_FIRE)
189 (*f2) |= TR2_RES_FIRE;
190 (*f3) |= TR3_SH_FIRE;
192 else if (o_ptr->xtra3 == ESSENCE_SH_ELEC)
194 (*f2) |= TR2_RES_ELEC;
195 (*f3) |= TR3_SH_ELEC;
197 else if (o_ptr->xtra3 == ESSENCE_SH_COLD)
199 (*f2) |= TR2_RES_COLD;
200 (*f3) |= TR3_SH_COLD;
202 else if (o_ptr->xtra3 == ESSENCE_RESISTANCE)
204 (*f2) |= (TR2_RES_ACID | TR2_RES_ELEC | TR2_RES_FIRE | TR2_RES_COLD);;
212 * Obtain the "flags" for an item which are known to the player
214 void object_flags_known(object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3)
218 object_kind *k_ptr = &k_info[o_ptr->k_idx];
221 (*f1) = (*f2) = (*f3) = 0L;
223 if (!object_aware_p(o_ptr)) return;
226 (*f1) = k_ptr->flags1;
227 (*f2) = k_ptr->flags2;
228 (*f3) = k_ptr->flags3;
230 /* Must be identified */
231 if (!object_known_p(o_ptr)) return;
233 /* Ego-item (known basic flags) */
236 ego_item_type *e_ptr = &e_info[o_ptr->name2];
238 (*f1) |= e_ptr->flags1;
239 (*f2) |= e_ptr->flags2;
240 (*f3) |= e_ptr->flags3;
242 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
244 (*f3) &= ~(TR3_SH_FIRE);
246 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
248 (*f1) &= ~(TR1_INFRA);
250 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
252 (*f2) &= ~(TR2_RES_BLIND);
253 (*f3) &= ~(TR3_SEE_INVIS);
258 #ifdef SPOIL_ARTIFACTS
259 /* Full knowledge for some artifacts */
260 if (artifact_p(o_ptr) || o_ptr->art_name) spoil = TRUE;
261 #endif /* SPOIL_ARTIFACTS */
263 #ifdef SPOIL_EGO_ITEMS
264 /* Full knowledge for some ego-items */
265 if (ego_item_p(o_ptr)) spoil = TRUE;
266 #endif /* SPOIL_EGO_ITEMS */
268 /* Need full knowledge or spoilers */
269 if (spoil || (o_ptr->ident & IDENT_MENTAL))
274 artifact_type *a_ptr = &a_info[o_ptr->name1];
276 (*f1) = a_ptr->flags1;
277 (*f2) = a_ptr->flags2;
278 (*f3) = a_ptr->flags3;
280 if (!cursed_p(o_ptr))
282 (*f3) &= ~(TR3_HEAVY_CURSE | TR3_CURSED);
286 /* Random artifact ! */
287 if (o_ptr->art_flags1 || o_ptr->art_flags2 || o_ptr->art_flags3)
289 (*f1) |= o_ptr->art_flags1;
290 (*f2) |= o_ptr->art_flags2;
291 (*f3) |= o_ptr->art_flags3;
295 if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
297 if (o_ptr->xtra3 < 33)
299 (*f1) |= (0x00000001 << (o_ptr->xtra3-1));
301 else if (o_ptr->xtra3 < 65)
303 (*f2) |= (0x00000001 << (o_ptr->xtra3-33));
305 else if (o_ptr->xtra3 < 97)
307 (*f3) |= (0x00000001 << (o_ptr->xtra3-65));
309 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ACID)
311 (*f2) |= TR2_RES_ACID;
313 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ELEC)
315 (*f2) |= TR2_RES_ELEC;
317 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_FIRE)
319 (*f2) |= TR2_RES_FIRE;
321 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_COLD)
323 (*f2) |= TR2_RES_COLD;
325 else if (o_ptr->xtra3 == ESSENCE_SH_FIRE)
327 (*f2) |= TR2_RES_FIRE;
328 (*f3) |= TR3_SH_FIRE;
330 else if (o_ptr->xtra3 == ESSENCE_SH_ELEC)
332 (*f2) |= TR2_RES_ELEC;
333 (*f3) |= TR3_SH_ELEC;
335 else if (o_ptr->xtra3 == ESSENCE_SH_COLD)
337 (*f2) |= TR2_RES_COLD;
338 (*f3) |= TR3_SH_COLD;
340 else if (o_ptr->xtra3 == ESSENCE_RESISTANCE)
342 (*f2) |= (TR2_RES_ACID | TR2_RES_ELEC | TR2_RES_FIRE | TR2_RES_COLD);;
348 if (o_ptr->art_flags3 & TR3_CURSED)
349 (*f3) |= (TR3_CURSED);
350 if (o_ptr->art_flags3 & TR3_HEAVY_CURSE)
351 (*f3) |= (TR3_HEAVY_CURSE);
357 * Hack -- describe an item currently in a store's inventory
358 * This allows an item to *look* like the player is "aware" of it
360 void object_desc_store(char *buf, object_type *o_ptr, int pref, int mode)
362 /* Save the "aware" flag */
363 bool hack_aware = object_aware_p(o_ptr);
365 /* Save the "known" flag */
366 bool hack_known = (o_ptr->ident & (IDENT_KNOWN)) ? TRUE : FALSE;
369 /* Set the "known" flag */
370 o_ptr->ident |= (IDENT_KNOWN);
372 /* Force "aware" for description */
373 k_info[o_ptr->k_idx].aware = TRUE;
376 /* Describe the object */
377 object_desc(buf, o_ptr, pref, mode);
380 /* Restore "aware" flag */
381 k_info[o_ptr->k_idx].aware = hack_aware;
383 /* Clear the known flag */
384 if (!hack_known) o_ptr->ident &= ~(IDENT_KNOWN);
391 * Determine the "Activation" (if any) for an artifact
392 * Return a string, or NULL for "no activation"
394 cptr item_activation(object_type *o_ptr)
398 /* Extract the flags */
399 object_flags(o_ptr, &f1, &f2, &f3);
401 /* Require activation ability */
403 if (!(f3 & (TR3_ACTIVATE))) return ("¤Ê¤·");
405 if (!(f3 & (TR3_ACTIVATE))) return ("nothing");
411 * We need to deduce somehow that it is a random artifact -- one
412 * problem: It could be a random artifact which has NOT YET received
413 * a name. Thus we eliminate other possibilities instead of checking
417 if (!(o_ptr->name1) &&
422 switch (o_ptr->xtra2)
427 return "ÂÀÍÛ¸÷Àþ : 10 ¥¿¡¼¥óËè";
429 return "beam of sunlight every 10 turns";
436 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
438 return "magic missile (2d6) every 2 turns";
445 return "°½±À (12), Ⱦ·Â 3 , 4+d4 ¥¿¡¼¥óËè";
447 return "stinking cloud (12), rad. 3, every 4+d4 turns";
454 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
456 return "lightning bolt (4d8) every 5+d5 turns";
463 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
465 return "acid bolt (5d8) every 6+d6 turns";
472 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
474 return "frost bolt (6d8) every 7+d7 turns";
481 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
483 return "fire bolt (9d8) every 8+d8 turns";
490 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (48) : 400 ¥¿¡¼¥óËè";
492 return "ball of cold (48) every 400 turns";
499 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (72) : 400 ¥¿¡¼¥óËè";
501 return "ball of fire (72) every 400 turns";
508 return "¥Ò¥Ã¥È¥Ý¥¤¥ó¥ÈµÛ¼ý (100) : 100+d100 ¥¿¡¼¥óËè";
510 return "drain life (100) every 100+d100 turns";
517 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 300 ¥¿¡¼¥óËè";
519 return "ball of cold (100) every 300 turns";
526 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 500 ¥¿¡¼¥óËè";
528 return "ball of lightning (100) every 500 turns";
535 return "¥Ò¥Ã¥È¥Ý¥¤¥ó¥ÈµÛ¼ý(120) : 400 ¥¿¡¼¥óËè";
537 return "drain life (120) every 400 turns";
544 return "µÛ·ì¥É¥ì¥¤¥ó (3*50) : 400 ¥¿¡¼¥óËè";
546 return "vampiric drain (3*50) every 400 turns";
553 return "Ìð (150) : 90+d90 ¥¿¡¼¥óËè";
555 return "arrows (150) every 90+d90 turns";
562 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (120) : 225+d225 ¥¿¡¼¥óËè";
564 return "fire ball (120) every 225+d225 turns";
571 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (200) : 325+d325 ¥¿¡¼¥óËè";
573 return "ball of cold (200) every 325+d325 turns";
580 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (250) : 425+d425 ¥¿¡¼¥óËè";
582 return "ball of lightning (250) every 425+d425 turns";
589 return "¥«¥Þ¥¤¥¿¥Á : 250 ¥¿¡¼¥óËè";
591 return "whirlwind attack every 250 turns";
598 return "µÛ·ì¥É¥ì¥¤¥ó (3*100) : 400 ¥¿¡¼¥óËè";
600 return "vampiric drain (3*100) every 400 turns";
607 return "call chaos : 350 ¥¿¡¼¥óËè"; /*nuke me*/
609 return "call chaos every 350 turns";
616 return "¥í¥±¥Ã¥È (120+level) : 400 ¥¿¡¼¥óËè";
618 return "launch rocket (120+level) every 400 turns";
625 return "¼Ù°Â໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
627 return "dispel evil (level*5) every 300+d300 turns";
634 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300) : 500 ¥¿¡¼¥óËè";
636 return "elemental breath (300) every 500 turns";
643 return "Á±ÎÉÂ໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
645 return "dispel good (level*5) every 300+d300 turns";
652 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
654 return "confuse monster every 15 turns";
661 return "¼þ°Ï¤Î¥â¥ó¥¹¥¿¡¼¤ò̲¤é¤»¤ë : 55 ¥¿¡¼¥óËè";
663 return "sleep nearby monsters every 55 turns";
670 return "ÃÏ¿Ì (Ⱦ·Â 10) : 50 ¥¿¡¼¥óËè";
672 return "earthquake (rad 10) every 50 turns";
679 return "¶²¹² : 3 * (level+10) ¥¿¡¼¥óËè";
681 return "terror every 3 * (level+10) turns";
688 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
690 return "teleport away every 200 turns";
694 case ACT_BANISH_EVIL:
697 return "¼Ù°¾ÃÌÇ : 250+d250 ¥¿¡¼¥óËè";
699 return "banish evil every 250+d250 turns";
706 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
708 return "genocide every 500 turns";
715 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
717 return "mass genocide every 1000 turns";
721 case ACT_CHARM_ANIMAL:
724 return "ưʪ̥λ : 300 ¥¿¡¼¥óËè";
726 return "charm animal every 300 turns";
730 case ACT_CHARM_UNDEAD:
733 return "ÉԻཾ° : 333 ¥¿¡¼¥óËè";
735 return "enslave undead every 333 turns";
739 case ACT_CHARM_OTHER:
742 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 400 ¥¿¡¼¥óËè";
744 return "charm monster every 400 turns";
748 case ACT_CHARM_ANIMALS:
751 return "ưʪͧÏ : 500 ¥¿¡¼¥óËè";
753 return "animal friendship every 500 turns";
757 case ACT_CHARM_OTHERS:
760 return "¼þÊÕ̥λ : 750 ¥¿¡¼¥óËè";
762 return "mass charm every 750 turns";
766 case ACT_SUMMON_ANIMAL:
769 return "ưʪ¾¤´ : 200+d300 ¥¿¡¼¥óËè";
771 return "summon animal every 200+d300 turns";
775 case ACT_SUMMON_PHANTOM:
778 return "»È¤¤Î´ : 200+d200 ¥¿¡¼¥óËè";
780 return "summon phantasmal servant every 200+d200 turns";
784 case ACT_SUMMON_ELEMENTAL:
787 return "¥¨¥ì¥á¥ó¥¿¥ë¾¤´ : 750 ¥¿¡¼¥óËè";
789 return "summon elemental every 750 turns";
793 case ACT_SUMMON_DEMON:
796 return "°Ë⾤´ : 666+d333 ¥¿¡¼¥óËè";
798 return "summon demon every 666+d333 turns";
802 case ACT_SUMMON_UNDEAD:
805 return "ÉԻྤ´ : 666+d333 ¥¿¡¼¥óËè";
807 return "summon undead every 666+d333 turns";
814 return "ͦµ¤²óÉü & 30 hp ²óÉü : 10 ¥¿¡¼¥óËè";
816 return "remove fear & heal 30 hp every 10 turns";
823 return "4d8 hp & ½ý²óÉü : 3+d3 ¥¿¡¼¥óËè";
825 return "heal 4d8 & wounds every 3+d3 turns";
829 case ACT_CURE_POISON:
832 return "ͦµ¤²óÉü/ÆǾä· : 5 ¥¿¡¼¥óËè";
834 return "remove fear and cure poison every 5 turns";
841 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
843 return "restore life levels every 450 turns";
850 return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃͲóÉü : 750 ¥¿¡¼¥óËè";
852 return "restore stats and life levels every 750 turns";
859 return "700 hp ²óÉü : 250 ¥¿¡¼¥óËè";
861 return "heal 700 hit points every 250 turns";
868 return "1000 hp ²óÉü : 888 ¥¿¡¼¥óËè";
870 return "heal 1000 hit points every 888 turns";
877 return "°ì»þŪ¤Ê ESP (´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
879 return "temporary ESP (dur 25+d30) every 200 turns";
886 return "»Îµ¤¹âÍȤȽËÊ¡ (´ü´Ö 50+d50) : 100+d100 ¥¿¡¼¥óËè";
888 return "heroism and blessed (dur 50+d50) every 100+d100 turns";
895 return "Âмٰ·ë³¦ (´ü´Ö level*3 + d25) : 225+d225 ¥¿¡¼¥óËè";
897 return "protect evil (dur level*3 + d25) every 225+d225 turns";
904 return "±êÎä»ÀÅÅÆǤؤÎÂÑÀ (´ü´Ö 40+d40) : 200 ¥¿¡¼¥óËè";
906 return "resist elements (dur 40+d40) every 200 turns";
913 return "²Ã® (´ü´Ö 20+d20) : 250 ¥¿¡¼¥óËè";
915 return "speed (dur 20+d20) every 250 turns";
922 return "²Ã® (´ü´Ö 75+d75) : 200+d200 ¥¿¡¼¥óËè";
924 return "speed (dur 75+d75) every 200+d200 turns";
931 return "¥ì¥¤¥¹²½ (level/2 + d(level/2)) : 1000 ¥¿¡¼¥óËè";
933 return "wraith form (level/2 + d(level/2)) every 1000 turns";
940 return "̵Ũ (´ü´Ö 8+d8) : 1000 ¥¿¡¼¥óËè";
942 return "invulnerability (dur 8+d8) every 1000 turns";
949 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) : 10+d10 ¥¿¡¼¥óËè";
951 return "light area (dam 2d15) every 10+d10 turns";
958 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) & ¼þÊÕ¥Þ¥Ã¥× : 50+d50 ¥¿¡¼¥óËè";
960 return "light (dam 2d15) & map area every 50+d50 turns";
967 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
969 return "detection every 55+d55 turns";
973 case ACT_DETECT_XTRA:
976 return "Á´´¶ÃΡ¢Ãµº÷¡¢*´ÕÄê* : 1000 ¥¿¡¼¥óËè";
978 return "detection, probing and identify true every 1000 turns";
985 return "*´ÕÄê* : 750 ¥¿¡¼¥óËè";
987 return "identify true every 750 turns";
994 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
996 return "identify spell every 10 turns";
1000 case ACT_RUNE_EXPLO:
1003 return "Çúȯ¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
1005 return "explosive rune every 200 turns";
1012 return "¼é¤ê¤Î¥ë¡¼¥ó : 400 ¥¿¡¼¥óËè";
1014 return "rune of protection every 400 turns";
1021 return "¶õÊ¢½¼Â : 200 ¥¿¡¼¥óËè";
1023 return "satisfy hunger every 200 turns";
1030 return "¥É¥¢Ç˲õ : 10 ¥¿¡¼¥óËè";
1032 return "destroy doors every 10 turns";
1039 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
1041 return "stone to mud every 5 turns";
1048 return "ºÆ½¼Å¶ : 70 ¥¿¡¼¥óËè";
1050 return "recharging every 70 turns";
1057 return "Ï£¶â½Ñ : 500 ¥¿¡¼¥óËè";
1059 return "alchemy every 500 turns";
1066 return "¼¡¸µ¤ÎÈâ : 100 ¥¿¡¼¥óËè";
1068 return "dimension door every 100 turns";
1075 return "¥Æ¥ì¥Ý¡¼¥È (range 100) : 45 ¥¿¡¼¥óËè";
1077 return "teleport (range 100) every 45 turns";
1084 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1086 return "word of recall every 200 turns";
1095 return "something undefined";
1102 /* Some artifacts can be activated */
1103 switch (o_ptr->name1)
1108 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1110 return "fire bolt (9d8) every 8+d8 turns";
1117 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1119 return "frost bolt (6d8) every 7+d7 turns";
1126 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1128 return "lightning bolt (4d8) every 6+d6 turns";
1135 return "°½±À(12) : 4+d4 ¥¿¡¼¥óËè";
1137 return "stinking cloud (12) every 4+d4 turns";
1144 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(48) : 5+d5 ¥¿¡¼¥óËè";
1146 return "frost ball (48) every 5+d5 turns";
1153 return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
1155 return "remove fear and cure poison every 5 turns";
1162 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(100) : 200 ¥¿¡¼¥óËè";
1164 return "frost ball (100) every 200 turns";
1171 return "¶Ç¤Î»ÕÃľ¤´ : 500+d500 ¥¿¡¼¥óËè";
1173 return "summon the Legion of the Dawn every 500+d500 turns";
1180 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 400 ¥¿¡¼¥óËè";
1182 return "fire ball (72) every 400 turns";
1189 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 100 ¥¿¡¼¥óËè";
1191 return "large fire ball (72) every 100 turns";
1198 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(120) : 15 ¥¿¡¼¥óËè";
1200 return "large fire ball (120) every 15 turns";
1207 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 200 ¥¿¡¼¥óËè";
1209 return "haste self (20+d20 turns) every 200 turns";
1216 return "À¸Ì¿Îϵۼý(120) : 400 ¥¿¡¼¥óËè";
1218 return "drain life (120) every 400 turns";
1225 return "À¸Ì¿Îϵۼý(90) : 70 ¥¿¡¼¥óËè";
1227 return "drain life (90) every 70 turns";
1234 return "¥É¥¢/¥È¥é¥Ã¥×Ê´ºÕ : 10 ¥¿¡¼¥óËè";
1236 return "door and trap destruction every 10 turns";
1244 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1246 return "word of recall every 200 turns";
1253 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1255 return "haste self (20+d20 turns) every 100+d100 turns";
1262 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
1264 return "identify every 10 turns";
1271 return "õº÷¡¢Á´´¶ÃΡ¢Á´´ÕÄê : 1000 ¥¿¡¼¥óËè";
1273 return "probing, detection and full id every 1000 turns";
1280 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
1282 return "mass genocide every 1000 turns";
1289 return "½ý¤Î¼£Ìþ(4d7) : 3+d3 ¥¿¡¼¥óËè";
1291 return "cure wounds (4d7) every 3+d3 turns";
1298 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
1300 return "fire branding of bolts every 999 turns";
1307 return "¥Õ¥¡¥¤¥¢¡ª : 15 ¥¿¡¼¥óËè";
1309 return "fire! every 15 turns";
1314 case ART_WEREWINDLE:
1317 return "ƨÁö : 35 ¥¿¡¼¥óËè";
1319 return "a getaway every 35 turns";
1326 return "¥Æ¥ì¥Ý¡¼¥È : 25 ¥¿¡¼¥óËè";
1328 return "a teleport every 25 turns";
1335 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1337 return "lightning ball (100) every 200 turns";
1344 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1346 return "Frost ball (100) every 200 turns";
1353 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
1355 return "stone to mud every 5 turns";
1362 return "´äÀÐÍϲò : 2 ¥¿¡¼¥óËè";
1364 return "stone to mud every 2 turns";
1368 case ART_SOULKEEPER:
1371 return "ÂÎÎϲóÉü(1000) : 888 ¥¿¡¼¥óËè";
1373 return "heal (1000) every 888 turns";
1380 return ("²óÉü (777)¡¢Ìþ¤·¡¢»Îµ¤¹âÍÈ : 300 ¥¿¡¼¥óËè");
1382 return ("heal (777), curing and heroism every 300 turns");
1389 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
1391 return "genocide every 500 turns";
1398 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
1400 return "restore life levels every 450 turns";
1407 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
1409 return "teleport away every 150 turns";
1417 return "Á´ÂÑÀ(20+d20¥¿¡¼¥ó) : 111 ¥¿¡¼¥óËè";
1419 return "resistance (20+d20 turns) every 111 turns";
1423 case ART_HOLCOLLETH:
1426 return "¥¹¥ê¡¼¥×(II) : 55 ¥¿¡¼¥óËè";
1428 return "Sleep II every 55 turns";
1435 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
1437 return "recharge item I every 70 turns";
1444 return "¥Æ¥ì¥Ý¡¼¥È : 45 ¥¿¡¼¥óËè";
1446 return "teleport every 45 turns";
1453 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
1455 return "confuse monster every 15 turns";
1459 case ART_CAMMITHRIM:
1462 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1464 return "magic missile (2d6) every 2 turns";
1471 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1473 return "fire bolt (9d8) every 8+d8 turns";
1477 case ART_PAURNIMMEN:
1480 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1482 return "frost bolt (6d8) every 7+d7 turns";
1489 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1491 return "lightning bolt (4d8) every 5+d5 turns";
1498 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
1500 return "acid bolt (5d8) every 6+d6 turns";
1507 return "ËâË¡¤ÎÌð(150) : 90+d90 ¥¿¡¼¥óËè";
1509 return "a magical arrow (150) every 90+d90 turns";
1513 case ART_HOLHENNETH:
1516 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
1518 return "detection every 55+d55 turns";
1525 return "ÂÎÎϲóÉü(500) : 500 ¥¿¡¼¥óËè";
1527 return "heal (700) every 250 turns";
1534 return "¥¹¥¿¡¼¡¦¥Ü¡¼¥ë(150) : 1000 ¥¿¡¼¥óËè";
1536 return "star ball (150) every 1000 turns";
1540 case ART_BLADETURNER:
1543 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300), »Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢ÂÑÀ";
1545 return "breathe elements (300), hero, bless, and resistance";
1552 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1554 return "illumination every 10+d10 turns";
1561 return "ËâË¡¤ÎÃϿޤȸ÷ : 50+d50 ¥¿¡¼¥óËè";
1563 return "magic mapping and light every 50+d50 turns";
1570 return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô";
1572 return "clairvoyance and recall, draining you";
1580 return "¼Ù°Â໶(x5) : 200+d200 ¥¿¡¼¥óËè";
1582 return "dispel evil (x5) every 200+d200 turns";
1589 return "¼Ù°Â໶(x5) : 100+d100 ¥¿¡¼¥óËè";
1591 return "dispel evil (x5) every 100+d100 turns";
1599 return "Âмٰ·ë³¦ : 225+d225 ¥¿¡¼¥óËè";
1601 return "protection from evil every 225+d225 turns";
1608 return "Ã⩹¶·â(100) : 100+d100 ¥¿¡¼¥óËè";
1610 return "a strangling attack (100) every 100+d100 turns";
1617 return "¥¹¥Ô¡¼¥É(75+d75¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1619 return "haste self (75+d75 turns) every 150+d150 turns";
1626 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(300) : 225+d225 ¥¿¡¼¥óËè";
1628 return "large fire ball (300) every 225+d225 turns";
1635 return "µðÂ祢¥¤¥¹¡¦¥Ü¡¼¥ë(400) : 325+d325 ¥¿¡¼¥óËè";
1637 return "large frost ball (400) every 325+d325 turns";
1645 return "µðÂ祵¥ó¥À¡¼¡¦¥Ü¡¼¥ë(500) : 425+d425 ¥¿¡¼¥óËè";
1647 return "large lightning ball (500) every 425+d425 turns";
1655 return "¿®¤¸Æñ¤¤¤³¤È : 450+d450 ¥¿¡¼¥óËè";
1657 return "bizarre things every 450+d450 turns";
1661 case ART_DOR: case ART_TERROR: case ART_STONEMASK:
1664 return "Á´Êý¸þ¤Ø¤Î¶²Éݤθ÷Àþ";
1666 return "rays of fear in every direction";
1673 return "¤³¤Î³¬¤Ë¤¤¤ë¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òɽ¼¨ : 200¥¿¡¼¥óËè";
1675 return "list of the uniques on the level every 200 turns";
1678 case ART_STONE_LORE:
1681 return "´í¸±¤òȼ¤¦´ÕÄê : ¤¤¤Ä¤Ç¤â";
1683 return "perilous identify every turn";
1689 return "³²Ãî¤Î¶î½ü : 55+d55¥¿¡¼¥óËè";
1691 return "dispel small life every 55+d55 turns";
1697 return "¥â¥ó¥¹¥¿¡¼¶²¹² : 40+d40¥¿¡¼¥óËè";
1699 return "frighten monsters every 40+d40 turns";
1705 return "Âмٰ·ë³¦ : 200+d200 ¥¿¡¼¥óËè";
1707 return "protection from evil every 200 + d200 turns";
1713 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
1715 return "a mana bolt (120) every 120+d120 turns";
1721 return "»Îµ¤¹âÍÈ, ¥¹¥Ô¡¼¥É(50+d50¥¿¡¼¥ó) : 100+d200 ¥¿¡¼¥óËè";
1723 return "hero and +10 to speed (50) every 100+200d turns";
1729 return "âÁ¤·¤¤¸÷ : 250 ¥¿¡¼¥óËè";
1731 return "blinding light every 250 turns";
1737 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
1739 return "Recharge item every 200 turns";
1745 return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë¡£";
1747 return "Increase STR (destroyed 50%)";
1753 return "ËâÎϤÎÍò(400) : 250+d250¥¿¡¼¥óËè";
1755 return "a mana storm every 250+d250 turns";
1761 return "ʪÂΤò°ú¤´ó¤»¤ë(½ÅÎÌ25kg¤Þ¤Ç) : 25+d25¥¿¡¼¥óËè";
1763 return "a telekinesis (500 lb) every 25+d25 turns";
1769 return "¥Ï¥¦¥ó¥É¾¤´ : 300+d150¥¿¡¼¥óËè";
1771 return "summon hound every 300+d150 turns";
1777 return "µðÂ祹¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 200+d200 ¥¿¡¼¥óËè";
1779 return "large star ball (200) every 200+d200 turns";
1786 return "Îã¤Î¥¢¥ì : 150+d150 ¥¿¡¼¥óËè";
1788 return "reveal your identity every 150+d150 turns";
1795 return "Çï»ÒÌÚ¤òÂǤÁ¤Ê¤é¤¹ : ¤¤¤Ä¤Ç¤â";
1797 return "beat wooden clappers every turn";
1805 return "»Îµ¤¹âÍÈ : 30+d30¥¿¡¼¥óËè";
1807 return "heroism every 30+d30 turns";
1815 return "Ìþ¤· : 100¥¿¡¼¥óËè";
1817 return "curing every 100 turns";
1825 return "ưʪ̥λ : 200¥¿¡¼¥óËè";
1827 return "charm animal every 200 turns";
1834 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(12d8) : 50 ¥¿¡¼¥óËè";
1836 return "frost bolt (12d8) every 50 turns";
1843 return "°ÀÊѹ¹ : 3333 ¥¿¡¼¥óËè";
1845 return "change zokusei every 3333 turns";
1852 return "¥¦¥©¡¼¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 250 ¥¿¡¼¥óËè";
1854 return "water ball (200) every 250 turns";
1861 return "»Í¸ÔƧ¤ß : 100+d100¥¿¡¼¥óËè";
1863 return "shiko every 100+d100 turns";
1870 return "Î䵤¤ÎÂÑÀ : 40+d40¥¿¡¼¥óËè";
1872 return "resist cold every 40+d40 turns";
1879 return "Âý¤ÎÂç·²¾¤´ : 300+d150¥¿¡¼¥óËè";
1881 return "summon octopus every 300+d150 turns";
1887 return "°Å¹õ¤ÎÍò(250) : 150+d150 ¥¿¡¼¥óËè";
1889 return "darkness storm (250) every 150+d150 turns";
1896 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_TSURIZAO))
1899 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
1901 return "fishing : every time";
1906 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_ACID))
1909 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1911 return "resist acid every 50+d50 turns";
1915 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_ELEC))
1918 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1920 return "resist elec every 50+d50 turns";
1924 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_FIRE))
1927 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1929 return "resist fire every 50+d50 turns";
1933 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_COLD))
1936 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1938 return "resist cold every 50+d50 turns";
1942 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_EARTHQUAKE))
1945 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1947 return "earthquake every 100+d100 turns";
1951 if (o_ptr->name2 == EGO_TRUMP)
1954 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
1956 return "teleport every 50+d50 turns";
1961 if (o_ptr->name2 == EGO_LITE_ILLUMINATION)
1964 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1966 return "illumination every 10+d10 turns";
1970 else if (o_ptr->name2 == EGO_EARTHQUAKES)
1973 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1975 return "earthquake every 100+d100 turns";
1980 else if (o_ptr->name2 == EGO_JUMP)
1983 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1985 return "blink every 10+d10 turns";
1990 if (o_ptr->tval == TV_RING)
1994 switch (o_ptr->name2)
1998 return "»Îµ¤¹âÍÈ : 100+d100¥¿¡¼¥óËè";
2000 return "heroism every 100+d100 turns";
2002 case EGO_RING_MAGIC_MIS:
2004 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
2006 return "magic missile (2d6) every 2 turns";
2008 case EGO_RING_FIRE_BOLT:
2010 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
2012 return "fire bolt (9d8) every 8+d8 turns";
2014 case EGO_RING_COLD_BOLT:
2016 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
2018 return "frost bolt (6d8) every 7+d7 turns";
2020 case EGO_RING_ELEC_BOLT:
2022 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
2024 return "lightning bolt (4d8) every 5+d5 turns";
2026 case EGO_RING_ACID_BOLT:
2028 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
2030 return "acid bolt (5d8) every 6+d6 turns";
2032 case EGO_RING_MANA_BOLT:
2034 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
2036 return "a mana bolt (120) every 120+d120 turns";
2038 case EGO_RING_FIRE_BALL:
2040 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2042 return "fire ball (100) every 80+d80 turns";
2044 case EGO_RING_COLD_BALL:
2046 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2048 return "cold ball (100) every 80+d80 turns";
2050 case EGO_RING_ELEC_BALL:
2052 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2054 return "elec ball (100) every 80+d80 turns";
2056 case EGO_RING_ACID_BALL:
2058 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2060 return "acid ball (100) every 80+d80 turns";
2062 case EGO_RING_MANA_BALL:
2064 return "ËâÎϤÎÍò (250) : 300 ¥¿¡¼¥óËè";
2066 return "mana storm (250) every 300 turns";
2068 case EGO_RING_DRAGON_F:
2069 if (o_ptr->sval == SV_RING_FLAMES)
2071 return "²Ð±ê¤Î¥Ö¥ì¥¹¤È²Ð¤Ø¤ÎÂÑÀ";
2073 return "breath of fire and resist fire";
2077 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2079 return "fire breath (200) every 250 turns";
2081 case EGO_RING_DRAGON_C:
2082 if (o_ptr->sval == SV_RING_ICE)
2084 return "Î䵤¤Î¥Ö¥ì¥¹¤ÈÎ䵤¤Ø¤ÎÂÑÀ";
2086 return "breath of cold and resist cold";
2090 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2092 return "cold breath (200) every 250 turns";
2094 case EGO_RING_M_DETECT:
2096 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃÎ : 150 ¥¿¡¼¥óËè";
2098 return "detect all monsters every 150 turns";
2100 case EGO_RING_D_SPEED:
2102 return "¥¹¥Ô¡¼¥É(15+d30¥¿¡¼¥ó) : 100 ¥¿¡¼¥óËè";
2104 return "haste self (15+d30 turns) every 100 turns";
2106 case EGO_RING_BERSERKER:
2108 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
2110 return "berserk (25+d25 turns) every 75+d75 turns";
2112 case EGO_RING_TELE_AWAY:
2114 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
2116 return "teleport away every 150 turns";
2120 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ";
2122 return "hero, bless, and ultimate resistance";
2126 switch (o_ptr->sval)
2128 case SV_RING_FLAMES:
2130 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤È²Ð¤Ø¤ÎÂÑÀ";
2132 return "ball of fire and resist fire";
2137 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë¤ÈÎ䵤¤Ø¤ÎÂÑÀ";
2139 return "ball of cold and resist cold";
2144 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤È»À¤Ø¤ÎÂÑÀ";
2146 return "ball of acid and resist acid";
2151 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤ÈÅÅ·â¤Ø¤ÎÂÑÀ";
2153 return "ball of elec and resist elec";
2161 if (o_ptr->tval == TV_AMULET)
2165 switch (o_ptr->name2)
2169 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
2171 return "identify every 10 turns";
2176 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
2178 return "charm monster every 200 turns";
2183 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
2185 return "blink every 10+d10 turns";
2188 case EGO_AMU_TELEPORT:
2190 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
2192 return "teleport every 50+d50 turns";
2195 case EGO_AMU_D_DOOR:
2197 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
2199 return "dimension door every 200 turns";
2202 case EGO_AMU_RES_FIRE_:
2204 return "²Ð±ê¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2206 return "resist fire every 50+d50 turns";
2209 case EGO_AMU_RES_COLD_:
2211 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2213 return "resist cold every 50+d50 turns";
2216 case EGO_AMU_RES_ELEC_:
2218 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2220 return "resist elec every 50+d50 turns";
2223 case EGO_AMU_RES_ACID_:
2225 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2227 return "resist acid every 50+d50 turns";
2230 case EGO_AMU_DETECTION:
2232 return "Á´´¶ÃÎ : 55+d55¥¿¡¼¥óËè";
2234 return "detect all floor every 55+d55 turns";
2241 if (o_ptr->tval == TV_WHISTLE)
2244 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
2246 return "call pet every 100+d100 turns";
2250 if (o_ptr->tval == TV_CAPTURE)
2253 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
2255 return "captures or releases a monster.";
2259 /* Require dragon scale mail */
2261 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
2263 if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
2267 /* Branch on the sub-type */
2268 switch (o_ptr->sval)
2270 case SV_DRAGON_BLUE:
2273 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
2275 return "breathe lightning (100) every 150+d150 turns";
2279 case SV_DRAGON_WHITE:
2282 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
2284 return "breathe frost (110) every 150+d150 turns";
2288 case SV_DRAGON_BLACK:
2291 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
2293 return "breathe acid (130) every 150+d150 turns";
2297 case SV_DRAGON_GREEN:
2300 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
2302 return "breathe poison gas (150) every 180+d180 turns";
2309 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2311 return "breathe fire (200) every 200+d200 turns";
2315 case SV_DRAGON_MULTIHUED:
2318 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
2320 return "breathe multi-hued (250) every 200+d200 turns";
2324 case SV_DRAGON_BRONZE:
2327 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
2329 return "breathe confusion (120) every 180+d180 turns";
2333 case SV_DRAGON_GOLD:
2336 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
2338 return "breathe sound (130) every 180+d180 turns";
2342 case SV_DRAGON_CHAOS:
2345 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
2347 return "breathe chaos/disenchant (220) every 200+d200 turns";
2354 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
2356 return "breathe sound/shards (230) every 200+d200 turns";
2360 case SV_DRAGON_BALANCE:
2363 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
2365 return "breathe balance (250) every 200+d200 turns";
2369 case SV_DRAGON_SHINING:
2372 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2374 return "breathe light/darkness (200) every 200+d200 turns";
2378 case SV_DRAGON_POWER:
2381 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
2383 return "breathe the elements (300) every 200+d200 turns";
2393 return "breathe air";
2400 * Describe a "fully identified" item
2402 bool identify_fully_aux(object_type *o_ptr)
2410 char o_name[MAX_NLEN];
2412 /* Extract the flags */
2413 object_flags(o_ptr, &f1, &f2, &f3);
2419 roff_to_buf( a_text + a_info[ o_ptr->name1 ].text ,77-15,temp);
2420 for(j=0;temp[j];j+=1+strlen(&temp[j]))
2421 { info[i]=&temp[j];i++;}
2424 /* Mega-Hack -- describe activation */
2425 if (f3 & (TR3_ACTIVATE))
2428 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
2430 info[i++] = "It can be activated for...";
2433 info[i++] = item_activation(o_ptr);
2435 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
2437 info[i++] = "...if it is being worn.";
2442 /* Figurines, a hack */
2443 if (o_ptr->tval == TV_FIGURINE)
2446 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
2448 info[i++] = "It will transform into a pet when thrown.";
2453 /* Figurines, a hack */
2454 if (o_ptr->name1 == ART_STONEMASK)
2457 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
2459 info[i++] = "It makes you turn into a vampire permanently.";
2464 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
2467 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
2469 info[i++] = "It will attempts to kill a monster instantly.";
2474 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
2477 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
2479 info[i++] = "It strikes yourself sometimes.";
2483 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
2485 info[i++] = "It will always penetrates invulnerability barrier.";
2489 if (o_ptr->name2 == EGO_2WEAPON)
2492 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
2494 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
2499 if (o_ptr->name2 == EGO_RING_WIZARD)
2502 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
2504 info[i++] = "It affects your ability to use magic devices.";
2508 if (o_ptr->name2 == EGO_AMU_FOOL)
2511 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
2513 info[i++] = "It prevents you from using magic items.";
2517 if (o_ptr->name2 == EGO_RING_THROW)
2520 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2522 info[i++] = "It provides great strength when you throw an item.";
2526 if (o_ptr->name2 == EGO_AMU_NAIVETY)
2529 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
2531 info[i++] = "It decreases your magic resistance.";
2535 if (o_ptr->tval == TV_STATUE)
2537 monster_race *r_ptr = &r_info[o_ptr->pval];
2539 if (o_ptr->pval == MON_BULLGATES)
2541 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
2543 info[i++] = "It is shameful.";
2545 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
2547 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
2549 info[i++] = "It is fearful.";
2553 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
2555 info[i++] = "It is cheerful.";
2559 /* Hack -- describe lite's */
2560 if (o_ptr->tval == TV_LITE)
2562 if (o_ptr->name2 == EGO_LITE_DARKNESS)
2565 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
2567 info[i++] = "It provides no light..";
2570 else if (artifact_p(o_ptr))
2573 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2575 info[i++] = "It provides light (radius 3) forever.";
2579 else if (o_ptr->name2 == EGO_LITE_SHINE)
2581 if (o_ptr->sval == SV_LITE_FEANOR)
2584 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2586 info[i++] = "It provides light (radius 3) forever.";
2590 else if (o_ptr->sval == SV_LITE_LANTERN)
2593 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2595 info[i++] = "It provides light (radius 3) when fueled.";
2602 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2604 info[i++] = "It provides light (radius 2) when fueled.";
2611 if (o_ptr->sval == SV_LITE_FEANOR)
2614 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2616 info[i++] = "It provides light (radius 2) forever.";
2620 else if (o_ptr->sval == SV_LITE_LANTERN)
2623 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2625 info[i++] = "It provides light (radius 2) when fueled.";
2632 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
2634 info[i++] = "It provides light (radius 1) when fueled.";
2639 if (o_ptr->name2 == EGO_LITE_LONG)
2642 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
2644 info[i++] = "It provides light for much longer time.";
2650 /* And then describe it fully */
2652 if (f2 & (TR2_RIDING))
2654 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
2656 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
2658 info[i++] = "It is made for riding.";
2662 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
2664 info[i++] = "It is suitable for riding.";
2671 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2673 info[i++] = "It affects your strength.";
2680 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2682 info[i++] = "It affects your intelligence.";
2689 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2691 info[i++] = "It affects your wisdom.";
2698 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2700 info[i++] = "It affects your dexterity.";
2707 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2709 info[i++] = "It affects your constitution.";
2716 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2718 info[i++] = "It affects your charisma.";
2723 if (f1 & (TR1_MAGIC_MASTERY))
2726 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2728 info[i++] = "It affects your ability to use magic devices.";
2732 if (f1 & (TR1_STEALTH))
2735 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2737 info[i++] = "It affects your stealth.";
2741 if (f1 & (TR1_SEARCH))
2744 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2746 info[i++] = "It affects your searching.";
2750 if (f1 & (TR1_INFRA))
2753 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2755 info[i++] = "It affects your infravision.";
2759 if (f1 & (TR1_TUNNEL))
2762 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2764 info[i++] = "It affects your ability to tunnel.";
2768 if (f1 & (TR1_SPEED))
2771 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2773 info[i++] = "It affects your speed.";
2777 if (f1 & (TR1_BLOWS))
2780 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2782 info[i++] = "It affects your attack speed.";
2787 if (f1 & (TR1_BRAND_ACID))
2790 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2792 info[i++] = "It does extra damage from acid.";
2796 if (f1 & (TR1_BRAND_ELEC))
2799 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2801 info[i++] = "It does extra damage from electricity.";
2805 if (f1 & (TR1_BRAND_FIRE))
2808 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2810 info[i++] = "It does extra damage from fire.";
2814 if (f1 & (TR1_BRAND_COLD))
2817 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2819 info[i++] = "It does extra damage from frost.";
2824 if (f1 & (TR1_BRAND_POIS))
2827 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
2829 info[i++] = "It poisons your foes.";
2834 if (f1 & (TR1_CHAOTIC))
2837 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
2839 info[i++] = "It produces chaotic effects.";
2844 if (f1 & (TR1_VAMPIRIC))
2847 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
2849 info[i++] = "It drains life from your foes.";
2854 if (f1 & (TR1_IMPACT))
2857 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
2859 info[i++] = "It can cause earthquakes.";
2864 if (f1 & (TR1_VORPAL))
2867 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2869 info[i++] = "It is very sharp and can cut your foes.";
2874 if (f1 & (TR1_KILL_DRAGON))
2877 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2879 info[i++] = "It is a great bane of dragons.";
2883 else if (f1 & (TR1_SLAY_DRAGON))
2886 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2888 info[i++] = "It is especially deadly against dragons.";
2892 if (f1 & (TR1_SLAY_ORC))
2895 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2897 info[i++] = "It is especially deadly against orcs.";
2901 if (f1 & (TR1_SLAY_TROLL))
2904 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2906 info[i++] = "It is especially deadly against trolls.";
2910 if (f1 & (TR1_SLAY_GIANT))
2912 if (o_ptr->name1 == ART_HRUNTING)
2914 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2916 info[i++] = "It is a great bane of giants.";
2920 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2922 info[i++] = "It is especially deadly against giants.";
2926 if (f1 & (TR1_SLAY_DEMON))
2929 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2931 info[i++] = "It strikes at demons with holy wrath.";
2935 if (f1 & (TR1_SLAY_UNDEAD))
2938 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2940 info[i++] = "It strikes at undead with holy wrath.";
2944 if (f1 & (TR1_SLAY_EVIL))
2947 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
2949 info[i++] = "It fights against evil with holy fury.";
2953 if (f1 & (TR1_SLAY_ANIMAL))
2956 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2958 info[i++] = "It is especially deadly against natural creatures.";
2963 if (f1 & (TR1_FORCE_WEAPON))
2966 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
2968 info[i++] = "It powerfully strikes at a monster using your mana.";
2972 if (f3 & (TR3_DEC_MANA))
2975 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
2977 info[i++] = "It decreases your mana consumption.";
2981 if (f2 & (TR2_SUST_STR))
2984 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
2986 info[i++] = "It sustains your strength.";
2990 if (f2 & (TR2_SUST_INT))
2993 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
2995 info[i++] = "It sustains your intelligence.";
2999 if (f2 & (TR2_SUST_WIS))
3002 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
3004 info[i++] = "It sustains your wisdom.";
3008 if (f2 & (TR2_SUST_DEX))
3011 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
3013 info[i++] = "It sustains your dexterity.";
3017 if (f2 & (TR2_SUST_CON))
3020 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
3022 info[i++] = "It sustains your constitution.";
3026 if (f2 & (TR2_SUST_CHR))
3029 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
3031 info[i++] = "It sustains your charisma.";
3036 if (f2 & (TR2_IM_ACID))
3039 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3041 info[i++] = "It provides immunity to acid.";
3045 if (f2 & (TR2_IM_ELEC))
3048 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3050 info[i++] = "It provides immunity to electricity.";
3054 if (f2 & (TR2_IM_FIRE))
3057 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3059 info[i++] = "It provides immunity to fire.";
3063 if (f2 & (TR2_IM_COLD))
3066 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3068 info[i++] = "It provides immunity to cold.";
3073 if (f2 & (TR2_THROW))
3076 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3078 info[i++] = "It is perfectly balanced for throwing.";
3082 if (f2 & (TR2_FREE_ACT))
3085 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3087 info[i++] = "It provides immunity to paralysis.";
3091 if (f2 & (TR2_HOLD_LIFE))
3094 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
3096 info[i++] = "It provides resistance to life draining.";
3100 if (f2 & (TR2_RES_FEAR))
3103 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3105 info[i++] = "It makes you completely fearless.";
3109 if (f2 & (TR2_RES_ACID))
3112 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3114 info[i++] = "It provides resistance to acid.";
3118 if (f2 & (TR2_RES_ELEC))
3121 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3123 info[i++] = "It provides resistance to electricity.";
3127 if (f2 & (TR2_RES_FIRE))
3130 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3132 info[i++] = "It provides resistance to fire.";
3136 if (f2 & (TR2_RES_COLD))
3139 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3141 info[i++] = "It provides resistance to cold.";
3145 if (f2 & (TR2_RES_POIS))
3148 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3150 info[i++] = "It provides resistance to poison.";
3155 if (f2 & (TR2_RES_LITE))
3158 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3160 info[i++] = "It provides resistance to light.";
3164 if (f2 & (TR2_RES_DARK))
3167 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3169 info[i++] = "It provides resistance to dark.";
3174 if (f2 & (TR2_RES_BLIND))
3177 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3179 info[i++] = "It provides resistance to blindness.";
3183 if (f2 & (TR2_RES_CONF))
3186 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3188 info[i++] = "It provides resistance to confusion.";
3192 if (f2 & (TR2_RES_SOUND))
3195 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3197 info[i++] = "It provides resistance to sound.";
3201 if (f2 & (TR2_RES_SHARDS))
3204 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3206 info[i++] = "It provides resistance to shards.";
3211 if (f2 & (TR2_RES_NETHER))
3214 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3216 info[i++] = "It provides resistance to nether.";
3220 if (f2 & (TR2_RES_NEXUS))
3223 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3225 info[i++] = "It provides resistance to nexus.";
3229 if (f2 & (TR2_RES_CHAOS))
3232 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3234 info[i++] = "It provides resistance to chaos.";
3238 if (f2 & (TR2_RES_DISEN))
3241 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3243 info[i++] = "It provides resistance to disenchantment.";
3248 if (f3 & (TR3_FEATHER))
3251 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3253 info[i++] = "It allows you to levitate.";
3257 if (f3 & (TR3_LITE))
3259 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
3261 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë¡£";
3263 info[i++] = "It decreases radius of your light source.";
3267 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
3269 info[i++] = "It provides permanent light.";
3273 if (f3 & (TR3_SEE_INVIS))
3276 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3278 info[i++] = "It allows you to see invisible monsters.";
3282 if (f3 & (TR3_TELEPATHY))
3285 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
3287 info[i++] = "It gives telepathic powers.";
3291 if (f3 & (TR3_SLOW_DIGEST))
3294 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
3296 info[i++] = "It slows your metabolism.";
3300 if (f3 & (TR3_REGEN))
3303 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
3305 info[i++] = "It speeds your regenerative powers.";
3309 if (f3 & (TR3_WARNING))
3312 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
3314 info[i++] = "It warns you of danger";
3318 if (f2 & (TR2_REFLECT))
3321 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
3323 info[i++] = "It reflects bolts and arrows.";
3327 if (f3 & (TR3_SH_FIRE))
3330 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3332 info[i++] = "It produces a fiery sheath.";
3336 if (f3 & (TR3_SH_ELEC))
3339 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3341 info[i++] = "It produces an electric sheath.";
3345 if (f3 & (TR3_SH_COLD))
3348 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3350 info[i++] = "It produces a coldly sheath.";
3354 if (f3 & (TR3_NO_MAGIC))
3357 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3359 info[i++] = "It produces an anti-magic shell.";
3363 if (f3 & (TR3_NO_TELE))
3366 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
3368 info[i++] = "It prevents teleportation.";
3372 if (f3 & (TR3_XTRA_MIGHT))
3375 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3377 info[i++] = "It fires missiles with extra might.";
3381 if (f3 & (TR3_XTRA_SHOTS))
3384 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3386 info[i++] = "It fires missiles excessively fast.";
3391 if (f3 & (TR3_DRAIN_EXP))
3394 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
3396 info[i++] = "It drains experience.";
3400 if (f3 & (TR3_TELEPORT))
3403 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
3405 info[i++] = "It induces random teleportation.";
3409 if (f3 & TR3_AGGRAVATE)
3412 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
3414 info[i++] = "It aggravates nearby creatures.";
3419 if (f3 & TR3_BLESSED)
3422 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
3424 info[i++] = "It has been blessed by the gods.";
3429 if (cursed_p(o_ptr))
3431 if (f3 & TR3_PERMA_CURSE)
3434 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3436 info[i++] = "It is permanently cursed.";
3440 else if (f3 & TR3_HEAVY_CURSE)
3443 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3445 info[i++] = "It is heavily cursed.";
3452 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
3454 info[i++] = "It is cursed.";
3460 if (f3 & TR3_TY_CURSE)
3463 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
3465 info[i++] = "It carries an ancient foul curse.";
3470 /* XTRA HACK ARTDESC */
3471 flag = TR3_IGNORE_ACID | TR3_IGNORE_ELEC | TR3_IGNORE_FIRE | TR3_IGNORE_COLD ;
3472 if ((f3 & flag) == flag)
3475 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3477 info[i++] = "It cannot be harmed by the elements.";
3480 if (f3 & (TR3_IGNORE_ACID))
3483 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3485 info[i++] = "It cannot be harmed by acid.";
3489 if (f3 & (TR3_IGNORE_ELEC))
3492 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3494 info[i++] = "It cannot be harmed by electricity.";
3498 if (f3 & (TR3_IGNORE_FIRE))
3501 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3503 info[i++] = "It cannot be harmed by fire.";
3507 if (f3 & (TR3_IGNORE_COLD))
3510 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3512 info[i++] = "It cannot be harmed by cold.";
3517 /* XTRA HACK ARTDESC */
3520 /* No special effects */
3521 if (!i) return (FALSE);
3523 /* Save the screen */
3526 /* Display Item name */
3527 object_desc(o_name, o_ptr, TRUE, 3);
3528 prt(format("%s", o_name), 0, 0);
3530 /* Erase the screen */
3531 for (k = 1; k < 24; k++) prt("", k, 13);
3533 /* Label the information */
3534 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
3536 monster_race *r_ptr = &r_info[o_ptr->pval];
3537 int namelen = strlen(r_name + r_ptr->name);
3538 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
3539 c_prt(r_ptr->d_attr, format("%c", r_ptr->d_char), 1, 18+namelen);
3540 prt("'", 1, 19+namelen);
3544 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
3546 prt(" Item Attributes:", 1, 15);
3549 /* We will print on top of the map (column 13) */
3550 for (k = 2, j = 0; j < i; j++)
3553 prt(info[j], k++, 15);
3555 /* Every 20 entries (lines 2 to 21), start over */
3556 if ((k == 22) && (j+1 < i))
3559 prt("-- ³¤¯ --", k, 15);
3561 prt("-- more --", k, 15);
3564 for (; k > 2; k--) prt("", k, 15);
3570 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
3572 prt("[Press any key to continue]", k, 15);
3577 /* Restore the screen */
3580 /* Gave knowledge */
3587 * Convert an inventory index into a one character label
3588 * Note that the label does NOT distinguish inven/equip.
3590 char index_to_label(int i)
3592 /* Indexes for "inven" are easy */
3593 if (i < INVEN_RARM) return (I2A(i));
3595 /* Indexes for "equip" are offset */
3596 return (I2A(i - INVEN_RARM));
3601 * Convert a label into the index of an item in the "inven"
3602 * Return "-1" if the label does not indicate a real item
3604 s16b label_to_inven(int c)
3609 i = (islower(c) ? A2I(c) : -1);
3611 /* Verify the index */
3612 if ((i < 0) || (i > INVEN_PACK)) return (-1);
3614 /* Empty slots can never be chosen */
3615 if (!inventory[i].k_idx) return (-1);
3617 /* Return the index */
3623 * Convert a label into the index of a item in the "equip"
3624 * Return "-1" if the label does not indicate a real item
3626 s16b label_to_equip(int c)
3631 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
3633 /* Verify the index */
3634 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
3636 /* Empty slots can never be chosen */
3637 if (!inventory[i].k_idx) return (-1);
3639 /* Return the index */
3646 * Determine which equipment slot (if any) an item likes
3648 s16b wield_slot(object_type *o_ptr)
3650 /* Slot for equipment */
3651 switch (o_ptr->tval)
3658 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
3659 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
3660 return (INVEN_LARM);
3667 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
3668 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
3669 return (INVEN_RARM);
3679 /* Use the right hand first */
3680 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
3682 /* Use the left hand for swapping (by default) */
3683 return (INVEN_LEFT);
3689 return (INVEN_NECK);
3694 return (INVEN_LITE);
3701 return (INVEN_BODY);
3706 return (INVEN_OUTER);
3712 return (INVEN_HEAD);
3717 return (INVEN_HANDS);
3722 return (INVEN_FEET);
3726 /* No slot available */
3732 * Return a string mentioning how a given item is carried
3734 cptr mention_use(int i)
3738 /* Examine the location */
3742 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê"); break;
3744 case INVEN_RARM: p = "Wielding"; break;
3748 case INVEN_LARM: p = (left_hander ? " ±¦¼ê" : " º¸¼ê"); break;
3750 case INVEN_LARM: p = "On arm"; break;
3754 case INVEN_BOW: p = "¼Í·âÍÑ"; break;
3756 case INVEN_BOW: p = "Shooting"; break;
3760 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
3762 case INVEN_LEFT: p = "On left hand"; break;
3766 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
3768 case INVEN_RIGHT: p = "On right hand"; break;
3772 case INVEN_NECK: p = " ¼ó"; break;
3774 case INVEN_NECK: p = "Around neck"; break;
3778 case INVEN_LITE: p = " ¸÷¸»"; break;
3780 case INVEN_LITE: p = "Light source"; break;
3784 case INVEN_BODY: p = " ÂÎ"; break;
3786 case INVEN_BODY: p = "On body"; break;
3790 case INVEN_OUTER: p = "ÂΤξå"; break;
3792 case INVEN_OUTER: p = "About body"; break;
3796 case INVEN_HEAD: p = " Ƭ"; break;
3798 case INVEN_HEAD: p = "On head"; break;
3802 case INVEN_HANDS: p = " ¼ê"; break;
3804 case INVEN_HANDS: p = "On hands"; break;
3808 case INVEN_FEET: p = " "; break;
3810 case INVEN_FEET: p = "On feet"; break;
3814 default: p = "¥¶¥Ã¥¯"; break;
3816 default: p = "In pack"; break;
3821 /* Hack -- Heavy weapon */
3822 if (i == INVEN_RARM)
3824 if (p_ptr->heavy_wield[0])
3835 /* Hack -- Heavy weapon */
3836 if (i == INVEN_LARM)
3838 if (p_ptr->heavy_wield[1])
3849 /* Hack -- Heavy bow */
3853 o_ptr = &inventory[i];
3854 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
3865 /* Return the result */
3871 * Return a string describing how a given item is being worn.
3872 * Currently, only used for items in the equipment, not inventory.
3874 cptr describe_use(int i)
3881 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
3883 case INVEN_RARM: p = "attacking monsters with"; break;
3887 case INVEN_LARM: p = (left_hander ? " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
3889 case INVEN_LARM: p = "wearing on your arm"; break;
3893 case INVEN_BOW: p = "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
3895 case INVEN_BOW: p = "shooting missiles with"; break;
3899 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3901 case INVEN_LEFT: p = "wearing on your left hand"; break;
3905 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3907 case INVEN_RIGHT: p = "wearing on your right hand"; break;
3911 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
3913 case INVEN_NECK: p = "wearing around your neck"; break;
3917 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
3919 case INVEN_LITE: p = "using to light the way"; break;
3923 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
3925 case INVEN_BODY: p = "wearing on your body"; break;
3929 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
3931 case INVEN_OUTER: p = "wearing on your back"; break;
3935 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
3937 case INVEN_HEAD: p = "wearing on your head"; break;
3941 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
3943 case INVEN_HANDS: p = "wearing on your hands"; break;
3947 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
3949 case INVEN_FEET: p = "wearing on your feet"; break;
3953 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
3955 default: p = "carrying in your pack"; break;
3960 /* Hack -- Heavy weapon */
3961 if (i == INVEN_RARM)
3964 int hold = adj_str_hold[p_ptr->stat_ind[A_STR]];
3966 if (p_ptr->ryoute) hold *= 2;
3967 o_ptr = &inventory[i];
3968 if (hold < o_ptr->weight / 10)
3979 /* Hack -- Heavy bow */
3983 o_ptr = &inventory[i];
3984 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
3987 p = "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î";
3995 /* Return the result */
4000 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
4002 bool check_book_realm(const byte book_tval, const byte book_sval)
4004 if (book_tval < TV_LIFE_BOOK) return FALSE;
4005 if (p_ptr->pclass == CLASS_SORCERER)
4007 return is_magic(tval2realm(book_tval));
4009 else if (p_ptr->pclass == CLASS_RED_MAGE)
4011 if (is_magic(tval2realm(book_tval)))
4012 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
4014 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
4019 * Check an item against the item tester info
4021 bool item_tester_okay(object_type *o_ptr)
4023 /* Hack -- allow listing empty slots */
4024 if (item_tester_full) return (TRUE);
4026 /* Require an item */
4027 if (!o_ptr->k_idx) return (FALSE);
4029 /* Hack -- ignore "gold" */
4030 if (o_ptr->tval == TV_GOLD) return (FALSE);
4032 /* Check the tval */
4033 if (item_tester_tval)
4035 /* Is it a spellbook? If so, we need a hack -- TY */
4036 if ((item_tester_tval <= TV_DEATH_BOOK) &&
4037 (item_tester_tval >= TV_LIFE_BOOK))
4038 return check_book_realm(o_ptr->tval, o_ptr->sval);
4040 if (item_tester_tval != o_ptr->tval) return (FALSE);
4043 /* Check the hook */
4044 if (item_tester_hook)
4046 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
4057 * Choice window "shadow" of the "show_inven()" function
4059 void display_inven(void)
4061 register int i, n, z = 0;
4063 byte attr = TERM_WHITE;
4065 char o_name[MAX_NLEN];
4068 /* Find the "final" slot */
4069 for (i = 0; i < INVEN_PACK; i++)
4071 o_ptr = &inventory[i];
4073 /* Skip non-objects */
4074 if (!o_ptr->k_idx) continue;
4080 /* Display the pack */
4081 for (i = 0; i < z; i++)
4083 /* Examine the item */
4084 o_ptr = &inventory[i];
4086 /* Start with an empty "index" */
4087 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4089 /* Is this item "acceptable"? */
4090 if (item_tester_okay(o_ptr))
4092 /* Prepare an "index" */
4093 tmp_val[0] = index_to_label(i);
4095 /* Bracket the "index" --(-- */
4099 /* Display the index (or blank space) */
4100 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
4102 /* Obtain an item description */
4103 object_desc(o_name, o_ptr, TRUE, 3);
4105 /* Obtain the length of the description */
4109 attr = tval_to_attr[o_ptr->tval % 128];
4111 /* Grey out charging items */
4117 /* Display the entry itself */
4118 Term_putstr(3, i, n, attr, o_name);
4120 /* Erase the rest of the line */
4121 Term_erase(3+n, i, 255);
4123 /* Display the weight if needed */
4124 if (show_weights && o_ptr->weight)
4126 int wgt = o_ptr->weight * o_ptr->number;
4128 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
4130 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4133 Term_putstr(71, i, -1, TERM_WHITE, tmp_val);
4137 /* Erase the rest of the window */
4138 for (i = z; i < Term->hgt; i++)
4140 /* Erase the line */
4141 Term_erase(0, i, 255);
4148 * Choice window "shadow" of the "show_equip()" function
4150 void display_equip(void)
4154 byte attr = TERM_WHITE;
4156 char o_name[MAX_NLEN];
4159 /* Display the equipment */
4160 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
4162 /* Examine the item */
4163 o_ptr = &inventory[i];
4165 /* Start with an empty "index" */
4166 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4168 /* Is this item "acceptable"? */
4169 if (item_tester_okay(o_ptr))
4171 /* Prepare an "index" */
4172 tmp_val[0] = index_to_label(i);
4174 /* Bracket the "index" --(-- */
4178 /* Display the index (or blank space) */
4179 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
4181 /* Obtain an item description */
4182 if ((i == INVEN_LARM) && p_ptr->ryoute)
4185 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
4187 strcpy(o_name, "(wielding with two-hands)");
4193 object_desc(o_name, o_ptr, TRUE, 3);
4194 attr = tval_to_attr[o_ptr->tval % 128];
4197 /* Obtain the length of the description */
4200 /* Grey out charging items */
4206 /* Display the entry itself */
4207 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
4209 /* Erase the rest of the line */
4210 Term_erase(3+n, i - INVEN_RARM, 255);
4212 /* Display the slot description (if needed) */
4215 Term_putstr(61, i - INVEN_RARM, -1, TERM_WHITE, "<--");
4216 Term_putstr(65, i - INVEN_RARM, -1, TERM_WHITE, mention_use(i));
4219 /* Display the weight (if needed) */
4220 if (show_weights && o_ptr->weight)
4222 int wgt = o_ptr->weight * o_ptr->number;
4223 int col = (show_labels ? 52 : 71);
4225 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
4227 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4230 Term_putstr(col, i - INVEN_RARM, -1, TERM_WHITE, tmp_val);
4234 /* Erase the rest of the window */
4235 for (i = INVEN_TOTAL - INVEN_RARM; i < Term->hgt; i++)
4237 /* Clear that line */
4238 Term_erase(0, i, 255);
4248 * Display the inventory.
4250 * Hack -- do not display "trailing" empty slots
4252 int show_inven(int target_item)
4254 int i, j, k, l, z = 0;
4255 int col, cur_col, len, lim;
4257 char o_name[MAX_NLEN];
4261 char out_desc[23][MAX_NLEN];
4262 int target_item_label = 0;
4266 /* Starting column */
4270 Term_get_size(&wid, &hgt);
4272 /* Default "max-length" */
4273 len = wid - col - 1;
4275 /* Maximum space allowed for descriptions */
4278 /* Require space for weight (if needed) */
4279 if (show_weights) lim -= 9;
4281 /* Require space for icon */
4282 if (show_item_graph)
4285 if (use_bigtile) lim--;
4288 /* Find the "final" slot */
4289 for (i = 0; i < INVEN_PACK; i++)
4291 o_ptr = &inventory[i];
4293 /* Skip non-objects */
4294 if (!o_ptr->k_idx) continue;
4300 /* Display the inventory */
4301 for (k = 0, i = 0; i < z; i++)
4303 o_ptr = &inventory[i];
4305 /* Is this item acceptable? */
4306 if (!item_tester_okay(o_ptr)) continue;
4308 /* Describe the object */
4309 object_desc(o_name, o_ptr, TRUE, 3);
4311 /* Hack -- enforce max length */
4314 /* Save the object index, color, and description */
4316 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4318 /* Grey out charging items */
4321 out_color[k] = TERM_L_DARK;
4324 (void)strcpy(out_desc[k], o_name);
4326 /* Find the predicted "line length" */
4327 l = strlen(out_desc[k]) + 5;
4329 /* Be sure to account for the weight */
4330 if (show_weights) l += 9;
4332 /* Account for icon if displayed */
4333 if (show_item_graph)
4336 if (use_bigtile) l++;
4339 /* Maintain the maximum length */
4340 if (l > len) len = l;
4342 /* Advance to next "line" */
4346 /* Find the column to start in */
4347 col = (len > wid - 4) ? 0 : (wid - len - 1);
4349 /* Output each entry */
4350 for (j = 0; j < k; j++)
4356 o_ptr = &inventory[i];
4358 /* Clear the line */
4359 prt("", j + 1, col ? col - 2 : col);
4361 if (use_menu && target_item)
4363 if (j == (target_item-1))
4366 strcpy(tmp_val, "¡Õ");
4368 strcpy(tmp_val, "> ");
4370 target_item_label = i;
4372 else strcpy(tmp_val, " ");
4375 /* Prepare an index --(-- */
4376 sprintf(tmp_val, "%c)", index_to_label(i));
4378 /* Clear the line with the (possibly indented) index */
4379 put_str(tmp_val, j + 1, col);
4383 /* Display graphics for object, if desired */
4384 if (show_item_graph)
4386 byte a = object_attr(o_ptr);
4387 char c = object_char(o_ptr);
4390 if (a & 0x80) a |= 0x40;
4393 Term_draw(cur_col, j + 1, a, c);
4398 Term_draw(cur_col, j + 1, 255, 255);
4404 /* Display the entry itself */
4405 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
4407 /* Display the weight if needed */
4410 int wgt = o_ptr->weight * o_ptr->number;
4412 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4414 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4417 put_str(tmp_val, j + 1, wid - 9);
4421 /* Make a "shadow" below the list (only if needed) */
4422 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4424 /* Save the new column */
4427 return target_item_label;
4433 * Display the equipment.
4435 int show_equip(int target_item)
4438 int col, cur_col, len, lim;
4441 char o_name[MAX_NLEN];
4444 char out_desc[23][MAX_NLEN];
4445 int target_item_label = 0;
4449 /* Starting column */
4453 Term_get_size(&wid, &hgt);
4455 /* Maximal length */
4456 len = wid - col - 1;
4458 /* Maximum space allowed for descriptions */
4461 /* Require space for labels (if needed) */
4463 if (show_labels) lim -= (7 + 2);
4465 if (show_labels) lim -= (14 + 2);
4469 /* Require space for weight (if needed) */
4471 if (show_weights) lim -= 10;
4473 if (show_weights) lim -= 9;
4477 if (show_item_graph) lim -= 2;
4479 /* Scan the equipment list */
4480 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
4482 o_ptr = &inventory[i];
4484 /* Is this item acceptable? */
4485 if (!item_tester_okay(o_ptr) && (!((i == INVEN_LARM) && p_ptr->ryoute) || item_tester_no_ryoute)) continue;
4488 object_desc(o_name, o_ptr, TRUE, 3);
4490 /* Truncate the description */
4493 if ((i == INVEN_LARM) && p_ptr->ryoute)
4496 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
4498 (void)strcpy(out_desc[k],"(wielding with two-hands)");
4504 (void)strcpy(out_desc[k], o_name);
4505 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4509 /* Grey out charging items */
4512 out_color[k] = TERM_L_DARK;
4515 /* Extract the maximal length (see below) */
4517 l = strlen(out_desc[k]) + (2 + 1);
4519 l = strlen(out_desc[k]) + (2 + 3);
4523 /* Increase length for labels (if needed) */
4525 if (show_labels) l += (7 + 2);
4527 if (show_labels) l += (14 + 2);
4531 /* Increase length for weight (if needed) */
4532 if (show_weights) l += 9;
4534 if (show_item_graph) l += 2;
4536 /* Maintain the max-length */
4537 if (l > len) len = l;
4539 /* Advance the entry */
4543 /* Hack -- Find a column to start in */
4545 col = (len > wid - 6) ? 0 : (wid - len - 1);
4547 col = (len > wid - 4) ? 0 : (wid - len - 1);
4551 /* Output each entry */
4552 for (j = 0; j < k; j++)
4558 o_ptr = &inventory[i];
4560 /* Clear the line */
4561 prt("", j + 1, col ? col - 2 : col);
4563 if (use_menu && target_item)
4565 if (j == (target_item-1))
4568 strcpy(tmp_val, "¡Õ");
4570 strcpy(tmp_val, "> ");
4572 target_item_label = i;
4574 else strcpy(tmp_val, " ");
4577 /* Prepare an index --(-- */
4578 sprintf(tmp_val, "%c)", index_to_label(i));
4580 /* Clear the line with the (possibly indented) index */
4581 put_str(tmp_val, j+1, col);
4585 /* Display graphics for object, if desired */
4586 if (show_item_graph)
4588 byte a = object_attr(o_ptr);
4589 char c = object_char(o_ptr);
4592 if (a & 0x80) a |= 0x40;
4595 Term_draw(cur_col, j + 1, a, c);
4600 Term_draw(cur_col, j + 1, 255, 255);
4608 /* Mention the use */
4610 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
4612 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
4615 put_str(tmp_val, j+1, cur_col);
4617 /* Display the entry itself */
4619 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
4621 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
4628 /* Display the entry itself */
4629 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
4632 /* Display the weight if needed */
4635 int wgt = o_ptr->weight * o_ptr->number;
4637 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4639 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
4642 put_str(tmp_val, j+1, wid - 9);
4646 /* Make a "shadow" below the list (only if needed) */
4647 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4649 /* Save the new column */
4652 return target_item_label;
4659 * Flip "inven" and "equip" in any sub-windows
4661 void toggle_inven_equip(void)
4666 for (j = 0; j < 8; j++)
4669 if (!angband_term[j]) continue;
4671 /* Flip inven to equip */
4672 if (window_flag[j] & (PW_INVEN))
4675 window_flag[j] &= ~(PW_INVEN);
4676 window_flag[j] |= (PW_EQUIP);
4679 p_ptr->window |= (PW_EQUIP);
4682 /* Flip inven to equip */
4683 else if (window_flag[j] & (PW_EQUIP))
4686 window_flag[j] &= ~(PW_EQUIP);
4687 window_flag[j] |= (PW_INVEN);
4690 p_ptr->window |= (PW_INVEN);
4698 * Verify the choice of an item.
4700 * The item can be negative to mean "item on floor".
4702 static bool verify(cptr prompt, int item)
4704 char o_name[MAX_NLEN];
4705 char out_val[MAX_NLEN+20];
4712 o_ptr = &inventory[item];
4718 o_ptr = &o_list[0 - item];
4722 object_desc(o_name, o_ptr, TRUE, 3);
4726 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
4728 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
4733 return (get_check(out_val));
4738 * Hack -- allow user to "prevent" certain choices
4740 * The item can be negative to mean "item on floor".
4742 static bool get_item_allow(int item)
4751 o_ptr = &inventory[item];
4757 o_ptr = &o_list[0 - item];
4760 /* No inscription */
4761 if (!o_ptr->inscription) return (TRUE);
4764 s = strchr(quark_str(o_ptr->inscription), '!');
4766 /* Process preventions */
4769 /* Check the "restriction" */
4770 if ((s[1] == command_cmd) || (s[1] == '*'))
4772 /* Verify the choice */
4774 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
4776 if (!verify("Really try", item)) return (FALSE);
4781 /* Find another '!' */
4782 s = strchr(s + 1, '!');
4792 * Auxiliary function for "get_item()" -- test an index
4794 static bool get_item_okay(int i)
4797 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
4799 /* Verify the item */
4800 if (!item_tester_okay(&inventory[i])) return (FALSE);
4809 * Find the "first" inventory object with the given "tag".
4811 * A "tag" is a char "n" appearing as "@n" anywhere in the
4812 * inscription of an object.
4814 * Also, the tag "@xn" will work as well, where "n" is a tag-char,
4815 * and "x" is the "current" command_cmd code.
4817 static int get_tag(int *cp, char tag)
4822 /* Check every object */
4823 for (i = 0; i < INVEN_TOTAL; ++i)
4825 object_type *o_ptr = &inventory[i];
4827 /* Skip non-objects */
4828 if (!o_ptr->k_idx) continue;
4830 /* Skip empty inscriptions */
4831 if (!o_ptr->inscription) continue;
4833 /* Skip non-choice */
4834 if (!item_tester_okay(o_ptr)) continue;
4837 s = strchr(quark_str(o_ptr->inscription), '@');
4839 /* Process all tags */
4842 /* Check the special tags */
4843 if ((s[1] == command_cmd) && (s[2] == tag))
4845 /* Save the actual inventory ID */
4852 /* Find another '@' */
4853 s = strchr(s + 1, '@');
4857 /* Check every object */
4858 for (i = 0; i < INVEN_TOTAL; ++i)
4860 object_type *o_ptr = &inventory[i];
4862 /* Skip non-objects */
4863 if (!o_ptr->k_idx) continue;
4865 /* Skip empty inscriptions */
4866 if (!o_ptr->inscription) continue;
4868 /* Skip non-choice */
4869 if (!item_tester_okay(o_ptr)) continue;
4872 s = strchr(quark_str(o_ptr->inscription), '@');
4874 /* Process all tags */
4877 /* Check the normal tags */
4878 if (s[1] == tag && !((s[2] >= '0' && s[2] <= '9') || (s[2] >= 'a' && s[2] <= 'z') || (s[2] >= 'A' && s[2] <= 'Z')))
4880 /* Save the actual inventory ID */
4887 /* Find another '@' */
4888 s = strchr(s + 1, '@');
4897 * Determine whether get_item() can get some item or not
4898 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
4900 bool can_get_item(void)
4902 int j, floor_list[23], floor_num = 0;
4904 for (j = 0; j < INVEN_TOTAL; j++)
4905 if (item_tester_okay(&inventory[j]))
4908 (void)scan_floor(floor_list, &floor_num, py, px, 0x01);
4916 * Let the user select an item, save its "index"
4918 * Return TRUE only if an acceptable item was chosen by the user.
4920 * The selected item must satisfy the "item_tester_hook()" function,
4921 * if that hook is set, and the "item_tester_tval", if that value is set.
4923 * All "item_tester" restrictions are cleared before this function returns.
4925 * The user is allowed to choose acceptable items from the equipment,
4926 * inventory, or floor, respectively, if the proper flag was given,
4927 * and there are any acceptable items in that location.
4929 * The equipment or inventory are displayed (even if no acceptable
4930 * items are in that location) if the proper flag was given.
4932 * If there are no acceptable items available anywhere, and "str" is
4933 * not NULL, then it will be used as the text of a warning message
4934 * before the function returns.
4936 * Note that the user must press "-" to specify the item on the floor,
4937 * and there is no way to "examine" the item on the floor, while the
4938 * use of "capital" letters will "examine" an inventory/equipment item,
4939 * and prompt for its use.
4941 * If a legal item is selected from the inventory, we save it in "cp"
4942 * directly (0 to 35), and return TRUE.
4944 * If a legal item is selected from the floor, we save it in "cp" as
4945 * a negative (-1 to -511), and return TRUE.
4947 * If no item is available, we do nothing to "cp", and we display a
4948 * warning message, using "str" if available, and return FALSE.
4950 * If no item is selected, we do nothing to "cp", and return FALSE.
4952 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
4953 * to allow the user to enter a command while viewing those screens, and
4954 * also to induce "auto-enter" of stores, and other such stuff.
4956 * Global "p_ptr->command_see" may be set before calling this function to start
4957 * out in "browse" mode. It is cleared before this function returns.
4959 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
4960 * If it is TRUE then we are viewing inventory, else equipment.
4962 * We always erase the prompt when we are done, leaving a blank line,
4963 * or a warning message, if appropriate, if no items are available.
4965 bool get_item(int *cp, cptr pmt, cptr str, int mode)
4967 s16b this_o_idx, next_o_idx = 0;
4969 char n1, n2, which = ' ';
4971 int j, k, i1, i2, e1, e2;
4981 bool allow_floor = FALSE;
4983 bool toggle = FALSE;
4989 extern bool select_spellbook;
4990 extern bool select_the_force;
4992 int menu_line = (use_menu ? 1 : 0);
4996 #ifdef ALLOW_EASY_FLOOR /* TNB */
4998 if (easy_floor) return get_item_floor(cp, pmt, str, mode);
5000 #endif /* ALLOW_EASY_FLOOR -- TNB */
5004 /* Get the item index */
5005 if (repeat_pull(cp))
5007 if (*cp == 1111) { /* the_force */
5008 item_tester_tval = 0;
5009 item_tester_hook = NULL;
5020 /* Acquire object */
5023 /* Validate the item */
5024 if (item_tester_okay(o_ptr))
5026 /* Forget the item_tester_tval restriction */
5027 item_tester_tval = 0;
5029 /* Forget the item_tester_hook restriction */
5030 item_tester_hook = NULL;
5037 /* Verify the item */
5038 else if (get_item_okay(*cp))
5040 /* Forget the item_tester_tval restriction */
5041 item_tester_tval = 0;
5043 /* Forget the item_tester_hook restriction */
5044 item_tester_hook = NULL;
5051 #endif /* ALLOW_REPEAT */
5054 if (mode & (USE_EQUIP)) equip = TRUE;
5055 if (mode & (USE_INVEN)) inven = TRUE;
5056 if (mode & (USE_FLOOR)) floor = TRUE;
5059 /* Paranoia XXX XXX XXX */
5066 /* No item selected */
5070 /* Full inventory */
5072 i2 = INVEN_PACK - 1;
5074 /* Forbid inventory */
5075 if (!inven) i2 = -1;
5078 for (j = 0; j < INVEN_PACK; j++)
5079 if (item_tester_okay(&inventory[j])) max_inven++;
5082 /* Restrict inventory indexes */
5083 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5084 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5087 /* Full equipment */
5089 e2 = INVEN_TOTAL - 1;
5091 /* Forbid equipment */
5092 if (!equip) e2 = -1;
5095 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5096 if (item_tester_okay(&inventory[j])) max_equip++;
5097 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5100 /* Restrict equipment indexes */
5101 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5102 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5106 /* Restrict floor usage */
5109 /* Scan all objects in the grid */
5110 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5114 /* Acquire object */
5115 o_ptr = &o_list[this_o_idx];
5117 /* Acquire next object */
5118 next_o_idx = o_ptr->next_o_idx;
5120 /* Accept the item on the floor if legal */
5121 if (item_tester_okay(o_ptr)) allow_floor = TRUE;
5126 /* Require at least one legal choice */
5127 if (!allow_floor && (i1 > i2) && (e1 > e2))
5129 /* Cancel p_ptr->command_see */
5130 command_see = FALSE;
5138 if (select_the_force) {
5144 /* Analyze choices */
5147 /* Hack -- Start on equipment if requested */
5148 if (command_see && command_wrk && equip)
5154 /* Use inventory if allowed */
5157 command_wrk = FALSE;
5160 /* Use equipment if allowed */
5166 /* Use inventory for floor */
5169 command_wrk = FALSE;
5175 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5177 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5179 /* Hack -- start out in "display" mode */
5187 /* Repeat until done */
5190 int get_item_label = 0;
5199 for (j = 0; j < 8; j++)
5202 if (!angband_term[j]) continue;
5204 /* Count windows displaying inven */
5205 if (window_flag[j] & (PW_INVEN)) ni++;
5207 /* Count windows displaying equip */
5208 if (window_flag[j] & (PW_EQUIP)) ne++;
5211 /* Toggle if needed */
5212 if ((command_wrk && ni && !ne) ||
5213 (!command_wrk && !ni && ne))
5216 toggle_inven_equip();
5223 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5225 /* Redraw windows */
5229 /* Inventory screen */
5232 /* Extract the legal requests */
5236 /* Redraw if needed */
5237 if (command_see) get_item_label = show_inven(menu_line);
5240 /* Equipment screen */
5243 /* Extract the legal requests */
5244 n1 = I2A(e1 - INVEN_RARM);
5245 n2 = I2A(e2 - INVEN_RARM);
5247 /* Redraw if needed */
5248 if (command_see) get_item_label = show_equip(menu_line);
5251 /* Viewing inventory */
5254 /* Begin the prompt */
5256 sprintf(out_val, "»ý¤Áʪ:");
5258 sprintf(out_val, "Inven:");
5262 /* Some legal items */
5263 if ((i1 <= i2) && !use_menu)
5265 /* Build the prompt */
5267 sprintf(tmp_val, "%c-%c,",
5269 sprintf(tmp_val, " %c-%c,",
5272 index_to_label(i1), index_to_label(i2));
5275 strcat(out_val, tmp_val);
5278 /* Indicate ability to "view" */
5280 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5282 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5288 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
5289 else if (select_the_force)
5290 strcat(out_val, " 'w'Îýµ¤½Ñ,");
5292 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
5293 else if (select_the_force)
5294 strcat(out_val, " w for the Force,");
5299 /* Viewing equipment */
5302 /* Begin the prompt */
5304 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5306 sprintf(out_val, "Equip:");
5310 /* Some legal items */
5311 if ((e1 <= e2) && !use_menu)
5313 /* Build the prompt */
5315 sprintf(tmp_val, "%c-%c,",
5317 sprintf(tmp_val, " %c-%c,",
5320 index_to_label(e1), index_to_label(e2));
5323 strcat(out_val, tmp_val);
5326 /* Indicate ability to "view" */
5328 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5330 if (!command_see) strcat(out_val, " * to see,");
5336 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
5338 if (inven) strcat(out_val, " / for Inven,");
5343 /* Indicate legality of the "floor" item */
5345 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
5347 if (allow_floor) strcat(out_val, " - for floor,");
5351 /* Finish the prompt */
5352 strcat(out_val, " ESC");
5354 /* Build the prompt */
5355 sprintf(tmp_val, "(%s) %s", out_val, pmt);
5357 /* Show the prompt */
5366 int max_line = (command_wrk ? max_equip : max_inven);
5382 menu_line += (max_line - 1);
5401 /* Verify legality */
5402 if (!inven || !equip)
5408 /* Hack -- Fix screen */
5418 /* Switch inven/equip */
5419 command_wrk = !command_wrk;
5420 max_line = (command_wrk ? max_equip : max_inven);
5421 if (menu_line > max_line) menu_line = max_line;
5423 /* Need to redraw */
5432 /* Validate the item */
5433 if (!get_item_okay(get_item_label))
5439 /* Allow player to "refuse" certain actions */
5440 if (!get_item_allow(get_item_label))
5446 /* Accept that choice */
5447 (*cp) = get_item_label;
5454 if (select_the_force) {
5462 if (menu_line > max_line) menu_line -= max_line;
5483 command_see = FALSE;
5503 /* Verify legality */
5504 if (!inven || !equip)
5510 /* Hack -- Fix screen */
5520 /* Switch inven/equip */
5521 command_wrk = !command_wrk;
5523 /* Need to redraw */
5529 /* Use floor item */
5532 /* Scan all objects in the grid */
5533 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5537 /* Acquire object */
5538 o_ptr = &o_list[this_o_idx];
5540 /* Acquire next object */
5541 next_o_idx = o_ptr->next_o_idx;
5543 /* Validate the item */
5544 if (!item_tester_okay(o_ptr)) continue;
5549 /* Verify the item (if required) */
5551 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
5553 if (other_query_flag && !verify("Try", k)) continue;
5557 /* Allow player to "refuse" certain actions */
5558 if (!get_item_allow(k)) continue;
5560 /* Accept that choice */
5577 case '1': case '2': case '3':
5578 case '4': case '5': case '6':
5579 case '7': case '8': case '9':
5581 /* Look up the tag */
5582 if (!get_tag(&k, which))
5588 /* Hack -- Validate the item */
5589 if ((k < INVEN_RARM) ? !inven : !equip)
5595 /* Validate the item */
5596 if (!get_item_okay(k))
5602 /* Allow player to "refuse" certain actions */
5603 if (!get_item_allow(k))
5609 /* Accept that choice */
5621 /* Choose "default" inventory item */
5624 k = ((i1 == i2) ? i1 : -1);
5627 /* Choose "default" equipment item */
5630 k = ((e1 == e2) ? e1 : -1);
5633 /* Validate the item */
5634 if (!get_item_okay(k))
5640 /* Allow player to "refuse" certain actions */
5641 if (!get_item_allow(k))
5647 /* Accept that choice */
5656 if (select_the_force) {
5668 if(select_spellbook){
5669 bool not_found = FALSE;
5670 /* Look up the tag */
5671 if (!get_tag(&k, which))
5676 /* Hack -- Validate the item */
5677 if ((k < INVEN_RARM) ? !inven : !equip)
5682 /* Validate the item */
5683 if (!get_item_okay(k))
5689 /* Accept that choice */
5697 /* Extract "query" setting */
5698 ver = isupper(which);
5699 which = tolower(which);
5701 /* Convert letter to inventory index */
5704 k = label_to_inven(which);
5707 /* Convert letter to equipment index */
5710 k = label_to_equip(which);
5713 /* Validate the item */
5714 if (!get_item_okay(k))
5720 /* Verify the item */
5722 if (ver && !verify("ËÜÅö¤Ë", k))
5724 if (ver && !verify("Try", k))
5732 /* Allow player to "refuse" certain actions */
5733 if (!get_item_allow(k))
5739 /* Accept that choice */
5750 /* Fix the screen if necessary */
5756 /* Hack -- Cancel "display" */
5757 command_see = FALSE;
5761 /* Forget the item_tester_tval restriction */
5762 item_tester_tval = 0;
5764 item_tester_no_ryoute = FALSE;
5766 /* Forget the item_tester_hook restriction */
5767 item_tester_hook = NULL;
5773 /* Toggle again if needed */
5774 if (toggle) toggle_inven_equip();
5777 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5784 /* Clear the prompt line */
5787 /* Warning if needed */
5788 if (oops && str) msg_print(str);
5791 if (item) repeat_push(*cp);
5792 #endif /* ALLOW_REPEAT */
5799 #ifdef ALLOW_EASY_FLOOR
5804 * Return a list of o_list[] indexes of items at the given cave
5805 * location. Valid flags are:
5807 * mode & 0x01 -- Item tester
5808 * mode & 0x02 -- Marked items only
5809 * mode & 0x04 -- Stop after first
5811 bool scan_floor(int *items, int *item_num, int y, int x, int mode)
5813 int this_o_idx, next_o_idx;
5820 if (!in_bounds(y, x)) return (FALSE);
5822 /* Scan all objects in the grid */
5823 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
5827 /* Acquire object */
5828 o_ptr = &o_list[this_o_idx];
5830 /* Acquire next object */
5831 next_o_idx = o_ptr->next_o_idx;
5834 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
5837 if ((mode & 0x02) && !o_ptr->marked) continue;
5839 /* Accept this item */
5840 items[num++] = this_o_idx;
5843 if (mode & 0x04) break;
5845 /* XXX Hack -- Enforce limit */
5846 if (num == 23) break;
5849 /* Number of items */
5857 * Display a list of the items on the floor at the given location.
5859 int show_floor(int target_item, int y, int x)
5866 char o_name[MAX_NLEN];
5872 char out_desc[23][MAX_NLEN];
5873 int target_item_label = 0;
5875 int floor_list[23], floor_num;
5879 Term_get_size(&wid, &hgt);
5881 /* Default length */
5884 /* Maximum space allowed for descriptions */
5887 /* Require space for weight (if needed) */
5888 if (show_weights) lim -= 9;
5890 /* Scan for objects in the grid, using item_tester_okay() */
5891 (void) scan_floor(floor_list, &floor_num, y, x, 0x01);
5893 /* Display the inventory */
5894 for (k = 0, i = 0; i < floor_num; i++)
5896 o_ptr = &o_list[floor_list[i]];
5898 /* Describe the object */
5899 object_desc(o_name, o_ptr, TRUE, 3);
5901 /* Hack -- enforce max length */
5904 /* Save the index */
5907 /* Acquire inventory color */
5908 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
5910 /* Save the object description */
5911 strcpy(out_desc[k], o_name);
5913 /* Find the predicted "line length" */
5914 l = strlen(out_desc[k]) + 5;
5916 /* Be sure to account for the weight */
5917 if (show_weights) l += 9;
5919 /* Maintain the maximum length */
5920 if (l > len) len = l;
5922 /* Advance to next "line" */
5926 /* Find the column to start in */
5927 col = (len > wid - 4) ? 0 : (wid - len - 1);
5929 /* Output each entry */
5930 for (j = 0; j < k; j++)
5933 i = floor_list[out_index[j]];
5938 /* Clear the line */
5939 prt("", j + 1, col ? col - 2 : col);
5941 if (use_menu && target_item)
5943 if (j == (target_item-1))
5946 strcpy(tmp_val, "¡Õ");
5948 strcpy(tmp_val, "> ");
5950 target_item_label = i;
5952 else strcpy(tmp_val, " ");
5955 /* Prepare an index --(-- */
5956 sprintf(tmp_val, "%c)", index_to_label(j));
5958 /* Clear the line with the (possibly indented) index */
5959 put_str(tmp_val, j + 1, col);
5961 /* Display the entry itself */
5962 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
5964 /* Display the weight if needed */
5967 int wgt = o_ptr->weight * o_ptr->number;
5969 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5971 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
5974 put_str(tmp_val, j + 1, wid - 9);
5978 /* Make a "shadow" below the list (only if needed) */
5979 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5981 return target_item_label;
5985 * This version of get_item() is called by get_item() when
5986 * the easy_floor is on.
5988 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
5990 char n1 = ' ', n2 = ' ', which = ' ';
5992 int j, k, i1, i2, e1, e2;
6002 bool allow_equip = FALSE;
6003 bool allow_inven = FALSE;
6004 bool allow_floor = FALSE;
6006 bool toggle = FALSE;
6011 int floor_num, floor_list[23], floor_top = 0;
6013 extern bool select_spellbook;
6014 extern bool select_the_force;
6016 int menu_line = (use_menu ? 1 : 0);
6022 /* Get the item index */
6023 if (repeat_pull(cp))
6025 if (*cp == 1111) { /* the_force */
6026 item_tester_tval = 0;
6027 item_tester_hook = NULL;
6038 /* Acquire object */
6041 /* Validate the item */
6042 if (item_tester_okay(o_ptr))
6044 /* Forget the item_tester_tval restriction */
6045 item_tester_tval = 0;
6047 /* Forget the item_tester_hook restriction */
6048 item_tester_hook = NULL;
6055 /* Verify the item */
6056 else if (get_item_okay(*cp))
6058 /* Forget the item_tester_tval restriction */
6059 item_tester_tval = 0;
6061 /* Forget the item_tester_hook restriction */
6062 item_tester_hook = NULL;
6069 #endif /* ALLOW_REPEAT */
6072 if (mode & (USE_EQUIP)) equip = TRUE;
6073 if (mode & (USE_INVEN)) inven = TRUE;
6074 if (mode & (USE_FLOOR)) floor = TRUE;
6077 /* Paranoia XXX XXX XXX */
6084 /* No item selected */
6088 /* Full inventory */
6090 i2 = INVEN_PACK - 1;
6092 /* Forbid inventory */
6093 if (!inven) i2 = -1;
6096 for (j = 0; j < INVEN_PACK; j++)
6097 if (item_tester_okay(&inventory[j])) max_inven++;
6100 /* Restrict inventory indexes */
6101 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
6102 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
6105 /* Full equipment */
6107 e2 = INVEN_TOTAL - 1;
6109 /* Forbid equipment */
6110 if (!equip) e2 = -1;
6113 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
6114 if (item_tester_okay(&inventory[j])) max_equip++;
6115 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
6118 /* Restrict equipment indexes */
6119 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
6120 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
6123 /* Count "okay" floor items */
6126 /* Restrict floor usage */
6129 /* Scan all objects in the grid */
6130 (void) scan_floor(floor_list, &floor_num, py, px, 0x01);
6133 /* Accept inventory */
6134 if (i1 <= i2) allow_inven = TRUE;
6136 /* Accept equipment */
6137 if (e1 <= e2) allow_equip = TRUE;
6140 if (floor_num) allow_floor = TRUE;
6142 /* Require at least one legal choice */
6143 if (!allow_inven && !allow_equip && !allow_floor)
6145 /* Cancel p_ptr->command_see */
6146 command_see = FALSE;
6154 if (select_the_force) {
6160 /* Analyze choices */
6163 /* Hack -- Start on equipment if requested */
6164 if (command_see && (command_wrk == (USE_EQUIP))
6167 command_wrk = (USE_EQUIP);
6170 /* Use inventory if allowed */
6171 else if (allow_inven)
6173 command_wrk = (USE_INVEN);
6176 /* Use equipment if allowed */
6177 else if (allow_equip)
6179 command_wrk = (USE_EQUIP);
6182 /* Use floor if allowed */
6183 else if (allow_floor)
6185 command_wrk = (USE_FLOOR);
6190 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
6192 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
6194 /* Hack -- start out in "display" mode */
6201 /* Repeat until done */
6204 int get_item_label = 0;
6213 for (j = 0; j < 8; j++)
6216 if (!angband_term[j]) continue;
6218 /* Count windows displaying inven */
6219 if (window_flag[j] & (PW_INVEN)) ni++;
6221 /* Count windows displaying equip */
6222 if (window_flag[j] & (PW_EQUIP)) ne++;
6225 /* Toggle if needed */
6226 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
6227 (command_wrk == (USE_INVEN) && !ni && ne))
6230 toggle_inven_equip();
6237 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6239 /* Redraw windows */
6243 /* Inventory screen */
6244 if (command_wrk == (USE_INVEN))
6246 /* Extract the legal requests */
6250 /* Redraw if needed */
6251 if (command_see) get_item_label = show_inven(menu_line);
6254 /* Equipment screen */
6255 else if (command_wrk == (USE_EQUIP))
6257 /* Extract the legal requests */
6258 n1 = I2A(e1 - INVEN_RARM);
6259 n2 = I2A(e2 - INVEN_RARM);
6261 /* Redraw if needed */
6262 if (command_see) get_item_label = show_equip(menu_line);
6266 else if (command_wrk == (USE_FLOOR))
6269 k = MIN(floor_top + 23, floor_num) - 1;
6271 /* Extract the legal requests */
6272 n1 = I2A(j - floor_top);
6273 n2 = I2A(k - floor_top);
6275 /* Redraw if needed */
6276 if (command_see) get_item_label = show_floor(menu_line, py, px);
6279 /* Viewing inventory */
6280 if (command_wrk == (USE_INVEN))
6282 /* Begin the prompt */
6284 sprintf(out_val, "»ý¤Áʪ:");
6286 sprintf(out_val, "Inven:");
6291 /* Build the prompt */
6293 sprintf(tmp_val, "%c-%c,",
6295 sprintf(tmp_val, " %c-%c,",
6298 index_to_label(i1), index_to_label(i2));
6301 strcat(out_val, tmp_val);
6304 /* Indicate ability to "view" */
6306 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6308 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6319 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
6321 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6323 else strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
6325 else if (select_the_force)
6326 strcat(out_val, " 'w'Îýµ¤½Ñ,");
6333 strcat(out_val, " 6 for Equip,");
6335 strcat(out_val, " 4 or 6 for Equip,");
6337 else strcat(out_val, " / for Equip,");
6339 else if (select_the_force)
6340 strcat(out_val, " w for the Force,");
6350 strcat(out_val, " '4' ¾²¾å,");
6352 strcat(out_val, " '4'or'6' ¾²¾å,");
6354 else strcat(out_val, " '-'¾²¾å,");
6357 if (allow_floor) strcat(out_val, " - for floor,");
6362 /* Viewing equipment */
6363 else if (command_wrk == (USE_EQUIP))
6365 /* Begin the prompt */
6367 sprintf(out_val, "ÁõÈ÷ÉÊ:");
6369 sprintf(out_val, "Equip:");
6375 /* Build the prompt */
6377 sprintf(tmp_val, "%c-%c,",
6379 sprintf(tmp_val, " %c-%c,",
6382 index_to_label(e1), index_to_label(e2));
6385 strcat(out_val, tmp_val);
6388 /* Indicate ability to "view" */
6390 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6392 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6403 strcat(out_val, " '4' »ý¤Áʪ,");
6405 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6407 else strcat(out_val, " '/' »ý¤Áʪ,");
6410 if (allow_inven) strcat(out_val, " / for Inven,");
6421 strcat(out_val, " '6' ¾²¾å,");
6423 strcat(out_val, " '4'or'6' ¾²¾å,");
6425 else strcat(out_val, " '-'¾²¾å,");
6428 if (allow_floor) strcat(out_val, " - for floor,");
6434 else if (command_wrk == (USE_FLOOR))
6436 /* Begin the prompt */
6438 sprintf(out_val, "¾²¾å:");
6440 sprintf(out_val, "Floor:");
6446 /* Build the prompt */
6448 sprintf(tmp_val, "%c-%c,", n1, n2);
6450 sprintf(tmp_val, " %c-%c,", n1, n2);
6455 strcat(out_val, tmp_val);
6458 /* Indicate ability to "view" */
6460 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6462 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6468 if (allow_inven && allow_equip)
6471 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
6473 strcat(out_val, " / for Inven,");
6477 else if (allow_inven)
6480 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6482 strcat(out_val, " / for Inven,");
6486 else if (allow_equip)
6489 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6491 strcat(out_val, " / for Equip,");
6497 else if (allow_inven)
6500 strcat(out_val, " '/' »ý¤Áʪ,");
6502 strcat(out_val, " / for Inven,");
6506 else if (allow_equip)
6509 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6511 strcat(out_val, " / for Equip,");
6517 /* Finish the prompt */
6518 strcat(out_val, " ESC");
6520 /* Build the prompt */
6521 sprintf(tmp_val, "(%s) %s", out_val, pmt);
6523 /* Show the prompt */
6532 if (command_wrk == USE_INVEN) max_line = max_inven;
6533 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6534 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6550 menu_line += (max_line - 1);
6566 /* Verify legality */
6567 if (command_wrk == (USE_INVEN))
6569 if (allow_floor) command_wrk = USE_FLOOR;
6570 else if (allow_equip) command_wrk = USE_EQUIP;
6577 else if (command_wrk == (USE_EQUIP))
6579 if (allow_inven) command_wrk = USE_INVEN;
6580 else if (allow_floor) command_wrk = USE_FLOOR;
6587 else if (command_wrk == (USE_FLOOR))
6589 if (allow_equip) command_wrk = USE_EQUIP;
6590 else if (allow_inven) command_wrk = USE_INVEN;
6603 /* Hack -- Fix screen */
6613 /* Switch inven/equip */
6614 if (command_wrk == USE_INVEN) max_line = max_inven;
6615 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6616 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6617 if (menu_line > max_line) menu_line = max_line;
6619 /* Need to redraw */
6627 /* Verify legality */
6628 if (command_wrk == (USE_INVEN))
6630 if (allow_equip) command_wrk = USE_EQUIP;
6631 else if (allow_floor) command_wrk = USE_FLOOR;
6638 else if (command_wrk == (USE_EQUIP))
6640 if (allow_floor) command_wrk = USE_FLOOR;
6641 else if (allow_inven) command_wrk = USE_INVEN;
6648 else if (command_wrk == (USE_FLOOR))
6650 if (allow_inven) command_wrk = USE_INVEN;
6651 else if (allow_equip) command_wrk = USE_EQUIP;
6664 /* Hack -- Fix screen */
6674 /* Switch inven/equip */
6675 if (command_wrk == USE_INVEN) max_line = max_inven;
6676 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6677 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6678 if (menu_line > max_line) menu_line = max_line;
6680 /* Need to redraw */
6689 /* Validate the item */
6690 if (!get_item_okay(get_item_label))
6696 /* Allow player to "refuse" certain actions */
6697 if (!get_item_allow(get_item_label))
6703 /* Accept that choice */
6704 (*cp) = get_item_label;
6711 if (select_the_force) {
6719 if (menu_line > max_line) menu_line -= max_line;
6740 command_see = FALSE;
6760 if (command_wrk == (USE_INVEN))
6767 command_wrk = (USE_EQUIP);
6769 else if (command_wrk == (USE_EQUIP))
6776 command_wrk = (USE_INVEN);
6778 else if (command_wrk == (USE_FLOOR))
6782 command_wrk = (USE_INVEN);
6784 else if (allow_equip)
6786 command_wrk = (USE_EQUIP);
6795 /* Hack -- Fix screen */
6805 /* Need to redraw */
6818 * If we are already examining the floor, and there
6819 * is only one item, we will always select it.
6820 * If we aren't examining the floor and there is only
6821 * one item, we will select it if floor_query_flag
6826 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
6829 k = 0 - floor_list[0];
6831 /* Allow player to "refuse" certain actions */
6832 if (!get_item_allow(k))
6838 /* Accept that choice */
6847 /* Hack -- Fix screen */
6857 command_wrk = (USE_FLOOR);
6863 case '1': case '2': case '3':
6864 case '4': case '5': case '6':
6865 case '7': case '8': case '9':
6867 /* Look up the tag */
6868 if (!get_tag(&k, which))
6874 /* Hack -- Validate the item */
6875 if ((k < INVEN_RARM) ? !inven : !equip)
6881 /* Validate the item */
6882 if (!get_item_okay(k))
6888 /* Allow player to "refuse" certain actions */
6889 if (!get_item_allow(k))
6895 /* Accept that choice */
6907 /* Choose "default" inventory item */
6908 if (command_wrk == (USE_INVEN))
6910 k = ((i1 == i2) ? i1 : -1);
6913 /* Choose "default" equipment item */
6914 else if (command_wrk == (USE_EQUIP))
6916 k = ((e1 == e2) ? e1 : -1);
6919 /* Choose "default" floor item */
6920 else if (command_wrk == (USE_FLOOR))
6925 k = 0 - floor_list[0];
6927 /* Allow player to "refuse" certain actions */
6928 if (!get_item_allow(k))
6934 /* Accept that choice */
6942 /* Validate the item */
6943 if (!get_item_okay(k))
6949 /* Allow player to "refuse" certain actions */
6950 if (!get_item_allow(k))
6956 /* Accept that choice */
6965 if (select_the_force) {
6977 if(select_spellbook){
6978 bool not_found = FALSE;
6979 /* Look up the tag */
6980 if (!get_tag(&k, which))
6985 /* Hack -- Validate the item */
6986 if ((k < INVEN_RARM) ? !inven : !equip)
6991 /* Validate the item */
6992 if (!get_item_okay(k))
6998 /* Accept that choice */
7006 /* Extract "query" setting */
7007 ver = isupper(which);
7008 which = tolower(which);
7010 /* Convert letter to inventory index */
7011 if (command_wrk == (USE_INVEN))
7013 k = label_to_inven(which);
7016 /* Convert letter to equipment index */
7017 else if (command_wrk == (USE_EQUIP))
7019 k = label_to_equip(which);
7022 /* Convert letter to floor index */
7023 else if (command_wrk == USE_FLOOR)
7025 k = islower(which) ? A2I(which) : -1;
7026 if (k < 0 || k >= floor_num)
7033 k = 0 - floor_list[k];
7036 /* Validate the item */
7037 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
7043 /* Verify the item */
7045 if (ver && !verify("ËÜÅö¤Ë", k))
7047 if (ver && !verify("Try", k))
7055 /* Allow player to "refuse" certain actions */
7056 if (!get_item_allow(k))
7062 /* Accept that choice */
7072 /* Fix the screen if necessary */
7078 /* Hack -- Cancel "display" */
7079 command_see = FALSE;
7083 /* Forget the item_tester_tval restriction */
7084 item_tester_tval = 0;
7086 /* Forget the item_tester_hook restriction */
7087 item_tester_hook = NULL;
7093 /* Toggle again if needed */
7094 if (toggle) toggle_inven_equip();
7097 p_ptr->window |= (PW_INVEN | PW_EQUIP);
7104 /* Clear the prompt line */
7107 /* Warning if needed */
7108 if (oops && str) msg_print(str);
7111 if (item) repeat_push(*cp);
7112 #endif /* ALLOW_REPEAT */
7119 bool py_pickup_floor_aux(void)
7129 /* Restrict the choices */
7130 item_tester_hook = inven_carry_okay;
7134 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
7135 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
7137 q = "Get which item? ";
7138 s = "You no longer have any room for the objects on the floor.";
7141 if (get_item(&item, q, s, (USE_FLOOR)))
7143 this_o_idx = 0 - item;
7150 /* Access the object */
7151 o_ptr = &o_list[this_o_idx];
7153 /* Pick up the object */
7154 py_pickup_aux(this_o_idx);
7161 * Make the player carry everything in a grid
7163 * If "pickup" is FALSE then only gold will be picked up
7165 * This is called by py_pickup() when easy_floor is TRUE.
7167 void py_pickup_floor(int pickup)
7169 s16b this_o_idx, next_o_idx = 0;
7171 char o_name[MAX_NLEN];
7174 int floor_num = 0, floor_list[23], floor_o_idx = 0;
7178 /* Scan the pile of objects */
7179 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
7183 /* Access the object */
7184 o_ptr = &o_list[this_o_idx];
7186 /* Describe the object */
7187 object_desc(o_name, o_ptr, TRUE, 3);
7189 /* Access the next object */
7190 next_o_idx = o_ptr->next_o_idx;
7192 /* Hack -- disturb */
7196 if (o_ptr->tval == TV_GOLD)
7200 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
7201 (long)o_ptr->pval, o_name);
7203 msg_format("You have found %ld gold pieces worth of %s.",
7204 (long) o_ptr->pval, o_name);
7208 /* Collect the gold */
7209 p_ptr->au += o_ptr->pval;
7212 p_ptr->redraw |= (PR_GOLD);
7215 p_ptr->window |= (PW_PLAYER);
7217 /* Delete the gold */
7218 delete_object_idx(this_o_idx);
7220 /* Check the next object */
7224 /* Count non-gold objects that can be picked up. */
7225 if (inven_carry_okay(o_ptr))
7230 /* Remember this object index */
7231 floor_list[floor_num] = this_o_idx;
7233 /* Count non-gold objects */
7236 if (floor_num == 23) break;
7238 /* Remember this index */
7239 floor_o_idx = this_o_idx;
7242 /* There are no non-gold objects */
7246 /* Mention the number of objects */
7252 /* Access the object */
7253 o_ptr = &o_list[floor_o_idx];
7255 #ifdef ALLOW_EASY_SENSE
7257 /* Option: Make object sensing easy */
7260 /* Sense the object */
7261 (void) sense_object(o_ptr);
7264 #endif /* ALLOW_EASY_SENSE */
7266 /* Describe the object */
7267 object_desc(o_name, o_ptr, TRUE, 3);
7271 msg_format("%s¤¬¤¢¤ë¡£", o_name);
7273 msg_format("You see %s.", o_name);
7278 /* Multiple objects */
7283 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
7285 msg_format("You see a pile of %d items.", floor_num);
7294 /* The player has no room for anything on the floor. */
7300 /* Access the object */
7301 o_ptr = &o_list[floor_o_idx];
7303 #ifdef ALLOW_EASY_SENSE
7305 /* Option: Make object sensing easy */
7308 /* Sense the object */
7309 (void) sense_object(o_ptr);
7312 #endif /* ALLOW_EASY_SENSE */
7314 /* Describe the object */
7315 object_desc(o_name, o_ptr, TRUE, 3);
7319 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7321 msg_format("You have no room for %s.", o_name);
7326 /* Multiple objects */
7331 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7333 msg_print("You have no room for any of the objects on the floor.");
7345 /* Hack -- query every object */
7346 if (carry_query_flag)
7348 char out_val[MAX_NLEN+20];
7350 /* Access the object */
7351 o_ptr = &o_list[floor_o_idx];
7353 #ifdef ALLOW_EASY_SENSE
7355 /* Option: Make object sensing easy */
7358 /* Sense the object */
7359 (void) sense_object(o_ptr);
7362 #endif /* ALLOW_EASY_SENSE */
7364 /* Describe the object */
7365 object_desc(o_name, o_ptr, TRUE, 3);
7367 /* Build a prompt */
7369 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7371 (void) sprintf(out_val, "Pick up %s? ", o_name);
7375 /* Ask the user to confirm */
7376 if (!get_check(out_val))
7383 /* Access the object */
7384 o_ptr = &o_list[floor_o_idx];
7386 #ifdef ALLOW_EASY_SENSE
7388 /* Option: Make object sensing easy */
7391 /* Sense the object */
7392 (void) sense_object(o_ptr);
7395 #endif /* ALLOW_EASY_SENSE */
7397 /* Pick up the object */
7398 py_pickup_aux(floor_o_idx);
7401 /* Allow the user to choose an object */
7404 while (can_pickup--)
7406 if (!py_pickup_floor_aux()) break;
7411 #endif /* ALLOW_EASY_FLOOR */