4 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
6 * This software may be copied and distributed for educational, research,
7 * and not for profit purposes provided that this copyright and statement
8 * are included in all such copies. Other copyrights may also apply.
11 /* Purpose: Object code, part 1 */
15 #if defined(MACINTOSH) || defined(MACH_O_CARBON)
21 * Reset the "visual" lists
23 * This involves resetting various things to their "default" state.
25 * If the "prefs" flag is TRUE, then we will also load the appropriate
26 * "user pref file" based on the current setting of the "use_graphics"
27 * flag. This is useful for switching "graphics" on/off.
29 * The features, objects, and monsters, should all be encoded in the
30 * relevant "font.pref" and/or "graf.prf" files. XXX XXX XXX
32 * The "prefs" parameter is no longer meaningful. XXX XXX XXX
34 void reset_visuals(void)
38 /* Extract some info about terrain features */
39 for (i = 0; i < max_f_idx; i++)
41 feature_type *f_ptr = &f_info[i];
43 /* Assume we will use the underlying values */
44 for (j = 0; j < F_LIT_MAX; j++)
46 f_ptr->x_attr[j] = f_ptr->d_attr[j];
47 f_ptr->x_char[j] = f_ptr->d_char[j];
51 /* Extract default attr/char code for objects */
52 for (i = 0; i < max_k_idx; i++)
54 object_kind *k_ptr = &k_info[i];
56 /* Default attr/char */
57 k_ptr->x_attr = k_ptr->d_attr;
58 k_ptr->x_char = k_ptr->d_char;
61 /* Extract default attr/char code for monsters */
62 for (i = 0; i < max_r_idx; i++)
64 monster_race *r_ptr = &r_info[i];
66 /* Default attr/char */
67 r_ptr->x_attr = r_ptr->d_attr;
68 r_ptr->x_char = r_ptr->d_char;
75 /* Process "graf.prf" */
76 process_pref_file("graf.prf");
78 /* Access the "character" pref file */
79 sprintf(buf, "graf-%s.prf", player_base);
81 /* Process "graf-<playername>.prf" */
82 process_pref_file(buf);
90 /* Process "font.prf" */
91 process_pref_file("font.prf");
93 /* Access the "character" pref file */
94 sprintf(buf, "font-%s.prf", player_base);
96 /* Process "font-<playername>.prf" */
97 process_pref_file(buf);
103 * Obtain the "flags" for an item
105 void object_flags(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
107 object_kind *k_ptr = &k_info[o_ptr->k_idx];
111 for (i = 0; i < TR_FLAG_SIZE; i++)
112 flgs[i] = k_ptr->flags[i];
115 if (object_is_fixed_artifact(o_ptr))
117 artifact_type *a_ptr = &a_info[o_ptr->name1];
119 for (i = 0; i < TR_FLAG_SIZE; i++)
120 flgs[i] = a_ptr->flags[i];
124 if (object_is_ego(o_ptr))
126 ego_item_type *e_ptr = &e_info[o_ptr->name2];
128 for (i = 0; i < TR_FLAG_SIZE; i++)
129 flgs[i] |= e_ptr->flags[i];
131 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
133 remove_flag(flgs, TR_SH_FIRE);
135 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
137 remove_flag(flgs, TR_INFRA);
139 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
141 remove_flag(flgs, TR_RES_BLIND);
142 remove_flag(flgs, TR_SEE_INVIS);
146 /* Random artifact ! */
147 for (i = 0; i < TR_FLAG_SIZE; i++)
148 flgs[i] |= o_ptr->art_flags[i];
150 if (object_is_smith(o_ptr))
152 int add = o_ptr->xtra3 - 1;
154 if (add < TR_FLAG_MAX)
158 else if (add == ESSENCE_TMP_RES_ACID)
160 add_flag(flgs, TR_RES_ACID);
161 add_flag(flgs, TR_ACTIVATE);
163 else if (add == ESSENCE_TMP_RES_ELEC)
165 add_flag(flgs, TR_RES_ELEC);
166 add_flag(flgs, TR_ACTIVATE);
168 else if (add == ESSENCE_TMP_RES_FIRE)
170 add_flag(flgs, TR_RES_FIRE);
171 add_flag(flgs, TR_ACTIVATE);
173 else if (add == ESSENCE_TMP_RES_COLD)
175 add_flag(flgs, TR_RES_COLD);
176 add_flag(flgs, TR_ACTIVATE);
178 else if (add == ESSENCE_SH_FIRE)
180 add_flag(flgs, TR_RES_FIRE);
181 add_flag(flgs, TR_SH_FIRE);
183 else if (add == ESSENCE_SH_ELEC)
185 add_flag(flgs, TR_RES_ELEC);
186 add_flag(flgs, TR_SH_ELEC);
188 else if (add == ESSENCE_SH_COLD)
190 add_flag(flgs, TR_RES_COLD);
191 add_flag(flgs, TR_SH_COLD);
193 else if (add == ESSENCE_RESISTANCE)
195 add_flag(flgs, TR_RES_ACID);
196 add_flag(flgs, TR_RES_ELEC);
197 add_flag(flgs, TR_RES_FIRE);
198 add_flag(flgs, TR_RES_COLD);
200 else if (add == TR_IMPACT)
202 add_flag(flgs, TR_ACTIVATE);
210 * Obtain the "flags" for an item which are known to the player
212 void object_flags_known(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
217 object_kind *k_ptr = &k_info[o_ptr->k_idx];
220 for (i = 0; i < TR_FLAG_SIZE; i++)
223 if (!object_is_aware(o_ptr)) return;
226 for (i = 0; i < TR_FLAG_SIZE; i++)
227 flgs[i] = k_ptr->flags[i];
229 /* Must be identified */
230 if (!object_is_known(o_ptr)) return;
232 /* Ego-item (known basic flags) */
233 if (object_is_ego(o_ptr))
235 ego_item_type *e_ptr = &e_info[o_ptr->name2];
237 for (i = 0; i < TR_FLAG_SIZE; i++)
238 flgs[i] |= e_ptr->flags[i];
240 if ((o_ptr->name2 == EGO_LITE_AURA_FIRE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
242 remove_flag(flgs, TR_SH_FIRE);
244 else if ((o_ptr->name2 == EGO_LITE_INFRA) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
246 remove_flag(flgs, TR_INFRA);
248 else if ((o_ptr->name2 == EGO_LITE_EYE) && !o_ptr->xtra4 && (o_ptr->sval <= SV_LITE_LANTERN))
250 remove_flag(flgs, TR_RES_BLIND);
251 remove_flag(flgs, TR_SEE_INVIS);
256 #ifdef SPOIL_ARTIFACTS
257 /* Full knowledge for some artifacts */
258 if (object_is_artifact(o_ptr)) spoil = TRUE;
259 #endif /* SPOIL_ARTIFACTS */
261 #ifdef SPOIL_EGO_ITEMS
262 /* Full knowledge for some ego-items */
263 if (object_is_ego(o_ptr)) spoil = TRUE;
264 #endif /* SPOIL_EGO_ITEMS */
266 /* Need full knowledge or spoilers */
267 if (spoil || (o_ptr->ident & IDENT_MENTAL))
270 if (object_is_fixed_artifact(o_ptr))
272 artifact_type *a_ptr = &a_info[o_ptr->name1];
274 for (i = 0; i < TR_FLAG_SIZE; i++)
275 flgs[i] = a_ptr->flags[i];
278 /* Random artifact ! */
279 for (i = 0; i < TR_FLAG_SIZE; i++)
280 flgs[i] |= o_ptr->art_flags[i];
283 if (object_is_smith(o_ptr))
285 int add = o_ptr->xtra3 - 1;
287 if (add < TR_FLAG_MAX)
291 else if (add == ESSENCE_TMP_RES_ACID)
293 add_flag(flgs, TR_RES_ACID);
295 else if (add == ESSENCE_TMP_RES_ELEC)
297 add_flag(flgs, TR_RES_ELEC);
299 else if (add == ESSENCE_TMP_RES_FIRE)
301 add_flag(flgs, TR_RES_FIRE);
303 else if (add == ESSENCE_TMP_RES_COLD)
305 add_flag(flgs, TR_RES_COLD);
307 else if (add == ESSENCE_SH_FIRE)
309 add_flag(flgs, TR_RES_FIRE);
310 add_flag(flgs, TR_SH_FIRE);
312 else if (add == ESSENCE_SH_ELEC)
314 add_flag(flgs, TR_RES_ELEC);
315 add_flag(flgs, TR_SH_ELEC);
317 else if (add == ESSENCE_SH_COLD)
319 add_flag(flgs, TR_RES_COLD);
320 add_flag(flgs, TR_SH_COLD);
322 else if (add == ESSENCE_RESISTANCE)
324 add_flag(flgs, TR_RES_ACID);
325 add_flag(flgs, TR_RES_ELEC);
326 add_flag(flgs, TR_RES_FIRE);
327 add_flag(flgs, TR_RES_COLD);
334 * Determine the "Activation" (if any) for an artifact
335 * Return a string, or NULL for "no activation"
337 cptr item_activation(object_type *o_ptr)
339 u32b flgs[TR_FLAG_SIZE];
341 /* Extract the flags */
342 object_flags(o_ptr, flgs);
344 /* Require activation ability */
346 if (!(have_flag(flgs, TR_ACTIVATE))) return ("¤Ê¤·");
348 if (!(have_flag(flgs, TR_ACTIVATE))) return ("nothing");
352 * We need to deduce somehow that it is a random artifact -- one
353 * problem: It could be a random artifact which has NOT YET received
354 * a name. Thus we eliminate other possibilities instead of checking
358 if (object_is_fixed_artifact(o_ptr))
360 if (!o_ptr->xtra2) o_ptr->xtra2 = a_info[o_ptr->name1].act_idx;
363 if ((object_is_artifact(o_ptr) || object_is_ego(o_ptr)) &&
366 switch (o_ptr->xtra2)
369 /* General activation */
372 return "ÂÀÍÛ¸÷Àþ : 10 ¥¿¡¼¥óËè";
374 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
376 return "°½±À (12) : 4+d4 ¥¿¡¼¥óËè";
378 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
380 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
382 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
384 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
386 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (48) : 6+d6 ¥¿¡¼¥óËè";
388 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (72) : 9+d9 ¥¿¡¼¥óËè";
390 return "Ã⩹¶·â(100) : 100+d100 ¥¿¡¼¥óËè";
392 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 12+d12 ¥¿¡¼¥óËè";
394 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 12+d12 ¥¿¡¼¥óËè";
396 return "À¸Ì¿Îϵۼý(120) : 400 ¥¿¡¼¥óËè";
398 return "µÛ·ì¥É¥ì¥¤¥ó (3*50) : 400 ¥¿¡¼¥óËè";
400 return "Ìð (150) : 90+d90 ¥¿¡¼¥óËè";
402 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (300) : 225+d225 ¥¿¡¼¥óËè";
404 return "µðÂ祢¥¤¥¹¡¦¥Ü¡¼¥ë (400) : 325+d325 ¥¿¡¼¥óËè";
406 return "µðÂ祵¥ó¥À¡¼¡¦¥Ü¡¼¥ë (500) : 425+d425 ¥¿¡¼¥óËè";
408 return "¥«¥Þ¥¤¥¿¥Á : 250 ¥¿¡¼¥óËè";
410 return "µÛ·ì¥É¥ì¥¤¥ó (3*100) : 400 ¥¿¡¼¥óËè";
412 return "º®ÆÙ¾¤Íè : 350 ¥¿¡¼¥óËè"; /*nuke me*/
414 return "¥í¥±¥Ã¥È (120+level) : 400 ¥¿¡¼¥óËè";
416 return "¼Ù°Â໶ (x5) : 100+d100 ¥¿¡¼¥óËè";
418 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300) : 500 ¥¿¡¼¥óËè";
420 return "Á±ÎÉÂ໶ (x5) : 100+d100 ¥¿¡¼¥óËè";
422 return "ËâË¡¤ÎÌð(150) : 90+d90 ¥¿¡¼¥óËè";
424 return "µðÂç¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë(120) : 15 ¥¿¡¼¥óËè";
426 return "¥¦¥©¡¼¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 250 ¥¿¡¼¥óËè";
428 return "µðÂ祹¥¿¡¼¡¦¥Ü¡¼¥ë(200) : 200+d200 ¥¿¡¼¥óËè";
430 return "°Å¹õ¤ÎÍò(250) : 150+d150 ¥¿¡¼¥óËè";
432 return "ËâÎϤÎÍò(400) : 250+d250¥¿¡¼¥óËè";
434 return "³²Ãî¤Î¶î½ü : 55+d55¥¿¡¼¥óËè";
435 case ACT_BLINDING_LIGHT:
436 return "âÁ¤·¤¤¸÷ : 250 ¥¿¡¼¥óËè";
438 return "¿®¤¸Æñ¤¤¤³¤È : 450+d450 ¥¿¡¼¥óËè";
439 case ACT_CAST_BA_STAR:
440 return "¥¹¥¿¡¼¡¦¥Ü¡¼¥ë¡¦¥À¥¹¥È(150) : 1000 ¥¿¡¼¥óËè";
441 case ACT_BLADETURNER:
442 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹ (300), »Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢ÂÑÀ";
444 return "¥Ñ¥Ë¥Ã¥¯¡¦¥â¥ó¥¹¥¿¡¼ : 15 ¥¿¡¼¥óËè";
446 return "¼þ°Ï¤Î¥â¥ó¥¹¥¿¡¼¤ò̲¤é¤»¤ë : 55 ¥¿¡¼¥óËè";
448 return "ÃÏ¿Ì (Ⱦ·Â 10) : 50 ¥¿¡¼¥óËè";
450 return "¶²¹² : 3 * (level+10) ¥¿¡¼¥óËè";
452 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
453 case ACT_BANISH_EVIL:
454 return "¼Ù°¾ÃÌÇ : 250+d250 ¥¿¡¼¥óËè";
456 return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
458 return "¼þÊÕËõ»¦ : 1000 ¥¿¡¼¥óËè";
460 return "¥â¥ó¥¹¥¿¡¼¶²¹² : 40+d40¥¿¡¼¥óËè";
462 if (o_ptr->name1 == ART_HYOUSIGI) return "Çï»ÒÌÚ¤òÂǤÁ¤Ê¤é¤¹ : ¤¤¤Ä¤Ç¤â";
463 return "¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë : ¤¤¤Ä¤Ç¤â";
464 case ACT_CHARM_ANIMAL:
465 return "ưʪ̥λ : 200 ¥¿¡¼¥óËè";
466 case ACT_CHARM_UNDEAD:
467 return "¥¢¥ó¥Ç¥Ã¥É½¾Â° : 333 ¥¿¡¼¥óËè";
468 case ACT_CHARM_OTHER:
469 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 400 ¥¿¡¼¥óËè";
470 case ACT_CHARM_ANIMALS:
471 return "ưʪͧÏ : 500 ¥¿¡¼¥óËè";
472 case ACT_CHARM_OTHERS:
473 return "¼þÊÕ̥λ : 750 ¥¿¡¼¥óËè";
474 case ACT_SUMMON_ANIMAL:
475 return "ưʪ¾¤´ : 200+d300 ¥¿¡¼¥óËè";
476 case ACT_SUMMON_PHANTOM:
477 return "¸¸Î´ : 200+d200 ¥¿¡¼¥óËè";
478 case ACT_SUMMON_ELEMENTAL:
479 return "¥¨¥ì¥á¥ó¥¿¥ë¾¤´ : 750 ¥¿¡¼¥óËè";
480 case ACT_SUMMON_DEMON:
481 return "°Ë⾤´ : 666+d333 ¥¿¡¼¥óËè";
482 case ACT_SUMMON_UNDEAD:
483 return "¥¢¥ó¥Ç¥Ã¥É¾¤´ : 666+d333 ¥¿¡¼¥óËè";
484 case ACT_SUMMON_HOUND:
485 return "¥Ï¥¦¥ó¥É¾¤´ : 300+d150 ¥¿¡¼¥óËè";
486 case ACT_SUMMON_DAWN:
487 return "¶Ç¤Î»ÕÃľ¤´ : 500+d500 ¥¿¡¼¥óËè";
488 case ACT_SUMMON_OCTOPUS:
489 return "Âý¤ÎÂç·²¾¤´ : 300+d150¥¿¡¼¥óËè";
491 case ACT_CHOIR_SINGS:
492 return "²óÉü (777)¡¢Ìþ¤·¡¢»Îµ¤¹âÍÈ : 300 ¥¿¡¼¥óËè";
494 return "¶²Éݽüµî/ÂÎÎϲóÉü(30) : 10 ¥¿¡¼¥óËè";
496 return "½ý²óÉü(4d8) : 3+d3 ¥¿¡¼¥óËè";
497 case ACT_CURE_POISON:
498 return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
500 return "·Ð¸³ÃÍÉü³è : 450 ¥¿¡¼¥óËè";
502 return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃÍÉü³è : 750 ¥¿¡¼¥óËè";
504 return "ÂÎÎϲóÉü(700) : 250 ¥¿¡¼¥óËè";
506 return "ÂÎÎϲóÉü(1000) : 888 ¥¿¡¼¥óËè";
508 return "Ìþ¤· : 100¥¿¡¼¥óËè";
509 case ACT_CURE_MANA_FULL:
510 return "ËâÎÏÉü³è: 777 ¥¿¡¼¥óËè";
512 return "¥Æ¥ì¥Ñ¥·¡¼ (´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
514 return "»Îµ¤¹âÍȤȽËÊ¡ (´ü´Ö 50+d50) : 100+d100 ¥¿¡¼¥óËè";
516 return "Âмٰ·ë³¦ (´ü´Ö level*3 + d25) : 200+d200 ¥¿¡¼¥óËè";
518 return "Á´ÂÑÀ (´ü´Ö 20+d20) : 111 ¥¿¡¼¥óËè";
520 return "²Ã® (´ü´Ö 20+d20) : 250 ¥¿¡¼¥óËè";
522 return "²Ã® (´ü´Ö 75+d75) : 200+d200 ¥¿¡¼¥óËè";
524 return "Í©Âβ½ (´ü´Ö level/2 + d(level/2)) : 1000 ¥¿¡¼¥óËè";
526 return "̵Ũ²½ (´ü´Ö 8+d8) : 1000 ¥¿¡¼¥óËè";
528 return "»Îµ¤¹âÍÈ : 30+d30¥¿¡¼¥óËè";
530 return "»Îµ¤¹âÍÈ, ¥¹¥Ô¡¼¥É(50+d50¥¿¡¼¥ó) : 100+d200 ¥¿¡¼¥óËè";
532 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
534 return "ËâË¡¤ÎÃϿޤȸ÷ : 50+d50 ¥¿¡¼¥óËè";
536 return "Á´´¶ÃÎ : 55+d55 ¥¿¡¼¥óËè";
537 case ACT_DETECT_XTRA:
538 return "Á´´¶ÃΡ¢Ãµº÷¡¢*´ÕÄê* : 100 ¥¿¡¼¥óËè";
540 return "*´ÕÄê* : 75 ¥¿¡¼¥óËè";
542 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
544 return "Çúȯ¤Î¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
546 return "¼é¤ê¤Î¥ë¡¼¥ó : 400 ¥¿¡¼¥óËè";
548 return "¶õÊ¢½¼Â : 200 ¥¿¡¼¥óËè";
550 return "¥É¥¢Ç˲õ : 10 ¥¿¡¼¥óËè";
552 return "´äÀÐÍϲò : 3 ¥¿¡¼¥óËè";
554 return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
556 return "Ï£¶â½Ñ : 500 ¥¿¡¼¥óËè";
558 return "¼¡¸µ¤ÎÈâ : 100 ¥¿¡¼¥óËè";
560 return "¥Æ¥ì¥Ý¡¼¥È (range 100) : 25 ¥¿¡¼¥óËè";
562 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
564 return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô : 20+d20 ¥¿¡¼¥óËè";
565 case ACT_TELEKINESIS:
566 return "ʪÂΤò°ú¤´ó¤»¤ë(½ÅÎÌ25kg¤Þ¤Ç) : 25+d25¥¿¡¼¥óËè";
567 case ACT_DETECT_UNIQUE:
568 return "¤³¤Î³¬¤Ë¤¤¤ë¥æ¥Ë¡¼¥¯¥â¥ó¥¹¥¿¡¼¤òɽ¼¨ : 200¥¿¡¼¥óËè";
570 return "ƨÁö : 35 ¥¿¡¼¥óËè";
571 case ACT_DISP_CURSE_XTRA:
572 return "*²ò¼ö*¤ÈÄ´ºº: ¤¤¤Ä¤Ç¤â";
573 case ACT_BRAND_FIRE_BOLTS:
574 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
575 case ACT_RECHARGE_XTRA:
576 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
578 return "´í¸±¤òȼ¤¦´ÕÄê : ¤¤¤Ä¤Ç¤â";
580 return "»Í¸ÔƧ¤ß : 100+d100¥¿¡¼¥óËè";
582 /* Unique activation */
584 return "Äà¤ê¤ò¤¹¤ë : ¤¤¤Ä¤Ç¤â";
586 return "Îã¤Î¥¢¥ì : 150+d150 ¥¿¡¼¥óËè";
588 return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë";
589 case ACT_BLOODY_MOON:
590 return "°ÀÊѹ¹ : 3333 ¥¿¡¼¥óËè";
592 return "¥Õ¥¡¥¤¥¢¡ª : 15 ¥¿¡¼¥óËè";
597 /* General activation */
600 return "beam of sunlight every 10 turns";
602 return "magic missile (2d6) every 2 turns";
604 return "stinking cloud (12) every 4+d4 turns";
606 return "lightning bolt (4d8) every 5+d5 turns";
608 return "acid bolt (5d8) every 6+d6 turns";
610 return "frost bolt (6d8) every 7+d7 turns";
612 return "fire bolt (9d8) every 8+d8 turns";
614 return "ball of cold (48) every 6+d6 turns";
616 return "ball of fire (72) every 9+d9 turns";
618 return "a strangling attack (100) every 100+d100 turns";
620 return "ball of cold (100) every 12+d12 turns";
622 return "ball of lightning (100) every 12+d12 turns";
624 return "drain life (120) every 400 turns";
626 return "vampiric drain (3*50) every 400 turns";
628 return "arrows (150) every 90+d90 turns";
630 return "fire ball (300) every 225+d225 turns";
632 return "ball of cold (400) every 325+d325 turns";
634 return "ball of lightning (500) every 425+d425 turns";
636 return "whirlwind attack every 250 turns";
638 return "vampiric drain (3*100) every 400 turns";
640 return "call chaos every 350 turns";
642 return "launch rocket (120+level) every 400 turns";
644 return "dispel evil (x5) every 100+d100 turns";
646 return "elemental breath (300) every 500 turns";
648 return "dispel good (x5) every 100+d100 turns";
650 return "a magical arrow (150) every 90+d90 turns";
652 return "large fire ball (120) every 15 turns";
654 return "water ball (200) every 250 turns";
656 return "large star ball (200) every 200+d200 turns";
658 return "darkness storm (250) every 150+d150 turns";
660 return "a mana storm every 250+d250 turns";
662 return "dispel small life every 55+d55 turns";
663 case ACT_BLINDING_LIGHT:
664 return "blinding light every 250 turns";
666 return "bizarre things every 450+d450 turns";
667 case ACT_CAST_BA_STAR:
668 return "cast star balls (150) every 1000 turns";
669 case ACT_BLADETURNER:
670 return "breathe elements (300), hero, bless, and resistance";
673 return "confuse monster every 15 turns";
675 return "sleep nearby monsters every 55 turns";
677 return "earthquake (rad 10) every 50 turns";
679 return "terror every 3 * (level+10) turns";
681 return "teleport away every 200 turns";
682 case ACT_BANISH_EVIL:
683 return "banish evil every 250+d250 turns";
685 return "genocide every 500 turns";
687 return "mass genocide every 1000 turns";
689 return "frighten monsters every 40+d40 turns";
691 if (o_ptr->name1 == ART_HYOUSIGI) return "beat wooden clappers every turn";
692 return "aggravete monsters every turn";
694 case ACT_CHARM_ANIMAL:
695 return "charm animal every 200 turns";
696 case ACT_CHARM_UNDEAD:
697 return "enslave undead every 333 turns";
698 case ACT_CHARM_OTHER:
699 return "charm monster every 400 turns";
700 case ACT_CHARM_ANIMALS:
701 return "animal friendship every 500 turns";
702 case ACT_CHARM_OTHERS:
703 return "mass charm every 750 turns";
704 case ACT_SUMMON_ANIMAL:
705 return "summon animal every 200+d300 turns";
706 case ACT_SUMMON_PHANTOM:
707 return "summon phantasmal servant every 200+d200 turns";
708 case ACT_SUMMON_ELEMENTAL:
709 return "summon elemental every 750 turns";
710 case ACT_SUMMON_DEMON:
711 return "summon demon every 666+d333 turns";
712 case ACT_SUMMON_UNDEAD:
713 return "summon undead every 666+d333 turns";
714 case ACT_SUMMON_HOUND:
715 return "summon hound every 300+d150 turns";
716 case ACT_SUMMON_DAWN:
717 return "summon the Legion of the Dawn every 500+d500 turns";
718 case ACT_SUMMON_OCTOPUS:
719 return "summon octopus every 300+d150 turns";
721 case ACT_CHOIR_SINGS:
722 return "heal 777 hit points, curing and heloism every 300 turns";
724 return "remove fear and heal 30 hp every 10 turns";
726 return "heal 4d8 and wounds every 3+d3 turns";
727 case ACT_CURE_POISON:
728 return "remove fear and cure poison every 5 turns";
730 return "restore life levels every 450 turns";
732 return "restore stats and life levels every 750 turns";
734 return "heal 700 hit points every 250 turns";
736 return "heal 1000 hit points every 888 turns";
738 return "curing every 100 turns";
739 case ACT_CURE_MANA_FULL:
740 return "restore mana every 777 turns";
742 return "telepathy (dur 25+d30) every 200 turns";
744 return "heroism and blessed (dur 50+d50) every 100+d100 turns";
746 return "protect evil (dur level*3 + d25) every 200+d200 turns";
748 return "resist elements (dur 20+d20) every 111 turns";
750 return "speed (dur 20+d20) every 100+d100 turns";
752 return "speed (dur 75+d75) every 100+d100 turns";
754 return "wraith form (dur level/2 + d(level/2)) every 1000 turns";
756 return "invulnerability (dur 8+d8) every 1000 turns";
758 return "heroism every 30+d30 turns";
760 return "hero and +10 to speed (50) every 100+200d turns";
761 case ACT_RESIST_ACID:
762 return "resist acid (dur 20+d20) every 40+d40 turns";
763 case ACT_RESIST_FIRE:
764 return "resist fire (dur 20+d20) every 40+d40 turns";
765 case ACT_RESIST_COLD:
766 return "resist cold (dur 20+d20) every 40+d40 turns";
767 case ACT_RESIST_ELEC:
768 return "resist thunder (dur 20+d20) every 40+d40 turns";
769 case ACT_RESIST_POIS:
770 return "resist poison (dur 20+d20) every 40+d40 turns";
772 return "light area (dam 2d15) every 10+d10 turns";
774 return "light (dam 2d15) & map area every 50+d50 turns";
776 return "detection every 55+d55 turns";
777 case ACT_DETECT_XTRA:
778 return "detection, probing and identify true every 100 turns";
780 return "identify true every 75 turns";
782 return "identify spell every 10 turns";
784 return "explosive rune every 200 turns";
786 return "rune of protection every 400 turns";
788 return "satisfy hunger every 200 turns";
790 return "destroy doors every 10 turns";
792 return "stone to mud every 3 turns";
794 return "recharging every 70 turns";
796 return "alchemy every 500 turns";
798 return "dimension door every 100 turns";
800 return "teleport (range 100) every 25 turns";
802 return "word of recall every 200 turns";
803 case ACT_TELEKINESIS:
804 return "a telekinesis (500 lb) every 25+d25 turns";
806 return "clairvoyance and recall, draining you every 20+d20 turns";
807 case ACT_DETECT_UNIQUE:
808 return "list of the uniques on the level every 200 turns";
810 return "a getaway every 35 turns";
811 case ACT_DISP_CURSE_XTRA:
812 return "dispel curse and probing every turn";
813 case ACT_BRAND_FIRE_BOLTS:
814 return "fire branding of bolts every 999 turns";
815 case ACT_RECHARGE_XTRA:
816 return "recharge item every 200 turns";
818 return "perilous identify every turn";
820 return "shiko every 100+d100 turns";
822 /* Unique activation */
824 return "fishing : every time";
826 return "reveal your identity every 150+d150 turns";
828 return "increase STR (destroyed 50%)";
829 case ACT_BLOODY_MOON:
830 return "change zokusei every 3333 turns";
832 return "fire! every 15 turns";
835 return "something undefined";
840 /* Some artifacts can be activated */
841 switch (o_ptr->name1)
848 return "something undefined";
852 if (object_is_smith(o_ptr))
854 switch (o_ptr->xtra3 - 1)
856 case ESSENCE_TMP_RES_ACID:
858 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
860 return "resist acid every 50+d50 turns";
863 case ESSENCE_TMP_RES_ELEC:
865 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
867 return "resist elec every 50+d50 turns";
870 case ESSENCE_TMP_RES_FIRE:
872 return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
874 return "resist fire every 50+d50 turns";
877 case ESSENCE_TMP_RES_COLD:
879 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
881 return "resist cold every 50+d50 turns";
886 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
888 return "earthquake every 100+d100 turns";
893 if (o_ptr->name2 == EGO_TRUMP)
896 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
898 return "teleport every 50+d50 turns";
903 if (o_ptr->name2 == EGO_LITE_ILLUMINATION)
906 return "¥¤¥ë¥ß¥Í¡¼¥·¥ç¥ó : 10+d10 ¥¿¡¼¥óËè";
908 return "illumination every 10+d10 turns";
912 else if (o_ptr->name2 == EGO_EARTHQUAKES)
915 return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
917 return "earthquake every 100+d100 turns";
922 else if (o_ptr->name2 == EGO_JUMP)
925 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
927 return "blink every 10+d10 turns";
932 if (o_ptr->tval == TV_RING)
934 if (object_is_ego(o_ptr))
936 switch (o_ptr->name2)
940 return "»Îµ¤¹âÍÈ : 100+d100¥¿¡¼¥óËè";
942 return "heroism every 100+d100 turns";
944 case EGO_RING_MAGIC_MIS:
946 return "¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë(2d6) : 2 ¥¿¡¼¥óËè";
948 return "magic missile (2d6) every 2 turns";
950 case EGO_RING_FIRE_BOLT:
952 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È(9d8) : 8+d8 ¥¿¡¼¥óËè";
954 return "fire bolt (9d8) every 8+d8 turns";
956 case EGO_RING_COLD_BOLT:
958 return "¥¢¥¤¥¹¡¦¥Ü¥ë¥È(6d8) : 7+d7 ¥¿¡¼¥óËè";
960 return "frost bolt (6d8) every 7+d7 turns";
962 case EGO_RING_ELEC_BOLT:
964 return "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È(4d8) : 5+d5 ¥¿¡¼¥óËè";
966 return "lightning bolt (4d8) every 5+d5 turns";
968 case EGO_RING_ACID_BOLT:
970 return "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È(5d8) : 6+d6 ¥¿¡¼¥óËè";
972 return "acid bolt (5d8) every 6+d6 turns";
974 case EGO_RING_MANA_BOLT:
976 return "ËâÎϤÎÌð(120) : 120+d120 ¥¿¡¼¥óËè";
978 return "a mana bolt (120) every 120+d120 turns";
980 case EGO_RING_FIRE_BALL:
982 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
984 return "fire ball (100) every 80+d80 turns";
986 case EGO_RING_COLD_BALL:
988 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
990 return "cold ball (100) every 80+d80 turns";
992 case EGO_RING_ELEC_BALL:
994 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
996 return "elec ball (100) every 80+d80 turns";
998 case EGO_RING_ACID_BALL:
1000 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
1002 return "acid ball (100) every 80+d80 turns";
1004 case EGO_RING_MANA_BALL:
1006 return "ËâÎϤÎÍò (250) : 300 ¥¿¡¼¥óËè";
1008 return "mana storm (250) every 300 turns";
1010 case EGO_RING_DRAGON_F:
1011 if (o_ptr->sval == SV_RING_FLAMES)
1013 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) ¤È²Ð¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
1015 return "breath of fire (200) and resist fire every 200 turns";
1019 return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
1021 return "fire breath (200) every 250 turns";
1023 case EGO_RING_DRAGON_C:
1024 if (o_ptr->sval == SV_RING_ICE)
1026 return "Î䵤¤Î¥Ö¥ì¥¹ (200) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
1028 return "breath of cold (200) and resist cold every 200 turns";
1032 return "Î䵤¤Î¥Ö¥ì¥¹ (200) : 250 ¥¿¡¼¥óËè";
1034 return "cold breath (200) every 250 turns";
1036 case EGO_RING_M_DETECT:
1038 return "Á´¥â¥ó¥¹¥¿¡¼´¶ÃÎ : 150 ¥¿¡¼¥óËè";
1040 return "detect all monsters every 150 turns";
1042 case EGO_RING_D_SPEED:
1044 return "¥¹¥Ô¡¼¥É(15+d30¥¿¡¼¥ó) : 100 ¥¿¡¼¥óËè";
1046 return "haste self (15+d30 turns) every 100 turns";
1048 case EGO_RING_BERSERKER:
1050 return "¶¸Àï»Î²½(25+d25¥¿¡¼¥ó) : 75+d75 ¥¿¡¼¥óËè";
1052 return "berserk (25+d25 turns) every 75+d75 turns";
1054 case EGO_RING_TELE_AWAY:
1056 return "¥Æ¥ì¥Ý¡¼¥È¡¦¥¢¥¦¥§¥¤ : 150 ¥¿¡¼¥óËè";
1058 return "teleport away every 150 turns";
1062 return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ : 777 ¥¿¡¼¥óËè";
1064 return "hero, bless, and ultimate resistance every 777 turns";
1068 switch (o_ptr->sval)
1070 case SV_RING_FLAMES:
1072 return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) ¤È²Ð¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1074 return "ball of fire (100) and resist fire every 50+d50 turns";
1079 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1081 return "ball of cold (100) and resist cold every 50+d50 turns";
1086 return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) ¤È»À¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1088 return "ball of acid (100) and resist acid every 50+d50 turns";
1093 return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) ¤ÈÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
1095 return "ball of elec (100) and resist elec every 50+d50 turns";
1103 if (o_ptr->tval == TV_AMULET)
1105 if (object_is_ego(o_ptr))
1107 switch (o_ptr->name2)
1111 return "´ÕÄê : 10 ¥¿¡¼¥óËè";
1113 return "identify every 10 turns";
1117 return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
1119 return "charm monster every 200 turns";
1123 return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
1125 return "blink every 10+d10 turns";
1127 case EGO_AMU_TELEPORT:
1129 return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
1131 return "teleport every 50+d50 turns";
1133 case EGO_AMU_D_DOOR:
1135 return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
1137 return "dimension door every 200 turns";
1139 case EGO_AMU_RES_FIRE_:
1141 return "²Ð±ê¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1143 return "resist fire every 50+d50 turns";
1145 case EGO_AMU_RES_COLD_:
1147 return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1149 return "resist cold every 50+d50 turns";
1151 case EGO_AMU_RES_ELEC_:
1153 return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1155 return "resist elec every 50+d50 turns";
1157 case EGO_AMU_RES_ACID_:
1159 return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
1161 return "resist acid every 50+d50 turns";
1163 case EGO_AMU_DETECTION:
1165 return "Á´´¶ÃÎ : 55+d55¥¿¡¼¥óËè";
1167 return "detect all floor every 55+d55 turns";
1173 if (o_ptr->tval == TV_WHISTLE)
1176 return "¥Ú¥Ã¥È¸Æ¤Ó´ó¤» : 100+d100¥¿¡¼¥óËè";
1178 return "call pet every 100+d100 turns";
1182 if (o_ptr->tval == TV_CAPTURE)
1185 return "¥â¥ó¥¹¥¿¡¼¤òÊᤨ¤ë¡¢Ëô¤Ï²òÊü¤¹¤ë¡£";
1187 return "captures or releases a monster.";
1191 /* Require dragon scale mail */
1193 if (o_ptr->tval != TV_DRAG_ARMOR) return ("´ñ̯¤Ê¸÷");
1195 if (o_ptr->tval != TV_DRAG_ARMOR) return ("a strange glow");
1199 /* Branch on the sub-type */
1200 switch (o_ptr->sval)
1202 case SV_DRAGON_BLUE:
1205 return "°ðºÊ¤Î¥Ö¥ì¥¹(100) : 150+d150 ¥¿¡¼¥óËè";
1207 return "breathe lightning (100) every 150+d150 turns";
1211 case SV_DRAGON_WHITE:
1214 return "Î䵤¤Î¥Ö¥ì¥¹(110) : 150+d150 ¥¿¡¼¥óËè";
1216 return "breathe frost (110) every 150+d150 turns";
1220 case SV_DRAGON_BLACK:
1223 return "»À¤Î¥Ö¥ì¥¹(130) : 150+d150 ¥¿¡¼¥óËè";
1225 return "breathe acid (130) every 150+d150 turns";
1229 case SV_DRAGON_GREEN:
1232 return "ÆǤΥ¬¥¹¤Î¥Ö¥ì¥¹(150) : 180+d180 ¥¿¡¼¥óËè";
1234 return "breathe poison gas (150) every 180+d180 turns";
1241 return "²Ð±ê¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
1243 return "breathe fire (200) every 200+d200 turns";
1247 case SV_DRAGON_MULTIHUED:
1250 return "Ëü¿§¤Î¥Ö¥ì¥¹(250) : 200+d200 ¥¿¡¼¥óËè";
1252 return "breathe multi-hued (250) every 200+d200 turns";
1256 case SV_DRAGON_BRONZE:
1259 return "º®Íð¤Î¥Ö¥ì¥¹(120) : 180+d180 ¥¿¡¼¥óËè";
1261 return "breathe confusion (120) every 180+d180 turns";
1265 case SV_DRAGON_GOLD:
1268 return "¹ì²»¤Î¥Ö¥ì¥¹(130) : 180+d180 ¥¿¡¼¥óËè";
1270 return "breathe sound (130) every 180+d180 turns";
1274 case SV_DRAGON_CHAOS:
1277 return "¥«¥ª¥¹/Îô²½¤Î¥Ö¥ì¥¹(220) : 200+d200 ¥¿¡¼¥óËè";
1279 return "breathe chaos/disenchant (220) every 200+d200 turns";
1286 return "¹ì²»/ÇËÊҤΥ֥쥹(230) : 200+d200 ¥¿¡¼¥óËè";
1288 return "breathe sound/shards (230) every 200+d200 turns";
1292 case SV_DRAGON_BALANCE:
1295 return "¥Ð¥é¥ó¥¹¤Î¥Ö¥ì¥¹ (250) 200+d200 ¥¿¡¼¥óËè";
1297 return "breathe balance (250) every 200+d200 turns";
1301 case SV_DRAGON_SHINING:
1304 return "Á®¸÷/°Å¹õ¤Î¥Ö¥ì¥¹(200) : 200+d200 ¥¿¡¼¥óËè";
1306 return "breathe light/darkness (200) every 200+d200 turns";
1310 case SV_DRAGON_POWER:
1313 return "¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹(300) : 200+d200 ¥¿¡¼¥óËè";
1315 return "breathe the elements (300) every 200+d200 turns";
1325 return "breathe air";
1332 * Describe a "fully identified" item
1334 bool screen_object(object_type *o_ptr, u32b mode)
1338 u32b flgs[TR_FLAG_SIZE];
1342 char o_name[MAX_NLEN];
1345 int trivial_info = 0;
1347 /* Extract the flags */
1348 object_flags(o_ptr, flgs);
1350 /* Extract the description */
1352 roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
1353 (k_text + k_info[o_ptr->k_idx].text),
1354 77 - 15, temp, sizeof(temp));
1355 for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
1356 { info[i] = &temp[j]; i++;}
1359 if (object_is_equipment(o_ptr))
1361 /* Descriptions of a basic equipment is just a flavor */
1365 /* Mega-Hack -- describe activation */
1366 if (have_flag(flgs, TR_ACTIVATE))
1369 info[i++] = "»ÏÆ°¤·¤¿¤È¤¤Î¸ú²Ì...";
1371 info[i++] = "It can be activated for...";
1374 info[i++] = item_activation(o_ptr);
1376 info[i++] = "...¤¿¤À¤·ÁõÈ÷¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£";
1378 info[i++] = "...if it is being worn.";
1383 /* Figurines, a hack */
1384 if (o_ptr->tval == TV_FIGURINE)
1387 info[i++] = "¤½¤ì¤ÏÅꤲ¤¿»þ¥Ú¥Ã¥È¤ËÊѲ½¤¹¤ë¡£";
1389 info[i++] = "It will transform into a pet when thrown.";
1394 /* Figurines, a hack */
1395 if (o_ptr->name1 == ART_STONEMASK)
1398 info[i++] = "¤½¤ì¤òÁõÈ÷¤·¤¿¼Ô¤ÏµÛ·ìµ´¤Ë¤Ê¤ë¡£";
1400 info[i++] = "It makes you turn into a vampire permanently.";
1405 if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DOKUBARI))
1408 info[i++] = "¤½¤ì¤ÏÁê¼ê¤ò°ì·â¤ÇÅݤ¹¤³¤È¤¬¤¢¤ë¡£";
1410 info[i++] = "It will attempt to kill a monster instantly.";
1415 if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE))
1418 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
1420 info[i++] = "It causes you to strike yourself sometimes.";
1424 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
1426 info[i++] = "It always penetrates invulnerability barriers.";
1430 if (o_ptr->name2 == EGO_2WEAPON)
1433 info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
1435 info[i++] = "It affects your ability to hit when you are wielding two weapons.";
1440 if (have_flag(flgs, TR_EASY_SPELL))
1443 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
1445 info[i++] = "It affects your ability to cast spells.";
1449 if (o_ptr->name2 == EGO_AMU_FOOL)
1452 info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
1454 info[i++] = "It interferes with casting spells.";
1458 if (o_ptr->name2 == EGO_RING_THROW)
1461 info[i++] = "¤½¤ì¤Ïʪ¤ò¶¯¤¯Åꤲ¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
1463 info[i++] = "It provides great strength when you throw an item.";
1467 if (o_ptr->name2 == EGO_AMU_NAIVETY)
1470 info[i++] = "¤½¤ì¤ÏËâË¡Äñ¹³ÎϤò²¼¤²¤ë¡£";
1472 info[i++] = "It decreases your magic resistance.";
1476 if (o_ptr->tval == TV_STATUE)
1478 monster_race *r_ptr = &r_info[o_ptr->pval];
1480 if (o_ptr->pval == MON_BULLGATES)
1482 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤ÈÃѤº¤«¤·¤¤¡£";
1484 info[i++] = "It is shameful.";
1486 else if ( r_ptr->flags2 & (RF2_ELDRITCH_HORROR))
1488 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È¶²¤¤¡£";
1490 info[i++] = "It is fearful.";
1494 info[i++] = "¤½¤ì¤ÏÉô²°¤Ë¾þ¤ë¤È³Ú¤·¤¤¡£";
1496 info[i++] = "It is cheerful.";
1500 /* Hack -- describe lite's */
1501 if (o_ptr->tval == TV_LITE)
1503 if (o_ptr->name2 == EGO_LITE_DARKNESS)
1506 info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
1508 info[i++] = "It provides no light.";
1511 if (o_ptr->sval == SV_LITE_FEANOR)
1514 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-3)¡£";
1516 info[i++] = "It decreases radius of light source by 3.";
1519 else if (o_ptr->sval == SV_LITE_LANTERN)
1522 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
1524 info[i++] = "It decreases radius of light source by 2.";
1530 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
1532 info[i++] = "It decreases radius of light source by 1.";
1536 else if (object_is_fixed_artifact(o_ptr))
1539 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1541 info[i++] = "It provides light (radius 3) forever.";
1545 else if (o_ptr->name2 == EGO_LITE_SHINE)
1547 if (o_ptr->sval == SV_LITE_FEANOR)
1550 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1552 info[i++] = "It provides light (radius 3) forever.";
1556 else if (o_ptr->sval == SV_LITE_LANTERN)
1559 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
1561 info[i++] = "It provides light (radius 3) when fueled.";
1568 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1570 info[i++] = "It provides light (radius 2) when fueled.";
1577 if (o_ptr->sval == SV_LITE_FEANOR)
1580 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1582 info[i++] = "It provides light (radius 2) forever.";
1586 else if (o_ptr->sval == SV_LITE_LANTERN)
1589 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 2)¤ò¼ø¤±¤ë¡£";
1591 info[i++] = "It provides light (radius 2) when fueled.";
1598 info[i++] = "¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â 1)¤ò¼ø¤±¤ë¡£";
1600 info[i++] = "It provides light (radius 1) when fueled.";
1605 if (o_ptr->name2 == EGO_LITE_LONG)
1608 info[i++] = "¤½¤ì¤ÏŤ¤¥¿¡¼¥óÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
1610 info[i++] = "It provides light for much longer time.";
1616 /* And then describe it fully */
1618 if (have_flag(flgs, TR_RIDING))
1620 if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
1622 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
1624 info[i++] = "It is made for use while riding.";
1629 info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
1631 info[i++] = "It is suitable for use while riding.";
1633 /* This information is not important enough */
1637 if (have_flag(flgs, TR_STR))
1640 info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1642 info[i++] = "It affects your strength.";
1646 if (have_flag(flgs, TR_INT))
1649 info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1651 info[i++] = "It affects your intelligence.";
1655 if (have_flag(flgs, TR_WIS))
1658 info[i++] = "¤½¤ì¤Ï¸¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1660 info[i++] = "It affects your wisdom.";
1664 if (have_flag(flgs, TR_DEX))
1667 info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1669 info[i++] = "It affects your dexterity.";
1673 if (have_flag(flgs, TR_CON))
1676 info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1678 info[i++] = "It affects your constitution.";
1682 if (have_flag(flgs, TR_CHR))
1685 info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1687 info[i++] = "It affects your charisma.";
1692 if (have_flag(flgs, TR_MAGIC_MASTERY))
1695 info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1697 info[i++] = "It affects your ability to use magic devices.";
1701 if (have_flag(flgs, TR_STEALTH))
1704 info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1706 info[i++] = "It affects your stealth.";
1710 if (have_flag(flgs, TR_SEARCH))
1713 info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1715 info[i++] = "It affects your searching.";
1719 if (have_flag(flgs, TR_INFRA))
1722 info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1724 info[i++] = "It affects your infravision.";
1728 if (have_flag(flgs, TR_TUNNEL))
1731 info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
1733 info[i++] = "It affects your ability to tunnel.";
1737 if (have_flag(flgs, TR_SPEED))
1740 info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1742 info[i++] = "It affects your speed.";
1746 if (have_flag(flgs, TR_BLOWS))
1749 info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
1751 info[i++] = "It affects your attack speed.";
1756 if (have_flag(flgs, TR_BRAND_ACID))
1759 info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1761 info[i++] = "It does extra damage from acid.";
1765 if (have_flag(flgs, TR_BRAND_ELEC))
1768 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1770 info[i++] = "It does extra damage from electricity.";
1774 if (have_flag(flgs, TR_BRAND_FIRE))
1777 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1779 info[i++] = "It does extra damage from fire.";
1783 if (have_flag(flgs, TR_BRAND_COLD))
1786 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
1788 info[i++] = "It does extra damage from frost.";
1793 if (have_flag(flgs, TR_BRAND_POIS))
1796 info[i++] = "¤½¤ì¤ÏŨ¤òÆǤ¹¤ë¡£";
1798 info[i++] = "It poisons your foes.";
1803 if (have_flag(flgs, TR_CHAOTIC))
1806 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹Åª¤Ê¸ú²Ì¤òµÚ¤Ü¤¹¡£";
1808 info[i++] = "It produces chaotic effects.";
1813 if (have_flag(flgs, TR_VAMPIRIC))
1816 info[i++] = "¤½¤ì¤ÏŨ¤«¤é¥Ò¥Ã¥È¥Ý¥¤¥ó¥È¤òµÛ¼ý¤¹¤ë¡£";
1818 info[i++] = "It drains life from your foes.";
1823 if (have_flag(flgs, TR_IMPACT))
1826 info[i++] = "¤½¤ì¤ÏÃϿ̤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
1828 info[i++] = "It can cause earthquakes.";
1833 if (have_flag(flgs, TR_VORPAL))
1836 info[i++] = "¤½¤ì¤ÏÈó¾ï¤ËÀÚ¤ìÌ£¤¬±Ô¤¯Å¨¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1838 info[i++] = "It is very sharp and can cut your foes.";
1843 if (have_flag(flgs, TR_KILL_DRAGON))
1846 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1848 info[i++] = "It is a great bane of dragons.";
1852 else if (have_flag(flgs, TR_SLAY_DRAGON))
1855 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1857 info[i++] = "It is especially deadly against dragons.";
1862 if (have_flag(flgs, TR_KILL_ORC))
1865 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1867 info[i++] = "It is a great bane of orcs.";
1871 if (have_flag(flgs, TR_SLAY_ORC))
1874 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1876 info[i++] = "It is especially deadly against orcs.";
1881 if (have_flag(flgs, TR_KILL_TROLL))
1884 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1886 info[i++] = "It is a great bane of trolls.";
1890 if (have_flag(flgs, TR_SLAY_TROLL))
1893 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1895 info[i++] = "It is especially deadly against trolls.";
1900 if (have_flag(flgs, TR_KILL_GIANT))
1903 info[i++] = "¤½¤ì¤Ïµð¿Í¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1905 info[i++] = "It is a great bane of giants.";
1908 else if (have_flag(flgs, TR_SLAY_GIANT))
1911 info[i++] = "¤½¤ì¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1913 info[i++] = "It is especially deadly against giants.";
1918 if (have_flag(flgs, TR_KILL_DEMON))
1921 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1923 info[i++] = "It is a great bane of demons.";
1927 if (have_flag(flgs, TR_SLAY_DEMON))
1930 info[i++] = "¤½¤ì¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
1932 info[i++] = "It strikes at demons with holy wrath.";
1937 if (have_flag(flgs, TR_KILL_UNDEAD))
1940 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1942 info[i++] = "It is a great bane of undead.";
1946 if (have_flag(flgs, TR_SLAY_UNDEAD))
1949 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
1951 info[i++] = "It strikes at undead with holy wrath.";
1956 if (have_flag(flgs, TR_KILL_EVIL))
1959 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1961 info[i++] = "It is a great bane of evil monsters.";
1965 if (have_flag(flgs, TR_SLAY_EVIL))
1968 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤ÆÀ»¤Ê¤ëÎϤǹ¶·â¤¹¤ë¡£";
1970 info[i++] = "It fights against evil with holy fury.";
1975 if (have_flag(flgs, TR_KILL_ANIMAL))
1978 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1980 info[i++] = "It is a great bane of natural creatures.";
1984 if (have_flag(flgs, TR_SLAY_ANIMAL))
1987 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤Îưʪ¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
1989 info[i++] = "It is especially deadly against natural creatures.";
1994 if (have_flag(flgs, TR_KILL_HUMAN))
1997 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤Ë¤È¤Ã¤Æ¤ÎŷŨ¤Ç¤¢¤ë¡£";
1999 info[i++] = "It is a great bane of humans.";
2003 if (have_flag(flgs, TR_SLAY_HUMAN))
2006 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
2008 info[i++] = "It is especially deadly against humans.";
2013 if (have_flag(flgs, TR_FORCE_WEAPON))
2016 info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
2018 info[i++] = "It powerfully strikes at a monster using your mana.";
2022 if (have_flag(flgs, TR_DEC_MANA))
2025 info[i++] = "¤½¤ì¤ÏËâÎϤξÃÈñ¤ò²¡¤µ¤¨¤ë¡£";
2027 info[i++] = "It decreases your mana consumption.";
2031 if (have_flag(flgs, TR_SUST_STR))
2034 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÏÓÎϤò°Ý»ý¤¹¤ë¡£";
2036 info[i++] = "It sustains your strength.";
2040 if (have_flag(flgs, TR_SUST_INT))
2043 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÃÎǽ¤ò°Ý»ý¤¹¤ë¡£";
2045 info[i++] = "It sustains your intelligence.";
2049 if (have_flag(flgs, TR_SUST_WIS))
2052 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¸¤µ¤ò°Ý»ý¤¹¤ë¡£";
2054 info[i++] = "It sustains your wisdom.";
2058 if (have_flag(flgs, TR_SUST_DEX))
2061 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î´ïÍѤµ¤ò°Ý»ý¤¹¤ë¡£";
2063 info[i++] = "It sustains your dexterity.";
2067 if (have_flag(flgs, TR_SUST_CON))
2070 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂѵ×ÎϤò°Ý»ý¤¹¤ë¡£";
2072 info[i++] = "It sustains your constitution.";
2076 if (have_flag(flgs, TR_SUST_CHR))
2079 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÌ¥ÎϤò°Ý»ý¤¹¤ë¡£";
2081 info[i++] = "It sustains your charisma.";
2086 if (have_flag(flgs, TR_IM_ACID))
2089 info[i++] = "¤½¤ì¤Ï»À¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2091 info[i++] = "It provides immunity to acid.";
2095 if (have_flag(flgs, TR_IM_ELEC))
2098 info[i++] = "¤½¤ì¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2100 info[i++] = "It provides immunity to electricity.";
2104 if (have_flag(flgs, TR_IM_FIRE))
2107 info[i++] = "¤½¤ì¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2109 info[i++] = "It provides immunity to fire.";
2113 if (have_flag(flgs, TR_IM_COLD))
2116 info[i++] = "¤½¤ì¤Ï´¨¤µ¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2118 info[i++] = "It provides immunity to cold.";
2123 if (have_flag(flgs, TR_THROW))
2126 info[i++] = "¤½¤ì¤ÏŨ¤ËÅꤲ¤ÆÂ礤ʥÀ¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2128 info[i++] = "It is perfectly balanced for throwing.";
2132 if (have_flag(flgs, TR_FREE_ACT))
2135 info[i++] = "¤½¤ì¤ÏËãáã¤ËÂФ¹¤ë´°Á´¤ÊÌȱ֤ò¼ø¤±¤ë¡£";
2137 info[i++] = "It provides immunity to paralysis.";
2141 if (have_flag(flgs, TR_HOLD_LIFE))
2144 info[i++] = "¤½¤ì¤ÏÀ¸Ì¿Îϵۼý¤ËÂФ¹¤ëÂÑÀ¤ò¼ø¤±¤ë¡£";
2146 info[i++] = "It provides resistance to life draining.";
2150 if (have_flag(flgs, TR_RES_FEAR))
2153 info[i++] = "¤½¤ì¤Ï¶²Éݤؤδ°Á´¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
2155 info[i++] = "It makes you completely fearless.";
2159 if (have_flag(flgs, TR_RES_ACID))
2162 info[i++] = "¤½¤ì¤Ï»À¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2164 info[i++] = "It provides resistance to acid.";
2168 if (have_flag(flgs, TR_RES_ELEC))
2171 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2173 info[i++] = "It provides resistance to electricity.";
2177 if (have_flag(flgs, TR_RES_FIRE))
2180 info[i++] = "¤½¤ì¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2182 info[i++] = "It provides resistance to fire.";
2186 if (have_flag(flgs, TR_RES_COLD))
2189 info[i++] = "¤½¤ì¤Ï´¨¤µ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2191 info[i++] = "It provides resistance to cold.";
2195 if (have_flag(flgs, TR_RES_POIS))
2198 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2200 info[i++] = "It provides resistance to poison.";
2205 if (have_flag(flgs, TR_RES_LITE))
2208 info[i++] = "¤½¤ì¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2210 info[i++] = "It provides resistance to light.";
2214 if (have_flag(flgs, TR_RES_DARK))
2217 info[i++] = "¤½¤ì¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2219 info[i++] = "It provides resistance to dark.";
2224 if (have_flag(flgs, TR_RES_BLIND))
2227 info[i++] = "¤½¤ì¤ÏÌÕÌܤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2229 info[i++] = "It provides resistance to blindness.";
2233 if (have_flag(flgs, TR_RES_CONF))
2236 info[i++] = "¤½¤ì¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2238 info[i++] = "It provides resistance to confusion.";
2242 if (have_flag(flgs, TR_RES_SOUND))
2245 info[i++] = "¤½¤ì¤Ï¹ì²»¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2247 info[i++] = "It provides resistance to sound.";
2251 if (have_flag(flgs, TR_RES_SHARDS))
2254 info[i++] = "¤½¤ì¤ÏÇËÊҤؤÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2256 info[i++] = "It provides resistance to shards.";
2261 if (have_flag(flgs, TR_RES_NETHER))
2264 info[i++] = "¤½¤ì¤ÏÃϹö¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2266 info[i++] = "It provides resistance to nether.";
2270 if (have_flag(flgs, TR_RES_NEXUS))
2273 info[i++] = "¤½¤ì¤Ï°ø²Ìº®Íð¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2275 info[i++] = "It provides resistance to nexus.";
2279 if (have_flag(flgs, TR_RES_CHAOS))
2282 info[i++] = "¤½¤ì¤Ï¥«¥ª¥¹¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2284 info[i++] = "It provides resistance to chaos.";
2288 if (have_flag(flgs, TR_RES_DISEN))
2291 info[i++] = "¤½¤ì¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò¼ø¤±¤ë¡£";
2293 info[i++] = "It provides resistance to disenchantment.";
2298 if (have_flag(flgs, TR_LEVITATION))
2301 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2303 info[i++] = "It allows you to levitate.";
2307 if (have_flag(flgs, TR_LITE))
2309 if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
2311 info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
2313 info[i++] = "It decreases radius of your light source by 1.";
2317 info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë(Ⱦ·Â¤Ë+1)¡£";
2319 info[i++] = "It provides permanent light. (radius +1)";
2323 if (have_flag(flgs, TR_SEE_INVIS))
2326 info[i++] = "¤½¤ì¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
2328 info[i++] = "It allows you to see invisible monsters.";
2332 if (have_flag(flgs, TR_TELEPATHY))
2335 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò¼ø¤±¤ë¡£";
2337 info[i++] = "It gives telepathic powers.";
2341 if (have_flag(flgs, TR_ESP_ANIMAL))
2344 info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤ò´¶ÃΤ¹¤ë¡£";
2346 info[i++] = "It senses natural creatures.";
2350 if (have_flag(flgs, TR_ESP_UNDEAD))
2353 info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ò´¶ÃΤ¹¤ë¡£";
2355 info[i++] = "It senses undead.";
2359 if (have_flag(flgs, TR_ESP_DEMON))
2362 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò´¶ÃΤ¹¤ë¡£";
2364 info[i++] = "It senses demons.";
2368 if (have_flag(flgs, TR_ESP_ORC))
2371 info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ò´¶ÃΤ¹¤ë¡£";
2373 info[i++] = "It senses orcs.";
2377 if (have_flag(flgs, TR_ESP_TROLL))
2380 info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ò´¶ÃΤ¹¤ë¡£";
2382 info[i++] = "It senses trolls.";
2386 if (have_flag(flgs, TR_ESP_GIANT))
2389 info[i++] = "¤½¤ì¤Ïµð¿Í¤ò´¶ÃΤ¹¤ë¡£";
2391 info[i++] = "It senses giants.";
2395 if (have_flag(flgs, TR_ESP_DRAGON))
2398 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò´¶ÃΤ¹¤ë¡£";
2400 info[i++] = "It senses dragons.";
2404 if (have_flag(flgs, TR_ESP_HUMAN))
2407 info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ò´¶ÃΤ¹¤ë¡£";
2409 info[i++] = "It senses humans.";
2413 if (have_flag(flgs, TR_ESP_EVIL))
2416 info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¸ºß¤ò´¶ÃΤ¹¤ë¡£";
2418 info[i++] = "It senses evil creatures.";
2422 if (have_flag(flgs, TR_ESP_GOOD))
2425 info[i++] = "¤½¤ì¤ÏÁ±Îɤʸºß¤ò´¶ÃΤ¹¤ë¡£";
2427 info[i++] = "It senses good creatures.";
2431 if (have_flag(flgs, TR_ESP_NONLIVING))
2434 info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤò´¶ÃΤ¹¤ë¡£";
2436 info[i++] = "It senses non-living creatures.";
2440 if (have_flag(flgs, TR_ESP_UNIQUE))
2443 info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤ò´¶ÃΤ¹¤ë¡£";
2445 info[i++] = "It senses unique monsters.";
2449 if (have_flag(flgs, TR_SLOW_DIGEST))
2452 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤òÃÙ¤¯¤¹¤ë¡£";
2454 info[i++] = "It slows your metabolism.";
2458 if (have_flag(flgs, TR_REGEN))
2461 info[i++] = "¤½¤ì¤ÏÂÎÎϲóÉüÎϤò¶¯²½¤¹¤ë¡£";
2463 info[i++] = "It speeds your regenerative powers.";
2467 if (have_flag(flgs, TR_WARNING))
2470 info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
2472 info[i++] = "It warns you of danger";
2476 if (have_flag(flgs, TR_REFLECT))
2479 info[i++] = "¤½¤ì¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
2481 info[i++] = "It reflects bolts and arrows.";
2485 if (have_flag(flgs, TR_SH_FIRE))
2488 info[i++] = "¤½¤ì¤Ï±ê¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2490 info[i++] = "It produces a fiery sheath.";
2494 if (have_flag(flgs, TR_SH_ELEC))
2497 info[i++] = "¤½¤ì¤ÏÅŵ¤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2499 info[i++] = "It produces an electric sheath.";
2503 if (have_flag(flgs, TR_SH_COLD))
2506 info[i++] = "¤½¤ì¤ÏÎ䵤¤Î¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2508 info[i++] = "It produces a sheath of coldness.";
2512 if (have_flag(flgs, TR_NO_MAGIC))
2515 info[i++] = "¤½¤ì¤ÏÈ¿ËâË¡¥Ð¥ê¥¢¤òÄ¥¤ë¡£";
2517 info[i++] = "It produces an anti-magic shell.";
2521 if (have_flag(flgs, TR_NO_TELE))
2524 info[i++] = "¤½¤ì¤Ï¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤹¤ë¡£";
2526 info[i++] = "It prevents teleportation.";
2530 if (have_flag(flgs, TR_XTRA_MIGHT))
2533 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤò¤è¤ê¶¯ÎϤËȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2535 info[i++] = "It fires missiles with extra might.";
2539 if (have_flag(flgs, TR_XTRA_SHOTS))
2542 info[i++] = "¤½¤ì¤ÏÌ𡿥ܥë¥È¡¿ÃƤòÈó¾ï¤ËÁ᤯ȯ¼Í¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2544 info[i++] = "It fires missiles excessively fast.";
2549 if (have_flag(flgs, TR_BLESSED))
2552 info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
2554 info[i++] = "It has been blessed by the gods.";
2559 if (object_is_cursed(o_ptr))
2561 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
2564 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
2566 info[i++] = "It is permanently cursed.";
2570 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
2573 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
2575 info[i++] = "It is heavily cursed.";
2582 info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
2584 info[i++] = "It is cursed.";
2588 * It's a trivial infomation since there is
2589 * fake inscription {cursed}
2595 if ((have_flag(flgs, TR_TY_CURSE)) || (o_ptr->curse_flags & TRC_TY_CURSE))
2598 info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
2600 info[i++] = "It carries an ancient foul curse.";
2604 if ((have_flag(flgs, TR_AGGRAVATE)) || (o_ptr->curse_flags & TRC_AGGRAVATE))
2607 info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
2609 info[i++] = "It aggravates nearby creatures.";
2613 if ((have_flag(flgs, TR_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
2616 info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
2618 info[i++] = "It drains experience.";
2622 if (o_ptr->curse_flags & TRC_SLOW_REGEN)
2625 info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
2627 info[i++] = "It slows your regenerative powers.";
2631 if (o_ptr->curse_flags & TRC_ADD_L_CURSE)
2634 info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
2636 info[i++] = "It adds weak curses.";
2640 if (o_ptr->curse_flags & TRC_ADD_H_CURSE)
2643 info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
2645 info[i++] = "It adds heavy curses.";
2649 if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
2652 info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2654 info[i++] = "It attracts animals.";
2658 if (o_ptr->curse_flags & TRC_CALL_DEMON)
2661 info[i++] = "¤½¤ì¤Ï°Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2663 info[i++] = "It attracts demons.";
2667 if (o_ptr->curse_flags & TRC_CALL_DRAGON)
2670 info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
2672 info[i++] = "It attracts dragons.";
2676 if (o_ptr->curse_flags & TRC_COWARDICE)
2679 info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤µ¯¤³¤¹¡£";
2681 info[i++] = "It makes you subject to cowardice.";
2685 if ((have_flag(flgs, TR_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
2688 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
2690 info[i++] = "It induces random teleportation.";
2694 if (o_ptr->curse_flags & TRC_LOW_MELEE)
2697 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
2699 info[i++] = "It causes you to miss blows.";
2703 if (o_ptr->curse_flags & TRC_LOW_AC)
2706 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
2708 info[i++] = "It helps your enemies' blows.";
2712 if (o_ptr->curse_flags & TRC_LOW_MAGIC)
2715 info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
2717 info[i++] = "It encumbers you while spellcasting.";
2721 if (o_ptr->curse_flags & TRC_FAST_DIGEST)
2724 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
2726 info[i++] = "It speeds your metabolism.";
2730 if (o_ptr->curse_flags & TRC_DRAIN_HP)
2733 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
2735 info[i++] = "It drains you.";
2739 if (o_ptr->curse_flags & TRC_DRAIN_MANA)
2742 info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
2744 info[i++] = "It drains your mana.";
2749 /* Describe about this kind of object instead of THIS fake object */
2750 if (mode & SCROBJ_FAKE_OBJECT)
2752 switch (o_ptr->tval)
2755 switch (o_ptr->sval)
2757 case SV_RING_LORDLY:
2759 info[i++] = "¤½¤ì¤Ï´ö¤Ä¤«¤Î¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë¡£";
2761 info[i++] = "It provides some random resistances.";
2764 case SV_RING_WARNING:
2766 info[i++] = "¤½¤ì¤Ï¤Ò¤È¤Ä¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2768 info[i++] = "It may provide a low rank ESP.";
2775 switch (o_ptr->sval)
2777 case SV_AMULET_RESISTANCE:
2779 info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2781 info[i++] = "It may provides resistance to poison.";
2784 info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤ÊÂÑÀ¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
2786 info[i++] = "It may provide a random resistances.";
2789 case SV_AMULET_THE_MAGI:
2791 info[i++] = "¤½¤ì¤ÏºÇÂç¤Ç£³¤Ä¤Þ¤Ç¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë¡£";
2793 info[i++] = "It provides up to three low rank ESPs.";
2801 if (have_flag(flgs, TR_IGNORE_ACID) &&
2802 have_flag(flgs, TR_IGNORE_ELEC) &&
2803 have_flag(flgs, TR_IGNORE_FIRE) &&
2804 have_flag(flgs, TR_IGNORE_COLD))
2807 info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2809 info[i++] = "It cannot be harmed by the elements.";
2814 if (have_flag(flgs, TR_IGNORE_ACID))
2817 info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2819 info[i++] = "It cannot be harmed by acid.";
2822 if (have_flag(flgs, TR_IGNORE_ELEC))
2825 info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2827 info[i++] = "It cannot be harmed by electricity.";
2830 if (have_flag(flgs, TR_IGNORE_FIRE))
2833 info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2835 info[i++] = "It cannot be harmed by fire.";
2838 if (have_flag(flgs, TR_IGNORE_COLD))
2841 info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
2843 info[i++] = "It cannot be harmed by cold.";
2848 if (mode & SCROBJ_FORCE_DETAIL) trivial_info = 0;
2850 /* No relevant informations */
2851 if (i <= trivial_info) return (FALSE);
2853 /* Save the screen */
2857 Term_get_size(&wid, &hgt);
2859 /* Display Item name */
2860 if (!(mode & SCROBJ_FAKE_OBJECT))
2861 object_desc(o_name, o_ptr, 0);
2863 object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
2867 /* Erase the screen */
2868 for (k = 1; k < hgt; k++) prt("", k, 13);
2870 /* Label the information */
2871 if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
2873 monster_race *r_ptr = &r_info[o_ptr->pval];
2874 int namelen = strlen(r_name + r_ptr->name);
2875 prt(format("%s: '", r_name + r_ptr->name), 1, 15);
2876 Term_queue_bigchar(18 + namelen, 1, r_ptr->x_attr, r_ptr->x_char, 0, 0);
2877 prt("'", 1, (use_bigtile ? 20 : 19) + namelen);
2881 prt(" ¥¢¥¤¥Æ¥à¤ÎǽÎÏ:", 1, 15);
2883 prt(" Item Attributes:", 1, 15);
2886 /* We will print on top of the map (column 13) */
2887 for (k = 2, j = 0; j < i; j++)
2890 prt(info[j], k++, 15);
2892 /* Every 20 entries (lines 2 to 21), start over */
2893 if ((k == hgt - 2) && (j+1 < i))
2896 prt("-- ³¤¯ --", k, 15);
2898 prt("-- more --", k, 15);
2901 for (; k > 2; k--) prt("", k, 15);
2907 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 15);
2909 prt("[Press any key to continue]", k, 15);
2914 /* Restore the screen */
2917 /* Gave knowledge */
2924 * Convert an inventory index into a one character label
2925 * Note that the label does NOT distinguish inven/equip.
2927 char index_to_label(int i)
2929 /* Indexes for "inven" are easy */
2930 if (i < INVEN_RARM) return (I2A(i));
2932 /* Indexes for "equip" are offset */
2933 return (I2A(i - INVEN_RARM));
2938 * Convert a label into the index of an item in the "inven"
2939 * Return "-1" if the label does not indicate a real item
2941 s16b label_to_inven(int c)
2946 i = (islower(c) ? A2I(c) : -1);
2948 /* Verify the index */
2949 if ((i < 0) || (i > INVEN_PACK)) return (-1);
2951 /* Empty slots can never be chosen */
2952 if (!inventory[i].k_idx) return (-1);
2954 /* Return the index */
2960 extern bool select_ring_slot;
2963 static bool is_ring_slot(int i)
2965 return (i == INVEN_RIGHT) || (i == INVEN_LEFT);
2970 * Convert a label into the index of a item in the "equip"
2971 * Return "-1" if the label does not indicate a real item
2973 s16b label_to_equip(int c)
2978 i = (islower(c) ? A2I(c) : -1) + INVEN_RARM;
2980 /* Verify the index */
2981 if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
2983 if (select_ring_slot) return is_ring_slot(i) ? i : -1;
2985 /* Empty slots can never be chosen */
2986 if (!inventory[i].k_idx) return (-1);
2988 /* Return the index */
2995 * Determine which equipment slot (if any) an item likes
2997 s16b wield_slot(object_type *o_ptr)
2999 /* Slot for equipment */
3000 switch (o_ptr->tval)
3007 if (!inventory[INVEN_RARM].k_idx) return (INVEN_RARM);
3008 if (inventory[INVEN_LARM].k_idx) return (INVEN_RARM);
3009 return (INVEN_LARM);
3016 if (!inventory[INVEN_LARM].k_idx) return (INVEN_LARM);
3017 if (inventory[INVEN_RARM].k_idx) return (INVEN_LARM);
3018 return (INVEN_RARM);
3028 /* Use the right hand first */
3029 if (!inventory[INVEN_RIGHT].k_idx) return (INVEN_RIGHT);
3031 /* Use the left hand for swapping (by default) */
3032 return (INVEN_LEFT);
3038 return (INVEN_NECK);
3043 return (INVEN_LITE);
3050 return (INVEN_BODY);
3055 return (INVEN_OUTER);
3061 return (INVEN_HEAD);
3066 return (INVEN_HANDS);
3071 return (INVEN_FEET);
3075 /* No slot available */
3081 * Return a string mentioning how a given item is carried
3083 cptr mention_use(int i)
3087 /* Examine the location */
3091 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->migite) ? " ξ¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê")); break;
3093 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "Just lifting" : (p_ptr->migite ? "Wielding" : "On arm"); break;
3097 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->hidarite) ? " ξ¼ê" : (left_hander ? " ±¦¼ê" : " º¸¼ê")); break;
3099 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "Just lifting" : (p_ptr->hidarite ? "Wielding" : "On arm"); break;
3103 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "±¿ÈÂÃæ" : "¼Í·âÍÑ"; break;
3105 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "Just holding" : "Shooting"; break;
3109 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
3111 case INVEN_RIGHT: p = (left_hander ? "On left hand" : "On right hand"); break;
3115 case INVEN_LEFT: p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
3117 case INVEN_LEFT: p = (left_hander ? "On right hand" : "On left hand"); break;
3121 case INVEN_NECK: p = " ¼ó"; break;
3123 case INVEN_NECK: p = "Around neck"; break;
3127 case INVEN_LITE: p = " ¸÷¸»"; break;
3129 case INVEN_LITE: p = "Light source"; break;
3133 case INVEN_BODY: p = " ÂÎ"; break;
3135 case INVEN_BODY: p = "On body"; break;
3139 case INVEN_OUTER: p = "ÂΤξå"; break;
3141 case INVEN_OUTER: p = "About body"; break;
3145 case INVEN_HEAD: p = " Ƭ"; break;
3147 case INVEN_HEAD: p = "On head"; break;
3151 case INVEN_HANDS: p = " ¼ê"; break;
3153 case INVEN_HANDS: p = "On hands"; break;
3157 case INVEN_FEET: p = " "; break;
3159 case INVEN_FEET: p = "On feet"; break;
3163 default: p = "¥¶¥Ã¥¯"; break;
3165 default: p = "In pack"; break;
3169 /* Return the result */
3175 * Return a string describing how a given item is being worn.
3176 * Currently, only used for items in the equipment, not inventory.
3178 cptr describe_use(int i)
3185 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->migite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
3187 case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "just lifting" : (p_ptr->migite ? "attacking monsters with" : "wearing on your arm"); break;
3191 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->hidarite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
3193 case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "just lifting" : (p_ptr->hidarite ? "attacking monsters with" : "wearing on your arm"); break;
3197 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î" : "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
3199 case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "just holding" : "shooting missiles with"; break;
3203 case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3205 case INVEN_RIGHT: p = (left_hander ? "wearing on your left hand" : "wearing on your right hand"); break;
3209 case INVEN_LEFT: p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
3211 case INVEN_LEFT: p = (left_hander ? "wearing on your right hand" : "wearing on your left hand"); break;
3215 case INVEN_NECK: p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
3217 case INVEN_NECK: p = "wearing around your neck"; break;
3221 case INVEN_LITE: p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
3223 case INVEN_LITE: p = "using to light the way"; break;
3227 case INVEN_BODY: p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
3229 case INVEN_BODY: p = "wearing on your body"; break;
3233 case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
3235 case INVEN_OUTER: p = "wearing on your back"; break;
3239 case INVEN_HEAD: p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
3241 case INVEN_HEAD: p = "wearing on your head"; break;
3245 case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
3247 case INVEN_HANDS: p = "wearing on your hands"; break;
3251 case INVEN_FEET: p = "¤ˤϤ¤¤Æ¤¤¤ë"; break;
3253 case INVEN_FEET: p = "wearing on your feet"; break;
3257 default: p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
3259 default: p = "carrying in your pack"; break;
3263 /* Return the result */
3268 /* Hack: Check if a spellbook is one of the realms we can use. -- TY */
3270 bool check_book_realm(const byte book_tval, const byte book_sval)
3272 if (book_tval < TV_LIFE_BOOK) return FALSE;
3273 if (p_ptr->pclass == CLASS_SORCERER)
3275 return is_magic(tval2realm(book_tval));
3277 else if (p_ptr->pclass == CLASS_RED_MAGE)
3279 if (is_magic(tval2realm(book_tval)))
3280 return ((book_tval == TV_ARCANE_BOOK) || (book_sval < 2));
3282 return (REALM1_BOOK == book_tval || REALM2_BOOK == book_tval);
3287 * Check an item against the item tester info
3289 bool item_tester_okay(object_type *o_ptr)
3291 /* Hack -- allow listing empty slots */
3292 if (item_tester_full) return (TRUE);
3294 /* Require an item */
3295 if (!o_ptr->k_idx) return (FALSE);
3297 /* Hack -- ignore "gold" */
3298 if (o_ptr->tval == TV_GOLD)
3301 extern bool show_gold_on_floor;
3303 if (!show_gold_on_floor) return (FALSE);
3306 /* Check the tval */
3307 if (item_tester_tval)
3309 /* Is it a spellbook? If so, we need a hack -- TY */
3310 if ((item_tester_tval <= TV_DEATH_BOOK) &&
3311 (item_tester_tval >= TV_LIFE_BOOK))
3312 return check_book_realm(o_ptr->tval, o_ptr->sval);
3314 if (item_tester_tval != o_ptr->tval) return (FALSE);
3317 /* Check the hook */
3318 if (item_tester_hook)
3320 if (!(*item_tester_hook)(o_ptr)) return (FALSE);
3331 * Choice window "shadow" of the "show_inven()" function
3333 void display_inven(void)
3335 register int i, n, z = 0;
3337 byte attr = TERM_WHITE;
3339 char o_name[MAX_NLEN];
3343 Term_get_size(&wid, &hgt);
3345 /* Find the "final" slot */
3346 for (i = 0; i < INVEN_PACK; i++)
3348 o_ptr = &inventory[i];
3350 /* Skip non-objects */
3351 if (!o_ptr->k_idx) continue;
3357 /* Display the pack */
3358 for (i = 0; i < z; i++)
3360 /* Examine the item */
3361 o_ptr = &inventory[i];
3363 /* Start with an empty "index" */
3364 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
3366 /* Is this item "acceptable"? */
3367 if (item_tester_okay(o_ptr))
3369 /* Prepare an "index" */
3370 tmp_val[0] = index_to_label(i);
3372 /* Bracket the "index" --(-- */
3376 /* Display the index (or blank space) */
3377 Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
3379 /* Obtain an item description */
3380 object_desc(o_name, o_ptr, 0);
3382 /* Obtain the length of the description */
3386 attr = tval_to_attr[o_ptr->tval % 128];
3388 /* Grey out charging items */
3394 /* Display the entry itself */
3395 Term_putstr(3, i, n, attr, o_name);
3397 /* Erase the rest of the line */
3398 Term_erase(3+n, i, 255);
3400 /* Display the weight if needed */
3403 int wgt = o_ptr->weight * o_ptr->number;
3405 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt),lbtokg2(wgt) );
3407 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3410 prt(tmp_val, i, wid - 9);
3414 /* Erase the rest of the window */
3415 for (i = z; i < hgt; i++)
3417 /* Erase the line */
3418 Term_erase(0, i, 255);
3425 * Choice window "shadow" of the "show_equip()" function
3427 void display_equip(void)
3431 byte attr = TERM_WHITE;
3433 char o_name[MAX_NLEN];
3437 Term_get_size(&wid, &hgt);
3439 /* Display the equipment */
3440 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
3442 /* Examine the item */
3443 o_ptr = &inventory[i];
3445 /* Start with an empty "index" */
3446 tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
3448 /* Is this item "acceptable"? */
3449 if (select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr))
3451 /* Prepare an "index" */
3452 tmp_val[0] = index_to_label(i);
3454 /* Bracket the "index" --(-- */
3458 /* Display the index (or blank space) */
3459 Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
3461 /* Obtain an item description */
3462 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
3465 strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
3467 strcpy(o_name, "(wielding with two-hands)");
3473 object_desc(o_name, o_ptr, 0);
3474 attr = tval_to_attr[o_ptr->tval % 128];
3477 /* Obtain the length of the description */
3480 /* Grey out charging items */
3486 /* Display the entry itself */
3487 Term_putstr(3, i - INVEN_RARM, n, attr, o_name);
3489 /* Erase the rest of the line */
3490 Term_erase(3+n, i - INVEN_RARM, 255);
3492 /* Display the weight (if needed) */
3495 int wgt = o_ptr->weight * o_ptr->number;
3497 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
3499 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3502 prt(tmp_val, i - INVEN_RARM, wid - (show_labels ? 28 : 9));
3505 /* Display the slot description (if needed) */
3508 Term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
3509 prt(mention_use(i), i - INVEN_RARM, wid - 15);
3513 /* Erase the rest of the window */
3514 for (i = INVEN_TOTAL - INVEN_RARM; i < hgt; i++)
3516 /* Clear that line */
3517 Term_erase(0, i, 255);
3523 * Find the "first" inventory object with the given "tag".
3525 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
3526 * inscription of an object. Alphabetical characters don't work as a
3529 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
3530 * and "x" is the "current" command_cmd code.
3532 static bool get_tag(int *cp, char tag, int mode)
3537 /* Extract index from mode */
3542 end = INVEN_TOTAL - 1;
3547 end = INVEN_PACK - 1;
3554 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
3556 /* Check every inventory object */
3557 for (i = start; i <= end; i++)
3559 object_type *o_ptr = &inventory[i];
3561 /* Skip non-objects */
3562 if (!o_ptr->k_idx) continue;
3564 /* Skip empty inscriptions */
3565 if (!o_ptr->inscription) continue;
3567 /* Skip non-choice */
3568 if (!item_tester_okay(o_ptr)) continue;
3571 s = my_strchr(quark_str(o_ptr->inscription), '@');
3573 /* Process all tags */
3576 /* Check the special tags */
3577 if ((s[1] == command_cmd) && (s[2] == tag))
3579 /* Save the actual inventory ID */
3586 /* Find another '@' */
3587 s = my_strchr(s + 1, '@');
3592 /**** Find a tag in the form of {@#} (allows only numerals) ***/
3594 /* Don't allow {@#} with '#' being alphabet */
3595 if (tag < '0' || '9' < tag)
3601 /* Check every object */
3602 for (i = start; i <= end; i++)
3604 object_type *o_ptr = &inventory[i];
3606 /* Skip non-objects */
3607 if (!o_ptr->k_idx) continue;
3609 /* Skip empty inscriptions */
3610 if (!o_ptr->inscription) continue;
3612 /* Skip non-choice */
3613 if (!item_tester_okay(o_ptr)) continue;
3616 s = my_strchr(quark_str(o_ptr->inscription), '@');
3618 /* Process all tags */
3621 /* Check the normal tags */
3624 /* Save the actual inventory ID */
3631 /* Find another '@' */
3632 s = my_strchr(s + 1, '@');
3642 * Find the "first" floor object with the given "tag".
3644 * A "tag" is a numeral "n" appearing as "@n" anywhere in the
3645 * inscription of an object. Alphabetical characters don't work as a
3648 * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
3649 * and "x" is the "current" command_cmd code.
3651 static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
3656 /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
3658 /* Check every object in the grid */
3659 for (i = 0; i < floor_num && i < 23; i++)
3661 object_type *o_ptr = &o_list[floor_list[i]];
3663 /* Skip empty inscriptions */
3664 if (!o_ptr->inscription) continue;
3667 s = my_strchr(quark_str(o_ptr->inscription), '@');
3669 /* Process all tags */
3672 /* Check the special tags */
3673 if ((s[1] == command_cmd) && (s[2] == tag))
3675 /* Save the actual floor object ID */
3682 /* Find another '@' */
3683 s = my_strchr(s + 1, '@');
3688 /**** Find a tag in the form of {@#} (allows only numerals) ***/
3690 /* Don't allow {@#} with '#' being alphabet */
3691 if (tag < '0' || '9' < tag)
3697 /* Check every object in the grid */
3698 for (i = 0; i < floor_num && i < 23; i++)
3700 object_type *o_ptr = &o_list[floor_list[i]];
3702 /* Skip empty inscriptions */
3703 if (!o_ptr->inscription) continue;
3706 s = my_strchr(quark_str(o_ptr->inscription), '@');
3708 /* Process all tags */
3711 /* Check the normal tags */
3714 /* Save the floor object ID */
3721 /* Find another '@' */
3722 s = my_strchr(s + 1, '@');
3732 * Move around label characters with correspond tags
3734 static void prepare_label_string(char *label, int mode)
3736 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
3737 int offset = (mode == USE_EQUIP) ? INVEN_RARM : 0;
3740 /* Prepare normal labels */
3741 strcpy(label, alphabet_chars);
3743 /* Move each label */
3744 for (i = 0; i < 52; i++)
3747 char c = alphabet_chars[i];
3749 /* Find a tag with this label */
3750 if (get_tag(&index, c, mode))
3752 /* Delete the overwritten label */
3753 if (label[i] == c) label[i] = ' ';
3755 /* Move the label to the place of corresponding tag */
3756 label[index - offset] = c;
3763 * Move around label characters with correspond tags (floor version)
3765 static void prepare_label_string_floor(char *label, int floor_list[], int floor_num)
3767 cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
3770 /* Prepare normal labels */
3771 strcpy(label, alphabet_chars);
3773 /* Move each label */
3774 for (i = 0; i < 52; i++)
3777 char c = alphabet_chars[i];
3779 /* Find a tag with this label */
3780 if (get_tag_floor(&index, c, floor_list, floor_num))
3782 /* Delete the overwritten label */
3783 if (label[i] == c) label[i] = ' ';
3785 /* Move the label to the place of corresponding tag */
3793 * Display the inventory.
3795 * Hack -- do not display "trailing" empty slots
3797 int show_inven(int target_item)
3799 int i, j, k, l, z = 0;
3800 int col, cur_col, len;
3802 char o_name[MAX_NLEN];
3806 char out_desc[23][MAX_NLEN];
3807 int target_item_label = 0;
3809 char inven_label[52 + 1];
3811 /* Starting column */
3815 Term_get_size(&wid, &hgt);
3817 /* Default "max-length" */
3818 len = wid - col - 1;
3821 /* Find the "final" slot */
3822 for (i = 0; i < INVEN_PACK; i++)
3824 o_ptr = &inventory[i];
3826 /* Skip non-objects */
3827 if (!o_ptr->k_idx) continue;
3833 prepare_label_string(inven_label, USE_INVEN);
3835 /* Display the inventory */
3836 for (k = 0, i = 0; i < z; i++)
3838 o_ptr = &inventory[i];
3840 /* Is this item acceptable? */
3841 if (!item_tester_okay(o_ptr)) continue;
3843 /* Describe the object */
3844 object_desc(o_name, o_ptr, 0);
3846 /* Save the object index, color, and description */
3848 out_color[k] = tval_to_attr[o_ptr->tval % 128];
3850 /* Grey out charging items */
3853 out_color[k] = TERM_L_DARK;
3856 (void)strcpy(out_desc[k], o_name);
3858 /* Find the predicted "line length" */
3859 l = strlen(out_desc[k]) + 5;
3861 /* Be sure to account for the weight */
3862 if (show_weights) l += 9;
3864 /* Account for icon if displayed */
3865 if (show_item_graph)
3868 if (use_bigtile) l++;
3871 /* Maintain the maximum length */
3872 if (l > len) len = l;
3874 /* Advance to next "line" */
3878 /* Find the column to start in */
3879 col = (len > wid - 4) ? 0 : (wid - len - 1);
3881 /* Output each entry */
3882 for (j = 0; j < k; j++)
3888 o_ptr = &inventory[i];
3890 /* Clear the line */
3891 prt("", j + 1, col ? col - 2 : col);
3893 if (use_menu && target_item)
3895 if (j == (target_item-1))
3898 strcpy(tmp_val, "¡Õ");
3900 strcpy(tmp_val, "> ");
3902 target_item_label = i;
3904 else strcpy(tmp_val, " ");
3906 else if (i <= INVEN_PACK)
3908 /* Prepare an index --(-- */
3909 sprintf(tmp_val, "%c)", inven_label[i]);
3913 /* Prepare an index --(-- */
3914 sprintf(tmp_val, "%c)", index_to_label(i));
3917 /* Clear the line with the (possibly indented) index */
3918 put_str(tmp_val, j + 1, col);
3922 /* Display graphics for object, if desired */
3923 if (show_item_graph)
3925 byte a = object_attr(o_ptr);
3926 char c = object_char(o_ptr);
3929 if (a & 0x80) a |= 0x40;
3932 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
3933 if (use_bigtile) cur_col++;
3939 /* Display the entry itself */
3940 c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
3942 /* Display the weight if needed */
3945 int wgt = o_ptr->weight * o_ptr->number;
3947 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
3949 (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
3952 prt(tmp_val, j + 1, wid - 9);
3956 /* Make a "shadow" below the list (only if needed) */
3957 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
3959 /* Save the new column */
3962 return target_item_label;
3968 * Display the equipment.
3970 int show_equip(int target_item)
3973 int col, cur_col, len;
3976 char o_name[MAX_NLEN];
3979 char out_desc[23][MAX_NLEN];
3980 int target_item_label = 0;
3982 char equip_label[52 + 1];
3984 /* Starting column */
3988 Term_get_size(&wid, &hgt);
3990 /* Maximal length */
3991 len = wid - col - 1;
3994 /* Scan the equipment list */
3995 for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
3997 o_ptr = &inventory[i];
3999 /* Is this item acceptable? */
4000 if (!(select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr)) &&
4001 (!((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute) ||
4002 item_tester_no_ryoute)) continue;
4005 object_desc(o_name, o_ptr, 0);
4007 if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
4010 (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
4012 (void)strcpy(out_desc[k],"(wielding with two-hands)");
4014 out_color[k] = TERM_WHITE;
4018 (void)strcpy(out_desc[k], o_name);
4019 out_color[k] = tval_to_attr[o_ptr->tval % 128];
4023 /* Grey out charging items */
4026 out_color[k] = TERM_L_DARK;
4029 /* Extract the maximal length (see below) */
4031 l = strlen(out_desc[k]) + (2 + 1);
4033 l = strlen(out_desc[k]) + (2 + 3);
4037 /* Increase length for labels (if needed) */
4039 if (show_labels) l += (7 + 2);
4041 if (show_labels) l += (14 + 2);
4045 /* Increase length for weight (if needed) */
4046 if (show_weights) l += 9;
4048 if (show_item_graph) l += 2;
4050 /* Maintain the max-length */
4051 if (l > len) len = l;
4053 /* Advance the entry */
4057 /* Hack -- Find a column to start in */
4059 col = (len > wid - 6) ? 0 : (wid - len - 1);
4061 col = (len > wid - 4) ? 0 : (wid - len - 1);
4064 prepare_label_string(equip_label, USE_EQUIP);
4066 /* Output each entry */
4067 for (j = 0; j < k; j++)
4073 o_ptr = &inventory[i];
4075 /* Clear the line */
4076 prt("", j + 1, col ? col - 2 : col);
4078 if (use_menu && target_item)
4080 if (j == (target_item-1))
4083 strcpy(tmp_val, "¡Õ");
4085 strcpy(tmp_val, "> ");
4087 target_item_label = i;
4089 else strcpy(tmp_val, " ");
4091 else if (i >= INVEN_RARM)
4093 /* Prepare an index --(-- */
4094 sprintf(tmp_val, "%c)", equip_label[i - INVEN_RARM]);
4098 /* Prepare an index --(-- */
4099 sprintf(tmp_val, "%c)", index_to_label(i));
4102 /* Clear the line with the (possibly indented) index */
4103 put_str(tmp_val, j+1, col);
4107 /* Display graphics for object, if desired */
4108 if (show_item_graph)
4110 byte a = object_attr(o_ptr);
4111 char c = object_char(o_ptr);
4114 if (a & 0x80) a |= 0x40;
4117 Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
4118 if (use_bigtile) cur_col++;
4126 /* Mention the use */
4128 (void)sprintf(tmp_val, "%-7s: ", mention_use(i));
4130 (void)sprintf(tmp_val, "%-14s: ", mention_use(i));
4133 put_str(tmp_val, j+1, cur_col);
4135 /* Display the entry itself */
4137 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
4139 c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
4146 /* Display the entry itself */
4147 c_put_str(out_color[j], out_desc[j], j+1, cur_col);
4150 /* Display the weight if needed */
4153 int wgt = o_ptr->weight * o_ptr->number;
4155 (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
4157 (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
4160 prt(tmp_val, j + 1, wid - 9);
4164 /* Make a "shadow" below the list (only if needed) */
4165 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
4167 /* Save the new column */
4170 return target_item_label;
4177 * Flip "inven" and "equip" in any sub-windows
4179 void toggle_inven_equip(void)
4184 for (j = 0; j < 8; j++)
4187 if (!angband_term[j]) continue;
4189 /* Flip inven to equip */
4190 if (window_flag[j] & (PW_INVEN))
4193 window_flag[j] &= ~(PW_INVEN);
4194 window_flag[j] |= (PW_EQUIP);
4197 p_ptr->window |= (PW_EQUIP);
4200 /* Flip inven to equip */
4201 else if (window_flag[j] & (PW_EQUIP))
4204 window_flag[j] &= ~(PW_EQUIP);
4205 window_flag[j] |= (PW_INVEN);
4208 p_ptr->window |= (PW_INVEN);
4216 * Verify the choice of an item.
4218 * The item can be negative to mean "item on floor".
4220 static bool verify(cptr prompt, int item)
4222 char o_name[MAX_NLEN];
4223 char out_val[MAX_NLEN+20];
4230 o_ptr = &inventory[item];
4236 o_ptr = &o_list[0 - item];
4240 object_desc(o_name, o_ptr, 0);
4244 (void)sprintf(out_val, "%s%s¤Ç¤¹¤«? ", prompt, o_name);
4246 (void)sprintf(out_val, "%s %s? ", prompt, o_name);
4251 return (get_check(out_val));
4256 * Hack -- allow user to "prevent" certain choices
4258 * The item can be negative to mean "item on floor".
4260 static bool get_item_allow(int item)
4266 if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
4271 o_ptr = &inventory[item];
4277 o_ptr = &o_list[0 - item];
4280 /* No inscription */
4281 if (!o_ptr->inscription) return (TRUE);
4284 s = my_strchr(quark_str(o_ptr->inscription), '!');
4286 /* Process preventions */
4289 /* Check the "restriction" */
4290 if ((s[1] == command_cmd) || (s[1] == '*'))
4292 /* Verify the choice */
4294 if (!verify("ËÜÅö¤Ë", item)) return (FALSE);
4296 if (!verify("Really try", item)) return (FALSE);
4301 /* Find another '!' */
4302 s = my_strchr(s + 1, '!');
4312 * Auxiliary function for "get_item()" -- test an index
4314 static bool get_item_okay(int i)
4317 if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
4319 if (select_ring_slot) return is_ring_slot(i);
4321 /* Verify the item */
4322 if (!item_tester_okay(&inventory[i])) return (FALSE);
4331 * Determine whether get_item() can get some item or not
4332 * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
4334 bool can_get_item(void)
4336 int j, floor_list[23], floor_num = 0;
4338 for (j = 0; j < INVEN_TOTAL; j++)
4339 if (item_tester_okay(&inventory[j]))
4342 floor_num = scan_floor(floor_list, py, px, 0x03);
4350 * Let the user select an item, save its "index"
4352 * Return TRUE only if an acceptable item was chosen by the user.
4354 * The selected item must satisfy the "item_tester_hook()" function,
4355 * if that hook is set, and the "item_tester_tval", if that value is set.
4357 * All "item_tester" restrictions are cleared before this function returns.
4359 * The user is allowed to choose acceptable items from the equipment,
4360 * inventory, or floor, respectively, if the proper flag was given,
4361 * and there are any acceptable items in that location.
4363 * The equipment or inventory are displayed (even if no acceptable
4364 * items are in that location) if the proper flag was given.
4366 * If there are no acceptable items available anywhere, and "str" is
4367 * not NULL, then it will be used as the text of a warning message
4368 * before the function returns.
4370 * Note that the user must press "-" to specify the item on the floor,
4371 * and there is no way to "examine" the item on the floor, while the
4372 * use of "capital" letters will "examine" an inventory/equipment item,
4373 * and prompt for its use.
4375 * If a legal item is selected from the inventory, we save it in "cp"
4376 * directly (0 to 35), and return TRUE.
4378 * If a legal item is selected from the floor, we save it in "cp" as
4379 * a negative (-1 to -511), and return TRUE.
4381 * If no item is available, we do nothing to "cp", and we display a
4382 * warning message, using "str" if available, and return FALSE.
4384 * If no item is selected, we do nothing to "cp", and return FALSE.
4386 * Global "p_ptr->command_new" is used when viewing the inventory or equipment
4387 * to allow the user to enter a command while viewing those screens, and
4388 * also to induce "auto-enter" of stores, and other such stuff.
4390 * Global "p_ptr->command_see" may be set before calling this function to start
4391 * out in "browse" mode. It is cleared before this function returns.
4393 * Global "p_ptr->command_wrk" is used to choose between equip/inven listings.
4394 * If it is TRUE then we are viewing inventory, else equipment.
4396 * We always erase the prompt when we are done, leaving a blank line,
4397 * or a warning message, if appropriate, if no items are available.
4399 bool get_item(int *cp, cptr pmt, cptr str, int mode)
4401 s16b this_o_idx, next_o_idx = 0;
4405 int j, k, i1, i2, e1, e2;
4415 bool allow_floor = FALSE;
4417 bool toggle = FALSE;
4423 extern bool select_the_force;
4425 int menu_line = (use_menu ? 1 : 0);
4431 static char prev_tag = '\0';
4432 char cur_tag = '\0';
4434 #endif /* ALLOW_REPEAT */
4436 #ifdef ALLOW_EASY_FLOOR /* TNB */
4438 if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
4440 #endif /* ALLOW_EASY_FLOOR -- TNB */
4443 if (mode & USE_EQUIP) equip = TRUE;
4444 if (mode & USE_INVEN) inven = TRUE;
4445 if (mode & USE_FLOOR) floor = TRUE;
4449 /* Get the item index */
4450 if (repeat_pull(cp))
4453 if (select_the_force && (*cp == INVEN_FORCE))
4455 item_tester_tval = 0;
4456 item_tester_hook = NULL;
4457 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4462 else if (floor && (*cp < 0))
4469 /* Acquire object */
4472 /* Validate the item */
4473 if (item_tester_okay(o_ptr))
4475 /* Forget restrictions */
4476 item_tester_tval = 0;
4477 item_tester_hook = NULL;
4478 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4485 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
4486 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
4488 if (prev_tag && command_cmd)
4490 /* Look up the tag and validate the item */
4491 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
4492 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
4493 else if (!get_item_okay(k)) /* Reject */;
4496 /* Accept that choice */
4499 /* Forget restrictions */
4500 item_tester_tval = 0;
4501 item_tester_hook = NULL;
4502 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4508 prev_tag = '\0'; /* prev_tag is no longer effective */
4511 /* Verify the item */
4512 else if (get_item_okay(*cp))
4514 /* Forget restrictions */
4515 item_tester_tval = 0;
4516 item_tester_hook = NULL;
4517 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
4525 #endif /* ALLOW_REPEAT */
4528 /* Paranoia XXX XXX XXX */
4535 /* No item selected */
4539 /* Full inventory */
4541 i2 = INVEN_PACK - 1;
4543 /* Forbid inventory */
4544 if (!inven) i2 = -1;
4547 for (j = 0; j < INVEN_PACK; j++)
4548 if (item_tester_okay(&inventory[j])) max_inven++;
4551 /* Restrict inventory indexes */
4552 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
4553 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
4556 /* Full equipment */
4558 e2 = INVEN_TOTAL - 1;
4560 /* Forbid equipment */
4561 if (!equip) e2 = -1;
4564 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
4565 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
4566 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
4569 /* Restrict equipment indexes */
4570 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
4571 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
4573 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
4577 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
4579 else if (p_ptr->hidarite) e1 = INVEN_RARM;
4583 /* Restrict floor usage */
4586 /* Scan all objects in the grid */
4587 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
4591 /* Acquire object */
4592 o_ptr = &o_list[this_o_idx];
4594 /* Acquire next object */
4595 next_o_idx = o_ptr->next_o_idx;
4597 /* Accept the item on the floor if legal */
4598 if (item_tester_okay(o_ptr) && (o_ptr->marked & OM_FOUND)) allow_floor = TRUE;
4602 /* Require at least one legal choice */
4603 if (!allow_floor && (i1 > i2) && (e1 > e2))
4605 /* Cancel p_ptr->command_see */
4606 command_see = FALSE;
4614 if (select_the_force) {
4620 /* Analyze choices */
4623 /* Hack -- Start on equipment if requested */
4624 if (command_see && command_wrk && equip)
4629 /* Use inventory if allowed */
4632 command_wrk = FALSE;
4635 /* Use equipment if allowed */
4641 /* Use inventory for floor */
4644 command_wrk = FALSE;
4650 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
4652 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
4654 /* Hack -- start out in "display" mode */
4662 /* Repeat until done */
4665 int get_item_label = 0;
4672 for (j = 0; j < 8; j++)
4675 if (!angband_term[j]) continue;
4677 /* Count windows displaying inven */
4678 if (window_flag[j] & (PW_INVEN)) ni++;
4680 /* Count windows displaying equip */
4681 if (window_flag[j] & (PW_EQUIP)) ne++;
4684 /* Toggle if needed */
4685 if ((command_wrk && ni && !ne) ||
4686 (!command_wrk && !ni && ne))
4689 toggle_inven_equip();
4696 p_ptr->window |= (PW_INVEN | PW_EQUIP);
4698 /* Redraw windows */
4702 /* Inventory screen */
4705 /* Redraw if needed */
4706 if (command_see) get_item_label = show_inven(menu_line);
4709 /* Equipment screen */
4712 /* Redraw if needed */
4713 if (command_see) get_item_label = show_equip(menu_line);
4716 /* Viewing inventory */
4719 /* Begin the prompt */
4721 sprintf(out_val, "»ý¤Áʪ:");
4723 sprintf(out_val, "Inven:");
4726 /* Some legal items */
4727 if ((i1 <= i2) && !use_menu)
4729 /* Build the prompt */
4731 sprintf(tmp_val, "%c-%c,'(',')',",
4733 sprintf(tmp_val, " %c-%c,'(',')',",
4735 index_to_label(i1), index_to_label(i2));
4738 strcat(out_val, tmp_val);
4741 /* Indicate ability to "view" */
4743 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
4745 if (!command_see && !use_menu) strcat(out_val, " * to see,");
4750 if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
4752 if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
4756 /* Viewing equipment */
4759 /* Begin the prompt */
4761 sprintf(out_val, "ÁõÈ÷ÉÊ:");
4763 sprintf(out_val, "Equip:");
4766 /* Some legal items */
4767 if ((e1 <= e2) && !use_menu)
4769 /* Build the prompt */
4771 sprintf(tmp_val, "%c-%c,'(',')',",
4773 sprintf(tmp_val, " %c-%c,'(',')',",
4775 index_to_label(e1), index_to_label(e2));
4778 strcat(out_val, tmp_val);
4781 /* Indicate ability to "view" */
4783 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
4785 if (!command_see) strcat(out_val, " * to see,");
4790 if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
4792 if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
4796 /* Indicate legality of the "floor" item */
4798 if (allow_floor) strcat(out_val, " '-'¾²¾å,");
4799 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
4801 if (allow_floor) strcat(out_val, " - for floor,");
4802 if (select_the_force) strcat(out_val, " w for the Force,");
4805 /* Finish the prompt */
4806 strcat(out_val, " ESC");
4808 /* Build the prompt */
4809 sprintf(tmp_val, "(%s) %s", out_val, pmt);
4811 /* Show the prompt */
4819 int max_line = (command_wrk ? max_equip : max_inven);
4835 menu_line += (max_line - 1);
4854 /* Verify legality */
4855 if (!inven || !equip)
4861 /* Hack -- Fix screen */
4871 /* Switch inven/equip */
4872 command_wrk = !command_wrk;
4873 max_line = (command_wrk ? max_equip : max_inven);
4874 if (menu_line > max_line) menu_line = max_line;
4876 /* Need to redraw */
4885 if (command_wrk == USE_FLOOR)
4888 (*cp) = -get_item_label;
4892 /* Validate the item */
4893 if (!get_item_okay(get_item_label))
4899 /* Allow player to "refuse" certain actions */
4900 if (!get_item_allow(get_item_label))
4906 /* Accept that choice */
4907 (*cp) = get_item_label;
4916 if (select_the_force) {
4924 if (menu_line > max_line) menu_line -= max_line;
4945 command_see = FALSE;
4965 /* Verify legality */
4966 if (!inven || !equip)
4972 /* Hack -- Fix screen */
4982 /* Switch inven/equip */
4983 command_wrk = !command_wrk;
4985 /* Need to redraw */
4991 /* Use floor item */
4994 /* Scan all objects in the grid */
4995 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
4999 /* Acquire object */
5000 o_ptr = &o_list[this_o_idx];
5002 /* Acquire next object */
5003 next_o_idx = o_ptr->next_o_idx;
5005 /* Validate the item */
5006 if (!item_tester_okay(o_ptr)) continue;
5011 /* Verify the item (if required) */
5013 if (other_query_flag && !verify("ËÜÅö¤Ë", k)) continue;
5015 if (other_query_flag && !verify("Try", k)) continue;
5019 /* Allow player to "refuse" certain actions */
5020 if (!get_item_allow(k)) continue;
5022 /* Accept that choice */
5039 case '1': case '2': case '3':
5040 case '4': case '5': case '6':
5041 case '7': case '8': case '9':
5043 /* Look up the tag */
5044 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
5050 /* Hack -- Validate the item */
5051 if ((k < INVEN_RARM) ? !inven : !equip)
5057 /* Validate the item */
5058 if (!get_item_okay(k))
5064 /* Allow player to "refuse" certain actions */
5065 if (!get_item_allow(k))
5071 /* Accept that choice */
5077 #endif /* ALLOW_REPEAT */
5085 /* Choose "default" inventory item */
5088 k = ((i1 == i2) ? i1 : -1);
5091 /* Choose "default" equipment item */
5094 k = ((e1 == e2) ? e1 : -1);
5097 /* Validate the item */
5098 if (!get_item_okay(k))
5104 /* Allow player to "refuse" certain actions */
5105 if (!get_item_allow(k))
5111 /* Accept that choice */
5121 if (select_the_force) {
5134 bool not_found = FALSE;
5136 /* Look up the alphabetical tag */
5137 if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
5142 /* Hack -- Validate the item */
5143 else if ((k < INVEN_RARM) ? !inven : !equip)
5148 /* Validate the item */
5149 else if (!get_item_okay(k))
5156 /* Accept that choice */
5162 #endif /* ALLOW_REPEAT */
5166 /* Extract "query" setting */
5167 ver = isupper(which);
5168 which = tolower(which);
5170 /* Convert letter to inventory index */
5173 if (which == '(') k = i1;
5174 else if (which == ')') k = i2;
5175 else k = label_to_inven(which);
5178 /* Convert letter to equipment index */
5181 if (which == '(') k = e1;
5182 else if (which == ')') k = e2;
5183 else k = label_to_equip(which);
5186 /* Validate the item */
5187 if (!get_item_okay(k))
5193 /* Verify the item */
5195 if (ver && !verify("ËÜÅö¤Ë", k))
5197 if (ver && !verify("Try", k))
5205 /* Allow player to "refuse" certain actions */
5206 if (!get_item_allow(k))
5212 /* Accept that choice */
5223 /* Fix the screen if necessary */
5229 /* Hack -- Cancel "display" */
5230 command_see = FALSE;
5234 /* Forget the item_tester_tval restriction */
5235 item_tester_tval = 0;
5237 item_tester_no_ryoute = FALSE;
5239 /* Forget the item_tester_hook restriction */
5240 item_tester_hook = NULL;
5243 /* Clean up 'show choices' */
5244 /* Toggle again if needed */
5245 if (toggle) toggle_inven_equip();
5248 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5254 /* Clear the prompt line */
5257 /* Warning if needed */
5258 if (oops && str) msg_print(str);
5264 if (command_cmd) prev_tag = cur_tag;
5265 #endif /* ALLOW_REPEAT */
5267 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5275 #ifdef ALLOW_EASY_FLOOR
5280 * Return a list of o_list[] indexes of items at the given cave
5281 * location. Valid flags are:
5283 * mode & 0x01 -- Item tester
5284 * mode & 0x02 -- Marked items only
5285 * mode & 0x04 -- Stop after first
5287 int scan_floor(int *items, int y, int x, int mode)
5289 int this_o_idx, next_o_idx;
5294 if (!in_bounds(y, x)) return 0;
5296 /* Scan all objects in the grid */
5297 for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
5301 /* Acquire object */
5302 o_ptr = &o_list[this_o_idx];
5304 /* Acquire next object */
5305 next_o_idx = o_ptr->next_o_idx;
5308 if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
5311 if ((mode & 0x02) && !(o_ptr->marked & OM_FOUND)) continue;
5313 /* Accept this item */
5314 /* XXX Hack -- Enforce limit */
5316 items[num] = this_o_idx;
5321 if (mode & 0x04) break;
5330 * Display a list of the items on the floor at the given location.
5332 int show_floor(int target_item, int y, int x, int *min_width)
5339 char o_name[MAX_NLEN];
5345 char out_desc[23][MAX_NLEN];
5346 int target_item_label = 0;
5348 int floor_list[23], floor_num;
5350 char floor_label[52 + 1];
5352 bool dont_need_to_show_weights = TRUE;
5355 Term_get_size(&wid, &hgt);
5357 /* Default length */
5358 len = MAX((*min_width), 20);
5361 /* Scan for objects in the grid, using item_tester_okay() */
5362 floor_num = scan_floor(floor_list, y, x, 0x03);
5364 /* Display the floor objects */
5365 for (k = 0, i = 0; i < floor_num && i < 23; i++)
5367 o_ptr = &o_list[floor_list[i]];
5369 /* Describe the object */
5370 object_desc(o_name, o_ptr, 0);
5372 /* Save the index */
5375 /* Acquire inventory color */
5376 out_color[k] = tval_to_attr[o_ptr->tval & 0x7F];
5378 /* Save the object description */
5379 strcpy(out_desc[k], o_name);
5381 /* Find the predicted "line length" */
5382 l = strlen(out_desc[k]) + 5;
5384 /* Be sure to account for the weight */
5385 if (show_weights) l += 9;
5387 if (o_ptr->tval != TV_GOLD) dont_need_to_show_weights = FALSE;
5389 /* Maintain the maximum length */
5390 if (l > len) len = l;
5392 /* Advance to next "line" */
5396 if (show_weights && dont_need_to_show_weights) len -= 9;
5401 /* Find the column to start in */
5402 col = (len > wid - 4) ? 0 : (wid - len - 1);
5404 prepare_label_string_floor(floor_label, floor_list, floor_num);
5406 /* Output each entry */
5407 for (j = 0; j < k; j++)
5410 i = floor_list[out_index[j]];
5415 /* Clear the line */
5416 prt("", j + 1, col ? col - 2 : col);
5418 if (use_menu && target_item)
5420 if (j == (target_item-1))
5423 strcpy(tmp_val, "¡Õ");
5425 strcpy(tmp_val, "> ");
5427 target_item_label = i;
5429 else strcpy(tmp_val, " ");
5433 /* Prepare an index --(-- */
5434 sprintf(tmp_val, "%c)", floor_label[j]);
5437 /* Clear the line with the (possibly indented) index */
5438 put_str(tmp_val, j + 1, col);
5440 /* Display the entry itself */
5441 c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
5443 /* Display the weight if needed */
5444 if (show_weights && (o_ptr->tval != TV_GOLD))
5446 int wgt = o_ptr->weight * o_ptr->number;
5448 sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
5450 sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
5453 prt(tmp_val, j + 1, wid - 9);
5457 /* Make a "shadow" below the list (only if needed) */
5458 if (j && (j < 23)) prt("", j + 1, col ? col - 2 : col);
5460 return target_item_label;
5464 * This version of get_item() is called by get_item() when
5465 * the easy_floor is on.
5467 bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
5469 char n1 = ' ', n2 = ' ', which = ' ';
5471 int j, k, i1, i2, e1, e2;
5478 bool equip = (mode & USE_EQUIP) ? TRUE : FALSE;
5479 bool inven = (mode & USE_INVEN) ? TRUE : FALSE;
5480 bool floor = (mode & USE_FLOOR) ? TRUE : FALSE;
5482 bool allow_equip = FALSE;
5483 bool allow_inven = FALSE;
5484 bool allow_floor = FALSE;
5486 bool toggle = FALSE;
5491 int floor_num, floor_list[23], floor_top = 0;
5494 extern bool select_the_force;
5496 int menu_line = (use_menu ? 1 : 0);
5502 static char prev_tag = '\0';
5503 char cur_tag = '\0';
5505 /* Get the item index */
5506 if (repeat_pull(cp))
5509 if (select_the_force && (*cp == INVEN_FORCE))
5511 item_tester_tval = 0;
5512 item_tester_hook = NULL;
5513 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5518 else if (floor && (*cp < 0))
5520 if (prev_tag && command_cmd)
5522 /* Scan all objects in the grid */
5523 floor_num = scan_floor(floor_list, py, px, 0x03);
5525 /* Look up the tag */
5526 if (get_tag_floor(&k, prev_tag, floor_list, floor_num))
5528 /* Accept that choice */
5529 (*cp) = 0 - floor_list[k];
5531 /* Forget restrictions */
5532 item_tester_tval = 0;
5533 item_tester_hook = NULL;
5534 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5540 prev_tag = '\0'; /* prev_tag is no longer effective */
5543 /* Validate the item */
5544 else if (item_tester_okay(&o_list[0 - (*cp)]))
5546 /* Forget restrictions */
5547 item_tester_tval = 0;
5548 item_tester_hook = NULL;
5549 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5556 else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
5557 (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
5559 if (prev_tag && command_cmd)
5561 /* Look up the tag and validate the item */
5562 if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
5563 else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
5564 else if (!get_item_okay(k)) /* Reject */;
5567 /* Accept that choice */
5570 /* Forget restrictions */
5571 item_tester_tval = 0;
5572 item_tester_hook = NULL;
5573 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5579 prev_tag = '\0'; /* prev_tag is no longer effective */
5582 /* Verify the item */
5583 else if (get_item_okay(*cp))
5585 /* Forget restrictions */
5586 item_tester_tval = 0;
5587 item_tester_hook = NULL;
5588 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
5596 #endif /* ALLOW_REPEAT */
5599 /* Paranoia XXX XXX XXX */
5606 /* No item selected */
5610 /* Full inventory */
5612 i2 = INVEN_PACK - 1;
5614 /* Forbid inventory */
5615 if (!inven) i2 = -1;
5618 for (j = 0; j < INVEN_PACK; j++)
5619 if (item_tester_okay(&inventory[j])) max_inven++;
5622 /* Restrict inventory indexes */
5623 while ((i1 <= i2) && (!get_item_okay(i1))) i1++;
5624 while ((i1 <= i2) && (!get_item_okay(i2))) i2--;
5627 /* Full equipment */
5629 e2 = INVEN_TOTAL - 1;
5631 /* Forbid equipment */
5632 if (!equip) e2 = -1;
5635 for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
5636 if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
5637 if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
5640 /* Restrict equipment indexes */
5641 while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
5642 while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
5644 if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
5648 if (e2 < INVEN_LARM) e2 = INVEN_LARM;
5650 else if (p_ptr->hidarite) e1 = INVEN_RARM;
5654 /* Count "okay" floor items */
5657 /* Restrict floor usage */
5660 /* Scan all objects in the grid */
5661 floor_num = scan_floor(floor_list, py, px, 0x03);
5664 /* Accept inventory */
5665 if (i1 <= i2) allow_inven = TRUE;
5667 /* Accept equipment */
5668 if (e1 <= e2) allow_equip = TRUE;
5671 if (floor_num) allow_floor = TRUE;
5673 /* Require at least one legal choice */
5674 if (!allow_inven && !allow_equip && !allow_floor)
5676 /* Cancel p_ptr->command_see */
5677 command_see = FALSE;
5685 if (select_the_force) {
5691 /* Analyze choices */
5694 /* Hack -- Start on equipment if requested */
5695 if (command_see && (command_wrk == (USE_EQUIP))
5698 command_wrk = (USE_EQUIP);
5701 /* Use inventory if allowed */
5702 else if (allow_inven)
5704 command_wrk = (USE_INVEN);
5707 /* Use equipment if allowed */
5708 else if (allow_equip)
5710 command_wrk = (USE_EQUIP);
5713 /* Use floor if allowed */
5714 else if (allow_floor)
5716 command_wrk = (USE_FLOOR);
5721 * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
5723 if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
5725 /* Hack -- start out in "display" mode */
5732 /* Repeat until done */
5735 int get_item_label = 0;
5742 for (j = 0; j < 8; j++)
5745 if (!angband_term[j]) continue;
5747 /* Count windows displaying inven */
5748 if (window_flag[j] & (PW_INVEN)) ni++;
5750 /* Count windows displaying equip */
5751 if (window_flag[j] & (PW_EQUIP)) ne++;
5754 /* Toggle if needed */
5755 if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
5756 (command_wrk == (USE_INVEN) && !ni && ne))
5759 toggle_inven_equip();
5766 p_ptr->window |= (PW_INVEN | PW_EQUIP);
5768 /* Redraw windows */
5771 /* Inventory screen */
5772 if (command_wrk == (USE_INVEN))
5774 /* Extract the legal requests */
5778 /* Redraw if needed */
5779 if (command_see) get_item_label = show_inven(menu_line);
5782 /* Equipment screen */
5783 else if (command_wrk == (USE_EQUIP))
5785 /* Extract the legal requests */
5786 n1 = I2A(e1 - INVEN_RARM);
5787 n2 = I2A(e2 - INVEN_RARM);
5789 /* Redraw if needed */
5790 if (command_see) get_item_label = show_equip(menu_line);
5794 else if (command_wrk == (USE_FLOOR))
5797 k = MIN(floor_top + 23, floor_num) - 1;
5799 /* Extract the legal requests */
5800 n1 = I2A(j - floor_top);
5801 n2 = I2A(k - floor_top);
5803 /* Redraw if needed */
5804 if (command_see) get_item_label = show_floor(menu_line, py, px, &min_width);
5807 /* Viewing inventory */
5808 if (command_wrk == (USE_INVEN))
5810 /* Begin the prompt */
5812 sprintf(out_val, "»ý¤Áʪ:");
5814 sprintf(out_val, "Inven:");
5819 /* Build the prompt */
5821 sprintf(tmp_val, "%c-%c,'(',')',",
5823 sprintf(tmp_val, " %c-%c,'(',')',",
5825 index_to_label(i1), index_to_label(i2));
5828 strcat(out_val, tmp_val);
5831 /* Indicate ability to "view" */
5833 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5835 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5843 strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
5844 else if (allow_floor)
5845 strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
5847 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
5850 strcat(out_val, " / for Equip,");
5851 else if (allow_floor)
5852 strcat(out_val, " 6 for Equip,");
5854 strcat(out_val, " 4 or 6 for Equip,");
5863 strcat(out_val, " '-'¾²¾å,");
5864 else if (allow_equip)
5865 strcat(out_val, " '4' ¾²¾å,");
5867 strcat(out_val, " '4'or'6' ¾²¾å,");
5870 strcat(out_val, " - for floor,");
5871 else if (allow_equip)
5872 strcat(out_val, " 4 for floor,");
5874 strcat(out_val, " 4 or 6 for floor,");
5879 /* Viewing equipment */
5880 else if (command_wrk == (USE_EQUIP))
5882 /* Begin the prompt */
5884 sprintf(out_val, "ÁõÈ÷ÉÊ:");
5886 sprintf(out_val, "Equip:");
5891 /* Build the prompt */
5893 sprintf(tmp_val, "%c-%c,'(',')',",
5895 sprintf(tmp_val, " %c-%c,'(',')',",
5897 index_to_label(e1), index_to_label(e2));
5900 strcat(out_val, tmp_val);
5903 /* Indicate ability to "view" */
5905 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5907 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5915 strcat(out_val, " '/' »ý¤Áʪ,");
5916 else if (allow_floor)
5917 strcat(out_val, " '4' »ý¤Áʪ,");
5919 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
5922 strcat(out_val, " / for Inven,");
5923 else if (allow_floor)
5924 strcat(out_val, " 4 for Inven,");
5926 strcat(out_val, " 4 or 6 for Inven,");
5935 strcat(out_val, " '-'¾²¾å,");
5936 else if (allow_inven)
5937 strcat(out_val, " '6' ¾²¾å,");
5939 strcat(out_val, " '4'or'6' ¾²¾å,");
5942 strcat(out_val, " - for floor,");
5943 else if (allow_inven)
5944 strcat(out_val, " 6 for floor,");
5946 strcat(out_val, " 4 or 6 for floor,");
5952 else if (command_wrk == (USE_FLOOR))
5954 /* Begin the prompt */
5956 sprintf(out_val, "¾²¾å:");
5958 sprintf(out_val, "Floor:");
5963 /* Build the prompt */
5965 sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
5967 sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
5971 strcat(out_val, tmp_val);
5974 /* Indicate ability to "view" */
5976 if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
5978 if (!command_see && !use_menu) strcat(out_val, " * to see,");
5983 if (allow_inven && allow_equip)
5986 strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
5988 strcat(out_val, " 4 for Equip, 6 for Inven,");
5991 else if (allow_inven)
5994 strcat(out_val, " '4'or'6' »ý¤Áʪ,");
5996 strcat(out_val, " 4 or 6 for Inven,");
5999 else if (allow_equip)
6002 strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
6004 strcat(out_val, " 4 or 6 for Equip,");
6009 else if (allow_inven)
6012 strcat(out_val, " '/' »ý¤Áʪ,");
6014 strcat(out_val, " / for Inven,");
6017 else if (allow_equip)
6020 strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
6022 strcat(out_val, " / for Equip,");
6027 if (command_see && !use_menu)
6030 strcat(out_val, " Enter ¼¡,");
6032 strcat(out_val, " Enter for scroll down,");
6039 if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
6041 if (select_the_force) strcat(out_val, " w for the Force,");
6044 /* Finish the prompt */
6045 strcat(out_val, " ESC");
6047 /* Build the prompt */
6048 sprintf(tmp_val, "(%s) %s", out_val, pmt);
6050 /* Show the prompt */
6059 if (command_wrk == USE_INVEN) max_line = max_inven;
6060 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6061 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6077 menu_line += (max_line - 1);
6093 /* Verify legality */
6094 if (command_wrk == (USE_INVEN))
6096 if (allow_floor) command_wrk = USE_FLOOR;
6097 else if (allow_equip) command_wrk = USE_EQUIP;
6104 else if (command_wrk == (USE_EQUIP))
6106 if (allow_inven) command_wrk = USE_INVEN;
6107 else if (allow_floor) command_wrk = USE_FLOOR;
6114 else if (command_wrk == (USE_FLOOR))
6116 if (allow_equip) command_wrk = USE_EQUIP;
6117 else if (allow_inven) command_wrk = USE_INVEN;
6130 /* Hack -- Fix screen */
6140 /* Switch inven/equip */
6141 if (command_wrk == USE_INVEN) max_line = max_inven;
6142 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6143 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6144 if (menu_line > max_line) menu_line = max_line;
6146 /* Need to redraw */
6154 /* Verify legality */
6155 if (command_wrk == (USE_INVEN))
6157 if (allow_equip) command_wrk = USE_EQUIP;
6158 else if (allow_floor) command_wrk = USE_FLOOR;
6165 else if (command_wrk == (USE_EQUIP))
6167 if (allow_floor) command_wrk = USE_FLOOR;
6168 else if (allow_inven) command_wrk = USE_INVEN;
6175 else if (command_wrk == (USE_FLOOR))
6177 if (allow_inven) command_wrk = USE_INVEN;
6178 else if (allow_equip) command_wrk = USE_EQUIP;
6191 /* Hack -- Fix screen */
6201 /* Switch inven/equip */
6202 if (command_wrk == USE_INVEN) max_line = max_inven;
6203 else if (command_wrk == USE_EQUIP) max_line = max_equip;
6204 else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
6205 if (menu_line > max_line) menu_line = max_line;
6207 /* Need to redraw */
6216 if (command_wrk == USE_FLOOR)
6219 (*cp) = -get_item_label;
6223 /* Validate the item */
6224 if (!get_item_okay(get_item_label))
6230 /* Allow player to "refuse" certain actions */
6231 if (!get_item_allow(get_item_label))
6237 /* Accept that choice */
6238 (*cp) = get_item_label;
6247 if (select_the_force) {
6255 if (menu_line > max_line) menu_line -= max_line;
6276 command_see = FALSE;
6299 cave_type *c_ptr = &cave[py][px];
6301 if (command_wrk != (USE_FLOOR)) break;
6303 /* Get the object being moved. */
6304 o_idx = c_ptr->o_idx;
6306 /* Only rotate a pile of two or more objects. */
6307 if (!(o_idx && o_list[o_idx].next_o_idx)) break;
6309 /* Remove the first object from the list. */
6310 excise_object_idx(o_idx);
6312 /* Find end of the list. */
6314 while (o_list[i].next_o_idx)
6315 i = o_list[i].next_o_idx;
6317 /* Add after the last object. */
6318 o_list[i].next_o_idx = o_idx;
6320 /* Re-scan floor list */
6321 floor_num = scan_floor(floor_list, py, px, 0x03);
6323 /* Hack -- Fix screen */
6338 if (command_wrk == (USE_INVEN))
6345 command_wrk = (USE_EQUIP);
6347 else if (command_wrk == (USE_EQUIP))
6354 command_wrk = (USE_INVEN);
6356 else if (command_wrk == (USE_FLOOR))
6360 command_wrk = (USE_INVEN);
6362 else if (allow_equip)
6364 command_wrk = (USE_EQUIP);
6373 /* Hack -- Fix screen */
6383 /* Need to redraw */
6396 * If we are already examining the floor, and there
6397 * is only one item, we will always select it.
6398 * If we aren't examining the floor and there is only
6399 * one item, we will select it if floor_query_flag
6404 if ((command_wrk == (USE_FLOOR)) || (!carry_query_flag))
6407 k = 0 - floor_list[0];
6409 /* Allow player to "refuse" certain actions */
6410 if (!get_item_allow(k))
6416 /* Accept that choice */
6425 /* Hack -- Fix screen */
6435 command_wrk = (USE_FLOOR);
6441 case '1': case '2': case '3':
6442 case '4': case '5': case '6':
6443 case '7': case '8': case '9':
6445 if (command_wrk != USE_FLOOR)
6447 /* Look up the tag */
6448 if (!get_tag(&k, which, command_wrk))
6454 /* Hack -- Validate the item */
6455 if ((k < INVEN_RARM) ? !inven : !equip)
6461 /* Validate the item */
6462 if (!get_item_okay(k))
6470 /* Look up the alphabetical tag */
6471 if (get_tag_floor(&k, which, floor_list, floor_num))
6474 k = 0 - floor_list[k];
6483 /* Allow player to "refuse" certain actions */
6484 if (!get_item_allow(k))
6490 /* Accept that choice */
6496 #endif /* ALLOW_REPEAT */
6504 /* Choose "default" inventory item */
6505 if (command_wrk == (USE_INVEN))
6507 k = ((i1 == i2) ? i1 : -1);
6510 /* Choose "default" equipment item */
6511 else if (command_wrk == (USE_EQUIP))
6513 k = ((e1 == e2) ? e1 : -1);
6516 /* Choose "default" floor item */
6517 else if (command_wrk == (USE_FLOOR))
6522 k = 0 - floor_list[0];
6524 /* Allow player to "refuse" certain actions */
6525 if (!get_item_allow(k))
6531 /* Accept that choice */
6539 /* Validate the item */
6540 if (!get_item_okay(k))
6546 /* Allow player to "refuse" certain actions */
6547 if (!get_item_allow(k))
6553 /* Accept that choice */
6563 if (select_the_force) {
6577 if (command_wrk != USE_FLOOR)
6579 bool not_found = FALSE;
6581 /* Look up the alphabetical tag */
6582 if (!get_tag(&k, which, command_wrk))
6587 /* Hack -- Validate the item */
6588 else if ((k < INVEN_RARM) ? !inven : !equip)
6593 /* Validate the item */
6594 else if (!get_item_okay(k))
6601 /* Accept that choice */
6607 #endif /* ALLOW_REPEAT */
6613 /* Look up the alphabetical tag */
6614 if (get_tag_floor(&k, which, floor_list, floor_num))
6617 k = 0 - floor_list[k];
6619 /* Accept that choice */
6625 #endif /* ALLOW_REPEAT */
6630 /* Extract "query" setting */
6631 ver = isupper(which);
6632 which = tolower(which);
6634 /* Convert letter to inventory index */
6635 if (command_wrk == (USE_INVEN))
6637 if (which == '(') k = i1;
6638 else if (which == ')') k = i2;
6639 else k = label_to_inven(which);
6642 /* Convert letter to equipment index */
6643 else if (command_wrk == (USE_EQUIP))
6645 if (which == '(') k = e1;
6646 else if (which == ')') k = e2;
6647 else k = label_to_equip(which);
6650 /* Convert letter to floor index */
6651 else if (command_wrk == USE_FLOOR)
6653 if (which == '(') k = 0;
6654 else if (which == ')') k = floor_num - 1;
6655 else k = islower(which) ? A2I(which) : -1;
6656 if (k < 0 || k >= floor_num || k >= 23)
6663 k = 0 - floor_list[k];
6666 /* Validate the item */
6667 if ((command_wrk != USE_FLOOR) && !get_item_okay(k))
6673 /* Verify the item */
6675 if (ver && !verify("ËÜÅö¤Ë", k))
6677 if (ver && !verify("Try", k))
6685 /* Allow player to "refuse" certain actions */
6686 if (!get_item_allow(k))
6692 /* Accept that choice */
6702 /* Fix the screen if necessary */
6708 /* Hack -- Cancel "display" */
6709 command_see = FALSE;
6713 /* Forget the item_tester_tval restriction */
6714 item_tester_tval = 0;
6716 /* Forget the item_tester_hook restriction */
6717 item_tester_hook = NULL;
6720 /* Clean up 'show choices' */
6721 /* Toggle again if needed */
6722 if (toggle) toggle_inven_equip();
6725 p_ptr->window |= (PW_INVEN | PW_EQUIP);
6731 /* Clear the prompt line */
6734 /* Warning if needed */
6735 if (oops && str) msg_print(str);
6741 if (command_cmd) prev_tag = cur_tag;
6742 #endif /* ALLOW_REPEAT */
6744 command_cmd = 0; /* Hack -- command_cmd is no longer effective */
6752 static bool py_pickup_floor_aux(void)
6760 /* Restrict the choices */
6761 item_tester_hook = inven_carry_okay;
6765 q = "¤É¤ì¤ò½¦¤¤¤Þ¤¹¤«¡©";
6766 s = "¤â¤¦¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£";
6768 q = "Get which item? ";
6769 s = "You no longer have any room for the objects on the floor.";
6772 if (get_item(&item, q, s, (USE_FLOOR)))
6774 this_o_idx = 0 - item;
6781 /* Pick up the object */
6782 py_pickup_aux(this_o_idx);
6789 * Make the player carry everything in a grid
6791 * If "pickup" is FALSE then only gold will be picked up
6793 * This is called by py_pickup() when easy_floor is TRUE.
6795 void py_pickup_floor(bool pickup)
6797 s16b this_o_idx, next_o_idx = 0;
6799 char o_name[MAX_NLEN];
6802 int floor_num = 0, floor_list[23], floor_o_idx = 0;
6806 /* Scan the pile of objects */
6807 for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
6811 /* Access the object */
6812 o_ptr = &o_list[this_o_idx];
6814 /* Describe the object */
6815 object_desc(o_name, o_ptr, 0);
6817 /* Access the next object */
6818 next_o_idx = o_ptr->next_o_idx;
6820 /* Hack -- disturb */
6824 if (o_ptr->tval == TV_GOLD)
6828 msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
6829 (long)o_ptr->pval, o_name);
6831 msg_format("You have found %ld gold pieces worth of %s.",
6832 (long) o_ptr->pval, o_name);
6836 /* Collect the gold */
6837 p_ptr->au += o_ptr->pval;
6840 p_ptr->redraw |= (PR_GOLD);
6843 p_ptr->window |= (PW_PLAYER);
6845 /* Delete the gold */
6846 delete_object_idx(this_o_idx);
6848 /* Check the next object */
6851 else if (o_ptr->marked & OM_NOMSG)
6853 /* If 0 or 1 non-NOMSG items are in the pile, the NOMSG ones are
6854 * ignored. Otherwise, they are included in the prompt. */
6855 o_ptr->marked &= ~(OM_NOMSG);
6859 /* Count non-gold objects that can be picked up. */
6860 if (inven_carry_okay(o_ptr))
6865 /* Remember this object index */
6867 floor_list[floor_num] = this_o_idx;
6869 /* Count non-gold objects */
6872 /* Remember this index */
6873 floor_o_idx = this_o_idx;
6876 /* There are no non-gold objects */
6880 /* Mention the number of objects */
6886 /* Access the object */
6887 o_ptr = &o_list[floor_o_idx];
6889 #ifdef ALLOW_EASY_SENSE
6891 /* Option: Make object sensing easy */
6894 /* Sense the object */
6895 (void) sense_object(o_ptr);
6898 #endif /* ALLOW_EASY_SENSE */
6900 /* Describe the object */
6901 object_desc(o_name, o_ptr, 0);
6905 msg_format("%s¤¬¤¢¤ë¡£", o_name);
6907 msg_format("You see %s.", o_name);
6912 /* Multiple objects */
6917 msg_format("%d ¸Ä¤Î¥¢¥¤¥Æ¥à¤Î»³¤¬¤¢¤ë¡£", floor_num);
6919 msg_format("You see a pile of %d items.", floor_num);
6928 /* The player has no room for anything on the floor. */
6934 /* Access the object */
6935 o_ptr = &o_list[floor_o_idx];
6937 #ifdef ALLOW_EASY_SENSE
6939 /* Option: Make object sensing easy */
6942 /* Sense the object */
6943 (void) sense_object(o_ptr);
6946 #endif /* ALLOW_EASY_SENSE */
6948 /* Describe the object */
6949 object_desc(o_name, o_ptr, 0);
6953 msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
6955 msg_format("You have no room for %s.", o_name);
6960 /* Multiple objects */
6965 msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
6967 msg_print("You have no room for any of the objects on the floor.");
6979 /* Hack -- query every object */
6980 if (carry_query_flag)
6982 char out_val[MAX_NLEN+20];
6984 /* Access the object */
6985 o_ptr = &o_list[floor_o_idx];
6987 #ifdef ALLOW_EASY_SENSE
6989 /* Option: Make object sensing easy */
6992 /* Sense the object */
6993 (void) sense_object(o_ptr);
6996 #endif /* ALLOW_EASY_SENSE */
6998 /* Describe the object */
6999 object_desc(o_name, o_ptr, 0);
7001 /* Build a prompt */
7003 (void) sprintf(out_val, "%s¤ò½¦¤¤¤Þ¤¹¤«? ", o_name);
7005 (void) sprintf(out_val, "Pick up %s? ", o_name);
7009 /* Ask the user to confirm */
7010 if (!get_check(out_val))
7017 /* Access the object */
7018 o_ptr = &o_list[floor_o_idx];
7020 #ifdef ALLOW_EASY_SENSE
7022 /* Option: Make object sensing easy */
7025 /* Sense the object */
7026 (void) sense_object(o_ptr);
7029 #endif /* ALLOW_EASY_SENSE */
7031 /* Pick up the object */
7032 py_pickup_aux(floor_o_idx);
7035 /* Allow the user to choose an object */
7038 while (can_pickup--)
7040 if (!py_pickup_floor_aux()) break;
7045 #endif /* ALLOW_EASY_FLOOR */