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 ¥¿¡¼¥óËè";
531 case ACT_RESIST_ACID:
532 return "»À¤Ø¤ÎÂÑÀ (´ü´Ö 20+d20) : 40+d40 ¥¿¡¼¥óËè";
533 case ACT_RESIST_FIRE:
534 return "²Ð±ê¤Ø¤ÎÂÑÀ (´ü´Ö 20+d20) : 40+d40 ¥¿¡¼¥óËè";
535 case ACT_RESIST_COLD:
536 return "Î䵤¤Ø¤ÎÂÑÀ (´ü´Ö 20+d20) : 40+d40 ¥¿¡¼¥óËè";
537 case ACT_RESIST_ELEC:
538 return "ÅÅ·â¤Ø¤ÎÂÑÀ (´ü´Ö 20+d20) : 40+d40 ¥¿¡¼¥óËè";
539 case ACT_RESIST_POIS:
540 return "ÆǤؤÎÂÑÀ (´ü´Ö 20+d20) : 40+d40 ¥¿¡¼¥óËè";
543 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
545 return "ËâË¡¤ÎÃϿޤȸ÷ : 50+d50 ¥¿¡¼¥óËè";
547 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
548 case ACT_DETECT_XTRA:
549 return "Á´´¶ÃΡ¢Ãµº÷¡¢*´ÕÄê* : 100 ¥¿¡¼¥óËè";
551 return "*´ÕÄê* : 75 ¥¿¡¼¥óËè";
553 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
555 return "Çúȯ¤Î¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
557 return "¼é¤ê¤Î¥ë¡¼¥ó : 400 ¥¿¡¼¥óËè";
559 return "¶õÊ¢½¼Â : 200 ¥¿¡¼¥óËè";
561 return "¥É¥¢Ç˲õ : 10 ¥¿¡¼¥óËè";
563 return "´äÀÐÍϲò : 3 ¥¿¡¼¥óËè";
565 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
567 return "Ï£¶â½Ñ : 500 ¥¿¡¼¥óËè";
569 return "¼¡¸µ¤ÎÈâ : 100 ¥¿¡¼¥óËè";
571 return "¥Æ¥ì¥Ý¡¼¥È (range 100) : 25 ¥¿¡¼¥óËè";
573 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
575 return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô : 20+d20 ¥¿¡¼¥óËè";
576 case ACT_TELEKINESIS:
577 return "ʪÂΤò°ú¤´ó¤»¤ë(½ÅÎÌ25kg¤Þ¤Ç) : 25+d25¥¿¡¼¥óËè";
578 case ACT_DETECT_UNIQUE:
579 return "¤³¤Î³¬¤Ë¤¤¤ë¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òɽ¼¨ : 200¥¿¡¼¥óËè";
581 return "ƨÁö : 35 ¥¿¡¼¥óËè";
582 case ACT_DISP_CURSE_XTRA:
583 return "*²ò¼ö*¤ÈÄ´ºº: ¤¤¤Ä¤Ç¤â";
584 case ACT_BRAND_FIRE_BOLTS:
585 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
586 case ACT_RECHARGE_XTRA:
587 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
589 return "´í¸±¤òȼ¤¦´ÕÄê : ¤¤¤Ä¤Ç¤â";
591 return "»Í¸ÔƧ¤ß : 100+d100¥¿¡¼¥óËè";
593 /* Unique activation */
595 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
597 return "Îã¤Î¥¢¥ì : 150+d150 ¥¿¡¼¥óËè";
599 return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë";
600 case ACT_BLOODY_MOON:
601 return "°ÀÊѹ¹ : 3333 ¥¿¡¼¥óËè";
603 return "¥Õ¥¡¥¤¥¢¡ª : 15 ¥¿¡¼¥óËè";
608 /* General activation */
611 return "beam of sunlight every 10 turns";
613 return "magic missile (2d6) every 2 turns";
615 return "stinking cloud (12) every 4+d4 turns";
617 return "lightning bolt (4d8) every 5+d5 turns";
619 return "acid bolt (5d8) every 6+d6 turns";
621 return "frost bolt (6d8) every 7+d7 turns";
623 return "fire bolt (9d8) every 8+d8 turns";
625 return "ball of cold (48) every 6+d6 turns";
627 return "ball of fire (72) every 9+d9 turns";
629 return "a strangling attack (100) every 100+d100 turns";
631 return "ball of cold (100) every 12+d12 turns";
633 return "ball of lightning (100) every 12+d12 turns";
635 return "drain life (120) every 400 turns";
637 return "vampiric drain (3*50) every 400 turns";
639 return "arrows (150) every 90+d90 turns";
641 return "fire ball (300) every 225+d225 turns";
643 return "ball of cold (400) every 325+d325 turns";
645 return "ball of lightning (500) every 425+d425 turns";
647 return "whirlwind attack every 250 turns";
649 return "vampiric drain (3*100) every 400 turns";
651 return "call chaos every 350 turns";
653 return "launch rocket (120+level) every 400 turns";
655 return "dispel evil (x5) every 100+d100 turns";
657 return "elemental breath (300) every 500 turns";
659 return "dispel good (x5) every 100+d100 turns";
661 return "a magical arrow (150) every 90+d90 turns";
663 return "large fire ball (120) every 15 turns";
665 return "water ball (200) every 250 turns";
667 return "large star ball (200) every 200+d200 turns";
669 return "darkness storm (250) every 150+d150 turns";
671 return "a mana storm every 250+d250 turns";
673 return "dispel small life every 55+d55 turns";
674 case ACT_BLINDING_LIGHT:
675 return "blinding light every 250 turns";
677 return "bizarre things every 450+d450 turns";
678 case ACT_CAST_BA_STAR:
679 return "cast star balls (150) every 1000 turns";
680 case ACT_BLADETURNER:
681 return "breathe elements (300), hero, bless, and resistance";
684 return "confuse monster every 15 turns";
686 return "sleep nearby monsters every 55 turns";
688 return "earthquake (rad 10) every 50 turns";
690 return "terror every 3 * (level+10) turns";
692 return "teleport away every 200 turns";
693 case ACT_BANISH_EVIL:
694 return "banish evil every 250+d250 turns";
696 return "genocide every 500 turns";
698 return "mass genocide every 1000 turns";
700 return "frighten monsters every 40+d40 turns";
702 if (o_ptr->name1 == ART_HYOUSIGI) return "beat wooden clappers every turn";
703 return "aggravete monsters every turn";
705 case ACT_CHARM_ANIMAL:
706 return "charm animal every 200 turns";
707 case ACT_CHARM_UNDEAD:
708 return "enslave undead every 333 turns";
709 case ACT_CHARM_OTHER:
710 return "charm monster every 400 turns";
711 case ACT_CHARM_ANIMALS:
712 return "animal friendship every 500 turns";
713 case ACT_CHARM_OTHERS:
714 return "mass charm every 750 turns";
715 case ACT_SUMMON_ANIMAL:
716 return "summon animal every 200+d300 turns";
717 case ACT_SUMMON_PHANTOM:
718 return "summon phantasmal servant every 200+d200 turns";
719 case ACT_SUMMON_ELEMENTAL:
720 return "summon elemental every 750 turns";
721 case ACT_SUMMON_DEMON:
722 return "summon demon every 666+d333 turns";
723 case ACT_SUMMON_UNDEAD:
724 return "summon undead every 666+d333 turns";
725 case ACT_SUMMON_HOUND:
726 return "summon hound every 300+d150 turns";
727 case ACT_SUMMON_DAWN:
728 return "summon the Legion of the Dawn every 500+d500 turns";
729 case ACT_SUMMON_OCTOPUS:
730 return "summon octopus every 300+d150 turns";
732 case ACT_CHOIR_SINGS:
733 return "heal 777 hit points, curing and heloism every 300 turns";
735 return "remove fear and heal 30 hp every 10 turns";
737 return "heal 4d8 and wounds every 3+d3 turns";
738 case ACT_CURE_POISON:
739 return "remove fear and cure poison every 5 turns";
741 return "restore life levels every 450 turns";
743 return "restore stats and life levels every 750 turns";
745 return "heal 700 hit points every 250 turns";
747 return "heal 1000 hit points every 888 turns";
749 return "curing every 100 turns";
750 case ACT_CURE_MANA_FULL:
751 return "restore mana every 777 turns";
753 return "telepathy (dur 25+d30) every 200 turns";
755 return "heroism and blessed (dur 50+d50) every 100+d100 turns";
757 return "protect evil (dur level*3 + d25) every 200+d200 turns";
759 return "resist elements (dur 20+d20) every 111 turns";
761 return "speed (dur 20+d20) every 100+d100 turns";
763 return "speed (dur 75+d75) every 100+d100 turns";
765 return "wraith form (dur level/2 + d(level/2)) every 1000 turns";
767 return "invulnerability (dur 8+d8) every 1000 turns";
769 return "heroism every 30+d30 turns";
771 return "hero and +10 to speed (50) every 100+200d turns";
772 case ACT_RESIST_ACID:
773 return "resist acid (dur 20+d20) every 40+d40 turns";
774 case ACT_RESIST_FIRE:
775 return "resist fire (dur 20+d20) every 40+d40 turns";
776 case ACT_RESIST_COLD:
777 return "resist cold (dur 20+d20) every 40+d40 turns";
778 case ACT_RESIST_ELEC:
779 return "resist thunder (dur 20+d20) every 40+d40 turns";
780 case ACT_RESIST_POIS:
781 return "resist poison (dur 20+d20) every 40+d40 turns";
784 return "light area (dam 2d15) every 10+d10 turns";
786 return "light (dam 2d15) & map area every 50+d50 turns";
788 return "detection every 55+d55 turns";
789 case ACT_DETECT_XTRA:
790 return "detection, probing and identify true every 100 turns";
792 return "identify true every 75 turns";
794 return "identify spell every 10 turns";
796 return "explosive rune every 200 turns";
798 return "rune of protection every 400 turns";
800 return "satisfy hunger every 200 turns";
802 return "destroy doors every 10 turns";
804 return "stone to mud every 3 turns";
806 return "recharging every 70 turns";
808 return "alchemy every 500 turns";
810 return "dimension door every 100 turns";
812 return "teleport (range 100) every 25 turns";
814 return "word of recall every 200 turns";
815 case ACT_TELEKINESIS:
816 return "a telekinesis (500 lb) every 25+d25 turns";
818 return "clairvoyance and recall, draining you every 20+d20 turns";
819 case ACT_DETECT_UNIQUE:
820 return "list of the uniques on the level every 200 turns";
822 return "a getaway every 35 turns";
823 case ACT_DISP_CURSE_XTRA:
824 return "dispel curse and probing every turn";
825 case ACT_BRAND_FIRE_BOLTS:
826 return "fire branding of bolts every 999 turns";
827 case ACT_RECHARGE_XTRA:
828 return "recharge item every 200 turns";
830 return "perilous identify every turn";
832 return "shiko every 100+d100 turns";
834 /* Unique activation */
836 return "fishing : every time";
838 return "reveal your identity every 150+d150 turns";
840 return "increase STR (destroyed 50%)";
841 case ACT_BLOODY_MOON:
842 return "change zokusei every 3333 turns";
844 return "fire! every 15 turns";
847 return "something undefined";
853 /* Some artifacts can be activated */
854 switch (o_ptr->name1)
860 if (object_is_smith(o_ptr))
862 switch (o_ptr->xtra3 - 1)
864 case ESSENCE_TMP_RES_ACID:
866 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
868 return "resist acid every 50+d50 turns";
871 case ESSENCE_TMP_RES_ELEC:
873 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
875 return "resist elec every 50+d50 turns";
878 case ESSENCE_TMP_RES_FIRE:
880 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
882 return "resist fire every 50+d50 turns";
885 case ESSENCE_TMP_RES_COLD:
887 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
889 return "resist cold every 50+d50 turns";
894 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
896 return "earthquake every 100+d100 turns";
901 if (o_ptr->name2 == EGO_TRUMP)
904 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
906 return "teleport every 50+d50 turns";
911 if (o_ptr->name2 == EGO_LITE_ILLUMINATION)
914 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
916 return "illumination every 10+d10 turns";
920 else if (o_ptr->name2 == EGO_EARTHQUAKES)
923 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
925 return "earthquake every 100+d100 turns";
930 else if (o_ptr->name2 == EGO_JUMP)
933 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
935 return "blink every 10+d10 turns";
940 if (o_ptr->tval == TV_RING)
942 if (object_is_ego(o_ptr))
944 switch (o_ptr->name2)
948 return "»Îµ¤¹âÍÈ : 100+d100¥¿¡¼¥óËè";
950 return "heroism every 100+d100 turns";
952 case EGO_RING_MAGIC_MIS:
954 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
956 return "magic missile (2d6) every 2 turns";
958 case EGO_RING_FIRE_BOLT:
960 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
962 return "fire bolt (9d8) every 8+d8 turns";
964 case EGO_RING_COLD_BOLT:
966 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
968 return "frost bolt (6d8) every 7+d7 turns";
970 case EGO_RING_ELEC_BOLT:
972 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
974 return "lightning bolt (4d8) every 5+d5 turns";
976 case EGO_RING_ACID_BOLT:
978 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
980 return "acid bolt (5d8) every 6+d6 turns";
982 case EGO_RING_MANA_BOLT:
984 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
986 return "a mana bolt (120) every 120+d120 turns";
988 case EGO_RING_FIRE_BALL:
990 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
992 return "fire ball (100) every 80+d80 turns";
994 case EGO_RING_COLD_BALL:
996 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
998 return "cold ball (100) every 80+d80 turns";
1000 case EGO_RING_ELEC_BALL:
1002 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1004 return "elec ball (100) every 80+d80 turns";
1006 case EGO_RING_ACID_BALL:
1008 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1010 return "acid ball (100) every 80+d80 turns";
1012 case EGO_RING_MANA_BALL:
1014 return "ËâÎϤÎÍò (250) : 300 ¥¿¡¼¥óËè";
1016 return "mana storm (250) every 300 turns";
1018 case EGO_RING_DRAGON_F:
1019 if (o_ptr->sval == SV_RING_FLAMES)
1021 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) ¤È²Ð¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
1023 return "breath of fire (200) and resist fire every 200 turns";
1027 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
1029 return "fire breath (200) every 250 turns";
1031 case EGO_RING_DRAGON_C:
1032 if (o_ptr->sval == SV_RING_ICE)
1034 return "Î䵤¤Î¥Ö¥ì¥¹ (200) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
1036 return "breath of cold (200) and resist cold every 200 turns";
1040 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
1042 return "cold breath (200) every 250 turns";
1044 case EGO_RING_M_DETECT:
1046 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃÎ : 150 ¥¿¡¼¥óËè";
1048 return "detect all monsters every 150 turns";
1050 case EGO_RING_D_SPEED:
1052 return "¥¹¥Ô¡¼¥É(15+d30¥¿¡¼¥ó) : 100 ¥¿¡¼¥óËè";
1054 return "haste self (15+d30 turns) every 100 turns";
1056 case EGO_RING_BERSERKER:
1058 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
1060 return "berserk (25+d25 turns) every 75+d75 turns";
1062 case EGO_RING_TELE_AWAY:
1064 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
1066 return "teleport away every 150 turns";
1070 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ : 777 ¥¿¡¼¥óËè";
1072 return "hero, bless, and ultimate resistance every 777 turns";
1076 switch (o_ptr->sval)
1078 case SV_RING_FLAMES:
1080 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) ¤È²Ð¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1082 return "ball of fire (100) and resist fire every 50+d50 turns";
1087 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1089 return "ball of cold (100) and resist cold every 50+d50 turns";
1094 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) ¤È»À¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1096 return "ball of acid (100) and resist acid every 50+d50 turns";
1101 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) ¤ÈÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1103 return "ball of elec (100) and resist elec every 50+d50 turns";
1111 if (o_ptr->tval == TV_AMULET)
1113 if (object_is_ego(o_ptr))
1115 switch (o_ptr->name2)
1119 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
1121 return "identify every 10 turns";
1125 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
1127 return "charm monster every 200 turns";
1131 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1133 return "blink every 10+d10 turns";
1135 case EGO_AMU_TELEPORT:
1137 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
1139 return "teleport every 50+d50 turns";
1141 case EGO_AMU_D_DOOR:
1143 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
1145 return "dimension door every 200 turns";
1147 case EGO_AMU_RES_FIRE_:
1149 return "²Ð±ê¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1151 return "resist fire every 50+d50 turns";
1153 case EGO_AMU_RES_COLD_:
1155 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1157 return "resist cold every 50+d50 turns";
1159 case EGO_AMU_RES_ELEC_:
1161 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1163 return "resist elec every 50+d50 turns";
1165 case EGO_AMU_RES_ACID_:
1167 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1169 return "resist acid every 50+d50 turns";
1171 case EGO_AMU_DETECTION:
1173 return "Á´´¶ÃÎ : 55+d55¥¿¡¼¥óËè";
1175 return "detect all floor every 55+d55 turns";
1181 if (o_ptr->tval == TV_WHISTLE)
1184 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
1186 return "call pet every 100+d100 turns";
1190 if (o_ptr->tval == TV_CAPTURE)
1193 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
1195 return "captures or releases a monster.";
1199 /* Require dragon scale mail */
1201 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
1203 if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
1207 /* Branch on the sub-type */
1208 switch (o_ptr->sval)
1210 case SV_DRAGON_BLUE:
1213 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
1215 return "breathe lightning (100) every 150+d150 turns";
1219 case SV_DRAGON_WHITE:
1222 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
1224 return "breathe frost (110) every 150+d150 turns";
1228 case SV_DRAGON_BLACK:
1231 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
1233 return "breathe acid (130) every 150+d150 turns";
1237 case SV_DRAGON_GREEN:
1240 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
1242 return "breathe poison gas (150) every 180+d180 turns";
1249 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
1251 return "breathe fire (200) every 200+d200 turns";
1255 case SV_DRAGON_MULTIHUED:
1258 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
1260 return "breathe multi-hued (250) every 200+d200 turns";
1264 case SV_DRAGON_BRONZE:
1267 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
1269 return "breathe confusion (120) every 180+d180 turns";
1273 case SV_DRAGON_GOLD:
1276 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
1278 return "breathe sound (130) every 180+d180 turns";
1282 case SV_DRAGON_CHAOS:
1285 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
1287 return "breathe chaos/disenchant (220) every 200+d200 turns";
1294 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
1296 return "breathe sound/shards (230) every 200+d200 turns";
1300 case SV_DRAGON_BALANCE:
1303 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
1305 return "breathe balance (250) every 200+d200 turns";
1309 case SV_DRAGON_SHINING:
1312 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
1314 return "breathe light/darkness (200) every 200+d200 turns";
1318 case SV_DRAGON_POWER:
1321 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
1323 return "breathe the elements (300) every 200+d200 turns";
1333 return "breathe air";
1340 * Describe a "fully identified" item
1342 bool screen_object(object_type *o_ptr, u32b mode)
1346 u32b flgs[TR_FLAG_SIZE];
1350 char o_name[MAX_NLEN];
1353 int trivial_info = 0;
1355 /* Extract the flags */
1356 object_flags(o_ptr, flgs);
1358 /* Extract the description */
1360 roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
1361 (k_text + k_info[o_ptr->k_idx].text),
1362 77 - 15, temp, sizeof(temp));
1363 for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
1364 { info[i] = &temp[j]; i++;}
1367 if (object_is_equipment(o_ptr))
1369 /* Descriptions of a basic equipment is just a flavor */
1373 /* Mega-Hack -- describe activation */
1374 if (have_flag(flgs, TR_ACTIVATE))
1377 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
1379 info[i++] = "It can be activated for...";
1382 info[i++] = item_activation(o_ptr);
1384 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
1386 info[i++] = "...if it is being worn.";
1391 /* Figurines, a hack */
1392 if (o_ptr->tval == TV_FIGURINE)
1395 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
1397 info[i++] = "It will transform into a pet when thrown.";
1402 /* Figurines, a hack */
1403 if (o_ptr->name1 == ART_STONEMASK)
1406 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
1408 info[i++] = "It makes you turn into a vampire permanently.";
1413 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
1416 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
1418 info[i++] = "It will attempt to kill a monster instantly.";
1423 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
1426 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
1428 info[i++] = "It causes you to strike yourself sometimes.";
1432 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
1434 info[i++] = "It always penetrates invulnerability barriers.";
1438 if (o_ptr->name2 == EGO_2WEAPON)
1441 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
1443 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
1448 if (have_flag(flgs, TR_EASY_SPELL))
1451 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
1453 info[i++] = "It affects your ability to cast spells.";
1457 if (o_ptr->name2 == EGO_AMU_FOOL)
1460 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
1462 info[i++] = "It interferes with casting spells.";
1466 if (o_ptr->name2 == EGO_RING_THROW)
1469 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
1471 info[i++] = "It provides great strength when you throw an item.";
1475 if (o_ptr->name2 == EGO_AMU_NAIVETY)
1478 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
1480 info[i++] = "It decreases your magic resistance.";
1484 if (o_ptr->tval == TV_STATUE)
1486 monster_race *r_ptr = &r_info[o_ptr->pval];
1488 if (o_ptr->pval == MON_BULLGATES)
1490 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
1492 info[i++] = "It is shameful.";
1494 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
1496 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
1498 info[i++] = "It is fearful.";
1502 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
1504 info[i++] = "It is cheerful.";
1508 /* Hack -- describe lite's */
1509 if (o_ptr->tval == TV_LITE)
1511 if (o_ptr->name2 == EGO_LITE_DARKNESS)
1514 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
1516 info[i++] = "It provides no light.";
1519 if (o_ptr->sval == SV_LITE_FEANOR)
1522 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-3)¡£";
1524 info[i++] = "It decreases radius of light source by 3.";
1527 else if (o_ptr->sval == SV_LITE_LANTERN)
1530 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
1532 info[i++] = "It decreases radius of light source by 2.";
1538 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
1540 info[i++] = "It decreases radius of light source by 1.";
1544 else if (object_is_fixed_artifact(o_ptr))
1547 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1549 info[i++] = "It provides light (radius 3) forever.";
1553 else if (o_ptr->name2 == EGO_LITE_SHINE)
1555 if (o_ptr->sval == SV_LITE_FEANOR)
1558 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1560 info[i++] = "It provides light (radius 3) forever.";
1564 else if (o_ptr->sval == SV_LITE_LANTERN)
1567 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1569 info[i++] = "It provides light (radius 3) when fueled.";
1576 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1578 info[i++] = "It provides light (radius 2) when fueled.";
1585 if (o_ptr->sval == SV_LITE_FEANOR)
1588 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1590 info[i++] = "It provides light (radius 2) forever.";
1594 else if (o_ptr->sval == SV_LITE_LANTERN)
1597 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1599 info[i++] = "It provides light (radius 2) when fueled.";
1606 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
1608 info[i++] = "It provides light (radius 1) when fueled.";
1613 if (o_ptr->name2 == EGO_LITE_LONG)
1616 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
1618 info[i++] = "It provides light for much longer time.";
1624 /* And then describe it fully */
1626 if (have_flag(flgs, TR_RIDING))
1628 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
1630 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
1632 info[i++] = "It is made for use while riding.";
1637 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
1639 info[i++] = "It is suitable for use while riding.";
1641 /* This information is not important enough */
1645 if (have_flag(flgs, TR_STR))
1648 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1650 info[i++] = "It affects your strength.";
1654 if (have_flag(flgs, TR_INT))
1657 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1659 info[i++] = "It affects your intelligence.";
1663 if (have_flag(flgs, TR_WIS))
1666 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1668 info[i++] = "It affects your wisdom.";
1672 if (have_flag(flgs, TR_DEX))
1675 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1677 info[i++] = "It affects your dexterity.";
1681 if (have_flag(flgs, TR_CON))
1684 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1686 info[i++] = "It affects your constitution.";
1690 if (have_flag(flgs, TR_CHR))
1693 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1695 info[i++] = "It affects your charisma.";
1700 if (have_flag(flgs, TR_MAGIC_MASTERY))
1703 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1705 info[i++] = "It affects your ability to use magic devices.";
1709 if (have_flag(flgs, TR_STEALTH))
1712 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1714 info[i++] = "It affects your stealth.";
1718 if (have_flag(flgs, TR_SEARCH))
1721 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1723 info[i++] = "It affects your searching.";
1727 if (have_flag(flgs, TR_INFRA))
1730 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1732 info[i++] = "It affects your infravision.";
1736 if (have_flag(flgs, TR_TUNNEL))
1739 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1741 info[i++] = "It affects your ability to tunnel.";
1745 if (have_flag(flgs, TR_SPEED))
1748 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1750 info[i++] = "It affects your speed.";
1754 if (have_flag(flgs, TR_BLOWS))
1757 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1759 info[i++] = "It affects your attack speed.";
1764 if (have_flag(flgs, TR_BRAND_ACID))
1767 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1769 info[i++] = "It does extra damage from acid.";
1773 if (have_flag(flgs, TR_BRAND_ELEC))
1776 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1778 info[i++] = "It does extra damage from electricity.";
1782 if (have_flag(flgs, TR_BRAND_FIRE))
1785 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1787 info[i++] = "It does extra damage from fire.";
1791 if (have_flag(flgs, TR_BRAND_COLD))
1794 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1796 info[i++] = "It does extra damage from frost.";
1801 if (have_flag(flgs, TR_BRAND_POIS))
1804 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
1806 info[i++] = "It poisons your foes.";
1811 if (have_flag(flgs, TR_CHAOTIC))
1814 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
1816 info[i++] = "It produces chaotic effects.";
1821 if (have_flag(flgs, TR_VAMPIRIC))
1824 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
1826 info[i++] = "It drains life from your foes.";
1831 if (have_flag(flgs, TR_IMPACT))
1834 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
1836 info[i++] = "It can cause earthquakes.";
1841 if (have_flag(flgs, TR_VORPAL))
1844 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1846 info[i++] = "It is very sharp and can cut your foes.";
1851 if (have_flag(flgs, TR_KILL_DRAGON))
1854 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1856 info[i++] = "It is a great bane of dragons.";
1860 else if (have_flag(flgs, TR_SLAY_DRAGON))
1863 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1865 info[i++] = "It is especially deadly against dragons.";
1870 if (have_flag(flgs, TR_KILL_ORC))
1873 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1875 info[i++] = "It is a great bane of orcs.";
1879 if (have_flag(flgs, TR_SLAY_ORC))
1882 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1884 info[i++] = "It is especially deadly against orcs.";
1889 if (have_flag(flgs, TR_KILL_TROLL))
1892 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1894 info[i++] = "It is a great bane of trolls.";
1898 if (have_flag(flgs, TR_SLAY_TROLL))
1901 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1903 info[i++] = "It is especially deadly against trolls.";
1908 if (have_flag(flgs, TR_KILL_GIANT))
1911 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1913 info[i++] = "It is a great bane of giants.";
1916 else if (have_flag(flgs, TR_SLAY_GIANT))
1919 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1921 info[i++] = "It is especially deadly against giants.";
1926 if (have_flag(flgs, TR_KILL_DEMON))
1929 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1931 info[i++] = "It is a great bane of demons.";
1935 if (have_flag(flgs, TR_SLAY_DEMON))
1938 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
1940 info[i++] = "It strikes at demons with holy wrath.";
1945 if (have_flag(flgs, TR_KILL_UNDEAD))
1948 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1950 info[i++] = "It is a great bane of undead.";
1954 if (have_flag(flgs, TR_SLAY_UNDEAD))
1957 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
1959 info[i++] = "It strikes at undead with holy wrath.";
1964 if (have_flag(flgs, TR_KILL_EVIL))
1967 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1969 info[i++] = "It is a great bane of evil monsters.";
1973 if (have_flag(flgs, TR_SLAY_EVIL))
1976 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
1978 info[i++] = "It fights against evil with holy fury.";
1983 if (have_flag(flgs, TR_KILL_ANIMAL))
1986 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1988 info[i++] = "It is a great bane of natural creatures.";
1992 if (have_flag(flgs, TR_SLAY_ANIMAL))
1995 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1997 info[i++] = "It is especially deadly against natural creatures.";
2002 if (have_flag(flgs, TR_KILL_HUMAN))
2005 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2007 info[i++] = "It is a great bane of humans.";
2011 if (have_flag(flgs, TR_SLAY_HUMAN))
2014 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2016 info[i++] = "It is especially deadly against humans.";
2021 if (have_flag(flgs, TR_FORCE_WEAPON))
2024 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
2026 info[i++] = "It powerfully strikes at a monster using your mana.";
2030 if (have_flag(flgs, TR_DEC_MANA))
2033 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
2035 info[i++] = "It decreases your mana consumption.";
2039 if (have_flag(flgs, TR_SUST_STR))
2042 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
2044 info[i++] = "It sustains your strength.";
2048 if (have_flag(flgs, TR_SUST_INT))
2051 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
2053 info[i++] = "It sustains your intelligence.";
2057 if (have_flag(flgs, TR_SUST_WIS))
2060 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
2062 info[i++] = "It sustains your wisdom.";
2066 if (have_flag(flgs, TR_SUST_DEX))
2069 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
2071 info[i++] = "It sustains your dexterity.";
2075 if (have_flag(flgs, TR_SUST_CON))
2078 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
2080 info[i++] = "It sustains your constitution.";
2084 if (have_flag(flgs, TR_SUST_CHR))
2087 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
2089 info[i++] = "It sustains your charisma.";
2094 if (have_flag(flgs, TR_IM_ACID))
2097 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2099 info[i++] = "It provides immunity to acid.";
2103 if (have_flag(flgs, TR_IM_ELEC))
2106 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2108 info[i++] = "It provides immunity to electricity.";
2112 if (have_flag(flgs, TR_IM_FIRE))
2115 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2117 info[i++] = "It provides immunity to fire.";
2121 if (have_flag(flgs, TR_IM_COLD))
2124 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2126 info[i++] = "It provides immunity to cold.";
2131 if (have_flag(flgs, TR_THROW))
2134 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2136 info[i++] = "It is perfectly balanced for throwing.";
2140 if (have_flag(flgs, TR_FREE_ACT))
2143 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2145 info[i++] = "It provides immunity to paralysis.";
2149 if (have_flag(flgs, TR_HOLD_LIFE))
2152 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
2154 info[i++] = "It provides resistance to life draining.";
2158 if (have_flag(flgs, TR_RES_FEAR))
2161 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
2163 info[i++] = "It makes you completely fearless.";
2167 if (have_flag(flgs, TR_RES_ACID))
2170 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2172 info[i++] = "It provides resistance to acid.";
2176 if (have_flag(flgs, TR_RES_ELEC))
2179 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2181 info[i++] = "It provides resistance to electricity.";
2185 if (have_flag(flgs, TR_RES_FIRE))
2188 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2190 info[i++] = "It provides resistance to fire.";
2194 if (have_flag(flgs, TR_RES_COLD))
2197 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2199 info[i++] = "It provides resistance to cold.";
2203 if (have_flag(flgs, TR_RES_POIS))
2206 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2208 info[i++] = "It provides resistance to poison.";
2213 if (have_flag(flgs, TR_RES_LITE))
2216 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2218 info[i++] = "It provides resistance to light.";
2222 if (have_flag(flgs, TR_RES_DARK))
2225 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2227 info[i++] = "It provides resistance to dark.";
2232 if (have_flag(flgs, TR_RES_BLIND))
2235 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2237 info[i++] = "It provides resistance to blindness.";
2241 if (have_flag(flgs, TR_RES_CONF))
2244 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2246 info[i++] = "It provides resistance to confusion.";
2250 if (have_flag(flgs, TR_RES_SOUND))
2253 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2255 info[i++] = "It provides resistance to sound.";
2259 if (have_flag(flgs, TR_RES_SHARDS))
2262 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2264 info[i++] = "It provides resistance to shards.";
2269 if (have_flag(flgs, TR_RES_NETHER))
2272 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2274 info[i++] = "It provides resistance to nether.";
2278 if (have_flag(flgs, TR_RES_NEXUS))
2281 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2283 info[i++] = "It provides resistance to nexus.";
2287 if (have_flag(flgs, TR_RES_CHAOS))
2290 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2292 info[i++] = "It provides resistance to chaos.";
2296 if (have_flag(flgs, TR_RES_DISEN))
2299 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2301 info[i++] = "It provides resistance to disenchantment.";
2306 if (have_flag(flgs, TR_LEVITATION))
2309 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2311 info[i++] = "It allows you to levitate.";
2315 if (have_flag(flgs, TR_LITE))
2317 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
2319 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
2321 info[i++] = "It decreases radius of your light source by 1.";
2325 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë(Ⱦ·Â¤Ë+1)¡£";
2327 info[i++] = "It provides permanent light. (radius +1)";
2331 if (have_flag(flgs, TR_SEE_INVIS))
2334 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2336 info[i++] = "It allows you to see invisible monsters.";
2340 if (have_flag(flgs, TR_TELEPATHY))
2343 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
2345 info[i++] = "It gives telepathic powers.";
2349 if (have_flag(flgs, TR_ESP_ANIMAL))
2352 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤ò´¶ÃΤ¹¤ë¡£";
2354 info[i++] = "It senses natural creatures.";
2358 if (have_flag(flgs, TR_ESP_UNDEAD))
2361 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ò´¶ÃΤ¹¤ë¡£";
2363 info[i++] = "It senses undead.";
2367 if (have_flag(flgs, TR_ESP_DEMON))
2370 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò´¶ÃΤ¹¤ë¡£";
2372 info[i++] = "It senses demons.";
2376 if (have_flag(flgs, TR_ESP_ORC))
2379 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ò´¶ÃΤ¹¤ë¡£";
2381 info[i++] = "It senses orcs.";
2385 if (have_flag(flgs, TR_ESP_TROLL))
2388 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ò´¶ÃΤ¹¤ë¡£";
2390 info[i++] = "It senses trolls.";
2394 if (have_flag(flgs, TR_ESP_GIANT))
2397 info[i++] = "¤½¤ì¤Ïµð¿Í¤ò´¶ÃΤ¹¤ë¡£";
2399 info[i++] = "It senses giants.";
2403 if (have_flag(flgs, TR_ESP_DRAGON))
2406 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò´¶ÃΤ¹¤ë¡£";
2408 info[i++] = "It senses dragons.";
2412 if (have_flag(flgs, TR_ESP_HUMAN))
2415 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ò´¶ÃΤ¹¤ë¡£";
2417 info[i++] = "It senses humans.";
2421 if (have_flag(flgs, TR_ESP_EVIL))
2424 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¸ºß¤ò´¶ÃΤ¹¤ë¡£";
2426 info[i++] = "It senses evil creatures.";
2430 if (have_flag(flgs, TR_ESP_GOOD))
2433 info[i++] = "¤½¤ì¤ÏÁ±Îɤʸºß¤ò´¶ÃΤ¹¤ë¡£";
2435 info[i++] = "It senses good creatures.";
2439 if (have_flag(flgs, TR_ESP_NONLIVING))
2442 info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤò´¶ÃΤ¹¤ë¡£";
2444 info[i++] = "It senses non-living creatures.";
2448 if (have_flag(flgs, TR_ESP_UNIQUE))
2451 info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤ò´¶ÃΤ¹¤ë¡£";
2453 info[i++] = "It senses unique monsters.";
2457 if (have_flag(flgs, TR_SLOW_DIGEST))
2460 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
2462 info[i++] = "It slows your metabolism.";
2466 if (have_flag(flgs, TR_REGEN))
2469 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
2471 info[i++] = "It speeds your regenerative powers.";
2475 if (have_flag(flgs, TR_WARNING))
2478 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
2480 info[i++] = "It warns you of danger";
2484 if (have_flag(flgs, TR_REFLECT))
2487 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
2489 info[i++] = "It reflects bolts and arrows.";
2493 if (have_flag(flgs, TR_SH_FIRE))
2496 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2498 info[i++] = "It produces a fiery sheath.";
2502 if (have_flag(flgs, TR_SH_ELEC))
2505 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2507 info[i++] = "It produces an electric sheath.";
2511 if (have_flag(flgs, TR_SH_COLD))
2514 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2516 info[i++] = "It produces a sheath of coldness.";
2520 if (have_flag(flgs, TR_NO_MAGIC))
2523 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2525 info[i++] = "It produces an anti-magic shell.";
2529 if (have_flag(flgs, TR_NO_TELE))
2532 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
2534 info[i++] = "It prevents teleportation.";
2538 if (have_flag(flgs, TR_XTRA_MIGHT))
2541 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2543 info[i++] = "It fires missiles with extra might.";
2547 if (have_flag(flgs, TR_XTRA_SHOTS))
2550 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2552 info[i++] = "It fires missiles excessively fast.";
2557 if (have_flag(flgs, TR_BLESSED))
2560 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
2562 info[i++] = "It has been blessed by the gods.";
2567 if (object_is_cursed(o_ptr))
2569 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
2572 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
2574 info[i++] = "It is permanently cursed.";
2578 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
2581 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
2583 info[i++] = "It is heavily cursed.";
2590 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
2592 info[i++] = "It is cursed.";
2596 * It's a trivial infomation since there is
2597 * fake inscription {cursed}
2603 if ((have_flag(flgs, TR_TY_CURSE)) || (o_ptr->curse_flags & TRC_TY_CURSE))
2606 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
2608 info[i++] = "It carries an ancient foul curse.";
2612 if ((have_flag(flgs, TR_AGGRAVATE)) || (o_ptr->curse_flags & TRC_AGGRAVATE))
2615 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
2617 info[i++] = "It aggravates nearby creatures.";
2621 if ((have_flag(flgs, TR_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
2624 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
2626 info[i++] = "It drains experience.";
2630 if (o_ptr->curse_flags & TRC_SLOW_REGEN)
2633 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
2635 info[i++] = "It slows your regenerative powers.";
2639 if (o_ptr->curse_flags & TRC_ADD_L_CURSE)
2642 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
2644 info[i++] = "It adds weak curses.";
2648 if (o_ptr->curse_flags & TRC_ADD_H_CURSE)
2651 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
2653 info[i++] = "It adds heavy curses.";
2657 if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
2660 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2662 info[i++] = "It attracts animals.";
2666 if (o_ptr->curse_flags & TRC_CALL_DEMON)
2669 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2671 info[i++] = "It attracts demons.";
2675 if (o_ptr->curse_flags & TRC_CALL_DRAGON)
2678 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2680 info[i++] = "It attracts dragons.";
2684 if (o_ptr->curse_flags & TRC_COWARDICE)
2687 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤µ¯¤³¤¹¡£";
2689 info[i++] = "It makes you subject to cowardice.";
2693 if ((have_flag(flgs, TR_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
2696 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
2698 info[i++] = "It induces random teleportation.";
2702 if (o_ptr->curse_flags & TRC_LOW_MELEE)
2705 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
2707 info[i++] = "It causes you to miss blows.";
2711 if (o_ptr->curse_flags & TRC_LOW_AC)
2714 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
2716 info[i++] = "It helps your enemies' blows.";
2720 if (o_ptr->curse_flags & TRC_LOW_MAGIC)
2723 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
2725 info[i++] = "It encumbers you while spellcasting.";
2729 if (o_ptr->curse_flags & TRC_FAST_DIGEST)
2732 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
2734 info[i++] = "It speeds your metabolism.";
2738 if (o_ptr->curse_flags & TRC_DRAIN_HP)
2741 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
2743 info[i++] = "It drains you.";
2747 if (o_ptr->curse_flags & TRC_DRAIN_MANA)
2750 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
2752 info[i++] = "It drains your mana.";
2757 /* Describe about this kind of object instead of THIS fake object */
2758 if (mode & SCROBJ_FAKE_OBJECT)
2760 switch (o_ptr->tval)
2763 switch (o_ptr->sval)
2765 case SV_RING_LORDLY:
2767 info[i++] = "¤½¤ì¤Ï´ö¤Ä¤«¤Î¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
2769 info[i++] = "It provides some random resistances.";
2772 case SV_RING_WARNING:
2774 info[i++] = "¤½¤ì¤Ï¤Ò¤È¤Ä¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2776 info[i++] = "It may provide a low rank ESP.";
2783 switch (o_ptr->sval)
2785 case SV_AMULET_RESISTANCE:
2787 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2789 info[i++] = "It may provides resistance to poison.";
2792 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2794 info[i++] = "It may provide a random resistances.";
2797 case SV_AMULET_THE_MAGI:
2799 info[i++] = "¤½¤ì¤ÏºÇÂç¤Ç£³¤Ä¤Þ¤Ç¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë¡£";
2801 info[i++] = "It provides up to three low rank ESPs.";
2809 if (have_flag(flgs, TR_IGNORE_ACID) &&
2810 have_flag(flgs, TR_IGNORE_ELEC) &&
2811 have_flag(flgs, TR_IGNORE_FIRE) &&
2812 have_flag(flgs, TR_IGNORE_COLD))
2815 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2817 info[i++] = "It cannot be harmed by the elements.";
2822 if (have_flag(flgs, TR_IGNORE_ACID))
2825 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2827 info[i++] = "It cannot be harmed by acid.";
2830 if (have_flag(flgs, TR_IGNORE_ELEC))
2833 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2835 info[i++] = "It cannot be harmed by electricity.";
2838 if (have_flag(flgs, TR_IGNORE_FIRE))
2841 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2843 info[i++] = "It cannot be harmed by fire.";
2846 if (have_flag(flgs, TR_IGNORE_COLD))
2849 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2851 info[i++] = "It cannot be harmed by cold.";
2856 if (mode & SCROBJ_FORCE_DETAIL) trivial_info = 0;
2858 /* No relevant informations */
2859 if (i <= trivial_info) return (FALSE);
2861 /* Save the screen */
2865 Term_get_size(&wid, &hgt);
2867 /* Display Item name */
2868 if (!(mode & SCROBJ_FAKE_OBJECT))
2869 object_desc(o_name, o_ptr, 0);
2871 object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
2875 /* Erase the screen */
2876 for (k = 1; k < hgt; k++) prt("", k, 13);
2878 /* Label the information */
2879 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
2881 monster_race *r_ptr = &r_info[o_ptr->pval];
2882 int namelen = strlen(r_name + r_ptr->name);
2883 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
2884 Term_queue_bigchar(18 + namelen, 1, r_ptr->x_attr, r_ptr->x_char, 0, 0);
2885 prt("'", 1, (use_bigtile ? 20 : 19) + namelen);
2889 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
2891 prt(" Item Attributes:", 1, 15);
2894 /* We will print on top of the map (column 13) */
2895 for (k = 2, j = 0; j < i; j++)
2898 prt(info[j], k++, 15);
2900 /* Every 20 entries (lines 2 to 21), start over */
2901 if ((k == hgt - 2) && (j+1 < i))
2904 prt("-- ³¤¯ --", k, 15);
2906 prt("-- more --", k, 15);
2909 for (; k > 2; k--) prt("", k, 15);
2915 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
2917 prt("[Press any key to continue]", k, 15);
2922 /* Restore the screen */
2925 /* Gave knowledge */
2932 * Convert an inventory index into a one character label
2933 * Note that the label does NOT distinguish inven/equip.
2935 char index_to_label(int i)
2937 /* Indexes for "inven" are easy */
2938 if (i < INVEN_RARM) return (I2A(i));
2940 /* Indexes for "equip" are offset */
2941 return (I2A(i - INVEN_RARM));
2946 * Convert a label into the index of an item in the "inven"
2947 * Return "-1" if the label does not indicate a real item
2949 s16b label_to_inven(int c)
2954 i = (islower(c) ? A2I(c) : -1);
2956 /* Verify the index */
2957 if ((i < 0) || (i > INVEN_PACK)) return (-1);
2959 /* Empty slots can never be chosen */
2960 if (!inventory[i].k_idx) return (-1);
2962 /* Return the index */
2968 extern bool select_ring_slot;
2971 static bool is_ring_slot(int i)
2973 return (i == INVEN_RIGHT) || (i == INVEN_LEFT);
2978 * Convert a label into the index of a item in the "equip"
2979 * Return "-1" if the label does not indicate a real item
2981 s16b label_to_equip(int c)
2986 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
2988 /* Verify the index */
2989 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
2991 if (select_ring_slot) return is_ring_slot(i) ? i : -1;
2993 /* Empty slots can never be chosen */
2994 if (!inventory[i].k_idx) return (-1);
2996 /* Return the index */
3003 * Determine which equipment slot (if any) an item likes
3005 s16b wield_slot(object_type *o_ptr)
3007 /* Slot for equipment */
3008 switch (o_ptr->tval)
3015 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
3016 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
3017 return (INVEN_LARM);
3024 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
3025 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
3026 return (INVEN_RARM);
3036 /* Use the right hand first */
3037 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
3039 /* Use the left hand for swapping (by default) */
3040 return (INVEN_LEFT);
3046 return (INVEN_NECK);
3051 return (INVEN_LITE);
3058 return (INVEN_BODY);
3063 return (INVEN_OUTER);
3069 return (INVEN_HEAD);
3074 return (INVEN_HANDS);
3079 return (INVEN_FEET);
3083 /* No slot available */
3089 * Return a string mentioning how a given item is carried
3091 cptr mention_use(int i)
3095 /* Examine the location */
3099 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->migite) ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê")); break;
3101 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "Just lifting" : (p_ptr->migite ? "Wielding" : "On arm"); break;
3105 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->hidarite) ? " ξ¼ê" : (left_hander ? " ±¦¼ê" : " º¸¼ê")); break;
3107 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "Just lifting" : (p_ptr->hidarite ? "Wielding" : "On arm"); break;
3111 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "±¿ÈÂÃæ" : "¼Í·âÍÑ"; break;
3113 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "Just holding" : "Shooting"; break;
3117 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
3119 case INVEN_RIGHT: p = (left_hander ? "On left hand" : "On right hand"); break;
3123 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
3125 case INVEN_LEFT: p = (left_hander ? "On right hand" : "On left hand"); break;
3129 case INVEN_NECK: p = " ¼ó"; break;
3131 case INVEN_NECK: p = "Around neck"; break;
3135 case INVEN_LITE: p = " ¸÷¸»"; break;
3137 case INVEN_LITE: p = "Light source"; break;
3141 case INVEN_BODY: p = " ÂÎ"; break;
3143 case INVEN_BODY: p = "On body"; break;
3147 case INVEN_OUTER: p = "ÂΤξå"; break;
3149 case INVEN_OUTER: p = "About body"; break;
3153 case INVEN_HEAD: p = " Ƭ"; break;
3155 case INVEN_HEAD: p = "On head"; break;
3159 case INVEN_HANDS: p = " ¼ê"; break;
3161 case INVEN_HANDS: p = "On hands"; break;
3165 case INVEN_FEET: p = " "; break;
3167 case INVEN_FEET: p = "On feet"; break;
3171 default: p = "¥¶¥Ã¥¯"; break;
3173 default: p = "In pack"; break;
3177 /* Return the result */
3183 * Return a string describing how a given item is being worn.
3184 * Currently, only used for items in the equipment, not inventory.
3186 cptr describe_use(int i)
3193 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->migite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
3195 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "just lifting" : (p_ptr->migite ? "attacking monsters with" : "wearing on your arm"); break;
3199 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->hidarite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
3201 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "just lifting" : (p_ptr->hidarite ? "attacking monsters with" : "wearing on your arm"); break;
3205 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î" : "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
3207 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "just holding" : "shooting missiles with"; break;
3211 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3213 case INVEN_RIGHT: p = (left_hander ? "wearing on your left hand" : "wearing on your right hand"); break;
3217 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3219 case INVEN_LEFT: p = (left_hander ? "wearing on your right hand" : "wearing on your left hand"); break;
3223 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
3225 case INVEN_NECK: p = "wearing around your neck"; break;
3229 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
3231 case INVEN_LITE: p = "using to light the way"; break;
3235 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
3237 case INVEN_BODY: p = "wearing on your body"; break;
3241 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
3243 case INVEN_OUTER: p = "wearing on your back"; break;
3247 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
3249 case INVEN_HEAD: p = "wearing on your head"; break;
3253 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
3255 case INVEN_HANDS: p = "wearing on your hands"; break;
3259 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
3261 case INVEN_FEET: p = "wearing on your feet"; break;
3265 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
3267 default: p = "carrying in your pack"; break;
3271 /* Return the result */
3276 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
3278 bool check_book_realm(const byte book_tval, const byte book_sval)
3280 if (book_tval < TV_LIFE_BOOK) return FALSE;
3281 if (p_ptr->pclass == CLASS_SORCERER)
3283 return is_magic(tval2realm(book_tval));
3285 else if (p_ptr->pclass == CLASS_RED_MAGE)
3287 if (is_magic(tval2realm(book_tval)))
3288 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
3290 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
3295 * Check an item against the item tester info
3297 bool item_tester_okay(object_type *o_ptr)
3299 /* Hack -- allow listing empty slots */
3300 if (item_tester_full) return (TRUE);
3302 /* Require an item */
3303 if (!o_ptr->k_idx) return (FALSE);
3305 /* Hack -- ignore "gold" */
3306 if (o_ptr->tval == TV_GOLD)
3309 extern bool show_gold_on_floor;
3311 if (!show_gold_on_floor) return (FALSE);
3314 /* Check the tval */
3315 if (item_tester_tval)
3317 /* Is it a spellbook? If so, we need a hack -- TY */
3318 if ((item_tester_tval <= TV_DEATH_BOOK) &&
3319 (item_tester_tval >= TV_LIFE_BOOK))
3320 return check_book_realm(o_ptr->tval, o_ptr->sval);
3322 if (item_tester_tval != o_ptr->tval) return (FALSE);
3325 /* Check the hook */
3326 if (item_tester_hook)
3328 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
3339 * Choice window "shadow" of the "show_inven()" function
3341 void display_inven(void)
3343 register int i, n, z = 0;
3345 byte attr = TERM_WHITE;
3347 char o_name[MAX_NLEN];
3351 Term_get_size(&wid, &hgt);
3353 /* Find the "final" slot */
3354 for (i = 0; i < INVEN_PACK; i++)
3356 o_ptr = &inventory[i];
3358 /* Skip non-objects */
3359 if (!o_ptr->k_idx) continue;
3365 /* Display the pack */
3366 for (i = 0; i < z; i++)
3368 /* Examine the item */
3369 o_ptr = &inventory[i];
3371 /* Start with an empty "index" */
3372 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
3374 /* Is this item "acceptable"? */
3375 if (item_tester_okay(o_ptr))
3377 /* Prepare an "index" */
3378 tmp_val[0] = index_to_label(i);
3380 /* Bracket the "index" --(-- */
3384 /* Display the index (or blank space) */
3385 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
3387 /* Obtain an item description */
3388 object_desc(o_name, o_ptr, 0);
3390 /* Obtain the length of the description */
3394 attr = tval_to_attr[o_ptr->tval % 128];
3396 /* Grey out charging items */
3402 /* Display the entry itself */
3403 Term_putstr(3, i, n, attr, o_name);
3405 /* Erase the rest of the line */
3406 Term_erase(3+n, i, 255);
3408 /* Display the weight if needed */
3411 int wgt = o_ptr->weight * o_ptr->number;
3413 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
3415 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3418 prt(tmp_val, i, wid - 9);
3422 /* Erase the rest of the window */
3423 for (i = z; i < hgt; i++)
3425 /* Erase the line */
3426 Term_erase(0, i, 255);
3433 * Choice window "shadow" of the "show_equip()" function
3435 void display_equip(void)
3439 byte attr = TERM_WHITE;
3441 char o_name[MAX_NLEN];
3445 Term_get_size(&wid, &hgt);
3447 /* Display the equipment */
3448 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
3450 /* Examine the item */
3451 o_ptr = &inventory[i];
3453 /* Start with an empty "index" */
3454 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
3456 /* Is this item "acceptable"? */
3457 if (select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr))
3459 /* Prepare an "index" */
3460 tmp_val[0] = index_to_label(i);
3462 /* Bracket the "index" --(-- */
3466 /* Display the index (or blank space) */
3467 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
3469 /* Obtain an item description */
3470 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
3473 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
3475 strcpy(o_name, "(wielding with two-hands)");
3481 object_desc(o_name, o_ptr, 0);
3482 attr = tval_to_attr[o_ptr->tval % 128];
3485 /* Obtain the length of the description */
3488 /* Grey out charging items */
3494 /* Display the entry itself */
3495 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
3497 /* Erase the rest of the line */
3498 Term_erase(3+n, i - INVEN_RARM, 255);
3500 /* Display the weight (if needed) */
3503 int wgt = o_ptr->weight * o_ptr->number;
3505 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
3507 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3510 prt(tmp_val, i - INVEN_RARM, wid - (show_labels ? 28 : 9));
3513 /* Display the slot description (if needed) */
3516 Term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
3517 prt(mention_use(i), i - INVEN_RARM, wid - 15);
3521 /* Erase the rest of the window */
3522 for (i = INVEN_TOTAL - INVEN_RARM; i < hgt; i++)
3524 /* Clear that line */
3525 Term_erase(0, i, 255);
3531 * Find the "first" inventory object with the given "tag".
3533 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
3534 * inscription of an object. Alphabetical characters don't work as a
3537 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
3538 * and "x" is the "current" command_cmd code.
3540 static bool get_tag(int *cp, char tag, int mode)
3545 /* Extract index from mode */
3550 end = INVEN_TOTAL - 1;
3555 end = INVEN_PACK - 1;
3562 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
3564 /* Check every inventory object */
3565 for (i = start; i <= end; i++)
3567 object_type *o_ptr = &inventory[i];
3569 /* Skip non-objects */
3570 if (!o_ptr->k_idx) continue;
3572 /* Skip empty inscriptions */
3573 if (!o_ptr->inscription) continue;
3575 /* Skip non-choice */
3576 if (!item_tester_okay(o_ptr)) continue;
3579 s = my_strchr(quark_str(o_ptr->inscription), '@');
3581 /* Process all tags */
3584 /* Check the special tags */
3585 if ((s[1] == command_cmd) && (s[2] == tag))
3587 /* Save the actual inventory ID */
3594 /* Find another '@' */
3595 s = my_strchr(s + 1, '@');
3600 /**** Find a tag in the form of {@#} (allows only numerals) ***/
3602 /* Don't allow {@#} with '#' being alphabet */
3603 if (tag < '0' || '9' < tag)
3609 /* Check every object */
3610 for (i = start; i <= end; i++)
3612 object_type *o_ptr = &inventory[i];
3614 /* Skip non-objects */
3615 if (!o_ptr->k_idx) continue;
3617 /* Skip empty inscriptions */
3618 if (!o_ptr->inscription) continue;
3620 /* Skip non-choice */
3621 if (!item_tester_okay(o_ptr)) continue;
3624 s = my_strchr(quark_str(o_ptr->inscription), '@');
3626 /* Process all tags */
3629 /* Check the normal tags */
3632 /* Save the actual inventory ID */
3639 /* Find another '@' */
3640 s = my_strchr(s + 1, '@');
3650 * Find the "first" floor object with the given "tag".
3652 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
3653 * inscription of an object. Alphabetical characters don't work as a
3656 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
3657 * and "x" is the "current" command_cmd code.
3659 static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
3664 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
3666 /* Check every object in the grid */
3667 for (i = 0; i < floor_num && i < 23; i++)
3669 object_type *o_ptr = &o_list[floor_list[i]];
3671 /* Skip empty inscriptions */
3672 if (!o_ptr->inscription) continue;
3675 s = my_strchr(quark_str(o_ptr->inscription), '@');
3677 /* Process all tags */
3680 /* Check the special tags */
3681 if ((s[1] == command_cmd) && (s[2] == tag))
3683 /* Save the actual floor object ID */
3690 /* Find another '@' */
3691 s = my_strchr(s + 1, '@');
3696 /**** Find a tag in the form of {@#} (allows only numerals) ***/
3698 /* Don't allow {@#} with '#' being alphabet */
3699 if (tag < '0' || '9' < tag)
3705 /* Check every object in the grid */
3706 for (i = 0; i < floor_num && i < 23; i++)
3708 object_type *o_ptr = &o_list[floor_list[i]];
3710 /* Skip empty inscriptions */
3711 if (!o_ptr->inscription) continue;
3714 s = my_strchr(quark_str(o_ptr->inscription), '@');
3716 /* Process all tags */
3719 /* Check the normal tags */
3722 /* Save the floor object ID */
3729 /* Find another '@' */
3730 s = my_strchr(s + 1, '@');
3740 * Move around label characters with correspond tags
3742 static void prepare_label_string(char *label, int mode)
3744 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
3745 int offset = (mode == USE_EQUIP) ? INVEN_RARM : 0;
3748 /* Prepare normal labels */
3749 strcpy(label, alphabet_chars);
3751 /* Move each label */
3752 for (i = 0; i < 52; i++)
3755 char c = alphabet_chars[i];
3757 /* Find a tag with this label */
3758 if (get_tag(&index, c, mode))
3760 /* Delete the overwritten label */
3761 if (label[i] == c) label[i] = ' ';
3763 /* Move the label to the place of corresponding tag */
3764 label[index - offset] = c;
3771 * Move around label characters with correspond tags (floor version)
3773 static void prepare_label_string_floor(char *label, int floor_list[], int floor_num)
3775 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
3778 /* Prepare normal labels */
3779 strcpy(label, alphabet_chars);
3781 /* Move each label */
3782 for (i = 0; i < 52; i++)
3785 char c = alphabet_chars[i];
3787 /* Find a tag with this label */
3788 if (get_tag_floor(&index, c, floor_list, floor_num))
3790 /* Delete the overwritten label */
3791 if (label[i] == c) label[i] = ' ';
3793 /* Move the label to the place of corresponding tag */
3801 * Display the inventory.
3803 * Hack -- do not display "trailing" empty slots
3805 int show_inven(int target_item)
3807 int i, j, k, l, z = 0;
3808 int col, cur_col, len;
3810 char o_name[MAX_NLEN];
3814 char out_desc[23][MAX_NLEN];
3815 int target_item_label = 0;
3817 char inven_label[52 + 1];
3819 /* Starting column */
3823 Term_get_size(&wid, &hgt);
3825 /* Default "max-length" */
3826 len = wid - col - 1;
3829 /* Find the "final" slot */
3830 for (i = 0; i < INVEN_PACK; i++)
3832 o_ptr = &inventory[i];
3834 /* Skip non-objects */
3835 if (!o_ptr->k_idx) continue;
3841 prepare_label_string(inven_label, USE_INVEN);
3843 /* Display the inventory */
3844 for (k = 0, i = 0; i < z; i++)
3846 o_ptr = &inventory[i];
3848 /* Is this item acceptable? */
3849 if (!item_tester_okay(o_ptr)) continue;
3851 /* Describe the object */
3852 object_desc(o_name, o_ptr, 0);
3854 /* Save the object index, color, and description */
3856 out_color[k] = tval_to_attr[o_ptr->tval % 128];
3858 /* Grey out charging items */
3861 out_color[k] = TERM_L_DARK;
3864 (void)strcpy(out_desc[k], o_name);
3866 /* Find the predicted "line length" */
3867 l = strlen(out_desc[k]) + 5;
3869 /* Be sure to account for the weight */
3870 if (show_weights) l += 9;
3872 /* Account for icon if displayed */
3873 if (show_item_graph)
3876 if (use_bigtile) l++;
3879 /* Maintain the maximum length */
3880 if (l > len) len = l;
3882 /* Advance to next "line" */
3886 /* Find the column to start in */
3887 col = (len > wid - 4) ? 0 : (wid - len - 1);
3889 /* Output each entry */
3890 for (j = 0; j < k; j++)
3896 o_ptr = &inventory[i];
3898 /* Clear the line */
3899 prt("", j + 1, col ? col - 2 : col);
3901 if (use_menu && target_item)
3903 if (j == (target_item-1))
3906 strcpy(tmp_val, "¡Õ");
3908 strcpy(tmp_val, "> ");
3910 target_item_label = i;
3912 else strcpy(tmp_val, " ");
3914 else if (i <= INVEN_PACK)
3916 /* Prepare an index --(-- */
3917 sprintf(tmp_val, "%c)", inven_label[i]);
3921 /* Prepare an index --(-- */
3922 sprintf(tmp_val, "%c)", index_to_label(i));
3925 /* Clear the line with the (possibly indented) index */
3926 put_str(tmp_val, j + 1, col);
3930 /* Display graphics for object, if desired */
3931 if (show_item_graph)
3933 byte a = object_attr(o_ptr);
3934 char c = object_char(o_ptr);
3937 if (a & 0x80) a |= 0x40;
3940 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
3941 if (use_bigtile) cur_col++;
3947 /* Display the entry itself */
3948 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
3950 /* Display the weight if needed */
3953 int wgt = o_ptr->weight * o_ptr->number;
3955 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
3957 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3960 prt(tmp_val, j + 1, wid - 9);
3964 /* Make a "shadow" below the list (only if needed) */
3965 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
3967 /* Save the new column */
3970 return target_item_label;
3976 * Display the equipment.
3978 int show_equip(int target_item)
3981 int col, cur_col, len;
3984 char o_name[MAX_NLEN];
3987 char out_desc[23][MAX_NLEN];
3988 int target_item_label = 0;
3990 char equip_label[52 + 1];
3992 /* Starting column */
3996 Term_get_size(&wid, &hgt);
3998 /* Maximal length */
3999 len = wid - col - 1;
4002 /* Scan the equipment list */
4003 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
4005 o_ptr = &inventory[i];
4007 /* Is this item acceptable? */
4008 if (!(select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr)) &&
4009 (!((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute) ||
4010 item_tester_no_ryoute)) continue;
4013 object_desc(o_name, o_ptr, 0);
4015 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
4018 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
4020 (void)strcpy(out_desc[k],"(wielding with two-hands)");
4022 out_color[k] = TERM_WHITE;
4026 (void)strcpy(out_desc[k], o_name);
4027 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4031 /* Grey out charging items */
4034 out_color[k] = TERM_L_DARK;
4037 /* Extract the maximal length (see below) */
4039 l = strlen(out_desc[k]) + (2 + 1);
4041 l = strlen(out_desc[k]) + (2 + 3);
4045 /* Increase length for labels (if needed) */
4047 if (show_labels) l += (7 + 2);
4049 if (show_labels) l += (14 + 2);
4053 /* Increase length for weight (if needed) */
4054 if (show_weights) l += 9;
4056 if (show_item_graph) l += 2;
4058 /* Maintain the max-length */
4059 if (l > len) len = l;
4061 /* Advance the entry */
4065 /* Hack -- Find a column to start in */
4067 col = (len > wid - 6) ? 0 : (wid - len - 1);
4069 col = (len > wid - 4) ? 0 : (wid - len - 1);
4072 prepare_label_string(equip_label, USE_EQUIP);
4074 /* Output each entry */
4075 for (j = 0; j < k; j++)
4081 o_ptr = &inventory[i];
4083 /* Clear the line */
4084 prt("", j + 1, col ? col - 2 : col);
4086 if (use_menu && target_item)
4088 if (j == (target_item-1))
4091 strcpy(tmp_val, "¡Õ");
4093 strcpy(tmp_val, "> ");
4095 target_item_label = i;
4097 else strcpy(tmp_val, " ");
4099 else if (i >= INVEN_RARM)
4101 /* Prepare an index --(-- */
4102 sprintf(tmp_val, "%c)", equip_label[i - INVEN_RARM]);
4106 /* Prepare an index --(-- */
4107 sprintf(tmp_val, "%c)", index_to_label(i));
4110 /* Clear the line with the (possibly indented) index */
4111 put_str(tmp_val, j+1, col);
4115 /* Display graphics for object, if desired */
4116 if (show_item_graph)
4118 byte a = object_attr(o_ptr);
4119 char c = object_char(o_ptr);
4122 if (a & 0x80) a |= 0x40;
4125 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
4126 if (use_bigtile) cur_col++;
4134 /* Mention the use */
4136 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
4138 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
4141 put_str(tmp_val, j+1, cur_col);
4143 /* Display the entry itself */
4145 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
4147 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
4154 /* Display the entry itself */
4155 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
4158 /* Display the weight if needed */
4161 int wgt = o_ptr->weight * o_ptr->number;
4163 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4165 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
4168 prt(tmp_val, j + 1, wid - 9);
4172 /* Make a "shadow" below the list (only if needed) */
4173 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4175 /* Save the new column */
4178 return target_item_label;
4185 * Flip "inven" and "equip" in any sub-windows
4187 void toggle_inven_equip(void)
4192 for (j = 0; j < 8; j++)
4195 if (!angband_term[j]) continue;
4197 /* Flip inven to equip */
4198 if (window_flag[j] & (PW_INVEN))
4201 window_flag[j] &= ~(PW_INVEN);
4202 window_flag[j] |= (PW_EQUIP);
4205 p_ptr->window |= (PW_EQUIP);
4208 /* Flip inven to equip */
4209 else if (window_flag[j] & (PW_EQUIP))
4212 window_flag[j] &= ~(PW_EQUIP);
4213 window_flag[j] |= (PW_INVEN);
4216 p_ptr->window |= (PW_INVEN);
4224 * Verify the choice of an item.
4226 * The item can be negative to mean "item on floor".
4228 static bool verify(cptr prompt, int item)
4230 char o_name[MAX_NLEN];
4231 char out_val[MAX_NLEN+20];
4238 o_ptr = &inventory[item];
4244 o_ptr = &o_list[0 - item];
4248 object_desc(o_name, o_ptr, 0);
4252 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
4254 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
4259 return (get_check(out_val));
4264 * Hack -- allow user to "prevent" certain choices
4266 * The item can be negative to mean "item on floor".
4268 static bool get_item_allow(int item)
4274 if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
4279 o_ptr = &inventory[item];
4285 o_ptr = &o_list[0 - item];
4288 /* No inscription */
4289 if (!o_ptr->inscription) return (TRUE);
4292 s = my_strchr(quark_str(o_ptr->inscription), '!');
4294 /* Process preventions */
4297 /* Check the "restriction" */
4298 if ((s[1] == command_cmd) || (s[1] == '*'))
4300 /* Verify the choice */
4302 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
4304 if (!verify("Really try", item)) return (FALSE);
4309 /* Find another '!' */
4310 s = my_strchr(s + 1, '!');
4320 * Auxiliary function for "get_item()" -- test an index
4322 static bool get_item_okay(int i)
4325 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
4327 if (select_ring_slot) return is_ring_slot(i);
4329 /* Verify the item */
4330 if (!item_tester_okay(&inventory[i])) return (FALSE);
4339 * Determine whether get_item() can get some item or not
4340 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
4342 bool can_get_item(void)
4344 int j, floor_list[23], floor_num = 0;
4346 for (j = 0; j < INVEN_TOTAL; j++)
4347 if (item_tester_okay(&inventory[j]))
4350 floor_num = scan_floor(floor_list, py, px, 0x03);
4358 * Let the user select an item, save its "index"
4360 * Return TRUE only if an acceptable item was chosen by the user.
4362 * The selected item must satisfy the "item_tester_hook()" function,
4363 * if that hook is set, and the "item_tester_tval", if that value is set.
4365 * All "item_tester" restrictions are cleared before this function returns.
4367 * The user is allowed to choose acceptable items from the equipment,
4368 * inventory, or floor, respectively, if the proper flag was given,
4369 * and there are any acceptable items in that location.
4371 * The equipment or inventory are displayed (even if no acceptable
4372 * items are in that location) if the proper flag was given.
4374 * If there are no acceptable items available anywhere, and "str" is
4375 * not NULL, then it will be used as the text of a warning message
4376 * before the function returns.
4378 * Note that the user must press "-" to specify the item on the floor,
4379 * and there is no way to "examine" the item on the floor, while the
4380 * use of "capital" letters will "examine" an inventory/equipment item,
4381 * and prompt for its use.
4383 * If a legal item is selected from the inventory, we save it in "cp"
4384 * directly (0 to 35), and return TRUE.
4386 * If a legal item is selected from the floor, we save it in "cp" as
4387 * a negative (-1 to -511), and return TRUE.
4389 * If no item is available, we do nothing to "cp", and we display a
4390 * warning message, using "str" if available, and return FALSE.
4392 * If no item is selected, we do nothing to "cp", and return FALSE.
4394 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
4395 * to allow the user to enter a command while viewing those screens, and
4396 * also to induce "auto-enter" of stores, and other such stuff.
4398 * Global "p_ptr->command_see" may be set before calling this function to start
4399 * out in "browse" mode. It is cleared before this function returns.
4401 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
4402 * If it is TRUE then we are viewing inventory, else equipment.
4404 * We always erase the prompt when we are done, leaving a blank line,
4405 * or a warning message, if appropriate, if no items are available.
4407 bool get_item(int *cp, cptr pmt, cptr str, int mode)
4409 s16b this_o_idx, next_o_idx = 0;
4413 int j, k, i1, i2, e1, e2;
4423 bool allow_floor = FALSE;
4425 bool toggle = FALSE;
4431 extern bool select_the_force;
4433 int menu_line = (use_menu ? 1 : 0);
4439 static char prev_tag = '\0';
4440 char cur_tag = '\0';
4442 #endif /* ALLOW_REPEAT */
4444 #ifdef ALLOW_EASY_FLOOR /* TNB */
4446 if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
4448 #endif /* ALLOW_EASY_FLOOR -- TNB */
4451 if (mode & USE_EQUIP) equip = TRUE;
4452 if (mode & USE_INVEN) inven = TRUE;
4453 if (mode & USE_FLOOR) floor = TRUE;
4457 /* Get the item index */
4458 if (repeat_pull(cp))
4461 if (select_the_force && (*cp == INVEN_FORCE))
4463 item_tester_tval = 0;
4464 item_tester_hook = NULL;
4465 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4470 else if (floor && (*cp < 0))
4477 /* Acquire object */
4480 /* Validate the item */
4481 if (item_tester_okay(o_ptr))
4483 /* Forget restrictions */
4484 item_tester_tval = 0;
4485 item_tester_hook = NULL;
4486 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4493 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
4494 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
4496 if (prev_tag && command_cmd)
4498 /* Look up the tag and validate the item */
4499 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
4500 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
4501 else if (!get_item_okay(k)) /* Reject */;
4504 /* Accept that choice */
4507 /* Forget restrictions */
4508 item_tester_tval = 0;
4509 item_tester_hook = NULL;
4510 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4516 prev_tag = '\0'; /* prev_tag is no longer effective */
4519 /* Verify the item */
4520 else if (get_item_okay(*cp))
4522 /* Forget restrictions */
4523 item_tester_tval = 0;
4524 item_tester_hook = NULL;
4525 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4533 #endif /* ALLOW_REPEAT */
4536 /* Paranoia XXX XXX XXX */
4543 /* No item selected */
4547 /* Full inventory */
4549 i2 = INVEN_PACK - 1;
4551 /* Forbid inventory */
4552 if (!inven) i2 = -1;
4555 for (j = 0; j < INVEN_PACK; j++)
4556 if (item_tester_okay(&inventory[j])) max_inven++;
4559 /* Restrict inventory indexes */
4560 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
4561 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
4564 /* Full equipment */
4566 e2 = INVEN_TOTAL - 1;
4568 /* Forbid equipment */
4569 if (!equip) e2 = -1;
4572 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
4573 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
4574 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
4577 /* Restrict equipment indexes */
4578 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
4579 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
4581 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
4585 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
4587 else if (p_ptr->hidarite) e1 = INVEN_RARM;
4591 /* Restrict floor usage */
4594 /* Scan all objects in the grid */
4595 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
4599 /* Acquire object */
4600 o_ptr = &o_list[this_o_idx];
4602 /* Acquire next object */
4603 next_o_idx = o_ptr->next_o_idx;
4605 /* Accept the item on the floor if legal */
4606 if (item_tester_okay(o_ptr) && (o_ptr->marked & OM_FOUND)) allow_floor = TRUE;
4610 /* Require at least one legal choice */
4611 if (!allow_floor && (i1 > i2) && (e1 > e2))
4613 /* Cancel p_ptr->command_see */
4614 command_see = FALSE;
4622 if (select_the_force) {
4628 /* Analyze choices */
4631 /* Hack -- Start on equipment if requested */
4632 if (command_see && command_wrk && equip)
4637 /* Use inventory if allowed */
4640 command_wrk = FALSE;
4643 /* Use equipment if allowed */
4649 /* Use inventory for floor */
4652 command_wrk = FALSE;
4658 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
4660 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
4662 /* Hack -- start out in "display" mode */
4670 /* Repeat until done */
4673 int get_item_label = 0;
4680 for (j = 0; j < 8; j++)
4683 if (!angband_term[j]) continue;
4685 /* Count windows displaying inven */
4686 if (window_flag[j] & (PW_INVEN)) ni++;
4688 /* Count windows displaying equip */
4689 if (window_flag[j] & (PW_EQUIP)) ne++;
4692 /* Toggle if needed */
4693 if ((command_wrk && ni && !ne) ||
4694 (!command_wrk && !ni && ne))
4697 toggle_inven_equip();
4704 p_ptr->window |= (PW_INVEN | PW_EQUIP);
4706 /* Redraw windows */
4710 /* Inventory screen */
4713 /* Redraw if needed */
4714 if (command_see) get_item_label = show_inven(menu_line);
4717 /* Equipment screen */
4720 /* Redraw if needed */
4721 if (command_see) get_item_label = show_equip(menu_line);
4724 /* Viewing inventory */
4727 /* Begin the prompt */
4729 sprintf(out_val, "»ý¤Áʪ:");
4731 sprintf(out_val, "Inven:");
4734 /* Some legal items */
4735 if ((i1 <= i2) && !use_menu)
4737 /* Build the prompt */
4739 sprintf(tmp_val, "%c-%c,'(',')',",
4741 sprintf(tmp_val, " %c-%c,'(',')',",
4743 index_to_label(i1), index_to_label(i2));
4746 strcat(out_val, tmp_val);
4749 /* Indicate ability to "view" */
4751 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
4753 if (!command_see && !use_menu) strcat(out_val, " * to see,");
4758 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
4760 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
4764 /* Viewing equipment */
4767 /* Begin the prompt */
4769 sprintf(out_val, "ÁõÈ÷ÉÊ:");
4771 sprintf(out_val, "Equip:");
4774 /* Some legal items */
4775 if ((e1 <= e2) && !use_menu)
4777 /* Build the prompt */
4779 sprintf(tmp_val, "%c-%c,'(',')',",
4781 sprintf(tmp_val, " %c-%c,'(',')',",
4783 index_to_label(e1), index_to_label(e2));
4786 strcat(out_val, tmp_val);
4789 /* Indicate ability to "view" */
4791 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
4793 if (!command_see) strcat(out_val, " * to see,");
4798 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
4800 if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
4804 /* Indicate legality of the "floor" item */
4806 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
4807 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
4809 if (allow_floor) strcat(out_val, " - for floor,");
4810 if (select_the_force) strcat(out_val, " w for the Force,");
4813 /* Finish the prompt */
4814 strcat(out_val, " ESC");
4816 /* Build the prompt */
4817 sprintf(tmp_val, "(%s) %s", out_val, pmt);
4819 /* Show the prompt */
4827 int max_line = (command_wrk ? max_equip : max_inven);
4843 menu_line += (max_line - 1);
4862 /* Verify legality */
4863 if (!inven || !equip)
4869 /* Hack -- Fix screen */
4879 /* Switch inven/equip */
4880 command_wrk = !command_wrk;
4881 max_line = (command_wrk ? max_equip : max_inven);
4882 if (menu_line > max_line) menu_line = max_line;
4884 /* Need to redraw */
4893 if (command_wrk == USE_FLOOR)
4896 (*cp) = -get_item_label;
4900 /* Validate the item */
4901 if (!get_item_okay(get_item_label))
4907 /* Allow player to "refuse" certain actions */
4908 if (!get_item_allow(get_item_label))
4914 /* Accept that choice */
4915 (*cp) = get_item_label;
4924 if (select_the_force) {
4932 if (menu_line > max_line) menu_line -= max_line;
4953 command_see = FALSE;
4973 /* Verify legality */
4974 if (!inven || !equip)
4980 /* Hack -- Fix screen */
4990 /* Switch inven/equip */
4991 command_wrk = !command_wrk;
4993 /* Need to redraw */
4999 /* Use floor item */
5002 /* Scan all objects in the grid */
5003 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
5007 /* Acquire object */
5008 o_ptr = &o_list[this_o_idx];
5010 /* Acquire next object */
5011 next_o_idx = o_ptr->next_o_idx;
5013 /* Validate the item */
5014 if (!item_tester_okay(o_ptr)) continue;
5019 /* Verify the item (if required) */
5021 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
5023 if (other_query_flag && !verify("Try", k)) continue;
5027 /* Allow player to "refuse" certain actions */
5028 if (!get_item_allow(k)) continue;
5030 /* Accept that choice */
5047 case '1': case '2': case '3':
5048 case '4': case '5': case '6':
5049 case '7': case '8': case '9':
5051 /* Look up the tag */
5052 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
5058 /* Hack -- Validate the item */
5059 if ((k < INVEN_RARM) ? !inven : !equip)
5065 /* Validate the item */
5066 if (!get_item_okay(k))
5072 /* Allow player to "refuse" certain actions */
5073 if (!get_item_allow(k))
5079 /* Accept that choice */
5085 #endif /* ALLOW_REPEAT */
5093 /* Choose "default" inventory item */
5096 k = ((i1 == i2) ? i1 : -1);
5099 /* Choose "default" equipment item */
5102 k = ((e1 == e2) ? e1 : -1);
5105 /* Validate the item */
5106 if (!get_item_okay(k))
5112 /* Allow player to "refuse" certain actions */
5113 if (!get_item_allow(k))
5119 /* Accept that choice */
5129 if (select_the_force) {
5142 bool not_found = FALSE;
5144 /* Look up the alphabetical tag */
5145 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
5150 /* Hack -- Validate the item */
5151 else if ((k < INVEN_RARM) ? !inven : !equip)
5156 /* Validate the item */
5157 else if (!get_item_okay(k))
5164 /* Accept that choice */
5170 #endif /* ALLOW_REPEAT */
5174 /* Extract "query" setting */
5175 ver = isupper(which);
5176 which = tolower(which);
5178 /* Convert letter to inventory index */
5181 if (which == '(') k = i1;
5182 else if (which == ')') k = i2;
5183 else k = label_to_inven(which);
5186 /* Convert letter to equipment index */
5189 if (which == '(') k = e1;
5190 else if (which == ')') k = e2;
5191 else k = label_to_equip(which);
5194 /* Validate the item */
5195 if (!get_item_okay(k))
5201 /* Verify the item */
5203 if (ver && !verify("ËÜÅö¤Ë", k))
5205 if (ver && !verify("Try", k))
5213 /* Allow player to "refuse" certain actions */
5214 if (!get_item_allow(k))
5220 /* Accept that choice */
5231 /* Fix the screen if necessary */
5237 /* Hack -- Cancel "display" */
5238 command_see = FALSE;
5242 /* Forget the item_tester_tval restriction */
5243 item_tester_tval = 0;
5245 item_tester_no_ryoute = FALSE;
5247 /* Forget the item_tester_hook restriction */
5248 item_tester_hook = NULL;
5251 /* Clean up 'show choices' */
5252 /* Toggle again if needed */
5253 if (toggle) toggle_inven_equip();
5256 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5262 /* Clear the prompt line */
5265 /* Warning if needed */
5266 if (oops && str) msg_print(str);
5272 if (command_cmd) prev_tag = cur_tag;
5273 #endif /* ALLOW_REPEAT */
5275 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5283 #ifdef ALLOW_EASY_FLOOR
5288 * Return a list of o_list[] indexes of items at the given cave
5289 * location. Valid flags are:
5291 * mode & 0x01 -- Item tester
5292 * mode & 0x02 -- Marked items only
5293 * mode & 0x04 -- Stop after first
5295 int scan_floor(int *items, int y, int x, int mode)
5297 int this_o_idx, next_o_idx;
5302 if (!in_bounds(y, x)) return 0;
5304 /* Scan all objects in the grid */
5305 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
5309 /* Acquire object */
5310 o_ptr = &o_list[this_o_idx];
5312 /* Acquire next object */
5313 next_o_idx = o_ptr->next_o_idx;
5316 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
5319 if ((mode & 0x02) && !(o_ptr->marked & OM_FOUND)) continue;
5321 /* Accept this item */
5322 /* XXX Hack -- Enforce limit */
5324 items[num] = this_o_idx;
5329 if (mode & 0x04) break;
5338 * Display a list of the items on the floor at the given location.
5340 int show_floor(int target_item, int y, int x, int *min_width)
5347 char o_name[MAX_NLEN];
5353 char out_desc[23][MAX_NLEN];
5354 int target_item_label = 0;
5356 int floor_list[23], floor_num;
5358 char floor_label[52 + 1];
5360 bool dont_need_to_show_weights = TRUE;
5363 Term_get_size(&wid, &hgt);
5365 /* Default length */
5366 len = MAX((*min_width), 20);
5369 /* Scan for objects in the grid, using item_tester_okay() */
5370 floor_num = scan_floor(floor_list, y, x, 0x03);
5372 /* Display the floor objects */
5373 for (k = 0, i = 0; i < floor_num && i < 23; i++)
5375 o_ptr = &o_list[floor_list[i]];
5377 /* Describe the object */
5378 object_desc(o_name, o_ptr, 0);
5380 /* Save the index */
5383 /* Acquire inventory color */
5384 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
5386 /* Save the object description */
5387 strcpy(out_desc[k], o_name);
5389 /* Find the predicted "line length" */
5390 l = strlen(out_desc[k]) + 5;
5392 /* Be sure to account for the weight */
5393 if (show_weights) l += 9;
5395 if (o_ptr->tval != TV_GOLD) dont_need_to_show_weights = FALSE;
5397 /* Maintain the maximum length */
5398 if (l > len) len = l;
5400 /* Advance to next "line" */
5404 if (show_weights && dont_need_to_show_weights) len -= 9;
5409 /* Find the column to start in */
5410 col = (len > wid - 4) ? 0 : (wid - len - 1);
5412 prepare_label_string_floor(floor_label, floor_list, floor_num);
5414 /* Output each entry */
5415 for (j = 0; j < k; j++)
5418 i = floor_list[out_index[j]];
5423 /* Clear the line */
5424 prt("", j + 1, col ? col - 2 : col);
5426 if (use_menu && target_item)
5428 if (j == (target_item-1))
5431 strcpy(tmp_val, "¡Õ");
5433 strcpy(tmp_val, "> ");
5435 target_item_label = i;
5437 else strcpy(tmp_val, " ");
5441 /* Prepare an index --(-- */
5442 sprintf(tmp_val, "%c)", floor_label[j]);
5445 /* Clear the line with the (possibly indented) index */
5446 put_str(tmp_val, j + 1, col);
5448 /* Display the entry itself */
5449 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
5451 /* Display the weight if needed */
5452 if (show_weights && (o_ptr->tval != TV_GOLD))
5454 int wgt = o_ptr->weight * o_ptr->number;
5456 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5458 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
5461 prt(tmp_val, j + 1, wid - 9);
5465 /* Make a "shadow" below the list (only if needed) */
5466 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5468 return target_item_label;
5472 * This version of get_item() is called by get_item() when
5473 * the easy_floor is on.
5475 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
5477 char n1 = ' ', n2 = ' ', which = ' ';
5479 int j, k, i1, i2, e1, e2;
5486 bool equip = (mode & USE_EQUIP) ? TRUE : FALSE;
5487 bool inven = (mode & USE_INVEN) ? TRUE : FALSE;
5488 bool floor = (mode & USE_FLOOR) ? TRUE : FALSE;
5490 bool allow_equip = FALSE;
5491 bool allow_inven = FALSE;
5492 bool allow_floor = FALSE;
5494 bool toggle = FALSE;
5499 int floor_num, floor_list[23], floor_top = 0;
5502 extern bool select_the_force;
5504 int menu_line = (use_menu ? 1 : 0);
5510 static char prev_tag = '\0';
5511 char cur_tag = '\0';
5513 /* Get the item index */
5514 if (repeat_pull(cp))
5517 if (select_the_force && (*cp == INVEN_FORCE))
5519 item_tester_tval = 0;
5520 item_tester_hook = NULL;
5521 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5526 else if (floor && (*cp < 0))
5528 if (prev_tag && command_cmd)
5530 /* Scan all objects in the grid */
5531 floor_num = scan_floor(floor_list, py, px, 0x03);
5533 /* Look up the tag */
5534 if (get_tag_floor(&k, prev_tag, floor_list, floor_num))
5536 /* Accept that choice */
5537 (*cp) = 0 - floor_list[k];
5539 /* Forget restrictions */
5540 item_tester_tval = 0;
5541 item_tester_hook = NULL;
5542 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5548 prev_tag = '\0'; /* prev_tag is no longer effective */
5551 /* Validate the item */
5552 else if (item_tester_okay(&o_list[0 - (*cp)]))
5554 /* Forget restrictions */
5555 item_tester_tval = 0;
5556 item_tester_hook = NULL;
5557 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5564 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
5565 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
5567 if (prev_tag && command_cmd)
5569 /* Look up the tag and validate the item */
5570 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
5571 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
5572 else if (!get_item_okay(k)) /* Reject */;
5575 /* Accept that choice */
5578 /* Forget restrictions */
5579 item_tester_tval = 0;
5580 item_tester_hook = NULL;
5581 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5587 prev_tag = '\0'; /* prev_tag is no longer effective */
5590 /* Verify the item */
5591 else if (get_item_okay(*cp))
5593 /* Forget restrictions */
5594 item_tester_tval = 0;
5595 item_tester_hook = NULL;
5596 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5604 #endif /* ALLOW_REPEAT */
5607 /* Paranoia XXX XXX XXX */
5614 /* No item selected */
5618 /* Full inventory */
5620 i2 = INVEN_PACK - 1;
5622 /* Forbid inventory */
5623 if (!inven) i2 = -1;
5626 for (j = 0; j < INVEN_PACK; j++)
5627 if (item_tester_okay(&inventory[j])) max_inven++;
5630 /* Restrict inventory indexes */
5631 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5632 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5635 /* Full equipment */
5637 e2 = INVEN_TOTAL - 1;
5639 /* Forbid equipment */
5640 if (!equip) e2 = -1;
5643 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5644 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
5645 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5648 /* Restrict equipment indexes */
5649 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5650 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5652 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
5656 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
5658 else if (p_ptr->hidarite) e1 = INVEN_RARM;
5662 /* Count "okay" floor items */
5665 /* Restrict floor usage */
5668 /* Scan all objects in the grid */
5669 floor_num = scan_floor(floor_list, py, px, 0x03);
5672 /* Accept inventory */
5673 if (i1 <= i2) allow_inven = TRUE;
5675 /* Accept equipment */
5676 if (e1 <= e2) allow_equip = TRUE;
5679 if (floor_num) allow_floor = TRUE;
5681 /* Require at least one legal choice */
5682 if (!allow_inven && !allow_equip && !allow_floor)
5684 /* Cancel p_ptr->command_see */
5685 command_see = FALSE;
5693 if (select_the_force) {
5699 /* Analyze choices */
5702 /* Hack -- Start on equipment if requested */
5703 if (command_see && (command_wrk == (USE_EQUIP))
5706 command_wrk = (USE_EQUIP);
5709 /* Use inventory if allowed */
5710 else if (allow_inven)
5712 command_wrk = (USE_INVEN);
5715 /* Use equipment if allowed */
5716 else if (allow_equip)
5718 command_wrk = (USE_EQUIP);
5721 /* Use floor if allowed */
5722 else if (allow_floor)
5724 command_wrk = (USE_FLOOR);
5729 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5731 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5733 /* Hack -- start out in "display" mode */
5740 /* Repeat until done */
5743 int get_item_label = 0;
5750 for (j = 0; j < 8; j++)
5753 if (!angband_term[j]) continue;
5755 /* Count windows displaying inven */
5756 if (window_flag[j] & (PW_INVEN)) ni++;
5758 /* Count windows displaying equip */
5759 if (window_flag[j] & (PW_EQUIP)) ne++;
5762 /* Toggle if needed */
5763 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
5764 (command_wrk == (USE_INVEN) && !ni && ne))
5767 toggle_inven_equip();
5774 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5776 /* Redraw windows */
5779 /* Inventory screen */
5780 if (command_wrk == (USE_INVEN))
5782 /* Extract the legal requests */
5786 /* Redraw if needed */
5787 if (command_see) get_item_label = show_inven(menu_line);
5790 /* Equipment screen */
5791 else if (command_wrk == (USE_EQUIP))
5793 /* Extract the legal requests */
5794 n1 = I2A(e1 - INVEN_RARM);
5795 n2 = I2A(e2 - INVEN_RARM);
5797 /* Redraw if needed */
5798 if (command_see) get_item_label = show_equip(menu_line);
5802 else if (command_wrk == (USE_FLOOR))
5805 k = MIN(floor_top + 23, floor_num) - 1;
5807 /* Extract the legal requests */
5808 n1 = I2A(j - floor_top);
5809 n2 = I2A(k - floor_top);
5811 /* Redraw if needed */
5812 if (command_see) get_item_label = show_floor(menu_line, py, px, &min_width);
5815 /* Viewing inventory */
5816 if (command_wrk == (USE_INVEN))
5818 /* Begin the prompt */
5820 sprintf(out_val, "»ý¤Áʪ:");
5822 sprintf(out_val, "Inven:");
5827 /* Build the prompt */
5829 sprintf(tmp_val, "%c-%c,'(',')',",
5831 sprintf(tmp_val, " %c-%c,'(',')',",
5833 index_to_label(i1), index_to_label(i2));
5836 strcat(out_val, tmp_val);
5839 /* Indicate ability to "view" */
5841 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5843 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5851 strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
5852 else if (allow_floor)
5853 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
5855 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
5858 strcat(out_val, " / for Equip,");
5859 else if (allow_floor)
5860 strcat(out_val, " 6 for Equip,");
5862 strcat(out_val, " 4 or 6 for Equip,");
5871 strcat(out_val, " '-'¾²¾å,");
5872 else if (allow_equip)
5873 strcat(out_val, " '4' ¾²¾å,");
5875 strcat(out_val, " '4'or'6' ¾²¾å,");
5878 strcat(out_val, " - for floor,");
5879 else if (allow_equip)
5880 strcat(out_val, " 4 for floor,");
5882 strcat(out_val, " 4 or 6 for floor,");
5887 /* Viewing equipment */
5888 else if (command_wrk == (USE_EQUIP))
5890 /* Begin the prompt */
5892 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5894 sprintf(out_val, "Equip:");
5899 /* Build the prompt */
5901 sprintf(tmp_val, "%c-%c,'(',')',",
5903 sprintf(tmp_val, " %c-%c,'(',')',",
5905 index_to_label(e1), index_to_label(e2));
5908 strcat(out_val, tmp_val);
5911 /* Indicate ability to "view" */
5913 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5915 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5923 strcat(out_val, " '/' »ý¤Áʪ,");
5924 else if (allow_floor)
5925 strcat(out_val, " '4' »ý¤Áʪ,");
5927 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
5930 strcat(out_val, " / for Inven,");
5931 else if (allow_floor)
5932 strcat(out_val, " 4 for Inven,");
5934 strcat(out_val, " 4 or 6 for Inven,");
5943 strcat(out_val, " '-'¾²¾å,");
5944 else if (allow_inven)
5945 strcat(out_val, " '6' ¾²¾å,");
5947 strcat(out_val, " '4'or'6' ¾²¾å,");
5950 strcat(out_val, " - for floor,");
5951 else if (allow_inven)
5952 strcat(out_val, " 6 for floor,");
5954 strcat(out_val, " 4 or 6 for floor,");
5960 else if (command_wrk == (USE_FLOOR))
5962 /* Begin the prompt */
5964 sprintf(out_val, "¾²¾å:");
5966 sprintf(out_val, "Floor:");
5971 /* Build the prompt */
5973 sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
5975 sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
5979 strcat(out_val, tmp_val);
5982 /* Indicate ability to "view" */
5984 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5986 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5991 if (allow_inven && allow_equip)
5994 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
5996 strcat(out_val, " 4 for Equip, 6 for Inven,");
5999 else if (allow_inven)
6002 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
6004 strcat(out_val, " 4 or 6 for Inven,");
6007 else if (allow_equip)
6010 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6012 strcat(out_val, " 4 or 6 for Equip,");
6017 else if (allow_inven)
6020 strcat(out_val, " '/' »ý¤Áʪ,");
6022 strcat(out_val, " / for Inven,");
6025 else if (allow_equip)
6028 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6030 strcat(out_val, " / for Equip,");
6035 if (command_see && !use_menu)
6038 strcat(out_val, " Enter ¼¡,");
6040 strcat(out_val, " Enter for scroll down,");
6047 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
6049 if (select_the_force) strcat(out_val, " w for the Force,");
6052 /* Finish the prompt */
6053 strcat(out_val, " ESC");
6055 /* Build the prompt */
6056 sprintf(tmp_val, "(%s) %s", out_val, pmt);
6058 /* Show the prompt */
6067 if (command_wrk == USE_INVEN) max_line = max_inven;
6068 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6069 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6085 menu_line += (max_line - 1);
6101 /* Verify legality */
6102 if (command_wrk == (USE_INVEN))
6104 if (allow_floor) command_wrk = USE_FLOOR;
6105 else if (allow_equip) command_wrk = USE_EQUIP;
6112 else if (command_wrk == (USE_EQUIP))
6114 if (allow_inven) command_wrk = USE_INVEN;
6115 else if (allow_floor) command_wrk = USE_FLOOR;
6122 else if (command_wrk == (USE_FLOOR))
6124 if (allow_equip) command_wrk = USE_EQUIP;
6125 else if (allow_inven) command_wrk = USE_INVEN;
6138 /* Hack -- Fix screen */
6148 /* Switch inven/equip */
6149 if (command_wrk == USE_INVEN) max_line = max_inven;
6150 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6151 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6152 if (menu_line > max_line) menu_line = max_line;
6154 /* Need to redraw */
6162 /* Verify legality */
6163 if (command_wrk == (USE_INVEN))
6165 if (allow_equip) command_wrk = USE_EQUIP;
6166 else if (allow_floor) command_wrk = USE_FLOOR;
6173 else if (command_wrk == (USE_EQUIP))
6175 if (allow_floor) command_wrk = USE_FLOOR;
6176 else if (allow_inven) command_wrk = USE_INVEN;
6183 else if (command_wrk == (USE_FLOOR))
6185 if (allow_inven) command_wrk = USE_INVEN;
6186 else if (allow_equip) command_wrk = USE_EQUIP;
6199 /* Hack -- Fix screen */
6209 /* Switch inven/equip */
6210 if (command_wrk == USE_INVEN) max_line = max_inven;
6211 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6212 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6213 if (menu_line > max_line) menu_line = max_line;
6215 /* Need to redraw */
6224 if (command_wrk == USE_FLOOR)
6227 (*cp) = -get_item_label;
6231 /* Validate the item */
6232 if (!get_item_okay(get_item_label))
6238 /* Allow player to "refuse" certain actions */
6239 if (!get_item_allow(get_item_label))
6245 /* Accept that choice */
6246 (*cp) = get_item_label;
6255 if (select_the_force) {
6263 if (menu_line > max_line) menu_line -= max_line;
6284 command_see = FALSE;
6307 cave_type *c_ptr = &cave[py][px];
6309 if (command_wrk != (USE_FLOOR)) break;
6311 /* Get the object being moved. */
6312 o_idx = c_ptr->o_idx;
6314 /* Only rotate a pile of two or more objects. */
6315 if (!(o_idx && o_list[o_idx].next_o_idx)) break;
6317 /* Remove the first object from the list. */
6318 excise_object_idx(o_idx);
6320 /* Find end of the list. */
6322 while (o_list[i].next_o_idx)
6323 i = o_list[i].next_o_idx;
6325 /* Add after the last object. */
6326 o_list[i].next_o_idx = o_idx;
6328 /* Re-scan floor list */
6329 floor_num = scan_floor(floor_list, py, px, 0x03);
6331 /* Hack -- Fix screen */
6346 if (command_wrk == (USE_INVEN))
6353 command_wrk = (USE_EQUIP);
6355 else if (command_wrk == (USE_EQUIP))
6362 command_wrk = (USE_INVEN);
6364 else if (command_wrk == (USE_FLOOR))
6368 command_wrk = (USE_INVEN);
6370 else if (allow_equip)
6372 command_wrk = (USE_EQUIP);
6381 /* Hack -- Fix screen */
6391 /* Need to redraw */
6404 * If we are already examining the floor, and there
6405 * is only one item, we will always select it.
6406 * If we aren't examining the floor and there is only
6407 * one item, we will select it if floor_query_flag
6412 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
6415 k = 0 - floor_list[0];
6417 /* Allow player to "refuse" certain actions */
6418 if (!get_item_allow(k))
6424 /* Accept that choice */
6433 /* Hack -- Fix screen */
6443 command_wrk = (USE_FLOOR);
6449 case '1': case '2': case '3':
6450 case '4': case '5': case '6':
6451 case '7': case '8': case '9':
6453 if (command_wrk != USE_FLOOR)
6455 /* Look up the tag */
6456 if (!get_tag(&k, which, command_wrk))
6462 /* Hack -- Validate the item */
6463 if ((k < INVEN_RARM) ? !inven : !equip)
6469 /* Validate the item */
6470 if (!get_item_okay(k))
6478 /* Look up the alphabetical tag */
6479 if (get_tag_floor(&k, which, floor_list, floor_num))
6482 k = 0 - floor_list[k];
6491 /* Allow player to "refuse" certain actions */
6492 if (!get_item_allow(k))
6498 /* Accept that choice */
6504 #endif /* ALLOW_REPEAT */
6512 /* Choose "default" inventory item */
6513 if (command_wrk == (USE_INVEN))
6515 k = ((i1 == i2) ? i1 : -1);
6518 /* Choose "default" equipment item */
6519 else if (command_wrk == (USE_EQUIP))
6521 k = ((e1 == e2) ? e1 : -1);
6524 /* Choose "default" floor item */
6525 else if (command_wrk == (USE_FLOOR))
6530 k = 0 - floor_list[0];
6532 /* Allow player to "refuse" certain actions */
6533 if (!get_item_allow(k))
6539 /* Accept that choice */
6547 /* Validate the item */
6548 if (!get_item_okay(k))
6554 /* Allow player to "refuse" certain actions */
6555 if (!get_item_allow(k))
6561 /* Accept that choice */
6571 if (select_the_force) {
6585 if (command_wrk != USE_FLOOR)
6587 bool not_found = FALSE;
6589 /* Look up the alphabetical tag */
6590 if (!get_tag(&k, which, command_wrk))
6595 /* Hack -- Validate the item */
6596 else if ((k < INVEN_RARM) ? !inven : !equip)
6601 /* Validate the item */
6602 else if (!get_item_okay(k))
6609 /* Accept that choice */
6615 #endif /* ALLOW_REPEAT */
6621 /* Look up the alphabetical tag */
6622 if (get_tag_floor(&k, which, floor_list, floor_num))
6625 k = 0 - floor_list[k];
6627 /* Accept that choice */
6633 #endif /* ALLOW_REPEAT */
6638 /* Extract "query" setting */
6639 ver = isupper(which);
6640 which = tolower(which);
6642 /* Convert letter to inventory index */
6643 if (command_wrk == (USE_INVEN))
6645 if (which == '(') k = i1;
6646 else if (which == ')') k = i2;
6647 else k = label_to_inven(which);
6650 /* Convert letter to equipment index */
6651 else if (command_wrk == (USE_EQUIP))
6653 if (which == '(') k = e1;
6654 else if (which == ')') k = e2;
6655 else k = label_to_equip(which);
6658 /* Convert letter to floor index */
6659 else if (command_wrk == USE_FLOOR)
6661 if (which == '(') k = 0;
6662 else if (which == ')') k = floor_num - 1;
6663 else k = islower(which) ? A2I(which) : -1;
6664 if (k < 0 || k >= floor_num || k >= 23)
6671 k = 0 - floor_list[k];
6674 /* Validate the item */
6675 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
6681 /* Verify the item */
6683 if (ver && !verify("ËÜÅö¤Ë", k))
6685 if (ver && !verify("Try", k))
6693 /* Allow player to "refuse" certain actions */
6694 if (!get_item_allow(k))
6700 /* Accept that choice */
6710 /* Fix the screen if necessary */
6716 /* Hack -- Cancel "display" */
6717 command_see = FALSE;
6721 /* Forget the item_tester_tval restriction */
6722 item_tester_tval = 0;
6724 /* Forget the item_tester_hook restriction */
6725 item_tester_hook = NULL;
6728 /* Clean up 'show choices' */
6729 /* Toggle again if needed */
6730 if (toggle) toggle_inven_equip();
6733 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6739 /* Clear the prompt line */
6742 /* Warning if needed */
6743 if (oops && str) msg_print(str);
6749 if (command_cmd) prev_tag = cur_tag;
6750 #endif /* ALLOW_REPEAT */
6752 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6760 static bool py_pickup_floor_aux(void)
6768 /* Restrict the choices */
6769 item_tester_hook = inven_carry_okay;
6773 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
6774 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
6776 q = "Get which item? ";
6777 s = "You no longer have any room for the objects on the floor.";
6780 if (get_item(&item, q, s, (USE_FLOOR)))
6782 this_o_idx = 0 - item;
6789 /* Pick up the object */
6790 py_pickup_aux(this_o_idx);
6797 * Make the player carry everything in a grid
6799 * If "pickup" is FALSE then only gold will be picked up
6801 * This is called by py_pickup() when easy_floor is TRUE.
6803 void py_pickup_floor(bool pickup)
6805 s16b this_o_idx, next_o_idx = 0;
6807 char o_name[MAX_NLEN];
6810 int floor_num = 0, floor_list[23], floor_o_idx = 0;
6814 /* Scan the pile of objects */
6815 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
6819 /* Access the object */
6820 o_ptr = &o_list[this_o_idx];
6822 /* Describe the object */
6823 object_desc(o_name, o_ptr, 0);
6825 /* Access the next object */
6826 next_o_idx = o_ptr->next_o_idx;
6828 /* Hack -- disturb */
6832 if (o_ptr->tval == TV_GOLD)
6836 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
6837 (long)o_ptr->pval, o_name);
6839 msg_format("You have found %ld gold pieces worth of %s.",
6840 (long) o_ptr->pval, o_name);
6844 /* Collect the gold */
6845 p_ptr->au += o_ptr->pval;
6848 p_ptr->redraw |= (PR_GOLD);
6851 p_ptr->window |= (PW_PLAYER);
6853 /* Delete the gold */
6854 delete_object_idx(this_o_idx);
6856 /* Check the next object */
6859 else if (o_ptr->marked & OM_NOMSG)
6861 /* If 0 or 1 non-NOMSG items are in the pile, the NOMSG ones are
6862 * ignored. Otherwise, they are included in the prompt. */
6863 o_ptr->marked &= ~(OM_NOMSG);
6867 /* Count non-gold objects that can be picked up. */
6868 if (inven_carry_okay(o_ptr))
6873 /* Remember this object index */
6875 floor_list[floor_num] = this_o_idx;
6877 /* Count non-gold objects */
6880 /* Remember this index */
6881 floor_o_idx = this_o_idx;
6884 /* There are no non-gold objects */
6888 /* Mention the number of objects */
6894 /* Access the object */
6895 o_ptr = &o_list[floor_o_idx];
6897 #ifdef ALLOW_EASY_SENSE
6899 /* Option: Make object sensing easy */
6902 /* Sense the object */
6903 (void) sense_object(o_ptr);
6906 #endif /* ALLOW_EASY_SENSE */
6908 /* Describe the object */
6909 object_desc(o_name, o_ptr, 0);
6913 msg_format("%s¤¬¤¢¤ë¡£", o_name);
6915 msg_format("You see %s.", o_name);
6920 /* Multiple objects */
6925 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
6927 msg_format("You see a pile of %d items.", floor_num);
6936 /* The player has no room for anything on the floor. */
6942 /* Access the object */
6943 o_ptr = &o_list[floor_o_idx];
6945 #ifdef ALLOW_EASY_SENSE
6947 /* Option: Make object sensing easy */
6950 /* Sense the object */
6951 (void) sense_object(o_ptr);
6954 #endif /* ALLOW_EASY_SENSE */
6956 /* Describe the object */
6957 object_desc(o_name, o_ptr, 0);
6961 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
6963 msg_format("You have no room for %s.", o_name);
6968 /* Multiple objects */
6973 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
6975 msg_print("You have no room for any of the objects on the floor.");
6987 /* Hack -- query every object */
6988 if (carry_query_flag)
6990 char out_val[MAX_NLEN+20];
6992 /* Access the object */
6993 o_ptr = &o_list[floor_o_idx];
6995 #ifdef ALLOW_EASY_SENSE
6997 /* Option: Make object sensing easy */
7000 /* Sense the object */
7001 (void) sense_object(o_ptr);
7004 #endif /* ALLOW_EASY_SENSE */
7006 /* Describe the object */
7007 object_desc(o_name, o_ptr, 0);
7009 /* Build a prompt */
7011 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7013 (void) sprintf(out_val, "Pick up %s? ", o_name);
7017 /* Ask the user to confirm */
7018 if (!get_check(out_val))
7025 /* Access the object */
7026 o_ptr = &o_list[floor_o_idx];
7028 #ifdef ALLOW_EASY_SENSE
7030 /* Option: Make object sensing easy */
7033 /* Sense the object */
7034 (void) sense_object(o_ptr);
7037 #endif /* ALLOW_EASY_SENSE */
7039 /* Pick up the object */
7040 py_pickup_aux(floor_o_idx);
7043 /* Allow the user to choose an object */
7046 while (can_pickup--)
7048 if (!py_pickup_floor_aux()) break;
7053 #endif /* ALLOW_EASY_FLOOR */