4 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
6 * This software may be copied and distributed for educational, research,
7 * and not for profit purposes provided that this copyright and statement
8 * are included in all such copies. Other copyrights may also apply.
11 /* Purpose: Object code, part 1 */
15 #if defined(MACINTOSH) || defined(MACH_O_CARBON)
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 for (j = 0; j < F_LIT_MAX; j++)
46 f_ptr->x_attr[j] = f_ptr->d_attr[j];
47 f_ptr->x_char[j] = f_ptr->d_char[j];
51 /* Extract default attr/char code for objects */
52 for (i = 0; i < max_k_idx; i++)
54 object_kind *k_ptr = &k_info[i];
56 /* Default attr/char */
57 k_ptr->x_attr = k_ptr->d_attr;
58 k_ptr->x_char = k_ptr->d_char;
61 /* Extract default attr/char code for monsters */
62 for (i = 0; i < max_r_idx; i++)
64 monster_race *r_ptr = &r_info[i];
66 /* Default attr/char */
67 r_ptr->x_attr = r_ptr->d_attr;
68 r_ptr->x_char = r_ptr->d_char;
75 /* Process "graf.prf" */
76 process_pref_file("graf.prf");
78 /* Access the "character" pref file */
79 sprintf(buf, "graf-%s.prf", player_base);
81 /* Process "graf-<playername>.prf" */
82 process_pref_file(buf);
90 /* Process "font.prf" */
91 process_pref_file("font.prf");
93 /* Access the "character" pref file */
94 sprintf(buf, "font-%s.prf", player_base);
96 /* Process "font-<playername>.prf" */
97 process_pref_file(buf);
103 * Obtain the "flags" for an item
105 void object_flags(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
107 object_kind *k_ptr = &k_info[o_ptr->k_idx];
111 for (i = 0; i < TR_FLAG_SIZE; i++)
112 flgs[i] = k_ptr->flags[i];
115 if (object_is_fixed_artifact(o_ptr))
117 artifact_type *a_ptr = &a_info[o_ptr->name1];
119 for (i = 0; i < TR_FLAG_SIZE; i++)
120 flgs[i] = a_ptr->flags[i];
124 if (object_is_ego(o_ptr))
126 ego_item_type *e_ptr = &e_info[o_ptr->name2];
128 for (i = 0; i < TR_FLAG_SIZE; i++)
129 flgs[i] |= e_ptr->flags[i];
131 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
133 remove_flag(flgs, TR_SH_FIRE);
135 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
137 remove_flag(flgs, TR_INFRA);
139 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
141 remove_flag(flgs, TR_RES_BLIND);
142 remove_flag(flgs, TR_SEE_INVIS);
146 /* Random artifact ! */
147 for (i = 0; i < TR_FLAG_SIZE; i++)
148 flgs[i] |= o_ptr->art_flags[i];
150 if (object_is_smith(o_ptr))
152 int add = o_ptr->xtra3 - 1;
154 if (add < TR_FLAG_MAX)
158 else if (add == ESSENCE_TMP_RES_ACID)
160 add_flag(flgs, TR_RES_ACID);
161 add_flag(flgs, TR_ACTIVATE);
163 else if (add == ESSENCE_TMP_RES_ELEC)
165 add_flag(flgs, TR_RES_ELEC);
166 add_flag(flgs, TR_ACTIVATE);
168 else if (add == ESSENCE_TMP_RES_FIRE)
170 add_flag(flgs, TR_RES_FIRE);
171 add_flag(flgs, TR_ACTIVATE);
173 else if (add == ESSENCE_TMP_RES_COLD)
175 add_flag(flgs, TR_RES_COLD);
176 add_flag(flgs, TR_ACTIVATE);
178 else if (add == ESSENCE_SH_FIRE)
180 add_flag(flgs, TR_RES_FIRE);
181 add_flag(flgs, TR_SH_FIRE);
183 else if (add == ESSENCE_SH_ELEC)
185 add_flag(flgs, TR_RES_ELEC);
186 add_flag(flgs, TR_SH_ELEC);
188 else if (add == ESSENCE_SH_COLD)
190 add_flag(flgs, TR_RES_COLD);
191 add_flag(flgs, TR_SH_COLD);
193 else if (add == ESSENCE_RESISTANCE)
195 add_flag(flgs, TR_RES_ACID);
196 add_flag(flgs, TR_RES_ELEC);
197 add_flag(flgs, TR_RES_FIRE);
198 add_flag(flgs, TR_RES_COLD);
200 else if (add == TR_IMPACT)
202 add_flag(flgs, TR_ACTIVATE);
210 * Obtain the "flags" for an item which are known to the player
212 void object_flags_known(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
217 object_kind *k_ptr = &k_info[o_ptr->k_idx];
220 for (i = 0; i < TR_FLAG_SIZE; i++)
223 if (!object_is_aware(o_ptr)) return;
226 for (i = 0; i < TR_FLAG_SIZE; i++)
227 flgs[i] = k_ptr->flags[i];
229 /* Must be identified */
230 if (!object_is_known(o_ptr)) return;
232 /* Ego-item (known basic flags) */
233 if (object_is_ego(o_ptr))
235 ego_item_type *e_ptr = &e_info[o_ptr->name2];
237 for (i = 0; i < TR_FLAG_SIZE; i++)
238 flgs[i] |= e_ptr->flags[i];
240 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
242 remove_flag(flgs, TR_SH_FIRE);
244 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
246 remove_flag(flgs, TR_INFRA);
248 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
250 remove_flag(flgs, TR_RES_BLIND);
251 remove_flag(flgs, TR_SEE_INVIS);
256 #ifdef SPOIL_ARTIFACTS
257 /* Full knowledge for some artifacts */
258 if (object_is_artifact(o_ptr)) spoil = TRUE;
259 #endif /* SPOIL_ARTIFACTS */
261 #ifdef SPOIL_EGO_ITEMS
262 /* Full knowledge for some ego-items */
263 if (object_is_ego(o_ptr)) spoil = TRUE;
264 #endif /* SPOIL_EGO_ITEMS */
266 /* Need full knowledge or spoilers */
267 if (spoil || (o_ptr->ident & IDENT_MENTAL))
270 if (object_is_fixed_artifact(o_ptr))
272 artifact_type *a_ptr = &a_info[o_ptr->name1];
274 for (i = 0; i < TR_FLAG_SIZE; i++)
275 flgs[i] = a_ptr->flags[i];
278 /* Random artifact ! */
279 for (i = 0; i < TR_FLAG_SIZE; i++)
280 flgs[i] |= o_ptr->art_flags[i];
283 if (object_is_smith(o_ptr))
285 int add = o_ptr->xtra3 - 1;
287 if (add < TR_FLAG_MAX)
291 else if (add == ESSENCE_TMP_RES_ACID)
293 add_flag(flgs, TR_RES_ACID);
295 else if (add == ESSENCE_TMP_RES_ELEC)
297 add_flag(flgs, TR_RES_ELEC);
299 else if (add == ESSENCE_TMP_RES_FIRE)
301 add_flag(flgs, TR_RES_FIRE);
303 else if (add == ESSENCE_TMP_RES_COLD)
305 add_flag(flgs, TR_RES_COLD);
307 else if (add == ESSENCE_SH_FIRE)
309 add_flag(flgs, TR_RES_FIRE);
310 add_flag(flgs, TR_SH_FIRE);
312 else if (add == ESSENCE_SH_ELEC)
314 add_flag(flgs, TR_RES_ELEC);
315 add_flag(flgs, TR_SH_ELEC);
317 else if (add == ESSENCE_SH_COLD)
319 add_flag(flgs, TR_RES_COLD);
320 add_flag(flgs, TR_SH_COLD);
322 else if (add == ESSENCE_RESISTANCE)
324 add_flag(flgs, TR_RES_ACID);
325 add_flag(flgs, TR_RES_ELEC);
326 add_flag(flgs, TR_RES_FIRE);
327 add_flag(flgs, TR_RES_COLD);
334 * Determine the "Activation" (if any) for an artifact
335 * Return a string, or NULL for "no activation"
337 cptr item_activation(object_type *o_ptr)
339 u32b flgs[TR_FLAG_SIZE];
341 /* Extract the flags */
342 object_flags(o_ptr, flgs);
344 /* Require activation ability */
346 if (!(have_flag(flgs, TR_ACTIVATE))) return ("¤Ê¤·");
348 if (!(have_flag(flgs, TR_ACTIVATE))) return ("nothing");
352 * We need to deduce somehow that it is a random artifact -- one
353 * problem: It could be a random artifact which has NOT YET received
354 * a name. Thus we eliminate other possibilities instead of checking
358 if (object_is_fixed_artifact(o_ptr))
360 if (!o_ptr->xtra2) o_ptr->xtra2 = a_info[o_ptr->name1].act_idx;
363 if ((object_is_artifact(o_ptr) || object_is_ego(o_ptr)) &&
366 switch (o_ptr->xtra2)
370 return "ÂÀÍÛ¸÷Àþ : 10 ¥¿¡¼¥óËè";
372 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
374 return "°½±À (12) : 4+d4 ¥¿¡¼¥óËè";
376 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
378 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
380 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
382 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
384 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (48) : 400 ¥¿¡¼¥óËè";
386 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (72) : 400 ¥¿¡¼¥óËè";
388 return "À¸Ì¿Îϵۼý (100) : 100+d100 ¥¿¡¼¥óËè";
390 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 300 ¥¿¡¼¥óËè";
392 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 500 ¥¿¡¼¥óËè";
394 return "À¸Ì¿Îϵۼý(120) : 400 ¥¿¡¼¥óËè";
396 return "µÛ·ì¥É¥ì¥¤¥ó (3*50) : 400 ¥¿¡¼¥óËè";
398 return "Ìð (150) : 90+d90 ¥¿¡¼¥óËè";
400 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (120) : 225+d225 ¥¿¡¼¥óËè";
402 return "µðÂ祢¥¤¥¹¡¦¥Ü¡¼¥ë (200) : 325+d325 ¥¿¡¼¥óËè";
404 return "µðÂ祵¥ó¥À¡¼¡¦¥Ü¡¼¥ë (250) : 425+d425 ¥¿¡¼¥óËè";
406 return "¥«¥Þ¥¤¥¿¥Á : 250 ¥¿¡¼¥óËè";
408 return "µÛ·ì¥É¥ì¥¤¥ó (3*100) : 400 ¥¿¡¼¥óËè";
410 return "º®ÆÙ¾¤Íè : 350 ¥¿¡¼¥óËè"; /*nuke me*/
412 return "¥í¥±¥Ã¥È (120+level) : 400 ¥¿¡¼¥óËè";
414 return "¼Ù°Â໶ (x5) : 300+d300 ¥¿¡¼¥óËè";
416 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300) : 500 ¥¿¡¼¥óËè";
418 return "Á±ÎÉÂ໶ (x5) : 300+d300 ¥¿¡¼¥óËè";
420 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
422 return "¼þ°Ï¤Î¥â¥ó¥¹¥¿¡¼¤ò̲¤é¤»¤ë : 55 ¥¿¡¼¥óËè";
424 return "ÃÏ¿Ì (Ⱦ·Â 10) : 50 ¥¿¡¼¥óËè";
426 return "¶²¹² : 3 * (level+10) ¥¿¡¼¥óËè";
428 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
429 case ACT_BANISH_EVIL:
430 return "¼Ù°¾ÃÌÇ : 250+d250 ¥¿¡¼¥óËè";
432 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
434 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
435 case ACT_CHARM_ANIMAL:
436 return "ưʪ̥λ : 300 ¥¿¡¼¥óËè";
437 case ACT_CHARM_UNDEAD:
438 return "¥¢¥ó¥Ç¥Ã¥É½¾Â° : 333 ¥¿¡¼¥óËè";
439 case ACT_CHARM_OTHER:
440 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 400 ¥¿¡¼¥óËè";
441 case ACT_CHARM_ANIMALS:
442 return "ưʪͧÏ : 500 ¥¿¡¼¥óËè";
443 case ACT_CHARM_OTHERS:
444 return "¼þÊÕ̥λ : 750 ¥¿¡¼¥óËè";
445 case ACT_SUMMON_ANIMAL:
446 return "ưʪ¾¤´ : 200+d300 ¥¿¡¼¥óËè";
447 case ACT_SUMMON_PHANTOM:
448 return "¸¸Î´ : 200+d200 ¥¿¡¼¥óËè";
449 case ACT_SUMMON_ELEMENTAL:
450 return "¥¨¥ì¥á¥ó¥¿¥ë¾¤´ : 750 ¥¿¡¼¥óËè";
451 case ACT_SUMMON_DEMON:
452 return "°Ë⾤´ : 666+d333 ¥¿¡¼¥óËè";
453 case ACT_SUMMON_UNDEAD:
454 return "¥¢¥ó¥Ç¥Ã¥É¾¤´ : 666+d333 ¥¿¡¼¥óËè";
456 return "¶²Éݽüµî/ÂÎÎϲóÉü(30) : 10 ¥¿¡¼¥óËè";
458 return "½ý²óÉü(4d8) : 3+d3 ¥¿¡¼¥óËè";
459 case ACT_CURE_POISON:
460 return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
462 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
464 return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃÍÉü³è : 750 ¥¿¡¼¥óËè";
466 return "ÂÎÎϲóÉü(700) : 250 ¥¿¡¼¥óËè";
468 return "ÂÎÎϲóÉü(1000) : 888 ¥¿¡¼¥óËè";
470 return "¥Æ¥ì¥Ñ¥·¡¼ (´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
472 return "»Îµ¤¹âÍȤȽËÊ¡ (´ü´Ö 50+d50) : 100+d100 ¥¿¡¼¥óËè";
474 return "Âмٰ·ë³¦ (´ü´Ö level*3 + d25) : 225+d225 ¥¿¡¼¥óËè";
476 return "Á´ÂÑÀ (´ü´Ö 40+d40) : 200 ¥¿¡¼¥óËè";
478 return "²Ã® (´ü´Ö 20+d20) : 250 ¥¿¡¼¥óËè";
480 return "²Ã® (´ü´Ö 75+d75) : 200+d200 ¥¿¡¼¥óËè";
482 return "Í©Âβ½ (´ü´Ö level/2 + d(level/2)) : 1000 ¥¿¡¼¥óËè";
484 return "̵Ũ²½ (´ü´Ö 8+d8) : 1000 ¥¿¡¼¥óËè";
486 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
488 return "ËâË¡¤ÎÃϿޤȸ÷ : 50+d50 ¥¿¡¼¥óËè";
490 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
491 case ACT_DETECT_XTRA:
492 return "Á´´¶ÃΡ¢Ãµº÷¡¢*´ÕÄê* : 1000 ¥¿¡¼¥óËè";
494 return "*´ÕÄê* : 750 ¥¿¡¼¥óËè";
496 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
498 return "Çúȯ¤Î¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
500 return "¼é¤ê¤Î¥ë¡¼¥ó : 400 ¥¿¡¼¥óËè";
502 return "¶õÊ¢½¼Â : 200 ¥¿¡¼¥óËè";
504 return "¥É¥¢Ç˲õ : 10 ¥¿¡¼¥óËè";
506 return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
508 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
510 return "Ï£¶â½Ñ : 500 ¥¿¡¼¥óËè";
512 return "¼¡¸µ¤ÎÈâ : 100 ¥¿¡¼¥óËè";
514 return "¥Æ¥ì¥Ý¡¼¥È (range 100) : 45 ¥¿¡¼¥óËè";
516 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
521 return "beam of sunlight every 10 turns";
523 return "magic missile (2d6) every 2 turns";
525 return "stinking cloud (12) every 4+d4 turns";
527 return "lightning bolt (4d8) every 5+d5 turns";
529 return "acid bolt (5d8) every 6+d6 turns";
531 return "frost bolt (6d8) every 7+d7 turns";
533 return "fire bolt (9d8) every 8+d8 turns";
535 return "ball of cold (48) every 400 turns";
537 return "ball of fire (72) every 400 turns";
539 return "drain life (100) every 100+d100 turns";
541 return "ball of cold (100) every 300 turns";
543 return "ball of lightning (100) every 500 turns";
545 return "drain life (120) every 400 turns";
547 return "vampiric drain (3*50) every 400 turns";
549 return "arrows (150) every 90+d90 turns";
551 return "fire ball (120) every 225+d225 turns";
553 return "ball of cold (200) every 325+d325 turns";
555 return "ball of lightning (250) every 425+d425 turns";
557 return "whirlwind attack every 250 turns";
559 return "vampiric drain (3*100) every 400 turns";
561 return "call chaos every 350 turns";
563 return "launch rocket (120+level) every 400 turns";
565 return "dispel evil (x5) every 300+d300 turns";
567 return "elemental breath (300) every 500 turns";
569 return "dispel good (x5) every 300+d300 turns";
571 return "confuse monster every 15 turns";
573 return "sleep nearby monsters every 55 turns";
575 return "earthquake (rad 10) every 50 turns";
577 return "terror every 3 * (level+10) turns";
579 return "teleport away every 200 turns";
580 case ACT_BANISH_EVIL:
581 return "banish evil every 250+d250 turns";
583 return "genocide every 500 turns";
585 return "mass genocide every 1000 turns";
586 case ACT_CHARM_ANIMAL:
587 return "charm animal every 300 turns";
588 case ACT_CHARM_UNDEAD:
589 return "enslave undead every 333 turns";
590 case ACT_CHARM_OTHER:
591 return "charm monster every 400 turns";
592 case ACT_CHARM_ANIMALS:
593 return "animal friendship every 500 turns";
594 case ACT_CHARM_OTHERS:
595 return "mass charm every 750 turns";
596 case ACT_SUMMON_ANIMAL:
597 return "summon animal every 200+d300 turns";
598 case ACT_SUMMON_PHANTOM:
599 return "summon phantasmal servant every 200+d200 turns";
600 case ACT_SUMMON_ELEMENTAL:
601 return "summon elemental every 750 turns";
602 case ACT_SUMMON_DEMON:
603 return "summon demon every 666+d333 turns";
604 case ACT_SUMMON_UNDEAD:
605 return "summon undead every 666+d333 turns";
607 return "remove fear and heal 30 hp every 10 turns";
609 return "heal 4d8 and wounds every 3+d3 turns";
610 case ACT_CURE_POISON:
611 return "remove fear and cure poison every 5 turns";
613 return "restore life levels every 450 turns";
615 return "restore stats and life levels every 750 turns";
617 return "heal 700 hit points every 250 turns";
619 return "heal 1000 hit points every 888 turns";
621 return "telepathy (dur 25+d30) every 200 turns";
623 return "heroism and blessed (dur 50+d50) every 100+d100 turns";
625 return "protect evil (dur level*3 + d25) every 225+d225 turns";
627 return "resist elements (dur 40+d40) every 200 turns";
629 return "speed (dur 20+d20) every 250 turns";
631 return "speed (dur 75+d75) every 200+d200 turns";
633 return "wraith form (dur level/2 + d(level/2)) every 1000 turns";
635 return "invulnerability (dur 8+d8) every 1000 turns";
637 return "light area (dam 2d15) every 10+d10 turns";
639 return "light (dam 2d15) & map area every 50+d50 turns";
641 return "detection every 55+d55 turns";
642 case ACT_DETECT_XTRA:
643 return "detection, probing and identify true every 1000 turns";
645 return "identify true every 750 turns";
647 return "identify spell every 10 turns";
649 return "explosive rune every 200 turns";
651 return "rune of protection every 400 turns";
653 return "satisfy hunger every 200 turns";
655 return "destroy doors every 10 turns";
657 return "stone to mud every 5 turns";
659 return "recharging every 70 turns";
661 return "alchemy every 500 turns";
663 return "dimension door every 100 turns";
665 return "teleport (range 100) every 45 turns";
667 return "word of recall every 200 turns";
669 return "something undefined";
674 /* Some artifacts can be activated */
675 switch (o_ptr->name1)
680 return "¶Ç¤Î»ÕÃľ¤´ : 500+d500 ¥¿¡¼¥óËè";
682 return "summon the Legion of the Dawn every 500+d500 turns";
689 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(72) : 100 ¥¿¡¼¥óËè";
691 return "large fire ball (72) every 100 turns";
698 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(120) : 15 ¥¿¡¼¥óËè";
700 return "large fire ball (120) every 15 turns";
708 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
710 return "fire branding of bolts every 999 turns";
717 return "¥Õ¥¡¥¤¥¢¡ª : 15 ¥¿¡¼¥óËè";
719 return "fire! every 15 turns";
727 return "ƨÁö : 35 ¥¿¡¼¥óËè";
729 return "a getaway every 35 turns";
736 return "ËâË¡¤ÎÌð(150) : 90+d90 ¥¿¡¼¥óËè";
738 return "a magical arrow (150) every 90+d90 turns";
745 return "¥¹¥¿¡¼¡¦¥Ü¡¼¥ë(150) : 1000 ¥¿¡¼¥óËè";
747 return "star ball (150) every 1000 turns";
751 case ART_BLADETURNER:
754 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300), »Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢ÂÑÀ";
756 return "breathe elements (300), hero, bless, and resistance";
763 return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô : 20+d20 ¥¿¡¼¥óËè";
765 return "clairvoyance and recall, draining you every 20+d20 turns";
772 return "Ã⩹¶·â(100) : 100+d100 ¥¿¡¼¥óËè";
774 return "a strangling attack (100) every 100+d100 turns";
782 return "¿®¤¸Æñ¤¤¤³¤È : 450+d450 ¥¿¡¼¥óËè";
784 return "bizarre things every 450+d450 turns";
791 return "¤³¤Î³¬¤Ë¤¤¤ë¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òɽ¼¨ : 200¥¿¡¼¥óËè";
793 return "list of the uniques on the level every 200 turns";
799 return "´í¸±¤òȼ¤¦´ÕÄê : ¤¤¤Ä¤Ç¤â";
801 return "perilous identify every turn";
807 return "³²Ãî¤Î¶î½ü : 55+d55¥¿¡¼¥óËè";
809 return "dispel small life every 55+d55 turns";
815 return "¥â¥ó¥¹¥¿¡¼¶²¹² : 40+d40¥¿¡¼¥óËè";
817 return "frighten monsters every 40+d40 turns";
823 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
825 return "a mana bolt (120) every 120+d120 turns";
831 return "»Îµ¤¹âÍÈ, ¥¹¥Ô¡¼¥É(50+d50¥¿¡¼¥ó) : 100+d200 ¥¿¡¼¥óËè";
833 return "hero and +10 to speed (50) every 100+200d turns";
839 return "âÁ¤·¤¤¸÷ : 250 ¥¿¡¼¥óËè";
841 return "blinding light every 250 turns";
847 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
849 return "recharge item every 200 turns";
855 return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë";
857 return "increase STR (destroyed 50%)";
863 return "ËâÎϤÎÍò(400) : 250+d250¥¿¡¼¥óËè";
865 return "a mana storm every 250+d250 turns";
871 return "ʪÂΤò°ú¤´ó¤»¤ë(½ÅÎÌ25kg¤Þ¤Ç) : 25+d25¥¿¡¼¥óËè";
873 return "a telekinesis (500 lb) every 25+d25 turns";
879 return "¥Ï¥¦¥ó¥É¾¤´ : 300+d150¥¿¡¼¥óËè";
881 return "summon hound every 300+d150 turns";
887 return "µðÂ祹¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 200+d200 ¥¿¡¼¥óËè";
889 return "large star ball (200) every 200+d200 turns";
896 return "Îã¤Î¥¢¥ì : 150+d150 ¥¿¡¼¥óËè";
898 return "reveal your identity every 150+d150 turns";
905 return "Çï»ÒÌÚ¤òÂǤÁ¤Ê¤é¤¹ : ¤¤¤Ä¤Ç¤â";
907 return "beat wooden clappers every turn";
915 return "»Îµ¤¹âÍÈ : 30+d30¥¿¡¼¥óËè";
917 return "heroism every 30+d30 turns";
925 return "Ìþ¤· : 100¥¿¡¼¥óËè";
927 return "curing every 100 turns";
935 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(12d8) : 50 ¥¿¡¼¥óËè";
937 return "frost bolt (12d8) every 50 turns";
944 return "°ÀÊѹ¹ : 3333 ¥¿¡¼¥óËè";
946 return "change zokusei every 3333 turns";
953 return "¥¦¥©¡¼¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 250 ¥¿¡¼¥óËè";
955 return "water ball (200) every 250 turns";
962 return "»Í¸ÔƧ¤ß : 100+d100¥¿¡¼¥óËè";
964 return "shiko every 100+d100 turns";
971 return "Î䵤¤ÎÂÑÀ : 40+d40¥¿¡¼¥óËè";
973 return "resist cold every 40+d40 turns";
980 return "Âý¤ÎÂç·²¾¤´ : 300+d150¥¿¡¼¥óËè";
982 return "summon octopus every 300+d150 turns";
989 return "°Å¹õ¤ÎÍò(250) : 150+d150 ¥¿¡¼¥óËè";
991 return "darkness storm (250) every 150+d150 turns";
995 case ART_SACRED_KNIGHTS:
998 return "*²ò¼ö*¤ÈÄ´ºº: ¤¤¤Ä¤Ç¤â";
1000 return "dispel curse and probing every turn";
1007 return "ËâÎÏÉü³è: 777 ¥¿¡¼¥óËè";
1009 return "restore mana every 777 turns";
1016 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_TSURIZAO))
1019 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
1021 return "fishing : every time";
1026 if (object_is_smith(o_ptr))
1028 switch (o_ptr->xtra3 - 1)
1030 case ESSENCE_TMP_RES_ACID:
1032 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1034 return "resist acid every 50+d50 turns";
1037 case ESSENCE_TMP_RES_ELEC:
1039 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1041 return "resist elec every 50+d50 turns";
1044 case ESSENCE_TMP_RES_FIRE:
1046 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1048 return "resist fire every 50+d50 turns";
1051 case ESSENCE_TMP_RES_COLD:
1053 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1055 return "resist cold every 50+d50 turns";
1060 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1062 return "earthquake every 100+d100 turns";
1067 if (o_ptr->name2 == EGO_TRUMP)
1070 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
1072 return "teleport every 50+d50 turns";
1077 if (o_ptr->name2 == EGO_LITE_ILLUMINATION)
1080 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1082 return "illumination every 10+d10 turns";
1086 else if (o_ptr->name2 == EGO_EARTHQUAKES)
1089 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1091 return "earthquake every 100+d100 turns";
1096 else if (o_ptr->name2 == EGO_JUMP)
1099 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1101 return "blink every 10+d10 turns";
1106 if (o_ptr->tval == TV_RING)
1108 if (object_is_ego(o_ptr))
1110 switch (o_ptr->name2)
1114 return "»Îµ¤¹âÍÈ : 100+d100¥¿¡¼¥óËè";
1116 return "heroism every 100+d100 turns";
1118 case EGO_RING_MAGIC_MIS:
1120 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1122 return "magic missile (2d6) every 2 turns";
1124 case EGO_RING_FIRE_BOLT:
1126 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1128 return "fire bolt (9d8) every 8+d8 turns";
1130 case EGO_RING_COLD_BOLT:
1132 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1134 return "frost bolt (6d8) every 7+d7 turns";
1136 case EGO_RING_ELEC_BOLT:
1138 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1140 return "lightning bolt (4d8) every 5+d5 turns";
1142 case EGO_RING_ACID_BOLT:
1144 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
1146 return "acid bolt (5d8) every 6+d6 turns";
1148 case EGO_RING_MANA_BOLT:
1150 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
1152 return "a mana bolt (120) every 120+d120 turns";
1154 case EGO_RING_FIRE_BALL:
1156 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1158 return "fire ball (100) every 80+d80 turns";
1160 case EGO_RING_COLD_BALL:
1162 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1164 return "cold ball (100) every 80+d80 turns";
1166 case EGO_RING_ELEC_BALL:
1168 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1170 return "elec ball (100) every 80+d80 turns";
1172 case EGO_RING_ACID_BALL:
1174 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1176 return "acid ball (100) every 80+d80 turns";
1178 case EGO_RING_MANA_BALL:
1180 return "ËâÎϤÎÍò (250) : 300 ¥¿¡¼¥óËè";
1182 return "mana storm (250) every 300 turns";
1184 case EGO_RING_DRAGON_F:
1185 if (o_ptr->sval == SV_RING_FLAMES)
1187 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) ¤È²Ð¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
1189 return "breath of fire (200) and resist fire every 200 turns";
1193 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
1195 return "fire breath (200) every 250 turns";
1197 case EGO_RING_DRAGON_C:
1198 if (o_ptr->sval == SV_RING_ICE)
1200 return "Î䵤¤Î¥Ö¥ì¥¹ (200) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
1202 return "breath of cold (200) and resist cold every 200 turns";
1206 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
1208 return "cold breath (200) every 250 turns";
1210 case EGO_RING_M_DETECT:
1212 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃÎ : 150 ¥¿¡¼¥óËè";
1214 return "detect all monsters every 150 turns";
1216 case EGO_RING_D_SPEED:
1218 return "¥¹¥Ô¡¼¥É(15+d30¥¿¡¼¥ó) : 100 ¥¿¡¼¥óËè";
1220 return "haste self (15+d30 turns) every 100 turns";
1222 case EGO_RING_BERSERKER:
1224 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
1226 return "berserk (25+d25 turns) every 75+d75 turns";
1228 case EGO_RING_TELE_AWAY:
1230 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
1232 return "teleport away every 150 turns";
1236 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ : 777 ¥¿¡¼¥óËè";
1238 return "hero, bless, and ultimate resistance every 777 turns";
1242 switch (o_ptr->sval)
1244 case SV_RING_FLAMES:
1246 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) ¤È²Ð¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1248 return "ball of fire (100) and resist fire every 50+d50 turns";
1253 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1255 return "ball of cold (100) and resist cold every 50+d50 turns";
1260 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) ¤È»À¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1262 return "ball of acid (100) and resist acid every 50+d50 turns";
1267 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) ¤ÈÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1269 return "ball of elec (100) and resist elec every 50+d50 turns";
1277 if (o_ptr->tval == TV_AMULET)
1279 if (object_is_ego(o_ptr))
1281 switch (o_ptr->name2)
1285 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
1287 return "identify every 10 turns";
1291 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
1293 return "charm monster every 200 turns";
1297 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1299 return "blink every 10+d10 turns";
1301 case EGO_AMU_TELEPORT:
1303 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
1305 return "teleport every 50+d50 turns";
1307 case EGO_AMU_D_DOOR:
1309 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
1311 return "dimension door every 200 turns";
1313 case EGO_AMU_RES_FIRE_:
1315 return "²Ð±ê¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1317 return "resist fire every 50+d50 turns";
1319 case EGO_AMU_RES_COLD_:
1321 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1323 return "resist cold every 50+d50 turns";
1325 case EGO_AMU_RES_ELEC_:
1327 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1329 return "resist elec every 50+d50 turns";
1331 case EGO_AMU_RES_ACID_:
1333 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1335 return "resist acid every 50+d50 turns";
1337 case EGO_AMU_DETECTION:
1339 return "Á´´¶ÃÎ : 55+d55¥¿¡¼¥óËè";
1341 return "detect all floor every 55+d55 turns";
1347 if (o_ptr->tval == TV_WHISTLE)
1350 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
1352 return "call pet every 100+d100 turns";
1356 if (o_ptr->tval == TV_CAPTURE)
1359 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
1361 return "captures or releases a monster.";
1365 /* Require dragon scale mail */
1367 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
1369 if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
1373 /* Branch on the sub-type */
1374 switch (o_ptr->sval)
1376 case SV_DRAGON_BLUE:
1379 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
1381 return "breathe lightning (100) every 150+d150 turns";
1385 case SV_DRAGON_WHITE:
1388 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
1390 return "breathe frost (110) every 150+d150 turns";
1394 case SV_DRAGON_BLACK:
1397 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
1399 return "breathe acid (130) every 150+d150 turns";
1403 case SV_DRAGON_GREEN:
1406 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
1408 return "breathe poison gas (150) every 180+d180 turns";
1415 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
1417 return "breathe fire (200) every 200+d200 turns";
1421 case SV_DRAGON_MULTIHUED:
1424 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
1426 return "breathe multi-hued (250) every 200+d200 turns";
1430 case SV_DRAGON_BRONZE:
1433 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
1435 return "breathe confusion (120) every 180+d180 turns";
1439 case SV_DRAGON_GOLD:
1442 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
1444 return "breathe sound (130) every 180+d180 turns";
1448 case SV_DRAGON_CHAOS:
1451 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
1453 return "breathe chaos/disenchant (220) every 200+d200 turns";
1460 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
1462 return "breathe sound/shards (230) every 200+d200 turns";
1466 case SV_DRAGON_BALANCE:
1469 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
1471 return "breathe balance (250) every 200+d200 turns";
1475 case SV_DRAGON_SHINING:
1478 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
1480 return "breathe light/darkness (200) every 200+d200 turns";
1484 case SV_DRAGON_POWER:
1487 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
1489 return "breathe the elements (300) every 200+d200 turns";
1499 return "breathe air";
1506 * Describe a "fully identified" item
1508 bool screen_object(object_type *o_ptr, u32b mode)
1512 u32b flgs[TR_FLAG_SIZE];
1516 char o_name[MAX_NLEN];
1519 int trivial_info = 0;
1521 /* Extract the flags */
1522 object_flags(o_ptr, flgs);
1524 /* Extract the description */
1526 roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
1527 (k_text + k_info[o_ptr->k_idx].text),
1528 77 - 15, temp, sizeof(temp));
1529 for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
1530 { info[i] = &temp[j]; i++;}
1533 if (object_is_equipment(o_ptr))
1535 /* Descriptions of a basic equipment is just a flavor */
1539 /* Mega-Hack -- describe activation */
1540 if (have_flag(flgs, TR_ACTIVATE))
1543 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
1545 info[i++] = "It can be activated for...";
1548 info[i++] = item_activation(o_ptr);
1550 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
1552 info[i++] = "...if it is being worn.";
1557 /* Figurines, a hack */
1558 if (o_ptr->tval == TV_FIGURINE)
1561 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
1563 info[i++] = "It will transform into a pet when thrown.";
1568 /* Figurines, a hack */
1569 if (o_ptr->name1 == ART_STONEMASK)
1572 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
1574 info[i++] = "It makes you turn into a vampire permanently.";
1579 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
1582 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
1584 info[i++] = "It will attempt to kill a monster instantly.";
1589 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
1592 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
1594 info[i++] = "It causes you to strike yourself sometimes.";
1598 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
1600 info[i++] = "It always penetrates invulnerability barriers.";
1604 if (o_ptr->name2 == EGO_2WEAPON)
1607 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
1609 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
1614 if (have_flag(flgs, TR_EASY_SPELL))
1617 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
1619 info[i++] = "It affects your ability to cast spells.";
1623 if (o_ptr->name2 == EGO_AMU_FOOL)
1626 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
1628 info[i++] = "It interferes with casting spells.";
1632 if (o_ptr->name2 == EGO_RING_THROW)
1635 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
1637 info[i++] = "It provides great strength when you throw an item.";
1641 if (o_ptr->name2 == EGO_AMU_NAIVETY)
1644 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
1646 info[i++] = "It decreases your magic resistance.";
1650 if (o_ptr->tval == TV_STATUE)
1652 monster_race *r_ptr = &r_info[o_ptr->pval];
1654 if (o_ptr->pval == MON_BULLGATES)
1656 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
1658 info[i++] = "It is shameful.";
1660 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
1662 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
1664 info[i++] = "It is fearful.";
1668 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
1670 info[i++] = "It is cheerful.";
1674 /* Hack -- describe lite's */
1675 if (o_ptr->tval == TV_LITE)
1677 if (o_ptr->name2 == EGO_LITE_DARKNESS)
1680 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
1682 info[i++] = "It provides no light.";
1685 if (o_ptr->sval == SV_LITE_FEANOR)
1688 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-3)¡£";
1690 info[i++] = "It decreases radius of light source by 3.";
1693 else if (o_ptr->sval == SV_LITE_LANTERN)
1696 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
1698 info[i++] = "It decreases radius of light source by 2.";
1704 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
1706 info[i++] = "It decreases radius of light source by 1.";
1710 else if (object_is_fixed_artifact(o_ptr))
1713 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1715 info[i++] = "It provides light (radius 3) forever.";
1719 else if (o_ptr->name2 == EGO_LITE_SHINE)
1721 if (o_ptr->sval == SV_LITE_FEANOR)
1724 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1726 info[i++] = "It provides light (radius 3) forever.";
1730 else if (o_ptr->sval == SV_LITE_LANTERN)
1733 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1735 info[i++] = "It provides light (radius 3) when fueled.";
1742 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1744 info[i++] = "It provides light (radius 2) when fueled.";
1751 if (o_ptr->sval == SV_LITE_FEANOR)
1754 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1756 info[i++] = "It provides light (radius 2) forever.";
1760 else if (o_ptr->sval == SV_LITE_LANTERN)
1763 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1765 info[i++] = "It provides light (radius 2) when fueled.";
1772 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
1774 info[i++] = "It provides light (radius 1) when fueled.";
1779 if (o_ptr->name2 == EGO_LITE_LONG)
1782 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
1784 info[i++] = "It provides light for much longer time.";
1790 /* And then describe it fully */
1792 if (have_flag(flgs, TR_RIDING))
1794 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
1796 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
1798 info[i++] = "It is made for use while riding.";
1803 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
1805 info[i++] = "It is suitable for use while riding.";
1807 /* This information is not important enough */
1811 if (have_flag(flgs, TR_STR))
1814 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1816 info[i++] = "It affects your strength.";
1820 if (have_flag(flgs, TR_INT))
1823 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1825 info[i++] = "It affects your intelligence.";
1829 if (have_flag(flgs, TR_WIS))
1832 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1834 info[i++] = "It affects your wisdom.";
1838 if (have_flag(flgs, TR_DEX))
1841 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1843 info[i++] = "It affects your dexterity.";
1847 if (have_flag(flgs, TR_CON))
1850 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1852 info[i++] = "It affects your constitution.";
1856 if (have_flag(flgs, TR_CHR))
1859 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1861 info[i++] = "It affects your charisma.";
1866 if (have_flag(flgs, TR_MAGIC_MASTERY))
1869 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1871 info[i++] = "It affects your ability to use magic devices.";
1875 if (have_flag(flgs, TR_STEALTH))
1878 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1880 info[i++] = "It affects your stealth.";
1884 if (have_flag(flgs, TR_SEARCH))
1887 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1889 info[i++] = "It affects your searching.";
1893 if (have_flag(flgs, TR_INFRA))
1896 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1898 info[i++] = "It affects your infravision.";
1902 if (have_flag(flgs, TR_TUNNEL))
1905 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1907 info[i++] = "It affects your ability to tunnel.";
1911 if (have_flag(flgs, TR_SPEED))
1914 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1916 info[i++] = "It affects your speed.";
1920 if (have_flag(flgs, TR_BLOWS))
1923 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1925 info[i++] = "It affects your attack speed.";
1930 if (have_flag(flgs, TR_BRAND_ACID))
1933 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1935 info[i++] = "It does extra damage from acid.";
1939 if (have_flag(flgs, TR_BRAND_ELEC))
1942 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1944 info[i++] = "It does extra damage from electricity.";
1948 if (have_flag(flgs, TR_BRAND_FIRE))
1951 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1953 info[i++] = "It does extra damage from fire.";
1957 if (have_flag(flgs, TR_BRAND_COLD))
1960 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1962 info[i++] = "It does extra damage from frost.";
1967 if (have_flag(flgs, TR_BRAND_POIS))
1970 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
1972 info[i++] = "It poisons your foes.";
1977 if (have_flag(flgs, TR_CHAOTIC))
1980 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
1982 info[i++] = "It produces chaotic effects.";
1987 if (have_flag(flgs, TR_VAMPIRIC))
1990 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
1992 info[i++] = "It drains life from your foes.";
1997 if (have_flag(flgs, TR_IMPACT))
2000 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
2002 info[i++] = "It can cause earthquakes.";
2007 if (have_flag(flgs, TR_VORPAL))
2010 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2012 info[i++] = "It is very sharp and can cut your foes.";
2017 if (have_flag(flgs, TR_KILL_DRAGON))
2020 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2022 info[i++] = "It is a great bane of dragons.";
2026 else if (have_flag(flgs, TR_SLAY_DRAGON))
2029 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2031 info[i++] = "It is especially deadly against dragons.";
2036 if (have_flag(flgs, TR_KILL_ORC))
2039 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2041 info[i++] = "It is a great bane of orcs.";
2045 if (have_flag(flgs, TR_SLAY_ORC))
2048 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2050 info[i++] = "It is especially deadly against orcs.";
2055 if (have_flag(flgs, TR_KILL_TROLL))
2058 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2060 info[i++] = "It is a great bane of trolls.";
2064 if (have_flag(flgs, TR_SLAY_TROLL))
2067 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2069 info[i++] = "It is especially deadly against trolls.";
2074 if (have_flag(flgs, TR_KILL_GIANT))
2077 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2079 info[i++] = "It is a great bane of giants.";
2082 else if (have_flag(flgs, TR_SLAY_GIANT))
2085 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2087 info[i++] = "It is especially deadly against giants.";
2092 if (have_flag(flgs, TR_KILL_DEMON))
2095 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2097 info[i++] = "It is a great bane of demons.";
2101 if (have_flag(flgs, TR_SLAY_DEMON))
2104 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2106 info[i++] = "It strikes at demons with holy wrath.";
2111 if (have_flag(flgs, TR_KILL_UNDEAD))
2114 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2116 info[i++] = "It is a great bane of undead.";
2120 if (have_flag(flgs, TR_SLAY_UNDEAD))
2123 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2125 info[i++] = "It strikes at undead with holy wrath.";
2130 if (have_flag(flgs, TR_KILL_EVIL))
2133 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2135 info[i++] = "It is a great bane of evil monsters.";
2139 if (have_flag(flgs, TR_SLAY_EVIL))
2142 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
2144 info[i++] = "It fights against evil with holy fury.";
2149 if (have_flag(flgs, TR_KILL_ANIMAL))
2152 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2154 info[i++] = "It is a great bane of natural creatures.";
2158 if (have_flag(flgs, TR_SLAY_ANIMAL))
2161 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2163 info[i++] = "It is especially deadly against natural creatures.";
2168 if (have_flag(flgs, TR_KILL_HUMAN))
2171 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2173 info[i++] = "It is a great bane of humans.";
2177 if (have_flag(flgs, TR_SLAY_HUMAN))
2180 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2182 info[i++] = "It is especially deadly against humans.";
2187 if (have_flag(flgs, TR_FORCE_WEAPON))
2190 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
2192 info[i++] = "It powerfully strikes at a monster using your mana.";
2196 if (have_flag(flgs, TR_DEC_MANA))
2199 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
2201 info[i++] = "It decreases your mana consumption.";
2205 if (have_flag(flgs, TR_SUST_STR))
2208 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
2210 info[i++] = "It sustains your strength.";
2214 if (have_flag(flgs, TR_SUST_INT))
2217 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
2219 info[i++] = "It sustains your intelligence.";
2223 if (have_flag(flgs, TR_SUST_WIS))
2226 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
2228 info[i++] = "It sustains your wisdom.";
2232 if (have_flag(flgs, TR_SUST_DEX))
2235 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
2237 info[i++] = "It sustains your dexterity.";
2241 if (have_flag(flgs, TR_SUST_CON))
2244 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
2246 info[i++] = "It sustains your constitution.";
2250 if (have_flag(flgs, TR_SUST_CHR))
2253 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
2255 info[i++] = "It sustains your charisma.";
2260 if (have_flag(flgs, TR_IM_ACID))
2263 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2265 info[i++] = "It provides immunity to acid.";
2269 if (have_flag(flgs, TR_IM_ELEC))
2272 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2274 info[i++] = "It provides immunity to electricity.";
2278 if (have_flag(flgs, TR_IM_FIRE))
2281 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2283 info[i++] = "It provides immunity to fire.";
2287 if (have_flag(flgs, TR_IM_COLD))
2290 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2292 info[i++] = "It provides immunity to cold.";
2297 if (have_flag(flgs, TR_THROW))
2300 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2302 info[i++] = "It is perfectly balanced for throwing.";
2306 if (have_flag(flgs, TR_FREE_ACT))
2309 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2311 info[i++] = "It provides immunity to paralysis.";
2315 if (have_flag(flgs, TR_HOLD_LIFE))
2318 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
2320 info[i++] = "It provides resistance to life draining.";
2324 if (have_flag(flgs, TR_RES_FEAR))
2327 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
2329 info[i++] = "It makes you completely fearless.";
2333 if (have_flag(flgs, TR_RES_ACID))
2336 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2338 info[i++] = "It provides resistance to acid.";
2342 if (have_flag(flgs, TR_RES_ELEC))
2345 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2347 info[i++] = "It provides resistance to electricity.";
2351 if (have_flag(flgs, TR_RES_FIRE))
2354 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2356 info[i++] = "It provides resistance to fire.";
2360 if (have_flag(flgs, TR_RES_COLD))
2363 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2365 info[i++] = "It provides resistance to cold.";
2369 if (have_flag(flgs, TR_RES_POIS))
2372 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2374 info[i++] = "It provides resistance to poison.";
2379 if (have_flag(flgs, TR_RES_LITE))
2382 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2384 info[i++] = "It provides resistance to light.";
2388 if (have_flag(flgs, TR_RES_DARK))
2391 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2393 info[i++] = "It provides resistance to dark.";
2398 if (have_flag(flgs, TR_RES_BLIND))
2401 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2403 info[i++] = "It provides resistance to blindness.";
2407 if (have_flag(flgs, TR_RES_CONF))
2410 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2412 info[i++] = "It provides resistance to confusion.";
2416 if (have_flag(flgs, TR_RES_SOUND))
2419 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2421 info[i++] = "It provides resistance to sound.";
2425 if (have_flag(flgs, TR_RES_SHARDS))
2428 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2430 info[i++] = "It provides resistance to shards.";
2435 if (have_flag(flgs, TR_RES_NETHER))
2438 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2440 info[i++] = "It provides resistance to nether.";
2444 if (have_flag(flgs, TR_RES_NEXUS))
2447 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2449 info[i++] = "It provides resistance to nexus.";
2453 if (have_flag(flgs, TR_RES_CHAOS))
2456 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2458 info[i++] = "It provides resistance to chaos.";
2462 if (have_flag(flgs, TR_RES_DISEN))
2465 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2467 info[i++] = "It provides resistance to disenchantment.";
2472 if (have_flag(flgs, TR_LEVITATION))
2475 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2477 info[i++] = "It allows you to levitate.";
2481 if (have_flag(flgs, TR_LITE))
2483 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
2485 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
2487 info[i++] = "It decreases radius of your light source by 1.";
2491 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë(Ⱦ·Â¤Ë+1)¡£";
2493 info[i++] = "It provides permanent light. (radius +1)";
2497 if (have_flag(flgs, TR_SEE_INVIS))
2500 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2502 info[i++] = "It allows you to see invisible monsters.";
2506 if (have_flag(flgs, TR_TELEPATHY))
2509 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
2511 info[i++] = "It gives telepathic powers.";
2515 if (have_flag(flgs, TR_ESP_ANIMAL))
2518 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤ò´¶ÃΤ¹¤ë¡£";
2520 info[i++] = "It senses natural creatures.";
2524 if (have_flag(flgs, TR_ESP_UNDEAD))
2527 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ò´¶ÃΤ¹¤ë¡£";
2529 info[i++] = "It senses undead.";
2533 if (have_flag(flgs, TR_ESP_DEMON))
2536 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò´¶ÃΤ¹¤ë¡£";
2538 info[i++] = "It senses demons.";
2542 if (have_flag(flgs, TR_ESP_ORC))
2545 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ò´¶ÃΤ¹¤ë¡£";
2547 info[i++] = "It senses orcs.";
2551 if (have_flag(flgs, TR_ESP_TROLL))
2554 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ò´¶ÃΤ¹¤ë¡£";
2556 info[i++] = "It senses trolls.";
2560 if (have_flag(flgs, TR_ESP_GIANT))
2563 info[i++] = "¤½¤ì¤Ïµð¿Í¤ò´¶ÃΤ¹¤ë¡£";
2565 info[i++] = "It senses giants.";
2569 if (have_flag(flgs, TR_ESP_DRAGON))
2572 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò´¶ÃΤ¹¤ë¡£";
2574 info[i++] = "It senses dragons.";
2578 if (have_flag(flgs, TR_ESP_HUMAN))
2581 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ò´¶ÃΤ¹¤ë¡£";
2583 info[i++] = "It senses humans.";
2587 if (have_flag(flgs, TR_ESP_EVIL))
2590 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¸ºß¤ò´¶ÃΤ¹¤ë¡£";
2592 info[i++] = "It senses evil creatures.";
2596 if (have_flag(flgs, TR_ESP_GOOD))
2599 info[i++] = "¤½¤ì¤ÏÁ±Îɤʸºß¤ò´¶ÃΤ¹¤ë¡£";
2601 info[i++] = "It senses good creatures.";
2605 if (have_flag(flgs, TR_ESP_NONLIVING))
2608 info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤò´¶ÃΤ¹¤ë¡£";
2610 info[i++] = "It senses non-living creatures.";
2614 if (have_flag(flgs, TR_ESP_UNIQUE))
2617 info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤ò´¶ÃΤ¹¤ë¡£";
2619 info[i++] = "It senses unique monsters.";
2623 if (have_flag(flgs, TR_SLOW_DIGEST))
2626 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
2628 info[i++] = "It slows your metabolism.";
2632 if (have_flag(flgs, TR_REGEN))
2635 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
2637 info[i++] = "It speeds your regenerative powers.";
2641 if (have_flag(flgs, TR_WARNING))
2644 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
2646 info[i++] = "It warns you of danger";
2650 if (have_flag(flgs, TR_REFLECT))
2653 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
2655 info[i++] = "It reflects bolts and arrows.";
2659 if (have_flag(flgs, TR_SH_FIRE))
2662 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2664 info[i++] = "It produces a fiery sheath.";
2668 if (have_flag(flgs, TR_SH_ELEC))
2671 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2673 info[i++] = "It produces an electric sheath.";
2677 if (have_flag(flgs, TR_SH_COLD))
2680 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2682 info[i++] = "It produces a sheath of coldness.";
2686 if (have_flag(flgs, TR_NO_MAGIC))
2689 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2691 info[i++] = "It produces an anti-magic shell.";
2695 if (have_flag(flgs, TR_NO_TELE))
2698 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
2700 info[i++] = "It prevents teleportation.";
2704 if (have_flag(flgs, TR_XTRA_MIGHT))
2707 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2709 info[i++] = "It fires missiles with extra might.";
2713 if (have_flag(flgs, TR_XTRA_SHOTS))
2716 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2718 info[i++] = "It fires missiles excessively fast.";
2723 if (have_flag(flgs, TR_BLESSED))
2726 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
2728 info[i++] = "It has been blessed by the gods.";
2733 if (object_is_cursed(o_ptr))
2735 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
2738 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
2740 info[i++] = "It is permanently cursed.";
2744 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
2747 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
2749 info[i++] = "It is heavily cursed.";
2756 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
2758 info[i++] = "It is cursed.";
2762 * It's a trivial infomation since there is
2763 * fake inscription {cursed}
2769 if ((have_flag(flgs, TR_TY_CURSE)) || (o_ptr->curse_flags & TRC_TY_CURSE))
2772 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
2774 info[i++] = "It carries an ancient foul curse.";
2778 if ((have_flag(flgs, TR_AGGRAVATE)) || (o_ptr->curse_flags & TRC_AGGRAVATE))
2781 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
2783 info[i++] = "It aggravates nearby creatures.";
2787 if ((have_flag(flgs, TR_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
2790 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
2792 info[i++] = "It drains experience.";
2796 if (o_ptr->curse_flags & TRC_SLOW_REGEN)
2799 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
2801 info[i++] = "It slows your regenerative powers.";
2805 if (o_ptr->curse_flags & TRC_ADD_L_CURSE)
2808 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
2810 info[i++] = "It adds weak curses.";
2814 if (o_ptr->curse_flags & TRC_ADD_H_CURSE)
2817 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
2819 info[i++] = "It adds heavy curses.";
2823 if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
2826 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2828 info[i++] = "It attracts animals.";
2832 if (o_ptr->curse_flags & TRC_CALL_DEMON)
2835 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2837 info[i++] = "It attracts demons.";
2841 if (o_ptr->curse_flags & TRC_CALL_DRAGON)
2844 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2846 info[i++] = "It attracts dragons.";
2850 if (o_ptr->curse_flags & TRC_COWARDICE)
2853 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤µ¯¤³¤¹¡£";
2855 info[i++] = "It makes you subject to cowardice.";
2859 if ((have_flag(flgs, TR_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
2862 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
2864 info[i++] = "It induces random teleportation.";
2868 if (o_ptr->curse_flags & TRC_LOW_MELEE)
2871 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
2873 info[i++] = "It causes you to miss blows.";
2877 if (o_ptr->curse_flags & TRC_LOW_AC)
2880 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
2882 info[i++] = "It helps your enemies' blows.";
2886 if (o_ptr->curse_flags & TRC_LOW_MAGIC)
2889 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
2891 info[i++] = "It encumbers you while spellcasting.";
2895 if (o_ptr->curse_flags & TRC_FAST_DIGEST)
2898 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
2900 info[i++] = "It speeds your metabolism.";
2904 if (o_ptr->curse_flags & TRC_DRAIN_HP)
2907 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
2909 info[i++] = "It drains you.";
2913 if (o_ptr->curse_flags & TRC_DRAIN_MANA)
2916 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
2918 info[i++] = "It drains your mana.";
2923 /* Describe about this kind of object instead of THIS fake object */
2924 if (mode & SCROBJ_FAKE_OBJECT)
2926 switch (o_ptr->tval)
2929 switch (o_ptr->sval)
2931 case SV_RING_LORDLY:
2933 info[i++] = "¤½¤ì¤Ï´ö¤Ä¤«¤Î¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
2935 info[i++] = "It provides some random resistances.";
2938 case SV_RING_WARNING:
2940 info[i++] = "¤½¤ì¤Ï¤Ò¤È¤Ä¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2942 info[i++] = "It may provide a low rank ESP.";
2949 switch (o_ptr->sval)
2951 case SV_AMULET_RESISTANCE:
2953 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2955 info[i++] = "It may provides resistance to poison.";
2958 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2960 info[i++] = "It may provide a random resistances.";
2963 case SV_AMULET_THE_MAGI:
2965 info[i++] = "¤½¤ì¤ÏºÇÂç¤Ç£³¤Ä¤Þ¤Ç¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë¡£";
2967 info[i++] = "It provides up to three low rank ESPs.";
2975 if (have_flag(flgs, TR_IGNORE_ACID) &&
2976 have_flag(flgs, TR_IGNORE_ELEC) &&
2977 have_flag(flgs, TR_IGNORE_FIRE) &&
2978 have_flag(flgs, TR_IGNORE_COLD))
2981 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2983 info[i++] = "It cannot be harmed by the elements.";
2988 if (have_flag(flgs, TR_IGNORE_ACID))
2991 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2993 info[i++] = "It cannot be harmed by acid.";
2996 if (have_flag(flgs, TR_IGNORE_ELEC))
2999 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3001 info[i++] = "It cannot be harmed by electricity.";
3004 if (have_flag(flgs, TR_IGNORE_FIRE))
3007 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3009 info[i++] = "It cannot be harmed by fire.";
3012 if (have_flag(flgs, TR_IGNORE_COLD))
3015 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
3017 info[i++] = "It cannot be harmed by cold.";
3022 if (mode & SCROBJ_FORCE_DETAIL) trivial_info = 0;
3024 /* No relevant informations */
3025 if (i <= trivial_info) return (FALSE);
3027 /* Save the screen */
3031 Term_get_size(&wid, &hgt);
3033 /* Display Item name */
3034 if (!(mode & SCROBJ_FAKE_OBJECT))
3035 object_desc(o_name, o_ptr, 0);
3037 object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
3041 /* Erase the screen */
3042 for (k = 1; k < hgt; k++) prt("", k, 13);
3044 /* Label the information */
3045 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
3047 monster_race *r_ptr = &r_info[o_ptr->pval];
3048 int namelen = strlen(r_name + r_ptr->name);
3049 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
3050 Term_queue_bigchar(18 + namelen, 1, r_ptr->x_attr, r_ptr->x_char, 0, 0);
3051 prt("'", 1, (use_bigtile ? 20 : 19) + namelen);
3055 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
3057 prt(" Item Attributes:", 1, 15);
3060 /* We will print on top of the map (column 13) */
3061 for (k = 2, j = 0; j < i; j++)
3064 prt(info[j], k++, 15);
3066 /* Every 20 entries (lines 2 to 21), start over */
3067 if ((k == hgt - 2) && (j+1 < i))
3070 prt("-- ³¤¯ --", k, 15);
3072 prt("-- more --", k, 15);
3075 for (; k > 2; k--) prt("", k, 15);
3081 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
3083 prt("[Press any key to continue]", k, 15);
3088 /* Restore the screen */
3091 /* Gave knowledge */
3098 * Convert an inventory index into a one character label
3099 * Note that the label does NOT distinguish inven/equip.
3101 char index_to_label(int i)
3103 /* Indexes for "inven" are easy */
3104 if (i < INVEN_RARM) return (I2A(i));
3106 /* Indexes for "equip" are offset */
3107 return (I2A(i - INVEN_RARM));
3112 * Convert a label into the index of an item in the "inven"
3113 * Return "-1" if the label does not indicate a real item
3115 s16b label_to_inven(int c)
3120 i = (islower(c) ? A2I(c) : -1);
3122 /* Verify the index */
3123 if ((i < 0) || (i > INVEN_PACK)) return (-1);
3125 /* Empty slots can never be chosen */
3126 if (!inventory[i].k_idx) return (-1);
3128 /* Return the index */
3134 extern bool select_ring_slot;
3137 static bool is_ring_slot(int i)
3139 return (i == INVEN_RIGHT) || (i == INVEN_LEFT);
3144 * Convert a label into the index of a item in the "equip"
3145 * Return "-1" if the label does not indicate a real item
3147 s16b label_to_equip(int c)
3152 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
3154 /* Verify the index */
3155 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
3157 if (select_ring_slot) return is_ring_slot(i) ? i : -1;
3159 /* Empty slots can never be chosen */
3160 if (!inventory[i].k_idx) return (-1);
3162 /* Return the index */
3169 * Determine which equipment slot (if any) an item likes
3171 s16b wield_slot(object_type *o_ptr)
3173 /* Slot for equipment */
3174 switch (o_ptr->tval)
3181 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
3182 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
3183 return (INVEN_LARM);
3190 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
3191 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
3192 return (INVEN_RARM);
3202 /* Use the right hand first */
3203 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
3205 /* Use the left hand for swapping (by default) */
3206 return (INVEN_LEFT);
3212 return (INVEN_NECK);
3217 return (INVEN_LITE);
3224 return (INVEN_BODY);
3229 return (INVEN_OUTER);
3235 return (INVEN_HEAD);
3240 return (INVEN_HANDS);
3245 return (INVEN_FEET);
3249 /* No slot available */
3255 * Return a string mentioning how a given item is carried
3257 cptr mention_use(int i)
3261 /* Examine the location */
3265 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->migite) ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê")); break;
3267 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "Just lifting" : (p_ptr->migite ? "Wielding" : "On arm"); break;
3271 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->hidarite) ? " ξ¼ê" : (left_hander ? " ±¦¼ê" : " º¸¼ê")); break;
3273 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "Just lifting" : (p_ptr->hidarite ? "Wielding" : "On arm"); break;
3277 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "±¿ÈÂÃæ" : "¼Í·âÍÑ"; break;
3279 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "Just holding" : "Shooting"; break;
3283 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
3285 case INVEN_RIGHT: p = (left_hander ? "On left hand" : "On right hand"); break;
3289 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
3291 case INVEN_LEFT: p = (left_hander ? "On right hand" : "On left hand"); break;
3295 case INVEN_NECK: p = " ¼ó"; break;
3297 case INVEN_NECK: p = "Around neck"; break;
3301 case INVEN_LITE: p = " ¸÷¸»"; break;
3303 case INVEN_LITE: p = "Light source"; break;
3307 case INVEN_BODY: p = " ÂÎ"; break;
3309 case INVEN_BODY: p = "On body"; break;
3313 case INVEN_OUTER: p = "ÂΤξå"; break;
3315 case INVEN_OUTER: p = "About body"; break;
3319 case INVEN_HEAD: p = " Ƭ"; break;
3321 case INVEN_HEAD: p = "On head"; break;
3325 case INVEN_HANDS: p = " ¼ê"; break;
3327 case INVEN_HANDS: p = "On hands"; break;
3331 case INVEN_FEET: p = " "; break;
3333 case INVEN_FEET: p = "On feet"; break;
3337 default: p = "¥¶¥Ã¥¯"; break;
3339 default: p = "In pack"; break;
3343 /* Return the result */
3349 * Return a string describing how a given item is being worn.
3350 * Currently, only used for items in the equipment, not inventory.
3352 cptr describe_use(int i)
3359 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->migite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
3361 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "just lifting" : (p_ptr->migite ? "attacking monsters with" : "wearing on your arm"); break;
3365 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->hidarite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
3367 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "just lifting" : (p_ptr->hidarite ? "attacking monsters with" : "wearing on your arm"); break;
3371 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î" : "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
3373 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "just holding" : "shooting missiles with"; break;
3377 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3379 case INVEN_RIGHT: p = (left_hander ? "wearing on your left hand" : "wearing on your right hand"); break;
3383 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3385 case INVEN_LEFT: p = (left_hander ? "wearing on your right hand" : "wearing on your left hand"); break;
3389 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
3391 case INVEN_NECK: p = "wearing around your neck"; break;
3395 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
3397 case INVEN_LITE: p = "using to light the way"; break;
3401 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
3403 case INVEN_BODY: p = "wearing on your body"; break;
3407 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
3409 case INVEN_OUTER: p = "wearing on your back"; break;
3413 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
3415 case INVEN_HEAD: p = "wearing on your head"; break;
3419 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
3421 case INVEN_HANDS: p = "wearing on your hands"; break;
3425 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
3427 case INVEN_FEET: p = "wearing on your feet"; break;
3431 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
3433 default: p = "carrying in your pack"; break;
3437 /* Return the result */
3442 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
3444 bool check_book_realm(const byte book_tval, const byte book_sval)
3446 if (book_tval < TV_LIFE_BOOK) return FALSE;
3447 if (p_ptr->pclass == CLASS_SORCERER)
3449 return is_magic(tval2realm(book_tval));
3451 else if (p_ptr->pclass == CLASS_RED_MAGE)
3453 if (is_magic(tval2realm(book_tval)))
3454 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
3456 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
3461 * Check an item against the item tester info
3463 bool item_tester_okay(object_type *o_ptr)
3465 /* Hack -- allow listing empty slots */
3466 if (item_tester_full) return (TRUE);
3468 /* Require an item */
3469 if (!o_ptr->k_idx) return (FALSE);
3471 /* Hack -- ignore "gold" */
3472 if (o_ptr->tval == TV_GOLD)
3475 extern bool show_gold_on_floor;
3477 if (!show_gold_on_floor) return (FALSE);
3480 /* Check the tval */
3481 if (item_tester_tval)
3483 /* Is it a spellbook? If so, we need a hack -- TY */
3484 if ((item_tester_tval <= TV_DEATH_BOOK) &&
3485 (item_tester_tval >= TV_LIFE_BOOK))
3486 return check_book_realm(o_ptr->tval, o_ptr->sval);
3488 if (item_tester_tval != o_ptr->tval) return (FALSE);
3491 /* Check the hook */
3492 if (item_tester_hook)
3494 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
3505 * Choice window "shadow" of the "show_inven()" function
3507 void display_inven(void)
3509 register int i, n, z = 0;
3511 byte attr = TERM_WHITE;
3513 char o_name[MAX_NLEN];
3517 Term_get_size(&wid, &hgt);
3519 /* Find the "final" slot */
3520 for (i = 0; i < INVEN_PACK; i++)
3522 o_ptr = &inventory[i];
3524 /* Skip non-objects */
3525 if (!o_ptr->k_idx) continue;
3531 /* Display the pack */
3532 for (i = 0; i < z; i++)
3534 /* Examine the item */
3535 o_ptr = &inventory[i];
3537 /* Start with an empty "index" */
3538 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
3540 /* Is this item "acceptable"? */
3541 if (item_tester_okay(o_ptr))
3543 /* Prepare an "index" */
3544 tmp_val[0] = index_to_label(i);
3546 /* Bracket the "index" --(-- */
3550 /* Display the index (or blank space) */
3551 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
3553 /* Obtain an item description */
3554 object_desc(o_name, o_ptr, 0);
3556 /* Obtain the length of the description */
3560 attr = tval_to_attr[o_ptr->tval % 128];
3562 /* Grey out charging items */
3568 /* Display the entry itself */
3569 Term_putstr(3, i, n, attr, o_name);
3571 /* Erase the rest of the line */
3572 Term_erase(3+n, i, 255);
3574 /* Display the weight if needed */
3577 int wgt = o_ptr->weight * o_ptr->number;
3579 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
3581 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3584 prt(tmp_val, i, wid - 9);
3588 /* Erase the rest of the window */
3589 for (i = z; i < hgt; i++)
3591 /* Erase the line */
3592 Term_erase(0, i, 255);
3599 * Choice window "shadow" of the "show_equip()" function
3601 void display_equip(void)
3605 byte attr = TERM_WHITE;
3607 char o_name[MAX_NLEN];
3611 Term_get_size(&wid, &hgt);
3613 /* Display the equipment */
3614 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
3616 /* Examine the item */
3617 o_ptr = &inventory[i];
3619 /* Start with an empty "index" */
3620 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
3622 /* Is this item "acceptable"? */
3623 if (select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr))
3625 /* Prepare an "index" */
3626 tmp_val[0] = index_to_label(i);
3628 /* Bracket the "index" --(-- */
3632 /* Display the index (or blank space) */
3633 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
3635 /* Obtain an item description */
3636 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
3639 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
3641 strcpy(o_name, "(wielding with two-hands)");
3647 object_desc(o_name, o_ptr, 0);
3648 attr = tval_to_attr[o_ptr->tval % 128];
3651 /* Obtain the length of the description */
3654 /* Grey out charging items */
3660 /* Display the entry itself */
3661 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
3663 /* Erase the rest of the line */
3664 Term_erase(3+n, i - INVEN_RARM, 255);
3666 /* Display the weight (if needed) */
3669 int wgt = o_ptr->weight * o_ptr->number;
3671 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
3673 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3676 prt(tmp_val, i - INVEN_RARM, wid - (show_labels ? 28 : 9));
3679 /* Display the slot description (if needed) */
3682 Term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
3683 prt(mention_use(i), i - INVEN_RARM, wid - 15);
3687 /* Erase the rest of the window */
3688 for (i = INVEN_TOTAL - INVEN_RARM; i < hgt; i++)
3690 /* Clear that line */
3691 Term_erase(0, i, 255);
3697 * Find the "first" inventory object with the given "tag".
3699 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
3700 * inscription of an object. Alphabetical characters don't work as a
3703 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
3704 * and "x" is the "current" command_cmd code.
3706 static bool get_tag(int *cp, char tag, int mode)
3711 /* Extract index from mode */
3716 end = INVEN_TOTAL - 1;
3721 end = INVEN_PACK - 1;
3728 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
3730 /* Check every inventory object */
3731 for (i = start; i <= end; i++)
3733 object_type *o_ptr = &inventory[i];
3735 /* Skip non-objects */
3736 if (!o_ptr->k_idx) continue;
3738 /* Skip empty inscriptions */
3739 if (!o_ptr->inscription) continue;
3741 /* Skip non-choice */
3742 if (!item_tester_okay(o_ptr)) continue;
3745 s = my_strchr(quark_str(o_ptr->inscription), '@');
3747 /* Process all tags */
3750 /* Check the special tags */
3751 if ((s[1] == command_cmd) && (s[2] == tag))
3753 /* Save the actual inventory ID */
3760 /* Find another '@' */
3761 s = my_strchr(s + 1, '@');
3766 /**** Find a tag in the form of {@#} (allows only numerals) ***/
3768 /* Don't allow {@#} with '#' being alphabet */
3769 if (tag < '0' || '9' < tag)
3775 /* Check every object */
3776 for (i = start; i <= end; i++)
3778 object_type *o_ptr = &inventory[i];
3780 /* Skip non-objects */
3781 if (!o_ptr->k_idx) continue;
3783 /* Skip empty inscriptions */
3784 if (!o_ptr->inscription) continue;
3786 /* Skip non-choice */
3787 if (!item_tester_okay(o_ptr)) continue;
3790 s = my_strchr(quark_str(o_ptr->inscription), '@');
3792 /* Process all tags */
3795 /* Check the normal tags */
3798 /* Save the actual inventory ID */
3805 /* Find another '@' */
3806 s = my_strchr(s + 1, '@');
3816 * Find the "first" floor object with the given "tag".
3818 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
3819 * inscription of an object. Alphabetical characters don't work as a
3822 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
3823 * and "x" is the "current" command_cmd code.
3825 static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
3830 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
3832 /* Check every object in the grid */
3833 for (i = 0; i < floor_num && i < 23; i++)
3835 object_type *o_ptr = &o_list[floor_list[i]];
3837 /* Skip empty inscriptions */
3838 if (!o_ptr->inscription) continue;
3841 s = my_strchr(quark_str(o_ptr->inscription), '@');
3843 /* Process all tags */
3846 /* Check the special tags */
3847 if ((s[1] == command_cmd) && (s[2] == tag))
3849 /* Save the actual floor object ID */
3856 /* Find another '@' */
3857 s = my_strchr(s + 1, '@');
3862 /**** Find a tag in the form of {@#} (allows only numerals) ***/
3864 /* Don't allow {@#} with '#' being alphabet */
3865 if (tag < '0' || '9' < tag)
3871 /* Check every object in the grid */
3872 for (i = 0; i < floor_num && i < 23; i++)
3874 object_type *o_ptr = &o_list[floor_list[i]];
3876 /* Skip empty inscriptions */
3877 if (!o_ptr->inscription) continue;
3880 s = my_strchr(quark_str(o_ptr->inscription), '@');
3882 /* Process all tags */
3885 /* Check the normal tags */
3888 /* Save the floor object ID */
3895 /* Find another '@' */
3896 s = my_strchr(s + 1, '@');
3906 * Move around label characters with correspond tags
3908 static void prepare_label_string(char *label, int mode)
3910 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
3911 int offset = (mode == USE_EQUIP) ? INVEN_RARM : 0;
3914 /* Prepare normal labels */
3915 strcpy(label, alphabet_chars);
3917 /* Move each label */
3918 for (i = 0; i < 52; i++)
3921 char c = alphabet_chars[i];
3923 /* Find a tag with this label */
3924 if (get_tag(&index, c, mode))
3926 /* Delete the overwritten label */
3927 if (label[i] == c) label[i] = ' ';
3929 /* Move the label to the place of corresponding tag */
3930 label[index - offset] = c;
3937 * Move around label characters with correspond tags (floor version)
3939 static void prepare_label_string_floor(char *label, int floor_list[], int floor_num)
3941 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
3944 /* Prepare normal labels */
3945 strcpy(label, alphabet_chars);
3947 /* Move each label */
3948 for (i = 0; i < 52; i++)
3951 char c = alphabet_chars[i];
3953 /* Find a tag with this label */
3954 if (get_tag_floor(&index, c, floor_list, floor_num))
3956 /* Delete the overwritten label */
3957 if (label[i] == c) label[i] = ' ';
3959 /* Move the label to the place of corresponding tag */
3967 * Display the inventory.
3969 * Hack -- do not display "trailing" empty slots
3971 int show_inven(int target_item)
3973 int i, j, k, l, z = 0;
3974 int col, cur_col, len;
3976 char o_name[MAX_NLEN];
3980 char out_desc[23][MAX_NLEN];
3981 int target_item_label = 0;
3983 char inven_label[52 + 1];
3985 /* Starting column */
3989 Term_get_size(&wid, &hgt);
3991 /* Default "max-length" */
3992 len = wid - col - 1;
3995 /* Find the "final" slot */
3996 for (i = 0; i < INVEN_PACK; i++)
3998 o_ptr = &inventory[i];
4000 /* Skip non-objects */
4001 if (!o_ptr->k_idx) continue;
4007 prepare_label_string(inven_label, USE_INVEN);
4009 /* Display the inventory */
4010 for (k = 0, i = 0; i < z; i++)
4012 o_ptr = &inventory[i];
4014 /* Is this item acceptable? */
4015 if (!item_tester_okay(o_ptr)) continue;
4017 /* Describe the object */
4018 object_desc(o_name, o_ptr, 0);
4020 /* Save the object index, color, and description */
4022 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4024 /* Grey out charging items */
4027 out_color[k] = TERM_L_DARK;
4030 (void)strcpy(out_desc[k], o_name);
4032 /* Find the predicted "line length" */
4033 l = strlen(out_desc[k]) + 5;
4035 /* Be sure to account for the weight */
4036 if (show_weights) l += 9;
4038 /* Account for icon if displayed */
4039 if (show_item_graph)
4042 if (use_bigtile) l++;
4045 /* Maintain the maximum length */
4046 if (l > len) len = l;
4048 /* Advance to next "line" */
4052 /* Find the column to start in */
4053 col = (len > wid - 4) ? 0 : (wid - len - 1);
4055 /* Output each entry */
4056 for (j = 0; j < k; j++)
4062 o_ptr = &inventory[i];
4064 /* Clear the line */
4065 prt("", j + 1, col ? col - 2 : col);
4067 if (use_menu && target_item)
4069 if (j == (target_item-1))
4072 strcpy(tmp_val, "¡Õ");
4074 strcpy(tmp_val, "> ");
4076 target_item_label = i;
4078 else strcpy(tmp_val, " ");
4080 else if (i <= INVEN_PACK)
4082 /* Prepare an index --(-- */
4083 sprintf(tmp_val, "%c)", inven_label[i]);
4087 /* Prepare an index --(-- */
4088 sprintf(tmp_val, "%c)", index_to_label(i));
4091 /* Clear the line with the (possibly indented) index */
4092 put_str(tmp_val, j + 1, col);
4096 /* Display graphics for object, if desired */
4097 if (show_item_graph)
4099 byte a = object_attr(o_ptr);
4100 char c = object_char(o_ptr);
4103 if (a & 0x80) a |= 0x40;
4106 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
4107 if (use_bigtile) cur_col++;
4113 /* Display the entry itself */
4114 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
4116 /* Display the weight if needed */
4119 int wgt = o_ptr->weight * o_ptr->number;
4121 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4123 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4126 prt(tmp_val, j + 1, wid - 9);
4130 /* Make a "shadow" below the list (only if needed) */
4131 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4133 /* Save the new column */
4136 return target_item_label;
4142 * Display the equipment.
4144 int show_equip(int target_item)
4147 int col, cur_col, len;
4150 char o_name[MAX_NLEN];
4153 char out_desc[23][MAX_NLEN];
4154 int target_item_label = 0;
4156 char equip_label[52 + 1];
4158 /* Starting column */
4162 Term_get_size(&wid, &hgt);
4164 /* Maximal length */
4165 len = wid - col - 1;
4168 /* Scan the equipment list */
4169 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
4171 o_ptr = &inventory[i];
4173 /* Is this item acceptable? */
4174 if (!(select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr)) &&
4175 (!((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute) ||
4176 item_tester_no_ryoute)) continue;
4179 object_desc(o_name, o_ptr, 0);
4181 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
4184 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
4186 (void)strcpy(out_desc[k],"(wielding with two-hands)");
4188 out_color[k] = TERM_WHITE;
4192 (void)strcpy(out_desc[k], o_name);
4193 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4197 /* Grey out charging items */
4200 out_color[k] = TERM_L_DARK;
4203 /* Extract the maximal length (see below) */
4205 l = strlen(out_desc[k]) + (2 + 1);
4207 l = strlen(out_desc[k]) + (2 + 3);
4211 /* Increase length for labels (if needed) */
4213 if (show_labels) l += (7 + 2);
4215 if (show_labels) l += (14 + 2);
4219 /* Increase length for weight (if needed) */
4220 if (show_weights) l += 9;
4222 if (show_item_graph) l += 2;
4224 /* Maintain the max-length */
4225 if (l > len) len = l;
4227 /* Advance the entry */
4231 /* Hack -- Find a column to start in */
4233 col = (len > wid - 6) ? 0 : (wid - len - 1);
4235 col = (len > wid - 4) ? 0 : (wid - len - 1);
4238 prepare_label_string(equip_label, USE_EQUIP);
4240 /* Output each entry */
4241 for (j = 0; j < k; j++)
4247 o_ptr = &inventory[i];
4249 /* Clear the line */
4250 prt("", j + 1, col ? col - 2 : col);
4252 if (use_menu && target_item)
4254 if (j == (target_item-1))
4257 strcpy(tmp_val, "¡Õ");
4259 strcpy(tmp_val, "> ");
4261 target_item_label = i;
4263 else strcpy(tmp_val, " ");
4265 else if (i >= INVEN_RARM)
4267 /* Prepare an index --(-- */
4268 sprintf(tmp_val, "%c)", equip_label[i - INVEN_RARM]);
4272 /* Prepare an index --(-- */
4273 sprintf(tmp_val, "%c)", index_to_label(i));
4276 /* Clear the line with the (possibly indented) index */
4277 put_str(tmp_val, j+1, col);
4281 /* Display graphics for object, if desired */
4282 if (show_item_graph)
4284 byte a = object_attr(o_ptr);
4285 char c = object_char(o_ptr);
4288 if (a & 0x80) a |= 0x40;
4291 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
4292 if (use_bigtile) cur_col++;
4300 /* Mention the use */
4302 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
4304 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
4307 put_str(tmp_val, j+1, cur_col);
4309 /* Display the entry itself */
4311 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
4313 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
4320 /* Display the entry itself */
4321 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
4324 /* Display the weight if needed */
4327 int wgt = o_ptr->weight * o_ptr->number;
4329 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4331 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
4334 prt(tmp_val, j + 1, wid - 9);
4338 /* Make a "shadow" below the list (only if needed) */
4339 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4341 /* Save the new column */
4344 return target_item_label;
4351 * Flip "inven" and "equip" in any sub-windows
4353 void toggle_inven_equip(void)
4358 for (j = 0; j < 8; j++)
4361 if (!angband_term[j]) continue;
4363 /* Flip inven to equip */
4364 if (window_flag[j] & (PW_INVEN))
4367 window_flag[j] &= ~(PW_INVEN);
4368 window_flag[j] |= (PW_EQUIP);
4371 p_ptr->window |= (PW_EQUIP);
4374 /* Flip inven to equip */
4375 else if (window_flag[j] & (PW_EQUIP))
4378 window_flag[j] &= ~(PW_EQUIP);
4379 window_flag[j] |= (PW_INVEN);
4382 p_ptr->window |= (PW_INVEN);
4390 * Verify the choice of an item.
4392 * The item can be negative to mean "item on floor".
4394 static bool verify(cptr prompt, int item)
4396 char o_name[MAX_NLEN];
4397 char out_val[MAX_NLEN+20];
4404 o_ptr = &inventory[item];
4410 o_ptr = &o_list[0 - item];
4414 object_desc(o_name, o_ptr, 0);
4418 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
4420 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
4425 return (get_check(out_val));
4430 * Hack -- allow user to "prevent" certain choices
4432 * The item can be negative to mean "item on floor".
4434 static bool get_item_allow(int item)
4440 if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
4445 o_ptr = &inventory[item];
4451 o_ptr = &o_list[0 - item];
4454 /* No inscription */
4455 if (!o_ptr->inscription) return (TRUE);
4458 s = my_strchr(quark_str(o_ptr->inscription), '!');
4460 /* Process preventions */
4463 /* Check the "restriction" */
4464 if ((s[1] == command_cmd) || (s[1] == '*'))
4466 /* Verify the choice */
4468 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
4470 if (!verify("Really try", item)) return (FALSE);
4475 /* Find another '!' */
4476 s = my_strchr(s + 1, '!');
4486 * Auxiliary function for "get_item()" -- test an index
4488 static bool get_item_okay(int i)
4491 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
4493 if (select_ring_slot) return is_ring_slot(i);
4495 /* Verify the item */
4496 if (!item_tester_okay(&inventory[i])) return (FALSE);
4505 * Determine whether get_item() can get some item or not
4506 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
4508 bool can_get_item(void)
4510 int j, floor_list[23], floor_num = 0;
4512 for (j = 0; j < INVEN_TOTAL; j++)
4513 if (item_tester_okay(&inventory[j]))
4516 floor_num = scan_floor(floor_list, py, px, 0x03);
4524 * Let the user select an item, save its "index"
4526 * Return TRUE only if an acceptable item was chosen by the user.
4528 * The selected item must satisfy the "item_tester_hook()" function,
4529 * if that hook is set, and the "item_tester_tval", if that value is set.
4531 * All "item_tester" restrictions are cleared before this function returns.
4533 * The user is allowed to choose acceptable items from the equipment,
4534 * inventory, or floor, respectively, if the proper flag was given,
4535 * and there are any acceptable items in that location.
4537 * The equipment or inventory are displayed (even if no acceptable
4538 * items are in that location) if the proper flag was given.
4540 * If there are no acceptable items available anywhere, and "str" is
4541 * not NULL, then it will be used as the text of a warning message
4542 * before the function returns.
4544 * Note that the user must press "-" to specify the item on the floor,
4545 * and there is no way to "examine" the item on the floor, while the
4546 * use of "capital" letters will "examine" an inventory/equipment item,
4547 * and prompt for its use.
4549 * If a legal item is selected from the inventory, we save it in "cp"
4550 * directly (0 to 35), and return TRUE.
4552 * If a legal item is selected from the floor, we save it in "cp" as
4553 * a negative (-1 to -511), and return TRUE.
4555 * If no item is available, we do nothing to "cp", and we display a
4556 * warning message, using "str" if available, and return FALSE.
4558 * If no item is selected, we do nothing to "cp", and return FALSE.
4560 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
4561 * to allow the user to enter a command while viewing those screens, and
4562 * also to induce "auto-enter" of stores, and other such stuff.
4564 * Global "p_ptr->command_see" may be set before calling this function to start
4565 * out in "browse" mode. It is cleared before this function returns.
4567 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
4568 * If it is TRUE then we are viewing inventory, else equipment.
4570 * We always erase the prompt when we are done, leaving a blank line,
4571 * or a warning message, if appropriate, if no items are available.
4573 bool get_item(int *cp, cptr pmt, cptr str, int mode)
4575 s16b this_o_idx, next_o_idx = 0;
4579 int j, k, i1, i2, e1, e2;
4589 bool allow_floor = FALSE;
4591 bool toggle = FALSE;
4597 extern bool select_the_force;
4599 int menu_line = (use_menu ? 1 : 0);
4605 static char prev_tag = '\0';
4606 char cur_tag = '\0';
4608 #endif /* ALLOW_REPEAT */
4610 #ifdef ALLOW_EASY_FLOOR /* TNB */
4612 if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
4614 #endif /* ALLOW_EASY_FLOOR -- TNB */
4617 if (mode & USE_EQUIP) equip = TRUE;
4618 if (mode & USE_INVEN) inven = TRUE;
4619 if (mode & USE_FLOOR) floor = TRUE;
4623 /* Get the item index */
4624 if (repeat_pull(cp))
4627 if (select_the_force && (*cp == INVEN_FORCE))
4629 item_tester_tval = 0;
4630 item_tester_hook = NULL;
4631 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4636 else if (floor && (*cp < 0))
4643 /* Acquire object */
4646 /* Validate the item */
4647 if (item_tester_okay(o_ptr))
4649 /* Forget restrictions */
4650 item_tester_tval = 0;
4651 item_tester_hook = NULL;
4652 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4659 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
4660 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
4662 if (prev_tag && command_cmd)
4664 /* Look up the tag and validate the item */
4665 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
4666 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
4667 else if (!get_item_okay(k)) /* Reject */;
4670 /* Accept that choice */
4673 /* Forget restrictions */
4674 item_tester_tval = 0;
4675 item_tester_hook = NULL;
4676 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4682 prev_tag = '\0'; /* prev_tag is no longer effective */
4685 /* Verify the item */
4686 else if (get_item_okay(*cp))
4688 /* Forget restrictions */
4689 item_tester_tval = 0;
4690 item_tester_hook = NULL;
4691 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4699 #endif /* ALLOW_REPEAT */
4702 /* Paranoia XXX XXX XXX */
4709 /* No item selected */
4713 /* Full inventory */
4715 i2 = INVEN_PACK - 1;
4717 /* Forbid inventory */
4718 if (!inven) i2 = -1;
4721 for (j = 0; j < INVEN_PACK; j++)
4722 if (item_tester_okay(&inventory[j])) max_inven++;
4725 /* Restrict inventory indexes */
4726 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
4727 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
4730 /* Full equipment */
4732 e2 = INVEN_TOTAL - 1;
4734 /* Forbid equipment */
4735 if (!equip) e2 = -1;
4738 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
4739 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
4740 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
4743 /* Restrict equipment indexes */
4744 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
4745 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
4747 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
4751 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
4753 else if (p_ptr->hidarite) e1 = INVEN_RARM;
4757 /* Restrict floor usage */
4760 /* Scan all objects in the grid */
4761 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
4765 /* Acquire object */
4766 o_ptr = &o_list[this_o_idx];
4768 /* Acquire next object */
4769 next_o_idx = o_ptr->next_o_idx;
4771 /* Accept the item on the floor if legal */
4772 if (item_tester_okay(o_ptr) && (o_ptr->marked & OM_FOUND)) allow_floor = TRUE;
4776 /* Require at least one legal choice */
4777 if (!allow_floor && (i1 > i2) && (e1 > e2))
4779 /* Cancel p_ptr->command_see */
4780 command_see = FALSE;
4788 if (select_the_force) {
4794 /* Analyze choices */
4797 /* Hack -- Start on equipment if requested */
4798 if (command_see && command_wrk && equip)
4803 /* Use inventory if allowed */
4806 command_wrk = FALSE;
4809 /* Use equipment if allowed */
4815 /* Use inventory for floor */
4818 command_wrk = FALSE;
4824 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
4826 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
4828 /* Hack -- start out in "display" mode */
4836 /* Repeat until done */
4839 int get_item_label = 0;
4846 for (j = 0; j < 8; j++)
4849 if (!angband_term[j]) continue;
4851 /* Count windows displaying inven */
4852 if (window_flag[j] & (PW_INVEN)) ni++;
4854 /* Count windows displaying equip */
4855 if (window_flag[j] & (PW_EQUIP)) ne++;
4858 /* Toggle if needed */
4859 if ((command_wrk && ni && !ne) ||
4860 (!command_wrk && !ni && ne))
4863 toggle_inven_equip();
4870 p_ptr->window |= (PW_INVEN | PW_EQUIP);
4872 /* Redraw windows */
4876 /* Inventory screen */
4879 /* Redraw if needed */
4880 if (command_see) get_item_label = show_inven(menu_line);
4883 /* Equipment screen */
4886 /* Redraw if needed */
4887 if (command_see) get_item_label = show_equip(menu_line);
4890 /* Viewing inventory */
4893 /* Begin the prompt */
4895 sprintf(out_val, "»ý¤Áʪ:");
4897 sprintf(out_val, "Inven:");
4900 /* Some legal items */
4901 if ((i1 <= i2) && !use_menu)
4903 /* Build the prompt */
4905 sprintf(tmp_val, "%c-%c,'(',')',",
4907 sprintf(tmp_val, " %c-%c,'(',')',",
4909 index_to_label(i1), index_to_label(i2));
4912 strcat(out_val, tmp_val);
4915 /* Indicate ability to "view" */
4917 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
4919 if (!command_see && !use_menu) strcat(out_val, " * to see,");
4924 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
4926 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
4930 /* Viewing equipment */
4933 /* Begin the prompt */
4935 sprintf(out_val, "ÁõÈ÷ÉÊ:");
4937 sprintf(out_val, "Equip:");
4940 /* Some legal items */
4941 if ((e1 <= e2) && !use_menu)
4943 /* Build the prompt */
4945 sprintf(tmp_val, "%c-%c,'(',')',",
4947 sprintf(tmp_val, " %c-%c,'(',')',",
4949 index_to_label(e1), index_to_label(e2));
4952 strcat(out_val, tmp_val);
4955 /* Indicate ability to "view" */
4957 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
4959 if (!command_see) strcat(out_val, " * to see,");
4964 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
4966 if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
4970 /* Indicate legality of the "floor" item */
4972 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
4973 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
4975 if (allow_floor) strcat(out_val, " - for floor,");
4976 if (select_the_force) strcat(out_val, " w for the Force,");
4979 /* Finish the prompt */
4980 strcat(out_val, " ESC");
4982 /* Build the prompt */
4983 sprintf(tmp_val, "(%s) %s", out_val, pmt);
4985 /* Show the prompt */
4993 int max_line = (command_wrk ? max_equip : max_inven);
5009 menu_line += (max_line - 1);
5028 /* Verify legality */
5029 if (!inven || !equip)
5035 /* Hack -- Fix screen */
5045 /* Switch inven/equip */
5046 command_wrk = !command_wrk;
5047 max_line = (command_wrk ? max_equip : max_inven);
5048 if (menu_line > max_line) menu_line = max_line;
5050 /* Need to redraw */
5059 if (command_wrk == USE_FLOOR)
5062 (*cp) = -get_item_label;
5066 /* Validate the item */
5067 if (!get_item_okay(get_item_label))
5073 /* Allow player to "refuse" certain actions */
5074 if (!get_item_allow(get_item_label))
5080 /* Accept that choice */
5081 (*cp) = get_item_label;
5090 if (select_the_force) {
5098 if (menu_line > max_line) menu_line -= max_line;
5119 command_see = FALSE;
5139 /* Verify legality */
5140 if (!inven || !equip)
5146 /* Hack -- Fix screen */
5156 /* Switch inven/equip */
5157 command_wrk = !command_wrk;
5159 /* Need to redraw */
5165 /* Use floor item */
5168 /* Scan all objects in the grid */
5169 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5173 /* Acquire object */
5174 o_ptr = &o_list[this_o_idx];
5176 /* Acquire next object */
5177 next_o_idx = o_ptr->next_o_idx;
5179 /* Validate the item */
5180 if (!item_tester_okay(o_ptr)) continue;
5185 /* Verify the item (if required) */
5187 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
5189 if (other_query_flag && !verify("Try", k)) continue;
5193 /* Allow player to "refuse" certain actions */
5194 if (!get_item_allow(k)) continue;
5196 /* Accept that choice */
5213 case '1': case '2': case '3':
5214 case '4': case '5': case '6':
5215 case '7': case '8': case '9':
5217 /* Look up the tag */
5218 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
5224 /* Hack -- Validate the item */
5225 if ((k < INVEN_RARM) ? !inven : !equip)
5231 /* Validate the item */
5232 if (!get_item_okay(k))
5238 /* Allow player to "refuse" certain actions */
5239 if (!get_item_allow(k))
5245 /* Accept that choice */
5251 #endif /* ALLOW_REPEAT */
5259 /* Choose "default" inventory item */
5262 k = ((i1 == i2) ? i1 : -1);
5265 /* Choose "default" equipment item */
5268 k = ((e1 == e2) ? e1 : -1);
5271 /* Validate the item */
5272 if (!get_item_okay(k))
5278 /* Allow player to "refuse" certain actions */
5279 if (!get_item_allow(k))
5285 /* Accept that choice */
5295 if (select_the_force) {
5308 bool not_found = FALSE;
5310 /* Look up the alphabetical tag */
5311 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
5316 /* Hack -- Validate the item */
5317 else if ((k < INVEN_RARM) ? !inven : !equip)
5322 /* Validate the item */
5323 else if (!get_item_okay(k))
5330 /* Accept that choice */
5336 #endif /* ALLOW_REPEAT */
5340 /* Extract "query" setting */
5341 ver = isupper(which);
5342 which = tolower(which);
5344 /* Convert letter to inventory index */
5347 if (which == '(') k = i1;
5348 else if (which == ')') k = i2;
5349 else k = label_to_inven(which);
5352 /* Convert letter to equipment index */
5355 if (which == '(') k = e1;
5356 else if (which == ')') k = e2;
5357 else k = label_to_equip(which);
5360 /* Validate the item */
5361 if (!get_item_okay(k))
5367 /* Verify the item */
5369 if (ver && !verify("ËÜÅö¤Ë", k))
5371 if (ver && !verify("Try", k))
5379 /* Allow player to "refuse" certain actions */
5380 if (!get_item_allow(k))
5386 /* Accept that choice */
5397 /* Fix the screen if necessary */
5403 /* Hack -- Cancel "display" */
5404 command_see = FALSE;
5408 /* Forget the item_tester_tval restriction */
5409 item_tester_tval = 0;
5411 item_tester_no_ryoute = FALSE;
5413 /* Forget the item_tester_hook restriction */
5414 item_tester_hook = NULL;
5417 /* Clean up 'show choices' */
5418 /* Toggle again if needed */
5419 if (toggle) toggle_inven_equip();
5422 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5428 /* Clear the prompt line */
5431 /* Warning if needed */
5432 if (oops && str) msg_print(str);
5438 if (command_cmd) prev_tag = cur_tag;
5439 #endif /* ALLOW_REPEAT */
5441 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5449 #ifdef ALLOW_EASY_FLOOR
5454 * Return a list of o_list[] indexes of items at the given cave
5455 * location. Valid flags are:
5457 * mode & 0x01 -- Item tester
5458 * mode & 0x02 -- Marked items only
5459 * mode & 0x04 -- Stop after first
5461 int scan_floor(int *items, int y, int x, int mode)
5463 int this_o_idx, next_o_idx;
5468 if (!in_bounds(y, x)) return 0;
5470 /* Scan all objects in the grid */
5471 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
5475 /* Acquire object */
5476 o_ptr = &o_list[this_o_idx];
5478 /* Acquire next object */
5479 next_o_idx = o_ptr->next_o_idx;
5482 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
5485 if ((mode & 0x02) && !(o_ptr->marked & OM_FOUND)) continue;
5487 /* Accept this item */
5488 /* XXX Hack -- Enforce limit */
5490 items[num] = this_o_idx;
5495 if (mode & 0x04) break;
5504 * Display a list of the items on the floor at the given location.
5506 int show_floor(int target_item, int y, int x, int *min_width)
5513 char o_name[MAX_NLEN];
5519 char out_desc[23][MAX_NLEN];
5520 int target_item_label = 0;
5522 int floor_list[23], floor_num;
5524 char floor_label[52 + 1];
5526 bool dont_need_to_show_weights = TRUE;
5529 Term_get_size(&wid, &hgt);
5531 /* Default length */
5532 len = MAX((*min_width), 20);
5535 /* Scan for objects in the grid, using item_tester_okay() */
5536 floor_num = scan_floor(floor_list, y, x, 0x03);
5538 /* Display the floor objects */
5539 for (k = 0, i = 0; i < floor_num && i < 23; i++)
5541 o_ptr = &o_list[floor_list[i]];
5543 /* Describe the object */
5544 object_desc(o_name, o_ptr, 0);
5546 /* Save the index */
5549 /* Acquire inventory color */
5550 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
5552 /* Save the object description */
5553 strcpy(out_desc[k], o_name);
5555 /* Find the predicted "line length" */
5556 l = strlen(out_desc[k]) + 5;
5558 /* Be sure to account for the weight */
5559 if (show_weights) l += 9;
5561 if (o_ptr->tval != TV_GOLD) dont_need_to_show_weights = FALSE;
5563 /* Maintain the maximum length */
5564 if (l > len) len = l;
5566 /* Advance to next "line" */
5570 if (show_weights && dont_need_to_show_weights) len -= 9;
5575 /* Find the column to start in */
5576 col = (len > wid - 4) ? 0 : (wid - len - 1);
5578 prepare_label_string_floor(floor_label, floor_list, floor_num);
5580 /* Output each entry */
5581 for (j = 0; j < k; j++)
5584 i = floor_list[out_index[j]];
5589 /* Clear the line */
5590 prt("", j + 1, col ? col - 2 : col);
5592 if (use_menu && target_item)
5594 if (j == (target_item-1))
5597 strcpy(tmp_val, "¡Õ");
5599 strcpy(tmp_val, "> ");
5601 target_item_label = i;
5603 else strcpy(tmp_val, " ");
5607 /* Prepare an index --(-- */
5608 sprintf(tmp_val, "%c)", floor_label[j]);
5611 /* Clear the line with the (possibly indented) index */
5612 put_str(tmp_val, j + 1, col);
5614 /* Display the entry itself */
5615 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
5617 /* Display the weight if needed */
5618 if (show_weights && (o_ptr->tval != TV_GOLD))
5620 int wgt = o_ptr->weight * o_ptr->number;
5622 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5624 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
5627 prt(tmp_val, j + 1, wid - 9);
5631 /* Make a "shadow" below the list (only if needed) */
5632 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5634 return target_item_label;
5638 * This version of get_item() is called by get_item() when
5639 * the easy_floor is on.
5641 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
5643 char n1 = ' ', n2 = ' ', which = ' ';
5645 int j, k, i1, i2, e1, e2;
5652 bool equip = (mode & USE_EQUIP) ? TRUE : FALSE;
5653 bool inven = (mode & USE_INVEN) ? TRUE : FALSE;
5654 bool floor = (mode & USE_FLOOR) ? TRUE : FALSE;
5656 bool allow_equip = FALSE;
5657 bool allow_inven = FALSE;
5658 bool allow_floor = FALSE;
5660 bool toggle = FALSE;
5665 int floor_num, floor_list[23], floor_top = 0;
5668 extern bool select_the_force;
5670 int menu_line = (use_menu ? 1 : 0);
5676 static char prev_tag = '\0';
5677 char cur_tag = '\0';
5679 /* Get the item index */
5680 if (repeat_pull(cp))
5683 if (select_the_force && (*cp == INVEN_FORCE))
5685 item_tester_tval = 0;
5686 item_tester_hook = NULL;
5687 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5692 else if (floor && (*cp < 0))
5694 if (prev_tag && command_cmd)
5696 /* Scan all objects in the grid */
5697 floor_num = scan_floor(floor_list, py, px, 0x03);
5699 /* Look up the tag */
5700 if (get_tag_floor(&k, prev_tag, floor_list, floor_num))
5702 /* Accept that choice */
5703 (*cp) = 0 - floor_list[k];
5705 /* Forget restrictions */
5706 item_tester_tval = 0;
5707 item_tester_hook = NULL;
5708 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5714 prev_tag = '\0'; /* prev_tag is no longer effective */
5717 /* Validate the item */
5718 else if (item_tester_okay(&o_list[0 - (*cp)]))
5720 /* Forget restrictions */
5721 item_tester_tval = 0;
5722 item_tester_hook = NULL;
5723 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5730 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
5731 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
5733 if (prev_tag && command_cmd)
5735 /* Look up the tag and validate the item */
5736 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
5737 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
5738 else if (!get_item_okay(k)) /* Reject */;
5741 /* Accept that choice */
5744 /* Forget restrictions */
5745 item_tester_tval = 0;
5746 item_tester_hook = NULL;
5747 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5753 prev_tag = '\0'; /* prev_tag is no longer effective */
5756 /* Verify the item */
5757 else if (get_item_okay(*cp))
5759 /* Forget restrictions */
5760 item_tester_tval = 0;
5761 item_tester_hook = NULL;
5762 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5770 #endif /* ALLOW_REPEAT */
5773 /* Paranoia XXX XXX XXX */
5780 /* No item selected */
5784 /* Full inventory */
5786 i2 = INVEN_PACK - 1;
5788 /* Forbid inventory */
5789 if (!inven) i2 = -1;
5792 for (j = 0; j < INVEN_PACK; j++)
5793 if (item_tester_okay(&inventory[j])) max_inven++;
5796 /* Restrict inventory indexes */
5797 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5798 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5801 /* Full equipment */
5803 e2 = INVEN_TOTAL - 1;
5805 /* Forbid equipment */
5806 if (!equip) e2 = -1;
5809 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5810 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
5811 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5814 /* Restrict equipment indexes */
5815 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5816 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5818 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
5822 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
5824 else if (p_ptr->hidarite) e1 = INVEN_RARM;
5828 /* Count "okay" floor items */
5831 /* Restrict floor usage */
5834 /* Scan all objects in the grid */
5835 floor_num = scan_floor(floor_list, py, px, 0x03);
5838 /* Accept inventory */
5839 if (i1 <= i2) allow_inven = TRUE;
5841 /* Accept equipment */
5842 if (e1 <= e2) allow_equip = TRUE;
5845 if (floor_num) allow_floor = TRUE;
5847 /* Require at least one legal choice */
5848 if (!allow_inven && !allow_equip && !allow_floor)
5850 /* Cancel p_ptr->command_see */
5851 command_see = FALSE;
5859 if (select_the_force) {
5865 /* Analyze choices */
5868 /* Hack -- Start on equipment if requested */
5869 if (command_see && (command_wrk == (USE_EQUIP))
5872 command_wrk = (USE_EQUIP);
5875 /* Use inventory if allowed */
5876 else if (allow_inven)
5878 command_wrk = (USE_INVEN);
5881 /* Use equipment if allowed */
5882 else if (allow_equip)
5884 command_wrk = (USE_EQUIP);
5887 /* Use floor if allowed */
5888 else if (allow_floor)
5890 command_wrk = (USE_FLOOR);
5895 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5897 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5899 /* Hack -- start out in "display" mode */
5906 /* Repeat until done */
5909 int get_item_label = 0;
5916 for (j = 0; j < 8; j++)
5919 if (!angband_term[j]) continue;
5921 /* Count windows displaying inven */
5922 if (window_flag[j] & (PW_INVEN)) ni++;
5924 /* Count windows displaying equip */
5925 if (window_flag[j] & (PW_EQUIP)) ne++;
5928 /* Toggle if needed */
5929 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
5930 (command_wrk == (USE_INVEN) && !ni && ne))
5933 toggle_inven_equip();
5940 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5942 /* Redraw windows */
5945 /* Inventory screen */
5946 if (command_wrk == (USE_INVEN))
5948 /* Extract the legal requests */
5952 /* Redraw if needed */
5953 if (command_see) get_item_label = show_inven(menu_line);
5956 /* Equipment screen */
5957 else if (command_wrk == (USE_EQUIP))
5959 /* Extract the legal requests */
5960 n1 = I2A(e1 - INVEN_RARM);
5961 n2 = I2A(e2 - INVEN_RARM);
5963 /* Redraw if needed */
5964 if (command_see) get_item_label = show_equip(menu_line);
5968 else if (command_wrk == (USE_FLOOR))
5971 k = MIN(floor_top + 23, floor_num) - 1;
5973 /* Extract the legal requests */
5974 n1 = I2A(j - floor_top);
5975 n2 = I2A(k - floor_top);
5977 /* Redraw if needed */
5978 if (command_see) get_item_label = show_floor(menu_line, py, px, &min_width);
5981 /* Viewing inventory */
5982 if (command_wrk == (USE_INVEN))
5984 /* Begin the prompt */
5986 sprintf(out_val, "»ý¤Áʪ:");
5988 sprintf(out_val, "Inven:");
5993 /* Build the prompt */
5995 sprintf(tmp_val, "%c-%c,'(',')',",
5997 sprintf(tmp_val, " %c-%c,'(',')',",
5999 index_to_label(i1), index_to_label(i2));
6002 strcat(out_val, tmp_val);
6005 /* Indicate ability to "view" */
6007 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6009 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6017 strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
6018 else if (allow_floor)
6019 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
6021 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6024 strcat(out_val, " / for Equip,");
6025 else if (allow_floor)
6026 strcat(out_val, " 6 for Equip,");
6028 strcat(out_val, " 4 or 6 for Equip,");
6037 strcat(out_val, " '-'¾²¾å,");
6038 else if (allow_equip)
6039 strcat(out_val, " '4' ¾²¾å,");
6041 strcat(out_val, " '4'or'6' ¾²¾å,");
6044 strcat(out_val, " - for floor,");
6045 else if (allow_equip)
6046 strcat(out_val, " 4 for floor,");
6048 strcat(out_val, " 4 or 6 for floor,");
6053 /* Viewing equipment */
6054 else if (command_wrk == (USE_EQUIP))
6056 /* Begin the prompt */
6058 sprintf(out_val, "ÁõÈ÷ÉÊ:");
6060 sprintf(out_val, "Equip:");
6065 /* Build the prompt */
6067 sprintf(tmp_val, "%c-%c,'(',')',",
6069 sprintf(tmp_val, " %c-%c,'(',')',",
6071 index_to_label(e1), index_to_label(e2));
6074 strcat(out_val, tmp_val);
6077 /* Indicate ability to "view" */
6079 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6081 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6089 strcat(out_val, " '/' »ý¤Áʪ,");
6090 else if (allow_floor)
6091 strcat(out_val, " '4' »ý¤Áʪ,");
6093 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6096 strcat(out_val, " / for Inven,");
6097 else if (allow_floor)
6098 strcat(out_val, " 4 for Inven,");
6100 strcat(out_val, " 4 or 6 for Inven,");
6109 strcat(out_val, " '-'¾²¾å,");
6110 else if (allow_inven)
6111 strcat(out_val, " '6' ¾²¾å,");
6113 strcat(out_val, " '4'or'6' ¾²¾å,");
6116 strcat(out_val, " - for floor,");
6117 else if (allow_inven)
6118 strcat(out_val, " 6 for floor,");
6120 strcat(out_val, " 4 or 6 for floor,");
6126 else if (command_wrk == (USE_FLOOR))
6128 /* Begin the prompt */
6130 sprintf(out_val, "¾²¾å:");
6132 sprintf(out_val, "Floor:");
6137 /* Build the prompt */
6139 sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
6141 sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
6145 strcat(out_val, tmp_val);
6148 /* Indicate ability to "view" */
6150 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6152 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6157 if (allow_inven && allow_equip)
6160 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
6162 strcat(out_val, " 4 for Equip, 6 for Inven,");
6165 else if (allow_inven)
6168 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6170 strcat(out_val, " 4 or 6 for Inven,");
6173 else if (allow_equip)
6176 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6178 strcat(out_val, " 4 or 6 for Equip,");
6183 else if (allow_inven)
6186 strcat(out_val, " '/' »ý¤Áʪ,");
6188 strcat(out_val, " / for Inven,");
6191 else if (allow_equip)
6194 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6196 strcat(out_val, " / for Equip,");
6201 if (command_see && !use_menu)
6204 strcat(out_val, " Enter ¼¡,");
6206 strcat(out_val, " Enter for scroll down,");
6213 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
6215 if (select_the_force) strcat(out_val, " w for the Force,");
6218 /* Finish the prompt */
6219 strcat(out_val, " ESC");
6221 /* Build the prompt */
6222 sprintf(tmp_val, "(%s) %s", out_val, pmt);
6224 /* Show the prompt */
6233 if (command_wrk == USE_INVEN) max_line = max_inven;
6234 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6235 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6251 menu_line += (max_line - 1);
6267 /* Verify legality */
6268 if (command_wrk == (USE_INVEN))
6270 if (allow_floor) command_wrk = USE_FLOOR;
6271 else if (allow_equip) command_wrk = USE_EQUIP;
6278 else if (command_wrk == (USE_EQUIP))
6280 if (allow_inven) command_wrk = USE_INVEN;
6281 else if (allow_floor) command_wrk = USE_FLOOR;
6288 else if (command_wrk == (USE_FLOOR))
6290 if (allow_equip) command_wrk = USE_EQUIP;
6291 else if (allow_inven) command_wrk = USE_INVEN;
6304 /* Hack -- Fix screen */
6314 /* Switch inven/equip */
6315 if (command_wrk == USE_INVEN) max_line = max_inven;
6316 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6317 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6318 if (menu_line > max_line) menu_line = max_line;
6320 /* Need to redraw */
6328 /* Verify legality */
6329 if (command_wrk == (USE_INVEN))
6331 if (allow_equip) command_wrk = USE_EQUIP;
6332 else if (allow_floor) command_wrk = USE_FLOOR;
6339 else if (command_wrk == (USE_EQUIP))
6341 if (allow_floor) command_wrk = USE_FLOOR;
6342 else if (allow_inven) command_wrk = USE_INVEN;
6349 else if (command_wrk == (USE_FLOOR))
6351 if (allow_inven) command_wrk = USE_INVEN;
6352 else if (allow_equip) command_wrk = USE_EQUIP;
6365 /* Hack -- Fix screen */
6375 /* Switch inven/equip */
6376 if (command_wrk == USE_INVEN) max_line = max_inven;
6377 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6378 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6379 if (menu_line > max_line) menu_line = max_line;
6381 /* Need to redraw */
6390 if (command_wrk == USE_FLOOR)
6393 (*cp) = -get_item_label;
6397 /* Validate the item */
6398 if (!get_item_okay(get_item_label))
6404 /* Allow player to "refuse" certain actions */
6405 if (!get_item_allow(get_item_label))
6411 /* Accept that choice */
6412 (*cp) = get_item_label;
6421 if (select_the_force) {
6429 if (menu_line > max_line) menu_line -= max_line;
6450 command_see = FALSE;
6473 cave_type *c_ptr = &cave[py][px];
6475 if (command_wrk != (USE_FLOOR)) break;
6477 /* Get the object being moved. */
6478 o_idx = c_ptr->o_idx;
6480 /* Only rotate a pile of two or more objects. */
6481 if (!(o_idx && o_list[o_idx].next_o_idx)) break;
6483 /* Remove the first object from the list. */
6484 excise_object_idx(o_idx);
6486 /* Find end of the list. */
6488 while (o_list[i].next_o_idx)
6489 i = o_list[i].next_o_idx;
6491 /* Add after the last object. */
6492 o_list[i].next_o_idx = o_idx;
6494 /* Re-scan floor list */
6495 floor_num = scan_floor(floor_list, py, px, 0x03);
6497 /* Hack -- Fix screen */
6512 if (command_wrk == (USE_INVEN))
6519 command_wrk = (USE_EQUIP);
6521 else if (command_wrk == (USE_EQUIP))
6528 command_wrk = (USE_INVEN);
6530 else if (command_wrk == (USE_FLOOR))
6534 command_wrk = (USE_INVEN);
6536 else if (allow_equip)
6538 command_wrk = (USE_EQUIP);
6547 /* Hack -- Fix screen */
6557 /* Need to redraw */
6570 * If we are already examining the floor, and there
6571 * is only one item, we will always select it.
6572 * If we aren't examining the floor and there is only
6573 * one item, we will select it if floor_query_flag
6578 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
6581 k = 0 - floor_list[0];
6583 /* Allow player to "refuse" certain actions */
6584 if (!get_item_allow(k))
6590 /* Accept that choice */
6599 /* Hack -- Fix screen */
6609 command_wrk = (USE_FLOOR);
6615 case '1': case '2': case '3':
6616 case '4': case '5': case '6':
6617 case '7': case '8': case '9':
6619 if (command_wrk != USE_FLOOR)
6621 /* Look up the tag */
6622 if (!get_tag(&k, which, command_wrk))
6628 /* Hack -- Validate the item */
6629 if ((k < INVEN_RARM) ? !inven : !equip)
6635 /* Validate the item */
6636 if (!get_item_okay(k))
6644 /* Look up the alphabetical tag */
6645 if (get_tag_floor(&k, which, floor_list, floor_num))
6648 k = 0 - floor_list[k];
6657 /* Allow player to "refuse" certain actions */
6658 if (!get_item_allow(k))
6664 /* Accept that choice */
6670 #endif /* ALLOW_REPEAT */
6678 /* Choose "default" inventory item */
6679 if (command_wrk == (USE_INVEN))
6681 k = ((i1 == i2) ? i1 : -1);
6684 /* Choose "default" equipment item */
6685 else if (command_wrk == (USE_EQUIP))
6687 k = ((e1 == e2) ? e1 : -1);
6690 /* Choose "default" floor item */
6691 else if (command_wrk == (USE_FLOOR))
6696 k = 0 - floor_list[0];
6698 /* Allow player to "refuse" certain actions */
6699 if (!get_item_allow(k))
6705 /* Accept that choice */
6713 /* Validate the item */
6714 if (!get_item_okay(k))
6720 /* Allow player to "refuse" certain actions */
6721 if (!get_item_allow(k))
6727 /* Accept that choice */
6737 if (select_the_force) {
6751 if (command_wrk != USE_FLOOR)
6753 bool not_found = FALSE;
6755 /* Look up the alphabetical tag */
6756 if (!get_tag(&k, which, command_wrk))
6761 /* Hack -- Validate the item */
6762 else if ((k < INVEN_RARM) ? !inven : !equip)
6767 /* Validate the item */
6768 else if (!get_item_okay(k))
6775 /* Accept that choice */
6781 #endif /* ALLOW_REPEAT */
6787 /* Look up the alphabetical tag */
6788 if (get_tag_floor(&k, which, floor_list, floor_num))
6791 k = 0 - floor_list[k];
6793 /* Accept that choice */
6799 #endif /* ALLOW_REPEAT */
6804 /* Extract "query" setting */
6805 ver = isupper(which);
6806 which = tolower(which);
6808 /* Convert letter to inventory index */
6809 if (command_wrk == (USE_INVEN))
6811 if (which == '(') k = i1;
6812 else if (which == ')') k = i2;
6813 else k = label_to_inven(which);
6816 /* Convert letter to equipment index */
6817 else if (command_wrk == (USE_EQUIP))
6819 if (which == '(') k = e1;
6820 else if (which == ')') k = e2;
6821 else k = label_to_equip(which);
6824 /* Convert letter to floor index */
6825 else if (command_wrk == USE_FLOOR)
6827 if (which == '(') k = 0;
6828 else if (which == ')') k = floor_num - 1;
6829 else k = islower(which) ? A2I(which) : -1;
6830 if (k < 0 || k >= floor_num || k >= 23)
6837 k = 0 - floor_list[k];
6840 /* Validate the item */
6841 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
6847 /* Verify the item */
6849 if (ver && !verify("ËÜÅö¤Ë", k))
6851 if (ver && !verify("Try", k))
6859 /* Allow player to "refuse" certain actions */
6860 if (!get_item_allow(k))
6866 /* Accept that choice */
6876 /* Fix the screen if necessary */
6882 /* Hack -- Cancel "display" */
6883 command_see = FALSE;
6887 /* Forget the item_tester_tval restriction */
6888 item_tester_tval = 0;
6890 /* Forget the item_tester_hook restriction */
6891 item_tester_hook = NULL;
6894 /* Clean up 'show choices' */
6895 /* Toggle again if needed */
6896 if (toggle) toggle_inven_equip();
6899 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6905 /* Clear the prompt line */
6908 /* Warning if needed */
6909 if (oops && str) msg_print(str);
6915 if (command_cmd) prev_tag = cur_tag;
6916 #endif /* ALLOW_REPEAT */
6918 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6926 static bool py_pickup_floor_aux(void)
6934 /* Restrict the choices */
6935 item_tester_hook = inven_carry_okay;
6939 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
6940 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
6942 q = "Get which item? ";
6943 s = "You no longer have any room for the objects on the floor.";
6946 if (get_item(&item, q, s, (USE_FLOOR)))
6948 this_o_idx = 0 - item;
6955 /* Pick up the object */
6956 py_pickup_aux(this_o_idx);
6963 * Make the player carry everything in a grid
6965 * If "pickup" is FALSE then only gold will be picked up
6967 * This is called by py_pickup() when easy_floor is TRUE.
6969 void py_pickup_floor(bool pickup)
6971 s16b this_o_idx, next_o_idx = 0;
6973 char o_name[MAX_NLEN];
6976 int floor_num = 0, floor_list[23], floor_o_idx = 0;
6980 /* Scan the pile of objects */
6981 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
6985 /* Access the object */
6986 o_ptr = &o_list[this_o_idx];
6988 /* Describe the object */
6989 object_desc(o_name, o_ptr, 0);
6991 /* Access the next object */
6992 next_o_idx = o_ptr->next_o_idx;
6994 /* Hack -- disturb */
6998 if (o_ptr->tval == TV_GOLD)
7002 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
7003 (long)o_ptr->pval, o_name);
7005 msg_format("You have found %ld gold pieces worth of %s.",
7006 (long) o_ptr->pval, o_name);
7010 /* Collect the gold */
7011 p_ptr->au += o_ptr->pval;
7014 p_ptr->redraw |= (PR_GOLD);
7017 p_ptr->window |= (PW_PLAYER);
7019 /* Delete the gold */
7020 delete_object_idx(this_o_idx);
7022 /* Check the next object */
7025 else if (o_ptr->marked & OM_NOMSG)
7027 /* If 0 or 1 non-NOMSG items are in the pile, the NOMSG ones are
7028 * ignored. Otherwise, they are included in the prompt. */
7029 o_ptr->marked &= ~(OM_NOMSG);
7033 /* Count non-gold objects that can be picked up. */
7034 if (inven_carry_okay(o_ptr))
7039 /* Remember this object index */
7041 floor_list[floor_num] = this_o_idx;
7043 /* Count non-gold objects */
7046 /* Remember this index */
7047 floor_o_idx = this_o_idx;
7050 /* There are no non-gold objects */
7054 /* Mention the number of objects */
7060 /* Access the object */
7061 o_ptr = &o_list[floor_o_idx];
7063 #ifdef ALLOW_EASY_SENSE
7065 /* Option: Make object sensing easy */
7068 /* Sense the object */
7069 (void) sense_object(o_ptr);
7072 #endif /* ALLOW_EASY_SENSE */
7074 /* Describe the object */
7075 object_desc(o_name, o_ptr, 0);
7079 msg_format("%s¤¬¤¢¤ë¡£", o_name);
7081 msg_format("You see %s.", o_name);
7086 /* Multiple objects */
7091 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
7093 msg_format("You see a pile of %d items.", floor_num);
7102 /* The player has no room for anything on the floor. */
7108 /* Access the object */
7109 o_ptr = &o_list[floor_o_idx];
7111 #ifdef ALLOW_EASY_SENSE
7113 /* Option: Make object sensing easy */
7116 /* Sense the object */
7117 (void) sense_object(o_ptr);
7120 #endif /* ALLOW_EASY_SENSE */
7122 /* Describe the object */
7123 object_desc(o_name, o_ptr, 0);
7127 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7129 msg_format("You have no room for %s.", o_name);
7134 /* Multiple objects */
7139 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7141 msg_print("You have no room for any of the objects on the floor.");
7153 /* Hack -- query every object */
7154 if (carry_query_flag)
7156 char out_val[MAX_NLEN+20];
7158 /* Access the object */
7159 o_ptr = &o_list[floor_o_idx];
7161 #ifdef ALLOW_EASY_SENSE
7163 /* Option: Make object sensing easy */
7166 /* Sense the object */
7167 (void) sense_object(o_ptr);
7170 #endif /* ALLOW_EASY_SENSE */
7172 /* Describe the object */
7173 object_desc(o_name, o_ptr, 0);
7175 /* Build a prompt */
7177 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7179 (void) sprintf(out_val, "Pick up %s? ", o_name);
7183 /* Ask the user to confirm */
7184 if (!get_check(out_val))
7191 /* Access the object */
7192 o_ptr = &o_list[floor_o_idx];
7194 #ifdef ALLOW_EASY_SENSE
7196 /* Option: Make object sensing easy */
7199 /* Sense the object */
7200 (void) sense_object(o_ptr);
7203 #endif /* ALLOW_EASY_SENSE */
7205 /* Pick up the object */
7206 py_pickup_aux(floor_o_idx);
7209 /* Allow the user to choose an object */
7212 while (can_pickup--)
7214 if (!py_pickup_floor_aux()) break;
7219 #endif /* ALLOW_EASY_FLOOR */