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];
2413 /* Extract the flags */
2414 object_flags(o_ptr, &f1, &f2, &f3);
2420 roff_to_buf( a_text + a_info[ o_ptr->name1 ].text ,77-15,temp);
2421 for(j=0;temp[j];j+=1+strlen(&temp[j]))
2422 { info[i]=&temp[j];i++;}
2425 /* Mega-Hack -- describe activation */
2426 if (f3 & (TR3_ACTIVATE))
2429 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
2431 info[i++] = "It can be activated for...";
2434 info[i++] = item_activation(o_ptr);
2436 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
2438 info[i++] = "...if it is being worn.";
2443 /* Figurines, a hack */
2444 if (o_ptr->tval == TV_FIGURINE)
2447 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
2449 info[i++] = "It will transform into a pet when thrown.";
2454 /* Figurines, a hack */
2455 if (o_ptr->name1 == ART_STONEMASK)
2458 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
2460 info[i++] = "It makes you turn into a vampire permanently.";
2465 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
2468 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
2470 info[i++] = "It will attempts to kill a monster instantly.";
2475 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
2478 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
2480 info[i++] = "It strikes yourself sometimes.";
2484 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
2486 info[i++] = "It will always penetrates invulnerability barrier.";
2490 if (o_ptr->name2 == EGO_2WEAPON)
2493 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
2495 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
2500 if (o_ptr->name2 == EGO_RING_WIZARD)
2503 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
2505 info[i++] = "It affects your ability to use magic devices.";
2509 if (o_ptr->name2 == EGO_AMU_FOOL)
2512 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
2514 info[i++] = "It prevents you from using magic items.";
2518 if (o_ptr->name2 == EGO_RING_THROW)
2521 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2523 info[i++] = "It provides great strength when you throw an item.";
2527 if (o_ptr->name2 == EGO_AMU_NAIVETY)
2530 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
2532 info[i++] = "It decreases your magic resistance.";
2536 if (o_ptr->tval == TV_STATUE)
2538 monster_race *r_ptr = &r_info[o_ptr->pval];
2540 if (o_ptr->pval == MON_BULLGATES)
2542 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
2544 info[i++] = "It is shameful.";
2546 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
2548 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
2550 info[i++] = "It is fearful.";
2554 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
2556 info[i++] = "It is cheerful.";
2560 /* Hack -- describe lite's */
2561 if (o_ptr->tval == TV_LITE)
2563 if (o_ptr->name2 == EGO_LITE_DARKNESS)
2566 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
2568 info[i++] = "It provides no light..";
2571 else if (artifact_p(o_ptr))
2574 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2576 info[i++] = "It provides light (radius 3) forever.";
2580 else if (o_ptr->name2 == EGO_LITE_SHINE)
2582 if (o_ptr->sval == SV_LITE_FEANOR)
2585 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2587 info[i++] = "It provides light (radius 3) forever.";
2591 else if (o_ptr->sval == SV_LITE_LANTERN)
2594 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2596 info[i++] = "It provides light (radius 3) when fueled.";
2603 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2605 info[i++] = "It provides light (radius 2) when fueled.";
2612 if (o_ptr->sval == SV_LITE_FEANOR)
2615 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2617 info[i++] = "It provides light (radius 2) forever.";
2621 else if (o_ptr->sval == SV_LITE_LANTERN)
2624 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2626 info[i++] = "It provides light (radius 2) when fueled.";
2633 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
2635 info[i++] = "It provides light (radius 1) when fueled.";
2640 if (o_ptr->name2 == EGO_LITE_LONG)
2643 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
2645 info[i++] = "It provides light for much longer time.";
2651 /* And then describe it fully */
2653 if (f2 & (TR2_RIDING))
2655 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
2657 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
2659 info[i++] = "It is made for riding.";
2663 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
2665 info[i++] = "It is suitable for riding.";
2672 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2674 info[i++] = "It affects your strength.";
2681 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2683 info[i++] = "It affects your intelligence.";
2690 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2692 info[i++] = "It affects your wisdom.";
2699 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2701 info[i++] = "It affects your dexterity.";
2708 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2710 info[i++] = "It affects your constitution.";
2717 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2719 info[i++] = "It affects your charisma.";
2724 if (f1 & (TR1_MAGIC_MASTERY))
2727 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2729 info[i++] = "It affects your ability to use magic devices.";
2733 if (f1 & (TR1_STEALTH))
2736 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2738 info[i++] = "It affects your stealth.";
2742 if (f1 & (TR1_SEARCH))
2745 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2747 info[i++] = "It affects your searching.";
2751 if (f1 & (TR1_INFRA))
2754 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2756 info[i++] = "It affects your infravision.";
2760 if (f1 & (TR1_TUNNEL))
2763 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2765 info[i++] = "It affects your ability to tunnel.";
2769 if (f1 & (TR1_SPEED))
2772 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2774 info[i++] = "It affects your speed.";
2778 if (f1 & (TR1_BLOWS))
2781 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2783 info[i++] = "It affects your attack speed.";
2788 if (f1 & (TR1_BRAND_ACID))
2791 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2793 info[i++] = "It does extra damage from acid.";
2797 if (f1 & (TR1_BRAND_ELEC))
2800 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2802 info[i++] = "It does extra damage from electricity.";
2806 if (f1 & (TR1_BRAND_FIRE))
2809 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2811 info[i++] = "It does extra damage from fire.";
2815 if (f1 & (TR1_BRAND_COLD))
2818 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2820 info[i++] = "It does extra damage from frost.";
2825 if (f1 & (TR1_BRAND_POIS))
2828 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
2830 info[i++] = "It poisons your foes.";
2835 if (f1 & (TR1_CHAOTIC))
2838 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
2840 info[i++] = "It produces chaotic effects.";
2845 if (f1 & (TR1_VAMPIRIC))
2848 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
2850 info[i++] = "It drains life from your foes.";
2855 if (f1 & (TR1_IMPACT))
2858 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
2860 info[i++] = "It can cause earthquakes.";
2865 if (f1 & (TR1_VORPAL))
2868 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2870 info[i++] = "It is very sharp and can cut your foes.";
2875 if (f1 & (TR1_KILL_DRAGON))
2878 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2880 info[i++] = "It is a great bane of dragons.";
2884 else if (f1 & (TR1_SLAY_DRAGON))
2887 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2889 info[i++] = "It is especially deadly against dragons.";
2893 if (f1 & (TR1_SLAY_ORC))
2896 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2898 info[i++] = "It is especially deadly against orcs.";
2902 if (f1 & (TR1_SLAY_TROLL))
2905 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2907 info[i++] = "It is especially deadly against trolls.";
2911 if (f1 & (TR1_SLAY_GIANT))
2913 if (o_ptr->name1 == ART_HRUNTING)
2915 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2917 info[i++] = "It is a great bane of giants.";
2921 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2923 info[i++] = "It is especially deadly against giants.";
2927 if (f1 & (TR1_SLAY_DEMON))
2930 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2932 info[i++] = "It strikes at demons with holy wrath.";
2936 if (f1 & (TR1_SLAY_UNDEAD))
2939 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2941 info[i++] = "It strikes at undead with holy wrath.";
2945 if (f1 & (TR1_SLAY_EVIL))
2948 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
2950 info[i++] = "It fights against evil with holy fury.";
2954 if (f1 & (TR1_SLAY_ANIMAL))
2957 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2959 info[i++] = "It is especially deadly against natural creatures.";
2964 if (f1 & (TR1_FORCE_WEAPON))
2967 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
2969 info[i++] = "It powerfully strikes at a monster using your mana.";
2973 if (f3 & (TR3_DEC_MANA))
2976 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
2978 info[i++] = "It decreases your mana consumption.";
2982 if (f2 & (TR2_SUST_STR))
2985 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
2987 info[i++] = "It sustains your strength.";
2991 if (f2 & (TR2_SUST_INT))
2994 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
2996 info[i++] = "It sustains your intelligence.";
3000 if (f2 & (TR2_SUST_WIS))
3003 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
3005 info[i++] = "It sustains your wisdom.";
3009 if (f2 & (TR2_SUST_DEX))
3012 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
3014 info[i++] = "It sustains your dexterity.";
3018 if (f2 & (TR2_SUST_CON))
3021 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
3023 info[i++] = "It sustains your constitution.";
3027 if (f2 & (TR2_SUST_CHR))
3030 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
3032 info[i++] = "It sustains your charisma.";
3037 if (f2 & (TR2_IM_ACID))
3040 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3042 info[i++] = "It provides immunity to acid.";
3046 if (f2 & (TR2_IM_ELEC))
3049 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3051 info[i++] = "It provides immunity to electricity.";
3055 if (f2 & (TR2_IM_FIRE))
3058 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3060 info[i++] = "It provides immunity to fire.";
3064 if (f2 & (TR2_IM_COLD))
3067 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3069 info[i++] = "It provides immunity to cold.";
3074 if (f2 & (TR2_THROW))
3077 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3079 info[i++] = "It is perfectly balanced for throwing.";
3083 if (f2 & (TR2_FREE_ACT))
3086 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3088 info[i++] = "It provides immunity to paralysis.";
3092 if (f2 & (TR2_HOLD_LIFE))
3095 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
3097 info[i++] = "It provides resistance to life draining.";
3101 if (f2 & (TR2_RES_FEAR))
3104 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3106 info[i++] = "It makes you completely fearless.";
3110 if (f2 & (TR2_RES_ACID))
3113 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3115 info[i++] = "It provides resistance to acid.";
3119 if (f2 & (TR2_RES_ELEC))
3122 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3124 info[i++] = "It provides resistance to electricity.";
3128 if (f2 & (TR2_RES_FIRE))
3131 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3133 info[i++] = "It provides resistance to fire.";
3137 if (f2 & (TR2_RES_COLD))
3140 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3142 info[i++] = "It provides resistance to cold.";
3146 if (f2 & (TR2_RES_POIS))
3149 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3151 info[i++] = "It provides resistance to poison.";
3156 if (f2 & (TR2_RES_LITE))
3159 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3161 info[i++] = "It provides resistance to light.";
3165 if (f2 & (TR2_RES_DARK))
3168 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3170 info[i++] = "It provides resistance to dark.";
3175 if (f2 & (TR2_RES_BLIND))
3178 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3180 info[i++] = "It provides resistance to blindness.";
3184 if (f2 & (TR2_RES_CONF))
3187 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3189 info[i++] = "It provides resistance to confusion.";
3193 if (f2 & (TR2_RES_SOUND))
3196 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3198 info[i++] = "It provides resistance to sound.";
3202 if (f2 & (TR2_RES_SHARDS))
3205 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3207 info[i++] = "It provides resistance to shards.";
3212 if (f2 & (TR2_RES_NETHER))
3215 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3217 info[i++] = "It provides resistance to nether.";
3221 if (f2 & (TR2_RES_NEXUS))
3224 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3226 info[i++] = "It provides resistance to nexus.";
3230 if (f2 & (TR2_RES_CHAOS))
3233 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3235 info[i++] = "It provides resistance to chaos.";
3239 if (f2 & (TR2_RES_DISEN))
3242 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3244 info[i++] = "It provides resistance to disenchantment.";
3249 if (f3 & (TR3_FEATHER))
3252 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3254 info[i++] = "It allows you to levitate.";
3258 if (f3 & (TR3_LITE))
3260 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
3262 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë¡£";
3264 info[i++] = "It decreases radius of your light source.";
3268 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
3270 info[i++] = "It provides permanent light.";
3274 if (f3 & (TR3_SEE_INVIS))
3277 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3279 info[i++] = "It allows you to see invisible monsters.";
3283 if (f3 & (TR3_TELEPATHY))
3286 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
3288 info[i++] = "It gives telepathic powers.";
3292 if (f3 & (TR3_SLOW_DIGEST))
3295 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
3297 info[i++] = "It slows your metabolism.";
3301 if (f3 & (TR3_REGEN))
3304 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
3306 info[i++] = "It speeds your regenerative powers.";
3310 if (f3 & (TR3_WARNING))
3313 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
3315 info[i++] = "It warns you of danger";
3319 if (f2 & (TR2_REFLECT))
3322 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
3324 info[i++] = "It reflects bolts and arrows.";
3328 if (f3 & (TR3_SH_FIRE))
3331 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3333 info[i++] = "It produces a fiery sheath.";
3337 if (f3 & (TR3_SH_ELEC))
3340 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3342 info[i++] = "It produces an electric sheath.";
3346 if (f3 & (TR3_SH_COLD))
3349 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3351 info[i++] = "It produces a coldly sheath.";
3355 if (f3 & (TR3_NO_MAGIC))
3358 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3360 info[i++] = "It produces an anti-magic shell.";
3364 if (f3 & (TR3_NO_TELE))
3367 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
3369 info[i++] = "It prevents teleportation.";
3373 if (f3 & (TR3_XTRA_MIGHT))
3376 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3378 info[i++] = "It fires missiles with extra might.";
3382 if (f3 & (TR3_XTRA_SHOTS))
3385 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3387 info[i++] = "It fires missiles excessively fast.";
3392 if (f3 & (TR3_DRAIN_EXP))
3395 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
3397 info[i++] = "It drains experience.";
3401 if (f3 & (TR3_TELEPORT))
3404 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
3406 info[i++] = "It induces random teleportation.";
3410 if (f3 & TR3_AGGRAVATE)
3413 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
3415 info[i++] = "It aggravates nearby creatures.";
3420 if (f3 & TR3_BLESSED)
3423 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
3425 info[i++] = "It has been blessed by the gods.";
3430 if (cursed_p(o_ptr))
3432 if (f3 & TR3_PERMA_CURSE)
3435 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3437 info[i++] = "It is permanently cursed.";
3441 else if (f3 & TR3_HEAVY_CURSE)
3444 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3446 info[i++] = "It is heavily cursed.";
3453 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
3455 info[i++] = "It is cursed.";
3461 if (f3 & TR3_TY_CURSE)
3464 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
3466 info[i++] = "It carries an ancient foul curse.";
3471 /* XTRA HACK ARTDESC */
3472 flag = TR3_IGNORE_ACID | TR3_IGNORE_ELEC | TR3_IGNORE_FIRE | TR3_IGNORE_COLD ;
3473 if ((f3 & flag) == flag)
3476 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3478 info[i++] = "It cannot be harmed by the elements.";
3481 if (f3 & (TR3_IGNORE_ACID))
3484 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3486 info[i++] = "It cannot be harmed by acid.";
3490 if (f3 & (TR3_IGNORE_ELEC))
3493 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3495 info[i++] = "It cannot be harmed by electricity.";
3499 if (f3 & (TR3_IGNORE_FIRE))
3502 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3504 info[i++] = "It cannot be harmed by fire.";
3508 if (f3 & (TR3_IGNORE_COLD))
3511 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3513 info[i++] = "It cannot be harmed by cold.";
3518 /* XTRA HACK ARTDESC */
3521 /* No special effects */
3522 if (!i) return (FALSE);
3524 /* Save the screen */
3528 Term_get_size(&wid, &hgt);
3530 /* Display Item name */
3531 object_desc(o_name, o_ptr, TRUE, 3);
3532 prt(format("%s", o_name), 0, 0);
3534 /* Erase the screen */
3535 for (k = 1; k < hgt; k++) prt("", k, 13);
3537 /* Label the information */
3538 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
3540 monster_race *r_ptr = &r_info[o_ptr->pval];
3541 int namelen = strlen(r_name + r_ptr->name);
3542 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
3543 c_prt(r_ptr->d_attr, format("%c", r_ptr->d_char), 1, 18+namelen);
3544 prt("'", 1, 19+namelen);
3548 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
3550 prt(" Item Attributes:", 1, 15);
3553 /* We will print on top of the map (column 13) */
3554 for (k = 2, j = 0; j < i; j++)
3557 prt(info[j], k++, 15);
3559 /* Every 20 entries (lines 2 to 21), start over */
3560 if ((k == hgt - 2) && (j+1 < i))
3563 prt("-- ³¤¯ --", k, 15);
3565 prt("-- more --", k, 15);
3568 for (; k > 2; k--) prt("", k, 15);
3574 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
3576 prt("[Press any key to continue]", k, 15);
3581 /* Restore the screen */
3584 /* Gave knowledge */
3591 * Convert an inventory index into a one character label
3592 * Note that the label does NOT distinguish inven/equip.
3594 char index_to_label(int i)
3596 /* Indexes for "inven" are easy */
3597 if (i < INVEN_RARM) return (I2A(i));
3599 /* Indexes for "equip" are offset */
3600 return (I2A(i - INVEN_RARM));
3605 * Convert a label into the index of an item in the "inven"
3606 * Return "-1" if the label does not indicate a real item
3608 s16b label_to_inven(int c)
3613 i = (islower(c) ? A2I(c) : -1);
3615 /* Verify the index */
3616 if ((i < 0) || (i > INVEN_PACK)) return (-1);
3618 /* Empty slots can never be chosen */
3619 if (!inventory[i].k_idx) return (-1);
3621 /* Return the index */
3627 * Convert a label into the index of a item in the "equip"
3628 * Return "-1" if the label does not indicate a real item
3630 s16b label_to_equip(int c)
3635 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
3637 /* Verify the index */
3638 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
3640 /* Empty slots can never be chosen */
3641 if (!inventory[i].k_idx) return (-1);
3643 /* Return the index */
3650 * Determine which equipment slot (if any) an item likes
3652 s16b wield_slot(object_type *o_ptr)
3654 /* Slot for equipment */
3655 switch (o_ptr->tval)
3662 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
3663 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
3664 return (INVEN_LARM);
3671 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
3672 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
3673 return (INVEN_RARM);
3683 /* Use the right hand first */
3684 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
3686 /* Use the left hand for swapping (by default) */
3687 return (INVEN_LEFT);
3693 return (INVEN_NECK);
3698 return (INVEN_LITE);
3705 return (INVEN_BODY);
3710 return (INVEN_OUTER);
3716 return (INVEN_HEAD);
3721 return (INVEN_HANDS);
3726 return (INVEN_FEET);
3730 /* No slot available */
3736 * Return a string mentioning how a given item is carried
3738 cptr mention_use(int i)
3742 /* Examine the location */
3746 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê"); break;
3748 case INVEN_RARM: p = "Wielding"; break;
3752 case INVEN_LARM: p = (left_hander ? " ±¦¼ê" : " º¸¼ê"); break;
3754 case INVEN_LARM: p = "On arm"; break;
3758 case INVEN_BOW: p = "¼Í·âÍÑ"; break;
3760 case INVEN_BOW: p = "Shooting"; break;
3764 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
3766 case INVEN_LEFT: p = "On left hand"; break;
3770 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
3772 case INVEN_RIGHT: p = "On right hand"; break;
3776 case INVEN_NECK: p = " ¼ó"; break;
3778 case INVEN_NECK: p = "Around neck"; break;
3782 case INVEN_LITE: p = " ¸÷¸»"; break;
3784 case INVEN_LITE: p = "Light source"; break;
3788 case INVEN_BODY: p = " ÂÎ"; break;
3790 case INVEN_BODY: p = "On body"; break;
3794 case INVEN_OUTER: p = "ÂΤξå"; break;
3796 case INVEN_OUTER: p = "About body"; break;
3800 case INVEN_HEAD: p = " Ƭ"; break;
3802 case INVEN_HEAD: p = "On head"; break;
3806 case INVEN_HANDS: p = " ¼ê"; break;
3808 case INVEN_HANDS: p = "On hands"; break;
3812 case INVEN_FEET: p = " "; break;
3814 case INVEN_FEET: p = "On feet"; break;
3818 default: p = "¥¶¥Ã¥¯"; break;
3820 default: p = "In pack"; break;
3825 /* Hack -- Heavy weapon */
3826 if (i == INVEN_RARM)
3828 if (p_ptr->heavy_wield[0])
3839 /* Hack -- Heavy weapon */
3840 if (i == INVEN_LARM)
3842 if (p_ptr->heavy_wield[1])
3853 /* Hack -- Heavy bow */
3857 o_ptr = &inventory[i];
3858 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
3869 /* Return the result */
3875 * Return a string describing how a given item is being worn.
3876 * Currently, only used for items in the equipment, not inventory.
3878 cptr describe_use(int i)
3885 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
3887 case INVEN_RARM: p = "attacking monsters with"; break;
3891 case INVEN_LARM: p = (left_hander ? " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
3893 case INVEN_LARM: p = "wearing on your arm"; break;
3897 case INVEN_BOW: p = "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
3899 case INVEN_BOW: p = "shooting missiles with"; break;
3903 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3905 case INVEN_LEFT: p = "wearing on your left hand"; break;
3909 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3911 case INVEN_RIGHT: p = "wearing on your right hand"; break;
3915 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
3917 case INVEN_NECK: p = "wearing around your neck"; break;
3921 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
3923 case INVEN_LITE: p = "using to light the way"; break;
3927 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
3929 case INVEN_BODY: p = "wearing on your body"; break;
3933 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
3935 case INVEN_OUTER: p = "wearing on your back"; break;
3939 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
3941 case INVEN_HEAD: p = "wearing on your head"; break;
3945 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
3947 case INVEN_HANDS: p = "wearing on your hands"; break;
3951 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
3953 case INVEN_FEET: p = "wearing on your feet"; break;
3957 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
3959 default: p = "carrying in your pack"; break;
3964 /* Hack -- Heavy weapon */
3965 if (i == INVEN_RARM)
3968 int hold = adj_str_hold[p_ptr->stat_ind[A_STR]];
3970 if (p_ptr->ryoute) hold *= 2;
3971 o_ptr = &inventory[i];
3972 if (hold < o_ptr->weight / 10)
3983 /* Hack -- Heavy bow */
3987 o_ptr = &inventory[i];
3988 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
3991 p = "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î";
3999 /* Return the result */
4004 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
4006 bool check_book_realm(const byte book_tval, const byte book_sval)
4008 if (book_tval < TV_LIFE_BOOK) return FALSE;
4009 if (p_ptr->pclass == CLASS_SORCERER)
4011 return is_magic(tval2realm(book_tval));
4013 else if (p_ptr->pclass == CLASS_RED_MAGE)
4015 if (is_magic(tval2realm(book_tval)))
4016 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
4018 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
4023 * Check an item against the item tester info
4025 bool item_tester_okay(object_type *o_ptr)
4027 /* Hack -- allow listing empty slots */
4028 if (item_tester_full) return (TRUE);
4030 /* Require an item */
4031 if (!o_ptr->k_idx) return (FALSE);
4033 /* Hack -- ignore "gold" */
4034 if (o_ptr->tval == TV_GOLD) return (FALSE);
4036 /* Check the tval */
4037 if (item_tester_tval)
4039 /* Is it a spellbook? If so, we need a hack -- TY */
4040 if ((item_tester_tval <= TV_DEATH_BOOK) &&
4041 (item_tester_tval >= TV_LIFE_BOOK))
4042 return check_book_realm(o_ptr->tval, o_ptr->sval);
4044 if (item_tester_tval != o_ptr->tval) return (FALSE);
4047 /* Check the hook */
4048 if (item_tester_hook)
4050 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
4061 * Choice window "shadow" of the "show_inven()" function
4063 void display_inven(void)
4065 register int i, n, z = 0;
4067 byte attr = TERM_WHITE;
4069 char o_name[MAX_NLEN];
4072 /* Find the "final" slot */
4073 for (i = 0; i < INVEN_PACK; i++)
4075 o_ptr = &inventory[i];
4077 /* Skip non-objects */
4078 if (!o_ptr->k_idx) continue;
4084 /* Display the pack */
4085 for (i = 0; i < z; i++)
4087 /* Examine the item */
4088 o_ptr = &inventory[i];
4090 /* Start with an empty "index" */
4091 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4093 /* Is this item "acceptable"? */
4094 if (item_tester_okay(o_ptr))
4096 /* Prepare an "index" */
4097 tmp_val[0] = index_to_label(i);
4099 /* Bracket the "index" --(-- */
4103 /* Display the index (or blank space) */
4104 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
4106 /* Obtain an item description */
4107 object_desc(o_name, o_ptr, TRUE, 3);
4109 /* Obtain the length of the description */
4113 attr = tval_to_attr[o_ptr->tval % 128];
4115 /* Grey out charging items */
4121 /* Display the entry itself */
4122 Term_putstr(3, i, n, attr, o_name);
4124 /* Erase the rest of the line */
4125 Term_erase(3+n, i, 255);
4127 /* Display the weight if needed */
4128 if (show_weights && o_ptr->weight)
4130 int wgt = o_ptr->weight * o_ptr->number;
4132 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
4134 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4137 Term_putstr(71, i, -1, TERM_WHITE, tmp_val);
4141 /* Erase the rest of the window */
4142 for (i = z; i < Term->hgt; i++)
4144 /* Erase the line */
4145 Term_erase(0, i, 255);
4152 * Choice window "shadow" of the "show_equip()" function
4154 void display_equip(void)
4158 byte attr = TERM_WHITE;
4160 char o_name[MAX_NLEN];
4163 /* Display the equipment */
4164 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
4166 /* Examine the item */
4167 o_ptr = &inventory[i];
4169 /* Start with an empty "index" */
4170 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4172 /* Is this item "acceptable"? */
4173 if (item_tester_okay(o_ptr))
4175 /* Prepare an "index" */
4176 tmp_val[0] = index_to_label(i);
4178 /* Bracket the "index" --(-- */
4182 /* Display the index (or blank space) */
4183 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
4185 /* Obtain an item description */
4186 if ((i == INVEN_LARM) && p_ptr->ryoute)
4189 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
4191 strcpy(o_name, "(wielding with two-hands)");
4197 object_desc(o_name, o_ptr, TRUE, 3);
4198 attr = tval_to_attr[o_ptr->tval % 128];
4201 /* Obtain the length of the description */
4204 /* Grey out charging items */
4210 /* Display the entry itself */
4211 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
4213 /* Erase the rest of the line */
4214 Term_erase(3+n, i - INVEN_RARM, 255);
4216 /* Display the slot description (if needed) */
4219 Term_putstr(61, i - INVEN_RARM, -1, TERM_WHITE, "<--");
4220 Term_putstr(65, i - INVEN_RARM, -1, TERM_WHITE, mention_use(i));
4223 /* Display the weight (if needed) */
4224 if (show_weights && o_ptr->weight)
4226 int wgt = o_ptr->weight * o_ptr->number;
4227 int col = (show_labels ? 52 : 71);
4229 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
4231 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4234 Term_putstr(col, i - INVEN_RARM, -1, TERM_WHITE, tmp_val);
4238 /* Erase the rest of the window */
4239 for (i = INVEN_TOTAL - INVEN_RARM; i < Term->hgt; i++)
4241 /* Clear that line */
4242 Term_erase(0, i, 255);
4252 * Display the inventory.
4254 * Hack -- do not display "trailing" empty slots
4256 int show_inven(int target_item)
4258 int i, j, k, l, z = 0;
4259 int col, cur_col, len, lim;
4261 char o_name[MAX_NLEN];
4265 char out_desc[23][MAX_NLEN];
4266 int target_item_label = 0;
4270 /* Starting column */
4274 Term_get_size(&wid, &hgt);
4276 /* Default "max-length" */
4277 len = wid - col - 1;
4279 /* Maximum space allowed for descriptions */
4282 /* Require space for weight (if needed) */
4283 if (show_weights) lim -= 9;
4285 /* Require space for icon */
4286 if (show_item_graph)
4289 if (use_bigtile) lim--;
4292 /* Find the "final" slot */
4293 for (i = 0; i < INVEN_PACK; i++)
4295 o_ptr = &inventory[i];
4297 /* Skip non-objects */
4298 if (!o_ptr->k_idx) continue;
4304 /* Display the inventory */
4305 for (k = 0, i = 0; i < z; i++)
4307 o_ptr = &inventory[i];
4309 /* Is this item acceptable? */
4310 if (!item_tester_okay(o_ptr)) continue;
4312 /* Describe the object */
4313 object_desc(o_name, o_ptr, TRUE, 3);
4315 /* Hack -- enforce max length */
4318 /* Save the object index, color, and description */
4320 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4322 /* Grey out charging items */
4325 out_color[k] = TERM_L_DARK;
4328 (void)strcpy(out_desc[k], o_name);
4330 /* Find the predicted "line length" */
4331 l = strlen(out_desc[k]) + 5;
4333 /* Be sure to account for the weight */
4334 if (show_weights) l += 9;
4336 /* Account for icon if displayed */
4337 if (show_item_graph)
4340 if (use_bigtile) l++;
4343 /* Maintain the maximum length */
4344 if (l > len) len = l;
4346 /* Advance to next "line" */
4350 /* Find the column to start in */
4351 col = (len > wid - 4) ? 0 : (wid - len - 1);
4353 /* Output each entry */
4354 for (j = 0; j < k; j++)
4360 o_ptr = &inventory[i];
4362 /* Clear the line */
4363 prt("", j + 1, col ? col - 2 : col);
4365 if (use_menu && target_item)
4367 if (j == (target_item-1))
4370 strcpy(tmp_val, "¡Õ");
4372 strcpy(tmp_val, "> ");
4374 target_item_label = i;
4376 else strcpy(tmp_val, " ");
4379 /* Prepare an index --(-- */
4380 sprintf(tmp_val, "%c)", index_to_label(i));
4382 /* Clear the line with the (possibly indented) index */
4383 put_str(tmp_val, j + 1, col);
4387 /* Display graphics for object, if desired */
4388 if (show_item_graph)
4390 byte a = object_attr(o_ptr);
4391 char c = object_char(o_ptr);
4394 if (a & 0x80) a |= 0x40;
4397 Term_draw(cur_col, j + 1, a, c);
4402 Term_draw(cur_col, j + 1, 255, 255);
4408 /* Display the entry itself */
4409 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
4411 /* Display the weight if needed */
4414 int wgt = o_ptr->weight * o_ptr->number;
4416 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4418 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4421 put_str(tmp_val, j + 1, wid - 9);
4425 /* Make a "shadow" below the list (only if needed) */
4426 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4428 /* Save the new column */
4431 return target_item_label;
4437 * Display the equipment.
4439 int show_equip(int target_item)
4442 int col, cur_col, len, lim;
4445 char o_name[MAX_NLEN];
4448 char out_desc[23][MAX_NLEN];
4449 int target_item_label = 0;
4453 /* Starting column */
4457 Term_get_size(&wid, &hgt);
4459 /* Maximal length */
4460 len = wid - col - 1;
4462 /* Maximum space allowed for descriptions */
4465 /* Require space for labels (if needed) */
4467 if (show_labels) lim -= (7 + 2);
4469 if (show_labels) lim -= (14 + 2);
4473 /* Require space for weight (if needed) */
4475 if (show_weights) lim -= 10;
4477 if (show_weights) lim -= 9;
4481 if (show_item_graph) lim -= 2;
4483 /* Scan the equipment list */
4484 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
4486 o_ptr = &inventory[i];
4488 /* Is this item acceptable? */
4489 if (!item_tester_okay(o_ptr) && (!((i == INVEN_LARM) && p_ptr->ryoute) || item_tester_no_ryoute)) continue;
4492 object_desc(o_name, o_ptr, TRUE, 3);
4494 /* Truncate the description */
4497 if ((i == INVEN_LARM) && p_ptr->ryoute)
4500 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
4502 (void)strcpy(out_desc[k],"(wielding with two-hands)");
4508 (void)strcpy(out_desc[k], o_name);
4509 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4513 /* Grey out charging items */
4516 out_color[k] = TERM_L_DARK;
4519 /* Extract the maximal length (see below) */
4521 l = strlen(out_desc[k]) + (2 + 1);
4523 l = strlen(out_desc[k]) + (2 + 3);
4527 /* Increase length for labels (if needed) */
4529 if (show_labels) l += (7 + 2);
4531 if (show_labels) l += (14 + 2);
4535 /* Increase length for weight (if needed) */
4536 if (show_weights) l += 9;
4538 if (show_item_graph) l += 2;
4540 /* Maintain the max-length */
4541 if (l > len) len = l;
4543 /* Advance the entry */
4547 /* Hack -- Find a column to start in */
4549 col = (len > wid - 6) ? 0 : (wid - len - 1);
4551 col = (len > wid - 4) ? 0 : (wid - len - 1);
4555 /* Output each entry */
4556 for (j = 0; j < k; j++)
4562 o_ptr = &inventory[i];
4564 /* Clear the line */
4565 prt("", j + 1, col ? col - 2 : col);
4567 if (use_menu && target_item)
4569 if (j == (target_item-1))
4572 strcpy(tmp_val, "¡Õ");
4574 strcpy(tmp_val, "> ");
4576 target_item_label = i;
4578 else strcpy(tmp_val, " ");
4581 /* Prepare an index --(-- */
4582 sprintf(tmp_val, "%c)", index_to_label(i));
4584 /* Clear the line with the (possibly indented) index */
4585 put_str(tmp_val, j+1, col);
4589 /* Display graphics for object, if desired */
4590 if (show_item_graph)
4592 byte a = object_attr(o_ptr);
4593 char c = object_char(o_ptr);
4596 if (a & 0x80) a |= 0x40;
4599 Term_draw(cur_col, j + 1, a, c);
4604 Term_draw(cur_col, j + 1, 255, 255);
4612 /* Mention the use */
4614 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
4616 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
4619 put_str(tmp_val, j+1, cur_col);
4621 /* Display the entry itself */
4623 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
4625 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
4632 /* Display the entry itself */
4633 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
4636 /* Display the weight if needed */
4639 int wgt = o_ptr->weight * o_ptr->number;
4641 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4643 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
4646 put_str(tmp_val, j+1, wid - 9);
4650 /* Make a "shadow" below the list (only if needed) */
4651 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4653 /* Save the new column */
4656 return target_item_label;
4663 * Flip "inven" and "equip" in any sub-windows
4665 void toggle_inven_equip(void)
4670 for (j = 0; j < 8; j++)
4673 if (!angband_term[j]) continue;
4675 /* Flip inven to equip */
4676 if (window_flag[j] & (PW_INVEN))
4679 window_flag[j] &= ~(PW_INVEN);
4680 window_flag[j] |= (PW_EQUIP);
4683 p_ptr->window |= (PW_EQUIP);
4686 /* Flip inven to equip */
4687 else if (window_flag[j] & (PW_EQUIP))
4690 window_flag[j] &= ~(PW_EQUIP);
4691 window_flag[j] |= (PW_INVEN);
4694 p_ptr->window |= (PW_INVEN);
4702 * Verify the choice of an item.
4704 * The item can be negative to mean "item on floor".
4706 static bool verify(cptr prompt, int item)
4708 char o_name[MAX_NLEN];
4709 char out_val[MAX_NLEN+20];
4716 o_ptr = &inventory[item];
4722 o_ptr = &o_list[0 - item];
4726 object_desc(o_name, o_ptr, TRUE, 3);
4730 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
4732 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
4737 return (get_check(out_val));
4742 * Hack -- allow user to "prevent" certain choices
4744 * The item can be negative to mean "item on floor".
4746 static bool get_item_allow(int item)
4755 o_ptr = &inventory[item];
4761 o_ptr = &o_list[0 - item];
4764 /* No inscription */
4765 if (!o_ptr->inscription) return (TRUE);
4768 s = strchr(quark_str(o_ptr->inscription), '!');
4770 /* Process preventions */
4773 /* Check the "restriction" */
4774 if ((s[1] == command_cmd) || (s[1] == '*'))
4776 /* Verify the choice */
4778 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
4780 if (!verify("Really try", item)) return (FALSE);
4785 /* Find another '!' */
4786 s = strchr(s + 1, '!');
4796 * Auxiliary function for "get_item()" -- test an index
4798 static bool get_item_okay(int i)
4801 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
4803 /* Verify the item */
4804 if (!item_tester_okay(&inventory[i])) return (FALSE);
4813 * Find the "first" inventory object with the given "tag".
4815 * A "tag" is a char "n" appearing as "@n" anywhere in the
4816 * inscription of an object.
4818 * Also, the tag "@xn" will work as well, where "n" is a tag-char,
4819 * and "x" is the "current" command_cmd code.
4821 static int get_tag(int *cp, char tag)
4826 /* Check every object */
4827 for (i = 0; i < INVEN_TOTAL; ++i)
4829 object_type *o_ptr = &inventory[i];
4831 /* Skip non-objects */
4832 if (!o_ptr->k_idx) continue;
4834 /* Skip empty inscriptions */
4835 if (!o_ptr->inscription) continue;
4837 /* Skip non-choice */
4838 if (!item_tester_okay(o_ptr)) continue;
4841 s = strchr(quark_str(o_ptr->inscription), '@');
4843 /* Process all tags */
4846 /* Check the special tags */
4847 if ((s[1] == command_cmd) && (s[2] == tag))
4849 /* Save the actual inventory ID */
4856 /* Find another '@' */
4857 s = strchr(s + 1, '@');
4861 /* Check every object */
4862 for (i = 0; i < INVEN_TOTAL; ++i)
4864 object_type *o_ptr = &inventory[i];
4866 /* Skip non-objects */
4867 if (!o_ptr->k_idx) continue;
4869 /* Skip empty inscriptions */
4870 if (!o_ptr->inscription) continue;
4872 /* Skip non-choice */
4873 if (!item_tester_okay(o_ptr)) continue;
4876 s = strchr(quark_str(o_ptr->inscription), '@');
4878 /* Process all tags */
4881 /* Check the normal tags */
4882 if (s[1] == tag && !((s[2] >= '0' && s[2] <= '9') || (s[2] >= 'a' && s[2] <= 'z') || (s[2] >= 'A' && s[2] <= 'Z')))
4884 /* Save the actual inventory ID */
4891 /* Find another '@' */
4892 s = strchr(s + 1, '@');
4901 * Determine whether get_item() can get some item or not
4902 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
4904 bool can_get_item(void)
4906 int j, floor_list[23], floor_num = 0;
4908 for (j = 0; j < INVEN_TOTAL; j++)
4909 if (item_tester_okay(&inventory[j]))
4912 (void)scan_floor(floor_list, &floor_num, py, px, 0x01);
4920 * Let the user select an item, save its "index"
4922 * Return TRUE only if an acceptable item was chosen by the user.
4924 * The selected item must satisfy the "item_tester_hook()" function,
4925 * if that hook is set, and the "item_tester_tval", if that value is set.
4927 * All "item_tester" restrictions are cleared before this function returns.
4929 * The user is allowed to choose acceptable items from the equipment,
4930 * inventory, or floor, respectively, if the proper flag was given,
4931 * and there are any acceptable items in that location.
4933 * The equipment or inventory are displayed (even if no acceptable
4934 * items are in that location) if the proper flag was given.
4936 * If there are no acceptable items available anywhere, and "str" is
4937 * not NULL, then it will be used as the text of a warning message
4938 * before the function returns.
4940 * Note that the user must press "-" to specify the item on the floor,
4941 * and there is no way to "examine" the item on the floor, while the
4942 * use of "capital" letters will "examine" an inventory/equipment item,
4943 * and prompt for its use.
4945 * If a legal item is selected from the inventory, we save it in "cp"
4946 * directly (0 to 35), and return TRUE.
4948 * If a legal item is selected from the floor, we save it in "cp" as
4949 * a negative (-1 to -511), and return TRUE.
4951 * If no item is available, we do nothing to "cp", and we display a
4952 * warning message, using "str" if available, and return FALSE.
4954 * If no item is selected, we do nothing to "cp", and return FALSE.
4956 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
4957 * to allow the user to enter a command while viewing those screens, and
4958 * also to induce "auto-enter" of stores, and other such stuff.
4960 * Global "p_ptr->command_see" may be set before calling this function to start
4961 * out in "browse" mode. It is cleared before this function returns.
4963 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
4964 * If it is TRUE then we are viewing inventory, else equipment.
4966 * We always erase the prompt when we are done, leaving a blank line,
4967 * or a warning message, if appropriate, if no items are available.
4969 bool get_item(int *cp, cptr pmt, cptr str, int mode)
4971 s16b this_o_idx, next_o_idx = 0;
4973 char n1, n2, which = ' ';
4975 int j, k, i1, i2, e1, e2;
4985 bool allow_floor = FALSE;
4987 bool toggle = FALSE;
4993 extern bool select_spellbook;
4994 extern bool select_the_force;
4996 int menu_line = (use_menu ? 1 : 0);
5000 #ifdef ALLOW_EASY_FLOOR /* TNB */
5002 if (easy_floor) return get_item_floor(cp, pmt, str, mode);
5004 #endif /* ALLOW_EASY_FLOOR -- TNB */
5008 /* Get the item index */
5009 if (repeat_pull(cp))
5011 if (*cp == 1111) { /* the_force */
5012 item_tester_tval = 0;
5013 item_tester_hook = NULL;
5024 /* Acquire object */
5027 /* Validate the item */
5028 if (item_tester_okay(o_ptr))
5030 /* Forget the item_tester_tval restriction */
5031 item_tester_tval = 0;
5033 /* Forget the item_tester_hook restriction */
5034 item_tester_hook = NULL;
5041 /* Verify the item */
5042 else if (get_item_okay(*cp))
5044 /* Forget the item_tester_tval restriction */
5045 item_tester_tval = 0;
5047 /* Forget the item_tester_hook restriction */
5048 item_tester_hook = NULL;
5055 #endif /* ALLOW_REPEAT */
5058 if (mode & (USE_EQUIP)) equip = TRUE;
5059 if (mode & (USE_INVEN)) inven = TRUE;
5060 if (mode & (USE_FLOOR)) floor = TRUE;
5063 /* Paranoia XXX XXX XXX */
5070 /* No item selected */
5074 /* Full inventory */
5076 i2 = INVEN_PACK - 1;
5078 /* Forbid inventory */
5079 if (!inven) i2 = -1;
5082 for (j = 0; j < INVEN_PACK; j++)
5083 if (item_tester_okay(&inventory[j])) max_inven++;
5086 /* Restrict inventory indexes */
5087 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5088 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5091 /* Full equipment */
5093 e2 = INVEN_TOTAL - 1;
5095 /* Forbid equipment */
5096 if (!equip) e2 = -1;
5099 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5100 if (item_tester_okay(&inventory[j])) max_equip++;
5101 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5104 /* Restrict equipment indexes */
5105 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5106 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5110 /* Restrict floor usage */
5113 /* Scan all objects in the grid */
5114 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5118 /* Acquire object */
5119 o_ptr = &o_list[this_o_idx];
5121 /* Acquire next object */
5122 next_o_idx = o_ptr->next_o_idx;
5124 /* Accept the item on the floor if legal */
5125 if (item_tester_okay(o_ptr)) allow_floor = TRUE;
5130 /* Require at least one legal choice */
5131 if (!allow_floor && (i1 > i2) && (e1 > e2))
5133 /* Cancel p_ptr->command_see */
5134 command_see = FALSE;
5142 if (select_the_force) {
5148 /* Analyze choices */
5151 /* Hack -- Start on equipment if requested */
5152 if (command_see && command_wrk && equip)
5158 /* Use inventory if allowed */
5161 command_wrk = FALSE;
5164 /* Use equipment if allowed */
5170 /* Use inventory for floor */
5173 command_wrk = FALSE;
5179 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5181 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5183 /* Hack -- start out in "display" mode */
5191 /* Repeat until done */
5194 int get_item_label = 0;
5203 for (j = 0; j < 8; j++)
5206 if (!angband_term[j]) continue;
5208 /* Count windows displaying inven */
5209 if (window_flag[j] & (PW_INVEN)) ni++;
5211 /* Count windows displaying equip */
5212 if (window_flag[j] & (PW_EQUIP)) ne++;
5215 /* Toggle if needed */
5216 if ((command_wrk && ni && !ne) ||
5217 (!command_wrk && !ni && ne))
5220 toggle_inven_equip();
5227 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5229 /* Redraw windows */
5233 /* Inventory screen */
5236 /* Extract the legal requests */
5240 /* Redraw if needed */
5241 if (command_see) get_item_label = show_inven(menu_line);
5244 /* Equipment screen */
5247 /* Extract the legal requests */
5248 n1 = I2A(e1 - INVEN_RARM);
5249 n2 = I2A(e2 - INVEN_RARM);
5251 /* Redraw if needed */
5252 if (command_see) get_item_label = show_equip(menu_line);
5255 /* Viewing inventory */
5258 /* Begin the prompt */
5260 sprintf(out_val, "»ý¤Áʪ:");
5262 sprintf(out_val, "Inven:");
5266 /* Some legal items */
5267 if ((i1 <= i2) && !use_menu)
5269 /* Build the prompt */
5271 sprintf(tmp_val, "%c-%c,",
5273 sprintf(tmp_val, " %c-%c,",
5276 index_to_label(i1), index_to_label(i2));
5279 strcat(out_val, tmp_val);
5282 /* Indicate ability to "view" */
5284 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5286 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5292 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
5293 else if (select_the_force)
5294 strcat(out_val, " 'w'Îýµ¤½Ñ,");
5296 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
5297 else if (select_the_force)
5298 strcat(out_val, " w for the Force,");
5303 /* Viewing equipment */
5306 /* Begin the prompt */
5308 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5310 sprintf(out_val, "Equip:");
5314 /* Some legal items */
5315 if ((e1 <= e2) && !use_menu)
5317 /* Build the prompt */
5319 sprintf(tmp_val, "%c-%c,",
5321 sprintf(tmp_val, " %c-%c,",
5324 index_to_label(e1), index_to_label(e2));
5327 strcat(out_val, tmp_val);
5330 /* Indicate ability to "view" */
5332 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5334 if (!command_see) strcat(out_val, " * to see,");
5340 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
5342 if (inven) strcat(out_val, " / for Inven,");
5347 /* Indicate legality of the "floor" item */
5349 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
5351 if (allow_floor) strcat(out_val, " - for floor,");
5355 /* Finish the prompt */
5356 strcat(out_val, " ESC");
5358 /* Build the prompt */
5359 sprintf(tmp_val, "(%s) %s", out_val, pmt);
5361 /* Show the prompt */
5370 int max_line = (command_wrk ? max_equip : max_inven);
5386 menu_line += (max_line - 1);
5405 /* Verify legality */
5406 if (!inven || !equip)
5412 /* Hack -- Fix screen */
5422 /* Switch inven/equip */
5423 command_wrk = !command_wrk;
5424 max_line = (command_wrk ? max_equip : max_inven);
5425 if (menu_line > max_line) menu_line = max_line;
5427 /* Need to redraw */
5436 /* Validate the item */
5437 if (!get_item_okay(get_item_label))
5443 /* Allow player to "refuse" certain actions */
5444 if (!get_item_allow(get_item_label))
5450 /* Accept that choice */
5451 (*cp) = get_item_label;
5458 if (select_the_force) {
5466 if (menu_line > max_line) menu_line -= max_line;
5487 command_see = FALSE;
5507 /* Verify legality */
5508 if (!inven || !equip)
5514 /* Hack -- Fix screen */
5524 /* Switch inven/equip */
5525 command_wrk = !command_wrk;
5527 /* Need to redraw */
5533 /* Use floor item */
5536 /* Scan all objects in the grid */
5537 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5541 /* Acquire object */
5542 o_ptr = &o_list[this_o_idx];
5544 /* Acquire next object */
5545 next_o_idx = o_ptr->next_o_idx;
5547 /* Validate the item */
5548 if (!item_tester_okay(o_ptr)) continue;
5553 /* Verify the item (if required) */
5555 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
5557 if (other_query_flag && !verify("Try", k)) continue;
5561 /* Allow player to "refuse" certain actions */
5562 if (!get_item_allow(k)) continue;
5564 /* Accept that choice */
5581 case '1': case '2': case '3':
5582 case '4': case '5': case '6':
5583 case '7': case '8': case '9':
5585 /* Look up the tag */
5586 if (!get_tag(&k, which))
5592 /* Hack -- Validate the item */
5593 if ((k < INVEN_RARM) ? !inven : !equip)
5599 /* Validate the item */
5600 if (!get_item_okay(k))
5606 /* Allow player to "refuse" certain actions */
5607 if (!get_item_allow(k))
5613 /* Accept that choice */
5625 /* Choose "default" inventory item */
5628 k = ((i1 == i2) ? i1 : -1);
5631 /* Choose "default" equipment item */
5634 k = ((e1 == e2) ? e1 : -1);
5637 /* Validate the item */
5638 if (!get_item_okay(k))
5644 /* Allow player to "refuse" certain actions */
5645 if (!get_item_allow(k))
5651 /* Accept that choice */
5660 if (select_the_force) {
5672 if(select_spellbook){
5673 bool not_found = FALSE;
5674 /* Look up the tag */
5675 if (!get_tag(&k, which))
5680 /* Hack -- Validate the item */
5681 if ((k < INVEN_RARM) ? !inven : !equip)
5686 /* Validate the item */
5687 if (!get_item_okay(k))
5693 /* Accept that choice */
5701 /* Extract "query" setting */
5702 ver = isupper(which);
5703 which = tolower(which);
5705 /* Convert letter to inventory index */
5708 k = label_to_inven(which);
5711 /* Convert letter to equipment index */
5714 k = label_to_equip(which);
5717 /* Validate the item */
5718 if (!get_item_okay(k))
5724 /* Verify the item */
5726 if (ver && !verify("ËÜÅö¤Ë", k))
5728 if (ver && !verify("Try", k))
5736 /* Allow player to "refuse" certain actions */
5737 if (!get_item_allow(k))
5743 /* Accept that choice */
5754 /* Fix the screen if necessary */
5760 /* Hack -- Cancel "display" */
5761 command_see = FALSE;
5765 /* Forget the item_tester_tval restriction */
5766 item_tester_tval = 0;
5768 item_tester_no_ryoute = FALSE;
5770 /* Forget the item_tester_hook restriction */
5771 item_tester_hook = NULL;
5777 /* Toggle again if needed */
5778 if (toggle) toggle_inven_equip();
5781 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5788 /* Clear the prompt line */
5791 /* Warning if needed */
5792 if (oops && str) msg_print(str);
5795 if (item) repeat_push(*cp);
5796 #endif /* ALLOW_REPEAT */
5803 #ifdef ALLOW_EASY_FLOOR
5808 * Return a list of o_list[] indexes of items at the given cave
5809 * location. Valid flags are:
5811 * mode & 0x01 -- Item tester
5812 * mode & 0x02 -- Marked items only
5813 * mode & 0x04 -- Stop after first
5815 bool scan_floor(int *items, int *item_num, int y, int x, int mode)
5817 int this_o_idx, next_o_idx;
5824 if (!in_bounds(y, x)) return (FALSE);
5826 /* Scan all objects in the grid */
5827 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
5831 /* Acquire object */
5832 o_ptr = &o_list[this_o_idx];
5834 /* Acquire next object */
5835 next_o_idx = o_ptr->next_o_idx;
5838 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
5841 if ((mode & 0x02) && !o_ptr->marked) continue;
5843 /* Accept this item */
5844 items[num++] = this_o_idx;
5847 if (mode & 0x04) break;
5849 /* XXX Hack -- Enforce limit */
5850 if (num == 23) break;
5853 /* Number of items */
5861 * Display a list of the items on the floor at the given location.
5863 int show_floor(int target_item, int y, int x)
5870 char o_name[MAX_NLEN];
5876 char out_desc[23][MAX_NLEN];
5877 int target_item_label = 0;
5879 int floor_list[23], floor_num;
5883 Term_get_size(&wid, &hgt);
5885 /* Default length */
5888 /* Maximum space allowed for descriptions */
5891 /* Require space for weight (if needed) */
5892 if (show_weights) lim -= 9;
5894 /* Scan for objects in the grid, using item_tester_okay() */
5895 (void) scan_floor(floor_list, &floor_num, y, x, 0x01);
5897 /* Display the inventory */
5898 for (k = 0, i = 0; i < floor_num; i++)
5900 o_ptr = &o_list[floor_list[i]];
5902 /* Describe the object */
5903 object_desc(o_name, o_ptr, TRUE, 3);
5905 /* Hack -- enforce max length */
5908 /* Save the index */
5911 /* Acquire inventory color */
5912 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
5914 /* Save the object description */
5915 strcpy(out_desc[k], o_name);
5917 /* Find the predicted "line length" */
5918 l = strlen(out_desc[k]) + 5;
5920 /* Be sure to account for the weight */
5921 if (show_weights) l += 9;
5923 /* Maintain the maximum length */
5924 if (l > len) len = l;
5926 /* Advance to next "line" */
5930 /* Find the column to start in */
5931 col = (len > wid - 4) ? 0 : (wid - len - 1);
5933 /* Output each entry */
5934 for (j = 0; j < k; j++)
5937 i = floor_list[out_index[j]];
5942 /* Clear the line */
5943 prt("", j + 1, col ? col - 2 : col);
5945 if (use_menu && target_item)
5947 if (j == (target_item-1))
5950 strcpy(tmp_val, "¡Õ");
5952 strcpy(tmp_val, "> ");
5954 target_item_label = i;
5956 else strcpy(tmp_val, " ");
5959 /* Prepare an index --(-- */
5960 sprintf(tmp_val, "%c)", index_to_label(j));
5962 /* Clear the line with the (possibly indented) index */
5963 put_str(tmp_val, j + 1, col);
5965 /* Display the entry itself */
5966 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
5968 /* Display the weight if needed */
5971 int wgt = o_ptr->weight * o_ptr->number;
5973 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5975 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
5978 put_str(tmp_val, j + 1, wid - 9);
5982 /* Make a "shadow" below the list (only if needed) */
5983 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5985 return target_item_label;
5989 * This version of get_item() is called by get_item() when
5990 * the easy_floor is on.
5992 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
5994 char n1 = ' ', n2 = ' ', which = ' ';
5996 int j, k, i1, i2, e1, e2;
6006 bool allow_equip = FALSE;
6007 bool allow_inven = FALSE;
6008 bool allow_floor = FALSE;
6010 bool toggle = FALSE;
6015 int floor_num, floor_list[23], floor_top = 0;
6017 extern bool select_spellbook;
6018 extern bool select_the_force;
6020 int menu_line = (use_menu ? 1 : 0);
6026 /* Get the item index */
6027 if (repeat_pull(cp))
6029 if (*cp == 1111) { /* the_force */
6030 item_tester_tval = 0;
6031 item_tester_hook = NULL;
6042 /* Acquire object */
6045 /* Validate the item */
6046 if (item_tester_okay(o_ptr))
6048 /* Forget the item_tester_tval restriction */
6049 item_tester_tval = 0;
6051 /* Forget the item_tester_hook restriction */
6052 item_tester_hook = NULL;
6059 /* Verify the item */
6060 else if (get_item_okay(*cp))
6062 /* Forget the item_tester_tval restriction */
6063 item_tester_tval = 0;
6065 /* Forget the item_tester_hook restriction */
6066 item_tester_hook = NULL;
6073 #endif /* ALLOW_REPEAT */
6076 if (mode & (USE_EQUIP)) equip = TRUE;
6077 if (mode & (USE_INVEN)) inven = TRUE;
6078 if (mode & (USE_FLOOR)) floor = TRUE;
6081 /* Paranoia XXX XXX XXX */
6088 /* No item selected */
6092 /* Full inventory */
6094 i2 = INVEN_PACK - 1;
6096 /* Forbid inventory */
6097 if (!inven) i2 = -1;
6100 for (j = 0; j < INVEN_PACK; j++)
6101 if (item_tester_okay(&inventory[j])) max_inven++;
6104 /* Restrict inventory indexes */
6105 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
6106 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
6109 /* Full equipment */
6111 e2 = INVEN_TOTAL - 1;
6113 /* Forbid equipment */
6114 if (!equip) e2 = -1;
6117 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
6118 if (item_tester_okay(&inventory[j])) max_equip++;
6119 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
6122 /* Restrict equipment indexes */
6123 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
6124 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
6127 /* Count "okay" floor items */
6130 /* Restrict floor usage */
6133 /* Scan all objects in the grid */
6134 (void) scan_floor(floor_list, &floor_num, py, px, 0x01);
6137 /* Accept inventory */
6138 if (i1 <= i2) allow_inven = TRUE;
6140 /* Accept equipment */
6141 if (e1 <= e2) allow_equip = TRUE;
6144 if (floor_num) allow_floor = TRUE;
6146 /* Require at least one legal choice */
6147 if (!allow_inven && !allow_equip && !allow_floor)
6149 /* Cancel p_ptr->command_see */
6150 command_see = FALSE;
6158 if (select_the_force) {
6164 /* Analyze choices */
6167 /* Hack -- Start on equipment if requested */
6168 if (command_see && (command_wrk == (USE_EQUIP))
6171 command_wrk = (USE_EQUIP);
6174 /* Use inventory if allowed */
6175 else if (allow_inven)
6177 command_wrk = (USE_INVEN);
6180 /* Use equipment if allowed */
6181 else if (allow_equip)
6183 command_wrk = (USE_EQUIP);
6186 /* Use floor if allowed */
6187 else if (allow_floor)
6189 command_wrk = (USE_FLOOR);
6194 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
6196 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
6198 /* Hack -- start out in "display" mode */
6205 /* Repeat until done */
6208 int get_item_label = 0;
6217 for (j = 0; j < 8; j++)
6220 if (!angband_term[j]) continue;
6222 /* Count windows displaying inven */
6223 if (window_flag[j] & (PW_INVEN)) ni++;
6225 /* Count windows displaying equip */
6226 if (window_flag[j] & (PW_EQUIP)) ne++;
6229 /* Toggle if needed */
6230 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
6231 (command_wrk == (USE_INVEN) && !ni && ne))
6234 toggle_inven_equip();
6241 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6243 /* Redraw windows */
6247 /* Inventory screen */
6248 if (command_wrk == (USE_INVEN))
6250 /* Extract the legal requests */
6254 /* Redraw if needed */
6255 if (command_see) get_item_label = show_inven(menu_line);
6258 /* Equipment screen */
6259 else if (command_wrk == (USE_EQUIP))
6261 /* Extract the legal requests */
6262 n1 = I2A(e1 - INVEN_RARM);
6263 n2 = I2A(e2 - INVEN_RARM);
6265 /* Redraw if needed */
6266 if (command_see) get_item_label = show_equip(menu_line);
6270 else if (command_wrk == (USE_FLOOR))
6273 k = MIN(floor_top + 23, floor_num) - 1;
6275 /* Extract the legal requests */
6276 n1 = I2A(j - floor_top);
6277 n2 = I2A(k - floor_top);
6279 /* Redraw if needed */
6280 if (command_see) get_item_label = show_floor(menu_line, py, px);
6283 /* Viewing inventory */
6284 if (command_wrk == (USE_INVEN))
6286 /* Begin the prompt */
6288 sprintf(out_val, "»ý¤Áʪ:");
6290 sprintf(out_val, "Inven:");
6295 /* Build the prompt */
6297 sprintf(tmp_val, "%c-%c,",
6299 sprintf(tmp_val, " %c-%c,",
6302 index_to_label(i1), index_to_label(i2));
6305 strcat(out_val, tmp_val);
6308 /* Indicate ability to "view" */
6310 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6312 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6323 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
6325 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6327 else strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
6329 else if (select_the_force)
6330 strcat(out_val, " 'w'Îýµ¤½Ñ,");
6337 strcat(out_val, " 6 for Equip,");
6339 strcat(out_val, " 4 or 6 for Equip,");
6341 else strcat(out_val, " / for Equip,");
6343 else if (select_the_force)
6344 strcat(out_val, " w for the Force,");
6354 strcat(out_val, " '4' ¾²¾å,");
6356 strcat(out_val, " '4'or'6' ¾²¾å,");
6358 else strcat(out_val, " '-'¾²¾å,");
6361 if (allow_floor) strcat(out_val, " - for floor,");
6366 /* Viewing equipment */
6367 else if (command_wrk == (USE_EQUIP))
6369 /* Begin the prompt */
6371 sprintf(out_val, "ÁõÈ÷ÉÊ:");
6373 sprintf(out_val, "Equip:");
6379 /* Build the prompt */
6381 sprintf(tmp_val, "%c-%c,",
6383 sprintf(tmp_val, " %c-%c,",
6386 index_to_label(e1), index_to_label(e2));
6389 strcat(out_val, tmp_val);
6392 /* Indicate ability to "view" */
6394 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6396 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6407 strcat(out_val, " '4' »ý¤Áʪ,");
6409 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6411 else strcat(out_val, " '/' »ý¤Áʪ,");
6414 if (allow_inven) strcat(out_val, " / for Inven,");
6425 strcat(out_val, " '6' ¾²¾å,");
6427 strcat(out_val, " '4'or'6' ¾²¾å,");
6429 else strcat(out_val, " '-'¾²¾å,");
6432 if (allow_floor) strcat(out_val, " - for floor,");
6438 else if (command_wrk == (USE_FLOOR))
6440 /* Begin the prompt */
6442 sprintf(out_val, "¾²¾å:");
6444 sprintf(out_val, "Floor:");
6450 /* Build the prompt */
6452 sprintf(tmp_val, "%c-%c,", n1, n2);
6454 sprintf(tmp_val, " %c-%c,", n1, n2);
6459 strcat(out_val, tmp_val);
6462 /* Indicate ability to "view" */
6464 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6466 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6472 if (allow_inven && allow_equip)
6475 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
6477 strcat(out_val, " / for Inven,");
6481 else if (allow_inven)
6484 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6486 strcat(out_val, " / for Inven,");
6490 else if (allow_equip)
6493 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6495 strcat(out_val, " / for Equip,");
6501 else if (allow_inven)
6504 strcat(out_val, " '/' »ý¤Áʪ,");
6506 strcat(out_val, " / for Inven,");
6510 else if (allow_equip)
6513 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6515 strcat(out_val, " / for Equip,");
6521 /* Finish the prompt */
6522 strcat(out_val, " ESC");
6524 /* Build the prompt */
6525 sprintf(tmp_val, "(%s) %s", out_val, pmt);
6527 /* Show the prompt */
6536 if (command_wrk == USE_INVEN) max_line = max_inven;
6537 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6538 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6554 menu_line += (max_line - 1);
6570 /* Verify legality */
6571 if (command_wrk == (USE_INVEN))
6573 if (allow_floor) command_wrk = USE_FLOOR;
6574 else if (allow_equip) command_wrk = USE_EQUIP;
6581 else if (command_wrk == (USE_EQUIP))
6583 if (allow_inven) command_wrk = USE_INVEN;
6584 else if (allow_floor) command_wrk = USE_FLOOR;
6591 else if (command_wrk == (USE_FLOOR))
6593 if (allow_equip) command_wrk = USE_EQUIP;
6594 else if (allow_inven) command_wrk = USE_INVEN;
6607 /* Hack -- Fix screen */
6617 /* Switch inven/equip */
6618 if (command_wrk == USE_INVEN) max_line = max_inven;
6619 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6620 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6621 if (menu_line > max_line) menu_line = max_line;
6623 /* Need to redraw */
6631 /* Verify legality */
6632 if (command_wrk == (USE_INVEN))
6634 if (allow_equip) command_wrk = USE_EQUIP;
6635 else if (allow_floor) command_wrk = USE_FLOOR;
6642 else if (command_wrk == (USE_EQUIP))
6644 if (allow_floor) command_wrk = USE_FLOOR;
6645 else if (allow_inven) command_wrk = USE_INVEN;
6652 else if (command_wrk == (USE_FLOOR))
6654 if (allow_inven) command_wrk = USE_INVEN;
6655 else if (allow_equip) command_wrk = USE_EQUIP;
6668 /* Hack -- Fix screen */
6678 /* Switch inven/equip */
6679 if (command_wrk == USE_INVEN) max_line = max_inven;
6680 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6681 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6682 if (menu_line > max_line) menu_line = max_line;
6684 /* Need to redraw */
6693 /* Validate the item */
6694 if (!get_item_okay(get_item_label))
6700 /* Allow player to "refuse" certain actions */
6701 if (!get_item_allow(get_item_label))
6707 /* Accept that choice */
6708 (*cp) = get_item_label;
6715 if (select_the_force) {
6723 if (menu_line > max_line) menu_line -= max_line;
6744 command_see = FALSE;
6764 if (command_wrk == (USE_INVEN))
6771 command_wrk = (USE_EQUIP);
6773 else if (command_wrk == (USE_EQUIP))
6780 command_wrk = (USE_INVEN);
6782 else if (command_wrk == (USE_FLOOR))
6786 command_wrk = (USE_INVEN);
6788 else if (allow_equip)
6790 command_wrk = (USE_EQUIP);
6799 /* Hack -- Fix screen */
6809 /* Need to redraw */
6822 * If we are already examining the floor, and there
6823 * is only one item, we will always select it.
6824 * If we aren't examining the floor and there is only
6825 * one item, we will select it if floor_query_flag
6830 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
6833 k = 0 - floor_list[0];
6835 /* Allow player to "refuse" certain actions */
6836 if (!get_item_allow(k))
6842 /* Accept that choice */
6851 /* Hack -- Fix screen */
6861 command_wrk = (USE_FLOOR);
6867 case '1': case '2': case '3':
6868 case '4': case '5': case '6':
6869 case '7': case '8': case '9':
6871 /* Look up the tag */
6872 if (!get_tag(&k, which))
6878 /* Hack -- Validate the item */
6879 if ((k < INVEN_RARM) ? !inven : !equip)
6885 /* Validate the item */
6886 if (!get_item_okay(k))
6892 /* Allow player to "refuse" certain actions */
6893 if (!get_item_allow(k))
6899 /* Accept that choice */
6911 /* Choose "default" inventory item */
6912 if (command_wrk == (USE_INVEN))
6914 k = ((i1 == i2) ? i1 : -1);
6917 /* Choose "default" equipment item */
6918 else if (command_wrk == (USE_EQUIP))
6920 k = ((e1 == e2) ? e1 : -1);
6923 /* Choose "default" floor item */
6924 else if (command_wrk == (USE_FLOOR))
6929 k = 0 - floor_list[0];
6931 /* Allow player to "refuse" certain actions */
6932 if (!get_item_allow(k))
6938 /* Accept that choice */
6946 /* Validate the item */
6947 if (!get_item_okay(k))
6953 /* Allow player to "refuse" certain actions */
6954 if (!get_item_allow(k))
6960 /* Accept that choice */
6969 if (select_the_force) {
6981 if(select_spellbook){
6982 bool not_found = FALSE;
6983 /* Look up the tag */
6984 if (!get_tag(&k, which))
6989 /* Hack -- Validate the item */
6990 if ((k < INVEN_RARM) ? !inven : !equip)
6995 /* Validate the item */
6996 if (!get_item_okay(k))
7002 /* Accept that choice */
7010 /* Extract "query" setting */
7011 ver = isupper(which);
7012 which = tolower(which);
7014 /* Convert letter to inventory index */
7015 if (command_wrk == (USE_INVEN))
7017 k = label_to_inven(which);
7020 /* Convert letter to equipment index */
7021 else if (command_wrk == (USE_EQUIP))
7023 k = label_to_equip(which);
7026 /* Convert letter to floor index */
7027 else if (command_wrk == USE_FLOOR)
7029 k = islower(which) ? A2I(which) : -1;
7030 if (k < 0 || k >= floor_num)
7037 k = 0 - floor_list[k];
7040 /* Validate the item */
7041 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
7047 /* Verify the item */
7049 if (ver && !verify("ËÜÅö¤Ë", k))
7051 if (ver && !verify("Try", k))
7059 /* Allow player to "refuse" certain actions */
7060 if (!get_item_allow(k))
7066 /* Accept that choice */
7076 /* Fix the screen if necessary */
7082 /* Hack -- Cancel "display" */
7083 command_see = FALSE;
7087 /* Forget the item_tester_tval restriction */
7088 item_tester_tval = 0;
7090 /* Forget the item_tester_hook restriction */
7091 item_tester_hook = NULL;
7097 /* Toggle again if needed */
7098 if (toggle) toggle_inven_equip();
7101 p_ptr->window |= (PW_INVEN | PW_EQUIP);
7108 /* Clear the prompt line */
7111 /* Warning if needed */
7112 if (oops && str) msg_print(str);
7115 if (item) repeat_push(*cp);
7116 #endif /* ALLOW_REPEAT */
7123 bool py_pickup_floor_aux(void)
7133 /* Restrict the choices */
7134 item_tester_hook = inven_carry_okay;
7138 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
7139 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
7141 q = "Get which item? ";
7142 s = "You no longer have any room for the objects on the floor.";
7145 if (get_item(&item, q, s, (USE_FLOOR)))
7147 this_o_idx = 0 - item;
7154 /* Access the object */
7155 o_ptr = &o_list[this_o_idx];
7157 /* Pick up the object */
7158 py_pickup_aux(this_o_idx);
7165 * Make the player carry everything in a grid
7167 * If "pickup" is FALSE then only gold will be picked up
7169 * This is called by py_pickup() when easy_floor is TRUE.
7171 void py_pickup_floor(int pickup)
7173 s16b this_o_idx, next_o_idx = 0;
7175 char o_name[MAX_NLEN];
7178 int floor_num = 0, floor_list[23], floor_o_idx = 0;
7182 /* Scan the pile of objects */
7183 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
7187 /* Access the object */
7188 o_ptr = &o_list[this_o_idx];
7190 /* Describe the object */
7191 object_desc(o_name, o_ptr, TRUE, 3);
7193 /* Access the next object */
7194 next_o_idx = o_ptr->next_o_idx;
7196 /* Hack -- disturb */
7200 if (o_ptr->tval == TV_GOLD)
7204 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
7205 (long)o_ptr->pval, o_name);
7207 msg_format("You have found %ld gold pieces worth of %s.",
7208 (long) o_ptr->pval, o_name);
7212 /* Collect the gold */
7213 p_ptr->au += o_ptr->pval;
7216 p_ptr->redraw |= (PR_GOLD);
7219 p_ptr->window |= (PW_PLAYER);
7221 /* Delete the gold */
7222 delete_object_idx(this_o_idx);
7224 /* Check the next object */
7228 /* Count non-gold objects that can be picked up. */
7229 if (inven_carry_okay(o_ptr))
7234 /* Remember this object index */
7235 floor_list[floor_num] = this_o_idx;
7237 /* Count non-gold objects */
7240 if (floor_num == 23) break;
7242 /* Remember this index */
7243 floor_o_idx = this_o_idx;
7246 /* There are no non-gold objects */
7250 /* Mention the number of objects */
7256 /* Access the object */
7257 o_ptr = &o_list[floor_o_idx];
7259 #ifdef ALLOW_EASY_SENSE
7261 /* Option: Make object sensing easy */
7264 /* Sense the object */
7265 (void) sense_object(o_ptr);
7268 #endif /* ALLOW_EASY_SENSE */
7270 /* Describe the object */
7271 object_desc(o_name, o_ptr, TRUE, 3);
7275 msg_format("%s¤¬¤¢¤ë¡£", o_name);
7277 msg_format("You see %s.", o_name);
7282 /* Multiple objects */
7287 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
7289 msg_format("You see a pile of %d items.", floor_num);
7298 /* The player has no room for anything on the floor. */
7304 /* Access the object */
7305 o_ptr = &o_list[floor_o_idx];
7307 #ifdef ALLOW_EASY_SENSE
7309 /* Option: Make object sensing easy */
7312 /* Sense the object */
7313 (void) sense_object(o_ptr);
7316 #endif /* ALLOW_EASY_SENSE */
7318 /* Describe the object */
7319 object_desc(o_name, o_ptr, TRUE, 3);
7323 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7325 msg_format("You have no room for %s.", o_name);
7330 /* Multiple objects */
7335 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7337 msg_print("You have no room for any of the objects on the floor.");
7349 /* Hack -- query every object */
7350 if (carry_query_flag)
7352 char out_val[MAX_NLEN+20];
7354 /* Access the object */
7355 o_ptr = &o_list[floor_o_idx];
7357 #ifdef ALLOW_EASY_SENSE
7359 /* Option: Make object sensing easy */
7362 /* Sense the object */
7363 (void) sense_object(o_ptr);
7366 #endif /* ALLOW_EASY_SENSE */
7368 /* Describe the object */
7369 object_desc(o_name, o_ptr, TRUE, 3);
7371 /* Build a prompt */
7373 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7375 (void) sprintf(out_val, "Pick up %s? ", o_name);
7379 /* Ask the user to confirm */
7380 if (!get_check(out_val))
7387 /* Access the object */
7388 o_ptr = &o_list[floor_o_idx];
7390 #ifdef ALLOW_EASY_SENSE
7392 /* Option: Make object sensing easy */
7395 /* Sense the object */
7396 (void) sense_object(o_ptr);
7399 #endif /* ALLOW_EASY_SENSE */
7401 /* Pick up the object */
7402 py_pickup_aux(floor_o_idx);
7405 /* Allow the user to choose an object */
7408 while (can_pickup--)
7410 if (!py_pickup_floor_aux()) break;
7415 #endif /* ALLOW_EASY_FLOOR */