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;
70 /* Process "graf.prf" */
71 process_pref_file("graf.prf");
77 /* Process "font.prf" */
78 process_pref_file("font.prf");
84 * Obtain the "flags" for an item
86 void object_flags(object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3)
88 object_kind *k_ptr = &k_info[o_ptr->k_idx];
91 (*f1) = k_ptr->flags1;
92 (*f2) = k_ptr->flags2;
93 (*f3) = k_ptr->flags3;
98 artifact_type *a_ptr = &a_info[o_ptr->name1];
100 (*f1) = a_ptr->flags1;
101 (*f2) = a_ptr->flags2;
102 (*f3) = a_ptr->flags3;
103 if (!cursed_p(o_ptr))
105 (*f3) &= ~(TR3_HEAVY_CURSE | TR3_CURSED);
112 ego_item_type *e_ptr = &e_info[o_ptr->name2];
114 (*f1) |= e_ptr->flags1;
115 (*f2) |= e_ptr->flags2;
116 (*f3) |= e_ptr->flags3;
118 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
120 (*f3) &= ~(TR3_SH_FIRE);
122 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
124 (*f1) &= ~(TR1_INFRA);
126 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
128 (*f2) &= ~(TR2_RES_BLIND);
129 (*f3) &= ~(TR3_SEE_INVIS);
133 /* Random artifact ! */
134 if (o_ptr->art_flags1 || o_ptr->art_flags2 || o_ptr->art_flags3)
136 (*f1) |= o_ptr->art_flags1;
137 (*f2) |= o_ptr->art_flags2;
138 (*f3) |= o_ptr->art_flags3;
141 if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
143 if (o_ptr->xtra3 < 33)
145 (*f1) |= (0x00000001 << (o_ptr->xtra3-1));
147 else if (o_ptr->xtra3 < 65)
149 (*f2) |= (0x00000001 << (o_ptr->xtra3-33));
151 else if (o_ptr->xtra3 < 97)
153 (*f3) |= (0x00000001 << (o_ptr->xtra3-65));
155 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ACID)
157 (*f2) |= TR2_RES_ACID;
159 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ELEC)
161 (*f2) |= TR2_RES_ELEC;
163 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_FIRE)
165 (*f2) |= TR2_RES_FIRE;
167 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_COLD)
169 (*f2) |= TR2_RES_COLD;
171 else if (o_ptr->xtra3 == ESSENCE_SH_FIRE)
173 (*f2) |= TR2_RES_FIRE;
174 (*f3) |= TR3_SH_FIRE;
176 else if (o_ptr->xtra3 == ESSENCE_SH_ELEC)
178 (*f2) |= TR2_RES_ELEC;
179 (*f3) |= TR3_SH_ELEC;
181 else if (o_ptr->xtra3 == ESSENCE_SH_COLD)
183 (*f2) |= TR2_RES_COLD;
184 (*f3) |= TR3_SH_COLD;
186 else if (o_ptr->xtra3 == ESSENCE_RESISTANCE)
188 (*f2) |= (TR2_RES_ACID | TR2_RES_ELEC | TR2_RES_FIRE | TR2_RES_COLD);;
196 * Obtain the "flags" for an item which are known to the player
198 void object_flags_known(object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3)
202 object_kind *k_ptr = &k_info[o_ptr->k_idx];
205 (*f1) = (*f2) = (*f3) = 0L;
207 if (!object_aware_p(o_ptr)) return;
210 (*f1) = k_ptr->flags1;
211 (*f2) = k_ptr->flags2;
212 (*f3) = k_ptr->flags3;
214 /* Must be identified */
215 if (!object_known_p(o_ptr)) return;
217 /* Ego-item (known basic flags) */
220 ego_item_type *e_ptr = &e_info[o_ptr->name2];
222 (*f1) |= e_ptr->flags1;
223 (*f2) |= e_ptr->flags2;
224 (*f3) |= e_ptr->flags3;
226 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
228 (*f3) &= ~(TR3_SH_FIRE);
230 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
232 (*f1) &= ~(TR1_INFRA);
234 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
236 (*f2) &= ~(TR2_RES_BLIND);
237 (*f3) &= ~(TR3_SEE_INVIS);
242 #ifdef SPOIL_ARTIFACTS
243 /* Full knowledge for some artifacts */
244 if (artifact_p(o_ptr) || o_ptr->art_name) spoil = TRUE;
245 #endif /* SPOIL_ARTIFACTS */
247 #ifdef SPOIL_EGO_ITEMS
248 /* Full knowledge for some ego-items */
249 if (ego_item_p(o_ptr)) spoil = TRUE;
250 #endif /* SPOIL_EGO_ITEMS */
252 /* Need full knowledge or spoilers */
253 if (spoil || (o_ptr->ident & IDENT_MENTAL))
258 artifact_type *a_ptr = &a_info[o_ptr->name1];
260 (*f1) = a_ptr->flags1;
261 (*f2) = a_ptr->flags2;
262 (*f3) = a_ptr->flags3;
264 if (!cursed_p(o_ptr))
266 (*f3) &= ~(TR3_HEAVY_CURSE | TR3_CURSED);
270 /* Random artifact ! */
271 if (o_ptr->art_flags1 || o_ptr->art_flags2 || o_ptr->art_flags3)
273 (*f1) |= o_ptr->art_flags1;
274 (*f2) |= o_ptr->art_flags2;
275 (*f3) |= o_ptr->art_flags3;
279 if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
281 if (o_ptr->xtra3 < 33)
283 (*f1) |= (0x00000001 << (o_ptr->xtra3-1));
285 else if (o_ptr->xtra3 < 65)
287 (*f2) |= (0x00000001 << (o_ptr->xtra3-33));
289 else if (o_ptr->xtra3 < 97)
291 (*f3) |= (0x00000001 << (o_ptr->xtra3-65));
293 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ACID)
295 (*f2) |= TR2_RES_ACID;
297 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ELEC)
299 (*f2) |= TR2_RES_ELEC;
301 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_FIRE)
303 (*f2) |= TR2_RES_FIRE;
305 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_COLD)
307 (*f2) |= TR2_RES_COLD;
309 else if (o_ptr->xtra3 == ESSENCE_SH_FIRE)
311 (*f2) |= TR2_RES_FIRE;
312 (*f3) |= TR3_SH_FIRE;
314 else if (o_ptr->xtra3 == ESSENCE_SH_ELEC)
316 (*f2) |= TR2_RES_ELEC;
317 (*f3) |= TR3_SH_ELEC;
319 else if (o_ptr->xtra3 == ESSENCE_SH_COLD)
321 (*f2) |= TR2_RES_COLD;
322 (*f3) |= TR3_SH_COLD;
324 else if (o_ptr->xtra3 == ESSENCE_RESISTANCE)
326 (*f2) |= (TR2_RES_ACID | TR2_RES_ELEC | TR2_RES_FIRE | TR2_RES_COLD);;
332 if (o_ptr->art_flags3 & TR3_CURSED)
333 (*f3) |= (TR3_CURSED);
334 if (o_ptr->art_flags3 & TR3_HEAVY_CURSE)
335 (*f3) |= (TR3_HEAVY_CURSE);
341 * Hack -- describe an item currently in a store's inventory
342 * This allows an item to *look* like the player is "aware" of it
344 void object_desc_store(char *buf, object_type *o_ptr, int pref, int mode)
346 /* Save the "aware" flag */
347 bool hack_aware = object_aware_p(o_ptr);
349 /* Save the "known" flag */
350 bool hack_known = (o_ptr->ident & (IDENT_KNOWN)) ? TRUE : FALSE;
353 /* Set the "known" flag */
354 o_ptr->ident |= (IDENT_KNOWN);
356 /* Force "aware" for description */
357 k_info[o_ptr->k_idx].aware = TRUE;
360 /* Describe the object */
361 object_desc(buf, o_ptr, pref, mode);
364 /* Restore "aware" flag */
365 k_info[o_ptr->k_idx].aware = hack_aware;
367 /* Clear the known flag */
368 if (!hack_known) o_ptr->ident &= ~(IDENT_KNOWN);
375 * Determine the "Activation" (if any) for an artifact
376 * Return a string, or NULL for "no activation"
378 cptr item_activation(object_type *o_ptr)
382 /* Extract the flags */
383 object_flags(o_ptr, &f1, &f2, &f3);
385 /* Require activation ability */
387 if (!(f3 & (TR3_ACTIVATE))) return ("¤Ê¤·");
389 if (!(f3 & (TR3_ACTIVATE))) return ("nothing");
395 * We need to deduce somehow that it is a random artifact -- one
396 * problem: It could be a random artifact which has NOT YET received
397 * a name. Thus we eliminate other possibilities instead of checking
401 if (!(o_ptr->name1) &&
406 switch (o_ptr->xtra2)
411 return "ÂÀÍÛ¸÷Àþ : 10 ¥¿¡¼¥óËè";
413 return "beam of sunlight every 10 turns";
420 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
422 return "magic missile (2d6) every 2 turns";
429 return "°½±À (12), Ⱦ·Â 3 , 4+d4 ¥¿¡¼¥óËè";
431 return "stinking cloud (12), rad. 3, every 4+d4 turns";
438 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
440 return "lightning bolt (4d8) every 5+d5 turns";
447 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
449 return "acid bolt (5d8) every 6+d6 turns";
456 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
458 return "frost bolt (6d8) every 7+d7 turns";
465 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
467 return "fire bolt (9d8) every 8+d8 turns";
474 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (48) : 400 ¥¿¡¼¥óËè";
476 return "ball of cold (48) every 400 turns";
483 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (72) : 400 ¥¿¡¼¥óËè";
485 return "ball of fire (72) every 400 turns";
492 return "¥Ò¥Ã¥È¥Ý¥¤¥ó¥ÈµÛ¼ý (100) : 100+d100 ¥¿¡¼¥óËè";
494 return "drain life (100) every 100+d100 turns";
501 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 300 ¥¿¡¼¥óËè";
503 return "ball of cold (100) every 300 turns";
510 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 500 ¥¿¡¼¥óËè";
512 return "ball of lightning (100) every 500 turns";
519 return "¥Ò¥Ã¥È¥Ý¥¤¥ó¥ÈµÛ¼ý(120) : 400 ¥¿¡¼¥óËè";
521 return "drain life (120) every 400 turns";
528 return "µÛ·ì¥É¥ì¥¤¥ó (3*50) : 400 ¥¿¡¼¥óËè";
530 return "vampiric drain (3*50) every 400 turns";
537 return "Ìð (150) : 90+d90 ¥¿¡¼¥óËè";
539 return "arrows (150) every 90+d90 turns";
546 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (120) : 225+d225 ¥¿¡¼¥óËè";
548 return "fire ball (120) every 225+d225 turns";
555 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (200) : 325+d325 ¥¿¡¼¥óËè";
557 return "ball of cold (200) every 325+d325 turns";
564 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (250) : 425+d425 ¥¿¡¼¥óËè";
566 return "ball of lightning (250) every 425+d425 turns";
573 return "¥«¥Þ¥¤¥¿¥Á : 250 ¥¿¡¼¥óËè";
575 return "whirlwind attack every 250 turns";
582 return "µÛ·ì¥É¥ì¥¤¥ó (3*100) : 400 ¥¿¡¼¥óËè";
584 return "vampiric drain (3*100) every 400 turns";
591 return "call chaos : 350 ¥¿¡¼¥óËè"; /*nuke me*/
593 return "call chaos every 350 turns";
600 return "¥í¥±¥Ã¥È (120+level) : 400 ¥¿¡¼¥óËè";
602 return "launch rocket (120+level) every 400 turns";
609 return "¼Ù°Â໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
611 return "dispel evil (level*5) every 300+d300 turns";
618 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300) : 500 ¥¿¡¼¥óËè";
620 return "elemental breath (300) every 500 turns";
627 return "Á±ÎÉÂ໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
629 return "dispel good (level*5) every 300+d300 turns";
636 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
638 return "confuse monster every 15 turns";
645 return "¼þ°Ï¤Î¥â¥ó¥¹¥¿¡¼¤ò̲¤é¤»¤ë : 55 ¥¿¡¼¥óËè";
647 return "sleep nearby monsters every 55 turns";
654 return "ÃÏ¿Ì (Ⱦ·Â 10) : 50 ¥¿¡¼¥óËè";
656 return "earthquake (rad 10) every 50 turns";
663 return "¶²¹² : 3 * (level+10) ¥¿¡¼¥óËè";
665 return "terror every 3 * (level+10) turns";
672 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
674 return "teleport away every 200 turns";
678 case ACT_BANISH_EVIL:
681 return "¼Ù°¾ÃÌÇ : 250+d250 ¥¿¡¼¥óËè";
683 return "banish evil every 250+d250 turns";
690 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
692 return "genocide every 500 turns";
699 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
701 return "mass genocide every 1000 turns";
705 case ACT_CHARM_ANIMAL:
708 return "ưʪ̥λ : 300 ¥¿¡¼¥óËè";
710 return "charm animal every 300 turns";
714 case ACT_CHARM_UNDEAD:
717 return "ÉԻཾ° : 333 ¥¿¡¼¥óËè";
719 return "enslave undead every 333 turns";
723 case ACT_CHARM_OTHER:
726 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 400 ¥¿¡¼¥óËè";
728 return "charm monster every 400 turns";
732 case ACT_CHARM_ANIMALS:
735 return "ưʪͧÏ : 500 ¥¿¡¼¥óËè";
737 return "animal friendship every 500 turns";
741 case ACT_CHARM_OTHERS:
744 return "¼þÊÕ̥λ : 750 ¥¿¡¼¥óËè";
746 return "mass charm every 750 turns";
750 case ACT_SUMMON_ANIMAL:
753 return "ưʪ¾¤´ : 200+d300 ¥¿¡¼¥óËè";
755 return "summon animal every 200+d300 turns";
759 case ACT_SUMMON_PHANTOM:
762 return "»È¤¤Î´ : 200+d200 ¥¿¡¼¥óËè";
764 return "summon phantasmal servant every 200+d200 turns";
768 case ACT_SUMMON_ELEMENTAL:
771 return "¥¨¥ì¥á¥ó¥¿¥ë¾¤´ : 750 ¥¿¡¼¥óËè";
773 return "summon elemental every 750 turns";
777 case ACT_SUMMON_DEMON:
780 return "°Ë⾤´ : 666+d333 ¥¿¡¼¥óËè";
782 return "summon demon every 666+d333 turns";
786 case ACT_SUMMON_UNDEAD:
789 return "ÉԻྤ´ : 666+d333 ¥¿¡¼¥óËè";
791 return "summon undead every 666+d333 turns";
798 return "ͦµ¤²óÉü & 30 hp ²óÉü : 10 ¥¿¡¼¥óËè";
800 return "remove fear & heal 30 hp every 10 turns";
807 return "4d8 hp & ½ý²óÉü : 3+d3 ¥¿¡¼¥óËè";
809 return "heal 4d8 & wounds every 3+d3 turns";
813 case ACT_CURE_POISON:
816 return "ͦµ¤²óÉü/ÆǾä· : 5 ¥¿¡¼¥óËè";
818 return "remove fear and cure poison every 5 turns";
825 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
827 return "restore life levels every 450 turns";
834 return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃͲóÉü : 750 ¥¿¡¼¥óËè";
836 return "restore stats and life levels every 750 turns";
843 return "700 hp ²óÉü : 250 ¥¿¡¼¥óËè";
845 return "heal 700 hit points every 250 turns";
852 return "1000 hp ²óÉü : 888 ¥¿¡¼¥óËè";
854 return "heal 1000 hit points every 888 turns";
861 return "°ì»þŪ¤Ê ESP (´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
863 return "temporary ESP (dur 25+d30) every 200 turns";
870 return "»Îµ¤¹âÍȤȽËÊ¡ (´ü´Ö 50+d50) : 100+d100 ¥¿¡¼¥óËè";
872 return "heroism and blessed (dur 50+d50) every 100+d100 turns";
879 return "Âмٰ·ë³¦ (´ü´Ö level*3 + d25) : 225+d225 ¥¿¡¼¥óËè";
881 return "protect evil (dur level*3 + d25) every 225+d225 turns";
888 return "±êÎä»ÀÅÅÆǤؤÎÂÑÀ (´ü´Ö 40+d40) : 200 ¥¿¡¼¥óËè";
890 return "resist elements (dur 40+d40) every 200 turns";
897 return "²Ã® (´ü´Ö 20+d20) : 250 ¥¿¡¼¥óËè";
899 return "speed (dur 20+d20) every 250 turns";
906 return "²Ã® (´ü´Ö 75+d75) : 200+d200 ¥¿¡¼¥óËè";
908 return "speed (dur 75+d75) every 200+d200 turns";
915 return "¥ì¥¤¥¹²½ (level/2 + d(level/2)) : 1000 ¥¿¡¼¥óËè";
917 return "wraith form (level/2 + d(level/2)) every 1000 turns";
924 return "̵Ũ (´ü´Ö 8+d8) : 1000 ¥¿¡¼¥óËè";
926 return "invulnerability (dur 8+d8) every 1000 turns";
933 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) : 10+d10 ¥¿¡¼¥óËè";
935 return "light area (dam 2d15) every 10+d10 turns";
942 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) & ¼þÊÕ¥Þ¥Ã¥× : 50+d50 ¥¿¡¼¥óËè";
944 return "light (dam 2d15) & map area every 50+d50 turns";
951 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
953 return "detection every 55+d55 turns";
957 case ACT_DETECT_XTRA:
960 return "Á´´¶ÃΡ¢Ãµº÷¡¢*´ÕÄê* : 1000 ¥¿¡¼¥óËè";
962 return "detection, probing and identify true every 1000 turns";
969 return "*´ÕÄê* : 750 ¥¿¡¼¥óËè";
971 return "identify true every 750 turns";
978 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
980 return "identify spell every 10 turns";
987 return "Çúȯ¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
989 return "explosive rune every 200 turns";
996 return "¼é¤ê¤Î¥ë¡¼¥ó : 400 ¥¿¡¼¥óËè";
998 return "rune of protection every 400 turns";
1005 return "¶õÊ¢½¼Â : 200 ¥¿¡¼¥óËè";
1007 return "satisfy hunger every 200 turns";
1014 return "¥É¥¢Ç˲õ : 10 ¥¿¡¼¥óËè";
1016 return "destroy doors every 10 turns";
1023 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
1025 return "stone to mud every 5 turns";
1032 return "ºÆ½¼Å¶ : 70 ¥¿¡¼¥óËè";
1034 return "recharging every 70 turns";
1041 return "Ï£¶â½Ñ : 500 ¥¿¡¼¥óËè";
1043 return "alchemy every 500 turns";
1050 return "¼¡¸µ¤ÎÈâ : 100 ¥¿¡¼¥óËè";
1052 return "dimension door every 100 turns";
1059 return "¥Æ¥ì¥Ý¡¼¥È (range 100) : 45 ¥¿¡¼¥óËè";
1061 return "teleport (range 100) every 45 turns";
1068 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1070 return "word of recall every 200 turns";
1079 return "something undefined";
1086 /* Some artifacts can be activated */
1087 switch (o_ptr->name1)
1092 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1094 return "fire bolt (9d8) every 8+d8 turns";
1101 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1103 return "frost bolt (6d8) every 7+d7 turns";
1110 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1112 return "lightning bolt (4d8) every 6+d6 turns";
1119 return "°½±À(12) : 4+d4 ¥¿¡¼¥óËè";
1121 return "stinking cloud (12) every 4+d4 turns";
1128 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(48) : 5+d5 ¥¿¡¼¥óËè";
1130 return "frost ball (48) every 5+d5 turns";
1137 return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
1139 return "remove fear and cure poison every 5 turns";
1146 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(100) : 200 ¥¿¡¼¥óËè";
1148 return "frost ball (100) every 200 turns";
1155 return "¶Ç¤Î»ÕÃľ¤´ : 500+d500 ¥¿¡¼¥óËè";
1157 return "summon the Legion of the Dawn every 500+d500 turns";
1164 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 400 ¥¿¡¼¥óËè";
1166 return "fire ball (72) every 400 turns";
1173 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 100 ¥¿¡¼¥óËè";
1175 return "large fire ball (72) every 100 turns";
1182 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(120) : 15 ¥¿¡¼¥óËè";
1184 return "large fire ball (120) every 15 turns";
1191 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 200 ¥¿¡¼¥óËè";
1193 return "haste self (20+d20 turns) every 200 turns";
1200 return "À¸Ì¿Îϵۼý(120) : 400 ¥¿¡¼¥óËè";
1202 return "drain life (120) every 400 turns";
1209 return "À¸Ì¿Îϵۼý(90) : 70 ¥¿¡¼¥óËè";
1211 return "drain life (90) every 70 turns";
1218 return "¥É¥¢/¥È¥é¥Ã¥×Ê´ºÕ : 10 ¥¿¡¼¥óËè";
1220 return "door and trap destruction every 10 turns";
1228 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1230 return "word of recall every 200 turns";
1237 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1239 return "haste self (20+d20 turns) every 100+d100 turns";
1246 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
1248 return "identify every 10 turns";
1255 return "õº÷¡¢Á´´¶ÃΡ¢Á´´ÕÄê : 1000 ¥¿¡¼¥óËè";
1257 return "probing, detection and full id every 1000 turns";
1264 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
1266 return "mass genocide every 1000 turns";
1273 return "½ý¤Î¼£Ìþ(4d7) : 3+d3 ¥¿¡¼¥óËè";
1275 return "cure wounds (4d7) every 3+d3 turns";
1282 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
1284 return "fire branding of bolts every 999 turns";
1291 return "¥Õ¥¡¥¤¥¢¡ª : 15 ¥¿¡¼¥óËè";
1293 return "fire! every 15 turns";
1298 case ART_WEREWINDLE:
1301 return "ƨÁö : 35 ¥¿¡¼¥óËè";
1303 return "a getaway every 35 turns";
1310 return "¥Æ¥ì¥Ý¡¼¥È : 25 ¥¿¡¼¥óËè";
1312 return "a teleport every 25 turns";
1319 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1321 return "lightning ball (100) every 200 turns";
1328 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1330 return "Frost ball (100) every 200 turns";
1337 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
1339 return "stone to mud every 5 turns";
1346 return "´äÀÐÍϲò : 2 ¥¿¡¼¥óËè";
1348 return "stone to mud every 2 turns";
1352 case ART_SOULKEEPER:
1355 return "ÂÎÎϲóÉü(1000) : 888 ¥¿¡¼¥óËè";
1357 return "heal (1000) every 888 turns";
1364 return ("²óÉü (777)¡¢Ìþ¤·¡¢»Îµ¤¹âÍÈ : 300 ¥¿¡¼¥óËè");
1366 return ("heal (777), curing and heroism every 300 turns");
1373 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
1375 return "genocide every 500 turns";
1382 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
1384 return "restore life levels every 450 turns";
1391 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
1393 return "teleport away every 150 turns";
1401 return "Á´ÂÑÀ(20+d20¥¿¡¼¥ó) : 111 ¥¿¡¼¥óËè";
1403 return "resistance (20+d20 turns) every 111 turns";
1407 case ART_HOLCOLLETH:
1410 return "¥¹¥ê¡¼¥×(II) : 55 ¥¿¡¼¥óËè";
1412 return "Sleep II every 55 turns";
1419 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
1421 return "recharge item I every 70 turns";
1428 return "¥Æ¥ì¥Ý¡¼¥È : 45 ¥¿¡¼¥óËè";
1430 return "teleport every 45 turns";
1437 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
1439 return "confuse monster every 15 turns";
1443 case ART_CAMMITHRIM:
1446 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1448 return "magic missile (2d6) every 2 turns";
1455 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1457 return "fire bolt (9d8) every 8+d8 turns";
1461 case ART_PAURNIMMEN:
1464 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1466 return "frost bolt (6d8) every 7+d7 turns";
1473 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1475 return "lightning bolt (4d8) every 5+d5 turns";
1482 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
1484 return "acid bolt (5d8) every 6+d6 turns";
1491 return "ËâË¡¤ÎÌð(150) : 90+d90 ¥¿¡¼¥óËè";
1493 return "a magical arrow (150) every 90+d90 turns";
1497 case ART_HOLHENNETH:
1500 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
1502 return "detection every 55+d55 turns";
1509 return "ÂÎÎϲóÉü(500) : 500 ¥¿¡¼¥óËè";
1511 return "heal (700) every 250 turns";
1518 return "¥¹¥¿¡¼¡¦¥Ü¡¼¥ë(150) : 1000 ¥¿¡¼¥óËè";
1520 return "star ball (150) every 1000 turns";
1524 case ART_BLADETURNER:
1527 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300), »Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢ÂÑÀ";
1529 return "breathe elements (300), hero, bless, and resistance";
1536 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1538 return "illumination every 10+d10 turns";
1545 return "ËâË¡¤ÎÃϿޤȸ÷ : 50+d50 ¥¿¡¼¥óËè";
1547 return "magic mapping and light every 50+d50 turns";
1554 return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô";
1556 return "clairvoyance and recall, draining you";
1564 return "¼Ù°Â໶(x5) : 200+d200 ¥¿¡¼¥óËè";
1566 return "dispel evil (x5) every 200+d200 turns";
1573 return "¼Ù°Â໶(x5) : 100+d100 ¥¿¡¼¥óËè";
1575 return "dispel evil (x5) every 100+d100 turns";
1583 return "Âмٰ·ë³¦ : 225+d225 ¥¿¡¼¥óËè";
1585 return "protection from evil every 225+d225 turns";
1592 return "Ã⩹¶·â(100) : 100+d100 ¥¿¡¼¥óËè";
1594 return "a strangling attack (100) every 100+d100 turns";
1601 return "¥¹¥Ô¡¼¥É(75+d75¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1603 return "haste self (75+d75 turns) every 150+d150 turns";
1610 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(300) : 225+d225 ¥¿¡¼¥óËè";
1612 return "large fire ball (300) every 225+d225 turns";
1619 return "µðÂ祢¥¤¥¹¡¦¥Ü¡¼¥ë(400) : 325+d325 ¥¿¡¼¥óËè";
1621 return "large frost ball (400) every 325+d325 turns";
1629 return "µðÂ祵¥ó¥À¡¼¡¦¥Ü¡¼¥ë(500) : 425+d425 ¥¿¡¼¥óËè";
1631 return "large lightning ball (500) every 425+d425 turns";
1639 return "¿®¤¸Æñ¤¤¤³¤È : 450+d450 ¥¿¡¼¥óËè";
1641 return "bizarre things every 450+d450 turns";
1645 case ART_DOR: case ART_TERROR: case ART_STONEMASK:
1648 return "Á´Êý¸þ¤Ø¤Î¶²Éݤθ÷Àþ";
1650 return "rays of fear in every direction";
1657 return "¤³¤Î³¬¤Ë¤¤¤ë¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òɽ¼¨ : 200¥¿¡¼¥óËè";
1659 return "list of the uniques on the level every 200 turns";
1662 case ART_STONE_LORE:
1665 return "´í¸±¤òȼ¤¦´ÕÄê : ¤¤¤Ä¤Ç¤â";
1667 return "perilous identify every turn";
1673 return "³²Ãî¤Î¶î½ü : 55+d55¥¿¡¼¥óËè";
1675 return "dispel small life every 55+d55 turns";
1681 return "¥â¥ó¥¹¥¿¡¼¶²¹² : 40+d40¥¿¡¼¥óËè";
1683 return "frighten monsters every 40+d40 turns";
1689 return "Âмٰ·ë³¦ : 200+d200 ¥¿¡¼¥óËè";
1691 return "protection from evil every 200 + d200 turns";
1697 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
1699 return "a mana bolt (120) every 120+d120 turns";
1705 return "»Îµ¤¹âÍÈ, ¥¹¥Ô¡¼¥É(50+d50¥¿¡¼¥ó) : 100+d200 ¥¿¡¼¥óËè";
1707 return "hero and +10 to speed (50) every 100+200d turns";
1713 return "âÁ¤·¤¤¸÷ : 250 ¥¿¡¼¥óËè";
1715 return "blinding light every 250 turns";
1721 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
1723 return "Recharge item every 200 turns";
1729 return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë¡£";
1731 return "Increase STR (destroyed 50%)";
1737 return "ËâÎϤÎÍò(400) : 250+d250¥¿¡¼¥óËè";
1739 return "a mana storm every 250+d250 turns";
1745 return "ʪÂΤò°ú¤´ó¤»¤ë(½ÅÎÌ25kg¤Þ¤Ç) : 25+d25¥¿¡¼¥óËè";
1747 return "a telekinesis (500 lb) every 25+d25 turns";
1753 return "¥Ï¥¦¥ó¥É¾¤´ : 300+d150¥¿¡¼¥óËè";
1755 return "summon hound every 300+d150 turns";
1761 return "µðÂ祹¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 200+d200 ¥¿¡¼¥óËè";
1763 return "large star ball (200) every 200+d200 turns";
1770 return "Îã¤Î¥¢¥ì : 150+d150 ¥¿¡¼¥óËè";
1772 return "reveal your identity every 150+d150 turns";
1779 return "Çï»ÒÌÚ¤òÂǤÁ¤Ê¤é¤¹ : ¤¤¤Ä¤Ç¤â";
1781 return "beat wooden clappers every turn";
1789 return "»Îµ¤¹âÍÈ : 30+d30¥¿¡¼¥óËè";
1791 return "heroism every 30+d30 turns";
1799 return "Ìþ¤· : 100¥¿¡¼¥óËè";
1801 return "curing every 100 turns";
1809 return "ưʪ̥λ : 200¥¿¡¼¥óËè";
1811 return "charm animal every 200 turns";
1818 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(12d8) : 50 ¥¿¡¼¥óËè";
1820 return "frost bolt (12d8) every 50 turns";
1827 return "°ÀÊѹ¹ : 3333 ¥¿¡¼¥óËè";
1829 return "change zokusei every 3333 turns";
1836 return "¥¦¥©¡¼¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 250 ¥¿¡¼¥óËè";
1838 return "water ball (200) every 250 turns";
1845 return "»Í¸ÔƧ¤ß : 100+d100¥¿¡¼¥óËè";
1847 return "shiko every 100+d100 turns";
1854 return "Î䵤¤ÎÂÑÀ : 40+d40¥¿¡¼¥óËè";
1856 return "resist cold every 40+d40 turns";
1863 return "Âý¤ÎÂç·²¾¤´ : 300+d150¥¿¡¼¥óËè";
1865 return "summon octopus every 300+d150 turns";
1871 return "°Å¹õ¤ÎÍò(250) : 150+d150 ¥¿¡¼¥óËè";
1873 return "darkness storm (250) every 150+d150 turns";
1880 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_TSURIZAO))
1883 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
1885 return "fishing : every time";
1890 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_ACID))
1893 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1895 return "resist acid every 50+d50 turns";
1899 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_ELEC))
1902 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1904 return "resist elec every 50+d50 turns";
1908 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_FIRE))
1911 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1913 return "resist fire every 50+d50 turns";
1917 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_COLD))
1920 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1922 return "resist cold every 50+d50 turns";
1926 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_EARTHQUAKE))
1929 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1931 return "earthquake every 100+d100 turns";
1935 if (o_ptr->name2 == EGO_TRUMP)
1938 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
1940 return "teleport every 50+d50 turns";
1945 if (o_ptr->name2 == EGO_LITE_ILLUMINATION)
1948 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1950 return "illumination every 10+d10 turns";
1954 else if (o_ptr->name2 == EGO_EARTHQUAKES)
1957 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1959 return "earthquake every 100+d100 turns";
1964 else if (o_ptr->name2 == EGO_JUMP)
1967 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1969 return "blink every 10+d10 turns";
1974 if (o_ptr->tval == TV_RING)
1978 switch (o_ptr->name2)
1982 return "»Îµ¤¹âÍÈ : 100+d100¥¿¡¼¥óËè";
1984 return "heroism every 100+d100 turns";
1986 case EGO_RING_MAGIC_MIS:
1988 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1990 return "magic missile (2d6) every 2 turns";
1992 case EGO_RING_FIRE_BOLT:
1994 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1996 return "fire bolt (9d8) every 8+d8 turns";
1998 case EGO_RING_COLD_BOLT:
2000 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
2002 return "frost bolt (6d8) every 7+d7 turns";
2004 case EGO_RING_ELEC_BOLT:
2006 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
2008 return "lightning bolt (4d8) every 5+d5 turns";
2010 case EGO_RING_ACID_BOLT:
2012 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
2014 return "acid bolt (5d8) every 6+d6 turns";
2016 case EGO_RING_MANA_BOLT:
2018 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
2020 return "a mana bolt (120) every 120+d120 turns";
2022 case EGO_RING_FIRE_BALL:
2024 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2026 return "fire ball (100) every 80+d80 turns";
2028 case EGO_RING_COLD_BALL:
2030 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2032 return "cold ball (100) every 80+d80 turns";
2034 case EGO_RING_ELEC_BALL:
2036 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2038 return "elec ball (100) every 80+d80 turns";
2040 case EGO_RING_ACID_BALL:
2042 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2044 return "acid ball (100) every 80+d80 turns";
2046 case EGO_RING_MANA_BALL:
2048 return "ËâÎϤÎÍò (250) : 300 ¥¿¡¼¥óËè";
2050 return "mana storm (250) every 300 turns";
2052 case EGO_RING_DRAGON_F:
2053 if (o_ptr->sval == SV_RING_FLAMES)
2055 return "²Ð±ê¤Î¥Ö¥ì¥¹¤È²Ð¤Ø¤ÎÂÑÀ";
2057 return "breath of fire and resist fire";
2061 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2063 return "fire breath (200) every 250 turns";
2065 case EGO_RING_DRAGON_C:
2066 if (o_ptr->sval == SV_RING_ICE)
2068 return "Î䵤¤Î¥Ö¥ì¥¹¤ÈÎ䵤¤Ø¤ÎÂÑÀ";
2070 return "breath of cold and resist cold";
2074 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2076 return "cold breath (200) every 250 turns";
2078 case EGO_RING_M_DETECT:
2080 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃÎ : 150 ¥¿¡¼¥óËè";
2082 return "detect all monsters every 150 turns";
2084 case EGO_RING_D_SPEED:
2086 return "¥¹¥Ô¡¼¥É(15+d30¥¿¡¼¥ó) : 100 ¥¿¡¼¥óËè";
2088 return "haste self (15+d30 turns) every 100 turns";
2090 case EGO_RING_BERSERKER:
2092 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
2094 return "berserk (25+d25 turns) every 75+d75 turns";
2096 case EGO_RING_TELE_AWAY:
2098 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
2100 return "teleport away every 150 turns";
2104 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ";
2106 return "hero, bless, and ultimate resistance";
2110 switch (o_ptr->sval)
2112 case SV_RING_FLAMES:
2114 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤È²Ð¤Ø¤ÎÂÑÀ";
2116 return "ball of fire and resist fire";
2121 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë¤ÈÎ䵤¤Ø¤ÎÂÑÀ";
2123 return "ball of cold and resist cold";
2128 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤È»À¤Ø¤ÎÂÑÀ";
2130 return "ball of acid and resist acid";
2135 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤ÈÅÅ·â¤Ø¤ÎÂÑÀ";
2137 return "ball of elec and resist elec";
2145 if (o_ptr->tval == TV_AMULET)
2149 switch (o_ptr->name2)
2153 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
2155 return "identify every 10 turns";
2160 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
2162 return "charm monster every 200 turns";
2167 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
2169 return "blink every 10+d10 turns";
2172 case EGO_AMU_TELEPORT:
2174 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
2176 return "teleport every 50+d50 turns";
2179 case EGO_AMU_D_DOOR:
2181 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
2183 return "dimension door every 200 turns";
2186 case EGO_AMU_RES_FIRE_:
2188 return "²Ð±ê¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2190 return "resist fire every 50+d50 turns";
2193 case EGO_AMU_RES_COLD_:
2195 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2197 return "resist cold every 50+d50 turns";
2200 case EGO_AMU_RES_ELEC_:
2202 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2204 return "resist elec every 50+d50 turns";
2207 case EGO_AMU_RES_ACID_:
2209 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2211 return "resist acid every 50+d50 turns";
2214 case EGO_AMU_DETECTION:
2216 return "Á´´¶ÃÎ : 55+d55¥¿¡¼¥óËè";
2218 return "detect all floor every 55+d55 turns";
2225 if (o_ptr->tval == TV_WHISTLE)
2228 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
2230 return "call pet every 100+d100 turns";
2234 if (o_ptr->tval == TV_CAPTURE)
2237 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
2239 return "captures or releases a monster.";
2243 /* Require dragon scale mail */
2245 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
2247 if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
2251 /* Branch on the sub-type */
2252 switch (o_ptr->sval)
2254 case SV_DRAGON_BLUE:
2257 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
2259 return "breathe lightning (100) every 150+d150 turns";
2263 case SV_DRAGON_WHITE:
2266 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
2268 return "breathe frost (110) every 150+d150 turns";
2272 case SV_DRAGON_BLACK:
2275 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
2277 return "breathe acid (130) every 150+d150 turns";
2281 case SV_DRAGON_GREEN:
2284 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
2286 return "breathe poison gas (150) every 180+d180 turns";
2293 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2295 return "breathe fire (200) every 200+d200 turns";
2299 case SV_DRAGON_MULTIHUED:
2302 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
2304 return "breathe multi-hued (250) every 200+d200 turns";
2308 case SV_DRAGON_BRONZE:
2311 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
2313 return "breathe confusion (120) every 180+d180 turns";
2317 case SV_DRAGON_GOLD:
2320 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
2322 return "breathe sound (130) every 180+d180 turns";
2326 case SV_DRAGON_CHAOS:
2329 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
2331 return "breathe chaos/disenchant (220) every 200+d200 turns";
2338 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
2340 return "breathe sound/shards (230) every 200+d200 turns";
2344 case SV_DRAGON_BALANCE:
2347 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
2349 return "breathe balance (250) every 200+d200 turns";
2353 case SV_DRAGON_SHINING:
2356 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2358 return "breathe light/darkness (200) every 200+d200 turns";
2362 case SV_DRAGON_POWER:
2365 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
2367 return "breathe the elements (300) every 200+d200 turns";
2377 return "breathe air";
2384 * Describe a "fully identified" item
2386 bool identify_fully_aux(object_type *o_ptr)
2394 char o_name[MAX_NLEN];
2396 /* Extract the flags */
2397 object_flags(o_ptr, &f1, &f2, &f3);
2403 roff_to_buf( a_text + a_info[ o_ptr->name1 ].text ,77-15,temp);
2404 for(j=0;temp[j];j+=1+strlen(&temp[j]))
2405 { info[i]=&temp[j];i++;}
2408 /* Mega-Hack -- describe activation */
2409 if (f3 & (TR3_ACTIVATE))
2412 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
2414 info[i++] = "It can be activated for...";
2417 info[i++] = item_activation(o_ptr);
2419 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
2421 info[i++] = "...if it is being worn.";
2426 /* Figurines, a hack */
2427 if (o_ptr->tval == TV_FIGURINE)
2430 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
2432 info[i++] = "It will transform into a pet when thrown.";
2437 /* Figurines, a hack */
2438 if (o_ptr->name1 == ART_STONEMASK)
2441 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
2443 info[i++] = "It makes you turn into a vampire permanently.";
2448 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
2451 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
2453 info[i++] = "It will attempts to kill a monster instantly.";
2458 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
2461 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
2463 info[i++] = "It strikes yourself sometimes.";
2467 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
2469 info[i++] = "It will always penetrates invulnerability barrier.";
2473 if (o_ptr->name2 == EGO_2WEAPON)
2476 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
2478 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
2483 if (o_ptr->name2 == EGO_RING_WIZARD)
2486 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
2488 info[i++] = "It affects your ability to use magic devices.";
2492 if (o_ptr->name2 == EGO_AMU_FOOL)
2495 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
2497 info[i++] = "It prevents you from using magic items.";
2501 if (o_ptr->name2 == EGO_RING_THROW)
2504 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2506 info[i++] = "It provides great strength when you throw an item.";
2510 if (o_ptr->name2 == EGO_AMU_NAIVETY)
2513 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
2515 info[i++] = "It decreases your magic resistance.";
2519 if (o_ptr->tval == TV_STATUE)
2521 monster_race *r_ptr = &r_info[o_ptr->pval];
2523 if (o_ptr->pval == MON_BULLGATES)
2525 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
2527 info[i++] = "It is shameful.";
2529 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
2531 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
2533 info[i++] = "It is fearful.";
2537 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
2539 info[i++] = "It is cheerful.";
2543 /* Hack -- describe lite's */
2544 if (o_ptr->tval == TV_LITE)
2546 if (o_ptr->name2 == EGO_LITE_DARKNESS)
2549 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
2551 info[i++] = "It provides no light..";
2554 else if (artifact_p(o_ptr))
2557 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2559 info[i++] = "It provides light (radius 3) forever.";
2563 else if (o_ptr->name2 == EGO_LITE_SHINE)
2565 if (o_ptr->sval == SV_LITE_FEANOR)
2568 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2570 info[i++] = "It provides light (radius 3) forever.";
2574 else if (o_ptr->sval == SV_LITE_LANTERN)
2577 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2579 info[i++] = "It provides light (radius 3) when fueled.";
2586 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2588 info[i++] = "It provides light (radius 2) when fueled.";
2595 if (o_ptr->sval == SV_LITE_FEANOR)
2598 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2600 info[i++] = "It provides light (radius 2) forever.";
2604 else if (o_ptr->sval == SV_LITE_LANTERN)
2607 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2609 info[i++] = "It provides light (radius 2) when fueled.";
2616 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
2618 info[i++] = "It provides light (radius 1) when fueled.";
2623 if (o_ptr->name2 == EGO_LITE_LONG)
2626 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
2628 info[i++] = "It provides light for much longer time.";
2634 /* And then describe it fully */
2636 if (f2 & (TR2_RIDING))
2638 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
2640 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
2642 info[i++] = "It is made for riding.";
2646 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
2648 info[i++] = "It is suitable for riding.";
2655 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2657 info[i++] = "It affects your strength.";
2664 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2666 info[i++] = "It affects your intelligence.";
2673 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2675 info[i++] = "It affects your wisdom.";
2682 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2684 info[i++] = "It affects your dexterity.";
2691 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2693 info[i++] = "It affects your constitution.";
2700 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2702 info[i++] = "It affects your charisma.";
2707 if (f1 & (TR1_MAGIC_MASTERY))
2710 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2712 info[i++] = "It affects your ability to use magic devices.";
2716 if (f1 & (TR1_STEALTH))
2719 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2721 info[i++] = "It affects your stealth.";
2725 if (f1 & (TR1_SEARCH))
2728 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2730 info[i++] = "It affects your searching.";
2734 if (f1 & (TR1_INFRA))
2737 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2739 info[i++] = "It affects your infravision.";
2743 if (f1 & (TR1_TUNNEL))
2746 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2748 info[i++] = "It affects your ability to tunnel.";
2752 if (f1 & (TR1_SPEED))
2755 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2757 info[i++] = "It affects your speed.";
2761 if (f1 & (TR1_BLOWS))
2764 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2766 info[i++] = "It affects your attack speed.";
2771 if (f1 & (TR1_BRAND_ACID))
2774 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2776 info[i++] = "It does extra damage from acid.";
2780 if (f1 & (TR1_BRAND_ELEC))
2783 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2785 info[i++] = "It does extra damage from electricity.";
2789 if (f1 & (TR1_BRAND_FIRE))
2792 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2794 info[i++] = "It does extra damage from fire.";
2798 if (f1 & (TR1_BRAND_COLD))
2801 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2803 info[i++] = "It does extra damage from frost.";
2808 if (f1 & (TR1_BRAND_POIS))
2811 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
2813 info[i++] = "It poisons your foes.";
2818 if (f1 & (TR1_CHAOTIC))
2821 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
2823 info[i++] = "It produces chaotic effects.";
2828 if (f1 & (TR1_VAMPIRIC))
2831 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
2833 info[i++] = "It drains life from your foes.";
2838 if (f1 & (TR1_IMPACT))
2841 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
2843 info[i++] = "It can cause earthquakes.";
2848 if (f1 & (TR1_VORPAL))
2851 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2853 info[i++] = "It is very sharp and can cut your foes.";
2858 if (f1 & (TR1_KILL_DRAGON))
2861 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2863 info[i++] = "It is a great bane of dragons.";
2867 else if (f1 & (TR1_SLAY_DRAGON))
2870 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2872 info[i++] = "It is especially deadly against dragons.";
2876 if (f1 & (TR1_SLAY_ORC))
2879 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2881 info[i++] = "It is especially deadly against orcs.";
2885 if (f1 & (TR1_SLAY_TROLL))
2888 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2890 info[i++] = "It is especially deadly against trolls.";
2894 if (f1 & (TR1_SLAY_GIANT))
2896 if (o_ptr->name1 == ART_HRUNTING)
2898 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2900 info[i++] = "It is a great bane of giants.";
2904 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2906 info[i++] = "It is especially deadly against giants.";
2910 if (f1 & (TR1_SLAY_DEMON))
2913 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2915 info[i++] = "It strikes at demons with holy wrath.";
2919 if (f1 & (TR1_SLAY_UNDEAD))
2922 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2924 info[i++] = "It strikes at undead with holy wrath.";
2928 if (f1 & (TR1_SLAY_EVIL))
2931 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
2933 info[i++] = "It fights against evil with holy fury.";
2937 if (f1 & (TR1_SLAY_ANIMAL))
2940 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2942 info[i++] = "It is especially deadly against natural creatures.";
2947 if (f1 & (TR1_FORCE_WEAPON))
2950 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
2952 info[i++] = "It powerfully strikes at a monster using your mana.";
2956 if (f3 & (TR3_DEC_MANA))
2959 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
2961 info[i++] = "It decreases your mana consumption.";
2965 if (f2 & (TR2_SUST_STR))
2968 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
2970 info[i++] = "It sustains your strength.";
2974 if (f2 & (TR2_SUST_INT))
2977 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
2979 info[i++] = "It sustains your intelligence.";
2983 if (f2 & (TR2_SUST_WIS))
2986 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
2988 info[i++] = "It sustains your wisdom.";
2992 if (f2 & (TR2_SUST_DEX))
2995 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
2997 info[i++] = "It sustains your dexterity.";
3001 if (f2 & (TR2_SUST_CON))
3004 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
3006 info[i++] = "It sustains your constitution.";
3010 if (f2 & (TR2_SUST_CHR))
3013 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
3015 info[i++] = "It sustains your charisma.";
3020 if (f2 & (TR2_IM_ACID))
3023 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3025 info[i++] = "It provides immunity to acid.";
3029 if (f2 & (TR2_IM_ELEC))
3032 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3034 info[i++] = "It provides immunity to electricity.";
3038 if (f2 & (TR2_IM_FIRE))
3041 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3043 info[i++] = "It provides immunity to fire.";
3047 if (f2 & (TR2_IM_COLD))
3050 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3052 info[i++] = "It provides immunity to cold.";
3057 if (f2 & (TR2_THROW))
3060 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3062 info[i++] = "It is perfectly balanced for throwing.";
3066 if (f2 & (TR2_FREE_ACT))
3069 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3071 info[i++] = "It provides immunity to paralysis.";
3075 if (f2 & (TR2_HOLD_LIFE))
3078 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
3080 info[i++] = "It provides resistance to life draining.";
3084 if (f2 & (TR2_RES_FEAR))
3087 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3089 info[i++] = "It makes you completely fearless.";
3093 if (f2 & (TR2_RES_ACID))
3096 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3098 info[i++] = "It provides resistance to acid.";
3102 if (f2 & (TR2_RES_ELEC))
3105 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3107 info[i++] = "It provides resistance to electricity.";
3111 if (f2 & (TR2_RES_FIRE))
3114 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3116 info[i++] = "It provides resistance to fire.";
3120 if (f2 & (TR2_RES_COLD))
3123 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3125 info[i++] = "It provides resistance to cold.";
3129 if (f2 & (TR2_RES_POIS))
3132 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3134 info[i++] = "It provides resistance to poison.";
3139 if (f2 & (TR2_RES_LITE))
3142 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3144 info[i++] = "It provides resistance to light.";
3148 if (f2 & (TR2_RES_DARK))
3151 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3153 info[i++] = "It provides resistance to dark.";
3158 if (f2 & (TR2_RES_BLIND))
3161 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3163 info[i++] = "It provides resistance to blindness.";
3167 if (f2 & (TR2_RES_CONF))
3170 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3172 info[i++] = "It provides resistance to confusion.";
3176 if (f2 & (TR2_RES_SOUND))
3179 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3181 info[i++] = "It provides resistance to sound.";
3185 if (f2 & (TR2_RES_SHARDS))
3188 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3190 info[i++] = "It provides resistance to shards.";
3195 if (f2 & (TR2_RES_NETHER))
3198 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3200 info[i++] = "It provides resistance to nether.";
3204 if (f2 & (TR2_RES_NEXUS))
3207 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3209 info[i++] = "It provides resistance to nexus.";
3213 if (f2 & (TR2_RES_CHAOS))
3216 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3218 info[i++] = "It provides resistance to chaos.";
3222 if (f2 & (TR2_RES_DISEN))
3225 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3227 info[i++] = "It provides resistance to disenchantment.";
3232 if (f3 & (TR3_FEATHER))
3235 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3237 info[i++] = "It allows you to levitate.";
3241 if (f3 & (TR3_LITE))
3243 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
3245 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë¡£";
3247 info[i++] = "It decreases radius of your light source.";
3251 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
3253 info[i++] = "It provides permanent light.";
3257 if (f3 & (TR3_SEE_INVIS))
3260 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3262 info[i++] = "It allows you to see invisible monsters.";
3266 if (f3 & (TR3_TELEPATHY))
3269 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
3271 info[i++] = "It gives telepathic powers.";
3275 if (f3 & (TR3_SLOW_DIGEST))
3278 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
3280 info[i++] = "It slows your metabolism.";
3284 if (f3 & (TR3_REGEN))
3287 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
3289 info[i++] = "It speeds your regenerative powers.";
3293 if (f3 & (TR3_WARNING))
3296 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
3298 info[i++] = "It warns you of danger";
3302 if (f2 & (TR2_REFLECT))
3305 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
3307 info[i++] = "It reflects bolts and arrows.";
3311 if (f3 & (TR3_SH_FIRE))
3314 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3316 info[i++] = "It produces a fiery sheath.";
3320 if (f3 & (TR3_SH_ELEC))
3323 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3325 info[i++] = "It produces an electric sheath.";
3329 if (f3 & (TR3_SH_COLD))
3332 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3334 info[i++] = "It produces a coldly sheath.";
3338 if (f3 & (TR3_NO_MAGIC))
3341 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3343 info[i++] = "It produces an anti-magic shell.";
3347 if (f3 & (TR3_NO_TELE))
3350 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
3352 info[i++] = "It prevents teleportation.";
3356 if (f3 & (TR3_XTRA_MIGHT))
3359 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3361 info[i++] = "It fires missiles with extra might.";
3365 if (f3 & (TR3_XTRA_SHOTS))
3368 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3370 info[i++] = "It fires missiles excessively fast.";
3375 if (f3 & (TR3_DRAIN_EXP))
3378 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
3380 info[i++] = "It drains experience.";
3384 if (f3 & (TR3_TELEPORT))
3387 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
3389 info[i++] = "It induces random teleportation.";
3393 if (f3 & TR3_AGGRAVATE)
3396 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
3398 info[i++] = "It aggravates nearby creatures.";
3403 if (f3 & TR3_BLESSED)
3406 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
3408 info[i++] = "It has been blessed by the gods.";
3413 if (cursed_p(o_ptr))
3415 if (f3 & TR3_PERMA_CURSE)
3418 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3420 info[i++] = "It is permanently cursed.";
3424 else if (f3 & TR3_HEAVY_CURSE)
3427 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3429 info[i++] = "It is heavily cursed.";
3436 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
3438 info[i++] = "It is cursed.";
3444 if (f3 & TR3_TY_CURSE)
3447 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
3449 info[i++] = "It carries an ancient foul curse.";
3454 /* XTRA HACK ARTDESC */
3455 flag = TR3_IGNORE_ACID | TR3_IGNORE_ELEC | TR3_IGNORE_FIRE | TR3_IGNORE_COLD ;
3456 if ((f3 & flag) == flag)
3459 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3461 info[i++] = "It cannot be harmed by the elements.";
3464 if (f3 & (TR3_IGNORE_ACID))
3467 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3469 info[i++] = "It cannot be harmed by acid.";
3473 if (f3 & (TR3_IGNORE_ELEC))
3476 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3478 info[i++] = "It cannot be harmed by electricity.";
3482 if (f3 & (TR3_IGNORE_FIRE))
3485 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3487 info[i++] = "It cannot be harmed by fire.";
3491 if (f3 & (TR3_IGNORE_COLD))
3494 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3496 info[i++] = "It cannot be harmed by cold.";
3501 /* XTRA HACK ARTDESC */
3504 /* No special effects */
3505 if (!i) return (FALSE);
3507 /* Save the screen */
3510 /* Display Item name */
3511 object_desc(o_name, o_ptr, TRUE, 3);
3512 prt(format("%s", o_name), 0, 0);
3514 /* Erase the screen */
3515 for (k = 1; k < 24; k++) prt("", k, 13);
3517 /* Label the information */
3518 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
3520 monster_race *r_ptr = &r_info[o_ptr->pval];
3521 int namelen = strlen(r_name + r_ptr->name);
3522 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
3523 c_prt(r_ptr->d_attr, format("%c", r_ptr->d_char), 1, 18+namelen);
3524 prt("'", 1, 19+namelen);
3528 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
3530 prt(" Item Attributes:", 1, 15);
3533 /* We will print on top of the map (column 13) */
3534 for (k = 2, j = 0; j < i; j++)
3537 prt(info[j], k++, 15);
3539 /* Every 20 entries (lines 2 to 21), start over */
3540 if ((k == 22) && (j+1 < i))
3543 prt("-- ³¤¯ --", k, 15);
3545 prt("-- more --", k, 15);
3548 for (; k > 2; k--) prt("", k, 15);
3554 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
3556 prt("[Press any key to continue]", k, 15);
3561 /* Restore the screen */
3564 /* Gave knowledge */
3571 * Convert an inventory index into a one character label
3572 * Note that the label does NOT distinguish inven/equip.
3574 char index_to_label(int i)
3576 /* Indexes for "inven" are easy */
3577 if (i < INVEN_RARM) return (I2A(i));
3579 /* Indexes for "equip" are offset */
3580 return (I2A(i - INVEN_RARM));
3585 * Convert a label into the index of an item in the "inven"
3586 * Return "-1" if the label does not indicate a real item
3588 s16b label_to_inven(int c)
3593 i = (islower(c) ? A2I(c) : -1);
3595 /* Verify the index */
3596 if ((i < 0) || (i > INVEN_PACK)) return (-1);
3598 /* Empty slots can never be chosen */
3599 if (!inventory[i].k_idx) return (-1);
3601 /* Return the index */
3607 * Convert a label into the index of a item in the "equip"
3608 * Return "-1" if the label does not indicate a real item
3610 s16b label_to_equip(int c)
3615 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
3617 /* Verify the index */
3618 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
3620 /* Empty slots can never be chosen */
3621 if (!inventory[i].k_idx) return (-1);
3623 /* Return the index */
3630 * Determine which equipment slot (if any) an item likes
3632 s16b wield_slot(object_type *o_ptr)
3634 /* Slot for equipment */
3635 switch (o_ptr->tval)
3642 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
3643 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
3644 return (INVEN_LARM);
3651 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
3652 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
3653 return (INVEN_RARM);
3663 /* Use the right hand first */
3664 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
3666 /* Use the left hand for swapping (by default) */
3667 return (INVEN_LEFT);
3673 return (INVEN_NECK);
3678 return (INVEN_LITE);
3685 return (INVEN_BODY);
3690 return (INVEN_OUTER);
3696 return (INVEN_HEAD);
3701 return (INVEN_HANDS);
3706 return (INVEN_FEET);
3710 /* No slot available */
3716 * Return a string mentioning how a given item is carried
3718 cptr mention_use(int i)
3722 /* Examine the location */
3726 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê"); break;
3728 case INVEN_RARM: p = "Wielding"; break;
3732 case INVEN_LARM: p = (left_hander ? " ±¦¼ê" : " º¸¼ê"); break;
3734 case INVEN_LARM: p = "On arm"; break;
3738 case INVEN_BOW: p = "¼Í·âÍÑ"; break;
3740 case INVEN_BOW: p = "Shooting"; break;
3744 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
3746 case INVEN_LEFT: p = "On left hand"; break;
3750 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
3752 case INVEN_RIGHT: p = "On right hand"; break;
3756 case INVEN_NECK: p = " ¼ó"; break;
3758 case INVEN_NECK: p = "Around neck"; break;
3762 case INVEN_LITE: p = " ¸÷¸»"; break;
3764 case INVEN_LITE: p = "Light source"; break;
3768 case INVEN_BODY: p = " ÂÎ"; break;
3770 case INVEN_BODY: p = "On body"; break;
3774 case INVEN_OUTER: p = "ÂΤξå"; break;
3776 case INVEN_OUTER: p = "About body"; break;
3780 case INVEN_HEAD: p = " Ƭ"; break;
3782 case INVEN_HEAD: p = "On head"; break;
3786 case INVEN_HANDS: p = " ¼ê"; break;
3788 case INVEN_HANDS: p = "On hands"; break;
3792 case INVEN_FEET: p = " "; break;
3794 case INVEN_FEET: p = "On feet"; break;
3798 default: p = "¥¶¥Ã¥¯"; break;
3800 default: p = "In pack"; break;
3805 /* Hack -- Heavy weapon */
3806 if (i == INVEN_RARM)
3808 if (p_ptr->heavy_wield[0])
3819 /* Hack -- Heavy weapon */
3820 if (i == INVEN_LARM)
3822 if (p_ptr->heavy_wield[1])
3833 /* Hack -- Heavy bow */
3837 o_ptr = &inventory[i];
3838 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
3849 /* Return the result */
3855 * Return a string describing how a given item is being worn.
3856 * Currently, only used for items in the equipment, not inventory.
3858 cptr describe_use(int i)
3865 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
3867 case INVEN_RARM: p = "attacking monsters with"; break;
3871 case INVEN_LARM: p = (left_hander ? " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
3873 case INVEN_LARM: p = "wearing on your arm"; break;
3877 case INVEN_BOW: p = "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
3879 case INVEN_BOW: p = "shooting missiles with"; break;
3883 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3885 case INVEN_LEFT: p = "wearing on your left hand"; break;
3889 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3891 case INVEN_RIGHT: p = "wearing on your right hand"; break;
3895 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
3897 case INVEN_NECK: p = "wearing around your neck"; break;
3901 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
3903 case INVEN_LITE: p = "using to light the way"; break;
3907 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
3909 case INVEN_BODY: p = "wearing on your body"; break;
3913 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
3915 case INVEN_OUTER: p = "wearing on your back"; break;
3919 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
3921 case INVEN_HEAD: p = "wearing on your head"; break;
3925 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
3927 case INVEN_HANDS: p = "wearing on your hands"; break;
3931 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
3933 case INVEN_FEET: p = "wearing on your feet"; break;
3937 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
3939 default: p = "carrying in your pack"; break;
3944 /* Hack -- Heavy weapon */
3945 if (i == INVEN_RARM)
3948 int hold = adj_str_hold[p_ptr->stat_ind[A_STR]];
3950 if (p_ptr->ryoute) hold *= 2;
3951 o_ptr = &inventory[i];
3952 if (hold < o_ptr->weight / 10)
3963 /* Hack -- Heavy bow */
3967 o_ptr = &inventory[i];
3968 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
3971 p = "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î";
3979 /* Return the result */
3984 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
3986 bool check_book_realm(const byte book_tval, const byte book_sval)
3988 if (book_tval < TV_LIFE_BOOK) return FALSE;
3989 if (p_ptr->pclass == CLASS_SORCERER)
3991 return is_magic(tval2realm(book_tval));
3993 else if (p_ptr->pclass == CLASS_RED_MAGE)
3995 if (is_magic(tval2realm(book_tval)))
3996 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
3998 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
4003 * Check an item against the item tester info
4005 bool item_tester_okay(object_type *o_ptr)
4007 /* Hack -- allow listing empty slots */
4008 if (item_tester_full) return (TRUE);
4010 /* Require an item */
4011 if (!o_ptr->k_idx) return (FALSE);
4013 /* Hack -- ignore "gold" */
4014 if (o_ptr->tval == TV_GOLD) return (FALSE);
4016 /* Check the tval */
4017 if (item_tester_tval)
4019 /* Is it a spellbook? If so, we need a hack -- TY */
4020 if ((item_tester_tval <= TV_DEATH_BOOK) &&
4021 (item_tester_tval >= TV_LIFE_BOOK))
4022 return check_book_realm(o_ptr->tval, o_ptr->sval);
4024 if (item_tester_tval != o_ptr->tval) return (FALSE);
4027 /* Check the hook */
4028 if (item_tester_hook)
4030 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
4041 * Choice window "shadow" of the "show_inven()" function
4043 void display_inven(void)
4045 register int i, n, z = 0;
4047 byte attr = TERM_WHITE;
4049 char o_name[MAX_NLEN];
4052 /* Find the "final" slot */
4053 for (i = 0; i < INVEN_PACK; i++)
4055 o_ptr = &inventory[i];
4057 /* Skip non-objects */
4058 if (!o_ptr->k_idx) continue;
4064 /* Display the pack */
4065 for (i = 0; i < z; i++)
4067 /* Examine the item */
4068 o_ptr = &inventory[i];
4070 /* Start with an empty "index" */
4071 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4073 /* Is this item "acceptable"? */
4074 if (item_tester_okay(o_ptr))
4076 /* Prepare an "index" */
4077 tmp_val[0] = index_to_label(i);
4079 /* Bracket the "index" --(-- */
4083 /* Display the index (or blank space) */
4084 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
4086 /* Obtain an item description */
4087 object_desc(o_name, o_ptr, TRUE, 3);
4089 /* Obtain the length of the description */
4093 attr = tval_to_attr[o_ptr->tval % 128];
4095 /* Grey out charging items */
4101 /* Display the entry itself */
4102 Term_putstr(3, i, n, attr, o_name);
4104 /* Erase the rest of the line */
4105 Term_erase(3+n, i, 255);
4107 /* Display the weight if needed */
4108 if (show_weights && o_ptr->weight)
4110 int wgt = o_ptr->weight * o_ptr->number;
4112 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
4114 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4117 Term_putstr(71, i, -1, TERM_WHITE, tmp_val);
4121 /* Erase the rest of the window */
4122 for (i = z; i < Term->hgt; i++)
4124 /* Erase the line */
4125 Term_erase(0, i, 255);
4132 * Choice window "shadow" of the "show_equip()" function
4134 void display_equip(void)
4138 byte attr = TERM_WHITE;
4140 char o_name[MAX_NLEN];
4143 /* Display the equipment */
4144 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
4146 /* Examine the item */
4147 o_ptr = &inventory[i];
4149 /* Start with an empty "index" */
4150 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4152 /* Is this item "acceptable"? */
4153 if (item_tester_okay(o_ptr))
4155 /* Prepare an "index" */
4156 tmp_val[0] = index_to_label(i);
4158 /* Bracket the "index" --(-- */
4162 /* Display the index (or blank space) */
4163 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
4165 /* Obtain an item description */
4166 if ((i == INVEN_LARM) && p_ptr->ryoute)
4169 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
4171 strcpy(o_name, "(wielding with two-hands)");
4177 object_desc(o_name, o_ptr, TRUE, 3);
4178 attr = tval_to_attr[o_ptr->tval % 128];
4181 /* Obtain the length of the description */
4184 /* Grey out charging items */
4190 /* Display the entry itself */
4191 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
4193 /* Erase the rest of the line */
4194 Term_erase(3+n, i - INVEN_RARM, 255);
4196 /* Display the slot description (if needed) */
4199 Term_putstr(61, i - INVEN_RARM, -1, TERM_WHITE, "<--");
4200 Term_putstr(65, i - INVEN_RARM, -1, TERM_WHITE, mention_use(i));
4203 /* Display the weight (if needed) */
4204 if (show_weights && o_ptr->weight)
4206 int wgt = o_ptr->weight * o_ptr->number;
4207 int col = (show_labels ? 52 : 71);
4209 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
4211 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4214 Term_putstr(col, i - INVEN_RARM, -1, TERM_WHITE, tmp_val);
4218 /* Erase the rest of the window */
4219 for (i = INVEN_TOTAL - INVEN_RARM; i < Term->hgt; i++)
4221 /* Clear that line */
4222 Term_erase(0, i, 255);
4232 * Display the inventory.
4234 * Hack -- do not display "trailing" empty slots
4236 int show_inven(int target_item)
4238 int i, j, k, l, z = 0;
4241 char o_name[MAX_NLEN];
4245 char out_desc[23][80];
4246 int target_item_label = 0;
4249 /* Starting column */
4252 /* Default "max-length" */
4255 /* Maximum space allowed for descriptions */
4258 /* Require space for weight (if needed) */
4259 if (show_weights) lim -= 9;
4261 /* Require space for icon */
4262 if (show_item_graph) lim -= 2;
4264 /* Find the "final" slot */
4265 for (i = 0; i < INVEN_PACK; i++)
4267 o_ptr = &inventory[i];
4269 /* Skip non-objects */
4270 if (!o_ptr->k_idx) continue;
4276 /* Display the inventory */
4277 for (k = 0, i = 0; i < z; i++)
4279 o_ptr = &inventory[i];
4281 /* Is this item acceptable? */
4282 if (!item_tester_okay(o_ptr)) continue;
4284 /* Describe the object */
4285 object_desc(o_name, o_ptr, TRUE, 3);
4287 /* Hack -- enforce max length */
4290 /* Save the object index, color, and description */
4292 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4294 /* Grey out charging items */
4297 out_color[k] = TERM_L_DARK;
4300 (void)strcpy(out_desc[k], o_name);
4302 /* Find the predicted "line length" */
4303 l = strlen(out_desc[k]) + 5;
4305 /* Be sure to account for the weight */
4306 if (show_weights) l += 9;
4308 /* Account for icon if displayed */
4309 if (show_item_graph) l += 2;
4311 /* Maintain the maximum length */
4312 if (l > len) len = l;
4314 /* Advance to next "line" */
4318 /* Find the column to start in */
4319 col = (len > 76) ? 0 : (79 - len);
4321 /* Output each entry */
4322 for (j = 0; j < k; j++)
4328 o_ptr = &inventory[i];
4330 /* Clear the line */
4331 prt("", j + 1, col ? col - 2 : col);
4333 if (use_menu && target_item)
4335 if (j == (target_item-1))
4338 strcpy(tmp_val, "¡Õ");
4340 strcpy(tmp_val, "> ");
4342 target_item_label = i;
4344 else strcpy(tmp_val, " ");
4347 /* Prepare an index --(-- */
4348 sprintf(tmp_val, "%c)", index_to_label(i));
4350 /* Clear the line with the (possibly indented) index */
4351 put_str(tmp_val, j + 1, col);
4353 /* Display graphics for object, if desired */
4354 if (show_item_graph)
4356 byte a = object_attr(o_ptr);
4357 char c = object_char(o_ptr);
4360 if (a & 0x80) a |= 0x40;
4363 Term_draw(col + 3, j + 1, a, c);
4367 /* Display the entry itself */
4368 c_put_str(out_color[j], out_desc[j], j + 1, show_item_graph ? (col + 5) : (col + 3));
4370 /* Display the weight if needed */
4373 int wgt = o_ptr->weight * o_ptr->number;
4375 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4377 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4380 put_str(tmp_val, j + 1, 71);
4384 /* Make a "shadow" below the list (only if needed) */
4385 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4387 /* Save the new column */
4390 return target_item_label;
4396 * Display the equipment.
4398 int show_equip(int target_item)
4404 char o_name[MAX_NLEN];
4407 char out_desc[23][80];
4408 int target_item_label = 0;
4411 /* Starting column */
4414 /* Maximal length */
4417 /* Maximum space allowed for descriptions */
4420 /* Require space for labels (if needed) */
4422 if (show_labels) lim -= (7 + 2);
4424 if (show_labels) lim -= (14 + 2);
4428 /* Require space for weight (if needed) */
4430 if (show_weights) lim -= 10;
4432 if (show_weights) lim -= 9;
4436 if (show_item_graph) lim -= 2;
4438 /* Scan the equipment list */
4439 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
4441 o_ptr = &inventory[i];
4443 /* Is this item acceptable? */
4444 if (!item_tester_okay(o_ptr) && (!((i == INVEN_LARM) && p_ptr->ryoute) || item_tester_no_ryoute)) continue;
4447 object_desc(o_name, o_ptr, TRUE, 3);
4449 /* Truncate the description */
4452 if ((i == INVEN_LARM) && p_ptr->ryoute)
4455 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
4457 (void)strcpy(out_desc[k],"(wielding with two-hands)");
4463 (void)strcpy(out_desc[k], o_name);
4464 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4468 /* Grey out charging items */
4471 out_color[k] = TERM_L_DARK;
4474 /* Extract the maximal length (see below) */
4476 l = strlen(out_desc[k]) + (2 + 1);
4478 l = strlen(out_desc[k]) + (2 + 3);
4482 /* Increase length for labels (if needed) */
4484 if (show_labels) l += (7 + 2);
4486 if (show_labels) l += (14 + 2);
4490 /* Increase length for weight (if needed) */
4491 if (show_weights) l += 9;
4493 if (show_item_graph) l += 2;
4495 /* Maintain the max-length */
4496 if (l > len) len = l;
4498 /* Advance the entry */
4502 /* Hack -- Find a column to start in */
4504 col = (len > 74) ? 0 : (79 - len);
4506 col = (len > 76) ? 0 : (79 - len);
4510 /* Output each entry */
4511 for (j = 0; j < k; j++)
4517 o_ptr = &inventory[i];
4519 /* Clear the line */
4520 prt("", j + 1, col ? col - 2 : col);
4522 if (use_menu && target_item)
4524 if (j == (target_item-1))
4527 strcpy(tmp_val, "¡Õ");
4529 strcpy(tmp_val, "> ");
4531 target_item_label = i;
4533 else strcpy(tmp_val, " ");
4536 /* Prepare an index --(-- */
4537 sprintf(tmp_val, "%c)", index_to_label(i));
4539 /* Clear the line with the (possibly indented) index */
4540 put_str(tmp_val, j+1, col);
4542 if (show_item_graph)
4544 byte a = object_attr(o_ptr);
4545 char c = object_char(o_ptr);
4548 if (a & 0x80) a |= 0x40;
4551 Term_draw(col + 3, j + 1, a, c);
4557 /* Mention the use */
4559 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
4561 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
4564 put_str(tmp_val, j+1, show_item_graph ? col + 5 : col + 3);
4566 /* Display the entry itself */
4568 c_put_str(out_color[j], out_desc[j], j+1, show_item_graph ? col + 14 : col + 12);
4570 c_put_str(out_color[j], out_desc[j], j+1, show_item_graph ? col + 21 : col + 19);
4578 /* Display the entry itself */
4579 c_put_str(out_color[j], out_desc[j], j+1, show_item_graph ? col + 5 : col + 3);
4582 /* Display the weight if needed */
4585 int wgt = o_ptr->weight * o_ptr->number;
4587 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4589 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
4592 put_str(tmp_val, j+1, 71);
4596 /* Make a "shadow" below the list (only if needed) */
4597 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4599 /* Save the new column */
4602 return target_item_label;
4609 * Flip "inven" and "equip" in any sub-windows
4611 void toggle_inven_equip(void)
4616 for (j = 0; j < 8; j++)
4619 if (!angband_term[j]) continue;
4621 /* Flip inven to equip */
4622 if (window_flag[j] & (PW_INVEN))
4625 window_flag[j] &= ~(PW_INVEN);
4626 window_flag[j] |= (PW_EQUIP);
4629 p_ptr->window |= (PW_EQUIP);
4632 /* Flip inven to equip */
4633 else if (window_flag[j] & (PW_EQUIP))
4636 window_flag[j] &= ~(PW_EQUIP);
4637 window_flag[j] |= (PW_INVEN);
4640 p_ptr->window |= (PW_INVEN);
4648 * Verify the choice of an item.
4650 * The item can be negative to mean "item on floor".
4652 static bool verify(cptr prompt, int item)
4654 char o_name[MAX_NLEN];
4655 char out_val[MAX_NLEN+20];
4662 o_ptr = &inventory[item];
4668 o_ptr = &o_list[0 - item];
4672 object_desc(o_name, o_ptr, TRUE, 3);
4676 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
4678 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
4683 return (get_check(out_val));
4688 * Hack -- allow user to "prevent" certain choices
4690 * The item can be negative to mean "item on floor".
4692 static bool get_item_allow(int item)
4701 o_ptr = &inventory[item];
4707 o_ptr = &o_list[0 - item];
4710 /* No inscription */
4711 if (!o_ptr->inscription) return (TRUE);
4714 s = strchr(quark_str(o_ptr->inscription), '!');
4716 /* Process preventions */
4719 /* Check the "restriction" */
4720 if ((s[1] == command_cmd) || (s[1] == '*'))
4722 /* Verify the choice */
4724 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
4726 if (!verify("Really try", item)) return (FALSE);
4731 /* Find another '!' */
4732 s = strchr(s + 1, '!');
4742 * Auxiliary function for "get_item()" -- test an index
4744 static bool get_item_okay(int i)
4747 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
4749 /* Verify the item */
4750 if (!item_tester_okay(&inventory[i])) return (FALSE);
4759 * Find the "first" inventory object with the given "tag".
4761 * A "tag" is a char "n" appearing as "@n" anywhere in the
4762 * inscription of an object.
4764 * Also, the tag "@xn" will work as well, where "n" is a tag-char,
4765 * and "x" is the "current" command_cmd code.
4767 static int get_tag(int *cp, char tag)
4772 /* Check every object */
4773 for (i = 0; i < INVEN_TOTAL; ++i)
4775 object_type *o_ptr = &inventory[i];
4777 /* Skip non-objects */
4778 if (!o_ptr->k_idx) continue;
4780 /* Skip empty inscriptions */
4781 if (!o_ptr->inscription) continue;
4783 /* Skip non-choice */
4784 if (!item_tester_okay(o_ptr)) continue;
4787 s = strchr(quark_str(o_ptr->inscription), '@');
4789 /* Process all tags */
4792 /* Check the special tags */
4793 if ((s[1] == command_cmd) && (s[2] == tag))
4795 /* Save the actual inventory ID */
4802 /* Find another '@' */
4803 s = strchr(s + 1, '@');
4807 /* Check every object */
4808 for (i = 0; i < INVEN_TOTAL; ++i)
4810 object_type *o_ptr = &inventory[i];
4812 /* Skip non-objects */
4813 if (!o_ptr->k_idx) continue;
4815 /* Skip empty inscriptions */
4816 if (!o_ptr->inscription) continue;
4818 /* Skip non-choice */
4819 if (!item_tester_okay(o_ptr)) continue;
4822 s = strchr(quark_str(o_ptr->inscription), '@');
4824 /* Process all tags */
4827 /* Check the normal tags */
4828 if (s[1] == tag && !((s[2] >= '0' && s[2] <= '9') || (s[2] >= 'a' && s[2] <= 'z') || (s[2] >= 'A' && s[2] <= 'Z')))
4830 /* Save the actual inventory ID */
4837 /* Find another '@' */
4838 s = strchr(s + 1, '@');
4847 * Determine whether get_item() can get some item or not
4848 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
4850 bool can_get_item(void)
4852 int j, floor_list[23], floor_num = 0;
4854 for (j = 0; j < INVEN_TOTAL; j++)
4855 if (item_tester_okay(&inventory[j]))
4858 (void)scan_floor(floor_list, &floor_num, py, px, 0x01);
4866 * Let the user select an item, save its "index"
4868 * Return TRUE only if an acceptable item was chosen by the user.
4870 * The selected item must satisfy the "item_tester_hook()" function,
4871 * if that hook is set, and the "item_tester_tval", if that value is set.
4873 * All "item_tester" restrictions are cleared before this function returns.
4875 * The user is allowed to choose acceptable items from the equipment,
4876 * inventory, or floor, respectively, if the proper flag was given,
4877 * and there are any acceptable items in that location.
4879 * The equipment or inventory are displayed (even if no acceptable
4880 * items are in that location) if the proper flag was given.
4882 * If there are no acceptable items available anywhere, and "str" is
4883 * not NULL, then it will be used as the text of a warning message
4884 * before the function returns.
4886 * Note that the user must press "-" to specify the item on the floor,
4887 * and there is no way to "examine" the item on the floor, while the
4888 * use of "capital" letters will "examine" an inventory/equipment item,
4889 * and prompt for its use.
4891 * If a legal item is selected from the inventory, we save it in "cp"
4892 * directly (0 to 35), and return TRUE.
4894 * If a legal item is selected from the floor, we save it in "cp" as
4895 * a negative (-1 to -511), and return TRUE.
4897 * If no item is available, we do nothing to "cp", and we display a
4898 * warning message, using "str" if available, and return FALSE.
4900 * If no item is selected, we do nothing to "cp", and return FALSE.
4902 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
4903 * to allow the user to enter a command while viewing those screens, and
4904 * also to induce "auto-enter" of stores, and other such stuff.
4906 * Global "p_ptr->command_see" may be set before calling this function to start
4907 * out in "browse" mode. It is cleared before this function returns.
4909 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
4910 * If it is TRUE then we are viewing inventory, else equipment.
4912 * We always erase the prompt when we are done, leaving a blank line,
4913 * or a warning message, if appropriate, if no items are available.
4915 bool get_item(int *cp, cptr pmt, cptr str, int mode)
4917 s16b this_o_idx, next_o_idx = 0;
4919 char n1, n2, which = ' ';
4921 int j, k, i1, i2, e1, e2;
4931 bool allow_floor = FALSE;
4933 bool toggle = FALSE;
4939 extern bool select_spellbook;
4940 extern bool select_the_force;
4942 int menu_line = (use_menu ? 1 : 0);
4946 #ifdef ALLOW_EASY_FLOOR /* TNB */
4948 if (easy_floor) return get_item_floor(cp, pmt, str, mode);
4950 #endif /* ALLOW_EASY_FLOOR -- TNB */
4954 /* Get the item index */
4955 if (repeat_pull(cp))
4957 if (*cp == 1111) { /* the_force */
4958 item_tester_tval = 0;
4959 item_tester_hook = NULL;
4970 /* Acquire object */
4973 /* Validate the item */
4974 if (item_tester_okay(o_ptr))
4976 /* Forget the item_tester_tval restriction */
4977 item_tester_tval = 0;
4979 /* Forget the item_tester_hook restriction */
4980 item_tester_hook = NULL;
4987 /* Verify the item */
4988 else if (get_item_okay(*cp))
4990 /* Forget the item_tester_tval restriction */
4991 item_tester_tval = 0;
4993 /* Forget the item_tester_hook restriction */
4994 item_tester_hook = NULL;
5001 #endif /* ALLOW_REPEAT */
5004 if (mode & (USE_EQUIP)) equip = TRUE;
5005 if (mode & (USE_INVEN)) inven = TRUE;
5006 if (mode & (USE_FLOOR)) floor = TRUE;
5009 /* Paranoia XXX XXX XXX */
5016 /* No item selected */
5020 /* Full inventory */
5022 i2 = INVEN_PACK - 1;
5024 /* Forbid inventory */
5025 if (!inven) i2 = -1;
5028 for (j = 0; j < INVEN_PACK; j++)
5029 if (item_tester_okay(&inventory[j])) max_inven++;
5032 /* Restrict inventory indexes */
5033 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5034 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5037 /* Full equipment */
5039 e2 = INVEN_TOTAL - 1;
5041 /* Forbid equipment */
5042 if (!equip) e2 = -1;
5045 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5046 if (item_tester_okay(&inventory[j])) max_equip++;
5047 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5050 /* Restrict equipment indexes */
5051 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5052 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5056 /* Restrict floor usage */
5059 /* Scan all objects in the grid */
5060 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5064 /* Acquire object */
5065 o_ptr = &o_list[this_o_idx];
5067 /* Acquire next object */
5068 next_o_idx = o_ptr->next_o_idx;
5070 /* Accept the item on the floor if legal */
5071 if (item_tester_okay(o_ptr)) allow_floor = TRUE;
5076 /* Require at least one legal choice */
5077 if (!allow_floor && (i1 > i2) && (e1 > e2))
5079 /* Cancel p_ptr->command_see */
5080 command_see = FALSE;
5088 if (select_the_force) {
5094 /* Analyze choices */
5097 /* Hack -- Start on equipment if requested */
5098 if (command_see && command_wrk && equip)
5104 /* Use inventory if allowed */
5107 command_wrk = FALSE;
5110 /* Use equipment if allowed */
5116 /* Use inventory for floor */
5119 command_wrk = FALSE;
5125 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5127 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5129 /* Hack -- start out in "display" mode */
5137 /* Repeat until done */
5140 int get_item_label = 0;
5149 for (j = 0; j < 8; j++)
5152 if (!angband_term[j]) continue;
5154 /* Count windows displaying inven */
5155 if (window_flag[j] & (PW_INVEN)) ni++;
5157 /* Count windows displaying equip */
5158 if (window_flag[j] & (PW_EQUIP)) ne++;
5161 /* Toggle if needed */
5162 if ((command_wrk && ni && !ne) ||
5163 (!command_wrk && !ni && ne))
5166 toggle_inven_equip();
5173 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5175 /* Redraw windows */
5179 /* Inventory screen */
5182 /* Extract the legal requests */
5186 /* Redraw if needed */
5187 if (command_see) get_item_label = show_inven(menu_line);
5190 /* Equipment screen */
5193 /* Extract the legal requests */
5194 n1 = I2A(e1 - INVEN_RARM);
5195 n2 = I2A(e2 - INVEN_RARM);
5197 /* Redraw if needed */
5198 if (command_see) get_item_label = show_equip(menu_line);
5201 /* Viewing inventory */
5204 /* Begin the prompt */
5206 sprintf(out_val, "»ý¤Áʪ:");
5208 sprintf(out_val, "Inven:");
5212 /* Some legal items */
5213 if ((i1 <= i2) && !use_menu)
5215 /* Build the prompt */
5217 sprintf(tmp_val, "%c-%c,",
5219 sprintf(tmp_val, " %c-%c,",
5222 index_to_label(i1), index_to_label(i2));
5225 strcat(out_val, tmp_val);
5228 /* Indicate ability to "view" */
5230 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5232 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5238 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
5239 else if (select_the_force)
5240 strcat(out_val, " 'w'Îýµ¤½Ñ,");
5242 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
5243 else if (select_the_force)
5244 strcat(out_val, " w for the Force,");
5249 /* Viewing equipment */
5252 /* Begin the prompt */
5254 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5256 sprintf(out_val, "Equip:");
5260 /* Some legal items */
5261 if ((e1 <= e2) && !use_menu)
5263 /* Build the prompt */
5265 sprintf(tmp_val, "%c-%c,",
5267 sprintf(tmp_val, " %c-%c,",
5270 index_to_label(e1), index_to_label(e2));
5273 strcat(out_val, tmp_val);
5276 /* Indicate ability to "view" */
5278 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5280 if (!command_see) strcat(out_val, " * to see,");
5286 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
5288 if (inven) strcat(out_val, " / for Inven,");
5293 /* Indicate legality of the "floor" item */
5295 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
5297 if (allow_floor) strcat(out_val, " - for floor,");
5301 /* Finish the prompt */
5302 strcat(out_val, " ESC");
5304 /* Build the prompt */
5305 sprintf(tmp_val, "(%s) %s", out_val, pmt);
5307 /* Show the prompt */
5316 int max_line = (command_wrk ? max_equip : max_inven);
5332 menu_line += (max_line - 1);
5351 /* Verify legality */
5352 if (!inven || !equip)
5358 /* Hack -- Fix screen */
5368 /* Switch inven/equip */
5369 command_wrk = !command_wrk;
5370 max_line = (command_wrk ? max_equip : max_inven);
5371 if (menu_line > max_line) menu_line = max_line;
5373 /* Need to redraw */
5382 /* Validate the item */
5383 if (!get_item_okay(get_item_label))
5389 /* Allow player to "refuse" certain actions */
5390 if (!get_item_allow(get_item_label))
5396 /* Accept that choice */
5397 (*cp) = get_item_label;
5404 if (select_the_force) {
5412 if (menu_line > max_line) menu_line -= max_line;
5433 command_see = FALSE;
5453 /* Verify legality */
5454 if (!inven || !equip)
5460 /* Hack -- Fix screen */
5470 /* Switch inven/equip */
5471 command_wrk = !command_wrk;
5473 /* Need to redraw */
5479 /* Use floor item */
5482 /* Scan all objects in the grid */
5483 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5487 /* Acquire object */
5488 o_ptr = &o_list[this_o_idx];
5490 /* Acquire next object */
5491 next_o_idx = o_ptr->next_o_idx;
5493 /* Validate the item */
5494 if (!item_tester_okay(o_ptr)) continue;
5499 /* Verify the item (if required) */
5501 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
5503 if (other_query_flag && !verify("Try", k)) continue;
5507 /* Allow player to "refuse" certain actions */
5508 if (!get_item_allow(k)) continue;
5510 /* Accept that choice */
5527 case '1': case '2': case '3':
5528 case '4': case '5': case '6':
5529 case '7': case '8': case '9':
5531 /* Look up the tag */
5532 if (!get_tag(&k, which))
5538 /* Hack -- Validate the item */
5539 if ((k < INVEN_RARM) ? !inven : !equip)
5545 /* Validate the item */
5546 if (!get_item_okay(k))
5552 /* Allow player to "refuse" certain actions */
5553 if (!get_item_allow(k))
5559 /* Accept that choice */
5571 /* Choose "default" inventory item */
5574 k = ((i1 == i2) ? i1 : -1);
5577 /* Choose "default" equipment item */
5580 k = ((e1 == e2) ? e1 : -1);
5583 /* Validate the item */
5584 if (!get_item_okay(k))
5590 /* Allow player to "refuse" certain actions */
5591 if (!get_item_allow(k))
5597 /* Accept that choice */
5606 if (select_the_force) {
5618 if(select_spellbook){
5619 bool not_found = FALSE;
5620 /* Look up the tag */
5621 if (!get_tag(&k, which))
5626 /* Hack -- Validate the item */
5627 if ((k < INVEN_RARM) ? !inven : !equip)
5632 /* Validate the item */
5633 if (!get_item_okay(k))
5639 /* Accept that choice */
5647 /* Extract "query" setting */
5648 ver = isupper(which);
5649 which = tolower(which);
5651 /* Convert letter to inventory index */
5654 k = label_to_inven(which);
5657 /* Convert letter to equipment index */
5660 k = label_to_equip(which);
5663 /* Validate the item */
5664 if (!get_item_okay(k))
5670 /* Verify the item */
5672 if (ver && !verify("ËÜÅö¤Ë", k))
5674 if (ver && !verify("Try", k))
5682 /* Allow player to "refuse" certain actions */
5683 if (!get_item_allow(k))
5689 /* Accept that choice */
5700 /* Fix the screen if necessary */
5706 /* Hack -- Cancel "display" */
5707 command_see = FALSE;
5711 /* Forget the item_tester_tval restriction */
5712 item_tester_tval = 0;
5714 item_tester_no_ryoute = FALSE;
5716 /* Forget the item_tester_hook restriction */
5717 item_tester_hook = NULL;
5723 /* Toggle again if needed */
5724 if (toggle) toggle_inven_equip();
5727 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5734 /* Clear the prompt line */
5737 /* Warning if needed */
5738 if (oops && str) msg_print(str);
5741 if (item) repeat_push(*cp);
5742 #endif /* ALLOW_REPEAT */
5749 #ifdef ALLOW_EASY_FLOOR
5754 * Return a list of o_list[] indexes of items at the given cave
5755 * location. Valid flags are:
5757 * mode & 0x01 -- Item tester
5758 * mode & 0x02 -- Marked items only
5759 * mode & 0x04 -- Stop after first
5761 bool scan_floor(int *items, int *item_num, int y, int x, int mode)
5763 int this_o_idx, next_o_idx;
5770 if (!in_bounds(y, x)) return (FALSE);
5772 /* Scan all objects in the grid */
5773 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
5777 /* Acquire object */
5778 o_ptr = &o_list[this_o_idx];
5780 /* Acquire next object */
5781 next_o_idx = o_ptr->next_o_idx;
5784 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
5787 if ((mode & 0x02) && !o_ptr->marked) continue;
5789 /* Accept this item */
5790 items[num++] = this_o_idx;
5793 if (mode & 0x04) break;
5795 /* XXX Hack -- Enforce limit */
5796 if (num == 23) break;
5799 /* Number of items */
5807 * Display a list of the items on the floor at the given location.
5809 int show_floor(int target_item, int y, int x)
5816 char o_name[MAX_NLEN];
5822 char out_desc[23][80];
5823 int target_item_label = 0;
5825 int floor_list[23], floor_num;
5827 /* Default length */
5830 /* Maximum space allowed for descriptions */
5833 /* Require space for weight (if needed) */
5834 if (show_weights) lim -= 9;
5836 /* Scan for objects in the grid, using item_tester_okay() */
5837 (void) scan_floor(floor_list, &floor_num, y, x, 0x01);
5839 /* Display the inventory */
5840 for (k = 0, i = 0; i < floor_num; i++)
5842 o_ptr = &o_list[floor_list[i]];
5844 /* Describe the object */
5845 object_desc(o_name, o_ptr, TRUE, 3);
5847 /* Hack -- enforce max length */
5850 /* Save the index */
5853 /* Acquire inventory color */
5854 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
5856 /* Save the object description */
5857 strcpy(out_desc[k], o_name);
5859 /* Find the predicted "line length" */
5860 l = strlen(out_desc[k]) + 5;
5862 /* Be sure to account for the weight */
5863 if (show_weights) l += 9;
5865 /* Maintain the maximum length */
5866 if (l > len) len = l;
5868 /* Advance to next "line" */
5872 /* Find the column to start in */
5873 col = (len > 76) ? 0 : (79 - len);
5875 /* Output each entry */
5876 for (j = 0; j < k; j++)
5879 i = floor_list[out_index[j]];
5884 /* Clear the line */
5885 prt("", j + 1, col ? col - 2 : col);
5887 if (use_menu && target_item)
5889 if (j == (target_item-1))
5892 strcpy(tmp_val, "¡Õ");
5894 strcpy(tmp_val, "> ");
5896 target_item_label = i;
5898 else strcpy(tmp_val, " ");
5901 /* Prepare an index --(-- */
5902 sprintf(tmp_val, "%c)", index_to_label(j));
5904 /* Clear the line with the (possibly indented) index */
5905 put_str(tmp_val, j + 1, col);
5907 /* Display the entry itself */
5908 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
5910 /* Display the weight if needed */
5913 int wgt = o_ptr->weight * o_ptr->number;
5915 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5917 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
5920 put_str(tmp_val, j + 1, 71);
5924 /* Make a "shadow" below the list (only if needed) */
5925 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5927 return target_item_label;
5931 * This version of get_item() is called by get_item() when
5932 * the easy_floor is on.
5934 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
5936 char n1 = ' ', n2 = ' ', which = ' ';
5938 int j, k, i1, i2, e1, e2;
5948 bool allow_equip = FALSE;
5949 bool allow_inven = FALSE;
5950 bool allow_floor = FALSE;
5952 bool toggle = FALSE;
5957 int floor_num, floor_list[23], floor_top = 0;
5959 extern bool select_spellbook;
5960 extern bool select_the_force;
5962 int menu_line = (use_menu ? 1 : 0);
5968 /* Get the item index */
5969 if (repeat_pull(cp))
5971 if (*cp == 1111) { /* the_force */
5972 item_tester_tval = 0;
5973 item_tester_hook = NULL;
5984 /* Acquire object */
5987 /* Validate the item */
5988 if (item_tester_okay(o_ptr))
5990 /* Forget the item_tester_tval restriction */
5991 item_tester_tval = 0;
5993 /* Forget the item_tester_hook restriction */
5994 item_tester_hook = NULL;
6001 /* Verify the item */
6002 else if (get_item_okay(*cp))
6004 /* Forget the item_tester_tval restriction */
6005 item_tester_tval = 0;
6007 /* Forget the item_tester_hook restriction */
6008 item_tester_hook = NULL;
6015 #endif /* ALLOW_REPEAT */
6018 if (mode & (USE_EQUIP)) equip = TRUE;
6019 if (mode & (USE_INVEN)) inven = TRUE;
6020 if (mode & (USE_FLOOR)) floor = TRUE;
6023 /* Paranoia XXX XXX XXX */
6030 /* No item selected */
6034 /* Full inventory */
6036 i2 = INVEN_PACK - 1;
6038 /* Forbid inventory */
6039 if (!inven) i2 = -1;
6042 for (j = 0; j < INVEN_PACK; j++)
6043 if (item_tester_okay(&inventory[j])) max_inven++;
6046 /* Restrict inventory indexes */
6047 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
6048 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
6051 /* Full equipment */
6053 e2 = INVEN_TOTAL - 1;
6055 /* Forbid equipment */
6056 if (!equip) e2 = -1;
6059 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
6060 if (item_tester_okay(&inventory[j])) max_equip++;
6061 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
6064 /* Restrict equipment indexes */
6065 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
6066 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
6069 /* Count "okay" floor items */
6072 /* Restrict floor usage */
6075 /* Scan all objects in the grid */
6076 (void) scan_floor(floor_list, &floor_num, py, px, 0x01);
6079 /* Accept inventory */
6080 if (i1 <= i2) allow_inven = TRUE;
6082 /* Accept equipment */
6083 if (e1 <= e2) allow_equip = TRUE;
6086 if (floor_num) allow_floor = TRUE;
6088 /* Require at least one legal choice */
6089 if (!allow_inven && !allow_equip && !allow_floor)
6091 /* Cancel p_ptr->command_see */
6092 command_see = FALSE;
6100 if (select_the_force) {
6106 /* Analyze choices */
6109 /* Hack -- Start on equipment if requested */
6110 if (command_see && (command_wrk == (USE_EQUIP))
6113 command_wrk = (USE_EQUIP);
6116 /* Use inventory if allowed */
6117 else if (allow_inven)
6119 command_wrk = (USE_INVEN);
6122 /* Use equipment if allowed */
6123 else if (allow_equip)
6125 command_wrk = (USE_EQUIP);
6128 /* Use floor if allowed */
6129 else if (allow_floor)
6131 command_wrk = (USE_FLOOR);
6136 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
6138 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
6140 /* Hack -- start out in "display" mode */
6147 /* Repeat until done */
6150 int get_item_label = 0;
6159 for (j = 0; j < 8; j++)
6162 if (!angband_term[j]) continue;
6164 /* Count windows displaying inven */
6165 if (window_flag[j] & (PW_INVEN)) ni++;
6167 /* Count windows displaying equip */
6168 if (window_flag[j] & (PW_EQUIP)) ne++;
6171 /* Toggle if needed */
6172 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
6173 (command_wrk == (USE_INVEN) && !ni && ne))
6176 toggle_inven_equip();
6183 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6185 /* Redraw windows */
6189 /* Inventory screen */
6190 if (command_wrk == (USE_INVEN))
6192 /* Extract the legal requests */
6196 /* Redraw if needed */
6197 if (command_see) get_item_label = show_inven(menu_line);
6200 /* Equipment screen */
6201 else if (command_wrk == (USE_EQUIP))
6203 /* Extract the legal requests */
6204 n1 = I2A(e1 - INVEN_RARM);
6205 n2 = I2A(e2 - INVEN_RARM);
6207 /* Redraw if needed */
6208 if (command_see) get_item_label = show_equip(menu_line);
6212 else if (command_wrk == (USE_FLOOR))
6215 k = MIN(floor_top + 23, floor_num) - 1;
6217 /* Extract the legal requests */
6218 n1 = I2A(j - floor_top);
6219 n2 = I2A(k - floor_top);
6221 /* Redraw if needed */
6222 if (command_see) get_item_label = show_floor(menu_line, py, px);
6225 /* Viewing inventory */
6226 if (command_wrk == (USE_INVEN))
6228 /* Begin the prompt */
6230 sprintf(out_val, "»ý¤Áʪ:");
6232 sprintf(out_val, "Inven:");
6237 /* Build the prompt */
6239 sprintf(tmp_val, "%c-%c,",
6241 sprintf(tmp_val, " %c-%c,",
6244 index_to_label(i1), index_to_label(i2));
6247 strcat(out_val, tmp_val);
6250 /* Indicate ability to "view" */
6252 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6254 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6265 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
6267 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6269 else strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
6271 else if (select_the_force)
6272 strcat(out_val, " 'w'Îýµ¤½Ñ,");
6279 strcat(out_val, " 6 for Equip,");
6281 strcat(out_val, " 4 or 6 for Equip,");
6283 else strcat(out_val, " / for Equip,");
6285 else if (select_the_force)
6286 strcat(out_val, " w for the Force,");
6296 strcat(out_val, " '4' ¾²¾å,");
6298 strcat(out_val, " '4'or'6' ¾²¾å,");
6300 else strcat(out_val, " '-'¾²¾å,");
6303 if (allow_floor) strcat(out_val, " - for floor,");
6308 /* Viewing equipment */
6309 else if (command_wrk == (USE_EQUIP))
6311 /* Begin the prompt */
6313 sprintf(out_val, "ÁõÈ÷ÉÊ:");
6315 sprintf(out_val, "Equip:");
6321 /* Build the prompt */
6323 sprintf(tmp_val, "%c-%c,",
6325 sprintf(tmp_val, " %c-%c,",
6328 index_to_label(e1), index_to_label(e2));
6331 strcat(out_val, tmp_val);
6334 /* Indicate ability to "view" */
6336 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6338 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6349 strcat(out_val, " '4' »ý¤Áʪ,");
6351 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6353 else strcat(out_val, " '/' »ý¤Áʪ,");
6356 if (allow_inven) strcat(out_val, " / for Inven,");
6367 strcat(out_val, " '6' ¾²¾å,");
6369 strcat(out_val, " '4'or'6' ¾²¾å,");
6371 else strcat(out_val, " '-'¾²¾å,");
6374 if (allow_floor) strcat(out_val, " - for floor,");
6380 else if (command_wrk == (USE_FLOOR))
6382 /* Begin the prompt */
6384 sprintf(out_val, "¾²¾å:");
6386 sprintf(out_val, "Floor:");
6392 /* Build the prompt */
6394 sprintf(tmp_val, "%c-%c,", n1, n2);
6396 sprintf(tmp_val, " %c-%c,", n1, n2);
6401 strcat(out_val, tmp_val);
6404 /* Indicate ability to "view" */
6406 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6408 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6414 if (allow_inven && allow_equip)
6417 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
6419 strcat(out_val, " / for Inven,");
6423 else if (allow_inven)
6426 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6428 strcat(out_val, " / for Inven,");
6432 else if (allow_equip)
6435 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6437 strcat(out_val, " / for Equip,");
6443 else if (allow_inven)
6446 strcat(out_val, " '/' »ý¤Áʪ,");
6448 strcat(out_val, " / for Inven,");
6452 else if (allow_equip)
6455 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6457 strcat(out_val, " / for Equip,");
6463 /* Finish the prompt */
6464 strcat(out_val, " ESC");
6466 /* Build the prompt */
6467 sprintf(tmp_val, "(%s) %s", out_val, pmt);
6469 /* Show the prompt */
6478 if (command_wrk == USE_INVEN) max_line = max_inven;
6479 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6480 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6496 menu_line += (max_line - 1);
6512 /* Verify legality */
6513 if (command_wrk == (USE_INVEN))
6515 if (allow_floor) command_wrk = USE_FLOOR;
6516 else if (allow_equip) command_wrk = USE_EQUIP;
6523 else if (command_wrk == (USE_EQUIP))
6525 if (allow_inven) command_wrk = USE_INVEN;
6526 else if (allow_floor) command_wrk = USE_FLOOR;
6533 else if (command_wrk == (USE_FLOOR))
6535 if (allow_equip) command_wrk = USE_EQUIP;
6536 else if (allow_inven) command_wrk = USE_INVEN;
6549 /* Hack -- Fix screen */
6559 /* Switch inven/equip */
6560 if (command_wrk == USE_INVEN) max_line = max_inven;
6561 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6562 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6563 if (menu_line > max_line) menu_line = max_line;
6565 /* Need to redraw */
6573 /* Verify legality */
6574 if (command_wrk == (USE_INVEN))
6576 if (allow_equip) command_wrk = USE_EQUIP;
6577 else if (allow_floor) command_wrk = USE_FLOOR;
6584 else if (command_wrk == (USE_EQUIP))
6586 if (allow_floor) command_wrk = USE_FLOOR;
6587 else if (allow_inven) command_wrk = USE_INVEN;
6594 else if (command_wrk == (USE_FLOOR))
6596 if (allow_inven) command_wrk = USE_INVEN;
6597 else if (allow_equip) command_wrk = USE_EQUIP;
6610 /* Hack -- Fix screen */
6620 /* Switch inven/equip */
6621 if (command_wrk == USE_INVEN) max_line = max_inven;
6622 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6623 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6624 if (menu_line > max_line) menu_line = max_line;
6626 /* Need to redraw */
6634 /* Validate the item */
6635 if (!get_item_okay(get_item_label))
6641 /* Allow player to "refuse" certain actions */
6642 if (!get_item_allow(get_item_label))
6648 /* Accept that choice */
6649 (*cp) = get_item_label;
6656 if (select_the_force) {
6664 if (menu_line > max_line) menu_line -= max_line;
6685 command_see = FALSE;
6705 if (command_wrk == (USE_INVEN))
6712 command_wrk = (USE_EQUIP);
6714 else if (command_wrk == (USE_EQUIP))
6721 command_wrk = (USE_INVEN);
6723 else if (command_wrk == (USE_FLOOR))
6727 command_wrk = (USE_INVEN);
6729 else if (allow_equip)
6731 command_wrk = (USE_EQUIP);
6740 /* Hack -- Fix screen */
6750 /* Need to redraw */
6763 * If we are already examining the floor, and there
6764 * is only one item, we will always select it.
6765 * If we aren't examining the floor and there is only
6766 * one item, we will select it if floor_query_flag
6771 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
6774 k = 0 - floor_list[0];
6776 /* Allow player to "refuse" certain actions */
6777 if (!get_item_allow(k))
6783 /* Accept that choice */
6792 /* Hack -- Fix screen */
6802 command_wrk = (USE_FLOOR);
6808 case '1': case '2': case '3':
6809 case '4': case '5': case '6':
6810 case '7': case '8': case '9':
6812 /* Look up the tag */
6813 if (!get_tag(&k, which))
6819 /* Hack -- Validate the item */
6820 if ((k < INVEN_RARM) ? !inven : !equip)
6826 /* Validate the item */
6827 if (!get_item_okay(k))
6833 /* Allow player to "refuse" certain actions */
6834 if (!get_item_allow(k))
6840 /* Accept that choice */
6852 /* Choose "default" inventory item */
6853 if (command_wrk == (USE_INVEN))
6855 k = ((i1 == i2) ? i1 : -1);
6858 /* Choose "default" equipment item */
6859 else if (command_wrk == (USE_EQUIP))
6861 k = ((e1 == e2) ? e1 : -1);
6864 /* Choose "default" floor item */
6865 else if (command_wrk == (USE_FLOOR))
6870 k = 0 - floor_list[0];
6872 /* Allow player to "refuse" certain actions */
6873 if (!get_item_allow(k))
6879 /* Accept that choice */
6887 /* Validate the item */
6888 if (!get_item_okay(k))
6894 /* Allow player to "refuse" certain actions */
6895 if (!get_item_allow(k))
6901 /* Accept that choice */
6910 if (select_the_force) {
6922 if(select_spellbook){
6923 bool not_found = FALSE;
6924 /* Look up the tag */
6925 if (!get_tag(&k, which))
6930 /* Hack -- Validate the item */
6931 if ((k < INVEN_RARM) ? !inven : !equip)
6936 /* Validate the item */
6937 if (!get_item_okay(k))
6943 /* Accept that choice */
6951 /* Extract "query" setting */
6952 ver = isupper(which);
6953 which = tolower(which);
6955 /* Convert letter to inventory index */
6956 if (command_wrk == (USE_INVEN))
6958 k = label_to_inven(which);
6961 /* Convert letter to equipment index */
6962 else if (command_wrk == (USE_EQUIP))
6964 k = label_to_equip(which);
6967 /* Convert letter to floor index */
6968 else if (command_wrk == USE_FLOOR)
6970 k = islower(which) ? A2I(which) : -1;
6971 if (k < 0 || k >= floor_num)
6978 k = 0 - floor_list[k];
6981 /* Validate the item */
6982 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
6988 /* Verify the item */
6990 if (ver && !verify("ËÜÅö¤Ë", k))
6992 if (ver && !verify("Try", k))
7000 /* Allow player to "refuse" certain actions */
7001 if (!get_item_allow(k))
7007 /* Accept that choice */
7017 /* Fix the screen if necessary */
7023 /* Hack -- Cancel "display" */
7024 command_see = FALSE;
7028 /* Forget the item_tester_tval restriction */
7029 item_tester_tval = 0;
7031 /* Forget the item_tester_hook restriction */
7032 item_tester_hook = NULL;
7038 /* Toggle again if needed */
7039 if (toggle) toggle_inven_equip();
7042 p_ptr->window |= (PW_INVEN | PW_EQUIP);
7049 /* Clear the prompt line */
7052 /* Warning if needed */
7053 if (oops && str) msg_print(str);
7056 if (item) repeat_push(*cp);
7057 #endif /* ALLOW_REPEAT */
7064 bool py_pickup_floor_aux(void)
7074 /* Restrict the choices */
7075 item_tester_hook = inven_carry_okay;
7079 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
7080 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
7082 q = "Get which item? ";
7083 s = "You no longer have any room for the objects on the floor.";
7086 if (get_item(&item, q, s, (USE_FLOOR)))
7088 this_o_idx = 0 - item;
7095 /* Access the object */
7096 o_ptr = &o_list[this_o_idx];
7098 /* Pick up the object */
7099 py_pickup_aux(this_o_idx);
7106 * Make the player carry everything in a grid
7108 * If "pickup" is FALSE then only gold will be picked up
7110 * This is called by py_pickup() when easy_floor is TRUE.
7112 void py_pickup_floor(int pickup)
7114 s16b this_o_idx, next_o_idx = 0;
7116 char o_name[MAX_NLEN];
7119 int floor_num = 0, floor_list[23], floor_o_idx = 0;
7123 /* Scan the pile of objects */
7124 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
7128 /* Access the object */
7129 o_ptr = &o_list[this_o_idx];
7131 /* Describe the object */
7132 object_desc(o_name, o_ptr, TRUE, 3);
7134 /* Access the next object */
7135 next_o_idx = o_ptr->next_o_idx;
7137 /* Hack -- disturb */
7141 if (o_ptr->tval == TV_GOLD)
7145 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
7146 (long)o_ptr->pval, o_name);
7148 msg_format("You have found %ld gold pieces worth of %s.",
7149 (long) o_ptr->pval, o_name);
7153 /* Collect the gold */
7154 p_ptr->au += o_ptr->pval;
7157 p_ptr->redraw |= (PR_GOLD);
7160 p_ptr->window |= (PW_PLAYER);
7162 /* Delete the gold */
7163 delete_object_idx(this_o_idx);
7165 /* Check the next object */
7169 /* Count non-gold objects that can be picked up. */
7170 if (inven_carry_okay(o_ptr))
7175 /* Remember this object index */
7176 floor_list[floor_num] = this_o_idx;
7178 /* Count non-gold objects */
7181 if (floor_num == 23) break;
7183 /* Remember this index */
7184 floor_o_idx = this_o_idx;
7187 /* There are no non-gold objects */
7191 /* Mention the number of objects */
7197 /* Access the object */
7198 o_ptr = &o_list[floor_o_idx];
7200 #ifdef ALLOW_EASY_SENSE
7202 /* Option: Make object sensing easy */
7205 /* Sense the object */
7206 (void) sense_object(o_ptr);
7209 #endif /* ALLOW_EASY_SENSE */
7211 /* Describe the object */
7212 object_desc(o_name, o_ptr, TRUE, 3);
7216 msg_format("%s¤¬¤¢¤ë¡£", o_name);
7218 msg_format("You see %s.", o_name);
7223 /* Multiple objects */
7228 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
7230 msg_format("You see a pile of %d items.", floor_num);
7239 /* The player has no room for anything on the floor. */
7245 /* Access the object */
7246 o_ptr = &o_list[floor_o_idx];
7248 #ifdef ALLOW_EASY_SENSE
7250 /* Option: Make object sensing easy */
7253 /* Sense the object */
7254 (void) sense_object(o_ptr);
7257 #endif /* ALLOW_EASY_SENSE */
7259 /* Describe the object */
7260 object_desc(o_name, o_ptr, TRUE, 3);
7264 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7266 msg_format("You have no room for %s.", o_name);
7271 /* Multiple objects */
7276 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7278 msg_print("You have no room for any of the objects on the floor.");
7290 /* Hack -- query every object */
7291 if (carry_query_flag)
7293 char out_val[MAX_NLEN+20];
7295 /* Access the object */
7296 o_ptr = &o_list[floor_o_idx];
7298 #ifdef ALLOW_EASY_SENSE
7300 /* Option: Make object sensing easy */
7303 /* Sense the object */
7304 (void) sense_object(o_ptr);
7307 #endif /* ALLOW_EASY_SENSE */
7309 /* Describe the object */
7310 object_desc(o_name, o_ptr, TRUE, 3);
7312 /* Build a prompt */
7314 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7316 (void) sprintf(out_val, "Pick up %s? ", o_name);
7320 /* Ask the user to confirm */
7321 if (!get_check(out_val))
7328 /* Access the object */
7329 o_ptr = &o_list[floor_o_idx];
7331 #ifdef ALLOW_EASY_SENSE
7333 /* Option: Make object sensing easy */
7336 /* Sense the object */
7337 (void) sense_object(o_ptr);
7340 #endif /* ALLOW_EASY_SENSE */
7342 /* Pick up the object */
7343 py_pickup_aux(floor_o_idx);
7346 /* Allow the user to choose an object */
7349 while (can_pickup--)
7351 if (!py_pickup_floor_aux()) break;
7356 #endif /* ALLOW_EASY_FLOOR */