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;
124 ego_item_type *e_ptr = &e_info[o_ptr->name2];
126 (*f1) |= e_ptr->flags1;
127 (*f2) |= e_ptr->flags2;
128 (*f3) |= e_ptr->flags3;
130 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
132 (*f3) &= ~(TR3_SH_FIRE);
134 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
136 (*f1) &= ~(TR1_INFRA);
138 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
140 (*f2) &= ~(TR2_RES_BLIND);
141 (*f3) &= ~(TR3_SEE_INVIS);
145 /* Random artifact ! */
146 if (o_ptr->art_flags1 || o_ptr->art_flags2 || o_ptr->art_flags3)
148 (*f1) |= o_ptr->art_flags1;
149 (*f2) |= o_ptr->art_flags2;
150 (*f3) |= o_ptr->art_flags3;
153 if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
155 if (o_ptr->xtra3 < 33)
157 (*f1) |= (0x00000001 << (o_ptr->xtra3-1));
159 else if (o_ptr->xtra3 < 65)
161 (*f2) |= (0x00000001 << (o_ptr->xtra3-33));
163 else if (o_ptr->xtra3 < 97)
165 (*f3) |= (0x00000001 << (o_ptr->xtra3-65));
167 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ACID)
169 (*f2) |= TR2_RES_ACID;
171 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ELEC)
173 (*f2) |= TR2_RES_ELEC;
175 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_FIRE)
177 (*f2) |= TR2_RES_FIRE;
179 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_COLD)
181 (*f2) |= TR2_RES_COLD;
183 else if (o_ptr->xtra3 == ESSENCE_SH_FIRE)
185 (*f2) |= TR2_RES_FIRE;
186 (*f3) |= TR3_SH_FIRE;
188 else if (o_ptr->xtra3 == ESSENCE_SH_ELEC)
190 (*f2) |= TR2_RES_ELEC;
191 (*f3) |= TR3_SH_ELEC;
193 else if (o_ptr->xtra3 == ESSENCE_SH_COLD)
195 (*f2) |= TR2_RES_COLD;
196 (*f3) |= TR3_SH_COLD;
198 else if (o_ptr->xtra3 == ESSENCE_RESISTANCE)
200 (*f2) |= (TR2_RES_ACID | TR2_RES_ELEC | TR2_RES_FIRE | TR2_RES_COLD);;
208 * Obtain the "flags" for an item which are known to the player
210 void object_flags_known(object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3)
214 object_kind *k_ptr = &k_info[o_ptr->k_idx];
217 (*f1) = (*f2) = (*f3) = 0L;
219 if (!object_aware_p(o_ptr)) return;
222 (*f1) = k_ptr->flags1;
223 (*f2) = k_ptr->flags2;
224 (*f3) = k_ptr->flags3;
226 /* Must be identified */
227 if (!object_known_p(o_ptr)) return;
229 /* Ego-item (known basic flags) */
232 ego_item_type *e_ptr = &e_info[o_ptr->name2];
234 (*f1) |= e_ptr->flags1;
235 (*f2) |= e_ptr->flags2;
236 (*f3) |= e_ptr->flags3;
238 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
240 (*f3) &= ~(TR3_SH_FIRE);
242 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
244 (*f1) &= ~(TR1_INFRA);
246 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
248 (*f2) &= ~(TR2_RES_BLIND);
249 (*f3) &= ~(TR3_SEE_INVIS);
254 #ifdef SPOIL_ARTIFACTS
255 /* Full knowledge for some artifacts */
256 if (artifact_p(o_ptr) || o_ptr->art_name) spoil = TRUE;
257 #endif /* SPOIL_ARTIFACTS */
259 #ifdef SPOIL_EGO_ITEMS
260 /* Full knowledge for some ego-items */
261 if (ego_item_p(o_ptr)) spoil = TRUE;
262 #endif /* SPOIL_EGO_ITEMS */
264 /* Need full knowledge or spoilers */
265 if (spoil || (o_ptr->ident & IDENT_MENTAL))
270 artifact_type *a_ptr = &a_info[o_ptr->name1];
272 (*f1) = a_ptr->flags1;
273 (*f2) = a_ptr->flags2;
274 (*f3) = a_ptr->flags3;
277 /* Random artifact ! */
278 if (o_ptr->art_flags1 || o_ptr->art_flags2 || o_ptr->art_flags3)
280 (*f1) |= o_ptr->art_flags1;
281 (*f2) |= o_ptr->art_flags2;
282 (*f3) |= o_ptr->art_flags3;
286 if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
288 if (o_ptr->xtra3 < 33)
290 (*f1) |= (0x00000001 << (o_ptr->xtra3-1));
292 else if (o_ptr->xtra3 < 65)
294 (*f2) |= (0x00000001 << (o_ptr->xtra3-33));
296 else if (o_ptr->xtra3 < 97)
298 (*f3) |= (0x00000001 << (o_ptr->xtra3-65));
300 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ACID)
302 (*f2) |= TR2_RES_ACID;
304 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ELEC)
306 (*f2) |= TR2_RES_ELEC;
308 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_FIRE)
310 (*f2) |= TR2_RES_FIRE;
312 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_COLD)
314 (*f2) |= TR2_RES_COLD;
316 else if (o_ptr->xtra3 == ESSENCE_SH_FIRE)
318 (*f2) |= TR2_RES_FIRE;
319 (*f3) |= TR3_SH_FIRE;
321 else if (o_ptr->xtra3 == ESSENCE_SH_ELEC)
323 (*f2) |= TR2_RES_ELEC;
324 (*f3) |= TR3_SH_ELEC;
326 else if (o_ptr->xtra3 == ESSENCE_SH_COLD)
328 (*f2) |= TR2_RES_COLD;
329 (*f3) |= TR3_SH_COLD;
331 else if (o_ptr->xtra3 == ESSENCE_RESISTANCE)
333 (*f2) |= (TR2_RES_ACID | TR2_RES_ELEC | TR2_RES_FIRE | TR2_RES_COLD);;
340 * Hack -- describe an item currently in a store's inventory
341 * This allows an item to *look* like the player is "aware" of it
343 void object_desc_store(char *buf, object_type *o_ptr, int pref, int mode)
345 /* Save the "aware" flag */
346 bool hack_aware = object_aware_p(o_ptr);
348 /* Save the "known" flag */
349 bool hack_known = (o_ptr->ident & (IDENT_KNOWN)) ? TRUE : FALSE;
352 /* Set the "known" flag */
353 o_ptr->ident |= (IDENT_KNOWN);
355 /* Force "aware" for description */
356 k_info[o_ptr->k_idx].aware = TRUE;
359 /* Describe the object */
360 object_desc(buf, o_ptr, pref, mode);
363 /* Restore "aware" flag */
364 k_info[o_ptr->k_idx].aware = hack_aware;
366 /* Clear the known flag */
367 if (!hack_known) o_ptr->ident &= ~(IDENT_KNOWN);
374 * Determine the "Activation" (if any) for an artifact
375 * Return a string, or NULL for "no activation"
377 cptr item_activation(object_type *o_ptr)
381 /* Extract the flags */
382 object_flags(o_ptr, &f1, &f2, &f3);
384 /* Require activation ability */
386 if (!(f3 & (TR3_ACTIVATE))) return ("¤Ê¤·");
388 if (!(f3 & (TR3_ACTIVATE))) return ("nothing");
394 * We need to deduce somehow that it is a random artifact -- one
395 * problem: It could be a random artifact which has NOT YET received
396 * a name. Thus we eliminate other possibilities instead of checking
400 if (!(o_ptr->name1) &&
405 switch (o_ptr->xtra2)
410 return "ÂÀÍÛ¸÷Àþ : 10 ¥¿¡¼¥óËè";
412 return "beam of sunlight every 10 turns";
419 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
421 return "magic missile (2d6) every 2 turns";
428 return "°½±À (12), Ⱦ·Â 3 , 4+d4 ¥¿¡¼¥óËè";
430 return "stinking cloud (12), rad. 3, every 4+d4 turns";
437 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
439 return "lightning bolt (4d8) every 5+d5 turns";
446 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
448 return "acid bolt (5d8) every 6+d6 turns";
455 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
457 return "frost bolt (6d8) every 7+d7 turns";
464 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
466 return "fire bolt (9d8) every 8+d8 turns";
473 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (48) : 400 ¥¿¡¼¥óËè";
475 return "ball of cold (48) every 400 turns";
482 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (72) : 400 ¥¿¡¼¥óËè";
484 return "ball of fire (72) every 400 turns";
491 return "¥Ò¥Ã¥È¥Ý¥¤¥ó¥ÈµÛ¼ý (100) : 100+d100 ¥¿¡¼¥óËè";
493 return "drain life (100) every 100+d100 turns";
500 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 300 ¥¿¡¼¥óËè";
502 return "ball of cold (100) every 300 turns";
509 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 500 ¥¿¡¼¥óËè";
511 return "ball of lightning (100) every 500 turns";
518 return "¥Ò¥Ã¥È¥Ý¥¤¥ó¥ÈµÛ¼ý(120) : 400 ¥¿¡¼¥óËè";
520 return "drain life (120) every 400 turns";
527 return "µÛ·ì¥É¥ì¥¤¥ó (3*50) : 400 ¥¿¡¼¥óËè";
529 return "vampiric drain (3*50) every 400 turns";
536 return "Ìð (150) : 90+d90 ¥¿¡¼¥óËè";
538 return "arrows (150) every 90+d90 turns";
545 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (120) : 225+d225 ¥¿¡¼¥óËè";
547 return "fire ball (120) every 225+d225 turns";
554 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (200) : 325+d325 ¥¿¡¼¥óËè";
556 return "ball of cold (200) every 325+d325 turns";
563 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (250) : 425+d425 ¥¿¡¼¥óËè";
565 return "ball of lightning (250) every 425+d425 turns";
572 return "¥«¥Þ¥¤¥¿¥Á : 250 ¥¿¡¼¥óËè";
574 return "whirlwind attack every 250 turns";
581 return "µÛ·ì¥É¥ì¥¤¥ó (3*100) : 400 ¥¿¡¼¥óËè";
583 return "vampiric drain (3*100) every 400 turns";
590 return "call chaos : 350 ¥¿¡¼¥óËè"; /*nuke me*/
592 return "call chaos every 350 turns";
599 return "¥í¥±¥Ã¥È (120+level) : 400 ¥¿¡¼¥óËè";
601 return "launch rocket (120+level) every 400 turns";
608 return "¼Ù°Â໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
610 return "dispel evil (level*5) every 300+d300 turns";
617 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300) : 500 ¥¿¡¼¥óËè";
619 return "elemental breath (300) every 500 turns";
626 return "Á±ÎÉÂ໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
628 return "dispel good (level*5) every 300+d300 turns";
635 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
637 return "confuse monster every 15 turns";
644 return "¼þ°Ï¤Î¥â¥ó¥¹¥¿¡¼¤ò̲¤é¤»¤ë : 55 ¥¿¡¼¥óËè";
646 return "sleep nearby monsters every 55 turns";
653 return "ÃÏ¿Ì (Ⱦ·Â 10) : 50 ¥¿¡¼¥óËè";
655 return "earthquake (rad 10) every 50 turns";
662 return "¶²¹² : 3 * (level+10) ¥¿¡¼¥óËè";
664 return "terror every 3 * (level+10) turns";
671 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
673 return "teleport away every 200 turns";
677 case ACT_BANISH_EVIL:
680 return "¼Ù°¾ÃÌÇ : 250+d250 ¥¿¡¼¥óËè";
682 return "banish evil every 250+d250 turns";
689 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
691 return "genocide every 500 turns";
698 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
700 return "mass genocide every 1000 turns";
704 case ACT_CHARM_ANIMAL:
707 return "ưʪ̥λ : 300 ¥¿¡¼¥óËè";
709 return "charm animal every 300 turns";
713 case ACT_CHARM_UNDEAD:
716 return "ÉԻཾ° : 333 ¥¿¡¼¥óËè";
718 return "enslave undead every 333 turns";
722 case ACT_CHARM_OTHER:
725 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 400 ¥¿¡¼¥óËè";
727 return "charm monster every 400 turns";
731 case ACT_CHARM_ANIMALS:
734 return "ưʪͧÏ : 500 ¥¿¡¼¥óËè";
736 return "animal friendship every 500 turns";
740 case ACT_CHARM_OTHERS:
743 return "¼þÊÕ̥λ : 750 ¥¿¡¼¥óËè";
745 return "mass charm every 750 turns";
749 case ACT_SUMMON_ANIMAL:
752 return "ưʪ¾¤´ : 200+d300 ¥¿¡¼¥óËè";
754 return "summon animal every 200+d300 turns";
758 case ACT_SUMMON_PHANTOM:
761 return "»È¤¤Î´ : 200+d200 ¥¿¡¼¥óËè";
763 return "summon phantasmal servant every 200+d200 turns";
767 case ACT_SUMMON_ELEMENTAL:
770 return "¥¨¥ì¥á¥ó¥¿¥ë¾¤´ : 750 ¥¿¡¼¥óËè";
772 return "summon elemental every 750 turns";
776 case ACT_SUMMON_DEMON:
779 return "°Ë⾤´ : 666+d333 ¥¿¡¼¥óËè";
781 return "summon demon every 666+d333 turns";
785 case ACT_SUMMON_UNDEAD:
788 return "ÉԻྤ´ : 666+d333 ¥¿¡¼¥óËè";
790 return "summon undead every 666+d333 turns";
797 return "ͦµ¤²óÉü & 30 hp ²óÉü : 10 ¥¿¡¼¥óËè";
799 return "remove fear & heal 30 hp every 10 turns";
806 return "4d8 hp & ½ý²óÉü : 3+d3 ¥¿¡¼¥óËè";
808 return "heal 4d8 & wounds every 3+d3 turns";
812 case ACT_CURE_POISON:
815 return "ͦµ¤²óÉü/ÆǾä· : 5 ¥¿¡¼¥óËè";
817 return "remove fear and cure poison every 5 turns";
824 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
826 return "restore life levels every 450 turns";
833 return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃͲóÉü : 750 ¥¿¡¼¥óËè";
835 return "restore stats and life levels every 750 turns";
842 return "700 hp ²óÉü : 250 ¥¿¡¼¥óËè";
844 return "heal 700 hit points every 250 turns";
851 return "1000 hp ²óÉü : 888 ¥¿¡¼¥óËè";
853 return "heal 1000 hit points every 888 turns";
860 return "°ì»þŪ¤Ê ESP (´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
862 return "temporary ESP (dur 25+d30) every 200 turns";
869 return "»Îµ¤¹âÍȤȽËÊ¡ (´ü´Ö 50+d50) : 100+d100 ¥¿¡¼¥óËè";
871 return "heroism and blessed (dur 50+d50) every 100+d100 turns";
878 return "Âмٰ·ë³¦ (´ü´Ö level*3 + d25) : 225+d225 ¥¿¡¼¥óËè";
880 return "protect evil (dur level*3 + d25) every 225+d225 turns";
887 return "±êÎä»ÀÅÅÆǤؤÎÂÑÀ (´ü´Ö 40+d40) : 200 ¥¿¡¼¥óËè";
889 return "resist elements (dur 40+d40) every 200 turns";
896 return "²Ã® (´ü´Ö 20+d20) : 250 ¥¿¡¼¥óËè";
898 return "speed (dur 20+d20) every 250 turns";
905 return "²Ã® (´ü´Ö 75+d75) : 200+d200 ¥¿¡¼¥óËè";
907 return "speed (dur 75+d75) every 200+d200 turns";
914 return "¥ì¥¤¥¹²½ (level/2 + d(level/2)) : 1000 ¥¿¡¼¥óËè";
916 return "wraith form (level/2 + d(level/2)) every 1000 turns";
923 return "̵Ũ (´ü´Ö 8+d8) : 1000 ¥¿¡¼¥óËè";
925 return "invulnerability (dur 8+d8) every 1000 turns";
932 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) : 10+d10 ¥¿¡¼¥óËè";
934 return "light area (dam 2d15) every 10+d10 turns";
941 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) & ¼þÊÕ¥Þ¥Ã¥× : 50+d50 ¥¿¡¼¥óËè";
943 return "light (dam 2d15) & map area every 50+d50 turns";
950 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
952 return "detection every 55+d55 turns";
956 case ACT_DETECT_XTRA:
959 return "Á´´¶ÃΡ¢Ãµº÷¡¢*´ÕÄê* : 1000 ¥¿¡¼¥óËè";
961 return "detection, probing and identify true every 1000 turns";
968 return "*´ÕÄê* : 750 ¥¿¡¼¥óËè";
970 return "identify true every 750 turns";
977 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
979 return "identify spell every 10 turns";
986 return "Çúȯ¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
988 return "explosive rune every 200 turns";
995 return "¼é¤ê¤Î¥ë¡¼¥ó : 400 ¥¿¡¼¥óËè";
997 return "rune of protection every 400 turns";
1004 return "¶õÊ¢½¼Â : 200 ¥¿¡¼¥óËè";
1006 return "satisfy hunger every 200 turns";
1013 return "¥É¥¢Ç˲õ : 10 ¥¿¡¼¥óËè";
1015 return "destroy doors every 10 turns";
1022 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
1024 return "stone to mud every 5 turns";
1031 return "ºÆ½¼Å¶ : 70 ¥¿¡¼¥óËè";
1033 return "recharging every 70 turns";
1040 return "Ï£¶â½Ñ : 500 ¥¿¡¼¥óËè";
1042 return "alchemy every 500 turns";
1049 return "¼¡¸µ¤ÎÈâ : 100 ¥¿¡¼¥óËè";
1051 return "dimension door every 100 turns";
1058 return "¥Æ¥ì¥Ý¡¼¥È (range 100) : 45 ¥¿¡¼¥óËè";
1060 return "teleport (range 100) every 45 turns";
1067 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1069 return "word of recall every 200 turns";
1078 return "something undefined";
1085 /* Some artifacts can be activated */
1086 switch (o_ptr->name1)
1091 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1093 return "fire bolt (9d8) every 8+d8 turns";
1100 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1102 return "frost bolt (6d8) every 7+d7 turns";
1109 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1111 return "lightning bolt (4d8) every 6+d6 turns";
1118 return "°½±À(12) : 4+d4 ¥¿¡¼¥óËè";
1120 return "stinking cloud (12) every 4+d4 turns";
1127 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(48) : 5+d5 ¥¿¡¼¥óËè";
1129 return "frost ball (48) every 5+d5 turns";
1136 return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
1138 return "remove fear and cure poison every 5 turns";
1145 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(100) : 200 ¥¿¡¼¥óËè";
1147 return "frost ball (100) every 200 turns";
1154 return "¶Ç¤Î»ÕÃľ¤´ : 500+d500 ¥¿¡¼¥óËè";
1156 return "summon the Legion of the Dawn every 500+d500 turns";
1163 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 400 ¥¿¡¼¥óËè";
1165 return "fire ball (72) every 400 turns";
1172 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 100 ¥¿¡¼¥óËè";
1174 return "large fire ball (72) every 100 turns";
1181 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(120) : 15 ¥¿¡¼¥óËè";
1183 return "large fire ball (120) every 15 turns";
1190 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 200 ¥¿¡¼¥óËè";
1192 return "haste self (20+d20 turns) every 200 turns";
1199 return "À¸Ì¿Îϵۼý(120) : 400 ¥¿¡¼¥óËè";
1201 return "drain life (120) every 400 turns";
1208 return "À¸Ì¿Îϵۼý(90) : 70 ¥¿¡¼¥óËè";
1210 return "drain life (90) every 70 turns";
1217 return "¥É¥¢/¥È¥é¥Ã¥×Ê´ºÕ : 10 ¥¿¡¼¥óËè";
1219 return "door and trap destruction every 10 turns";
1227 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1229 return "word of recall every 200 turns";
1236 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1238 return "haste self (20+d20 turns) every 100+d100 turns";
1245 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
1247 return "identify every 10 turns";
1254 return "õº÷¡¢Á´´¶ÃΡ¢Á´´ÕÄê : 1000 ¥¿¡¼¥óËè";
1256 return "probing, detection and full id every 1000 turns";
1263 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
1265 return "mass genocide every 1000 turns";
1272 return "½ý¤Î¼£Ìþ(4d7) : 3+d3 ¥¿¡¼¥óËè";
1274 return "cure wounds (4d7) every 3+d3 turns";
1281 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
1283 return "fire branding of bolts every 999 turns";
1290 return "¥Õ¥¡¥¤¥¢¡ª : 15 ¥¿¡¼¥óËè";
1292 return "fire! every 15 turns";
1297 case ART_WEREWINDLE:
1300 return "ƨÁö : 35 ¥¿¡¼¥óËè";
1302 return "a getaway every 35 turns";
1309 return "¥Æ¥ì¥Ý¡¼¥È : 25 ¥¿¡¼¥óËè";
1311 return "a teleport every 25 turns";
1318 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1320 return "lightning ball (100) every 200 turns";
1327 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1329 return "Frost ball (100) every 200 turns";
1336 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
1338 return "stone to mud every 5 turns";
1345 return "´äÀÐÍϲò : 2 ¥¿¡¼¥óËè";
1347 return "stone to mud every 2 turns";
1351 case ART_SOULKEEPER:
1354 return "ÂÎÎϲóÉü(1000) : 888 ¥¿¡¼¥óËè";
1356 return "heal (1000) every 888 turns";
1363 return ("²óÉü (777)¡¢Ìþ¤·¡¢»Îµ¤¹âÍÈ : 300 ¥¿¡¼¥óËè");
1365 return ("heal (777), curing and heroism every 300 turns");
1372 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
1374 return "genocide every 500 turns";
1381 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
1383 return "restore life levels every 450 turns";
1390 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
1392 return "teleport away every 150 turns";
1400 return "Á´ÂÑÀ(20+d20¥¿¡¼¥ó) : 111 ¥¿¡¼¥óËè";
1402 return "resistance (20+d20 turns) every 111 turns";
1406 case ART_HOLCOLLETH:
1409 return "¥¹¥ê¡¼¥×(II) : 55 ¥¿¡¼¥óËè";
1411 return "Sleep II every 55 turns";
1418 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
1420 return "recharge item I every 70 turns";
1427 return "¥Æ¥ì¥Ý¡¼¥È : 45 ¥¿¡¼¥óËè";
1429 return "teleport every 45 turns";
1436 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
1438 return "confuse monster every 15 turns";
1442 case ART_CAMMITHRIM:
1445 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1447 return "magic missile (2d6) every 2 turns";
1454 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1456 return "fire bolt (9d8) every 8+d8 turns";
1460 case ART_PAURNIMMEN:
1463 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1465 return "frost bolt (6d8) every 7+d7 turns";
1472 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1474 return "lightning bolt (4d8) every 5+d5 turns";
1481 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
1483 return "acid bolt (5d8) every 6+d6 turns";
1490 return "ËâË¡¤ÎÌð(150) : 90+d90 ¥¿¡¼¥óËè";
1492 return "a magical arrow (150) every 90+d90 turns";
1496 case ART_HOLHENNETH:
1499 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
1501 return "detection every 55+d55 turns";
1508 return "ÂÎÎϲóÉü(500) : 500 ¥¿¡¼¥óËè";
1510 return "heal (700) every 250 turns";
1517 return "¥¹¥¿¡¼¡¦¥Ü¡¼¥ë(150) : 1000 ¥¿¡¼¥óËè";
1519 return "star ball (150) every 1000 turns";
1523 case ART_BLADETURNER:
1526 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300), »Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢ÂÑÀ";
1528 return "breathe elements (300), hero, bless, and resistance";
1535 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1537 return "illumination every 10+d10 turns";
1544 return "ËâË¡¤ÎÃϿޤȸ÷ : 50+d50 ¥¿¡¼¥óËè";
1546 return "magic mapping and light every 50+d50 turns";
1553 return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô";
1555 return "clairvoyance and recall, draining you";
1563 return "¼Ù°Â໶(x5) : 200+d200 ¥¿¡¼¥óËè";
1565 return "dispel evil (x5) every 200+d200 turns";
1572 return "¼Ù°Â໶(x5) : 100+d100 ¥¿¡¼¥óËè";
1574 return "dispel evil (x5) every 100+d100 turns";
1582 return "Âмٰ·ë³¦ : 225+d225 ¥¿¡¼¥óËè";
1584 return "protection from evil every 225+d225 turns";
1591 return "Ã⩹¶·â(100) : 100+d100 ¥¿¡¼¥óËè";
1593 return "a strangling attack (100) every 100+d100 turns";
1600 return "¥¹¥Ô¡¼¥É(75+d75¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1602 return "haste self (75+d75 turns) every 150+d150 turns";
1609 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(300) : 225+d225 ¥¿¡¼¥óËè";
1611 return "large fire ball (300) every 225+d225 turns";
1618 return "µðÂ祢¥¤¥¹¡¦¥Ü¡¼¥ë(400) : 325+d325 ¥¿¡¼¥óËè";
1620 return "large frost ball (400) every 325+d325 turns";
1628 return "µðÂ祵¥ó¥À¡¼¡¦¥Ü¡¼¥ë(500) : 425+d425 ¥¿¡¼¥óËè";
1630 return "large lightning ball (500) every 425+d425 turns";
1638 return "¿®¤¸Æñ¤¤¤³¤È : 450+d450 ¥¿¡¼¥óËè";
1640 return "bizarre things every 450+d450 turns";
1644 case ART_DOR: case ART_TERROR: case ART_STONEMASK:
1647 return "Á´Êý¸þ¤Ø¤Î¶²Éݤθ÷Àþ";
1649 return "rays of fear in every direction";
1656 return "¤³¤Î³¬¤Ë¤¤¤ë¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òɽ¼¨ : 200¥¿¡¼¥óËè";
1658 return "list of the uniques on the level every 200 turns";
1661 case ART_STONE_LORE:
1664 return "´í¸±¤òȼ¤¦´ÕÄê : ¤¤¤Ä¤Ç¤â";
1666 return "perilous identify every turn";
1672 return "³²Ãî¤Î¶î½ü : 55+d55¥¿¡¼¥óËè";
1674 return "dispel small life every 55+d55 turns";
1680 return "¥â¥ó¥¹¥¿¡¼¶²¹² : 40+d40¥¿¡¼¥óËè";
1682 return "frighten monsters every 40+d40 turns";
1688 return "Âмٰ·ë³¦ : 200+d200 ¥¿¡¼¥óËè";
1690 return "protection from evil every 200 + d200 turns";
1696 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
1698 return "a mana bolt (120) every 120+d120 turns";
1704 return "»Îµ¤¹âÍÈ, ¥¹¥Ô¡¼¥É(50+d50¥¿¡¼¥ó) : 100+d200 ¥¿¡¼¥óËè";
1706 return "hero and +10 to speed (50) every 100+200d turns";
1712 return "âÁ¤·¤¤¸÷ : 250 ¥¿¡¼¥óËè";
1714 return "blinding light every 250 turns";
1720 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
1722 return "Recharge item every 200 turns";
1728 return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë¡£";
1730 return "Increase STR (destroyed 50%)";
1736 return "ËâÎϤÎÍò(400) : 250+d250¥¿¡¼¥óËè";
1738 return "a mana storm every 250+d250 turns";
1744 return "ʪÂΤò°ú¤´ó¤»¤ë(½ÅÎÌ25kg¤Þ¤Ç) : 25+d25¥¿¡¼¥óËè";
1746 return "a telekinesis (500 lb) every 25+d25 turns";
1752 return "¥Ï¥¦¥ó¥É¾¤´ : 300+d150¥¿¡¼¥óËè";
1754 return "summon hound every 300+d150 turns";
1760 return "µðÂ祹¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 200+d200 ¥¿¡¼¥óËè";
1762 return "large star ball (200) every 200+d200 turns";
1769 return "Îã¤Î¥¢¥ì : 150+d150 ¥¿¡¼¥óËè";
1771 return "reveal your identity every 150+d150 turns";
1778 return "Çï»ÒÌÚ¤òÂǤÁ¤Ê¤é¤¹ : ¤¤¤Ä¤Ç¤â";
1780 return "beat wooden clappers every turn";
1788 return "»Îµ¤¹âÍÈ : 30+d30¥¿¡¼¥óËè";
1790 return "heroism every 30+d30 turns";
1798 return "Ìþ¤· : 100¥¿¡¼¥óËè";
1800 return "curing every 100 turns";
1808 return "ưʪ̥λ : 200¥¿¡¼¥óËè";
1810 return "charm animal every 200 turns";
1817 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(12d8) : 50 ¥¿¡¼¥óËè";
1819 return "frost bolt (12d8) every 50 turns";
1826 return "°ÀÊѹ¹ : 3333 ¥¿¡¼¥óËè";
1828 return "change zokusei every 3333 turns";
1835 return "¥¦¥©¡¼¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 250 ¥¿¡¼¥óËè";
1837 return "water ball (200) every 250 turns";
1844 return "»Í¸ÔƧ¤ß : 100+d100¥¿¡¼¥óËè";
1846 return "shiko every 100+d100 turns";
1853 return "Î䵤¤ÎÂÑÀ : 40+d40¥¿¡¼¥óËè";
1855 return "resist cold every 40+d40 turns";
1862 return "Âý¤ÎÂç·²¾¤´ : 300+d150¥¿¡¼¥óËè";
1864 return "summon octopus every 300+d150 turns";
1870 return "°Å¹õ¤ÎÍò(250) : 150+d150 ¥¿¡¼¥óËè";
1872 return "darkness storm (250) every 150+d150 turns";
1879 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_TSURIZAO))
1882 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
1884 return "fishing : every time";
1889 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_ACID))
1892 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1894 return "resist acid every 50+d50 turns";
1898 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_ELEC))
1901 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1903 return "resist elec every 50+d50 turns";
1907 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_FIRE))
1910 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1912 return "resist fire every 50+d50 turns";
1916 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_COLD))
1919 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1921 return "resist cold every 50+d50 turns";
1925 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_EARTHQUAKE))
1928 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1930 return "earthquake every 100+d100 turns";
1934 if (o_ptr->name2 == EGO_TRUMP)
1937 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
1939 return "teleport every 50+d50 turns";
1944 if (o_ptr->name2 == EGO_LITE_ILLUMINATION)
1947 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1949 return "illumination every 10+d10 turns";
1953 else if (o_ptr->name2 == EGO_EARTHQUAKES)
1956 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1958 return "earthquake every 100+d100 turns";
1963 else if (o_ptr->name2 == EGO_JUMP)
1966 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1968 return "blink every 10+d10 turns";
1973 if (o_ptr->tval == TV_RING)
1977 switch (o_ptr->name2)
1981 return "»Îµ¤¹âÍÈ : 100+d100¥¿¡¼¥óËè";
1983 return "heroism every 100+d100 turns";
1985 case EGO_RING_MAGIC_MIS:
1987 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1989 return "magic missile (2d6) every 2 turns";
1991 case EGO_RING_FIRE_BOLT:
1993 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1995 return "fire bolt (9d8) every 8+d8 turns";
1997 case EGO_RING_COLD_BOLT:
1999 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
2001 return "frost bolt (6d8) every 7+d7 turns";
2003 case EGO_RING_ELEC_BOLT:
2005 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
2007 return "lightning bolt (4d8) every 5+d5 turns";
2009 case EGO_RING_ACID_BOLT:
2011 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
2013 return "acid bolt (5d8) every 6+d6 turns";
2015 case EGO_RING_MANA_BOLT:
2017 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
2019 return "a mana bolt (120) every 120+d120 turns";
2021 case EGO_RING_FIRE_BALL:
2023 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2025 return "fire ball (100) every 80+d80 turns";
2027 case EGO_RING_COLD_BALL:
2029 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2031 return "cold ball (100) every 80+d80 turns";
2033 case EGO_RING_ELEC_BALL:
2035 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2037 return "elec ball (100) every 80+d80 turns";
2039 case EGO_RING_ACID_BALL:
2041 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2043 return "acid ball (100) every 80+d80 turns";
2045 case EGO_RING_MANA_BALL:
2047 return "ËâÎϤÎÍò (250) : 300 ¥¿¡¼¥óËè";
2049 return "mana storm (250) every 300 turns";
2051 case EGO_RING_DRAGON_F:
2052 if (o_ptr->sval == SV_RING_FLAMES)
2054 return "²Ð±ê¤Î¥Ö¥ì¥¹¤È²Ð¤Ø¤ÎÂÑÀ";
2056 return "breath of fire and resist fire";
2060 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2062 return "fire breath (200) every 250 turns";
2064 case EGO_RING_DRAGON_C:
2065 if (o_ptr->sval == SV_RING_ICE)
2067 return "Î䵤¤Î¥Ö¥ì¥¹¤ÈÎ䵤¤Ø¤ÎÂÑÀ";
2069 return "breath of cold and resist cold";
2073 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2075 return "cold breath (200) every 250 turns";
2077 case EGO_RING_M_DETECT:
2079 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃÎ : 150 ¥¿¡¼¥óËè";
2081 return "detect all monsters every 150 turns";
2083 case EGO_RING_D_SPEED:
2085 return "¥¹¥Ô¡¼¥É(15+d30¥¿¡¼¥ó) : 100 ¥¿¡¼¥óËè";
2087 return "haste self (15+d30 turns) every 100 turns";
2089 case EGO_RING_BERSERKER:
2091 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
2093 return "berserk (25+d25 turns) every 75+d75 turns";
2095 case EGO_RING_TELE_AWAY:
2097 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
2099 return "teleport away every 150 turns";
2103 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ";
2105 return "hero, bless, and ultimate resistance";
2109 switch (o_ptr->sval)
2111 case SV_RING_FLAMES:
2113 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤È²Ð¤Ø¤ÎÂÑÀ";
2115 return "ball of fire and resist fire";
2120 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë¤ÈÎ䵤¤Ø¤ÎÂÑÀ";
2122 return "ball of cold and resist cold";
2127 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤È»À¤Ø¤ÎÂÑÀ";
2129 return "ball of acid and resist acid";
2134 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤ÈÅÅ·â¤Ø¤ÎÂÑÀ";
2136 return "ball of elec and resist elec";
2144 if (o_ptr->tval == TV_AMULET)
2148 switch (o_ptr->name2)
2152 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
2154 return "identify every 10 turns";
2159 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
2161 return "charm monster every 200 turns";
2166 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
2168 return "blink every 10+d10 turns";
2171 case EGO_AMU_TELEPORT:
2173 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
2175 return "teleport every 50+d50 turns";
2178 case EGO_AMU_D_DOOR:
2180 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
2182 return "dimension door every 200 turns";
2185 case EGO_AMU_RES_FIRE_:
2187 return "²Ð±ê¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2189 return "resist fire every 50+d50 turns";
2192 case EGO_AMU_RES_COLD_:
2194 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2196 return "resist cold every 50+d50 turns";
2199 case EGO_AMU_RES_ELEC_:
2201 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2203 return "resist elec every 50+d50 turns";
2206 case EGO_AMU_RES_ACID_:
2208 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2210 return "resist acid every 50+d50 turns";
2213 case EGO_AMU_DETECTION:
2215 return "Á´´¶ÃÎ : 55+d55¥¿¡¼¥óËè";
2217 return "detect all floor every 55+d55 turns";
2224 if (o_ptr->tval == TV_WHISTLE)
2227 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
2229 return "call pet every 100+d100 turns";
2233 if (o_ptr->tval == TV_CAPTURE)
2236 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
2238 return "captures or releases a monster.";
2242 /* Require dragon scale mail */
2244 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
2246 if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
2250 /* Branch on the sub-type */
2251 switch (o_ptr->sval)
2253 case SV_DRAGON_BLUE:
2256 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
2258 return "breathe lightning (100) every 150+d150 turns";
2262 case SV_DRAGON_WHITE:
2265 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
2267 return "breathe frost (110) every 150+d150 turns";
2271 case SV_DRAGON_BLACK:
2274 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
2276 return "breathe acid (130) every 150+d150 turns";
2280 case SV_DRAGON_GREEN:
2283 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
2285 return "breathe poison gas (150) every 180+d180 turns";
2292 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2294 return "breathe fire (200) every 200+d200 turns";
2298 case SV_DRAGON_MULTIHUED:
2301 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
2303 return "breathe multi-hued (250) every 200+d200 turns";
2307 case SV_DRAGON_BRONZE:
2310 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
2312 return "breathe confusion (120) every 180+d180 turns";
2316 case SV_DRAGON_GOLD:
2319 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
2321 return "breathe sound (130) every 180+d180 turns";
2325 case SV_DRAGON_CHAOS:
2328 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
2330 return "breathe chaos/disenchant (220) every 200+d200 turns";
2337 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
2339 return "breathe sound/shards (230) every 200+d200 turns";
2343 case SV_DRAGON_BALANCE:
2346 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
2348 return "breathe balance (250) every 200+d200 turns";
2352 case SV_DRAGON_SHINING:
2355 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2357 return "breathe light/darkness (200) every 200+d200 turns";
2361 case SV_DRAGON_POWER:
2364 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
2366 return "breathe the elements (300) every 200+d200 turns";
2376 return "breathe air";
2383 * Describe a "fully identified" item
2385 bool identify_fully_aux(object_type *o_ptr)
2393 char o_name[MAX_NLEN];
2396 /* Extract the flags */
2397 object_flags(o_ptr, &f1, &f2, &f3);
2403 roff_to_buf( a_text + a_info[ o_ptr->name1 ].text ,77-15,temp);
2404 for(j=0;temp[j];j+=1+strlen(&temp[j]))
2405 { info[i]=&temp[j];i++;}
2408 /* Mega-Hack -- describe activation */
2409 if (f3 & (TR3_ACTIVATE))
2412 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
2414 info[i++] = "It can be activated for...";
2417 info[i++] = item_activation(o_ptr);
2419 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
2421 info[i++] = "...if it is being worn.";
2426 /* Figurines, a hack */
2427 if (o_ptr->tval == TV_FIGURINE)
2430 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
2432 info[i++] = "It will transform into a pet when thrown.";
2437 /* Figurines, a hack */
2438 if (o_ptr->name1 == ART_STONEMASK)
2441 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
2443 info[i++] = "It makes you turn into a vampire permanently.";
2448 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
2451 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
2453 info[i++] = "It will attempts to kill a monster instantly.";
2458 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
2461 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
2463 info[i++] = "It strikes yourself sometimes.";
2467 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
2469 info[i++] = "It will always penetrates invulnerability barrier.";
2473 if (o_ptr->name2 == EGO_2WEAPON)
2476 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
2478 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
2483 if (o_ptr->name2 == EGO_RING_WIZARD)
2486 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
2488 info[i++] = "It affects your ability to use magic devices.";
2492 if (o_ptr->name2 == EGO_AMU_FOOL)
2495 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
2497 info[i++] = "It prevents you from using magic items.";
2501 if (o_ptr->name2 == EGO_RING_THROW)
2504 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2506 info[i++] = "It provides great strength when you throw an item.";
2510 if (o_ptr->name2 == EGO_AMU_NAIVETY)
2513 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
2515 info[i++] = "It decreases your magic resistance.";
2519 if (o_ptr->tval == TV_STATUE)
2521 monster_race *r_ptr = &r_info[o_ptr->pval];
2523 if (o_ptr->pval == MON_BULLGATES)
2525 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
2527 info[i++] = "It is shameful.";
2529 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
2531 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
2533 info[i++] = "It is fearful.";
2537 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
2539 info[i++] = "It is cheerful.";
2543 /* Hack -- describe lite's */
2544 if (o_ptr->tval == TV_LITE)
2546 if (o_ptr->name2 == EGO_LITE_DARKNESS)
2549 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
2551 info[i++] = "It provides no light..";
2554 else if (artifact_p(o_ptr))
2557 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2559 info[i++] = "It provides light (radius 3) forever.";
2563 else if (o_ptr->name2 == EGO_LITE_SHINE)
2565 if (o_ptr->sval == SV_LITE_FEANOR)
2568 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2570 info[i++] = "It provides light (radius 3) forever.";
2574 else if (o_ptr->sval == SV_LITE_LANTERN)
2577 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2579 info[i++] = "It provides light (radius 3) when fueled.";
2586 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2588 info[i++] = "It provides light (radius 2) when fueled.";
2595 if (o_ptr->sval == SV_LITE_FEANOR)
2598 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2600 info[i++] = "It provides light (radius 2) forever.";
2604 else if (o_ptr->sval == SV_LITE_LANTERN)
2607 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2609 info[i++] = "It provides light (radius 2) when fueled.";
2616 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
2618 info[i++] = "It provides light (radius 1) when fueled.";
2623 if (o_ptr->name2 == EGO_LITE_LONG)
2626 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
2628 info[i++] = "It provides light for much longer time.";
2634 /* And then describe it fully */
2636 if (f2 & (TR2_RIDING))
2638 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
2640 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
2642 info[i++] = "It is made for riding.";
2646 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
2648 info[i++] = "It is suitable for riding.";
2655 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2657 info[i++] = "It affects your strength.";
2664 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2666 info[i++] = "It affects your intelligence.";
2673 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2675 info[i++] = "It affects your wisdom.";
2682 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2684 info[i++] = "It affects your dexterity.";
2691 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2693 info[i++] = "It affects your constitution.";
2700 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2702 info[i++] = "It affects your charisma.";
2707 if (f1 & (TR1_MAGIC_MASTERY))
2710 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2712 info[i++] = "It affects your ability to use magic devices.";
2716 if (f1 & (TR1_STEALTH))
2719 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2721 info[i++] = "It affects your stealth.";
2725 if (f1 & (TR1_SEARCH))
2728 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2730 info[i++] = "It affects your searching.";
2734 if (f1 & (TR1_INFRA))
2737 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2739 info[i++] = "It affects your infravision.";
2743 if (f1 & (TR1_TUNNEL))
2746 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2748 info[i++] = "It affects your ability to tunnel.";
2752 if (f1 & (TR1_SPEED))
2755 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2757 info[i++] = "It affects your speed.";
2761 if (f1 & (TR1_BLOWS))
2764 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2766 info[i++] = "It affects your attack speed.";
2771 if (f1 & (TR1_BRAND_ACID))
2774 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2776 info[i++] = "It does extra damage from acid.";
2780 if (f1 & (TR1_BRAND_ELEC))
2783 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2785 info[i++] = "It does extra damage from electricity.";
2789 if (f1 & (TR1_BRAND_FIRE))
2792 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2794 info[i++] = "It does extra damage from fire.";
2798 if (f1 & (TR1_BRAND_COLD))
2801 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2803 info[i++] = "It does extra damage from frost.";
2808 if (f1 & (TR1_BRAND_POIS))
2811 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
2813 info[i++] = "It poisons your foes.";
2818 if (f1 & (TR1_CHAOTIC))
2821 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
2823 info[i++] = "It produces chaotic effects.";
2828 if (f1 & (TR1_VAMPIRIC))
2831 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
2833 info[i++] = "It drains life from your foes.";
2838 if (f1 & (TR1_IMPACT))
2841 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
2843 info[i++] = "It can cause earthquakes.";
2848 if (f1 & (TR1_VORPAL))
2851 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2853 info[i++] = "It is very sharp and can cut your foes.";
2858 if (f1 & (TR1_KILL_DRAGON))
2861 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2863 info[i++] = "It is a great bane of dragons.";
2867 else if (f1 & (TR1_SLAY_DRAGON))
2870 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2872 info[i++] = "It is especially deadly against dragons.";
2876 if (f1 & (TR1_SLAY_ORC))
2879 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2881 info[i++] = "It is especially deadly against orcs.";
2885 if (f1 & (TR1_SLAY_TROLL))
2888 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2890 info[i++] = "It is especially deadly against trolls.";
2894 if (f1 & (TR1_SLAY_GIANT))
2896 if (o_ptr->name1 == ART_HRUNTING)
2898 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2900 info[i++] = "It is a great bane of giants.";
2904 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2906 info[i++] = "It is especially deadly against giants.";
2910 if (f1 & (TR1_SLAY_DEMON))
2913 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2915 info[i++] = "It strikes at demons with holy wrath.";
2919 if (f1 & (TR1_SLAY_UNDEAD))
2922 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2924 info[i++] = "It strikes at undead with holy wrath.";
2928 if (f1 & (TR1_SLAY_EVIL))
2931 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
2933 info[i++] = "It fights against evil with holy fury.";
2937 if (f1 & (TR1_SLAY_ANIMAL))
2940 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2942 info[i++] = "It is especially deadly against natural creatures.";
2946 if (f3 & (TR3_SLAY_HUMAN))
2949 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2951 info[i++] = "It is especially deadly against humans.";
2956 if (f1 & (TR1_FORCE_WEAPON))
2959 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
2961 info[i++] = "It powerfully strikes at a monster using your mana.";
2965 if (f3 & (TR3_DEC_MANA))
2968 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
2970 info[i++] = "It decreases your mana consumption.";
2974 if (f2 & (TR2_SUST_STR))
2977 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
2979 info[i++] = "It sustains your strength.";
2983 if (f2 & (TR2_SUST_INT))
2986 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
2988 info[i++] = "It sustains your intelligence.";
2992 if (f2 & (TR2_SUST_WIS))
2995 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
2997 info[i++] = "It sustains your wisdom.";
3001 if (f2 & (TR2_SUST_DEX))
3004 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
3006 info[i++] = "It sustains your dexterity.";
3010 if (f2 & (TR2_SUST_CON))
3013 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
3015 info[i++] = "It sustains your constitution.";
3019 if (f2 & (TR2_SUST_CHR))
3022 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
3024 info[i++] = "It sustains your charisma.";
3029 if (f2 & (TR2_IM_ACID))
3032 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3034 info[i++] = "It provides immunity to acid.";
3038 if (f2 & (TR2_IM_ELEC))
3041 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3043 info[i++] = "It provides immunity to electricity.";
3047 if (f2 & (TR2_IM_FIRE))
3050 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3052 info[i++] = "It provides immunity to fire.";
3056 if (f2 & (TR2_IM_COLD))
3059 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3061 info[i++] = "It provides immunity to cold.";
3066 if (f2 & (TR2_THROW))
3069 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3071 info[i++] = "It is perfectly balanced for throwing.";
3075 if (f2 & (TR2_FREE_ACT))
3078 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3080 info[i++] = "It provides immunity to paralysis.";
3084 if (f2 & (TR2_HOLD_LIFE))
3087 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
3089 info[i++] = "It provides resistance to life draining.";
3093 if (f2 & (TR2_RES_FEAR))
3096 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3098 info[i++] = "It makes you completely fearless.";
3102 if (f2 & (TR2_RES_ACID))
3105 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3107 info[i++] = "It provides resistance to acid.";
3111 if (f2 & (TR2_RES_ELEC))
3114 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3116 info[i++] = "It provides resistance to electricity.";
3120 if (f2 & (TR2_RES_FIRE))
3123 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3125 info[i++] = "It provides resistance to fire.";
3129 if (f2 & (TR2_RES_COLD))
3132 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3134 info[i++] = "It provides resistance to cold.";
3138 if (f2 & (TR2_RES_POIS))
3141 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3143 info[i++] = "It provides resistance to poison.";
3148 if (f2 & (TR2_RES_LITE))
3151 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3153 info[i++] = "It provides resistance to light.";
3157 if (f2 & (TR2_RES_DARK))
3160 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3162 info[i++] = "It provides resistance to dark.";
3167 if (f2 & (TR2_RES_BLIND))
3170 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3172 info[i++] = "It provides resistance to blindness.";
3176 if (f2 & (TR2_RES_CONF))
3179 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3181 info[i++] = "It provides resistance to confusion.";
3185 if (f2 & (TR2_RES_SOUND))
3188 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3190 info[i++] = "It provides resistance to sound.";
3194 if (f2 & (TR2_RES_SHARDS))
3197 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3199 info[i++] = "It provides resistance to shards.";
3204 if (f2 & (TR2_RES_NETHER))
3207 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3209 info[i++] = "It provides resistance to nether.";
3213 if (f2 & (TR2_RES_NEXUS))
3216 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3218 info[i++] = "It provides resistance to nexus.";
3222 if (f2 & (TR2_RES_CHAOS))
3225 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3227 info[i++] = "It provides resistance to chaos.";
3231 if (f2 & (TR2_RES_DISEN))
3234 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3236 info[i++] = "It provides resistance to disenchantment.";
3241 if (f3 & (TR3_FEATHER))
3244 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3246 info[i++] = "It allows you to levitate.";
3250 if (f3 & (TR3_LITE))
3252 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
3254 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë¡£";
3256 info[i++] = "It decreases radius of your light source.";
3260 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
3262 info[i++] = "It provides permanent light.";
3266 if (f3 & (TR3_SEE_INVIS))
3269 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3271 info[i++] = "It allows you to see invisible monsters.";
3275 if (f3 & (TR3_TELEPATHY))
3278 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
3280 info[i++] = "It gives telepathic powers.";
3284 if (f3 & (TR3_SLOW_DIGEST))
3287 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
3289 info[i++] = "It slows your metabolism.";
3293 if (f3 & (TR3_REGEN))
3296 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
3298 info[i++] = "It speeds your regenerative powers.";
3302 if (f3 & (TR3_WARNING))
3305 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
3307 info[i++] = "It warns you of danger";
3311 if (f2 & (TR2_REFLECT))
3314 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
3316 info[i++] = "It reflects bolts and arrows.";
3320 if (f3 & (TR3_SH_FIRE))
3323 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3325 info[i++] = "It produces a fiery sheath.";
3329 if (f3 & (TR3_SH_ELEC))
3332 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3334 info[i++] = "It produces an electric sheath.";
3338 if (f3 & (TR3_SH_COLD))
3341 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3343 info[i++] = "It produces a coldly sheath.";
3347 if (f3 & (TR3_NO_MAGIC))
3350 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3352 info[i++] = "It produces an anti-magic shell.";
3356 if (f3 & (TR3_NO_TELE))
3359 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
3361 info[i++] = "It prevents teleportation.";
3365 if (f3 & (TR3_XTRA_MIGHT))
3368 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3370 info[i++] = "It fires missiles with extra might.";
3374 if (f3 & (TR3_XTRA_SHOTS))
3377 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3379 info[i++] = "It fires missiles excessively fast.";
3384 if (f3 & TR3_BLESSED)
3387 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
3389 info[i++] = "It has been blessed by the gods.";
3394 if (cursed_p(o_ptr))
3396 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
3399 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3401 info[i++] = "It is permanently cursed.";
3405 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
3408 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3410 info[i++] = "It is heavily cursed.";
3417 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
3419 info[i++] = "It is cursed.";
3425 if ((f3 & TR3_TY_CURSE) || (o_ptr->curse_flags & TRC_TY_CURSE))
3428 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
3430 info[i++] = "It carries an ancient foul curse.";
3434 if ((f3 & TR3_AGGRAVATE) || (o_ptr->curse_flags & TRC_AGGRAVATE))
3437 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
3439 info[i++] = "It aggravates nearby creatures.";
3443 if ((f3 & (TR3_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
3446 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
3448 info[i++] = "It drains experience.";
3452 if (o_ptr->curse_flags & TRC_SLOW_REGEN)
3455 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
3457 info[i++] = "It slows your regenerative powers.";
3461 if (o_ptr->curse_flags & TRC_ADD_L_CURSE)
3464 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
3466 info[i++] = "It adds weak curses.";
3470 if (o_ptr->curse_flags & TRC_ADD_H_CURSE)
3473 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
3475 info[i++] = "It adds heavy curses.";
3479 if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
3482 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3484 info[i++] = "It attracts animals.";
3488 if (o_ptr->curse_flags & TRC_CALL_DEMON)
3491 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3493 info[i++] = "It attracts demons.";
3497 if (o_ptr->curse_flags & TRC_CALL_DRAGON)
3500 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3502 info[i++] = "It attracts dragons.";
3506 if (o_ptr->curse_flags & TRC_COWARDICE)
3509 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤µ¯¤³¤¹¡£";
3511 info[i++] = "It makes you subject to cowardice.";
3515 if ((f3 & (TR3_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
3518 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
3520 info[i++] = "It induces random teleportation.";
3524 if (o_ptr->curse_flags & TRC_LOW_MELEE)
3527 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
3529 info[i++] = "It causes you miss blows.";
3533 if (o_ptr->curse_flags & TRC_LOW_AC)
3536 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
3538 info[i++] = "It helps your enemys' blows.";
3542 if (o_ptr->curse_flags & TRC_LOW_MAGIC)
3545 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
3547 info[i++] = "It is unsuitable for spellcasting.";
3551 if (o_ptr->curse_flags & TRC_FAST_DIGEST)
3554 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
3556 info[i++] = "It speeds your metabolism.";
3560 if (o_ptr->curse_flags & TRC_DRAIN_HP)
3563 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
3565 info[i++] = "It drains you.";
3569 if (o_ptr->curse_flags & TRC_DRAIN_MANA)
3572 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
3574 info[i++] = "It drains your mana.";
3579 /* XTRA HACK ARTDESC */
3580 flag = TR3_IGNORE_ACID | TR3_IGNORE_ELEC | TR3_IGNORE_FIRE | TR3_IGNORE_COLD ;
3581 if ((f3 & flag) == flag)
3584 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3586 info[i++] = "It cannot be harmed by the elements.";
3589 if (f3 & (TR3_IGNORE_ACID))
3592 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3594 info[i++] = "It cannot be harmed by acid.";
3598 if (f3 & (TR3_IGNORE_ELEC))
3601 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3603 info[i++] = "It cannot be harmed by electricity.";
3607 if (f3 & (TR3_IGNORE_FIRE))
3610 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3612 info[i++] = "It cannot be harmed by fire.";
3616 if (f3 & (TR3_IGNORE_COLD))
3619 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3621 info[i++] = "It cannot be harmed by cold.";
3626 /* XTRA HACK ARTDESC */
3629 /* No special effects */
3630 if (!i) return (FALSE);
3632 /* Save the screen */
3636 Term_get_size(&wid, &hgt);
3638 /* Display Item name */
3639 object_desc(o_name, o_ptr, TRUE, 3);
3640 prt(format("%s", o_name), 0, 0);
3642 /* Erase the screen */
3643 for (k = 1; k < hgt; k++) prt("", k, 13);
3645 /* Label the information */
3646 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
3648 monster_race *r_ptr = &r_info[o_ptr->pval];
3649 int namelen = strlen(r_name + r_ptr->name);
3650 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
3651 c_prt(r_ptr->d_attr, format("%c", r_ptr->d_char), 1, 18+namelen);
3652 prt("'", 1, 19+namelen);
3656 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
3658 prt(" Item Attributes:", 1, 15);
3661 /* We will print on top of the map (column 13) */
3662 for (k = 2, j = 0; j < i; j++)
3665 prt(info[j], k++, 15);
3667 /* Every 20 entries (lines 2 to 21), start over */
3668 if ((k == hgt - 2) && (j+1 < i))
3671 prt("-- ³¤¯ --", k, 15);
3673 prt("-- more --", k, 15);
3676 for (; k > 2; k--) prt("", k, 15);
3682 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
3684 prt("[Press any key to continue]", k, 15);
3689 /* Restore the screen */
3692 /* Gave knowledge */
3699 * Convert an inventory index into a one character label
3700 * Note that the label does NOT distinguish inven/equip.
3702 char index_to_label(int i)
3704 /* Indexes for "inven" are easy */
3705 if (i < INVEN_RARM) return (I2A(i));
3707 /* Indexes for "equip" are offset */
3708 return (I2A(i - INVEN_RARM));
3713 * Convert a label into the index of an item in the "inven"
3714 * Return "-1" if the label does not indicate a real item
3716 s16b label_to_inven(int c)
3721 i = (islower(c) ? A2I(c) : -1);
3723 /* Verify the index */
3724 if ((i < 0) || (i > INVEN_PACK)) return (-1);
3726 /* Empty slots can never be chosen */
3727 if (!inventory[i].k_idx) return (-1);
3729 /* Return the index */
3735 * Convert a label into the index of a item in the "equip"
3736 * Return "-1" if the label does not indicate a real item
3738 s16b label_to_equip(int c)
3743 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
3745 /* Verify the index */
3746 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
3748 /* Empty slots can never be chosen */
3749 if (!inventory[i].k_idx) return (-1);
3751 /* Return the index */
3758 * Determine which equipment slot (if any) an item likes
3760 s16b wield_slot(object_type *o_ptr)
3762 /* Slot for equipment */
3763 switch (o_ptr->tval)
3770 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
3771 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
3772 return (INVEN_LARM);
3779 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
3780 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
3781 return (INVEN_RARM);
3791 /* Use the right hand first */
3792 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
3794 /* Use the left hand for swapping (by default) */
3795 return (INVEN_LEFT);
3801 return (INVEN_NECK);
3806 return (INVEN_LITE);
3813 return (INVEN_BODY);
3818 return (INVEN_OUTER);
3824 return (INVEN_HEAD);
3829 return (INVEN_HANDS);
3834 return (INVEN_FEET);
3838 /* No slot available */
3844 * Return a string mentioning how a given item is carried
3846 cptr mention_use(int i)
3850 /* Examine the location */
3854 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê"); break;
3856 case INVEN_RARM: p = "Wielding"; break;
3860 case INVEN_LARM: p = (left_hander ? " ±¦¼ê" : " º¸¼ê"); break;
3862 case INVEN_LARM: p = "On arm"; break;
3866 case INVEN_BOW: p = "¼Í·âÍÑ"; break;
3868 case INVEN_BOW: p = "Shooting"; break;
3872 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
3874 case INVEN_LEFT: p = "On left hand"; break;
3878 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
3880 case INVEN_RIGHT: p = "On right hand"; break;
3884 case INVEN_NECK: p = " ¼ó"; break;
3886 case INVEN_NECK: p = "Around neck"; break;
3890 case INVEN_LITE: p = " ¸÷¸»"; break;
3892 case INVEN_LITE: p = "Light source"; break;
3896 case INVEN_BODY: p = " ÂÎ"; break;
3898 case INVEN_BODY: p = "On body"; break;
3902 case INVEN_OUTER: p = "ÂΤξå"; break;
3904 case INVEN_OUTER: p = "About body"; break;
3908 case INVEN_HEAD: p = " Ƭ"; break;
3910 case INVEN_HEAD: p = "On head"; break;
3914 case INVEN_HANDS: p = " ¼ê"; break;
3916 case INVEN_HANDS: p = "On hands"; break;
3920 case INVEN_FEET: p = " "; break;
3922 case INVEN_FEET: p = "On feet"; break;
3926 default: p = "¥¶¥Ã¥¯"; break;
3928 default: p = "In pack"; break;
3933 /* Hack -- Heavy weapon */
3934 if (i == INVEN_RARM)
3936 if (p_ptr->heavy_wield[0])
3947 /* Hack -- Heavy weapon */
3948 if (i == INVEN_LARM)
3950 if (p_ptr->heavy_wield[1])
3961 /* Hack -- Heavy bow */
3965 o_ptr = &inventory[i];
3966 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
3977 /* Return the result */
3983 * Return a string describing how a given item is being worn.
3984 * Currently, only used for items in the equipment, not inventory.
3986 cptr describe_use(int i)
3993 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
3995 case INVEN_RARM: p = "attacking monsters with"; break;
3999 case INVEN_LARM: p = (left_hander ? " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
4001 case INVEN_LARM: p = "wearing on your arm"; break;
4005 case INVEN_BOW: p = "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
4007 case INVEN_BOW: p = "shooting missiles with"; break;
4011 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4013 case INVEN_LEFT: p = "wearing on your left hand"; break;
4017 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4019 case INVEN_RIGHT: p = "wearing on your right hand"; break;
4023 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
4025 case INVEN_NECK: p = "wearing around your neck"; break;
4029 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
4031 case INVEN_LITE: p = "using to light the way"; break;
4035 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
4037 case INVEN_BODY: p = "wearing on your body"; break;
4041 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
4043 case INVEN_OUTER: p = "wearing on your back"; break;
4047 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
4049 case INVEN_HEAD: p = "wearing on your head"; break;
4053 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
4055 case INVEN_HANDS: p = "wearing on your hands"; break;
4059 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
4061 case INVEN_FEET: p = "wearing on your feet"; break;
4065 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
4067 default: p = "carrying in your pack"; break;
4072 /* Hack -- Heavy weapon */
4073 if (i == INVEN_RARM)
4076 int hold = adj_str_hold[p_ptr->stat_ind[A_STR]];
4078 if (p_ptr->ryoute) hold *= 2;
4079 o_ptr = &inventory[i];
4080 if (hold < o_ptr->weight / 10)
4091 /* Hack -- Heavy bow */
4095 o_ptr = &inventory[i];
4096 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
4099 p = "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î";
4107 /* Return the result */
4112 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
4114 bool check_book_realm(const byte book_tval, const byte book_sval)
4116 if (book_tval < TV_LIFE_BOOK) return FALSE;
4117 if (p_ptr->pclass == CLASS_SORCERER)
4119 return is_magic(tval2realm(book_tval));
4121 else if (p_ptr->pclass == CLASS_RED_MAGE)
4123 if (is_magic(tval2realm(book_tval)))
4124 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
4126 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
4131 * Check an item against the item tester info
4133 bool item_tester_okay(object_type *o_ptr)
4135 /* Hack -- allow listing empty slots */
4136 if (item_tester_full) return (TRUE);
4138 /* Require an item */
4139 if (!o_ptr->k_idx) return (FALSE);
4141 /* Hack -- ignore "gold" */
4142 if (o_ptr->tval == TV_GOLD) return (FALSE);
4144 /* Check the tval */
4145 if (item_tester_tval)
4147 /* Is it a spellbook? If so, we need a hack -- TY */
4148 if ((item_tester_tval <= TV_DEATH_BOOK) &&
4149 (item_tester_tval >= TV_LIFE_BOOK))
4150 return check_book_realm(o_ptr->tval, o_ptr->sval);
4152 if (item_tester_tval != o_ptr->tval) return (FALSE);
4155 /* Check the hook */
4156 if (item_tester_hook)
4158 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
4169 * Choice window "shadow" of the "show_inven()" function
4171 void display_inven(void)
4173 register int i, n, z = 0;
4175 byte attr = TERM_WHITE;
4177 char o_name[MAX_NLEN];
4180 /* Find the "final" slot */
4181 for (i = 0; i < INVEN_PACK; i++)
4183 o_ptr = &inventory[i];
4185 /* Skip non-objects */
4186 if (!o_ptr->k_idx) continue;
4192 /* Display the pack */
4193 for (i = 0; i < z; i++)
4195 /* Examine the item */
4196 o_ptr = &inventory[i];
4198 /* Start with an empty "index" */
4199 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4201 /* Is this item "acceptable"? */
4202 if (item_tester_okay(o_ptr))
4204 /* Prepare an "index" */
4205 tmp_val[0] = index_to_label(i);
4207 /* Bracket the "index" --(-- */
4211 /* Display the index (or blank space) */
4212 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
4214 /* Obtain an item description */
4215 object_desc(o_name, o_ptr, TRUE, 3);
4217 /* Obtain the length of the description */
4221 attr = tval_to_attr[o_ptr->tval % 128];
4223 /* Grey out charging items */
4229 /* Display the entry itself */
4230 Term_putstr(3, i, n, attr, o_name);
4232 /* Erase the rest of the line */
4233 Term_erase(3+n, i, 255);
4235 /* Display the weight if needed */
4236 if (show_weights && o_ptr->weight)
4238 int wgt = o_ptr->weight * o_ptr->number;
4240 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
4242 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4245 Term_putstr(71, i, -1, TERM_WHITE, tmp_val);
4249 /* Erase the rest of the window */
4250 for (i = z; i < Term->hgt; i++)
4252 /* Erase the line */
4253 Term_erase(0, i, 255);
4260 * Choice window "shadow" of the "show_equip()" function
4262 void display_equip(void)
4266 byte attr = TERM_WHITE;
4268 char o_name[MAX_NLEN];
4271 /* Display the equipment */
4272 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
4274 /* Examine the item */
4275 o_ptr = &inventory[i];
4277 /* Start with an empty "index" */
4278 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4280 /* Is this item "acceptable"? */
4281 if (item_tester_okay(o_ptr))
4283 /* Prepare an "index" */
4284 tmp_val[0] = index_to_label(i);
4286 /* Bracket the "index" --(-- */
4290 /* Display the index (or blank space) */
4291 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
4293 /* Obtain an item description */
4294 if ((i == INVEN_LARM) && p_ptr->ryoute)
4297 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
4299 strcpy(o_name, "(wielding with two-hands)");
4305 object_desc(o_name, o_ptr, TRUE, 3);
4306 attr = tval_to_attr[o_ptr->tval % 128];
4309 /* Obtain the length of the description */
4312 /* Grey out charging items */
4318 /* Display the entry itself */
4319 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
4321 /* Erase the rest of the line */
4322 Term_erase(3+n, i - INVEN_RARM, 255);
4324 /* Display the slot description (if needed) */
4327 Term_putstr(61, i - INVEN_RARM, -1, TERM_WHITE, "<--");
4328 Term_putstr(65, i - INVEN_RARM, -1, TERM_WHITE, mention_use(i));
4331 /* Display the weight (if needed) */
4332 if (show_weights && o_ptr->weight)
4334 int wgt = o_ptr->weight * o_ptr->number;
4335 int col = (show_labels ? 52 : 71);
4337 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
4339 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4342 Term_putstr(col, i - INVEN_RARM, -1, TERM_WHITE, tmp_val);
4346 /* Erase the rest of the window */
4347 for (i = INVEN_TOTAL - INVEN_RARM; i < Term->hgt; i++)
4349 /* Clear that line */
4350 Term_erase(0, i, 255);
4360 * Display the inventory.
4362 * Hack -- do not display "trailing" empty slots
4364 int show_inven(int target_item)
4366 int i, j, k, l, z = 0;
4367 int col, cur_col, len, lim;
4369 char o_name[MAX_NLEN];
4373 char out_desc[23][MAX_NLEN];
4374 int target_item_label = 0;
4378 /* Starting column */
4382 Term_get_size(&wid, &hgt);
4384 /* Default "max-length" */
4385 len = wid - col - 1;
4387 /* Maximum space allowed for descriptions */
4390 /* Require space for weight (if needed) */
4391 if (show_weights) lim -= 9;
4393 /* Require space for icon */
4394 if (show_item_graph)
4397 if (use_bigtile) lim--;
4400 /* Find the "final" slot */
4401 for (i = 0; i < INVEN_PACK; i++)
4403 o_ptr = &inventory[i];
4405 /* Skip non-objects */
4406 if (!o_ptr->k_idx) continue;
4412 /* Display the inventory */
4413 for (k = 0, i = 0; i < z; i++)
4415 o_ptr = &inventory[i];
4417 /* Is this item acceptable? */
4418 if (!item_tester_okay(o_ptr)) continue;
4420 /* Describe the object */
4421 object_desc(o_name, o_ptr, TRUE, 3);
4423 /* Hack -- enforce max length */
4426 /* Save the object index, color, and description */
4428 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4430 /* Grey out charging items */
4433 out_color[k] = TERM_L_DARK;
4436 (void)strcpy(out_desc[k], o_name);
4438 /* Find the predicted "line length" */
4439 l = strlen(out_desc[k]) + 5;
4441 /* Be sure to account for the weight */
4442 if (show_weights) l += 9;
4444 /* Account for icon if displayed */
4445 if (show_item_graph)
4448 if (use_bigtile) l++;
4451 /* Maintain the maximum length */
4452 if (l > len) len = l;
4454 /* Advance to next "line" */
4458 /* Find the column to start in */
4459 col = (len > wid - 4) ? 0 : (wid - len - 1);
4461 /* Output each entry */
4462 for (j = 0; j < k; j++)
4468 o_ptr = &inventory[i];
4470 /* Clear the line */
4471 prt("", j + 1, col ? col - 2 : col);
4473 if (use_menu && target_item)
4475 if (j == (target_item-1))
4478 strcpy(tmp_val, "¡Õ");
4480 strcpy(tmp_val, "> ");
4482 target_item_label = i;
4484 else strcpy(tmp_val, " ");
4487 /* Prepare an index --(-- */
4488 sprintf(tmp_val, "%c)", index_to_label(i));
4490 /* Clear the line with the (possibly indented) index */
4491 put_str(tmp_val, j + 1, col);
4495 /* Display graphics for object, if desired */
4496 if (show_item_graph)
4498 byte a = object_attr(o_ptr);
4499 char c = object_char(o_ptr);
4502 if (a & 0x80) a |= 0x40;
4505 Term_draw(cur_col, j + 1, a, c);
4510 Term_draw(cur_col, j + 1, 255, 255);
4516 /* Display the entry itself */
4517 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
4519 /* Display the weight if needed */
4522 int wgt = o_ptr->weight * o_ptr->number;
4524 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4526 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4529 put_str(tmp_val, j + 1, wid - 9);
4533 /* Make a "shadow" below the list (only if needed) */
4534 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4536 /* Save the new column */
4539 return target_item_label;
4545 * Display the equipment.
4547 int show_equip(int target_item)
4550 int col, cur_col, len, lim;
4553 char o_name[MAX_NLEN];
4556 char out_desc[23][MAX_NLEN];
4557 int target_item_label = 0;
4561 /* Starting column */
4565 Term_get_size(&wid, &hgt);
4567 /* Maximal length */
4568 len = wid - col - 1;
4570 /* Maximum space allowed for descriptions */
4573 /* Require space for labels (if needed) */
4575 if (show_labels) lim -= (7 + 2);
4577 if (show_labels) lim -= (14 + 2);
4581 /* Require space for weight (if needed) */
4583 if (show_weights) lim -= 10;
4585 if (show_weights) lim -= 9;
4589 if (show_item_graph) lim -= 2;
4591 /* Scan the equipment list */
4592 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
4594 o_ptr = &inventory[i];
4596 /* Is this item acceptable? */
4597 if (!item_tester_okay(o_ptr) && (!((i == INVEN_LARM) && p_ptr->ryoute) || item_tester_no_ryoute)) continue;
4600 object_desc(o_name, o_ptr, TRUE, 3);
4602 /* Truncate the description */
4605 if ((i == INVEN_LARM) && p_ptr->ryoute)
4608 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
4610 (void)strcpy(out_desc[k],"(wielding with two-hands)");
4616 (void)strcpy(out_desc[k], o_name);
4617 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4621 /* Grey out charging items */
4624 out_color[k] = TERM_L_DARK;
4627 /* Extract the maximal length (see below) */
4629 l = strlen(out_desc[k]) + (2 + 1);
4631 l = strlen(out_desc[k]) + (2 + 3);
4635 /* Increase length for labels (if needed) */
4637 if (show_labels) l += (7 + 2);
4639 if (show_labels) l += (14 + 2);
4643 /* Increase length for weight (if needed) */
4644 if (show_weights) l += 9;
4646 if (show_item_graph) l += 2;
4648 /* Maintain the max-length */
4649 if (l > len) len = l;
4651 /* Advance the entry */
4655 /* Hack -- Find a column to start in */
4657 col = (len > wid - 6) ? 0 : (wid - len - 1);
4659 col = (len > wid - 4) ? 0 : (wid - len - 1);
4663 /* Output each entry */
4664 for (j = 0; j < k; j++)
4670 o_ptr = &inventory[i];
4672 /* Clear the line */
4673 prt("", j + 1, col ? col - 2 : col);
4675 if (use_menu && target_item)
4677 if (j == (target_item-1))
4680 strcpy(tmp_val, "¡Õ");
4682 strcpy(tmp_val, "> ");
4684 target_item_label = i;
4686 else strcpy(tmp_val, " ");
4689 /* Prepare an index --(-- */
4690 sprintf(tmp_val, "%c)", index_to_label(i));
4692 /* Clear the line with the (possibly indented) index */
4693 put_str(tmp_val, j+1, col);
4697 /* Display graphics for object, if desired */
4698 if (show_item_graph)
4700 byte a = object_attr(o_ptr);
4701 char c = object_char(o_ptr);
4704 if (a & 0x80) a |= 0x40;
4707 Term_draw(cur_col, j + 1, a, c);
4712 Term_draw(cur_col, j + 1, 255, 255);
4720 /* Mention the use */
4722 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
4724 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
4727 put_str(tmp_val, j+1, cur_col);
4729 /* Display the entry itself */
4731 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
4733 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
4740 /* Display the entry itself */
4741 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
4744 /* Display the weight if needed */
4747 int wgt = o_ptr->weight * o_ptr->number;
4749 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4751 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
4754 put_str(tmp_val, j+1, wid - 9);
4758 /* Make a "shadow" below the list (only if needed) */
4759 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4761 /* Save the new column */
4764 return target_item_label;
4771 * Flip "inven" and "equip" in any sub-windows
4773 void toggle_inven_equip(void)
4778 for (j = 0; j < 8; j++)
4781 if (!angband_term[j]) continue;
4783 /* Flip inven to equip */
4784 if (window_flag[j] & (PW_INVEN))
4787 window_flag[j] &= ~(PW_INVEN);
4788 window_flag[j] |= (PW_EQUIP);
4791 p_ptr->window |= (PW_EQUIP);
4794 /* Flip inven to equip */
4795 else if (window_flag[j] & (PW_EQUIP))
4798 window_flag[j] &= ~(PW_EQUIP);
4799 window_flag[j] |= (PW_INVEN);
4802 p_ptr->window |= (PW_INVEN);
4810 * Verify the choice of an item.
4812 * The item can be negative to mean "item on floor".
4814 static bool verify(cptr prompt, int item)
4816 char o_name[MAX_NLEN];
4817 char out_val[MAX_NLEN+20];
4824 o_ptr = &inventory[item];
4830 o_ptr = &o_list[0 - item];
4834 object_desc(o_name, o_ptr, TRUE, 3);
4838 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
4840 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
4845 return (get_check(out_val));
4850 * Hack -- allow user to "prevent" certain choices
4852 * The item can be negative to mean "item on floor".
4854 static bool get_item_allow(int item)
4863 o_ptr = &inventory[item];
4869 o_ptr = &o_list[0 - item];
4872 /* No inscription */
4873 if (!o_ptr->inscription) return (TRUE);
4876 s = strchr(quark_str(o_ptr->inscription), '!');
4878 /* Process preventions */
4881 /* Check the "restriction" */
4882 if ((s[1] == command_cmd) || (s[1] == '*'))
4884 /* Verify the choice */
4886 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
4888 if (!verify("Really try", item)) return (FALSE);
4893 /* Find another '!' */
4894 s = strchr(s + 1, '!');
4904 * Auxiliary function for "get_item()" -- test an index
4906 static bool get_item_okay(int i)
4909 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
4911 /* Verify the item */
4912 if (!item_tester_okay(&inventory[i])) return (FALSE);
4921 * Find the "first" inventory object with the given "tag".
4923 * A "tag" is a char "n" appearing as "@n" anywhere in the
4924 * inscription of an object.
4926 * Also, the tag "@xn" will work as well, where "n" is a tag-char,
4927 * and "x" is the "current" command_cmd code.
4929 static int get_tag(int *cp, char tag)
4934 /* Check every object */
4935 for (i = 0; i < INVEN_TOTAL; ++i)
4937 object_type *o_ptr = &inventory[i];
4939 /* Skip non-objects */
4940 if (!o_ptr->k_idx) continue;
4942 /* Skip empty inscriptions */
4943 if (!o_ptr->inscription) continue;
4945 /* Skip non-choice */
4946 if (!item_tester_okay(o_ptr)) continue;
4949 s = strchr(quark_str(o_ptr->inscription), '@');
4951 /* Process all tags */
4954 /* Check the special tags */
4955 if ((s[1] == command_cmd) && (s[2] == tag))
4957 /* Save the actual inventory ID */
4964 /* Find another '@' */
4965 s = strchr(s + 1, '@');
4969 /* Check every object */
4970 for (i = 0; i < INVEN_TOTAL; ++i)
4972 object_type *o_ptr = &inventory[i];
4974 /* Skip non-objects */
4975 if (!o_ptr->k_idx) continue;
4977 /* Skip empty inscriptions */
4978 if (!o_ptr->inscription) continue;
4980 /* Skip non-choice */
4981 if (!item_tester_okay(o_ptr)) continue;
4984 s = strchr(quark_str(o_ptr->inscription), '@');
4986 /* Process all tags */
4989 /* Check the normal tags */
4990 if (s[1] == tag && !((s[2] >= '0' && s[2] <= '9') || (s[2] >= 'a' && s[2] <= 'z') || (s[2] >= 'A' && s[2] <= 'Z')))
4992 /* Save the actual inventory ID */
4999 /* Find another '@' */
5000 s = strchr(s + 1, '@');
5009 * Determine whether get_item() can get some item or not
5010 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
5012 bool can_get_item(void)
5014 int j, floor_list[23], floor_num = 0;
5016 for (j = 0; j < INVEN_TOTAL; j++)
5017 if (item_tester_okay(&inventory[j]))
5020 (void)scan_floor(floor_list, &floor_num, py, px, 0x01);
5028 * Let the user select an item, save its "index"
5030 * Return TRUE only if an acceptable item was chosen by the user.
5032 * The selected item must satisfy the "item_tester_hook()" function,
5033 * if that hook is set, and the "item_tester_tval", if that value is set.
5035 * All "item_tester" restrictions are cleared before this function returns.
5037 * The user is allowed to choose acceptable items from the equipment,
5038 * inventory, or floor, respectively, if the proper flag was given,
5039 * and there are any acceptable items in that location.
5041 * The equipment or inventory are displayed (even if no acceptable
5042 * items are in that location) if the proper flag was given.
5044 * If there are no acceptable items available anywhere, and "str" is
5045 * not NULL, then it will be used as the text of a warning message
5046 * before the function returns.
5048 * Note that the user must press "-" to specify the item on the floor,
5049 * and there is no way to "examine" the item on the floor, while the
5050 * use of "capital" letters will "examine" an inventory/equipment item,
5051 * and prompt for its use.
5053 * If a legal item is selected from the inventory, we save it in "cp"
5054 * directly (0 to 35), and return TRUE.
5056 * If a legal item is selected from the floor, we save it in "cp" as
5057 * a negative (-1 to -511), and return TRUE.
5059 * If no item is available, we do nothing to "cp", and we display a
5060 * warning message, using "str" if available, and return FALSE.
5062 * If no item is selected, we do nothing to "cp", and return FALSE.
5064 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
5065 * to allow the user to enter a command while viewing those screens, and
5066 * also to induce "auto-enter" of stores, and other such stuff.
5068 * Global "p_ptr->command_see" may be set before calling this function to start
5069 * out in "browse" mode. It is cleared before this function returns.
5071 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
5072 * If it is TRUE then we are viewing inventory, else equipment.
5074 * We always erase the prompt when we are done, leaving a blank line,
5075 * or a warning message, if appropriate, if no items are available.
5077 bool get_item(int *cp, cptr pmt, cptr str, int mode)
5079 s16b this_o_idx, next_o_idx = 0;
5081 char n1, n2, which = ' ';
5083 int j, k, i1, i2, e1, e2;
5093 bool allow_floor = FALSE;
5095 bool toggle = FALSE;
5101 extern bool select_spellbook;
5102 extern bool select_the_force;
5104 int menu_line = (use_menu ? 1 : 0);
5108 #ifdef ALLOW_EASY_FLOOR /* TNB */
5110 if (easy_floor) return get_item_floor(cp, pmt, str, mode);
5112 #endif /* ALLOW_EASY_FLOOR -- TNB */
5116 /* Get the item index */
5117 if (repeat_pull(cp))
5119 if (*cp == 1111) { /* the_force */
5120 item_tester_tval = 0;
5121 item_tester_hook = NULL;
5132 /* Acquire object */
5135 /* Validate the item */
5136 if (item_tester_okay(o_ptr))
5138 /* Forget the item_tester_tval restriction */
5139 item_tester_tval = 0;
5141 /* Forget the item_tester_hook restriction */
5142 item_tester_hook = NULL;
5149 /* Verify the item */
5150 else if (get_item_okay(*cp))
5152 /* Forget the item_tester_tval restriction */
5153 item_tester_tval = 0;
5155 /* Forget the item_tester_hook restriction */
5156 item_tester_hook = NULL;
5163 #endif /* ALLOW_REPEAT */
5166 if (mode & (USE_EQUIP)) equip = TRUE;
5167 if (mode & (USE_INVEN)) inven = TRUE;
5168 if (mode & (USE_FLOOR)) floor = TRUE;
5171 /* Paranoia XXX XXX XXX */
5178 /* No item selected */
5182 /* Full inventory */
5184 i2 = INVEN_PACK - 1;
5186 /* Forbid inventory */
5187 if (!inven) i2 = -1;
5190 for (j = 0; j < INVEN_PACK; j++)
5191 if (item_tester_okay(&inventory[j])) max_inven++;
5194 /* Restrict inventory indexes */
5195 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5196 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5199 /* Full equipment */
5201 e2 = INVEN_TOTAL - 1;
5203 /* Forbid equipment */
5204 if (!equip) e2 = -1;
5207 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5208 if (item_tester_okay(&inventory[j])) max_equip++;
5209 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5212 /* Restrict equipment indexes */
5213 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5214 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5218 /* Restrict floor usage */
5221 /* Scan all objects in the grid */
5222 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5226 /* Acquire object */
5227 o_ptr = &o_list[this_o_idx];
5229 /* Acquire next object */
5230 next_o_idx = o_ptr->next_o_idx;
5232 /* Accept the item on the floor if legal */
5233 if (item_tester_okay(o_ptr)) allow_floor = TRUE;
5238 /* Require at least one legal choice */
5239 if (!allow_floor && (i1 > i2) && (e1 > e2))
5241 /* Cancel p_ptr->command_see */
5242 command_see = FALSE;
5250 if (select_the_force) {
5256 /* Analyze choices */
5259 /* Hack -- Start on equipment if requested */
5260 if (command_see && command_wrk && equip)
5266 /* Use inventory if allowed */
5269 command_wrk = FALSE;
5272 /* Use equipment if allowed */
5278 /* Use inventory for floor */
5281 command_wrk = FALSE;
5287 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5289 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5291 /* Hack -- start out in "display" mode */
5299 /* Repeat until done */
5302 int get_item_label = 0;
5311 for (j = 0; j < 8; j++)
5314 if (!angband_term[j]) continue;
5316 /* Count windows displaying inven */
5317 if (window_flag[j] & (PW_INVEN)) ni++;
5319 /* Count windows displaying equip */
5320 if (window_flag[j] & (PW_EQUIP)) ne++;
5323 /* Toggle if needed */
5324 if ((command_wrk && ni && !ne) ||
5325 (!command_wrk && !ni && ne))
5328 toggle_inven_equip();
5335 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5337 /* Redraw windows */
5341 /* Inventory screen */
5344 /* Extract the legal requests */
5348 /* Redraw if needed */
5349 if (command_see) get_item_label = show_inven(menu_line);
5352 /* Equipment screen */
5355 /* Extract the legal requests */
5356 n1 = I2A(e1 - INVEN_RARM);
5357 n2 = I2A(e2 - INVEN_RARM);
5359 /* Redraw if needed */
5360 if (command_see) get_item_label = show_equip(menu_line);
5363 /* Viewing inventory */
5366 /* Begin the prompt */
5368 sprintf(out_val, "»ý¤Áʪ:");
5370 sprintf(out_val, "Inven:");
5374 /* Some legal items */
5375 if ((i1 <= i2) && !use_menu)
5377 /* Build the prompt */
5379 sprintf(tmp_val, "%c-%c,",
5381 sprintf(tmp_val, " %c-%c,",
5384 index_to_label(i1), index_to_label(i2));
5387 strcat(out_val, tmp_val);
5390 /* Indicate ability to "view" */
5392 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5394 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5400 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
5401 else if (select_the_force)
5402 strcat(out_val, " 'w'Îýµ¤½Ñ,");
5404 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
5405 else if (select_the_force)
5406 strcat(out_val, " w for the Force,");
5411 /* Viewing equipment */
5414 /* Begin the prompt */
5416 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5418 sprintf(out_val, "Equip:");
5422 /* Some legal items */
5423 if ((e1 <= e2) && !use_menu)
5425 /* Build the prompt */
5427 sprintf(tmp_val, "%c-%c,",
5429 sprintf(tmp_val, " %c-%c,",
5432 index_to_label(e1), index_to_label(e2));
5435 strcat(out_val, tmp_val);
5438 /* Indicate ability to "view" */
5440 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5442 if (!command_see) strcat(out_val, " * to see,");
5448 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
5450 if (inven) strcat(out_val, " / for Inven,");
5455 /* Indicate legality of the "floor" item */
5457 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
5459 if (allow_floor) strcat(out_val, " - for floor,");
5463 /* Finish the prompt */
5464 strcat(out_val, " ESC");
5466 /* Build the prompt */
5467 sprintf(tmp_val, "(%s) %s", out_val, pmt);
5469 /* Show the prompt */
5478 int max_line = (command_wrk ? max_equip : max_inven);
5494 menu_line += (max_line - 1);
5513 /* Verify legality */
5514 if (!inven || !equip)
5520 /* Hack -- Fix screen */
5530 /* Switch inven/equip */
5531 command_wrk = !command_wrk;
5532 max_line = (command_wrk ? max_equip : max_inven);
5533 if (menu_line > max_line) menu_line = max_line;
5535 /* Need to redraw */
5544 /* Validate the item */
5545 if (!get_item_okay(get_item_label))
5551 /* Allow player to "refuse" certain actions */
5552 if (!get_item_allow(get_item_label))
5558 /* Accept that choice */
5559 (*cp) = get_item_label;
5566 if (select_the_force) {
5574 if (menu_line > max_line) menu_line -= max_line;
5595 command_see = FALSE;
5615 /* Verify legality */
5616 if (!inven || !equip)
5622 /* Hack -- Fix screen */
5632 /* Switch inven/equip */
5633 command_wrk = !command_wrk;
5635 /* Need to redraw */
5641 /* Use floor item */
5644 /* Scan all objects in the grid */
5645 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5649 /* Acquire object */
5650 o_ptr = &o_list[this_o_idx];
5652 /* Acquire next object */
5653 next_o_idx = o_ptr->next_o_idx;
5655 /* Validate the item */
5656 if (!item_tester_okay(o_ptr)) continue;
5661 /* Verify the item (if required) */
5663 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
5665 if (other_query_flag && !verify("Try", k)) continue;
5669 /* Allow player to "refuse" certain actions */
5670 if (!get_item_allow(k)) continue;
5672 /* Accept that choice */
5689 case '1': case '2': case '3':
5690 case '4': case '5': case '6':
5691 case '7': case '8': case '9':
5693 /* Look up the tag */
5694 if (!get_tag(&k, which))
5700 /* Hack -- Validate the item */
5701 if ((k < INVEN_RARM) ? !inven : !equip)
5707 /* Validate the item */
5708 if (!get_item_okay(k))
5714 /* Allow player to "refuse" certain actions */
5715 if (!get_item_allow(k))
5721 /* Accept that choice */
5733 /* Choose "default" inventory item */
5736 k = ((i1 == i2) ? i1 : -1);
5739 /* Choose "default" equipment item */
5742 k = ((e1 == e2) ? e1 : -1);
5745 /* Validate the item */
5746 if (!get_item_okay(k))
5752 /* Allow player to "refuse" certain actions */
5753 if (!get_item_allow(k))
5759 /* Accept that choice */
5768 if (select_the_force) {
5780 if(select_spellbook){
5781 bool not_found = FALSE;
5782 /* Look up the tag */
5783 if (!get_tag(&k, which))
5788 /* Hack -- Validate the item */
5789 if ((k < INVEN_RARM) ? !inven : !equip)
5794 /* Validate the item */
5795 if (!get_item_okay(k))
5801 /* Accept that choice */
5809 /* Extract "query" setting */
5810 ver = isupper(which);
5811 which = tolower(which);
5813 /* Convert letter to inventory index */
5816 k = label_to_inven(which);
5819 /* Convert letter to equipment index */
5822 k = label_to_equip(which);
5825 /* Validate the item */
5826 if (!get_item_okay(k))
5832 /* Verify the item */
5834 if (ver && !verify("ËÜÅö¤Ë", k))
5836 if (ver && !verify("Try", k))
5844 /* Allow player to "refuse" certain actions */
5845 if (!get_item_allow(k))
5851 /* Accept that choice */
5862 /* Fix the screen if necessary */
5868 /* Hack -- Cancel "display" */
5869 command_see = FALSE;
5873 /* Forget the item_tester_tval restriction */
5874 item_tester_tval = 0;
5876 item_tester_no_ryoute = FALSE;
5878 /* Forget the item_tester_hook restriction */
5879 item_tester_hook = NULL;
5885 /* Toggle again if needed */
5886 if (toggle) toggle_inven_equip();
5889 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5896 /* Clear the prompt line */
5899 /* Warning if needed */
5900 if (oops && str) msg_print(str);
5903 if (item) repeat_push(*cp);
5904 #endif /* ALLOW_REPEAT */
5911 #ifdef ALLOW_EASY_FLOOR
5916 * Return a list of o_list[] indexes of items at the given cave
5917 * location. Valid flags are:
5919 * mode & 0x01 -- Item tester
5920 * mode & 0x02 -- Marked items only
5921 * mode & 0x04 -- Stop after first
5923 bool scan_floor(int *items, int *item_num, int y, int x, int mode)
5925 int this_o_idx, next_o_idx;
5932 if (!in_bounds(y, x)) return (FALSE);
5934 /* Scan all objects in the grid */
5935 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
5939 /* Acquire object */
5940 o_ptr = &o_list[this_o_idx];
5942 /* Acquire next object */
5943 next_o_idx = o_ptr->next_o_idx;
5946 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
5949 if ((mode & 0x02) && !o_ptr->marked) continue;
5951 /* Accept this item */
5952 items[num++] = this_o_idx;
5955 if (mode & 0x04) break;
5957 /* XXX Hack -- Enforce limit */
5958 if (num == 23) break;
5961 /* Number of items */
5969 * Display a list of the items on the floor at the given location.
5971 int show_floor(int target_item, int y, int x)
5978 char o_name[MAX_NLEN];
5984 char out_desc[23][MAX_NLEN];
5985 int target_item_label = 0;
5987 int floor_list[23], floor_num;
5991 Term_get_size(&wid, &hgt);
5993 /* Default length */
5996 /* Maximum space allowed for descriptions */
5999 /* Require space for weight (if needed) */
6000 if (show_weights) lim -= 9;
6002 /* Scan for objects in the grid, using item_tester_okay() */
6003 (void) scan_floor(floor_list, &floor_num, y, x, 0x01);
6005 /* Display the inventory */
6006 for (k = 0, i = 0; i < floor_num; i++)
6008 o_ptr = &o_list[floor_list[i]];
6010 /* Describe the object */
6011 object_desc(o_name, o_ptr, TRUE, 3);
6013 /* Hack -- enforce max length */
6016 /* Save the index */
6019 /* Acquire inventory color */
6020 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
6022 /* Save the object description */
6023 strcpy(out_desc[k], o_name);
6025 /* Find the predicted "line length" */
6026 l = strlen(out_desc[k]) + 5;
6028 /* Be sure to account for the weight */
6029 if (show_weights) l += 9;
6031 /* Maintain the maximum length */
6032 if (l > len) len = l;
6034 /* Advance to next "line" */
6038 /* Find the column to start in */
6039 col = (len > wid - 4) ? 0 : (wid - len - 1);
6041 /* Output each entry */
6042 for (j = 0; j < k; j++)
6045 i = floor_list[out_index[j]];
6050 /* Clear the line */
6051 prt("", j + 1, col ? col - 2 : col);
6053 if (use_menu && target_item)
6055 if (j == (target_item-1))
6058 strcpy(tmp_val, "¡Õ");
6060 strcpy(tmp_val, "> ");
6062 target_item_label = i;
6064 else strcpy(tmp_val, " ");
6067 /* Prepare an index --(-- */
6068 sprintf(tmp_val, "%c)", index_to_label(j));
6070 /* Clear the line with the (possibly indented) index */
6071 put_str(tmp_val, j + 1, col);
6073 /* Display the entry itself */
6074 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
6076 /* Display the weight if needed */
6079 int wgt = o_ptr->weight * o_ptr->number;
6081 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
6083 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
6086 put_str(tmp_val, j + 1, wid - 9);
6090 /* Make a "shadow" below the list (only if needed) */
6091 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
6093 return target_item_label;
6097 * This version of get_item() is called by get_item() when
6098 * the easy_floor is on.
6100 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
6102 char n1 = ' ', n2 = ' ', which = ' ';
6104 int j, k, i1, i2, e1, e2;
6114 bool allow_equip = FALSE;
6115 bool allow_inven = FALSE;
6116 bool allow_floor = FALSE;
6118 bool toggle = FALSE;
6123 int floor_num, floor_list[23], floor_top = 0;
6125 extern bool select_spellbook;
6126 extern bool select_the_force;
6128 int menu_line = (use_menu ? 1 : 0);
6134 /* Get the item index */
6135 if (repeat_pull(cp))
6137 if (*cp == 1111) { /* the_force */
6138 item_tester_tval = 0;
6139 item_tester_hook = NULL;
6150 /* Acquire object */
6153 /* Validate the item */
6154 if (item_tester_okay(o_ptr))
6156 /* Forget the item_tester_tval restriction */
6157 item_tester_tval = 0;
6159 /* Forget the item_tester_hook restriction */
6160 item_tester_hook = NULL;
6167 /* Verify the item */
6168 else if (get_item_okay(*cp))
6170 /* Forget the item_tester_tval restriction */
6171 item_tester_tval = 0;
6173 /* Forget the item_tester_hook restriction */
6174 item_tester_hook = NULL;
6181 #endif /* ALLOW_REPEAT */
6184 if (mode & (USE_EQUIP)) equip = TRUE;
6185 if (mode & (USE_INVEN)) inven = TRUE;
6186 if (mode & (USE_FLOOR)) floor = TRUE;
6189 /* Paranoia XXX XXX XXX */
6196 /* No item selected */
6200 /* Full inventory */
6202 i2 = INVEN_PACK - 1;
6204 /* Forbid inventory */
6205 if (!inven) i2 = -1;
6208 for (j = 0; j < INVEN_PACK; j++)
6209 if (item_tester_okay(&inventory[j])) max_inven++;
6212 /* Restrict inventory indexes */
6213 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
6214 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
6217 /* Full equipment */
6219 e2 = INVEN_TOTAL - 1;
6221 /* Forbid equipment */
6222 if (!equip) e2 = -1;
6225 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
6226 if (item_tester_okay(&inventory[j])) max_equip++;
6227 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
6230 /* Restrict equipment indexes */
6231 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
6232 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
6235 /* Count "okay" floor items */
6238 /* Restrict floor usage */
6241 /* Scan all objects in the grid */
6242 (void) scan_floor(floor_list, &floor_num, py, px, 0x01);
6245 /* Accept inventory */
6246 if (i1 <= i2) allow_inven = TRUE;
6248 /* Accept equipment */
6249 if (e1 <= e2) allow_equip = TRUE;
6252 if (floor_num) allow_floor = TRUE;
6254 /* Require at least one legal choice */
6255 if (!allow_inven && !allow_equip && !allow_floor)
6257 /* Cancel p_ptr->command_see */
6258 command_see = FALSE;
6266 if (select_the_force) {
6272 /* Analyze choices */
6275 /* Hack -- Start on equipment if requested */
6276 if (command_see && (command_wrk == (USE_EQUIP))
6279 command_wrk = (USE_EQUIP);
6282 /* Use inventory if allowed */
6283 else if (allow_inven)
6285 command_wrk = (USE_INVEN);
6288 /* Use equipment if allowed */
6289 else if (allow_equip)
6291 command_wrk = (USE_EQUIP);
6294 /* Use floor if allowed */
6295 else if (allow_floor)
6297 command_wrk = (USE_FLOOR);
6302 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
6304 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
6306 /* Hack -- start out in "display" mode */
6313 /* Repeat until done */
6316 int get_item_label = 0;
6325 for (j = 0; j < 8; j++)
6328 if (!angband_term[j]) continue;
6330 /* Count windows displaying inven */
6331 if (window_flag[j] & (PW_INVEN)) ni++;
6333 /* Count windows displaying equip */
6334 if (window_flag[j] & (PW_EQUIP)) ne++;
6337 /* Toggle if needed */
6338 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
6339 (command_wrk == (USE_INVEN) && !ni && ne))
6342 toggle_inven_equip();
6349 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6351 /* Redraw windows */
6355 /* Inventory screen */
6356 if (command_wrk == (USE_INVEN))
6358 /* Extract the legal requests */
6362 /* Redraw if needed */
6363 if (command_see) get_item_label = show_inven(menu_line);
6366 /* Equipment screen */
6367 else if (command_wrk == (USE_EQUIP))
6369 /* Extract the legal requests */
6370 n1 = I2A(e1 - INVEN_RARM);
6371 n2 = I2A(e2 - INVEN_RARM);
6373 /* Redraw if needed */
6374 if (command_see) get_item_label = show_equip(menu_line);
6378 else if (command_wrk == (USE_FLOOR))
6381 k = MIN(floor_top + 23, floor_num) - 1;
6383 /* Extract the legal requests */
6384 n1 = I2A(j - floor_top);
6385 n2 = I2A(k - floor_top);
6387 /* Redraw if needed */
6388 if (command_see) get_item_label = show_floor(menu_line, py, px);
6391 /* Viewing inventory */
6392 if (command_wrk == (USE_INVEN))
6394 /* Begin the prompt */
6396 sprintf(out_val, "»ý¤Áʪ:");
6398 sprintf(out_val, "Inven:");
6403 /* Build the prompt */
6405 sprintf(tmp_val, "%c-%c,",
6407 sprintf(tmp_val, " %c-%c,",
6410 index_to_label(i1), index_to_label(i2));
6413 strcat(out_val, tmp_val);
6416 /* Indicate ability to "view" */
6418 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6420 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6431 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
6433 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6435 else strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
6437 else if (select_the_force)
6438 strcat(out_val, " 'w'Îýµ¤½Ñ,");
6445 strcat(out_val, " 6 for Equip,");
6447 strcat(out_val, " 4 or 6 for Equip,");
6449 else strcat(out_val, " / for Equip,");
6451 else if (select_the_force)
6452 strcat(out_val, " w for the Force,");
6462 strcat(out_val, " '4' ¾²¾å,");
6464 strcat(out_val, " '4'or'6' ¾²¾å,");
6466 else strcat(out_val, " '-'¾²¾å,");
6469 if (allow_floor) strcat(out_val, " - for floor,");
6474 /* Viewing equipment */
6475 else if (command_wrk == (USE_EQUIP))
6477 /* Begin the prompt */
6479 sprintf(out_val, "ÁõÈ÷ÉÊ:");
6481 sprintf(out_val, "Equip:");
6487 /* Build the prompt */
6489 sprintf(tmp_val, "%c-%c,",
6491 sprintf(tmp_val, " %c-%c,",
6494 index_to_label(e1), index_to_label(e2));
6497 strcat(out_val, tmp_val);
6500 /* Indicate ability to "view" */
6502 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6504 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6515 strcat(out_val, " '4' »ý¤Áʪ,");
6517 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6519 else strcat(out_val, " '/' »ý¤Áʪ,");
6522 if (allow_inven) strcat(out_val, " / for Inven,");
6533 strcat(out_val, " '6' ¾²¾å,");
6535 strcat(out_val, " '4'or'6' ¾²¾å,");
6537 else strcat(out_val, " '-'¾²¾å,");
6540 if (allow_floor) strcat(out_val, " - for floor,");
6546 else if (command_wrk == (USE_FLOOR))
6548 /* Begin the prompt */
6550 sprintf(out_val, "¾²¾å:");
6552 sprintf(out_val, "Floor:");
6558 /* Build the prompt */
6560 sprintf(tmp_val, "%c-%c,", n1, n2);
6562 sprintf(tmp_val, " %c-%c,", n1, n2);
6567 strcat(out_val, tmp_val);
6570 /* Indicate ability to "view" */
6572 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6574 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6580 if (allow_inven && allow_equip)
6583 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
6585 strcat(out_val, " / for Inven,");
6589 else if (allow_inven)
6592 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6594 strcat(out_val, " / for Inven,");
6598 else if (allow_equip)
6601 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6603 strcat(out_val, " / for Equip,");
6609 else if (allow_inven)
6612 strcat(out_val, " '/' »ý¤Áʪ,");
6614 strcat(out_val, " / for Inven,");
6618 else if (allow_equip)
6621 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6623 strcat(out_val, " / for Equip,");
6629 /* Finish the prompt */
6630 strcat(out_val, " ESC");
6632 /* Build the prompt */
6633 sprintf(tmp_val, "(%s) %s", out_val, pmt);
6635 /* Show the prompt */
6644 if (command_wrk == USE_INVEN) max_line = max_inven;
6645 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6646 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6662 menu_line += (max_line - 1);
6678 /* Verify legality */
6679 if (command_wrk == (USE_INVEN))
6681 if (allow_floor) command_wrk = USE_FLOOR;
6682 else if (allow_equip) command_wrk = USE_EQUIP;
6689 else if (command_wrk == (USE_EQUIP))
6691 if (allow_inven) command_wrk = USE_INVEN;
6692 else if (allow_floor) command_wrk = USE_FLOOR;
6699 else if (command_wrk == (USE_FLOOR))
6701 if (allow_equip) command_wrk = USE_EQUIP;
6702 else if (allow_inven) command_wrk = USE_INVEN;
6715 /* Hack -- Fix screen */
6725 /* Switch inven/equip */
6726 if (command_wrk == USE_INVEN) max_line = max_inven;
6727 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6728 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6729 if (menu_line > max_line) menu_line = max_line;
6731 /* Need to redraw */
6739 /* Verify legality */
6740 if (command_wrk == (USE_INVEN))
6742 if (allow_equip) command_wrk = USE_EQUIP;
6743 else if (allow_floor) command_wrk = USE_FLOOR;
6750 else if (command_wrk == (USE_EQUIP))
6752 if (allow_floor) command_wrk = USE_FLOOR;
6753 else if (allow_inven) command_wrk = USE_INVEN;
6760 else if (command_wrk == (USE_FLOOR))
6762 if (allow_inven) command_wrk = USE_INVEN;
6763 else if (allow_equip) command_wrk = USE_EQUIP;
6776 /* Hack -- Fix screen */
6786 /* Switch inven/equip */
6787 if (command_wrk == USE_INVEN) max_line = max_inven;
6788 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6789 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6790 if (menu_line > max_line) menu_line = max_line;
6792 /* Need to redraw */
6801 /* Validate the item */
6802 if (!get_item_okay(get_item_label))
6808 /* Allow player to "refuse" certain actions */
6809 if (!get_item_allow(get_item_label))
6815 /* Accept that choice */
6816 (*cp) = get_item_label;
6823 if (select_the_force) {
6831 if (menu_line > max_line) menu_line -= max_line;
6852 command_see = FALSE;
6872 if (command_wrk == (USE_INVEN))
6879 command_wrk = (USE_EQUIP);
6881 else if (command_wrk == (USE_EQUIP))
6888 command_wrk = (USE_INVEN);
6890 else if (command_wrk == (USE_FLOOR))
6894 command_wrk = (USE_INVEN);
6896 else if (allow_equip)
6898 command_wrk = (USE_EQUIP);
6907 /* Hack -- Fix screen */
6917 /* Need to redraw */
6930 * If we are already examining the floor, and there
6931 * is only one item, we will always select it.
6932 * If we aren't examining the floor and there is only
6933 * one item, we will select it if floor_query_flag
6938 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
6941 k = 0 - floor_list[0];
6943 /* Allow player to "refuse" certain actions */
6944 if (!get_item_allow(k))
6950 /* Accept that choice */
6959 /* Hack -- Fix screen */
6969 command_wrk = (USE_FLOOR);
6975 case '1': case '2': case '3':
6976 case '4': case '5': case '6':
6977 case '7': case '8': case '9':
6979 /* Look up the tag */
6980 if (!get_tag(&k, which))
6986 /* Hack -- Validate the item */
6987 if ((k < INVEN_RARM) ? !inven : !equip)
6993 /* Validate the item */
6994 if (!get_item_okay(k))
7000 /* Allow player to "refuse" certain actions */
7001 if (!get_item_allow(k))
7007 /* Accept that choice */
7019 /* Choose "default" inventory item */
7020 if (command_wrk == (USE_INVEN))
7022 k = ((i1 == i2) ? i1 : -1);
7025 /* Choose "default" equipment item */
7026 else if (command_wrk == (USE_EQUIP))
7028 k = ((e1 == e2) ? e1 : -1);
7031 /* Choose "default" floor item */
7032 else if (command_wrk == (USE_FLOOR))
7037 k = 0 - floor_list[0];
7039 /* Allow player to "refuse" certain actions */
7040 if (!get_item_allow(k))
7046 /* Accept that choice */
7054 /* Validate the item */
7055 if (!get_item_okay(k))
7061 /* Allow player to "refuse" certain actions */
7062 if (!get_item_allow(k))
7068 /* Accept that choice */
7077 if (select_the_force) {
7089 if(select_spellbook){
7090 bool not_found = FALSE;
7091 /* Look up the tag */
7092 if (!get_tag(&k, which))
7097 /* Hack -- Validate the item */
7098 if ((k < INVEN_RARM) ? !inven : !equip)
7103 /* Validate the item */
7104 if (!get_item_okay(k))
7110 /* Accept that choice */
7118 /* Extract "query" setting */
7119 ver = isupper(which);
7120 which = tolower(which);
7122 /* Convert letter to inventory index */
7123 if (command_wrk == (USE_INVEN))
7125 k = label_to_inven(which);
7128 /* Convert letter to equipment index */
7129 else if (command_wrk == (USE_EQUIP))
7131 k = label_to_equip(which);
7134 /* Convert letter to floor index */
7135 else if (command_wrk == USE_FLOOR)
7137 k = islower(which) ? A2I(which) : -1;
7138 if (k < 0 || k >= floor_num)
7145 k = 0 - floor_list[k];
7148 /* Validate the item */
7149 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
7155 /* Verify the item */
7157 if (ver && !verify("ËÜÅö¤Ë", k))
7159 if (ver && !verify("Try", k))
7167 /* Allow player to "refuse" certain actions */
7168 if (!get_item_allow(k))
7174 /* Accept that choice */
7184 /* Fix the screen if necessary */
7190 /* Hack -- Cancel "display" */
7191 command_see = FALSE;
7195 /* Forget the item_tester_tval restriction */
7196 item_tester_tval = 0;
7198 /* Forget the item_tester_hook restriction */
7199 item_tester_hook = NULL;
7205 /* Toggle again if needed */
7206 if (toggle) toggle_inven_equip();
7209 p_ptr->window |= (PW_INVEN | PW_EQUIP);
7216 /* Clear the prompt line */
7219 /* Warning if needed */
7220 if (oops && str) msg_print(str);
7223 if (item) repeat_push(*cp);
7224 #endif /* ALLOW_REPEAT */
7231 bool py_pickup_floor_aux(void)
7241 /* Restrict the choices */
7242 item_tester_hook = inven_carry_okay;
7246 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
7247 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
7249 q = "Get which item? ";
7250 s = "You no longer have any room for the objects on the floor.";
7253 if (get_item(&item, q, s, (USE_FLOOR)))
7255 this_o_idx = 0 - item;
7262 /* Access the object */
7263 o_ptr = &o_list[this_o_idx];
7265 /* Pick up the object */
7266 py_pickup_aux(this_o_idx);
7273 * Make the player carry everything in a grid
7275 * If "pickup" is FALSE then only gold will be picked up
7277 * This is called by py_pickup() when easy_floor is TRUE.
7279 void py_pickup_floor(int pickup)
7281 s16b this_o_idx, next_o_idx = 0;
7283 char o_name[MAX_NLEN];
7286 int floor_num = 0, floor_list[23], floor_o_idx = 0;
7290 /* Scan the pile of objects */
7291 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
7295 /* Access the object */
7296 o_ptr = &o_list[this_o_idx];
7298 /* Describe the object */
7299 object_desc(o_name, o_ptr, TRUE, 3);
7301 /* Access the next object */
7302 next_o_idx = o_ptr->next_o_idx;
7304 /* Hack -- disturb */
7308 if (o_ptr->tval == TV_GOLD)
7312 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
7313 (long)o_ptr->pval, o_name);
7315 msg_format("You have found %ld gold pieces worth of %s.",
7316 (long) o_ptr->pval, o_name);
7320 /* Collect the gold */
7321 p_ptr->au += o_ptr->pval;
7324 p_ptr->redraw |= (PR_GOLD);
7327 p_ptr->window |= (PW_PLAYER);
7329 /* Delete the gold */
7330 delete_object_idx(this_o_idx);
7332 /* Check the next object */
7336 /* Count non-gold objects that can be picked up. */
7337 if (inven_carry_okay(o_ptr))
7342 /* Remember this object index */
7343 floor_list[floor_num] = this_o_idx;
7345 /* Count non-gold objects */
7348 if (floor_num == 23) break;
7350 /* Remember this index */
7351 floor_o_idx = this_o_idx;
7354 /* There are no non-gold objects */
7358 /* Mention the number of objects */
7364 /* Access the object */
7365 o_ptr = &o_list[floor_o_idx];
7367 #ifdef ALLOW_EASY_SENSE
7369 /* Option: Make object sensing easy */
7372 /* Sense the object */
7373 (void) sense_object(o_ptr);
7376 #endif /* ALLOW_EASY_SENSE */
7378 /* Describe the object */
7379 object_desc(o_name, o_ptr, TRUE, 3);
7383 msg_format("%s¤¬¤¢¤ë¡£", o_name);
7385 msg_format("You see %s.", o_name);
7390 /* Multiple objects */
7395 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
7397 msg_format("You see a pile of %d items.", floor_num);
7406 /* The player has no room for anything on the floor. */
7412 /* Access the object */
7413 o_ptr = &o_list[floor_o_idx];
7415 #ifdef ALLOW_EASY_SENSE
7417 /* Option: Make object sensing easy */
7420 /* Sense the object */
7421 (void) sense_object(o_ptr);
7424 #endif /* ALLOW_EASY_SENSE */
7426 /* Describe the object */
7427 object_desc(o_name, o_ptr, TRUE, 3);
7431 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7433 msg_format("You have no room for %s.", o_name);
7438 /* Multiple objects */
7443 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7445 msg_print("You have no room for any of the objects on the floor.");
7457 /* Hack -- query every object */
7458 if (carry_query_flag)
7460 char out_val[MAX_NLEN+20];
7462 /* Access the object */
7463 o_ptr = &o_list[floor_o_idx];
7465 #ifdef ALLOW_EASY_SENSE
7467 /* Option: Make object sensing easy */
7470 /* Sense the object */
7471 (void) sense_object(o_ptr);
7474 #endif /* ALLOW_EASY_SENSE */
7476 /* Describe the object */
7477 object_desc(o_name, o_ptr, TRUE, 3);
7479 /* Build a prompt */
7481 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7483 (void) sprintf(out_val, "Pick up %s? ", o_name);
7487 /* Ask the user to confirm */
7488 if (!get_check(out_val))
7495 /* Access the object */
7496 o_ptr = &o_list[floor_o_idx];
7498 #ifdef ALLOW_EASY_SENSE
7500 /* Option: Make object sensing easy */
7503 /* Sense the object */
7504 (void) sense_object(o_ptr);
7507 #endif /* ALLOW_EASY_SENSE */
7509 /* Pick up the object */
7510 py_pickup_aux(floor_o_idx);
7513 /* Allow the user to choose an object */
7516 while (can_pickup--)
7518 if (!py_pickup_floor_aux()) break;
7523 #endif /* ALLOW_EASY_FLOOR */