3 /* Purpose: Object code, part 1 */
6 * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke
8 * This software may be copied and distributed for educational, research, and
9 * not for profit purposes provided that this copyright and statement are
10 * included in all such copies.
21 * Reset the "visual" lists
23 * This involves resetting various things to their "default" state.
25 * If the "prefs" flag is TRUE, then we will also load the appropriate
26 * "user pref file" based on the current setting of the "use_graphics"
27 * flag. This is useful for switching "graphics" on/off.
29 * The features, objects, and monsters, should all be encoded in the
30 * relevant "font.pref" and/or "graf.prf" files. XXX XXX XXX
32 * The "prefs" parameter is no longer meaningful. XXX XXX XXX
34 void reset_visuals(void)
38 /* Extract some info about terrain features */
39 for (i = 0; i < max_f_idx; i++)
41 feature_type *f_ptr = &f_info[i];
43 /* Assume we will use the underlying values */
44 f_ptr->x_attr = f_ptr->d_attr;
45 f_ptr->x_char = f_ptr->d_char;
48 /* Extract default attr/char code for objects */
49 for (i = 0; i < max_k_idx; i++)
51 object_kind *k_ptr = &k_info[i];
53 /* Default attr/char */
54 k_ptr->x_attr = k_ptr->d_attr;
55 k_ptr->x_char = k_ptr->d_char;
58 /* Extract default attr/char code for monsters */
59 for (i = 0; i < max_r_idx; i++)
61 monster_race *r_ptr = &r_info[i];
63 /* Default attr/char */
64 r_ptr->x_attr = r_ptr->d_attr;
65 r_ptr->x_char = r_ptr->d_char;
72 /* Process "graf.prf" */
73 process_pref_file("graf.prf");
75 /* Access the "character" pref file */
76 sprintf(buf, "graf-%s.prf", player_base);
78 /* Process "graf-<playername>.prf" */
79 process_pref_file(buf);
87 /* Process "font.prf" */
88 process_pref_file("font.prf");
90 /* Access the "character" pref file */
91 sprintf(buf, "font-%s.prf", player_base);
93 /* Process "font-<playername>.prf" */
94 process_pref_file(buf);
100 * Obtain the "flags" for an item
102 void object_flags(object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3)
104 object_kind *k_ptr = &k_info[o_ptr->k_idx];
107 (*f1) = k_ptr->flags1;
108 (*f2) = k_ptr->flags2;
109 (*f3) = k_ptr->flags3;
114 artifact_type *a_ptr = &a_info[o_ptr->name1];
116 (*f1) = a_ptr->flags1;
117 (*f2) = a_ptr->flags2;
118 (*f3) = a_ptr->flags3;
119 if (!cursed_p(o_ptr))
121 (*f3) &= ~(TR3_HEAVY_CURSE | TR3_CURSED);
128 ego_item_type *e_ptr = &e_info[o_ptr->name2];
130 (*f1) |= e_ptr->flags1;
131 (*f2) |= e_ptr->flags2;
132 (*f3) |= e_ptr->flags3;
134 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
136 (*f3) &= ~(TR3_SH_FIRE);
138 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
140 (*f1) &= ~(TR1_INFRA);
142 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
144 (*f2) &= ~(TR2_RES_BLIND);
145 (*f3) &= ~(TR3_SEE_INVIS);
149 /* Random artifact ! */
150 if (o_ptr->art_flags1 || o_ptr->art_flags2 || o_ptr->art_flags3)
152 (*f1) |= o_ptr->art_flags1;
153 (*f2) |= o_ptr->art_flags2;
154 (*f3) |= o_ptr->art_flags3;
157 if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
159 if (o_ptr->xtra3 < 33)
161 (*f1) |= (0x00000001 << (o_ptr->xtra3-1));
163 else if (o_ptr->xtra3 < 65)
165 (*f2) |= (0x00000001 << (o_ptr->xtra3-33));
167 else if (o_ptr->xtra3 < 97)
169 (*f3) |= (0x00000001 << (o_ptr->xtra3-65));
171 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ACID)
173 (*f2) |= TR2_RES_ACID;
175 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ELEC)
177 (*f2) |= TR2_RES_ELEC;
179 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_FIRE)
181 (*f2) |= TR2_RES_FIRE;
183 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_COLD)
185 (*f2) |= TR2_RES_COLD;
187 else if (o_ptr->xtra3 == ESSENCE_SH_FIRE)
189 (*f2) |= TR2_RES_FIRE;
190 (*f3) |= TR3_SH_FIRE;
192 else if (o_ptr->xtra3 == ESSENCE_SH_ELEC)
194 (*f2) |= TR2_RES_ELEC;
195 (*f3) |= TR3_SH_ELEC;
197 else if (o_ptr->xtra3 == ESSENCE_SH_COLD)
199 (*f2) |= TR2_RES_COLD;
200 (*f3) |= TR3_SH_COLD;
202 else if (o_ptr->xtra3 == ESSENCE_RESISTANCE)
204 (*f2) |= (TR2_RES_ACID | TR2_RES_ELEC | TR2_RES_FIRE | TR2_RES_COLD);;
212 * Obtain the "flags" for an item which are known to the player
214 void object_flags_known(object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3)
218 object_kind *k_ptr = &k_info[o_ptr->k_idx];
221 (*f1) = (*f2) = (*f3) = 0L;
223 if (!object_aware_p(o_ptr)) return;
226 (*f1) = k_ptr->flags1;
227 (*f2) = k_ptr->flags2;
228 (*f3) = k_ptr->flags3;
230 /* Must be identified */
231 if (!object_known_p(o_ptr)) return;
233 /* Ego-item (known basic flags) */
236 ego_item_type *e_ptr = &e_info[o_ptr->name2];
238 (*f1) |= e_ptr->flags1;
239 (*f2) |= e_ptr->flags2;
240 (*f3) |= e_ptr->flags3;
242 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
244 (*f3) &= ~(TR3_SH_FIRE);
246 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
248 (*f1) &= ~(TR1_INFRA);
250 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
252 (*f2) &= ~(TR2_RES_BLIND);
253 (*f3) &= ~(TR3_SEE_INVIS);
258 #ifdef SPOIL_ARTIFACTS
259 /* Full knowledge for some artifacts */
260 if (artifact_p(o_ptr) || o_ptr->art_name) spoil = TRUE;
261 #endif /* SPOIL_ARTIFACTS */
263 #ifdef SPOIL_EGO_ITEMS
264 /* Full knowledge for some ego-items */
265 if (ego_item_p(o_ptr)) spoil = TRUE;
266 #endif /* SPOIL_EGO_ITEMS */
268 /* Need full knowledge or spoilers */
269 if (spoil || (o_ptr->ident & IDENT_MENTAL))
274 artifact_type *a_ptr = &a_info[o_ptr->name1];
276 (*f1) = a_ptr->flags1;
277 (*f2) = a_ptr->flags2;
278 (*f3) = a_ptr->flags3;
280 if (!cursed_p(o_ptr))
282 (*f3) &= ~(TR3_HEAVY_CURSE | TR3_CURSED);
286 /* Random artifact ! */
287 if (o_ptr->art_flags1 || o_ptr->art_flags2 || o_ptr->art_flags3)
289 (*f1) |= o_ptr->art_flags1;
290 (*f2) |= o_ptr->art_flags2;
291 (*f3) |= o_ptr->art_flags3;
295 if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
297 if (o_ptr->xtra3 < 33)
299 (*f1) |= (0x00000001 << (o_ptr->xtra3-1));
301 else if (o_ptr->xtra3 < 65)
303 (*f2) |= (0x00000001 << (o_ptr->xtra3-33));
305 else if (o_ptr->xtra3 < 97)
307 (*f3) |= (0x00000001 << (o_ptr->xtra3-65));
309 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ACID)
311 (*f2) |= TR2_RES_ACID;
313 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ELEC)
315 (*f2) |= TR2_RES_ELEC;
317 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_FIRE)
319 (*f2) |= TR2_RES_FIRE;
321 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_COLD)
323 (*f2) |= TR2_RES_COLD;
325 else if (o_ptr->xtra3 == ESSENCE_SH_FIRE)
327 (*f2) |= TR2_RES_FIRE;
328 (*f3) |= TR3_SH_FIRE;
330 else if (o_ptr->xtra3 == ESSENCE_SH_ELEC)
332 (*f2) |= TR2_RES_ELEC;
333 (*f3) |= TR3_SH_ELEC;
335 else if (o_ptr->xtra3 == ESSENCE_SH_COLD)
337 (*f2) |= TR2_RES_COLD;
338 (*f3) |= TR3_SH_COLD;
340 else if (o_ptr->xtra3 == ESSENCE_RESISTANCE)
342 (*f2) |= (TR2_RES_ACID | TR2_RES_ELEC | TR2_RES_FIRE | TR2_RES_COLD);;
348 if (o_ptr->art_flags3 & TR3_CURSED)
349 (*f3) |= (TR3_CURSED);
350 if (o_ptr->art_flags3 & TR3_HEAVY_CURSE)
351 (*f3) |= (TR3_HEAVY_CURSE);
357 * Hack -- describe an item currently in a store's inventory
358 * This allows an item to *look* like the player is "aware" of it
360 void object_desc_store(char *buf, object_type *o_ptr, int pref, int mode)
362 /* Save the "aware" flag */
363 bool hack_aware = object_aware_p(o_ptr);
365 /* Save the "known" flag */
366 bool hack_known = (o_ptr->ident & (IDENT_KNOWN)) ? TRUE : FALSE;
369 /* Set the "known" flag */
370 o_ptr->ident |= (IDENT_KNOWN);
372 /* Force "aware" for description */
373 k_info[o_ptr->k_idx].aware = TRUE;
376 /* Describe the object */
377 object_desc(buf, o_ptr, pref, mode);
380 /* Restore "aware" flag */
381 k_info[o_ptr->k_idx].aware = hack_aware;
383 /* Clear the known flag */
384 if (!hack_known) o_ptr->ident &= ~(IDENT_KNOWN);
391 * Determine the "Activation" (if any) for an artifact
392 * Return a string, or NULL for "no activation"
394 cptr item_activation(object_type *o_ptr)
398 /* Extract the flags */
399 object_flags(o_ptr, &f1, &f2, &f3);
401 /* Require activation ability */
403 if (!(f3 & (TR3_ACTIVATE))) return ("¤Ê¤·");
405 if (!(f3 & (TR3_ACTIVATE))) return ("nothing");
411 * We need to deduce somehow that it is a random artifact -- one
412 * problem: It could be a random artifact which has NOT YET received
413 * a name. Thus we eliminate other possibilities instead of checking
417 if (!(o_ptr->name1) &&
422 switch (o_ptr->xtra2)
427 return "ÂÀÍÛ¸÷Àþ : 10 ¥¿¡¼¥óËè";
429 return "beam of sunlight every 10 turns";
436 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
438 return "magic missile (2d6) every 2 turns";
445 return "°½±À (12), Ⱦ·Â 3 , 4+d4 ¥¿¡¼¥óËè";
447 return "stinking cloud (12), rad. 3, every 4+d4 turns";
454 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
456 return "lightning bolt (4d8) every 5+d5 turns";
463 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
465 return "acid bolt (5d8) every 6+d6 turns";
472 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
474 return "frost bolt (6d8) every 7+d7 turns";
481 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
483 return "fire bolt (9d8) every 8+d8 turns";
490 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (48) : 400 ¥¿¡¼¥óËè";
492 return "ball of cold (48) every 400 turns";
499 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (72) : 400 ¥¿¡¼¥óËè";
501 return "ball of fire (72) every 400 turns";
508 return "¥Ò¥Ã¥È¥Ý¥¤¥ó¥ÈµÛ¼ý (100) : 100+d100 ¥¿¡¼¥óËè";
510 return "drain life (100) every 100+d100 turns";
517 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 300 ¥¿¡¼¥óËè";
519 return "ball of cold (100) every 300 turns";
526 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 500 ¥¿¡¼¥óËè";
528 return "ball of lightning (100) every 500 turns";
535 return "¥Ò¥Ã¥È¥Ý¥¤¥ó¥ÈµÛ¼ý(120) : 400 ¥¿¡¼¥óËè";
537 return "drain life (120) every 400 turns";
544 return "µÛ·ì¥É¥ì¥¤¥ó (3*50) : 400 ¥¿¡¼¥óËè";
546 return "vampiric drain (3*50) every 400 turns";
553 return "Ìð (150) : 90+d90 ¥¿¡¼¥óËè";
555 return "arrows (150) every 90+d90 turns";
562 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (120) : 225+d225 ¥¿¡¼¥óËè";
564 return "fire ball (120) every 225+d225 turns";
571 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (200) : 325+d325 ¥¿¡¼¥óËè";
573 return "ball of cold (200) every 325+d325 turns";
580 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (250) : 425+d425 ¥¿¡¼¥óËè";
582 return "ball of lightning (250) every 425+d425 turns";
589 return "¥«¥Þ¥¤¥¿¥Á : 250 ¥¿¡¼¥óËè";
591 return "whirlwind attack every 250 turns";
598 return "µÛ·ì¥É¥ì¥¤¥ó (3*100) : 400 ¥¿¡¼¥óËè";
600 return "vampiric drain (3*100) every 400 turns";
607 return "call chaos : 350 ¥¿¡¼¥óËè"; /*nuke me*/
609 return "call chaos every 350 turns";
616 return "¥í¥±¥Ã¥È (120+level) : 400 ¥¿¡¼¥óËè";
618 return "launch rocket (120+level) every 400 turns";
625 return "¼Ù°Â໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
627 return "dispel evil (level*5) every 300+d300 turns";
634 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300) : 500 ¥¿¡¼¥óËè";
636 return "elemental breath (300) every 500 turns";
643 return "Á±ÎÉÂ໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
645 return "dispel good (level*5) every 300+d300 turns";
652 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
654 return "confuse monster every 15 turns";
661 return "¼þ°Ï¤Î¥â¥ó¥¹¥¿¡¼¤ò̲¤é¤»¤ë : 55 ¥¿¡¼¥óËè";
663 return "sleep nearby monsters every 55 turns";
670 return "ÃÏ¿Ì (Ⱦ·Â 10) : 50 ¥¿¡¼¥óËè";
672 return "earthquake (rad 10) every 50 turns";
679 return "¶²¹² : 3 * (level+10) ¥¿¡¼¥óËè";
681 return "terror every 3 * (level+10) turns";
688 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
690 return "teleport away every 200 turns";
694 case ACT_BANISH_EVIL:
697 return "¼Ù°¾ÃÌÇ : 250+d250 ¥¿¡¼¥óËè";
699 return "banish evil every 250+d250 turns";
706 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
708 return "genocide every 500 turns";
715 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
717 return "mass genocide every 1000 turns";
721 case ACT_CHARM_ANIMAL:
724 return "ưʪ̥λ : 300 ¥¿¡¼¥óËè";
726 return "charm animal every 300 turns";
730 case ACT_CHARM_UNDEAD:
733 return "ÉԻཾ° : 333 ¥¿¡¼¥óËè";
735 return "enslave undead every 333 turns";
739 case ACT_CHARM_OTHER:
742 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 400 ¥¿¡¼¥óËè";
744 return "charm monster every 400 turns";
748 case ACT_CHARM_ANIMALS:
751 return "ưʪͧÏ : 500 ¥¿¡¼¥óËè";
753 return "animal friendship every 500 turns";
757 case ACT_CHARM_OTHERS:
760 return "¼þÊÕ̥λ : 750 ¥¿¡¼¥óËè";
762 return "mass charm every 750 turns";
766 case ACT_SUMMON_ANIMAL:
769 return "ưʪ¾¤´ : 200+d300 ¥¿¡¼¥óËè";
771 return "summon animal every 200+d300 turns";
775 case ACT_SUMMON_PHANTOM:
778 return "»È¤¤Î´ : 200+d200 ¥¿¡¼¥óËè";
780 return "summon phantasmal servant every 200+d200 turns";
784 case ACT_SUMMON_ELEMENTAL:
787 return "¥¨¥ì¥á¥ó¥¿¥ë¾¤´ : 750 ¥¿¡¼¥óËè";
789 return "summon elemental every 750 turns";
793 case ACT_SUMMON_DEMON:
796 return "°Ë⾤´ : 666+d333 ¥¿¡¼¥óËè";
798 return "summon demon every 666+d333 turns";
802 case ACT_SUMMON_UNDEAD:
805 return "ÉԻྤ´ : 666+d333 ¥¿¡¼¥óËè";
807 return "summon undead every 666+d333 turns";
814 return "ͦµ¤²óÉü & 30 hp ²óÉü : 10 ¥¿¡¼¥óËè";
816 return "remove fear & heal 30 hp every 10 turns";
823 return "4d8 hp & ½ý²óÉü : 3+d3 ¥¿¡¼¥óËè";
825 return "heal 4d8 & wounds every 3+d3 turns";
829 case ACT_CURE_POISON:
832 return "ͦµ¤²óÉü/ÆǾä· : 5 ¥¿¡¼¥óËè";
834 return "remove fear and cure poison every 5 turns";
841 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
843 return "restore life levels every 450 turns";
850 return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃͲóÉü : 750 ¥¿¡¼¥óËè";
852 return "restore stats and life levels every 750 turns";
859 return "700 hp ²óÉü : 250 ¥¿¡¼¥óËè";
861 return "heal 700 hit points every 250 turns";
868 return "1000 hp ²óÉü : 888 ¥¿¡¼¥óËè";
870 return "heal 1000 hit points every 888 turns";
877 return "°ì»þŪ¤Ê ESP (´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
879 return "temporary ESP (dur 25+d30) every 200 turns";
886 return "»Îµ¤¹âÍȤȽËÊ¡ (´ü´Ö 50+d50) : 100+d100 ¥¿¡¼¥óËè";
888 return "heroism and blessed (dur 50+d50) every 100+d100 turns";
895 return "Âмٰ·ë³¦ (´ü´Ö level*3 + d25) : 225+d225 ¥¿¡¼¥óËè";
897 return "protect evil (dur level*3 + d25) every 225+d225 turns";
904 return "±êÎä»ÀÅÅÆǤؤÎÂÑÀ (´ü´Ö 40+d40) : 200 ¥¿¡¼¥óËè";
906 return "resist elements (dur 40+d40) every 200 turns";
913 return "²Ã® (´ü´Ö 20+d20) : 250 ¥¿¡¼¥óËè";
915 return "speed (dur 20+d20) every 250 turns";
922 return "²Ã® (´ü´Ö 75+d75) : 200+d200 ¥¿¡¼¥óËè";
924 return "speed (dur 75+d75) every 200+d200 turns";
931 return "¥ì¥¤¥¹²½ (level/2 + d(level/2)) : 1000 ¥¿¡¼¥óËè";
933 return "wraith form (level/2 + d(level/2)) every 1000 turns";
940 return "̵Ũ (´ü´Ö 8+d8) : 1000 ¥¿¡¼¥óËè";
942 return "invulnerability (dur 8+d8) every 1000 turns";
949 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) : 10+d10 ¥¿¡¼¥óËè";
951 return "light area (dam 2d15) every 10+d10 turns";
958 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) & ¼þÊÕ¥Þ¥Ã¥× : 50+d50 ¥¿¡¼¥óËè";
960 return "light (dam 2d15) & map area every 50+d50 turns";
967 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
969 return "detection every 55+d55 turns";
973 case ACT_DETECT_XTRA:
976 return "Á´´¶ÃΡ¢Ãµº÷¡¢*´ÕÄê* : 1000 ¥¿¡¼¥óËè";
978 return "detection, probing and identify true every 1000 turns";
985 return "*´ÕÄê* : 750 ¥¿¡¼¥óËè";
987 return "identify true every 750 turns";
994 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
996 return "identify spell every 10 turns";
1000 case ACT_RUNE_EXPLO:
1003 return "Çúȯ¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
1005 return "explosive rune every 200 turns";
1012 return "¼é¤ê¤Î¥ë¡¼¥ó : 400 ¥¿¡¼¥óËè";
1014 return "rune of protection every 400 turns";
1021 return "¶õÊ¢½¼Â : 200 ¥¿¡¼¥óËè";
1023 return "satisfy hunger every 200 turns";
1030 return "¥É¥¢Ç˲õ : 10 ¥¿¡¼¥óËè";
1032 return "destroy doors every 10 turns";
1039 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
1041 return "stone to mud every 5 turns";
1048 return "ºÆ½¼Å¶ : 70 ¥¿¡¼¥óËè";
1050 return "recharging every 70 turns";
1057 return "Ï£¶â½Ñ : 500 ¥¿¡¼¥óËè";
1059 return "alchemy every 500 turns";
1066 return "¼¡¸µ¤ÎÈâ : 100 ¥¿¡¼¥óËè";
1068 return "dimension door every 100 turns";
1075 return "¥Æ¥ì¥Ý¡¼¥È (range 100) : 45 ¥¿¡¼¥óËè";
1077 return "teleport (range 100) every 45 turns";
1084 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1086 return "word of recall every 200 turns";
1095 return "something undefined";
1102 /* Some artifacts can be activated */
1103 switch (o_ptr->name1)
1108 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1110 return "fire bolt (9d8) every 8+d8 turns";
1117 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1119 return "frost bolt (6d8) every 7+d7 turns";
1126 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1128 return "lightning bolt (4d8) every 6+d6 turns";
1135 return "°½±À(12) : 4+d4 ¥¿¡¼¥óËè";
1137 return "stinking cloud (12) every 4+d4 turns";
1144 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(48) : 5+d5 ¥¿¡¼¥óËè";
1146 return "frost ball (48) every 5+d5 turns";
1153 return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
1155 return "remove fear and cure poison every 5 turns";
1162 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(100) : 200 ¥¿¡¼¥óËè";
1164 return "frost ball (100) every 200 turns";
1171 return "¶Ç¤Î»ÕÃľ¤´ : 500+d500 ¥¿¡¼¥óËè";
1173 return "summon the Legion of the Dawn every 500+d500 turns";
1180 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 400 ¥¿¡¼¥óËè";
1182 return "fire ball (72) every 400 turns";
1189 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 100 ¥¿¡¼¥óËè";
1191 return "large fire ball (72) every 100 turns";
1198 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(120) : 15 ¥¿¡¼¥óËè";
1200 return "large fire ball (120) every 15 turns";
1207 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 200 ¥¿¡¼¥óËè";
1209 return "haste self (20+d20 turns) every 200 turns";
1216 return "À¸Ì¿Îϵۼý(120) : 400 ¥¿¡¼¥óËè";
1218 return "drain life (120) every 400 turns";
1225 return "À¸Ì¿Îϵۼý(90) : 70 ¥¿¡¼¥óËè";
1227 return "drain life (90) every 70 turns";
1234 return "¥É¥¢/¥È¥é¥Ã¥×Ê´ºÕ : 10 ¥¿¡¼¥óËè";
1236 return "door and trap destruction every 10 turns";
1244 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1246 return "word of recall every 200 turns";
1253 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1255 return "haste self (20+d20 turns) every 100+d100 turns";
1262 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
1264 return "identify every 10 turns";
1271 return "õº÷¡¢Á´´¶ÃΡ¢Á´´ÕÄê : 1000 ¥¿¡¼¥óËè";
1273 return "probing, detection and full id every 1000 turns";
1280 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
1282 return "mass genocide every 1000 turns";
1289 return "½ý¤Î¼£Ìþ(4d7) : 3+d3 ¥¿¡¼¥óËè";
1291 return "cure wounds (4d7) every 3+d3 turns";
1298 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
1300 return "fire branding of bolts every 999 turns";
1307 return "¥Õ¥¡¥¤¥¢¡ª : 15 ¥¿¡¼¥óËè";
1309 return "fire! every 15 turns";
1314 case ART_WEREWINDLE:
1317 return "ƨÁö : 35 ¥¿¡¼¥óËè";
1319 return "a getaway every 35 turns";
1326 return "¥Æ¥ì¥Ý¡¼¥È : 25 ¥¿¡¼¥óËè";
1328 return "a teleport every 25 turns";
1335 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1337 return "lightning ball (100) every 200 turns";
1344 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1346 return "Frost ball (100) every 200 turns";
1353 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
1355 return "stone to mud every 5 turns";
1362 return "´äÀÐÍϲò : 2 ¥¿¡¼¥óËè";
1364 return "stone to mud every 2 turns";
1368 case ART_SOULKEEPER:
1371 return "ÂÎÎϲóÉü(1000) : 888 ¥¿¡¼¥óËè";
1373 return "heal (1000) every 888 turns";
1380 return ("²óÉü (777)¡¢Ìþ¤·¡¢»Îµ¤¹âÍÈ : 300 ¥¿¡¼¥óËè");
1382 return ("heal (777), curing and heroism every 300 turns");
1389 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
1391 return "genocide every 500 turns";
1398 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
1400 return "restore life levels every 450 turns";
1407 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
1409 return "teleport away every 150 turns";
1417 return "Á´ÂÑÀ(20+d20¥¿¡¼¥ó) : 111 ¥¿¡¼¥óËè";
1419 return "resistance (20+d20 turns) every 111 turns";
1423 case ART_HOLCOLLETH:
1426 return "¥¹¥ê¡¼¥×(II) : 55 ¥¿¡¼¥óËè";
1428 return "Sleep II every 55 turns";
1435 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
1437 return "recharge item I every 70 turns";
1444 return "¥Æ¥ì¥Ý¡¼¥È : 45 ¥¿¡¼¥óËè";
1446 return "teleport every 45 turns";
1453 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
1455 return "confuse monster every 15 turns";
1459 case ART_CAMMITHRIM:
1462 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1464 return "magic missile (2d6) every 2 turns";
1471 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1473 return "fire bolt (9d8) every 8+d8 turns";
1477 case ART_PAURNIMMEN:
1480 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1482 return "frost bolt (6d8) every 7+d7 turns";
1489 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1491 return "lightning bolt (4d8) every 5+d5 turns";
1498 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
1500 return "acid bolt (5d8) every 6+d6 turns";
1507 return "ËâË¡¤ÎÌð(150) : 90+d90 ¥¿¡¼¥óËè";
1509 return "a magical arrow (150) every 90+d90 turns";
1513 case ART_HOLHENNETH:
1516 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
1518 return "detection every 55+d55 turns";
1525 return "ÂÎÎϲóÉü(500) : 500 ¥¿¡¼¥óËè";
1527 return "heal (700) every 250 turns";
1534 return "¥¹¥¿¡¼¡¦¥Ü¡¼¥ë(150) : 1000 ¥¿¡¼¥óËè";
1536 return "star ball (150) every 1000 turns";
1540 case ART_BLADETURNER:
1543 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300), »Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢ÂÑÀ";
1545 return "breathe elements (300), hero, bless, and resistance";
1552 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1554 return "illumination every 10+d10 turns";
1561 return "ËâË¡¤ÎÃϿޤȸ÷ : 50+d50 ¥¿¡¼¥óËè";
1563 return "magic mapping and light every 50+d50 turns";
1570 return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô";
1572 return "clairvoyance and recall, draining you";
1580 return "¼Ù°Â໶(x5) : 200+d200 ¥¿¡¼¥óËè";
1582 return "dispel evil (x5) every 200+d200 turns";
1589 return "¼Ù°Â໶(x5) : 100+d100 ¥¿¡¼¥óËè";
1591 return "dispel evil (x5) every 100+d100 turns";
1599 return "Âмٰ·ë³¦ : 225+d225 ¥¿¡¼¥óËè";
1601 return "protection from evil every 225+d225 turns";
1608 return "Ã⩹¶·â(100) : 100+d100 ¥¿¡¼¥óËè";
1610 return "a strangling attack (100) every 100+d100 turns";
1617 return "¥¹¥Ô¡¼¥É(75+d75¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1619 return "haste self (75+d75 turns) every 150+d150 turns";
1626 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(300) : 225+d225 ¥¿¡¼¥óËè";
1628 return "large fire ball (300) every 225+d225 turns";
1635 return "µðÂ祢¥¤¥¹¡¦¥Ü¡¼¥ë(400) : 325+d325 ¥¿¡¼¥óËè";
1637 return "large frost ball (400) every 325+d325 turns";
1645 return "µðÂ祵¥ó¥À¡¼¡¦¥Ü¡¼¥ë(500) : 425+d425 ¥¿¡¼¥óËè";
1647 return "large lightning ball (500) every 425+d425 turns";
1655 return "¿®¤¸Æñ¤¤¤³¤È : 450+d450 ¥¿¡¼¥óËè";
1657 return "bizarre things every 450+d450 turns";
1661 case ART_DOR: case ART_TERROR: case ART_STONEMASK:
1664 return "Á´Êý¸þ¤Ø¤Î¶²Éݤθ÷Àþ";
1666 return "rays of fear in every direction";
1673 return "¤³¤Î³¬¤Ë¤¤¤ë¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òɽ¼¨ : 200¥¿¡¼¥óËè";
1675 return "list of the uniques on the level every 200 turns";
1678 case ART_STONE_LORE:
1681 return "´í¸±¤òȼ¤¦´ÕÄê : ¤¤¤Ä¤Ç¤â";
1683 return "perilous identify every turn";
1689 return "³²Ãî¤Î¶î½ü : 55+d55¥¿¡¼¥óËè";
1691 return "dispel small life every 55+d55 turns";
1697 return "¥â¥ó¥¹¥¿¡¼¶²¹² : 40+d40¥¿¡¼¥óËè";
1699 return "frighten monsters every 40+d40 turns";
1705 return "Âмٰ·ë³¦ : 200+d200 ¥¿¡¼¥óËè";
1707 return "protection from evil every 200 + d200 turns";
1713 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
1715 return "a mana bolt (120) every 120+d120 turns";
1721 return "»Îµ¤¹âÍÈ, ¥¹¥Ô¡¼¥É(50+d50¥¿¡¼¥ó) : 100+d200 ¥¿¡¼¥óËè";
1723 return "hero and +10 to speed (50) every 100+200d turns";
1729 return "âÁ¤·¤¤¸÷ : 250 ¥¿¡¼¥óËè";
1731 return "blinding light every 250 turns";
1737 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
1739 return "Recharge item every 200 turns";
1745 return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë¡£";
1747 return "Increase STR (destroyed 50%)";
1753 return "ËâÎϤÎÍò(400) : 250+d250¥¿¡¼¥óËè";
1755 return "a mana storm every 250+d250 turns";
1761 return "ʪÂΤò°ú¤´ó¤»¤ë(½ÅÎÌ25kg¤Þ¤Ç) : 25+d25¥¿¡¼¥óËè";
1763 return "a telekinesis (500 lb) every 25+d25 turns";
1769 return "¥Ï¥¦¥ó¥É¾¤´ : 300+d150¥¿¡¼¥óËè";
1771 return "summon hound every 300+d150 turns";
1777 return "µðÂ祹¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 200+d200 ¥¿¡¼¥óËè";
1779 return "large star ball (200) every 200+d200 turns";
1786 return "Îã¤Î¥¢¥ì : 150+d150 ¥¿¡¼¥óËè";
1788 return "reveal your identity every 150+d150 turns";
1795 return "Çï»ÒÌÚ¤òÂǤÁ¤Ê¤é¤¹ : ¤¤¤Ä¤Ç¤â";
1797 return "beat wooden clappers every turn";
1805 return "»Îµ¤¹âÍÈ : 30+d30¥¿¡¼¥óËè";
1807 return "heroism every 30+d30 turns";
1815 return "Ìþ¤· : 100¥¿¡¼¥óËè";
1817 return "curing every 100 turns";
1825 return "ưʪ̥λ : 200¥¿¡¼¥óËè";
1827 return "charm animal every 200 turns";
1834 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(12d8) : 50 ¥¿¡¼¥óËè";
1836 return "frost bolt (12d8) every 50 turns";
1843 return "°ÀÊѹ¹ : 3333 ¥¿¡¼¥óËè";
1845 return "change zokusei every 3333 turns";
1852 return "¥¦¥©¡¼¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 250 ¥¿¡¼¥óËè";
1854 return "water ball (200) every 250 turns";
1861 return "»Í¸ÔƧ¤ß : 100+d100¥¿¡¼¥óËè";
1863 return "shiko every 100+d100 turns";
1870 return "Î䵤¤ÎÂÑÀ : 40+d40¥¿¡¼¥óËè";
1872 return "resist cold every 40+d40 turns";
1879 return "Âý¤ÎÂç·²¾¤´ : 300+d150¥¿¡¼¥óËè";
1881 return "summon octopus every 300+d150 turns";
1887 return "°Å¹õ¤ÎÍò(250) : 150+d150 ¥¿¡¼¥óËè";
1889 return "darkness storm (250) every 150+d150 turns";
1896 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_TSURIZAO))
1899 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
1901 return "fishing : every time";
1906 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_ACID))
1909 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1911 return "resist acid every 50+d50 turns";
1915 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_ELEC))
1918 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1920 return "resist elec every 50+d50 turns";
1924 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_FIRE))
1927 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1929 return "resist fire every 50+d50 turns";
1933 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_COLD))
1936 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1938 return "resist cold every 50+d50 turns";
1942 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_EARTHQUAKE))
1945 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1947 return "earthquake every 100+d100 turns";
1951 if (o_ptr->name2 == EGO_TRUMP)
1954 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
1956 return "teleport every 50+d50 turns";
1961 if (o_ptr->name2 == EGO_LITE_ILLUMINATION)
1964 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1966 return "illumination every 10+d10 turns";
1970 else if (o_ptr->name2 == EGO_EARTHQUAKES)
1973 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1975 return "earthquake every 100+d100 turns";
1980 else if (o_ptr->name2 == EGO_JUMP)
1983 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1985 return "blink every 10+d10 turns";
1990 if (o_ptr->tval == TV_RING)
1994 switch (o_ptr->name2)
1998 return "»Îµ¤¹âÍÈ : 100+d100¥¿¡¼¥óËè";
2000 return "heroism every 100+d100 turns";
2002 case EGO_RING_MAGIC_MIS:
2004 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
2006 return "magic missile (2d6) every 2 turns";
2008 case EGO_RING_FIRE_BOLT:
2010 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
2012 return "fire bolt (9d8) every 8+d8 turns";
2014 case EGO_RING_COLD_BOLT:
2016 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
2018 return "frost bolt (6d8) every 7+d7 turns";
2020 case EGO_RING_ELEC_BOLT:
2022 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
2024 return "lightning bolt (4d8) every 5+d5 turns";
2026 case EGO_RING_ACID_BOLT:
2028 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
2030 return "acid bolt (5d8) every 6+d6 turns";
2032 case EGO_RING_MANA_BOLT:
2034 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
2036 return "a mana bolt (120) every 120+d120 turns";
2038 case EGO_RING_FIRE_BALL:
2040 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2042 return "fire ball (100) every 80+d80 turns";
2044 case EGO_RING_COLD_BALL:
2046 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2048 return "cold ball (100) every 80+d80 turns";
2050 case EGO_RING_ELEC_BALL:
2052 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2054 return "elec ball (100) every 80+d80 turns";
2056 case EGO_RING_ACID_BALL:
2058 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2060 return "acid ball (100) every 80+d80 turns";
2062 case EGO_RING_MANA_BALL:
2064 return "ËâÎϤÎÍò (250) : 300 ¥¿¡¼¥óËè";
2066 return "mana storm (250) every 300 turns";
2068 case EGO_RING_DRAGON_F:
2069 if (o_ptr->sval == SV_RING_FLAMES)
2071 return "²Ð±ê¤Î¥Ö¥ì¥¹¤È²Ð¤Ø¤ÎÂÑÀ";
2073 return "breath of fire and resist fire";
2077 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2079 return "fire breath (200) every 250 turns";
2081 case EGO_RING_DRAGON_C:
2082 if (o_ptr->sval == SV_RING_ICE)
2084 return "Î䵤¤Î¥Ö¥ì¥¹¤ÈÎ䵤¤Ø¤ÎÂÑÀ";
2086 return "breath of cold and resist cold";
2090 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2092 return "cold breath (200) every 250 turns";
2094 case EGO_RING_M_DETECT:
2096 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃÎ : 150 ¥¿¡¼¥óËè";
2098 return "detect all monsters every 150 turns";
2100 case EGO_RING_D_SPEED:
2102 return "¥¹¥Ô¡¼¥É(15+d30¥¿¡¼¥ó) : 100 ¥¿¡¼¥óËè";
2104 return "haste self (15+d30 turns) every 100 turns";
2106 case EGO_RING_BERSERKER:
2108 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
2110 return "berserk (25+d25 turns) every 75+d75 turns";
2112 case EGO_RING_TELE_AWAY:
2114 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
2116 return "teleport away every 150 turns";
2120 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ";
2122 return "hero, bless, and ultimate resistance";
2126 switch (o_ptr->sval)
2128 case SV_RING_FLAMES:
2130 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤È²Ð¤Ø¤ÎÂÑÀ";
2132 return "ball of fire and resist fire";
2137 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë¤ÈÎ䵤¤Ø¤ÎÂÑÀ";
2139 return "ball of cold and resist cold";
2144 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤È»À¤Ø¤ÎÂÑÀ";
2146 return "ball of acid and resist acid";
2151 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤ÈÅÅ·â¤Ø¤ÎÂÑÀ";
2153 return "ball of elec and resist elec";
2161 if (o_ptr->tval == TV_AMULET)
2165 switch (o_ptr->name2)
2169 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
2171 return "identify every 10 turns";
2176 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
2178 return "charm monster every 200 turns";
2183 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
2185 return "blink every 10+d10 turns";
2188 case EGO_AMU_TELEPORT:
2190 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
2192 return "teleport every 50+d50 turns";
2195 case EGO_AMU_D_DOOR:
2197 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
2199 return "dimension door every 200 turns";
2202 case EGO_AMU_RES_FIRE_:
2204 return "²Ð±ê¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2206 return "resist fire every 50+d50 turns";
2209 case EGO_AMU_RES_COLD_:
2211 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2213 return "resist cold every 50+d50 turns";
2216 case EGO_AMU_RES_ELEC_:
2218 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2220 return "resist elec every 50+d50 turns";
2223 case EGO_AMU_RES_ACID_:
2225 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2227 return "resist acid every 50+d50 turns";
2230 case EGO_AMU_DETECTION:
2232 return "Á´´¶ÃÎ : 55+d55¥¿¡¼¥óËè";
2234 return "detect all floor every 55+d55 turns";
2241 if (o_ptr->tval == TV_WHISTLE)
2244 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
2246 return "call pet every 100+d100 turns";
2250 if (o_ptr->tval == TV_CAPTURE)
2253 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
2255 return "captures or releases a monster.";
2259 /* Require dragon scale mail */
2261 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
2263 if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
2267 /* Branch on the sub-type */
2268 switch (o_ptr->sval)
2270 case SV_DRAGON_BLUE:
2273 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
2275 return "breathe lightning (100) every 150+d150 turns";
2279 case SV_DRAGON_WHITE:
2282 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
2284 return "breathe frost (110) every 150+d150 turns";
2288 case SV_DRAGON_BLACK:
2291 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
2293 return "breathe acid (130) every 150+d150 turns";
2297 case SV_DRAGON_GREEN:
2300 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
2302 return "breathe poison gas (150) every 180+d180 turns";
2309 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2311 return "breathe fire (200) every 200+d200 turns";
2315 case SV_DRAGON_MULTIHUED:
2318 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
2320 return "breathe multi-hued (250) every 200+d200 turns";
2324 case SV_DRAGON_BRONZE:
2327 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
2329 return "breathe confusion (120) every 180+d180 turns";
2333 case SV_DRAGON_GOLD:
2336 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
2338 return "breathe sound (130) every 180+d180 turns";
2342 case SV_DRAGON_CHAOS:
2345 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
2347 return "breathe chaos/disenchant (220) every 200+d200 turns";
2354 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
2356 return "breathe sound/shards (230) every 200+d200 turns";
2360 case SV_DRAGON_BALANCE:
2363 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
2365 return "breathe balance (250) every 200+d200 turns";
2369 case SV_DRAGON_SHINING:
2372 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2374 return "breathe light/darkness (200) every 200+d200 turns";
2378 case SV_DRAGON_POWER:
2381 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
2383 return "breathe the elements (300) every 200+d200 turns";
2393 return "breathe air";
2400 * Describe a "fully identified" item
2402 bool identify_fully_aux(object_type *o_ptr)
2410 char o_name[MAX_NLEN];
2412 /* Extract the flags */
2413 object_flags(o_ptr, &f1, &f2, &f3);
2419 roff_to_buf( a_text + a_info[ o_ptr->name1 ].text ,77-15,temp);
2420 for(j=0;temp[j];j+=1+strlen(&temp[j]))
2421 { info[i]=&temp[j];i++;}
2424 /* Mega-Hack -- describe activation */
2425 if (f3 & (TR3_ACTIVATE))
2428 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
2430 info[i++] = "It can be activated for...";
2433 info[i++] = item_activation(o_ptr);
2435 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
2437 info[i++] = "...if it is being worn.";
2442 /* Figurines, a hack */
2443 if (o_ptr->tval == TV_FIGURINE)
2446 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
2448 info[i++] = "It will transform into a pet when thrown.";
2453 /* Figurines, a hack */
2454 if (o_ptr->name1 == ART_STONEMASK)
2457 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
2459 info[i++] = "It makes you turn into a vampire permanently.";
2464 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
2467 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
2469 info[i++] = "It will attempts to kill a monster instantly.";
2474 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
2477 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
2479 info[i++] = "It strikes yourself sometimes.";
2483 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
2485 info[i++] = "It will always penetrates invulnerability barrier.";
2489 if (o_ptr->name2 == EGO_2WEAPON)
2492 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
2494 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
2499 if (o_ptr->name2 == EGO_RING_WIZARD)
2502 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
2504 info[i++] = "It affects your ability to use magic devices.";
2508 if (o_ptr->name2 == EGO_AMU_FOOL)
2511 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
2513 info[i++] = "It prevents you from using magic items.";
2517 if (o_ptr->name2 == EGO_RING_THROW)
2520 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2522 info[i++] = "It provides great strength when you throw an item.";
2526 if (o_ptr->name2 == EGO_AMU_NAIVETY)
2529 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
2531 info[i++] = "It decreases your magic resistance.";
2535 if (o_ptr->tval == TV_STATUE)
2537 monster_race *r_ptr = &r_info[o_ptr->pval];
2539 if (o_ptr->pval == MON_BULLGATES)
2541 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
2543 info[i++] = "It is shameful.";
2545 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
2547 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
2549 info[i++] = "It is fearful.";
2553 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
2555 info[i++] = "It is cheerful.";
2559 /* Hack -- describe lite's */
2560 if (o_ptr->tval == TV_LITE)
2562 if (o_ptr->name2 == EGO_LITE_DARKNESS)
2565 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
2567 info[i++] = "It provides no light..";
2570 else if (artifact_p(o_ptr))
2573 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2575 info[i++] = "It provides light (radius 3) forever.";
2579 else if (o_ptr->name2 == EGO_LITE_SHINE)
2581 if (o_ptr->sval == SV_LITE_FEANOR)
2584 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2586 info[i++] = "It provides light (radius 3) forever.";
2590 else if (o_ptr->sval == SV_LITE_LANTERN)
2593 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2595 info[i++] = "It provides light (radius 3) when fueled.";
2602 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2604 info[i++] = "It provides light (radius 2) when fueled.";
2611 if (o_ptr->sval == SV_LITE_FEANOR)
2614 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2616 info[i++] = "It provides light (radius 2) forever.";
2620 else if (o_ptr->sval == SV_LITE_LANTERN)
2623 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2625 info[i++] = "It provides light (radius 2) when fueled.";
2632 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
2634 info[i++] = "It provides light (radius 1) when fueled.";
2639 if (o_ptr->name2 == EGO_LITE_LONG)
2642 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
2644 info[i++] = "It provides light for much longer time.";
2650 /* And then describe it fully */
2652 if (f2 & (TR2_RIDING))
2654 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
2656 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
2658 info[i++] = "It is made for riding.";
2662 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
2664 info[i++] = "It is suitable for riding.";
2671 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2673 info[i++] = "It affects your strength.";
2680 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2682 info[i++] = "It affects your intelligence.";
2689 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2691 info[i++] = "It affects your wisdom.";
2698 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2700 info[i++] = "It affects your dexterity.";
2707 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2709 info[i++] = "It affects your constitution.";
2716 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2718 info[i++] = "It affects your charisma.";
2723 if (f1 & (TR1_MAGIC_MASTERY))
2726 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2728 info[i++] = "It affects your ability to use magic devices.";
2732 if (f1 & (TR1_STEALTH))
2735 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2737 info[i++] = "It affects your stealth.";
2741 if (f1 & (TR1_SEARCH))
2744 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2746 info[i++] = "It affects your searching.";
2750 if (f1 & (TR1_INFRA))
2753 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2755 info[i++] = "It affects your infravision.";
2759 if (f1 & (TR1_TUNNEL))
2762 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2764 info[i++] = "It affects your ability to tunnel.";
2768 if (f1 & (TR1_SPEED))
2771 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2773 info[i++] = "It affects your speed.";
2777 if (f1 & (TR1_BLOWS))
2780 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2782 info[i++] = "It affects your attack speed.";
2787 if (f1 & (TR1_BRAND_ACID))
2790 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2792 info[i++] = "It does extra damage from acid.";
2796 if (f1 & (TR1_BRAND_ELEC))
2799 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2801 info[i++] = "It does extra damage from electricity.";
2805 if (f1 & (TR1_BRAND_FIRE))
2808 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2810 info[i++] = "It does extra damage from fire.";
2814 if (f1 & (TR1_BRAND_COLD))
2817 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2819 info[i++] = "It does extra damage from frost.";
2824 if (f1 & (TR1_BRAND_POIS))
2827 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
2829 info[i++] = "It poisons your foes.";
2834 if (f1 & (TR1_CHAOTIC))
2837 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
2839 info[i++] = "It produces chaotic effects.";
2844 if (f1 & (TR1_VAMPIRIC))
2847 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
2849 info[i++] = "It drains life from your foes.";
2854 if (f1 & (TR1_IMPACT))
2857 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
2859 info[i++] = "It can cause earthquakes.";
2864 if (f1 & (TR1_VORPAL))
2867 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2869 info[i++] = "It is very sharp and can cut your foes.";
2874 if (f1 & (TR1_KILL_DRAGON))
2877 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2879 info[i++] = "It is a great bane of dragons.";
2883 else if (f1 & (TR1_SLAY_DRAGON))
2886 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2888 info[i++] = "It is especially deadly against dragons.";
2892 if (f1 & (TR1_SLAY_ORC))
2895 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2897 info[i++] = "It is especially deadly against orcs.";
2901 if (f1 & (TR1_SLAY_TROLL))
2904 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2906 info[i++] = "It is especially deadly against trolls.";
2910 if (f1 & (TR1_SLAY_GIANT))
2912 if (o_ptr->name1 == ART_HRUNTING)
2914 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2916 info[i++] = "It is a great bane of giants.";
2920 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2922 info[i++] = "It is especially deadly against giants.";
2926 if (f1 & (TR1_SLAY_DEMON))
2929 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2931 info[i++] = "It strikes at demons with holy wrath.";
2935 if (f1 & (TR1_SLAY_UNDEAD))
2938 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2940 info[i++] = "It strikes at undead with holy wrath.";
2944 if (f1 & (TR1_SLAY_EVIL))
2947 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
2949 info[i++] = "It fights against evil with holy fury.";
2953 if (f1 & (TR1_SLAY_ANIMAL))
2956 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2958 info[i++] = "It is especially deadly against natural creatures.";
2963 if (f1 & (TR1_FORCE_WEAPON))
2966 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
2968 info[i++] = "It powerfully strikes at a monster using your mana.";
2972 if (f3 & (TR3_DEC_MANA))
2975 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
2977 info[i++] = "It decreases your mana consumption.";
2981 if (f2 & (TR2_SUST_STR))
2984 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
2986 info[i++] = "It sustains your strength.";
2990 if (f2 & (TR2_SUST_INT))
2993 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
2995 info[i++] = "It sustains your intelligence.";
2999 if (f2 & (TR2_SUST_WIS))
3002 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
3004 info[i++] = "It sustains your wisdom.";
3008 if (f2 & (TR2_SUST_DEX))
3011 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
3013 info[i++] = "It sustains your dexterity.";
3017 if (f2 & (TR2_SUST_CON))
3020 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
3022 info[i++] = "It sustains your constitution.";
3026 if (f2 & (TR2_SUST_CHR))
3029 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
3031 info[i++] = "It sustains your charisma.";
3036 if (f2 & (TR2_IM_ACID))
3039 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3041 info[i++] = "It provides immunity to acid.";
3045 if (f2 & (TR2_IM_ELEC))
3048 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3050 info[i++] = "It provides immunity to electricity.";
3054 if (f2 & (TR2_IM_FIRE))
3057 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3059 info[i++] = "It provides immunity to fire.";
3063 if (f2 & (TR2_IM_COLD))
3066 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3068 info[i++] = "It provides immunity to cold.";
3073 if (f2 & (TR2_THROW))
3076 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3078 info[i++] = "It is perfectly balanced for throwing.";
3082 if (f2 & (TR2_FREE_ACT))
3085 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3087 info[i++] = "It provides immunity to paralysis.";
3091 if (f2 & (TR2_HOLD_LIFE))
3094 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
3096 info[i++] = "It provides resistance to life draining.";
3100 if (f2 & (TR2_RES_FEAR))
3103 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3105 info[i++] = "It makes you completely fearless.";
3109 if (f2 & (TR2_RES_ACID))
3112 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3114 info[i++] = "It provides resistance to acid.";
3118 if (f2 & (TR2_RES_ELEC))
3121 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3123 info[i++] = "It provides resistance to electricity.";
3127 if (f2 & (TR2_RES_FIRE))
3130 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3132 info[i++] = "It provides resistance to fire.";
3136 if (f2 & (TR2_RES_COLD))
3139 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3141 info[i++] = "It provides resistance to cold.";
3145 if (f2 & (TR2_RES_POIS))
3148 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3150 info[i++] = "It provides resistance to poison.";
3155 if (f2 & (TR2_RES_LITE))
3158 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3160 info[i++] = "It provides resistance to light.";
3164 if (f2 & (TR2_RES_DARK))
3167 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3169 info[i++] = "It provides resistance to dark.";
3174 if (f2 & (TR2_RES_BLIND))
3177 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3179 info[i++] = "It provides resistance to blindness.";
3183 if (f2 & (TR2_RES_CONF))
3186 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3188 info[i++] = "It provides resistance to confusion.";
3192 if (f2 & (TR2_RES_SOUND))
3195 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3197 info[i++] = "It provides resistance to sound.";
3201 if (f2 & (TR2_RES_SHARDS))
3204 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3206 info[i++] = "It provides resistance to shards.";
3211 if (f2 & (TR2_RES_NETHER))
3214 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3216 info[i++] = "It provides resistance to nether.";
3220 if (f2 & (TR2_RES_NEXUS))
3223 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3225 info[i++] = "It provides resistance to nexus.";
3229 if (f2 & (TR2_RES_CHAOS))
3232 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3234 info[i++] = "It provides resistance to chaos.";
3238 if (f2 & (TR2_RES_DISEN))
3241 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3243 info[i++] = "It provides resistance to disenchantment.";
3248 if (f3 & (TR3_FEATHER))
3251 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3253 info[i++] = "It allows you to levitate.";
3257 if (f3 & (TR3_LITE))
3259 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
3261 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë¡£";
3263 info[i++] = "It decreases radius of your light source.";
3267 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
3269 info[i++] = "It provides permanent light.";
3273 if (f3 & (TR3_SEE_INVIS))
3276 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3278 info[i++] = "It allows you to see invisible monsters.";
3282 if (f3 & (TR3_TELEPATHY))
3285 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
3287 info[i++] = "It gives telepathic powers.";
3291 if (f3 & (TR3_SLOW_DIGEST))
3294 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
3296 info[i++] = "It slows your metabolism.";
3300 if (f3 & (TR3_REGEN))
3303 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
3305 info[i++] = "It speeds your regenerative powers.";
3309 if (f3 & (TR3_WARNING))
3312 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
3314 info[i++] = "It warns you of danger";
3318 if (f2 & (TR2_REFLECT))
3321 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
3323 info[i++] = "It reflects bolts and arrows.";
3327 if (f3 & (TR3_SH_FIRE))
3330 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3332 info[i++] = "It produces a fiery sheath.";
3336 if (f3 & (TR3_SH_ELEC))
3339 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3341 info[i++] = "It produces an electric sheath.";
3345 if (f3 & (TR3_SH_COLD))
3348 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3350 info[i++] = "It produces a coldly sheath.";
3354 if (f3 & (TR3_NO_MAGIC))
3357 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3359 info[i++] = "It produces an anti-magic shell.";
3363 if (f3 & (TR3_NO_TELE))
3366 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
3368 info[i++] = "It prevents teleportation.";
3372 if (f3 & (TR3_XTRA_MIGHT))
3375 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3377 info[i++] = "It fires missiles with extra might.";
3381 if (f3 & (TR3_XTRA_SHOTS))
3384 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3386 info[i++] = "It fires missiles excessively fast.";
3391 if (f3 & (TR3_DRAIN_EXP))
3394 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
3396 info[i++] = "It drains experience.";
3400 if (f3 & (TR3_TELEPORT))
3403 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
3405 info[i++] = "It induces random teleportation.";
3409 if (f3 & TR3_AGGRAVATE)
3412 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
3414 info[i++] = "It aggravates nearby creatures.";
3419 if (f3 & TR3_BLESSED)
3422 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
3424 info[i++] = "It has been blessed by the gods.";
3429 if (cursed_p(o_ptr))
3431 if (f3 & TR3_PERMA_CURSE)
3434 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3436 info[i++] = "It is permanently cursed.";
3440 else if (f3 & TR3_HEAVY_CURSE)
3443 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3445 info[i++] = "It is heavily cursed.";
3452 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
3454 info[i++] = "It is cursed.";
3460 if (f3 & TR3_TY_CURSE)
3463 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
3465 info[i++] = "It carries an ancient foul curse.";
3470 /* XTRA HACK ARTDESC */
3471 flag = TR3_IGNORE_ACID | TR3_IGNORE_ELEC | TR3_IGNORE_FIRE | TR3_IGNORE_COLD ;
3472 if ((f3 & flag) == flag)
3475 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3477 info[i++] = "It cannot be harmed by the elements.";
3480 if (f3 & (TR3_IGNORE_ACID))
3483 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3485 info[i++] = "It cannot be harmed by acid.";
3489 if (f3 & (TR3_IGNORE_ELEC))
3492 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3494 info[i++] = "It cannot be harmed by electricity.";
3498 if (f3 & (TR3_IGNORE_FIRE))
3501 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3503 info[i++] = "It cannot be harmed by fire.";
3507 if (f3 & (TR3_IGNORE_COLD))
3510 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3512 info[i++] = "It cannot be harmed by cold.";
3517 /* XTRA HACK ARTDESC */
3520 /* No special effects */
3521 if (!i) return (FALSE);
3523 /* Save the screen */
3526 /* Display Item name */
3527 object_desc(o_name, o_ptr, TRUE, 3);
3528 prt(format("%s", o_name), 0, 0);
3530 /* Erase the screen */
3531 for (k = 1; k < 24; k++) prt("", k, 13);
3533 /* Label the information */
3534 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
3536 monster_race *r_ptr = &r_info[o_ptr->pval];
3537 int namelen = strlen(r_name + r_ptr->name);
3538 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
3539 c_prt(r_ptr->d_attr, format("%c", r_ptr->d_char), 1, 18+namelen);
3540 prt("'", 1, 19+namelen);
3544 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
3546 prt(" Item Attributes:", 1, 15);
3549 /* We will print on top of the map (column 13) */
3550 for (k = 2, j = 0; j < i; j++)
3553 prt(info[j], k++, 15);
3555 /* Every 20 entries (lines 2 to 21), start over */
3556 if ((k == 22) && (j+1 < i))
3559 prt("-- ³¤¯ --", k, 15);
3561 prt("-- more --", k, 15);
3564 for (; k > 2; k--) prt("", k, 15);
3570 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
3572 prt("[Press any key to continue]", k, 15);
3577 /* Restore the screen */
3580 /* Gave knowledge */
3587 * Convert an inventory index into a one character label
3588 * Note that the label does NOT distinguish inven/equip.
3590 char index_to_label(int i)
3592 /* Indexes for "inven" are easy */
3593 if (i < INVEN_RARM) return (I2A(i));
3595 /* Indexes for "equip" are offset */
3596 return (I2A(i - INVEN_RARM));
3601 * Convert a label into the index of an item in the "inven"
3602 * Return "-1" if the label does not indicate a real item
3604 s16b label_to_inven(int c)
3609 i = (islower(c) ? A2I(c) : -1);
3611 /* Verify the index */
3612 if ((i < 0) || (i > INVEN_PACK)) return (-1);
3614 /* Empty slots can never be chosen */
3615 if (!inventory[i].k_idx) return (-1);
3617 /* Return the index */
3623 * Convert a label into the index of a item in the "equip"
3624 * Return "-1" if the label does not indicate a real item
3626 s16b label_to_equip(int c)
3631 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
3633 /* Verify the index */
3634 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
3636 /* Empty slots can never be chosen */
3637 if (!inventory[i].k_idx) return (-1);
3639 /* Return the index */
3646 * Determine which equipment slot (if any) an item likes
3648 s16b wield_slot(object_type *o_ptr)
3650 /* Slot for equipment */
3651 switch (o_ptr->tval)
3658 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
3659 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
3660 return (INVEN_LARM);
3667 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
3668 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
3669 return (INVEN_RARM);
3679 /* Use the right hand first */
3680 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
3682 /* Use the left hand for swapping (by default) */
3683 return (INVEN_LEFT);
3689 return (INVEN_NECK);
3694 return (INVEN_LITE);
3701 return (INVEN_BODY);
3706 return (INVEN_OUTER);
3712 return (INVEN_HEAD);
3717 return (INVEN_HANDS);
3722 return (INVEN_FEET);
3726 /* No slot available */
3732 * Return a string mentioning how a given item is carried
3734 cptr mention_use(int i)
3738 /* Examine the location */
3742 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê"); break;
3744 case INVEN_RARM: p = "Wielding"; break;
3748 case INVEN_LARM: p = (left_hander ? " ±¦¼ê" : " º¸¼ê"); break;
3750 case INVEN_LARM: p = "On arm"; break;
3754 case INVEN_BOW: p = "¼Í·âÍÑ"; break;
3756 case INVEN_BOW: p = "Shooting"; break;
3760 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
3762 case INVEN_LEFT: p = "On left hand"; break;
3766 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
3768 case INVEN_RIGHT: p = "On right hand"; break;
3772 case INVEN_NECK: p = " ¼ó"; break;
3774 case INVEN_NECK: p = "Around neck"; break;
3778 case INVEN_LITE: p = " ¸÷¸»"; break;
3780 case INVEN_LITE: p = "Light source"; break;
3784 case INVEN_BODY: p = " ÂÎ"; break;
3786 case INVEN_BODY: p = "On body"; break;
3790 case INVEN_OUTER: p = "ÂΤξå"; break;
3792 case INVEN_OUTER: p = "About body"; break;
3796 case INVEN_HEAD: p = " Ƭ"; break;
3798 case INVEN_HEAD: p = "On head"; break;
3802 case INVEN_HANDS: p = " ¼ê"; break;
3804 case INVEN_HANDS: p = "On hands"; break;
3808 case INVEN_FEET: p = " "; break;
3810 case INVEN_FEET: p = "On feet"; break;
3814 default: p = "¥¶¥Ã¥¯"; break;
3816 default: p = "In pack"; break;
3821 /* Hack -- Heavy weapon */
3822 if (i == INVEN_RARM)
3824 if (p_ptr->heavy_wield[0])
3835 /* Hack -- Heavy weapon */
3836 if (i == INVEN_LARM)
3838 if (p_ptr->heavy_wield[1])
3849 /* Hack -- Heavy bow */
3853 o_ptr = &inventory[i];
3854 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
3865 /* Return the result */
3871 * Return a string describing how a given item is being worn.
3872 * Currently, only used for items in the equipment, not inventory.
3874 cptr describe_use(int i)
3881 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
3883 case INVEN_RARM: p = "attacking monsters with"; break;
3887 case INVEN_LARM: p = (left_hander ? " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
3889 case INVEN_LARM: p = "wearing on your arm"; break;
3893 case INVEN_BOW: p = "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
3895 case INVEN_BOW: p = "shooting missiles with"; break;
3899 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3901 case INVEN_LEFT: p = "wearing on your left hand"; break;
3905 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3907 case INVEN_RIGHT: p = "wearing on your right hand"; break;
3911 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
3913 case INVEN_NECK: p = "wearing around your neck"; break;
3917 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
3919 case INVEN_LITE: p = "using to light the way"; break;
3923 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
3925 case INVEN_BODY: p = "wearing on your body"; break;
3929 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
3931 case INVEN_OUTER: p = "wearing on your back"; break;
3935 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
3937 case INVEN_HEAD: p = "wearing on your head"; break;
3941 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
3943 case INVEN_HANDS: p = "wearing on your hands"; break;
3947 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
3949 case INVEN_FEET: p = "wearing on your feet"; break;
3953 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
3955 default: p = "carrying in your pack"; break;
3960 /* Hack -- Heavy weapon */
3961 if (i == INVEN_RARM)
3964 int hold = adj_str_hold[p_ptr->stat_ind[A_STR]];
3966 if (p_ptr->ryoute) hold *= 2;
3967 o_ptr = &inventory[i];
3968 if (hold < o_ptr->weight / 10)
3979 /* Hack -- Heavy bow */
3983 o_ptr = &inventory[i];
3984 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
3987 p = "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î";
3995 /* Return the result */
4000 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
4002 bool check_book_realm(const byte book_tval, const byte book_sval)
4004 if (book_tval < TV_LIFE_BOOK) return FALSE;
4005 if (p_ptr->pclass == CLASS_SORCERER)
4007 return is_magic(tval2realm(book_tval));
4009 else if (p_ptr->pclass == CLASS_RED_MAGE)
4011 if (is_magic(tval2realm(book_tval)))
4012 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
4014 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
4019 * Check an item against the item tester info
4021 bool item_tester_okay(object_type *o_ptr)
4023 /* Hack -- allow listing empty slots */
4024 if (item_tester_full) return (TRUE);
4026 /* Require an item */
4027 if (!o_ptr->k_idx) return (FALSE);
4029 /* Hack -- ignore "gold" */
4030 if (o_ptr->tval == TV_GOLD) return (FALSE);
4032 /* Check the tval */
4033 if (item_tester_tval)
4035 /* Is it a spellbook? If so, we need a hack -- TY */
4036 if ((item_tester_tval <= TV_DEATH_BOOK) &&
4037 (item_tester_tval >= TV_LIFE_BOOK))
4038 return check_book_realm(o_ptr->tval, o_ptr->sval);
4040 if (item_tester_tval != o_ptr->tval) return (FALSE);
4043 /* Check the hook */
4044 if (item_tester_hook)
4046 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
4057 * Choice window "shadow" of the "show_inven()" function
4059 void display_inven(void)
4061 register int i, n, z = 0;
4063 byte attr = TERM_WHITE;
4065 char o_name[MAX_NLEN];
4068 /* Find the "final" slot */
4069 for (i = 0; i < INVEN_PACK; i++)
4071 o_ptr = &inventory[i];
4073 /* Skip non-objects */
4074 if (!o_ptr->k_idx) continue;
4080 /* Display the pack */
4081 for (i = 0; i < z; i++)
4083 /* Examine the item */
4084 o_ptr = &inventory[i];
4086 /* Start with an empty "index" */
4087 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4089 /* Is this item "acceptable"? */
4090 if (item_tester_okay(o_ptr))
4092 /* Prepare an "index" */
4093 tmp_val[0] = index_to_label(i);
4095 /* Bracket the "index" --(-- */
4099 /* Display the index (or blank space) */
4100 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
4102 /* Obtain an item description */
4103 object_desc(o_name, o_ptr, TRUE, 3);
4105 /* Obtain the length of the description */
4109 attr = tval_to_attr[o_ptr->tval % 128];
4111 /* Grey out charging items */
4117 /* Display the entry itself */
4118 Term_putstr(3, i, n, attr, o_name);
4120 /* Erase the rest of the line */
4121 Term_erase(3+n, i, 255);
4123 /* Display the weight if needed */
4124 if (show_weights && o_ptr->weight)
4126 int wgt = o_ptr->weight * o_ptr->number;
4128 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
4130 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4133 Term_putstr(71, i, -1, TERM_WHITE, tmp_val);
4137 /* Erase the rest of the window */
4138 for (i = z; i < Term->hgt; i++)
4140 /* Erase the line */
4141 Term_erase(0, i, 255);
4148 * Choice window "shadow" of the "show_equip()" function
4150 void display_equip(void)
4154 byte attr = TERM_WHITE;
4156 char o_name[MAX_NLEN];
4159 /* Display the equipment */
4160 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
4162 /* Examine the item */
4163 o_ptr = &inventory[i];
4165 /* Start with an empty "index" */
4166 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4168 /* Is this item "acceptable"? */
4169 if (item_tester_okay(o_ptr))
4171 /* Prepare an "index" */
4172 tmp_val[0] = index_to_label(i);
4174 /* Bracket the "index" --(-- */
4178 /* Display the index (or blank space) */
4179 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
4181 /* Obtain an item description */
4182 if ((i == INVEN_LARM) && p_ptr->ryoute)
4185 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
4187 strcpy(o_name, "(wielding with two-hands)");
4193 object_desc(o_name, o_ptr, TRUE, 3);
4194 attr = tval_to_attr[o_ptr->tval % 128];
4197 /* Obtain the length of the description */
4200 /* Grey out charging items */
4206 /* Display the entry itself */
4207 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
4209 /* Erase the rest of the line */
4210 Term_erase(3+n, i - INVEN_RARM, 255);
4212 /* Display the slot description (if needed) */
4215 Term_putstr(61, i - INVEN_RARM, -1, TERM_WHITE, "<--");
4216 Term_putstr(65, i - INVEN_RARM, -1, TERM_WHITE, mention_use(i));
4219 /* Display the weight (if needed) */
4220 if (show_weights && o_ptr->weight)
4222 int wgt = o_ptr->weight * o_ptr->number;
4223 int col = (show_labels ? 52 : 71);
4225 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
4227 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4230 Term_putstr(col, i - INVEN_RARM, -1, TERM_WHITE, tmp_val);
4234 /* Erase the rest of the window */
4235 for (i = INVEN_TOTAL - INVEN_RARM; i < Term->hgt; i++)
4237 /* Clear that line */
4238 Term_erase(0, i, 255);
4248 * Display the inventory.
4250 * Hack -- do not display "trailing" empty slots
4252 int show_inven(int target_item)
4254 int i, j, k, l, z = 0;
4257 char o_name[MAX_NLEN];
4261 char out_desc[23][80];
4262 int target_item_label = 0;
4265 /* Starting column */
4268 /* Default "max-length" */
4271 /* Maximum space allowed for descriptions */
4274 /* Require space for weight (if needed) */
4275 if (show_weights) lim -= 9;
4277 /* Require space for icon */
4278 if (show_item_graph) lim -= 2;
4280 /* Find the "final" slot */
4281 for (i = 0; i < INVEN_PACK; i++)
4283 o_ptr = &inventory[i];
4285 /* Skip non-objects */
4286 if (!o_ptr->k_idx) continue;
4292 /* Display the inventory */
4293 for (k = 0, i = 0; i < z; i++)
4295 o_ptr = &inventory[i];
4297 /* Is this item acceptable? */
4298 if (!item_tester_okay(o_ptr)) continue;
4300 /* Describe the object */
4301 object_desc(o_name, o_ptr, TRUE, 3);
4303 /* Hack -- enforce max length */
4306 /* Save the object index, color, and description */
4308 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4310 /* Grey out charging items */
4313 out_color[k] = TERM_L_DARK;
4316 (void)strcpy(out_desc[k], o_name);
4318 /* Find the predicted "line length" */
4319 l = strlen(out_desc[k]) + 5;
4321 /* Be sure to account for the weight */
4322 if (show_weights) l += 9;
4324 /* Account for icon if displayed */
4325 if (show_item_graph) l += 2;
4327 /* Maintain the maximum length */
4328 if (l > len) len = l;
4330 /* Advance to next "line" */
4334 /* Find the column to start in */
4335 col = (len > 76) ? 0 : (79 - len);
4337 /* Output each entry */
4338 for (j = 0; j < k; j++)
4344 o_ptr = &inventory[i];
4346 /* Clear the line */
4347 prt("", j + 1, col ? col - 2 : col);
4349 if (use_menu && target_item)
4351 if (j == (target_item-1))
4354 strcpy(tmp_val, "¡Õ");
4356 strcpy(tmp_val, "> ");
4358 target_item_label = i;
4360 else strcpy(tmp_val, " ");
4363 /* Prepare an index --(-- */
4364 sprintf(tmp_val, "%c)", index_to_label(i));
4366 /* Clear the line with the (possibly indented) index */
4367 put_str(tmp_val, j + 1, col);
4369 /* Display graphics for object, if desired */
4370 if (show_item_graph)
4372 byte a = object_attr(o_ptr);
4373 char c = object_char(o_ptr);
4376 if (a & 0x80) a |= 0x40;
4379 Term_draw(col + 3, j + 1, a, c);
4383 /* Display the entry itself */
4384 c_put_str(out_color[j], out_desc[j], j + 1, show_item_graph ? (col + 5) : (col + 3));
4386 /* Display the weight if needed */
4389 int wgt = o_ptr->weight * o_ptr->number;
4391 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4393 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4396 put_str(tmp_val, j + 1, 71);
4400 /* Make a "shadow" below the list (only if needed) */
4401 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4403 /* Save the new column */
4406 return target_item_label;
4412 * Display the equipment.
4414 int show_equip(int target_item)
4420 char o_name[MAX_NLEN];
4423 char out_desc[23][80];
4424 int target_item_label = 0;
4427 /* Starting column */
4430 /* Maximal length */
4433 /* Maximum space allowed for descriptions */
4436 /* Require space for labels (if needed) */
4438 if (show_labels) lim -= (7 + 2);
4440 if (show_labels) lim -= (14 + 2);
4444 /* Require space for weight (if needed) */
4446 if (show_weights) lim -= 10;
4448 if (show_weights) lim -= 9;
4452 if (show_item_graph) lim -= 2;
4454 /* Scan the equipment list */
4455 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
4457 o_ptr = &inventory[i];
4459 /* Is this item acceptable? */
4460 if (!item_tester_okay(o_ptr) && (!((i == INVEN_LARM) && p_ptr->ryoute) || item_tester_no_ryoute)) continue;
4463 object_desc(o_name, o_ptr, TRUE, 3);
4465 /* Truncate the description */
4468 if ((i == INVEN_LARM) && p_ptr->ryoute)
4471 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
4473 (void)strcpy(out_desc[k],"(wielding with two-hands)");
4479 (void)strcpy(out_desc[k], o_name);
4480 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4484 /* Grey out charging items */
4487 out_color[k] = TERM_L_DARK;
4490 /* Extract the maximal length (see below) */
4492 l = strlen(out_desc[k]) + (2 + 1);
4494 l = strlen(out_desc[k]) + (2 + 3);
4498 /* Increase length for labels (if needed) */
4500 if (show_labels) l += (7 + 2);
4502 if (show_labels) l += (14 + 2);
4506 /* Increase length for weight (if needed) */
4507 if (show_weights) l += 9;
4509 if (show_item_graph) l += 2;
4511 /* Maintain the max-length */
4512 if (l > len) len = l;
4514 /* Advance the entry */
4518 /* Hack -- Find a column to start in */
4520 col = (len > 74) ? 0 : (79 - len);
4522 col = (len > 76) ? 0 : (79 - len);
4526 /* Output each entry */
4527 for (j = 0; j < k; j++)
4533 o_ptr = &inventory[i];
4535 /* Clear the line */
4536 prt("", j + 1, col ? col - 2 : col);
4538 if (use_menu && target_item)
4540 if (j == (target_item-1))
4543 strcpy(tmp_val, "¡Õ");
4545 strcpy(tmp_val, "> ");
4547 target_item_label = i;
4549 else strcpy(tmp_val, " ");
4552 /* Prepare an index --(-- */
4553 sprintf(tmp_val, "%c)", index_to_label(i));
4555 /* Clear the line with the (possibly indented) index */
4556 put_str(tmp_val, j+1, col);
4558 if (show_item_graph)
4560 byte a = object_attr(o_ptr);
4561 char c = object_char(o_ptr);
4564 if (a & 0x80) a |= 0x40;
4567 Term_draw(col + 3, j + 1, a, c);
4573 /* Mention the use */
4575 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
4577 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
4580 put_str(tmp_val, j+1, show_item_graph ? col + 5 : col + 3);
4582 /* Display the entry itself */
4584 c_put_str(out_color[j], out_desc[j], j+1, show_item_graph ? col + 14 : col + 12);
4586 c_put_str(out_color[j], out_desc[j], j+1, show_item_graph ? col + 21 : col + 19);
4594 /* Display the entry itself */
4595 c_put_str(out_color[j], out_desc[j], j+1, show_item_graph ? col + 5 : col + 3);
4598 /* Display the weight if needed */
4601 int wgt = o_ptr->weight * o_ptr->number;
4603 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4605 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
4608 put_str(tmp_val, j+1, 71);
4612 /* Make a "shadow" below the list (only if needed) */
4613 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4615 /* Save the new column */
4618 return target_item_label;
4625 * Flip "inven" and "equip" in any sub-windows
4627 void toggle_inven_equip(void)
4632 for (j = 0; j < 8; j++)
4635 if (!angband_term[j]) continue;
4637 /* Flip inven to equip */
4638 if (window_flag[j] & (PW_INVEN))
4641 window_flag[j] &= ~(PW_INVEN);
4642 window_flag[j] |= (PW_EQUIP);
4645 p_ptr->window |= (PW_EQUIP);
4648 /* Flip inven to equip */
4649 else if (window_flag[j] & (PW_EQUIP))
4652 window_flag[j] &= ~(PW_EQUIP);
4653 window_flag[j] |= (PW_INVEN);
4656 p_ptr->window |= (PW_INVEN);
4664 * Verify the choice of an item.
4666 * The item can be negative to mean "item on floor".
4668 static bool verify(cptr prompt, int item)
4670 char o_name[MAX_NLEN];
4671 char out_val[MAX_NLEN+20];
4678 o_ptr = &inventory[item];
4684 o_ptr = &o_list[0 - item];
4688 object_desc(o_name, o_ptr, TRUE, 3);
4692 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
4694 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
4699 return (get_check(out_val));
4704 * Hack -- allow user to "prevent" certain choices
4706 * The item can be negative to mean "item on floor".
4708 static bool get_item_allow(int item)
4717 o_ptr = &inventory[item];
4723 o_ptr = &o_list[0 - item];
4726 /* No inscription */
4727 if (!o_ptr->inscription) return (TRUE);
4730 s = strchr(quark_str(o_ptr->inscription), '!');
4732 /* Process preventions */
4735 /* Check the "restriction" */
4736 if ((s[1] == command_cmd) || (s[1] == '*'))
4738 /* Verify the choice */
4740 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
4742 if (!verify("Really try", item)) return (FALSE);
4747 /* Find another '!' */
4748 s = strchr(s + 1, '!');
4758 * Auxiliary function for "get_item()" -- test an index
4760 static bool get_item_okay(int i)
4763 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
4765 /* Verify the item */
4766 if (!item_tester_okay(&inventory[i])) return (FALSE);
4775 * Find the "first" inventory object with the given "tag".
4777 * A "tag" is a char "n" appearing as "@n" anywhere in the
4778 * inscription of an object.
4780 * Also, the tag "@xn" will work as well, where "n" is a tag-char,
4781 * and "x" is the "current" command_cmd code.
4783 static int get_tag(int *cp, char tag)
4788 /* Check every object */
4789 for (i = 0; i < INVEN_TOTAL; ++i)
4791 object_type *o_ptr = &inventory[i];
4793 /* Skip non-objects */
4794 if (!o_ptr->k_idx) continue;
4796 /* Skip empty inscriptions */
4797 if (!o_ptr->inscription) continue;
4799 /* Skip non-choice */
4800 if (!item_tester_okay(o_ptr)) continue;
4803 s = strchr(quark_str(o_ptr->inscription), '@');
4805 /* Process all tags */
4808 /* Check the special tags */
4809 if ((s[1] == command_cmd) && (s[2] == tag))
4811 /* Save the actual inventory ID */
4818 /* Find another '@' */
4819 s = strchr(s + 1, '@');
4823 /* Check every object */
4824 for (i = 0; i < INVEN_TOTAL; ++i)
4826 object_type *o_ptr = &inventory[i];
4828 /* Skip non-objects */
4829 if (!o_ptr->k_idx) continue;
4831 /* Skip empty inscriptions */
4832 if (!o_ptr->inscription) continue;
4834 /* Skip non-choice */
4835 if (!item_tester_okay(o_ptr)) continue;
4838 s = strchr(quark_str(o_ptr->inscription), '@');
4840 /* Process all tags */
4843 /* Check the normal tags */
4844 if (s[1] == tag && !((s[2] >= '0' && s[2] <= '9') || (s[2] >= 'a' && s[2] <= 'z') || (s[2] >= 'A' && s[2] <= 'Z')))
4846 /* Save the actual inventory ID */
4853 /* Find another '@' */
4854 s = strchr(s + 1, '@');
4863 * Determine whether get_item() can get some item or not
4864 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
4866 bool can_get_item(void)
4868 int j, floor_list[23], floor_num = 0;
4870 for (j = 0; j < INVEN_TOTAL; j++)
4871 if (item_tester_okay(&inventory[j]))
4874 (void)scan_floor(floor_list, &floor_num, py, px, 0x01);
4882 * Let the user select an item, save its "index"
4884 * Return TRUE only if an acceptable item was chosen by the user.
4886 * The selected item must satisfy the "item_tester_hook()" function,
4887 * if that hook is set, and the "item_tester_tval", if that value is set.
4889 * All "item_tester" restrictions are cleared before this function returns.
4891 * The user is allowed to choose acceptable items from the equipment,
4892 * inventory, or floor, respectively, if the proper flag was given,
4893 * and there are any acceptable items in that location.
4895 * The equipment or inventory are displayed (even if no acceptable
4896 * items are in that location) if the proper flag was given.
4898 * If there are no acceptable items available anywhere, and "str" is
4899 * not NULL, then it will be used as the text of a warning message
4900 * before the function returns.
4902 * Note that the user must press "-" to specify the item on the floor,
4903 * and there is no way to "examine" the item on the floor, while the
4904 * use of "capital" letters will "examine" an inventory/equipment item,
4905 * and prompt for its use.
4907 * If a legal item is selected from the inventory, we save it in "cp"
4908 * directly (0 to 35), and return TRUE.
4910 * If a legal item is selected from the floor, we save it in "cp" as
4911 * a negative (-1 to -511), and return TRUE.
4913 * If no item is available, we do nothing to "cp", and we display a
4914 * warning message, using "str" if available, and return FALSE.
4916 * If no item is selected, we do nothing to "cp", and return FALSE.
4918 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
4919 * to allow the user to enter a command while viewing those screens, and
4920 * also to induce "auto-enter" of stores, and other such stuff.
4922 * Global "p_ptr->command_see" may be set before calling this function to start
4923 * out in "browse" mode. It is cleared before this function returns.
4925 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
4926 * If it is TRUE then we are viewing inventory, else equipment.
4928 * We always erase the prompt when we are done, leaving a blank line,
4929 * or a warning message, if appropriate, if no items are available.
4931 bool get_item(int *cp, cptr pmt, cptr str, int mode)
4933 s16b this_o_idx, next_o_idx = 0;
4935 char n1, n2, which = ' ';
4937 int j, k, i1, i2, e1, e2;
4947 bool allow_floor = FALSE;
4949 bool toggle = FALSE;
4955 extern bool select_spellbook;
4956 extern bool select_the_force;
4958 int menu_line = (use_menu ? 1 : 0);
4962 #ifdef ALLOW_EASY_FLOOR /* TNB */
4964 if (easy_floor) return get_item_floor(cp, pmt, str, mode);
4966 #endif /* ALLOW_EASY_FLOOR -- TNB */
4970 /* Get the item index */
4971 if (repeat_pull(cp))
4973 if (*cp == 1111) { /* the_force */
4974 item_tester_tval = 0;
4975 item_tester_hook = NULL;
4986 /* Acquire object */
4989 /* Validate the item */
4990 if (item_tester_okay(o_ptr))
4992 /* Forget the item_tester_tval restriction */
4993 item_tester_tval = 0;
4995 /* Forget the item_tester_hook restriction */
4996 item_tester_hook = NULL;
5003 /* Verify the item */
5004 else if (get_item_okay(*cp))
5006 /* Forget the item_tester_tval restriction */
5007 item_tester_tval = 0;
5009 /* Forget the item_tester_hook restriction */
5010 item_tester_hook = NULL;
5017 #endif /* ALLOW_REPEAT */
5020 if (mode & (USE_EQUIP)) equip = TRUE;
5021 if (mode & (USE_INVEN)) inven = TRUE;
5022 if (mode & (USE_FLOOR)) floor = TRUE;
5025 /* Paranoia XXX XXX XXX */
5032 /* No item selected */
5036 /* Full inventory */
5038 i2 = INVEN_PACK - 1;
5040 /* Forbid inventory */
5041 if (!inven) i2 = -1;
5044 for (j = 0; j < INVEN_PACK; j++)
5045 if (item_tester_okay(&inventory[j])) max_inven++;
5048 /* Restrict inventory indexes */
5049 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5050 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5053 /* Full equipment */
5055 e2 = INVEN_TOTAL - 1;
5057 /* Forbid equipment */
5058 if (!equip) e2 = -1;
5061 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5062 if (item_tester_okay(&inventory[j])) max_equip++;
5063 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5066 /* Restrict equipment indexes */
5067 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5068 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5072 /* Restrict floor usage */
5075 /* Scan all objects in the grid */
5076 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5080 /* Acquire object */
5081 o_ptr = &o_list[this_o_idx];
5083 /* Acquire next object */
5084 next_o_idx = o_ptr->next_o_idx;
5086 /* Accept the item on the floor if legal */
5087 if (item_tester_okay(o_ptr)) allow_floor = TRUE;
5092 /* Require at least one legal choice */
5093 if (!allow_floor && (i1 > i2) && (e1 > e2))
5095 /* Cancel p_ptr->command_see */
5096 command_see = FALSE;
5104 if (select_the_force) {
5110 /* Analyze choices */
5113 /* Hack -- Start on equipment if requested */
5114 if (command_see && command_wrk && equip)
5120 /* Use inventory if allowed */
5123 command_wrk = FALSE;
5126 /* Use equipment if allowed */
5132 /* Use inventory for floor */
5135 command_wrk = FALSE;
5141 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5143 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5145 /* Hack -- start out in "display" mode */
5153 /* Repeat until done */
5156 int get_item_label = 0;
5165 for (j = 0; j < 8; j++)
5168 if (!angband_term[j]) continue;
5170 /* Count windows displaying inven */
5171 if (window_flag[j] & (PW_INVEN)) ni++;
5173 /* Count windows displaying equip */
5174 if (window_flag[j] & (PW_EQUIP)) ne++;
5177 /* Toggle if needed */
5178 if ((command_wrk && ni && !ne) ||
5179 (!command_wrk && !ni && ne))
5182 toggle_inven_equip();
5189 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5191 /* Redraw windows */
5195 /* Inventory screen */
5198 /* Extract the legal requests */
5202 /* Redraw if needed */
5203 if (command_see) get_item_label = show_inven(menu_line);
5206 /* Equipment screen */
5209 /* Extract the legal requests */
5210 n1 = I2A(e1 - INVEN_RARM);
5211 n2 = I2A(e2 - INVEN_RARM);
5213 /* Redraw if needed */
5214 if (command_see) get_item_label = show_equip(menu_line);
5217 /* Viewing inventory */
5220 /* Begin the prompt */
5222 sprintf(out_val, "»ý¤Áʪ:");
5224 sprintf(out_val, "Inven:");
5228 /* Some legal items */
5229 if ((i1 <= i2) && !use_menu)
5231 /* Build the prompt */
5233 sprintf(tmp_val, "%c-%c,",
5235 sprintf(tmp_val, " %c-%c,",
5238 index_to_label(i1), index_to_label(i2));
5241 strcat(out_val, tmp_val);
5244 /* Indicate ability to "view" */
5246 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5248 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5254 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
5255 else if (select_the_force)
5256 strcat(out_val, " 'w'Îýµ¤½Ñ,");
5258 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
5259 else if (select_the_force)
5260 strcat(out_val, " w for the Force,");
5265 /* Viewing equipment */
5268 /* Begin the prompt */
5270 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5272 sprintf(out_val, "Equip:");
5276 /* Some legal items */
5277 if ((e1 <= e2) && !use_menu)
5279 /* Build the prompt */
5281 sprintf(tmp_val, "%c-%c,",
5283 sprintf(tmp_val, " %c-%c,",
5286 index_to_label(e1), index_to_label(e2));
5289 strcat(out_val, tmp_val);
5292 /* Indicate ability to "view" */
5294 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5296 if (!command_see) strcat(out_val, " * to see,");
5302 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
5304 if (inven) strcat(out_val, " / for Inven,");
5309 /* Indicate legality of the "floor" item */
5311 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
5313 if (allow_floor) strcat(out_val, " - for floor,");
5317 /* Finish the prompt */
5318 strcat(out_val, " ESC");
5320 /* Build the prompt */
5321 sprintf(tmp_val, "(%s) %s", out_val, pmt);
5323 /* Show the prompt */
5332 int max_line = (command_wrk ? max_equip : max_inven);
5348 menu_line += (max_line - 1);
5367 /* Verify legality */
5368 if (!inven || !equip)
5374 /* Hack -- Fix screen */
5384 /* Switch inven/equip */
5385 command_wrk = !command_wrk;
5386 max_line = (command_wrk ? max_equip : max_inven);
5387 if (menu_line > max_line) menu_line = max_line;
5389 /* Need to redraw */
5398 /* Validate the item */
5399 if (!get_item_okay(get_item_label))
5405 /* Allow player to "refuse" certain actions */
5406 if (!get_item_allow(get_item_label))
5412 /* Accept that choice */
5413 (*cp) = get_item_label;
5420 if (select_the_force) {
5428 if (menu_line > max_line) menu_line -= max_line;
5449 command_see = FALSE;
5469 /* Verify legality */
5470 if (!inven || !equip)
5476 /* Hack -- Fix screen */
5486 /* Switch inven/equip */
5487 command_wrk = !command_wrk;
5489 /* Need to redraw */
5495 /* Use floor item */
5498 /* Scan all objects in the grid */
5499 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5503 /* Acquire object */
5504 o_ptr = &o_list[this_o_idx];
5506 /* Acquire next object */
5507 next_o_idx = o_ptr->next_o_idx;
5509 /* Validate the item */
5510 if (!item_tester_okay(o_ptr)) continue;
5515 /* Verify the item (if required) */
5517 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
5519 if (other_query_flag && !verify("Try", k)) continue;
5523 /* Allow player to "refuse" certain actions */
5524 if (!get_item_allow(k)) continue;
5526 /* Accept that choice */
5543 case '1': case '2': case '3':
5544 case '4': case '5': case '6':
5545 case '7': case '8': case '9':
5547 /* Look up the tag */
5548 if (!get_tag(&k, which))
5554 /* Hack -- Validate the item */
5555 if ((k < INVEN_RARM) ? !inven : !equip)
5561 /* Validate the item */
5562 if (!get_item_okay(k))
5568 /* Allow player to "refuse" certain actions */
5569 if (!get_item_allow(k))
5575 /* Accept that choice */
5587 /* Choose "default" inventory item */
5590 k = ((i1 == i2) ? i1 : -1);
5593 /* Choose "default" equipment item */
5596 k = ((e1 == e2) ? e1 : -1);
5599 /* Validate the item */
5600 if (!get_item_okay(k))
5606 /* Allow player to "refuse" certain actions */
5607 if (!get_item_allow(k))
5613 /* Accept that choice */
5622 if (select_the_force) {
5634 if(select_spellbook){
5635 bool not_found = FALSE;
5636 /* Look up the tag */
5637 if (!get_tag(&k, which))
5642 /* Hack -- Validate the item */
5643 if ((k < INVEN_RARM) ? !inven : !equip)
5648 /* Validate the item */
5649 if (!get_item_okay(k))
5655 /* Accept that choice */
5663 /* Extract "query" setting */
5664 ver = isupper(which);
5665 which = tolower(which);
5667 /* Convert letter to inventory index */
5670 k = label_to_inven(which);
5673 /* Convert letter to equipment index */
5676 k = label_to_equip(which);
5679 /* Validate the item */
5680 if (!get_item_okay(k))
5686 /* Verify the item */
5688 if (ver && !verify("ËÜÅö¤Ë", k))
5690 if (ver && !verify("Try", k))
5698 /* Allow player to "refuse" certain actions */
5699 if (!get_item_allow(k))
5705 /* Accept that choice */
5716 /* Fix the screen if necessary */
5722 /* Hack -- Cancel "display" */
5723 command_see = FALSE;
5727 /* Forget the item_tester_tval restriction */
5728 item_tester_tval = 0;
5730 item_tester_no_ryoute = FALSE;
5732 /* Forget the item_tester_hook restriction */
5733 item_tester_hook = NULL;
5739 /* Toggle again if needed */
5740 if (toggle) toggle_inven_equip();
5743 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5750 /* Clear the prompt line */
5753 /* Warning if needed */
5754 if (oops && str) msg_print(str);
5757 if (item) repeat_push(*cp);
5758 #endif /* ALLOW_REPEAT */
5765 #ifdef ALLOW_EASY_FLOOR
5770 * Return a list of o_list[] indexes of items at the given cave
5771 * location. Valid flags are:
5773 * mode & 0x01 -- Item tester
5774 * mode & 0x02 -- Marked items only
5775 * mode & 0x04 -- Stop after first
5777 bool scan_floor(int *items, int *item_num, int y, int x, int mode)
5779 int this_o_idx, next_o_idx;
5786 if (!in_bounds(y, x)) return (FALSE);
5788 /* Scan all objects in the grid */
5789 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
5793 /* Acquire object */
5794 o_ptr = &o_list[this_o_idx];
5796 /* Acquire next object */
5797 next_o_idx = o_ptr->next_o_idx;
5800 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
5803 if ((mode & 0x02) && !o_ptr->marked) continue;
5805 /* Accept this item */
5806 items[num++] = this_o_idx;
5809 if (mode & 0x04) break;
5811 /* XXX Hack -- Enforce limit */
5812 if (num == 23) break;
5815 /* Number of items */
5823 * Display a list of the items on the floor at the given location.
5825 int show_floor(int target_item, int y, int x)
5832 char o_name[MAX_NLEN];
5838 char out_desc[23][80];
5839 int target_item_label = 0;
5841 int floor_list[23], floor_num;
5843 /* Default length */
5846 /* Maximum space allowed for descriptions */
5849 /* Require space for weight (if needed) */
5850 if (show_weights) lim -= 9;
5852 /* Scan for objects in the grid, using item_tester_okay() */
5853 (void) scan_floor(floor_list, &floor_num, y, x, 0x01);
5855 /* Display the inventory */
5856 for (k = 0, i = 0; i < floor_num; i++)
5858 o_ptr = &o_list[floor_list[i]];
5860 /* Describe the object */
5861 object_desc(o_name, o_ptr, TRUE, 3);
5863 /* Hack -- enforce max length */
5866 /* Save the index */
5869 /* Acquire inventory color */
5870 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
5872 /* Save the object description */
5873 strcpy(out_desc[k], o_name);
5875 /* Find the predicted "line length" */
5876 l = strlen(out_desc[k]) + 5;
5878 /* Be sure to account for the weight */
5879 if (show_weights) l += 9;
5881 /* Maintain the maximum length */
5882 if (l > len) len = l;
5884 /* Advance to next "line" */
5888 /* Find the column to start in */
5889 col = (len > 76) ? 0 : (79 - len);
5891 /* Output each entry */
5892 for (j = 0; j < k; j++)
5895 i = floor_list[out_index[j]];
5900 /* Clear the line */
5901 prt("", j + 1, col ? col - 2 : col);
5903 if (use_menu && target_item)
5905 if (j == (target_item-1))
5908 strcpy(tmp_val, "¡Õ");
5910 strcpy(tmp_val, "> ");
5912 target_item_label = i;
5914 else strcpy(tmp_val, " ");
5917 /* Prepare an index --(-- */
5918 sprintf(tmp_val, "%c)", index_to_label(j));
5920 /* Clear the line with the (possibly indented) index */
5921 put_str(tmp_val, j + 1, col);
5923 /* Display the entry itself */
5924 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
5926 /* Display the weight if needed */
5929 int wgt = o_ptr->weight * o_ptr->number;
5931 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5933 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
5936 put_str(tmp_val, j + 1, 71);
5940 /* Make a "shadow" below the list (only if needed) */
5941 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5943 return target_item_label;
5947 * This version of get_item() is called by get_item() when
5948 * the easy_floor is on.
5950 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
5952 char n1 = ' ', n2 = ' ', which = ' ';
5954 int j, k, i1, i2, e1, e2;
5964 bool allow_equip = FALSE;
5965 bool allow_inven = FALSE;
5966 bool allow_floor = FALSE;
5968 bool toggle = FALSE;
5973 int floor_num, floor_list[23], floor_top = 0;
5975 extern bool select_spellbook;
5976 extern bool select_the_force;
5978 int menu_line = (use_menu ? 1 : 0);
5984 /* Get the item index */
5985 if (repeat_pull(cp))
5987 if (*cp == 1111) { /* the_force */
5988 item_tester_tval = 0;
5989 item_tester_hook = NULL;
6000 /* Acquire object */
6003 /* Validate the item */
6004 if (item_tester_okay(o_ptr))
6006 /* Forget the item_tester_tval restriction */
6007 item_tester_tval = 0;
6009 /* Forget the item_tester_hook restriction */
6010 item_tester_hook = NULL;
6017 /* Verify the item */
6018 else if (get_item_okay(*cp))
6020 /* Forget the item_tester_tval restriction */
6021 item_tester_tval = 0;
6023 /* Forget the item_tester_hook restriction */
6024 item_tester_hook = NULL;
6031 #endif /* ALLOW_REPEAT */
6034 if (mode & (USE_EQUIP)) equip = TRUE;
6035 if (mode & (USE_INVEN)) inven = TRUE;
6036 if (mode & (USE_FLOOR)) floor = TRUE;
6039 /* Paranoia XXX XXX XXX */
6046 /* No item selected */
6050 /* Full inventory */
6052 i2 = INVEN_PACK - 1;
6054 /* Forbid inventory */
6055 if (!inven) i2 = -1;
6058 for (j = 0; j < INVEN_PACK; j++)
6059 if (item_tester_okay(&inventory[j])) max_inven++;
6062 /* Restrict inventory indexes */
6063 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
6064 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
6067 /* Full equipment */
6069 e2 = INVEN_TOTAL - 1;
6071 /* Forbid equipment */
6072 if (!equip) e2 = -1;
6075 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
6076 if (item_tester_okay(&inventory[j])) max_equip++;
6077 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
6080 /* Restrict equipment indexes */
6081 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
6082 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
6085 /* Count "okay" floor items */
6088 /* Restrict floor usage */
6091 /* Scan all objects in the grid */
6092 (void) scan_floor(floor_list, &floor_num, py, px, 0x01);
6095 /* Accept inventory */
6096 if (i1 <= i2) allow_inven = TRUE;
6098 /* Accept equipment */
6099 if (e1 <= e2) allow_equip = TRUE;
6102 if (floor_num) allow_floor = TRUE;
6104 /* Require at least one legal choice */
6105 if (!allow_inven && !allow_equip && !allow_floor)
6107 /* Cancel p_ptr->command_see */
6108 command_see = FALSE;
6116 if (select_the_force) {
6122 /* Analyze choices */
6125 /* Hack -- Start on equipment if requested */
6126 if (command_see && (command_wrk == (USE_EQUIP))
6129 command_wrk = (USE_EQUIP);
6132 /* Use inventory if allowed */
6133 else if (allow_inven)
6135 command_wrk = (USE_INVEN);
6138 /* Use equipment if allowed */
6139 else if (allow_equip)
6141 command_wrk = (USE_EQUIP);
6144 /* Use floor if allowed */
6145 else if (allow_floor)
6147 command_wrk = (USE_FLOOR);
6152 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
6154 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
6156 /* Hack -- start out in "display" mode */
6163 /* Repeat until done */
6166 int get_item_label = 0;
6175 for (j = 0; j < 8; j++)
6178 if (!angband_term[j]) continue;
6180 /* Count windows displaying inven */
6181 if (window_flag[j] & (PW_INVEN)) ni++;
6183 /* Count windows displaying equip */
6184 if (window_flag[j] & (PW_EQUIP)) ne++;
6187 /* Toggle if needed */
6188 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
6189 (command_wrk == (USE_INVEN) && !ni && ne))
6192 toggle_inven_equip();
6199 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6201 /* Redraw windows */
6205 /* Inventory screen */
6206 if (command_wrk == (USE_INVEN))
6208 /* Extract the legal requests */
6212 /* Redraw if needed */
6213 if (command_see) get_item_label = show_inven(menu_line);
6216 /* Equipment screen */
6217 else if (command_wrk == (USE_EQUIP))
6219 /* Extract the legal requests */
6220 n1 = I2A(e1 - INVEN_RARM);
6221 n2 = I2A(e2 - INVEN_RARM);
6223 /* Redraw if needed */
6224 if (command_see) get_item_label = show_equip(menu_line);
6228 else if (command_wrk == (USE_FLOOR))
6231 k = MIN(floor_top + 23, floor_num) - 1;
6233 /* Extract the legal requests */
6234 n1 = I2A(j - floor_top);
6235 n2 = I2A(k - floor_top);
6237 /* Redraw if needed */
6238 if (command_see) get_item_label = show_floor(menu_line, py, px);
6241 /* Viewing inventory */
6242 if (command_wrk == (USE_INVEN))
6244 /* Begin the prompt */
6246 sprintf(out_val, "»ý¤Áʪ:");
6248 sprintf(out_val, "Inven:");
6253 /* Build the prompt */
6255 sprintf(tmp_val, "%c-%c,",
6257 sprintf(tmp_val, " %c-%c,",
6260 index_to_label(i1), index_to_label(i2));
6263 strcat(out_val, tmp_val);
6266 /* Indicate ability to "view" */
6268 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6270 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6281 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
6283 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6285 else strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
6287 else if (select_the_force)
6288 strcat(out_val, " 'w'Îýµ¤½Ñ,");
6295 strcat(out_val, " 6 for Equip,");
6297 strcat(out_val, " 4 or 6 for Equip,");
6299 else strcat(out_val, " / for Equip,");
6301 else if (select_the_force)
6302 strcat(out_val, " w for the Force,");
6312 strcat(out_val, " '4' ¾²¾å,");
6314 strcat(out_val, " '4'or'6' ¾²¾å,");
6316 else strcat(out_val, " '-'¾²¾å,");
6319 if (allow_floor) strcat(out_val, " - for floor,");
6324 /* Viewing equipment */
6325 else if (command_wrk == (USE_EQUIP))
6327 /* Begin the prompt */
6329 sprintf(out_val, "ÁõÈ÷ÉÊ:");
6331 sprintf(out_val, "Equip:");
6337 /* Build the prompt */
6339 sprintf(tmp_val, "%c-%c,",
6341 sprintf(tmp_val, " %c-%c,",
6344 index_to_label(e1), index_to_label(e2));
6347 strcat(out_val, tmp_val);
6350 /* Indicate ability to "view" */
6352 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6354 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6365 strcat(out_val, " '4' »ý¤Áʪ,");
6367 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6369 else strcat(out_val, " '/' »ý¤Áʪ,");
6372 if (allow_inven) strcat(out_val, " / for Inven,");
6383 strcat(out_val, " '6' ¾²¾å,");
6385 strcat(out_val, " '4'or'6' ¾²¾å,");
6387 else strcat(out_val, " '-'¾²¾å,");
6390 if (allow_floor) strcat(out_val, " - for floor,");
6396 else if (command_wrk == (USE_FLOOR))
6398 /* Begin the prompt */
6400 sprintf(out_val, "¾²¾å:");
6402 sprintf(out_val, "Floor:");
6408 /* Build the prompt */
6410 sprintf(tmp_val, "%c-%c,", n1, n2);
6412 sprintf(tmp_val, " %c-%c,", n1, n2);
6417 strcat(out_val, tmp_val);
6420 /* Indicate ability to "view" */
6422 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6424 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6430 if (allow_inven && allow_equip)
6433 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
6435 strcat(out_val, " / for Inven,");
6439 else if (allow_inven)
6442 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6444 strcat(out_val, " / for Inven,");
6448 else if (allow_equip)
6451 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6453 strcat(out_val, " / for Equip,");
6459 else if (allow_inven)
6462 strcat(out_val, " '/' »ý¤Áʪ,");
6464 strcat(out_val, " / for Inven,");
6468 else if (allow_equip)
6471 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6473 strcat(out_val, " / for Equip,");
6479 /* Finish the prompt */
6480 strcat(out_val, " ESC");
6482 /* Build the prompt */
6483 sprintf(tmp_val, "(%s) %s", out_val, pmt);
6485 /* Show the prompt */
6494 if (command_wrk == USE_INVEN) max_line = max_inven;
6495 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6496 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6512 menu_line += (max_line - 1);
6528 /* Verify legality */
6529 if (command_wrk == (USE_INVEN))
6531 if (allow_floor) command_wrk = USE_FLOOR;
6532 else if (allow_equip) command_wrk = USE_EQUIP;
6539 else if (command_wrk == (USE_EQUIP))
6541 if (allow_inven) command_wrk = USE_INVEN;
6542 else if (allow_floor) command_wrk = USE_FLOOR;
6549 else if (command_wrk == (USE_FLOOR))
6551 if (allow_equip) command_wrk = USE_EQUIP;
6552 else if (allow_inven) command_wrk = USE_INVEN;
6565 /* Hack -- Fix screen */
6575 /* Switch inven/equip */
6576 if (command_wrk == USE_INVEN) max_line = max_inven;
6577 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6578 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6579 if (menu_line > max_line) menu_line = max_line;
6581 /* Need to redraw */
6589 /* Verify legality */
6590 if (command_wrk == (USE_INVEN))
6592 if (allow_equip) command_wrk = USE_EQUIP;
6593 else if (allow_floor) command_wrk = USE_FLOOR;
6600 else if (command_wrk == (USE_EQUIP))
6602 if (allow_floor) command_wrk = USE_FLOOR;
6603 else if (allow_inven) command_wrk = USE_INVEN;
6610 else if (command_wrk == (USE_FLOOR))
6612 if (allow_inven) command_wrk = USE_INVEN;
6613 else if (allow_equip) command_wrk = USE_EQUIP;
6626 /* Hack -- Fix screen */
6636 /* Switch inven/equip */
6637 if (command_wrk == USE_INVEN) max_line = max_inven;
6638 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6639 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6640 if (menu_line > max_line) menu_line = max_line;
6642 /* Need to redraw */
6651 /* Validate the item */
6652 if (!get_item_okay(get_item_label))
6658 /* Allow player to "refuse" certain actions */
6659 if (!get_item_allow(get_item_label))
6665 /* Accept that choice */
6666 (*cp) = get_item_label;
6673 if (select_the_force) {
6681 if (menu_line > max_line) menu_line -= max_line;
6702 command_see = FALSE;
6722 if (command_wrk == (USE_INVEN))
6729 command_wrk = (USE_EQUIP);
6731 else if (command_wrk == (USE_EQUIP))
6738 command_wrk = (USE_INVEN);
6740 else if (command_wrk == (USE_FLOOR))
6744 command_wrk = (USE_INVEN);
6746 else if (allow_equip)
6748 command_wrk = (USE_EQUIP);
6757 /* Hack -- Fix screen */
6767 /* Need to redraw */
6780 * If we are already examining the floor, and there
6781 * is only one item, we will always select it.
6782 * If we aren't examining the floor and there is only
6783 * one item, we will select it if floor_query_flag
6788 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
6791 k = 0 - floor_list[0];
6793 /* Allow player to "refuse" certain actions */
6794 if (!get_item_allow(k))
6800 /* Accept that choice */
6809 /* Hack -- Fix screen */
6819 command_wrk = (USE_FLOOR);
6825 case '1': case '2': case '3':
6826 case '4': case '5': case '6':
6827 case '7': case '8': case '9':
6829 /* Look up the tag */
6830 if (!get_tag(&k, which))
6836 /* Hack -- Validate the item */
6837 if ((k < INVEN_RARM) ? !inven : !equip)
6843 /* Validate the item */
6844 if (!get_item_okay(k))
6850 /* Allow player to "refuse" certain actions */
6851 if (!get_item_allow(k))
6857 /* Accept that choice */
6869 /* Choose "default" inventory item */
6870 if (command_wrk == (USE_INVEN))
6872 k = ((i1 == i2) ? i1 : -1);
6875 /* Choose "default" equipment item */
6876 else if (command_wrk == (USE_EQUIP))
6878 k = ((e1 == e2) ? e1 : -1);
6881 /* Choose "default" floor item */
6882 else if (command_wrk == (USE_FLOOR))
6887 k = 0 - floor_list[0];
6889 /* Allow player to "refuse" certain actions */
6890 if (!get_item_allow(k))
6896 /* Accept that choice */
6904 /* Validate the item */
6905 if (!get_item_okay(k))
6911 /* Allow player to "refuse" certain actions */
6912 if (!get_item_allow(k))
6918 /* Accept that choice */
6927 if (select_the_force) {
6939 if(select_spellbook){
6940 bool not_found = FALSE;
6941 /* Look up the tag */
6942 if (!get_tag(&k, which))
6947 /* Hack -- Validate the item */
6948 if ((k < INVEN_RARM) ? !inven : !equip)
6953 /* Validate the item */
6954 if (!get_item_okay(k))
6960 /* Accept that choice */
6968 /* Extract "query" setting */
6969 ver = isupper(which);
6970 which = tolower(which);
6972 /* Convert letter to inventory index */
6973 if (command_wrk == (USE_INVEN))
6975 k = label_to_inven(which);
6978 /* Convert letter to equipment index */
6979 else if (command_wrk == (USE_EQUIP))
6981 k = label_to_equip(which);
6984 /* Convert letter to floor index */
6985 else if (command_wrk == USE_FLOOR)
6987 k = islower(which) ? A2I(which) : -1;
6988 if (k < 0 || k >= floor_num)
6995 k = 0 - floor_list[k];
6998 /* Validate the item */
6999 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
7005 /* Verify the item */
7007 if (ver && !verify("ËÜÅö¤Ë", k))
7009 if (ver && !verify("Try", k))
7017 /* Allow player to "refuse" certain actions */
7018 if (!get_item_allow(k))
7024 /* Accept that choice */
7034 /* Fix the screen if necessary */
7040 /* Hack -- Cancel "display" */
7041 command_see = FALSE;
7045 /* Forget the item_tester_tval restriction */
7046 item_tester_tval = 0;
7048 /* Forget the item_tester_hook restriction */
7049 item_tester_hook = NULL;
7055 /* Toggle again if needed */
7056 if (toggle) toggle_inven_equip();
7059 p_ptr->window |= (PW_INVEN | PW_EQUIP);
7066 /* Clear the prompt line */
7069 /* Warning if needed */
7070 if (oops && str) msg_print(str);
7073 if (item) repeat_push(*cp);
7074 #endif /* ALLOW_REPEAT */
7081 bool py_pickup_floor_aux(void)
7091 /* Restrict the choices */
7092 item_tester_hook = inven_carry_okay;
7096 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
7097 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
7099 q = "Get which item? ";
7100 s = "You no longer have any room for the objects on the floor.";
7103 if (get_item(&item, q, s, (USE_FLOOR)))
7105 this_o_idx = 0 - item;
7112 /* Access the object */
7113 o_ptr = &o_list[this_o_idx];
7115 /* Pick up the object */
7116 py_pickup_aux(this_o_idx);
7123 * Make the player carry everything in a grid
7125 * If "pickup" is FALSE then only gold will be picked up
7127 * This is called by py_pickup() when easy_floor is TRUE.
7129 void py_pickup_floor(int pickup)
7131 s16b this_o_idx, next_o_idx = 0;
7133 char o_name[MAX_NLEN];
7136 int floor_num = 0, floor_list[23], floor_o_idx = 0;
7140 /* Scan the pile of objects */
7141 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
7145 /* Access the object */
7146 o_ptr = &o_list[this_o_idx];
7148 /* Describe the object */
7149 object_desc(o_name, o_ptr, TRUE, 3);
7151 /* Access the next object */
7152 next_o_idx = o_ptr->next_o_idx;
7154 /* Hack -- disturb */
7158 if (o_ptr->tval == TV_GOLD)
7162 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
7163 (long)o_ptr->pval, o_name);
7165 msg_format("You have found %ld gold pieces worth of %s.",
7166 (long) o_ptr->pval, o_name);
7170 /* Collect the gold */
7171 p_ptr->au += o_ptr->pval;
7174 p_ptr->redraw |= (PR_GOLD);
7177 p_ptr->window |= (PW_PLAYER);
7179 /* Delete the gold */
7180 delete_object_idx(this_o_idx);
7182 /* Check the next object */
7186 /* Count non-gold objects that can be picked up. */
7187 if (inven_carry_okay(o_ptr))
7192 /* Remember this object index */
7193 floor_list[floor_num] = this_o_idx;
7195 /* Count non-gold objects */
7198 if (floor_num == 23) break;
7200 /* Remember this index */
7201 floor_o_idx = this_o_idx;
7204 /* There are no non-gold objects */
7208 /* Mention the number of objects */
7214 /* Access the object */
7215 o_ptr = &o_list[floor_o_idx];
7217 #ifdef ALLOW_EASY_SENSE
7219 /* Option: Make object sensing easy */
7222 /* Sense the object */
7223 (void) sense_object(o_ptr);
7226 #endif /* ALLOW_EASY_SENSE */
7228 /* Describe the object */
7229 object_desc(o_name, o_ptr, TRUE, 3);
7233 msg_format("%s¤¬¤¢¤ë¡£", o_name);
7235 msg_format("You see %s.", o_name);
7240 /* Multiple objects */
7245 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
7247 msg_format("You see a pile of %d items.", floor_num);
7256 /* The player has no room for anything on the floor. */
7262 /* Access the object */
7263 o_ptr = &o_list[floor_o_idx];
7265 #ifdef ALLOW_EASY_SENSE
7267 /* Option: Make object sensing easy */
7270 /* Sense the object */
7271 (void) sense_object(o_ptr);
7274 #endif /* ALLOW_EASY_SENSE */
7276 /* Describe the object */
7277 object_desc(o_name, o_ptr, TRUE, 3);
7281 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7283 msg_format("You have no room for %s.", o_name);
7288 /* Multiple objects */
7293 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7295 msg_print("You have no room for any of the objects on the floor.");
7307 /* Hack -- query every object */
7308 if (carry_query_flag)
7310 char out_val[MAX_NLEN+20];
7312 /* Access the object */
7313 o_ptr = &o_list[floor_o_idx];
7315 #ifdef ALLOW_EASY_SENSE
7317 /* Option: Make object sensing easy */
7320 /* Sense the object */
7321 (void) sense_object(o_ptr);
7324 #endif /* ALLOW_EASY_SENSE */
7326 /* Describe the object */
7327 object_desc(o_name, o_ptr, TRUE, 3);
7329 /* Build a prompt */
7331 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7333 (void) sprintf(out_val, "Pick up %s? ", o_name);
7337 /* Ask the user to confirm */
7338 if (!get_check(out_val))
7345 /* Access the object */
7346 o_ptr = &o_list[floor_o_idx];
7348 #ifdef ALLOW_EASY_SENSE
7350 /* Option: Make object sensing easy */
7353 /* Sense the object */
7354 (void) sense_object(o_ptr);
7357 #endif /* ALLOW_EASY_SENSE */
7359 /* Pick up the object */
7360 py_pickup_aux(floor_o_idx);
7363 /* Allow the user to choose an object */
7366 while (can_pickup--)
7368 if (!py_pickup_floor_aux()) break;
7373 #endif /* ALLOW_EASY_FLOOR */