4 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
6 * This software may be copied and distributed for educational, research,
7 * and not for profit purposes provided that this copyright and statement
8 * are included in all such copies. Other copyrights may also apply.
11 /* Purpose: Object code, part 1 */
15 #if defined(MACINTOSH) || defined(MACH_O_CARBON)
21 * Reset the "visual" lists
23 * This involves resetting various things to their "default" state.
25 * If the "prefs" flag is TRUE, then we will also load the appropriate
26 * "user pref file" based on the current setting of the "use_graphics"
27 * flag. This is useful for switching "graphics" on/off.
29 * The features, objects, and monsters, should all be encoded in the
30 * relevant "font.pref" and/or "graf.prf" files. XXX XXX XXX
32 * The "prefs" parameter is no longer meaningful. XXX XXX XXX
34 void reset_visuals(void)
38 /* Extract some info about terrain features */
39 for (i = 0; i < max_f_idx; i++)
41 feature_type *f_ptr = &f_info[i];
43 /* Assume we will use the underlying values */
44 for (j = 0; j < F_LIT_MAX; j++)
46 f_ptr->x_attr[j] = f_ptr->d_attr[j];
47 f_ptr->x_char[j] = f_ptr->d_char[j];
51 /* Extract default attr/char code for objects */
52 for (i = 0; i < max_k_idx; i++)
54 object_kind *k_ptr = &k_info[i];
56 /* Default attr/char */
57 k_ptr->x_attr = k_ptr->d_attr;
58 k_ptr->x_char = k_ptr->d_char;
61 /* Extract default attr/char code for monsters */
62 for (i = 0; i < max_r_idx; i++)
64 monster_race *r_ptr = &r_info[i];
66 /* Default attr/char */
67 r_ptr->x_attr = r_ptr->d_attr;
68 r_ptr->x_char = r_ptr->d_char;
75 /* Process "graf.prf" */
76 process_pref_file("graf.prf");
78 /* Access the "character" pref file */
79 sprintf(buf, "graf-%s.prf", player_base);
81 /* Process "graf-<playername>.prf" */
82 process_pref_file(buf);
90 /* Process "font.prf" */
91 process_pref_file("font.prf");
93 /* Access the "character" pref file */
94 sprintf(buf, "font-%s.prf", player_base);
96 /* Process "font-<playername>.prf" */
97 process_pref_file(buf);
103 * Obtain the "flags" for an item
105 void object_flags(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
107 object_kind *k_ptr = &k_info[o_ptr->k_idx];
111 for (i = 0; i < TR_FLAG_SIZE; i++)
112 flgs[i] = k_ptr->flags[i];
115 if (object_is_fixed_artifact(o_ptr))
117 artifact_type *a_ptr = &a_info[o_ptr->name1];
119 for (i = 0; i < TR_FLAG_SIZE; i++)
120 flgs[i] = a_ptr->flags[i];
124 if (object_is_ego(o_ptr))
126 ego_item_type *e_ptr = &e_info[o_ptr->name2];
128 for (i = 0; i < TR_FLAG_SIZE; i++)
129 flgs[i] |= e_ptr->flags[i];
131 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
133 remove_flag(flgs, TR_SH_FIRE);
135 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
137 remove_flag(flgs, TR_INFRA);
139 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
141 remove_flag(flgs, TR_RES_BLIND);
142 remove_flag(flgs, TR_SEE_INVIS);
146 /* Random artifact ! */
147 for (i = 0; i < TR_FLAG_SIZE; i++)
148 flgs[i] |= o_ptr->art_flags[i];
150 if (object_is_smith(o_ptr))
152 int add = o_ptr->xtra3 - 1;
154 if (add < TR_FLAG_MAX)
158 else if (add == ESSENCE_TMP_RES_ACID)
160 add_flag(flgs, TR_RES_ACID);
161 add_flag(flgs, TR_ACTIVATE);
163 else if (add == ESSENCE_TMP_RES_ELEC)
165 add_flag(flgs, TR_RES_ELEC);
166 add_flag(flgs, TR_ACTIVATE);
168 else if (add == ESSENCE_TMP_RES_FIRE)
170 add_flag(flgs, TR_RES_FIRE);
171 add_flag(flgs, TR_ACTIVATE);
173 else if (add == ESSENCE_TMP_RES_COLD)
175 add_flag(flgs, TR_RES_COLD);
176 add_flag(flgs, TR_ACTIVATE);
178 else if (add == ESSENCE_SH_FIRE)
180 add_flag(flgs, TR_RES_FIRE);
181 add_flag(flgs, TR_SH_FIRE);
183 else if (add == ESSENCE_SH_ELEC)
185 add_flag(flgs, TR_RES_ELEC);
186 add_flag(flgs, TR_SH_ELEC);
188 else if (add == ESSENCE_SH_COLD)
190 add_flag(flgs, TR_RES_COLD);
191 add_flag(flgs, TR_SH_COLD);
193 else if (add == ESSENCE_RESISTANCE)
195 add_flag(flgs, TR_RES_ACID);
196 add_flag(flgs, TR_RES_ELEC);
197 add_flag(flgs, TR_RES_FIRE);
198 add_flag(flgs, TR_RES_COLD);
200 else if (add == TR_IMPACT)
202 add_flag(flgs, TR_ACTIVATE);
210 * Obtain the "flags" for an item which are known to the player
212 void object_flags_known(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
217 object_kind *k_ptr = &k_info[o_ptr->k_idx];
220 for (i = 0; i < TR_FLAG_SIZE; i++)
223 if (!object_is_aware(o_ptr)) return;
226 for (i = 0; i < TR_FLAG_SIZE; i++)
227 flgs[i] = k_ptr->flags[i];
229 /* Must be identified */
230 if (!object_is_known(o_ptr)) return;
232 /* Ego-item (known basic flags) */
233 if (object_is_ego(o_ptr))
235 ego_item_type *e_ptr = &e_info[o_ptr->name2];
237 for (i = 0; i < TR_FLAG_SIZE; i++)
238 flgs[i] |= e_ptr->flags[i];
240 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
242 remove_flag(flgs, TR_SH_FIRE);
244 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
246 remove_flag(flgs, TR_INFRA);
248 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
250 remove_flag(flgs, TR_RES_BLIND);
251 remove_flag(flgs, TR_SEE_INVIS);
256 #ifdef SPOIL_ARTIFACTS
257 /* Full knowledge for some artifacts */
258 if (object_is_artifact(o_ptr)) spoil = TRUE;
259 #endif /* SPOIL_ARTIFACTS */
261 #ifdef SPOIL_EGO_ITEMS
262 /* Full knowledge for some ego-items */
263 if (object_is_ego(o_ptr)) spoil = TRUE;
264 #endif /* SPOIL_EGO_ITEMS */
266 /* Need full knowledge or spoilers */
267 if (spoil || (o_ptr->ident & IDENT_MENTAL))
270 if (object_is_fixed_artifact(o_ptr))
272 artifact_type *a_ptr = &a_info[o_ptr->name1];
274 for (i = 0; i < TR_FLAG_SIZE; i++)
275 flgs[i] = a_ptr->flags[i];
278 /* Random artifact ! */
279 for (i = 0; i < TR_FLAG_SIZE; i++)
280 flgs[i] |= o_ptr->art_flags[i];
283 if (object_is_smith(o_ptr))
285 int add = o_ptr->xtra3 - 1;
287 if (add < TR_FLAG_MAX)
291 else if (add == ESSENCE_TMP_RES_ACID)
293 add_flag(flgs, TR_RES_ACID);
295 else if (add == ESSENCE_TMP_RES_ELEC)
297 add_flag(flgs, TR_RES_ELEC);
299 else if (add == ESSENCE_TMP_RES_FIRE)
301 add_flag(flgs, TR_RES_FIRE);
303 else if (add == ESSENCE_TMP_RES_COLD)
305 add_flag(flgs, TR_RES_COLD);
307 else if (add == ESSENCE_SH_FIRE)
309 add_flag(flgs, TR_RES_FIRE);
310 add_flag(flgs, TR_SH_FIRE);
312 else if (add == ESSENCE_SH_ELEC)
314 add_flag(flgs, TR_RES_ELEC);
315 add_flag(flgs, TR_SH_ELEC);
317 else if (add == ESSENCE_SH_COLD)
319 add_flag(flgs, TR_RES_COLD);
320 add_flag(flgs, TR_SH_COLD);
322 else if (add == ESSENCE_RESISTANCE)
324 add_flag(flgs, TR_RES_ACID);
325 add_flag(flgs, TR_RES_ELEC);
326 add_flag(flgs, TR_RES_FIRE);
327 add_flag(flgs, TR_RES_COLD);
334 * Determine the "Activation" (if any) for an artifact
335 * Return a string, or NULL for "no activation"
337 cptr item_activation(object_type *o_ptr)
339 u32b flgs[TR_FLAG_SIZE];
341 /* Extract the flags */
342 object_flags(o_ptr, flgs);
344 /* Require activation ability */
346 if (!(have_flag(flgs, TR_ACTIVATE))) return ("¤Ê¤·");
348 if (!(have_flag(flgs, TR_ACTIVATE))) return ("nothing");
352 * We need to deduce somehow that it is a random artifact -- one
353 * problem: It could be a random artifact which has NOT YET received
354 * a name. Thus we eliminate other possibilities instead of checking
358 if (object_is_fixed_artifact(o_ptr))
360 if (!o_ptr->xtra2) o_ptr->xtra2 = a_info[o_ptr->name1].act_idx;
363 if ((object_is_artifact(o_ptr) || object_is_ego(o_ptr)) &&
366 switch (o_ptr->xtra2)
369 /* General activation */
372 return "ÂÀÍÛ¸÷Àþ : 10 ¥¿¡¼¥óËè";
374 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
376 return "°½±À (12) : 4+d4 ¥¿¡¼¥óËè";
378 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
380 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
382 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
384 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
386 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (48) : 6+d6 ¥¿¡¼¥óËè";
388 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (72) : 9+d9 ¥¿¡¼¥óËè";
390 return "À¸Ì¿Îϵۼý (90) : 70 ¥¿¡¼¥óËè";
392 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 12+d12 ¥¿¡¼¥óËè";
394 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 12+d12 ¥¿¡¼¥óËè";
396 return "À¸Ì¿Îϵۼý(120) : 400 ¥¿¡¼¥óËè";
398 return "µÛ·ì¥É¥ì¥¤¥ó (3*50) : 400 ¥¿¡¼¥óËè";
400 return "Ìð (150) : 90+d90 ¥¿¡¼¥óËè";
402 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (300) : 225+d225 ¥¿¡¼¥óËè";
404 return "µðÂ祢¥¤¥¹¡¦¥Ü¡¼¥ë (400) : 325+d325 ¥¿¡¼¥óËè";
406 return "µðÂ祵¥ó¥À¡¼¡¦¥Ü¡¼¥ë (500) : 425+d425 ¥¿¡¼¥óËè";
408 return "¥«¥Þ¥¤¥¿¥Á : 250 ¥¿¡¼¥óËè";
410 return "µÛ·ì¥É¥ì¥¤¥ó (3*100) : 400 ¥¿¡¼¥óËè";
412 return "º®ÆÙ¾¤Íè : 350 ¥¿¡¼¥óËè"; /*nuke me*/
414 return "¥í¥±¥Ã¥È (120+level) : 400 ¥¿¡¼¥óËè";
416 return "¼Ù°Â໶ (x5) : 100+d100 ¥¿¡¼¥óËè";
418 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300) : 500 ¥¿¡¼¥óËè";
420 return "Á±ÎÉÂ໶ (x5) : 100+d100 ¥¿¡¼¥óËè";
422 return "ËâË¡¤ÎÌð(150) : 90+d90 ¥¿¡¼¥óËè";
424 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(120) : 15 ¥¿¡¼¥óËè";
426 return "¥¦¥©¡¼¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 250 ¥¿¡¼¥óËè";
428 return "µðÂ祹¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 200+d200 ¥¿¡¼¥óËè";
430 return "°Å¹õ¤ÎÍò(250) : 150+d150 ¥¿¡¼¥óËè";
432 return "ËâÎϤÎÍò(400) : 250+d250¥¿¡¼¥óËè";
434 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
436 return "¼þ°Ï¤Î¥â¥ó¥¹¥¿¡¼¤ò̲¤é¤»¤ë : 55 ¥¿¡¼¥óËè";
438 return "ÃÏ¿Ì (Ⱦ·Â 10) : 50 ¥¿¡¼¥óËè";
440 return "¶²¹² : 3 * (level+10) ¥¿¡¼¥óËè";
442 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
443 case ACT_BANISH_EVIL:
444 return "¼Ù°¾ÃÌÇ : 250+d250 ¥¿¡¼¥óËè";
446 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
448 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
449 case ACT_CHARM_ANIMAL:
450 return "ưʪ̥λ : 200 ¥¿¡¼¥óËè";
451 case ACT_CHARM_UNDEAD:
452 return "¥¢¥ó¥Ç¥Ã¥É½¾Â° : 333 ¥¿¡¼¥óËè";
453 case ACT_CHARM_OTHER:
454 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 400 ¥¿¡¼¥óËè";
455 case ACT_CHARM_ANIMALS:
456 return "ưʪͧÏ : 500 ¥¿¡¼¥óËè";
457 case ACT_CHARM_OTHERS:
458 return "¼þÊÕ̥λ : 750 ¥¿¡¼¥óËè";
459 case ACT_SUMMON_ANIMAL:
460 return "ưʪ¾¤´ : 200+d300 ¥¿¡¼¥óËè";
461 case ACT_SUMMON_PHANTOM:
462 return "¸¸Î´ : 200+d200 ¥¿¡¼¥óËè";
463 case ACT_SUMMON_ELEMENTAL:
464 return "¥¨¥ì¥á¥ó¥¿¥ë¾¤´ : 750 ¥¿¡¼¥óËè";
465 case ACT_SUMMON_DEMON:
466 return "°Ë⾤´ : 666+d333 ¥¿¡¼¥óËè";
467 case ACT_SUMMON_UNDEAD:
468 return "¥¢¥ó¥Ç¥Ã¥É¾¤´ : 666+d333 ¥¿¡¼¥óËè";
470 return "¶²Éݽüµî/ÂÎÎϲóÉü(30) : 10 ¥¿¡¼¥óËè";
472 return "½ý²óÉü(4d8) : 3+d3 ¥¿¡¼¥óËè";
473 case ACT_CURE_POISON:
474 return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
476 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
478 return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃÍÉü³è : 750 ¥¿¡¼¥óËè";
480 return "ÂÎÎϲóÉü(700) : 250 ¥¿¡¼¥óËè";
482 return "ÂÎÎϲóÉü(1000) : 888 ¥¿¡¼¥óËè";
484 return "¥Æ¥ì¥Ñ¥·¡¼ (´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
486 return "»Îµ¤¹âÍȤȽËÊ¡ (´ü´Ö 50+d50) : 100+d100 ¥¿¡¼¥óËè";
488 return "Âмٰ·ë³¦ (´ü´Ö level*3 + d25) : 200+d200 ¥¿¡¼¥óËè";
490 return "Á´ÂÑÀ (´ü´Ö 20+d20) : 111 ¥¿¡¼¥óËè";
492 return "²Ã® (´ü´Ö 20+d20) : 250 ¥¿¡¼¥óËè";
494 return "²Ã® (´ü´Ö 75+d75) : 200+d200 ¥¿¡¼¥óËè";
496 return "Í©Âβ½ (´ü´Ö level/2 + d(level/2)) : 1000 ¥¿¡¼¥óËè";
498 return "̵Ũ²½ (´ü´Ö 8+d8) : 1000 ¥¿¡¼¥óËè";
500 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
502 return "ËâË¡¤ÎÃϿޤȸ÷ : 50+d50 ¥¿¡¼¥óËè";
504 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
505 case ACT_DETECT_XTRA:
506 return "Á´´¶ÃΡ¢Ãµº÷¡¢*´ÕÄê* : 100 ¥¿¡¼¥óËè";
508 return "*´ÕÄê* : 75 ¥¿¡¼¥óËè";
510 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
512 return "Çúȯ¤Î¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
514 return "¼é¤ê¤Î¥ë¡¼¥ó : 400 ¥¿¡¼¥óËè";
516 return "¶õÊ¢½¼Â : 200 ¥¿¡¼¥óËè";
518 return "¥É¥¢Ç˲õ : 10 ¥¿¡¼¥óËè";
520 return "´äÀÐÍϲò : 3 ¥¿¡¼¥óËè";
522 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
524 return "Ï£¶â½Ñ : 500 ¥¿¡¼¥óËè";
526 return "¼¡¸µ¤ÎÈâ : 100 ¥¿¡¼¥óËè";
528 return "¥Æ¥ì¥Ý¡¼¥È (range 100) : 25 ¥¿¡¼¥óËè";
530 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
532 /* Unique activation */
534 return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô : 20+d20 ¥¿¡¼¥óËè";
536 return "¿®¤¸Æñ¤¤¤³¤È : 450+d450 ¥¿¡¼¥óËè";
541 /* General activation */
544 return "beam of sunlight every 10 turns";
546 return "magic missile (2d6) every 2 turns";
548 return "stinking cloud (12) every 4+d4 turns";
550 return "lightning bolt (4d8) every 5+d5 turns";
552 return "acid bolt (5d8) every 6+d6 turns";
554 return "frost bolt (6d8) every 7+d7 turns";
556 return "fire bolt (9d8) every 8+d8 turns";
558 return "ball of cold (48) every 6+d6 turns";
560 return "ball of fire (72) every 9+d9 turns";
562 return "drain life (90) every 70 turns";
564 return "ball of cold (100) every 12+d12 turns";
566 return "ball of lightning (100) every 12+d12 turns";
568 return "drain life (120) every 400 turns";
570 return "vampiric drain (3*50) every 400 turns";
572 return "arrows (150) every 90+d90 turns";
574 return "fire ball (300) every 225+d225 turns";
576 return "ball of cold (400) every 325+d325 turns";
578 return "ball of lightning (500) every 425+d425 turns";
580 return "whirlwind attack every 250 turns";
582 return "vampiric drain (3*100) every 400 turns";
584 return "call chaos every 350 turns";
586 return "launch rocket (120+level) every 400 turns";
588 return "dispel evil (x5) every 100+d100 turns";
590 return "elemental breath (300) every 500 turns";
592 return "dispel good (x5) every 100+d100 turns";
594 return "a magical arrow (150) every 90+d90 turns";
596 return "large fire ball (120) every 15 turns";
598 return "water ball (200) every 250 turns";
600 return "large star ball (200) every 200+d200 turns";
602 return "darkness storm (250) every 150+d150 turns";
604 return "a mana storm every 250+d250 turns";
606 return "confuse monster every 15 turns";
608 return "sleep nearby monsters every 55 turns";
610 return "earthquake (rad 10) every 50 turns";
612 return "terror every 3 * (level+10) turns";
614 return "teleport away every 200 turns";
615 case ACT_BANISH_EVIL:
616 return "banish evil every 250+d250 turns";
618 return "genocide every 500 turns";
620 return "mass genocide every 1000 turns";
621 case ACT_CHARM_ANIMAL:
622 return "charm animal every 200 turns";
623 case ACT_CHARM_UNDEAD:
624 return "enslave undead every 333 turns";
625 case ACT_CHARM_OTHER:
626 return "charm monster every 400 turns";
627 case ACT_CHARM_ANIMALS:
628 return "animal friendship every 500 turns";
629 case ACT_CHARM_OTHERS:
630 return "mass charm every 750 turns";
631 case ACT_SUMMON_ANIMAL:
632 return "summon animal every 200+d300 turns";
633 case ACT_SUMMON_PHANTOM:
634 return "summon phantasmal servant every 200+d200 turns";
635 case ACT_SUMMON_ELEMENTAL:
636 return "summon elemental every 750 turns";
637 case ACT_SUMMON_DEMON:
638 return "summon demon every 666+d333 turns";
639 case ACT_SUMMON_UNDEAD:
640 return "summon undead every 666+d333 turns";
642 return "remove fear and heal 30 hp every 10 turns";
644 return "heal 4d8 and wounds every 3+d3 turns";
645 case ACT_CURE_POISON:
646 return "remove fear and cure poison every 5 turns";
648 return "restore life levels every 450 turns";
650 return "restore stats and life levels every 750 turns";
652 return "heal 700 hit points every 250 turns";
654 return "heal 1000 hit points every 888 turns";
656 return "telepathy (dur 25+d30) every 200 turns";
658 return "heroism and blessed (dur 50+d50) every 100+d100 turns";
660 return "protect evil (dur level*3 + d25) every 200+d200 turns";
662 return "resist elements (dur 20+d20) every 111 turns";
664 return "speed (dur 20+d20) every 100+d100 turns";
666 return "speed (dur 75+d75) every 100+d100 turns";
668 return "wraith form (dur level/2 + d(level/2)) every 1000 turns";
670 return "invulnerability (dur 8+d8) every 1000 turns";
672 return "light area (dam 2d15) every 10+d10 turns";
674 return "light (dam 2d15) & map area every 50+d50 turns";
676 return "detection every 55+d55 turns";
677 case ACT_DETECT_XTRA:
678 return "detection, probing and identify true every 100 turns";
680 return "identify true every 75 turns";
682 return "identify spell every 10 turns";
684 return "explosive rune every 200 turns";
686 return "rune of protection every 400 turns";
688 return "satisfy hunger every 200 turns";
690 return "destroy doors every 10 turns";
692 return "stone to mud every 3 turns";
694 return "recharging every 70 turns";
696 return "alchemy every 500 turns";
698 return "dimension door every 100 turns";
700 return "teleport (range 100) every 25 turns";
702 return "word of recall every 200 turns";
704 /* Unique activation */
706 return "clairvoyance and recall, draining you every 20+d20 turns";
708 return "bizarre things every 450+d450 turns";
711 return "something undefined";
716 /* Some artifacts can be activated */
717 switch (o_ptr->name1)
722 return "¶Ç¤Î»ÕÃľ¤´ : 500+d500 ¥¿¡¼¥óËè";
724 return "summon the Legion of the Dawn every 500+d500 turns";
731 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
733 return "fire branding of bolts every 999 turns";
739 return "¥Õ¥¡¥¤¥¢¡ª : 15 ¥¿¡¼¥óËè";
741 return "fire! every 15 turns";
748 return "ƨÁö : 35 ¥¿¡¼¥óËè";
750 return "a getaway every 35 turns";
756 return "¥¹¥¿¡¼¡¦¥Ü¡¼¥ë¡¦¥À¥¹¥È(150) : 1000 ¥¿¡¼¥óËè";
758 return "star balls (150) every 1000 turns";
761 case ART_BLADETURNER:
764 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300), »Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢ÂÑÀ";
766 return "breathe elements (300), hero, bless, and resistance";
772 return "Ã⩹¶·â(100) : 100+d100 ¥¿¡¼¥óËè";
774 return "a strangling attack (100) every 100+d100 turns";
780 return "¤³¤Î³¬¤Ë¤¤¤ë¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òɽ¼¨ : 200¥¿¡¼¥óËè";
782 return "list of the uniques on the level every 200 turns";
788 return "´í¸±¤òȼ¤¦´ÕÄê : ¤¤¤Ä¤Ç¤â";
790 return "perilous identify every turn";
796 return "³²Ãî¤Î¶î½ü : 55+d55¥¿¡¼¥óËè";
798 return "dispel small life every 55+d55 turns";
804 return "¥â¥ó¥¹¥¿¡¼¶²¹² : 40+d40¥¿¡¼¥óËè";
806 return "frighten monsters every 40+d40 turns";
812 return "»Îµ¤¹âÍÈ, ¥¹¥Ô¡¼¥É(50+d50¥¿¡¼¥ó) : 100+d200 ¥¿¡¼¥óËè";
814 return "hero and +10 to speed (50) every 100+200d turns";
820 return "âÁ¤·¤¤¸÷ : 250 ¥¿¡¼¥óËè";
822 return "blinding light every 250 turns";
828 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
830 return "recharge item every 200 turns";
836 return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë";
838 return "increase STR (destroyed 50%)";
844 return "ʪÂΤò°ú¤´ó¤»¤ë(½ÅÎÌ25kg¤Þ¤Ç) : 25+d25¥¿¡¼¥óËè";
846 return "a telekinesis (500 lb) every 25+d25 turns";
852 return "Îã¤Î¥¢¥ì : 150+d150 ¥¿¡¼¥óËè";
854 return "reveal your identity every 150+d150 turns";
860 return "Çï»ÒÌÚ¤òÂǤÁ¤Ê¤é¤¹ : ¤¤¤Ä¤Ç¤â";
862 return "beat wooden clappers every turn";
869 return "»Îµ¤¹âÍÈ : 30+d30¥¿¡¼¥óËè";
871 return "heroism every 30+d30 turns";
877 return "Ìþ¤· : 100¥¿¡¼¥óËè";
879 return "curing every 100 turns";
885 return "°ÀÊѹ¹ : 3333 ¥¿¡¼¥óËè";
887 return "change zokusei every 3333 turns";
894 return "»Í¸ÔƧ¤ß : 100+d100¥¿¡¼¥óËè";
896 return "shiko every 100+d100 turns";
903 return "Î䵤¤ÎÂÑÀ : 40+d40¥¿¡¼¥óËè";
905 return "resist cold every 40+d40 turns";
912 return "Âý¤ÎÂç·²¾¤´ : 300+d150¥¿¡¼¥óËè";
914 return "summon octopus every 300+d150 turns";
917 case ART_SACRED_KNIGHTS:
920 return "*²ò¼ö*¤ÈÄ´ºº: ¤¤¤Ä¤Ç¤â";
922 return "dispel curse and probing every turn";
929 return "ËâÎÏÉü³è: 777 ¥¿¡¼¥óËè";
931 return "restore mana every 777 turns";
938 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_TSURIZAO))
941 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
943 return "fishing : every time";
947 if (object_is_smith(o_ptr))
949 switch (o_ptr->xtra3 - 1)
951 case ESSENCE_TMP_RES_ACID:
953 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
955 return "resist acid every 50+d50 turns";
958 case ESSENCE_TMP_RES_ELEC:
960 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
962 return "resist elec every 50+d50 turns";
965 case ESSENCE_TMP_RES_FIRE:
967 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
969 return "resist fire every 50+d50 turns";
972 case ESSENCE_TMP_RES_COLD:
974 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
976 return "resist cold every 50+d50 turns";
981 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
983 return "earthquake every 100+d100 turns";
988 if (o_ptr->name2 == EGO_TRUMP)
991 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
993 return "teleport every 50+d50 turns";
998 if (o_ptr->name2 == EGO_LITE_ILLUMINATION)
1001 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
1003 return "illumination every 10+d10 turns";
1007 else if (o_ptr->name2 == EGO_EARTHQUAKES)
1010 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
1012 return "earthquake every 100+d100 turns";
1017 else if (o_ptr->name2 == EGO_JUMP)
1020 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1022 return "blink every 10+d10 turns";
1027 if (o_ptr->tval == TV_RING)
1029 if (object_is_ego(o_ptr))
1031 switch (o_ptr->name2)
1035 return "»Îµ¤¹âÍÈ : 100+d100¥¿¡¼¥óËè";
1037 return "heroism every 100+d100 turns";
1039 case EGO_RING_MAGIC_MIS:
1041 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1043 return "magic missile (2d6) every 2 turns";
1045 case EGO_RING_FIRE_BOLT:
1047 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1049 return "fire bolt (9d8) every 8+d8 turns";
1051 case EGO_RING_COLD_BOLT:
1053 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1055 return "frost bolt (6d8) every 7+d7 turns";
1057 case EGO_RING_ELEC_BOLT:
1059 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1061 return "lightning bolt (4d8) every 5+d5 turns";
1063 case EGO_RING_ACID_BOLT:
1065 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
1067 return "acid bolt (5d8) every 6+d6 turns";
1069 case EGO_RING_MANA_BOLT:
1071 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
1073 return "a mana bolt (120) every 120+d120 turns";
1075 case EGO_RING_FIRE_BALL:
1077 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1079 return "fire ball (100) every 80+d80 turns";
1081 case EGO_RING_COLD_BALL:
1083 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1085 return "cold ball (100) every 80+d80 turns";
1087 case EGO_RING_ELEC_BALL:
1089 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1091 return "elec ball (100) every 80+d80 turns";
1093 case EGO_RING_ACID_BALL:
1095 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1097 return "acid ball (100) every 80+d80 turns";
1099 case EGO_RING_MANA_BALL:
1101 return "ËâÎϤÎÍò (250) : 300 ¥¿¡¼¥óËè";
1103 return "mana storm (250) every 300 turns";
1105 case EGO_RING_DRAGON_F:
1106 if (o_ptr->sval == SV_RING_FLAMES)
1108 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) ¤È²Ð¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
1110 return "breath of fire (200) and resist fire every 200 turns";
1114 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
1116 return "fire breath (200) every 250 turns";
1118 case EGO_RING_DRAGON_C:
1119 if (o_ptr->sval == SV_RING_ICE)
1121 return "Î䵤¤Î¥Ö¥ì¥¹ (200) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
1123 return "breath of cold (200) and resist cold every 200 turns";
1127 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
1129 return "cold breath (200) every 250 turns";
1131 case EGO_RING_M_DETECT:
1133 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃÎ : 150 ¥¿¡¼¥óËè";
1135 return "detect all monsters every 150 turns";
1137 case EGO_RING_D_SPEED:
1139 return "¥¹¥Ô¡¼¥É(15+d30¥¿¡¼¥ó) : 100 ¥¿¡¼¥óËè";
1141 return "haste self (15+d30 turns) every 100 turns";
1143 case EGO_RING_BERSERKER:
1145 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
1147 return "berserk (25+d25 turns) every 75+d75 turns";
1149 case EGO_RING_TELE_AWAY:
1151 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
1153 return "teleport away every 150 turns";
1157 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ : 777 ¥¿¡¼¥óËè";
1159 return "hero, bless, and ultimate resistance every 777 turns";
1163 switch (o_ptr->sval)
1165 case SV_RING_FLAMES:
1167 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) ¤È²Ð¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1169 return "ball of fire (100) and resist fire every 50+d50 turns";
1174 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1176 return "ball of cold (100) and resist cold every 50+d50 turns";
1181 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) ¤È»À¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1183 return "ball of acid (100) and resist acid every 50+d50 turns";
1188 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) ¤ÈÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1190 return "ball of elec (100) and resist elec every 50+d50 turns";
1198 if (o_ptr->tval == TV_AMULET)
1200 if (object_is_ego(o_ptr))
1202 switch (o_ptr->name2)
1206 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
1208 return "identify every 10 turns";
1212 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
1214 return "charm monster every 200 turns";
1218 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1220 return "blink every 10+d10 turns";
1222 case EGO_AMU_TELEPORT:
1224 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
1226 return "teleport every 50+d50 turns";
1228 case EGO_AMU_D_DOOR:
1230 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
1232 return "dimension door every 200 turns";
1234 case EGO_AMU_RES_FIRE_:
1236 return "²Ð±ê¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1238 return "resist fire every 50+d50 turns";
1240 case EGO_AMU_RES_COLD_:
1242 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1244 return "resist cold every 50+d50 turns";
1246 case EGO_AMU_RES_ELEC_:
1248 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1250 return "resist elec every 50+d50 turns";
1252 case EGO_AMU_RES_ACID_:
1254 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1256 return "resist acid every 50+d50 turns";
1258 case EGO_AMU_DETECTION:
1260 return "Á´´¶ÃÎ : 55+d55¥¿¡¼¥óËè";
1262 return "detect all floor every 55+d55 turns";
1268 if (o_ptr->tval == TV_WHISTLE)
1271 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
1273 return "call pet every 100+d100 turns";
1277 if (o_ptr->tval == TV_CAPTURE)
1280 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
1282 return "captures or releases a monster.";
1286 /* Require dragon scale mail */
1288 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
1290 if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
1294 /* Branch on the sub-type */
1295 switch (o_ptr->sval)
1297 case SV_DRAGON_BLUE:
1300 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
1302 return "breathe lightning (100) every 150+d150 turns";
1306 case SV_DRAGON_WHITE:
1309 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
1311 return "breathe frost (110) every 150+d150 turns";
1315 case SV_DRAGON_BLACK:
1318 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
1320 return "breathe acid (130) every 150+d150 turns";
1324 case SV_DRAGON_GREEN:
1327 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
1329 return "breathe poison gas (150) every 180+d180 turns";
1336 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
1338 return "breathe fire (200) every 200+d200 turns";
1342 case SV_DRAGON_MULTIHUED:
1345 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
1347 return "breathe multi-hued (250) every 200+d200 turns";
1351 case SV_DRAGON_BRONZE:
1354 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
1356 return "breathe confusion (120) every 180+d180 turns";
1360 case SV_DRAGON_GOLD:
1363 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
1365 return "breathe sound (130) every 180+d180 turns";
1369 case SV_DRAGON_CHAOS:
1372 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
1374 return "breathe chaos/disenchant (220) every 200+d200 turns";
1381 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
1383 return "breathe sound/shards (230) every 200+d200 turns";
1387 case SV_DRAGON_BALANCE:
1390 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
1392 return "breathe balance (250) every 200+d200 turns";
1396 case SV_DRAGON_SHINING:
1399 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
1401 return "breathe light/darkness (200) every 200+d200 turns";
1405 case SV_DRAGON_POWER:
1408 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
1410 return "breathe the elements (300) every 200+d200 turns";
1420 return "breathe air";
1427 * Describe a "fully identified" item
1429 bool screen_object(object_type *o_ptr, u32b mode)
1433 u32b flgs[TR_FLAG_SIZE];
1437 char o_name[MAX_NLEN];
1440 int trivial_info = 0;
1442 /* Extract the flags */
1443 object_flags(o_ptr, flgs);
1445 /* Extract the description */
1447 roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
1448 (k_text + k_info[o_ptr->k_idx].text),
1449 77 - 15, temp, sizeof(temp));
1450 for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
1451 { info[i] = &temp[j]; i++;}
1454 if (object_is_equipment(o_ptr))
1456 /* Descriptions of a basic equipment is just a flavor */
1460 /* Mega-Hack -- describe activation */
1461 if (have_flag(flgs, TR_ACTIVATE))
1464 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
1466 info[i++] = "It can be activated for...";
1469 info[i++] = item_activation(o_ptr);
1471 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
1473 info[i++] = "...if it is being worn.";
1478 /* Figurines, a hack */
1479 if (o_ptr->tval == TV_FIGURINE)
1482 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
1484 info[i++] = "It will transform into a pet when thrown.";
1489 /* Figurines, a hack */
1490 if (o_ptr->name1 == ART_STONEMASK)
1493 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
1495 info[i++] = "It makes you turn into a vampire permanently.";
1500 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
1503 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
1505 info[i++] = "It will attempt to kill a monster instantly.";
1510 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
1513 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
1515 info[i++] = "It causes you to strike yourself sometimes.";
1519 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
1521 info[i++] = "It always penetrates invulnerability barriers.";
1525 if (o_ptr->name2 == EGO_2WEAPON)
1528 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
1530 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
1535 if (have_flag(flgs, TR_EASY_SPELL))
1538 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
1540 info[i++] = "It affects your ability to cast spells.";
1544 if (o_ptr->name2 == EGO_AMU_FOOL)
1547 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
1549 info[i++] = "It interferes with casting spells.";
1553 if (o_ptr->name2 == EGO_RING_THROW)
1556 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
1558 info[i++] = "It provides great strength when you throw an item.";
1562 if (o_ptr->name2 == EGO_AMU_NAIVETY)
1565 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
1567 info[i++] = "It decreases your magic resistance.";
1571 if (o_ptr->tval == TV_STATUE)
1573 monster_race *r_ptr = &r_info[o_ptr->pval];
1575 if (o_ptr->pval == MON_BULLGATES)
1577 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
1579 info[i++] = "It is shameful.";
1581 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
1583 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
1585 info[i++] = "It is fearful.";
1589 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
1591 info[i++] = "It is cheerful.";
1595 /* Hack -- describe lite's */
1596 if (o_ptr->tval == TV_LITE)
1598 if (o_ptr->name2 == EGO_LITE_DARKNESS)
1601 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
1603 info[i++] = "It provides no light.";
1606 if (o_ptr->sval == SV_LITE_FEANOR)
1609 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-3)¡£";
1611 info[i++] = "It decreases radius of light source by 3.";
1614 else if (o_ptr->sval == SV_LITE_LANTERN)
1617 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
1619 info[i++] = "It decreases radius of light source by 2.";
1625 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
1627 info[i++] = "It decreases radius of light source by 1.";
1631 else if (object_is_fixed_artifact(o_ptr))
1634 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1636 info[i++] = "It provides light (radius 3) forever.";
1640 else if (o_ptr->name2 == EGO_LITE_SHINE)
1642 if (o_ptr->sval == SV_LITE_FEANOR)
1645 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1647 info[i++] = "It provides light (radius 3) forever.";
1651 else if (o_ptr->sval == SV_LITE_LANTERN)
1654 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1656 info[i++] = "It provides light (radius 3) when fueled.";
1663 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1665 info[i++] = "It provides light (radius 2) when fueled.";
1672 if (o_ptr->sval == SV_LITE_FEANOR)
1675 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1677 info[i++] = "It provides light (radius 2) forever.";
1681 else if (o_ptr->sval == SV_LITE_LANTERN)
1684 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1686 info[i++] = "It provides light (radius 2) when fueled.";
1693 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
1695 info[i++] = "It provides light (radius 1) when fueled.";
1700 if (o_ptr->name2 == EGO_LITE_LONG)
1703 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
1705 info[i++] = "It provides light for much longer time.";
1711 /* And then describe it fully */
1713 if (have_flag(flgs, TR_RIDING))
1715 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
1717 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
1719 info[i++] = "It is made for use while riding.";
1724 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
1726 info[i++] = "It is suitable for use while riding.";
1728 /* This information is not important enough */
1732 if (have_flag(flgs, TR_STR))
1735 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1737 info[i++] = "It affects your strength.";
1741 if (have_flag(flgs, TR_INT))
1744 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1746 info[i++] = "It affects your intelligence.";
1750 if (have_flag(flgs, TR_WIS))
1753 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1755 info[i++] = "It affects your wisdom.";
1759 if (have_flag(flgs, TR_DEX))
1762 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1764 info[i++] = "It affects your dexterity.";
1768 if (have_flag(flgs, TR_CON))
1771 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1773 info[i++] = "It affects your constitution.";
1777 if (have_flag(flgs, TR_CHR))
1780 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1782 info[i++] = "It affects your charisma.";
1787 if (have_flag(flgs, TR_MAGIC_MASTERY))
1790 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1792 info[i++] = "It affects your ability to use magic devices.";
1796 if (have_flag(flgs, TR_STEALTH))
1799 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1801 info[i++] = "It affects your stealth.";
1805 if (have_flag(flgs, TR_SEARCH))
1808 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1810 info[i++] = "It affects your searching.";
1814 if (have_flag(flgs, TR_INFRA))
1817 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1819 info[i++] = "It affects your infravision.";
1823 if (have_flag(flgs, TR_TUNNEL))
1826 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1828 info[i++] = "It affects your ability to tunnel.";
1832 if (have_flag(flgs, TR_SPEED))
1835 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1837 info[i++] = "It affects your speed.";
1841 if (have_flag(flgs, TR_BLOWS))
1844 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1846 info[i++] = "It affects your attack speed.";
1851 if (have_flag(flgs, TR_BRAND_ACID))
1854 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1856 info[i++] = "It does extra damage from acid.";
1860 if (have_flag(flgs, TR_BRAND_ELEC))
1863 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1865 info[i++] = "It does extra damage from electricity.";
1869 if (have_flag(flgs, TR_BRAND_FIRE))
1872 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1874 info[i++] = "It does extra damage from fire.";
1878 if (have_flag(flgs, TR_BRAND_COLD))
1881 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1883 info[i++] = "It does extra damage from frost.";
1888 if (have_flag(flgs, TR_BRAND_POIS))
1891 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
1893 info[i++] = "It poisons your foes.";
1898 if (have_flag(flgs, TR_CHAOTIC))
1901 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
1903 info[i++] = "It produces chaotic effects.";
1908 if (have_flag(flgs, TR_VAMPIRIC))
1911 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
1913 info[i++] = "It drains life from your foes.";
1918 if (have_flag(flgs, TR_IMPACT))
1921 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
1923 info[i++] = "It can cause earthquakes.";
1928 if (have_flag(flgs, TR_VORPAL))
1931 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1933 info[i++] = "It is very sharp and can cut your foes.";
1938 if (have_flag(flgs, TR_KILL_DRAGON))
1941 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1943 info[i++] = "It is a great bane of dragons.";
1947 else if (have_flag(flgs, TR_SLAY_DRAGON))
1950 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1952 info[i++] = "It is especially deadly against dragons.";
1957 if (have_flag(flgs, TR_KILL_ORC))
1960 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1962 info[i++] = "It is a great bane of orcs.";
1966 if (have_flag(flgs, TR_SLAY_ORC))
1969 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1971 info[i++] = "It is especially deadly against orcs.";
1976 if (have_flag(flgs, TR_KILL_TROLL))
1979 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1981 info[i++] = "It is a great bane of trolls.";
1985 if (have_flag(flgs, TR_SLAY_TROLL))
1988 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1990 info[i++] = "It is especially deadly against trolls.";
1995 if (have_flag(flgs, TR_KILL_GIANT))
1998 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2000 info[i++] = "It is a great bane of giants.";
2003 else if (have_flag(flgs, TR_SLAY_GIANT))
2006 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2008 info[i++] = "It is especially deadly against giants.";
2013 if (have_flag(flgs, TR_KILL_DEMON))
2016 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2018 info[i++] = "It is a great bane of demons.";
2022 if (have_flag(flgs, TR_SLAY_DEMON))
2025 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2027 info[i++] = "It strikes at demons with holy wrath.";
2032 if (have_flag(flgs, TR_KILL_UNDEAD))
2035 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2037 info[i++] = "It is a great bane of undead.";
2041 if (have_flag(flgs, TR_SLAY_UNDEAD))
2044 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2046 info[i++] = "It strikes at undead with holy wrath.";
2051 if (have_flag(flgs, TR_KILL_EVIL))
2054 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2056 info[i++] = "It is a great bane of evil monsters.";
2060 if (have_flag(flgs, TR_SLAY_EVIL))
2063 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
2065 info[i++] = "It fights against evil with holy fury.";
2070 if (have_flag(flgs, TR_KILL_ANIMAL))
2073 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2075 info[i++] = "It is a great bane of natural creatures.";
2079 if (have_flag(flgs, TR_SLAY_ANIMAL))
2082 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2084 info[i++] = "It is especially deadly against natural creatures.";
2089 if (have_flag(flgs, TR_KILL_HUMAN))
2092 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2094 info[i++] = "It is a great bane of humans.";
2098 if (have_flag(flgs, TR_SLAY_HUMAN))
2101 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2103 info[i++] = "It is especially deadly against humans.";
2108 if (have_flag(flgs, TR_FORCE_WEAPON))
2111 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
2113 info[i++] = "It powerfully strikes at a monster using your mana.";
2117 if (have_flag(flgs, TR_DEC_MANA))
2120 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
2122 info[i++] = "It decreases your mana consumption.";
2126 if (have_flag(flgs, TR_SUST_STR))
2129 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
2131 info[i++] = "It sustains your strength.";
2135 if (have_flag(flgs, TR_SUST_INT))
2138 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
2140 info[i++] = "It sustains your intelligence.";
2144 if (have_flag(flgs, TR_SUST_WIS))
2147 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
2149 info[i++] = "It sustains your wisdom.";
2153 if (have_flag(flgs, TR_SUST_DEX))
2156 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
2158 info[i++] = "It sustains your dexterity.";
2162 if (have_flag(flgs, TR_SUST_CON))
2165 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
2167 info[i++] = "It sustains your constitution.";
2171 if (have_flag(flgs, TR_SUST_CHR))
2174 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
2176 info[i++] = "It sustains your charisma.";
2181 if (have_flag(flgs, TR_IM_ACID))
2184 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2186 info[i++] = "It provides immunity to acid.";
2190 if (have_flag(flgs, TR_IM_ELEC))
2193 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2195 info[i++] = "It provides immunity to electricity.";
2199 if (have_flag(flgs, TR_IM_FIRE))
2202 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2204 info[i++] = "It provides immunity to fire.";
2208 if (have_flag(flgs, TR_IM_COLD))
2211 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2213 info[i++] = "It provides immunity to cold.";
2218 if (have_flag(flgs, TR_THROW))
2221 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2223 info[i++] = "It is perfectly balanced for throwing.";
2227 if (have_flag(flgs, TR_FREE_ACT))
2230 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2232 info[i++] = "It provides immunity to paralysis.";
2236 if (have_flag(flgs, TR_HOLD_LIFE))
2239 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
2241 info[i++] = "It provides resistance to life draining.";
2245 if (have_flag(flgs, TR_RES_FEAR))
2248 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
2250 info[i++] = "It makes you completely fearless.";
2254 if (have_flag(flgs, TR_RES_ACID))
2257 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2259 info[i++] = "It provides resistance to acid.";
2263 if (have_flag(flgs, TR_RES_ELEC))
2266 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2268 info[i++] = "It provides resistance to electricity.";
2272 if (have_flag(flgs, TR_RES_FIRE))
2275 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2277 info[i++] = "It provides resistance to fire.";
2281 if (have_flag(flgs, TR_RES_COLD))
2284 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2286 info[i++] = "It provides resistance to cold.";
2290 if (have_flag(flgs, TR_RES_POIS))
2293 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2295 info[i++] = "It provides resistance to poison.";
2300 if (have_flag(flgs, TR_RES_LITE))
2303 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2305 info[i++] = "It provides resistance to light.";
2309 if (have_flag(flgs, TR_RES_DARK))
2312 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2314 info[i++] = "It provides resistance to dark.";
2319 if (have_flag(flgs, TR_RES_BLIND))
2322 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2324 info[i++] = "It provides resistance to blindness.";
2328 if (have_flag(flgs, TR_RES_CONF))
2331 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2333 info[i++] = "It provides resistance to confusion.";
2337 if (have_flag(flgs, TR_RES_SOUND))
2340 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2342 info[i++] = "It provides resistance to sound.";
2346 if (have_flag(flgs, TR_RES_SHARDS))
2349 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2351 info[i++] = "It provides resistance to shards.";
2356 if (have_flag(flgs, TR_RES_NETHER))
2359 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2361 info[i++] = "It provides resistance to nether.";
2365 if (have_flag(flgs, TR_RES_NEXUS))
2368 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2370 info[i++] = "It provides resistance to nexus.";
2374 if (have_flag(flgs, TR_RES_CHAOS))
2377 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2379 info[i++] = "It provides resistance to chaos.";
2383 if (have_flag(flgs, TR_RES_DISEN))
2386 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2388 info[i++] = "It provides resistance to disenchantment.";
2393 if (have_flag(flgs, TR_LEVITATION))
2396 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2398 info[i++] = "It allows you to levitate.";
2402 if (have_flag(flgs, TR_LITE))
2404 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
2406 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
2408 info[i++] = "It decreases radius of your light source by 1.";
2412 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë(Ⱦ·Â¤Ë+1)¡£";
2414 info[i++] = "It provides permanent light. (radius +1)";
2418 if (have_flag(flgs, TR_SEE_INVIS))
2421 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2423 info[i++] = "It allows you to see invisible monsters.";
2427 if (have_flag(flgs, TR_TELEPATHY))
2430 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
2432 info[i++] = "It gives telepathic powers.";
2436 if (have_flag(flgs, TR_ESP_ANIMAL))
2439 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤ò´¶ÃΤ¹¤ë¡£";
2441 info[i++] = "It senses natural creatures.";
2445 if (have_flag(flgs, TR_ESP_UNDEAD))
2448 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ò´¶ÃΤ¹¤ë¡£";
2450 info[i++] = "It senses undead.";
2454 if (have_flag(flgs, TR_ESP_DEMON))
2457 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò´¶ÃΤ¹¤ë¡£";
2459 info[i++] = "It senses demons.";
2463 if (have_flag(flgs, TR_ESP_ORC))
2466 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ò´¶ÃΤ¹¤ë¡£";
2468 info[i++] = "It senses orcs.";
2472 if (have_flag(flgs, TR_ESP_TROLL))
2475 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ò´¶ÃΤ¹¤ë¡£";
2477 info[i++] = "It senses trolls.";
2481 if (have_flag(flgs, TR_ESP_GIANT))
2484 info[i++] = "¤½¤ì¤Ïµð¿Í¤ò´¶ÃΤ¹¤ë¡£";
2486 info[i++] = "It senses giants.";
2490 if (have_flag(flgs, TR_ESP_DRAGON))
2493 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò´¶ÃΤ¹¤ë¡£";
2495 info[i++] = "It senses dragons.";
2499 if (have_flag(flgs, TR_ESP_HUMAN))
2502 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ò´¶ÃΤ¹¤ë¡£";
2504 info[i++] = "It senses humans.";
2508 if (have_flag(flgs, TR_ESP_EVIL))
2511 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¸ºß¤ò´¶ÃΤ¹¤ë¡£";
2513 info[i++] = "It senses evil creatures.";
2517 if (have_flag(flgs, TR_ESP_GOOD))
2520 info[i++] = "¤½¤ì¤ÏÁ±Îɤʸºß¤ò´¶ÃΤ¹¤ë¡£";
2522 info[i++] = "It senses good creatures.";
2526 if (have_flag(flgs, TR_ESP_NONLIVING))
2529 info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤò´¶ÃΤ¹¤ë¡£";
2531 info[i++] = "It senses non-living creatures.";
2535 if (have_flag(flgs, TR_ESP_UNIQUE))
2538 info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤ò´¶ÃΤ¹¤ë¡£";
2540 info[i++] = "It senses unique monsters.";
2544 if (have_flag(flgs, TR_SLOW_DIGEST))
2547 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
2549 info[i++] = "It slows your metabolism.";
2553 if (have_flag(flgs, TR_REGEN))
2556 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
2558 info[i++] = "It speeds your regenerative powers.";
2562 if (have_flag(flgs, TR_WARNING))
2565 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
2567 info[i++] = "It warns you of danger";
2571 if (have_flag(flgs, TR_REFLECT))
2574 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
2576 info[i++] = "It reflects bolts and arrows.";
2580 if (have_flag(flgs, TR_SH_FIRE))
2583 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2585 info[i++] = "It produces a fiery sheath.";
2589 if (have_flag(flgs, TR_SH_ELEC))
2592 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2594 info[i++] = "It produces an electric sheath.";
2598 if (have_flag(flgs, TR_SH_COLD))
2601 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2603 info[i++] = "It produces a sheath of coldness.";
2607 if (have_flag(flgs, TR_NO_MAGIC))
2610 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2612 info[i++] = "It produces an anti-magic shell.";
2616 if (have_flag(flgs, TR_NO_TELE))
2619 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
2621 info[i++] = "It prevents teleportation.";
2625 if (have_flag(flgs, TR_XTRA_MIGHT))
2628 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2630 info[i++] = "It fires missiles with extra might.";
2634 if (have_flag(flgs, TR_XTRA_SHOTS))
2637 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2639 info[i++] = "It fires missiles excessively fast.";
2644 if (have_flag(flgs, TR_BLESSED))
2647 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
2649 info[i++] = "It has been blessed by the gods.";
2654 if (object_is_cursed(o_ptr))
2656 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
2659 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
2661 info[i++] = "It is permanently cursed.";
2665 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
2668 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
2670 info[i++] = "It is heavily cursed.";
2677 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
2679 info[i++] = "It is cursed.";
2683 * It's a trivial infomation since there is
2684 * fake inscription {cursed}
2690 if ((have_flag(flgs, TR_TY_CURSE)) || (o_ptr->curse_flags & TRC_TY_CURSE))
2693 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
2695 info[i++] = "It carries an ancient foul curse.";
2699 if ((have_flag(flgs, TR_AGGRAVATE)) || (o_ptr->curse_flags & TRC_AGGRAVATE))
2702 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
2704 info[i++] = "It aggravates nearby creatures.";
2708 if ((have_flag(flgs, TR_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
2711 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
2713 info[i++] = "It drains experience.";
2717 if (o_ptr->curse_flags & TRC_SLOW_REGEN)
2720 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
2722 info[i++] = "It slows your regenerative powers.";
2726 if (o_ptr->curse_flags & TRC_ADD_L_CURSE)
2729 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
2731 info[i++] = "It adds weak curses.";
2735 if (o_ptr->curse_flags & TRC_ADD_H_CURSE)
2738 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
2740 info[i++] = "It adds heavy curses.";
2744 if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
2747 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2749 info[i++] = "It attracts animals.";
2753 if (o_ptr->curse_flags & TRC_CALL_DEMON)
2756 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2758 info[i++] = "It attracts demons.";
2762 if (o_ptr->curse_flags & TRC_CALL_DRAGON)
2765 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2767 info[i++] = "It attracts dragons.";
2771 if (o_ptr->curse_flags & TRC_COWARDICE)
2774 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤µ¯¤³¤¹¡£";
2776 info[i++] = "It makes you subject to cowardice.";
2780 if ((have_flag(flgs, TR_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
2783 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
2785 info[i++] = "It induces random teleportation.";
2789 if (o_ptr->curse_flags & TRC_LOW_MELEE)
2792 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
2794 info[i++] = "It causes you to miss blows.";
2798 if (o_ptr->curse_flags & TRC_LOW_AC)
2801 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
2803 info[i++] = "It helps your enemies' blows.";
2807 if (o_ptr->curse_flags & TRC_LOW_MAGIC)
2810 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
2812 info[i++] = "It encumbers you while spellcasting.";
2816 if (o_ptr->curse_flags & TRC_FAST_DIGEST)
2819 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
2821 info[i++] = "It speeds your metabolism.";
2825 if (o_ptr->curse_flags & TRC_DRAIN_HP)
2828 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
2830 info[i++] = "It drains you.";
2834 if (o_ptr->curse_flags & TRC_DRAIN_MANA)
2837 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
2839 info[i++] = "It drains your mana.";
2844 /* Describe about this kind of object instead of THIS fake object */
2845 if (mode & SCROBJ_FAKE_OBJECT)
2847 switch (o_ptr->tval)
2850 switch (o_ptr->sval)
2852 case SV_RING_LORDLY:
2854 info[i++] = "¤½¤ì¤Ï´ö¤Ä¤«¤Î¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
2856 info[i++] = "It provides some random resistances.";
2859 case SV_RING_WARNING:
2861 info[i++] = "¤½¤ì¤Ï¤Ò¤È¤Ä¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2863 info[i++] = "It may provide a low rank ESP.";
2870 switch (o_ptr->sval)
2872 case SV_AMULET_RESISTANCE:
2874 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2876 info[i++] = "It may provides resistance to poison.";
2879 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2881 info[i++] = "It may provide a random resistances.";
2884 case SV_AMULET_THE_MAGI:
2886 info[i++] = "¤½¤ì¤ÏºÇÂç¤Ç£³¤Ä¤Þ¤Ç¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë¡£";
2888 info[i++] = "It provides up to three low rank ESPs.";
2896 if (have_flag(flgs, TR_IGNORE_ACID) &&
2897 have_flag(flgs, TR_IGNORE_ELEC) &&
2898 have_flag(flgs, TR_IGNORE_FIRE) &&
2899 have_flag(flgs, TR_IGNORE_COLD))
2902 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2904 info[i++] = "It cannot be harmed by the elements.";
2909 if (have_flag(flgs, TR_IGNORE_ACID))
2912 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2914 info[i++] = "It cannot be harmed by acid.";
2917 if (have_flag(flgs, TR_IGNORE_ELEC))
2920 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2922 info[i++] = "It cannot be harmed by electricity.";
2925 if (have_flag(flgs, TR_IGNORE_FIRE))
2928 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2930 info[i++] = "It cannot be harmed by fire.";
2933 if (have_flag(flgs, TR_IGNORE_COLD))
2936 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2938 info[i++] = "It cannot be harmed by cold.";
2943 if (mode & SCROBJ_FORCE_DETAIL) trivial_info = 0;
2945 /* No relevant informations */
2946 if (i <= trivial_info) return (FALSE);
2948 /* Save the screen */
2952 Term_get_size(&wid, &hgt);
2954 /* Display Item name */
2955 if (!(mode & SCROBJ_FAKE_OBJECT))
2956 object_desc(o_name, o_ptr, 0);
2958 object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
2962 /* Erase the screen */
2963 for (k = 1; k < hgt; k++) prt("", k, 13);
2965 /* Label the information */
2966 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
2968 monster_race *r_ptr = &r_info[o_ptr->pval];
2969 int namelen = strlen(r_name + r_ptr->name);
2970 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
2971 Term_queue_bigchar(18 + namelen, 1, r_ptr->x_attr, r_ptr->x_char, 0, 0);
2972 prt("'", 1, (use_bigtile ? 20 : 19) + namelen);
2976 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
2978 prt(" Item Attributes:", 1, 15);
2981 /* We will print on top of the map (column 13) */
2982 for (k = 2, j = 0; j < i; j++)
2985 prt(info[j], k++, 15);
2987 /* Every 20 entries (lines 2 to 21), start over */
2988 if ((k == hgt - 2) && (j+1 < i))
2991 prt("-- ³¤¯ --", k, 15);
2993 prt("-- more --", k, 15);
2996 for (; k > 2; k--) prt("", k, 15);
3002 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
3004 prt("[Press any key to continue]", k, 15);
3009 /* Restore the screen */
3012 /* Gave knowledge */
3019 * Convert an inventory index into a one character label
3020 * Note that the label does NOT distinguish inven/equip.
3022 char index_to_label(int i)
3024 /* Indexes for "inven" are easy */
3025 if (i < INVEN_RARM) return (I2A(i));
3027 /* Indexes for "equip" are offset */
3028 return (I2A(i - INVEN_RARM));
3033 * Convert a label into the index of an item in the "inven"
3034 * Return "-1" if the label does not indicate a real item
3036 s16b label_to_inven(int c)
3041 i = (islower(c) ? A2I(c) : -1);
3043 /* Verify the index */
3044 if ((i < 0) || (i > INVEN_PACK)) return (-1);
3046 /* Empty slots can never be chosen */
3047 if (!inventory[i].k_idx) return (-1);
3049 /* Return the index */
3055 extern bool select_ring_slot;
3058 static bool is_ring_slot(int i)
3060 return (i == INVEN_RIGHT) || (i == INVEN_LEFT);
3065 * Convert a label into the index of a item in the "equip"
3066 * Return "-1" if the label does not indicate a real item
3068 s16b label_to_equip(int c)
3073 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
3075 /* Verify the index */
3076 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
3078 if (select_ring_slot) return is_ring_slot(i) ? i : -1;
3080 /* Empty slots can never be chosen */
3081 if (!inventory[i].k_idx) return (-1);
3083 /* Return the index */
3090 * Determine which equipment slot (if any) an item likes
3092 s16b wield_slot(object_type *o_ptr)
3094 /* Slot for equipment */
3095 switch (o_ptr->tval)
3102 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
3103 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
3104 return (INVEN_LARM);
3111 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
3112 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
3113 return (INVEN_RARM);
3123 /* Use the right hand first */
3124 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
3126 /* Use the left hand for swapping (by default) */
3127 return (INVEN_LEFT);
3133 return (INVEN_NECK);
3138 return (INVEN_LITE);
3145 return (INVEN_BODY);
3150 return (INVEN_OUTER);
3156 return (INVEN_HEAD);
3161 return (INVEN_HANDS);
3166 return (INVEN_FEET);
3170 /* No slot available */
3176 * Return a string mentioning how a given item is carried
3178 cptr mention_use(int i)
3182 /* Examine the location */
3186 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->migite) ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê")); break;
3188 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "Just lifting" : (p_ptr->migite ? "Wielding" : "On arm"); break;
3192 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->hidarite) ? " ξ¼ê" : (left_hander ? " ±¦¼ê" : " º¸¼ê")); break;
3194 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "Just lifting" : (p_ptr->hidarite ? "Wielding" : "On arm"); break;
3198 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "±¿ÈÂÃæ" : "¼Í·âÍÑ"; break;
3200 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "Just holding" : "Shooting"; break;
3204 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
3206 case INVEN_RIGHT: p = (left_hander ? "On left hand" : "On right hand"); break;
3210 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
3212 case INVEN_LEFT: p = (left_hander ? "On right hand" : "On left hand"); break;
3216 case INVEN_NECK: p = " ¼ó"; break;
3218 case INVEN_NECK: p = "Around neck"; break;
3222 case INVEN_LITE: p = " ¸÷¸»"; break;
3224 case INVEN_LITE: p = "Light source"; break;
3228 case INVEN_BODY: p = " ÂÎ"; break;
3230 case INVEN_BODY: p = "On body"; break;
3234 case INVEN_OUTER: p = "ÂΤξå"; break;
3236 case INVEN_OUTER: p = "About body"; break;
3240 case INVEN_HEAD: p = " Ƭ"; break;
3242 case INVEN_HEAD: p = "On head"; break;
3246 case INVEN_HANDS: p = " ¼ê"; break;
3248 case INVEN_HANDS: p = "On hands"; break;
3252 case INVEN_FEET: p = " "; break;
3254 case INVEN_FEET: p = "On feet"; break;
3258 default: p = "¥¶¥Ã¥¯"; break;
3260 default: p = "In pack"; break;
3264 /* Return the result */
3270 * Return a string describing how a given item is being worn.
3271 * Currently, only used for items in the equipment, not inventory.
3273 cptr describe_use(int i)
3280 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->migite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
3282 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "just lifting" : (p_ptr->migite ? "attacking monsters with" : "wearing on your arm"); break;
3286 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->hidarite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
3288 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "just lifting" : (p_ptr->hidarite ? "attacking monsters with" : "wearing on your arm"); break;
3292 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î" : "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
3294 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "just holding" : "shooting missiles with"; break;
3298 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3300 case INVEN_RIGHT: p = (left_hander ? "wearing on your left hand" : "wearing on your right hand"); break;
3304 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3306 case INVEN_LEFT: p = (left_hander ? "wearing on your right hand" : "wearing on your left hand"); break;
3310 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
3312 case INVEN_NECK: p = "wearing around your neck"; break;
3316 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
3318 case INVEN_LITE: p = "using to light the way"; break;
3322 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
3324 case INVEN_BODY: p = "wearing on your body"; break;
3328 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
3330 case INVEN_OUTER: p = "wearing on your back"; break;
3334 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
3336 case INVEN_HEAD: p = "wearing on your head"; break;
3340 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
3342 case INVEN_HANDS: p = "wearing on your hands"; break;
3346 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
3348 case INVEN_FEET: p = "wearing on your feet"; break;
3352 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
3354 default: p = "carrying in your pack"; break;
3358 /* Return the result */
3363 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
3365 bool check_book_realm(const byte book_tval, const byte book_sval)
3367 if (book_tval < TV_LIFE_BOOK) return FALSE;
3368 if (p_ptr->pclass == CLASS_SORCERER)
3370 return is_magic(tval2realm(book_tval));
3372 else if (p_ptr->pclass == CLASS_RED_MAGE)
3374 if (is_magic(tval2realm(book_tval)))
3375 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
3377 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
3382 * Check an item against the item tester info
3384 bool item_tester_okay(object_type *o_ptr)
3386 /* Hack -- allow listing empty slots */
3387 if (item_tester_full) return (TRUE);
3389 /* Require an item */
3390 if (!o_ptr->k_idx) return (FALSE);
3392 /* Hack -- ignore "gold" */
3393 if (o_ptr->tval == TV_GOLD)
3396 extern bool show_gold_on_floor;
3398 if (!show_gold_on_floor) return (FALSE);
3401 /* Check the tval */
3402 if (item_tester_tval)
3404 /* Is it a spellbook? If so, we need a hack -- TY */
3405 if ((item_tester_tval <= TV_DEATH_BOOK) &&
3406 (item_tester_tval >= TV_LIFE_BOOK))
3407 return check_book_realm(o_ptr->tval, o_ptr->sval);
3409 if (item_tester_tval != o_ptr->tval) return (FALSE);
3412 /* Check the hook */
3413 if (item_tester_hook)
3415 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
3426 * Choice window "shadow" of the "show_inven()" function
3428 void display_inven(void)
3430 register int i, n, z = 0;
3432 byte attr = TERM_WHITE;
3434 char o_name[MAX_NLEN];
3438 Term_get_size(&wid, &hgt);
3440 /* Find the "final" slot */
3441 for (i = 0; i < INVEN_PACK; i++)
3443 o_ptr = &inventory[i];
3445 /* Skip non-objects */
3446 if (!o_ptr->k_idx) continue;
3452 /* Display the pack */
3453 for (i = 0; i < z; i++)
3455 /* Examine the item */
3456 o_ptr = &inventory[i];
3458 /* Start with an empty "index" */
3459 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
3461 /* Is this item "acceptable"? */
3462 if (item_tester_okay(o_ptr))
3464 /* Prepare an "index" */
3465 tmp_val[0] = index_to_label(i);
3467 /* Bracket the "index" --(-- */
3471 /* Display the index (or blank space) */
3472 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
3474 /* Obtain an item description */
3475 object_desc(o_name, o_ptr, 0);
3477 /* Obtain the length of the description */
3481 attr = tval_to_attr[o_ptr->tval % 128];
3483 /* Grey out charging items */
3489 /* Display the entry itself */
3490 Term_putstr(3, i, n, attr, o_name);
3492 /* Erase the rest of the line */
3493 Term_erase(3+n, i, 255);
3495 /* Display the weight if needed */
3498 int wgt = o_ptr->weight * o_ptr->number;
3500 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
3502 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3505 prt(tmp_val, i, wid - 9);
3509 /* Erase the rest of the window */
3510 for (i = z; i < hgt; i++)
3512 /* Erase the line */
3513 Term_erase(0, i, 255);
3520 * Choice window "shadow" of the "show_equip()" function
3522 void display_equip(void)
3526 byte attr = TERM_WHITE;
3528 char o_name[MAX_NLEN];
3532 Term_get_size(&wid, &hgt);
3534 /* Display the equipment */
3535 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
3537 /* Examine the item */
3538 o_ptr = &inventory[i];
3540 /* Start with an empty "index" */
3541 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
3543 /* Is this item "acceptable"? */
3544 if (select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr))
3546 /* Prepare an "index" */
3547 tmp_val[0] = index_to_label(i);
3549 /* Bracket the "index" --(-- */
3553 /* Display the index (or blank space) */
3554 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
3556 /* Obtain an item description */
3557 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
3560 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
3562 strcpy(o_name, "(wielding with two-hands)");
3568 object_desc(o_name, o_ptr, 0);
3569 attr = tval_to_attr[o_ptr->tval % 128];
3572 /* Obtain the length of the description */
3575 /* Grey out charging items */
3581 /* Display the entry itself */
3582 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
3584 /* Erase the rest of the line */
3585 Term_erase(3+n, i - INVEN_RARM, 255);
3587 /* Display the weight (if needed) */
3590 int wgt = o_ptr->weight * o_ptr->number;
3592 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
3594 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3597 prt(tmp_val, i - INVEN_RARM, wid - (show_labels ? 28 : 9));
3600 /* Display the slot description (if needed) */
3603 Term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
3604 prt(mention_use(i), i - INVEN_RARM, wid - 15);
3608 /* Erase the rest of the window */
3609 for (i = INVEN_TOTAL - INVEN_RARM; i < hgt; i++)
3611 /* Clear that line */
3612 Term_erase(0, i, 255);
3618 * Find the "first" inventory object with the given "tag".
3620 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
3621 * inscription of an object. Alphabetical characters don't work as a
3624 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
3625 * and "x" is the "current" command_cmd code.
3627 static bool get_tag(int *cp, char tag, int mode)
3632 /* Extract index from mode */
3637 end = INVEN_TOTAL - 1;
3642 end = INVEN_PACK - 1;
3649 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
3651 /* Check every inventory object */
3652 for (i = start; i <= end; i++)
3654 object_type *o_ptr = &inventory[i];
3656 /* Skip non-objects */
3657 if (!o_ptr->k_idx) continue;
3659 /* Skip empty inscriptions */
3660 if (!o_ptr->inscription) continue;
3662 /* Skip non-choice */
3663 if (!item_tester_okay(o_ptr)) continue;
3666 s = my_strchr(quark_str(o_ptr->inscription), '@');
3668 /* Process all tags */
3671 /* Check the special tags */
3672 if ((s[1] == command_cmd) && (s[2] == tag))
3674 /* Save the actual inventory ID */
3681 /* Find another '@' */
3682 s = my_strchr(s + 1, '@');
3687 /**** Find a tag in the form of {@#} (allows only numerals) ***/
3689 /* Don't allow {@#} with '#' being alphabet */
3690 if (tag < '0' || '9' < tag)
3696 /* Check every object */
3697 for (i = start; i <= end; i++)
3699 object_type *o_ptr = &inventory[i];
3701 /* Skip non-objects */
3702 if (!o_ptr->k_idx) continue;
3704 /* Skip empty inscriptions */
3705 if (!o_ptr->inscription) continue;
3707 /* Skip non-choice */
3708 if (!item_tester_okay(o_ptr)) continue;
3711 s = my_strchr(quark_str(o_ptr->inscription), '@');
3713 /* Process all tags */
3716 /* Check the normal tags */
3719 /* Save the actual inventory ID */
3726 /* Find another '@' */
3727 s = my_strchr(s + 1, '@');
3737 * Find the "first" floor object with the given "tag".
3739 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
3740 * inscription of an object. Alphabetical characters don't work as a
3743 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
3744 * and "x" is the "current" command_cmd code.
3746 static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
3751 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
3753 /* Check every object in the grid */
3754 for (i = 0; i < floor_num && i < 23; i++)
3756 object_type *o_ptr = &o_list[floor_list[i]];
3758 /* Skip empty inscriptions */
3759 if (!o_ptr->inscription) continue;
3762 s = my_strchr(quark_str(o_ptr->inscription), '@');
3764 /* Process all tags */
3767 /* Check the special tags */
3768 if ((s[1] == command_cmd) && (s[2] == tag))
3770 /* Save the actual floor object ID */
3777 /* Find another '@' */
3778 s = my_strchr(s + 1, '@');
3783 /**** Find a tag in the form of {@#} (allows only numerals) ***/
3785 /* Don't allow {@#} with '#' being alphabet */
3786 if (tag < '0' || '9' < tag)
3792 /* Check every object in the grid */
3793 for (i = 0; i < floor_num && i < 23; i++)
3795 object_type *o_ptr = &o_list[floor_list[i]];
3797 /* Skip empty inscriptions */
3798 if (!o_ptr->inscription) continue;
3801 s = my_strchr(quark_str(o_ptr->inscription), '@');
3803 /* Process all tags */
3806 /* Check the normal tags */
3809 /* Save the floor object ID */
3816 /* Find another '@' */
3817 s = my_strchr(s + 1, '@');
3827 * Move around label characters with correspond tags
3829 static void prepare_label_string(char *label, int mode)
3831 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
3832 int offset = (mode == USE_EQUIP) ? INVEN_RARM : 0;
3835 /* Prepare normal labels */
3836 strcpy(label, alphabet_chars);
3838 /* Move each label */
3839 for (i = 0; i < 52; i++)
3842 char c = alphabet_chars[i];
3844 /* Find a tag with this label */
3845 if (get_tag(&index, c, mode))
3847 /* Delete the overwritten label */
3848 if (label[i] == c) label[i] = ' ';
3850 /* Move the label to the place of corresponding tag */
3851 label[index - offset] = c;
3858 * Move around label characters with correspond tags (floor version)
3860 static void prepare_label_string_floor(char *label, int floor_list[], int floor_num)
3862 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
3865 /* Prepare normal labels */
3866 strcpy(label, alphabet_chars);
3868 /* Move each label */
3869 for (i = 0; i < 52; i++)
3872 char c = alphabet_chars[i];
3874 /* Find a tag with this label */
3875 if (get_tag_floor(&index, c, floor_list, floor_num))
3877 /* Delete the overwritten label */
3878 if (label[i] == c) label[i] = ' ';
3880 /* Move the label to the place of corresponding tag */
3888 * Display the inventory.
3890 * Hack -- do not display "trailing" empty slots
3892 int show_inven(int target_item)
3894 int i, j, k, l, z = 0;
3895 int col, cur_col, len;
3897 char o_name[MAX_NLEN];
3901 char out_desc[23][MAX_NLEN];
3902 int target_item_label = 0;
3904 char inven_label[52 + 1];
3906 /* Starting column */
3910 Term_get_size(&wid, &hgt);
3912 /* Default "max-length" */
3913 len = wid - col - 1;
3916 /* Find the "final" slot */
3917 for (i = 0; i < INVEN_PACK; i++)
3919 o_ptr = &inventory[i];
3921 /* Skip non-objects */
3922 if (!o_ptr->k_idx) continue;
3928 prepare_label_string(inven_label, USE_INVEN);
3930 /* Display the inventory */
3931 for (k = 0, i = 0; i < z; i++)
3933 o_ptr = &inventory[i];
3935 /* Is this item acceptable? */
3936 if (!item_tester_okay(o_ptr)) continue;
3938 /* Describe the object */
3939 object_desc(o_name, o_ptr, 0);
3941 /* Save the object index, color, and description */
3943 out_color[k] = tval_to_attr[o_ptr->tval % 128];
3945 /* Grey out charging items */
3948 out_color[k] = TERM_L_DARK;
3951 (void)strcpy(out_desc[k], o_name);
3953 /* Find the predicted "line length" */
3954 l = strlen(out_desc[k]) + 5;
3956 /* Be sure to account for the weight */
3957 if (show_weights) l += 9;
3959 /* Account for icon if displayed */
3960 if (show_item_graph)
3963 if (use_bigtile) l++;
3966 /* Maintain the maximum length */
3967 if (l > len) len = l;
3969 /* Advance to next "line" */
3973 /* Find the column to start in */
3974 col = (len > wid - 4) ? 0 : (wid - len - 1);
3976 /* Output each entry */
3977 for (j = 0; j < k; j++)
3983 o_ptr = &inventory[i];
3985 /* Clear the line */
3986 prt("", j + 1, col ? col - 2 : col);
3988 if (use_menu && target_item)
3990 if (j == (target_item-1))
3993 strcpy(tmp_val, "¡Õ");
3995 strcpy(tmp_val, "> ");
3997 target_item_label = i;
3999 else strcpy(tmp_val, " ");
4001 else if (i <= INVEN_PACK)
4003 /* Prepare an index --(-- */
4004 sprintf(tmp_val, "%c)", inven_label[i]);
4008 /* Prepare an index --(-- */
4009 sprintf(tmp_val, "%c)", index_to_label(i));
4012 /* Clear the line with the (possibly indented) index */
4013 put_str(tmp_val, j + 1, col);
4017 /* Display graphics for object, if desired */
4018 if (show_item_graph)
4020 byte a = object_attr(o_ptr);
4021 char c = object_char(o_ptr);
4024 if (a & 0x80) a |= 0x40;
4027 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
4028 if (use_bigtile) cur_col++;
4034 /* Display the entry itself */
4035 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
4037 /* Display the weight if needed */
4040 int wgt = o_ptr->weight * o_ptr->number;
4042 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4044 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4047 prt(tmp_val, j + 1, wid - 9);
4051 /* Make a "shadow" below the list (only if needed) */
4052 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4054 /* Save the new column */
4057 return target_item_label;
4063 * Display the equipment.
4065 int show_equip(int target_item)
4068 int col, cur_col, len;
4071 char o_name[MAX_NLEN];
4074 char out_desc[23][MAX_NLEN];
4075 int target_item_label = 0;
4077 char equip_label[52 + 1];
4079 /* Starting column */
4083 Term_get_size(&wid, &hgt);
4085 /* Maximal length */
4086 len = wid - col - 1;
4089 /* Scan the equipment list */
4090 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
4092 o_ptr = &inventory[i];
4094 /* Is this item acceptable? */
4095 if (!(select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr)) &&
4096 (!((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute) ||
4097 item_tester_no_ryoute)) continue;
4100 object_desc(o_name, o_ptr, 0);
4102 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
4105 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
4107 (void)strcpy(out_desc[k],"(wielding with two-hands)");
4109 out_color[k] = TERM_WHITE;
4113 (void)strcpy(out_desc[k], o_name);
4114 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4118 /* Grey out charging items */
4121 out_color[k] = TERM_L_DARK;
4124 /* Extract the maximal length (see below) */
4126 l = strlen(out_desc[k]) + (2 + 1);
4128 l = strlen(out_desc[k]) + (2 + 3);
4132 /* Increase length for labels (if needed) */
4134 if (show_labels) l += (7 + 2);
4136 if (show_labels) l += (14 + 2);
4140 /* Increase length for weight (if needed) */
4141 if (show_weights) l += 9;
4143 if (show_item_graph) l += 2;
4145 /* Maintain the max-length */
4146 if (l > len) len = l;
4148 /* Advance the entry */
4152 /* Hack -- Find a column to start in */
4154 col = (len > wid - 6) ? 0 : (wid - len - 1);
4156 col = (len > wid - 4) ? 0 : (wid - len - 1);
4159 prepare_label_string(equip_label, USE_EQUIP);
4161 /* Output each entry */
4162 for (j = 0; j < k; j++)
4168 o_ptr = &inventory[i];
4170 /* Clear the line */
4171 prt("", j + 1, col ? col - 2 : col);
4173 if (use_menu && target_item)
4175 if (j == (target_item-1))
4178 strcpy(tmp_val, "¡Õ");
4180 strcpy(tmp_val, "> ");
4182 target_item_label = i;
4184 else strcpy(tmp_val, " ");
4186 else if (i >= INVEN_RARM)
4188 /* Prepare an index --(-- */
4189 sprintf(tmp_val, "%c)", equip_label[i - INVEN_RARM]);
4193 /* Prepare an index --(-- */
4194 sprintf(tmp_val, "%c)", index_to_label(i));
4197 /* Clear the line with the (possibly indented) index */
4198 put_str(tmp_val, j+1, col);
4202 /* Display graphics for object, if desired */
4203 if (show_item_graph)
4205 byte a = object_attr(o_ptr);
4206 char c = object_char(o_ptr);
4209 if (a & 0x80) a |= 0x40;
4212 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
4213 if (use_bigtile) cur_col++;
4221 /* Mention the use */
4223 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
4225 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
4228 put_str(tmp_val, j+1, cur_col);
4230 /* Display the entry itself */
4232 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
4234 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
4241 /* Display the entry itself */
4242 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
4245 /* Display the weight if needed */
4248 int wgt = o_ptr->weight * o_ptr->number;
4250 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4252 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
4255 prt(tmp_val, j + 1, wid - 9);
4259 /* Make a "shadow" below the list (only if needed) */
4260 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4262 /* Save the new column */
4265 return target_item_label;
4272 * Flip "inven" and "equip" in any sub-windows
4274 void toggle_inven_equip(void)
4279 for (j = 0; j < 8; j++)
4282 if (!angband_term[j]) continue;
4284 /* Flip inven to equip */
4285 if (window_flag[j] & (PW_INVEN))
4288 window_flag[j] &= ~(PW_INVEN);
4289 window_flag[j] |= (PW_EQUIP);
4292 p_ptr->window |= (PW_EQUIP);
4295 /* Flip inven to equip */
4296 else if (window_flag[j] & (PW_EQUIP))
4299 window_flag[j] &= ~(PW_EQUIP);
4300 window_flag[j] |= (PW_INVEN);
4303 p_ptr->window |= (PW_INVEN);
4311 * Verify the choice of an item.
4313 * The item can be negative to mean "item on floor".
4315 static bool verify(cptr prompt, int item)
4317 char o_name[MAX_NLEN];
4318 char out_val[MAX_NLEN+20];
4325 o_ptr = &inventory[item];
4331 o_ptr = &o_list[0 - item];
4335 object_desc(o_name, o_ptr, 0);
4339 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
4341 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
4346 return (get_check(out_val));
4351 * Hack -- allow user to "prevent" certain choices
4353 * The item can be negative to mean "item on floor".
4355 static bool get_item_allow(int item)
4361 if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
4366 o_ptr = &inventory[item];
4372 o_ptr = &o_list[0 - item];
4375 /* No inscription */
4376 if (!o_ptr->inscription) return (TRUE);
4379 s = my_strchr(quark_str(o_ptr->inscription), '!');
4381 /* Process preventions */
4384 /* Check the "restriction" */
4385 if ((s[1] == command_cmd) || (s[1] == '*'))
4387 /* Verify the choice */
4389 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
4391 if (!verify("Really try", item)) return (FALSE);
4396 /* Find another '!' */
4397 s = my_strchr(s + 1, '!');
4407 * Auxiliary function for "get_item()" -- test an index
4409 static bool get_item_okay(int i)
4412 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
4414 if (select_ring_slot) return is_ring_slot(i);
4416 /* Verify the item */
4417 if (!item_tester_okay(&inventory[i])) return (FALSE);
4426 * Determine whether get_item() can get some item or not
4427 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
4429 bool can_get_item(void)
4431 int j, floor_list[23], floor_num = 0;
4433 for (j = 0; j < INVEN_TOTAL; j++)
4434 if (item_tester_okay(&inventory[j]))
4437 floor_num = scan_floor(floor_list, py, px, 0x03);
4445 * Let the user select an item, save its "index"
4447 * Return TRUE only if an acceptable item was chosen by the user.
4449 * The selected item must satisfy the "item_tester_hook()" function,
4450 * if that hook is set, and the "item_tester_tval", if that value is set.
4452 * All "item_tester" restrictions are cleared before this function returns.
4454 * The user is allowed to choose acceptable items from the equipment,
4455 * inventory, or floor, respectively, if the proper flag was given,
4456 * and there are any acceptable items in that location.
4458 * The equipment or inventory are displayed (even if no acceptable
4459 * items are in that location) if the proper flag was given.
4461 * If there are no acceptable items available anywhere, and "str" is
4462 * not NULL, then it will be used as the text of a warning message
4463 * before the function returns.
4465 * Note that the user must press "-" to specify the item on the floor,
4466 * and there is no way to "examine" the item on the floor, while the
4467 * use of "capital" letters will "examine" an inventory/equipment item,
4468 * and prompt for its use.
4470 * If a legal item is selected from the inventory, we save it in "cp"
4471 * directly (0 to 35), and return TRUE.
4473 * If a legal item is selected from the floor, we save it in "cp" as
4474 * a negative (-1 to -511), and return TRUE.
4476 * If no item is available, we do nothing to "cp", and we display a
4477 * warning message, using "str" if available, and return FALSE.
4479 * If no item is selected, we do nothing to "cp", and return FALSE.
4481 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
4482 * to allow the user to enter a command while viewing those screens, and
4483 * also to induce "auto-enter" of stores, and other such stuff.
4485 * Global "p_ptr->command_see" may be set before calling this function to start
4486 * out in "browse" mode. It is cleared before this function returns.
4488 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
4489 * If it is TRUE then we are viewing inventory, else equipment.
4491 * We always erase the prompt when we are done, leaving a blank line,
4492 * or a warning message, if appropriate, if no items are available.
4494 bool get_item(int *cp, cptr pmt, cptr str, int mode)
4496 s16b this_o_idx, next_o_idx = 0;
4500 int j, k, i1, i2, e1, e2;
4510 bool allow_floor = FALSE;
4512 bool toggle = FALSE;
4518 extern bool select_the_force;
4520 int menu_line = (use_menu ? 1 : 0);
4526 static char prev_tag = '\0';
4527 char cur_tag = '\0';
4529 #endif /* ALLOW_REPEAT */
4531 #ifdef ALLOW_EASY_FLOOR /* TNB */
4533 if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
4535 #endif /* ALLOW_EASY_FLOOR -- TNB */
4538 if (mode & USE_EQUIP) equip = TRUE;
4539 if (mode & USE_INVEN) inven = TRUE;
4540 if (mode & USE_FLOOR) floor = TRUE;
4544 /* Get the item index */
4545 if (repeat_pull(cp))
4548 if (select_the_force && (*cp == INVEN_FORCE))
4550 item_tester_tval = 0;
4551 item_tester_hook = NULL;
4552 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4557 else if (floor && (*cp < 0))
4564 /* Acquire object */
4567 /* Validate the item */
4568 if (item_tester_okay(o_ptr))
4570 /* Forget restrictions */
4571 item_tester_tval = 0;
4572 item_tester_hook = NULL;
4573 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4580 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
4581 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
4583 if (prev_tag && command_cmd)
4585 /* Look up the tag and validate the item */
4586 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
4587 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
4588 else if (!get_item_okay(k)) /* Reject */;
4591 /* Accept that choice */
4594 /* Forget restrictions */
4595 item_tester_tval = 0;
4596 item_tester_hook = NULL;
4597 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4603 prev_tag = '\0'; /* prev_tag is no longer effective */
4606 /* Verify the item */
4607 else if (get_item_okay(*cp))
4609 /* Forget restrictions */
4610 item_tester_tval = 0;
4611 item_tester_hook = NULL;
4612 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4620 #endif /* ALLOW_REPEAT */
4623 /* Paranoia XXX XXX XXX */
4630 /* No item selected */
4634 /* Full inventory */
4636 i2 = INVEN_PACK - 1;
4638 /* Forbid inventory */
4639 if (!inven) i2 = -1;
4642 for (j = 0; j < INVEN_PACK; j++)
4643 if (item_tester_okay(&inventory[j])) max_inven++;
4646 /* Restrict inventory indexes */
4647 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
4648 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
4651 /* Full equipment */
4653 e2 = INVEN_TOTAL - 1;
4655 /* Forbid equipment */
4656 if (!equip) e2 = -1;
4659 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
4660 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
4661 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
4664 /* Restrict equipment indexes */
4665 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
4666 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
4668 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
4672 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
4674 else if (p_ptr->hidarite) e1 = INVEN_RARM;
4678 /* Restrict floor usage */
4681 /* Scan all objects in the grid */
4682 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
4686 /* Acquire object */
4687 o_ptr = &o_list[this_o_idx];
4689 /* Acquire next object */
4690 next_o_idx = o_ptr->next_o_idx;
4692 /* Accept the item on the floor if legal */
4693 if (item_tester_okay(o_ptr) && (o_ptr->marked & OM_FOUND)) allow_floor = TRUE;
4697 /* Require at least one legal choice */
4698 if (!allow_floor && (i1 > i2) && (e1 > e2))
4700 /* Cancel p_ptr->command_see */
4701 command_see = FALSE;
4709 if (select_the_force) {
4715 /* Analyze choices */
4718 /* Hack -- Start on equipment if requested */
4719 if (command_see && command_wrk && equip)
4724 /* Use inventory if allowed */
4727 command_wrk = FALSE;
4730 /* Use equipment if allowed */
4736 /* Use inventory for floor */
4739 command_wrk = FALSE;
4745 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
4747 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
4749 /* Hack -- start out in "display" mode */
4757 /* Repeat until done */
4760 int get_item_label = 0;
4767 for (j = 0; j < 8; j++)
4770 if (!angband_term[j]) continue;
4772 /* Count windows displaying inven */
4773 if (window_flag[j] & (PW_INVEN)) ni++;
4775 /* Count windows displaying equip */
4776 if (window_flag[j] & (PW_EQUIP)) ne++;
4779 /* Toggle if needed */
4780 if ((command_wrk && ni && !ne) ||
4781 (!command_wrk && !ni && ne))
4784 toggle_inven_equip();
4791 p_ptr->window |= (PW_INVEN | PW_EQUIP);
4793 /* Redraw windows */
4797 /* Inventory screen */
4800 /* Redraw if needed */
4801 if (command_see) get_item_label = show_inven(menu_line);
4804 /* Equipment screen */
4807 /* Redraw if needed */
4808 if (command_see) get_item_label = show_equip(menu_line);
4811 /* Viewing inventory */
4814 /* Begin the prompt */
4816 sprintf(out_val, "»ý¤Áʪ:");
4818 sprintf(out_val, "Inven:");
4821 /* Some legal items */
4822 if ((i1 <= i2) && !use_menu)
4824 /* Build the prompt */
4826 sprintf(tmp_val, "%c-%c,'(',')',",
4828 sprintf(tmp_val, " %c-%c,'(',')',",
4830 index_to_label(i1), index_to_label(i2));
4833 strcat(out_val, tmp_val);
4836 /* Indicate ability to "view" */
4838 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
4840 if (!command_see && !use_menu) strcat(out_val, " * to see,");
4845 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
4847 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
4851 /* Viewing equipment */
4854 /* Begin the prompt */
4856 sprintf(out_val, "ÁõÈ÷ÉÊ:");
4858 sprintf(out_val, "Equip:");
4861 /* Some legal items */
4862 if ((e1 <= e2) && !use_menu)
4864 /* Build the prompt */
4866 sprintf(tmp_val, "%c-%c,'(',')',",
4868 sprintf(tmp_val, " %c-%c,'(',')',",
4870 index_to_label(e1), index_to_label(e2));
4873 strcat(out_val, tmp_val);
4876 /* Indicate ability to "view" */
4878 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
4880 if (!command_see) strcat(out_val, " * to see,");
4885 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
4887 if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
4891 /* Indicate legality of the "floor" item */
4893 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
4894 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
4896 if (allow_floor) strcat(out_val, " - for floor,");
4897 if (select_the_force) strcat(out_val, " w for the Force,");
4900 /* Finish the prompt */
4901 strcat(out_val, " ESC");
4903 /* Build the prompt */
4904 sprintf(tmp_val, "(%s) %s", out_val, pmt);
4906 /* Show the prompt */
4914 int max_line = (command_wrk ? max_equip : max_inven);
4930 menu_line += (max_line - 1);
4949 /* Verify legality */
4950 if (!inven || !equip)
4956 /* Hack -- Fix screen */
4966 /* Switch inven/equip */
4967 command_wrk = !command_wrk;
4968 max_line = (command_wrk ? max_equip : max_inven);
4969 if (menu_line > max_line) menu_line = max_line;
4971 /* Need to redraw */
4980 if (command_wrk == USE_FLOOR)
4983 (*cp) = -get_item_label;
4987 /* Validate the item */
4988 if (!get_item_okay(get_item_label))
4994 /* Allow player to "refuse" certain actions */
4995 if (!get_item_allow(get_item_label))
5001 /* Accept that choice */
5002 (*cp) = get_item_label;
5011 if (select_the_force) {
5019 if (menu_line > max_line) menu_line -= max_line;
5040 command_see = FALSE;
5060 /* Verify legality */
5061 if (!inven || !equip)
5067 /* Hack -- Fix screen */
5077 /* Switch inven/equip */
5078 command_wrk = !command_wrk;
5080 /* Need to redraw */
5086 /* Use floor item */
5089 /* Scan all objects in the grid */
5090 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5094 /* Acquire object */
5095 o_ptr = &o_list[this_o_idx];
5097 /* Acquire next object */
5098 next_o_idx = o_ptr->next_o_idx;
5100 /* Validate the item */
5101 if (!item_tester_okay(o_ptr)) continue;
5106 /* Verify the item (if required) */
5108 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
5110 if (other_query_flag && !verify("Try", k)) continue;
5114 /* Allow player to "refuse" certain actions */
5115 if (!get_item_allow(k)) continue;
5117 /* Accept that choice */
5134 case '1': case '2': case '3':
5135 case '4': case '5': case '6':
5136 case '7': case '8': case '9':
5138 /* Look up the tag */
5139 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
5145 /* Hack -- Validate the item */
5146 if ((k < INVEN_RARM) ? !inven : !equip)
5152 /* Validate the item */
5153 if (!get_item_okay(k))
5159 /* Allow player to "refuse" certain actions */
5160 if (!get_item_allow(k))
5166 /* Accept that choice */
5172 #endif /* ALLOW_REPEAT */
5180 /* Choose "default" inventory item */
5183 k = ((i1 == i2) ? i1 : -1);
5186 /* Choose "default" equipment item */
5189 k = ((e1 == e2) ? e1 : -1);
5192 /* Validate the item */
5193 if (!get_item_okay(k))
5199 /* Allow player to "refuse" certain actions */
5200 if (!get_item_allow(k))
5206 /* Accept that choice */
5216 if (select_the_force) {
5229 bool not_found = FALSE;
5231 /* Look up the alphabetical tag */
5232 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
5237 /* Hack -- Validate the item */
5238 else if ((k < INVEN_RARM) ? !inven : !equip)
5243 /* Validate the item */
5244 else if (!get_item_okay(k))
5251 /* Accept that choice */
5257 #endif /* ALLOW_REPEAT */
5261 /* Extract "query" setting */
5262 ver = isupper(which);
5263 which = tolower(which);
5265 /* Convert letter to inventory index */
5268 if (which == '(') k = i1;
5269 else if (which == ')') k = i2;
5270 else k = label_to_inven(which);
5273 /* Convert letter to equipment index */
5276 if (which == '(') k = e1;
5277 else if (which == ')') k = e2;
5278 else k = label_to_equip(which);
5281 /* Validate the item */
5282 if (!get_item_okay(k))
5288 /* Verify the item */
5290 if (ver && !verify("ËÜÅö¤Ë", k))
5292 if (ver && !verify("Try", k))
5300 /* Allow player to "refuse" certain actions */
5301 if (!get_item_allow(k))
5307 /* Accept that choice */
5318 /* Fix the screen if necessary */
5324 /* Hack -- Cancel "display" */
5325 command_see = FALSE;
5329 /* Forget the item_tester_tval restriction */
5330 item_tester_tval = 0;
5332 item_tester_no_ryoute = FALSE;
5334 /* Forget the item_tester_hook restriction */
5335 item_tester_hook = NULL;
5338 /* Clean up 'show choices' */
5339 /* Toggle again if needed */
5340 if (toggle) toggle_inven_equip();
5343 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5349 /* Clear the prompt line */
5352 /* Warning if needed */
5353 if (oops && str) msg_print(str);
5359 if (command_cmd) prev_tag = cur_tag;
5360 #endif /* ALLOW_REPEAT */
5362 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5370 #ifdef ALLOW_EASY_FLOOR
5375 * Return a list of o_list[] indexes of items at the given cave
5376 * location. Valid flags are:
5378 * mode & 0x01 -- Item tester
5379 * mode & 0x02 -- Marked items only
5380 * mode & 0x04 -- Stop after first
5382 int scan_floor(int *items, int y, int x, int mode)
5384 int this_o_idx, next_o_idx;
5389 if (!in_bounds(y, x)) return 0;
5391 /* Scan all objects in the grid */
5392 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
5396 /* Acquire object */
5397 o_ptr = &o_list[this_o_idx];
5399 /* Acquire next object */
5400 next_o_idx = o_ptr->next_o_idx;
5403 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
5406 if ((mode & 0x02) && !(o_ptr->marked & OM_FOUND)) continue;
5408 /* Accept this item */
5409 /* XXX Hack -- Enforce limit */
5411 items[num] = this_o_idx;
5416 if (mode & 0x04) break;
5425 * Display a list of the items on the floor at the given location.
5427 int show_floor(int target_item, int y, int x, int *min_width)
5434 char o_name[MAX_NLEN];
5440 char out_desc[23][MAX_NLEN];
5441 int target_item_label = 0;
5443 int floor_list[23], floor_num;
5445 char floor_label[52 + 1];
5447 bool dont_need_to_show_weights = TRUE;
5450 Term_get_size(&wid, &hgt);
5452 /* Default length */
5453 len = MAX((*min_width), 20);
5456 /* Scan for objects in the grid, using item_tester_okay() */
5457 floor_num = scan_floor(floor_list, y, x, 0x03);
5459 /* Display the floor objects */
5460 for (k = 0, i = 0; i < floor_num && i < 23; i++)
5462 o_ptr = &o_list[floor_list[i]];
5464 /* Describe the object */
5465 object_desc(o_name, o_ptr, 0);
5467 /* Save the index */
5470 /* Acquire inventory color */
5471 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
5473 /* Save the object description */
5474 strcpy(out_desc[k], o_name);
5476 /* Find the predicted "line length" */
5477 l = strlen(out_desc[k]) + 5;
5479 /* Be sure to account for the weight */
5480 if (show_weights) l += 9;
5482 if (o_ptr->tval != TV_GOLD) dont_need_to_show_weights = FALSE;
5484 /* Maintain the maximum length */
5485 if (l > len) len = l;
5487 /* Advance to next "line" */
5491 if (show_weights && dont_need_to_show_weights) len -= 9;
5496 /* Find the column to start in */
5497 col = (len > wid - 4) ? 0 : (wid - len - 1);
5499 prepare_label_string_floor(floor_label, floor_list, floor_num);
5501 /* Output each entry */
5502 for (j = 0; j < k; j++)
5505 i = floor_list[out_index[j]];
5510 /* Clear the line */
5511 prt("", j + 1, col ? col - 2 : col);
5513 if (use_menu && target_item)
5515 if (j == (target_item-1))
5518 strcpy(tmp_val, "¡Õ");
5520 strcpy(tmp_val, "> ");
5522 target_item_label = i;
5524 else strcpy(tmp_val, " ");
5528 /* Prepare an index --(-- */
5529 sprintf(tmp_val, "%c)", floor_label[j]);
5532 /* Clear the line with the (possibly indented) index */
5533 put_str(tmp_val, j + 1, col);
5535 /* Display the entry itself */
5536 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
5538 /* Display the weight if needed */
5539 if (show_weights && (o_ptr->tval != TV_GOLD))
5541 int wgt = o_ptr->weight * o_ptr->number;
5543 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5545 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
5548 prt(tmp_val, j + 1, wid - 9);
5552 /* Make a "shadow" below the list (only if needed) */
5553 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5555 return target_item_label;
5559 * This version of get_item() is called by get_item() when
5560 * the easy_floor is on.
5562 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
5564 char n1 = ' ', n2 = ' ', which = ' ';
5566 int j, k, i1, i2, e1, e2;
5573 bool equip = (mode & USE_EQUIP) ? TRUE : FALSE;
5574 bool inven = (mode & USE_INVEN) ? TRUE : FALSE;
5575 bool floor = (mode & USE_FLOOR) ? TRUE : FALSE;
5577 bool allow_equip = FALSE;
5578 bool allow_inven = FALSE;
5579 bool allow_floor = FALSE;
5581 bool toggle = FALSE;
5586 int floor_num, floor_list[23], floor_top = 0;
5589 extern bool select_the_force;
5591 int menu_line = (use_menu ? 1 : 0);
5597 static char prev_tag = '\0';
5598 char cur_tag = '\0';
5600 /* Get the item index */
5601 if (repeat_pull(cp))
5604 if (select_the_force && (*cp == INVEN_FORCE))
5606 item_tester_tval = 0;
5607 item_tester_hook = NULL;
5608 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5613 else if (floor && (*cp < 0))
5615 if (prev_tag && command_cmd)
5617 /* Scan all objects in the grid */
5618 floor_num = scan_floor(floor_list, py, px, 0x03);
5620 /* Look up the tag */
5621 if (get_tag_floor(&k, prev_tag, floor_list, floor_num))
5623 /* Accept that choice */
5624 (*cp) = 0 - floor_list[k];
5626 /* Forget restrictions */
5627 item_tester_tval = 0;
5628 item_tester_hook = NULL;
5629 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5635 prev_tag = '\0'; /* prev_tag is no longer effective */
5638 /* Validate the item */
5639 else if (item_tester_okay(&o_list[0 - (*cp)]))
5641 /* Forget restrictions */
5642 item_tester_tval = 0;
5643 item_tester_hook = NULL;
5644 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5651 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
5652 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
5654 if (prev_tag && command_cmd)
5656 /* Look up the tag and validate the item */
5657 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
5658 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
5659 else if (!get_item_okay(k)) /* Reject */;
5662 /* Accept that choice */
5665 /* Forget restrictions */
5666 item_tester_tval = 0;
5667 item_tester_hook = NULL;
5668 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5674 prev_tag = '\0'; /* prev_tag is no longer effective */
5677 /* Verify the item */
5678 else if (get_item_okay(*cp))
5680 /* Forget restrictions */
5681 item_tester_tval = 0;
5682 item_tester_hook = NULL;
5683 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5691 #endif /* ALLOW_REPEAT */
5694 /* Paranoia XXX XXX XXX */
5701 /* No item selected */
5705 /* Full inventory */
5707 i2 = INVEN_PACK - 1;
5709 /* Forbid inventory */
5710 if (!inven) i2 = -1;
5713 for (j = 0; j < INVEN_PACK; j++)
5714 if (item_tester_okay(&inventory[j])) max_inven++;
5717 /* Restrict inventory indexes */
5718 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5719 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5722 /* Full equipment */
5724 e2 = INVEN_TOTAL - 1;
5726 /* Forbid equipment */
5727 if (!equip) e2 = -1;
5730 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5731 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
5732 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5735 /* Restrict equipment indexes */
5736 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5737 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5739 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
5743 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
5745 else if (p_ptr->hidarite) e1 = INVEN_RARM;
5749 /* Count "okay" floor items */
5752 /* Restrict floor usage */
5755 /* Scan all objects in the grid */
5756 floor_num = scan_floor(floor_list, py, px, 0x03);
5759 /* Accept inventory */
5760 if (i1 <= i2) allow_inven = TRUE;
5762 /* Accept equipment */
5763 if (e1 <= e2) allow_equip = TRUE;
5766 if (floor_num) allow_floor = TRUE;
5768 /* Require at least one legal choice */
5769 if (!allow_inven && !allow_equip && !allow_floor)
5771 /* Cancel p_ptr->command_see */
5772 command_see = FALSE;
5780 if (select_the_force) {
5786 /* Analyze choices */
5789 /* Hack -- Start on equipment if requested */
5790 if (command_see && (command_wrk == (USE_EQUIP))
5793 command_wrk = (USE_EQUIP);
5796 /* Use inventory if allowed */
5797 else if (allow_inven)
5799 command_wrk = (USE_INVEN);
5802 /* Use equipment if allowed */
5803 else if (allow_equip)
5805 command_wrk = (USE_EQUIP);
5808 /* Use floor if allowed */
5809 else if (allow_floor)
5811 command_wrk = (USE_FLOOR);
5816 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5818 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5820 /* Hack -- start out in "display" mode */
5827 /* Repeat until done */
5830 int get_item_label = 0;
5837 for (j = 0; j < 8; j++)
5840 if (!angband_term[j]) continue;
5842 /* Count windows displaying inven */
5843 if (window_flag[j] & (PW_INVEN)) ni++;
5845 /* Count windows displaying equip */
5846 if (window_flag[j] & (PW_EQUIP)) ne++;
5849 /* Toggle if needed */
5850 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
5851 (command_wrk == (USE_INVEN) && !ni && ne))
5854 toggle_inven_equip();
5861 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5863 /* Redraw windows */
5866 /* Inventory screen */
5867 if (command_wrk == (USE_INVEN))
5869 /* Extract the legal requests */
5873 /* Redraw if needed */
5874 if (command_see) get_item_label = show_inven(menu_line);
5877 /* Equipment screen */
5878 else if (command_wrk == (USE_EQUIP))
5880 /* Extract the legal requests */
5881 n1 = I2A(e1 - INVEN_RARM);
5882 n2 = I2A(e2 - INVEN_RARM);
5884 /* Redraw if needed */
5885 if (command_see) get_item_label = show_equip(menu_line);
5889 else if (command_wrk == (USE_FLOOR))
5892 k = MIN(floor_top + 23, floor_num) - 1;
5894 /* Extract the legal requests */
5895 n1 = I2A(j - floor_top);
5896 n2 = I2A(k - floor_top);
5898 /* Redraw if needed */
5899 if (command_see) get_item_label = show_floor(menu_line, py, px, &min_width);
5902 /* Viewing inventory */
5903 if (command_wrk == (USE_INVEN))
5905 /* Begin the prompt */
5907 sprintf(out_val, "»ý¤Áʪ:");
5909 sprintf(out_val, "Inven:");
5914 /* Build the prompt */
5916 sprintf(tmp_val, "%c-%c,'(',')',",
5918 sprintf(tmp_val, " %c-%c,'(',')',",
5920 index_to_label(i1), index_to_label(i2));
5923 strcat(out_val, tmp_val);
5926 /* Indicate ability to "view" */
5928 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5930 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5938 strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
5939 else if (allow_floor)
5940 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
5942 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
5945 strcat(out_val, " / for Equip,");
5946 else if (allow_floor)
5947 strcat(out_val, " 6 for Equip,");
5949 strcat(out_val, " 4 or 6 for Equip,");
5958 strcat(out_val, " '-'¾²¾å,");
5959 else if (allow_equip)
5960 strcat(out_val, " '4' ¾²¾å,");
5962 strcat(out_val, " '4'or'6' ¾²¾å,");
5965 strcat(out_val, " - for floor,");
5966 else if (allow_equip)
5967 strcat(out_val, " 4 for floor,");
5969 strcat(out_val, " 4 or 6 for floor,");
5974 /* Viewing equipment */
5975 else if (command_wrk == (USE_EQUIP))
5977 /* Begin the prompt */
5979 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5981 sprintf(out_val, "Equip:");
5986 /* Build the prompt */
5988 sprintf(tmp_val, "%c-%c,'(',')',",
5990 sprintf(tmp_val, " %c-%c,'(',')',",
5992 index_to_label(e1), index_to_label(e2));
5995 strcat(out_val, tmp_val);
5998 /* Indicate ability to "view" */
6000 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6002 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6010 strcat(out_val, " '/' »ý¤Áʪ,");
6011 else if (allow_floor)
6012 strcat(out_val, " '4' »ý¤Áʪ,");
6014 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6017 strcat(out_val, " / for Inven,");
6018 else if (allow_floor)
6019 strcat(out_val, " 4 for Inven,");
6021 strcat(out_val, " 4 or 6 for Inven,");
6030 strcat(out_val, " '-'¾²¾å,");
6031 else if (allow_inven)
6032 strcat(out_val, " '6' ¾²¾å,");
6034 strcat(out_val, " '4'or'6' ¾²¾å,");
6037 strcat(out_val, " - for floor,");
6038 else if (allow_inven)
6039 strcat(out_val, " 6 for floor,");
6041 strcat(out_val, " 4 or 6 for floor,");
6047 else if (command_wrk == (USE_FLOOR))
6049 /* Begin the prompt */
6051 sprintf(out_val, "¾²¾å:");
6053 sprintf(out_val, "Floor:");
6058 /* Build the prompt */
6060 sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
6062 sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
6066 strcat(out_val, tmp_val);
6069 /* Indicate ability to "view" */
6071 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6073 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6078 if (allow_inven && allow_equip)
6081 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
6083 strcat(out_val, " 4 for Equip, 6 for Inven,");
6086 else if (allow_inven)
6089 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6091 strcat(out_val, " 4 or 6 for Inven,");
6094 else if (allow_equip)
6097 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6099 strcat(out_val, " 4 or 6 for Equip,");
6104 else if (allow_inven)
6107 strcat(out_val, " '/' »ý¤Áʪ,");
6109 strcat(out_val, " / for Inven,");
6112 else if (allow_equip)
6115 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6117 strcat(out_val, " / for Equip,");
6122 if (command_see && !use_menu)
6125 strcat(out_val, " Enter ¼¡,");
6127 strcat(out_val, " Enter for scroll down,");
6134 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
6136 if (select_the_force) strcat(out_val, " w for the Force,");
6139 /* Finish the prompt */
6140 strcat(out_val, " ESC");
6142 /* Build the prompt */
6143 sprintf(tmp_val, "(%s) %s", out_val, pmt);
6145 /* Show the prompt */
6154 if (command_wrk == USE_INVEN) max_line = max_inven;
6155 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6156 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6172 menu_line += (max_line - 1);
6188 /* Verify legality */
6189 if (command_wrk == (USE_INVEN))
6191 if (allow_floor) command_wrk = USE_FLOOR;
6192 else if (allow_equip) command_wrk = USE_EQUIP;
6199 else if (command_wrk == (USE_EQUIP))
6201 if (allow_inven) command_wrk = USE_INVEN;
6202 else if (allow_floor) command_wrk = USE_FLOOR;
6209 else if (command_wrk == (USE_FLOOR))
6211 if (allow_equip) command_wrk = USE_EQUIP;
6212 else if (allow_inven) command_wrk = USE_INVEN;
6225 /* Hack -- Fix screen */
6235 /* Switch inven/equip */
6236 if (command_wrk == USE_INVEN) max_line = max_inven;
6237 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6238 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6239 if (menu_line > max_line) menu_line = max_line;
6241 /* Need to redraw */
6249 /* Verify legality */
6250 if (command_wrk == (USE_INVEN))
6252 if (allow_equip) command_wrk = USE_EQUIP;
6253 else if (allow_floor) command_wrk = USE_FLOOR;
6260 else if (command_wrk == (USE_EQUIP))
6262 if (allow_floor) command_wrk = USE_FLOOR;
6263 else if (allow_inven) command_wrk = USE_INVEN;
6270 else if (command_wrk == (USE_FLOOR))
6272 if (allow_inven) command_wrk = USE_INVEN;
6273 else if (allow_equip) command_wrk = USE_EQUIP;
6286 /* Hack -- Fix screen */
6296 /* Switch inven/equip */
6297 if (command_wrk == USE_INVEN) max_line = max_inven;
6298 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6299 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6300 if (menu_line > max_line) menu_line = max_line;
6302 /* Need to redraw */
6311 if (command_wrk == USE_FLOOR)
6314 (*cp) = -get_item_label;
6318 /* Validate the item */
6319 if (!get_item_okay(get_item_label))
6325 /* Allow player to "refuse" certain actions */
6326 if (!get_item_allow(get_item_label))
6332 /* Accept that choice */
6333 (*cp) = get_item_label;
6342 if (select_the_force) {
6350 if (menu_line > max_line) menu_line -= max_line;
6371 command_see = FALSE;
6394 cave_type *c_ptr = &cave[py][px];
6396 if (command_wrk != (USE_FLOOR)) break;
6398 /* Get the object being moved. */
6399 o_idx = c_ptr->o_idx;
6401 /* Only rotate a pile of two or more objects. */
6402 if (!(o_idx && o_list[o_idx].next_o_idx)) break;
6404 /* Remove the first object from the list. */
6405 excise_object_idx(o_idx);
6407 /* Find end of the list. */
6409 while (o_list[i].next_o_idx)
6410 i = o_list[i].next_o_idx;
6412 /* Add after the last object. */
6413 o_list[i].next_o_idx = o_idx;
6415 /* Re-scan floor list */
6416 floor_num = scan_floor(floor_list, py, px, 0x03);
6418 /* Hack -- Fix screen */
6433 if (command_wrk == (USE_INVEN))
6440 command_wrk = (USE_EQUIP);
6442 else if (command_wrk == (USE_EQUIP))
6449 command_wrk = (USE_INVEN);
6451 else if (command_wrk == (USE_FLOOR))
6455 command_wrk = (USE_INVEN);
6457 else if (allow_equip)
6459 command_wrk = (USE_EQUIP);
6468 /* Hack -- Fix screen */
6478 /* Need to redraw */
6491 * If we are already examining the floor, and there
6492 * is only one item, we will always select it.
6493 * If we aren't examining the floor and there is only
6494 * one item, we will select it if floor_query_flag
6499 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
6502 k = 0 - floor_list[0];
6504 /* Allow player to "refuse" certain actions */
6505 if (!get_item_allow(k))
6511 /* Accept that choice */
6520 /* Hack -- Fix screen */
6530 command_wrk = (USE_FLOOR);
6536 case '1': case '2': case '3':
6537 case '4': case '5': case '6':
6538 case '7': case '8': case '9':
6540 if (command_wrk != USE_FLOOR)
6542 /* Look up the tag */
6543 if (!get_tag(&k, which, command_wrk))
6549 /* Hack -- Validate the item */
6550 if ((k < INVEN_RARM) ? !inven : !equip)
6556 /* Validate the item */
6557 if (!get_item_okay(k))
6565 /* Look up the alphabetical tag */
6566 if (get_tag_floor(&k, which, floor_list, floor_num))
6569 k = 0 - floor_list[k];
6578 /* Allow player to "refuse" certain actions */
6579 if (!get_item_allow(k))
6585 /* Accept that choice */
6591 #endif /* ALLOW_REPEAT */
6599 /* Choose "default" inventory item */
6600 if (command_wrk == (USE_INVEN))
6602 k = ((i1 == i2) ? i1 : -1);
6605 /* Choose "default" equipment item */
6606 else if (command_wrk == (USE_EQUIP))
6608 k = ((e1 == e2) ? e1 : -1);
6611 /* Choose "default" floor item */
6612 else if (command_wrk == (USE_FLOOR))
6617 k = 0 - floor_list[0];
6619 /* Allow player to "refuse" certain actions */
6620 if (!get_item_allow(k))
6626 /* Accept that choice */
6634 /* Validate the item */
6635 if (!get_item_okay(k))
6641 /* Allow player to "refuse" certain actions */
6642 if (!get_item_allow(k))
6648 /* Accept that choice */
6658 if (select_the_force) {
6672 if (command_wrk != USE_FLOOR)
6674 bool not_found = FALSE;
6676 /* Look up the alphabetical tag */
6677 if (!get_tag(&k, which, command_wrk))
6682 /* Hack -- Validate the item */
6683 else if ((k < INVEN_RARM) ? !inven : !equip)
6688 /* Validate the item */
6689 else if (!get_item_okay(k))
6696 /* Accept that choice */
6702 #endif /* ALLOW_REPEAT */
6708 /* Look up the alphabetical tag */
6709 if (get_tag_floor(&k, which, floor_list, floor_num))
6712 k = 0 - floor_list[k];
6714 /* Accept that choice */
6720 #endif /* ALLOW_REPEAT */
6725 /* Extract "query" setting */
6726 ver = isupper(which);
6727 which = tolower(which);
6729 /* Convert letter to inventory index */
6730 if (command_wrk == (USE_INVEN))
6732 if (which == '(') k = i1;
6733 else if (which == ')') k = i2;
6734 else k = label_to_inven(which);
6737 /* Convert letter to equipment index */
6738 else if (command_wrk == (USE_EQUIP))
6740 if (which == '(') k = e1;
6741 else if (which == ')') k = e2;
6742 else k = label_to_equip(which);
6745 /* Convert letter to floor index */
6746 else if (command_wrk == USE_FLOOR)
6748 if (which == '(') k = 0;
6749 else if (which == ')') k = floor_num - 1;
6750 else k = islower(which) ? A2I(which) : -1;
6751 if (k < 0 || k >= floor_num || k >= 23)
6758 k = 0 - floor_list[k];
6761 /* Validate the item */
6762 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
6768 /* Verify the item */
6770 if (ver && !verify("ËÜÅö¤Ë", k))
6772 if (ver && !verify("Try", k))
6780 /* Allow player to "refuse" certain actions */
6781 if (!get_item_allow(k))
6787 /* Accept that choice */
6797 /* Fix the screen if necessary */
6803 /* Hack -- Cancel "display" */
6804 command_see = FALSE;
6808 /* Forget the item_tester_tval restriction */
6809 item_tester_tval = 0;
6811 /* Forget the item_tester_hook restriction */
6812 item_tester_hook = NULL;
6815 /* Clean up 'show choices' */
6816 /* Toggle again if needed */
6817 if (toggle) toggle_inven_equip();
6820 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6826 /* Clear the prompt line */
6829 /* Warning if needed */
6830 if (oops && str) msg_print(str);
6836 if (command_cmd) prev_tag = cur_tag;
6837 #endif /* ALLOW_REPEAT */
6839 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6847 static bool py_pickup_floor_aux(void)
6855 /* Restrict the choices */
6856 item_tester_hook = inven_carry_okay;
6860 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
6861 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
6863 q = "Get which item? ";
6864 s = "You no longer have any room for the objects on the floor.";
6867 if (get_item(&item, q, s, (USE_FLOOR)))
6869 this_o_idx = 0 - item;
6876 /* Pick up the object */
6877 py_pickup_aux(this_o_idx);
6884 * Make the player carry everything in a grid
6886 * If "pickup" is FALSE then only gold will be picked up
6888 * This is called by py_pickup() when easy_floor is TRUE.
6890 void py_pickup_floor(bool pickup)
6892 s16b this_o_idx, next_o_idx = 0;
6894 char o_name[MAX_NLEN];
6897 int floor_num = 0, floor_list[23], floor_o_idx = 0;
6901 /* Scan the pile of objects */
6902 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
6906 /* Access the object */
6907 o_ptr = &o_list[this_o_idx];
6909 /* Describe the object */
6910 object_desc(o_name, o_ptr, 0);
6912 /* Access the next object */
6913 next_o_idx = o_ptr->next_o_idx;
6915 /* Hack -- disturb */
6919 if (o_ptr->tval == TV_GOLD)
6923 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
6924 (long)o_ptr->pval, o_name);
6926 msg_format("You have found %ld gold pieces worth of %s.",
6927 (long) o_ptr->pval, o_name);
6931 /* Collect the gold */
6932 p_ptr->au += o_ptr->pval;
6935 p_ptr->redraw |= (PR_GOLD);
6938 p_ptr->window |= (PW_PLAYER);
6940 /* Delete the gold */
6941 delete_object_idx(this_o_idx);
6943 /* Check the next object */
6946 else if (o_ptr->marked & OM_NOMSG)
6948 /* If 0 or 1 non-NOMSG items are in the pile, the NOMSG ones are
6949 * ignored. Otherwise, they are included in the prompt. */
6950 o_ptr->marked &= ~(OM_NOMSG);
6954 /* Count non-gold objects that can be picked up. */
6955 if (inven_carry_okay(o_ptr))
6960 /* Remember this object index */
6962 floor_list[floor_num] = this_o_idx;
6964 /* Count non-gold objects */
6967 /* Remember this index */
6968 floor_o_idx = this_o_idx;
6971 /* There are no non-gold objects */
6975 /* Mention the number of objects */
6981 /* Access the object */
6982 o_ptr = &o_list[floor_o_idx];
6984 #ifdef ALLOW_EASY_SENSE
6986 /* Option: Make object sensing easy */
6989 /* Sense the object */
6990 (void) sense_object(o_ptr);
6993 #endif /* ALLOW_EASY_SENSE */
6995 /* Describe the object */
6996 object_desc(o_name, o_ptr, 0);
7000 msg_format("%s¤¬¤¢¤ë¡£", o_name);
7002 msg_format("You see %s.", o_name);
7007 /* Multiple objects */
7012 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
7014 msg_format("You see a pile of %d items.", floor_num);
7023 /* The player has no room for anything on the floor. */
7029 /* Access the object */
7030 o_ptr = &o_list[floor_o_idx];
7032 #ifdef ALLOW_EASY_SENSE
7034 /* Option: Make object sensing easy */
7037 /* Sense the object */
7038 (void) sense_object(o_ptr);
7041 #endif /* ALLOW_EASY_SENSE */
7043 /* Describe the object */
7044 object_desc(o_name, o_ptr, 0);
7048 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7050 msg_format("You have no room for %s.", o_name);
7055 /* Multiple objects */
7060 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7062 msg_print("You have no room for any of the objects on the floor.");
7074 /* Hack -- query every object */
7075 if (carry_query_flag)
7077 char out_val[MAX_NLEN+20];
7079 /* Access the object */
7080 o_ptr = &o_list[floor_o_idx];
7082 #ifdef ALLOW_EASY_SENSE
7084 /* Option: Make object sensing easy */
7087 /* Sense the object */
7088 (void) sense_object(o_ptr);
7091 #endif /* ALLOW_EASY_SENSE */
7093 /* Describe the object */
7094 object_desc(o_name, o_ptr, 0);
7096 /* Build a prompt */
7098 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7100 (void) sprintf(out_val, "Pick up %s? ", o_name);
7104 /* Ask the user to confirm */
7105 if (!get_check(out_val))
7112 /* Access the object */
7113 o_ptr = &o_list[floor_o_idx];
7115 #ifdef ALLOW_EASY_SENSE
7117 /* Option: Make object sensing easy */
7120 /* Sense the object */
7121 (void) sense_object(o_ptr);
7124 #endif /* ALLOW_EASY_SENSE */
7126 /* Pick up the object */
7127 py_pickup_aux(floor_o_idx);
7130 /* Allow the user to choose an object */
7133 while (can_pickup--)
7135 if (!py_pickup_floor_aux()) break;
7140 #endif /* ALLOW_EASY_FLOOR */