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 "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô : 20+d20 ¥¿¡¼¥óËè";
1555 return "clairvoyance and recall, draining you every 20+d20 turns";
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 "Á´Êý¸þ¤Ø¤Î¶²Éݤθ÷Àþ : 3*(¥ì¥Ù¥ë+10) ¥¿¡¼¥óËè";
1649 return "rays of fear in every direction every 3*(level+10) turns";
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 "²Ð±ê¤Î¥Ö¥ì¥¹ (200) ¤È²Ð¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
2056 return "breath of fire (200) and resist fire every 200 turns";
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 "Î䵤¤Î¥Ö¥ì¥¹ (200) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
2069 return "breath of cold (200) and resist cold every 200 turns";
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 "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ : 777 ¥¿¡¼¥óËè";
2105 return "hero, bless, and ultimate resistance every 777 turns";
2109 switch (o_ptr->sval)
2111 case SV_RING_FLAMES:
2113 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) ¤È²Ð¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2115 return "ball of fire (100) and resist fire every 50+d50 turns";
2120 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2122 return "ball of cold (100) and resist cold every 50+d50 turns";
2127 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) ¤È»À¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2129 return "ball of acid (100) and resist acid every 50+d50 turns";
2134 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) ¤ÈÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
2136 return "ball of elec (100) and resist elec every 50+d50 turns";
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 attempt 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 sheath of coldness.";
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;
4378 char inven_spellbook_label[52+1];
4381 extern bool select_spellbook;
4383 /* Starting column */
4387 Term_get_size(&wid, &hgt);
4389 /* Default "max-length" */
4390 len = wid - col - 1;
4392 /* Maximum space allowed for descriptions */
4395 /* Require space for weight (if needed) */
4396 if (show_weights) lim -= 9;
4398 /* Require space for icon */
4399 if (show_item_graph)
4402 if (use_bigtile) lim--;
4405 /* Find the "final" slot */
4406 for (i = 0; i < INVEN_PACK; i++)
4408 o_ptr = &inventory[i];
4410 /* Skip non-objects */
4411 if (!o_ptr->k_idx) continue;
4417 if (select_spellbook)
4421 strcpy(inven_spellbook_label, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
4422 for (i = 0; i < 52; i++)
4425 if (i < 26) c = (char)('a' + i);
4426 else c = (char)('A' + i - 26);
4428 if (get_tag(&index, c))
4430 inven_spellbook_label[i] = ' ';
4431 inven_spellbook_label[index] = c;
4436 /* Display the inventory */
4437 for (k = 0, i = 0; i < z; i++)
4439 o_ptr = &inventory[i];
4441 /* Is this item acceptable? */
4442 if (!item_tester_okay(o_ptr)) continue;
4444 /* Describe the object */
4445 object_desc(o_name, o_ptr, TRUE, 3);
4447 /* Hack -- enforce max length */
4450 /* Save the object index, color, and description */
4452 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4454 /* Grey out charging items */
4457 out_color[k] = TERM_L_DARK;
4460 (void)strcpy(out_desc[k], o_name);
4462 /* Find the predicted "line length" */
4463 l = strlen(out_desc[k]) + 5;
4465 /* Be sure to account for the weight */
4466 if (show_weights) l += 9;
4468 /* Account for icon if displayed */
4469 if (show_item_graph)
4472 if (use_bigtile) l++;
4475 /* Maintain the maximum length */
4476 if (l > len) len = l;
4478 /* Advance to next "line" */
4482 /* Find the column to start in */
4483 col = (len > wid - 4) ? 0 : (wid - len - 1);
4485 /* Output each entry */
4486 for (j = 0; j < k; j++)
4492 o_ptr = &inventory[i];
4494 /* Clear the line */
4495 prt("", j + 1, col ? col - 2 : col);
4497 if (use_menu && target_item)
4499 if (j == (target_item-1))
4502 strcpy(tmp_val, "¡Õ");
4504 strcpy(tmp_val, "> ");
4506 target_item_label = i;
4508 else strcpy(tmp_val, " ");
4510 else if (i <= INVEN_PACK && select_spellbook)
4512 sprintf(tmp_val, "%c)", inven_spellbook_label[i]);
4516 /* Prepare an index --(-- */
4517 sprintf(tmp_val, "%c)", index_to_label(i));
4520 /* Clear the line with the (possibly indented) index */
4521 put_str(tmp_val, j + 1, col);
4525 /* Display graphics for object, if desired */
4526 if (show_item_graph)
4528 byte a = object_attr(o_ptr);
4529 char c = object_char(o_ptr);
4532 if (a & 0x80) a |= 0x40;
4535 Term_draw(cur_col, j + 1, a, c);
4540 Term_draw(cur_col, j + 1, 255, -1);
4546 /* Display the entry itself */
4547 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
4549 /* Display the weight if needed */
4552 int wgt = o_ptr->weight * o_ptr->number;
4554 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4556 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4559 put_str(tmp_val, j + 1, wid - 9);
4563 /* Make a "shadow" below the list (only if needed) */
4564 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4566 /* Save the new column */
4569 return target_item_label;
4575 * Display the equipment.
4577 int show_equip(int target_item)
4580 int col, cur_col, len, lim;
4583 char o_name[MAX_NLEN];
4586 char out_desc[23][MAX_NLEN];
4587 int target_item_label = 0;
4591 /* Starting column */
4595 Term_get_size(&wid, &hgt);
4597 /* Maximal length */
4598 len = wid - col - 1;
4600 /* Maximum space allowed for descriptions */
4603 /* Require space for labels (if needed) */
4605 if (show_labels) lim -= (7 + 2);
4607 if (show_labels) lim -= (14 + 2);
4611 /* Require space for weight (if needed) */
4613 if (show_weights) lim -= 10;
4615 if (show_weights) lim -= 9;
4619 if (show_item_graph) lim -= 2;
4621 /* Scan the equipment list */
4622 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
4624 o_ptr = &inventory[i];
4626 /* Is this item acceptable? */
4627 if (!item_tester_okay(o_ptr) && (!((i == INVEN_LARM) && p_ptr->ryoute) || item_tester_no_ryoute)) continue;
4630 object_desc(o_name, o_ptr, TRUE, 3);
4632 /* Truncate the description */
4635 if ((i == INVEN_LARM) && p_ptr->ryoute)
4638 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
4640 (void)strcpy(out_desc[k],"(wielding with two-hands)");
4646 (void)strcpy(out_desc[k], o_name);
4647 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4651 /* Grey out charging items */
4654 out_color[k] = TERM_L_DARK;
4657 /* Extract the maximal length (see below) */
4659 l = strlen(out_desc[k]) + (2 + 1);
4661 l = strlen(out_desc[k]) + (2 + 3);
4665 /* Increase length for labels (if needed) */
4667 if (show_labels) l += (7 + 2);
4669 if (show_labels) l += (14 + 2);
4673 /* Increase length for weight (if needed) */
4674 if (show_weights) l += 9;
4676 if (show_item_graph) l += 2;
4678 /* Maintain the max-length */
4679 if (l > len) len = l;
4681 /* Advance the entry */
4685 /* Hack -- Find a column to start in */
4687 col = (len > wid - 6) ? 0 : (wid - len - 1);
4689 col = (len > wid - 4) ? 0 : (wid - len - 1);
4693 /* Output each entry */
4694 for (j = 0; j < k; j++)
4700 o_ptr = &inventory[i];
4702 /* Clear the line */
4703 prt("", j + 1, col ? col - 2 : col);
4705 if (use_menu && target_item)
4707 if (j == (target_item-1))
4710 strcpy(tmp_val, "¡Õ");
4712 strcpy(tmp_val, "> ");
4714 target_item_label = i;
4716 else strcpy(tmp_val, " ");
4719 /* Prepare an index --(-- */
4720 sprintf(tmp_val, "%c)", index_to_label(i));
4722 /* Clear the line with the (possibly indented) index */
4723 put_str(tmp_val, j+1, col);
4727 /* Display graphics for object, if desired */
4728 if (show_item_graph)
4730 byte a = object_attr(o_ptr);
4731 char c = object_char(o_ptr);
4734 if (a & 0x80) a |= 0x40;
4737 Term_draw(cur_col, j + 1, a, c);
4742 Term_draw(cur_col, j + 1, 255, -1);
4750 /* Mention the use */
4752 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
4754 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
4757 put_str(tmp_val, j+1, cur_col);
4759 /* Display the entry itself */
4761 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
4763 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
4770 /* Display the entry itself */
4771 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
4774 /* Display the weight if needed */
4777 int wgt = o_ptr->weight * o_ptr->number;
4779 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4781 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
4784 put_str(tmp_val, j+1, wid - 9);
4788 /* Make a "shadow" below the list (only if needed) */
4789 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4791 /* Save the new column */
4794 return target_item_label;
4801 * Flip "inven" and "equip" in any sub-windows
4803 void toggle_inven_equip(void)
4808 for (j = 0; j < 8; j++)
4811 if (!angband_term[j]) continue;
4813 /* Flip inven to equip */
4814 if (window_flag[j] & (PW_INVEN))
4817 window_flag[j] &= ~(PW_INVEN);
4818 window_flag[j] |= (PW_EQUIP);
4821 p_ptr->window |= (PW_EQUIP);
4824 /* Flip inven to equip */
4825 else if (window_flag[j] & (PW_EQUIP))
4828 window_flag[j] &= ~(PW_EQUIP);
4829 window_flag[j] |= (PW_INVEN);
4832 p_ptr->window |= (PW_INVEN);
4840 * Verify the choice of an item.
4842 * The item can be negative to mean "item on floor".
4844 static bool verify(cptr prompt, int item)
4846 char o_name[MAX_NLEN];
4847 char out_val[MAX_NLEN+20];
4854 o_ptr = &inventory[item];
4860 o_ptr = &o_list[0 - item];
4864 object_desc(o_name, o_ptr, TRUE, 3);
4868 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
4870 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
4875 return (get_check(out_val));
4880 * Hack -- allow user to "prevent" certain choices
4882 * The item can be negative to mean "item on floor".
4884 static bool get_item_allow(int item)
4893 o_ptr = &inventory[item];
4899 o_ptr = &o_list[0 - item];
4902 /* No inscription */
4903 if (!o_ptr->inscription) return (TRUE);
4906 s = strchr(quark_str(o_ptr->inscription), '!');
4908 /* Process preventions */
4911 /* Check the "restriction" */
4912 if ((s[1] == command_cmd) || (s[1] == '*'))
4914 /* Verify the choice */
4916 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
4918 if (!verify("Really try", item)) return (FALSE);
4923 /* Find another '!' */
4924 s = strchr(s + 1, '!');
4934 * Auxiliary function for "get_item()" -- test an index
4936 static bool get_item_okay(int i)
4939 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
4941 /* Verify the item */
4942 if (!item_tester_okay(&inventory[i])) return (FALSE);
4951 * Find the "first" inventory object with the given "tag".
4953 * A "tag" is a char "n" appearing as "@n" anywhere in the
4954 * inscription of an object.
4956 * Also, the tag "@xn" will work as well, where "n" is a tag-char,
4957 * and "x" is the "current" command_cmd code.
4959 int get_tag(int *cp, char tag)
4964 /* Check every object */
4965 for (i = 0; i < INVEN_TOTAL; ++i)
4967 object_type *o_ptr = &inventory[i];
4969 /* Skip non-objects */
4970 if (!o_ptr->k_idx) continue;
4972 /* Skip empty inscriptions */
4973 if (!o_ptr->inscription) continue;
4975 /* Skip non-choice */
4976 if (!item_tester_okay(o_ptr)) continue;
4979 s = strchr(quark_str(o_ptr->inscription), '@');
4981 /* Process all tags */
4984 /* Check the special tags */
4985 if ((s[1] == command_cmd) && (s[2] == tag))
4987 /* Save the actual inventory ID */
4994 /* Find another '@' */
4995 s = strchr(s + 1, '@');
4999 /* Check every object */
5000 for (i = 0; i < INVEN_TOTAL; ++i)
5002 object_type *o_ptr = &inventory[i];
5004 /* Skip non-objects */
5005 if (!o_ptr->k_idx) continue;
5007 /* Skip empty inscriptions */
5008 if (!o_ptr->inscription) continue;
5010 /* Skip non-choice */
5011 if (!item_tester_okay(o_ptr)) continue;
5014 s = strchr(quark_str(o_ptr->inscription), '@');
5016 /* Process all tags */
5019 /* Check the normal tags */
5020 if (s[1] == tag && !((s[2] >= '0' && s[2] <= '9') || (s[2] >= 'a' && s[2] <= 'z') || (s[2] >= 'A' && s[2] <= 'Z')))
5022 /* Save the actual inventory ID */
5029 /* Find another '@' */
5030 s = strchr(s + 1, '@');
5039 * Determine whether get_item() can get some item or not
5040 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
5042 bool can_get_item(void)
5044 int j, floor_list[23], floor_num = 0;
5046 for (j = 0; j < INVEN_TOTAL; j++)
5047 if (item_tester_okay(&inventory[j]))
5050 floor_num = scan_floor(floor_list, py, px, 0x01);
5058 * Let the user select an item, save its "index"
5060 * Return TRUE only if an acceptable item was chosen by the user.
5062 * The selected item must satisfy the "item_tester_hook()" function,
5063 * if that hook is set, and the "item_tester_tval", if that value is set.
5065 * All "item_tester" restrictions are cleared before this function returns.
5067 * The user is allowed to choose acceptable items from the equipment,
5068 * inventory, or floor, respectively, if the proper flag was given,
5069 * and there are any acceptable items in that location.
5071 * The equipment or inventory are displayed (even if no acceptable
5072 * items are in that location) if the proper flag was given.
5074 * If there are no acceptable items available anywhere, and "str" is
5075 * not NULL, then it will be used as the text of a warning message
5076 * before the function returns.
5078 * Note that the user must press "-" to specify the item on the floor,
5079 * and there is no way to "examine" the item on the floor, while the
5080 * use of "capital" letters will "examine" an inventory/equipment item,
5081 * and prompt for its use.
5083 * If a legal item is selected from the inventory, we save it in "cp"
5084 * directly (0 to 35), and return TRUE.
5086 * If a legal item is selected from the floor, we save it in "cp" as
5087 * a negative (-1 to -511), and return TRUE.
5089 * If no item is available, we do nothing to "cp", and we display a
5090 * warning message, using "str" if available, and return FALSE.
5092 * If no item is selected, we do nothing to "cp", and return FALSE.
5094 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
5095 * to allow the user to enter a command while viewing those screens, and
5096 * also to induce "auto-enter" of stores, and other such stuff.
5098 * Global "p_ptr->command_see" may be set before calling this function to start
5099 * out in "browse" mode. It is cleared before this function returns.
5101 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
5102 * If it is TRUE then we are viewing inventory, else equipment.
5104 * We always erase the prompt when we are done, leaving a blank line,
5105 * or a warning message, if appropriate, if no items are available.
5107 bool get_item(int *cp, cptr pmt, cptr str, int mode)
5109 s16b this_o_idx, next_o_idx = 0;
5111 char n1, n2, which = ' ';
5113 int j, k, i1, i2, e1, e2;
5123 bool allow_floor = FALSE;
5125 bool toggle = FALSE;
5131 extern bool select_spellbook;
5132 extern bool select_the_force;
5134 int menu_line = (use_menu ? 1 : 0);
5138 #ifdef ALLOW_EASY_FLOOR /* TNB */
5140 if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
5142 #endif /* ALLOW_EASY_FLOOR -- TNB */
5146 /* Get the item index */
5147 if (repeat_pull(cp))
5149 if (*cp == 1111) { /* the_force */
5150 item_tester_tval = 0;
5151 item_tester_hook = NULL;
5162 /* Acquire object */
5165 /* Validate the item */
5166 if (item_tester_okay(o_ptr))
5168 /* Forget the item_tester_tval restriction */
5169 item_tester_tval = 0;
5171 /* Forget the item_tester_hook restriction */
5172 item_tester_hook = NULL;
5179 /* Verify the item */
5180 else if (get_item_okay(*cp))
5182 /* Forget the item_tester_tval restriction */
5183 item_tester_tval = 0;
5185 /* Forget the item_tester_hook restriction */
5186 item_tester_hook = NULL;
5193 #endif /* ALLOW_REPEAT */
5196 if (mode & (USE_EQUIP)) equip = TRUE;
5197 if (mode & (USE_INVEN)) inven = TRUE;
5198 if (mode & (USE_FLOOR)) floor = TRUE;
5201 /* Paranoia XXX XXX XXX */
5208 /* No item selected */
5212 /* Full inventory */
5214 i2 = INVEN_PACK - 1;
5216 /* Forbid inventory */
5217 if (!inven) i2 = -1;
5220 for (j = 0; j < INVEN_PACK; j++)
5221 if (item_tester_okay(&inventory[j])) max_inven++;
5224 /* Restrict inventory indexes */
5225 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5226 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5229 /* Full equipment */
5231 e2 = INVEN_TOTAL - 1;
5233 /* Forbid equipment */
5234 if (!equip) e2 = -1;
5237 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5238 if (item_tester_okay(&inventory[j])) max_equip++;
5239 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5242 /* Restrict equipment indexes */
5243 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5244 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5248 /* Restrict floor usage */
5251 /* Scan all objects in the grid */
5252 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5256 /* Acquire object */
5257 o_ptr = &o_list[this_o_idx];
5259 /* Acquire next object */
5260 next_o_idx = o_ptr->next_o_idx;
5262 /* Accept the item on the floor if legal */
5263 if (item_tester_okay(o_ptr)) allow_floor = TRUE;
5267 /* Require at least one legal choice */
5268 if (!allow_floor && (i1 > i2) && (e1 > e2))
5270 /* Cancel p_ptr->command_see */
5271 command_see = FALSE;
5279 if (select_the_force) {
5285 /* Analyze choices */
5288 /* Hack -- Start on equipment if requested */
5289 if (command_see && command_wrk && equip)
5295 /* Use inventory if allowed */
5298 command_wrk = FALSE;
5301 /* Use equipment if allowed */
5307 /* Use inventory for floor */
5310 command_wrk = FALSE;
5316 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5318 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5320 /* Hack -- start out in "display" mode */
5328 /* Repeat until done */
5331 int get_item_label = 0;
5340 for (j = 0; j < 8; j++)
5343 if (!angband_term[j]) continue;
5345 /* Count windows displaying inven */
5346 if (window_flag[j] & (PW_INVEN)) ni++;
5348 /* Count windows displaying equip */
5349 if (window_flag[j] & (PW_EQUIP)) ne++;
5352 /* Toggle if needed */
5353 if ((command_wrk && ni && !ne) ||
5354 (!command_wrk && !ni && ne))
5357 toggle_inven_equip();
5364 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5366 /* Redraw windows */
5370 /* Inventory screen */
5373 /* Extract the legal requests */
5377 /* Redraw if needed */
5378 if (command_see) get_item_label = show_inven(menu_line);
5381 /* Equipment screen */
5384 /* Extract the legal requests */
5385 n1 = I2A(e1 - INVEN_RARM);
5386 n2 = I2A(e2 - INVEN_RARM);
5388 /* Redraw if needed */
5389 if (command_see) get_item_label = show_equip(menu_line);
5392 /* Viewing inventory */
5395 /* Begin the prompt */
5397 sprintf(out_val, "»ý¤Áʪ:");
5399 sprintf(out_val, "Inven:");
5403 /* Some legal items */
5404 if ((i1 <= i2) && !use_menu)
5406 /* Build the prompt */
5408 sprintf(tmp_val, "%c-%c,'(',')',",
5410 sprintf(tmp_val, " %c-%c,'(',')',",
5413 index_to_label(i1), index_to_label(i2));
5416 strcat(out_val, tmp_val);
5419 /* Indicate ability to "view" */
5421 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5423 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5429 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
5430 else if (select_the_force)
5431 strcat(out_val, " 'w'Îýµ¤½Ñ,");
5433 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
5434 else if (select_the_force)
5435 strcat(out_val, " w for the Force,");
5440 /* Viewing equipment */
5443 /* Begin the prompt */
5445 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5447 sprintf(out_val, "Equip:");
5451 /* Some legal items */
5452 if ((e1 <= e2) && !use_menu)
5454 /* Build the prompt */
5456 sprintf(tmp_val, "%c-%c,'(',')',",
5458 sprintf(tmp_val, " %c-%c,'(',')',",
5461 index_to_label(e1), index_to_label(e2));
5464 strcat(out_val, tmp_val);
5467 /* Indicate ability to "view" */
5469 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5471 if (!command_see) strcat(out_val, " * to see,");
5477 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
5479 if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
5484 /* Indicate legality of the "floor" item */
5486 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
5488 if (allow_floor) strcat(out_val, " - for floor,");
5492 /* Finish the prompt */
5493 strcat(out_val, " ESC");
5495 /* Build the prompt */
5496 sprintf(tmp_val, "(%s) %s", out_val, pmt);
5498 /* Show the prompt */
5507 int max_line = (command_wrk ? max_equip : max_inven);
5523 menu_line += (max_line - 1);
5542 /* Verify legality */
5543 if (!inven || !equip)
5549 /* Hack -- Fix screen */
5559 /* Switch inven/equip */
5560 command_wrk = !command_wrk;
5561 max_line = (command_wrk ? max_equip : max_inven);
5562 if (menu_line > max_line) menu_line = max_line;
5564 /* Need to redraw */
5573 if (command_wrk == USE_FLOOR)
5576 (*cp) = -get_item_label;
5580 /* Validate the item */
5581 if (!get_item_okay(get_item_label))
5587 /* Allow player to "refuse" certain actions */
5588 if (!get_item_allow(get_item_label))
5594 /* Accept that choice */
5595 (*cp) = get_item_label;
5604 if (select_the_force) {
5612 if (menu_line > max_line) menu_line -= max_line;
5633 command_see = FALSE;
5653 /* Verify legality */
5654 if (!inven || !equip)
5660 /* Hack -- Fix screen */
5670 /* Switch inven/equip */
5671 command_wrk = !command_wrk;
5673 /* Need to redraw */
5679 /* Use floor item */
5682 /* Scan all objects in the grid */
5683 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5687 /* Acquire object */
5688 o_ptr = &o_list[this_o_idx];
5690 /* Acquire next object */
5691 next_o_idx = o_ptr->next_o_idx;
5693 /* Validate the item */
5694 if (!item_tester_okay(o_ptr)) continue;
5699 /* Verify the item (if required) */
5701 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
5703 if (other_query_flag && !verify("Try", k)) continue;
5707 /* Allow player to "refuse" certain actions */
5708 if (!get_item_allow(k)) continue;
5710 /* Accept that choice */
5727 case '1': case '2': case '3':
5728 case '4': case '5': case '6':
5729 case '7': case '8': case '9':
5731 /* Look up the tag */
5732 if (!get_tag(&k, which))
5738 /* Hack -- Validate the item */
5739 if ((k < INVEN_RARM) ? !inven : !equip)
5745 /* Validate the item */
5746 if (!get_item_okay(k))
5752 /* Allow player to "refuse" certain actions */
5753 if (!get_item_allow(k))
5759 /* Accept that choice */
5771 /* Choose "default" inventory item */
5774 k = ((i1 == i2) ? i1 : -1);
5777 /* Choose "default" equipment item */
5780 k = ((e1 == e2) ? e1 : -1);
5783 /* Validate the item */
5784 if (!get_item_okay(k))
5790 /* Allow player to "refuse" certain actions */
5791 if (!get_item_allow(k))
5797 /* Accept that choice */
5806 if (select_the_force) {
5817 if(select_spellbook){
5818 bool not_found = FALSE;
5819 /* Look up the tag */
5820 if (!get_tag(&k, which))
5825 /* Hack -- Validate the item */
5826 if ((k < INVEN_RARM) ? !inven : !equip)
5831 /* Validate the item */
5832 if (!get_item_okay(k))
5838 /* Accept that choice */
5846 /* Extract "query" setting */
5847 ver = isupper(which);
5848 which = tolower(which);
5850 /* Convert letter to inventory index */
5853 if (which == '(') k = i1;
5854 else if (which == ')') k = i2;
5855 else k = label_to_inven(which);
5858 /* Convert letter to equipment index */
5861 if (which == '(') k = e1;
5862 else if (which == ')') k = e2;
5863 else k = label_to_equip(which);
5866 /* Validate the item */
5867 if (!get_item_okay(k))
5873 /* Verify the item */
5875 if (ver && !verify("ËÜÅö¤Ë", k))
5877 if (ver && !verify("Try", k))
5885 /* Allow player to "refuse" certain actions */
5886 if (!get_item_allow(k))
5892 /* Accept that choice */
5903 /* Fix the screen if necessary */
5909 /* Hack -- Cancel "display" */
5910 command_see = FALSE;
5914 /* Forget the item_tester_tval restriction */
5915 item_tester_tval = 0;
5917 item_tester_no_ryoute = FALSE;
5919 /* Forget the item_tester_hook restriction */
5920 item_tester_hook = NULL;
5926 /* Toggle again if needed */
5927 if (toggle) toggle_inven_equip();
5930 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5937 /* Clear the prompt line */
5940 /* Warning if needed */
5941 if (oops && str) msg_print(str);
5944 if (item) repeat_push(*cp);
5945 #endif /* ALLOW_REPEAT */
5952 #ifdef ALLOW_EASY_FLOOR
5957 * Return a list of o_list[] indexes of items at the given cave
5958 * location. Valid flags are:
5960 * mode & 0x01 -- Item tester
5961 * mode & 0x02 -- Marked items only
5962 * mode & 0x04 -- Stop after first
5964 int scan_floor(int *items, int y, int x, int mode)
5966 int this_o_idx, next_o_idx;
5971 if (!in_bounds(y, x)) return 0;
5973 /* Scan all objects in the grid */
5974 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
5978 /* Acquire object */
5979 o_ptr = &o_list[this_o_idx];
5981 /* Acquire next object */
5982 next_o_idx = o_ptr->next_o_idx;
5985 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
5988 if ((mode & 0x02) && !o_ptr->marked) continue;
5990 /* Accept this item */
5991 /* XXX Hack -- Enforce limit */
5993 items[num] = this_o_idx;
5998 if (mode & 0x04) break;
6006 * Display a list of the items on the floor at the given location.
6008 int show_floor(int target_item, int y, int x, int *min_width)
6015 char o_name[MAX_NLEN];
6021 char out_desc[23][MAX_NLEN];
6022 int target_item_label = 0;
6024 int floor_list[23], floor_num;
6028 Term_get_size(&wid, &hgt);
6030 /* Default length */
6031 len = MAX((*min_width), 20);
6033 /* Maximum space allowed for descriptions */
6036 /* Require space for weight (if needed) */
6037 if (show_weights) lim -= 9;
6039 /* Scan for objects in the grid, using item_tester_okay() */
6040 floor_num = scan_floor(floor_list, y, x, 0x01);
6042 /* Display the inventory */
6043 for (k = 0, i = 0; i < floor_num && i < 23; i++)
6045 o_ptr = &o_list[floor_list[i]];
6047 /* Describe the object */
6048 object_desc(o_name, o_ptr, TRUE, 3);
6050 /* Hack -- enforce max length */
6053 /* Save the index */
6056 /* Acquire inventory color */
6057 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
6059 /* Save the object description */
6060 strcpy(out_desc[k], o_name);
6062 /* Find the predicted "line length" */
6063 l = strlen(out_desc[k]) + 5;
6065 /* Be sure to account for the weight */
6066 if (show_weights) l += 9;
6068 /* Maintain the maximum length */
6069 if (l > len) len = l;
6071 /* Advance to next "line" */
6078 /* Find the column to start in */
6079 col = (len > wid - 4) ? 0 : (wid - len - 1);
6081 /* Output each entry */
6082 for (j = 0; j < k; j++)
6085 i = floor_list[out_index[j]];
6090 /* Clear the line */
6091 prt("", j + 1, col ? col - 2 : col);
6093 if (use_menu && target_item)
6095 if (j == (target_item-1))
6098 strcpy(tmp_val, "¡Õ");
6100 strcpy(tmp_val, "> ");
6102 target_item_label = i;
6104 else strcpy(tmp_val, " ");
6107 /* Prepare an index --(-- */
6108 sprintf(tmp_val, "%c)", index_to_label(j));
6110 /* Clear the line with the (possibly indented) index */
6111 put_str(tmp_val, j + 1, col);
6113 /* Display the entry itself */
6114 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
6116 /* Display the weight if needed */
6119 int wgt = o_ptr->weight * o_ptr->number;
6121 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
6123 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
6126 put_str(tmp_val, j + 1, wid - 9);
6130 /* Make a "shadow" below the list (only if needed) */
6131 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
6133 return target_item_label;
6137 * This version of get_item() is called by get_item() when
6138 * the easy_floor is on.
6140 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
6142 char n1 = ' ', n2 = ' ', which = ' ';
6144 int j, k, i1, i2, e1, e2;
6154 bool allow_equip = FALSE;
6155 bool allow_inven = FALSE;
6156 bool allow_floor = FALSE;
6158 bool toggle = FALSE;
6163 int floor_num, floor_list[23], floor_top = 0;
6166 extern bool select_spellbook;
6167 extern bool select_the_force;
6169 int menu_line = (use_menu ? 1 : 0);
6175 /* Get the item index */
6176 if (repeat_pull(cp))
6178 if (*cp == 1111) { /* the_force */
6179 item_tester_tval = 0;
6180 item_tester_hook = NULL;
6191 /* Acquire object */
6194 /* Validate the item */
6195 if (item_tester_okay(o_ptr))
6197 /* Forget the item_tester_tval restriction */
6198 item_tester_tval = 0;
6200 /* Forget the item_tester_hook restriction */
6201 item_tester_hook = NULL;
6208 /* Verify the item */
6209 else if (get_item_okay(*cp))
6211 /* Forget the item_tester_tval restriction */
6212 item_tester_tval = 0;
6214 /* Forget the item_tester_hook restriction */
6215 item_tester_hook = NULL;
6222 #endif /* ALLOW_REPEAT */
6225 if (mode & (USE_EQUIP)) equip = TRUE;
6226 if (mode & (USE_INVEN)) inven = TRUE;
6227 if (mode & (USE_FLOOR)) floor = TRUE;
6230 /* Paranoia XXX XXX XXX */
6237 /* No item selected */
6241 /* Full inventory */
6243 i2 = INVEN_PACK - 1;
6245 /* Forbid inventory */
6246 if (!inven) i2 = -1;
6249 for (j = 0; j < INVEN_PACK; j++)
6250 if (item_tester_okay(&inventory[j])) max_inven++;
6253 /* Restrict inventory indexes */
6254 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
6255 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
6258 /* Full equipment */
6260 e2 = INVEN_TOTAL - 1;
6262 /* Forbid equipment */
6263 if (!equip) e2 = -1;
6266 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
6267 if (item_tester_okay(&inventory[j])) max_equip++;
6268 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
6271 /* Restrict equipment indexes */
6272 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
6273 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
6276 /* Count "okay" floor items */
6279 /* Restrict floor usage */
6282 /* Scan all objects in the grid */
6283 floor_num = scan_floor(floor_list, py, px, 0x01);
6286 /* Accept inventory */
6287 if (i1 <= i2) allow_inven = TRUE;
6289 /* Accept equipment */
6290 if (e1 <= e2) allow_equip = TRUE;
6293 if (floor_num) allow_floor = TRUE;
6295 /* Require at least one legal choice */
6296 if (!allow_inven && !allow_equip && !allow_floor)
6298 /* Cancel p_ptr->command_see */
6299 command_see = FALSE;
6307 if (select_the_force) {
6313 /* Analyze choices */
6316 /* Hack -- Start on equipment if requested */
6317 if (command_see && (command_wrk == (USE_EQUIP))
6320 command_wrk = (USE_EQUIP);
6323 /* Use inventory if allowed */
6324 else if (allow_inven)
6326 command_wrk = (USE_INVEN);
6329 /* Use equipment if allowed */
6330 else if (allow_equip)
6332 command_wrk = (USE_EQUIP);
6335 /* Use floor if allowed */
6336 else if (allow_floor)
6338 command_wrk = (USE_FLOOR);
6343 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
6345 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
6347 /* Hack -- start out in "display" mode */
6354 /* Repeat until done */
6357 int get_item_label = 0;
6366 for (j = 0; j < 8; j++)
6369 if (!angband_term[j]) continue;
6371 /* Count windows displaying inven */
6372 if (window_flag[j] & (PW_INVEN)) ni++;
6374 /* Count windows displaying equip */
6375 if (window_flag[j] & (PW_EQUIP)) ne++;
6378 /* Toggle if needed */
6379 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
6380 (command_wrk == (USE_INVEN) && !ni && ne))
6383 toggle_inven_equip();
6390 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6392 /* Redraw windows */
6396 /* Inventory screen */
6397 if (command_wrk == (USE_INVEN))
6399 /* Extract the legal requests */
6403 /* Redraw if needed */
6404 if (command_see) get_item_label = show_inven(menu_line);
6407 /* Equipment screen */
6408 else if (command_wrk == (USE_EQUIP))
6410 /* Extract the legal requests */
6411 n1 = I2A(e1 - INVEN_RARM);
6412 n2 = I2A(e2 - INVEN_RARM);
6414 /* Redraw if needed */
6415 if (command_see) get_item_label = show_equip(menu_line);
6419 else if (command_wrk == (USE_FLOOR))
6422 k = MIN(floor_top + 23, floor_num) - 1;
6424 /* Extract the legal requests */
6425 n1 = I2A(j - floor_top);
6426 n2 = I2A(k - floor_top);
6428 /* Redraw if needed */
6429 if (command_see) get_item_label = show_floor(menu_line, py, px, &min_width);
6432 /* Viewing inventory */
6433 if (command_wrk == (USE_INVEN))
6435 /* Begin the prompt */
6437 sprintf(out_val, "»ý¤Áʪ:");
6439 sprintf(out_val, "Inven:");
6444 /* Build the prompt */
6446 sprintf(tmp_val, "%c-%c,'(',')',",
6448 sprintf(tmp_val, " %c-%c,'(',')',",
6451 index_to_label(i1), index_to_label(i2));
6454 strcat(out_val, tmp_val);
6457 /* Indicate ability to "view" */
6459 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6461 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6470 strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
6471 else if (allow_floor)
6472 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
6474 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6476 else if (select_the_force)
6477 strcat(out_val, " 'w'Îýµ¤½Ñ,");
6482 strcat(out_val, " / for Equip,");
6483 else if (allow_floor)
6484 strcat(out_val, " 6 for Equip,");
6486 strcat(out_val, " 4 or 6 for Equip,");
6488 else if (select_the_force)
6489 strcat(out_val, " w for the Force,");
6497 strcat(out_val, " '-'¾²¾å,");
6498 else if (allow_equip)
6499 strcat(out_val, " '4' ¾²¾å,");
6501 strcat(out_val, " '4'or'6' ¾²¾å,");
6504 strcat(out_val, " - for floor,");
6505 else if (allow_equip)
6506 strcat(out_val, " 4 for floor,");
6508 strcat(out_val, " 4 or 6 for floor,");
6514 /* Viewing equipment */
6515 else if (command_wrk == (USE_EQUIP))
6517 /* Begin the prompt */
6519 sprintf(out_val, "ÁõÈ÷ÉÊ:");
6521 sprintf(out_val, "Equip:");
6527 /* Build the prompt */
6529 sprintf(tmp_val, "%c-%c,'(',')',",
6531 sprintf(tmp_val, " %c-%c,'(',')',",
6534 index_to_label(e1), index_to_label(e2));
6537 strcat(out_val, tmp_val);
6540 /* Indicate ability to "view" */
6542 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6544 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6553 strcat(out_val, " '/' »ý¤Áʪ,");
6554 else if (allow_floor)
6555 strcat(out_val, " '4' »ý¤Áʪ,");
6557 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6561 strcat(out_val, " / for Inven,");
6562 else if (allow_floor)
6563 strcat(out_val, " 4 for Inven,");
6565 strcat(out_val, " 4 or 6 for Inven,");
6574 strcat(out_val, " '-'¾²¾å,");
6575 else if (allow_inven)
6576 strcat(out_val, " '6' ¾²¾å,");
6578 strcat(out_val, " '4'or'6' ¾²¾å,");
6581 strcat(out_val, " - for floor,");
6582 else if (allow_inven)
6583 strcat(out_val, " 6 for floor,");
6585 strcat(out_val, " 4 or 6 for floor,");
6591 else if (command_wrk == (USE_FLOOR))
6593 /* Begin the prompt */
6595 sprintf(out_val, "¾²¾å:");
6597 sprintf(out_val, "Floor:");
6603 /* Build the prompt */
6605 sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
6607 sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
6612 strcat(out_val, tmp_val);
6615 /* Indicate ability to "view" */
6617 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6619 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6625 if (allow_inven && allow_equip)
6628 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
6630 strcat(out_val, " 4 for Equip, 6 for Inven,");
6634 else if (allow_inven)
6637 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6639 strcat(out_val, " 4 or 6 for Inven,");
6643 else if (allow_equip)
6646 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6648 strcat(out_val, " 4 or 6 for Equip,");
6654 else if (allow_inven)
6657 strcat(out_val, " '/' »ý¤Áʪ,");
6659 strcat(out_val, " / for Inven,");
6663 else if (allow_equip)
6666 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6668 strcat(out_val, " / for Equip,");
6674 if (command_see && !use_menu)
6677 strcat(out_val, " Enter ¼¡,");
6679 strcat(out_val, " Enter for scroll down,");
6684 /* Finish the prompt */
6685 strcat(out_val, " ESC");
6687 /* Build the prompt */
6688 sprintf(tmp_val, "(%s) %s", out_val, pmt);
6690 /* Show the prompt */
6699 if (command_wrk == USE_INVEN) max_line = max_inven;
6700 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6701 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6717 menu_line += (max_line - 1);
6733 /* Verify legality */
6734 if (command_wrk == (USE_INVEN))
6736 if (allow_floor) command_wrk = USE_FLOOR;
6737 else if (allow_equip) command_wrk = USE_EQUIP;
6744 else if (command_wrk == (USE_EQUIP))
6746 if (allow_inven) command_wrk = USE_INVEN;
6747 else if (allow_floor) command_wrk = USE_FLOOR;
6754 else if (command_wrk == (USE_FLOOR))
6756 if (allow_equip) command_wrk = USE_EQUIP;
6757 else if (allow_inven) command_wrk = USE_INVEN;
6770 /* Hack -- Fix screen */
6780 /* Switch inven/equip */
6781 if (command_wrk == USE_INVEN) max_line = max_inven;
6782 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6783 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6784 if (menu_line > max_line) menu_line = max_line;
6786 /* Need to redraw */
6794 /* Verify legality */
6795 if (command_wrk == (USE_INVEN))
6797 if (allow_equip) command_wrk = USE_EQUIP;
6798 else if (allow_floor) command_wrk = USE_FLOOR;
6805 else if (command_wrk == (USE_EQUIP))
6807 if (allow_floor) command_wrk = USE_FLOOR;
6808 else if (allow_inven) command_wrk = USE_INVEN;
6815 else if (command_wrk == (USE_FLOOR))
6817 if (allow_inven) command_wrk = USE_INVEN;
6818 else if (allow_equip) command_wrk = USE_EQUIP;
6831 /* Hack -- Fix screen */
6841 /* Switch inven/equip */
6842 if (command_wrk == USE_INVEN) max_line = max_inven;
6843 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6844 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6845 if (menu_line > max_line) menu_line = max_line;
6847 /* Need to redraw */
6856 if (command_wrk == USE_FLOOR)
6859 (*cp) = -get_item_label;
6863 /* Validate the item */
6864 if (!get_item_okay(get_item_label))
6870 /* Allow player to "refuse" certain actions */
6871 if (!get_item_allow(get_item_label))
6877 /* Accept that choice */
6878 (*cp) = get_item_label;
6887 if (select_the_force) {
6895 if (menu_line > max_line) menu_line -= max_line;
6916 command_see = FALSE;
6939 cave_type *c_ptr = &cave[py][px];
6941 if (command_wrk != (USE_FLOOR)) break;
6943 /* Get the object being moved. */
6944 o_idx = c_ptr->o_idx;
6946 /* Only rotate a pile of two or more objects. */
6947 if (!(o_idx && o_list[o_idx].next_o_idx)) break;
6949 /* Remove the first object from the list. */
6950 excise_object_idx(o_idx);
6952 /* Find end of the list. */
6954 while (o_list[i].next_o_idx)
6955 i = o_list[i].next_o_idx;
6957 /* Add after the last object. */
6958 o_list[i].next_o_idx = o_idx;
6960 /* Re-scan floor list */
6961 floor_num = scan_floor(floor_list, py, px, 0x01);
6963 /* Hack -- Fix screen */
6978 if (command_wrk == (USE_INVEN))
6985 command_wrk = (USE_EQUIP);
6987 else if (command_wrk == (USE_EQUIP))
6994 command_wrk = (USE_INVEN);
6996 else if (command_wrk == (USE_FLOOR))
7000 command_wrk = (USE_INVEN);
7002 else if (allow_equip)
7004 command_wrk = (USE_EQUIP);
7013 /* Hack -- Fix screen */
7023 /* Need to redraw */
7036 * If we are already examining the floor, and there
7037 * is only one item, we will always select it.
7038 * If we aren't examining the floor and there is only
7039 * one item, we will select it if floor_query_flag
7044 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
7047 k = 0 - floor_list[0];
7049 /* Allow player to "refuse" certain actions */
7050 if (!get_item_allow(k))
7056 /* Accept that choice */
7065 /* Hack -- Fix screen */
7075 command_wrk = (USE_FLOOR);
7081 case '1': case '2': case '3':
7082 case '4': case '5': case '6':
7083 case '7': case '8': case '9':
7085 /* Look up the tag */
7086 if (!get_tag(&k, which))
7092 /* Hack -- Validate the item */
7093 if ((k < INVEN_RARM) ? !inven : !equip)
7099 /* Validate the item */
7100 if (!get_item_okay(k))
7106 /* Allow player to "refuse" certain actions */
7107 if (!get_item_allow(k))
7113 /* Accept that choice */
7124 /* Choose "default" inventory item */
7125 if (command_wrk == (USE_INVEN))
7127 k = ((i1 == i2) ? i1 : -1);
7130 /* Choose "default" equipment item */
7131 else if (command_wrk == (USE_EQUIP))
7133 k = ((e1 == e2) ? e1 : -1);
7136 /* Choose "default" floor item */
7137 else if (command_wrk == (USE_FLOOR))
7142 k = 0 - floor_list[0];
7144 /* Allow player to "refuse" certain actions */
7145 if (!get_item_allow(k))
7151 /* Accept that choice */
7159 /* Validate the item */
7160 if (!get_item_okay(k))
7166 /* Allow player to "refuse" certain actions */
7167 if (!get_item_allow(k))
7173 /* Accept that choice */
7183 if (select_the_force) {
7195 if(select_spellbook){
7196 bool not_found = FALSE;
7197 /* Look up the tag */
7198 if (!get_tag(&k, which))
7203 /* Hack -- Validate the item */
7204 if ((k < INVEN_RARM) ? !inven : !equip)
7209 /* Validate the item */
7210 if (!get_item_okay(k))
7216 /* Accept that choice */
7224 /* Extract "query" setting */
7225 ver = isupper(which);
7226 which = tolower(which);
7228 /* Convert letter to inventory index */
7229 if (command_wrk == (USE_INVEN))
7231 if (which == '(') k = i1;
7232 else if (which == ')') k = i2;
7233 else k = label_to_inven(which);
7236 /* Convert letter to equipment index */
7237 else if (command_wrk == (USE_EQUIP))
7239 if (which == '(') k = e1;
7240 else if (which == ')') k = e2;
7241 else k = label_to_equip(which);
7244 /* Convert letter to floor index */
7245 else if (command_wrk == USE_FLOOR)
7247 if (which == '(') k = 0;
7248 else if (which == ')') k = floor_num - 1;
7249 else k = islower(which) ? A2I(which) : -1;
7250 if (k < 0 || k >= floor_num || k >= 23)
7257 k = 0 - floor_list[k];
7260 /* Validate the item */
7261 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
7267 /* Verify the item */
7269 if (ver && !verify("ËÜÅö¤Ë", k))
7271 if (ver && !verify("Try", k))
7279 /* Allow player to "refuse" certain actions */
7280 if (!get_item_allow(k))
7286 /* Accept that choice */
7296 /* Fix the screen if necessary */
7302 /* Hack -- Cancel "display" */
7303 command_see = FALSE;
7307 /* Forget the item_tester_tval restriction */
7308 item_tester_tval = 0;
7310 /* Forget the item_tester_hook restriction */
7311 item_tester_hook = NULL;
7317 /* Toggle again if needed */
7318 if (toggle) toggle_inven_equip();
7321 p_ptr->window |= (PW_INVEN | PW_EQUIP);
7328 /* Clear the prompt line */
7331 /* Warning if needed */
7332 if (oops && str) msg_print(str);
7335 if (item) repeat_push(*cp);
7336 #endif /* ALLOW_REPEAT */
7343 static bool py_pickup_floor_aux(void)
7353 /* Restrict the choices */
7354 item_tester_hook = inven_carry_okay;
7358 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
7359 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
7361 q = "Get which item? ";
7362 s = "You no longer have any room for the objects on the floor.";
7365 if (get_item(&item, q, s, (USE_FLOOR)))
7367 this_o_idx = 0 - item;
7374 /* Access the object */
7375 o_ptr = &o_list[this_o_idx];
7377 /* Pick up the object */
7378 py_pickup_aux(this_o_idx);
7385 * Make the player carry everything in a grid
7387 * If "pickup" is FALSE then only gold will be picked up
7389 * This is called by py_pickup() when easy_floor is TRUE.
7391 void py_pickup_floor(int pickup)
7393 s16b this_o_idx, next_o_idx = 0;
7395 char o_name[MAX_NLEN];
7398 int floor_num = 0, floor_list[23], floor_o_idx = 0;
7402 /* Scan the pile of objects */
7403 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
7407 /* Access the object */
7408 o_ptr = &o_list[this_o_idx];
7410 /* Describe the object */
7411 object_desc(o_name, o_ptr, TRUE, 3);
7413 /* Access the next object */
7414 next_o_idx = o_ptr->next_o_idx;
7416 /* Hack -- disturb */
7420 if (o_ptr->tval == TV_GOLD)
7424 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
7425 (long)o_ptr->pval, o_name);
7427 msg_format("You have found %ld gold pieces worth of %s.",
7428 (long) o_ptr->pval, o_name);
7432 /* Collect the gold */
7433 p_ptr->au += o_ptr->pval;
7436 p_ptr->redraw |= (PR_GOLD);
7439 p_ptr->window |= (PW_PLAYER);
7441 /* Delete the gold */
7442 delete_object_idx(this_o_idx);
7444 /* Check the next object */
7448 /* Count non-gold objects that can be picked up. */
7449 if (inven_carry_okay(o_ptr))
7454 /* Remember this object index */
7456 floor_list[floor_num] = this_o_idx;
7458 /* Count non-gold objects */
7461 /* Remember this index */
7462 floor_o_idx = this_o_idx;
7465 /* There are no non-gold objects */
7469 /* Mention the number of objects */
7475 /* Access the object */
7476 o_ptr = &o_list[floor_o_idx];
7478 #ifdef ALLOW_EASY_SENSE
7480 /* Option: Make object sensing easy */
7483 /* Sense the object */
7484 (void) sense_object(o_ptr);
7487 #endif /* ALLOW_EASY_SENSE */
7489 /* Describe the object */
7490 object_desc(o_name, o_ptr, TRUE, 3);
7494 msg_format("%s¤¬¤¢¤ë¡£", o_name);
7496 msg_format("You see %s.", o_name);
7501 /* Multiple objects */
7506 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
7508 msg_format("You see a pile of %d items.", floor_num);
7517 /* The player has no room for anything on the floor. */
7523 /* Access the object */
7524 o_ptr = &o_list[floor_o_idx];
7526 #ifdef ALLOW_EASY_SENSE
7528 /* Option: Make object sensing easy */
7531 /* Sense the object */
7532 (void) sense_object(o_ptr);
7535 #endif /* ALLOW_EASY_SENSE */
7537 /* Describe the object */
7538 object_desc(o_name, o_ptr, TRUE, 3);
7542 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7544 msg_format("You have no room for %s.", o_name);
7549 /* Multiple objects */
7554 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7556 msg_print("You have no room for any of the objects on the floor.");
7568 /* Hack -- query every object */
7569 if (carry_query_flag)
7571 char out_val[MAX_NLEN+20];
7573 /* Access the object */
7574 o_ptr = &o_list[floor_o_idx];
7576 #ifdef ALLOW_EASY_SENSE
7578 /* Option: Make object sensing easy */
7581 /* Sense the object */
7582 (void) sense_object(o_ptr);
7585 #endif /* ALLOW_EASY_SENSE */
7587 /* Describe the object */
7588 object_desc(o_name, o_ptr, TRUE, 3);
7590 /* Build a prompt */
7592 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7594 (void) sprintf(out_val, "Pick up %s? ", o_name);
7598 /* Ask the user to confirm */
7599 if (!get_check(out_val))
7606 /* Access the object */
7607 o_ptr = &o_list[floor_o_idx];
7609 #ifdef ALLOW_EASY_SENSE
7611 /* Option: Make object sensing easy */
7614 /* Sense the object */
7615 (void) sense_object(o_ptr);
7618 #endif /* ALLOW_EASY_SENSE */
7620 /* Pick up the object */
7621 py_pickup_aux(floor_o_idx);
7624 /* Allow the user to choose an object */
7627 while (can_pickup--)
7629 if (!py_pickup_floor_aux()) break;
7634 #endif /* ALLOW_EASY_FLOOR */