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 "Ã⩹¶·â(100) : 100+d100 ¥¿¡¼¥óËè";
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 "³²Ãî¤Î¶î½ü : 55+d55¥¿¡¼¥óËè";
435 case ACT_BLINDING_LIGHT:
436 return "âÁ¤·¤¤¸÷ : 250 ¥¿¡¼¥óËè";
438 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
440 return "¼þ°Ï¤Î¥â¥ó¥¹¥¿¡¼¤ò̲¤é¤»¤ë : 55 ¥¿¡¼¥óËè";
442 return "ÃÏ¿Ì (Ⱦ·Â 10) : 50 ¥¿¡¼¥óËè";
444 return "¶²¹² : 3 * (level+10) ¥¿¡¼¥óËè";
446 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
447 case ACT_BANISH_EVIL:
448 return "¼Ù°¾ÃÌÇ : 250+d250 ¥¿¡¼¥óËè";
450 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
452 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
453 case ACT_CHARM_ANIMAL:
454 return "ưʪ̥λ : 200 ¥¿¡¼¥óËè";
455 case ACT_CHARM_UNDEAD:
456 return "¥¢¥ó¥Ç¥Ã¥É½¾Â° : 333 ¥¿¡¼¥óËè";
457 case ACT_CHARM_OTHER:
458 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 400 ¥¿¡¼¥óËè";
459 case ACT_CHARM_ANIMALS:
460 return "ưʪͧÏ : 500 ¥¿¡¼¥óËè";
461 case ACT_CHARM_OTHERS:
462 return "¼þÊÕ̥λ : 750 ¥¿¡¼¥óËè";
463 case ACT_SUMMON_ANIMAL:
464 return "ưʪ¾¤´ : 200+d300 ¥¿¡¼¥óËè";
465 case ACT_SUMMON_PHANTOM:
466 return "¸¸Î´ : 200+d200 ¥¿¡¼¥óËè";
467 case ACT_SUMMON_ELEMENTAL:
468 return "¥¨¥ì¥á¥ó¥¿¥ë¾¤´ : 750 ¥¿¡¼¥óËè";
469 case ACT_SUMMON_DEMON:
470 return "°Ë⾤´ : 666+d333 ¥¿¡¼¥óËè";
471 case ACT_SUMMON_UNDEAD:
472 return "¥¢¥ó¥Ç¥Ã¥É¾¤´ : 666+d333 ¥¿¡¼¥óËè";
473 case ACT_CHOIR_SINGS:
474 return "²óÉü (777)¡¢Ìþ¤·¡¢»Îµ¤¹âÍÈ : 300 ¥¿¡¼¥óËè";
476 return "¶²Éݽüµî/ÂÎÎϲóÉü(30) : 10 ¥¿¡¼¥óËè";
478 return "½ý²óÉü(4d8) : 3+d3 ¥¿¡¼¥óËè";
479 case ACT_CURE_POISON:
480 return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
482 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
484 return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃÍÉü³è : 750 ¥¿¡¼¥óËè";
486 return "ÂÎÎϲóÉü(700) : 250 ¥¿¡¼¥óËè";
488 return "ÂÎÎϲóÉü(1000) : 888 ¥¿¡¼¥óËè";
490 return "Ìþ¤· : 100¥¿¡¼¥óËè";
491 case ACT_CURE_MANA_FULL:
492 return "ËâÎÏÉü³è: 777 ¥¿¡¼¥óËè";
494 return "¥Æ¥ì¥Ñ¥·¡¼ (´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
496 return "»Îµ¤¹âÍȤȽËÊ¡ (´ü´Ö 50+d50) : 100+d100 ¥¿¡¼¥óËè";
498 return "Âмٰ·ë³¦ (´ü´Ö level*3 + d25) : 200+d200 ¥¿¡¼¥óËè";
500 return "Á´ÂÑÀ (´ü´Ö 20+d20) : 111 ¥¿¡¼¥óËè";
502 return "²Ã® (´ü´Ö 20+d20) : 250 ¥¿¡¼¥óËè";
504 return "²Ã® (´ü´Ö 75+d75) : 200+d200 ¥¿¡¼¥óËè";
506 return "Í©Âβ½ (´ü´Ö level/2 + d(level/2)) : 1000 ¥¿¡¼¥óËè";
508 return "̵Ũ²½ (´ü´Ö 8+d8) : 1000 ¥¿¡¼¥óËè";
510 return "»Îµ¤¹âÍÈ : 30+d30¥¿¡¼¥óËè";
512 return "»Îµ¤¹âÍÈ, ¥¹¥Ô¡¼¥É(50+d50¥¿¡¼¥ó) : 100+d200 ¥¿¡¼¥óËè";
514 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
516 return "ËâË¡¤ÎÃϿޤȸ÷ : 50+d50 ¥¿¡¼¥óËè";
518 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
519 case ACT_DETECT_XTRA:
520 return "Á´´¶ÃΡ¢Ãµº÷¡¢*´ÕÄê* : 100 ¥¿¡¼¥óËè";
522 return "*´ÕÄê* : 75 ¥¿¡¼¥óËè";
524 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
526 return "Çúȯ¤Î¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
528 return "¼é¤ê¤Î¥ë¡¼¥ó : 400 ¥¿¡¼¥óËè";
530 return "¶õÊ¢½¼Â : 200 ¥¿¡¼¥óËè";
532 return "¥É¥¢Ç˲õ : 10 ¥¿¡¼¥óËè";
534 return "´äÀÐÍϲò : 3 ¥¿¡¼¥óËè";
536 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
538 return "Ï£¶â½Ñ : 500 ¥¿¡¼¥óËè";
540 return "¼¡¸µ¤ÎÈâ : 100 ¥¿¡¼¥óËè";
542 return "¥Æ¥ì¥Ý¡¼¥È (range 100) : 25 ¥¿¡¼¥óËè";
544 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
545 case ACT_TELEKINESIS:
546 return "ʪÂΤò°ú¤´ó¤»¤ë(½ÅÎÌ25kg¤Þ¤Ç) : 25+d25¥¿¡¼¥óËè";
547 case ACT_DETECT_UNIQUE:
548 return "¤³¤Î³¬¤Ë¤¤¤ë¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òɽ¼¨ : 200¥¿¡¼¥óËè";
550 /* Unique activation */
551 case ACT_BRAND_FIRE_BOLTS:
552 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
554 return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô : 20+d20 ¥¿¡¼¥óËè";
556 return "¿®¤¸Æñ¤¤¤³¤È : 450+d450 ¥¿¡¼¥óËè";
561 /* General activation */
564 return "beam of sunlight every 10 turns";
566 return "magic missile (2d6) every 2 turns";
568 return "stinking cloud (12) every 4+d4 turns";
570 return "lightning bolt (4d8) every 5+d5 turns";
572 return "acid bolt (5d8) every 6+d6 turns";
574 return "frost bolt (6d8) every 7+d7 turns";
576 return "fire bolt (9d8) every 8+d8 turns";
578 return "ball of cold (48) every 6+d6 turns";
580 return "ball of fire (72) every 9+d9 turns";
582 return "a strangling attack (100) every 100+d100 turns";
584 return "ball of cold (100) every 12+d12 turns";
586 return "ball of lightning (100) every 12+d12 turns";
588 return "drain life (120) every 400 turns";
590 return "vampiric drain (3*50) every 400 turns";
592 return "arrows (150) every 90+d90 turns";
594 return "fire ball (300) every 225+d225 turns";
596 return "ball of cold (400) every 325+d325 turns";
598 return "ball of lightning (500) every 425+d425 turns";
600 return "whirlwind attack every 250 turns";
602 return "vampiric drain (3*100) every 400 turns";
604 return "call chaos every 350 turns";
606 return "launch rocket (120+level) every 400 turns";
608 return "dispel evil (x5) every 100+d100 turns";
610 return "elemental breath (300) every 500 turns";
612 return "dispel good (x5) every 100+d100 turns";
614 return "a magical arrow (150) every 90+d90 turns";
616 return "large fire ball (120) every 15 turns";
618 return "water ball (200) every 250 turns";
620 return "large star ball (200) every 200+d200 turns";
622 return "darkness storm (250) every 150+d150 turns";
624 return "a mana storm every 250+d250 turns";
626 return "dispel small life every 55+d55 turns";
627 case ACT_BLINDING_LIGHT:
628 return "blinding light every 250 turns";
630 return "confuse monster every 15 turns";
632 return "sleep nearby monsters every 55 turns";
634 return "earthquake (rad 10) every 50 turns";
636 return "terror every 3 * (level+10) turns";
638 return "teleport away every 200 turns";
639 case ACT_BANISH_EVIL:
640 return "banish evil every 250+d250 turns";
642 return "genocide every 500 turns";
644 return "mass genocide every 1000 turns";
645 case ACT_CHARM_ANIMAL:
646 return "charm animal every 200 turns";
647 case ACT_CHARM_UNDEAD:
648 return "enslave undead every 333 turns";
649 case ACT_CHARM_OTHER:
650 return "charm monster every 400 turns";
651 case ACT_CHARM_ANIMALS:
652 return "animal friendship every 500 turns";
653 case ACT_CHARM_OTHERS:
654 return "mass charm every 750 turns";
655 case ACT_SUMMON_ANIMAL:
656 return "summon animal every 200+d300 turns";
657 case ACT_SUMMON_PHANTOM:
658 return "summon phantasmal servant every 200+d200 turns";
659 case ACT_SUMMON_ELEMENTAL:
660 return "summon elemental every 750 turns";
661 case ACT_SUMMON_DEMON:
662 return "summon demon every 666+d333 turns";
663 case ACT_SUMMON_UNDEAD:
664 return "summon undead every 666+d333 turns";
665 case ACT_CHOIR_SINGS:
666 return "heal 777 hit points, curing and heloism every 300 turns";
668 return "remove fear and heal 30 hp every 10 turns";
670 return "heal 4d8 and wounds every 3+d3 turns";
671 case ACT_CURE_POISON:
672 return "remove fear and cure poison every 5 turns";
674 return "restore life levels every 450 turns";
676 return "restore stats and life levels every 750 turns";
678 return "heal 700 hit points every 250 turns";
680 return "heal 1000 hit points every 888 turns";
682 return "curing every 100 turns";
683 case ACT_CURE_MANA_FULL:
684 return "restore mana every 777 turns";
686 return "telepathy (dur 25+d30) every 200 turns";
688 return "heroism and blessed (dur 50+d50) every 100+d100 turns";
690 return "protect evil (dur level*3 + d25) every 200+d200 turns";
692 return "resist elements (dur 20+d20) every 111 turns";
694 return "speed (dur 20+d20) every 100+d100 turns";
696 return "speed (dur 75+d75) every 100+d100 turns";
698 return "wraith form (dur level/2 + d(level/2)) every 1000 turns";
700 return "invulnerability (dur 8+d8) every 1000 turns";
702 return "heroism every 30+d30 turns";
704 return "hero and +10 to speed (50) every 100+200d turns";
705 case ACT_RESIST_ACID:
706 return "resist acid (dur 20+d20) every 40+d40 turns";
707 case ACT_RESIST_FIRE:
708 return "resist fire (dur 20+d20) every 40+d40 turns";
709 case ACT_RESIST_COLD:
710 return "resist cold (dur 20+d20) every 40+d40 turns";
711 case ACT_RESIST_ELEC:
712 return "resist thunder (dur 20+d20) every 40+d40 turns";
713 case ACT_RESIST_POIS:
714 return "resist poison (dur 20+d20) every 40+d40 turns";
716 return "light area (dam 2d15) every 10+d10 turns";
718 return "light (dam 2d15) & map area every 50+d50 turns";
720 return "detection every 55+d55 turns";
721 case ACT_DETECT_XTRA:
722 return "detection, probing and identify true every 100 turns";
724 return "identify true every 75 turns";
726 return "identify spell every 10 turns";
728 return "explosive rune every 200 turns";
730 return "rune of protection every 400 turns";
732 return "satisfy hunger every 200 turns";
734 return "destroy doors every 10 turns";
736 return "stone to mud every 3 turns";
738 return "recharging every 70 turns";
740 return "alchemy every 500 turns";
742 return "dimension door every 100 turns";
744 return "teleport (range 100) every 25 turns";
746 return "word of recall every 200 turns";
747 case ACT_TELEKINESIS:
748 return "a telekinesis (500 lb) every 25+d25 turns";
749 case ACT_DETECT_UNIQUE:
750 return "list of the uniques on the level every 200 turns";
752 /* Unique activation */
753 case ACT_BRAND_FIRE_BOLTS:
754 return "fire branding of bolts every 999 turns";
756 return "clairvoyance and recall, draining you every 20+d20 turns";
758 return "bizarre things every 450+d450 turns";
761 return "something undefined";
766 /* Some artifacts can be activated */
767 switch (o_ptr->name1)
772 return "¶Ç¤Î»ÕÃľ¤´ : 500+d500 ¥¿¡¼¥óËè";
774 return "summon the Legion of the Dawn every 500+d500 turns";
780 return "¥Õ¥¡¥¤¥¢¡ª : 15 ¥¿¡¼¥óËè";
782 return "fire! every 15 turns";
789 return "ƨÁö : 35 ¥¿¡¼¥óËè";
791 return "a getaway every 35 turns";
797 return "¥¹¥¿¡¼¡¦¥Ü¡¼¥ë¡¦¥À¥¹¥È(150) : 1000 ¥¿¡¼¥óËè";
799 return "star balls (150) every 1000 turns";
802 case ART_BLADETURNER:
805 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300), »Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢ÂÑÀ";
807 return "breathe elements (300), hero, bless, and resistance";
813 return "´í¸±¤òȼ¤¦´ÕÄê : ¤¤¤Ä¤Ç¤â";
815 return "perilous identify every turn";
821 return "¥â¥ó¥¹¥¿¡¼¶²¹² : 40+d40¥¿¡¼¥óËè";
823 return "frighten monsters every 40+d40 turns";
829 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
831 return "recharge item every 200 turns";
837 return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë";
839 return "increase STR (destroyed 50%)";
845 return "Îã¤Î¥¢¥ì : 150+d150 ¥¿¡¼¥óËè";
847 return "reveal your identity every 150+d150 turns";
853 return "Çï»ÒÌÚ¤òÂǤÁ¤Ê¤é¤¹ : ¤¤¤Ä¤Ç¤â";
855 return "beat wooden clappers every turn";
861 return "°ÀÊѹ¹ : 3333 ¥¿¡¼¥óËè";
863 return "change zokusei every 3333 turns";
870 return "»Í¸ÔƧ¤ß : 100+d100¥¿¡¼¥óËè";
872 return "shiko every 100+d100 turns";
879 return "Î䵤¤ÎÂÑÀ : 40+d40¥¿¡¼¥óËè";
881 return "resist cold every 40+d40 turns";
888 return "Âý¤ÎÂç·²¾¤´ : 300+d150¥¿¡¼¥óËè";
890 return "summon octopus every 300+d150 turns";
893 case ART_SACRED_KNIGHTS:
896 return "*²ò¼ö*¤ÈÄ´ºº: ¤¤¤Ä¤Ç¤â";
898 return "dispel curse and probing every turn";
905 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_TSURIZAO))
908 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
910 return "fishing : every time";
914 if (object_is_smith(o_ptr))
916 switch (o_ptr->xtra3 - 1)
918 case ESSENCE_TMP_RES_ACID:
920 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
922 return "resist acid every 50+d50 turns";
925 case ESSENCE_TMP_RES_ELEC:
927 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
929 return "resist elec every 50+d50 turns";
932 case ESSENCE_TMP_RES_FIRE:
934 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
936 return "resist fire every 50+d50 turns";
939 case ESSENCE_TMP_RES_COLD:
941 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
943 return "resist cold every 50+d50 turns";
948 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
950 return "earthquake every 100+d100 turns";
955 if (o_ptr->name2 == EGO_TRUMP)
958 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
960 return "teleport every 50+d50 turns";
965 if (o_ptr->name2 == EGO_LITE_ILLUMINATION)
968 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
970 return "illumination every 10+d10 turns";
974 else if (o_ptr->name2 == EGO_EARTHQUAKES)
977 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
979 return "earthquake every 100+d100 turns";
984 else if (o_ptr->name2 == EGO_JUMP)
987 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
989 return "blink every 10+d10 turns";
994 if (o_ptr->tval == TV_RING)
996 if (object_is_ego(o_ptr))
998 switch (o_ptr->name2)
1002 return "»Îµ¤¹âÍÈ : 100+d100¥¿¡¼¥óËè";
1004 return "heroism every 100+d100 turns";
1006 case EGO_RING_MAGIC_MIS:
1008 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
1010 return "magic missile (2d6) every 2 turns";
1012 case EGO_RING_FIRE_BOLT:
1014 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
1016 return "fire bolt (9d8) every 8+d8 turns";
1018 case EGO_RING_COLD_BOLT:
1020 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
1022 return "frost bolt (6d8) every 7+d7 turns";
1024 case EGO_RING_ELEC_BOLT:
1026 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
1028 return "lightning bolt (4d8) every 5+d5 turns";
1030 case EGO_RING_ACID_BOLT:
1032 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
1034 return "acid bolt (5d8) every 6+d6 turns";
1036 case EGO_RING_MANA_BOLT:
1038 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
1040 return "a mana bolt (120) every 120+d120 turns";
1042 case EGO_RING_FIRE_BALL:
1044 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1046 return "fire ball (100) every 80+d80 turns";
1048 case EGO_RING_COLD_BALL:
1050 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1052 return "cold ball (100) every 80+d80 turns";
1054 case EGO_RING_ELEC_BALL:
1056 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1058 return "elec ball (100) every 80+d80 turns";
1060 case EGO_RING_ACID_BALL:
1062 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1064 return "acid ball (100) every 80+d80 turns";
1066 case EGO_RING_MANA_BALL:
1068 return "ËâÎϤÎÍò (250) : 300 ¥¿¡¼¥óËè";
1070 return "mana storm (250) every 300 turns";
1072 case EGO_RING_DRAGON_F:
1073 if (o_ptr->sval == SV_RING_FLAMES)
1075 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) ¤È²Ð¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
1077 return "breath of fire (200) and resist fire every 200 turns";
1081 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
1083 return "fire breath (200) every 250 turns";
1085 case EGO_RING_DRAGON_C:
1086 if (o_ptr->sval == SV_RING_ICE)
1088 return "Î䵤¤Î¥Ö¥ì¥¹ (200) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
1090 return "breath of cold (200) and resist cold every 200 turns";
1094 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
1096 return "cold breath (200) every 250 turns";
1098 case EGO_RING_M_DETECT:
1100 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃÎ : 150 ¥¿¡¼¥óËè";
1102 return "detect all monsters every 150 turns";
1104 case EGO_RING_D_SPEED:
1106 return "¥¹¥Ô¡¼¥É(15+d30¥¿¡¼¥ó) : 100 ¥¿¡¼¥óËè";
1108 return "haste self (15+d30 turns) every 100 turns";
1110 case EGO_RING_BERSERKER:
1112 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
1114 return "berserk (25+d25 turns) every 75+d75 turns";
1116 case EGO_RING_TELE_AWAY:
1118 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
1120 return "teleport away every 150 turns";
1124 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ : 777 ¥¿¡¼¥óËè";
1126 return "hero, bless, and ultimate resistance every 777 turns";
1130 switch (o_ptr->sval)
1132 case SV_RING_FLAMES:
1134 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) ¤È²Ð¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1136 return "ball of fire (100) and resist fire every 50+d50 turns";
1141 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1143 return "ball of cold (100) and resist cold every 50+d50 turns";
1148 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) ¤È»À¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1150 return "ball of acid (100) and resist acid every 50+d50 turns";
1155 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) ¤ÈÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1157 return "ball of elec (100) and resist elec every 50+d50 turns";
1165 if (o_ptr->tval == TV_AMULET)
1167 if (object_is_ego(o_ptr))
1169 switch (o_ptr->name2)
1173 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
1175 return "identify every 10 turns";
1179 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
1181 return "charm monster every 200 turns";
1185 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1187 return "blink every 10+d10 turns";
1189 case EGO_AMU_TELEPORT:
1191 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
1193 return "teleport every 50+d50 turns";
1195 case EGO_AMU_D_DOOR:
1197 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
1199 return "dimension door every 200 turns";
1201 case EGO_AMU_RES_FIRE_:
1203 return "²Ð±ê¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1205 return "resist fire every 50+d50 turns";
1207 case EGO_AMU_RES_COLD_:
1209 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1211 return "resist cold every 50+d50 turns";
1213 case EGO_AMU_RES_ELEC_:
1215 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1217 return "resist elec every 50+d50 turns";
1219 case EGO_AMU_RES_ACID_:
1221 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1223 return "resist acid every 50+d50 turns";
1225 case EGO_AMU_DETECTION:
1227 return "Á´´¶ÃÎ : 55+d55¥¿¡¼¥óËè";
1229 return "detect all floor every 55+d55 turns";
1235 if (o_ptr->tval == TV_WHISTLE)
1238 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
1240 return "call pet every 100+d100 turns";
1244 if (o_ptr->tval == TV_CAPTURE)
1247 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
1249 return "captures or releases a monster.";
1253 /* Require dragon scale mail */
1255 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
1257 if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
1261 /* Branch on the sub-type */
1262 switch (o_ptr->sval)
1264 case SV_DRAGON_BLUE:
1267 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
1269 return "breathe lightning (100) every 150+d150 turns";
1273 case SV_DRAGON_WHITE:
1276 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
1278 return "breathe frost (110) every 150+d150 turns";
1282 case SV_DRAGON_BLACK:
1285 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
1287 return "breathe acid (130) every 150+d150 turns";
1291 case SV_DRAGON_GREEN:
1294 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
1296 return "breathe poison gas (150) every 180+d180 turns";
1303 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
1305 return "breathe fire (200) every 200+d200 turns";
1309 case SV_DRAGON_MULTIHUED:
1312 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
1314 return "breathe multi-hued (250) every 200+d200 turns";
1318 case SV_DRAGON_BRONZE:
1321 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
1323 return "breathe confusion (120) every 180+d180 turns";
1327 case SV_DRAGON_GOLD:
1330 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
1332 return "breathe sound (130) every 180+d180 turns";
1336 case SV_DRAGON_CHAOS:
1339 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
1341 return "breathe chaos/disenchant (220) every 200+d200 turns";
1348 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
1350 return "breathe sound/shards (230) every 200+d200 turns";
1354 case SV_DRAGON_BALANCE:
1357 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
1359 return "breathe balance (250) every 200+d200 turns";
1363 case SV_DRAGON_SHINING:
1366 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
1368 return "breathe light/darkness (200) every 200+d200 turns";
1372 case SV_DRAGON_POWER:
1375 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
1377 return "breathe the elements (300) every 200+d200 turns";
1387 return "breathe air";
1394 * Describe a "fully identified" item
1396 bool screen_object(object_type *o_ptr, u32b mode)
1400 u32b flgs[TR_FLAG_SIZE];
1404 char o_name[MAX_NLEN];
1407 int trivial_info = 0;
1409 /* Extract the flags */
1410 object_flags(o_ptr, flgs);
1412 /* Extract the description */
1414 roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
1415 (k_text + k_info[o_ptr->k_idx].text),
1416 77 - 15, temp, sizeof(temp));
1417 for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
1418 { info[i] = &temp[j]; i++;}
1421 if (object_is_equipment(o_ptr))
1423 /* Descriptions of a basic equipment is just a flavor */
1427 /* Mega-Hack -- describe activation */
1428 if (have_flag(flgs, TR_ACTIVATE))
1431 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
1433 info[i++] = "It can be activated for...";
1436 info[i++] = item_activation(o_ptr);
1438 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
1440 info[i++] = "...if it is being worn.";
1445 /* Figurines, a hack */
1446 if (o_ptr->tval == TV_FIGURINE)
1449 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
1451 info[i++] = "It will transform into a pet when thrown.";
1456 /* Figurines, a hack */
1457 if (o_ptr->name1 == ART_STONEMASK)
1460 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
1462 info[i++] = "It makes you turn into a vampire permanently.";
1467 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
1470 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
1472 info[i++] = "It will attempt to kill a monster instantly.";
1477 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
1480 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
1482 info[i++] = "It causes you to strike yourself sometimes.";
1486 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
1488 info[i++] = "It always penetrates invulnerability barriers.";
1492 if (o_ptr->name2 == EGO_2WEAPON)
1495 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
1497 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
1502 if (have_flag(flgs, TR_EASY_SPELL))
1505 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
1507 info[i++] = "It affects your ability to cast spells.";
1511 if (o_ptr->name2 == EGO_AMU_FOOL)
1514 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
1516 info[i++] = "It interferes with casting spells.";
1520 if (o_ptr->name2 == EGO_RING_THROW)
1523 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
1525 info[i++] = "It provides great strength when you throw an item.";
1529 if (o_ptr->name2 == EGO_AMU_NAIVETY)
1532 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
1534 info[i++] = "It decreases your magic resistance.";
1538 if (o_ptr->tval == TV_STATUE)
1540 monster_race *r_ptr = &r_info[o_ptr->pval];
1542 if (o_ptr->pval == MON_BULLGATES)
1544 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
1546 info[i++] = "It is shameful.";
1548 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
1550 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
1552 info[i++] = "It is fearful.";
1556 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
1558 info[i++] = "It is cheerful.";
1562 /* Hack -- describe lite's */
1563 if (o_ptr->tval == TV_LITE)
1565 if (o_ptr->name2 == EGO_LITE_DARKNESS)
1568 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
1570 info[i++] = "It provides no light.";
1573 if (o_ptr->sval == SV_LITE_FEANOR)
1576 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-3)¡£";
1578 info[i++] = "It decreases radius of light source by 3.";
1581 else if (o_ptr->sval == SV_LITE_LANTERN)
1584 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
1586 info[i++] = "It decreases radius of light source by 2.";
1592 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
1594 info[i++] = "It decreases radius of light source by 1.";
1598 else if (object_is_fixed_artifact(o_ptr))
1601 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1603 info[i++] = "It provides light (radius 3) forever.";
1607 else if (o_ptr->name2 == EGO_LITE_SHINE)
1609 if (o_ptr->sval == SV_LITE_FEANOR)
1612 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1614 info[i++] = "It provides light (radius 3) forever.";
1618 else if (o_ptr->sval == SV_LITE_LANTERN)
1621 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1623 info[i++] = "It provides light (radius 3) when fueled.";
1630 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1632 info[i++] = "It provides light (radius 2) when fueled.";
1639 if (o_ptr->sval == SV_LITE_FEANOR)
1642 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1644 info[i++] = "It provides light (radius 2) forever.";
1648 else if (o_ptr->sval == SV_LITE_LANTERN)
1651 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1653 info[i++] = "It provides light (radius 2) when fueled.";
1660 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
1662 info[i++] = "It provides light (radius 1) when fueled.";
1667 if (o_ptr->name2 == EGO_LITE_LONG)
1670 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
1672 info[i++] = "It provides light for much longer time.";
1678 /* And then describe it fully */
1680 if (have_flag(flgs, TR_RIDING))
1682 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
1684 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
1686 info[i++] = "It is made for use while riding.";
1691 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
1693 info[i++] = "It is suitable for use while riding.";
1695 /* This information is not important enough */
1699 if (have_flag(flgs, TR_STR))
1702 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1704 info[i++] = "It affects your strength.";
1708 if (have_flag(flgs, TR_INT))
1711 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1713 info[i++] = "It affects your intelligence.";
1717 if (have_flag(flgs, TR_WIS))
1720 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1722 info[i++] = "It affects your wisdom.";
1726 if (have_flag(flgs, TR_DEX))
1729 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1731 info[i++] = "It affects your dexterity.";
1735 if (have_flag(flgs, TR_CON))
1738 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1740 info[i++] = "It affects your constitution.";
1744 if (have_flag(flgs, TR_CHR))
1747 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1749 info[i++] = "It affects your charisma.";
1754 if (have_flag(flgs, TR_MAGIC_MASTERY))
1757 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1759 info[i++] = "It affects your ability to use magic devices.";
1763 if (have_flag(flgs, TR_STEALTH))
1766 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1768 info[i++] = "It affects your stealth.";
1772 if (have_flag(flgs, TR_SEARCH))
1775 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1777 info[i++] = "It affects your searching.";
1781 if (have_flag(flgs, TR_INFRA))
1784 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1786 info[i++] = "It affects your infravision.";
1790 if (have_flag(flgs, TR_TUNNEL))
1793 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1795 info[i++] = "It affects your ability to tunnel.";
1799 if (have_flag(flgs, TR_SPEED))
1802 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1804 info[i++] = "It affects your speed.";
1808 if (have_flag(flgs, TR_BLOWS))
1811 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1813 info[i++] = "It affects your attack speed.";
1818 if (have_flag(flgs, TR_BRAND_ACID))
1821 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1823 info[i++] = "It does extra damage from acid.";
1827 if (have_flag(flgs, TR_BRAND_ELEC))
1830 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1832 info[i++] = "It does extra damage from electricity.";
1836 if (have_flag(flgs, TR_BRAND_FIRE))
1839 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1841 info[i++] = "It does extra damage from fire.";
1845 if (have_flag(flgs, TR_BRAND_COLD))
1848 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1850 info[i++] = "It does extra damage from frost.";
1855 if (have_flag(flgs, TR_BRAND_POIS))
1858 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
1860 info[i++] = "It poisons your foes.";
1865 if (have_flag(flgs, TR_CHAOTIC))
1868 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
1870 info[i++] = "It produces chaotic effects.";
1875 if (have_flag(flgs, TR_VAMPIRIC))
1878 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
1880 info[i++] = "It drains life from your foes.";
1885 if (have_flag(flgs, TR_IMPACT))
1888 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
1890 info[i++] = "It can cause earthquakes.";
1895 if (have_flag(flgs, TR_VORPAL))
1898 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1900 info[i++] = "It is very sharp and can cut your foes.";
1905 if (have_flag(flgs, TR_KILL_DRAGON))
1908 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1910 info[i++] = "It is a great bane of dragons.";
1914 else if (have_flag(flgs, TR_SLAY_DRAGON))
1917 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1919 info[i++] = "It is especially deadly against dragons.";
1924 if (have_flag(flgs, TR_KILL_ORC))
1927 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1929 info[i++] = "It is a great bane of orcs.";
1933 if (have_flag(flgs, TR_SLAY_ORC))
1936 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1938 info[i++] = "It is especially deadly against orcs.";
1943 if (have_flag(flgs, TR_KILL_TROLL))
1946 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1948 info[i++] = "It is a great bane of trolls.";
1952 if (have_flag(flgs, TR_SLAY_TROLL))
1955 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1957 info[i++] = "It is especially deadly against trolls.";
1962 if (have_flag(flgs, TR_KILL_GIANT))
1965 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1967 info[i++] = "It is a great bane of giants.";
1970 else if (have_flag(flgs, TR_SLAY_GIANT))
1973 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1975 info[i++] = "It is especially deadly against giants.";
1980 if (have_flag(flgs, TR_KILL_DEMON))
1983 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1985 info[i++] = "It is a great bane of demons.";
1989 if (have_flag(flgs, TR_SLAY_DEMON))
1992 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
1994 info[i++] = "It strikes at demons with holy wrath.";
1999 if (have_flag(flgs, TR_KILL_UNDEAD))
2002 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2004 info[i++] = "It is a great bane of undead.";
2008 if (have_flag(flgs, TR_SLAY_UNDEAD))
2011 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2013 info[i++] = "It strikes at undead with holy wrath.";
2018 if (have_flag(flgs, TR_KILL_EVIL))
2021 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2023 info[i++] = "It is a great bane of evil monsters.";
2027 if (have_flag(flgs, TR_SLAY_EVIL))
2030 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
2032 info[i++] = "It fights against evil with holy fury.";
2037 if (have_flag(flgs, TR_KILL_ANIMAL))
2040 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2042 info[i++] = "It is a great bane of natural creatures.";
2046 if (have_flag(flgs, TR_SLAY_ANIMAL))
2049 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2051 info[i++] = "It is especially deadly against natural creatures.";
2056 if (have_flag(flgs, TR_KILL_HUMAN))
2059 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2061 info[i++] = "It is a great bane of humans.";
2065 if (have_flag(flgs, TR_SLAY_HUMAN))
2068 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2070 info[i++] = "It is especially deadly against humans.";
2075 if (have_flag(flgs, TR_FORCE_WEAPON))
2078 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
2080 info[i++] = "It powerfully strikes at a monster using your mana.";
2084 if (have_flag(flgs, TR_DEC_MANA))
2087 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
2089 info[i++] = "It decreases your mana consumption.";
2093 if (have_flag(flgs, TR_SUST_STR))
2096 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
2098 info[i++] = "It sustains your strength.";
2102 if (have_flag(flgs, TR_SUST_INT))
2105 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
2107 info[i++] = "It sustains your intelligence.";
2111 if (have_flag(flgs, TR_SUST_WIS))
2114 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
2116 info[i++] = "It sustains your wisdom.";
2120 if (have_flag(flgs, TR_SUST_DEX))
2123 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
2125 info[i++] = "It sustains your dexterity.";
2129 if (have_flag(flgs, TR_SUST_CON))
2132 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
2134 info[i++] = "It sustains your constitution.";
2138 if (have_flag(flgs, TR_SUST_CHR))
2141 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
2143 info[i++] = "It sustains your charisma.";
2148 if (have_flag(flgs, TR_IM_ACID))
2151 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2153 info[i++] = "It provides immunity to acid.";
2157 if (have_flag(flgs, TR_IM_ELEC))
2160 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2162 info[i++] = "It provides immunity to electricity.";
2166 if (have_flag(flgs, TR_IM_FIRE))
2169 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2171 info[i++] = "It provides immunity to fire.";
2175 if (have_flag(flgs, TR_IM_COLD))
2178 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2180 info[i++] = "It provides immunity to cold.";
2185 if (have_flag(flgs, TR_THROW))
2188 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2190 info[i++] = "It is perfectly balanced for throwing.";
2194 if (have_flag(flgs, TR_FREE_ACT))
2197 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2199 info[i++] = "It provides immunity to paralysis.";
2203 if (have_flag(flgs, TR_HOLD_LIFE))
2206 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
2208 info[i++] = "It provides resistance to life draining.";
2212 if (have_flag(flgs, TR_RES_FEAR))
2215 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
2217 info[i++] = "It makes you completely fearless.";
2221 if (have_flag(flgs, TR_RES_ACID))
2224 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2226 info[i++] = "It provides resistance to acid.";
2230 if (have_flag(flgs, TR_RES_ELEC))
2233 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2235 info[i++] = "It provides resistance to electricity.";
2239 if (have_flag(flgs, TR_RES_FIRE))
2242 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2244 info[i++] = "It provides resistance to fire.";
2248 if (have_flag(flgs, TR_RES_COLD))
2251 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2253 info[i++] = "It provides resistance to cold.";
2257 if (have_flag(flgs, TR_RES_POIS))
2260 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2262 info[i++] = "It provides resistance to poison.";
2267 if (have_flag(flgs, TR_RES_LITE))
2270 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2272 info[i++] = "It provides resistance to light.";
2276 if (have_flag(flgs, TR_RES_DARK))
2279 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2281 info[i++] = "It provides resistance to dark.";
2286 if (have_flag(flgs, TR_RES_BLIND))
2289 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2291 info[i++] = "It provides resistance to blindness.";
2295 if (have_flag(flgs, TR_RES_CONF))
2298 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2300 info[i++] = "It provides resistance to confusion.";
2304 if (have_flag(flgs, TR_RES_SOUND))
2307 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2309 info[i++] = "It provides resistance to sound.";
2313 if (have_flag(flgs, TR_RES_SHARDS))
2316 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2318 info[i++] = "It provides resistance to shards.";
2323 if (have_flag(flgs, TR_RES_NETHER))
2326 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2328 info[i++] = "It provides resistance to nether.";
2332 if (have_flag(flgs, TR_RES_NEXUS))
2335 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2337 info[i++] = "It provides resistance to nexus.";
2341 if (have_flag(flgs, TR_RES_CHAOS))
2344 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2346 info[i++] = "It provides resistance to chaos.";
2350 if (have_flag(flgs, TR_RES_DISEN))
2353 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2355 info[i++] = "It provides resistance to disenchantment.";
2360 if (have_flag(flgs, TR_LEVITATION))
2363 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2365 info[i++] = "It allows you to levitate.";
2369 if (have_flag(flgs, TR_LITE))
2371 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
2373 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
2375 info[i++] = "It decreases radius of your light source by 1.";
2379 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë(Ⱦ·Â¤Ë+1)¡£";
2381 info[i++] = "It provides permanent light. (radius +1)";
2385 if (have_flag(flgs, TR_SEE_INVIS))
2388 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2390 info[i++] = "It allows you to see invisible monsters.";
2394 if (have_flag(flgs, TR_TELEPATHY))
2397 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
2399 info[i++] = "It gives telepathic powers.";
2403 if (have_flag(flgs, TR_ESP_ANIMAL))
2406 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤ò´¶ÃΤ¹¤ë¡£";
2408 info[i++] = "It senses natural creatures.";
2412 if (have_flag(flgs, TR_ESP_UNDEAD))
2415 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ò´¶ÃΤ¹¤ë¡£";
2417 info[i++] = "It senses undead.";
2421 if (have_flag(flgs, TR_ESP_DEMON))
2424 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò´¶ÃΤ¹¤ë¡£";
2426 info[i++] = "It senses demons.";
2430 if (have_flag(flgs, TR_ESP_ORC))
2433 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ò´¶ÃΤ¹¤ë¡£";
2435 info[i++] = "It senses orcs.";
2439 if (have_flag(flgs, TR_ESP_TROLL))
2442 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ò´¶ÃΤ¹¤ë¡£";
2444 info[i++] = "It senses trolls.";
2448 if (have_flag(flgs, TR_ESP_GIANT))
2451 info[i++] = "¤½¤ì¤Ïµð¿Í¤ò´¶ÃΤ¹¤ë¡£";
2453 info[i++] = "It senses giants.";
2457 if (have_flag(flgs, TR_ESP_DRAGON))
2460 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò´¶ÃΤ¹¤ë¡£";
2462 info[i++] = "It senses dragons.";
2466 if (have_flag(flgs, TR_ESP_HUMAN))
2469 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ò´¶ÃΤ¹¤ë¡£";
2471 info[i++] = "It senses humans.";
2475 if (have_flag(flgs, TR_ESP_EVIL))
2478 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¸ºß¤ò´¶ÃΤ¹¤ë¡£";
2480 info[i++] = "It senses evil creatures.";
2484 if (have_flag(flgs, TR_ESP_GOOD))
2487 info[i++] = "¤½¤ì¤ÏÁ±Îɤʸºß¤ò´¶ÃΤ¹¤ë¡£";
2489 info[i++] = "It senses good creatures.";
2493 if (have_flag(flgs, TR_ESP_NONLIVING))
2496 info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤò´¶ÃΤ¹¤ë¡£";
2498 info[i++] = "It senses non-living creatures.";
2502 if (have_flag(flgs, TR_ESP_UNIQUE))
2505 info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤ò´¶ÃΤ¹¤ë¡£";
2507 info[i++] = "It senses unique monsters.";
2511 if (have_flag(flgs, TR_SLOW_DIGEST))
2514 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
2516 info[i++] = "It slows your metabolism.";
2520 if (have_flag(flgs, TR_REGEN))
2523 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
2525 info[i++] = "It speeds your regenerative powers.";
2529 if (have_flag(flgs, TR_WARNING))
2532 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
2534 info[i++] = "It warns you of danger";
2538 if (have_flag(flgs, TR_REFLECT))
2541 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
2543 info[i++] = "It reflects bolts and arrows.";
2547 if (have_flag(flgs, TR_SH_FIRE))
2550 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2552 info[i++] = "It produces a fiery sheath.";
2556 if (have_flag(flgs, TR_SH_ELEC))
2559 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2561 info[i++] = "It produces an electric sheath.";
2565 if (have_flag(flgs, TR_SH_COLD))
2568 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2570 info[i++] = "It produces a sheath of coldness.";
2574 if (have_flag(flgs, TR_NO_MAGIC))
2577 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2579 info[i++] = "It produces an anti-magic shell.";
2583 if (have_flag(flgs, TR_NO_TELE))
2586 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
2588 info[i++] = "It prevents teleportation.";
2592 if (have_flag(flgs, TR_XTRA_MIGHT))
2595 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2597 info[i++] = "It fires missiles with extra might.";
2601 if (have_flag(flgs, TR_XTRA_SHOTS))
2604 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2606 info[i++] = "It fires missiles excessively fast.";
2611 if (have_flag(flgs, TR_BLESSED))
2614 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
2616 info[i++] = "It has been blessed by the gods.";
2621 if (object_is_cursed(o_ptr))
2623 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
2626 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
2628 info[i++] = "It is permanently cursed.";
2632 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
2635 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
2637 info[i++] = "It is heavily cursed.";
2644 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
2646 info[i++] = "It is cursed.";
2650 * It's a trivial infomation since there is
2651 * fake inscription {cursed}
2657 if ((have_flag(flgs, TR_TY_CURSE)) || (o_ptr->curse_flags & TRC_TY_CURSE))
2660 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
2662 info[i++] = "It carries an ancient foul curse.";
2666 if ((have_flag(flgs, TR_AGGRAVATE)) || (o_ptr->curse_flags & TRC_AGGRAVATE))
2669 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
2671 info[i++] = "It aggravates nearby creatures.";
2675 if ((have_flag(flgs, TR_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
2678 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
2680 info[i++] = "It drains experience.";
2684 if (o_ptr->curse_flags & TRC_SLOW_REGEN)
2687 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
2689 info[i++] = "It slows your regenerative powers.";
2693 if (o_ptr->curse_flags & TRC_ADD_L_CURSE)
2696 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
2698 info[i++] = "It adds weak curses.";
2702 if (o_ptr->curse_flags & TRC_ADD_H_CURSE)
2705 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
2707 info[i++] = "It adds heavy curses.";
2711 if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
2714 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2716 info[i++] = "It attracts animals.";
2720 if (o_ptr->curse_flags & TRC_CALL_DEMON)
2723 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2725 info[i++] = "It attracts demons.";
2729 if (o_ptr->curse_flags & TRC_CALL_DRAGON)
2732 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2734 info[i++] = "It attracts dragons.";
2738 if (o_ptr->curse_flags & TRC_COWARDICE)
2741 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤µ¯¤³¤¹¡£";
2743 info[i++] = "It makes you subject to cowardice.";
2747 if ((have_flag(flgs, TR_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
2750 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
2752 info[i++] = "It induces random teleportation.";
2756 if (o_ptr->curse_flags & TRC_LOW_MELEE)
2759 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
2761 info[i++] = "It causes you to miss blows.";
2765 if (o_ptr->curse_flags & TRC_LOW_AC)
2768 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
2770 info[i++] = "It helps your enemies' blows.";
2774 if (o_ptr->curse_flags & TRC_LOW_MAGIC)
2777 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
2779 info[i++] = "It encumbers you while spellcasting.";
2783 if (o_ptr->curse_flags & TRC_FAST_DIGEST)
2786 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
2788 info[i++] = "It speeds your metabolism.";
2792 if (o_ptr->curse_flags & TRC_DRAIN_HP)
2795 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
2797 info[i++] = "It drains you.";
2801 if (o_ptr->curse_flags & TRC_DRAIN_MANA)
2804 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
2806 info[i++] = "It drains your mana.";
2811 /* Describe about this kind of object instead of THIS fake object */
2812 if (mode & SCROBJ_FAKE_OBJECT)
2814 switch (o_ptr->tval)
2817 switch (o_ptr->sval)
2819 case SV_RING_LORDLY:
2821 info[i++] = "¤½¤ì¤Ï´ö¤Ä¤«¤Î¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
2823 info[i++] = "It provides some random resistances.";
2826 case SV_RING_WARNING:
2828 info[i++] = "¤½¤ì¤Ï¤Ò¤È¤Ä¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2830 info[i++] = "It may provide a low rank ESP.";
2837 switch (o_ptr->sval)
2839 case SV_AMULET_RESISTANCE:
2841 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2843 info[i++] = "It may provides resistance to poison.";
2846 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2848 info[i++] = "It may provide a random resistances.";
2851 case SV_AMULET_THE_MAGI:
2853 info[i++] = "¤½¤ì¤ÏºÇÂç¤Ç£³¤Ä¤Þ¤Ç¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë¡£";
2855 info[i++] = "It provides up to three low rank ESPs.";
2863 if (have_flag(flgs, TR_IGNORE_ACID) &&
2864 have_flag(flgs, TR_IGNORE_ELEC) &&
2865 have_flag(flgs, TR_IGNORE_FIRE) &&
2866 have_flag(flgs, TR_IGNORE_COLD))
2869 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2871 info[i++] = "It cannot be harmed by the elements.";
2876 if (have_flag(flgs, TR_IGNORE_ACID))
2879 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2881 info[i++] = "It cannot be harmed by acid.";
2884 if (have_flag(flgs, TR_IGNORE_ELEC))
2887 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2889 info[i++] = "It cannot be harmed by electricity.";
2892 if (have_flag(flgs, TR_IGNORE_FIRE))
2895 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2897 info[i++] = "It cannot be harmed by fire.";
2900 if (have_flag(flgs, TR_IGNORE_COLD))
2903 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2905 info[i++] = "It cannot be harmed by cold.";
2910 if (mode & SCROBJ_FORCE_DETAIL) trivial_info = 0;
2912 /* No relevant informations */
2913 if (i <= trivial_info) return (FALSE);
2915 /* Save the screen */
2919 Term_get_size(&wid, &hgt);
2921 /* Display Item name */
2922 if (!(mode & SCROBJ_FAKE_OBJECT))
2923 object_desc(o_name, o_ptr, 0);
2925 object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
2929 /* Erase the screen */
2930 for (k = 1; k < hgt; k++) prt("", k, 13);
2932 /* Label the information */
2933 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
2935 monster_race *r_ptr = &r_info[o_ptr->pval];
2936 int namelen = strlen(r_name + r_ptr->name);
2937 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
2938 Term_queue_bigchar(18 + namelen, 1, r_ptr->x_attr, r_ptr->x_char, 0, 0);
2939 prt("'", 1, (use_bigtile ? 20 : 19) + namelen);
2943 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
2945 prt(" Item Attributes:", 1, 15);
2948 /* We will print on top of the map (column 13) */
2949 for (k = 2, j = 0; j < i; j++)
2952 prt(info[j], k++, 15);
2954 /* Every 20 entries (lines 2 to 21), start over */
2955 if ((k == hgt - 2) && (j+1 < i))
2958 prt("-- ³¤¯ --", k, 15);
2960 prt("-- more --", k, 15);
2963 for (; k > 2; k--) prt("", k, 15);
2969 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
2971 prt("[Press any key to continue]", k, 15);
2976 /* Restore the screen */
2979 /* Gave knowledge */
2986 * Convert an inventory index into a one character label
2987 * Note that the label does NOT distinguish inven/equip.
2989 char index_to_label(int i)
2991 /* Indexes for "inven" are easy */
2992 if (i < INVEN_RARM) return (I2A(i));
2994 /* Indexes for "equip" are offset */
2995 return (I2A(i - INVEN_RARM));
3000 * Convert a label into the index of an item in the "inven"
3001 * Return "-1" if the label does not indicate a real item
3003 s16b label_to_inven(int c)
3008 i = (islower(c) ? A2I(c) : -1);
3010 /* Verify the index */
3011 if ((i < 0) || (i > INVEN_PACK)) return (-1);
3013 /* Empty slots can never be chosen */
3014 if (!inventory[i].k_idx) return (-1);
3016 /* Return the index */
3022 extern bool select_ring_slot;
3025 static bool is_ring_slot(int i)
3027 return (i == INVEN_RIGHT) || (i == INVEN_LEFT);
3032 * Convert a label into the index of a item in the "equip"
3033 * Return "-1" if the label does not indicate a real item
3035 s16b label_to_equip(int c)
3040 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
3042 /* Verify the index */
3043 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
3045 if (select_ring_slot) return is_ring_slot(i) ? i : -1;
3047 /* Empty slots can never be chosen */
3048 if (!inventory[i].k_idx) return (-1);
3050 /* Return the index */
3057 * Determine which equipment slot (if any) an item likes
3059 s16b wield_slot(object_type *o_ptr)
3061 /* Slot for equipment */
3062 switch (o_ptr->tval)
3069 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
3070 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
3071 return (INVEN_LARM);
3078 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
3079 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
3080 return (INVEN_RARM);
3090 /* Use the right hand first */
3091 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
3093 /* Use the left hand for swapping (by default) */
3094 return (INVEN_LEFT);
3100 return (INVEN_NECK);
3105 return (INVEN_LITE);
3112 return (INVEN_BODY);
3117 return (INVEN_OUTER);
3123 return (INVEN_HEAD);
3128 return (INVEN_HANDS);
3133 return (INVEN_FEET);
3137 /* No slot available */
3143 * Return a string mentioning how a given item is carried
3145 cptr mention_use(int i)
3149 /* Examine the location */
3153 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->migite) ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê")); break;
3155 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "Just lifting" : (p_ptr->migite ? "Wielding" : "On arm"); break;
3159 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->hidarite) ? " ξ¼ê" : (left_hander ? " ±¦¼ê" : " º¸¼ê")); break;
3161 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "Just lifting" : (p_ptr->hidarite ? "Wielding" : "On arm"); break;
3165 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "±¿ÈÂÃæ" : "¼Í·âÍÑ"; break;
3167 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "Just holding" : "Shooting"; break;
3171 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
3173 case INVEN_RIGHT: p = (left_hander ? "On left hand" : "On right hand"); break;
3177 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
3179 case INVEN_LEFT: p = (left_hander ? "On right hand" : "On left hand"); break;
3183 case INVEN_NECK: p = " ¼ó"; break;
3185 case INVEN_NECK: p = "Around neck"; break;
3189 case INVEN_LITE: p = " ¸÷¸»"; break;
3191 case INVEN_LITE: p = "Light source"; break;
3195 case INVEN_BODY: p = " ÂÎ"; break;
3197 case INVEN_BODY: p = "On body"; break;
3201 case INVEN_OUTER: p = "ÂΤξå"; break;
3203 case INVEN_OUTER: p = "About body"; break;
3207 case INVEN_HEAD: p = " Ƭ"; break;
3209 case INVEN_HEAD: p = "On head"; break;
3213 case INVEN_HANDS: p = " ¼ê"; break;
3215 case INVEN_HANDS: p = "On hands"; break;
3219 case INVEN_FEET: p = " "; break;
3221 case INVEN_FEET: p = "On feet"; break;
3225 default: p = "¥¶¥Ã¥¯"; break;
3227 default: p = "In pack"; break;
3231 /* Return the result */
3237 * Return a string describing how a given item is being worn.
3238 * Currently, only used for items in the equipment, not inventory.
3240 cptr describe_use(int i)
3247 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->migite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
3249 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "just lifting" : (p_ptr->migite ? "attacking monsters with" : "wearing on your arm"); break;
3253 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->hidarite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
3255 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "just lifting" : (p_ptr->hidarite ? "attacking monsters with" : "wearing on your arm"); break;
3259 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î" : "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
3261 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "just holding" : "shooting missiles with"; break;
3265 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3267 case INVEN_RIGHT: p = (left_hander ? "wearing on your left hand" : "wearing on your right hand"); break;
3271 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3273 case INVEN_LEFT: p = (left_hander ? "wearing on your right hand" : "wearing on your left hand"); break;
3277 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
3279 case INVEN_NECK: p = "wearing around your neck"; break;
3283 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
3285 case INVEN_LITE: p = "using to light the way"; break;
3289 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
3291 case INVEN_BODY: p = "wearing on your body"; break;
3295 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
3297 case INVEN_OUTER: p = "wearing on your back"; break;
3301 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
3303 case INVEN_HEAD: p = "wearing on your head"; break;
3307 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
3309 case INVEN_HANDS: p = "wearing on your hands"; break;
3313 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
3315 case INVEN_FEET: p = "wearing on your feet"; break;
3319 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
3321 default: p = "carrying in your pack"; break;
3325 /* Return the result */
3330 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
3332 bool check_book_realm(const byte book_tval, const byte book_sval)
3334 if (book_tval < TV_LIFE_BOOK) return FALSE;
3335 if (p_ptr->pclass == CLASS_SORCERER)
3337 return is_magic(tval2realm(book_tval));
3339 else if (p_ptr->pclass == CLASS_RED_MAGE)
3341 if (is_magic(tval2realm(book_tval)))
3342 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
3344 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
3349 * Check an item against the item tester info
3351 bool item_tester_okay(object_type *o_ptr)
3353 /* Hack -- allow listing empty slots */
3354 if (item_tester_full) return (TRUE);
3356 /* Require an item */
3357 if (!o_ptr->k_idx) return (FALSE);
3359 /* Hack -- ignore "gold" */
3360 if (o_ptr->tval == TV_GOLD)
3363 extern bool show_gold_on_floor;
3365 if (!show_gold_on_floor) return (FALSE);
3368 /* Check the tval */
3369 if (item_tester_tval)
3371 /* Is it a spellbook? If so, we need a hack -- TY */
3372 if ((item_tester_tval <= TV_DEATH_BOOK) &&
3373 (item_tester_tval >= TV_LIFE_BOOK))
3374 return check_book_realm(o_ptr->tval, o_ptr->sval);
3376 if (item_tester_tval != o_ptr->tval) return (FALSE);
3379 /* Check the hook */
3380 if (item_tester_hook)
3382 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
3393 * Choice window "shadow" of the "show_inven()" function
3395 void display_inven(void)
3397 register int i, n, z = 0;
3399 byte attr = TERM_WHITE;
3401 char o_name[MAX_NLEN];
3405 Term_get_size(&wid, &hgt);
3407 /* Find the "final" slot */
3408 for (i = 0; i < INVEN_PACK; i++)
3410 o_ptr = &inventory[i];
3412 /* Skip non-objects */
3413 if (!o_ptr->k_idx) continue;
3419 /* Display the pack */
3420 for (i = 0; i < z; i++)
3422 /* Examine the item */
3423 o_ptr = &inventory[i];
3425 /* Start with an empty "index" */
3426 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
3428 /* Is this item "acceptable"? */
3429 if (item_tester_okay(o_ptr))
3431 /* Prepare an "index" */
3432 tmp_val[0] = index_to_label(i);
3434 /* Bracket the "index" --(-- */
3438 /* Display the index (or blank space) */
3439 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
3441 /* Obtain an item description */
3442 object_desc(o_name, o_ptr, 0);
3444 /* Obtain the length of the description */
3448 attr = tval_to_attr[o_ptr->tval % 128];
3450 /* Grey out charging items */
3456 /* Display the entry itself */
3457 Term_putstr(3, i, n, attr, o_name);
3459 /* Erase the rest of the line */
3460 Term_erase(3+n, i, 255);
3462 /* Display the weight if needed */
3465 int wgt = o_ptr->weight * o_ptr->number;
3467 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
3469 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3472 prt(tmp_val, i, wid - 9);
3476 /* Erase the rest of the window */
3477 for (i = z; i < hgt; i++)
3479 /* Erase the line */
3480 Term_erase(0, i, 255);
3487 * Choice window "shadow" of the "show_equip()" function
3489 void display_equip(void)
3493 byte attr = TERM_WHITE;
3495 char o_name[MAX_NLEN];
3499 Term_get_size(&wid, &hgt);
3501 /* Display the equipment */
3502 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
3504 /* Examine the item */
3505 o_ptr = &inventory[i];
3507 /* Start with an empty "index" */
3508 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
3510 /* Is this item "acceptable"? */
3511 if (select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr))
3513 /* Prepare an "index" */
3514 tmp_val[0] = index_to_label(i);
3516 /* Bracket the "index" --(-- */
3520 /* Display the index (or blank space) */
3521 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
3523 /* Obtain an item description */
3524 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
3527 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
3529 strcpy(o_name, "(wielding with two-hands)");
3535 object_desc(o_name, o_ptr, 0);
3536 attr = tval_to_attr[o_ptr->tval % 128];
3539 /* Obtain the length of the description */
3542 /* Grey out charging items */
3548 /* Display the entry itself */
3549 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
3551 /* Erase the rest of the line */
3552 Term_erase(3+n, i - INVEN_RARM, 255);
3554 /* Display the weight (if needed) */
3557 int wgt = o_ptr->weight * o_ptr->number;
3559 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
3561 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3564 prt(tmp_val, i - INVEN_RARM, wid - (show_labels ? 28 : 9));
3567 /* Display the slot description (if needed) */
3570 Term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
3571 prt(mention_use(i), i - INVEN_RARM, wid - 15);
3575 /* Erase the rest of the window */
3576 for (i = INVEN_TOTAL - INVEN_RARM; i < hgt; i++)
3578 /* Clear that line */
3579 Term_erase(0, i, 255);
3585 * Find the "first" inventory object with the given "tag".
3587 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
3588 * inscription of an object. Alphabetical characters don't work as a
3591 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
3592 * and "x" is the "current" command_cmd code.
3594 static bool get_tag(int *cp, char tag, int mode)
3599 /* Extract index from mode */
3604 end = INVEN_TOTAL - 1;
3609 end = INVEN_PACK - 1;
3616 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
3618 /* Check every inventory object */
3619 for (i = start; i <= end; i++)
3621 object_type *o_ptr = &inventory[i];
3623 /* Skip non-objects */
3624 if (!o_ptr->k_idx) continue;
3626 /* Skip empty inscriptions */
3627 if (!o_ptr->inscription) continue;
3629 /* Skip non-choice */
3630 if (!item_tester_okay(o_ptr)) continue;
3633 s = my_strchr(quark_str(o_ptr->inscription), '@');
3635 /* Process all tags */
3638 /* Check the special tags */
3639 if ((s[1] == command_cmd) && (s[2] == tag))
3641 /* Save the actual inventory ID */
3648 /* Find another '@' */
3649 s = my_strchr(s + 1, '@');
3654 /**** Find a tag in the form of {@#} (allows only numerals) ***/
3656 /* Don't allow {@#} with '#' being alphabet */
3657 if (tag < '0' || '9' < tag)
3663 /* Check every object */
3664 for (i = start; i <= end; i++)
3666 object_type *o_ptr = &inventory[i];
3668 /* Skip non-objects */
3669 if (!o_ptr->k_idx) continue;
3671 /* Skip empty inscriptions */
3672 if (!o_ptr->inscription) continue;
3674 /* Skip non-choice */
3675 if (!item_tester_okay(o_ptr)) continue;
3678 s = my_strchr(quark_str(o_ptr->inscription), '@');
3680 /* Process all tags */
3683 /* Check the normal tags */
3686 /* Save the actual inventory ID */
3693 /* Find another '@' */
3694 s = my_strchr(s + 1, '@');
3704 * Find the "first" floor object with the given "tag".
3706 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
3707 * inscription of an object. Alphabetical characters don't work as a
3710 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
3711 * and "x" is the "current" command_cmd code.
3713 static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
3718 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
3720 /* Check every object in the grid */
3721 for (i = 0; i < floor_num && i < 23; i++)
3723 object_type *o_ptr = &o_list[floor_list[i]];
3725 /* Skip empty inscriptions */
3726 if (!o_ptr->inscription) continue;
3729 s = my_strchr(quark_str(o_ptr->inscription), '@');
3731 /* Process all tags */
3734 /* Check the special tags */
3735 if ((s[1] == command_cmd) && (s[2] == tag))
3737 /* Save the actual floor object ID */
3744 /* Find another '@' */
3745 s = my_strchr(s + 1, '@');
3750 /**** Find a tag in the form of {@#} (allows only numerals) ***/
3752 /* Don't allow {@#} with '#' being alphabet */
3753 if (tag < '0' || '9' < tag)
3759 /* Check every object in the grid */
3760 for (i = 0; i < floor_num && i < 23; i++)
3762 object_type *o_ptr = &o_list[floor_list[i]];
3764 /* Skip empty inscriptions */
3765 if (!o_ptr->inscription) continue;
3768 s = my_strchr(quark_str(o_ptr->inscription), '@');
3770 /* Process all tags */
3773 /* Check the normal tags */
3776 /* Save the floor object ID */
3783 /* Find another '@' */
3784 s = my_strchr(s + 1, '@');
3794 * Move around label characters with correspond tags
3796 static void prepare_label_string(char *label, int mode)
3798 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
3799 int offset = (mode == USE_EQUIP) ? INVEN_RARM : 0;
3802 /* Prepare normal labels */
3803 strcpy(label, alphabet_chars);
3805 /* Move each label */
3806 for (i = 0; i < 52; i++)
3809 char c = alphabet_chars[i];
3811 /* Find a tag with this label */
3812 if (get_tag(&index, c, mode))
3814 /* Delete the overwritten label */
3815 if (label[i] == c) label[i] = ' ';
3817 /* Move the label to the place of corresponding tag */
3818 label[index - offset] = c;
3825 * Move around label characters with correspond tags (floor version)
3827 static void prepare_label_string_floor(char *label, int floor_list[], int floor_num)
3829 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
3832 /* Prepare normal labels */
3833 strcpy(label, alphabet_chars);
3835 /* Move each label */
3836 for (i = 0; i < 52; i++)
3839 char c = alphabet_chars[i];
3841 /* Find a tag with this label */
3842 if (get_tag_floor(&index, c, floor_list, floor_num))
3844 /* Delete the overwritten label */
3845 if (label[i] == c) label[i] = ' ';
3847 /* Move the label to the place of corresponding tag */
3855 * Display the inventory.
3857 * Hack -- do not display "trailing" empty slots
3859 int show_inven(int target_item)
3861 int i, j, k, l, z = 0;
3862 int col, cur_col, len;
3864 char o_name[MAX_NLEN];
3868 char out_desc[23][MAX_NLEN];
3869 int target_item_label = 0;
3871 char inven_label[52 + 1];
3873 /* Starting column */
3877 Term_get_size(&wid, &hgt);
3879 /* Default "max-length" */
3880 len = wid - col - 1;
3883 /* Find the "final" slot */
3884 for (i = 0; i < INVEN_PACK; i++)
3886 o_ptr = &inventory[i];
3888 /* Skip non-objects */
3889 if (!o_ptr->k_idx) continue;
3895 prepare_label_string(inven_label, USE_INVEN);
3897 /* Display the inventory */
3898 for (k = 0, i = 0; i < z; i++)
3900 o_ptr = &inventory[i];
3902 /* Is this item acceptable? */
3903 if (!item_tester_okay(o_ptr)) continue;
3905 /* Describe the object */
3906 object_desc(o_name, o_ptr, 0);
3908 /* Save the object index, color, and description */
3910 out_color[k] = tval_to_attr[o_ptr->tval % 128];
3912 /* Grey out charging items */
3915 out_color[k] = TERM_L_DARK;
3918 (void)strcpy(out_desc[k], o_name);
3920 /* Find the predicted "line length" */
3921 l = strlen(out_desc[k]) + 5;
3923 /* Be sure to account for the weight */
3924 if (show_weights) l += 9;
3926 /* Account for icon if displayed */
3927 if (show_item_graph)
3930 if (use_bigtile) l++;
3933 /* Maintain the maximum length */
3934 if (l > len) len = l;
3936 /* Advance to next "line" */
3940 /* Find the column to start in */
3941 col = (len > wid - 4) ? 0 : (wid - len - 1);
3943 /* Output each entry */
3944 for (j = 0; j < k; j++)
3950 o_ptr = &inventory[i];
3952 /* Clear the line */
3953 prt("", j + 1, col ? col - 2 : col);
3955 if (use_menu && target_item)
3957 if (j == (target_item-1))
3960 strcpy(tmp_val, "¡Õ");
3962 strcpy(tmp_val, "> ");
3964 target_item_label = i;
3966 else strcpy(tmp_val, " ");
3968 else if (i <= INVEN_PACK)
3970 /* Prepare an index --(-- */
3971 sprintf(tmp_val, "%c)", inven_label[i]);
3975 /* Prepare an index --(-- */
3976 sprintf(tmp_val, "%c)", index_to_label(i));
3979 /* Clear the line with the (possibly indented) index */
3980 put_str(tmp_val, j + 1, col);
3984 /* Display graphics for object, if desired */
3985 if (show_item_graph)
3987 byte a = object_attr(o_ptr);
3988 char c = object_char(o_ptr);
3991 if (a & 0x80) a |= 0x40;
3994 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
3995 if (use_bigtile) cur_col++;
4001 /* Display the entry itself */
4002 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
4004 /* Display the weight if needed */
4007 int wgt = o_ptr->weight * o_ptr->number;
4009 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4011 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
4014 prt(tmp_val, j + 1, wid - 9);
4018 /* Make a "shadow" below the list (only if needed) */
4019 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4021 /* Save the new column */
4024 return target_item_label;
4030 * Display the equipment.
4032 int show_equip(int target_item)
4035 int col, cur_col, len;
4038 char o_name[MAX_NLEN];
4041 char out_desc[23][MAX_NLEN];
4042 int target_item_label = 0;
4044 char equip_label[52 + 1];
4046 /* Starting column */
4050 Term_get_size(&wid, &hgt);
4052 /* Maximal length */
4053 len = wid - col - 1;
4056 /* Scan the equipment list */
4057 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
4059 o_ptr = &inventory[i];
4061 /* Is this item acceptable? */
4062 if (!(select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr)) &&
4063 (!((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute) ||
4064 item_tester_no_ryoute)) continue;
4067 object_desc(o_name, o_ptr, 0);
4069 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
4072 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
4074 (void)strcpy(out_desc[k],"(wielding with two-hands)");
4076 out_color[k] = TERM_WHITE;
4080 (void)strcpy(out_desc[k], o_name);
4081 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4085 /* Grey out charging items */
4088 out_color[k] = TERM_L_DARK;
4091 /* Extract the maximal length (see below) */
4093 l = strlen(out_desc[k]) + (2 + 1);
4095 l = strlen(out_desc[k]) + (2 + 3);
4099 /* Increase length for labels (if needed) */
4101 if (show_labels) l += (7 + 2);
4103 if (show_labels) l += (14 + 2);
4107 /* Increase length for weight (if needed) */
4108 if (show_weights) l += 9;
4110 if (show_item_graph) l += 2;
4112 /* Maintain the max-length */
4113 if (l > len) len = l;
4115 /* Advance the entry */
4119 /* Hack -- Find a column to start in */
4121 col = (len > wid - 6) ? 0 : (wid - len - 1);
4123 col = (len > wid - 4) ? 0 : (wid - len - 1);
4126 prepare_label_string(equip_label, USE_EQUIP);
4128 /* Output each entry */
4129 for (j = 0; j < k; j++)
4135 o_ptr = &inventory[i];
4137 /* Clear the line */
4138 prt("", j + 1, col ? col - 2 : col);
4140 if (use_menu && target_item)
4142 if (j == (target_item-1))
4145 strcpy(tmp_val, "¡Õ");
4147 strcpy(tmp_val, "> ");
4149 target_item_label = i;
4151 else strcpy(tmp_val, " ");
4153 else if (i >= INVEN_RARM)
4155 /* Prepare an index --(-- */
4156 sprintf(tmp_val, "%c)", equip_label[i - INVEN_RARM]);
4160 /* Prepare an index --(-- */
4161 sprintf(tmp_val, "%c)", index_to_label(i));
4164 /* Clear the line with the (possibly indented) index */
4165 put_str(tmp_val, j+1, col);
4169 /* Display graphics for object, if desired */
4170 if (show_item_graph)
4172 byte a = object_attr(o_ptr);
4173 char c = object_char(o_ptr);
4176 if (a & 0x80) a |= 0x40;
4179 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
4180 if (use_bigtile) cur_col++;
4188 /* Mention the use */
4190 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
4192 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
4195 put_str(tmp_val, j+1, cur_col);
4197 /* Display the entry itself */
4199 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
4201 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
4208 /* Display the entry itself */
4209 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
4212 /* Display the weight if needed */
4215 int wgt = o_ptr->weight * o_ptr->number;
4217 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4219 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
4222 prt(tmp_val, j + 1, wid - 9);
4226 /* Make a "shadow" below the list (only if needed) */
4227 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4229 /* Save the new column */
4232 return target_item_label;
4239 * Flip "inven" and "equip" in any sub-windows
4241 void toggle_inven_equip(void)
4246 for (j = 0; j < 8; j++)
4249 if (!angband_term[j]) continue;
4251 /* Flip inven to equip */
4252 if (window_flag[j] & (PW_INVEN))
4255 window_flag[j] &= ~(PW_INVEN);
4256 window_flag[j] |= (PW_EQUIP);
4259 p_ptr->window |= (PW_EQUIP);
4262 /* Flip inven to equip */
4263 else if (window_flag[j] & (PW_EQUIP))
4266 window_flag[j] &= ~(PW_EQUIP);
4267 window_flag[j] |= (PW_INVEN);
4270 p_ptr->window |= (PW_INVEN);
4278 * Verify the choice of an item.
4280 * The item can be negative to mean "item on floor".
4282 static bool verify(cptr prompt, int item)
4284 char o_name[MAX_NLEN];
4285 char out_val[MAX_NLEN+20];
4292 o_ptr = &inventory[item];
4298 o_ptr = &o_list[0 - item];
4302 object_desc(o_name, o_ptr, 0);
4306 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
4308 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
4313 return (get_check(out_val));
4318 * Hack -- allow user to "prevent" certain choices
4320 * The item can be negative to mean "item on floor".
4322 static bool get_item_allow(int item)
4328 if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
4333 o_ptr = &inventory[item];
4339 o_ptr = &o_list[0 - item];
4342 /* No inscription */
4343 if (!o_ptr->inscription) return (TRUE);
4346 s = my_strchr(quark_str(o_ptr->inscription), '!');
4348 /* Process preventions */
4351 /* Check the "restriction" */
4352 if ((s[1] == command_cmd) || (s[1] == '*'))
4354 /* Verify the choice */
4356 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
4358 if (!verify("Really try", item)) return (FALSE);
4363 /* Find another '!' */
4364 s = my_strchr(s + 1, '!');
4374 * Auxiliary function for "get_item()" -- test an index
4376 static bool get_item_okay(int i)
4379 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
4381 if (select_ring_slot) return is_ring_slot(i);
4383 /* Verify the item */
4384 if (!item_tester_okay(&inventory[i])) return (FALSE);
4393 * Determine whether get_item() can get some item or not
4394 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
4396 bool can_get_item(void)
4398 int j, floor_list[23], floor_num = 0;
4400 for (j = 0; j < INVEN_TOTAL; j++)
4401 if (item_tester_okay(&inventory[j]))
4404 floor_num = scan_floor(floor_list, py, px, 0x03);
4412 * Let the user select an item, save its "index"
4414 * Return TRUE only if an acceptable item was chosen by the user.
4416 * The selected item must satisfy the "item_tester_hook()" function,
4417 * if that hook is set, and the "item_tester_tval", if that value is set.
4419 * All "item_tester" restrictions are cleared before this function returns.
4421 * The user is allowed to choose acceptable items from the equipment,
4422 * inventory, or floor, respectively, if the proper flag was given,
4423 * and there are any acceptable items in that location.
4425 * The equipment or inventory are displayed (even if no acceptable
4426 * items are in that location) if the proper flag was given.
4428 * If there are no acceptable items available anywhere, and "str" is
4429 * not NULL, then it will be used as the text of a warning message
4430 * before the function returns.
4432 * Note that the user must press "-" to specify the item on the floor,
4433 * and there is no way to "examine" the item on the floor, while the
4434 * use of "capital" letters will "examine" an inventory/equipment item,
4435 * and prompt for its use.
4437 * If a legal item is selected from the inventory, we save it in "cp"
4438 * directly (0 to 35), and return TRUE.
4440 * If a legal item is selected from the floor, we save it in "cp" as
4441 * a negative (-1 to -511), and return TRUE.
4443 * If no item is available, we do nothing to "cp", and we display a
4444 * warning message, using "str" if available, and return FALSE.
4446 * If no item is selected, we do nothing to "cp", and return FALSE.
4448 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
4449 * to allow the user to enter a command while viewing those screens, and
4450 * also to induce "auto-enter" of stores, and other such stuff.
4452 * Global "p_ptr->command_see" may be set before calling this function to start
4453 * out in "browse" mode. It is cleared before this function returns.
4455 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
4456 * If it is TRUE then we are viewing inventory, else equipment.
4458 * We always erase the prompt when we are done, leaving a blank line,
4459 * or a warning message, if appropriate, if no items are available.
4461 bool get_item(int *cp, cptr pmt, cptr str, int mode)
4463 s16b this_o_idx, next_o_idx = 0;
4467 int j, k, i1, i2, e1, e2;
4477 bool allow_floor = FALSE;
4479 bool toggle = FALSE;
4485 extern bool select_the_force;
4487 int menu_line = (use_menu ? 1 : 0);
4493 static char prev_tag = '\0';
4494 char cur_tag = '\0';
4496 #endif /* ALLOW_REPEAT */
4498 #ifdef ALLOW_EASY_FLOOR /* TNB */
4500 if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
4502 #endif /* ALLOW_EASY_FLOOR -- TNB */
4505 if (mode & USE_EQUIP) equip = TRUE;
4506 if (mode & USE_INVEN) inven = TRUE;
4507 if (mode & USE_FLOOR) floor = TRUE;
4511 /* Get the item index */
4512 if (repeat_pull(cp))
4515 if (select_the_force && (*cp == INVEN_FORCE))
4517 item_tester_tval = 0;
4518 item_tester_hook = NULL;
4519 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4524 else if (floor && (*cp < 0))
4531 /* Acquire object */
4534 /* Validate the item */
4535 if (item_tester_okay(o_ptr))
4537 /* Forget restrictions */
4538 item_tester_tval = 0;
4539 item_tester_hook = NULL;
4540 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4547 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
4548 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
4550 if (prev_tag && command_cmd)
4552 /* Look up the tag and validate the item */
4553 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
4554 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
4555 else if (!get_item_okay(k)) /* Reject */;
4558 /* Accept that choice */
4561 /* Forget restrictions */
4562 item_tester_tval = 0;
4563 item_tester_hook = NULL;
4564 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4570 prev_tag = '\0'; /* prev_tag is no longer effective */
4573 /* Verify the item */
4574 else if (get_item_okay(*cp))
4576 /* Forget restrictions */
4577 item_tester_tval = 0;
4578 item_tester_hook = NULL;
4579 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4587 #endif /* ALLOW_REPEAT */
4590 /* Paranoia XXX XXX XXX */
4597 /* No item selected */
4601 /* Full inventory */
4603 i2 = INVEN_PACK - 1;
4605 /* Forbid inventory */
4606 if (!inven) i2 = -1;
4609 for (j = 0; j < INVEN_PACK; j++)
4610 if (item_tester_okay(&inventory[j])) max_inven++;
4613 /* Restrict inventory indexes */
4614 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
4615 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
4618 /* Full equipment */
4620 e2 = INVEN_TOTAL - 1;
4622 /* Forbid equipment */
4623 if (!equip) e2 = -1;
4626 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
4627 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
4628 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
4631 /* Restrict equipment indexes */
4632 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
4633 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
4635 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
4639 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
4641 else if (p_ptr->hidarite) e1 = INVEN_RARM;
4645 /* Restrict floor usage */
4648 /* Scan all objects in the grid */
4649 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
4653 /* Acquire object */
4654 o_ptr = &o_list[this_o_idx];
4656 /* Acquire next object */
4657 next_o_idx = o_ptr->next_o_idx;
4659 /* Accept the item on the floor if legal */
4660 if (item_tester_okay(o_ptr) && (o_ptr->marked & OM_FOUND)) allow_floor = TRUE;
4664 /* Require at least one legal choice */
4665 if (!allow_floor && (i1 > i2) && (e1 > e2))
4667 /* Cancel p_ptr->command_see */
4668 command_see = FALSE;
4676 if (select_the_force) {
4682 /* Analyze choices */
4685 /* Hack -- Start on equipment if requested */
4686 if (command_see && command_wrk && equip)
4691 /* Use inventory if allowed */
4694 command_wrk = FALSE;
4697 /* Use equipment if allowed */
4703 /* Use inventory for floor */
4706 command_wrk = FALSE;
4712 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
4714 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
4716 /* Hack -- start out in "display" mode */
4724 /* Repeat until done */
4727 int get_item_label = 0;
4734 for (j = 0; j < 8; j++)
4737 if (!angband_term[j]) continue;
4739 /* Count windows displaying inven */
4740 if (window_flag[j] & (PW_INVEN)) ni++;
4742 /* Count windows displaying equip */
4743 if (window_flag[j] & (PW_EQUIP)) ne++;
4746 /* Toggle if needed */
4747 if ((command_wrk && ni && !ne) ||
4748 (!command_wrk && !ni && ne))
4751 toggle_inven_equip();
4758 p_ptr->window |= (PW_INVEN | PW_EQUIP);
4760 /* Redraw windows */
4764 /* Inventory screen */
4767 /* Redraw if needed */
4768 if (command_see) get_item_label = show_inven(menu_line);
4771 /* Equipment screen */
4774 /* Redraw if needed */
4775 if (command_see) get_item_label = show_equip(menu_line);
4778 /* Viewing inventory */
4781 /* Begin the prompt */
4783 sprintf(out_val, "»ý¤Áʪ:");
4785 sprintf(out_val, "Inven:");
4788 /* Some legal items */
4789 if ((i1 <= i2) && !use_menu)
4791 /* Build the prompt */
4793 sprintf(tmp_val, "%c-%c,'(',')',",
4795 sprintf(tmp_val, " %c-%c,'(',')',",
4797 index_to_label(i1), index_to_label(i2));
4800 strcat(out_val, tmp_val);
4803 /* Indicate ability to "view" */
4805 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
4807 if (!command_see && !use_menu) strcat(out_val, " * to see,");
4812 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
4814 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
4818 /* Viewing equipment */
4821 /* Begin the prompt */
4823 sprintf(out_val, "ÁõÈ÷ÉÊ:");
4825 sprintf(out_val, "Equip:");
4828 /* Some legal items */
4829 if ((e1 <= e2) && !use_menu)
4831 /* Build the prompt */
4833 sprintf(tmp_val, "%c-%c,'(',')',",
4835 sprintf(tmp_val, " %c-%c,'(',')',",
4837 index_to_label(e1), index_to_label(e2));
4840 strcat(out_val, tmp_val);
4843 /* Indicate ability to "view" */
4845 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
4847 if (!command_see) strcat(out_val, " * to see,");
4852 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
4854 if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
4858 /* Indicate legality of the "floor" item */
4860 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
4861 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
4863 if (allow_floor) strcat(out_val, " - for floor,");
4864 if (select_the_force) strcat(out_val, " w for the Force,");
4867 /* Finish the prompt */
4868 strcat(out_val, " ESC");
4870 /* Build the prompt */
4871 sprintf(tmp_val, "(%s) %s", out_val, pmt);
4873 /* Show the prompt */
4881 int max_line = (command_wrk ? max_equip : max_inven);
4897 menu_line += (max_line - 1);
4916 /* Verify legality */
4917 if (!inven || !equip)
4923 /* Hack -- Fix screen */
4933 /* Switch inven/equip */
4934 command_wrk = !command_wrk;
4935 max_line = (command_wrk ? max_equip : max_inven);
4936 if (menu_line > max_line) menu_line = max_line;
4938 /* Need to redraw */
4947 if (command_wrk == USE_FLOOR)
4950 (*cp) = -get_item_label;
4954 /* Validate the item */
4955 if (!get_item_okay(get_item_label))
4961 /* Allow player to "refuse" certain actions */
4962 if (!get_item_allow(get_item_label))
4968 /* Accept that choice */
4969 (*cp) = get_item_label;
4978 if (select_the_force) {
4986 if (menu_line > max_line) menu_line -= max_line;
5007 command_see = FALSE;
5027 /* Verify legality */
5028 if (!inven || !equip)
5034 /* Hack -- Fix screen */
5044 /* Switch inven/equip */
5045 command_wrk = !command_wrk;
5047 /* Need to redraw */
5053 /* Use floor item */
5056 /* Scan all objects in the grid */
5057 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5061 /* Acquire object */
5062 o_ptr = &o_list[this_o_idx];
5064 /* Acquire next object */
5065 next_o_idx = o_ptr->next_o_idx;
5067 /* Validate the item */
5068 if (!item_tester_okay(o_ptr)) continue;
5073 /* Verify the item (if required) */
5075 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
5077 if (other_query_flag && !verify("Try", k)) continue;
5081 /* Allow player to "refuse" certain actions */
5082 if (!get_item_allow(k)) continue;
5084 /* Accept that choice */
5101 case '1': case '2': case '3':
5102 case '4': case '5': case '6':
5103 case '7': case '8': case '9':
5105 /* Look up the tag */
5106 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
5112 /* Hack -- Validate the item */
5113 if ((k < INVEN_RARM) ? !inven : !equip)
5119 /* Validate the item */
5120 if (!get_item_okay(k))
5126 /* Allow player to "refuse" certain actions */
5127 if (!get_item_allow(k))
5133 /* Accept that choice */
5139 #endif /* ALLOW_REPEAT */
5147 /* Choose "default" inventory item */
5150 k = ((i1 == i2) ? i1 : -1);
5153 /* Choose "default" equipment item */
5156 k = ((e1 == e2) ? e1 : -1);
5159 /* Validate the item */
5160 if (!get_item_okay(k))
5166 /* Allow player to "refuse" certain actions */
5167 if (!get_item_allow(k))
5173 /* Accept that choice */
5183 if (select_the_force) {
5196 bool not_found = FALSE;
5198 /* Look up the alphabetical tag */
5199 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
5204 /* Hack -- Validate the item */
5205 else if ((k < INVEN_RARM) ? !inven : !equip)
5210 /* Validate the item */
5211 else if (!get_item_okay(k))
5218 /* Accept that choice */
5224 #endif /* ALLOW_REPEAT */
5228 /* Extract "query" setting */
5229 ver = isupper(which);
5230 which = tolower(which);
5232 /* Convert letter to inventory index */
5235 if (which == '(') k = i1;
5236 else if (which == ')') k = i2;
5237 else k = label_to_inven(which);
5240 /* Convert letter to equipment index */
5243 if (which == '(') k = e1;
5244 else if (which == ')') k = e2;
5245 else k = label_to_equip(which);
5248 /* Validate the item */
5249 if (!get_item_okay(k))
5255 /* Verify the item */
5257 if (ver && !verify("ËÜÅö¤Ë", k))
5259 if (ver && !verify("Try", k))
5267 /* Allow player to "refuse" certain actions */
5268 if (!get_item_allow(k))
5274 /* Accept that choice */
5285 /* Fix the screen if necessary */
5291 /* Hack -- Cancel "display" */
5292 command_see = FALSE;
5296 /* Forget the item_tester_tval restriction */
5297 item_tester_tval = 0;
5299 item_tester_no_ryoute = FALSE;
5301 /* Forget the item_tester_hook restriction */
5302 item_tester_hook = NULL;
5305 /* Clean up 'show choices' */
5306 /* Toggle again if needed */
5307 if (toggle) toggle_inven_equip();
5310 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5316 /* Clear the prompt line */
5319 /* Warning if needed */
5320 if (oops && str) msg_print(str);
5326 if (command_cmd) prev_tag = cur_tag;
5327 #endif /* ALLOW_REPEAT */
5329 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5337 #ifdef ALLOW_EASY_FLOOR
5342 * Return a list of o_list[] indexes of items at the given cave
5343 * location. Valid flags are:
5345 * mode & 0x01 -- Item tester
5346 * mode & 0x02 -- Marked items only
5347 * mode & 0x04 -- Stop after first
5349 int scan_floor(int *items, int y, int x, int mode)
5351 int this_o_idx, next_o_idx;
5356 if (!in_bounds(y, x)) return 0;
5358 /* Scan all objects in the grid */
5359 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
5363 /* Acquire object */
5364 o_ptr = &o_list[this_o_idx];
5366 /* Acquire next object */
5367 next_o_idx = o_ptr->next_o_idx;
5370 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
5373 if ((mode & 0x02) && !(o_ptr->marked & OM_FOUND)) continue;
5375 /* Accept this item */
5376 /* XXX Hack -- Enforce limit */
5378 items[num] = this_o_idx;
5383 if (mode & 0x04) break;
5392 * Display a list of the items on the floor at the given location.
5394 int show_floor(int target_item, int y, int x, int *min_width)
5401 char o_name[MAX_NLEN];
5407 char out_desc[23][MAX_NLEN];
5408 int target_item_label = 0;
5410 int floor_list[23], floor_num;
5412 char floor_label[52 + 1];
5414 bool dont_need_to_show_weights = TRUE;
5417 Term_get_size(&wid, &hgt);
5419 /* Default length */
5420 len = MAX((*min_width), 20);
5423 /* Scan for objects in the grid, using item_tester_okay() */
5424 floor_num = scan_floor(floor_list, y, x, 0x03);
5426 /* Display the floor objects */
5427 for (k = 0, i = 0; i < floor_num && i < 23; i++)
5429 o_ptr = &o_list[floor_list[i]];
5431 /* Describe the object */
5432 object_desc(o_name, o_ptr, 0);
5434 /* Save the index */
5437 /* Acquire inventory color */
5438 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
5440 /* Save the object description */
5441 strcpy(out_desc[k], o_name);
5443 /* Find the predicted "line length" */
5444 l = strlen(out_desc[k]) + 5;
5446 /* Be sure to account for the weight */
5447 if (show_weights) l += 9;
5449 if (o_ptr->tval != TV_GOLD) dont_need_to_show_weights = FALSE;
5451 /* Maintain the maximum length */
5452 if (l > len) len = l;
5454 /* Advance to next "line" */
5458 if (show_weights && dont_need_to_show_weights) len -= 9;
5463 /* Find the column to start in */
5464 col = (len > wid - 4) ? 0 : (wid - len - 1);
5466 prepare_label_string_floor(floor_label, floor_list, floor_num);
5468 /* Output each entry */
5469 for (j = 0; j < k; j++)
5472 i = floor_list[out_index[j]];
5477 /* Clear the line */
5478 prt("", j + 1, col ? col - 2 : col);
5480 if (use_menu && target_item)
5482 if (j == (target_item-1))
5485 strcpy(tmp_val, "¡Õ");
5487 strcpy(tmp_val, "> ");
5489 target_item_label = i;
5491 else strcpy(tmp_val, " ");
5495 /* Prepare an index --(-- */
5496 sprintf(tmp_val, "%c)", floor_label[j]);
5499 /* Clear the line with the (possibly indented) index */
5500 put_str(tmp_val, j + 1, col);
5502 /* Display the entry itself */
5503 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
5505 /* Display the weight if needed */
5506 if (show_weights && (o_ptr->tval != TV_GOLD))
5508 int wgt = o_ptr->weight * o_ptr->number;
5510 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5512 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
5515 prt(tmp_val, j + 1, wid - 9);
5519 /* Make a "shadow" below the list (only if needed) */
5520 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5522 return target_item_label;
5526 * This version of get_item() is called by get_item() when
5527 * the easy_floor is on.
5529 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
5531 char n1 = ' ', n2 = ' ', which = ' ';
5533 int j, k, i1, i2, e1, e2;
5540 bool equip = (mode & USE_EQUIP) ? TRUE : FALSE;
5541 bool inven = (mode & USE_INVEN) ? TRUE : FALSE;
5542 bool floor = (mode & USE_FLOOR) ? TRUE : FALSE;
5544 bool allow_equip = FALSE;
5545 bool allow_inven = FALSE;
5546 bool allow_floor = FALSE;
5548 bool toggle = FALSE;
5553 int floor_num, floor_list[23], floor_top = 0;
5556 extern bool select_the_force;
5558 int menu_line = (use_menu ? 1 : 0);
5564 static char prev_tag = '\0';
5565 char cur_tag = '\0';
5567 /* Get the item index */
5568 if (repeat_pull(cp))
5571 if (select_the_force && (*cp == INVEN_FORCE))
5573 item_tester_tval = 0;
5574 item_tester_hook = NULL;
5575 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5580 else if (floor && (*cp < 0))
5582 if (prev_tag && command_cmd)
5584 /* Scan all objects in the grid */
5585 floor_num = scan_floor(floor_list, py, px, 0x03);
5587 /* Look up the tag */
5588 if (get_tag_floor(&k, prev_tag, floor_list, floor_num))
5590 /* Accept that choice */
5591 (*cp) = 0 - floor_list[k];
5593 /* Forget restrictions */
5594 item_tester_tval = 0;
5595 item_tester_hook = NULL;
5596 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5602 prev_tag = '\0'; /* prev_tag is no longer effective */
5605 /* Validate the item */
5606 else if (item_tester_okay(&o_list[0 - (*cp)]))
5608 /* Forget restrictions */
5609 item_tester_tval = 0;
5610 item_tester_hook = NULL;
5611 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5618 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
5619 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
5621 if (prev_tag && command_cmd)
5623 /* Look up the tag and validate the item */
5624 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
5625 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
5626 else if (!get_item_okay(k)) /* Reject */;
5629 /* Accept that choice */
5632 /* Forget restrictions */
5633 item_tester_tval = 0;
5634 item_tester_hook = NULL;
5635 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5641 prev_tag = '\0'; /* prev_tag is no longer effective */
5644 /* Verify the item */
5645 else if (get_item_okay(*cp))
5647 /* Forget restrictions */
5648 item_tester_tval = 0;
5649 item_tester_hook = NULL;
5650 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5658 #endif /* ALLOW_REPEAT */
5661 /* Paranoia XXX XXX XXX */
5668 /* No item selected */
5672 /* Full inventory */
5674 i2 = INVEN_PACK - 1;
5676 /* Forbid inventory */
5677 if (!inven) i2 = -1;
5680 for (j = 0; j < INVEN_PACK; j++)
5681 if (item_tester_okay(&inventory[j])) max_inven++;
5684 /* Restrict inventory indexes */
5685 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5686 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5689 /* Full equipment */
5691 e2 = INVEN_TOTAL - 1;
5693 /* Forbid equipment */
5694 if (!equip) e2 = -1;
5697 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5698 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
5699 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5702 /* Restrict equipment indexes */
5703 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5704 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5706 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
5710 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
5712 else if (p_ptr->hidarite) e1 = INVEN_RARM;
5716 /* Count "okay" floor items */
5719 /* Restrict floor usage */
5722 /* Scan all objects in the grid */
5723 floor_num = scan_floor(floor_list, py, px, 0x03);
5726 /* Accept inventory */
5727 if (i1 <= i2) allow_inven = TRUE;
5729 /* Accept equipment */
5730 if (e1 <= e2) allow_equip = TRUE;
5733 if (floor_num) allow_floor = TRUE;
5735 /* Require at least one legal choice */
5736 if (!allow_inven && !allow_equip && !allow_floor)
5738 /* Cancel p_ptr->command_see */
5739 command_see = FALSE;
5747 if (select_the_force) {
5753 /* Analyze choices */
5756 /* Hack -- Start on equipment if requested */
5757 if (command_see && (command_wrk == (USE_EQUIP))
5760 command_wrk = (USE_EQUIP);
5763 /* Use inventory if allowed */
5764 else if (allow_inven)
5766 command_wrk = (USE_INVEN);
5769 /* Use equipment if allowed */
5770 else if (allow_equip)
5772 command_wrk = (USE_EQUIP);
5775 /* Use floor if allowed */
5776 else if (allow_floor)
5778 command_wrk = (USE_FLOOR);
5783 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5785 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5787 /* Hack -- start out in "display" mode */
5794 /* Repeat until done */
5797 int get_item_label = 0;
5804 for (j = 0; j < 8; j++)
5807 if (!angband_term[j]) continue;
5809 /* Count windows displaying inven */
5810 if (window_flag[j] & (PW_INVEN)) ni++;
5812 /* Count windows displaying equip */
5813 if (window_flag[j] & (PW_EQUIP)) ne++;
5816 /* Toggle if needed */
5817 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
5818 (command_wrk == (USE_INVEN) && !ni && ne))
5821 toggle_inven_equip();
5828 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5830 /* Redraw windows */
5833 /* Inventory screen */
5834 if (command_wrk == (USE_INVEN))
5836 /* Extract the legal requests */
5840 /* Redraw if needed */
5841 if (command_see) get_item_label = show_inven(menu_line);
5844 /* Equipment screen */
5845 else if (command_wrk == (USE_EQUIP))
5847 /* Extract the legal requests */
5848 n1 = I2A(e1 - INVEN_RARM);
5849 n2 = I2A(e2 - INVEN_RARM);
5851 /* Redraw if needed */
5852 if (command_see) get_item_label = show_equip(menu_line);
5856 else if (command_wrk == (USE_FLOOR))
5859 k = MIN(floor_top + 23, floor_num) - 1;
5861 /* Extract the legal requests */
5862 n1 = I2A(j - floor_top);
5863 n2 = I2A(k - floor_top);
5865 /* Redraw if needed */
5866 if (command_see) get_item_label = show_floor(menu_line, py, px, &min_width);
5869 /* Viewing inventory */
5870 if (command_wrk == (USE_INVEN))
5872 /* Begin the prompt */
5874 sprintf(out_val, "»ý¤Áʪ:");
5876 sprintf(out_val, "Inven:");
5881 /* Build the prompt */
5883 sprintf(tmp_val, "%c-%c,'(',')',",
5885 sprintf(tmp_val, " %c-%c,'(',')',",
5887 index_to_label(i1), index_to_label(i2));
5890 strcat(out_val, tmp_val);
5893 /* Indicate ability to "view" */
5895 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5897 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5905 strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
5906 else if (allow_floor)
5907 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
5909 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
5912 strcat(out_val, " / for Equip,");
5913 else if (allow_floor)
5914 strcat(out_val, " 6 for Equip,");
5916 strcat(out_val, " 4 or 6 for Equip,");
5925 strcat(out_val, " '-'¾²¾å,");
5926 else if (allow_equip)
5927 strcat(out_val, " '4' ¾²¾å,");
5929 strcat(out_val, " '4'or'6' ¾²¾å,");
5932 strcat(out_val, " - for floor,");
5933 else if (allow_equip)
5934 strcat(out_val, " 4 for floor,");
5936 strcat(out_val, " 4 or 6 for floor,");
5941 /* Viewing equipment */
5942 else if (command_wrk == (USE_EQUIP))
5944 /* Begin the prompt */
5946 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5948 sprintf(out_val, "Equip:");
5953 /* Build the prompt */
5955 sprintf(tmp_val, "%c-%c,'(',')',",
5957 sprintf(tmp_val, " %c-%c,'(',')',",
5959 index_to_label(e1), index_to_label(e2));
5962 strcat(out_val, tmp_val);
5965 /* Indicate ability to "view" */
5967 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5969 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5977 strcat(out_val, " '/' »ý¤Áʪ,");
5978 else if (allow_floor)
5979 strcat(out_val, " '4' »ý¤Áʪ,");
5981 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
5984 strcat(out_val, " / for Inven,");
5985 else if (allow_floor)
5986 strcat(out_val, " 4 for Inven,");
5988 strcat(out_val, " 4 or 6 for Inven,");
5997 strcat(out_val, " '-'¾²¾å,");
5998 else if (allow_inven)
5999 strcat(out_val, " '6' ¾²¾å,");
6001 strcat(out_val, " '4'or'6' ¾²¾å,");
6004 strcat(out_val, " - for floor,");
6005 else if (allow_inven)
6006 strcat(out_val, " 6 for floor,");
6008 strcat(out_val, " 4 or 6 for floor,");
6014 else if (command_wrk == (USE_FLOOR))
6016 /* Begin the prompt */
6018 sprintf(out_val, "¾²¾å:");
6020 sprintf(out_val, "Floor:");
6025 /* Build the prompt */
6027 sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
6029 sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
6033 strcat(out_val, tmp_val);
6036 /* Indicate ability to "view" */
6038 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
6040 if (!command_see && !use_menu) strcat(out_val, " * to see,");
6045 if (allow_inven && allow_equip)
6048 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
6050 strcat(out_val, " 4 for Equip, 6 for Inven,");
6053 else if (allow_inven)
6056 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6058 strcat(out_val, " 4 or 6 for Inven,");
6061 else if (allow_equip)
6064 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6066 strcat(out_val, " 4 or 6 for Equip,");
6071 else if (allow_inven)
6074 strcat(out_val, " '/' »ý¤Áʪ,");
6076 strcat(out_val, " / for Inven,");
6079 else if (allow_equip)
6082 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6084 strcat(out_val, " / for Equip,");
6089 if (command_see && !use_menu)
6092 strcat(out_val, " Enter ¼¡,");
6094 strcat(out_val, " Enter for scroll down,");
6101 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
6103 if (select_the_force) strcat(out_val, " w for the Force,");
6106 /* Finish the prompt */
6107 strcat(out_val, " ESC");
6109 /* Build the prompt */
6110 sprintf(tmp_val, "(%s) %s", out_val, pmt);
6112 /* Show the prompt */
6121 if (command_wrk == USE_INVEN) max_line = max_inven;
6122 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6123 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6139 menu_line += (max_line - 1);
6155 /* Verify legality */
6156 if (command_wrk == (USE_INVEN))
6158 if (allow_floor) command_wrk = USE_FLOOR;
6159 else if (allow_equip) command_wrk = USE_EQUIP;
6166 else if (command_wrk == (USE_EQUIP))
6168 if (allow_inven) command_wrk = USE_INVEN;
6169 else if (allow_floor) command_wrk = USE_FLOOR;
6176 else if (command_wrk == (USE_FLOOR))
6178 if (allow_equip) command_wrk = USE_EQUIP;
6179 else if (allow_inven) command_wrk = USE_INVEN;
6192 /* Hack -- Fix screen */
6202 /* Switch inven/equip */
6203 if (command_wrk == USE_INVEN) max_line = max_inven;
6204 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6205 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6206 if (menu_line > max_line) menu_line = max_line;
6208 /* Need to redraw */
6216 /* Verify legality */
6217 if (command_wrk == (USE_INVEN))
6219 if (allow_equip) command_wrk = USE_EQUIP;
6220 else if (allow_floor) command_wrk = USE_FLOOR;
6227 else if (command_wrk == (USE_EQUIP))
6229 if (allow_floor) command_wrk = USE_FLOOR;
6230 else if (allow_inven) command_wrk = USE_INVEN;
6237 else if (command_wrk == (USE_FLOOR))
6239 if (allow_inven) command_wrk = USE_INVEN;
6240 else if (allow_equip) command_wrk = USE_EQUIP;
6253 /* Hack -- Fix screen */
6263 /* Switch inven/equip */
6264 if (command_wrk == USE_INVEN) max_line = max_inven;
6265 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6266 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6267 if (menu_line > max_line) menu_line = max_line;
6269 /* Need to redraw */
6278 if (command_wrk == USE_FLOOR)
6281 (*cp) = -get_item_label;
6285 /* Validate the item */
6286 if (!get_item_okay(get_item_label))
6292 /* Allow player to "refuse" certain actions */
6293 if (!get_item_allow(get_item_label))
6299 /* Accept that choice */
6300 (*cp) = get_item_label;
6309 if (select_the_force) {
6317 if (menu_line > max_line) menu_line -= max_line;
6338 command_see = FALSE;
6361 cave_type *c_ptr = &cave[py][px];
6363 if (command_wrk != (USE_FLOOR)) break;
6365 /* Get the object being moved. */
6366 o_idx = c_ptr->o_idx;
6368 /* Only rotate a pile of two or more objects. */
6369 if (!(o_idx && o_list[o_idx].next_o_idx)) break;
6371 /* Remove the first object from the list. */
6372 excise_object_idx(o_idx);
6374 /* Find end of the list. */
6376 while (o_list[i].next_o_idx)
6377 i = o_list[i].next_o_idx;
6379 /* Add after the last object. */
6380 o_list[i].next_o_idx = o_idx;
6382 /* Re-scan floor list */
6383 floor_num = scan_floor(floor_list, py, px, 0x03);
6385 /* Hack -- Fix screen */
6400 if (command_wrk == (USE_INVEN))
6407 command_wrk = (USE_EQUIP);
6409 else if (command_wrk == (USE_EQUIP))
6416 command_wrk = (USE_INVEN);
6418 else if (command_wrk == (USE_FLOOR))
6422 command_wrk = (USE_INVEN);
6424 else if (allow_equip)
6426 command_wrk = (USE_EQUIP);
6435 /* Hack -- Fix screen */
6445 /* Need to redraw */
6458 * If we are already examining the floor, and there
6459 * is only one item, we will always select it.
6460 * If we aren't examining the floor and there is only
6461 * one item, we will select it if floor_query_flag
6466 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
6469 k = 0 - floor_list[0];
6471 /* Allow player to "refuse" certain actions */
6472 if (!get_item_allow(k))
6478 /* Accept that choice */
6487 /* Hack -- Fix screen */
6497 command_wrk = (USE_FLOOR);
6503 case '1': case '2': case '3':
6504 case '4': case '5': case '6':
6505 case '7': case '8': case '9':
6507 if (command_wrk != USE_FLOOR)
6509 /* Look up the tag */
6510 if (!get_tag(&k, which, command_wrk))
6516 /* Hack -- Validate the item */
6517 if ((k < INVEN_RARM) ? !inven : !equip)
6523 /* Validate the item */
6524 if (!get_item_okay(k))
6532 /* Look up the alphabetical tag */
6533 if (get_tag_floor(&k, which, floor_list, floor_num))
6536 k = 0 - floor_list[k];
6545 /* Allow player to "refuse" certain actions */
6546 if (!get_item_allow(k))
6552 /* Accept that choice */
6558 #endif /* ALLOW_REPEAT */
6566 /* Choose "default" inventory item */
6567 if (command_wrk == (USE_INVEN))
6569 k = ((i1 == i2) ? i1 : -1);
6572 /* Choose "default" equipment item */
6573 else if (command_wrk == (USE_EQUIP))
6575 k = ((e1 == e2) ? e1 : -1);
6578 /* Choose "default" floor item */
6579 else if (command_wrk == (USE_FLOOR))
6584 k = 0 - floor_list[0];
6586 /* Allow player to "refuse" certain actions */
6587 if (!get_item_allow(k))
6593 /* Accept that choice */
6601 /* Validate the item */
6602 if (!get_item_okay(k))
6608 /* Allow player to "refuse" certain actions */
6609 if (!get_item_allow(k))
6615 /* Accept that choice */
6625 if (select_the_force) {
6639 if (command_wrk != USE_FLOOR)
6641 bool not_found = FALSE;
6643 /* Look up the alphabetical tag */
6644 if (!get_tag(&k, which, command_wrk))
6649 /* Hack -- Validate the item */
6650 else if ((k < INVEN_RARM) ? !inven : !equip)
6655 /* Validate the item */
6656 else if (!get_item_okay(k))
6663 /* Accept that choice */
6669 #endif /* ALLOW_REPEAT */
6675 /* Look up the alphabetical tag */
6676 if (get_tag_floor(&k, which, floor_list, floor_num))
6679 k = 0 - floor_list[k];
6681 /* Accept that choice */
6687 #endif /* ALLOW_REPEAT */
6692 /* Extract "query" setting */
6693 ver = isupper(which);
6694 which = tolower(which);
6696 /* Convert letter to inventory index */
6697 if (command_wrk == (USE_INVEN))
6699 if (which == '(') k = i1;
6700 else if (which == ')') k = i2;
6701 else k = label_to_inven(which);
6704 /* Convert letter to equipment index */
6705 else if (command_wrk == (USE_EQUIP))
6707 if (which == '(') k = e1;
6708 else if (which == ')') k = e2;
6709 else k = label_to_equip(which);
6712 /* Convert letter to floor index */
6713 else if (command_wrk == USE_FLOOR)
6715 if (which == '(') k = 0;
6716 else if (which == ')') k = floor_num - 1;
6717 else k = islower(which) ? A2I(which) : -1;
6718 if (k < 0 || k >= floor_num || k >= 23)
6725 k = 0 - floor_list[k];
6728 /* Validate the item */
6729 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
6735 /* Verify the item */
6737 if (ver && !verify("ËÜÅö¤Ë", k))
6739 if (ver && !verify("Try", k))
6747 /* Allow player to "refuse" certain actions */
6748 if (!get_item_allow(k))
6754 /* Accept that choice */
6764 /* Fix the screen if necessary */
6770 /* Hack -- Cancel "display" */
6771 command_see = FALSE;
6775 /* Forget the item_tester_tval restriction */
6776 item_tester_tval = 0;
6778 /* Forget the item_tester_hook restriction */
6779 item_tester_hook = NULL;
6782 /* Clean up 'show choices' */
6783 /* Toggle again if needed */
6784 if (toggle) toggle_inven_equip();
6787 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6793 /* Clear the prompt line */
6796 /* Warning if needed */
6797 if (oops && str) msg_print(str);
6803 if (command_cmd) prev_tag = cur_tag;
6804 #endif /* ALLOW_REPEAT */
6806 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6814 static bool py_pickup_floor_aux(void)
6822 /* Restrict the choices */
6823 item_tester_hook = inven_carry_okay;
6827 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
6828 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
6830 q = "Get which item? ";
6831 s = "You no longer have any room for the objects on the floor.";
6834 if (get_item(&item, q, s, (USE_FLOOR)))
6836 this_o_idx = 0 - item;
6843 /* Pick up the object */
6844 py_pickup_aux(this_o_idx);
6851 * Make the player carry everything in a grid
6853 * If "pickup" is FALSE then only gold will be picked up
6855 * This is called by py_pickup() when easy_floor is TRUE.
6857 void py_pickup_floor(bool pickup)
6859 s16b this_o_idx, next_o_idx = 0;
6861 char o_name[MAX_NLEN];
6864 int floor_num = 0, floor_list[23], floor_o_idx = 0;
6868 /* Scan the pile of objects */
6869 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
6873 /* Access the object */
6874 o_ptr = &o_list[this_o_idx];
6876 /* Describe the object */
6877 object_desc(o_name, o_ptr, 0);
6879 /* Access the next object */
6880 next_o_idx = o_ptr->next_o_idx;
6882 /* Hack -- disturb */
6886 if (o_ptr->tval == TV_GOLD)
6890 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
6891 (long)o_ptr->pval, o_name);
6893 msg_format("You have found %ld gold pieces worth of %s.",
6894 (long) o_ptr->pval, o_name);
6898 /* Collect the gold */
6899 p_ptr->au += o_ptr->pval;
6902 p_ptr->redraw |= (PR_GOLD);
6905 p_ptr->window |= (PW_PLAYER);
6907 /* Delete the gold */
6908 delete_object_idx(this_o_idx);
6910 /* Check the next object */
6913 else if (o_ptr->marked & OM_NOMSG)
6915 /* If 0 or 1 non-NOMSG items are in the pile, the NOMSG ones are
6916 * ignored. Otherwise, they are included in the prompt. */
6917 o_ptr->marked &= ~(OM_NOMSG);
6921 /* Count non-gold objects that can be picked up. */
6922 if (inven_carry_okay(o_ptr))
6927 /* Remember this object index */
6929 floor_list[floor_num] = this_o_idx;
6931 /* Count non-gold objects */
6934 /* Remember this index */
6935 floor_o_idx = this_o_idx;
6938 /* There are no non-gold objects */
6942 /* Mention the number of objects */
6948 /* Access the object */
6949 o_ptr = &o_list[floor_o_idx];
6951 #ifdef ALLOW_EASY_SENSE
6953 /* Option: Make object sensing easy */
6956 /* Sense the object */
6957 (void) sense_object(o_ptr);
6960 #endif /* ALLOW_EASY_SENSE */
6962 /* Describe the object */
6963 object_desc(o_name, o_ptr, 0);
6967 msg_format("%s¤¬¤¢¤ë¡£", o_name);
6969 msg_format("You see %s.", o_name);
6974 /* Multiple objects */
6979 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
6981 msg_format("You see a pile of %d items.", floor_num);
6990 /* The player has no room for anything on the floor. */
6996 /* Access the object */
6997 o_ptr = &o_list[floor_o_idx];
6999 #ifdef ALLOW_EASY_SENSE
7001 /* Option: Make object sensing easy */
7004 /* Sense the object */
7005 (void) sense_object(o_ptr);
7008 #endif /* ALLOW_EASY_SENSE */
7010 /* Describe the object */
7011 object_desc(o_name, o_ptr, 0);
7015 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
7017 msg_format("You have no room for %s.", o_name);
7022 /* Multiple objects */
7027 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
7029 msg_print("You have no room for any of the objects on the floor.");
7041 /* Hack -- query every object */
7042 if (carry_query_flag)
7044 char out_val[MAX_NLEN+20];
7046 /* Access the object */
7047 o_ptr = &o_list[floor_o_idx];
7049 #ifdef ALLOW_EASY_SENSE
7051 /* Option: Make object sensing easy */
7054 /* Sense the object */
7055 (void) sense_object(o_ptr);
7058 #endif /* ALLOW_EASY_SENSE */
7060 /* Describe the object */
7061 object_desc(o_name, o_ptr, 0);
7063 /* Build a prompt */
7065 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7067 (void) sprintf(out_val, "Pick up %s? ", o_name);
7071 /* Ask the user to confirm */
7072 if (!get_check(out_val))
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 /* Pick up the object */
7094 py_pickup_aux(floor_o_idx);
7097 /* Allow the user to choose an object */
7100 while (can_pickup--)
7102 if (!py_pickup_floor_aux()) break;
7107 #endif /* ALLOW_EASY_FLOOR */