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);
333 static cptr item_activation_dragon_breath(object_type *o_ptr)
335 static char desc[256];
336 u32b flgs[4]; /* for resistance flags */
339 object_flags(o_ptr, flgs);
340 strcpy(desc, _("", "breath "));
342 for (i = 0; dragonbreath_info[i].flag != 0; i++)
344 if (have_flag(flgs, dragonbreath_info[i].flag))
346 if (n > 0) strcat(desc, _("¡¢", ", "));
347 strcat(desc, dragonbreath_info[i].name);
352 strcat(desc, _("¤Î¥Ö¥ì¥¹(250)", ""));
357 static cptr item_activation_aux(object_type *o_ptr)
359 static char activation_detail[256];
363 const activation_type* act_ptr = find_activation_info(o_ptr);
365 if (!act_ptr) return _("̤ÄêµÁ", "something undefined");
367 desc = act_ptr->desc;
369 /* Overwrite description if it is special */
370 switch (o_ptr->xtra2) {
372 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES))
373 desc = _("²Ð±ê¤Î¥Ö¥ì¥¹ (200) ¤È²Ð¤Ø¤ÎÂÑÀ", "breath of fire (200) and resist fire");
376 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE))
377 desc = _("Î䵤¤Î¥Ö¥ì¥¹ (200) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ", "breath of cold (200) and resist cold");
380 desc = item_activation_dragon_breath(o_ptr);
383 if (o_ptr->name1 == ART_HYOUSIGI)
384 desc = _("Çï»ÒÌÚ¤òÂǤÁ¤Ê¤é¤¹", "beat wooden clappers");
386 case ACT_RESIST_ACID:
387 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ACID))
388 desc = _("¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) ¤È»À¤Ø¤ÎÂÑÀ", "ball of acid (100) and resist acid");
390 case ACT_RESIST_FIRE:
391 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES))
392 desc = _("¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) ¤È²Ð¤Ø¤ÎÂÑÀ", "ball of fire (100) and resist fire");
394 case ACT_RESIST_COLD:
395 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE))
396 desc = _("¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ", "ball of cold (100) and resist cold");
398 case ACT_RESIST_ELEC:
399 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ELEC))
400 desc = _("¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) ¤ÈÅÅ·â¤Ø¤ÎÂÑÀ", "ball of elec (100) and resist elec");
404 /* Timeout description */
405 constant = act_ptr->timeout.constant;
406 dice = act_ptr->timeout.dice;
407 if (constant == 0 && dice == 0) {
408 /* We can activate it every turn */
409 strcpy(timeout, _("¤¤¤Ä¤Ç¤â", "every turn"));
410 } else if (constant < 0) {
411 /* Activations that have special timeout */
412 switch (o_ptr->xtra2) {
414 sprintf(timeout, _("%d ¥¿¡¼¥óËè", "every %d turns"),
415 ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES)) ? 200 : 250);
418 sprintf(timeout, _("%d ¥¿¡¼¥óËè", "every %d turns"),
419 ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE)) ? 200 : 250);
422 strcpy(timeout, _("3*(¥ì¥Ù¥ë+10) ¥¿¡¼¥óËè", "every 3 * (level+10) turns"));
425 strcpy(timeout, _("³ÎΨ50%¤Ç²õ¤ì¤ë", "(destroyed 50%)"));
428 strcpy(timeout, "undefined");
432 /* Normal timeout activations */
433 char constant_str[16], dice_str[16];
434 sprintf(constant_str, "%d", constant);
435 sprintf(dice_str, "d%d", dice);
436 sprintf(timeout, _("%s%s%s ¥¿¡¼¥óËè", "every %s%s%s turns"),
437 (constant > 0) ? constant_str : "",
438 (constant > 0 && dice > 0) ? "+" : "",
439 (dice > 0) ? dice_str : "");
442 /* Build detail activate description */
443 sprintf(activation_detail, _("%s : %s", "%s %s"), desc, timeout);
445 return activation_detail;
449 * Determine the "Activation" (if any) for an artifact
450 * Return a string, or NULL for "no activation"
452 cptr item_activation(object_type *o_ptr)
454 u32b flgs[TR_FLAG_SIZE];
456 /* Extract the flags */
457 object_flags(o_ptr, flgs);
459 /* Require activation ability */
461 if (!(have_flag(flgs, TR_ACTIVATE))) return ("¤Ê¤·");
463 if (!(have_flag(flgs, TR_ACTIVATE))) return ("nothing");
467 * We need to deduce somehow that it is a random artifact -- one
468 * problem: It could be a random artifact which has NOT YET received
469 * a name. Thus we eliminate other possibilities instead of checking
473 /* Give priority to weaponsmith's essential activations */
474 if (object_is_smith(o_ptr))
476 switch (o_ptr->xtra3 - 1)
478 case ESSENCE_TMP_RES_ACID:
480 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
482 return "resist acid every 50+d50 turns";
484 case ESSENCE_TMP_RES_ELEC:
486 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
488 return "resist elec every 50+d50 turns";
490 case ESSENCE_TMP_RES_FIRE:
492 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
494 return "resist fire every 50+d50 turns";
496 case ESSENCE_TMP_RES_COLD:
498 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
500 return "resist cold every 50+d50 turns";
504 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
506 return "earthquake every 100+d100 turns";
511 /* Paranoia - Set activation index for older save data */
512 if (object_is_fixed_artifact(o_ptr))
514 if (!o_ptr->xtra2) o_ptr->xtra2 = a_info[o_ptr->name1].act_idx;
516 else if (object_is_ego(o_ptr))
518 if (!o_ptr->xtra2) o_ptr->xtra2 = e_info[o_ptr->name2].act_idx;
522 if (!o_ptr->xtra2) o_ptr->xtra2 = k_info[o_ptr->k_idx].act_idx;
525 /* Get an explain of an activation */
526 /* if ((object_is_artifact(o_ptr) || object_is_ego(o_ptr)) && (o_ptr->xtra2)) */
529 return item_activation_aux(o_ptr);
533 if (o_ptr->tval == TV_WHISTLE)
536 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
538 return "call pet every 100+d100 turns";
542 if (o_ptr->tval == TV_CAPTURE)
545 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
547 return "captures or releases a monster.";
553 return "²¿¤âµ¯¤¤Ê¤¤";
561 * Describe a "fully identified" item
563 bool screen_object(object_type *o_ptr, u32b mode)
567 u32b flgs[TR_FLAG_SIZE];
571 char o_name[MAX_NLEN];
574 int trivial_info = 0;
576 /* Extract the flags */
577 object_flags(o_ptr, flgs);
579 /* Extract the description */
581 roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
582 (k_text + k_info[o_ptr->k_idx].text),
583 77 - 15, temp, sizeof(temp));
584 for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
585 { info[i] = &temp[j]; i++;}
588 if (object_is_equipment(o_ptr))
590 /* Descriptions of a basic equipment is just a flavor */
594 /* Mega-Hack -- describe activation */
595 if (have_flag(flgs, TR_ACTIVATE))
598 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
600 info[i++] = "It can be activated for...";
603 info[i++] = item_activation(o_ptr);
605 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
607 info[i++] = "...if it is being worn.";
612 /* Figurines, a hack */
613 if (o_ptr->tval == TV_FIGURINE)
616 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
618 info[i++] = "It will transform into a pet when thrown.";
623 /* Figurines, a hack */
624 if (o_ptr->name1 == ART_STONEMASK)
627 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
629 info[i++] = "It makes you turn into a vampire permanently.";
634 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
637 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
639 info[i++] = "It will attempt to kill a monster instantly.";
644 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
647 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
649 info[i++] = "It causes you to strike yourself sometimes.";
653 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
655 info[i++] = "It always penetrates invulnerability barriers.";
659 if (o_ptr->name2 == EGO_2WEAPON)
662 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
664 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
669 if (have_flag(flgs, TR_EASY_SPELL))
672 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
674 info[i++] = "It affects your ability to cast spells.";
678 if (o_ptr->name2 == EGO_AMU_FOOL)
681 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
683 info[i++] = "It interferes with casting spells.";
687 if (o_ptr->name2 == EGO_RING_THROW)
690 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
692 info[i++] = "It provides great strength when you throw an item.";
696 if (o_ptr->name2 == EGO_AMU_NAIVETY)
699 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
701 info[i++] = "It decreases your magic resistance.";
705 if (o_ptr->tval == TV_STATUE)
707 monster_race *r_ptr = &r_info[o_ptr->pval];
709 if (o_ptr->pval == MON_BULLGATES)
711 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
713 info[i++] = "It is shameful.";
715 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
717 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
719 info[i++] = "It is fearful.";
723 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
725 info[i++] = "It is cheerful.";
729 /* Hack -- describe lite's */
730 if (o_ptr->tval == TV_LITE)
732 if (o_ptr->name2 == EGO_LITE_DARKNESS)
735 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
737 info[i++] = "It provides no light.";
740 if (o_ptr->sval == SV_LITE_FEANOR)
743 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-3)¡£";
745 info[i++] = "It decreases radius of light source by 3.";
748 else if (o_ptr->sval == SV_LITE_LANTERN)
751 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
753 info[i++] = "It decreases radius of light source by 2.";
759 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
761 info[i++] = "It decreases radius of light source by 1.";
765 else if (object_is_fixed_artifact(o_ptr))
768 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
770 info[i++] = "It provides light (radius 3) forever.";
774 else if (o_ptr->name2 == EGO_LITE_SHINE)
776 if (o_ptr->sval == SV_LITE_FEANOR)
779 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
781 info[i++] = "It provides light (radius 3) forever.";
785 else if (o_ptr->sval == SV_LITE_LANTERN)
788 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
790 info[i++] = "It provides light (radius 3) when fueled.";
797 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
799 info[i++] = "It provides light (radius 2) when fueled.";
806 if (o_ptr->sval == SV_LITE_FEANOR)
809 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
811 info[i++] = "It provides light (radius 2) forever.";
815 else if (o_ptr->sval == SV_LITE_LANTERN)
818 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
820 info[i++] = "It provides light (radius 2) when fueled.";
827 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
829 info[i++] = "It provides light (radius 1) when fueled.";
834 if (o_ptr->name2 == EGO_LITE_LONG)
837 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
839 info[i++] = "It provides light for much longer time.";
845 /* And then describe it fully */
847 if (have_flag(flgs, TR_RIDING))
849 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
851 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
853 info[i++] = "It is made for use while riding.";
858 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
860 info[i++] = "It is suitable for use while riding.";
862 /* This information is not important enough */
866 if (have_flag(flgs, TR_STR))
869 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
871 info[i++] = "It affects your strength.";
875 if (have_flag(flgs, TR_INT))
878 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
880 info[i++] = "It affects your intelligence.";
884 if (have_flag(flgs, TR_WIS))
887 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
889 info[i++] = "It affects your wisdom.";
893 if (have_flag(flgs, TR_DEX))
896 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
898 info[i++] = "It affects your dexterity.";
902 if (have_flag(flgs, TR_CON))
905 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
907 info[i++] = "It affects your constitution.";
911 if (have_flag(flgs, TR_CHR))
914 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
916 info[i++] = "It affects your charisma.";
921 if (have_flag(flgs, TR_MAGIC_MASTERY))
924 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
926 info[i++] = "It affects your ability to use magic devices.";
930 if (have_flag(flgs, TR_STEALTH))
933 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
935 info[i++] = "It affects your stealth.";
939 if (have_flag(flgs, TR_SEARCH))
942 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
944 info[i++] = "It affects your searching.";
948 if (have_flag(flgs, TR_INFRA))
951 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
953 info[i++] = "It affects your infravision.";
957 if (have_flag(flgs, TR_TUNNEL))
960 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
962 info[i++] = "It affects your ability to tunnel.";
966 if (have_flag(flgs, TR_SPEED))
969 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
971 info[i++] = "It affects your speed.";
975 if (have_flag(flgs, TR_BLOWS))
978 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
980 info[i++] = "It affects your attack speed.";
985 if (have_flag(flgs, TR_BRAND_ACID))
988 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
990 info[i++] = "It does extra damage from acid.";
994 if (have_flag(flgs, TR_BRAND_ELEC))
997 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
999 info[i++] = "It does extra damage from electricity.";
1003 if (have_flag(flgs, TR_BRAND_FIRE))
1006 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1008 info[i++] = "It does extra damage from fire.";
1012 if (have_flag(flgs, TR_BRAND_COLD))
1015 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1017 info[i++] = "It does extra damage from frost.";
1022 if (have_flag(flgs, TR_BRAND_POIS))
1025 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
1027 info[i++] = "It poisons your foes.";
1032 if (have_flag(flgs, TR_CHAOTIC))
1035 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
1037 info[i++] = "It produces chaotic effects.";
1042 if (have_flag(flgs, TR_VAMPIRIC))
1045 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
1047 info[i++] = "It drains life from your foes.";
1052 if (have_flag(flgs, TR_IMPACT))
1055 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
1057 info[i++] = "It can cause earthquakes.";
1062 if (have_flag(flgs, TR_VORPAL))
1065 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1067 info[i++] = "It is very sharp and can cut your foes.";
1072 if (have_flag(flgs, TR_KILL_DRAGON))
1075 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1077 info[i++] = "It is a great bane of dragons.";
1081 else if (have_flag(flgs, TR_SLAY_DRAGON))
1084 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1086 info[i++] = "It is especially deadly against dragons.";
1091 if (have_flag(flgs, TR_KILL_ORC))
1094 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1096 info[i++] = "It is a great bane of orcs.";
1100 if (have_flag(flgs, TR_SLAY_ORC))
1103 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1105 info[i++] = "It is especially deadly against orcs.";
1110 if (have_flag(flgs, TR_KILL_TROLL))
1113 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1115 info[i++] = "It is a great bane of trolls.";
1119 if (have_flag(flgs, TR_SLAY_TROLL))
1122 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1124 info[i++] = "It is especially deadly against trolls.";
1129 if (have_flag(flgs, TR_KILL_GIANT))
1132 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1134 info[i++] = "It is a great bane of giants.";
1137 else if (have_flag(flgs, TR_SLAY_GIANT))
1140 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1142 info[i++] = "It is especially deadly against giants.";
1147 if (have_flag(flgs, TR_KILL_DEMON))
1150 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1152 info[i++] = "It is a great bane of demons.";
1156 if (have_flag(flgs, TR_SLAY_DEMON))
1159 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
1161 info[i++] = "It strikes at demons with holy wrath.";
1166 if (have_flag(flgs, TR_KILL_UNDEAD))
1169 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1171 info[i++] = "It is a great bane of undead.";
1175 if (have_flag(flgs, TR_SLAY_UNDEAD))
1178 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
1180 info[i++] = "It strikes at undead with holy wrath.";
1185 if (have_flag(flgs, TR_KILL_EVIL))
1188 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1190 info[i++] = "It is a great bane of evil monsters.";
1194 if (have_flag(flgs, TR_SLAY_EVIL))
1197 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
1199 info[i++] = "It fights against evil with holy fury.";
1204 if (have_flag(flgs, TR_KILL_ANIMAL))
1207 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1209 info[i++] = "It is a great bane of natural creatures.";
1213 if (have_flag(flgs, TR_SLAY_ANIMAL))
1216 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1218 info[i++] = "It is especially deadly against natural creatures.";
1223 if (have_flag(flgs, TR_KILL_HUMAN))
1226 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1228 info[i++] = "It is a great bane of humans.";
1232 if (have_flag(flgs, TR_SLAY_HUMAN))
1235 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1237 info[i++] = "It is especially deadly against humans.";
1242 if (have_flag(flgs, TR_FORCE_WEAPON))
1245 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
1247 info[i++] = "It powerfully strikes at a monster using your mana.";
1251 if (have_flag(flgs, TR_DEC_MANA))
1254 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
1256 info[i++] = "It decreases your mana consumption.";
1260 if (have_flag(flgs, TR_SUST_STR))
1263 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
1265 info[i++] = "It sustains your strength.";
1269 if (have_flag(flgs, TR_SUST_INT))
1272 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
1274 info[i++] = "It sustains your intelligence.";
1278 if (have_flag(flgs, TR_SUST_WIS))
1281 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
1283 info[i++] = "It sustains your wisdom.";
1287 if (have_flag(flgs, TR_SUST_DEX))
1290 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
1292 info[i++] = "It sustains your dexterity.";
1296 if (have_flag(flgs, TR_SUST_CON))
1299 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
1301 info[i++] = "It sustains your constitution.";
1305 if (have_flag(flgs, TR_SUST_CHR))
1308 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
1310 info[i++] = "It sustains your charisma.";
1315 if (have_flag(flgs, TR_IM_ACID))
1318 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
1320 info[i++] = "It provides immunity to acid.";
1324 if (have_flag(flgs, TR_IM_ELEC))
1327 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
1329 info[i++] = "It provides immunity to electricity.";
1333 if (have_flag(flgs, TR_IM_FIRE))
1336 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
1338 info[i++] = "It provides immunity to fire.";
1342 if (have_flag(flgs, TR_IM_COLD))
1345 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
1347 info[i++] = "It provides immunity to cold.";
1352 if (have_flag(flgs, TR_THROW))
1355 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1357 info[i++] = "It is perfectly balanced for throwing.";
1361 if (have_flag(flgs, TR_FREE_ACT))
1364 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
1366 info[i++] = "It provides immunity to paralysis.";
1370 if (have_flag(flgs, TR_HOLD_LIFE))
1373 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
1375 info[i++] = "It provides resistance to life draining.";
1379 if (have_flag(flgs, TR_RES_FEAR))
1382 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
1384 info[i++] = "It makes you completely fearless.";
1388 if (have_flag(flgs, TR_RES_ACID))
1391 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
1393 info[i++] = "It provides resistance to acid.";
1397 if (have_flag(flgs, TR_RES_ELEC))
1400 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
1402 info[i++] = "It provides resistance to electricity.";
1406 if (have_flag(flgs, TR_RES_FIRE))
1409 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
1411 info[i++] = "It provides resistance to fire.";
1415 if (have_flag(flgs, TR_RES_COLD))
1418 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
1420 info[i++] = "It provides resistance to cold.";
1424 if (have_flag(flgs, TR_RES_POIS))
1427 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
1429 info[i++] = "It provides resistance to poison.";
1434 if (have_flag(flgs, TR_RES_LITE))
1437 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
1439 info[i++] = "It provides resistance to light.";
1443 if (have_flag(flgs, TR_RES_DARK))
1446 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
1448 info[i++] = "It provides resistance to dark.";
1453 if (have_flag(flgs, TR_RES_BLIND))
1456 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
1458 info[i++] = "It provides resistance to blindness.";
1462 if (have_flag(flgs, TR_RES_CONF))
1465 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
1467 info[i++] = "It provides resistance to confusion.";
1471 if (have_flag(flgs, TR_RES_SOUND))
1474 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
1476 info[i++] = "It provides resistance to sound.";
1480 if (have_flag(flgs, TR_RES_SHARDS))
1483 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
1485 info[i++] = "It provides resistance to shards.";
1490 if (have_flag(flgs, TR_RES_NETHER))
1493 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
1495 info[i++] = "It provides resistance to nether.";
1499 if (have_flag(flgs, TR_RES_NEXUS))
1502 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
1504 info[i++] = "It provides resistance to nexus.";
1508 if (have_flag(flgs, TR_RES_CHAOS))
1511 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
1513 info[i++] = "It provides resistance to chaos.";
1517 if (have_flag(flgs, TR_RES_DISEN))
1520 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
1522 info[i++] = "It provides resistance to disenchantment.";
1527 if (have_flag(flgs, TR_LEVITATION))
1530 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
1532 info[i++] = "It allows you to levitate.";
1536 if (have_flag(flgs, TR_LITE))
1538 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
1540 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
1542 info[i++] = "It decreases radius of your light source by 1.";
1546 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë(Ⱦ·Â¤Ë+1)¡£";
1548 info[i++] = "It provides permanent light. (radius +1)";
1552 if (have_flag(flgs, TR_SEE_INVIS))
1555 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
1557 info[i++] = "It allows you to see invisible monsters.";
1561 if (have_flag(flgs, TR_TELEPATHY))
1564 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
1566 info[i++] = "It gives telepathic powers.";
1570 if (have_flag(flgs, TR_ESP_ANIMAL))
1573 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤ò´¶ÃΤ¹¤ë¡£";
1575 info[i++] = "It senses natural creatures.";
1579 if (have_flag(flgs, TR_ESP_UNDEAD))
1582 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ò´¶ÃΤ¹¤ë¡£";
1584 info[i++] = "It senses undead.";
1588 if (have_flag(flgs, TR_ESP_DEMON))
1591 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò´¶ÃΤ¹¤ë¡£";
1593 info[i++] = "It senses demons.";
1597 if (have_flag(flgs, TR_ESP_ORC))
1600 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ò´¶ÃΤ¹¤ë¡£";
1602 info[i++] = "It senses orcs.";
1606 if (have_flag(flgs, TR_ESP_TROLL))
1609 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ò´¶ÃΤ¹¤ë¡£";
1611 info[i++] = "It senses trolls.";
1615 if (have_flag(flgs, TR_ESP_GIANT))
1618 info[i++] = "¤½¤ì¤Ïµð¿Í¤ò´¶ÃΤ¹¤ë¡£";
1620 info[i++] = "It senses giants.";
1624 if (have_flag(flgs, TR_ESP_DRAGON))
1627 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò´¶ÃΤ¹¤ë¡£";
1629 info[i++] = "It senses dragons.";
1633 if (have_flag(flgs, TR_ESP_HUMAN))
1636 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ò´¶ÃΤ¹¤ë¡£";
1638 info[i++] = "It senses humans.";
1642 if (have_flag(flgs, TR_ESP_EVIL))
1645 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¸ºß¤ò´¶ÃΤ¹¤ë¡£";
1647 info[i++] = "It senses evil creatures.";
1651 if (have_flag(flgs, TR_ESP_GOOD))
1654 info[i++] = "¤½¤ì¤ÏÁ±Îɤʸºß¤ò´¶ÃΤ¹¤ë¡£";
1656 info[i++] = "It senses good creatures.";
1660 if (have_flag(flgs, TR_ESP_NONLIVING))
1663 info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤò´¶ÃΤ¹¤ë¡£";
1665 info[i++] = "It senses non-living creatures.";
1669 if (have_flag(flgs, TR_ESP_UNIQUE))
1672 info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤ò´¶ÃΤ¹¤ë¡£";
1674 info[i++] = "It senses unique monsters.";
1678 if (have_flag(flgs, TR_SLOW_DIGEST))
1681 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
1683 info[i++] = "It slows your metabolism.";
1687 if (have_flag(flgs, TR_REGEN))
1690 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
1692 info[i++] = "It speeds your regenerative powers.";
1696 if (have_flag(flgs, TR_WARNING))
1699 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
1701 info[i++] = "It warns you of danger";
1705 if (have_flag(flgs, TR_REFLECT))
1708 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
1710 info[i++] = "It reflects bolts and arrows.";
1714 if (have_flag(flgs, TR_SH_FIRE))
1717 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
1719 info[i++] = "It produces a fiery sheath.";
1723 if (have_flag(flgs, TR_SH_ELEC))
1726 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
1728 info[i++] = "It produces an electric sheath.";
1732 if (have_flag(flgs, TR_SH_COLD))
1735 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
1737 info[i++] = "It produces a sheath of coldness.";
1741 if (have_flag(flgs, TR_NO_MAGIC))
1744 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
1746 info[i++] = "It produces an anti-magic shell.";
1750 if (have_flag(flgs, TR_NO_TELE))
1753 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
1755 info[i++] = "It prevents teleportation.";
1759 if (have_flag(flgs, TR_XTRA_MIGHT))
1762 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1764 info[i++] = "It fires missiles with extra might.";
1768 if (have_flag(flgs, TR_XTRA_SHOTS))
1771 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1773 info[i++] = "It fires missiles excessively fast.";
1778 if (have_flag(flgs, TR_BLESSED))
1781 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
1783 info[i++] = "It has been blessed by the gods.";
1788 if (object_is_cursed(o_ptr))
1790 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
1793 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
1795 info[i++] = "It is permanently cursed.";
1799 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
1802 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
1804 info[i++] = "It is heavily cursed.";
1811 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
1813 info[i++] = "It is cursed.";
1817 * It's a trivial infomation since there is
1818 * fake inscription {cursed}
1824 if ((have_flag(flgs, TR_TY_CURSE)) || (o_ptr->curse_flags & TRC_TY_CURSE))
1827 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
1829 info[i++] = "It carries an ancient foul curse.";
1833 if ((have_flag(flgs, TR_AGGRAVATE)) || (o_ptr->curse_flags & TRC_AGGRAVATE))
1836 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
1838 info[i++] = "It aggravates nearby creatures.";
1842 if ((have_flag(flgs, TR_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
1845 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
1847 info[i++] = "It drains experience.";
1851 if (o_ptr->curse_flags & TRC_SLOW_REGEN)
1854 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
1856 info[i++] = "It slows your regenerative powers.";
1860 if ((o_ptr->curse_flags & TRC_ADD_L_CURSE) || have_flag(flgs, TR_ADD_L_CURSE))
1863 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
1865 info[i++] = "It adds weak curses.";
1869 if ((o_ptr->curse_flags & TRC_ADD_H_CURSE) || have_flag(flgs, TR_ADD_H_CURSE))
1872 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
1874 info[i++] = "It adds heavy curses.";
1878 if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
1881 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
1883 info[i++] = "It attracts animals.";
1887 if (o_ptr->curse_flags & TRC_CALL_DEMON)
1890 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
1892 info[i++] = "It attracts demons.";
1896 if (o_ptr->curse_flags & TRC_CALL_DRAGON)
1899 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
1901 info[i++] = "It attracts dragons.";
1905 if (o_ptr->curse_flags & TRC_COWARDICE)
1908 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤µ¯¤³¤¹¡£";
1910 info[i++] = "It makes you subject to cowardice.";
1914 if ((have_flag(flgs, TR_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
1917 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
1919 info[i++] = "It induces random teleportation.";
1923 if (o_ptr->curse_flags & TRC_LOW_MELEE)
1926 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
1928 info[i++] = "It causes you to miss blows.";
1932 if (o_ptr->curse_flags & TRC_LOW_AC)
1935 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
1937 info[i++] = "It helps your enemies' blows.";
1941 if (o_ptr->curse_flags & TRC_LOW_MAGIC)
1944 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
1946 info[i++] = "It encumbers you while spellcasting.";
1950 if (o_ptr->curse_flags & TRC_FAST_DIGEST)
1953 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
1955 info[i++] = "It speeds your metabolism.";
1959 if (o_ptr->curse_flags & TRC_DRAIN_HP)
1962 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
1964 info[i++] = "It drains you.";
1968 if (o_ptr->curse_flags & TRC_DRAIN_MANA)
1971 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
1973 info[i++] = "It drains your mana.";
1978 /* Describe about this kind of object instead of THIS fake object */
1979 if (mode & SCROBJ_FAKE_OBJECT)
1981 switch (o_ptr->tval)
1984 switch (o_ptr->sval)
1986 case SV_RING_LORDLY:
1988 info[i++] = "¤½¤ì¤Ï´ö¤Ä¤«¤Î¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
1990 info[i++] = "It provides some random resistances.";
1993 case SV_RING_WARNING:
1995 info[i++] = "¤½¤ì¤Ï¤Ò¤È¤Ä¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
1997 info[i++] = "It may provide a low rank ESP.";
2004 switch (o_ptr->sval)
2006 case SV_AMULET_RESISTANCE:
2008 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2010 info[i++] = "It may provides resistance to poison.";
2013 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2015 info[i++] = "It may provide a random resistances.";
2018 case SV_AMULET_THE_MAGI:
2020 info[i++] = "¤½¤ì¤ÏºÇÂç¤Ç£³¤Ä¤Þ¤Ç¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë¡£";
2022 info[i++] = "It provides up to three low rank ESPs.";
2030 if (have_flag(flgs, TR_IGNORE_ACID) &&
2031 have_flag(flgs, TR_IGNORE_ELEC) &&
2032 have_flag(flgs, TR_IGNORE_FIRE) &&
2033 have_flag(flgs, TR_IGNORE_COLD))
2036 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2038 info[i++] = "It cannot be harmed by the elements.";
2043 if (have_flag(flgs, TR_IGNORE_ACID))
2046 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2048 info[i++] = "It cannot be harmed by acid.";
2051 if (have_flag(flgs, TR_IGNORE_ELEC))
2054 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2056 info[i++] = "It cannot be harmed by electricity.";
2059 if (have_flag(flgs, TR_IGNORE_FIRE))
2062 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2064 info[i++] = "It cannot be harmed by fire.";
2067 if (have_flag(flgs, TR_IGNORE_COLD))
2070 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2072 info[i++] = "It cannot be harmed by cold.";
2077 if (mode & SCROBJ_FORCE_DETAIL) trivial_info = 0;
2079 /* No relevant informations */
2080 if (i <= trivial_info) return (FALSE);
2082 /* Save the screen */
2086 Term_get_size(&wid, &hgt);
2088 /* Display Item name */
2089 if (!(mode & SCROBJ_FAKE_OBJECT))
2090 object_desc(o_name, o_ptr, 0);
2092 object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
2096 /* Erase the screen */
2097 for (k = 1; k < hgt; k++) prt("", k, 13);
2099 /* Label the information */
2100 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
2102 monster_race *r_ptr = &r_info[o_ptr->pval];
2103 int namelen = strlen(r_name + r_ptr->name);
2104 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
2105 Term_queue_bigchar(18 + namelen, 1, r_ptr->x_attr, r_ptr->x_char, 0, 0);
2106 prt("'", 1, (use_bigtile ? 20 : 19) + namelen);
2110 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
2112 prt(" Item Attributes:", 1, 15);
2115 /* We will print on top of the map (column 13) */
2116 for (k = 2, j = 0; j < i; j++)
2119 prt(info[j], k++, 15);
2121 /* Every 20 entries (lines 2 to 21), start over */
2122 if ((k == hgt - 2) && (j+1 < i))
2125 prt("-- ³¤¯ --", k, 15);
2127 prt("-- more --", k, 15);
2130 for (; k > 2; k--) prt("", k, 15);
2136 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
2138 prt("[Press any key to continue]", k, 15);
2143 /* Restore the screen */
2146 /* Gave knowledge */
2153 * Convert an inventory index into a one character label
2154 * Note that the label does NOT distinguish inven/equip.
2156 char index_to_label(int i)
2158 /* Indexes for "inven" are easy */
2159 if (i < INVEN_RARM) return (I2A(i));
2161 /* Indexes for "equip" are offset */
2162 return (I2A(i - INVEN_RARM));
2167 * Convert a label into the index of an item in the "inven"
2168 * Return "-1" if the label does not indicate a real item
2170 s16b label_to_inven(int c)
2175 i = (islower(c) ? A2I(c) : -1);
2177 /* Verify the index */
2178 if ((i < 0) || (i > INVEN_PACK)) return (-1);
2180 /* Empty slots can never be chosen */
2181 if (!inventory[i].k_idx) return (-1);
2183 /* Return the index */
2189 extern bool select_ring_slot;
2192 static bool is_ring_slot(int i)
2194 return (i == INVEN_RIGHT) || (i == INVEN_LEFT);
2199 * Convert a label into the index of a item in the "equip"
2200 * Return "-1" if the label does not indicate a real item
2202 s16b label_to_equip(int c)
2207 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
2209 /* Verify the index */
2210 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
2212 if (select_ring_slot) return is_ring_slot(i) ? i : -1;
2214 /* Empty slots can never be chosen */
2215 if (!inventory[i].k_idx) return (-1);
2217 /* Return the index */
2224 * Determine which equipment slot (if any) an item likes
2226 s16b wield_slot(object_type *o_ptr)
2228 /* Slot for equipment */
2229 switch (o_ptr->tval)
2236 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
2237 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
2238 return (INVEN_LARM);
2245 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
2246 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
2247 return (INVEN_RARM);
2257 /* Use the right hand first */
2258 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
2260 /* Use the left hand for swapping (by default) */
2261 return (INVEN_LEFT);
2267 return (INVEN_NECK);
2272 return (INVEN_LITE);
2279 return (INVEN_BODY);
2284 return (INVEN_OUTER);
2290 return (INVEN_HEAD);
2295 return (INVEN_HANDS);
2300 return (INVEN_FEET);
2304 /* No slot available */
2310 * Return a string mentioning how a given item is carried
2312 cptr mention_use(int i)
2316 /* Examine the location */
2320 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->migite) ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê")); break;
2322 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "Just lifting" : (p_ptr->migite ? "Wielding" : "On arm"); break;
2326 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->hidarite) ? " ξ¼ê" : (left_hander ? " ±¦¼ê" : " º¸¼ê")); break;
2328 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "Just lifting" : (p_ptr->hidarite ? "Wielding" : "On arm"); break;
2332 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "±¿ÈÂÃæ" : "¼Í·âÍÑ"; break;
2334 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "Just holding" : "Shooting"; break;
2338 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
2340 case INVEN_RIGHT: p = (left_hander ? "On left hand" : "On right hand"); break;
2344 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
2346 case INVEN_LEFT: p = (left_hander ? "On right hand" : "On left hand"); break;
2350 case INVEN_NECK: p = " ¼ó"; break;
2352 case INVEN_NECK: p = "Around neck"; break;
2356 case INVEN_LITE: p = " ¸÷¸»"; break;
2358 case INVEN_LITE: p = "Light source"; break;
2362 case INVEN_BODY: p = " ÂÎ"; break;
2364 case INVEN_BODY: p = "On body"; break;
2368 case INVEN_OUTER: p = "ÂΤξå"; break;
2370 case INVEN_OUTER: p = "About body"; break;
2374 case INVEN_HEAD: p = " Ƭ"; break;
2376 case INVEN_HEAD: p = "On head"; break;
2380 case INVEN_HANDS: p = " ¼ê"; break;
2382 case INVEN_HANDS: p = "On hands"; break;
2386 case INVEN_FEET: p = " "; break;
2388 case INVEN_FEET: p = "On feet"; break;
2392 default: p = "¥¶¥Ã¥¯"; break;
2394 default: p = "In pack"; break;
2398 /* Return the result */
2404 * Return a string describing how a given item is being worn.
2405 * Currently, only used for items in the equipment, not inventory.
2407 cptr describe_use(int i)
2414 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->migite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
2416 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "just lifting" : (p_ptr->migite ? "attacking monsters with" : "wearing on your arm"); break;
2420 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->hidarite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
2422 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "just lifting" : (p_ptr->hidarite ? "attacking monsters with" : "wearing on your arm"); break;
2426 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î" : "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
2428 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "just holding" : "shooting missiles with"; break;
2432 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
2434 case INVEN_RIGHT: p = (left_hander ? "wearing on your left hand" : "wearing on your right hand"); break;
2438 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
2440 case INVEN_LEFT: p = (left_hander ? "wearing on your right hand" : "wearing on your left hand"); break;
2444 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
2446 case INVEN_NECK: p = "wearing around your neck"; break;
2450 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
2452 case INVEN_LITE: p = "using to light the way"; break;
2456 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
2458 case INVEN_BODY: p = "wearing on your body"; break;
2462 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
2464 case INVEN_OUTER: p = "wearing on your back"; break;
2468 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
2470 case INVEN_HEAD: p = "wearing on your head"; break;
2474 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
2476 case INVEN_HANDS: p = "wearing on your hands"; break;
2480 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
2482 case INVEN_FEET: p = "wearing on your feet"; break;
2486 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
2488 default: p = "carrying in your pack"; break;
2492 /* Return the result */
2497 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
2499 bool check_book_realm(const byte book_tval, const byte book_sval)
2501 if (book_tval < TV_LIFE_BOOK) return FALSE;
2502 if (p_ptr->pclass == CLASS_SORCERER)
2504 return is_magic(tval2realm(book_tval));
2506 else if (p_ptr->pclass == CLASS_RED_MAGE)
2508 if (is_magic(tval2realm(book_tval)))
2509 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
2511 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
2516 * Check an item against the item tester info
2518 bool item_tester_okay(object_type *o_ptr)
2520 /* Hack -- allow listing empty slots */
2521 if (item_tester_full) return (TRUE);
2523 /* Require an item */
2524 if (!o_ptr->k_idx) return (FALSE);
2526 /* Hack -- ignore "gold" */
2527 if (o_ptr->tval == TV_GOLD)
2530 extern bool show_gold_on_floor;
2532 if (!show_gold_on_floor) return (FALSE);
2535 /* Check the tval */
2536 if (item_tester_tval)
2538 /* Is it a spellbook? If so, we need a hack -- TY */
2539 if ((item_tester_tval <= TV_DEATH_BOOK) &&
2540 (item_tester_tval >= TV_LIFE_BOOK))
2541 return check_book_realm(o_ptr->tval, o_ptr->sval);
2543 if (item_tester_tval != o_ptr->tval) return (FALSE);
2546 /* Check the hook */
2547 if (item_tester_hook)
2549 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
2560 * Choice window "shadow" of the "show_inven()" function
2562 void display_inven(void)
2564 register int i, n, z = 0;
2566 byte attr = TERM_WHITE;
2568 char o_name[MAX_NLEN];
2572 Term_get_size(&wid, &hgt);
2574 /* Find the "final" slot */
2575 for (i = 0; i < INVEN_PACK; i++)
2577 o_ptr = &inventory[i];
2579 /* Skip non-objects */
2580 if (!o_ptr->k_idx) continue;
2586 /* Display the pack */
2587 for (i = 0; i < z; i++)
2589 /* Examine the item */
2590 o_ptr = &inventory[i];
2592 /* Start with an empty "index" */
2593 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
2595 /* Is this item "acceptable"? */
2596 if (item_tester_okay(o_ptr))
2598 /* Prepare an "index" */
2599 tmp_val[0] = index_to_label(i);
2601 /* Bracket the "index" --(-- */
2605 /* Display the index (or blank space) */
2606 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
2608 /* Obtain an item description */
2609 object_desc(o_name, o_ptr, 0);
2611 /* Obtain the length of the description */
2615 attr = tval_to_attr[o_ptr->tval % 128];
2617 /* Grey out charging items */
2623 /* Display the entry itself */
2624 Term_putstr(3, i, n, attr, o_name);
2626 /* Erase the rest of the line */
2627 Term_erase(3+n, i, 255);
2629 /* Display the weight if needed */
2632 int wgt = o_ptr->weight * o_ptr->number;
2634 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
2636 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
2639 prt(tmp_val, i, wid - 9);
2643 /* Erase the rest of the window */
2644 for (i = z; i < hgt; i++)
2646 /* Erase the line */
2647 Term_erase(0, i, 255);
2654 * Choice window "shadow" of the "show_equip()" function
2656 void display_equip(void)
2660 byte attr = TERM_WHITE;
2662 char o_name[MAX_NLEN];
2666 Term_get_size(&wid, &hgt);
2668 /* Display the equipment */
2669 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
2671 /* Examine the item */
2672 o_ptr = &inventory[i];
2674 /* Start with an empty "index" */
2675 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
2677 /* Is this item "acceptable"? */
2678 if (select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr))
2680 /* Prepare an "index" */
2681 tmp_val[0] = index_to_label(i);
2683 /* Bracket the "index" --(-- */
2687 /* Display the index (or blank space) */
2688 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
2690 /* Obtain an item description */
2691 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
2694 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
2696 strcpy(o_name, "(wielding with two-hands)");
2702 object_desc(o_name, o_ptr, 0);
2703 attr = tval_to_attr[o_ptr->tval % 128];
2706 /* Obtain the length of the description */
2709 /* Grey out charging items */
2715 /* Display the entry itself */
2716 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
2718 /* Erase the rest of the line */
2719 Term_erase(3+n, i - INVEN_RARM, 255);
2721 /* Display the weight (if needed) */
2724 int wgt = o_ptr->weight * o_ptr->number;
2726 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
2728 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
2731 prt(tmp_val, i - INVEN_RARM, wid - (show_labels ? 28 : 9));
2734 /* Display the slot description (if needed) */
2737 Term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
2738 prt(mention_use(i), i - INVEN_RARM, wid - 15);
2742 /* Erase the rest of the window */
2743 for (i = INVEN_TOTAL - INVEN_RARM; i < hgt; i++)
2745 /* Clear that line */
2746 Term_erase(0, i, 255);
2752 * Find the "first" inventory object with the given "tag".
2754 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
2755 * inscription of an object. Alphabetical characters don't work as a
2758 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
2759 * and "x" is the "current" command_cmd code.
2761 static bool get_tag(int *cp, char tag, int mode)
2766 /* Extract index from mode */
2771 end = INVEN_TOTAL - 1;
2776 end = INVEN_PACK - 1;
2783 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
2785 /* Check every inventory object */
2786 for (i = start; i <= end; i++)
2788 object_type *o_ptr = &inventory[i];
2790 /* Skip non-objects */
2791 if (!o_ptr->k_idx) continue;
2793 /* Skip empty inscriptions */
2794 if (!o_ptr->inscription) continue;
2796 /* Skip non-choice */
2797 if (!item_tester_okay(o_ptr)) continue;
2800 s = my_strchr(quark_str(o_ptr->inscription), '@');
2802 /* Process all tags */
2805 /* Check the special tags */
2806 if ((s[1] == command_cmd) && (s[2] == tag))
2808 /* Save the actual inventory ID */
2815 /* Find another '@' */
2816 s = my_strchr(s + 1, '@');
2821 /**** Find a tag in the form of {@#} (allows only numerals) ***/
2823 /* Don't allow {@#} with '#' being alphabet */
2824 if (tag < '0' || '9' < tag)
2830 /* Check every object */
2831 for (i = start; i <= end; i++)
2833 object_type *o_ptr = &inventory[i];
2835 /* Skip non-objects */
2836 if (!o_ptr->k_idx) continue;
2838 /* Skip empty inscriptions */
2839 if (!o_ptr->inscription) continue;
2841 /* Skip non-choice */
2842 if (!item_tester_okay(o_ptr)) continue;
2845 s = my_strchr(quark_str(o_ptr->inscription), '@');
2847 /* Process all tags */
2850 /* Check the normal tags */
2853 /* Save the actual inventory ID */
2860 /* Find another '@' */
2861 s = my_strchr(s + 1, '@');
2871 * Find the "first" floor object with the given "tag".
2873 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
2874 * inscription of an object. Alphabetical characters don't work as a
2877 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
2878 * and "x" is the "current" command_cmd code.
2880 static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
2885 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
2887 /* Check every object in the grid */
2888 for (i = 0; i < floor_num && i < 23; i++)
2890 object_type *o_ptr = &o_list[floor_list[i]];
2892 /* Skip empty inscriptions */
2893 if (!o_ptr->inscription) continue;
2896 s = my_strchr(quark_str(o_ptr->inscription), '@');
2898 /* Process all tags */
2901 /* Check the special tags */
2902 if ((s[1] == command_cmd) && (s[2] == tag))
2904 /* Save the actual floor object ID */
2911 /* Find another '@' */
2912 s = my_strchr(s + 1, '@');
2917 /**** Find a tag in the form of {@#} (allows only numerals) ***/
2919 /* Don't allow {@#} with '#' being alphabet */
2920 if (tag < '0' || '9' < tag)
2926 /* Check every object in the grid */
2927 for (i = 0; i < floor_num && i < 23; i++)
2929 object_type *o_ptr = &o_list[floor_list[i]];
2931 /* Skip empty inscriptions */
2932 if (!o_ptr->inscription) continue;
2935 s = my_strchr(quark_str(o_ptr->inscription), '@');
2937 /* Process all tags */
2940 /* Check the normal tags */
2943 /* Save the floor object ID */
2950 /* Find another '@' */
2951 s = my_strchr(s + 1, '@');
2961 * Move around label characters with correspond tags
2963 static void prepare_label_string(char *label, int mode)
2965 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
2966 int offset = (mode == USE_EQUIP) ? INVEN_RARM : 0;
2969 /* Prepare normal labels */
2970 strcpy(label, alphabet_chars);
2972 /* Move each label */
2973 for (i = 0; i < 52; i++)
2976 char c = alphabet_chars[i];
2978 /* Find a tag with this label */
2979 if (get_tag(&index, c, mode))
2981 /* Delete the overwritten label */
2982 if (label[i] == c) label[i] = ' ';
2984 /* Move the label to the place of corresponding tag */
2985 label[index - offset] = c;
2992 * Move around label characters with correspond tags (floor version)
2994 static void prepare_label_string_floor(char *label, int floor_list[], int floor_num)
2996 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
2999 /* Prepare normal labels */
3000 strcpy(label, alphabet_chars);
3002 /* Move each label */
3003 for (i = 0; i < 52; i++)
3006 char c = alphabet_chars[i];
3008 /* Find a tag with this label */
3009 if (get_tag_floor(&index, c, floor_list, floor_num))
3011 /* Delete the overwritten label */
3012 if (label[i] == c) label[i] = ' ';
3014 /* Move the label to the place of corresponding tag */
3022 * Display the inventory.
3024 * Hack -- do not display "trailing" empty slots
3026 int show_inven(int target_item)
3028 int i, j, k, l, z = 0;
3029 int col, cur_col, len;
3031 char o_name[MAX_NLEN];
3035 char out_desc[23][MAX_NLEN];
3036 int target_item_label = 0;
3038 char inven_label[52 + 1];
3040 /* Starting column */
3044 Term_get_size(&wid, &hgt);
3046 /* Default "max-length" */
3047 len = wid - col - 1;
3050 /* Find the "final" slot */
3051 for (i = 0; i < INVEN_PACK; i++)
3053 o_ptr = &inventory[i];
3055 /* Skip non-objects */
3056 if (!o_ptr->k_idx) continue;
3062 prepare_label_string(inven_label, USE_INVEN);
3064 /* Display the inventory */
3065 for (k = 0, i = 0; i < z; i++)
3067 o_ptr = &inventory[i];
3069 /* Is this item acceptable? */
3070 if (!item_tester_okay(o_ptr)) continue;
3072 /* Describe the object */
3073 object_desc(o_name, o_ptr, 0);
3075 /* Save the object index, color, and description */
3077 out_color[k] = tval_to_attr[o_ptr->tval % 128];
3079 /* Grey out charging items */
3082 out_color[k] = TERM_L_DARK;
3085 (void)strcpy(out_desc[k], o_name);
3087 /* Find the predicted "line length" */
3088 l = strlen(out_desc[k]) + 5;
3090 /* Be sure to account for the weight */
3091 if (show_weights) l += 9;
3093 /* Account for icon if displayed */
3094 if (show_item_graph)
3097 if (use_bigtile) l++;
3100 /* Maintain the maximum length */
3101 if (l > len) len = l;
3103 /* Advance to next "line" */
3107 /* Find the column to start in */
3108 col = (len > wid - 4) ? 0 : (wid - len - 1);
3110 /* Output each entry */
3111 for (j = 0; j < k; j++)
3117 o_ptr = &inventory[i];
3119 /* Clear the line */
3120 prt("", j + 1, col ? col - 2 : col);
3122 if (use_menu && target_item)
3124 if (j == (target_item-1))
3127 strcpy(tmp_val, "¡Õ");
3129 strcpy(tmp_val, "> ");
3131 target_item_label = i;
3133 else strcpy(tmp_val, " ");
3135 else if (i <= INVEN_PACK)
3137 /* Prepare an index --(-- */
3138 sprintf(tmp_val, "%c)", inven_label[i]);
3142 /* Prepare an index --(-- */
3143 sprintf(tmp_val, "%c)", index_to_label(i));
3146 /* Clear the line with the (possibly indented) index */
3147 put_str(tmp_val, j + 1, col);
3151 /* Display graphics for object, if desired */
3152 if (show_item_graph)
3154 byte a = object_attr(o_ptr);
3155 char c = object_char(o_ptr);
3158 if (a & 0x80) a |= 0x40;
3161 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
3162 if (use_bigtile) cur_col++;
3168 /* Display the entry itself */
3169 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
3171 /* Display the weight if needed */
3174 int wgt = o_ptr->weight * o_ptr->number;
3176 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
3178 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3181 prt(tmp_val, j + 1, wid - 9);
3185 /* Make a "shadow" below the list (only if needed) */
3186 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
3188 /* Save the new column */
3191 return target_item_label;
3197 * Display the equipment.
3199 int show_equip(int target_item)
3202 int col, cur_col, len;
3205 char o_name[MAX_NLEN];
3208 char out_desc[23][MAX_NLEN];
3209 int target_item_label = 0;
3211 char equip_label[52 + 1];
3213 /* Starting column */
3217 Term_get_size(&wid, &hgt);
3219 /* Maximal length */
3220 len = wid - col - 1;
3223 /* Scan the equipment list */
3224 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
3226 o_ptr = &inventory[i];
3228 /* Is this item acceptable? */
3229 if (!(select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr)) &&
3230 (!((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute) ||
3231 item_tester_no_ryoute)) continue;
3234 object_desc(o_name, o_ptr, 0);
3236 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
3239 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
3241 (void)strcpy(out_desc[k],"(wielding with two-hands)");
3243 out_color[k] = TERM_WHITE;
3247 (void)strcpy(out_desc[k], o_name);
3248 out_color[k] = tval_to_attr[o_ptr->tval % 128];
3252 /* Grey out charging items */
3255 out_color[k] = TERM_L_DARK;
3258 /* Extract the maximal length (see below) */
3260 l = strlen(out_desc[k]) + (2 + 1);
3262 l = strlen(out_desc[k]) + (2 + 3);
3266 /* Increase length for labels (if needed) */
3268 if (show_labels) l += (7 + 2);
3270 if (show_labels) l += (14 + 2);
3274 /* Increase length for weight (if needed) */
3275 if (show_weights) l += 9;
3277 if (show_item_graph) l += 2;
3279 /* Maintain the max-length */
3280 if (l > len) len = l;
3282 /* Advance the entry */
3286 /* Hack -- Find a column to start in */
3288 col = (len > wid - 6) ? 0 : (wid - len - 1);
3290 col = (len > wid - 4) ? 0 : (wid - len - 1);
3293 prepare_label_string(equip_label, USE_EQUIP);
3295 /* Output each entry */
3296 for (j = 0; j < k; j++)
3302 o_ptr = &inventory[i];
3304 /* Clear the line */
3305 prt("", j + 1, col ? col - 2 : col);
3307 if (use_menu && target_item)
3309 if (j == (target_item-1))
3312 strcpy(tmp_val, "¡Õ");
3314 strcpy(tmp_val, "> ");
3316 target_item_label = i;
3318 else strcpy(tmp_val, " ");
3320 else if (i >= INVEN_RARM)
3322 /* Prepare an index --(-- */
3323 sprintf(tmp_val, "%c)", equip_label[i - INVEN_RARM]);
3327 /* Prepare an index --(-- */
3328 sprintf(tmp_val, "%c)", index_to_label(i));
3331 /* Clear the line with the (possibly indented) index */
3332 put_str(tmp_val, j+1, col);
3336 /* Display graphics for object, if desired */
3337 if (show_item_graph)
3339 byte a = object_attr(o_ptr);
3340 char c = object_char(o_ptr);
3343 if (a & 0x80) a |= 0x40;
3346 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
3347 if (use_bigtile) cur_col++;
3355 /* Mention the use */
3357 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
3359 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
3362 put_str(tmp_val, j+1, cur_col);
3364 /* Display the entry itself */
3366 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
3368 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
3375 /* Display the entry itself */
3376 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
3379 /* Display the weight if needed */
3382 int wgt = o_ptr->weight * o_ptr->number;
3384 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
3386 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
3389 prt(tmp_val, j + 1, wid - 9);
3393 /* Make a "shadow" below the list (only if needed) */
3394 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
3396 /* Save the new column */
3399 return target_item_label;
3406 * Flip "inven" and "equip" in any sub-windows
3408 void toggle_inven_equip(void)
3413 for (j = 0; j < 8; j++)
3416 if (!angband_term[j]) continue;
3418 /* Flip inven to equip */
3419 if (window_flag[j] & (PW_INVEN))
3422 window_flag[j] &= ~(PW_INVEN);
3423 window_flag[j] |= (PW_EQUIP);
3426 p_ptr->window |= (PW_EQUIP);
3429 /* Flip inven to equip */
3430 else if (window_flag[j] & (PW_EQUIP))
3433 window_flag[j] &= ~(PW_EQUIP);
3434 window_flag[j] |= (PW_INVEN);
3437 p_ptr->window |= (PW_INVEN);
3445 * Verify the choice of an item.
3447 * The item can be negative to mean "item on floor".
3449 static bool verify(cptr prompt, int item)
3451 char o_name[MAX_NLEN];
3452 char out_val[MAX_NLEN+20];
3459 o_ptr = &inventory[item];
3465 o_ptr = &o_list[0 - item];
3469 object_desc(o_name, o_ptr, 0);
3473 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
3475 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
3480 return (get_check(out_val));
3485 * Hack -- allow user to "prevent" certain choices
3487 * The item can be negative to mean "item on floor".
3489 static bool get_item_allow(int item)
3495 if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
3500 o_ptr = &inventory[item];
3506 o_ptr = &o_list[0 - item];
3509 /* No inscription */
3510 if (!o_ptr->inscription) return (TRUE);
3513 s = my_strchr(quark_str(o_ptr->inscription), '!');
3515 /* Process preventions */
3518 /* Check the "restriction" */
3519 if ((s[1] == command_cmd) || (s[1] == '*'))
3521 /* Verify the choice */
3523 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
3525 if (!verify("Really try", item)) return (FALSE);
3530 /* Find another '!' */
3531 s = my_strchr(s + 1, '!');
3541 * Auxiliary function for "get_item()" -- test an index
3543 static bool get_item_okay(int i)
3546 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
3548 if (select_ring_slot) return is_ring_slot(i);
3550 /* Verify the item */
3551 if (!item_tester_okay(&inventory[i])) return (FALSE);
3560 * Determine whether get_item() can get some item or not
3561 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
3563 bool can_get_item(void)
3565 int j, floor_list[23], floor_num = 0;
3567 for (j = 0; j < INVEN_TOTAL; j++)
3568 if (item_tester_okay(&inventory[j]))
3571 floor_num = scan_floor(floor_list, py, px, 0x03);
3579 * Let the user select an item, save its "index"
3581 * Return TRUE only if an acceptable item was chosen by the user.
3583 * The selected item must satisfy the "item_tester_hook()" function,
3584 * if that hook is set, and the "item_tester_tval", if that value is set.
3586 * All "item_tester" restrictions are cleared before this function returns.
3588 * The user is allowed to choose acceptable items from the equipment,
3589 * inventory, or floor, respectively, if the proper flag was given,
3590 * and there are any acceptable items in that location.
3592 * The equipment or inventory are displayed (even if no acceptable
3593 * items are in that location) if the proper flag was given.
3595 * If there are no acceptable items available anywhere, and "str" is
3596 * not NULL, then it will be used as the text of a warning message
3597 * before the function returns.
3599 * Note that the user must press "-" to specify the item on the floor,
3600 * and there is no way to "examine" the item on the floor, while the
3601 * use of "capital" letters will "examine" an inventory/equipment item,
3602 * and prompt for its use.
3604 * If a legal item is selected from the inventory, we save it in "cp"
3605 * directly (0 to 35), and return TRUE.
3607 * If a legal item is selected from the floor, we save it in "cp" as
3608 * a negative (-1 to -511), and return TRUE.
3610 * If no item is available, we do nothing to "cp", and we display a
3611 * warning message, using "str" if available, and return FALSE.
3613 * If no item is selected, we do nothing to "cp", and return FALSE.
3615 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
3616 * to allow the user to enter a command while viewing those screens, and
3617 * also to induce "auto-enter" of stores, and other such stuff.
3619 * Global "p_ptr->command_see" may be set before calling this function to start
3620 * out in "browse" mode. It is cleared before this function returns.
3622 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
3623 * If it is TRUE then we are viewing inventory, else equipment.
3625 * We always erase the prompt when we are done, leaving a blank line,
3626 * or a warning message, if appropriate, if no items are available.
3628 bool get_item(int *cp, cptr pmt, cptr str, int mode)
3630 s16b this_o_idx, next_o_idx = 0;
3634 int j, k, i1, i2, e1, e2;
3644 bool allow_floor = FALSE;
3646 bool toggle = FALSE;
3652 extern bool select_the_force;
3654 int menu_line = (use_menu ? 1 : 0);
3660 static char prev_tag = '\0';
3661 char cur_tag = '\0';
3663 #endif /* ALLOW_REPEAT */
3665 #ifdef ALLOW_EASY_FLOOR /* TNB */
3667 if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
3669 #endif /* ALLOW_EASY_FLOOR -- TNB */
3672 if (mode & USE_EQUIP) equip = TRUE;
3673 if (mode & USE_INVEN) inven = TRUE;
3674 if (mode & USE_FLOOR) floor = TRUE;
3678 /* Get the item index */
3679 if (repeat_pull(cp))
3682 if (select_the_force && (*cp == INVEN_FORCE))
3684 item_tester_tval = 0;
3685 item_tester_hook = NULL;
3686 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
3691 else if (floor && (*cp < 0))
3698 /* Acquire object */
3701 /* Validate the item */
3702 if (item_tester_okay(o_ptr))
3704 /* Forget restrictions */
3705 item_tester_tval = 0;
3706 item_tester_hook = NULL;
3707 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
3714 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
3715 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
3717 if (prev_tag && command_cmd)
3719 /* Look up the tag and validate the item */
3720 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
3721 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
3722 else if (!get_item_okay(k)) /* Reject */;
3725 /* Accept that choice */
3728 /* Forget restrictions */
3729 item_tester_tval = 0;
3730 item_tester_hook = NULL;
3731 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
3737 prev_tag = '\0'; /* prev_tag is no longer effective */
3740 /* Verify the item */
3741 else if (get_item_okay(*cp))
3743 /* Forget restrictions */
3744 item_tester_tval = 0;
3745 item_tester_hook = NULL;
3746 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
3754 #endif /* ALLOW_REPEAT */
3757 /* Paranoia XXX XXX XXX */
3764 /* No item selected */
3768 /* Full inventory */
3770 i2 = INVEN_PACK - 1;
3772 /* Forbid inventory */
3773 if (!inven) i2 = -1;
3776 for (j = 0; j < INVEN_PACK; j++)
3777 if (item_tester_okay(&inventory[j])) max_inven++;
3780 /* Restrict inventory indexes */
3781 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
3782 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
3785 /* Full equipment */
3787 e2 = INVEN_TOTAL - 1;
3789 /* Forbid equipment */
3790 if (!equip) e2 = -1;
3793 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
3794 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
3795 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
3798 /* Restrict equipment indexes */
3799 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
3800 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
3802 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
3806 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
3808 else if (p_ptr->hidarite) e1 = INVEN_RARM;
3812 /* Restrict floor usage */
3815 /* Scan all objects in the grid */
3816 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
3820 /* Acquire object */
3821 o_ptr = &o_list[this_o_idx];
3823 /* Acquire next object */
3824 next_o_idx = o_ptr->next_o_idx;
3826 /* Accept the item on the floor if legal */
3827 if (item_tester_okay(o_ptr) && (o_ptr->marked & OM_FOUND)) allow_floor = TRUE;
3831 /* Require at least one legal choice */
3832 if (!allow_floor && (i1 > i2) && (e1 > e2))
3834 /* Cancel p_ptr->command_see */
3835 command_see = FALSE;
3843 if (select_the_force) {
3849 /* Analyze choices */
3852 /* Hack -- Start on equipment if requested */
3853 if (command_see && command_wrk && equip)
3858 /* Use inventory if allowed */
3861 command_wrk = FALSE;
3864 /* Use equipment if allowed */
3870 /* Use inventory for floor */
3873 command_wrk = FALSE;
3879 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
3881 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
3883 /* Hack -- start out in "display" mode */
3891 /* Repeat until done */
3894 int get_item_label = 0;
3901 for (j = 0; j < 8; j++)
3904 if (!angband_term[j]) continue;
3906 /* Count windows displaying inven */
3907 if (window_flag[j] & (PW_INVEN)) ni++;
3909 /* Count windows displaying equip */
3910 if (window_flag[j] & (PW_EQUIP)) ne++;
3913 /* Toggle if needed */
3914 if ((command_wrk && ni && !ne) ||
3915 (!command_wrk && !ni && ne))
3918 toggle_inven_equip();
3925 p_ptr->window |= (PW_INVEN | PW_EQUIP);
3927 /* Redraw windows */
3931 /* Inventory screen */
3934 /* Redraw if needed */
3935 if (command_see) get_item_label = show_inven(menu_line);
3938 /* Equipment screen */
3941 /* Redraw if needed */
3942 if (command_see) get_item_label = show_equip(menu_line);
3945 /* Viewing inventory */
3948 /* Begin the prompt */
3950 sprintf(out_val, "»ý¤Áʪ:");
3952 sprintf(out_val, "Inven:");
3955 /* Some legal items */
3956 if ((i1 <= i2) && !use_menu)
3958 /* Build the prompt */
3960 sprintf(tmp_val, "%c-%c,'(',')',",
3962 sprintf(tmp_val, " %c-%c,'(',')',",
3964 index_to_label(i1), index_to_label(i2));
3967 strcat(out_val, tmp_val);
3970 /* Indicate ability to "view" */
3972 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
3974 if (!command_see && !use_menu) strcat(out_val, " * to see,");
3979 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
3981 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
3985 /* Viewing equipment */
3988 /* Begin the prompt */
3990 sprintf(out_val, "ÁõÈ÷ÉÊ:");
3992 sprintf(out_val, "Equip:");
3995 /* Some legal items */
3996 if ((e1 <= e2) && !use_menu)
3998 /* Build the prompt */
4000 sprintf(tmp_val, "%c-%c,'(',')',",
4002 sprintf(tmp_val, " %c-%c,'(',')',",
4004 index_to_label(e1), index_to_label(e2));
4007 strcat(out_val, tmp_val);
4010 /* Indicate ability to "view" */
4012 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
4014 if (!command_see) strcat(out_val, " * to see,");
4019 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
4021 if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
4025 /* Indicate legality of the "floor" item */
4027 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
4028 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
4030 if (allow_floor) strcat(out_val, " - for floor,");
4031 if (select_the_force) strcat(out_val, " w for the Force,");
4034 /* Finish the prompt */
4035 strcat(out_val, " ESC");
4037 /* Build the prompt */
4038 sprintf(tmp_val, "(%s) %s", out_val, pmt);
4040 /* Show the prompt */
4048 int max_line = (command_wrk ? max_equip : max_inven);
4064 menu_line += (max_line - 1);
4083 /* Verify legality */
4084 if (!inven || !equip)
4090 /* Hack -- Fix screen */
4100 /* Switch inven/equip */
4101 command_wrk = !command_wrk;
4102 max_line = (command_wrk ? max_equip : max_inven);
4103 if (menu_line > max_line) menu_line = max_line;
4105 /* Need to redraw */
4114 if (command_wrk == USE_FLOOR)
4117 (*cp) = -get_item_label;
4121 /* Validate the item */
4122 if (!get_item_okay(get_item_label))
4128 /* Allow player to "refuse" certain actions */
4129 if (!get_item_allow(get_item_label))
4135 /* Accept that choice */
4136 (*cp) = get_item_label;
4145 if (select_the_force) {
4153 if (menu_line > max_line) menu_line -= max_line;
4174 command_see = FALSE;
4194 /* Verify legality */
4195 if (!inven || !equip)
4201 /* Hack -- Fix screen */
4211 /* Switch inven/equip */
4212 command_wrk = !command_wrk;
4214 /* Need to redraw */
4220 /* Use floor item */
4223 /* Scan all objects in the grid */
4224 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
4228 /* Acquire object */
4229 o_ptr = &o_list[this_o_idx];
4231 /* Acquire next object */
4232 next_o_idx = o_ptr->next_o_idx;
4234 /* Validate the item */
4235 if (!item_tester_okay(o_ptr)) continue;
4240 /* Verify the item (if required) */
4242 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
4244 if (other_query_flag && !verify("Try", k)) continue;
4248 /* Allow player to "refuse" certain actions */
4249 if (!get_item_allow(k)) continue;
4251 /* Accept that choice */
4268 case '1': case '2': case '3':
4269 case '4': case '5': case '6':
4270 case '7': case '8': case '9':
4272 /* Look up the tag */
4273 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
4279 /* Hack -- Validate the item */
4280 if ((k < INVEN_RARM) ? !inven : !equip)
4286 /* Validate the item */
4287 if (!get_item_okay(k))
4293 /* Allow player to "refuse" certain actions */
4294 if (!get_item_allow(k))
4300 /* Accept that choice */
4306 #endif /* ALLOW_REPEAT */
4314 /* Choose "default" inventory item */
4317 k = ((i1 == i2) ? i1 : -1);
4320 /* Choose "default" equipment item */
4323 k = ((e1 == e2) ? e1 : -1);
4326 /* Validate the item */
4327 if (!get_item_okay(k))
4333 /* Allow player to "refuse" certain actions */
4334 if (!get_item_allow(k))
4340 /* Accept that choice */
4350 if (select_the_force) {
4363 bool not_found = FALSE;
4365 /* Look up the alphabetical tag */
4366 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
4371 /* Hack -- Validate the item */
4372 else if ((k < INVEN_RARM) ? !inven : !equip)
4377 /* Validate the item */
4378 else if (!get_item_okay(k))
4385 /* Accept that choice */
4391 #endif /* ALLOW_REPEAT */
4395 /* Extract "query" setting */
4396 ver = isupper(which);
4397 which = tolower(which);
4399 /* Convert letter to inventory index */
4402 if (which == '(') k = i1;
4403 else if (which == ')') k = i2;
4404 else k = label_to_inven(which);
4407 /* Convert letter to equipment index */
4410 if (which == '(') k = e1;
4411 else if (which == ')') k = e2;
4412 else k = label_to_equip(which);
4415 /* Validate the item */
4416 if (!get_item_okay(k))
4422 /* Verify the item */
4424 if (ver && !verify("ËÜÅö¤Ë", k))
4426 if (ver && !verify("Try", k))
4434 /* Allow player to "refuse" certain actions */
4435 if (!get_item_allow(k))
4441 /* Accept that choice */
4452 /* Fix the screen if necessary */
4458 /* Hack -- Cancel "display" */
4459 command_see = FALSE;
4463 /* Forget the item_tester_tval restriction */
4464 item_tester_tval = 0;
4466 item_tester_no_ryoute = FALSE;
4468 /* Forget the item_tester_hook restriction */
4469 item_tester_hook = NULL;
4472 /* Clean up 'show choices' */
4473 /* Toggle again if needed */
4474 if (toggle) toggle_inven_equip();
4477 p_ptr->window |= (PW_INVEN | PW_EQUIP);
4483 /* Clear the prompt line */
4486 /* Warning if needed */
4487 if (oops && str) msg_print(str);
4493 if (command_cmd) prev_tag = cur_tag;
4494 #endif /* ALLOW_REPEAT */
4496 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4504 #ifdef ALLOW_EASY_FLOOR
4509 * Return a list of o_list[] indexes of items at the given cave
4510 * location. Valid flags are:
4512 * mode & 0x01 -- Item tester
4513 * mode & 0x02 -- Marked items only
4514 * mode & 0x04 -- Stop after first
4516 int scan_floor(int *items, int y, int x, int mode)
4518 int this_o_idx, next_o_idx;
4523 if (!in_bounds(y, x)) return 0;
4525 /* Scan all objects in the grid */
4526 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
4530 /* Acquire object */
4531 o_ptr = &o_list[this_o_idx];
4533 /* Acquire next object */
4534 next_o_idx = o_ptr->next_o_idx;
4537 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
4540 if ((mode & 0x02) && !(o_ptr->marked & OM_FOUND)) continue;
4542 /* Accept this item */
4543 /* XXX Hack -- Enforce limit */
4545 items[num] = this_o_idx;
4550 if (mode & 0x04) break;
4559 * Display a list of the items on the floor at the given location.
4561 int show_floor(int target_item, int y, int x, int *min_width)
4568 char o_name[MAX_NLEN];
4574 char out_desc[23][MAX_NLEN];
4575 int target_item_label = 0;
4577 int floor_list[23], floor_num;
4579 char floor_label[52 + 1];
4581 bool dont_need_to_show_weights = TRUE;
4584 Term_get_size(&wid, &hgt);
4586 /* Default length */
4587 len = MAX((*min_width), 20);
4590 /* Scan for objects in the grid, using item_tester_okay() */
4591 floor_num = scan_floor(floor_list, y, x, 0x03);
4593 /* Display the floor objects */
4594 for (k = 0, i = 0; i < floor_num && i < 23; i++)
4596 o_ptr = &o_list[floor_list[i]];
4598 /* Describe the object */
4599 object_desc(o_name, o_ptr, 0);
4601 /* Save the index */
4604 /* Acquire inventory color */
4605 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
4607 /* Save the object description */
4608 strcpy(out_desc[k], o_name);
4610 /* Find the predicted "line length" */
4611 l = strlen(out_desc[k]) + 5;
4613 /* Be sure to account for the weight */
4614 if (show_weights) l += 9;
4616 if (o_ptr->tval != TV_GOLD) dont_need_to_show_weights = FALSE;
4618 /* Maintain the maximum length */
4619 if (l > len) len = l;
4621 /* Advance to next "line" */
4625 if (show_weights && dont_need_to_show_weights) len -= 9;
4630 /* Find the column to start in */
4631 col = (len > wid - 4) ? 0 : (wid - len - 1);
4633 prepare_label_string_floor(floor_label, floor_list, floor_num);
4635 /* Output each entry */
4636 for (j = 0; j < k; j++)
4639 i = floor_list[out_index[j]];
4644 /* Clear the line */
4645 prt("", j + 1, col ? col - 2 : col);
4647 if (use_menu && target_item)
4649 if (j == (target_item-1))
4652 strcpy(tmp_val, "¡Õ");
4654 strcpy(tmp_val, "> ");
4656 target_item_label = i;
4658 else strcpy(tmp_val, " ");
4662 /* Prepare an index --(-- */
4663 sprintf(tmp_val, "%c)", floor_label[j]);
4666 /* Clear the line with the (possibly indented) index */
4667 put_str(tmp_val, j + 1, col);
4669 /* Display the entry itself */
4670 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
4672 /* Display the weight if needed */
4673 if (show_weights && (o_ptr->tval != TV_GOLD))
4675 int wgt = o_ptr->weight * o_ptr->number;
4677 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4679 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4682 prt(tmp_val, j + 1, wid - 9);
4686 /* Make a "shadow" below the list (only if needed) */
4687 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4689 return target_item_label;
4693 * This version of get_item() is called by get_item() when
4694 * the easy_floor is on.
4696 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
4698 char n1 = ' ', n2 = ' ', which = ' ';
4700 int j, k, i1, i2, e1, e2;
4707 bool equip = (mode & USE_EQUIP) ? TRUE : FALSE;
4708 bool inven = (mode & USE_INVEN) ? TRUE : FALSE;
4709 bool floor = (mode & USE_FLOOR) ? TRUE : FALSE;
4711 bool allow_equip = FALSE;
4712 bool allow_inven = FALSE;
4713 bool allow_floor = FALSE;
4715 bool toggle = FALSE;
4720 int floor_num, floor_list[23], floor_top = 0;
4723 extern bool select_the_force;
4725 int menu_line = (use_menu ? 1 : 0);
4731 static char prev_tag = '\0';
4732 char cur_tag = '\0';
4734 /* Get the item index */
4735 if (repeat_pull(cp))
4738 if (select_the_force && (*cp == INVEN_FORCE))
4740 item_tester_tval = 0;
4741 item_tester_hook = NULL;
4742 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4747 else if (floor && (*cp < 0))
4749 if (prev_tag && command_cmd)
4751 /* Scan all objects in the grid */
4752 floor_num = scan_floor(floor_list, py, px, 0x03);
4754 /* Look up the tag */
4755 if (get_tag_floor(&k, prev_tag, floor_list, floor_num))
4757 /* Accept that choice */
4758 (*cp) = 0 - floor_list[k];
4760 /* Forget restrictions */
4761 item_tester_tval = 0;
4762 item_tester_hook = NULL;
4763 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4769 prev_tag = '\0'; /* prev_tag is no longer effective */
4772 /* Validate the item */
4773 else if (item_tester_okay(&o_list[0 - (*cp)]))
4775 /* Forget restrictions */
4776 item_tester_tval = 0;
4777 item_tester_hook = NULL;
4778 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4785 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
4786 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
4788 if (prev_tag && command_cmd)
4790 /* Look up the tag and validate the item */
4791 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
4792 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
4793 else if (!get_item_okay(k)) /* Reject */;
4796 /* Accept that choice */
4799 /* Forget restrictions */
4800 item_tester_tval = 0;
4801 item_tester_hook = NULL;
4802 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4808 prev_tag = '\0'; /* prev_tag is no longer effective */
4811 /* Verify the item */
4812 else if (get_item_okay(*cp))
4814 /* Forget restrictions */
4815 item_tester_tval = 0;
4816 item_tester_hook = NULL;
4817 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4825 #endif /* ALLOW_REPEAT */
4828 /* Paranoia XXX XXX XXX */
4835 /* No item selected */
4839 /* Full inventory */
4841 i2 = INVEN_PACK - 1;
4843 /* Forbid inventory */
4844 if (!inven) i2 = -1;
4847 for (j = 0; j < INVEN_PACK; j++)
4848 if (item_tester_okay(&inventory[j])) max_inven++;
4851 /* Restrict inventory indexes */
4852 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
4853 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
4856 /* Full equipment */
4858 e2 = INVEN_TOTAL - 1;
4860 /* Forbid equipment */
4861 if (!equip) e2 = -1;
4864 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
4865 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
4866 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
4869 /* Restrict equipment indexes */
4870 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
4871 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
4873 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
4877 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
4879 else if (p_ptr->hidarite) e1 = INVEN_RARM;
4883 /* Count "okay" floor items */
4886 /* Restrict floor usage */
4889 /* Scan all objects in the grid */
4890 floor_num = scan_floor(floor_list, py, px, 0x03);
4893 /* Accept inventory */
4894 if (i1 <= i2) allow_inven = TRUE;
4896 /* Accept equipment */
4897 if (e1 <= e2) allow_equip = TRUE;
4900 if (floor_num) allow_floor = TRUE;
4902 /* Require at least one legal choice */
4903 if (!allow_inven && !allow_equip && !allow_floor)
4905 /* Cancel p_ptr->command_see */
4906 command_see = FALSE;
4914 if (select_the_force) {
4920 /* Analyze choices */
4923 /* Hack -- Start on equipment if requested */
4924 if (command_see && (command_wrk == (USE_EQUIP))
4927 command_wrk = (USE_EQUIP);
4930 /* Use inventory if allowed */
4931 else if (allow_inven)
4933 command_wrk = (USE_INVEN);
4936 /* Use equipment if allowed */
4937 else if (allow_equip)
4939 command_wrk = (USE_EQUIP);
4942 /* Use floor if allowed */
4943 else if (allow_floor)
4945 command_wrk = (USE_FLOOR);
4950 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
4952 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
4954 /* Hack -- start out in "display" mode */
4961 /* Repeat until done */
4964 int get_item_label = 0;
4971 for (j = 0; j < 8; j++)
4974 if (!angband_term[j]) continue;
4976 /* Count windows displaying inven */
4977 if (window_flag[j] & (PW_INVEN)) ni++;
4979 /* Count windows displaying equip */
4980 if (window_flag[j] & (PW_EQUIP)) ne++;
4983 /* Toggle if needed */
4984 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
4985 (command_wrk == (USE_INVEN) && !ni && ne))
4988 toggle_inven_equip();
4995 p_ptr->window |= (PW_INVEN | PW_EQUIP);
4997 /* Redraw windows */
5000 /* Inventory screen */
5001 if (command_wrk == (USE_INVEN))
5003 /* Extract the legal requests */
5007 /* Redraw if needed */
5008 if (command_see) get_item_label = show_inven(menu_line);
5011 /* Equipment screen */
5012 else if (command_wrk == (USE_EQUIP))
5014 /* Extract the legal requests */
5015 n1 = I2A(e1 - INVEN_RARM);
5016 n2 = I2A(e2 - INVEN_RARM);
5018 /* Redraw if needed */
5019 if (command_see) get_item_label = show_equip(menu_line);
5023 else if (command_wrk == (USE_FLOOR))
5026 k = MIN(floor_top + 23, floor_num) - 1;
5028 /* Extract the legal requests */
5029 n1 = I2A(j - floor_top);
5030 n2 = I2A(k - floor_top);
5032 /* Redraw if needed */
5033 if (command_see) get_item_label = show_floor(menu_line, py, px, &min_width);
5036 /* Viewing inventory */
5037 if (command_wrk == (USE_INVEN))
5039 /* Begin the prompt */
5041 sprintf(out_val, "»ý¤Áʪ:");
5043 sprintf(out_val, "Inven:");
5048 /* Build the prompt */
5050 sprintf(tmp_val, "%c-%c,'(',')',",
5052 sprintf(tmp_val, " %c-%c,'(',')',",
5054 index_to_label(i1), index_to_label(i2));
5057 strcat(out_val, tmp_val);
5060 /* Indicate ability to "view" */
5062 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5064 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5072 strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
5073 else if (allow_floor)
5074 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
5076 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
5079 strcat(out_val, " / for Equip,");
5080 else if (allow_floor)
5081 strcat(out_val, " 6 for Equip,");
5083 strcat(out_val, " 4 or 6 for Equip,");
5092 strcat(out_val, " '-'¾²¾å,");
5093 else if (allow_equip)
5094 strcat(out_val, " '4' ¾²¾å,");
5096 strcat(out_val, " '4'or'6' ¾²¾å,");
5099 strcat(out_val, " - for floor,");
5100 else if (allow_equip)
5101 strcat(out_val, " 4 for floor,");
5103 strcat(out_val, " 4 or 6 for floor,");
5108 /* Viewing equipment */
5109 else if (command_wrk == (USE_EQUIP))
5111 /* Begin the prompt */
5113 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5115 sprintf(out_val, "Equip:");
5120 /* Build the prompt */
5122 sprintf(tmp_val, "%c-%c,'(',')',",
5124 sprintf(tmp_val, " %c-%c,'(',')',",
5126 index_to_label(e1), index_to_label(e2));
5129 strcat(out_val, tmp_val);
5132 /* Indicate ability to "view" */
5134 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5136 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5144 strcat(out_val, " '/' »ý¤Áʪ,");
5145 else if (allow_floor)
5146 strcat(out_val, " '4' »ý¤Áʪ,");
5148 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
5151 strcat(out_val, " / for Inven,");
5152 else if (allow_floor)
5153 strcat(out_val, " 4 for Inven,");
5155 strcat(out_val, " 4 or 6 for Inven,");
5164 strcat(out_val, " '-'¾²¾å,");
5165 else if (allow_inven)
5166 strcat(out_val, " '6' ¾²¾å,");
5168 strcat(out_val, " '4'or'6' ¾²¾å,");
5171 strcat(out_val, " - for floor,");
5172 else if (allow_inven)
5173 strcat(out_val, " 6 for floor,");
5175 strcat(out_val, " 4 or 6 for floor,");
5181 else if (command_wrk == (USE_FLOOR))
5183 /* Begin the prompt */
5185 sprintf(out_val, "¾²¾å:");
5187 sprintf(out_val, "Floor:");
5192 /* Build the prompt */
5194 sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
5196 sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
5200 strcat(out_val, tmp_val);
5203 /* Indicate ability to "view" */
5205 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5207 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5212 if (allow_inven && allow_equip)
5215 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
5217 strcat(out_val, " 4 for Equip, 6 for Inven,");
5220 else if (allow_inven)
5223 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
5225 strcat(out_val, " 4 or 6 for Inven,");
5228 else if (allow_equip)
5231 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
5233 strcat(out_val, " 4 or 6 for Equip,");
5238 else if (allow_inven)
5241 strcat(out_val, " '/' »ý¤Áʪ,");
5243 strcat(out_val, " / for Inven,");
5246 else if (allow_equip)
5249 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
5251 strcat(out_val, " / for Equip,");
5256 if (command_see && !use_menu)
5259 strcat(out_val, " Enter ¼¡,");
5261 strcat(out_val, " Enter for scroll down,");
5268 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
5270 if (select_the_force) strcat(out_val, " w for the Force,");
5273 /* Finish the prompt */
5274 strcat(out_val, " ESC");
5276 /* Build the prompt */
5277 sprintf(tmp_val, "(%s) %s", out_val, pmt);
5279 /* Show the prompt */
5288 if (command_wrk == USE_INVEN) max_line = max_inven;
5289 else if (command_wrk == USE_EQUIP) max_line = max_equip;
5290 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
5306 menu_line += (max_line - 1);
5322 /* Verify legality */
5323 if (command_wrk == (USE_INVEN))
5325 if (allow_floor) command_wrk = USE_FLOOR;
5326 else if (allow_equip) command_wrk = USE_EQUIP;
5333 else if (command_wrk == (USE_EQUIP))
5335 if (allow_inven) command_wrk = USE_INVEN;
5336 else if (allow_floor) command_wrk = USE_FLOOR;
5343 else if (command_wrk == (USE_FLOOR))
5345 if (allow_equip) command_wrk = USE_EQUIP;
5346 else if (allow_inven) command_wrk = USE_INVEN;
5359 /* Hack -- Fix screen */
5369 /* Switch inven/equip */
5370 if (command_wrk == USE_INVEN) max_line = max_inven;
5371 else if (command_wrk == USE_EQUIP) max_line = max_equip;
5372 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
5373 if (menu_line > max_line) menu_line = max_line;
5375 /* Need to redraw */
5383 /* Verify legality */
5384 if (command_wrk == (USE_INVEN))
5386 if (allow_equip) command_wrk = USE_EQUIP;
5387 else if (allow_floor) command_wrk = USE_FLOOR;
5394 else if (command_wrk == (USE_EQUIP))
5396 if (allow_floor) command_wrk = USE_FLOOR;
5397 else if (allow_inven) command_wrk = USE_INVEN;
5404 else if (command_wrk == (USE_FLOOR))
5406 if (allow_inven) command_wrk = USE_INVEN;
5407 else if (allow_equip) command_wrk = USE_EQUIP;
5420 /* Hack -- Fix screen */
5430 /* Switch inven/equip */
5431 if (command_wrk == USE_INVEN) max_line = max_inven;
5432 else if (command_wrk == USE_EQUIP) max_line = max_equip;
5433 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
5434 if (menu_line > max_line) menu_line = max_line;
5436 /* Need to redraw */
5445 if (command_wrk == USE_FLOOR)
5448 (*cp) = -get_item_label;
5452 /* Validate the item */
5453 if (!get_item_okay(get_item_label))
5459 /* Allow player to "refuse" certain actions */
5460 if (!get_item_allow(get_item_label))
5466 /* Accept that choice */
5467 (*cp) = get_item_label;
5476 if (select_the_force) {
5484 if (menu_line > max_line) menu_line -= max_line;
5505 command_see = FALSE;
5528 cave_type *c_ptr = &cave[py][px];
5530 if (command_wrk != (USE_FLOOR)) break;
5532 /* Get the object being moved. */
5533 o_idx = c_ptr->o_idx;
5535 /* Only rotate a pile of two or more objects. */
5536 if (!(o_idx && o_list[o_idx].next_o_idx)) break;
5538 /* Remove the first object from the list. */
5539 excise_object_idx(o_idx);
5541 /* Find end of the list. */
5543 while (o_list[i].next_o_idx)
5544 i = o_list[i].next_o_idx;
5546 /* Add after the last object. */
5547 o_list[i].next_o_idx = o_idx;
5549 /* Re-scan floor list */
5550 floor_num = scan_floor(floor_list, py, px, 0x03);
5552 /* Hack -- Fix screen */
5567 if (command_wrk == (USE_INVEN))
5574 command_wrk = (USE_EQUIP);
5576 else if (command_wrk == (USE_EQUIP))
5583 command_wrk = (USE_INVEN);
5585 else if (command_wrk == (USE_FLOOR))
5589 command_wrk = (USE_INVEN);
5591 else if (allow_equip)
5593 command_wrk = (USE_EQUIP);
5602 /* Hack -- Fix screen */
5612 /* Need to redraw */
5625 * If we are already examining the floor, and there
5626 * is only one item, we will always select it.
5627 * If we aren't examining the floor and there is only
5628 * one item, we will select it if floor_query_flag
5633 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
5636 k = 0 - floor_list[0];
5638 /* Allow player to "refuse" certain actions */
5639 if (!get_item_allow(k))
5645 /* Accept that choice */
5654 /* Hack -- Fix screen */
5664 command_wrk = (USE_FLOOR);
5670 case '1': case '2': case '3':
5671 case '4': case '5': case '6':
5672 case '7': case '8': case '9':
5674 if (command_wrk != USE_FLOOR)
5676 /* Look up the tag */
5677 if (!get_tag(&k, which, command_wrk))
5683 /* Hack -- Validate the item */
5684 if ((k < INVEN_RARM) ? !inven : !equip)
5690 /* Validate the item */
5691 if (!get_item_okay(k))
5699 /* Look up the alphabetical tag */
5700 if (get_tag_floor(&k, which, floor_list, floor_num))
5703 k = 0 - floor_list[k];
5712 /* Allow player to "refuse" certain actions */
5713 if (!get_item_allow(k))
5719 /* Accept that choice */
5725 #endif /* ALLOW_REPEAT */
5733 /* Choose "default" inventory item */
5734 if (command_wrk == (USE_INVEN))
5736 k = ((i1 == i2) ? i1 : -1);
5739 /* Choose "default" equipment item */
5740 else if (command_wrk == (USE_EQUIP))
5742 k = ((e1 == e2) ? e1 : -1);
5745 /* Choose "default" floor item */
5746 else if (command_wrk == (USE_FLOOR))
5751 k = 0 - floor_list[0];
5753 /* Allow player to "refuse" certain actions */
5754 if (!get_item_allow(k))
5760 /* Accept that choice */
5768 /* Validate the item */
5769 if (!get_item_okay(k))
5775 /* Allow player to "refuse" certain actions */
5776 if (!get_item_allow(k))
5782 /* Accept that choice */
5792 if (select_the_force) {
5806 if (command_wrk != USE_FLOOR)
5808 bool not_found = FALSE;
5810 /* Look up the alphabetical tag */
5811 if (!get_tag(&k, which, command_wrk))
5816 /* Hack -- Validate the item */
5817 else if ((k < INVEN_RARM) ? !inven : !equip)
5822 /* Validate the item */
5823 else if (!get_item_okay(k))
5830 /* Accept that choice */
5836 #endif /* ALLOW_REPEAT */
5842 /* Look up the alphabetical tag */
5843 if (get_tag_floor(&k, which, floor_list, floor_num))
5846 k = 0 - floor_list[k];
5848 /* Accept that choice */
5854 #endif /* ALLOW_REPEAT */
5859 /* Extract "query" setting */
5860 ver = isupper(which);
5861 which = tolower(which);
5863 /* Convert letter to inventory index */
5864 if (command_wrk == (USE_INVEN))
5866 if (which == '(') k = i1;
5867 else if (which == ')') k = i2;
5868 else k = label_to_inven(which);
5871 /* Convert letter to equipment index */
5872 else if (command_wrk == (USE_EQUIP))
5874 if (which == '(') k = e1;
5875 else if (which == ')') k = e2;
5876 else k = label_to_equip(which);
5879 /* Convert letter to floor index */
5880 else if (command_wrk == USE_FLOOR)
5882 if (which == '(') k = 0;
5883 else if (which == ')') k = floor_num - 1;
5884 else k = islower(which) ? A2I(which) : -1;
5885 if (k < 0 || k >= floor_num || k >= 23)
5892 k = 0 - floor_list[k];
5895 /* Validate the item */
5896 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
5902 /* Verify the item */
5904 if (ver && !verify("ËÜÅö¤Ë", k))
5906 if (ver && !verify("Try", k))
5914 /* Allow player to "refuse" certain actions */
5915 if (!get_item_allow(k))
5921 /* Accept that choice */
5931 /* Fix the screen if necessary */
5937 /* Hack -- Cancel "display" */
5938 command_see = FALSE;
5942 /* Forget the item_tester_tval restriction */
5943 item_tester_tval = 0;
5945 /* Forget the item_tester_hook restriction */
5946 item_tester_hook = NULL;
5949 /* Clean up 'show choices' */
5950 /* Toggle again if needed */
5951 if (toggle) toggle_inven_equip();
5954 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5960 /* Clear the prompt line */
5963 /* Warning if needed */
5964 if (oops && str) msg_print(str);
5970 if (command_cmd) prev_tag = cur_tag;
5971 #endif /* ALLOW_REPEAT */
5973 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5981 static bool py_pickup_floor_aux(void)
5989 /* Restrict the choices */
5990 item_tester_hook = inven_carry_okay;
5994 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
5995 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
5997 q = "Get which item? ";
5998 s = "You no longer have any room for the objects on the floor.";
6001 if (get_item(&item, q, s, (USE_FLOOR)))
6003 this_o_idx = 0 - item;
6010 /* Pick up the object */
6011 py_pickup_aux(this_o_idx);
6018 * Make the player carry everything in a grid
6020 * If "pickup" is FALSE then only gold will be picked up
6022 * This is called by py_pickup() when easy_floor is TRUE.
6024 void py_pickup_floor(bool pickup)
6026 s16b this_o_idx, next_o_idx = 0;
6028 char o_name[MAX_NLEN];
6031 int floor_num = 0, floor_list[23], floor_o_idx = 0;
6035 /* Scan the pile of objects */
6036 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
6040 /* Access the object */
6041 o_ptr = &o_list[this_o_idx];
6043 /* Describe the object */
6044 object_desc(o_name, o_ptr, 0);
6046 /* Access the next object */
6047 next_o_idx = o_ptr->next_o_idx;
6049 /* Hack -- disturb */
6053 if (o_ptr->tval == TV_GOLD)
6057 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
6058 (long)o_ptr->pval, o_name);
6060 msg_format("You have found %ld gold pieces worth of %s.",
6061 (long) o_ptr->pval, o_name);
6065 /* Collect the gold */
6066 p_ptr->au += o_ptr->pval;
6069 p_ptr->redraw |= (PR_GOLD);
6072 p_ptr->window |= (PW_PLAYER);
6074 /* Delete the gold */
6075 delete_object_idx(this_o_idx);
6077 /* Check the next object */
6080 else if (o_ptr->marked & OM_NOMSG)
6082 /* If 0 or 1 non-NOMSG items are in the pile, the NOMSG ones are
6083 * ignored. Otherwise, they are included in the prompt. */
6084 o_ptr->marked &= ~(OM_NOMSG);
6088 /* Count non-gold objects that can be picked up. */
6089 if (inven_carry_okay(o_ptr))
6094 /* Remember this object index */
6096 floor_list[floor_num] = this_o_idx;
6098 /* Count non-gold objects */
6101 /* Remember this index */
6102 floor_o_idx = this_o_idx;
6105 /* There are no non-gold objects */
6109 /* Mention the number of objects */
6115 /* Access the object */
6116 o_ptr = &o_list[floor_o_idx];
6118 #ifdef ALLOW_EASY_SENSE
6120 /* Option: Make object sensing easy */
6123 /* Sense the object */
6124 (void) sense_object(o_ptr);
6127 #endif /* ALLOW_EASY_SENSE */
6129 /* Describe the object */
6130 object_desc(o_name, o_ptr, 0);
6134 msg_format("%s¤¬¤¢¤ë¡£", o_name);
6136 msg_format("You see %s.", o_name);
6141 /* Multiple objects */
6146 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
6148 msg_format("You see a pile of %d items.", floor_num);
6157 /* The player has no room for anything on the floor. */
6163 /* Access the object */
6164 o_ptr = &o_list[floor_o_idx];
6166 #ifdef ALLOW_EASY_SENSE
6168 /* Option: Make object sensing easy */
6171 /* Sense the object */
6172 (void) sense_object(o_ptr);
6175 #endif /* ALLOW_EASY_SENSE */
6177 /* Describe the object */
6178 object_desc(o_name, o_ptr, 0);
6182 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
6184 msg_format("You have no room for %s.", o_name);
6189 /* Multiple objects */
6194 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
6196 msg_print("You have no room for any of the objects on the floor.");
6208 /* Hack -- query every object */
6209 if (carry_query_flag)
6211 char out_val[MAX_NLEN+20];
6213 /* Access the object */
6214 o_ptr = &o_list[floor_o_idx];
6216 #ifdef ALLOW_EASY_SENSE
6218 /* Option: Make object sensing easy */
6221 /* Sense the object */
6222 (void) sense_object(o_ptr);
6225 #endif /* ALLOW_EASY_SENSE */
6227 /* Describe the object */
6228 object_desc(o_name, o_ptr, 0);
6230 /* Build a prompt */
6232 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
6234 (void) sprintf(out_val, "Pick up %s? ", o_name);
6238 /* Ask the user to confirm */
6239 if (!get_check(out_val))
6246 /* Access the object */
6247 o_ptr = &o_list[floor_o_idx];
6249 #ifdef ALLOW_EASY_SENSE
6251 /* Option: Make object sensing easy */
6254 /* Sense the object */
6255 (void) sense_object(o_ptr);
6258 #endif /* ALLOW_EASY_SENSE */
6260 /* Pick up the object */
6261 py_pickup_aux(floor_o_idx);
6264 /* Allow the user to choose an object */
6267 while (can_pickup--)
6269 if (!py_pickup_floor_aux()) break;
6274 #endif /* ALLOW_EASY_FLOOR */