3 /* Purpose: Object code, part 1 */
6 * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke
8 * This software may be copied and distributed for educational, research, and
9 * not for profit purposes provided that this copyright and statement are
10 * included in all such copies.
21 * Reset the "visual" lists
23 * This involves resetting various things to their "default" state.
25 * If the "prefs" flag is TRUE, then we will also load the appropriate
26 * "user pref file" based on the current setting of the "use_graphics"
27 * flag. This is useful for switching "graphics" on/off.
29 * The features, objects, and monsters, should all be encoded in the
30 * relevant "font.pref" and/or "graf.prf" files. XXX XXX XXX
32 * The "prefs" parameter is no longer meaningful. XXX XXX XXX
34 void reset_visuals(void)
38 /* Extract some info about terrain features */
39 for (i = 0; i < max_f_idx; i++)
41 feature_type *f_ptr = &f_info[i];
43 /* Assume we will use the underlying values */
44 f_ptr->x_attr = f_ptr->d_attr;
45 f_ptr->x_char = f_ptr->d_char;
48 /* Extract default attr/char code for objects */
49 for (i = 0; i < max_k_idx; i++)
51 object_kind *k_ptr = &k_info[i];
53 /* Default attr/char */
54 k_ptr->x_attr = k_ptr->d_attr;
55 k_ptr->x_char = k_ptr->d_char;
58 /* Extract default attr/char code for monsters */
59 for (i = 0; i < max_r_idx; i++)
61 monster_race *r_ptr = &r_info[i];
63 /* Default attr/char */
64 r_ptr->x_attr = r_ptr->d_attr;
65 r_ptr->x_char = r_ptr->d_char;
70 /* Process "graf.prf" */
71 process_pref_file("graf.prf");
77 /* Process "font.prf" */
78 process_pref_file("font.prf");
84 * Obtain the "flags" for an item
86 void object_flags(object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3)
88 object_kind *k_ptr = &k_info[o_ptr->k_idx];
91 (*f1) = k_ptr->flags1;
92 (*f2) = k_ptr->flags2;
93 (*f3) = k_ptr->flags3;
98 artifact_type *a_ptr = &a_info[o_ptr->name1];
100 (*f1) = a_ptr->flags1;
101 (*f2) = a_ptr->flags2;
102 (*f3) = a_ptr->flags3;
103 if (!cursed_p(o_ptr))
105 (*f3) &= ~(TR3_HEAVY_CURSE | TR3_CURSED);
112 ego_item_type *e_ptr = &e_info[o_ptr->name2];
114 (*f1) |= e_ptr->flags1;
115 (*f2) |= e_ptr->flags2;
116 (*f3) |= e_ptr->flags3;
118 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
120 (*f3) &= ~(TR3_SH_FIRE);
122 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
124 (*f1) &= ~(TR1_INFRA);
126 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
128 (*f2) &= ~(TR2_RES_BLIND);
129 (*f3) &= ~(TR3_SEE_INVIS);
133 /* Random artifact ! */
134 if (o_ptr->art_flags1 || o_ptr->art_flags2 || o_ptr->art_flags3)
136 (*f1) |= o_ptr->art_flags1;
137 (*f2) |= o_ptr->art_flags2;
138 (*f3) |= o_ptr->art_flags3;
142 if (!(o_ptr->art_name))
144 switch (o_ptr->xtra1)
146 case EGO_XTRA_SUSTAIN:
148 /* Choose a sustain */
149 switch (o_ptr->xtra2 % 6)
151 case 0: (*f2) |= (TR2_SUST_STR); break;
152 case 1: (*f2) |= (TR2_SUST_INT); break;
153 case 2: (*f2) |= (TR2_SUST_WIS); break;
154 case 3: (*f2) |= (TR2_SUST_DEX); break;
155 case 4: (*f2) |= (TR2_SUST_CON); break;
156 case 5: (*f2) |= (TR2_SUST_CHR); break;
165 switch (o_ptr->xtra2 % 11)
167 case 0: (*f2) |= (TR2_RES_BLIND); break;
168 case 1: (*f2) |= (TR2_RES_CONF); break;
169 case 2: (*f2) |= (TR2_RES_SOUND); break;
170 case 3: (*f2) |= (TR2_RES_SHARDS); break;
171 case 4: (*f2) |= (TR2_RES_NETHER); break;
172 case 5: (*f2) |= (TR2_RES_NEXUS); break;
173 case 6: (*f2) |= (TR2_RES_CHAOS); break;
174 case 7: (*f2) |= (TR2_RES_DISEN); break;
175 case 8: (*f2) |= (TR2_RES_POIS); break;
176 case 9: (*f2) |= (TR2_RES_DARK); break;
177 case 10: (*f2) |= (TR2_RES_LITE); break;
183 case EGO_XTRA_ABILITY:
185 /* Choose an ability */
186 switch (o_ptr->xtra2 % 8)
188 case 0: (*f3) |= (TR3_FEATHER); break;
189 case 1: (*f3) |= (TR3_LITE); break;
190 case 2: (*f3) |= (TR3_SEE_INVIS); break;
191 case 3: (*f3) |= (TR3_TELEPATHY); break;
192 case 4: (*f3) |= (TR3_SLOW_DIGEST); break;
193 case 5: (*f3) |= (TR3_REGEN); break;
194 case 6: (*f2) |= (TR2_FREE_ACT); break;
195 case 7: (*f2) |= (TR2_HOLD_LIFE); break;
203 if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
205 if (o_ptr->xtra3 < 33)
207 (*f1) |= (0x00000001 << (o_ptr->xtra3-1));
209 else if (o_ptr->xtra3 < 65)
211 (*f2) |= (0x00000001 << (o_ptr->xtra3-33));
213 else if (o_ptr->xtra3 < 97)
215 (*f3) |= (0x00000001 << (o_ptr->xtra3-65));
217 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ACID)
219 (*f2) |= TR2_RES_ACID;
221 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ELEC)
223 (*f2) |= TR2_RES_ELEC;
225 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_FIRE)
227 (*f2) |= TR2_RES_FIRE;
229 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_COLD)
231 (*f2) |= TR2_RES_COLD;
233 else if (o_ptr->xtra3 == ESSENCE_SH_FIRE)
235 (*f2) |= TR2_RES_FIRE;
236 (*f3) |= TR3_SH_FIRE;
238 else if (o_ptr->xtra3 == ESSENCE_SH_ELEC)
240 (*f2) |= TR2_RES_ELEC;
241 (*f3) |= TR3_SH_ELEC;
243 else if (o_ptr->xtra3 == ESSENCE_SH_COLD)
245 (*f2) |= TR2_RES_COLD;
246 (*f3) |= TR3_SH_COLD;
248 else if (o_ptr->xtra3 == ESSENCE_RESISTANCE)
250 (*f2) |= (TR2_RES_ACID | TR2_RES_ELEC | TR2_RES_FIRE | TR2_RES_COLD);;
258 * Obtain the "flags" for an item which are known to the player
260 void object_flags_known(object_type *o_ptr, u32b *f1, u32b *f2, u32b *f3)
264 object_kind *k_ptr = &k_info[o_ptr->k_idx];
267 (*f1) = (*f2) = (*f3) = 0L;
269 if (!object_aware_p(o_ptr)) return;
272 (*f1) = k_ptr->flags1;
273 (*f2) = k_ptr->flags2;
274 (*f3) = k_ptr->flags3;
276 /* Must be identified */
277 if (!object_known_p(o_ptr)) return;
279 /* Ego-item (known basic flags) */
282 ego_item_type *e_ptr = &e_info[o_ptr->name2];
284 (*f1) |= e_ptr->flags1;
285 (*f2) |= e_ptr->flags2;
286 (*f3) |= e_ptr->flags3;
288 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
290 (*f3) &= ~(TR3_SH_FIRE);
292 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
294 (*f1) &= ~(TR1_INFRA);
296 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
298 (*f2) &= ~(TR2_RES_BLIND);
299 (*f3) &= ~(TR3_SEE_INVIS);
304 #ifdef SPOIL_ARTIFACTS
305 /* Full knowledge for some artifacts */
306 if (artifact_p(o_ptr) || o_ptr->art_name) spoil = TRUE;
307 #endif /* SPOIL_ARTIFACTS */
309 #ifdef SPOIL_EGO_ITEMS
310 /* Full knowledge for some ego-items */
311 if (ego_item_p(o_ptr)) spoil = TRUE;
312 #endif /* SPOIL_EGO_ITEMS */
314 /* Need full knowledge or spoilers */
315 if (spoil || (o_ptr->ident & IDENT_MENTAL))
320 artifact_type *a_ptr = &a_info[o_ptr->name1];
322 (*f1) = a_ptr->flags1;
323 (*f2) = a_ptr->flags2;
324 (*f3) = a_ptr->flags3;
326 if (!cursed_p(o_ptr))
328 (*f3) &= ~(TR3_HEAVY_CURSE | TR3_CURSED);
332 /* Random artifact ! */
333 if (o_ptr->art_flags1 || o_ptr->art_flags2 || o_ptr->art_flags3)
335 (*f1) |= o_ptr->art_flags1;
336 (*f2) |= o_ptr->art_flags2;
337 (*f3) |= o_ptr->art_flags3;
340 if (!(o_ptr->art_name))
343 switch (o_ptr->xtra1)
345 case EGO_XTRA_SUSTAIN:
347 /* Choose a sustain */
348 switch (o_ptr->xtra2 % 6)
350 case 0: (*f2) |= (TR2_SUST_STR); break;
351 case 1: (*f2) |= (TR2_SUST_INT); break;
352 case 2: (*f2) |= (TR2_SUST_WIS); break;
353 case 3: (*f2) |= (TR2_SUST_DEX); break;
354 case 4: (*f2) |= (TR2_SUST_CON); break;
355 case 5: (*f2) |= (TR2_SUST_CHR); break;
364 switch (o_ptr->xtra2 % 11)
366 case 0: (*f2) |= (TR2_RES_BLIND); break;
367 case 1: (*f2) |= (TR2_RES_CONF); break;
368 case 2: (*f2) |= (TR2_RES_SOUND); break;
369 case 3: (*f2) |= (TR2_RES_SHARDS); break;
370 case 4: (*f2) |= (TR2_RES_NETHER); break;
371 case 5: (*f2) |= (TR2_RES_NEXUS); break;
372 case 6: (*f2) |= (TR2_RES_CHAOS); break;
373 case 7: (*f2) |= (TR2_RES_DISEN); break;
374 case 8: (*f2) |= (TR2_RES_POIS); break;
375 case 9: (*f2) |= (TR2_RES_DARK); break;
376 case 10: (*f2) |= (TR2_RES_LITE); break;
382 case EGO_XTRA_ABILITY:
384 /* Choose an ability */
385 switch (o_ptr->xtra2 % 8)
387 case 0: (*f3) |= (TR3_FEATHER); break;
388 case 1: (*f3) |= (TR3_LITE); break;
389 case 2: (*f3) |= (TR3_SEE_INVIS); break;
390 case 3: (*f3) |= (TR3_TELEPATHY); break;
391 case 4: (*f3) |= (TR3_SLOW_DIGEST); break;
392 case 5: (*f3) |= (TR3_REGEN); break;
393 case 6: (*f2) |= (TR2_FREE_ACT); break;
394 case 7: (*f2) |= (TR2_HOLD_LIFE); break;
403 if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
405 if (o_ptr->xtra3 < 33)
407 (*f1) |= (0x00000001 << (o_ptr->xtra3-1));
409 else if (o_ptr->xtra3 < 65)
411 (*f2) |= (0x00000001 << (o_ptr->xtra3-33));
413 else if (o_ptr->xtra3 < 97)
415 (*f3) |= (0x00000001 << (o_ptr->xtra3-65));
417 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ACID)
419 (*f2) |= TR2_RES_ACID;
421 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_ELEC)
423 (*f2) |= TR2_RES_ELEC;
425 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_FIRE)
427 (*f2) |= TR2_RES_FIRE;
429 else if (o_ptr->xtra3 == ESSENCE_TMP_RES_COLD)
431 (*f2) |= TR2_RES_COLD;
433 else if (o_ptr->xtra3 == ESSENCE_SH_FIRE)
435 (*f2) |= TR2_RES_FIRE;
436 (*f3) |= TR3_SH_FIRE;
438 else if (o_ptr->xtra3 == ESSENCE_SH_ELEC)
440 (*f2) |= TR2_RES_ELEC;
441 (*f3) |= TR3_SH_ELEC;
443 else if (o_ptr->xtra3 == ESSENCE_SH_COLD)
445 (*f2) |= TR2_RES_COLD;
446 (*f3) |= TR3_SH_COLD;
448 else if (o_ptr->xtra3 == ESSENCE_RESISTANCE)
450 (*f2) |= (TR2_RES_ACID | TR2_RES_ELEC | TR2_RES_FIRE | TR2_RES_COLD);;
456 if (o_ptr->art_flags3 & TR3_CURSED)
457 (*f3) |= (TR3_CURSED);
458 if (o_ptr->art_flags3 & TR3_HEAVY_CURSE)
459 (*f3) |= (TR3_HEAVY_CURSE);
465 * Hack -- describe an item currently in a store's inventory
466 * This allows an item to *look* like the player is "aware" of it
468 void object_desc_store(char *buf, object_type *o_ptr, int pref, int mode)
470 /* Save the "aware" flag */
471 bool hack_aware = object_aware_p(o_ptr);
473 /* Save the "known" flag */
474 bool hack_known = (o_ptr->ident & (IDENT_KNOWN)) ? TRUE : FALSE;
477 /* Set the "known" flag */
478 o_ptr->ident |= (IDENT_KNOWN);
480 /* Force "aware" for description */
481 k_info[o_ptr->k_idx].aware = TRUE;
484 /* Describe the object */
485 object_desc(buf, o_ptr, pref, mode);
488 /* Restore "aware" flag */
489 k_info[o_ptr->k_idx].aware = hack_aware;
491 /* Clear the known flag */
492 if (!hack_known) o_ptr->ident &= ~(IDENT_KNOWN);
499 * Determine the "Activation" (if any) for an artifact
500 * Return a string, or NULL for "no activation"
502 cptr item_activation(object_type *o_ptr)
506 /* Extract the flags */
507 object_flags(o_ptr, &f1, &f2, &f3);
509 /* Require activation ability */
511 if (!(f3 & (TR3_ACTIVATE))) return ("¤Ê¤·");
513 if (!(f3 & (TR3_ACTIVATE))) return ("nothing");
519 * We need to deduce somehow that it is a random artifact -- one
520 * problem: It could be a random artifact which has NOT YET received
521 * a name. Thus we eliminate other possibilities instead of checking
525 if (!(o_ptr->name1) &&
530 switch (o_ptr->xtra2)
535 return "ÂÀÍÛ¸÷Àþ : 10 ¥¿¡¼¥óËè";
537 return "beam of sunlight every 10 turns";
544 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
546 return "magic missile (2d6) every 2 turns";
553 return "°½±À (12), Ⱦ·Â 3 , 4+d4 ¥¿¡¼¥óËè";
555 return "stinking cloud (12), rad. 3, every 4+d4 turns";
562 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
564 return "lightning bolt (4d8) every 5+d5 turns";
571 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
573 return "acid bolt (5d8) every 6+d6 turns";
580 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
582 return "frost bolt (6d8) every 7+d7 turns";
589 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
591 return "fire bolt (9d8) every 8+d8 turns";
598 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (48) : 400 ¥¿¡¼¥óËè";
600 return "ball of cold (48) every 400 turns";
607 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (72) : 400 ¥¿¡¼¥óËè";
609 return "ball of fire (72) every 400 turns";
616 return "¥Ò¥Ã¥È¥Ý¥¤¥ó¥ÈµÛ¼ý (100) : 100+d100 ¥¿¡¼¥óËè";
618 return "drain life (100) every 100+d100 turns";
625 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 300 ¥¿¡¼¥óËè";
627 return "ball of cold (100) every 300 turns";
634 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 500 ¥¿¡¼¥óËè";
636 return "ball of lightning (100) every 500 turns";
643 return "¥Ò¥Ã¥È¥Ý¥¤¥ó¥ÈµÛ¼ý(120) : 400 ¥¿¡¼¥óËè";
645 return "drain life (120) every 400 turns";
652 return "µÛ·ì¥É¥ì¥¤¥ó (3*50) : 400 ¥¿¡¼¥óËè";
654 return "vampiric drain (3*50) every 400 turns";
661 return "Ìð (150) : 90+d90 ¥¿¡¼¥óËè";
663 return "arrows (150) every 90+d90 turns";
670 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (120) : 225+d225 ¥¿¡¼¥óËè";
672 return "fire ball (120) every 225+d225 turns";
679 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (200) : 325+d325 ¥¿¡¼¥óËè";
681 return "ball of cold (200) every 325+d325 turns";
688 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (250) : 425+d425 ¥¿¡¼¥óËè";
690 return "ball of lightning (250) every 425+d425 turns";
697 return "¥«¥Þ¥¤¥¿¥Á : 250 ¥¿¡¼¥óËè";
699 return "whirlwind attack every 250 turns";
706 return "µÛ·ì¥É¥ì¥¤¥ó (3*100) : 400 ¥¿¡¼¥óËè";
708 return "vampiric drain (3*100) every 400 turns";
715 return "call chaos : 350 ¥¿¡¼¥óËè"; /*nuke me*/
717 return "call chaos every 350 turns";
724 return "¥í¥±¥Ã¥È (120+level) : 400 ¥¿¡¼¥óËè";
726 return "launch rocket (120+level) every 400 turns";
733 return "¼Ù°Â໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
735 return "dispel evil (level*5) every 300+d300 turns";
742 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300) : 500 ¥¿¡¼¥óËè";
744 return "elemental breath (300) every 500 turns";
751 return "Á±ÎÉÂ໶ (level*5) : 300+d300 ¥¿¡¼¥óËè";
753 return "dispel good (level*5) every 300+d300 turns";
760 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
762 return "confuse monster every 15 turns";
769 return "¼þ°Ï¤Î¥â¥ó¥¹¥¿¡¼¤ò̲¤é¤»¤ë : 55 ¥¿¡¼¥óËè";
771 return "sleep nearby monsters every 55 turns";
778 return "ÃÏ¿Ì (Ⱦ·Â 10) : 50 ¥¿¡¼¥óËè";
780 return "earthquake (rad 10) every 50 turns";
787 return "¶²¹² : 3 * (level+10) ¥¿¡¼¥óËè";
789 return "terror every 3 * (level+10) turns";
796 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
798 return "teleport away every 200 turns";
802 case ACT_BANISH_EVIL:
805 return "¼Ù°¾ÃÌÇ : 250+d250 ¥¿¡¼¥óËè";
807 return "banish evil every 250+d250 turns";
814 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
816 return "genocide every 500 turns";
823 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
825 return "mass genocide every 1000 turns";
829 case ACT_CHARM_ANIMAL:
832 return "ưʪ̥λ : 300 ¥¿¡¼¥óËè";
834 return "charm animal every 300 turns";
838 case ACT_CHARM_UNDEAD:
841 return "ÉԻཾ° : 333 ¥¿¡¼¥óËè";
843 return "enslave undead every 333 turns";
847 case ACT_CHARM_OTHER:
850 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 400 ¥¿¡¼¥óËè";
852 return "charm monster every 400 turns";
856 case ACT_CHARM_ANIMALS:
859 return "ưʪͧÏ : 500 ¥¿¡¼¥óËè";
861 return "animal friendship every 500 turns";
865 case ACT_CHARM_OTHERS:
868 return "¼þÊÕ̥λ : 750 ¥¿¡¼¥óËè";
870 return "mass charm every 750 turns";
874 case ACT_SUMMON_ANIMAL:
877 return "ưʪ¾¤´ : 200+d300 ¥¿¡¼¥óËè";
879 return "summon animal every 200+d300 turns";
883 case ACT_SUMMON_PHANTOM:
886 return "»È¤¤Î´ : 200+d200 ¥¿¡¼¥óËè";
888 return "summon phantasmal servant every 200+d200 turns";
892 case ACT_SUMMON_ELEMENTAL:
895 return "¥¨¥ì¥á¥ó¥¿¥ë¾¤´ : 750 ¥¿¡¼¥óËè";
897 return "summon elemental every 750 turns";
901 case ACT_SUMMON_DEMON:
904 return "°Ë⾤´ : 666+d333 ¥¿¡¼¥óËè";
906 return "summon demon every 666+d333 turns";
910 case ACT_SUMMON_UNDEAD:
913 return "ÉԻྤ´ : 666+d333 ¥¿¡¼¥óËè";
915 return "summon undead every 666+d333 turns";
922 return "ͦµ¤²óÉü & 30 hp ²óÉü : 10 ¥¿¡¼¥óËè";
924 return "remove fear & heal 30 hp every 10 turns";
931 return "4d8 hp & ½ý²óÉü : 3+d3 ¥¿¡¼¥óËè";
933 return "heal 4d8 & wounds every 3+d3 turns";
937 case ACT_CURE_POISON:
940 return "ͦµ¤²óÉü/ÆǾä· : 5 ¥¿¡¼¥óËè";
942 return "remove fear and cure poison every 5 turns";
949 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
951 return "restore life levels every 450 turns";
958 return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃͲóÉü : 750 ¥¿¡¼¥óËè";
960 return "restore stats and life levels every 750 turns";
967 return "700 hp ²óÉü : 250 ¥¿¡¼¥óËè";
969 return "heal 700 hit points every 250 turns";
976 return "1000 hp ²óÉü : 888 ¥¿¡¼¥óËè";
978 return "heal 1000 hit points every 888 turns";
985 return "°ì»þŪ¤Ê ESP (´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
987 return "temporary ESP (dur 25+d30) every 200 turns";
994 return "»Îµ¤¹âÍȤȽËÊ¡ (´ü´Ö 50+d50) : 100+d100 ¥¿¡¼¥óËè";
996 return "heroism and blessed (dur 50+d50) every 100+d100 turns";
1003 return "Âмٰ·ë³¦ (´ü´Ö level*3 + d25) : 225+d225 ¥¿¡¼¥óËè";
1005 return "protect evil (dur level*3 + d25) every 225+d225 turns";
1009 case ACT_RESIST_ALL:
1012 return "±êÎä»ÀÅÅÆǤؤÎÂÑÀ (´ü´Ö 40+d40) : 200 ¥¿¡¼¥óËè";
1014 return "resist elements (dur 40+d40) every 200 turns";
1021 return "²Ã® (´ü´Ö 20+d20) : 250 ¥¿¡¼¥óËè";
1023 return "speed (dur 20+d20) every 250 turns";
1027 case ACT_XTRA_SPEED:
1030 return "²Ã® (´ü´Ö 75+d75) : 200+d200 ¥¿¡¼¥óËè";
1032 return "speed (dur 75+d75) every 200+d200 turns";
1039 return "¥ì¥¤¥¹²½ (level/2 + d(level/2)) : 1000 ¥¿¡¼¥óËè";
1041 return "wraith form (level/2 + d(level/2)) every 1000 turns";
1048 return "̵Ũ (´ü´Ö 8+d8) : 1000 ¥¿¡¼¥óËè";
1050 return "invulnerability (dur 8+d8) every 1000 turns";
1057 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) : 10+d10 ¥¿¡¼¥óËè";
1059 return "light area (dam 2d15) every 10+d10 turns";
1066 return "¼þÊÕ¾ÈÌÀ (¥À¥á¡¼¥¸ 2d15) & ¼þÊÕ¥Þ¥Ã¥× : 50+d50 ¥¿¡¼¥óËè";
1068 return "light (dam 2d15) & map area every 50+d50 turns";
1072 case ACT_DETECT_ALL:
1075 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
1077 return "detection every 55+d55 turns";
1081 case ACT_DETECT_XTRA:
1084 return "Á´´¶ÃΡ¢Ãµº÷¡¢*´ÕÄê* : 1000 ¥¿¡¼¥óËè";
1086 return "detection, probing and identify true every 1000 turns";
1093 return "*´ÕÄê* : 750 ¥¿¡¼¥óËè";
1095 return "identify true every 750 turns";
1102 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
1104 return "identify spell every 10 turns";
1108 case ACT_RUNE_EXPLO:
1111 return "Çúȯ¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
1113 return "explosive rune every 200 turns";
1120 return "¼é¤ê¤Î¥ë¡¼¥ó : 400 ¥¿¡¼¥óËè";
1122 return "rune of protection every 400 turns";
1129 return "¶õÊ¢½¼Â : 200 ¥¿¡¼¥óËè";
1131 return "satisfy hunger every 200 turns";
1138 return "¥É¥¢Ç˲õ : 10 ¥¿¡¼¥óËè";
1140 return "destroy doors every 10 turns";
1147 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
1149 return "stone to mud every 5 turns";
1156 return "ºÆ½¼Å¶ : 70 ¥¿¡¼¥óËè";
1158 return "recharging every 70 turns";
1165 return "Ï£¶â½Ñ : 500 ¥¿¡¼¥óËè";
1167 return "alchemy every 500 turns";
1174 return "¼¡¸µ¤ÎÈâ : 100 ¥¿¡¼¥óËè";
1176 return "dimension door every 100 turns";
1183 return "¥Æ¥ì¥Ý¡¼¥È (range 100) : 45 ¥¿¡¼¥óËè";
1185 return "teleport (range 100) every 45 turns";
1192 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1194 return "word of recall every 200 turns";
1203 return "something undefined";
1210 /* Some artifacts can be activated */
1211 switch (o_ptr->name1)
1216 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1218 return "fire bolt (9d8) every 8+d8 turns";
1225 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1227 return "frost bolt (6d8) every 7+d7 turns";
1234 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1236 return "lightning bolt (4d8) every 6+d6 turns";
1243 return "°½±À(12) : 4+d4 ¥¿¡¼¥óËè";
1245 return "stinking cloud (12) every 4+d4 turns";
1252 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(48) : 5+d5 ¥¿¡¼¥óËè";
1254 return "frost ball (48) every 5+d5 turns";
1261 return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
1263 return "remove fear and cure poison every 5 turns";
1270 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(100) : 200 ¥¿¡¼¥óËè";
1272 return "frost ball (100) every 200 turns";
1279 return "¶Ç¤Î»ÕÃľ¤´ : 500+d500 ¥¿¡¼¥óËè";
1281 return "summon the Legion of the Dawn every 500+d500 turns";
1288 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 400 ¥¿¡¼¥óËè";
1290 return "fire ball (72) every 400 turns";
1297 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 100 ¥¿¡¼¥óËè";
1299 return "large fire ball (72) every 100 turns";
1306 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(120) : 15 ¥¿¡¼¥óËè";
1308 return "large fire ball (120) every 15 turns";
1315 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 200 ¥¿¡¼¥óËè";
1317 return "haste self (20+d20 turns) every 200 turns";
1324 return "À¸Ì¿Îϵۼý(120) : 400 ¥¿¡¼¥óËè";
1326 return "drain life (120) every 400 turns";
1333 return "À¸Ì¿Îϵۼý(90) : 70 ¥¿¡¼¥óËè";
1335 return "drain life (90) every 70 turns";
1342 return "¥É¥¢/¥È¥é¥Ã¥×Ê´ºÕ : 10 ¥¿¡¼¥óËè";
1344 return "door and trap destruction every 10 turns";
1352 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
1354 return "word of recall every 200 turns";
1361 return "¥¹¥Ô¡¼¥É(20+d20¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1363 return "haste self (20+d20 turns) every 100+d100 turns";
1370 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
1372 return "identify every 10 turns";
1379 return "õº÷¡¢Á´´¶ÃΡ¢Á´´ÕÄê : 1000 ¥¿¡¼¥óËè";
1381 return "probing, detection and full id every 1000 turns";
1388 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
1390 return "mass genocide every 1000 turns";
1397 return "½ý¤Î¼£Ìþ(4d7) : 3+d3 ¥¿¡¼¥óËè";
1399 return "cure wounds (4d7) every 3+d3 turns";
1406 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
1408 return "fire branding of bolts every 999 turns";
1415 return "¥Õ¥¡¥¤¥¢¡ª : 15 ¥¿¡¼¥óËè";
1417 return "fire! every 15 turns";
1425 return "ƨÁö : 35 ¥¿¡¼¥óËè";
1427 return "a getaway every 35 turns";
1434 return "¥Æ¥ì¥Ý¡¼¥È : 25 ¥¿¡¼¥óËè";
1436 return "a teleport every 25 turns";
1443 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1445 return "lightning ball (100) every 200 turns";
1452 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
1454 return "Frost ball (100) every 200 turns";
1461 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
1463 return "stone to mud every 5 turns";
1470 return "´äÀÐÍϲò : 2 ¥¿¡¼¥óËè";
1472 return "stone to mud every 2 turns";
1476 case ART_SOULKEEPER:
1479 return "ÂÎÎϲóÉü(1000) : 888 ¥¿¡¼¥óËè";
1481 return "heal (1000) every 888 turns";
1485 case ART_BELEGENNON:
1488 return ("²óÉü (777)¡¢Ìþ¤·¡¢»Îµ¤¹âÍÈ : 300 ¥¿¡¼¥óËè");
1490 return ("heal (777), curing and heroism every 300 turns");
1497 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
1499 return "genocide every 500 turns";
1506 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
1508 return "restore life levels every 450 turns";
1515 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
1517 return "teleport away every 150 turns";
1525 return "Á´ÂÑÀ(20+d20¥¿¡¼¥ó) : 111 ¥¿¡¼¥óËè";
1527 return "resistance (20+d20 turns) every 111 turns";
1531 case ART_HOLCOLLETH:
1534 return "¥¹¥ê¡¼¥×(II) : 55 ¥¿¡¼¥óËè";
1536 return "Sleep II every 55 turns";
1543 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
1545 return "recharge item I every 70 turns";
1552 return "¥Æ¥ì¥Ý¡¼¥È : 45 ¥¿¡¼¥óËè";
1554 return "teleport every 45 turns";
1561 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
1563 return "confuse monster every 15 turns";
1567 case ART_CAMMITHRIM:
1570 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1572 return "magic missile (2d6) every 2 turns";
1579 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1581 return "fire bolt (9d8) every 8+d8 turns";
1585 case ART_PAURNIMMEN:
1588 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1590 return "frost bolt (6d8) every 7+d7 turns";
1597 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1599 return "lightning bolt (4d8) every 5+d5 turns";
1606 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
1608 return "acid bolt (5d8) every 6+d6 turns";
1615 return "ËâË¡¤ÎÌð(150) : 90+d90 ¥¿¡¼¥óËè";
1617 return "a magical arrow (150) every 90+d90 turns";
1621 case ART_HOLHENNETH:
1624 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
1626 return "detection every 55+d55 turns";
1633 return "ÂÎÎϲóÉü(500) : 500 ¥¿¡¼¥óËè";
1635 return "heal (700) every 250 turns";
1642 return "¥¹¥¿¡¼¡¦¥Ü¡¼¥ë(150) : 1000 ¥¿¡¼¥óËè";
1644 return "star ball (150) every 1000 turns";
1648 case ART_BLADETURNER:
1651 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300), »Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢ÂÑÀ";
1653 return "breathe elements (300), hero, bless, and resistance";
1660 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1662 return "illumination every 10+d10 turns";
1669 return "ËâË¡¤ÎÃϿޤȸ÷ : 50+d50 ¥¿¡¼¥óËè";
1671 return "magic mapping and light every 50+d50 turns";
1678 return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô";
1680 return "clairvoyance and recall, draining you";
1688 return "¼Ù°Â໶(x5) : 200+d200 ¥¿¡¼¥óËè";
1690 return "dispel evil (x5) every 200+d200 turns";
1697 return "¼Ù°Â໶(x5) : 100+d100 ¥¿¡¼¥óËè";
1699 return "dispel evil (x5) every 100+d100 turns";
1707 return "Âмٰ·ë³¦ : 225+d225 ¥¿¡¼¥óËè";
1709 return "protection from evil every 225+d225 turns";
1716 return "Ã⩹¶·â(100) : 100+d100 ¥¿¡¼¥óËè";
1718 return "a strangling attack (100) every 100+d100 turns";
1725 return "¥¹¥Ô¡¼¥É(75+d75¥¿¡¼¥ó) : 100+d100 ¥¿¡¼¥óËè";
1727 return "haste self (75+d75 turns) every 150+d150 turns";
1734 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(300) : 225+d225 ¥¿¡¼¥óËè";
1736 return "large fire ball (300) every 225+d225 turns";
1743 return "µðÂ祢¥¤¥¹¡¦¥Ü¡¼¥ë(400) : 325+d325 ¥¿¡¼¥óËè";
1745 return "large frost ball (400) every 325+d325 turns";
1753 return "µðÂ祵¥ó¥À¡¼¡¦¥Ü¡¼¥ë(500) : 425+d425 ¥¿¡¼¥óËè";
1755 return "large lightning ball (500) every 425+d425 turns";
1763 return "¿®¤¸Æñ¤¤¤³¤È : 450+d450 ¥¿¡¼¥óËè";
1765 return "bizarre things every 450+d450 turns";
1769 case ART_DOR: case ART_TERROR: case ART_STONEMASK:
1772 return "Á´Êý¸þ¤Ø¤Î¶²Éݤθ÷Àþ";
1774 return "rays of fear in every direction";
1781 return "¤³¤Î³¬¤Ë¤¤¤ë¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òɽ¼¨ : 200¥¿¡¼¥óËè";
1783 return "list of the uniques on the level every 200 turns";
1786 case ART_STONE_LORE:
1789 return "´í¸±¤òȼ¤¦´ÕÄê : ¤¤¤Ä¤Ç¤â";
1791 return "perilous identify every turn";
1797 return "³²Ãî¤Î¶î½ü : 55+d55¥¿¡¼¥óËè";
1799 return "dispel small life every 55+d55 turns";
1805 return "¥â¥ó¥¹¥¿¡¼¶²¹² : 40+d40¥¿¡¼¥óËè";
1807 return "frighten monsters every 40+d40 turns";
1813 return "Âмٰ·ë³¦ : 200+d200 ¥¿¡¼¥óËè";
1815 return "protection from evil every 200 + d200 turns";
1821 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
1823 return "a mana bolt (120) every 120+d120 turns";
1829 return "»Îµ¤¹âÍÈ, ¥¹¥Ô¡¼¥É(50+d50¥¿¡¼¥ó) : 100+d200 ¥¿¡¼¥óËè";
1831 return "hero and +10 to speed (50) every 100+200d turns";
1837 return "âÁ¤·¤¤¸÷ : 250 ¥¿¡¼¥óËè";
1839 return "blinding light every 250 turns";
1845 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
1847 return "Recharge item every 200 turns";
1853 return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë¡£";
1855 return "Increase STR (destroyed 50%)";
1861 return "ËâÎϤÎÍò(400) : 250+d250¥¿¡¼¥óËè";
1863 return "a mana storm every 250+d250 turns";
1869 return "ʪÂΤò°ú¤´ó¤»¤ë(½ÅÎÌ25kg¤Þ¤Ç) : 25+d25¥¿¡¼¥óËè";
1871 return "a telekinesis (500 lb) every 25+d25 turns";
1877 return "¥Ï¥¦¥ó¥É¾¤´ : 300+d150¥¿¡¼¥óËè";
1879 return "summon hound every 300+d150 turns";
1885 return "µðÂ祹¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 200+d200 ¥¿¡¼¥óËè";
1887 return "large star ball (200) every 200+d200 turns";
1894 return "Îã¤Î¥¢¥ì : 150+d150 ¥¿¡¼¥óËè";
1896 return "reveal your identity every 150+d150 turns";
1903 return "Çï»ÒÌÚ¤òÂǤÁ¤Ê¤é¤¹ : ¤¤¤Ä¤Ç¤â";
1905 return "beat wooden clappers every turn";
1913 return "»Îµ¤¹âÍÈ : 30+d30¥¿¡¼¥óËè";
1915 return "heroism every 30+d30 turns";
1923 return "Ìþ¤· : 100¥¿¡¼¥óËè";
1925 return "curing every 100 turns";
1933 return "ưʪ̥λ : 200¥¿¡¼¥óËè";
1935 return "charm animal every 200 turns";
1942 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(12d8) : 50 ¥¿¡¼¥óËè";
1944 return "frost bolt (12d8) every 50 turns";
1951 return "°ÀÊѹ¹ : 3333 ¥¿¡¼¥óËè";
1953 return "change zokusei every 3333 turns";
1960 return "¥¦¥©¡¼¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 250 ¥¿¡¼¥óËè";
1962 return "water ball (200) every 250 turns";
1969 return "»Í¸ÔƧ¤ß : 100+d100¥¿¡¼¥óËè";
1971 return "shiko every 100+d100 turns";
1978 return "Î䵤¤ÎÂÑÀ : 40+d40¥¿¡¼¥óËè";
1980 return "resist cold every 40+d40 turns";
1987 return "Âý¤ÎÂç·²¾¤´ : 300+d150¥¿¡¼¥óËè";
1989 return "summon octopus every 300+d150 turns";
1995 return "°Å¹õ¤ÎÍò(250) : 150+d150 ¥¿¡¼¥óËè";
1997 return "darkness storm (250) every 150+d150 turns";
2004 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_TSURIZAO))
2007 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
2009 return "fishing : every time";
2014 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_ACID))
2017 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2019 return "resist acid every 50+d50 turns";
2023 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_ELEC))
2026 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2028 return "resist elec every 50+d50 turns";
2032 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_FIRE))
2035 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2037 return "resist fire every 50+d50 turns";
2041 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_TMP_RES_COLD))
2044 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2046 return "resist cold every 50+d50 turns";
2050 if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == ESSENCE_EARTHQUAKE))
2053 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
2055 return "earthquake every 100+d100 turns";
2059 if (o_ptr->name2 == EGO_TRUMP)
2062 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
2064 return "teleport every 50+d50 turns";
2069 if (o_ptr->name2 == EGO_LITE_ILLUMINATION)
2072 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
2074 return "illumination every 10+d10 turns";
2078 else if (o_ptr->name2 == EGO_EARTHQUAKES)
2081 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
2083 return "earthquake every 100+d100 turns";
2088 else if (o_ptr->name2 == EGO_JUMP)
2091 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
2093 return "blink every 10+d10 turns";
2098 if (o_ptr->tval == TV_RING)
2102 switch (o_ptr->name2)
2106 return "»Îµ¤¹âÍÈ : 100+d100¥¿¡¼¥óËè";
2108 return "heroism every 100+d100 turns";
2110 case EGO_RING_MAGIC_MIS:
2112 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
2114 return "magic missile (2d6) every 2 turns";
2116 case EGO_RING_FIRE_BOLT:
2118 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
2120 return "fire bolt (9d8) every 8+d8 turns";
2122 case EGO_RING_COLD_BOLT:
2124 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
2126 return "frost bolt (6d8) every 7+d7 turns";
2128 case EGO_RING_ELEC_BOLT:
2130 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
2132 return "lightning bolt (4d8) every 5+d5 turns";
2134 case EGO_RING_ACID_BOLT:
2136 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
2138 return "acid bolt (5d8) every 6+d6 turns";
2140 case EGO_RING_MANA_BOLT:
2142 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
2144 return "a mana bolt (120) every 120+d120 turns";
2146 case EGO_RING_FIRE_BALL:
2148 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2150 return "fire ball (100) every 80+d80 turns";
2152 case EGO_RING_COLD_BALL:
2154 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2156 return "cold ball (100) every 80+d80 turns";
2158 case EGO_RING_ELEC_BALL:
2160 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2162 return "elec ball (100) every 80+d80 turns";
2164 case EGO_RING_ACID_BALL:
2166 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
2168 return "acid ball (100) every 80+d80 turns";
2170 case EGO_RING_MANA_BALL:
2172 return "ËâÎϤÎÍò (250) : 300 ¥¿¡¼¥óËè";
2174 return "mana storm (250) every 300 turns";
2176 case EGO_RING_DRAGON_F:
2177 if (o_ptr->sval == SV_RING_FLAMES)
2179 return "²Ð±ê¤Î¥Ö¥ì¥¹¤È²Ð¤Ø¤ÎÂÑÀ";
2181 return "breath of fire and resist fire";
2185 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2187 return "fire breath (200) every 250 turns";
2189 case EGO_RING_DRAGON_C:
2190 if (o_ptr->sval == SV_RING_ICE)
2192 return "Î䵤¤Î¥Ö¥ì¥¹¤ÈÎ䵤¤Ø¤ÎÂÑÀ";
2194 return "breath of cold and resist cold";
2198 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
2200 return "cold breath (200) every 250 turns";
2202 case EGO_RING_M_DETECT:
2204 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃÎ : 150 ¥¿¡¼¥óËè";
2206 return "detect all monsters every 150 turns";
2208 case EGO_RING_D_SPEED:
2210 return "¥¹¥Ô¡¼¥É(15+d30¥¿¡¼¥ó) : 100 ¥¿¡¼¥óËè";
2212 return "haste self (15+d30 turns) every 100 turns";
2214 case EGO_RING_BERSERKER:
2216 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
2218 return "berserk (25+d25 turns) every 75+d75 turns";
2220 case EGO_RING_TELE_AWAY:
2222 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
2224 return "teleport away every 150 turns";
2228 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ";
2230 return "hero, bless, and ultimate resistance";
2234 switch (o_ptr->sval)
2236 case SV_RING_FLAMES:
2238 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤È²Ð¤Ø¤ÎÂÑÀ";
2240 return "ball of fire and resist fire";
2245 return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë¤ÈÎ䵤¤Ø¤ÎÂÑÀ";
2247 return "ball of cold and resist cold";
2252 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤È»À¤Ø¤ÎÂÑÀ";
2254 return "ball of acid and resist acid";
2259 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤ÈÅÅ·â¤Ø¤ÎÂÑÀ";
2261 return "ball of elec and resist elec";
2269 if (o_ptr->tval == TV_AMULET)
2273 switch (o_ptr->name2)
2277 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
2279 return "identify every 10 turns";
2284 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
2286 return "charm monster every 200 turns";
2291 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
2293 return "blink every 10+d10 turns";
2296 case EGO_AMU_TELEPORT:
2298 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
2300 return "teleport every 50+d50 turns";
2303 case EGO_AMU_D_DOOR:
2305 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
2307 return "dimension door every 200 turns";
2310 case EGO_AMU_RES_FIRE_:
2312 return "²Ð±ê¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2314 return "resist fire every 50+d50 turns";
2317 case EGO_AMU_RES_COLD_:
2319 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2321 return "resist cold every 50+d50 turns";
2324 case EGO_AMU_RES_ELEC_:
2326 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2328 return "resist elec every 50+d50 turns";
2331 case EGO_AMU_RES_ACID_:
2333 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
2335 return "resist acid every 50+d50 turns";
2338 case EGO_AMU_DETECTION:
2340 return "Á´´¶ÃÎ : 55+d55¥¿¡¼¥óËè";
2342 return "detect all floor every 55+d55 turns";
2349 if (o_ptr->tval == TV_WHISTLE)
2352 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
2354 return "call pet every 100+d100 turns";
2358 if (o_ptr->tval == TV_CAPTURE)
2361 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
2363 return "captures or releases a monster.";
2367 /* Require dragon scale mail */
2369 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
2371 if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
2375 /* Branch on the sub-type */
2376 switch (o_ptr->sval)
2378 case SV_DRAGON_BLUE:
2381 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
2383 return "breathe lightning (100) every 150+d150 turns";
2387 case SV_DRAGON_WHITE:
2390 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
2392 return "breathe frost (110) every 150+d150 turns";
2396 case SV_DRAGON_BLACK:
2399 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
2401 return "breathe acid (130) every 150+d150 turns";
2405 case SV_DRAGON_GREEN:
2408 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
2410 return "breathe poison gas (150) every 180+d180 turns";
2417 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2419 return "breathe fire (200) every 200+d200 turns";
2423 case SV_DRAGON_MULTIHUED:
2426 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
2428 return "breathe multi-hued (250) every 200+d200 turns";
2432 case SV_DRAGON_BRONZE:
2435 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
2437 return "breathe confusion (120) every 180+d180 turns";
2441 case SV_DRAGON_GOLD:
2444 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
2446 return "breathe sound (130) every 180+d180 turns";
2450 case SV_DRAGON_CHAOS:
2453 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
2455 return "breathe chaos/disenchant (220) every 200+d200 turns";
2462 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
2464 return "breathe sound/shards (230) every 200+d200 turns";
2468 case SV_DRAGON_BALANCE:
2471 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
2473 return "breathe balance (250) every 200+d200 turns";
2477 case SV_DRAGON_SHINING:
2480 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
2482 return "breathe light/darkness (200) every 200+d200 turns";
2486 case SV_DRAGON_POWER:
2489 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
2491 return "breathe the elements (300) every 200+d200 turns";
2501 return "breathe air";
2508 * Describe a "fully identified" item
2510 bool identify_fully_aux(object_type *o_ptr)
2519 /* Extract the flags */
2520 object_flags(o_ptr, &f1, &f2, &f3);
2526 roff_to_buf( a_text + a_info[ o_ptr->name1 ].text ,77-15,temp);
2527 for(j=0;temp[j];j+=1+strlen(&temp[j]))
2528 { info[i]=&temp[j];i++;}
2531 /* Mega-Hack -- describe activation */
2532 if (f3 & (TR3_ACTIVATE))
2535 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
2537 info[i++] = "It can be activated for...";
2540 info[i++] = item_activation(o_ptr);
2542 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
2544 info[i++] = "...if it is being worn.";
2549 /* Figurines, a hack */
2550 if (o_ptr->tval == TV_FIGURINE)
2553 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
2555 info[i++] = "It will transform into a pet when thrown.";
2560 /* Figurines, a hack */
2561 if (o_ptr->name1 == ART_STONEMASK)
2564 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
2566 info[i++] = "It makes you turn into a vampire permanently.";
2571 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
2574 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
2576 info[i++] = "It will attempts to kill a monster instantly.";
2581 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
2584 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
2586 info[i++] = "It strikes yourself sometimes.";
2590 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
2592 info[i++] = "It will always penetrates invulnerability barrier.";
2596 if (o_ptr->name2 == EGO_2HAND)
2599 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
2601 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
2606 if (o_ptr->name2 == EGO_RING_WIZARD)
2609 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
2611 info[i++] = "It affects your ability to use magic devices.";
2615 if (o_ptr->name2 == EGO_AMU_FOOL)
2618 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
2620 info[i++] = "It prevents you from using magic items.";
2624 if (o_ptr->name2 == EGO_RING_THROW)
2627 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2629 info[i++] = "It provides great strength when you throw an item.";
2633 if (o_ptr->name2 == EGO_AMU_NAIVETY)
2636 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
2638 info[i++] = "It decreases your magic resistance.";
2642 if (o_ptr->tval == TV_STATUE)
2644 monster_race *r_ptr = &r_info[o_ptr->pval];
2646 if (o_ptr->pval == MON_BULLGATES)
2648 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
2650 info[i++] = "It is shameful.";
2652 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
2654 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
2656 info[i++] = "It is fearful.";
2660 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
2662 info[i++] = "It is cheerful.";
2666 /* Hack -- describe lite's */
2667 if (o_ptr->tval == TV_LITE)
2669 if (o_ptr->name2 == EGO_LITE_DARKNESS)
2672 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
2674 info[i++] = "It provides no light..";
2677 else if (artifact_p(o_ptr))
2680 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2682 info[i++] = "It provides light (radius 3) forever.";
2686 else if (o_ptr->name2 == EGO_LITE_SHINE)
2688 if (o_ptr->sval == SV_LITE_FEANOR)
2691 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2693 info[i++] = "It provides light (radius 3) forever.";
2697 else if (o_ptr->sval == SV_LITE_LANTERN)
2700 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
2702 info[i++] = "It provides light (radius 3) when fueled.";
2709 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2711 info[i++] = "It provides light (radius 2) when fueled.";
2718 if (o_ptr->sval == SV_LITE_FEANOR)
2721 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2723 info[i++] = "It provides light (radius 2) forever.";
2727 else if (o_ptr->sval == SV_LITE_LANTERN)
2730 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
2732 info[i++] = "It provides light (radius 2) when fueled.";
2739 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
2741 info[i++] = "It provides light (radius 1) when fueled.";
2746 if (o_ptr->name2 == EGO_LITE_LONG)
2749 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
2751 info[i++] = "It provides light for much longer time.";
2757 /* And then describe it fully */
2759 if (f2 & (TR2_RIDING))
2761 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
2763 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
2765 info[i++] = "It is made for riding.";
2769 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
2771 info[i++] = "It is suitable for riding.";
2778 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2780 info[i++] = "It affects your strength.";
2787 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2789 info[i++] = "It affects your intelligence.";
2796 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2798 info[i++] = "It affects your wisdom.";
2805 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2807 info[i++] = "It affects your dexterity.";
2814 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2816 info[i++] = "It affects your constitution.";
2823 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2825 info[i++] = "It affects your charisma.";
2830 if (f1 & (TR1_MAGIC_MASTERY))
2833 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2835 info[i++] = "It affects your ability to use magic devices.";
2839 if (f1 & (TR1_STEALTH))
2842 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2844 info[i++] = "It affects your stealth.";
2848 if (f1 & (TR1_SEARCH))
2851 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2853 info[i++] = "It affects your searching.";
2857 if (f1 & (TR1_INFRA))
2860 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2862 info[i++] = "It affects your infravision.";
2866 if (f1 & (TR1_TUNNEL))
2869 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
2871 info[i++] = "It affects your ability to tunnel.";
2875 if (f1 & (TR1_SPEED))
2878 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2880 info[i++] = "It affects your speed.";
2884 if (f1 & (TR1_BLOWS))
2887 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
2889 info[i++] = "It affects your attack speed.";
2894 if (f1 & (TR1_BRAND_ACID))
2897 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2899 info[i++] = "It does extra damage from acid.";
2903 if (f1 & (TR1_BRAND_ELEC))
2906 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2908 info[i++] = "It does extra damage from electricity.";
2912 if (f1 & (TR1_BRAND_FIRE))
2915 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2917 info[i++] = "It does extra damage from fire.";
2921 if (f1 & (TR1_BRAND_COLD))
2924 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë";
2926 info[i++] = "It does extra damage from frost.";
2931 if (f1 & (TR1_BRAND_POIS))
2934 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
2936 info[i++] = "It poisons your foes.";
2941 if (f1 & (TR1_CHAOTIC))
2944 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
2946 info[i++] = "It produces chaotic effects.";
2951 if (f1 & (TR1_VAMPIRIC))
2954 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
2956 info[i++] = "It drains life from your foes.";
2961 if (f1 & (TR1_IMPACT))
2964 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
2966 info[i++] = "It can cause earthquakes.";
2971 if (f1 & (TR1_VORPAL))
2974 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2976 info[i++] = "It is very sharp and can cut your foes.";
2981 if (f1 & (TR1_KILL_DRAGON))
2984 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2986 info[i++] = "It is a great bane of dragons.";
2990 else if (f1 & (TR1_SLAY_DRAGON))
2993 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2995 info[i++] = "It is especially deadly against dragons.";
2999 if (f1 & (TR1_SLAY_ORC))
3002 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
3004 info[i++] = "It is especially deadly against orcs.";
3008 if (f1 & (TR1_SLAY_TROLL))
3011 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
3013 info[i++] = "It is especially deadly against trolls.";
3017 if (f1 & (TR1_SLAY_GIANT))
3019 if (o_ptr->name1 == ART_HRUNTING)
3021 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
3023 info[i++] = "It is a great bane of giants.";
3027 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
3029 info[i++] = "It is especially deadly against giants.";
3033 if (f1 & (TR1_SLAY_DEMON))
3036 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
3038 info[i++] = "It strikes at demons with holy wrath.";
3042 if (f1 & (TR1_SLAY_UNDEAD))
3045 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
3047 info[i++] = "It strikes at undead with holy wrath.";
3051 if (f1 & (TR1_SLAY_EVIL))
3054 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
3056 info[i++] = "It fights against evil with holy fury.";
3060 if (f1 & (TR1_SLAY_ANIMAL))
3063 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
3065 info[i++] = "It is especially deadly against natural creatures.";
3070 if (f1 & (TR1_FORCE_WEPON))
3073 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
3075 info[i++] = "It powerfully strikes at a monster using your mana.";
3079 if (f3 & (TR3_DEC_MANA))
3082 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
3084 info[i++] = "It decreases your mana consumption.";
3088 if (f2 & (TR2_SUST_STR))
3091 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
3093 info[i++] = "It sustains your strength.";
3097 if (f2 & (TR2_SUST_INT))
3100 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
3102 info[i++] = "It sustains your intelligence.";
3106 if (f2 & (TR2_SUST_WIS))
3109 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
3111 info[i++] = "It sustains your wisdom.";
3115 if (f2 & (TR2_SUST_DEX))
3118 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
3120 info[i++] = "It sustains your dexterity.";
3124 if (f2 & (TR2_SUST_CON))
3127 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
3129 info[i++] = "It sustains your constitution.";
3133 if (f2 & (TR2_SUST_CHR))
3136 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
3138 info[i++] = "It sustains your charisma.";
3143 if (f2 & (TR2_IM_ACID))
3146 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3148 info[i++] = "It provides immunity to acid.";
3152 if (f2 & (TR2_IM_ELEC))
3155 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3157 info[i++] = "It provides immunity to electricity.";
3161 if (f2 & (TR2_IM_FIRE))
3164 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3166 info[i++] = "It provides immunity to fire.";
3170 if (f2 & (TR2_IM_COLD))
3173 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3175 info[i++] = "It provides immunity to cold.";
3180 if (f2 & (TR2_THROW))
3183 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3185 info[i++] = "It is perfectly balanced for throwing.";
3189 if (f2 & (TR2_FREE_ACT))
3192 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
3194 info[i++] = "It provides immunity to paralysis.";
3198 if (f2 & (TR2_HOLD_LIFE))
3201 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
3203 info[i++] = "It provides resistance to life draining.";
3207 if (f2 & (TR2_RES_FEAR))
3210 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
3212 info[i++] = "It makes you completely fearless.";
3216 if (f2 & (TR2_RES_ACID))
3219 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3221 info[i++] = "It provides resistance to acid.";
3225 if (f2 & (TR2_RES_ELEC))
3228 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3230 info[i++] = "It provides resistance to electricity.";
3234 if (f2 & (TR2_RES_FIRE))
3237 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3239 info[i++] = "It provides resistance to fire.";
3243 if (f2 & (TR2_RES_COLD))
3246 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3248 info[i++] = "It provides resistance to cold.";
3252 if (f2 & (TR2_RES_POIS))
3255 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3257 info[i++] = "It provides resistance to poison.";
3262 if (f2 & (TR2_RES_LITE))
3265 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3267 info[i++] = "It provides resistance to light.";
3271 if (f2 & (TR2_RES_DARK))
3274 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3276 info[i++] = "It provides resistance to dark.";
3281 if (f2 & (TR2_RES_BLIND))
3284 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3286 info[i++] = "It provides resistance to blindness.";
3290 if (f2 & (TR2_RES_CONF))
3293 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3295 info[i++] = "It provides resistance to confusion.";
3299 if (f2 & (TR2_RES_SOUND))
3302 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3304 info[i++] = "It provides resistance to sound.";
3308 if (f2 & (TR2_RES_SHARDS))
3311 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3313 info[i++] = "It provides resistance to shards.";
3318 if (f2 & (TR2_RES_NETHER))
3321 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3323 info[i++] = "It provides resistance to nether.";
3327 if (f2 & (TR2_RES_NEXUS))
3330 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3332 info[i++] = "It provides resistance to nexus.";
3336 if (f2 & (TR2_RES_CHAOS))
3339 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3341 info[i++] = "It provides resistance to chaos.";
3345 if (f2 & (TR2_RES_DISEN))
3348 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
3350 info[i++] = "It provides resistance to disenchantment.";
3355 if (f3 & (TR3_FEATHER))
3358 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3360 info[i++] = "It allows you to levitate.";
3364 if (f3 & (TR3_LITE))
3366 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
3368 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë¡£";
3370 info[i++] = "It decreases radius of your light source.";
3374 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
3376 info[i++] = "It provides permanent light.";
3380 if (f3 & (TR3_SEE_INVIS))
3383 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
3385 info[i++] = "It allows you to see invisible monsters.";
3389 if (f3 & (TR3_TELEPATHY))
3392 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
3394 info[i++] = "It gives telepathic powers.";
3398 if (f3 & (TR3_SLOW_DIGEST))
3401 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
3403 info[i++] = "It slows your metabolism.";
3407 if (f3 & (TR3_REGEN))
3410 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
3412 info[i++] = "It speeds your regenerative powers.";
3416 if (f2 & (TR2_REFLECT))
3419 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
3421 info[i++] = "It reflects bolts and arrows.";
3425 if (f3 & (TR3_SH_FIRE))
3428 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3430 info[i++] = "It produces a fiery sheath.";
3434 if (f3 & (TR3_SH_ELEC))
3437 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3439 info[i++] = "It produces an electric sheath.";
3443 if (f3 & (TR3_SH_COLD))
3446 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3448 info[i++] = "It produces a coldly sheath.";
3452 if (f3 & (TR3_NO_MAGIC))
3455 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
3457 info[i++] = "It produces an anti-magic shell.";
3461 if (f3 & (TR3_NO_TELE))
3464 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
3466 info[i++] = "It prevents teleportation.";
3470 if (f3 & (TR3_XTRA_MIGHT))
3473 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3475 info[i++] = "It fires missiles with extra might.";
3479 if (f3 & (TR3_XTRA_SHOTS))
3482 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
3484 info[i++] = "It fires missiles excessively fast.";
3489 if (f3 & (TR3_DRAIN_EXP))
3492 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
3494 info[i++] = "It drains experience.";
3498 if (f3 & (TR3_TELEPORT))
3501 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
3503 info[i++] = "It induces random teleportation.";
3507 if (f3 & TR3_AGGRAVATE)
3510 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
3512 info[i++] = "It aggravates nearby creatures.";
3517 if (f3 & TR3_BLESSED)
3520 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
3522 info[i++] = "It has been blessed by the gods.";
3527 if (cursed_p(o_ptr))
3529 if (f3 & TR3_PERMA_CURSE)
3532 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3534 info[i++] = "It is permanently cursed.";
3538 else if (f3 & TR3_HEAVY_CURSE)
3541 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
3543 info[i++] = "It is heavily cursed.";
3550 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
3552 info[i++] = "It is cursed.";
3558 if (f3 & TR3_TY_CURSE)
3561 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
3563 info[i++] = "It carries an ancient foul curse.";
3568 /* XTRA HACK ARTDESC */
3569 flag = TR3_IGNORE_ACID | TR3_IGNORE_ELEC | TR3_IGNORE_FIRE | TR3_IGNORE_COLD ;
3570 if ((f3 & flag) == flag)
3573 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3575 info[i++] = "It cannot be harmed by the elements.";
3578 if (f3 & (TR3_IGNORE_ACID))
3581 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3583 info[i++] = "It cannot be harmed by acid.";
3587 if (f3 & (TR3_IGNORE_ELEC))
3590 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3592 info[i++] = "It cannot be harmed by electricity.";
3596 if (f3 & (TR3_IGNORE_FIRE))
3599 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3601 info[i++] = "It cannot be harmed by fire.";
3605 if (f3 & (TR3_IGNORE_COLD))
3608 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3610 info[i++] = "It cannot be harmed by cold.";
3615 /* XTRA HACK ARTDESC */
3618 /* No special effects */
3619 if (!i) return (FALSE);
3621 /* Save the screen */
3624 /* Erase the screen */
3625 for (k = 1; k < 24; k++) prt("", k, 13);
3627 /* Label the information */
3628 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
3630 monster_race *r_ptr = &r_info[o_ptr->pval];
3631 int namelen = strlen(r_name + r_ptr->name);
3632 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
3633 c_prt(r_ptr->d_attr, format("%c", r_ptr->d_char), 1, 18+namelen);
3634 prt("'", 1, 19+namelen);
3638 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
3640 prt(" Item Attributes:", 1, 15);
3643 /* We will print on top of the map (column 13) */
3644 for (k = 2, j = 0; j < i; j++)
3647 prt(info[j], k++, 15);
3649 /* Every 20 entries (lines 2 to 21), start over */
3650 if ((k == 22) && (j+1 < i))
3653 prt("-- ³¤¯ --", k, 15);
3655 prt("-- more --", k, 15);
3658 for (; k > 2; k--) prt("", k, 15);
3664 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
3666 prt("[Press any key to continue]", k, 15);
3671 /* Restore the screen */
3674 /* Gave knowledge */
3681 * Convert an inventory index into a one character label
3682 * Note that the label does NOT distinguish inven/equip.
3684 char index_to_label(int i)
3686 /* Indexes for "inven" are easy */
3687 if (i < INVEN_RARM) return (I2A(i));
3689 /* Indexes for "equip" are offset */
3690 return (I2A(i - INVEN_RARM));
3695 * Convert a label into the index of an item in the "inven"
3696 * Return "-1" if the label does not indicate a real item
3698 s16b label_to_inven(int c)
3703 i = (islower(c) ? A2I(c) : -1);
3705 /* Verify the index */
3706 if ((i < 0) || (i > INVEN_PACK)) return (-1);
3708 /* Empty slots can never be chosen */
3709 if (!inventory[i].k_idx) return (-1);
3711 /* Return the index */
3717 * Convert a label into the index of a item in the "equip"
3718 * Return "-1" if the label does not indicate a real item
3720 s16b label_to_equip(int c)
3725 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
3727 /* Verify the index */
3728 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
3730 /* Empty slots can never be chosen */
3731 if (!inventory[i].k_idx) return (-1);
3733 /* Return the index */
3740 * Determine which equipment slot (if any) an item likes
3742 s16b wield_slot(object_type *o_ptr)
3744 /* Slot for equipment */
3745 switch (o_ptr->tval)
3752 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
3753 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
3754 return (INVEN_LARM);
3761 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
3762 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
3763 return (INVEN_RARM);
3773 /* Use the right hand first */
3774 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
3776 /* Use the left hand for swapping (by default) */
3777 return (INVEN_LEFT);
3783 return (INVEN_NECK);
3788 return (INVEN_LITE);
3795 return (INVEN_BODY);
3800 return (INVEN_OUTER);
3806 return (INVEN_HEAD);
3811 return (INVEN_HANDS);
3816 return (INVEN_FEET);
3820 /* No slot available */
3826 * Return a string mentioning how a given item is carried
3828 cptr mention_use(int i)
3832 /* Examine the location */
3836 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê"); break;
3838 case INVEN_RARM: p = "Wielding"; break;
3842 case INVEN_LARM: p = (left_hander ? " ±¦¼ê" : " º¸¼ê"); break;
3844 case INVEN_LARM: p = "On arm"; break;
3848 case INVEN_BOW: p = "¼Í·âÍÑ"; break;
3850 case INVEN_BOW: p = "Shooting"; break;
3854 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
3856 case INVEN_LEFT: p = "On left hand"; break;
3860 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
3862 case INVEN_RIGHT: p = "On right hand"; break;
3866 case INVEN_NECK: p = " ¼ó"; break;
3868 case INVEN_NECK: p = "Around neck"; break;
3872 case INVEN_LITE: p = " ¸÷¸»"; break;
3874 case INVEN_LITE: p = "Light source"; break;
3878 case INVEN_BODY: p = " ÂÎ"; break;
3880 case INVEN_BODY: p = "On body"; break;
3884 case INVEN_OUTER: p = "ÂΤξå"; break;
3886 case INVEN_OUTER: p = "About body"; break;
3890 case INVEN_HEAD: p = " Ƭ"; break;
3892 case INVEN_HEAD: p = "On head"; break;
3896 case INVEN_HANDS: p = " ¼ê"; break;
3898 case INVEN_HANDS: p = "On hands"; break;
3902 case INVEN_FEET: p = " "; break;
3904 case INVEN_FEET: p = "On feet"; break;
3908 default: p = "¥¶¥Ã¥¯"; break;
3910 default: p = "In pack"; break;
3915 /* Hack -- Heavy weapon */
3916 if (i == INVEN_RARM)
3918 if (p_ptr->heavy_wield[0])
3929 /* Hack -- Heavy weapon */
3930 if (i == INVEN_LARM)
3932 if (p_ptr->heavy_wield[1])
3943 /* Hack -- Heavy bow */
3947 o_ptr = &inventory[i];
3948 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
3959 /* Return the result */
3965 * Return a string describing how a given item is being worn.
3966 * Currently, only used for items in the equipment, not inventory.
3968 cptr describe_use(int i)
3975 case INVEN_RARM: p = p_ptr->ryoute ? " ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
3977 case INVEN_RARM: p = "attacking monsters with"; break;
3981 case INVEN_LARM: p = (left_hander ? " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
3983 case INVEN_LARM: p = "wearing on your arm"; break;
3987 case INVEN_BOW: p = "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
3989 case INVEN_BOW: p = "shooting missiles with"; break;
3993 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3995 case INVEN_LEFT: p = "wearing on your left hand"; break;
3999 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
4001 case INVEN_RIGHT: p = "wearing on your right hand"; break;
4005 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
4007 case INVEN_NECK: p = "wearing around your neck"; break;
4011 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
4013 case INVEN_LITE: p = "using to light the way"; break;
4017 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
4019 case INVEN_BODY: p = "wearing on your body"; break;
4023 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
4025 case INVEN_OUTER: p = "wearing on your back"; break;
4029 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
4031 case INVEN_HEAD: p = "wearing on your head"; break;
4035 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
4037 case INVEN_HANDS: p = "wearing on your hands"; break;
4041 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
4043 case INVEN_FEET: p = "wearing on your feet"; break;
4047 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
4049 default: p = "carrying in your pack"; break;
4054 /* Hack -- Heavy weapon */
4055 if (i == INVEN_RARM)
4058 int hold = adj_str_hold[p_ptr->stat_ind[A_STR]];
4060 if (p_ptr->ryoute) hold *= 2;
4061 o_ptr = &inventory[i];
4062 if (hold < o_ptr->weight / 10)
4073 /* Hack -- Heavy bow */
4077 o_ptr = &inventory[i];
4078 if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
4081 p = "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î";
4089 /* Return the result */
4094 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
4096 bool check_book_realm(const byte book_tval, const byte book_sval)
4098 if (book_tval < TV_LIFE_BOOK) return FALSE;
4099 if (p_ptr->pclass == CLASS_SORCERER)
4101 return is_magic(tval2realm(book_tval));
4103 else if (p_ptr->pclass == CLASS_RED_MAGE)
4105 if (is_magic(tval2realm(book_tval)))
4106 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
4108 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
4113 * Check an item against the item tester info
4115 bool item_tester_okay(object_type *o_ptr)
4117 /* Hack -- allow listing empty slots */
4118 if (item_tester_full) return (TRUE);
4120 /* Require an item */
4121 if (!o_ptr->k_idx) return (FALSE);
4123 /* Hack -- ignore "gold" */
4124 if (o_ptr->tval == TV_GOLD) return (FALSE);
4126 /* Check the tval */
4127 if (item_tester_tval)
4129 /* Is it a spellbook? If so, we need a hack -- TY */
4130 if ((item_tester_tval <= TV_DEATH_BOOK) &&
4131 (item_tester_tval >= TV_LIFE_BOOK))
4132 return check_book_realm(o_ptr->tval, o_ptr->sval);
4134 if (item_tester_tval != o_ptr->tval) return (FALSE);
4137 /* Check the hook */
4138 if (item_tester_hook)
4140 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
4151 * Choice window "shadow" of the "show_inven()" function
4153 void display_inven(void)
4155 register int i, n, z = 0;
4157 byte attr = TERM_WHITE;
4159 char o_name[MAX_NLEN];
4162 /* Find the "final" slot */
4163 for (i = 0; i < INVEN_PACK; i++)
4165 o_ptr = &inventory[i];
4167 /* Skip non-objects */
4168 if (!o_ptr->k_idx) continue;
4174 /* Display the pack */
4175 for (i = 0; i < z; i++)
4177 /* Examine the item */
4178 o_ptr = &inventory[i];
4180 /* Start with an empty "index" */
4181 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4183 /* Is this item "acceptable"? */
4184 if (item_tester_okay(o_ptr))
4186 /* Prepare an "index" */
4187 tmp_val[0] = index_to_label(i);
4189 /* Bracket the "index" --(-- */
4193 /* Display the index (or blank space) */
4194 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
4196 /* Obtain an item description */
4197 object_desc(o_name, o_ptr, TRUE, 3);
4199 /* Obtain the length of the description */
4203 attr = tval_to_attr[o_ptr->tval % 128];
4205 /* Grey out charging items */
4211 /* Display the entry itself */
4212 Term_putstr(3, i, n, attr, o_name);
4214 /* Erase the rest of the line */
4215 Term_erase(3+n, i, 255);
4217 /* Display the weight if needed */
4218 if (show_weights && o_ptr->weight)
4220 int wgt = o_ptr->weight * o_ptr->number;
4222 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
4224 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4227 Term_putstr(71, i, -1, TERM_WHITE, tmp_val);
4231 /* Erase the rest of the window */
4232 for (i = z; i < Term->hgt; i++)
4234 /* Erase the line */
4235 Term_erase(0, i, 255);
4242 * Choice window "shadow" of the "show_equip()" function
4244 void display_equip(void)
4248 byte attr = TERM_WHITE;
4250 char o_name[MAX_NLEN];
4253 /* Display the equipment */
4254 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
4256 /* Examine the item */
4257 o_ptr = &inventory[i];
4259 /* Start with an empty "index" */
4260 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
4262 /* Is this item "acceptable"? */
4263 if (item_tester_okay(o_ptr))
4265 /* Prepare an "index" */
4266 tmp_val[0] = index_to_label(i);
4268 /* Bracket the "index" --(-- */
4272 /* Display the index (or blank space) */
4273 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
4275 /* Obtain an item description */
4276 if ((i == INVEN_LARM) && p_ptr->ryoute)
4279 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
4281 strcpy(o_name, "(wielding with two-hands)");
4287 object_desc(o_name, o_ptr, TRUE, 3);
4288 attr = tval_to_attr[o_ptr->tval % 128];
4291 /* Obtain the length of the description */
4294 /* Grey out charging items */
4300 /* Display the entry itself */
4301 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
4303 /* Erase the rest of the line */
4304 Term_erase(3+n, i - INVEN_RARM, 255);
4306 /* Display the slot description (if needed) */
4309 Term_putstr(61, i - INVEN_RARM, -1, TERM_WHITE, "<--");
4310 Term_putstr(65, i - INVEN_RARM, -1, TERM_WHITE, mention_use(i));
4313 /* Display the weight (if needed) */
4314 if (show_weights && o_ptr->weight)
4316 int wgt = o_ptr->weight * o_ptr->number;
4317 int col = (show_labels ? 52 : 71);
4319 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
4321 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4324 Term_putstr(col, i - INVEN_RARM, -1, TERM_WHITE, tmp_val);
4328 /* Erase the rest of the window */
4329 for (i = INVEN_TOTAL - INVEN_RARM; i < Term->hgt; i++)
4331 /* Clear that line */
4332 Term_erase(0, i, 255);
4342 * Display the inventory.
4344 * Hack -- do not display "trailing" empty slots
4346 int show_inven(int target_item)
4348 int i, j, k, l, z = 0;
4351 char o_name[MAX_NLEN];
4355 char out_desc[23][80];
4356 int target_item_label = 0;
4359 /* Starting column */
4362 /* Default "max-length" */
4365 /* Maximum space allowed for descriptions */
4368 /* Require space for weight (if needed) */
4369 if (show_weights) lim -= 9;
4371 /* Require space for icon */
4372 if (show_item_graph) lim -= 2;
4374 /* Find the "final" slot */
4375 for (i = 0; i < INVEN_PACK; i++)
4377 o_ptr = &inventory[i];
4379 /* Skip non-objects */
4380 if (!o_ptr->k_idx) continue;
4386 /* Display the inventory */
4387 for (k = 0, i = 0; i < z; i++)
4389 o_ptr = &inventory[i];
4391 /* Is this item acceptable? */
4392 if (!item_tester_okay(o_ptr)) continue;
4394 /* Describe the object */
4395 object_desc(o_name, o_ptr, TRUE, 3);
4397 /* Hack -- enforce max length */
4400 /* Save the object index, color, and description */
4402 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4404 /* Grey out charging items */
4407 out_color[k] = TERM_L_DARK;
4410 (void)strcpy(out_desc[k], o_name);
4412 /* Find the predicted "line length" */
4413 l = strlen(out_desc[k]) + 5;
4415 /* Be sure to account for the weight */
4416 if (show_weights) l += 9;
4418 /* Account for icon if displayed */
4419 if (show_item_graph) l += 2;
4421 /* Maintain the maximum length */
4422 if (l > len) len = l;
4424 /* Advance to next "line" */
4428 /* Find the column to start in */
4429 col = (len > 76) ? 0 : (79 - len);
4431 /* Output each entry */
4432 for (j = 0; j < k; j++)
4438 o_ptr = &inventory[i];
4440 /* Clear the line */
4441 prt("", j + 1, col ? col - 2 : col);
4443 if (use_menu && target_item)
4445 if (j == (target_item-1))
4448 strcpy(tmp_val, "¡Õ");
4450 strcpy(tmp_val, "> ");
4452 target_item_label = i;
4454 else strcpy(tmp_val, " ");
4457 /* Prepare an index --(-- */
4458 sprintf(tmp_val, "%c)", index_to_label(i));
4460 /* Clear the line with the (possibly indented) index */
4461 put_str(tmp_val, j + 1, col);
4463 /* Display graphics for object, if desired */
4464 if (show_item_graph)
4466 byte a = object_attr(o_ptr);
4467 char c = object_char(o_ptr);
4470 if (a & 0x80) a |= 0x40;
4473 Term_draw(col + 3, j + 1, a, c);
4477 /* Display the entry itself */
4478 c_put_str(out_color[j], out_desc[j], j + 1, show_item_graph ? (col + 5) : (col + 3));
4480 /* Display the weight if needed */
4483 int wgt = o_ptr->weight * o_ptr->number;
4485 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4487 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4490 put_str(tmp_val, j + 1, 71);
4494 /* Make a "shadow" below the list (only if needed) */
4495 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4497 /* Save the new column */
4500 return target_item_label;
4506 * Display the equipment.
4508 int show_equip(int target_item)
4514 char o_name[MAX_NLEN];
4517 char out_desc[23][80];
4518 int target_item_label = 0;
4521 /* Starting column */
4524 /* Maximal length */
4527 /* Maximum space allowed for descriptions */
4530 /* Require space for labels (if needed) */
4532 if (show_labels) lim -= (7 + 2);
4534 if (show_labels) lim -= (14 + 2);
4538 /* Require space for weight (if needed) */
4540 if (show_weights) lim -= 10;
4542 if (show_weights) lim -= 9;
4546 if (show_item_graph) lim -= 2;
4548 /* Scan the equipment list */
4549 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
4551 o_ptr = &inventory[i];
4553 /* Is this item acceptable? */
4554 if (!item_tester_okay(o_ptr) && (!((i == INVEN_LARM) && p_ptr->ryoute) || item_tester_no_ryoute)) continue;
4557 object_desc(o_name, o_ptr, TRUE, 3);
4559 /* Truncate the description */
4562 if ((i == INVEN_LARM) && p_ptr->ryoute)
4565 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
4567 (void)strcpy(out_desc[k],"(wielding with two-hands)");
4573 (void)strcpy(out_desc[k], o_name);
4574 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4578 /* Grey out charging items */
4581 out_color[k] = TERM_L_DARK;
4584 /* Extract the maximal length (see below) */
4586 l = strlen(out_desc[k]) + (2 + 1);
4588 l = strlen(out_desc[k]) + (2 + 3);
4592 /* Increase length for labels (if needed) */
4594 if (show_labels) l += (7 + 2);
4596 if (show_labels) l += (14 + 2);
4600 /* Increase length for weight (if needed) */
4601 if (show_weights) l += 9;
4603 if (show_item_graph) l += 2;
4605 /* Maintain the max-length */
4606 if (l > len) len = l;
4608 /* Advance the entry */
4612 /* Hack -- Find a column to start in */
4614 col = (len > 74) ? 0 : (79 - len);
4616 col = (len > 76) ? 0 : (79 - len);
4620 /* Output each entry */
4621 for (j = 0; j < k; j++)
4627 o_ptr = &inventory[i];
4629 /* Clear the line */
4630 prt("", j + 1, col ? col - 2 : col);
4632 if (use_menu && target_item)
4634 if (j == (target_item-1))
4637 strcpy(tmp_val, "¡Õ");
4639 strcpy(tmp_val, "> ");
4641 target_item_label = i;
4643 else strcpy(tmp_val, " ");
4646 /* Prepare an index --(-- */
4647 sprintf(tmp_val, "%c)", index_to_label(i));
4649 /* Clear the line with the (possibly indented) index */
4650 put_str(tmp_val, j+1, col);
4652 if (show_item_graph)
4654 byte a = object_attr(o_ptr);
4655 char c = object_char(o_ptr);
4658 if (a & 0x80) a |= 0x40;
4661 Term_draw(col + 3, j + 1, a, c);
4667 /* Mention the use */
4669 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
4671 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
4674 put_str(tmp_val, j+1, show_item_graph ? col + 5 : col + 3);
4676 /* Display the entry itself */
4678 c_put_str(out_color[j], out_desc[j], j+1, show_item_graph ? col + 14 : col + 12);
4680 c_put_str(out_color[j], out_desc[j], j+1, show_item_graph ? col + 21 : col + 19);
4688 /* Display the entry itself */
4689 c_put_str(out_color[j], out_desc[j], j+1, show_item_graph ? col + 5 : col + 3);
4692 /* Display the weight if needed */
4695 int wgt = o_ptr->weight * o_ptr->number;
4697 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4699 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
4702 put_str(tmp_val, j+1, 71);
4706 /* Make a "shadow" below the list (only if needed) */
4707 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4709 /* Save the new column */
4712 return target_item_label;
4719 * Flip "inven" and "equip" in any sub-windows
4721 void toggle_inven_equip(void)
4726 for (j = 0; j < 8; j++)
4729 if (!angband_term[j]) continue;
4731 /* Flip inven to equip */
4732 if (window_flag[j] & (PW_INVEN))
4735 window_flag[j] &= ~(PW_INVEN);
4736 window_flag[j] |= (PW_EQUIP);
4739 p_ptr->window |= (PW_EQUIP);
4742 /* Flip inven to equip */
4743 else if (window_flag[j] & (PW_EQUIP))
4746 window_flag[j] &= ~(PW_EQUIP);
4747 window_flag[j] |= (PW_INVEN);
4750 p_ptr->window |= (PW_INVEN);
4758 * Verify the choice of an item.
4760 * The item can be negative to mean "item on floor".
4762 static bool verify(cptr prompt, int item)
4764 char o_name[MAX_NLEN];
4765 char out_val[MAX_NLEN+20];
4772 o_ptr = &inventory[item];
4778 o_ptr = &o_list[0 - item];
4782 object_desc(o_name, o_ptr, TRUE, 3);
4786 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
4788 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
4793 return (get_check(out_val));
4798 * Hack -- allow user to "prevent" certain choices
4800 * The item can be negative to mean "item on floor".
4802 static bool get_item_allow(int item)
4811 o_ptr = &inventory[item];
4817 o_ptr = &o_list[0 - item];
4820 /* No inscription */
4821 if (!o_ptr->inscription) return (TRUE);
4824 s = strchr(quark_str(o_ptr->inscription), '!');
4826 /* Process preventions */
4829 /* Check the "restriction" */
4830 if ((s[1] == command_cmd) || (s[1] == '*'))
4832 /* Verify the choice */
4834 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
4836 if (!verify("Really try", item)) return (FALSE);
4841 /* Find another '!' */
4842 s = strchr(s + 1, '!');
4852 * Auxiliary function for "get_item()" -- test an index
4854 static bool get_item_okay(int i)
4857 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
4859 /* Verify the item */
4860 if (!item_tester_okay(&inventory[i])) return (FALSE);
4869 * Find the "first" inventory object with the given "tag".
4871 * A "tag" is a char "n" appearing as "@n" anywhere in the
4872 * inscription of an object.
4874 * Also, the tag "@xn" will work as well, where "n" is a tag-char,
4875 * and "x" is the "current" command_cmd code.
4877 static int get_tag(int *cp, char tag)
4882 /* Check every object */
4883 for (i = 0; i < INVEN_TOTAL; ++i)
4885 object_type *o_ptr = &inventory[i];
4887 /* Skip non-objects */
4888 if (!o_ptr->k_idx) continue;
4890 /* Skip empty inscriptions */
4891 if (!o_ptr->inscription) continue;
4893 /* Skip non-choice */
4894 if (!item_tester_okay(o_ptr)) continue;
4897 s = strchr(quark_str(o_ptr->inscription), '@');
4899 /* Process all tags */
4902 /* Check the special tags */
4903 if ((s[1] == command_cmd) && (s[2] == tag))
4905 /* Save the actual inventory ID */
4912 /* Find another '@' */
4913 s = strchr(s + 1, '@');
4917 /* Check every object */
4918 for (i = 0; i < INVEN_TOTAL; ++i)
4920 object_type *o_ptr = &inventory[i];
4922 /* Skip non-objects */
4923 if (!o_ptr->k_idx) continue;
4925 /* Skip empty inscriptions */
4926 if (!o_ptr->inscription) continue;
4929 s = strchr(quark_str(o_ptr->inscription), '@');
4931 /* Process all tags */
4934 /* Check the normal tags */
4935 if (s[1] == tag && !((s[2] >= '0' && s[2] <= '9') || (s[2] >= 'a' && s[2] <= 'z') || (s[2] >= 'A' && s[2] <= 'Z')))
4937 /* Save the actual inventory ID */
4944 /* Find another '@' */
4945 s = strchr(s + 1, '@');
4956 * Let the user select an item, save its "index"
4958 * Return TRUE only if an acceptable item was chosen by the user.
4960 * The selected item must satisfy the "item_tester_hook()" function,
4961 * if that hook is set, and the "item_tester_tval", if that value is set.
4963 * All "item_tester" restrictions are cleared before this function returns.
4965 * The user is allowed to choose acceptable items from the equipment,
4966 * inventory, or floor, respectively, if the proper flag was given,
4967 * and there are any acceptable items in that location.
4969 * The equipment or inventory are displayed (even if no acceptable
4970 * items are in that location) if the proper flag was given.
4972 * If there are no acceptable items available anywhere, and "str" is
4973 * not NULL, then it will be used as the text of a warning message
4974 * before the function returns.
4976 * Note that the user must press "-" to specify the item on the floor,
4977 * and there is no way to "examine" the item on the floor, while the
4978 * use of "capital" letters will "examine" an inventory/equipment item,
4979 * and prompt for its use.
4981 * If a legal item is selected from the inventory, we save it in "cp"
4982 * directly (0 to 35), and return TRUE.
4984 * If a legal item is selected from the floor, we save it in "cp" as
4985 * a negative (-1 to -511), and return TRUE.
4987 * If no item is available, we do nothing to "cp", and we display a
4988 * warning message, using "str" if available, and return FALSE.
4990 * If no item is selected, we do nothing to "cp", and return FALSE.
4992 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
4993 * to allow the user to enter a command while viewing those screens, and
4994 * also to induce "auto-enter" of stores, and other such stuff.
4996 * Global "p_ptr->command_see" may be set before calling this function to start
4997 * out in "browse" mode. It is cleared before this function returns.
4999 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
5000 * If it is TRUE then we are viewing inventory, else equipment.
5002 * We always erase the prompt when we are done, leaving a blank line,
5003 * or a warning message, if appropriate, if no items are available.
5005 bool get_item(int *cp, cptr pmt, cptr str, int mode)
5007 s16b this_o_idx, next_o_idx = 0;
5009 char n1, n2, which = ' ';
5011 int j, k, i1, i2, e1, e2;
5021 bool allow_floor = FALSE;
5023 bool toggle = FALSE;
5029 extern bool select_spellbook;
5030 extern bool select_the_force;
5032 int menu_line = (use_menu ? 1 : 0);
5036 #ifdef ALLOW_EASY_FLOOR /* TNB */
5038 if (easy_floor) return get_item_floor(cp, pmt, str, mode);
5040 #endif /* ALLOW_EASY_FLOOR -- TNB */
5044 /* Get the item index */
5045 if (repeat_pull(cp))
5047 if (*cp == 1111) { /* the_force */
5048 item_tester_tval = 0;
5049 item_tester_hook = NULL;
5060 /* Acquire object */
5063 /* Validate the item */
5064 if (item_tester_okay(o_ptr))
5066 /* Forget the item_tester_tval restriction */
5067 item_tester_tval = 0;
5069 /* Forget the item_tester_hook restriction */
5070 item_tester_hook = NULL;
5077 /* Verify the item */
5078 else if (get_item_okay(*cp))
5080 /* Forget the item_tester_tval restriction */
5081 item_tester_tval = 0;
5083 /* Forget the item_tester_hook restriction */
5084 item_tester_hook = NULL;
5091 #endif /* ALLOW_REPEAT */
5094 if (mode & (USE_EQUIP)) equip = TRUE;
5095 if (mode & (USE_INVEN)) inven = TRUE;
5096 if (mode & (USE_FLOOR)) floor = TRUE;
5099 /* Paranoia XXX XXX XXX */
5106 /* No item selected */
5110 /* Full inventory */
5112 i2 = INVEN_PACK - 1;
5114 /* Forbid inventory */
5115 if (!inven) i2 = -1;
5118 for (j = 0; j < INVEN_PACK; j++)
5119 if (item_tester_okay(&inventory[j])) max_inven++;
5122 /* Restrict inventory indexes */
5123 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5124 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5127 /* Full equipment */
5129 e2 = INVEN_TOTAL - 1;
5131 /* Forbid equipment */
5132 if (!equip) e2 = -1;
5135 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5136 if (item_tester_okay(&inventory[j])) max_equip++;
5137 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5140 /* Restrict equipment indexes */
5141 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5142 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5146 /* Restrict floor usage */
5149 /* Scan all objects in the grid */
5150 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5154 /* Acquire object */
5155 o_ptr = &o_list[this_o_idx];
5157 /* Acquire next object */
5158 next_o_idx = o_ptr->next_o_idx;
5160 /* Accept the item on the floor if legal */
5161 if (item_tester_okay(o_ptr)) allow_floor = TRUE;
5166 /* Require at least one legal choice */
5167 if (!allow_floor && (i1 > i2) && (e1 > e2))
5169 /* Cancel p_ptr->command_see */
5170 command_see = FALSE;
5178 if (select_the_force) {
5184 /* Analyze choices */
5187 /* Hack -- Start on equipment if requested */
5188 if (command_see && command_wrk && equip)
5194 /* Use inventory if allowed */
5197 command_wrk = FALSE;
5200 /* Use equipment if allowed */
5206 /* Use inventory for floor */
5209 command_wrk = FALSE;
5215 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5217 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5219 /* Hack -- start out in "display" mode */
5227 /* Repeat until done */
5230 int get_item_label = 0;
5239 for (j = 0; j < 8; j++)
5242 if (!angband_term[j]) continue;
5244 /* Count windows displaying inven */
5245 if (window_flag[j] & (PW_INVEN)) ni++;
5247 /* Count windows displaying equip */
5248 if (window_flag[j] & (PW_EQUIP)) ne++;
5251 /* Toggle if needed */
5252 if ((command_wrk && ni && !ne) ||
5253 (!command_wrk && !ni && ne))
5256 toggle_inven_equip();
5263 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5265 /* Redraw windows */
5269 /* Inventory screen */
5272 /* Extract the legal requests */
5276 /* Redraw if needed */
5277 if (command_see) get_item_label = show_inven(menu_line);
5280 /* Equipment screen */
5283 /* Extract the legal requests */
5284 n1 = I2A(e1 - INVEN_RARM);
5285 n2 = I2A(e2 - INVEN_RARM);
5287 /* Redraw if needed */
5288 if (command_see) get_item_label = show_equip(menu_line);
5291 /* Viewing inventory */
5294 /* Begin the prompt */
5296 sprintf(out_val, "»ý¤Áʪ:");
5298 sprintf(out_val, "Inven:");
5302 /* Some legal items */
5303 if ((i1 <= i2) && !use_menu)
5305 /* Build the prompt */
5307 sprintf(tmp_val, "%c-%c,",
5309 sprintf(tmp_val, " %c-%c,",
5312 index_to_label(i1), index_to_label(i2));
5315 strcat(out_val, tmp_val);
5318 /* Indicate ability to "view" */
5320 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5322 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5328 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
5329 else if (select_the_force)
5330 strcat(out_val, " 'w'Îýµ¤½Ñ,");
5332 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
5333 else if (select_the_force)
5334 strcat(out_val, " w for the Force,");
5339 /* Viewing equipment */
5342 /* Begin the prompt */
5344 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5346 sprintf(out_val, "Equip:");
5350 /* Some legal items */
5351 if ((e1 <= e2) && !use_menu)
5353 /* Build the prompt */
5355 sprintf(tmp_val, "%c-%c,",
5357 sprintf(tmp_val, " %c-%c,",
5360 index_to_label(e1), index_to_label(e2));
5363 strcat(out_val, tmp_val);
5366 /* Indicate ability to "view" */
5368 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5370 if (!command_see) strcat(out_val, " * to see,");
5376 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
5378 if (inven) strcat(out_val, " / for Inven,");
5383 /* Indicate legality of the "floor" item */
5385 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
5387 if (allow_floor) strcat(out_val, " - for floor,");
5391 /* Finish the prompt */
5392 strcat(out_val, " ESC");
5394 /* Build the prompt */
5395 sprintf(tmp_val, "(%s) %s", out_val, pmt);
5397 /* Show the prompt */
5406 int max_line = (command_wrk ? max_equip : max_inven);
5422 menu_line += (max_line - 1);
5441 /* Verify legality */
5442 if (!inven || !equip)
5448 /* Hack -- Fix screen */
5458 /* Switch inven/equip */
5459 command_wrk = !command_wrk;
5460 max_line = (command_wrk ? max_equip : max_inven);
5461 if (menu_line > max_line) menu_line = max_line;
5463 /* Need to redraw */
5471 /* Validate the item */
5472 if (!get_item_okay(get_item_label))
5478 /* Allow player to "refuse" certain actions */
5479 if (!get_item_allow(get_item_label))
5485 /* Accept that choice */
5486 (*cp) = get_item_label;
5493 if (select_the_force) {
5501 if (menu_line > max_line) menu_line -= max_line;
5522 command_see = FALSE;
5542 /* Verify legality */
5543 if (!inven || !equip)
5549 /* Hack -- Fix screen */
5559 /* Switch inven/equip */
5560 command_wrk = !command_wrk;
5562 /* Need to redraw */
5568 /* Use floor item */
5571 /* Scan all objects in the grid */
5572 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5576 /* Acquire object */
5577 o_ptr = &o_list[this_o_idx];
5579 /* Acquire next object */
5580 next_o_idx = o_ptr->next_o_idx;
5582 /* Validate the item */
5583 if (!item_tester_okay(o_ptr)) continue;
5588 /* Verify the item (if required) */
5590 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
5592 if (other_query_flag && !verify("Try", k)) continue;
5596 /* Allow player to "refuse" certain actions */
5597 if (!get_item_allow(k)) continue;
5599 /* Accept that choice */
5616 case '1': case '2': case '3':
5617 case '4': case '5': case '6':
5618 case '7': case '8': case '9':
5620 /* Look up the tag */
5621 if (!get_tag(&k, which))
5627 /* Hack -- Validate the item */
5628 if ((k < INVEN_RARM) ? !inven : !equip)
5634 /* Validate the item */
5635 if (!get_item_okay(k))
5641 /* Allow player to "refuse" certain actions */
5642 if (!get_item_allow(k))
5648 /* Accept that choice */
5660 /* Choose "default" inventory item */
5663 k = ((i1 == i2) ? i1 : -1);
5666 /* Choose "default" equipment item */
5669 k = ((e1 == e2) ? e1 : -1);
5672 /* Validate the item */
5673 if (!get_item_okay(k))
5679 /* Allow player to "refuse" certain actions */
5680 if (!get_item_allow(k))
5686 /* Accept that choice */
5695 if (select_the_force) {
5707 if(select_spellbook){
5708 bool not_found = FALSE;
5709 /* Look up the tag */
5710 if (!get_tag(&k, which))
5715 /* Hack -- Validate the item */
5716 if ((k < INVEN_RARM) ? !inven : !equip)
5721 /* Validate the item */
5722 if (!get_item_okay(k))
5728 /* Accept that choice */
5736 /* Extract "query" setting */
5737 ver = isupper(which);
5738 which = tolower(which);
5740 /* Convert letter to inventory index */
5743 k = label_to_inven(which);
5746 /* Convert letter to equipment index */
5749 k = label_to_equip(which);
5752 /* Validate the item */
5753 if (!get_item_okay(k))
5759 /* Verify the item */
5761 if (ver && !verify("ËÜÅö¤Ë", k))
5763 if (ver && !verify("Try", k))
5771 /* Allow player to "refuse" certain actions */
5772 if (!get_item_allow(k))
5778 /* Accept that choice */
5789 /* Fix the screen if necessary */
5795 /* Hack -- Cancel "display" */
5796 command_see = FALSE;
5800 /* Forget the item_tester_tval restriction */
5801 item_tester_tval = 0;
5803 item_tester_no_ryoute = FALSE;
5805 /* Forget the item_tester_hook restriction */
5806 item_tester_hook = NULL;
5812 /* Toggle again if needed */
5813 if (toggle) toggle_inven_equip();
5816 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5823 /* Clear the prompt line */
5826 /* Warning if needed */
5827 if (oops && str) msg_print(str);
5830 if (item) repeat_push(*cp);
5831 #endif /* ALLOW_REPEAT */
5838 #ifdef ALLOW_EASY_FLOOR
5843 * Return a list of o_list[] indexes of items at the given cave
5844 * location. Valid flags are:
5846 * mode & 0x01 -- Item tester
5847 * mode & 0x02 -- Marked items only
5848 * mode & 0x04 -- Stop after first
5850 bool scan_floor(int *items, int *item_num, int y, int x, int mode)
5852 int this_o_idx, next_o_idx;
5859 if (!in_bounds(y, x)) return (FALSE);
5861 /* Scan all objects in the grid */
5862 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
5866 /* Acquire object */
5867 o_ptr = &o_list[this_o_idx];
5869 /* Acquire next object */
5870 next_o_idx = o_ptr->next_o_idx;
5873 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
5876 if ((mode & 0x02) && !o_ptr->marked) continue;
5878 /* Accept this item */
5879 items[num++] = this_o_idx;
5882 if (mode & 0x04) break;
5884 /* XXX Hack -- Enforce limit */
5885 if (num == 23) break;
5888 /* Number of items */
5896 * Display a list of the items on the floor at the given location.
5898 int show_floor(int target_item, int y, int x)
5905 char o_name[MAX_NLEN];
5911 char out_desc[23][80];
5912 int target_item_label = 0;
5914 int floor_list[23], floor_num;
5916 /* Default length */
5919 /* Maximum space allowed for descriptions */
5922 /* Require space for weight (if needed) */
5923 if (show_weights) lim -= 9;
5925 /* Scan for objects in the grid, using item_tester_okay() */
5926 (void) scan_floor(floor_list, &floor_num, y, x, 0x01);
5928 /* Display the inventory */
5929 for (k = 0, i = 0; i < floor_num; i++)
5931 o_ptr = &o_list[floor_list[i]];
5933 /* Describe the object */
5934 object_desc(o_name, o_ptr, TRUE, 3);
5936 /* Hack -- enforce max length */
5939 /* Save the index */
5942 /* Acquire inventory color */
5943 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
5945 /* Save the object description */
5946 strcpy(out_desc[k], o_name);
5948 /* Find the predicted "line length" */
5949 l = strlen(out_desc[k]) + 5;
5951 /* Be sure to account for the weight */
5952 if (show_weights) l += 9;
5954 /* Maintain the maximum length */
5955 if (l > len) len = l;
5957 /* Advance to next "line" */
5961 /* Find the column to start in */
5962 col = (len > 76) ? 0 : (79 - len);
5964 /* Output each entry */
5965 for (j = 0; j < k; j++)
5968 i = floor_list[out_index[j]];
5973 /* Clear the line */
5974 prt("", j + 1, col ? col - 2 : col);
5976 if (use_menu && target_item)
5978 if (j == (target_item-1))
5981 strcpy(tmp_val, "¡Õ");
5983 strcpy(tmp_val, "> ");
5985 target_item_label = i;
5987 else strcpy(tmp_val, " ");
5990 /* Prepare an index --(-- */
5991 sprintf(tmp_val, "%c)", index_to_label(j));
5993 /* Clear the line with the (possibly indented) index */
5994 put_str(tmp_val, j + 1, col);
5996 /* Display the entry itself */
5997 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
5999 /* Display the weight if needed */
6002 int wgt = o_ptr->weight * o_ptr->number;
6004 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
6006 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
6009 put_str(tmp_val, j + 1, 71);
6013 /* Make a "shadow" below the list (only if needed) */
6014 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
6016 return target_item_label;
6020 * This version of get_item() is called by get_item() when
6021 * the easy_floor is on.
6023 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
6025 char n1 = ' ', n2 = ' ', which = ' ';
6027 int j, k, i1, i2, e1, e2;
6037 bool allow_equip = FALSE;
6038 bool allow_inven = FALSE;
6039 bool allow_floor = FALSE;
6041 bool toggle = FALSE;
6046 int floor_num, floor_list[23], floor_top = 0;
6048 extern bool select_spellbook;
6049 extern bool select_the_force;
6051 int menu_line = (use_menu ? 1 : 0);
6057 /* Get the item index */
6058 if (repeat_pull(cp))
6060 if (*cp == 1111) { /* the_force */
6061 item_tester_tval = 0;
6062 item_tester_hook = NULL;
6073 /* Acquire object */
6076 /* Validate the item */
6077 if (item_tester_okay(o_ptr))
6079 /* Forget the item_tester_tval restriction */
6080 item_tester_tval = 0;
6082 /* Forget the item_tester_hook restriction */
6083 item_tester_hook = NULL;
6090 /* Verify the item */
6091 else if (get_item_okay(*cp))
6093 /* Forget the item_tester_tval restriction */
6094 item_tester_tval = 0;
6096 /* Forget the item_tester_hook restriction */
6097 item_tester_hook = NULL;
6104 #endif /* ALLOW_REPEAT */
6107 if (mode & (USE_EQUIP)) equip = TRUE;
6108 if (mode & (USE_INVEN)) inven = TRUE;
6109 if (mode & (USE_FLOOR)) floor = TRUE;
6112 /* Paranoia XXX XXX XXX */
6119 /* No item selected */
6123 /* Full inventory */
6125 i2 = INVEN_PACK - 1;
6127 /* Forbid inventory */
6128 if (!inven) i2 = -1;
6131 for (j = 0; j < INVEN_PACK; j++)
6132 if (item_tester_okay(&inventory[j])) max_inven++;
6135 /* Restrict inventory indexes */
6136 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
6137 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
6140 /* Full equipment */
6142 e2 = INVEN_TOTAL - 1;
6144 /* Forbid equipment */
6145 if (!equip) e2 = -1;
6148 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
6149 if (item_tester_okay(&inventory[j])) max_equip++;
6150 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
6153 /* Restrict equipment indexes */
6154 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
6155 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
6158 /* Count "okay" floor items */
6161 /* Restrict floor usage */
6164 /* Scan all objects in the grid */
6165 (void) scan_floor(floor_list, &floor_num, py, px, 0x01);
6168 /* Accept inventory */
6169 if (i1 <= i2) allow_inven = TRUE;
6171 /* Accept equipment */
6172 if (e1 <= e2) allow_equip = TRUE;
6175 if (floor_num) allow_floor = TRUE;
6177 /* Require at least one legal choice */
6178 if (!allow_inven && !allow_equip && !allow_floor)
6180 /* Cancel p_ptr->command_see */
6181 command_see = FALSE;
6189 if (select_the_force) {
6195 /* Analyze choices */
6198 /* Hack -- Start on equipment if requested */
6199 if (command_see && (command_wrk == (USE_EQUIP))
6202 command_wrk = (USE_EQUIP);
6205 /* Use inventory if allowed */
6206 else if (allow_inven)
6208 command_wrk = (USE_INVEN);
6211 /* Use equipment if allowed */
6212 else if (allow_equip)
6214 command_wrk = (USE_EQUIP);
6217 /* Use floor if allowed */
6218 else if (allow_floor)
6220 command_wrk = (USE_FLOOR);
6225 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
6227 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
6229 /* Hack -- start out in "display" mode */
6236 /* Repeat until done */
6239 int get_item_label = 0;
6248 for (j = 0; j < 8; j++)
6251 if (!angband_term[j]) continue;
6253 /* Count windows displaying inven */
6254 if (window_flag[j] & (PW_INVEN)) ni++;
6256 /* Count windows displaying equip */
6257 if (window_flag[j] & (PW_EQUIP)) ne++;
6260 /* Toggle if needed */
6261 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
6262 (command_wrk == (USE_INVEN) && !ni && ne))
6265 toggle_inven_equip();
6272 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6274 /* Redraw windows */
6278 /* Inventory screen */
6279 if (command_wrk == (USE_INVEN))
6281 /* Extract the legal requests */
6285 /* Redraw if needed */
6286 if (command_see) get_item_label = show_inven(menu_line);
6289 /* Equipment screen */
6290 else if (command_wrk == (USE_EQUIP))
6292 /* Extract the legal requests */
6293 n1 = I2A(e1 - INVEN_RARM);
6294 n2 = I2A(e2 - INVEN_RARM);
6296 /* Redraw if needed */
6297 if (command_see) get_item_label = show_equip(menu_line);
6301 else if (command_wrk == (USE_FLOOR))
6304 k = MIN(floor_top + 23, floor_num) - 1;
6306 /* Extract the legal requests */
6307 n1 = I2A(j - floor_top);
6308 n2 = I2A(k - floor_top);
6310 /* Redraw if needed */
6311 if (command_see) get_item_label = show_floor(menu_line, py, px);
6314 /* Viewing inventory */
6315 if (command_wrk == (USE_INVEN))
6317 /* Begin the prompt */
6319 sprintf(out_val, "»ý¤Áʪ:");
6321 sprintf(out_val, "Inven:");
6326 /* Build the prompt */
6328 sprintf(tmp_val, "%c-%c,",
6330 sprintf(tmp_val, " %c-%c,",
6333 index_to_label(i1), index_to_label(i2));
6336 strcat(out_val, tmp_val);
6339 /* Indicate ability to "view" */
6341 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6343 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6354 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
6356 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6358 else strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
6360 else if (select_the_force)
6361 strcat(out_val, " 'w'Îýµ¤½Ñ,");
6368 strcat(out_val, " 6 for Equip,");
6370 strcat(out_val, " 4 or 6 for Equip,");
6372 else strcat(out_val, " / for Equip,");
6374 else if (select_the_force)
6375 strcat(out_val, " w for the Force,");
6385 strcat(out_val, " '4' ¾²¾å,");
6387 strcat(out_val, " '4'or'6' ¾²¾å,");
6389 else strcat(out_val, " '-'¾²¾å,");
6392 if (allow_floor) strcat(out_val, " - for floor,");
6397 /* Viewing equipment */
6398 else if (command_wrk == (USE_EQUIP))
6400 /* Begin the prompt */
6402 sprintf(out_val, "ÁõÈ÷ÉÊ:");
6404 sprintf(out_val, "Equip:");
6410 /* Build the prompt */
6412 sprintf(tmp_val, "%c-%c,",
6414 sprintf(tmp_val, " %c-%c,",
6417 index_to_label(e1), index_to_label(e2));
6420 strcat(out_val, tmp_val);
6423 /* Indicate ability to "view" */
6425 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6427 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6438 strcat(out_val, " '4' »ý¤Áʪ,");
6440 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6442 else strcat(out_val, " '/' »ý¤Áʪ,");
6445 if (allow_inven) strcat(out_val, " / for Inven,");
6456 strcat(out_val, " '6' ¾²¾å,");
6458 strcat(out_val, " '4'or'6' ¾²¾å,");
6460 else strcat(out_val, " '-'¾²¾å,");
6463 if (allow_floor) strcat(out_val, " - for floor,");
6469 else if (command_wrk == (USE_FLOOR))
6471 /* Begin the prompt */
6473 sprintf(out_val, "¾²¾å:");
6475 sprintf(out_val, "Floor:");
6481 /* Build the prompt */
6483 sprintf(tmp_val, "%c-%c,", n1, n2);
6485 sprintf(tmp_val, " %c-%c,", n1, n2);
6490 strcat(out_val, tmp_val);
6493 /* Indicate ability to "view" */
6495 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6497 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6503 if (allow_inven && allow_equip)
6506 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
6508 strcat(out_val, " / for Inven,");
6512 else if (allow_inven)
6515 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6517 strcat(out_val, " / for Inven,");
6521 else if (allow_equip)
6524 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6526 strcat(out_val, " / for Equip,");
6532 else if (allow_inven)
6535 strcat(out_val, " '/' »ý¤Áʪ,");
6537 strcat(out_val, " / for Inven,");
6541 else if (allow_equip)
6544 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6546 strcat(out_val, " / for Equip,");
6552 /* Finish the prompt */
6553 strcat(out_val, " ESC");
6555 /* Build the prompt */
6556 sprintf(tmp_val, "(%s) %s", out_val, pmt);
6558 /* Show the prompt */
6567 if (command_wrk == USE_INVEN) max_line = max_inven;
6568 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6569 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6585 menu_line += (max_line - 1);
6601 /* Verify legality */
6602 if (command_wrk == (USE_INVEN))
6604 if (allow_floor) command_wrk = USE_FLOOR;
6605 else if (allow_equip) command_wrk = USE_EQUIP;
6612 else if (command_wrk == (USE_EQUIP))
6614 if (allow_inven) command_wrk = USE_INVEN;
6615 else if (allow_floor) command_wrk = USE_FLOOR;
6622 else if (command_wrk == (USE_FLOOR))
6624 if (allow_equip) command_wrk = USE_EQUIP;
6625 else if (allow_inven) command_wrk = USE_INVEN;
6638 /* Hack -- Fix screen */
6648 /* Switch inven/equip */
6649 if (command_wrk == USE_INVEN) max_line = max_inven;
6650 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6651 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6652 if (menu_line > max_line) menu_line = max_line;
6654 /* Need to redraw */
6662 /* Verify legality */
6663 if (command_wrk == (USE_INVEN))
6665 if (allow_equip) command_wrk = USE_EQUIP;
6666 else if (allow_floor) command_wrk = USE_FLOOR;
6673 else if (command_wrk == (USE_EQUIP))
6675 if (allow_floor) command_wrk = USE_FLOOR;
6676 else if (allow_inven) command_wrk = USE_INVEN;
6683 else if (command_wrk == (USE_FLOOR))
6685 if (allow_inven) command_wrk = USE_INVEN;
6686 else if (allow_equip) command_wrk = USE_EQUIP;
6699 /* Hack -- Fix screen */
6709 /* Switch inven/equip */
6710 if (command_wrk == USE_INVEN) max_line = max_inven;
6711 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6712 else if (command_wrk == USE_FLOOR) max_line = floor_num;
6713 if (menu_line > max_line) menu_line = max_line;
6715 /* Need to redraw */
6723 /* Validate the item */
6724 if (!get_item_okay(get_item_label))
6730 /* Allow player to "refuse" certain actions */
6731 if (!get_item_allow(get_item_label))
6737 /* Accept that choice */
6738 (*cp) = get_item_label;
6745 if (select_the_force) {
6753 if (menu_line > max_line) menu_line -= max_line;
6774 command_see = FALSE;
6794 if (command_wrk == (USE_INVEN))
6801 command_wrk = (USE_EQUIP);
6803 else if (command_wrk == (USE_EQUIP))
6810 command_wrk = (USE_INVEN);
6812 else if (command_wrk == (USE_FLOOR))
6816 command_wrk = (USE_INVEN);
6818 else if (allow_equip)
6820 command_wrk = (USE_EQUIP);
6829 /* Hack -- Fix screen */
6839 /* Need to redraw */
6852 * If we are already examining the floor, and there
6853 * is only one item, we will always select it.
6854 * If we aren't examining the floor and there is only
6855 * one item, we will select it if floor_query_flag
6860 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
6863 k = 0 - floor_list[0];
6865 /* Allow player to "refuse" certain actions */
6866 if (!get_item_allow(k))
6872 /* Accept that choice */
6881 /* Hack -- Fix screen */
6891 command_wrk = (USE_FLOOR);
6897 case '1': case '2': case '3':
6898 case '4': case '5': case '6':
6899 case '7': case '8': case '9':
6901 /* Look up the tag */
6902 if (!get_tag(&k, which))
6908 /* Hack -- Validate the item */
6909 if ((k < INVEN_RARM) ? !inven : !equip)
6915 /* Validate the item */
6916 if (!get_item_okay(k))
6922 /* Allow player to "refuse" certain actions */
6923 if (!get_item_allow(k))
6929 /* Accept that choice */
6941 /* Choose "default" inventory item */
6942 if (command_wrk == (USE_INVEN))
6944 k = ((i1 == i2) ? i1 : -1);
6947 /* Choose "default" equipment item */
6948 else if (command_wrk == (USE_EQUIP))
6950 k = ((e1 == e2) ? e1 : -1);
6953 /* Choose "default" floor item */
6954 else if (command_wrk == (USE_FLOOR))
6959 k = 0 - floor_list[0];
6961 /* Allow player to "refuse" certain actions */
6962 if (!get_item_allow(k))
6968 /* Accept that choice */
6976 /* Validate the item */
6977 if (!get_item_okay(k))
6983 /* Allow player to "refuse" certain actions */
6984 if (!get_item_allow(k))
6990 /* Accept that choice */
6999 if (select_the_force) {
7011 if(select_spellbook){
7012 bool not_found = FALSE;
7013 /* Look up the tag */
7014 if (!get_tag(&k, which))
7019 /* Hack -- Validate the item */
7020 if ((k < INVEN_RARM) ? !inven : !equip)
7025 /* Validate the item */
7026 if (!get_item_okay(k))
7032 /* Accept that choice */
7040 /* Extract "query" setting */
7041 ver = isupper(which);
7042 which = tolower(which);
7044 /* Convert letter to inventory index */
7045 if (command_wrk == (USE_INVEN))
7047 k = label_to_inven(which);
7050 /* Convert letter to equipment index */
7051 else if (command_wrk == (USE_EQUIP))
7053 k = label_to_equip(which);
7056 /* Convert letter to floor index */
7057 else if (command_wrk == USE_FLOOR)
7059 k = islower(which) ? A2I(which) : -1;
7060 if (k < 0 || k >= floor_num)
7067 k = 0 - floor_list[k];
7070 /* Validate the item */
7071 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
7077 /* Verify the item */
7079 if (ver && !verify("ËÜÅö¤Ë", k))
7081 if (ver && !verify("Try", k))
7089 /* Allow player to "refuse" certain actions */
7090 if (!get_item_allow(k))
7096 /* Accept that choice */
7106 /* Fix the screen if necessary */
7112 /* Hack -- Cancel "display" */
7113 command_see = FALSE;
7117 /* Forget the item_tester_tval restriction */
7118 item_tester_tval = 0;
7120 /* Forget the item_tester_hook restriction */
7121 item_tester_hook = NULL;
7127 /* Toggle again if needed */
7128 if (toggle) toggle_inven_equip();
7131 p_ptr->window |= (PW_INVEN | PW_EQUIP);
7138 /* Clear the prompt line */
7141 /* Warning if needed */
7142 if (oops && str) msg_print(str);
7145 if (item) repeat_push(*cp);
7146 #endif /* ALLOW_REPEAT */
7153 bool py_pickup_floor_aux(void)
7163 /* Restrict the choices */
7164 item_tester_hook = inven_carry_okay;
7168 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
7169 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
7171 q = "Get which item? ";
7172 s = "You no longer have any room for the objects on the floor.";
7175 if (get_item(&item, q, s, (USE_FLOOR)))
7177 this_o_idx = 0 - item;
7184 /* Access the object */
7185 o_ptr = &o_list[this_o_idx];
7187 /* Pick up the object */
7188 py_pickup_aux(this_o_idx);
7195 * Make the player carry everything in a grid
7197 * If "pickup" is FALSE then only gold will be picked up
7199 * This is called by py_pickup() when easy_floor is TRUE.
7201 void py_pickup_floor(int pickup)
7203 s16b this_o_idx, next_o_idx = 0;
7205 char o_name[MAX_NLEN];
7208 int floor_num = 0, floor_list[23], floor_o_idx = 0;
7212 /* Scan the pile of objects */
7213 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
7217 /* Access the object */
7218 o_ptr = &o_list[this_o_idx];
7220 /* Describe the object */
7221 object_desc(o_name, o_ptr, TRUE, 3);
7223 /* Access the next object */
7224 next_o_idx = o_ptr->next_o_idx;
7226 /* Hack -- disturb */
7230 if (o_ptr->tval == TV_GOLD)
7234 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
7235 (long)o_ptr->pval, o_name);
7237 msg_format("You have found %ld gold pieces worth of %s.",
7238 (long) o_ptr->pval, o_name);
7242 /* Collect the gold */
7243 p_ptr->au += o_ptr->pval;
7246 p_ptr->redraw |= (PR_GOLD);
7249 p_ptr->window |= (PW_PLAYER);
7251 /* Delete the gold */
7252 delete_object_idx(this_o_idx);
7254 /* Check the next object */
7258 /* Count non-gold objects that can be picked up. */
7259 if (inven_carry_okay(o_ptr))
7264 /* Remember this object index */
7265 floor_list[floor_num] = this_o_idx;
7267 /* Count non-gold objects */
7270 if (floor_num == 23) break;
7272 /* Remember this index */
7273 floor_o_idx = this_o_idx;
7276 /* There are no non-gold objects */
7280 /* Mention the number of objects */
7286 /* Access the object */
7287 o_ptr = &o_list[floor_o_idx];
7289 #ifdef ALLOW_EASY_SENSE
7291 /* Option: Make object sensing easy */
7294 /* Sense the object */
7295 (void) sense_object(o_ptr);
7298 #endif /* ALLOW_EASY_SENSE */
7300 /* Describe the object */
7301 object_desc(o_name, o_ptr, TRUE, 3);
7305 msg_format("%s¤¬¤¢¤ë¡£", o_name);
7307 msg_format("You see %s.", o_name);
7312 /* Multiple objects */
7317 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
7319 msg_format("You see a pile of %d items.", floor_num);
7328 /* The player has no room for anything on the floor. */
7334 /* Access the object */
7335 o_ptr = &o_list[floor_o_idx];
7337 #ifdef ALLOW_EASY_SENSE
7339 /* Option: Make object sensing easy */
7342 /* Sense the object */
7343 (void) sense_object(o_ptr);
7346 #endif /* ALLOW_EASY_SENSE */
7348 /* Describe the object */
7349 object_desc(o_name, o_ptr, TRUE, 3);
7353 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7355 msg_format("You have no room for %s.", o_name);
7360 /* Multiple objects */
7365 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7367 msg_print("You have no room for any of the objects on the floor.");
7379 /* Hack -- query every object */
7380 if (carry_query_flag)
7382 char out_val[MAX_NLEN+20];
7384 /* Access the object */
7385 o_ptr = &o_list[floor_o_idx];
7387 #ifdef ALLOW_EASY_SENSE
7389 /* Option: Make object sensing easy */
7392 /* Sense the object */
7393 (void) sense_object(o_ptr);
7396 #endif /* ALLOW_EASY_SENSE */
7398 /* Describe the object */
7399 object_desc(o_name, o_ptr, TRUE, 3);
7401 /* Build a prompt */
7403 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7405 (void) sprintf(out_val, "Pick up %s? ", o_name);
7409 /* Ask the user to confirm */
7410 if (!get_check(out_val))
7417 /* Access the object */
7418 o_ptr = &o_list[floor_o_idx];
7420 #ifdef ALLOW_EASY_SENSE
7422 /* Option: Make object sensing easy */
7425 /* Sense the object */
7426 (void) sense_object(o_ptr);
7429 #endif /* ALLOW_EASY_SENSE */
7431 /* Pick up the object */
7432 py_pickup_aux(floor_o_idx);
7435 /* Allow the user to choose an object */
7438 while (can_pickup--)
7440 if (!py_pickup_floor_aux()) break;
7445 #endif /* ALLOW_EASY_FLOOR */