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);
2399 /* Extract the description */
2403 roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
2404 (k_text + k_info[lookup_kind(o_ptr->tval, o_ptr->sval)].text),
2406 for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
2407 { info[i] = &temp[j]; i++;}
2410 /* Mega-Hack -- describe activation */
2411 if (f3 & (TR3_ACTIVATE))
2414 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
2416 info[i++] = "It can be activated for...";
2419 info[i++] = item_activation(o_ptr);
2421 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
2423 info[i++] = "...if it is being worn.";
2428 /* Figurines, a hack */
2429 if (o_ptr->tval == TV_FIGURINE)
2432 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
2434 info[i++] = "It will transform into a pet when thrown.";
2439 /* Figurines, a hack */
2440 if (o_ptr->name1 == ART_STONEMASK)
2443 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
2445 info[i++] = "It makes you turn into a vampire permanently.";
2450 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
2453 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
2455 info[i++] = "It will attempts to kill a monster instantly.";
2460 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
2463 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
2465 info[i++] = "It strikes yourself sometimes.";
2469 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
2471 info[i++] = "It will always penetrates invulnerability barrier.";
2475 if (o_ptr->name2 == EGO_2WEAPON)
2478 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
2480 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
2485 if (o_ptr->name2 == EGO_RING_WIZARD)
2488 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
2490 info[i++] = "It affects your ability to use magic devices.";
2494 if (o_ptr->name2 == EGO_AMU_FOOL)
2497 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
2499 info[i++] = "It prevents you from using magic items.";
2503 if (o_ptr->name2 == EGO_RING_THROW)
2506 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2508 info[i++] = "It provides great strength when you throw an item.";
2512 if (o_ptr->name2 == EGO_AMU_NAIVETY)
2515 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
2517 info[i++] = "It decreases your magic resistance.";
2521 if (o_ptr->tval == TV_STATUE)
2523 monster_race *r_ptr = &r_info[o_ptr->pval];
2525 if (o_ptr->pval == MON_BULLGATES)
2527 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
2529 info[i++] = "It is shameful.";
2531 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
2533 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
2535 info[i++] = "It is fearful.";
2539 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
2541 info[i++] = "It is cheerful.";
2545 /* Hack -- describe lite's */
2546 if (o_ptr->tval == TV_LITE)
2548 if (o_ptr->name2 == EGO_LITE_DARKNESS)
2551 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
2553 info[i++] = "It provides no light..";
2556 else if (artifact_p(o_ptr))
2559 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2561 info[i++] = "It provides light (radius 3) forever.";
2565 else if (o_ptr->name2 == EGO_LITE_SHINE)
2567 if (o_ptr->sval == SV_LITE_FEANOR)
2570 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2572 info[i++] = "It provides light (radius 3) forever.";
2576 else if (o_ptr->sval == SV_LITE_LANTERN)
2579 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2581 info[i++] = "It provides light (radius 3) when fueled.";
2588 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2590 info[i++] = "It provides light (radius 2) when fueled.";
2597 if (o_ptr->sval == SV_LITE_FEANOR)
2600 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2602 info[i++] = "It provides light (radius 2) forever.";
2606 else if (o_ptr->sval == SV_LITE_LANTERN)
2609 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2611 info[i++] = "It provides light (radius 2) when fueled.";
2618 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
2620 info[i++] = "It provides light (radius 1) when fueled.";
2625 if (o_ptr->name2 == EGO_LITE_LONG)
2628 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
2630 info[i++] = "It provides light for much longer time.";
2636 /* And then describe it fully */
2638 if (f2 & (TR2_RIDING))
2640 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
2642 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
2644 info[i++] = "It is made for use while riding.";
2648 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
2650 info[i++] = "It is suitable for use while riding.";
2657 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2659 info[i++] = "It affects your strength.";
2666 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2668 info[i++] = "It affects your intelligence.";
2675 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2677 info[i++] = "It affects your wisdom.";
2684 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2686 info[i++] = "It affects your dexterity.";
2693 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2695 info[i++] = "It affects your constitution.";
2702 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2704 info[i++] = "It affects your charisma.";
2709 if (f1 & (TR1_MAGIC_MASTERY))
2712 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2714 info[i++] = "It affects your ability to use magic devices.";
2718 if (f1 & (TR1_STEALTH))
2721 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2723 info[i++] = "It affects your stealth.";
2727 if (f1 & (TR1_SEARCH))
2730 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2732 info[i++] = "It affects your searching.";
2736 if (f1 & (TR1_INFRA))
2739 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2741 info[i++] = "It affects your infravision.";
2745 if (f1 & (TR1_TUNNEL))
2748 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2750 info[i++] = "It affects your ability to tunnel.";
2754 if (f1 & (TR1_SPEED))
2757 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2759 info[i++] = "It affects your speed.";
2763 if (f1 & (TR1_BLOWS))
2766 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2768 info[i++] = "It affects your attack speed.";
2773 if (f1 & (TR1_BRAND_ACID))
2776 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2778 info[i++] = "It does extra damage from acid.";
2782 if (f1 & (TR1_BRAND_ELEC))
2785 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2787 info[i++] = "It does extra damage from electricity.";
2791 if (f1 & (TR1_BRAND_FIRE))
2794 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2796 info[i++] = "It does extra damage from fire.";
2800 if (f1 & (TR1_BRAND_COLD))
2803 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2805 info[i++] = "It does extra damage from frost.";
2810 if (f1 & (TR1_BRAND_POIS))
2813 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
2815 info[i++] = "It poisons your foes.";
2820 if (f1 & (TR1_CHAOTIC))
2823 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
2825 info[i++] = "It produces chaotic effects.";
2830 if (f1 & (TR1_VAMPIRIC))
2833 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
2835 info[i++] = "It drains life from your foes.";
2840 if (f1 & (TR1_IMPACT))
2843 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
2845 info[i++] = "It can cause earthquakes.";
2850 if (f1 & (TR1_VORPAL))
2853 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2855 info[i++] = "It is very sharp and can cut your foes.";
2860 if (f1 & (TR1_KILL_DRAGON))
2863 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2865 info[i++] = "It is a great bane of dragons.";
2869 else if (f1 & (TR1_SLAY_DRAGON))
2872 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2874 info[i++] = "It is especially deadly against dragons.";
2878 if (f1 & (TR1_SLAY_ORC))
2881 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2883 info[i++] = "It is especially deadly against orcs.";
2887 if (f1 & (TR1_SLAY_TROLL))
2890 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2892 info[i++] = "It is especially deadly against trolls.";
2896 if (f1 & (TR1_SLAY_GIANT))
2898 if (o_ptr->name1 == ART_HRUNTING)
2900 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2902 info[i++] = "It is a great bane of giants.";
2906 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2908 info[i++] = "It is especially deadly against giants.";
2912 if (f1 & (TR1_SLAY_DEMON))
2915 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2917 info[i++] = "It strikes at demons with holy wrath.";
2921 if (f1 & (TR1_SLAY_UNDEAD))
2924 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2926 info[i++] = "It strikes at undead with holy wrath.";
2930 if (f1 & (TR1_SLAY_EVIL))
2933 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
2935 info[i++] = "It fights against evil with holy fury.";
2939 if (f1 & (TR1_SLAY_ANIMAL))
2942 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2944 info[i++] = "It is especially deadly against natural creatures.";
2948 if (f3 & (TR3_SLAY_HUMAN))
2951 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2953 info[i++] = "It is especially deadly against humans.";
2958 if (f1 & (TR1_FORCE_WEAPON))
2961 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
2963 info[i++] = "It powerfully strikes at a monster using your mana.";
2967 if (f3 & (TR3_DEC_MANA))
2970 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
2972 info[i++] = "It decreases your mana consumption.";
2976 if (f2 & (TR2_SUST_STR))
2979 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
2981 info[i++] = "It sustains your strength.";
2985 if (f2 & (TR2_SUST_INT))
2988 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
2990 info[i++] = "It sustains your intelligence.";
2994 if (f2 & (TR2_SUST_WIS))
2997 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
2999 info[i++] = "It sustains your wisdom.";
3003 if (f2 & (TR2_SUST_DEX))
3006 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
3008 info[i++] = "It sustains your dexterity.";
3012 if (f2 & (TR2_SUST_CON))
3015 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
3017 info[i++] = "It sustains your constitution.";
3021 if (f2 & (TR2_SUST_CHR))
3024 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
3026 info[i++] = "It sustains your charisma.";
3031 if (f2 & (TR2_IM_ACID))
3034 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3036 info[i++] = "It provides immunity to acid.";
3040 if (f2 & (TR2_IM_ELEC))
3043 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3045 info[i++] = "It provides immunity to electricity.";
3049 if (f2 & (TR2_IM_FIRE))
3052 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3054 info[i++] = "It provides immunity to fire.";
3058 if (f2 & (TR2_IM_COLD))
3061 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3063 info[i++] = "It provides immunity to cold.";
3068 if (f2 & (TR2_THROW))
3071 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3073 info[i++] = "It is perfectly balanced for throwing.";
3077 if (f2 & (TR2_FREE_ACT))
3080 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3082 info[i++] = "It provides immunity to paralysis.";
3086 if (f2 & (TR2_HOLD_LIFE))
3089 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
3091 info[i++] = "It provides resistance to life draining.";
3095 if (f2 & (TR2_RES_FEAR))
3098 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3100 info[i++] = "It makes you completely fearless.";
3104 if (f2 & (TR2_RES_ACID))
3107 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3109 info[i++] = "It provides resistance to acid.";
3113 if (f2 & (TR2_RES_ELEC))
3116 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3118 info[i++] = "It provides resistance to electricity.";
3122 if (f2 & (TR2_RES_FIRE))
3125 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3127 info[i++] = "It provides resistance to fire.";
3131 if (f2 & (TR2_RES_COLD))
3134 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3136 info[i++] = "It provides resistance to cold.";
3140 if (f2 & (TR2_RES_POIS))
3143 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3145 info[i++] = "It provides resistance to poison.";
3150 if (f2 & (TR2_RES_LITE))
3153 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3155 info[i++] = "It provides resistance to light.";
3159 if (f2 & (TR2_RES_DARK))
3162 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3164 info[i++] = "It provides resistance to dark.";
3169 if (f2 & (TR2_RES_BLIND))
3172 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3174 info[i++] = "It provides resistance to blindness.";
3178 if (f2 & (TR2_RES_CONF))
3181 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3183 info[i++] = "It provides resistance to confusion.";
3187 if (f2 & (TR2_RES_SOUND))
3190 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3192 info[i++] = "It provides resistance to sound.";
3196 if (f2 & (TR2_RES_SHARDS))
3199 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3201 info[i++] = "It provides resistance to shards.";
3206 if (f2 & (TR2_RES_NETHER))
3209 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3211 info[i++] = "It provides resistance to nether.";
3215 if (f2 & (TR2_RES_NEXUS))
3218 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3220 info[i++] = "It provides resistance to nexus.";
3224 if (f2 & (TR2_RES_CHAOS))
3227 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3229 info[i++] = "It provides resistance to chaos.";
3233 if (f2 & (TR2_RES_DISEN))
3236 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3238 info[i++] = "It provides resistance to disenchantment.";
3243 if (f3 & (TR3_FEATHER))
3246 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3248 info[i++] = "It allows you to levitate.";
3252 if (f3 & (TR3_LITE))
3254 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
3256 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë¡£";
3258 info[i++] = "It decreases radius of your light source.";
3262 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
3264 info[i++] = "It provides permanent light.";
3268 if (f3 & (TR3_SEE_INVIS))
3271 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3273 info[i++] = "It allows you to see invisible monsters.";
3277 if (f3 & (TR3_TELEPATHY))
3280 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
3282 info[i++] = "It gives telepathic powers.";
3286 if (f3 & (TR3_SLOW_DIGEST))
3289 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
3291 info[i++] = "It slows your metabolism.";
3295 if (f3 & (TR3_REGEN))
3298 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
3300 info[i++] = "It speeds your regenerative powers.";
3304 if (f3 & (TR3_WARNING))
3307 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
3309 info[i++] = "It warns you of danger";
3313 if (f2 & (TR2_REFLECT))
3316 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
3318 info[i++] = "It reflects bolts and arrows.";
3322 if (f3 & (TR3_SH_FIRE))
3325 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3327 info[i++] = "It produces a fiery sheath.";
3331 if (f3 & (TR3_SH_ELEC))
3334 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3336 info[i++] = "It produces an electric sheath.";
3340 if (f3 & (TR3_SH_COLD))
3343 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3345 info[i++] = "It produces a coldly sheath.";
3349 if (f3 & (TR3_NO_MAGIC))
3352 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3354 info[i++] = "It produces an anti-magic shell.";
3358 if (f3 & (TR3_NO_TELE))
3361 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
3363 info[i++] = "It prevents teleportation.";
3367 if (f3 & (TR3_XTRA_MIGHT))
3370 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3372 info[i++] = "It fires missiles with extra might.";
3376 if (f3 & (TR3_XTRA_SHOTS))
3379 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3381 info[i++] = "It fires missiles excessively fast.";
3386 if (f3 & TR3_BLESSED)
3389 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
3391 info[i++] = "It has been blessed by the gods.";
3396 if (cursed_p(o_ptr))
3398 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
3401 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3403 info[i++] = "It is permanently cursed.";
3407 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
3410 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3412 info[i++] = "It is heavily cursed.";
3419 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
3421 info[i++] = "It is cursed.";
3427 if ((f3 & TR3_TY_CURSE) || (o_ptr->curse_flags & TRC_TY_CURSE))
3430 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
3432 info[i++] = "It carries an ancient foul curse.";
3436 if ((f3 & TR3_AGGRAVATE) || (o_ptr->curse_flags & TRC_AGGRAVATE))
3439 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
3441 info[i++] = "It aggravates nearby creatures.";
3445 if ((f3 & (TR3_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
3448 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
3450 info[i++] = "It drains experience.";
3454 if (o_ptr->curse_flags & TRC_SLOW_REGEN)
3457 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
3459 info[i++] = "It slows your regenerative powers.";
3463 if (o_ptr->curse_flags & TRC_ADD_L_CURSE)
3466 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
3468 info[i++] = "It adds weak curses.";
3472 if (o_ptr->curse_flags & TRC_ADD_H_CURSE)
3475 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
3477 info[i++] = "It adds heavy curses.";
3481 if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
3484 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3486 info[i++] = "It attracts animals.";
3490 if (o_ptr->curse_flags & TRC_CALL_DEMON)
3493 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3495 info[i++] = "It attracts demons.";
3499 if (o_ptr->curse_flags & TRC_CALL_DRAGON)
3502 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
3504 info[i++] = "It attracts dragons.";
3508 if (o_ptr->curse_flags & TRC_COWARDICE)
3511 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤µ¯¤³¤¹¡£";
3513 info[i++] = "It makes you subject to cowardice.";
3517 if ((f3 & (TR3_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
3520 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
3522 info[i++] = "It induces random teleportation.";
3526 if (o_ptr->curse_flags & TRC_LOW_MELEE)
3529 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
3531 info[i++] = "It causes you miss blows.";
3535 if (o_ptr->curse_flags & TRC_LOW_AC)
3538 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
3540 info[i++] = "It helps your enemys' blows.";
3544 if (o_ptr->curse_flags & TRC_LOW_MAGIC)
3547 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
3549 info[i++] = "It encumbers you while spellcasting.";
3553 if (o_ptr->curse_flags & TRC_FAST_DIGEST)
3556 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
3558 info[i++] = "It speeds your metabolism.";
3562 if (o_ptr->curse_flags & TRC_DRAIN_HP)
3565 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
3567 info[i++] = "It drains you.";
3571 if (o_ptr->curse_flags & TRC_DRAIN_MANA)
3574 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
3576 info[i++] = "It drains your mana.";
3581 /* XTRA HACK ARTDESC */
3582 flag = TR3_IGNORE_ACID | TR3_IGNORE_ELEC | TR3_IGNORE_FIRE | TR3_IGNORE_COLD ;
3583 if ((f3 & flag) == flag)
3586 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3588 info[i++] = "It cannot be harmed by the elements.";
3591 if (f3 & (TR3_IGNORE_ACID))
3594 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3596 info[i++] = "It cannot be harmed by acid.";
3600 if (f3 & (TR3_IGNORE_ELEC))
3603 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3605 info[i++] = "It cannot be harmed by electricity.";
3609 if (f3 & (TR3_IGNORE_FIRE))
3612 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3614 info[i++] = "It cannot be harmed by fire.";
3618 if (f3 & (TR3_IGNORE_COLD))
3621 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3623 info[i++] = "It cannot be harmed by cold.";
3628 /* XTRA HACK ARTDESC */
3631 /* No special effects */
3632 if (!i) return (FALSE);
3634 /* Save the screen */
3638 Term_get_size(&wid, &hgt);
3640 /* Display Item name */
3641 object_desc(o_name, o_ptr, TRUE, 3);
3642 prt(format("%s", o_name), 0, 0);
3644 /* Erase the screen */
3645 for (k = 1; k < hgt; k++) prt("", k, 13);
3647 /* Label the information */
3648 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
3650 monster_race *r_ptr = &r_info[o_ptr->pval];
3651 int namelen = strlen(r_name + r_ptr->name);
3652 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
3653 c_prt(r_ptr->d_attr, format("%c", r_ptr->d_char), 1, 18+namelen);
3654 prt("'", 1, 19+namelen);
3658 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
3660 prt(" Item Attributes:", 1, 15);
3663 /* We will print on top of the map (column 13) */
3664 for (k = 2, j = 0; j < i; j++)
3667 prt(info[j], k++, 15);
3669 /* Every 20 entries (lines 2 to 21), start over */
3670 if ((k == hgt - 2) && (j+1 < i))
3673 prt("-- ³¤¯ --", k, 15);
3675 prt("-- more --", k, 15);
3678 for (; k > 2; k--) prt("", k, 15);
3684 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
3686 prt("[Press any key to continue]", k, 15);
3691 /* Restore the screen */
3694 /* Gave knowledge */
3701 * Convert an inventory index into a one character label
3702 * Note that the label does NOT distinguish inven/equip.
3704 char index_to_label(int i)
3706 /* Indexes for "inven" are easy */
3707 if (i < INVEN_RARM) return (I2A(i));
3709 /* Indexes for "equip" are offset */
3710 return (I2A(i - INVEN_RARM));
3715 * Convert a label into the index of an item in the "inven"
3716 * Return "-1" if the label does not indicate a real item
3718 s16b label_to_inven(int c)
3723 i = (islower(c) ? A2I(c) : -1);
3725 /* Verify the index */
3726 if ((i < 0) || (i > INVEN_PACK)) return (-1);
3728 /* Empty slots can never be chosen */
3729 if (!inventory[i].k_idx) return (-1);
3731 /* Return the index */
3737 * Convert a label into the index of a item in the "equip"
3738 * Return "-1" if the label does not indicate a real item
3740 s16b label_to_equip(int c)
3745 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
3747 /* Verify the index */
3748 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
3750 /* Empty slots can never be chosen */
3751 if (!inventory[i].k_idx) return (-1);
3753 /* Return the index */
3760 * Determine which equipment slot (if any) an item likes
3762 s16b wield_slot(object_type *o_ptr)
3764 /* Slot for equipment */
3765 switch (o_ptr->tval)
3772 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
3773 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
3774 return (INVEN_LARM);
3781 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
3782 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
3783 return (INVEN_RARM);
3793 /* Use the right hand first */
3794 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
3796 /* Use the left hand for swapping (by default) */
3797 return (INVEN_LEFT);
3803 return (INVEN_NECK);
3808 return (INVEN_LITE);
3815 return (INVEN_BODY);
3820 return (INVEN_OUTER);
3826 return (INVEN_HEAD);
3831 return (INVEN_HANDS);
3836 return (INVEN_FEET);
3840 /* No slot available */
3846 * Return a string mentioning how a given item is carried
3848 cptr mention_use(int i)
3852 /* Examine the location */
3856 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê"); break;
3858 case INVEN_RARM: p = "Wielding"; break;
3862 case INVEN_LARM: p = (left_hander ? " ±¦¼ê" : " º¸¼ê"); break;
3864 case INVEN_LARM: p = "On arm"; break;
3868 case INVEN_BOW: p = "¼Í·âÍÑ"; break;
3870 case INVEN_BOW: p = "Shooting"; break;
3874 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
3876 case INVEN_LEFT: p = "On left hand"; break;
3880 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
3882 case INVEN_RIGHT: p = "On right hand"; break;
3886 case INVEN_NECK: p = " ¼ó"; break;
3888 case INVEN_NECK: p = "Around neck"; break;
3892 case INVEN_LITE: p = " ¸÷¸»"; break;
3894 case INVEN_LITE: p = "Light source"; break;
3898 case INVEN_BODY: p = " ÂÎ"; break;
3900 case INVEN_BODY: p = "On body"; break;
3904 case INVEN_OUTER: p = "ÂΤξå"; break;
3906 case INVEN_OUTER: p = "About body"; break;
3910 case INVEN_HEAD: p = " Ƭ"; break;
3912 case INVEN_HEAD: p = "On head"; break;
3916 case INVEN_HANDS: p = " ¼ê"; break;
3918 case INVEN_HANDS: p = "On hands"; break;
3922 case INVEN_FEET: p = " "; break;
3924 case INVEN_FEET: p = "On feet"; break;
3928 default: p = "¥¶¥Ã¥¯"; break;
3930 default: p = "In pack"; break;
3935 /* Hack -- Heavy weapon */
3936 if (i == INVEN_RARM)
3938 if (p_ptr->heavy_wield[0])
3949 /* Hack -- Heavy weapon */
3950 if (i == INVEN_LARM)
3952 if (p_ptr->heavy_wield[1])
3963 /* Hack -- Heavy bow */
3967 o_ptr = &inventory[i];
3968 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
3979 /* Return the result */
3985 * Return a string describing how a given item is being worn.
3986 * Currently, only used for items in the equipment, not inventory.
3988 cptr describe_use(int i)
3995 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
3997 case INVEN_RARM: p = "attacking monsters with"; break;
4001 case INVEN_LARM: p = (left_hander ? " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
4003 case INVEN_LARM: p = "wearing on your arm"; break;
4007 case INVEN_BOW: p = "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
4009 case INVEN_BOW: p = "shooting missiles with"; break;
4013 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4015 case INVEN_LEFT: p = "wearing on your left hand"; break;
4019 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4021 case INVEN_RIGHT: p = "wearing on your right hand"; break;
4025 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
4027 case INVEN_NECK: p = "wearing around your neck"; break;
4031 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
4033 case INVEN_LITE: p = "using to light the way"; break;
4037 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
4039 case INVEN_BODY: p = "wearing on your body"; break;
4043 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
4045 case INVEN_OUTER: p = "wearing on your back"; break;
4049 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
4051 case INVEN_HEAD: p = "wearing on your head"; break;
4055 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
4057 case INVEN_HANDS: p = "wearing on your hands"; break;
4061 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
4063 case INVEN_FEET: p = "wearing on your feet"; break;
4067 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
4069 default: p = "carrying in your pack"; break;
4074 /* Hack -- Heavy weapon */
4075 if (i == INVEN_RARM)
4078 int hold = adj_str_hold[p_ptr->stat_ind[A_STR]];
4080 if (p_ptr->ryoute) hold *= 2;
4081 o_ptr = &inventory[i];
4082 if (hold < o_ptr->weight / 10)
4093 /* Hack -- Heavy bow */
4097 o_ptr = &inventory[i];
4098 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
4101 p = "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î";
4109 /* Return the result */
4114 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
4116 bool check_book_realm(const byte book_tval, const byte book_sval)
4118 if (book_tval < TV_LIFE_BOOK) return FALSE;
4119 if (p_ptr->pclass == CLASS_SORCERER)
4121 return is_magic(tval2realm(book_tval));
4123 else if (p_ptr->pclass == CLASS_RED_MAGE)
4125 if (is_magic(tval2realm(book_tval)))
4126 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
4128 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
4133 * Check an item against the item tester info
4135 bool item_tester_okay(object_type *o_ptr)
4137 /* Hack -- allow listing empty slots */
4138 if (item_tester_full) return (TRUE);
4140 /* Require an item */
4141 if (!o_ptr->k_idx) return (FALSE);
4143 /* Hack -- ignore "gold" */
4144 if (o_ptr->tval == TV_GOLD) return (FALSE);
4146 /* Check the tval */
4147 if (item_tester_tval)
4149 /* Is it a spellbook? If so, we need a hack -- TY */
4150 if ((item_tester_tval <= TV_DEATH_BOOK) &&
4151 (item_tester_tval >= TV_LIFE_BOOK))
4152 return check_book_realm(o_ptr->tval, o_ptr->sval);
4154 if (item_tester_tval != o_ptr->tval) return (FALSE);
4157 /* Check the hook */
4158 if (item_tester_hook)
4160 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
4171 * Choice window "shadow" of the "show_inven()" function
4173 void display_inven(void)
4175 register int i, n, z = 0;
4177 byte attr = TERM_WHITE;
4179 char o_name[MAX_NLEN];
4182 /* Find the "final" slot */
4183 for (i = 0; i < INVEN_PACK; i++)
4185 o_ptr = &inventory[i];
4187 /* Skip non-objects */
4188 if (!o_ptr->k_idx) continue;
4194 /* Display the pack */
4195 for (i = 0; i < z; i++)
4197 /* Examine the item */
4198 o_ptr = &inventory[i];
4200 /* Start with an empty "index" */
4201 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4203 /* Is this item "acceptable"? */
4204 if (item_tester_okay(o_ptr))
4206 /* Prepare an "index" */
4207 tmp_val[0] = index_to_label(i);
4209 /* Bracket the "index" --(-- */
4213 /* Display the index (or blank space) */
4214 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
4216 /* Obtain an item description */
4217 object_desc(o_name, o_ptr, TRUE, 3);
4219 /* Obtain the length of the description */
4223 attr = tval_to_attr[o_ptr->tval % 128];
4225 /* Grey out charging items */
4231 /* Display the entry itself */
4232 Term_putstr(3, i, n, attr, o_name);
4234 /* Erase the rest of the line */
4235 Term_erase(3+n, i, 255);
4237 /* Display the weight if needed */
4238 if (show_weights && o_ptr->weight)
4240 int wgt = o_ptr->weight * o_ptr->number;
4242 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
4244 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4247 Term_putstr(71, i, -1, TERM_WHITE, tmp_val);
4251 /* Erase the rest of the window */
4252 for (i = z; i < Term->hgt; i++)
4254 /* Erase the line */
4255 Term_erase(0, i, 255);
4262 * Choice window "shadow" of the "show_equip()" function
4264 void display_equip(void)
4268 byte attr = TERM_WHITE;
4270 char o_name[MAX_NLEN];
4273 /* Display the equipment */
4274 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
4276 /* Examine the item */
4277 o_ptr = &inventory[i];
4279 /* Start with an empty "index" */
4280 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4282 /* Is this item "acceptable"? */
4283 if (item_tester_okay(o_ptr))
4285 /* Prepare an "index" */
4286 tmp_val[0] = index_to_label(i);
4288 /* Bracket the "index" --(-- */
4292 /* Display the index (or blank space) */
4293 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
4295 /* Obtain an item description */
4296 if ((i == INVEN_LARM) && p_ptr->ryoute)
4299 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
4301 strcpy(o_name, "(wielding with two-hands)");
4307 object_desc(o_name, o_ptr, TRUE, 3);
4308 attr = tval_to_attr[o_ptr->tval % 128];
4311 /* Obtain the length of the description */
4314 /* Grey out charging items */
4320 /* Display the entry itself */
4321 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
4323 /* Erase the rest of the line */
4324 Term_erase(3+n, i - INVEN_RARM, 255);
4326 /* Display the slot description (if needed) */
4329 Term_putstr(61, i - INVEN_RARM, -1, TERM_WHITE, "<--");
4330 Term_putstr(65, i - INVEN_RARM, -1, TERM_WHITE, mention_use(i));
4333 /* Display the weight (if needed) */
4334 if (show_weights && o_ptr->weight)
4336 int wgt = o_ptr->weight * o_ptr->number;
4337 int col = (show_labels ? 52 : 71);
4339 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
4341 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4344 Term_putstr(col, i - INVEN_RARM, -1, TERM_WHITE, tmp_val);
4348 /* Erase the rest of the window */
4349 for (i = INVEN_TOTAL - INVEN_RARM; i < Term->hgt; i++)
4351 /* Clear that line */
4352 Term_erase(0, i, 255);
4362 * Display the inventory.
4364 * Hack -- do not display "trailing" empty slots
4366 int show_inven(int target_item)
4368 int i, j, k, l, z = 0;
4369 int col, cur_col, len, lim;
4371 char o_name[MAX_NLEN];
4375 char out_desc[23][MAX_NLEN];
4376 int target_item_label = 0;
4380 /* Starting column */
4384 Term_get_size(&wid, &hgt);
4386 /* Default "max-length" */
4387 len = wid - col - 1;
4389 /* Maximum space allowed for descriptions */
4392 /* Require space for weight (if needed) */
4393 if (show_weights) lim -= 9;
4395 /* Require space for icon */
4396 if (show_item_graph)
4399 if (use_bigtile) lim--;
4402 /* Find the "final" slot */
4403 for (i = 0; i < INVEN_PACK; i++)
4405 o_ptr = &inventory[i];
4407 /* Skip non-objects */
4408 if (!o_ptr->k_idx) continue;
4414 /* Display the inventory */
4415 for (k = 0, i = 0; i < z; i++)
4417 o_ptr = &inventory[i];
4419 /* Is this item acceptable? */
4420 if (!item_tester_okay(o_ptr)) continue;
4422 /* Describe the object */
4423 object_desc(o_name, o_ptr, TRUE, 3);
4425 /* Hack -- enforce max length */
4428 /* Save the object index, color, and description */
4430 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4432 /* Grey out charging items */
4435 out_color[k] = TERM_L_DARK;
4438 (void)strcpy(out_desc[k], o_name);
4440 /* Find the predicted "line length" */
4441 l = strlen(out_desc[k]) + 5;
4443 /* Be sure to account for the weight */
4444 if (show_weights) l += 9;
4446 /* Account for icon if displayed */
4447 if (show_item_graph)
4450 if (use_bigtile) l++;
4453 /* Maintain the maximum length */
4454 if (l > len) len = l;
4456 /* Advance to next "line" */
4460 /* Find the column to start in */
4461 col = (len > wid - 4) ? 0 : (wid - len - 1);
4463 /* Output each entry */
4464 for (j = 0; j < k; j++)
4470 o_ptr = &inventory[i];
4472 /* Clear the line */
4473 prt("", j + 1, col ? col - 2 : col);
4475 if (use_menu && target_item)
4477 if (j == (target_item-1))
4480 strcpy(tmp_val, "¡Õ");
4482 strcpy(tmp_val, "> ");
4484 target_item_label = i;
4486 else strcpy(tmp_val, " ");
4489 /* Prepare an index --(-- */
4490 sprintf(tmp_val, "%c)", index_to_label(i));
4492 /* Clear the line with the (possibly indented) index */
4493 put_str(tmp_val, j + 1, col);
4497 /* Display graphics for object, if desired */
4498 if (show_item_graph)
4500 byte a = object_attr(o_ptr);
4501 char c = object_char(o_ptr);
4504 if (a & 0x80) a |= 0x40;
4507 Term_draw(cur_col, j + 1, a, c);
4512 Term_draw(cur_col, j + 1, 255, 255);
4518 /* Display the entry itself */
4519 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
4521 /* Display the weight if needed */
4524 int wgt = o_ptr->weight * o_ptr->number;
4526 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4528 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4531 put_str(tmp_val, j + 1, wid - 9);
4535 /* Make a "shadow" below the list (only if needed) */
4536 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4538 /* Save the new column */
4541 return target_item_label;
4547 * Display the equipment.
4549 int show_equip(int target_item)
4552 int col, cur_col, len, lim;
4555 char o_name[MAX_NLEN];
4558 char out_desc[23][MAX_NLEN];
4559 int target_item_label = 0;
4563 /* Starting column */
4567 Term_get_size(&wid, &hgt);
4569 /* Maximal length */
4570 len = wid - col - 1;
4572 /* Maximum space allowed for descriptions */
4575 /* Require space for labels (if needed) */
4577 if (show_labels) lim -= (7 + 2);
4579 if (show_labels) lim -= (14 + 2);
4583 /* Require space for weight (if needed) */
4585 if (show_weights) lim -= 10;
4587 if (show_weights) lim -= 9;
4591 if (show_item_graph) lim -= 2;
4593 /* Scan the equipment list */
4594 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
4596 o_ptr = &inventory[i];
4598 /* Is this item acceptable? */
4599 if (!item_tester_okay(o_ptr) && (!((i == INVEN_LARM) && p_ptr->ryoute) || item_tester_no_ryoute)) continue;
4602 object_desc(o_name, o_ptr, TRUE, 3);
4604 /* Truncate the description */
4607 if ((i == INVEN_LARM) && p_ptr->ryoute)
4610 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
4612 (void)strcpy(out_desc[k],"(wielding with two-hands)");
4618 (void)strcpy(out_desc[k], o_name);
4619 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4623 /* Grey out charging items */
4626 out_color[k] = TERM_L_DARK;
4629 /* Extract the maximal length (see below) */
4631 l = strlen(out_desc[k]) + (2 + 1);
4633 l = strlen(out_desc[k]) + (2 + 3);
4637 /* Increase length for labels (if needed) */
4639 if (show_labels) l += (7 + 2);
4641 if (show_labels) l += (14 + 2);
4645 /* Increase length for weight (if needed) */
4646 if (show_weights) l += 9;
4648 if (show_item_graph) l += 2;
4650 /* Maintain the max-length */
4651 if (l > len) len = l;
4653 /* Advance the entry */
4657 /* Hack -- Find a column to start in */
4659 col = (len > wid - 6) ? 0 : (wid - len - 1);
4661 col = (len > wid - 4) ? 0 : (wid - len - 1);
4665 /* Output each entry */
4666 for (j = 0; j < k; j++)
4672 o_ptr = &inventory[i];
4674 /* Clear the line */
4675 prt("", j + 1, col ? col - 2 : col);
4677 if (use_menu && target_item)
4679 if (j == (target_item-1))
4682 strcpy(tmp_val, "¡Õ");
4684 strcpy(tmp_val, "> ");
4686 target_item_label = i;
4688 else strcpy(tmp_val, " ");
4691 /* Prepare an index --(-- */
4692 sprintf(tmp_val, "%c)", index_to_label(i));
4694 /* Clear the line with the (possibly indented) index */
4695 put_str(tmp_val, j+1, col);
4699 /* Display graphics for object, if desired */
4700 if (show_item_graph)
4702 byte a = object_attr(o_ptr);
4703 char c = object_char(o_ptr);
4706 if (a & 0x80) a |= 0x40;
4709 Term_draw(cur_col, j + 1, a, c);
4714 Term_draw(cur_col, j + 1, 255, 255);
4722 /* Mention the use */
4724 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
4726 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
4729 put_str(tmp_val, j+1, cur_col);
4731 /* Display the entry itself */
4733 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
4735 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
4742 /* Display the entry itself */
4743 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
4746 /* Display the weight if needed */
4749 int wgt = o_ptr->weight * o_ptr->number;
4751 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4753 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
4756 put_str(tmp_val, j+1, wid - 9);
4760 /* Make a "shadow" below the list (only if needed) */
4761 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4763 /* Save the new column */
4766 return target_item_label;
4773 * Flip "inven" and "equip" in any sub-windows
4775 void toggle_inven_equip(void)
4780 for (j = 0; j < 8; j++)
4783 if (!angband_term[j]) continue;
4785 /* Flip inven to equip */
4786 if (window_flag[j] & (PW_INVEN))
4789 window_flag[j] &= ~(PW_INVEN);
4790 window_flag[j] |= (PW_EQUIP);
4793 p_ptr->window |= (PW_EQUIP);
4796 /* Flip inven to equip */
4797 else if (window_flag[j] & (PW_EQUIP))
4800 window_flag[j] &= ~(PW_EQUIP);
4801 window_flag[j] |= (PW_INVEN);
4804 p_ptr->window |= (PW_INVEN);
4812 * Verify the choice of an item.
4814 * The item can be negative to mean "item on floor".
4816 static bool verify(cptr prompt, int item)
4818 char o_name[MAX_NLEN];
4819 char out_val[MAX_NLEN+20];
4826 o_ptr = &inventory[item];
4832 o_ptr = &o_list[0 - item];
4836 object_desc(o_name, o_ptr, TRUE, 3);
4840 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
4842 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
4847 return (get_check(out_val));
4852 * Hack -- allow user to "prevent" certain choices
4854 * The item can be negative to mean "item on floor".
4856 static bool get_item_allow(int item)
4865 o_ptr = &inventory[item];
4871 o_ptr = &o_list[0 - item];
4874 /* No inscription */
4875 if (!o_ptr->inscription) return (TRUE);
4878 s = strchr(quark_str(o_ptr->inscription), '!');
4880 /* Process preventions */
4883 /* Check the "restriction" */
4884 if ((s[1] == command_cmd) || (s[1] == '*'))
4886 /* Verify the choice */
4888 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
4890 if (!verify("Really try", item)) return (FALSE);
4895 /* Find another '!' */
4896 s = strchr(s + 1, '!');
4906 * Auxiliary function for "get_item()" -- test an index
4908 static bool get_item_okay(int i)
4911 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
4913 /* Verify the item */
4914 if (!item_tester_okay(&inventory[i])) return (FALSE);
4923 * Find the "first" inventory object with the given "tag".
4925 * A "tag" is a char "n" appearing as "@n" anywhere in the
4926 * inscription of an object.
4928 * Also, the tag "@xn" will work as well, where "n" is a tag-char,
4929 * and "x" is the "current" command_cmd code.
4931 static int get_tag(int *cp, char tag)
4936 /* Check every object */
4937 for (i = 0; i < INVEN_TOTAL; ++i)
4939 object_type *o_ptr = &inventory[i];
4941 /* Skip non-objects */
4942 if (!o_ptr->k_idx) continue;
4944 /* Skip empty inscriptions */
4945 if (!o_ptr->inscription) continue;
4947 /* Skip non-choice */
4948 if (!item_tester_okay(o_ptr)) continue;
4951 s = strchr(quark_str(o_ptr->inscription), '@');
4953 /* Process all tags */
4956 /* Check the special tags */
4957 if ((s[1] == command_cmd) && (s[2] == tag))
4959 /* Save the actual inventory ID */
4966 /* Find another '@' */
4967 s = strchr(s + 1, '@');
4971 /* Check every object */
4972 for (i = 0; i < INVEN_TOTAL; ++i)
4974 object_type *o_ptr = &inventory[i];
4976 /* Skip non-objects */
4977 if (!o_ptr->k_idx) continue;
4979 /* Skip empty inscriptions */
4980 if (!o_ptr->inscription) continue;
4982 /* Skip non-choice */
4983 if (!item_tester_okay(o_ptr)) continue;
4986 s = strchr(quark_str(o_ptr->inscription), '@');
4988 /* Process all tags */
4991 /* Check the normal tags */
4992 if (s[1] == tag && !((s[2] >= '0' && s[2] <= '9') || (s[2] >= 'a' && s[2] <= 'z') || (s[2] >= 'A' && s[2] <= 'Z')))
4994 /* Save the actual inventory ID */
5001 /* Find another '@' */
5002 s = strchr(s + 1, '@');
5011 * Determine whether get_item() can get some item or not
5012 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
5014 bool can_get_item(void)
5016 int j, floor_list[23], floor_num = 0;
5018 for (j = 0; j < INVEN_TOTAL; j++)
5019 if (item_tester_okay(&inventory[j]))
5022 (void)scan_floor(floor_list, &floor_num, py, px, 0x01);
5030 * Let the user select an item, save its "index"
5032 * Return TRUE only if an acceptable item was chosen by the user.
5034 * The selected item must satisfy the "item_tester_hook()" function,
5035 * if that hook is set, and the "item_tester_tval", if that value is set.
5037 * All "item_tester" restrictions are cleared before this function returns.
5039 * The user is allowed to choose acceptable items from the equipment,
5040 * inventory, or floor, respectively, if the proper flag was given,
5041 * and there are any acceptable items in that location.
5043 * The equipment or inventory are displayed (even if no acceptable
5044 * items are in that location) if the proper flag was given.
5046 * If there are no acceptable items available anywhere, and "str" is
5047 * not NULL, then it will be used as the text of a warning message
5048 * before the function returns.
5050 * Note that the user must press "-" to specify the item on the floor,
5051 * and there is no way to "examine" the item on the floor, while the
5052 * use of "capital" letters will "examine" an inventory/equipment item,
5053 * and prompt for its use.
5055 * If a legal item is selected from the inventory, we save it in "cp"
5056 * directly (0 to 35), and return TRUE.
5058 * If a legal item is selected from the floor, we save it in "cp" as
5059 * a negative (-1 to -511), and return TRUE.
5061 * If no item is available, we do nothing to "cp", and we display a
5062 * warning message, using "str" if available, and return FALSE.
5064 * If no item is selected, we do nothing to "cp", and return FALSE.
5066 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
5067 * to allow the user to enter a command while viewing those screens, and
5068 * also to induce "auto-enter" of stores, and other such stuff.
5070 * Global "p_ptr->command_see" may be set before calling this function to start
5071 * out in "browse" mode. It is cleared before this function returns.
5073 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
5074 * If it is TRUE then we are viewing inventory, else equipment.
5076 * We always erase the prompt when we are done, leaving a blank line,
5077 * or a warning message, if appropriate, if no items are available.
5079 bool get_item(int *cp, cptr pmt, cptr str, int mode)
5081 s16b this_o_idx, next_o_idx = 0;
5083 char n1, n2, which = ' ';
5085 int j, k, i1, i2, e1, e2;
5095 bool allow_floor = FALSE;
5097 bool toggle = FALSE;
5103 extern bool select_spellbook;
5104 extern bool select_the_force;
5106 int menu_line = (use_menu ? 1 : 0);
5110 #ifdef ALLOW_EASY_FLOOR /* TNB */
5112 if (easy_floor) return get_item_floor(cp, pmt, str, mode);
5114 #endif /* ALLOW_EASY_FLOOR -- TNB */
5118 /* Get the item index */
5119 if (repeat_pull(cp))
5121 if (*cp == 1111) { /* the_force */
5122 item_tester_tval = 0;
5123 item_tester_hook = NULL;
5134 /* Acquire object */
5137 /* Validate the item */
5138 if (item_tester_okay(o_ptr))
5140 /* Forget the item_tester_tval restriction */
5141 item_tester_tval = 0;
5143 /* Forget the item_tester_hook restriction */
5144 item_tester_hook = NULL;
5151 /* Verify the item */
5152 else if (get_item_okay(*cp))
5154 /* Forget the item_tester_tval restriction */
5155 item_tester_tval = 0;
5157 /* Forget the item_tester_hook restriction */
5158 item_tester_hook = NULL;
5165 #endif /* ALLOW_REPEAT */
5168 if (mode & (USE_EQUIP)) equip = TRUE;
5169 if (mode & (USE_INVEN)) inven = TRUE;
5170 if (mode & (USE_FLOOR)) floor = TRUE;
5173 /* Paranoia XXX XXX XXX */
5180 /* No item selected */
5184 /* Full inventory */
5186 i2 = INVEN_PACK - 1;
5188 /* Forbid inventory */
5189 if (!inven) i2 = -1;
5192 for (j = 0; j < INVEN_PACK; j++)
5193 if (item_tester_okay(&inventory[j])) max_inven++;
5196 /* Restrict inventory indexes */
5197 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5198 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5201 /* Full equipment */
5203 e2 = INVEN_TOTAL - 1;
5205 /* Forbid equipment */
5206 if (!equip) e2 = -1;
5209 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5210 if (item_tester_okay(&inventory[j])) max_equip++;
5211 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5214 /* Restrict equipment indexes */
5215 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5216 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5220 /* Restrict floor usage */
5223 /* Scan all objects in the grid */
5224 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5228 /* Acquire object */
5229 o_ptr = &o_list[this_o_idx];
5231 /* Acquire next object */
5232 next_o_idx = o_ptr->next_o_idx;
5234 /* Accept the item on the floor if legal */
5235 if (item_tester_okay(o_ptr)) allow_floor = TRUE;
5240 /* Require at least one legal choice */
5241 if (!allow_floor && (i1 > i2) && (e1 > e2))
5243 /* Cancel p_ptr->command_see */
5244 command_see = FALSE;
5252 if (select_the_force) {
5258 /* Analyze choices */
5261 /* Hack -- Start on equipment if requested */
5262 if (command_see && command_wrk && equip)
5268 /* Use inventory if allowed */
5271 command_wrk = FALSE;
5274 /* Use equipment if allowed */
5280 /* Use inventory for floor */
5283 command_wrk = FALSE;
5289 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5291 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5293 /* Hack -- start out in "display" mode */
5301 /* Repeat until done */
5304 int get_item_label = 0;
5313 for (j = 0; j < 8; j++)
5316 if (!angband_term[j]) continue;
5318 /* Count windows displaying inven */
5319 if (window_flag[j] & (PW_INVEN)) ni++;
5321 /* Count windows displaying equip */
5322 if (window_flag[j] & (PW_EQUIP)) ne++;
5325 /* Toggle if needed */
5326 if ((command_wrk && ni && !ne) ||
5327 (!command_wrk && !ni && ne))
5330 toggle_inven_equip();
5337 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5339 /* Redraw windows */
5343 /* Inventory screen */
5346 /* Extract the legal requests */
5350 /* Redraw if needed */
5351 if (command_see) get_item_label = show_inven(menu_line);
5354 /* Equipment screen */
5357 /* Extract the legal requests */
5358 n1 = I2A(e1 - INVEN_RARM);
5359 n2 = I2A(e2 - INVEN_RARM);
5361 /* Redraw if needed */
5362 if (command_see) get_item_label = show_equip(menu_line);
5365 /* Viewing inventory */
5368 /* Begin the prompt */
5370 sprintf(out_val, "»ý¤Áʪ:");
5372 sprintf(out_val, "Inven:");
5376 /* Some legal items */
5377 if ((i1 <= i2) && !use_menu)
5379 /* Build the prompt */
5381 sprintf(tmp_val, "%c-%c,",
5383 sprintf(tmp_val, " %c-%c,",
5386 index_to_label(i1), index_to_label(i2));
5389 strcat(out_val, tmp_val);
5392 /* Indicate ability to "view" */
5394 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5396 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5402 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
5403 else if (select_the_force)
5404 strcat(out_val, " 'w'Îýµ¤½Ñ,");
5406 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
5407 else if (select_the_force)
5408 strcat(out_val, " w for the Force,");
5413 /* Viewing equipment */
5416 /* Begin the prompt */
5418 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5420 sprintf(out_val, "Equip:");
5424 /* Some legal items */
5425 if ((e1 <= e2) && !use_menu)
5427 /* Build the prompt */
5429 sprintf(tmp_val, "%c-%c,",
5431 sprintf(tmp_val, " %c-%c,",
5434 index_to_label(e1), index_to_label(e2));
5437 strcat(out_val, tmp_val);
5440 /* Indicate ability to "view" */
5442 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5444 if (!command_see) strcat(out_val, " * to see,");
5450 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
5452 if (inven) strcat(out_val, " / for Inven,");
5457 /* Indicate legality of the "floor" item */
5459 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
5461 if (allow_floor) strcat(out_val, " - for floor,");
5465 /* Finish the prompt */
5466 strcat(out_val, " ESC");
5468 /* Build the prompt */
5469 sprintf(tmp_val, "(%s) %s", out_val, pmt);
5471 /* Show the prompt */
5480 int max_line = (command_wrk ? max_equip : max_inven);
5496 menu_line += (max_line - 1);
5515 /* Verify legality */
5516 if (!inven || !equip)
5522 /* Hack -- Fix screen */
5532 /* Switch inven/equip */
5533 command_wrk = !command_wrk;
5534 max_line = (command_wrk ? max_equip : max_inven);
5535 if (menu_line > max_line) menu_line = max_line;
5537 /* Need to redraw */
5546 /* Validate the item */
5547 if (!get_item_okay(get_item_label))
5553 /* Allow player to "refuse" certain actions */
5554 if (!get_item_allow(get_item_label))
5560 /* Accept that choice */
5561 (*cp) = get_item_label;
5568 if (select_the_force) {
5576 if (menu_line > max_line) menu_line -= max_line;
5597 command_see = FALSE;
5617 /* Verify legality */
5618 if (!inven || !equip)
5624 /* Hack -- Fix screen */
5634 /* Switch inven/equip */
5635 command_wrk = !command_wrk;
5637 /* Need to redraw */
5643 /* Use floor item */
5646 /* Scan all objects in the grid */
5647 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5651 /* Acquire object */
5652 o_ptr = &o_list[this_o_idx];
5654 /* Acquire next object */
5655 next_o_idx = o_ptr->next_o_idx;
5657 /* Validate the item */
5658 if (!item_tester_okay(o_ptr)) continue;
5663 /* Verify the item (if required) */
5665 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
5667 if (other_query_flag && !verify("Try", k)) continue;
5671 /* Allow player to "refuse" certain actions */
5672 if (!get_item_allow(k)) continue;
5674 /* Accept that choice */
5691 case '1': case '2': case '3':
5692 case '4': case '5': case '6':
5693 case '7': case '8': case '9':
5695 /* Look up the tag */
5696 if (!get_tag(&k, which))
5702 /* Hack -- Validate the item */
5703 if ((k < INVEN_RARM) ? !inven : !equip)
5709 /* Validate the item */
5710 if (!get_item_okay(k))
5716 /* Allow player to "refuse" certain actions */
5717 if (!get_item_allow(k))
5723 /* Accept that choice */
5735 /* Choose "default" inventory item */
5738 k = ((i1 == i2) ? i1 : -1);
5741 /* Choose "default" equipment item */
5744 k = ((e1 == e2) ? e1 : -1);
5747 /* Validate the item */
5748 if (!get_item_okay(k))
5754 /* Allow player to "refuse" certain actions */
5755 if (!get_item_allow(k))
5761 /* Accept that choice */
5770 if (select_the_force) {
5782 if(select_spellbook){
5783 bool not_found = FALSE;
5784 /* Look up the tag */
5785 if (!get_tag(&k, which))
5790 /* Hack -- Validate the item */
5791 if ((k < INVEN_RARM) ? !inven : !equip)
5796 /* Validate the item */
5797 if (!get_item_okay(k))
5803 /* Accept that choice */
5811 /* Extract "query" setting */
5812 ver = isupper(which);
5813 which = tolower(which);
5815 /* Convert letter to inventory index */
5818 k = label_to_inven(which);
5821 /* Convert letter to equipment index */
5824 k = label_to_equip(which);
5827 /* Validate the item */
5828 if (!get_item_okay(k))
5834 /* Verify the item */
5836 if (ver && !verify("ËÜÅö¤Ë", k))
5838 if (ver && !verify("Try", k))
5846 /* Allow player to "refuse" certain actions */
5847 if (!get_item_allow(k))
5853 /* Accept that choice */
5864 /* Fix the screen if necessary */
5870 /* Hack -- Cancel "display" */
5871 command_see = FALSE;
5875 /* Forget the item_tester_tval restriction */
5876 item_tester_tval = 0;
5878 item_tester_no_ryoute = FALSE;
5880 /* Forget the item_tester_hook restriction */
5881 item_tester_hook = NULL;
5887 /* Toggle again if needed */
5888 if (toggle) toggle_inven_equip();
5891 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5898 /* Clear the prompt line */
5901 /* Warning if needed */
5902 if (oops && str) msg_print(str);
5905 if (item) repeat_push(*cp);
5906 #endif /* ALLOW_REPEAT */
5913 #ifdef ALLOW_EASY_FLOOR
5918 * Return a list of o_list[] indexes of items at the given cave
5919 * location. Valid flags are:
5921 * mode & 0x01 -- Item tester
5922 * mode & 0x02 -- Marked items only
5923 * mode & 0x04 -- Stop after first
5925 bool scan_floor(int *items, int *item_num, int y, int x, int mode)
5927 int this_o_idx, next_o_idx;
5934 if (!in_bounds(y, x)) return (FALSE);
5936 /* Scan all objects in the grid */
5937 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
5941 /* Acquire object */
5942 o_ptr = &o_list[this_o_idx];
5944 /* Acquire next object */
5945 next_o_idx = o_ptr->next_o_idx;
5948 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
5951 if ((mode & 0x02) && !o_ptr->marked) continue;
5953 /* Accept this item */
5954 items[num++] = this_o_idx;
5957 if (mode & 0x04) break;
5959 /* XXX Hack -- Enforce limit */
5960 if (num == 23) break;
5963 /* Number of items */
5971 * Display a list of the items on the floor at the given location.
5973 int show_floor(int target_item, int y, int x)
5980 char o_name[MAX_NLEN];
5986 char out_desc[23][MAX_NLEN];
5987 int target_item_label = 0;
5989 int floor_list[23], floor_num;
5993 Term_get_size(&wid, &hgt);
5995 /* Default length */
5998 /* Maximum space allowed for descriptions */
6001 /* Require space for weight (if needed) */
6002 if (show_weights) lim -= 9;
6004 /* Scan for objects in the grid, using item_tester_okay() */
6005 (void) scan_floor(floor_list, &floor_num, y, x, 0x01);
6007 /* Display the inventory */
6008 for (k = 0, i = 0; i < floor_num; i++)
6010 o_ptr = &o_list[floor_list[i]];
6012 /* Describe the object */
6013 object_desc(o_name, o_ptr, TRUE, 3);
6015 /* Hack -- enforce max length */
6018 /* Save the index */
6021 /* Acquire inventory color */
6022 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
6024 /* Save the object description */
6025 strcpy(out_desc[k], o_name);
6027 /* Find the predicted "line length" */
6028 l = strlen(out_desc[k]) + 5;
6030 /* Be sure to account for the weight */
6031 if (show_weights) l += 9;
6033 /* Maintain the maximum length */
6034 if (l > len) len = l;
6036 /* Advance to next "line" */
6040 /* Find the column to start in */
6041 col = (len > wid - 4) ? 0 : (wid - len - 1);
6043 /* Output each entry */
6044 for (j = 0; j < k; j++)
6047 i = floor_list[out_index[j]];
6052 /* Clear the line */
6053 prt("", j + 1, col ? col - 2 : col);
6055 if (use_menu && target_item)
6057 if (j == (target_item-1))
6060 strcpy(tmp_val, "¡Õ");
6062 strcpy(tmp_val, "> ");
6064 target_item_label = i;
6066 else strcpy(tmp_val, " ");
6069 /* Prepare an index --(-- */
6070 sprintf(tmp_val, "%c)", index_to_label(j));
6072 /* Clear the line with the (possibly indented) index */
6073 put_str(tmp_val, j + 1, col);
6075 /* Display the entry itself */
6076 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
6078 /* Display the weight if needed */
6081 int wgt = o_ptr->weight * o_ptr->number;
6083 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
6085 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
6088 put_str(tmp_val, j + 1, wid - 9);
6092 /* Make a "shadow" below the list (only if needed) */
6093 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
6095 return target_item_label;
6099 * This version of get_item() is called by get_item() when
6100 * the easy_floor is on.
6102 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
6104 char n1 = ' ', n2 = ' ', which = ' ';
6106 int j, k, i1, i2, e1, e2;
6116 bool allow_equip = FALSE;
6117 bool allow_inven = FALSE;
6118 bool allow_floor = FALSE;
6120 bool toggle = FALSE;
6125 int floor_num, floor_list[23], floor_top = 0;
6127 extern bool select_spellbook;
6128 extern bool select_the_force;
6130 int menu_line = (use_menu ? 1 : 0);
6136 /* Get the item index */
6137 if (repeat_pull(cp))
6139 if (*cp == 1111) { /* the_force */
6140 item_tester_tval = 0;
6141 item_tester_hook = NULL;
6152 /* Acquire object */
6155 /* Validate the item */
6156 if (item_tester_okay(o_ptr))
6158 /* Forget the item_tester_tval restriction */
6159 item_tester_tval = 0;
6161 /* Forget the item_tester_hook restriction */
6162 item_tester_hook = NULL;
6169 /* Verify the item */
6170 else if (get_item_okay(*cp))
6172 /* Forget the item_tester_tval restriction */
6173 item_tester_tval = 0;
6175 /* Forget the item_tester_hook restriction */
6176 item_tester_hook = NULL;
6183 #endif /* ALLOW_REPEAT */
6186 if (mode & (USE_EQUIP)) equip = TRUE;
6187 if (mode & (USE_INVEN)) inven = TRUE;
6188 if (mode & (USE_FLOOR)) floor = TRUE;
6191 /* Paranoia XXX XXX XXX */
6198 /* No item selected */
6202 /* Full inventory */
6204 i2 = INVEN_PACK - 1;
6206 /* Forbid inventory */
6207 if (!inven) i2 = -1;
6210 for (j = 0; j < INVEN_PACK; j++)
6211 if (item_tester_okay(&inventory[j])) max_inven++;
6214 /* Restrict inventory indexes */
6215 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
6216 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
6219 /* Full equipment */
6221 e2 = INVEN_TOTAL - 1;
6223 /* Forbid equipment */
6224 if (!equip) e2 = -1;
6227 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
6228 if (item_tester_okay(&inventory[j])) max_equip++;
6229 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
6232 /* Restrict equipment indexes */
6233 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
6234 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
6237 /* Count "okay" floor items */
6240 /* Restrict floor usage */
6243 /* Scan all objects in the grid */
6244 (void) scan_floor(floor_list, &floor_num, py, px, 0x01);
6247 /* Accept inventory */
6248 if (i1 <= i2) allow_inven = TRUE;
6250 /* Accept equipment */
6251 if (e1 <= e2) allow_equip = TRUE;
6254 if (floor_num) allow_floor = TRUE;
6256 /* Require at least one legal choice */
6257 if (!allow_inven && !allow_equip && !allow_floor)
6259 /* Cancel p_ptr->command_see */
6260 command_see = FALSE;
6268 if (select_the_force) {
6274 /* Analyze choices */
6277 /* Hack -- Start on equipment if requested */
6278 if (command_see && (command_wrk == (USE_EQUIP))
6281 command_wrk = (USE_EQUIP);
6284 /* Use inventory if allowed */
6285 else if (allow_inven)
6287 command_wrk = (USE_INVEN);
6290 /* Use equipment if allowed */
6291 else if (allow_equip)
6293 command_wrk = (USE_EQUIP);
6296 /* Use floor if allowed */
6297 else if (allow_floor)
6299 command_wrk = (USE_FLOOR);
6304 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
6306 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
6308 /* Hack -- start out in "display" mode */
6315 /* Repeat until done */
6318 int get_item_label = 0;
6327 for (j = 0; j < 8; j++)
6330 if (!angband_term[j]) continue;
6332 /* Count windows displaying inven */
6333 if (window_flag[j] & (PW_INVEN)) ni++;
6335 /* Count windows displaying equip */
6336 if (window_flag[j] & (PW_EQUIP)) ne++;
6339 /* Toggle if needed */
6340 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
6341 (command_wrk == (USE_INVEN) && !ni && ne))
6344 toggle_inven_equip();
6351 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6353 /* Redraw windows */
6357 /* Inventory screen */
6358 if (command_wrk == (USE_INVEN))
6360 /* Extract the legal requests */
6364 /* Redraw if needed */
6365 if (command_see) get_item_label = show_inven(menu_line);
6368 /* Equipment screen */
6369 else if (command_wrk == (USE_EQUIP))
6371 /* Extract the legal requests */
6372 n1 = I2A(e1 - INVEN_RARM);
6373 n2 = I2A(e2 - INVEN_RARM);
6375 /* Redraw if needed */
6376 if (command_see) get_item_label = show_equip(menu_line);
6380 else if (command_wrk == (USE_FLOOR))
6383 k = MIN(floor_top + 23, floor_num) - 1;
6385 /* Extract the legal requests */
6386 n1 = I2A(j - floor_top);
6387 n2 = I2A(k - floor_top);
6389 /* Redraw if needed */
6390 if (command_see) get_item_label = show_floor(menu_line, py, px);
6393 /* Viewing inventory */
6394 if (command_wrk == (USE_INVEN))
6396 /* Begin the prompt */
6398 sprintf(out_val, "»ý¤Áʪ:");
6400 sprintf(out_val, "Inven:");
6405 /* Build the prompt */
6407 sprintf(tmp_val, "%c-%c,",
6409 sprintf(tmp_val, " %c-%c,",
6412 index_to_label(i1), index_to_label(i2));
6415 strcat(out_val, tmp_val);
6418 /* Indicate ability to "view" */
6420 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6422 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6433 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
6435 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6437 else strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
6439 else if (select_the_force)
6440 strcat(out_val, " 'w'Îýµ¤½Ñ,");
6447 strcat(out_val, " 6 for Equip,");
6449 strcat(out_val, " 4 or 6 for Equip,");
6451 else strcat(out_val, " / for Equip,");
6453 else if (select_the_force)
6454 strcat(out_val, " w for the Force,");
6464 strcat(out_val, " '4' ¾²¾å,");
6466 strcat(out_val, " '4'or'6' ¾²¾å,");
6468 else strcat(out_val, " '-'¾²¾å,");
6471 if (allow_floor) strcat(out_val, " - for floor,");
6476 /* Viewing equipment */
6477 else if (command_wrk == (USE_EQUIP))
6479 /* Begin the prompt */
6481 sprintf(out_val, "ÁõÈ÷ÉÊ:");
6483 sprintf(out_val, "Equip:");
6489 /* Build the prompt */
6491 sprintf(tmp_val, "%c-%c,",
6493 sprintf(tmp_val, " %c-%c,",
6496 index_to_label(e1), index_to_label(e2));
6499 strcat(out_val, tmp_val);
6502 /* Indicate ability to "view" */
6504 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6506 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6517 strcat(out_val, " '4' »ý¤Áʪ,");
6519 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6521 else strcat(out_val, " '/' »ý¤Áʪ,");
6524 if (allow_inven) strcat(out_val, " / for Inven,");
6535 strcat(out_val, " '6' ¾²¾å,");
6537 strcat(out_val, " '4'or'6' ¾²¾å,");
6539 else strcat(out_val, " '-'¾²¾å,");
6542 if (allow_floor) strcat(out_val, " - for floor,");
6548 else if (command_wrk == (USE_FLOOR))
6550 /* Begin the prompt */
6552 sprintf(out_val, "¾²¾å:");
6554 sprintf(out_val, "Floor:");
6560 /* Build the prompt */
6562 sprintf(tmp_val, "%c-%c,", n1, n2);
6564 sprintf(tmp_val, " %c-%c,", n1, n2);
6569 strcat(out_val, tmp_val);
6572 /* Indicate ability to "view" */
6574 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6576 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6582 if (allow_inven && allow_equip)
6585 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
6587 strcat(out_val, " / for Inven,");
6591 else if (allow_inven)
6594 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6596 strcat(out_val, " / for Inven,");
6600 else if (allow_equip)
6603 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6605 strcat(out_val, " / for Equip,");
6611 else if (allow_inven)
6614 strcat(out_val, " '/' »ý¤Áʪ,");
6616 strcat(out_val, " / for Inven,");
6620 else if (allow_equip)
6623 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6625 strcat(out_val, " / for Equip,");
6631 /* Finish the prompt */
6632 strcat(out_val, " ESC");
6634 /* Build the prompt */
6635 sprintf(tmp_val, "(%s) %s", out_val, pmt);
6637 /* Show the prompt */
6646 if (command_wrk == USE_INVEN) max_line = max_inven;
6647 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6648 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6664 menu_line += (max_line - 1);
6680 /* Verify legality */
6681 if (command_wrk == (USE_INVEN))
6683 if (allow_floor) command_wrk = USE_FLOOR;
6684 else if (allow_equip) command_wrk = USE_EQUIP;
6691 else if (command_wrk == (USE_EQUIP))
6693 if (allow_inven) command_wrk = USE_INVEN;
6694 else if (allow_floor) command_wrk = USE_FLOOR;
6701 else if (command_wrk == (USE_FLOOR))
6703 if (allow_equip) command_wrk = USE_EQUIP;
6704 else if (allow_inven) command_wrk = USE_INVEN;
6717 /* Hack -- Fix screen */
6727 /* Switch inven/equip */
6728 if (command_wrk == USE_INVEN) max_line = max_inven;
6729 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6730 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6731 if (menu_line > max_line) menu_line = max_line;
6733 /* Need to redraw */
6741 /* Verify legality */
6742 if (command_wrk == (USE_INVEN))
6744 if (allow_equip) command_wrk = USE_EQUIP;
6745 else if (allow_floor) command_wrk = USE_FLOOR;
6752 else if (command_wrk == (USE_EQUIP))
6754 if (allow_floor) command_wrk = USE_FLOOR;
6755 else if (allow_inven) command_wrk = USE_INVEN;
6762 else if (command_wrk == (USE_FLOOR))
6764 if (allow_inven) command_wrk = USE_INVEN;
6765 else if (allow_equip) command_wrk = USE_EQUIP;
6778 /* Hack -- Fix screen */
6788 /* Switch inven/equip */
6789 if (command_wrk == USE_INVEN) max_line = max_inven;
6790 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6791 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6792 if (menu_line > max_line) menu_line = max_line;
6794 /* Need to redraw */
6803 /* Validate the item */
6804 if (!get_item_okay(get_item_label))
6810 /* Allow player to "refuse" certain actions */
6811 if (!get_item_allow(get_item_label))
6817 /* Accept that choice */
6818 (*cp) = get_item_label;
6825 if (select_the_force) {
6833 if (menu_line > max_line) menu_line -= max_line;
6854 command_see = FALSE;
6874 if (command_wrk == (USE_INVEN))
6881 command_wrk = (USE_EQUIP);
6883 else if (command_wrk == (USE_EQUIP))
6890 command_wrk = (USE_INVEN);
6892 else if (command_wrk == (USE_FLOOR))
6896 command_wrk = (USE_INVEN);
6898 else if (allow_equip)
6900 command_wrk = (USE_EQUIP);
6909 /* Hack -- Fix screen */
6919 /* Need to redraw */
6932 * If we are already examining the floor, and there
6933 * is only one item, we will always select it.
6934 * If we aren't examining the floor and there is only
6935 * one item, we will select it if floor_query_flag
6940 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
6943 k = 0 - floor_list[0];
6945 /* Allow player to "refuse" certain actions */
6946 if (!get_item_allow(k))
6952 /* Accept that choice */
6961 /* Hack -- Fix screen */
6971 command_wrk = (USE_FLOOR);
6977 case '1': case '2': case '3':
6978 case '4': case '5': case '6':
6979 case '7': case '8': case '9':
6981 /* Look up the tag */
6982 if (!get_tag(&k, which))
6988 /* Hack -- Validate the item */
6989 if ((k < INVEN_RARM) ? !inven : !equip)
6995 /* Validate the item */
6996 if (!get_item_okay(k))
7002 /* Allow player to "refuse" certain actions */
7003 if (!get_item_allow(k))
7009 /* Accept that choice */
7021 /* Choose "default" inventory item */
7022 if (command_wrk == (USE_INVEN))
7024 k = ((i1 == i2) ? i1 : -1);
7027 /* Choose "default" equipment item */
7028 else if (command_wrk == (USE_EQUIP))
7030 k = ((e1 == e2) ? e1 : -1);
7033 /* Choose "default" floor item */
7034 else if (command_wrk == (USE_FLOOR))
7039 k = 0 - floor_list[0];
7041 /* Allow player to "refuse" certain actions */
7042 if (!get_item_allow(k))
7048 /* Accept that choice */
7056 /* Validate the item */
7057 if (!get_item_okay(k))
7063 /* Allow player to "refuse" certain actions */
7064 if (!get_item_allow(k))
7070 /* Accept that choice */
7079 if (select_the_force) {
7091 if(select_spellbook){
7092 bool not_found = FALSE;
7093 /* Look up the tag */
7094 if (!get_tag(&k, which))
7099 /* Hack -- Validate the item */
7100 if ((k < INVEN_RARM) ? !inven : !equip)
7105 /* Validate the item */
7106 if (!get_item_okay(k))
7112 /* Accept that choice */
7120 /* Extract "query" setting */
7121 ver = isupper(which);
7122 which = tolower(which);
7124 /* Convert letter to inventory index */
7125 if (command_wrk == (USE_INVEN))
7127 k = label_to_inven(which);
7130 /* Convert letter to equipment index */
7131 else if (command_wrk == (USE_EQUIP))
7133 k = label_to_equip(which);
7136 /* Convert letter to floor index */
7137 else if (command_wrk == USE_FLOOR)
7139 k = islower(which) ? A2I(which) : -1;
7140 if (k < 0 || k >= floor_num)
7147 k = 0 - floor_list[k];
7150 /* Validate the item */
7151 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
7157 /* Verify the item */
7159 if (ver && !verify("ËÜÅö¤Ë", k))
7161 if (ver && !verify("Try", k))
7169 /* Allow player to "refuse" certain actions */
7170 if (!get_item_allow(k))
7176 /* Accept that choice */
7186 /* Fix the screen if necessary */
7192 /* Hack -- Cancel "display" */
7193 command_see = FALSE;
7197 /* Forget the item_tester_tval restriction */
7198 item_tester_tval = 0;
7200 /* Forget the item_tester_hook restriction */
7201 item_tester_hook = NULL;
7207 /* Toggle again if needed */
7208 if (toggle) toggle_inven_equip();
7211 p_ptr->window |= (PW_INVEN | PW_EQUIP);
7218 /* Clear the prompt line */
7221 /* Warning if needed */
7222 if (oops && str) msg_print(str);
7225 if (item) repeat_push(*cp);
7226 #endif /* ALLOW_REPEAT */
7233 bool py_pickup_floor_aux(void)
7243 /* Restrict the choices */
7244 item_tester_hook = inven_carry_okay;
7248 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
7249 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
7251 q = "Get which item? ";
7252 s = "You no longer have any room for the objects on the floor.";
7255 if (get_item(&item, q, s, (USE_FLOOR)))
7257 this_o_idx = 0 - item;
7264 /* Access the object */
7265 o_ptr = &o_list[this_o_idx];
7267 /* Pick up the object */
7268 py_pickup_aux(this_o_idx);
7275 * Make the player carry everything in a grid
7277 * If "pickup" is FALSE then only gold will be picked up
7279 * This is called by py_pickup() when easy_floor is TRUE.
7281 void py_pickup_floor(int pickup)
7283 s16b this_o_idx, next_o_idx = 0;
7285 char o_name[MAX_NLEN];
7288 int floor_num = 0, floor_list[23], floor_o_idx = 0;
7292 /* Scan the pile of objects */
7293 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
7297 /* Access the object */
7298 o_ptr = &o_list[this_o_idx];
7300 /* Describe the object */
7301 object_desc(o_name, o_ptr, TRUE, 3);
7303 /* Access the next object */
7304 next_o_idx = o_ptr->next_o_idx;
7306 /* Hack -- disturb */
7310 if (o_ptr->tval == TV_GOLD)
7314 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
7315 (long)o_ptr->pval, o_name);
7317 msg_format("You have found %ld gold pieces worth of %s.",
7318 (long) o_ptr->pval, o_name);
7322 /* Collect the gold */
7323 p_ptr->au += o_ptr->pval;
7326 p_ptr->redraw |= (PR_GOLD);
7329 p_ptr->window |= (PW_PLAYER);
7331 /* Delete the gold */
7332 delete_object_idx(this_o_idx);
7334 /* Check the next object */
7338 /* Count non-gold objects that can be picked up. */
7339 if (inven_carry_okay(o_ptr))
7344 /* Remember this object index */
7345 floor_list[floor_num] = this_o_idx;
7347 /* Count non-gold objects */
7350 if (floor_num == 23) break;
7352 /* Remember this index */
7353 floor_o_idx = this_o_idx;
7356 /* There are no non-gold objects */
7360 /* Mention the number of objects */
7366 /* Access the object */
7367 o_ptr = &o_list[floor_o_idx];
7369 #ifdef ALLOW_EASY_SENSE
7371 /* Option: Make object sensing easy */
7374 /* Sense the object */
7375 (void) sense_object(o_ptr);
7378 #endif /* ALLOW_EASY_SENSE */
7380 /* Describe the object */
7381 object_desc(o_name, o_ptr, TRUE, 3);
7385 msg_format("%s¤¬¤¢¤ë¡£", o_name);
7387 msg_format("You see %s.", o_name);
7392 /* Multiple objects */
7397 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
7399 msg_format("You see a pile of %d items.", floor_num);
7408 /* The player has no room for anything on the floor. */
7414 /* Access the object */
7415 o_ptr = &o_list[floor_o_idx];
7417 #ifdef ALLOW_EASY_SENSE
7419 /* Option: Make object sensing easy */
7422 /* Sense the object */
7423 (void) sense_object(o_ptr);
7426 #endif /* ALLOW_EASY_SENSE */
7428 /* Describe the object */
7429 object_desc(o_name, o_ptr, TRUE, 3);
7433 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7435 msg_format("You have no room for %s.", o_name);
7440 /* Multiple objects */
7445 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7447 msg_print("You have no room for any of the objects on the floor.");
7459 /* Hack -- query every object */
7460 if (carry_query_flag)
7462 char out_val[MAX_NLEN+20];
7464 /* Access the object */
7465 o_ptr = &o_list[floor_o_idx];
7467 #ifdef ALLOW_EASY_SENSE
7469 /* Option: Make object sensing easy */
7472 /* Sense the object */
7473 (void) sense_object(o_ptr);
7476 #endif /* ALLOW_EASY_SENSE */
7478 /* Describe the object */
7479 object_desc(o_name, o_ptr, TRUE, 3);
7481 /* Build a prompt */
7483 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7485 (void) sprintf(out_val, "Pick up %s? ", o_name);
7489 /* Ask the user to confirm */
7490 if (!get_check(out_val))
7497 /* Access the object */
7498 o_ptr = &o_list[floor_o_idx];
7500 #ifdef ALLOW_EASY_SENSE
7502 /* Option: Make object sensing easy */
7505 /* Sense the object */
7506 (void) sense_object(o_ptr);
7509 #endif /* ALLOW_EASY_SENSE */
7511 /* Pick up the object */
7512 py_pickup_aux(floor_o_idx);
7515 /* Allow the user to choose an object */
7518 while (can_pickup--)
7520 if (!py_pickup_floor_aux()) break;
7525 #endif /* ALLOW_EASY_FLOOR */