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 "¿®¤¸Æñ¤¤¤³¤È : 450+d450 ¥¿¡¼¥óËè";
439 case ACT_CAST_BA_STAR:
440 return "¥¹¥¿¡¼¡¦¥Ü¡¼¥ë¡¦¥À¥¹¥È(150) : 1000 ¥¿¡¼¥óËè";
441 case ACT_BLADETURNER:
442 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300), »Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢ÂÑÀ";
444 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
446 return "¼þ°Ï¤Î¥â¥ó¥¹¥¿¡¼¤ò̲¤é¤»¤ë : 55 ¥¿¡¼¥óËè";
448 return "ÃÏ¿Ì (Ⱦ·Â 10) : 50 ¥¿¡¼¥óËè";
450 return "¶²¹² : 3 * (level+10) ¥¿¡¼¥óËè";
452 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
453 case ACT_BANISH_EVIL:
454 return "¼Ù°¾ÃÌÇ : 250+d250 ¥¿¡¼¥óËè";
456 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
458 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
460 return "¥â¥ó¥¹¥¿¡¼¶²¹² : 40+d40¥¿¡¼¥óËè";
462 if (o_ptr->name1 == ART_HYOUSIGI) return "Çï»ÒÌÚ¤òÂǤÁ¤Ê¤é¤¹ : ¤¤¤Ä¤Ç¤â";
463 return "¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë : ¤¤¤Ä¤Ç¤â";
464 case ACT_CHARM_ANIMAL:
465 return "ưʪ̥λ : 200 ¥¿¡¼¥óËè";
466 case ACT_CHARM_UNDEAD:
467 return "¥¢¥ó¥Ç¥Ã¥É½¾Â° : 333 ¥¿¡¼¥óËè";
468 case ACT_CHARM_OTHER:
469 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 400 ¥¿¡¼¥óËè";
470 case ACT_CHARM_ANIMALS:
471 return "ưʪͧÏ : 500 ¥¿¡¼¥óËè";
472 case ACT_CHARM_OTHERS:
473 return "¼þÊÕ̥λ : 750 ¥¿¡¼¥óËè";
474 case ACT_SUMMON_ANIMAL:
475 return "ưʪ¾¤´ : 200+d300 ¥¿¡¼¥óËè";
476 case ACT_SUMMON_PHANTOM:
477 return "¸¸Î´ : 200+d200 ¥¿¡¼¥óËè";
478 case ACT_SUMMON_ELEMENTAL:
479 return "¥¨¥ì¥á¥ó¥¿¥ë¾¤´ : 750 ¥¿¡¼¥óËè";
480 case ACT_SUMMON_DEMON:
481 return "°Ë⾤´ : 666+d333 ¥¿¡¼¥óËè";
482 case ACT_SUMMON_UNDEAD:
483 return "¥¢¥ó¥Ç¥Ã¥É¾¤´ : 666+d333 ¥¿¡¼¥óËè";
484 case ACT_SUMMON_HOUND:
485 return "¥Ï¥¦¥ó¥É¾¤´ : 300+d150 ¥¿¡¼¥óËè";
486 case ACT_SUMMON_DAWN:
487 return "¶Ç¤Î»ÕÃľ¤´ : 500+d500 ¥¿¡¼¥óËè";
488 case ACT_SUMMON_OCTOPUS:
489 return "Âý¤ÎÂç·²¾¤´ : 300+d150¥¿¡¼¥óËè";
491 case ACT_CHOIR_SINGS:
492 return "²óÉü (777)¡¢Ìþ¤·¡¢»Îµ¤¹âÍÈ : 300 ¥¿¡¼¥óËè";
494 return "¶²Éݽüµî/ÂÎÎϲóÉü(30) : 10 ¥¿¡¼¥óËè";
496 return "½ý²óÉü(4d8) : 3+d3 ¥¿¡¼¥óËè";
497 case ACT_CURE_POISON:
498 return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
500 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
502 return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃÍÉü³è : 750 ¥¿¡¼¥óËè";
504 return "ÂÎÎϲóÉü(700) : 250 ¥¿¡¼¥óËè";
506 return "ÂÎÎϲóÉü(1000) : 888 ¥¿¡¼¥óËè";
508 return "Ìþ¤· : 100¥¿¡¼¥óËè";
509 case ACT_CURE_MANA_FULL:
510 return "ËâÎÏÉü³è: 777 ¥¿¡¼¥óËè";
512 return "¥Æ¥ì¥Ñ¥·¡¼ (´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
514 return "»Îµ¤¹âÍȤȽËÊ¡ (´ü´Ö 50+d50) : 100+d100 ¥¿¡¼¥óËè";
516 return "Âмٰ·ë³¦ (´ü´Ö level*3 + d25) : 200+d200 ¥¿¡¼¥óËè";
518 return "Á´ÂÑÀ (´ü´Ö 20+d20) : 111 ¥¿¡¼¥óËè";
520 return "²Ã® (´ü´Ö 20+d20) : 250 ¥¿¡¼¥óËè";
522 return "²Ã® (´ü´Ö 75+d75) : 200+d200 ¥¿¡¼¥óËè";
524 return "Í©Âβ½ (´ü´Ö level/2 + d(level/2)) : 1000 ¥¿¡¼¥óËè";
526 return "̵Ũ²½ (´ü´Ö 8+d8) : 1000 ¥¿¡¼¥óËè";
528 return "»Îµ¤¹âÍÈ : 30+d30¥¿¡¼¥óËè";
530 return "»Îµ¤¹âÍÈ, ¥¹¥Ô¡¼¥É(50+d50¥¿¡¼¥ó) : 100+d200 ¥¿¡¼¥óËè";
532 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
534 return "ËâË¡¤ÎÃϿޤȸ÷ : 50+d50 ¥¿¡¼¥óËè";
536 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
537 case ACT_DETECT_XTRA:
538 return "Á´´¶ÃΡ¢Ãµº÷¡¢*´ÕÄê* : 100 ¥¿¡¼¥óËè";
540 return "*´ÕÄê* : 75 ¥¿¡¼¥óËè";
542 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
544 return "Çúȯ¤Î¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
546 return "¼é¤ê¤Î¥ë¡¼¥ó : 400 ¥¿¡¼¥óËè";
548 return "¶õÊ¢½¼Â : 200 ¥¿¡¼¥óËè";
550 return "¥É¥¢Ç˲õ : 10 ¥¿¡¼¥óËè";
552 return "´äÀÐÍϲò : 3 ¥¿¡¼¥óËè";
554 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
556 return "Ï£¶â½Ñ : 500 ¥¿¡¼¥óËè";
558 return "¼¡¸µ¤ÎÈâ : 100 ¥¿¡¼¥óËè";
560 return "¥Æ¥ì¥Ý¡¼¥È (range 100) : 25 ¥¿¡¼¥óËè";
562 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
564 return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô : 20+d20 ¥¿¡¼¥óËè";
565 case ACT_TELEKINESIS:
566 return "ʪÂΤò°ú¤´ó¤»¤ë(½ÅÎÌ25kg¤Þ¤Ç) : 25+d25¥¿¡¼¥óËè";
567 case ACT_DETECT_UNIQUE:
568 return "¤³¤Î³¬¤Ë¤¤¤ë¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òɽ¼¨ : 200¥¿¡¼¥óËè";
570 return "ƨÁö : 35 ¥¿¡¼¥óËè";
571 case ACT_DISP_CURSE_XTRA:
572 return "*²ò¼ö*¤ÈÄ´ºº: ¤¤¤Ä¤Ç¤â";
573 case ACT_BRAND_FIRE_BOLTS:
574 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
575 case ACT_RECHARGE_XTRA:
576 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
578 return "´í¸±¤òȼ¤¦´ÕÄê : ¤¤¤Ä¤Ç¤â";
580 return "»Í¸ÔƧ¤ß : 100+d100¥¿¡¼¥óËè";
582 /* Unique activation */
584 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
586 return "Îã¤Î¥¢¥ì : 150+d150 ¥¿¡¼¥óËè";
588 return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë";
589 case ACT_BLOODY_MOON:
590 return "°ÀÊѹ¹ : 3333 ¥¿¡¼¥óËè";
592 return "¥Õ¥¡¥¤¥¢¡ª : 15 ¥¿¡¼¥óËè";
597 /* General activation */
600 return "beam of sunlight every 10 turns";
602 return "magic missile (2d6) every 2 turns";
604 return "stinking cloud (12) every 4+d4 turns";
606 return "lightning bolt (4d8) every 5+d5 turns";
608 return "acid bolt (5d8) every 6+d6 turns";
610 return "frost bolt (6d8) every 7+d7 turns";
612 return "fire bolt (9d8) every 8+d8 turns";
614 return "ball of cold (48) every 6+d6 turns";
616 return "ball of fire (72) every 9+d9 turns";
618 return "a strangling attack (100) every 100+d100 turns";
620 return "ball of cold (100) every 12+d12 turns";
622 return "ball of lightning (100) every 12+d12 turns";
624 return "drain life (120) every 400 turns";
626 return "vampiric drain (3*50) every 400 turns";
628 return "arrows (150) every 90+d90 turns";
630 return "fire ball (300) every 225+d225 turns";
632 return "ball of cold (400) every 325+d325 turns";
634 return "ball of lightning (500) every 425+d425 turns";
636 return "whirlwind attack every 250 turns";
638 return "vampiric drain (3*100) every 400 turns";
640 return "call chaos every 350 turns";
642 return "launch rocket (120+level) every 400 turns";
644 return "dispel evil (x5) every 100+d100 turns";
646 return "elemental breath (300) every 500 turns";
648 return "dispel good (x5) every 100+d100 turns";
650 return "a magical arrow (150) every 90+d90 turns";
652 return "large fire ball (120) every 15 turns";
654 return "water ball (200) every 250 turns";
656 return "large star ball (200) every 200+d200 turns";
658 return "darkness storm (250) every 150+d150 turns";
660 return "a mana storm every 250+d250 turns";
662 return "dispel small life every 55+d55 turns";
663 case ACT_BLINDING_LIGHT:
664 return "blinding light every 250 turns";
666 return "bizarre things every 450+d450 turns";
667 case ACT_CAST_BA_STAR:
668 return "cast star balls (150) every 1000 turns";
669 case ACT_BLADETURNER:
670 return "breathe elements (300), hero, bless, and resistance";
673 return "confuse monster every 15 turns";
675 return "sleep nearby monsters every 55 turns";
677 return "earthquake (rad 10) every 50 turns";
679 return "terror every 3 * (level+10) turns";
681 return "teleport away every 200 turns";
682 case ACT_BANISH_EVIL:
683 return "banish evil every 250+d250 turns";
685 return "genocide every 500 turns";
687 return "mass genocide every 1000 turns";
689 return "frighten monsters every 40+d40 turns";
691 if (o_ptr->name1 == ART_HYOUSIGI) return "beat wooden clappers every turn";
692 return "aggravete monsters every turn";
694 case ACT_CHARM_ANIMAL:
695 return "charm animal every 200 turns";
696 case ACT_CHARM_UNDEAD:
697 return "enslave undead every 333 turns";
698 case ACT_CHARM_OTHER:
699 return "charm monster every 400 turns";
700 case ACT_CHARM_ANIMALS:
701 return "animal friendship every 500 turns";
702 case ACT_CHARM_OTHERS:
703 return "mass charm every 750 turns";
704 case ACT_SUMMON_ANIMAL:
705 return "summon animal every 200+d300 turns";
706 case ACT_SUMMON_PHANTOM:
707 return "summon phantasmal servant every 200+d200 turns";
708 case ACT_SUMMON_ELEMENTAL:
709 return "summon elemental every 750 turns";
710 case ACT_SUMMON_DEMON:
711 return "summon demon every 666+d333 turns";
712 case ACT_SUMMON_UNDEAD:
713 return "summon undead every 666+d333 turns";
714 case ACT_SUMMON_HOUND:
715 return "summon hound every 300+d150 turns";
716 case ACT_SUMMON_DAWN:
717 return "summon the Legion of the Dawn every 500+d500 turns";
718 case ACT_SUMMON_OCTOPUS:
719 return "summon octopus every 300+d150 turns";
721 case ACT_CHOIR_SINGS:
722 return "heal 777 hit points, curing and heloism every 300 turns";
724 return "remove fear and heal 30 hp every 10 turns";
726 return "heal 4d8 and wounds every 3+d3 turns";
727 case ACT_CURE_POISON:
728 return "remove fear and cure poison every 5 turns";
730 return "restore life levels every 450 turns";
732 return "restore stats and life levels every 750 turns";
734 return "heal 700 hit points every 250 turns";
736 return "heal 1000 hit points every 888 turns";
738 return "curing every 100 turns";
739 case ACT_CURE_MANA_FULL:
740 return "restore mana every 777 turns";
742 return "telepathy (dur 25+d30) every 200 turns";
744 return "heroism and blessed (dur 50+d50) every 100+d100 turns";
746 return "protect evil (dur level*3 + d25) every 200+d200 turns";
748 return "resist elements (dur 20+d20) every 111 turns";
750 return "speed (dur 20+d20) every 100+d100 turns";
752 return "speed (dur 75+d75) every 100+d100 turns";
754 return "wraith form (dur level/2 + d(level/2)) every 1000 turns";
756 return "invulnerability (dur 8+d8) every 1000 turns";
758 return "heroism every 30+d30 turns";
760 return "hero and +10 to speed (50) every 100+200d turns";
761 case ACT_RESIST_ACID:
762 return "resist acid (dur 20+d20) every 40+d40 turns";
763 case ACT_RESIST_FIRE:
764 return "resist fire (dur 20+d20) every 40+d40 turns";
765 case ACT_RESIST_COLD:
766 return "resist cold (dur 20+d20) every 40+d40 turns";
767 case ACT_RESIST_ELEC:
768 return "resist thunder (dur 20+d20) every 40+d40 turns";
769 case ACT_RESIST_POIS:
770 return "resist poison (dur 20+d20) every 40+d40 turns";
772 return "light area (dam 2d15) every 10+d10 turns";
774 return "light (dam 2d15) & map area every 50+d50 turns";
776 return "detection every 55+d55 turns";
777 case ACT_DETECT_XTRA:
778 return "detection, probing and identify true every 100 turns";
780 return "identify true every 75 turns";
782 return "identify spell every 10 turns";
784 return "explosive rune every 200 turns";
786 return "rune of protection every 400 turns";
788 return "satisfy hunger every 200 turns";
790 return "destroy doors every 10 turns";
792 return "stone to mud every 3 turns";
794 return "recharging every 70 turns";
796 return "alchemy every 500 turns";
798 return "dimension door every 100 turns";
800 return "teleport (range 100) every 25 turns";
802 return "word of recall every 200 turns";
803 case ACT_TELEKINESIS:
804 return "a telekinesis (500 lb) every 25+d25 turns";
806 return "clairvoyance and recall, draining you every 20+d20 turns";
807 case ACT_DETECT_UNIQUE:
808 return "list of the uniques on the level every 200 turns";
810 return "a getaway every 35 turns";
811 case ACT_DISP_CURSE_XTRA:
812 return "dispel curse and probing every turn";
813 case ACT_BRAND_FIRE_BOLTS:
814 return "fire branding of bolts every 999 turns";
815 case ACT_RECHARGE_XTRA:
816 return "recharge item every 200 turns";
818 return "perilous identify every turn";
820 return "shiko every 100+d100 turns";
822 /* Unique activation */
824 return "fishing : every time";
826 return "reveal your identity every 150+d150 turns";
828 return "increase STR (destroyed 50%)";
829 case ACT_BLOODY_MOON:
830 return "change zokusei every 3333 turns";
832 return "fire! every 15 turns";
835 return "something undefined";
841 /* Some artifacts can be activated */
842 switch (o_ptr->name1)
848 if (object_is_smith(o_ptr))
850 switch (o_ptr->xtra3 - 1)
852 case ESSENCE_TMP_RES_ACID:
854 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
856 return "resist acid every 50+d50 turns";
859 case ESSENCE_TMP_RES_ELEC:
861 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
863 return "resist elec every 50+d50 turns";
866 case ESSENCE_TMP_RES_FIRE:
868 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
870 return "resist fire every 50+d50 turns";
873 case ESSENCE_TMP_RES_COLD:
875 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
877 return "resist cold every 50+d50 turns";
882 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
884 return "earthquake every 100+d100 turns";
889 if (o_ptr->name2 == EGO_TRUMP)
892 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
894 return "teleport every 50+d50 turns";
899 if (o_ptr->name2 == EGO_LITE_ILLUMINATION)
902 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
904 return "illumination every 10+d10 turns";
908 else if (o_ptr->name2 == EGO_EARTHQUAKES)
911 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
913 return "earthquake every 100+d100 turns";
918 else if (o_ptr->name2 == EGO_JUMP)
921 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
923 return "blink every 10+d10 turns";
928 if (o_ptr->tval == TV_RING)
930 if (object_is_ego(o_ptr))
932 switch (o_ptr->name2)
936 return "»Îµ¤¹âÍÈ : 100+d100¥¿¡¼¥óËè";
938 return "heroism every 100+d100 turns";
940 case EGO_RING_MAGIC_MIS:
942 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
944 return "magic missile (2d6) every 2 turns";
946 case EGO_RING_FIRE_BOLT:
948 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
950 return "fire bolt (9d8) every 8+d8 turns";
952 case EGO_RING_COLD_BOLT:
954 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
956 return "frost bolt (6d8) every 7+d7 turns";
958 case EGO_RING_ELEC_BOLT:
960 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
962 return "lightning bolt (4d8) every 5+d5 turns";
964 case EGO_RING_ACID_BOLT:
966 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
968 return "acid bolt (5d8) every 6+d6 turns";
970 case EGO_RING_MANA_BOLT:
972 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
974 return "a mana bolt (120) every 120+d120 turns";
976 case EGO_RING_FIRE_BALL:
978 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
980 return "fire ball (100) every 80+d80 turns";
982 case EGO_RING_COLD_BALL:
984 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
986 return "cold ball (100) every 80+d80 turns";
988 case EGO_RING_ELEC_BALL:
990 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
992 return "elec ball (100) every 80+d80 turns";
994 case EGO_RING_ACID_BALL:
996 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
998 return "acid ball (100) every 80+d80 turns";
1000 case EGO_RING_MANA_BALL:
1002 return "ËâÎϤÎÍò (250) : 300 ¥¿¡¼¥óËè";
1004 return "mana storm (250) every 300 turns";
1006 case EGO_RING_DRAGON_F:
1007 if (o_ptr->sval == SV_RING_FLAMES)
1009 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) ¤È²Ð¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
1011 return "breath of fire (200) and resist fire every 200 turns";
1015 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
1017 return "fire breath (200) every 250 turns";
1019 case EGO_RING_DRAGON_C:
1020 if (o_ptr->sval == SV_RING_ICE)
1022 return "Î䵤¤Î¥Ö¥ì¥¹ (200) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
1024 return "breath of cold (200) and resist cold every 200 turns";
1028 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
1030 return "cold breath (200) every 250 turns";
1032 case EGO_RING_M_DETECT:
1034 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃÎ : 150 ¥¿¡¼¥óËè";
1036 return "detect all monsters every 150 turns";
1038 case EGO_RING_D_SPEED:
1040 return "¥¹¥Ô¡¼¥É(15+d30¥¿¡¼¥ó) : 100 ¥¿¡¼¥óËè";
1042 return "haste self (15+d30 turns) every 100 turns";
1044 case EGO_RING_BERSERKER:
1046 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
1048 return "berserk (25+d25 turns) every 75+d75 turns";
1050 case EGO_RING_TELE_AWAY:
1052 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
1054 return "teleport away every 150 turns";
1058 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ : 777 ¥¿¡¼¥óËè";
1060 return "hero, bless, and ultimate resistance every 777 turns";
1064 switch (o_ptr->sval)
1066 case SV_RING_FLAMES:
1068 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) ¤È²Ð¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1070 return "ball of fire (100) and resist fire every 50+d50 turns";
1075 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1077 return "ball of cold (100) and resist cold every 50+d50 turns";
1082 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) ¤È»À¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1084 return "ball of acid (100) and resist acid every 50+d50 turns";
1089 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) ¤ÈÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1091 return "ball of elec (100) and resist elec every 50+d50 turns";
1099 if (o_ptr->tval == TV_AMULET)
1101 if (object_is_ego(o_ptr))
1103 switch (o_ptr->name2)
1107 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
1109 return "identify every 10 turns";
1113 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
1115 return "charm monster every 200 turns";
1119 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1121 return "blink every 10+d10 turns";
1123 case EGO_AMU_TELEPORT:
1125 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
1127 return "teleport every 50+d50 turns";
1129 case EGO_AMU_D_DOOR:
1131 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
1133 return "dimension door every 200 turns";
1135 case EGO_AMU_RES_FIRE_:
1137 return "²Ð±ê¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1139 return "resist fire every 50+d50 turns";
1141 case EGO_AMU_RES_COLD_:
1143 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1145 return "resist cold every 50+d50 turns";
1147 case EGO_AMU_RES_ELEC_:
1149 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1151 return "resist elec every 50+d50 turns";
1153 case EGO_AMU_RES_ACID_:
1155 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1157 return "resist acid every 50+d50 turns";
1159 case EGO_AMU_DETECTION:
1161 return "Á´´¶ÃÎ : 55+d55¥¿¡¼¥óËè";
1163 return "detect all floor every 55+d55 turns";
1169 if (o_ptr->tval == TV_WHISTLE)
1172 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
1174 return "call pet every 100+d100 turns";
1178 if (o_ptr->tval == TV_CAPTURE)
1181 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
1183 return "captures or releases a monster.";
1187 /* Require dragon scale mail */
1189 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
1191 if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
1195 /* Branch on the sub-type */
1196 switch (o_ptr->sval)
1198 case SV_DRAGON_BLUE:
1201 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
1203 return "breathe lightning (100) every 150+d150 turns";
1207 case SV_DRAGON_WHITE:
1210 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
1212 return "breathe frost (110) every 150+d150 turns";
1216 case SV_DRAGON_BLACK:
1219 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
1221 return "breathe acid (130) every 150+d150 turns";
1225 case SV_DRAGON_GREEN:
1228 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
1230 return "breathe poison gas (150) every 180+d180 turns";
1237 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
1239 return "breathe fire (200) every 200+d200 turns";
1243 case SV_DRAGON_MULTIHUED:
1246 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
1248 return "breathe multi-hued (250) every 200+d200 turns";
1252 case SV_DRAGON_BRONZE:
1255 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
1257 return "breathe confusion (120) every 180+d180 turns";
1261 case SV_DRAGON_GOLD:
1264 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
1266 return "breathe sound (130) every 180+d180 turns";
1270 case SV_DRAGON_CHAOS:
1273 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
1275 return "breathe chaos/disenchant (220) every 200+d200 turns";
1282 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
1284 return "breathe sound/shards (230) every 200+d200 turns";
1288 case SV_DRAGON_BALANCE:
1291 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
1293 return "breathe balance (250) every 200+d200 turns";
1297 case SV_DRAGON_SHINING:
1300 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
1302 return "breathe light/darkness (200) every 200+d200 turns";
1306 case SV_DRAGON_POWER:
1309 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
1311 return "breathe the elements (300) every 200+d200 turns";
1321 return "breathe air";
1328 * Describe a "fully identified" item
1330 bool screen_object(object_type *o_ptr, u32b mode)
1334 u32b flgs[TR_FLAG_SIZE];
1338 char o_name[MAX_NLEN];
1341 int trivial_info = 0;
1343 /* Extract the flags */
1344 object_flags(o_ptr, flgs);
1346 /* Extract the description */
1348 roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
1349 (k_text + k_info[o_ptr->k_idx].text),
1350 77 - 15, temp, sizeof(temp));
1351 for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
1352 { info[i] = &temp[j]; i++;}
1355 if (object_is_equipment(o_ptr))
1357 /* Descriptions of a basic equipment is just a flavor */
1361 /* Mega-Hack -- describe activation */
1362 if (have_flag(flgs, TR_ACTIVATE))
1365 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
1367 info[i++] = "It can be activated for...";
1370 info[i++] = item_activation(o_ptr);
1372 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
1374 info[i++] = "...if it is being worn.";
1379 /* Figurines, a hack */
1380 if (o_ptr->tval == TV_FIGURINE)
1383 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
1385 info[i++] = "It will transform into a pet when thrown.";
1390 /* Figurines, a hack */
1391 if (o_ptr->name1 == ART_STONEMASK)
1394 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
1396 info[i++] = "It makes you turn into a vampire permanently.";
1401 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
1404 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
1406 info[i++] = "It will attempt to kill a monster instantly.";
1411 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
1414 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
1416 info[i++] = "It causes you to strike yourself sometimes.";
1420 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
1422 info[i++] = "It always penetrates invulnerability barriers.";
1426 if (o_ptr->name2 == EGO_2WEAPON)
1429 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
1431 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
1436 if (have_flag(flgs, TR_EASY_SPELL))
1439 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
1441 info[i++] = "It affects your ability to cast spells.";
1445 if (o_ptr->name2 == EGO_AMU_FOOL)
1448 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
1450 info[i++] = "It interferes with casting spells.";
1454 if (o_ptr->name2 == EGO_RING_THROW)
1457 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
1459 info[i++] = "It provides great strength when you throw an item.";
1463 if (o_ptr->name2 == EGO_AMU_NAIVETY)
1466 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
1468 info[i++] = "It decreases your magic resistance.";
1472 if (o_ptr->tval == TV_STATUE)
1474 monster_race *r_ptr = &r_info[o_ptr->pval];
1476 if (o_ptr->pval == MON_BULLGATES)
1478 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
1480 info[i++] = "It is shameful.";
1482 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
1484 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
1486 info[i++] = "It is fearful.";
1490 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
1492 info[i++] = "It is cheerful.";
1496 /* Hack -- describe lite's */
1497 if (o_ptr->tval == TV_LITE)
1499 if (o_ptr->name2 == EGO_LITE_DARKNESS)
1502 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
1504 info[i++] = "It provides no light.";
1507 if (o_ptr->sval == SV_LITE_FEANOR)
1510 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-3)¡£";
1512 info[i++] = "It decreases radius of light source by 3.";
1515 else if (o_ptr->sval == SV_LITE_LANTERN)
1518 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
1520 info[i++] = "It decreases radius of light source by 2.";
1526 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
1528 info[i++] = "It decreases radius of light source by 1.";
1532 else if (object_is_fixed_artifact(o_ptr))
1535 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1537 info[i++] = "It provides light (radius 3) forever.";
1541 else if (o_ptr->name2 == EGO_LITE_SHINE)
1543 if (o_ptr->sval == SV_LITE_FEANOR)
1546 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1548 info[i++] = "It provides light (radius 3) forever.";
1552 else if (o_ptr->sval == SV_LITE_LANTERN)
1555 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1557 info[i++] = "It provides light (radius 3) when fueled.";
1564 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1566 info[i++] = "It provides light (radius 2) when fueled.";
1573 if (o_ptr->sval == SV_LITE_FEANOR)
1576 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1578 info[i++] = "It provides light (radius 2) forever.";
1582 else if (o_ptr->sval == SV_LITE_LANTERN)
1585 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1587 info[i++] = "It provides light (radius 2) when fueled.";
1594 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
1596 info[i++] = "It provides light (radius 1) when fueled.";
1601 if (o_ptr->name2 == EGO_LITE_LONG)
1604 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
1606 info[i++] = "It provides light for much longer time.";
1612 /* And then describe it fully */
1614 if (have_flag(flgs, TR_RIDING))
1616 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
1618 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
1620 info[i++] = "It is made for use while riding.";
1625 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
1627 info[i++] = "It is suitable for use while riding.";
1629 /* This information is not important enough */
1633 if (have_flag(flgs, TR_STR))
1636 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1638 info[i++] = "It affects your strength.";
1642 if (have_flag(flgs, TR_INT))
1645 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1647 info[i++] = "It affects your intelligence.";
1651 if (have_flag(flgs, TR_WIS))
1654 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1656 info[i++] = "It affects your wisdom.";
1660 if (have_flag(flgs, TR_DEX))
1663 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1665 info[i++] = "It affects your dexterity.";
1669 if (have_flag(flgs, TR_CON))
1672 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1674 info[i++] = "It affects your constitution.";
1678 if (have_flag(flgs, TR_CHR))
1681 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1683 info[i++] = "It affects your charisma.";
1688 if (have_flag(flgs, TR_MAGIC_MASTERY))
1691 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1693 info[i++] = "It affects your ability to use magic devices.";
1697 if (have_flag(flgs, TR_STEALTH))
1700 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1702 info[i++] = "It affects your stealth.";
1706 if (have_flag(flgs, TR_SEARCH))
1709 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1711 info[i++] = "It affects your searching.";
1715 if (have_flag(flgs, TR_INFRA))
1718 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1720 info[i++] = "It affects your infravision.";
1724 if (have_flag(flgs, TR_TUNNEL))
1727 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1729 info[i++] = "It affects your ability to tunnel.";
1733 if (have_flag(flgs, TR_SPEED))
1736 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1738 info[i++] = "It affects your speed.";
1742 if (have_flag(flgs, TR_BLOWS))
1745 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1747 info[i++] = "It affects your attack speed.";
1752 if (have_flag(flgs, TR_BRAND_ACID))
1755 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1757 info[i++] = "It does extra damage from acid.";
1761 if (have_flag(flgs, TR_BRAND_ELEC))
1764 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1766 info[i++] = "It does extra damage from electricity.";
1770 if (have_flag(flgs, TR_BRAND_FIRE))
1773 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1775 info[i++] = "It does extra damage from fire.";
1779 if (have_flag(flgs, TR_BRAND_COLD))
1782 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1784 info[i++] = "It does extra damage from frost.";
1789 if (have_flag(flgs, TR_BRAND_POIS))
1792 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
1794 info[i++] = "It poisons your foes.";
1799 if (have_flag(flgs, TR_CHAOTIC))
1802 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
1804 info[i++] = "It produces chaotic effects.";
1809 if (have_flag(flgs, TR_VAMPIRIC))
1812 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
1814 info[i++] = "It drains life from your foes.";
1819 if (have_flag(flgs, TR_IMPACT))
1822 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
1824 info[i++] = "It can cause earthquakes.";
1829 if (have_flag(flgs, TR_VORPAL))
1832 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1834 info[i++] = "It is very sharp and can cut your foes.";
1839 if (have_flag(flgs, TR_KILL_DRAGON))
1842 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1844 info[i++] = "It is a great bane of dragons.";
1848 else if (have_flag(flgs, TR_SLAY_DRAGON))
1851 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1853 info[i++] = "It is especially deadly against dragons.";
1858 if (have_flag(flgs, TR_KILL_ORC))
1861 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1863 info[i++] = "It is a great bane of orcs.";
1867 if (have_flag(flgs, TR_SLAY_ORC))
1870 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1872 info[i++] = "It is especially deadly against orcs.";
1877 if (have_flag(flgs, TR_KILL_TROLL))
1880 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1882 info[i++] = "It is a great bane of trolls.";
1886 if (have_flag(flgs, TR_SLAY_TROLL))
1889 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1891 info[i++] = "It is especially deadly against trolls.";
1896 if (have_flag(flgs, TR_KILL_GIANT))
1899 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1901 info[i++] = "It is a great bane of giants.";
1904 else if (have_flag(flgs, TR_SLAY_GIANT))
1907 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1909 info[i++] = "It is especially deadly against giants.";
1914 if (have_flag(flgs, TR_KILL_DEMON))
1917 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1919 info[i++] = "It is a great bane of demons.";
1923 if (have_flag(flgs, TR_SLAY_DEMON))
1926 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
1928 info[i++] = "It strikes at demons with holy wrath.";
1933 if (have_flag(flgs, TR_KILL_UNDEAD))
1936 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1938 info[i++] = "It is a great bane of undead.";
1942 if (have_flag(flgs, TR_SLAY_UNDEAD))
1945 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
1947 info[i++] = "It strikes at undead with holy wrath.";
1952 if (have_flag(flgs, TR_KILL_EVIL))
1955 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1957 info[i++] = "It is a great bane of evil monsters.";
1961 if (have_flag(flgs, TR_SLAY_EVIL))
1964 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
1966 info[i++] = "It fights against evil with holy fury.";
1971 if (have_flag(flgs, TR_KILL_ANIMAL))
1974 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1976 info[i++] = "It is a great bane of natural creatures.";
1980 if (have_flag(flgs, TR_SLAY_ANIMAL))
1983 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1985 info[i++] = "It is especially deadly against natural creatures.";
1990 if (have_flag(flgs, TR_KILL_HUMAN))
1993 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1995 info[i++] = "It is a great bane of humans.";
1999 if (have_flag(flgs, TR_SLAY_HUMAN))
2002 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2004 info[i++] = "It is especially deadly against humans.";
2009 if (have_flag(flgs, TR_FORCE_WEAPON))
2012 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
2014 info[i++] = "It powerfully strikes at a monster using your mana.";
2018 if (have_flag(flgs, TR_DEC_MANA))
2021 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
2023 info[i++] = "It decreases your mana consumption.";
2027 if (have_flag(flgs, TR_SUST_STR))
2030 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
2032 info[i++] = "It sustains your strength.";
2036 if (have_flag(flgs, TR_SUST_INT))
2039 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
2041 info[i++] = "It sustains your intelligence.";
2045 if (have_flag(flgs, TR_SUST_WIS))
2048 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
2050 info[i++] = "It sustains your wisdom.";
2054 if (have_flag(flgs, TR_SUST_DEX))
2057 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
2059 info[i++] = "It sustains your dexterity.";
2063 if (have_flag(flgs, TR_SUST_CON))
2066 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
2068 info[i++] = "It sustains your constitution.";
2072 if (have_flag(flgs, TR_SUST_CHR))
2075 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
2077 info[i++] = "It sustains your charisma.";
2082 if (have_flag(flgs, TR_IM_ACID))
2085 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2087 info[i++] = "It provides immunity to acid.";
2091 if (have_flag(flgs, TR_IM_ELEC))
2094 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2096 info[i++] = "It provides immunity to electricity.";
2100 if (have_flag(flgs, TR_IM_FIRE))
2103 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2105 info[i++] = "It provides immunity to fire.";
2109 if (have_flag(flgs, TR_IM_COLD))
2112 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2114 info[i++] = "It provides immunity to cold.";
2119 if (have_flag(flgs, TR_THROW))
2122 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2124 info[i++] = "It is perfectly balanced for throwing.";
2128 if (have_flag(flgs, TR_FREE_ACT))
2131 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2133 info[i++] = "It provides immunity to paralysis.";
2137 if (have_flag(flgs, TR_HOLD_LIFE))
2140 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
2142 info[i++] = "It provides resistance to life draining.";
2146 if (have_flag(flgs, TR_RES_FEAR))
2149 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
2151 info[i++] = "It makes you completely fearless.";
2155 if (have_flag(flgs, TR_RES_ACID))
2158 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2160 info[i++] = "It provides resistance to acid.";
2164 if (have_flag(flgs, TR_RES_ELEC))
2167 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2169 info[i++] = "It provides resistance to electricity.";
2173 if (have_flag(flgs, TR_RES_FIRE))
2176 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2178 info[i++] = "It provides resistance to fire.";
2182 if (have_flag(flgs, TR_RES_COLD))
2185 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2187 info[i++] = "It provides resistance to cold.";
2191 if (have_flag(flgs, TR_RES_POIS))
2194 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2196 info[i++] = "It provides resistance to poison.";
2201 if (have_flag(flgs, TR_RES_LITE))
2204 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2206 info[i++] = "It provides resistance to light.";
2210 if (have_flag(flgs, TR_RES_DARK))
2213 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2215 info[i++] = "It provides resistance to dark.";
2220 if (have_flag(flgs, TR_RES_BLIND))
2223 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2225 info[i++] = "It provides resistance to blindness.";
2229 if (have_flag(flgs, TR_RES_CONF))
2232 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2234 info[i++] = "It provides resistance to confusion.";
2238 if (have_flag(flgs, TR_RES_SOUND))
2241 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2243 info[i++] = "It provides resistance to sound.";
2247 if (have_flag(flgs, TR_RES_SHARDS))
2250 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2252 info[i++] = "It provides resistance to shards.";
2257 if (have_flag(flgs, TR_RES_NETHER))
2260 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2262 info[i++] = "It provides resistance to nether.";
2266 if (have_flag(flgs, TR_RES_NEXUS))
2269 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2271 info[i++] = "It provides resistance to nexus.";
2275 if (have_flag(flgs, TR_RES_CHAOS))
2278 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2280 info[i++] = "It provides resistance to chaos.";
2284 if (have_flag(flgs, TR_RES_DISEN))
2287 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2289 info[i++] = "It provides resistance to disenchantment.";
2294 if (have_flag(flgs, TR_LEVITATION))
2297 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2299 info[i++] = "It allows you to levitate.";
2303 if (have_flag(flgs, TR_LITE))
2305 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
2307 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
2309 info[i++] = "It decreases radius of your light source by 1.";
2313 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë(Ⱦ·Â¤Ë+1)¡£";
2315 info[i++] = "It provides permanent light. (radius +1)";
2319 if (have_flag(flgs, TR_SEE_INVIS))
2322 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2324 info[i++] = "It allows you to see invisible monsters.";
2328 if (have_flag(flgs, TR_TELEPATHY))
2331 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
2333 info[i++] = "It gives telepathic powers.";
2337 if (have_flag(flgs, TR_ESP_ANIMAL))
2340 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤ò´¶ÃΤ¹¤ë¡£";
2342 info[i++] = "It senses natural creatures.";
2346 if (have_flag(flgs, TR_ESP_UNDEAD))
2349 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ò´¶ÃΤ¹¤ë¡£";
2351 info[i++] = "It senses undead.";
2355 if (have_flag(flgs, TR_ESP_DEMON))
2358 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò´¶ÃΤ¹¤ë¡£";
2360 info[i++] = "It senses demons.";
2364 if (have_flag(flgs, TR_ESP_ORC))
2367 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ò´¶ÃΤ¹¤ë¡£";
2369 info[i++] = "It senses orcs.";
2373 if (have_flag(flgs, TR_ESP_TROLL))
2376 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ò´¶ÃΤ¹¤ë¡£";
2378 info[i++] = "It senses trolls.";
2382 if (have_flag(flgs, TR_ESP_GIANT))
2385 info[i++] = "¤½¤ì¤Ïµð¿Í¤ò´¶ÃΤ¹¤ë¡£";
2387 info[i++] = "It senses giants.";
2391 if (have_flag(flgs, TR_ESP_DRAGON))
2394 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò´¶ÃΤ¹¤ë¡£";
2396 info[i++] = "It senses dragons.";
2400 if (have_flag(flgs, TR_ESP_HUMAN))
2403 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ò´¶ÃΤ¹¤ë¡£";
2405 info[i++] = "It senses humans.";
2409 if (have_flag(flgs, TR_ESP_EVIL))
2412 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¸ºß¤ò´¶ÃΤ¹¤ë¡£";
2414 info[i++] = "It senses evil creatures.";
2418 if (have_flag(flgs, TR_ESP_GOOD))
2421 info[i++] = "¤½¤ì¤ÏÁ±Îɤʸºß¤ò´¶ÃΤ¹¤ë¡£";
2423 info[i++] = "It senses good creatures.";
2427 if (have_flag(flgs, TR_ESP_NONLIVING))
2430 info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤò´¶ÃΤ¹¤ë¡£";
2432 info[i++] = "It senses non-living creatures.";
2436 if (have_flag(flgs, TR_ESP_UNIQUE))
2439 info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤ò´¶ÃΤ¹¤ë¡£";
2441 info[i++] = "It senses unique monsters.";
2445 if (have_flag(flgs, TR_SLOW_DIGEST))
2448 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
2450 info[i++] = "It slows your metabolism.";
2454 if (have_flag(flgs, TR_REGEN))
2457 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
2459 info[i++] = "It speeds your regenerative powers.";
2463 if (have_flag(flgs, TR_WARNING))
2466 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
2468 info[i++] = "It warns you of danger";
2472 if (have_flag(flgs, TR_REFLECT))
2475 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
2477 info[i++] = "It reflects bolts and arrows.";
2481 if (have_flag(flgs, TR_SH_FIRE))
2484 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2486 info[i++] = "It produces a fiery sheath.";
2490 if (have_flag(flgs, TR_SH_ELEC))
2493 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2495 info[i++] = "It produces an electric sheath.";
2499 if (have_flag(flgs, TR_SH_COLD))
2502 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2504 info[i++] = "It produces a sheath of coldness.";
2508 if (have_flag(flgs, TR_NO_MAGIC))
2511 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2513 info[i++] = "It produces an anti-magic shell.";
2517 if (have_flag(flgs, TR_NO_TELE))
2520 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
2522 info[i++] = "It prevents teleportation.";
2526 if (have_flag(flgs, TR_XTRA_MIGHT))
2529 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2531 info[i++] = "It fires missiles with extra might.";
2535 if (have_flag(flgs, TR_XTRA_SHOTS))
2538 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2540 info[i++] = "It fires missiles excessively fast.";
2545 if (have_flag(flgs, TR_BLESSED))
2548 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
2550 info[i++] = "It has been blessed by the gods.";
2555 if (object_is_cursed(o_ptr))
2557 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
2560 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
2562 info[i++] = "It is permanently cursed.";
2566 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
2569 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
2571 info[i++] = "It is heavily cursed.";
2578 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
2580 info[i++] = "It is cursed.";
2584 * It's a trivial infomation since there is
2585 * fake inscription {cursed}
2591 if ((have_flag(flgs, TR_TY_CURSE)) || (o_ptr->curse_flags & TRC_TY_CURSE))
2594 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
2596 info[i++] = "It carries an ancient foul curse.";
2600 if ((have_flag(flgs, TR_AGGRAVATE)) || (o_ptr->curse_flags & TRC_AGGRAVATE))
2603 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
2605 info[i++] = "It aggravates nearby creatures.";
2609 if ((have_flag(flgs, TR_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
2612 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
2614 info[i++] = "It drains experience.";
2618 if (o_ptr->curse_flags & TRC_SLOW_REGEN)
2621 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
2623 info[i++] = "It slows your regenerative powers.";
2627 if (o_ptr->curse_flags & TRC_ADD_L_CURSE)
2630 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
2632 info[i++] = "It adds weak curses.";
2636 if (o_ptr->curse_flags & TRC_ADD_H_CURSE)
2639 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
2641 info[i++] = "It adds heavy curses.";
2645 if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
2648 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2650 info[i++] = "It attracts animals.";
2654 if (o_ptr->curse_flags & TRC_CALL_DEMON)
2657 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2659 info[i++] = "It attracts demons.";
2663 if (o_ptr->curse_flags & TRC_CALL_DRAGON)
2666 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2668 info[i++] = "It attracts dragons.";
2672 if (o_ptr->curse_flags & TRC_COWARDICE)
2675 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤µ¯¤³¤¹¡£";
2677 info[i++] = "It makes you subject to cowardice.";
2681 if ((have_flag(flgs, TR_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
2684 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
2686 info[i++] = "It induces random teleportation.";
2690 if (o_ptr->curse_flags & TRC_LOW_MELEE)
2693 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
2695 info[i++] = "It causes you to miss blows.";
2699 if (o_ptr->curse_flags & TRC_LOW_AC)
2702 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
2704 info[i++] = "It helps your enemies' blows.";
2708 if (o_ptr->curse_flags & TRC_LOW_MAGIC)
2711 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
2713 info[i++] = "It encumbers you while spellcasting.";
2717 if (o_ptr->curse_flags & TRC_FAST_DIGEST)
2720 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
2722 info[i++] = "It speeds your metabolism.";
2726 if (o_ptr->curse_flags & TRC_DRAIN_HP)
2729 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
2731 info[i++] = "It drains you.";
2735 if (o_ptr->curse_flags & TRC_DRAIN_MANA)
2738 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
2740 info[i++] = "It drains your mana.";
2745 /* Describe about this kind of object instead of THIS fake object */
2746 if (mode & SCROBJ_FAKE_OBJECT)
2748 switch (o_ptr->tval)
2751 switch (o_ptr->sval)
2753 case SV_RING_LORDLY:
2755 info[i++] = "¤½¤ì¤Ï´ö¤Ä¤«¤Î¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
2757 info[i++] = "It provides some random resistances.";
2760 case SV_RING_WARNING:
2762 info[i++] = "¤½¤ì¤Ï¤Ò¤È¤Ä¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2764 info[i++] = "It may provide a low rank ESP.";
2771 switch (o_ptr->sval)
2773 case SV_AMULET_RESISTANCE:
2775 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2777 info[i++] = "It may provides resistance to poison.";
2780 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2782 info[i++] = "It may provide a random resistances.";
2785 case SV_AMULET_THE_MAGI:
2787 info[i++] = "¤½¤ì¤ÏºÇÂç¤Ç£³¤Ä¤Þ¤Ç¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë¡£";
2789 info[i++] = "It provides up to three low rank ESPs.";
2797 if (have_flag(flgs, TR_IGNORE_ACID) &&
2798 have_flag(flgs, TR_IGNORE_ELEC) &&
2799 have_flag(flgs, TR_IGNORE_FIRE) &&
2800 have_flag(flgs, TR_IGNORE_COLD))
2803 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2805 info[i++] = "It cannot be harmed by the elements.";
2810 if (have_flag(flgs, TR_IGNORE_ACID))
2813 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2815 info[i++] = "It cannot be harmed by acid.";
2818 if (have_flag(flgs, TR_IGNORE_ELEC))
2821 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2823 info[i++] = "It cannot be harmed by electricity.";
2826 if (have_flag(flgs, TR_IGNORE_FIRE))
2829 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2831 info[i++] = "It cannot be harmed by fire.";
2834 if (have_flag(flgs, TR_IGNORE_COLD))
2837 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2839 info[i++] = "It cannot be harmed by cold.";
2844 if (mode & SCROBJ_FORCE_DETAIL) trivial_info = 0;
2846 /* No relevant informations */
2847 if (i <= trivial_info) return (FALSE);
2849 /* Save the screen */
2853 Term_get_size(&wid, &hgt);
2855 /* Display Item name */
2856 if (!(mode & SCROBJ_FAKE_OBJECT))
2857 object_desc(o_name, o_ptr, 0);
2859 object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
2863 /* Erase the screen */
2864 for (k = 1; k < hgt; k++) prt("", k, 13);
2866 /* Label the information */
2867 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
2869 monster_race *r_ptr = &r_info[o_ptr->pval];
2870 int namelen = strlen(r_name + r_ptr->name);
2871 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
2872 Term_queue_bigchar(18 + namelen, 1, r_ptr->x_attr, r_ptr->x_char, 0, 0);
2873 prt("'", 1, (use_bigtile ? 20 : 19) + namelen);
2877 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
2879 prt(" Item Attributes:", 1, 15);
2882 /* We will print on top of the map (column 13) */
2883 for (k = 2, j = 0; j < i; j++)
2886 prt(info[j], k++, 15);
2888 /* Every 20 entries (lines 2 to 21), start over */
2889 if ((k == hgt - 2) && (j+1 < i))
2892 prt("-- ³¤¯ --", k, 15);
2894 prt("-- more --", k, 15);
2897 for (; k > 2; k--) prt("", k, 15);
2903 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
2905 prt("[Press any key to continue]", k, 15);
2910 /* Restore the screen */
2913 /* Gave knowledge */
2920 * Convert an inventory index into a one character label
2921 * Note that the label does NOT distinguish inven/equip.
2923 char index_to_label(int i)
2925 /* Indexes for "inven" are easy */
2926 if (i < INVEN_RARM) return (I2A(i));
2928 /* Indexes for "equip" are offset */
2929 return (I2A(i - INVEN_RARM));
2934 * Convert a label into the index of an item in the "inven"
2935 * Return "-1" if the label does not indicate a real item
2937 s16b label_to_inven(int c)
2942 i = (islower(c) ? A2I(c) : -1);
2944 /* Verify the index */
2945 if ((i < 0) || (i > INVEN_PACK)) return (-1);
2947 /* Empty slots can never be chosen */
2948 if (!inventory[i].k_idx) return (-1);
2950 /* Return the index */
2956 extern bool select_ring_slot;
2959 static bool is_ring_slot(int i)
2961 return (i == INVEN_RIGHT) || (i == INVEN_LEFT);
2966 * Convert a label into the index of a item in the "equip"
2967 * Return "-1" if the label does not indicate a real item
2969 s16b label_to_equip(int c)
2974 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
2976 /* Verify the index */
2977 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
2979 if (select_ring_slot) return is_ring_slot(i) ? i : -1;
2981 /* Empty slots can never be chosen */
2982 if (!inventory[i].k_idx) return (-1);
2984 /* Return the index */
2991 * Determine which equipment slot (if any) an item likes
2993 s16b wield_slot(object_type *o_ptr)
2995 /* Slot for equipment */
2996 switch (o_ptr->tval)
3003 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
3004 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
3005 return (INVEN_LARM);
3012 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
3013 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
3014 return (INVEN_RARM);
3024 /* Use the right hand first */
3025 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
3027 /* Use the left hand for swapping (by default) */
3028 return (INVEN_LEFT);
3034 return (INVEN_NECK);
3039 return (INVEN_LITE);
3046 return (INVEN_BODY);
3051 return (INVEN_OUTER);
3057 return (INVEN_HEAD);
3062 return (INVEN_HANDS);
3067 return (INVEN_FEET);
3071 /* No slot available */
3077 * Return a string mentioning how a given item is carried
3079 cptr mention_use(int i)
3083 /* Examine the location */
3087 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->migite) ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê")); break;
3089 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "Just lifting" : (p_ptr->migite ? "Wielding" : "On arm"); break;
3093 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->hidarite) ? " ξ¼ê" : (left_hander ? " ±¦¼ê" : " º¸¼ê")); break;
3095 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "Just lifting" : (p_ptr->hidarite ? "Wielding" : "On arm"); break;
3099 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "±¿ÈÂÃæ" : "¼Í·âÍÑ"; break;
3101 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "Just holding" : "Shooting"; break;
3105 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
3107 case INVEN_RIGHT: p = (left_hander ? "On left hand" : "On right hand"); break;
3111 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
3113 case INVEN_LEFT: p = (left_hander ? "On right hand" : "On left hand"); break;
3117 case INVEN_NECK: p = " ¼ó"; break;
3119 case INVEN_NECK: p = "Around neck"; break;
3123 case INVEN_LITE: p = " ¸÷¸»"; break;
3125 case INVEN_LITE: p = "Light source"; break;
3129 case INVEN_BODY: p = " ÂÎ"; break;
3131 case INVEN_BODY: p = "On body"; break;
3135 case INVEN_OUTER: p = "ÂΤξå"; break;
3137 case INVEN_OUTER: p = "About body"; break;
3141 case INVEN_HEAD: p = " Ƭ"; break;
3143 case INVEN_HEAD: p = "On head"; break;
3147 case INVEN_HANDS: p = " ¼ê"; break;
3149 case INVEN_HANDS: p = "On hands"; break;
3153 case INVEN_FEET: p = " "; break;
3155 case INVEN_FEET: p = "On feet"; break;
3159 default: p = "¥¶¥Ã¥¯"; break;
3161 default: p = "In pack"; break;
3165 /* Return the result */
3171 * Return a string describing how a given item is being worn.
3172 * Currently, only used for items in the equipment, not inventory.
3174 cptr describe_use(int i)
3181 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->migite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
3183 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "just lifting" : (p_ptr->migite ? "attacking monsters with" : "wearing on your arm"); break;
3187 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->hidarite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
3189 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "just lifting" : (p_ptr->hidarite ? "attacking monsters with" : "wearing on your arm"); break;
3193 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î" : "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
3195 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "just holding" : "shooting missiles with"; break;
3199 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3201 case INVEN_RIGHT: p = (left_hander ? "wearing on your left hand" : "wearing on your right hand"); break;
3205 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3207 case INVEN_LEFT: p = (left_hander ? "wearing on your right hand" : "wearing on your left hand"); break;
3211 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
3213 case INVEN_NECK: p = "wearing around your neck"; break;
3217 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
3219 case INVEN_LITE: p = "using to light the way"; break;
3223 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
3225 case INVEN_BODY: p = "wearing on your body"; break;
3229 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
3231 case INVEN_OUTER: p = "wearing on your back"; break;
3235 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
3237 case INVEN_HEAD: p = "wearing on your head"; break;
3241 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
3243 case INVEN_HANDS: p = "wearing on your hands"; break;
3247 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
3249 case INVEN_FEET: p = "wearing on your feet"; break;
3253 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
3255 default: p = "carrying in your pack"; break;
3259 /* Return the result */
3264 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
3266 bool check_book_realm(const byte book_tval, const byte book_sval)
3268 if (book_tval < TV_LIFE_BOOK) return FALSE;
3269 if (p_ptr->pclass == CLASS_SORCERER)
3271 return is_magic(tval2realm(book_tval));
3273 else if (p_ptr->pclass == CLASS_RED_MAGE)
3275 if (is_magic(tval2realm(book_tval)))
3276 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
3278 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
3283 * Check an item against the item tester info
3285 bool item_tester_okay(object_type *o_ptr)
3287 /* Hack -- allow listing empty slots */
3288 if (item_tester_full) return (TRUE);
3290 /* Require an item */
3291 if (!o_ptr->k_idx) return (FALSE);
3293 /* Hack -- ignore "gold" */
3294 if (o_ptr->tval == TV_GOLD)
3297 extern bool show_gold_on_floor;
3299 if (!show_gold_on_floor) return (FALSE);
3302 /* Check the tval */
3303 if (item_tester_tval)
3305 /* Is it a spellbook? If so, we need a hack -- TY */
3306 if ((item_tester_tval <= TV_DEATH_BOOK) &&
3307 (item_tester_tval >= TV_LIFE_BOOK))
3308 return check_book_realm(o_ptr->tval, o_ptr->sval);
3310 if (item_tester_tval != o_ptr->tval) return (FALSE);
3313 /* Check the hook */
3314 if (item_tester_hook)
3316 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
3327 * Choice window "shadow" of the "show_inven()" function
3329 void display_inven(void)
3331 register int i, n, z = 0;
3333 byte attr = TERM_WHITE;
3335 char o_name[MAX_NLEN];
3339 Term_get_size(&wid, &hgt);
3341 /* Find the "final" slot */
3342 for (i = 0; i < INVEN_PACK; i++)
3344 o_ptr = &inventory[i];
3346 /* Skip non-objects */
3347 if (!o_ptr->k_idx) continue;
3353 /* Display the pack */
3354 for (i = 0; i < z; i++)
3356 /* Examine the item */
3357 o_ptr = &inventory[i];
3359 /* Start with an empty "index" */
3360 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
3362 /* Is this item "acceptable"? */
3363 if (item_tester_okay(o_ptr))
3365 /* Prepare an "index" */
3366 tmp_val[0] = index_to_label(i);
3368 /* Bracket the "index" --(-- */
3372 /* Display the index (or blank space) */
3373 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
3375 /* Obtain an item description */
3376 object_desc(o_name, o_ptr, 0);
3378 /* Obtain the length of the description */
3382 attr = tval_to_attr[o_ptr->tval % 128];
3384 /* Grey out charging items */
3390 /* Display the entry itself */
3391 Term_putstr(3, i, n, attr, o_name);
3393 /* Erase the rest of the line */
3394 Term_erase(3+n, i, 255);
3396 /* Display the weight if needed */
3399 int wgt = o_ptr->weight * o_ptr->number;
3401 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
3403 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3406 prt(tmp_val, i, wid - 9);
3410 /* Erase the rest of the window */
3411 for (i = z; i < hgt; i++)
3413 /* Erase the line */
3414 Term_erase(0, i, 255);
3421 * Choice window "shadow" of the "show_equip()" function
3423 void display_equip(void)
3427 byte attr = TERM_WHITE;
3429 char o_name[MAX_NLEN];
3433 Term_get_size(&wid, &hgt);
3435 /* Display the equipment */
3436 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
3438 /* Examine the item */
3439 o_ptr = &inventory[i];
3441 /* Start with an empty "index" */
3442 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
3444 /* Is this item "acceptable"? */
3445 if (select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr))
3447 /* Prepare an "index" */
3448 tmp_val[0] = index_to_label(i);
3450 /* Bracket the "index" --(-- */
3454 /* Display the index (or blank space) */
3455 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
3457 /* Obtain an item description */
3458 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
3461 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
3463 strcpy(o_name, "(wielding with two-hands)");
3469 object_desc(o_name, o_ptr, 0);
3470 attr = tval_to_attr[o_ptr->tval % 128];
3473 /* Obtain the length of the description */
3476 /* Grey out charging items */
3482 /* Display the entry itself */
3483 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
3485 /* Erase the rest of the line */
3486 Term_erase(3+n, i - INVEN_RARM, 255);
3488 /* Display the weight (if needed) */
3491 int wgt = o_ptr->weight * o_ptr->number;
3493 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
3495 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3498 prt(tmp_val, i - INVEN_RARM, wid - (show_labels ? 28 : 9));
3501 /* Display the slot description (if needed) */
3504 Term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
3505 prt(mention_use(i), i - INVEN_RARM, wid - 15);
3509 /* Erase the rest of the window */
3510 for (i = INVEN_TOTAL - INVEN_RARM; i < hgt; i++)
3512 /* Clear that line */
3513 Term_erase(0, i, 255);
3519 * Find the "first" inventory object with the given "tag".
3521 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
3522 * inscription of an object. Alphabetical characters don't work as a
3525 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
3526 * and "x" is the "current" command_cmd code.
3528 static bool get_tag(int *cp, char tag, int mode)
3533 /* Extract index from mode */
3538 end = INVEN_TOTAL - 1;
3543 end = INVEN_PACK - 1;
3550 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
3552 /* Check every inventory object */
3553 for (i = start; i <= end; i++)
3555 object_type *o_ptr = &inventory[i];
3557 /* Skip non-objects */
3558 if (!o_ptr->k_idx) continue;
3560 /* Skip empty inscriptions */
3561 if (!o_ptr->inscription) continue;
3563 /* Skip non-choice */
3564 if (!item_tester_okay(o_ptr)) continue;
3567 s = my_strchr(quark_str(o_ptr->inscription), '@');
3569 /* Process all tags */
3572 /* Check the special tags */
3573 if ((s[1] == command_cmd) && (s[2] == tag))
3575 /* Save the actual inventory ID */
3582 /* Find another '@' */
3583 s = my_strchr(s + 1, '@');
3588 /**** Find a tag in the form of {@#} (allows only numerals) ***/
3590 /* Don't allow {@#} with '#' being alphabet */
3591 if (tag < '0' || '9' < tag)
3597 /* Check every object */
3598 for (i = start; i <= end; i++)
3600 object_type *o_ptr = &inventory[i];
3602 /* Skip non-objects */
3603 if (!o_ptr->k_idx) continue;
3605 /* Skip empty inscriptions */
3606 if (!o_ptr->inscription) continue;
3608 /* Skip non-choice */
3609 if (!item_tester_okay(o_ptr)) continue;
3612 s = my_strchr(quark_str(o_ptr->inscription), '@');
3614 /* Process all tags */
3617 /* Check the normal tags */
3620 /* Save the actual inventory ID */
3627 /* Find another '@' */
3628 s = my_strchr(s + 1, '@');
3638 * Find the "first" floor object with the given "tag".
3640 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
3641 * inscription of an object. Alphabetical characters don't work as a
3644 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
3645 * and "x" is the "current" command_cmd code.
3647 static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
3652 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
3654 /* Check every object in the grid */
3655 for (i = 0; i < floor_num && i < 23; i++)
3657 object_type *o_ptr = &o_list[floor_list[i]];
3659 /* Skip empty inscriptions */
3660 if (!o_ptr->inscription) continue;
3663 s = my_strchr(quark_str(o_ptr->inscription), '@');
3665 /* Process all tags */
3668 /* Check the special tags */
3669 if ((s[1] == command_cmd) && (s[2] == tag))
3671 /* Save the actual floor object ID */
3678 /* Find another '@' */
3679 s = my_strchr(s + 1, '@');
3684 /**** Find a tag in the form of {@#} (allows only numerals) ***/
3686 /* Don't allow {@#} with '#' being alphabet */
3687 if (tag < '0' || '9' < tag)
3693 /* Check every object in the grid */
3694 for (i = 0; i < floor_num && i < 23; i++)
3696 object_type *o_ptr = &o_list[floor_list[i]];
3698 /* Skip empty inscriptions */
3699 if (!o_ptr->inscription) continue;
3702 s = my_strchr(quark_str(o_ptr->inscription), '@');
3704 /* Process all tags */
3707 /* Check the normal tags */
3710 /* Save the floor object ID */
3717 /* Find another '@' */
3718 s = my_strchr(s + 1, '@');
3728 * Move around label characters with correspond tags
3730 static void prepare_label_string(char *label, int mode)
3732 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
3733 int offset = (mode == USE_EQUIP) ? INVEN_RARM : 0;
3736 /* Prepare normal labels */
3737 strcpy(label, alphabet_chars);
3739 /* Move each label */
3740 for (i = 0; i < 52; i++)
3743 char c = alphabet_chars[i];
3745 /* Find a tag with this label */
3746 if (get_tag(&index, c, mode))
3748 /* Delete the overwritten label */
3749 if (label[i] == c) label[i] = ' ';
3751 /* Move the label to the place of corresponding tag */
3752 label[index - offset] = c;
3759 * Move around label characters with correspond tags (floor version)
3761 static void prepare_label_string_floor(char *label, int floor_list[], int floor_num)
3763 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
3766 /* Prepare normal labels */
3767 strcpy(label, alphabet_chars);
3769 /* Move each label */
3770 for (i = 0; i < 52; i++)
3773 char c = alphabet_chars[i];
3775 /* Find a tag with this label */
3776 if (get_tag_floor(&index, c, floor_list, floor_num))
3778 /* Delete the overwritten label */
3779 if (label[i] == c) label[i] = ' ';
3781 /* Move the label to the place of corresponding tag */
3789 * Display the inventory.
3791 * Hack -- do not display "trailing" empty slots
3793 int show_inven(int target_item)
3795 int i, j, k, l, z = 0;
3796 int col, cur_col, len;
3798 char o_name[MAX_NLEN];
3802 char out_desc[23][MAX_NLEN];
3803 int target_item_label = 0;
3805 char inven_label[52 + 1];
3807 /* Starting column */
3811 Term_get_size(&wid, &hgt);
3813 /* Default "max-length" */
3814 len = wid - col - 1;
3817 /* Find the "final" slot */
3818 for (i = 0; i < INVEN_PACK; i++)
3820 o_ptr = &inventory[i];
3822 /* Skip non-objects */
3823 if (!o_ptr->k_idx) continue;
3829 prepare_label_string(inven_label, USE_INVEN);
3831 /* Display the inventory */
3832 for (k = 0, i = 0; i < z; i++)
3834 o_ptr = &inventory[i];
3836 /* Is this item acceptable? */
3837 if (!item_tester_okay(o_ptr)) continue;
3839 /* Describe the object */
3840 object_desc(o_name, o_ptr, 0);
3842 /* Save the object index, color, and description */
3844 out_color[k] = tval_to_attr[o_ptr->tval % 128];
3846 /* Grey out charging items */
3849 out_color[k] = TERM_L_DARK;
3852 (void)strcpy(out_desc[k], o_name);
3854 /* Find the predicted "line length" */
3855 l = strlen(out_desc[k]) + 5;
3857 /* Be sure to account for the weight */
3858 if (show_weights) l += 9;
3860 /* Account for icon if displayed */
3861 if (show_item_graph)
3864 if (use_bigtile) l++;
3867 /* Maintain the maximum length */
3868 if (l > len) len = l;
3870 /* Advance to next "line" */
3874 /* Find the column to start in */
3875 col = (len > wid - 4) ? 0 : (wid - len - 1);
3877 /* Output each entry */
3878 for (j = 0; j < k; j++)
3884 o_ptr = &inventory[i];
3886 /* Clear the line */
3887 prt("", j + 1, col ? col - 2 : col);
3889 if (use_menu && target_item)
3891 if (j == (target_item-1))
3894 strcpy(tmp_val, "¡Õ");
3896 strcpy(tmp_val, "> ");
3898 target_item_label = i;
3900 else strcpy(tmp_val, " ");
3902 else if (i <= INVEN_PACK)
3904 /* Prepare an index --(-- */
3905 sprintf(tmp_val, "%c)", inven_label[i]);
3909 /* Prepare an index --(-- */
3910 sprintf(tmp_val, "%c)", index_to_label(i));
3913 /* Clear the line with the (possibly indented) index */
3914 put_str(tmp_val, j + 1, col);
3918 /* Display graphics for object, if desired */
3919 if (show_item_graph)
3921 byte a = object_attr(o_ptr);
3922 char c = object_char(o_ptr);
3925 if (a & 0x80) a |= 0x40;
3928 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
3929 if (use_bigtile) cur_col++;
3935 /* Display the entry itself */
3936 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
3938 /* Display the weight if needed */
3941 int wgt = o_ptr->weight * o_ptr->number;
3943 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
3945 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3948 prt(tmp_val, j + 1, wid - 9);
3952 /* Make a "shadow" below the list (only if needed) */
3953 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
3955 /* Save the new column */
3958 return target_item_label;
3964 * Display the equipment.
3966 int show_equip(int target_item)
3969 int col, cur_col, len;
3972 char o_name[MAX_NLEN];
3975 char out_desc[23][MAX_NLEN];
3976 int target_item_label = 0;
3978 char equip_label[52 + 1];
3980 /* Starting column */
3984 Term_get_size(&wid, &hgt);
3986 /* Maximal length */
3987 len = wid - col - 1;
3990 /* Scan the equipment list */
3991 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
3993 o_ptr = &inventory[i];
3995 /* Is this item acceptable? */
3996 if (!(select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr)) &&
3997 (!((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute) ||
3998 item_tester_no_ryoute)) continue;
4001 object_desc(o_name, o_ptr, 0);
4003 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
4006 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
4008 (void)strcpy(out_desc[k],"(wielding with two-hands)");
4010 out_color[k] = TERM_WHITE;
4014 (void)strcpy(out_desc[k], o_name);
4015 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4019 /* Grey out charging items */
4022 out_color[k] = TERM_L_DARK;
4025 /* Extract the maximal length (see below) */
4027 l = strlen(out_desc[k]) + (2 + 1);
4029 l = strlen(out_desc[k]) + (2 + 3);
4033 /* Increase length for labels (if needed) */
4035 if (show_labels) l += (7 + 2);
4037 if (show_labels) l += (14 + 2);
4041 /* Increase length for weight (if needed) */
4042 if (show_weights) l += 9;
4044 if (show_item_graph) l += 2;
4046 /* Maintain the max-length */
4047 if (l > len) len = l;
4049 /* Advance the entry */
4053 /* Hack -- Find a column to start in */
4055 col = (len > wid - 6) ? 0 : (wid - len - 1);
4057 col = (len > wid - 4) ? 0 : (wid - len - 1);
4060 prepare_label_string(equip_label, USE_EQUIP);
4062 /* Output each entry */
4063 for (j = 0; j < k; j++)
4069 o_ptr = &inventory[i];
4071 /* Clear the line */
4072 prt("", j + 1, col ? col - 2 : col);
4074 if (use_menu && target_item)
4076 if (j == (target_item-1))
4079 strcpy(tmp_val, "¡Õ");
4081 strcpy(tmp_val, "> ");
4083 target_item_label = i;
4085 else strcpy(tmp_val, " ");
4087 else if (i >= INVEN_RARM)
4089 /* Prepare an index --(-- */
4090 sprintf(tmp_val, "%c)", equip_label[i - INVEN_RARM]);
4094 /* Prepare an index --(-- */
4095 sprintf(tmp_val, "%c)", index_to_label(i));
4098 /* Clear the line with the (possibly indented) index */
4099 put_str(tmp_val, j+1, col);
4103 /* Display graphics for object, if desired */
4104 if (show_item_graph)
4106 byte a = object_attr(o_ptr);
4107 char c = object_char(o_ptr);
4110 if (a & 0x80) a |= 0x40;
4113 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
4114 if (use_bigtile) cur_col++;
4122 /* Mention the use */
4124 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
4126 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
4129 put_str(tmp_val, j+1, cur_col);
4131 /* Display the entry itself */
4133 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
4135 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
4142 /* Display the entry itself */
4143 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
4146 /* Display the weight if needed */
4149 int wgt = o_ptr->weight * o_ptr->number;
4151 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4153 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
4156 prt(tmp_val, j + 1, wid - 9);
4160 /* Make a "shadow" below the list (only if needed) */
4161 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4163 /* Save the new column */
4166 return target_item_label;
4173 * Flip "inven" and "equip" in any sub-windows
4175 void toggle_inven_equip(void)
4180 for (j = 0; j < 8; j++)
4183 if (!angband_term[j]) continue;
4185 /* Flip inven to equip */
4186 if (window_flag[j] & (PW_INVEN))
4189 window_flag[j] &= ~(PW_INVEN);
4190 window_flag[j] |= (PW_EQUIP);
4193 p_ptr->window |= (PW_EQUIP);
4196 /* Flip inven to equip */
4197 else if (window_flag[j] & (PW_EQUIP))
4200 window_flag[j] &= ~(PW_EQUIP);
4201 window_flag[j] |= (PW_INVEN);
4204 p_ptr->window |= (PW_INVEN);
4212 * Verify the choice of an item.
4214 * The item can be negative to mean "item on floor".
4216 static bool verify(cptr prompt, int item)
4218 char o_name[MAX_NLEN];
4219 char out_val[MAX_NLEN+20];
4226 o_ptr = &inventory[item];
4232 o_ptr = &o_list[0 - item];
4236 object_desc(o_name, o_ptr, 0);
4240 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
4242 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
4247 return (get_check(out_val));
4252 * Hack -- allow user to "prevent" certain choices
4254 * The item can be negative to mean "item on floor".
4256 static bool get_item_allow(int item)
4262 if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
4267 o_ptr = &inventory[item];
4273 o_ptr = &o_list[0 - item];
4276 /* No inscription */
4277 if (!o_ptr->inscription) return (TRUE);
4280 s = my_strchr(quark_str(o_ptr->inscription), '!');
4282 /* Process preventions */
4285 /* Check the "restriction" */
4286 if ((s[1] == command_cmd) || (s[1] == '*'))
4288 /* Verify the choice */
4290 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
4292 if (!verify("Really try", item)) return (FALSE);
4297 /* Find another '!' */
4298 s = my_strchr(s + 1, '!');
4308 * Auxiliary function for "get_item()" -- test an index
4310 static bool get_item_okay(int i)
4313 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
4315 if (select_ring_slot) return is_ring_slot(i);
4317 /* Verify the item */
4318 if (!item_tester_okay(&inventory[i])) return (FALSE);
4327 * Determine whether get_item() can get some item or not
4328 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
4330 bool can_get_item(void)
4332 int j, floor_list[23], floor_num = 0;
4334 for (j = 0; j < INVEN_TOTAL; j++)
4335 if (item_tester_okay(&inventory[j]))
4338 floor_num = scan_floor(floor_list, py, px, 0x03);
4346 * Let the user select an item, save its "index"
4348 * Return TRUE only if an acceptable item was chosen by the user.
4350 * The selected item must satisfy the "item_tester_hook()" function,
4351 * if that hook is set, and the "item_tester_tval", if that value is set.
4353 * All "item_tester" restrictions are cleared before this function returns.
4355 * The user is allowed to choose acceptable items from the equipment,
4356 * inventory, or floor, respectively, if the proper flag was given,
4357 * and there are any acceptable items in that location.
4359 * The equipment or inventory are displayed (even if no acceptable
4360 * items are in that location) if the proper flag was given.
4362 * If there are no acceptable items available anywhere, and "str" is
4363 * not NULL, then it will be used as the text of a warning message
4364 * before the function returns.
4366 * Note that the user must press "-" to specify the item on the floor,
4367 * and there is no way to "examine" the item on the floor, while the
4368 * use of "capital" letters will "examine" an inventory/equipment item,
4369 * and prompt for its use.
4371 * If a legal item is selected from the inventory, we save it in "cp"
4372 * directly (0 to 35), and return TRUE.
4374 * If a legal item is selected from the floor, we save it in "cp" as
4375 * a negative (-1 to -511), and return TRUE.
4377 * If no item is available, we do nothing to "cp", and we display a
4378 * warning message, using "str" if available, and return FALSE.
4380 * If no item is selected, we do nothing to "cp", and return FALSE.
4382 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
4383 * to allow the user to enter a command while viewing those screens, and
4384 * also to induce "auto-enter" of stores, and other such stuff.
4386 * Global "p_ptr->command_see" may be set before calling this function to start
4387 * out in "browse" mode. It is cleared before this function returns.
4389 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
4390 * If it is TRUE then we are viewing inventory, else equipment.
4392 * We always erase the prompt when we are done, leaving a blank line,
4393 * or a warning message, if appropriate, if no items are available.
4395 bool get_item(int *cp, cptr pmt, cptr str, int mode)
4397 s16b this_o_idx, next_o_idx = 0;
4401 int j, k, i1, i2, e1, e2;
4411 bool allow_floor = FALSE;
4413 bool toggle = FALSE;
4419 extern bool select_the_force;
4421 int menu_line = (use_menu ? 1 : 0);
4427 static char prev_tag = '\0';
4428 char cur_tag = '\0';
4430 #endif /* ALLOW_REPEAT */
4432 #ifdef ALLOW_EASY_FLOOR /* TNB */
4434 if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
4436 #endif /* ALLOW_EASY_FLOOR -- TNB */
4439 if (mode & USE_EQUIP) equip = TRUE;
4440 if (mode & USE_INVEN) inven = TRUE;
4441 if (mode & USE_FLOOR) floor = TRUE;
4445 /* Get the item index */
4446 if (repeat_pull(cp))
4449 if (select_the_force && (*cp == INVEN_FORCE))
4451 item_tester_tval = 0;
4452 item_tester_hook = NULL;
4453 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4458 else if (floor && (*cp < 0))
4465 /* Acquire object */
4468 /* Validate the item */
4469 if (item_tester_okay(o_ptr))
4471 /* Forget restrictions */
4472 item_tester_tval = 0;
4473 item_tester_hook = NULL;
4474 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4481 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
4482 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
4484 if (prev_tag && command_cmd)
4486 /* Look up the tag and validate the item */
4487 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
4488 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
4489 else if (!get_item_okay(k)) /* Reject */;
4492 /* Accept that choice */
4495 /* Forget restrictions */
4496 item_tester_tval = 0;
4497 item_tester_hook = NULL;
4498 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4504 prev_tag = '\0'; /* prev_tag is no longer effective */
4507 /* Verify the item */
4508 else if (get_item_okay(*cp))
4510 /* Forget restrictions */
4511 item_tester_tval = 0;
4512 item_tester_hook = NULL;
4513 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4521 #endif /* ALLOW_REPEAT */
4524 /* Paranoia XXX XXX XXX */
4531 /* No item selected */
4535 /* Full inventory */
4537 i2 = INVEN_PACK - 1;
4539 /* Forbid inventory */
4540 if (!inven) i2 = -1;
4543 for (j = 0; j < INVEN_PACK; j++)
4544 if (item_tester_okay(&inventory[j])) max_inven++;
4547 /* Restrict inventory indexes */
4548 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
4549 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
4552 /* Full equipment */
4554 e2 = INVEN_TOTAL - 1;
4556 /* Forbid equipment */
4557 if (!equip) e2 = -1;
4560 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
4561 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
4562 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
4565 /* Restrict equipment indexes */
4566 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
4567 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
4569 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
4573 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
4575 else if (p_ptr->hidarite) e1 = INVEN_RARM;
4579 /* Restrict floor usage */
4582 /* Scan all objects in the grid */
4583 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
4587 /* Acquire object */
4588 o_ptr = &o_list[this_o_idx];
4590 /* Acquire next object */
4591 next_o_idx = o_ptr->next_o_idx;
4593 /* Accept the item on the floor if legal */
4594 if (item_tester_okay(o_ptr) && (o_ptr->marked & OM_FOUND)) allow_floor = TRUE;
4598 /* Require at least one legal choice */
4599 if (!allow_floor && (i1 > i2) && (e1 > e2))
4601 /* Cancel p_ptr->command_see */
4602 command_see = FALSE;
4610 if (select_the_force) {
4616 /* Analyze choices */
4619 /* Hack -- Start on equipment if requested */
4620 if (command_see && command_wrk && equip)
4625 /* Use inventory if allowed */
4628 command_wrk = FALSE;
4631 /* Use equipment if allowed */
4637 /* Use inventory for floor */
4640 command_wrk = FALSE;
4646 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
4648 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
4650 /* Hack -- start out in "display" mode */
4658 /* Repeat until done */
4661 int get_item_label = 0;
4668 for (j = 0; j < 8; j++)
4671 if (!angband_term[j]) continue;
4673 /* Count windows displaying inven */
4674 if (window_flag[j] & (PW_INVEN)) ni++;
4676 /* Count windows displaying equip */
4677 if (window_flag[j] & (PW_EQUIP)) ne++;
4680 /* Toggle if needed */
4681 if ((command_wrk && ni && !ne) ||
4682 (!command_wrk && !ni && ne))
4685 toggle_inven_equip();
4692 p_ptr->window |= (PW_INVEN | PW_EQUIP);
4694 /* Redraw windows */
4698 /* Inventory screen */
4701 /* Redraw if needed */
4702 if (command_see) get_item_label = show_inven(menu_line);
4705 /* Equipment screen */
4708 /* Redraw if needed */
4709 if (command_see) get_item_label = show_equip(menu_line);
4712 /* Viewing inventory */
4715 /* Begin the prompt */
4717 sprintf(out_val, "»ý¤Áʪ:");
4719 sprintf(out_val, "Inven:");
4722 /* Some legal items */
4723 if ((i1 <= i2) && !use_menu)
4725 /* Build the prompt */
4727 sprintf(tmp_val, "%c-%c,'(',')',",
4729 sprintf(tmp_val, " %c-%c,'(',')',",
4731 index_to_label(i1), index_to_label(i2));
4734 strcat(out_val, tmp_val);
4737 /* Indicate ability to "view" */
4739 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
4741 if (!command_see && !use_menu) strcat(out_val, " * to see,");
4746 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
4748 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
4752 /* Viewing equipment */
4755 /* Begin the prompt */
4757 sprintf(out_val, "ÁõÈ÷ÉÊ:");
4759 sprintf(out_val, "Equip:");
4762 /* Some legal items */
4763 if ((e1 <= e2) && !use_menu)
4765 /* Build the prompt */
4767 sprintf(tmp_val, "%c-%c,'(',')',",
4769 sprintf(tmp_val, " %c-%c,'(',')',",
4771 index_to_label(e1), index_to_label(e2));
4774 strcat(out_val, tmp_val);
4777 /* Indicate ability to "view" */
4779 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
4781 if (!command_see) strcat(out_val, " * to see,");
4786 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
4788 if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
4792 /* Indicate legality of the "floor" item */
4794 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
4795 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
4797 if (allow_floor) strcat(out_val, " - for floor,");
4798 if (select_the_force) strcat(out_val, " w for the Force,");
4801 /* Finish the prompt */
4802 strcat(out_val, " ESC");
4804 /* Build the prompt */
4805 sprintf(tmp_val, "(%s) %s", out_val, pmt);
4807 /* Show the prompt */
4815 int max_line = (command_wrk ? max_equip : max_inven);
4831 menu_line += (max_line - 1);
4850 /* Verify legality */
4851 if (!inven || !equip)
4857 /* Hack -- Fix screen */
4867 /* Switch inven/equip */
4868 command_wrk = !command_wrk;
4869 max_line = (command_wrk ? max_equip : max_inven);
4870 if (menu_line > max_line) menu_line = max_line;
4872 /* Need to redraw */
4881 if (command_wrk == USE_FLOOR)
4884 (*cp) = -get_item_label;
4888 /* Validate the item */
4889 if (!get_item_okay(get_item_label))
4895 /* Allow player to "refuse" certain actions */
4896 if (!get_item_allow(get_item_label))
4902 /* Accept that choice */
4903 (*cp) = get_item_label;
4912 if (select_the_force) {
4920 if (menu_line > max_line) menu_line -= max_line;
4941 command_see = FALSE;
4961 /* Verify legality */
4962 if (!inven || !equip)
4968 /* Hack -- Fix screen */
4978 /* Switch inven/equip */
4979 command_wrk = !command_wrk;
4981 /* Need to redraw */
4987 /* Use floor item */
4990 /* Scan all objects in the grid */
4991 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
4995 /* Acquire object */
4996 o_ptr = &o_list[this_o_idx];
4998 /* Acquire next object */
4999 next_o_idx = o_ptr->next_o_idx;
5001 /* Validate the item */
5002 if (!item_tester_okay(o_ptr)) continue;
5007 /* Verify the item (if required) */
5009 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
5011 if (other_query_flag && !verify("Try", k)) continue;
5015 /* Allow player to "refuse" certain actions */
5016 if (!get_item_allow(k)) continue;
5018 /* Accept that choice */
5035 case '1': case '2': case '3':
5036 case '4': case '5': case '6':
5037 case '7': case '8': case '9':
5039 /* Look up the tag */
5040 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
5046 /* Hack -- Validate the item */
5047 if ((k < INVEN_RARM) ? !inven : !equip)
5053 /* Validate the item */
5054 if (!get_item_okay(k))
5060 /* Allow player to "refuse" certain actions */
5061 if (!get_item_allow(k))
5067 /* Accept that choice */
5073 #endif /* ALLOW_REPEAT */
5081 /* Choose "default" inventory item */
5084 k = ((i1 == i2) ? i1 : -1);
5087 /* Choose "default" equipment item */
5090 k = ((e1 == e2) ? e1 : -1);
5093 /* Validate the item */
5094 if (!get_item_okay(k))
5100 /* Allow player to "refuse" certain actions */
5101 if (!get_item_allow(k))
5107 /* Accept that choice */
5117 if (select_the_force) {
5130 bool not_found = FALSE;
5132 /* Look up the alphabetical tag */
5133 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
5138 /* Hack -- Validate the item */
5139 else if ((k < INVEN_RARM) ? !inven : !equip)
5144 /* Validate the item */
5145 else if (!get_item_okay(k))
5152 /* Accept that choice */
5158 #endif /* ALLOW_REPEAT */
5162 /* Extract "query" setting */
5163 ver = isupper(which);
5164 which = tolower(which);
5166 /* Convert letter to inventory index */
5169 if (which == '(') k = i1;
5170 else if (which == ')') k = i2;
5171 else k = label_to_inven(which);
5174 /* Convert letter to equipment index */
5177 if (which == '(') k = e1;
5178 else if (which == ')') k = e2;
5179 else k = label_to_equip(which);
5182 /* Validate the item */
5183 if (!get_item_okay(k))
5189 /* Verify the item */
5191 if (ver && !verify("ËÜÅö¤Ë", k))
5193 if (ver && !verify("Try", k))
5201 /* Allow player to "refuse" certain actions */
5202 if (!get_item_allow(k))
5208 /* Accept that choice */
5219 /* Fix the screen if necessary */
5225 /* Hack -- Cancel "display" */
5226 command_see = FALSE;
5230 /* Forget the item_tester_tval restriction */
5231 item_tester_tval = 0;
5233 item_tester_no_ryoute = FALSE;
5235 /* Forget the item_tester_hook restriction */
5236 item_tester_hook = NULL;
5239 /* Clean up 'show choices' */
5240 /* Toggle again if needed */
5241 if (toggle) toggle_inven_equip();
5244 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5250 /* Clear the prompt line */
5253 /* Warning if needed */
5254 if (oops && str) msg_print(str);
5260 if (command_cmd) prev_tag = cur_tag;
5261 #endif /* ALLOW_REPEAT */
5263 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5271 #ifdef ALLOW_EASY_FLOOR
5276 * Return a list of o_list[] indexes of items at the given cave
5277 * location. Valid flags are:
5279 * mode & 0x01 -- Item tester
5280 * mode & 0x02 -- Marked items only
5281 * mode & 0x04 -- Stop after first
5283 int scan_floor(int *items, int y, int x, int mode)
5285 int this_o_idx, next_o_idx;
5290 if (!in_bounds(y, x)) return 0;
5292 /* Scan all objects in the grid */
5293 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
5297 /* Acquire object */
5298 o_ptr = &o_list[this_o_idx];
5300 /* Acquire next object */
5301 next_o_idx = o_ptr->next_o_idx;
5304 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
5307 if ((mode & 0x02) && !(o_ptr->marked & OM_FOUND)) continue;
5309 /* Accept this item */
5310 /* XXX Hack -- Enforce limit */
5312 items[num] = this_o_idx;
5317 if (mode & 0x04) break;
5326 * Display a list of the items on the floor at the given location.
5328 int show_floor(int target_item, int y, int x, int *min_width)
5335 char o_name[MAX_NLEN];
5341 char out_desc[23][MAX_NLEN];
5342 int target_item_label = 0;
5344 int floor_list[23], floor_num;
5346 char floor_label[52 + 1];
5348 bool dont_need_to_show_weights = TRUE;
5351 Term_get_size(&wid, &hgt);
5353 /* Default length */
5354 len = MAX((*min_width), 20);
5357 /* Scan for objects in the grid, using item_tester_okay() */
5358 floor_num = scan_floor(floor_list, y, x, 0x03);
5360 /* Display the floor objects */
5361 for (k = 0, i = 0; i < floor_num && i < 23; i++)
5363 o_ptr = &o_list[floor_list[i]];
5365 /* Describe the object */
5366 object_desc(o_name, o_ptr, 0);
5368 /* Save the index */
5371 /* Acquire inventory color */
5372 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
5374 /* Save the object description */
5375 strcpy(out_desc[k], o_name);
5377 /* Find the predicted "line length" */
5378 l = strlen(out_desc[k]) + 5;
5380 /* Be sure to account for the weight */
5381 if (show_weights) l += 9;
5383 if (o_ptr->tval != TV_GOLD) dont_need_to_show_weights = FALSE;
5385 /* Maintain the maximum length */
5386 if (l > len) len = l;
5388 /* Advance to next "line" */
5392 if (show_weights && dont_need_to_show_weights) len -= 9;
5397 /* Find the column to start in */
5398 col = (len > wid - 4) ? 0 : (wid - len - 1);
5400 prepare_label_string_floor(floor_label, floor_list, floor_num);
5402 /* Output each entry */
5403 for (j = 0; j < k; j++)
5406 i = floor_list[out_index[j]];
5411 /* Clear the line */
5412 prt("", j + 1, col ? col - 2 : col);
5414 if (use_menu && target_item)
5416 if (j == (target_item-1))
5419 strcpy(tmp_val, "¡Õ");
5421 strcpy(tmp_val, "> ");
5423 target_item_label = i;
5425 else strcpy(tmp_val, " ");
5429 /* Prepare an index --(-- */
5430 sprintf(tmp_val, "%c)", floor_label[j]);
5433 /* Clear the line with the (possibly indented) index */
5434 put_str(tmp_val, j + 1, col);
5436 /* Display the entry itself */
5437 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
5439 /* Display the weight if needed */
5440 if (show_weights && (o_ptr->tval != TV_GOLD))
5442 int wgt = o_ptr->weight * o_ptr->number;
5444 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5446 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
5449 prt(tmp_val, j + 1, wid - 9);
5453 /* Make a "shadow" below the list (only if needed) */
5454 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5456 return target_item_label;
5460 * This version of get_item() is called by get_item() when
5461 * the easy_floor is on.
5463 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
5465 char n1 = ' ', n2 = ' ', which = ' ';
5467 int j, k, i1, i2, e1, e2;
5474 bool equip = (mode & USE_EQUIP) ? TRUE : FALSE;
5475 bool inven = (mode & USE_INVEN) ? TRUE : FALSE;
5476 bool floor = (mode & USE_FLOOR) ? TRUE : FALSE;
5478 bool allow_equip = FALSE;
5479 bool allow_inven = FALSE;
5480 bool allow_floor = FALSE;
5482 bool toggle = FALSE;
5487 int floor_num, floor_list[23], floor_top = 0;
5490 extern bool select_the_force;
5492 int menu_line = (use_menu ? 1 : 0);
5498 static char prev_tag = '\0';
5499 char cur_tag = '\0';
5501 /* Get the item index */
5502 if (repeat_pull(cp))
5505 if (select_the_force && (*cp == INVEN_FORCE))
5507 item_tester_tval = 0;
5508 item_tester_hook = NULL;
5509 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5514 else if (floor && (*cp < 0))
5516 if (prev_tag && command_cmd)
5518 /* Scan all objects in the grid */
5519 floor_num = scan_floor(floor_list, py, px, 0x03);
5521 /* Look up the tag */
5522 if (get_tag_floor(&k, prev_tag, floor_list, floor_num))
5524 /* Accept that choice */
5525 (*cp) = 0 - floor_list[k];
5527 /* Forget restrictions */
5528 item_tester_tval = 0;
5529 item_tester_hook = NULL;
5530 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5536 prev_tag = '\0'; /* prev_tag is no longer effective */
5539 /* Validate the item */
5540 else if (item_tester_okay(&o_list[0 - (*cp)]))
5542 /* Forget restrictions */
5543 item_tester_tval = 0;
5544 item_tester_hook = NULL;
5545 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5552 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
5553 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
5555 if (prev_tag && command_cmd)
5557 /* Look up the tag and validate the item */
5558 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
5559 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
5560 else if (!get_item_okay(k)) /* Reject */;
5563 /* Accept that choice */
5566 /* Forget restrictions */
5567 item_tester_tval = 0;
5568 item_tester_hook = NULL;
5569 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5575 prev_tag = '\0'; /* prev_tag is no longer effective */
5578 /* Verify the item */
5579 else if (get_item_okay(*cp))
5581 /* Forget restrictions */
5582 item_tester_tval = 0;
5583 item_tester_hook = NULL;
5584 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5592 #endif /* ALLOW_REPEAT */
5595 /* Paranoia XXX XXX XXX */
5602 /* No item selected */
5606 /* Full inventory */
5608 i2 = INVEN_PACK - 1;
5610 /* Forbid inventory */
5611 if (!inven) i2 = -1;
5614 for (j = 0; j < INVEN_PACK; j++)
5615 if (item_tester_okay(&inventory[j])) max_inven++;
5618 /* Restrict inventory indexes */
5619 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5620 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5623 /* Full equipment */
5625 e2 = INVEN_TOTAL - 1;
5627 /* Forbid equipment */
5628 if (!equip) e2 = -1;
5631 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5632 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
5633 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5636 /* Restrict equipment indexes */
5637 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5638 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5640 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
5644 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
5646 else if (p_ptr->hidarite) e1 = INVEN_RARM;
5650 /* Count "okay" floor items */
5653 /* Restrict floor usage */
5656 /* Scan all objects in the grid */
5657 floor_num = scan_floor(floor_list, py, px, 0x03);
5660 /* Accept inventory */
5661 if (i1 <= i2) allow_inven = TRUE;
5663 /* Accept equipment */
5664 if (e1 <= e2) allow_equip = TRUE;
5667 if (floor_num) allow_floor = TRUE;
5669 /* Require at least one legal choice */
5670 if (!allow_inven && !allow_equip && !allow_floor)
5672 /* Cancel p_ptr->command_see */
5673 command_see = FALSE;
5681 if (select_the_force) {
5687 /* Analyze choices */
5690 /* Hack -- Start on equipment if requested */
5691 if (command_see && (command_wrk == (USE_EQUIP))
5694 command_wrk = (USE_EQUIP);
5697 /* Use inventory if allowed */
5698 else if (allow_inven)
5700 command_wrk = (USE_INVEN);
5703 /* Use equipment if allowed */
5704 else if (allow_equip)
5706 command_wrk = (USE_EQUIP);
5709 /* Use floor if allowed */
5710 else if (allow_floor)
5712 command_wrk = (USE_FLOOR);
5717 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5719 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5721 /* Hack -- start out in "display" mode */
5728 /* Repeat until done */
5731 int get_item_label = 0;
5738 for (j = 0; j < 8; j++)
5741 if (!angband_term[j]) continue;
5743 /* Count windows displaying inven */
5744 if (window_flag[j] & (PW_INVEN)) ni++;
5746 /* Count windows displaying equip */
5747 if (window_flag[j] & (PW_EQUIP)) ne++;
5750 /* Toggle if needed */
5751 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
5752 (command_wrk == (USE_INVEN) && !ni && ne))
5755 toggle_inven_equip();
5762 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5764 /* Redraw windows */
5767 /* Inventory screen */
5768 if (command_wrk == (USE_INVEN))
5770 /* Extract the legal requests */
5774 /* Redraw if needed */
5775 if (command_see) get_item_label = show_inven(menu_line);
5778 /* Equipment screen */
5779 else if (command_wrk == (USE_EQUIP))
5781 /* Extract the legal requests */
5782 n1 = I2A(e1 - INVEN_RARM);
5783 n2 = I2A(e2 - INVEN_RARM);
5785 /* Redraw if needed */
5786 if (command_see) get_item_label = show_equip(menu_line);
5790 else if (command_wrk == (USE_FLOOR))
5793 k = MIN(floor_top + 23, floor_num) - 1;
5795 /* Extract the legal requests */
5796 n1 = I2A(j - floor_top);
5797 n2 = I2A(k - floor_top);
5799 /* Redraw if needed */
5800 if (command_see) get_item_label = show_floor(menu_line, py, px, &min_width);
5803 /* Viewing inventory */
5804 if (command_wrk == (USE_INVEN))
5806 /* Begin the prompt */
5808 sprintf(out_val, "»ý¤Áʪ:");
5810 sprintf(out_val, "Inven:");
5815 /* Build the prompt */
5817 sprintf(tmp_val, "%c-%c,'(',')',",
5819 sprintf(tmp_val, " %c-%c,'(',')',",
5821 index_to_label(i1), index_to_label(i2));
5824 strcat(out_val, tmp_val);
5827 /* Indicate ability to "view" */
5829 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5831 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5839 strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
5840 else if (allow_floor)
5841 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
5843 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
5846 strcat(out_val, " / for Equip,");
5847 else if (allow_floor)
5848 strcat(out_val, " 6 for Equip,");
5850 strcat(out_val, " 4 or 6 for Equip,");
5859 strcat(out_val, " '-'¾²¾å,");
5860 else if (allow_equip)
5861 strcat(out_val, " '4' ¾²¾å,");
5863 strcat(out_val, " '4'or'6' ¾²¾å,");
5866 strcat(out_val, " - for floor,");
5867 else if (allow_equip)
5868 strcat(out_val, " 4 for floor,");
5870 strcat(out_val, " 4 or 6 for floor,");
5875 /* Viewing equipment */
5876 else if (command_wrk == (USE_EQUIP))
5878 /* Begin the prompt */
5880 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5882 sprintf(out_val, "Equip:");
5887 /* Build the prompt */
5889 sprintf(tmp_val, "%c-%c,'(',')',",
5891 sprintf(tmp_val, " %c-%c,'(',')',",
5893 index_to_label(e1), index_to_label(e2));
5896 strcat(out_val, tmp_val);
5899 /* Indicate ability to "view" */
5901 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5903 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5911 strcat(out_val, " '/' »ý¤Áʪ,");
5912 else if (allow_floor)
5913 strcat(out_val, " '4' »ý¤Áʪ,");
5915 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
5918 strcat(out_val, " / for Inven,");
5919 else if (allow_floor)
5920 strcat(out_val, " 4 for Inven,");
5922 strcat(out_val, " 4 or 6 for Inven,");
5931 strcat(out_val, " '-'¾²¾å,");
5932 else if (allow_inven)
5933 strcat(out_val, " '6' ¾²¾å,");
5935 strcat(out_val, " '4'or'6' ¾²¾å,");
5938 strcat(out_val, " - for floor,");
5939 else if (allow_inven)
5940 strcat(out_val, " 6 for floor,");
5942 strcat(out_val, " 4 or 6 for floor,");
5948 else if (command_wrk == (USE_FLOOR))
5950 /* Begin the prompt */
5952 sprintf(out_val, "¾²¾å:");
5954 sprintf(out_val, "Floor:");
5959 /* Build the prompt */
5961 sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
5963 sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
5967 strcat(out_val, tmp_val);
5970 /* Indicate ability to "view" */
5972 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5974 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5979 if (allow_inven && allow_equip)
5982 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
5984 strcat(out_val, " 4 for Equip, 6 for Inven,");
5987 else if (allow_inven)
5990 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
5992 strcat(out_val, " 4 or 6 for Inven,");
5995 else if (allow_equip)
5998 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6000 strcat(out_val, " 4 or 6 for Equip,");
6005 else if (allow_inven)
6008 strcat(out_val, " '/' »ý¤Áʪ,");
6010 strcat(out_val, " / for Inven,");
6013 else if (allow_equip)
6016 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6018 strcat(out_val, " / for Equip,");
6023 if (command_see && !use_menu)
6026 strcat(out_val, " Enter ¼¡,");
6028 strcat(out_val, " Enter for scroll down,");
6035 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
6037 if (select_the_force) strcat(out_val, " w for the Force,");
6040 /* Finish the prompt */
6041 strcat(out_val, " ESC");
6043 /* Build the prompt */
6044 sprintf(tmp_val, "(%s) %s", out_val, pmt);
6046 /* Show the prompt */
6055 if (command_wrk == USE_INVEN) max_line = max_inven;
6056 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6057 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6073 menu_line += (max_line - 1);
6089 /* Verify legality */
6090 if (command_wrk == (USE_INVEN))
6092 if (allow_floor) command_wrk = USE_FLOOR;
6093 else if (allow_equip) command_wrk = USE_EQUIP;
6100 else if (command_wrk == (USE_EQUIP))
6102 if (allow_inven) command_wrk = USE_INVEN;
6103 else if (allow_floor) command_wrk = USE_FLOOR;
6110 else if (command_wrk == (USE_FLOOR))
6112 if (allow_equip) command_wrk = USE_EQUIP;
6113 else if (allow_inven) command_wrk = USE_INVEN;
6126 /* Hack -- Fix screen */
6136 /* Switch inven/equip */
6137 if (command_wrk == USE_INVEN) max_line = max_inven;
6138 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6139 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6140 if (menu_line > max_line) menu_line = max_line;
6142 /* Need to redraw */
6150 /* Verify legality */
6151 if (command_wrk == (USE_INVEN))
6153 if (allow_equip) command_wrk = USE_EQUIP;
6154 else if (allow_floor) command_wrk = USE_FLOOR;
6161 else if (command_wrk == (USE_EQUIP))
6163 if (allow_floor) command_wrk = USE_FLOOR;
6164 else if (allow_inven) command_wrk = USE_INVEN;
6171 else if (command_wrk == (USE_FLOOR))
6173 if (allow_inven) command_wrk = USE_INVEN;
6174 else if (allow_equip) command_wrk = USE_EQUIP;
6187 /* Hack -- Fix screen */
6197 /* Switch inven/equip */
6198 if (command_wrk == USE_INVEN) max_line = max_inven;
6199 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6200 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6201 if (menu_line > max_line) menu_line = max_line;
6203 /* Need to redraw */
6212 if (command_wrk == USE_FLOOR)
6215 (*cp) = -get_item_label;
6219 /* Validate the item */
6220 if (!get_item_okay(get_item_label))
6226 /* Allow player to "refuse" certain actions */
6227 if (!get_item_allow(get_item_label))
6233 /* Accept that choice */
6234 (*cp) = get_item_label;
6243 if (select_the_force) {
6251 if (menu_line > max_line) menu_line -= max_line;
6272 command_see = FALSE;
6295 cave_type *c_ptr = &cave[py][px];
6297 if (command_wrk != (USE_FLOOR)) break;
6299 /* Get the object being moved. */
6300 o_idx = c_ptr->o_idx;
6302 /* Only rotate a pile of two or more objects. */
6303 if (!(o_idx && o_list[o_idx].next_o_idx)) break;
6305 /* Remove the first object from the list. */
6306 excise_object_idx(o_idx);
6308 /* Find end of the list. */
6310 while (o_list[i].next_o_idx)
6311 i = o_list[i].next_o_idx;
6313 /* Add after the last object. */
6314 o_list[i].next_o_idx = o_idx;
6316 /* Re-scan floor list */
6317 floor_num = scan_floor(floor_list, py, px, 0x03);
6319 /* Hack -- Fix screen */
6334 if (command_wrk == (USE_INVEN))
6341 command_wrk = (USE_EQUIP);
6343 else if (command_wrk == (USE_EQUIP))
6350 command_wrk = (USE_INVEN);
6352 else if (command_wrk == (USE_FLOOR))
6356 command_wrk = (USE_INVEN);
6358 else if (allow_equip)
6360 command_wrk = (USE_EQUIP);
6369 /* Hack -- Fix screen */
6379 /* Need to redraw */
6392 * If we are already examining the floor, and there
6393 * is only one item, we will always select it.
6394 * If we aren't examining the floor and there is only
6395 * one item, we will select it if floor_query_flag
6400 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
6403 k = 0 - floor_list[0];
6405 /* Allow player to "refuse" certain actions */
6406 if (!get_item_allow(k))
6412 /* Accept that choice */
6421 /* Hack -- Fix screen */
6431 command_wrk = (USE_FLOOR);
6437 case '1': case '2': case '3':
6438 case '4': case '5': case '6':
6439 case '7': case '8': case '9':
6441 if (command_wrk != USE_FLOOR)
6443 /* Look up the tag */
6444 if (!get_tag(&k, which, command_wrk))
6450 /* Hack -- Validate the item */
6451 if ((k < INVEN_RARM) ? !inven : !equip)
6457 /* Validate the item */
6458 if (!get_item_okay(k))
6466 /* Look up the alphabetical tag */
6467 if (get_tag_floor(&k, which, floor_list, floor_num))
6470 k = 0 - floor_list[k];
6479 /* Allow player to "refuse" certain actions */
6480 if (!get_item_allow(k))
6486 /* Accept that choice */
6492 #endif /* ALLOW_REPEAT */
6500 /* Choose "default" inventory item */
6501 if (command_wrk == (USE_INVEN))
6503 k = ((i1 == i2) ? i1 : -1);
6506 /* Choose "default" equipment item */
6507 else if (command_wrk == (USE_EQUIP))
6509 k = ((e1 == e2) ? e1 : -1);
6512 /* Choose "default" floor item */
6513 else if (command_wrk == (USE_FLOOR))
6518 k = 0 - floor_list[0];
6520 /* Allow player to "refuse" certain actions */
6521 if (!get_item_allow(k))
6527 /* Accept that choice */
6535 /* Validate the item */
6536 if (!get_item_okay(k))
6542 /* Allow player to "refuse" certain actions */
6543 if (!get_item_allow(k))
6549 /* Accept that choice */
6559 if (select_the_force) {
6573 if (command_wrk != USE_FLOOR)
6575 bool not_found = FALSE;
6577 /* Look up the alphabetical tag */
6578 if (!get_tag(&k, which, command_wrk))
6583 /* Hack -- Validate the item */
6584 else if ((k < INVEN_RARM) ? !inven : !equip)
6589 /* Validate the item */
6590 else if (!get_item_okay(k))
6597 /* Accept that choice */
6603 #endif /* ALLOW_REPEAT */
6609 /* Look up the alphabetical tag */
6610 if (get_tag_floor(&k, which, floor_list, floor_num))
6613 k = 0 - floor_list[k];
6615 /* Accept that choice */
6621 #endif /* ALLOW_REPEAT */
6626 /* Extract "query" setting */
6627 ver = isupper(which);
6628 which = tolower(which);
6630 /* Convert letter to inventory index */
6631 if (command_wrk == (USE_INVEN))
6633 if (which == '(') k = i1;
6634 else if (which == ')') k = i2;
6635 else k = label_to_inven(which);
6638 /* Convert letter to equipment index */
6639 else if (command_wrk == (USE_EQUIP))
6641 if (which == '(') k = e1;
6642 else if (which == ')') k = e2;
6643 else k = label_to_equip(which);
6646 /* Convert letter to floor index */
6647 else if (command_wrk == USE_FLOOR)
6649 if (which == '(') k = 0;
6650 else if (which == ')') k = floor_num - 1;
6651 else k = islower(which) ? A2I(which) : -1;
6652 if (k < 0 || k >= floor_num || k >= 23)
6659 k = 0 - floor_list[k];
6662 /* Validate the item */
6663 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
6669 /* Verify the item */
6671 if (ver && !verify("ËÜÅö¤Ë", k))
6673 if (ver && !verify("Try", k))
6681 /* Allow player to "refuse" certain actions */
6682 if (!get_item_allow(k))
6688 /* Accept that choice */
6698 /* Fix the screen if necessary */
6704 /* Hack -- Cancel "display" */
6705 command_see = FALSE;
6709 /* Forget the item_tester_tval restriction */
6710 item_tester_tval = 0;
6712 /* Forget the item_tester_hook restriction */
6713 item_tester_hook = NULL;
6716 /* Clean up 'show choices' */
6717 /* Toggle again if needed */
6718 if (toggle) toggle_inven_equip();
6721 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6727 /* Clear the prompt line */
6730 /* Warning if needed */
6731 if (oops && str) msg_print(str);
6737 if (command_cmd) prev_tag = cur_tag;
6738 #endif /* ALLOW_REPEAT */
6740 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6748 static bool py_pickup_floor_aux(void)
6756 /* Restrict the choices */
6757 item_tester_hook = inven_carry_okay;
6761 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
6762 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
6764 q = "Get which item? ";
6765 s = "You no longer have any room for the objects on the floor.";
6768 if (get_item(&item, q, s, (USE_FLOOR)))
6770 this_o_idx = 0 - item;
6777 /* Pick up the object */
6778 py_pickup_aux(this_o_idx);
6785 * Make the player carry everything in a grid
6787 * If "pickup" is FALSE then only gold will be picked up
6789 * This is called by py_pickup() when easy_floor is TRUE.
6791 void py_pickup_floor(bool pickup)
6793 s16b this_o_idx, next_o_idx = 0;
6795 char o_name[MAX_NLEN];
6798 int floor_num = 0, floor_list[23], floor_o_idx = 0;
6802 /* Scan the pile of objects */
6803 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
6807 /* Access the object */
6808 o_ptr = &o_list[this_o_idx];
6810 /* Describe the object */
6811 object_desc(o_name, o_ptr, 0);
6813 /* Access the next object */
6814 next_o_idx = o_ptr->next_o_idx;
6816 /* Hack -- disturb */
6820 if (o_ptr->tval == TV_GOLD)
6824 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
6825 (long)o_ptr->pval, o_name);
6827 msg_format("You have found %ld gold pieces worth of %s.",
6828 (long) o_ptr->pval, o_name);
6832 /* Collect the gold */
6833 p_ptr->au += o_ptr->pval;
6836 p_ptr->redraw |= (PR_GOLD);
6839 p_ptr->window |= (PW_PLAYER);
6841 /* Delete the gold */
6842 delete_object_idx(this_o_idx);
6844 /* Check the next object */
6847 else if (o_ptr->marked & OM_NOMSG)
6849 /* If 0 or 1 non-NOMSG items are in the pile, the NOMSG ones are
6850 * ignored. Otherwise, they are included in the prompt. */
6851 o_ptr->marked &= ~(OM_NOMSG);
6855 /* Count non-gold objects that can be picked up. */
6856 if (inven_carry_okay(o_ptr))
6861 /* Remember this object index */
6863 floor_list[floor_num] = this_o_idx;
6865 /* Count non-gold objects */
6868 /* Remember this index */
6869 floor_o_idx = this_o_idx;
6872 /* There are no non-gold objects */
6876 /* Mention the number of objects */
6882 /* Access the object */
6883 o_ptr = &o_list[floor_o_idx];
6885 #ifdef ALLOW_EASY_SENSE
6887 /* Option: Make object sensing easy */
6890 /* Sense the object */
6891 (void) sense_object(o_ptr);
6894 #endif /* ALLOW_EASY_SENSE */
6896 /* Describe the object */
6897 object_desc(o_name, o_ptr, 0);
6901 msg_format("%s¤¬¤¢¤ë¡£", o_name);
6903 msg_format("You see %s.", o_name);
6908 /* Multiple objects */
6913 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
6915 msg_format("You see a pile of %d items.", floor_num);
6924 /* The player has no room for anything on the floor. */
6930 /* Access the object */
6931 o_ptr = &o_list[floor_o_idx];
6933 #ifdef ALLOW_EASY_SENSE
6935 /* Option: Make object sensing easy */
6938 /* Sense the object */
6939 (void) sense_object(o_ptr);
6942 #endif /* ALLOW_EASY_SENSE */
6944 /* Describe the object */
6945 object_desc(o_name, o_ptr, 0);
6949 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
6951 msg_format("You have no room for %s.", o_name);
6956 /* Multiple objects */
6961 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
6963 msg_print("You have no room for any of the objects on the floor.");
6975 /* Hack -- query every object */
6976 if (carry_query_flag)
6978 char out_val[MAX_NLEN+20];
6980 /* Access the object */
6981 o_ptr = &o_list[floor_o_idx];
6983 #ifdef ALLOW_EASY_SENSE
6985 /* Option: Make object sensing easy */
6988 /* Sense the object */
6989 (void) sense_object(o_ptr);
6992 #endif /* ALLOW_EASY_SENSE */
6994 /* Describe the object */
6995 object_desc(o_name, o_ptr, 0);
6997 /* Build a prompt */
6999 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7001 (void) sprintf(out_val, "Pick up %s? ", o_name);
7005 /* Ask the user to confirm */
7006 if (!get_check(out_val))
7013 /* Access the object */
7014 o_ptr = &o_list[floor_o_idx];
7016 #ifdef ALLOW_EASY_SENSE
7018 /* Option: Make object sensing easy */
7021 /* Sense the object */
7022 (void) sense_object(o_ptr);
7025 #endif /* ALLOW_EASY_SENSE */
7027 /* Pick up the object */
7028 py_pickup_aux(floor_o_idx);
7031 /* Allow the user to choose an object */
7034 while (can_pickup--)
7036 if (!py_pickup_floor_aux()) break;
7041 #endif /* ALLOW_EASY_FLOOR */