OSDN Git Service

重量0のアイテムをサブウィンドウで表示した時に重量の表示が無くならないように修正。
[hengband/hengband.git] / src / object1.c
index 8d9e847..ce3ab3b 100644 (file)
@@ -1,18 +1,18 @@
 /* File: object1.c */
 
-/* Purpose: Object code, part 1 */
-
 /*
- * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke
+ * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
  *
- * This software may be copied and distributed for educational, research, and
- * not for profit purposes provided that this copyright and statement are
- * included in all such copies.
+ * This software may be copied and distributed for educational, research,
+ * and not for profit purposes provided that this copyright and statement
+ * are included in all such copies.  Other copyrights may also apply.
  */
 
+/* Purpose: Object code, part 1 */
+
 #include "angband.h"
 
-#ifdef MACINTOSH
+#if defined(MACINTOSH) || defined(MACH_O_CARBON)
 #ifdef verify
 #undef verify
 #endif
@@ -33,7 +33,7 @@
  */
 void reset_visuals(void)
 {
-       int i;
+       int i, j;
 
        /* Extract some info about terrain features */
        for (i = 0; i < max_f_idx; i++)
@@ -41,8 +41,11 @@ void reset_visuals(void)
                feature_type *f_ptr = &f_info[i];
 
                /* Assume we will use the underlying values */
-               f_ptr->x_attr = f_ptr->d_attr;
-               f_ptr->x_char = f_ptr->d_char;
+               for (j = 0; j < F_LIT_MAX; j++)
+               {
+                       f_ptr->x_attr[j] = f_ptr->d_attr[j];
+                       f_ptr->x_char[j] = f_ptr->d_char[j];
+               }
        }
 
        /* Extract default attr/char code for objects */
@@ -109,7 +112,7 @@ void object_flags(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
                flgs[i] = k_ptr->flags[i];
 
        /* Artifact */
-       if (o_ptr->name1)
+       if (object_is_fixed_artifact(o_ptr))
        {
                artifact_type *a_ptr = &a_info[o_ptr->name1];
 
@@ -118,7 +121,7 @@ void object_flags(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
        }
 
        /* Ego-item */
-       if (o_ptr->name2)
+       if (object_is_ego(o_ptr))
        {
                ego_item_type *e_ptr = &e_info[o_ptr->name2];
 
@@ -144,9 +147,9 @@ void object_flags(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
        for (i = 0; i < TR_FLAG_SIZE; i++)
                flgs[i] |= o_ptr->art_flags[i];
 
-       if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
+       if (object_is_smith(o_ptr))
        {
-                int add = o_ptr->xtra3 - 1;
+               int add = o_ptr->xtra3 - 1;
 
                if (add < TR_FLAG_MAX)
                {
@@ -217,17 +220,17 @@ void object_flags_known(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
        for (i = 0; i < TR_FLAG_SIZE; i++)
                flgs[i] = 0;
 
-       if (!object_aware_p(o_ptr)) return;
+       if (!object_is_aware(o_ptr)) return;
 
        /* Base object */
        for (i = 0; i < TR_FLAG_SIZE; i++)
                flgs[i] = k_ptr->flags[i];
 
        /* Must be identified */
-       if (!object_known_p(o_ptr)) return;
+       if (!object_is_known(o_ptr)) return;
 
        /* Ego-item (known basic flags) */
-       if (o_ptr->name2)
+       if (object_is_ego(o_ptr))
        {
                ego_item_type *e_ptr = &e_info[o_ptr->name2];
 
@@ -252,19 +255,19 @@ void object_flags_known(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
 
 #ifdef SPOIL_ARTIFACTS
        /* Full knowledge for some artifacts */
-       if (artifact_p(o_ptr) || o_ptr->art_name) spoil = TRUE;
+       if (object_is_artifact(o_ptr)) spoil = TRUE;
 #endif /* SPOIL_ARTIFACTS */
 
 #ifdef SPOIL_EGO_ITEMS
        /* Full knowledge for some ego-items */
-       if (ego_item_p(o_ptr)) spoil = TRUE;
+       if (object_is_ego(o_ptr)) spoil = TRUE;
 #endif /* SPOIL_EGO_ITEMS */
 
        /* Need full knowledge or spoilers */
        if (spoil || (o_ptr->ident & IDENT_MENTAL))
        {
                /* Artifact */
-               if (o_ptr->name1)
+               if (object_is_fixed_artifact(o_ptr))
                {
                        artifact_type *a_ptr = &a_info[o_ptr->name1];
 
@@ -277,9 +280,9 @@ void object_flags_known(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
                        flgs[i] |= o_ptr->art_flags[i];
        }
 
-       if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
+       if (object_is_smith(o_ptr))
        {
-                int add = o_ptr->xtra3 - 1;
+               int add = o_ptr->xtra3 - 1;
 
                if (add < TR_FLAG_MAX)
                {
@@ -328,40 +331,6 @@ void object_flags_known(object_type *o_ptr, u32b flgs[TR_FLAG_SIZE])
 
 
 /*
- * Hack -- describe an item currently in a store's inventory
- * This allows an item to *look* like the player is "aware" of it
- */
-void object_desc_store(char *buf, object_type *o_ptr, int pref, int mode)
-{
-       /* Save the "aware" flag */
-       bool hack_aware = object_aware_p(o_ptr);
-
-       /* Save the "known" flag */
-       bool hack_known = (o_ptr->ident & (IDENT_KNOWN)) ? TRUE : FALSE;
-
-
-       /* Set the "known" flag */
-       o_ptr->ident |= (IDENT_KNOWN);
-
-       /* Force "aware" for description */
-       k_info[o_ptr->k_idx].aware = TRUE;
-
-
-       /* Describe the object */
-       object_desc(buf, o_ptr, pref, mode);
-
-
-       /* Restore "aware" flag */
-       k_info[o_ptr->k_idx].aware = hack_aware;
-
-       /* Clear the known flag */
-       if (!hack_known) o_ptr->ident &= ~(IDENT_KNOWN);
-}
-
-
-
-
-/*
  * Determine the "Activation" (if any) for an artifact
  * Return a string, or NULL for "no activation"
  */
@@ -388,10 +357,10 @@ if (!(have_flag(flgs, TR_ACTIVATE))) return ("
         * for art_name
         */
 
-       if (!(o_ptr->name1) &&
-                !(o_ptr->name2) &&
-                !(o_ptr->xtra1) &&
-                 (o_ptr->xtra2))
+       if (!object_is_fixed_artifact(o_ptr) &&
+           !object_is_ego(o_ptr) &&
+           !(o_ptr->xtra1) &&
+           (o_ptr->xtra2))
        {
                switch (o_ptr->xtra2)
                {
@@ -461,7 +430,7 @@ return "
                        case ACT_BA_COLD_1:
                        {
 #ifdef JP
-return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (48) : 400 ¥¿¡¼¥óËè";
+return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (48) : 400 ¥¿¡¼¥óËè";
 #else
                                return "ball of cold (48) every 400 turns";
 #endif
@@ -479,7 +448,7 @@ return "
                        case ACT_DRAIN_1:
                        {
 #ifdef JP
-return "¥Ò¥Ã¥È¥Ý¥¤¥ó¥ÈµÛ¼ý (100) : 100+d100 ¥¿¡¼¥óËè";
+return "À¸Ì¿Îϵۼý (100) : 100+d100 ¥¿¡¼¥óËè";
 #else
                                return "drain life (100) every 100+d100 turns";
 #endif
@@ -488,7 +457,7 @@ return "
                        case ACT_BA_COLD_2:
                        {
 #ifdef JP
-return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 300 ¥¿¡¼¥óËè";
+return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 300 ¥¿¡¼¥óËè";
 #else
                                return "ball of cold (100) every 300 turns";
 #endif
@@ -506,7 +475,7 @@ return "
                        case ACT_DRAIN_2:
                        {
 #ifdef JP
-return "¥Ò¥Ã¥È¥Ý¥¤¥ó¥ÈµÛ¼ý(120) : 400 ¥¿¡¼¥óËè";
+return "À¸Ì¿Îϵۼý(120) : 400 ¥¿¡¼¥óËè";
 #else
                                return "drain life (120) every 400 turns";
 #endif
@@ -542,7 +511,7 @@ return "
                        case ACT_BA_COLD_3:
                        {
 #ifdef JP
-return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (200) : 325+d325 ¥¿¡¼¥óËè";
+return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (200) : 325+d325 ¥¿¡¼¥óËè";
 #else
                                return "ball of cold (200) every 325+d325 turns";
 #endif
@@ -578,7 +547,7 @@ return "
                        case ACT_CALL_CHAOS:
                        {
 #ifdef JP
-return "call chaos : 350 ¥¿¡¼¥óËè"; /*nuke me*/
+return "º®ÆÙ¾¤Íè : 350 ¥¿¡¼¥óËè"; /*nuke me*/
 #else
                                return "call chaos every 350 turns";
 #endif
@@ -704,7 +673,7 @@ return "ưʪ̥λ : 300 
                        case ACT_CHARM_UNDEAD:
                        {
 #ifdef JP
-return "ÉԻཾ° : 333 ¥¿¡¼¥óËè";
+return "¥¢¥ó¥Ç¥Ã¥É½¾Â° : 333 ¥¿¡¼¥óËè";
 #else
                                return "enslave undead every 333 turns";
 #endif
@@ -749,7 +718,7 @@ return "ưʪ
                        case ACT_SUMMON_PHANTOM:
                        {
 #ifdef JP
-return "»È¤¤Î´­ : 200+d200 ¥¿¡¼¥óËè";
+return "¸¸Î´­ : 200+d200 ¥¿¡¼¥óËè";
 #else
                                return "summon phantasmal servant every 200+d200 turns";
 #endif
@@ -776,7 +745,7 @@ return "
                        case ACT_SUMMON_UNDEAD:
                        {
 #ifdef JP
-return "ÉԻྤ´­ : 666+d333 ¥¿¡¼¥óËè";
+return "¥¢¥ó¥Ç¥Ã¥É¾¤´­ : 666+d333 ¥¿¡¼¥óËè";
 #else
                                return "summon undead every 666+d333 turns";
 #endif
@@ -785,7 +754,7 @@ return "
                        case ACT_CURE_LW:
                        {
 #ifdef JP
-return "ͦµ¤²óÉü & 30 hp ²óÉü : 10 ¥¿¡¼¥óËè";
+return "¶²Éݽüµî & 30 hp ²óÉü : 10 ¥¿¡¼¥óËè";
 #else
                                return "remove fear & heal 30 hp every 10 turns";
 #endif
@@ -803,7 +772,7 @@ return "4d8 hp & 
                        case ACT_CURE_POISON:
                        {
 #ifdef JP
-return "ͦµ¤²óÉü/ÆǾä· : 5 ¥¿¡¼¥óËè";
+return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
 #else
                                return "remove fear and cure poison every 5 turns";
 #endif
@@ -821,7 +790,7 @@ return "
                        case ACT_REST_ALL:
                        {
 #ifdef JP
-return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃͲóÉü : 750 ¥¿¡¼¥óËè";
+return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃÍÉü³è : 750 ¥¿¡¼¥óËè";
 #else
                                return "restore stats and life levels every 750 turns";
 #endif
@@ -848,9 +817,9 @@ return "1000 hp 
                        case ACT_ESP:
                        {
 #ifdef JP
-return "°ì»þŪ¤Ê ESP (´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
+return "¥Æ¥ì¥Ñ¥·¡¼ (´ü´Ö 25+d30) : 200 ¥¿¡¼¥óËè";
 #else
-                               return "temporary ESP (dur 25+d30) every 200 turns";
+                               return "telepathy (dur 25+d30) every 200 turns";
 #endif
 
                        }
@@ -875,7 +844,7 @@ return "
                        case ACT_RESIST_ALL:
                        {
 #ifdef JP
-return "±êÎä»ÀÅÅÆǤؤÎÂÑÀ­ (´ü´Ö 40+d40) : 200 ¥¿¡¼¥óËè";
+return "Á´ÂÑÀ­ (´ü´Ö 40+d40) : 200 ¥¿¡¼¥óËè";
 #else
                                return "resist elements (dur 40+d40) every 200 turns";
 #endif
@@ -902,16 +871,16 @@ return "
                        case ACT_WRAITH:
                        {
 #ifdef JP
-return "¥ì¥¤¥¹²½ (level/2 + d(level/2)) : 1000 ¥¿¡¼¥óËè";
+return "Í©Âβ½ (´ü´Ö level/2 + d(level/2)) : 1000 ¥¿¡¼¥óËè";
 #else
-                               return "wraith form (level/2 + d(level/2)) every 1000 turns";
+                               return "wraith form (dur level/2 + d(level/2)) every 1000 turns";
 #endif
 
                        }
                        case ACT_INVULN:
                        {
 #ifdef JP
-return "̵Ũ (´ü´Ö 8+d8) : 1000 ¥¿¡¼¥óËè";
+return "̵Ũ²½ (´ü´Ö 8+d8) : 1000 ¥¿¡¼¥óËè";
 #else
                                return "invulnerability (dur 8+d8) every 1000 turns";
 #endif
@@ -974,7 +943,7 @@ return "
                        case ACT_RUNE_EXPLO:
                        {
 #ifdef JP
-return "Çúȯ¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
+return "Çúȯ¤Î¥ë¡¼¥ó : 200 ¥¿¡¼¥óËè";
 #else
                                return "explosive rune every 200 turns";
 #endif
@@ -1019,7 +988,7 @@ return "
                        case ACT_RECHARGE:
                        {
 #ifdef JP
-return "ºÆ½¼Å¶ : 70 ¥¿¡¼¥óËè";
+return "ËâÎϽ¼Å¶ : 70 ¥¿¡¼¥óËè";
 #else
                                return "recharging every 70 turns";
 #endif
@@ -1213,6 +1182,7 @@ return "
                }
                case ART_AVAVIR:
                case ART_MAGATAMA:
+               case ART_HEAVENLY_MAIDEN:
                {
 #ifdef JP
 return "µ¢´Ô¤Î¾Û : 200 ¥¿¡¼¥óËè";
@@ -1242,9 +1212,9 @@ return "
                case ART_GANDALF:
                {
 #ifdef JP
-return "õº÷¡¢Á´´¶ÃΡ¢Á´´ÕÄê : 1000 ¥¿¡¼¥óËè";
+return "Ä´ºº¡¢Á´´¶ÃΡ¢Á´´ÕÄê : 100 ¥¿¡¼¥óËè";
 #else
-                       return "probing, detection and full id every 1000 turns";
+                       return "probing, detection and full id every 100 turns";
 #endif
 
                }
@@ -1260,13 +1230,14 @@ return "
                case ART_LOTHARANG:
                {
 #ifdef JP
-return "½ý¤Î¼£Ìþ(4d7) : 3+d3 ¥¿¡¼¥óËè";
+return "½ý¤Î¼£Ìþ(4d8) : 3+d3 ¥¿¡¼¥óËè";
 #else
-                       return "cure wounds (4d7) every 3+d3 turns";
+                       return "cure wounds (4d8) every 3+d3 turns";
 #endif
 
                }
                case ART_BRAND:
+               case ART_HELLFIRE:
                {
 #ifdef JP
 return "¿ÏÀè¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È : 999 ¥¿¡¼¥óËè";
@@ -1317,7 +1288,7 @@ return "
 #ifdef JP
 return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 200 ¥¿¡¼¥óËè";
 #else
-                       return "Frost ball (100) every 200 turns";
+                       return "frost ball (100) every 200 turns";
 #endif
 
                }
@@ -1399,7 +1370,7 @@ return "
 #ifdef JP
 return "¥¹¥ê¡¼¥×(II) : 55 ¥¿¡¼¥óËè";
 #else
-                       return "Sleep II every 55 turns";
+                       return "sleep II every 55 turns";
 #endif
 
                }
@@ -1496,7 +1467,7 @@ return "
                case ART_AMBER:
                {
 #ifdef JP
-return "ÂÎÎϲóÉü(500) : 500 ¥¿¡¼¥óËè";
+return "ÂÎÎϲóÉü(700) : 250 ¥¿¡¼¥óËè";
 #else
                        return "heal (700) every 250 turns";
 #endif
@@ -1710,15 +1681,15 @@ return "
 #ifdef JP
 return "ËâÎϽ¼Å¶ : 200 ¥¿¡¼¥óËè";
 #else
-                       return "Recharge item every 200 turns";
+                       return "recharge item every 200 turns";
 #endif
                }
                case ART_MURAMASA:
                {
 #ifdef JP
-return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë¡£";
+return "ÏÓÎϤξ徺 : ³ÎΨ50%¤Ç²õ¤ì¤ë";
 #else
-                       return "Increase STR (destroyed 50%)";
+                       return "increase STR (destroyed 50%)";
 #endif
                }
                case ART_FLY_STONE:
@@ -1856,6 +1827,7 @@ return "
 #endif
                }
                case ART_NIGHT:
+               case ART_HELL:
                {
 #ifdef JP
 return "°Å¹õ¤ÎÍò(250) : 150+d150 ¥¿¡¼¥óËè";
@@ -1864,6 +1836,32 @@ return "
 #endif
 
                }
+               case ART_SACRED_KNIGHTS:
+               {
+#ifdef JP
+return "*²ò¼ö*¤ÈÄ´ºº: ¤¤¤Ä¤Ç¤â";
+#else
+                       return "dispel curse and probing every turn";
+#endif
+
+               }
+               case ART_CHARMED:
+               {
+#ifdef JP
+return "ËâÎÏÉü³è: 777 ¥¿¡¼¥óËè";
+#else
+                       return "restore mana every 777 turns";
+#endif
+
+               }
+               case ART_AESCULAPIUS:
+               {
+#ifdef JP
+                       return "Á´¥¹¥Æ¡¼¥¿¥¹¤È·Ð¸³ÃÍÉü³è : 750 ¥¿¡¼¥óËè";
+#else
+                       return "restore stats and life levels every 750 turns";
+#endif
+               }
        }
 
 
@@ -1877,50 +1875,45 @@ return "
 
        }
 
-       if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
-        {
-                switch (o_ptr->xtra3 - 1)
-                {
-                case ESSENCE_TMP_RES_ACID:
+       if (object_is_smith(o_ptr))
+       {
+               switch (o_ptr->xtra3 - 1)
+               {
+               case ESSENCE_TMP_RES_ACID:
 #ifdef JP
-                        return "»À¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
+                       return "»À¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
 #else
-                        return "resist acid every 50+d50 turns";
+                       return "resist acid every 50+d50 turns";
 #endif
-                        break;
 
-                case ESSENCE_TMP_RES_ELEC:
+               case ESSENCE_TMP_RES_ELEC:
 #ifdef JP
-                        return "ÅÅ·â¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
+                       return "ÅÅ·â¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
 #else
-                        return "resist elec every 50+d50 turns";
+                       return "resist elec every 50+d50 turns";
 #endif
-                        break;
 
-                case ESSENCE_TMP_RES_FIRE:
+               case ESSENCE_TMP_RES_FIRE:
 #ifdef JP
-                        return "²Ð¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
+                       return "²Ð¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
 #else
-                        return "resist fire every 50+d50 turns";
+                       return "resist fire every 50+d50 turns";
 #endif
-                        break;
 
-                case ESSENCE_TMP_RES_COLD:
+               case ESSENCE_TMP_RES_COLD:
 #ifdef JP
-                        return "Î䵤¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
+                       return "Î䵤¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
 #else
-                        return "resist cold every 50+d50 turns";
+                       return "resist cold every 50+d50 turns";
 #endif
-                        break;
 
-                case TR_IMPACT:
+               case TR_IMPACT:
 #ifdef JP
-                        return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
+                       return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
 #else
-                        return "earthquake every 100+d100 turns";
+                       return "earthquake every 100+d100 turns";
 #endif
-                        break;
-                }
+               }
        }
 
        if (o_ptr->name2 == EGO_TRUMP)
@@ -1964,7 +1957,7 @@ return "
 
        if (o_ptr->tval == TV_RING)
        {
-               if (o_ptr->name2)
+               if (object_is_ego(o_ptr))
                {
                        switch (o_ptr->name2)
                        {
@@ -2018,7 +2011,7 @@ return "
 #endif
                        case EGO_RING_COLD_BALL:
 #ifdef JP
-return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
+return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) : 80+d80 ¥¿¡¼¥óËè";
 #else
                                return "cold ball (100) every 80+d80 turns";
 #endif
@@ -2109,7 +2102,7 @@ return "
 
                        case SV_RING_ICE:
 #ifdef JP
-return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ­ : 50+d50 ¥¿¡¼¥óËè";
+return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë (100) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ­ : 50+d50 ¥¿¡¼¥óËè";
 #else
                                return "ball of cold (100) and resist cold every 50+d50 turns";
 #endif
@@ -2135,80 +2128,70 @@ return "
 
        if (o_ptr->tval == TV_AMULET)
        {
-               if (o_ptr->name2)
+               if (object_is_ego(o_ptr))
                {
                        switch (o_ptr->name2)
                        {
                        case EGO_AMU_IDENT:
 #ifdef JP
-return "´ÕÄê : 10 ¥¿¡¼¥óËè";
+                               return "´ÕÄê : 10 ¥¿¡¼¥óËè";
 #else
                                return "identify every 10 turns";
 #endif
-                               break;
                        case EGO_AMU_CHARM:
 #ifdef JP
-return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
+                               return "¥â¥ó¥¹¥¿¡¼Ì¥Î» : 200 ¥¿¡¼¥óËè";
 #else
                                return "charm monster every 200 turns";
 #endif
-                               break;
                        case EGO_AMU_JUMP:
 #ifdef JP
-return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
+                               return "¥·¥ç¡¼¥È¡¦¥Æ¥ì¥Ý¡¼¥È : 10+d10 ¥¿¡¼¥óËè";
 #else
                                return "blink every 10+d10 turns";
 #endif
-                               break;
                        case EGO_AMU_TELEPORT:
 #ifdef JP
-return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
+                               return "¥Æ¥ì¥Ý¡¼¥È : 50+d50 ¥¿¡¼¥óËè";
 #else
                                return "teleport every 50+d50 turns";
 #endif
-                               break;
                        case EGO_AMU_D_DOOR:
 #ifdef JP
-return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
+                               return "¼¡¸µ¤ÎÈâ : 200 ¥¿¡¼¥óËè";
 #else
                                return "dimension door every 200 turns";
 #endif
-                               break;
                        case EGO_AMU_RES_FIRE_:
 #ifdef JP
-return "²Ð±ê¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
+                               return "²Ð±ê¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
 #else
                                return "resist fire every 50+d50 turns";
 #endif
-                               break;
                        case EGO_AMU_RES_COLD_:
 #ifdef JP
-return "Î䵤¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
+                               return "Î䵤¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
 #else
                                return "resist cold every 50+d50 turns";
 #endif
-                               break;
                        case EGO_AMU_RES_ELEC_:
 #ifdef JP
-return "ÅÅ·â¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
+                               return "ÅÅ·â¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
 #else
                                return "resist elec every 50+d50 turns";
 #endif
-                               break;
                        case EGO_AMU_RES_ACID_:
 #ifdef JP
-return "»À¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
+                               return "»À¤Ø¤ÎÂÑÀ­ : 50+d50¥¿¡¼¥óËè";
 #else
                                return "resist acid every 50+d50 turns";
 #endif
-                               break;
                        case EGO_AMU_DETECTION:
 #ifdef JP
-return "Á´´¶ÃΠ: 55+d55¥¿¡¼¥óËè";
+                               return "Á´´¶ÃΠ: 55+d55¥¿¡¼¥óËè";
 #else
                                return "detect all floor every 55+d55 turns";
 #endif
-                               break;
                        }
                }
        }
@@ -2374,30 +2357,37 @@ return "
 /*
  * Describe a "fully identified" item
  */
-bool identify_fully_aux(object_type *o_ptr)
+bool screen_object(object_type *o_ptr, u32b mode)
 {
        int                     i = 0, j, k;
 
        u32b flgs[TR_FLAG_SIZE];
 
+       char temp[70 * 20];
        cptr            info[128];
        char o_name[MAX_NLEN];
        int wid, hgt;
 
+       int trivial_info = 0;
+
        /* Extract the flags */
        object_flags(o_ptr, flgs);
 
        /* Extract the description */
        {
-               char temp[70 * 20];
-
                roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
-                           (k_text + k_info[lookup_kind(o_ptr->tval, o_ptr->sval)].text),
-                           77 - 15, temp);
+                           (k_text + k_info[o_ptr->k_idx].text),
+                           77 - 15, temp, sizeof(temp));
                for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
                { info[i] = &temp[j]; i++;}
        }
 
+       if (object_is_equipment(o_ptr))
+       {
+               /* Descriptions of a basic equipment is just a flavor */
+               trivial_info = i;
+       }
+
        /* Mega-Hack -- describe activation */
        if (have_flag(flgs, TR_ACTIVATE))
        {
@@ -2453,13 +2443,13 @@ info[i++] = "
 #ifdef JP
 info[i++] = "¤½¤ì¤Ï¼«Ê¬¼«¿È¤Ë¹¶·â¤¬Ê֤äƤ¯¤ë¤³¤È¤¬¤¢¤ë¡£";
 #else
-               info[i++] = "It strikes yourself sometimes.";
+               info[i++] = "It causes you to strike yourself sometimes.";
 #endif
 
 #ifdef JP
 info[i++] = "¤½¤ì¤Ï̵Ũ¤Î¥Ð¥ê¥¢¤òÀÚ¤êÎö¤¯¡£";
 #else
-               info[i++] = "It will always penetrates invulnerability barrier.";
+               info[i++] = "It always penetrates invulnerability barriers.";
 #endif
        }
 
@@ -2539,16 +2529,23 @@ info[i++] = "
                if (o_ptr->name2 == EGO_LITE_DARKNESS)
                {
 #ifdef JP
-                        info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
+                       info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
 #else
-                       info[i++] = "It provides no light..";
+                       info[i++] = "It provides no light.";
 #endif
 
-                       if (o_ptr->sval == SV_LITE_FEANOR ||
-                            o_ptr->sval == SV_LITE_LANTERN)
+                       if (o_ptr->sval == SV_LITE_FEANOR)
+                       {
+#ifdef JP
+                               info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-3)¡£";
+#else
+                               info[i++] = "It decreases radius of light source by 3.";
+#endif
+                       }
+                       else if (o_ptr->sval == SV_LITE_LANTERN)
                        {
 #ifdef JP
-                                info[i++] = "¤½¤ì¤ÏÌÀ¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
+                               info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
 #else
                                info[i++] = "It decreases radius of light source by 2.";
 #endif
@@ -2556,13 +2553,13 @@ info[i++] = "
                        else
                        {
 #ifdef JP
-                                info[i++] = "¤½¤ì¤ÏÌÀ¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
+                               info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
 #else
                                info[i++] = "It decreases radius of light source by 1.";
 #endif
                        }
                }
-               else if (artifact_p(o_ptr))
+               else if (object_is_fixed_artifact(o_ptr))
                {
 #ifdef JP
 info[i++] = "¤½¤ì¤Ï±Ê±ó¤Ê¤ëÌÀ¤«¤ê(Ⱦ·Â 3)¤ò¼ø¤±¤ë¡£";
@@ -2653,17 +2650,20 @@ info[i++] = "
                        info[i++] = "It is made for use while riding.";
 #endif
                else
+               {
 #ifdef JP
-info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
+                       info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
 #else
                        info[i++] = "It is suitable for use while riding.";
 #endif
-
+                       /* This information is not important enough */
+                       trivial_info++;
+               }
        }
        if (have_flag(flgs, TR_STR))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
+info[i++] = "¤½¤ì¤ÏÏÓÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
 #else
                info[i++] = "It affects your strength.";
 #endif
@@ -2672,7 +2672,7 @@ info[i++] = "
        if (have_flag(flgs, TR_INT))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
+info[i++] = "¤½¤ì¤ÏÃÎǽ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
 #else
                info[i++] = "It affects your intelligence.";
 #endif
@@ -2681,7 +2681,7 @@ info[i++] = "
        if (have_flag(flgs, TR_WIS))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤Ï¸­¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
+info[i++] = "¤½¤ì¤Ï¸­¤µ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
 #else
                info[i++] = "It affects your wisdom.";
 #endif
@@ -2690,7 +2690,7 @@ info[i++] = "
        if (have_flag(flgs, TR_DEX))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
+info[i++] = "¤½¤ì¤Ï´ïÍѤµ¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
 #else
                info[i++] = "It affects your dexterity.";
 #endif
@@ -2699,7 +2699,7 @@ info[i++] = "
        if (have_flag(flgs, TR_CON))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
+info[i++] = "¤½¤ì¤ÏÂѵ×ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
 #else
                info[i++] = "It affects your constitution.";
 #endif
@@ -2708,7 +2708,7 @@ info[i++] = "
        if (have_flag(flgs, TR_CHR))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
+info[i++] = "¤½¤ì¤ÏÌ¥ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
 #else
                info[i++] = "It affects your charisma.";
 #endif
@@ -2718,7 +2718,7 @@ info[i++] = "
        if (have_flag(flgs, TR_MAGIC_MASTERY))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
+info[i++] = "¤½¤ì¤ÏËâË¡Æ»¶ñ»ÈÍÑǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
 #else
                info[i++] = "It affects your ability to use magic devices.";
 #endif
@@ -2727,7 +2727,7 @@ info[i++] = "
        if (have_flag(flgs, TR_STEALTH))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
+info[i++] = "¤½¤ì¤Ï±£Ì©¹ÔưǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
 #else
                info[i++] = "It affects your stealth.";
 #endif
@@ -2736,7 +2736,7 @@ info[i++] = "
        if (have_flag(flgs, TR_SEARCH))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
+info[i++] = "¤½¤ì¤Ïõº÷ǽÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
 #else
                info[i++] = "It affects your searching.";
 #endif
@@ -2745,7 +2745,7 @@ info[i++] = "
        if (have_flag(flgs, TR_INFRA))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
+info[i++] = "¤½¤ì¤ÏÀÖ³°Àþ»ëÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
 #else
                info[i++] = "It affects your infravision.";
 #endif
@@ -2754,7 +2754,7 @@ info[i++] = "
        if (have_flag(flgs, TR_TUNNEL))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹";
+info[i++] = "¤½¤ì¤ÏºÎ·¡Ç½ÎϤ˱ƶÁ¤òµÚ¤Ü¤¹¡£";
 #else
                info[i++] = "It affects your ability to tunnel.";
 #endif
@@ -2763,7 +2763,7 @@ info[i++] = "
        if (have_flag(flgs, TR_SPEED))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
+info[i++] = "¤½¤ì¤Ï¥¹¥Ô¡¼¥É¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
 #else
                info[i++] = "It affects your speed.";
 #endif
@@ -2772,7 +2772,7 @@ info[i++] = "
        if (have_flag(flgs, TR_BLOWS))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹";
+info[i++] = "¤½¤ì¤ÏÂÇ·â²ó¿ô¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¡£";
 #else
                info[i++] = "It affects your attack speed.";
 #endif
@@ -2782,7 +2782,7 @@ info[i++] = "
        if (have_flag(flgs, TR_BRAND_ACID))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礭¤Ê¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë";
+info[i++] = "¤½¤ì¤Ï»À¤Ë¤è¤Ã¤ÆÂ礭¤Ê¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
 #else
                info[i++] = "It does extra damage from acid.";
 #endif
@@ -2791,7 +2791,7 @@ info[i++] = "
        if (have_flag(flgs, TR_BRAND_ELEC))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礭¤Ê¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë";
+info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ë¤è¤Ã¤ÆÂ礭¤Ê¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
 #else
                info[i++] = "It does extra damage from electricity.";
 #endif
@@ -2800,7 +2800,7 @@ info[i++] = "
        if (have_flag(flgs, TR_BRAND_FIRE))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礭¤Ê¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë";
+info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ë¤è¤Ã¤ÆÂ礭¤Ê¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
 #else
                info[i++] = "It does extra damage from fire.";
 #endif
@@ -2809,7 +2809,7 @@ info[i++] = "
        if (have_flag(flgs, TR_BRAND_COLD))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礭¤Ê¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë";
+info[i++] = "¤½¤ì¤ÏÎ䵤¤Ë¤è¤Ã¤ÆÂ礭¤Ê¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë¡£";
 #else
                info[i++] = "It does extra damage from frost.";
 #endif
@@ -3321,7 +3321,7 @@ info[i++] = "
 
        }
 
-       if (have_flag(flgs, TR_FEATHER))
+       if (have_flag(flgs, TR_LEVITATION))
        {
 #ifdef JP
 info[i++] = "¤½¤ì¤ÏÃè¤ËÉ⤯¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¡£";
@@ -3582,7 +3582,7 @@ info[i++] = "
 
        }
 
-       if (cursed_p(o_ptr))
+       if (object_is_cursed(o_ptr))
        {
                if (o_ptr->curse_flags & TRC_PERMA_CURSE)
                {
@@ -3610,6 +3610,11 @@ info[i++] = "
                        info[i++] = "It is cursed.";
 #endif
 
+                       /*
+                        * It's a trivial infomation since there is
+                        * fake inscription {cursed}
+                        */
+                       trivial_info++;
                }
        }
 
@@ -3717,7 +3722,7 @@ info[i++] = "
 #ifdef JP
 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
 #else
-               info[i++] = "It causes you miss blows.";
+               info[i++] = "It causes you to miss blows.";
 #endif
 
        }
@@ -3726,7 +3731,7 @@ info[i++] = "
 #ifdef JP
 info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
 #else
-               info[i++] = "It helps your enemys' blows.";
+               info[i++] = "It helps your enemies' blows.";
 #endif
 
        }
@@ -3767,60 +3772,109 @@ info[i++] = "
 
        }
 
-       /* XTRA HACK ARTDESC */
-       if (have_flag(flgs, TR_IGNORE_ACID) &&
-           have_flag(flgs, TR_IGNORE_ELEC) &&
-           have_flag(flgs, TR_IGNORE_FIRE) &&
-           have_flag(flgs, TR_IGNORE_COLD))
+       /* Describe about this kind of object instead of THIS fake object */
+       if (mode & SCROBJ_FAKE_OBJECT)
        {
+               switch (o_ptr->tval)
+               {
+               case TV_RING:
+                       switch (o_ptr->sval)
+                       {
+                       case SV_RING_LORDLY:
 #ifdef JP
-         info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
+                               info[i++] = "¤½¤ì¤Ï´ö¤Ä¤«¤Î¥é¥ó¥À¥à¤ÊÂÑÀ­¤ò¼ø¤±¤ë¡£";
 #else
-         info[i++] = "It cannot be harmed by the elements.";
+                               info[i++] = "It provides some random resistances.";
 #endif
-       } else {
-       if (have_flag(flgs, TR_IGNORE_ACID))
-       {
+                               break;
+                       case SV_RING_WARNING:
 #ifdef JP
-info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
+                               info[i++] = "¤½¤ì¤Ï¤Ò¤È¤Ä¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
 #else
-               info[i++] = "It cannot be harmed by acid.";
+                               info[i++] = "It may provide a low rank ESP.";
 #endif
+                               break;
+                       }
+                       break;
 
-       }
-       if (have_flag(flgs, TR_IGNORE_ELEC))
-       {
+               case TV_AMULET:
+                       switch (o_ptr->sval)
+                       {
+                       case SV_AMULET_RESISTANCE:
 #ifdef JP
-info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
+                               info[i++] = "¤½¤ì¤ÏÆǤؤÎÂÑÀ­¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
 #else
-               info[i++] = "It cannot be harmed by electricity.";
+                               info[i++] = "It may provides resistance to poison.";
 #endif
-
+#ifdef JP
+                               info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤ÊÂÑÀ­¤ò¼ø¤±¤ë»ö¤¬¤¢¤ë¡£";
+#else
+                               info[i++] = "It may provide a random resistances.";
+#endif
+                               break;
+                       case SV_AMULET_THE_MAGI:
+#ifdef JP
+                               info[i++] = "¤½¤ì¤ÏºÇÂç¤Ç£³¤Ä¤Þ¤Ç¤ÎÄãµé¤ÊESP¤ò¼ø¤±¤ë¡£";
+#else
+                               info[i++] = "It provides up to three low rank ESPs.";
+#endif
+                               break;
+                       }
+                       break;
+               }
        }
-       if (have_flag(flgs, TR_IGNORE_FIRE))
+
+       if (have_flag(flgs, TR_IGNORE_ACID) &&
+           have_flag(flgs, TR_IGNORE_ELEC) &&
+           have_flag(flgs, TR_IGNORE_FIRE) &&
+           have_flag(flgs, TR_IGNORE_COLD))
        {
 #ifdef JP
-info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
+               info[i++] = "¤½¤ì¤Ï»À¡¦Åŷ⡦²Ð±ê¡¦Î䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
 #else
-               info[i++] = "It cannot be harmed by fire.";
+               info[i++] = "It cannot be harmed by the elements.";
 #endif
-
        }
-       if (have_flag(flgs, TR_IGNORE_COLD))
+       else
        {
+               if (have_flag(flgs, TR_IGNORE_ACID))
+               {
 #ifdef JP
-info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
+                       info[i++] = "¤½¤ì¤Ï»À¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
 #else
-               info[i++] = "It cannot be harmed by cold.";
+                       info[i++] = "It cannot be harmed by acid.";
 #endif
-
+               }
+               if (have_flag(flgs, TR_IGNORE_ELEC))
+               {
+#ifdef JP
+                       info[i++] = "¤½¤ì¤ÏÅÅ·â¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
+#else
+                       info[i++] = "It cannot be harmed by electricity.";
+#endif
+               }
+               if (have_flag(flgs, TR_IGNORE_FIRE))
+               {
+#ifdef JP
+                       info[i++] = "¤½¤ì¤Ï²Ð±ê¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
+#else
+                       info[i++] = "It cannot be harmed by fire.";
+#endif
+               }
+               if (have_flag(flgs, TR_IGNORE_COLD))
+               {
+#ifdef JP
+                       info[i++] = "¤½¤ì¤ÏÎ䵤¤Ç¤Ï½ý¤Ä¤«¤Ê¤¤¡£";
+#else
+                       info[i++] = "It cannot be harmed by cold.";
+#endif
+               }
        }
 
-       /* XTRA HACK ARTDESC */
-       }
+       if (mode & SCROBJ_FORCE_DETAIL) trivial_info = 0;
 
-       /* No special effects */
-       if (!i) return (FALSE);
+       /* No relevant informations */
+       if (i <= trivial_info) return (FALSE);
 
        /* Save the screen */
        screen_save();
@@ -3829,8 +3883,12 @@ info[i++] = "
        Term_get_size(&wid, &hgt);
 
        /* Display Item name */
-       object_desc(o_name, o_ptr, TRUE, 3);
-       prt(format("%s", o_name), 0, 0);
+       if (!(mode & SCROBJ_FAKE_OBJECT))
+               object_desc(o_name, o_ptr, 0);
+       else
+               object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
+
+       prt(o_name, 0, 0);
 
        /* Erase the screen */
        for (k = 1; k < hgt; k++) prt("", k, 13);
@@ -3841,8 +3899,8 @@ info[i++] = "
                monster_race *r_ptr = &r_info[o_ptr->pval];
                int namelen = strlen(r_name + r_ptr->name);
                prt(format("%s: '", r_name + r_ptr->name), 1, 15);
-               c_prt(r_ptr->d_attr, format("%c", r_ptr->d_char), 1, 18+namelen);
-               prt("'", 1, 19+namelen);
+               Term_queue_bigchar(18 + namelen, 1, r_ptr->x_attr, r_ptr->x_char, 0, 0);
+               prt("'", 1, (use_bigtile ? 20 : 19) + namelen);
        }
        else
 #ifdef JP
@@ -3924,6 +3982,16 @@ s16b label_to_inven(int c)
 }
 
 
+/* See cmd5.c */
+extern bool select_ring_slot;
+
+
+static bool is_ring_slot(int i)
+{
+       return (i == INVEN_RIGHT) || (i == INVEN_LEFT);
+}
+
+
 /*
  * Convert a label into the index of a item in the "equip"
  * Return "-1" if the label does not indicate a real item
@@ -3938,6 +4006,8 @@ s16b label_to_equip(int c)
        /* Verify the index */
        if ((i < INVEN_RARM) || (i >= INVEN_TOTAL)) return (-1);
 
+       if (select_ring_slot) return is_ring_slot(i) ? i : -1;
+
        /* Empty slots can never be chosen */
        if (!inventory[i].k_idx) return (-1);
 
@@ -4044,131 +4114,86 @@ cptr mention_use(int i)
        switch (i)
        {
 #ifdef JP
-case INVEN_RARM: p = p_ptr->ryoute ? " Î¾¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê"); break;
+               case INVEN_RARM:  p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->migite) ? " Î¾¼ê" : (left_hander ? " º¸¼ê" : " ±¦¼ê")); break;
 #else
-               case INVEN_RARM: p = "Wielding"; break;
+               case INVEN_RARM:  p = p_ptr->heavy_wield[0] ? "Just lifting" : (p_ptr->migite ? "Wielding" : "On arm"); break;
 #endif
 
 #ifdef JP
-case INVEN_LARM:   p = (left_hander ? " ±¦¼ê" : " º¸¼ê"); break;
+               case INVEN_LARM:  p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ" : ((p_ptr->ryoute && p_ptr->hidarite) ? " Î¾¼ê" : (left_hander ? " ±¦¼ê" : " º¸¼ê")); break;
 #else
-               case INVEN_LARM:   p = "On arm"; break;
+               case INVEN_LARM:  p = p_ptr->heavy_wield[1] ? "Just lifting" : (p_ptr->hidarite ? "Wielding" : "On arm"); break;
 #endif
 
 #ifdef JP
-case INVEN_BOW:   p = "¼Í·âÍÑ"; break;
+               case INVEN_BOW:   p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "±¿ÈÂÃæ" : "¼Í·âÍÑ"; break;
 #else
-               case INVEN_BOW:   p = "Shooting"; break;
+               case INVEN_BOW:   p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "Just holding" : "Shooting"; break;
 #endif
 
 #ifdef JP
-case INVEN_LEFT:  p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
+               case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
 #else
-               case INVEN_LEFT:  p = "On left hand"; break;
+               case INVEN_RIGHT: p = (left_hander ? "On left hand" : "On right hand"); break;
 #endif
 
 #ifdef JP
-case INVEN_RIGHT: p = (left_hander ? "º¸¼ê»Ø" : "±¦¼ê»Ø"); break;
+               case INVEN_LEFT:  p = (left_hander ? "±¦¼ê»Ø" : "º¸¼ê»Ø"); break;
 #else
-               case INVEN_RIGHT: p = "On right hand"; break;
+               case INVEN_LEFT:  p = (left_hander ? "On right hand" : "On left hand"); break;
 #endif
 
 #ifdef JP
-case INVEN_NECK:  p = "  ¼ó"; break;
+               case INVEN_NECK:  p = "  ¼ó"; break;
 #else
                case INVEN_NECK:  p = "Around neck"; break;
 #endif
 
 #ifdef JP
-case INVEN_LITE:  p = " ¸÷¸»"; break;
+               case INVEN_LITE:  p = " ¸÷¸»"; break;
 #else
                case INVEN_LITE:  p = "Light source"; break;
 #endif
 
 #ifdef JP
-case INVEN_BODY:  p = "  ÂÎ"; break;
+               case INVEN_BODY:  p = "  ÂÎ"; break;
 #else
                case INVEN_BODY:  p = "On body"; break;
 #endif
 
 #ifdef JP
-case INVEN_OUTER: p = "ÂΤξå"; break;
+               case INVEN_OUTER: p = "ÂΤξå"; break;
 #else
                case INVEN_OUTER: p = "About body"; break;
 #endif
 
 #ifdef JP
-case INVEN_HEAD:  p = "  Ƭ"; break;
+               case INVEN_HEAD:  p = "  Ƭ"; break;
 #else
                case INVEN_HEAD:  p = "On head"; break;
 #endif
 
 #ifdef JP
-case INVEN_HANDS: p = "  ¼ê"; break;
+               case INVEN_HANDS: p = "  ¼ê"; break;
 #else
                case INVEN_HANDS: p = "On hands"; break;
 #endif
 
 #ifdef JP
-case INVEN_FEET:  p = "  ­"; break;
+               case INVEN_FEET:  p = "  ­"; break;
 #else
                case INVEN_FEET:  p = "On feet"; break;
 #endif
 
 #ifdef JP
-default:          p = "¥¶¥Ã¥¯"; break;
+               default:          p = "¥¶¥Ã¥¯"; break;
 #else
                default:          p = "In pack"; break;
 #endif
-
-       }
-
-       /* Hack -- Heavy weapon */
-       if (i == INVEN_RARM)
-       {
-               if (p_ptr->heavy_wield[0])
-               {
-#ifdef JP
-p = "±¿ÈÂÃæ";
-#else
-                       p = "Just lifting";
-#endif
-
-               }
-       }
-
-       /* Hack -- Heavy weapon */
-       if (i == INVEN_LARM)
-       {
-               if (p_ptr->heavy_wield[1])
-               {
-#ifdef JP
-p = "±¿ÈÂÃæ";
-#else
-                       p = "Just lifting";
-#endif
-
-               }
-       }
-
-       /* Hack -- Heavy bow */
-       if (i == INVEN_BOW)
-       {
-               object_type *o_ptr;
-               o_ptr = &inventory[i];
-               if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
-               {
-#ifdef JP
-p = "±¿ÈÂÃæ";
-#else
-                       p = "Just holding";
-#endif
-
-               }
        }
 
        /* Return the result */
-       return (p);
+       return p;
 }
 
 
@@ -4183,118 +4208,82 @@ cptr describe_use(int i)
        switch (i)
        {
 #ifdef JP
-case INVEN_RARM: p = p_ptr->ryoute ? " Î¾¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
+               case INVEN_RARM:  p = p_ptr->heavy_wield[0] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->migite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
 #else
-               case INVEN_RARM: p = "attacking monsters with"; break;
+               case INVEN_RARM:  p = p_ptr->heavy_wield[0] ? "just lifting" : (p_ptr->migite ? "attacking monsters with" : "wearing on your arm"); break;
 #endif
 
 #ifdef JP
-case INVEN_LARM:   p = (left_hander ? " ±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : " º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë"); break;
+               case INVEN_LARM:  p = p_ptr->heavy_wield[1] ? "±¿ÈÂÃæ¤Î" : ((p_ptr->ryoute && p_ptr->hidarite) ? "ξ¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : (left_hander ? "±¦¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë" : "º¸¼ê¤ËÁõÈ÷¤·¤Æ¤¤¤ë")); break;
 #else
-               case INVEN_LARM:   p = "wearing on your arm"; break;
+               case INVEN_LARM:  p = p_ptr->heavy_wield[1] ? "just lifting" : (p_ptr->hidarite ? "attacking monsters with" : "wearing on your arm"); break;
 #endif
 
 #ifdef JP
-case INVEN_BOW:   p = "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
+               case INVEN_BOW:   p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î" : "¼Í·âÍѤËÁõÈ÷¤·¤Æ¤¤¤ë"; break;
 #else
-               case INVEN_BOW:   p = "shooting missiles with"; break;
+               case INVEN_BOW:   p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < inventory[i].weight / 10) ? "just holding" : "shooting missiles with"; break;
 #endif
 
 #ifdef JP
-case INVEN_LEFT:  p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
+               case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
 #else
-               case INVEN_LEFT:  p = "wearing on your left hand"; break;
+               case INVEN_RIGHT: p = (left_hander ? "wearing on your left hand" : "wearing on your right hand"); break;
 #endif
 
 #ifdef JP
-case INVEN_RIGHT: p = (left_hander ? "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
+               case INVEN_LEFT:  p = (left_hander ? "±¦¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë" : "º¸¼ê¤Î»Ø¤Ë¤Ï¤á¤Æ¤¤¤ë"); break;
 #else
-               case INVEN_RIGHT: p = "wearing on your right hand"; break;
+               case INVEN_LEFT:  p = (left_hander ? "wearing on your right hand" : "wearing on your left hand"); break;
 #endif
 
 #ifdef JP
-case INVEN_NECK:  p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
+               case INVEN_NECK:  p = "¼ó¤Ë¤«¤±¤Æ¤¤¤ë"; break;
 #else
                case INVEN_NECK:  p = "wearing around your neck"; break;
 #endif
 
 #ifdef JP
-case INVEN_LITE:  p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
+               case INVEN_LITE:  p = "¸÷¸»¤Ë¤·¤Æ¤¤¤ë"; break;
 #else
                case INVEN_LITE:  p = "using to light the way"; break;
 #endif
 
 #ifdef JP
-case INVEN_BODY:  p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
+               case INVEN_BODY:  p = "ÂΤËÃå¤Æ¤¤¤ë"; break;
 #else
                case INVEN_BODY:  p = "wearing on your body"; break;
 #endif
 
 #ifdef JP
-case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
+               case INVEN_OUTER: p = "¿È¤Ë¤Þ¤È¤Ã¤Æ¤¤¤ë"; break;
 #else
                case INVEN_OUTER: p = "wearing on your back"; break;
 #endif
 
 #ifdef JP
-case INVEN_HEAD:  p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
+               case INVEN_HEAD:  p = "Ƭ¤Ë¤«¤Ö¤Ã¤Æ¤¤¤ë"; break;
 #else
                case INVEN_HEAD:  p = "wearing on your head"; break;
 #endif
 
 #ifdef JP
-case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
+               case INVEN_HANDS: p = "¼ê¤Ë¤Ä¤±¤Æ¤¤¤ë"; break;
 #else
                case INVEN_HANDS: p = "wearing on your hands"; break;
 #endif
 
 #ifdef JP
-case INVEN_FEET:  p = "­¤Ë¤Ï¤¤¤Æ¤¤¤ë"; break;
+               case INVEN_FEET:  p = "­¤Ë¤Ï¤¤¤Æ¤¤¤ë"; break;
 #else
                case INVEN_FEET:  p = "wearing on your feet"; break;
 #endif
 
 #ifdef JP
-default:          p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
+               default:          p = "¥¶¥Ã¥¯¤ËÆþ¤Ã¤Æ¤¤¤ë"; break;
 #else
                default:          p = "carrying in your pack"; break;
 #endif
-
-       }
-
-       /* Hack -- Heavy weapon */
-       if (i == INVEN_RARM)
-       {
-               object_type *o_ptr;
-               int hold = adj_str_hold[p_ptr->stat_ind[A_STR]];
-
-               if (p_ptr->ryoute) hold *= 2;
-               o_ptr = &inventory[i];
-               if (hold < o_ptr->weight / 10)
-               {
-#ifdef JP
-p = "±¿ÈÂÃæ¤Î";
-#else
-                       p = "just lifting";
-#endif
-
-               }
-       }
-
-       /* Hack -- Heavy bow */
-       if (i == INVEN_BOW)
-       {
-               object_type *o_ptr;
-               o_ptr = &inventory[i];
-               if (adj_str_hold[p_ptr->stat_ind[A_STR]] < o_ptr->weight / 10)
-               {
-#ifdef JP
-p = "»ý¤Ä¤À¤±¤ÇÀº°ìÇÕ¤Î";
-#else
-                       p = "just holding";
-#endif
-
-               }
        }
 
        /* Return the result */
@@ -4332,7 +4321,13 @@ bool item_tester_okay(object_type *o_ptr)
        if (!o_ptr->k_idx) return (FALSE);
 
        /* Hack -- ignore "gold" */
-       if (o_ptr->tval == TV_GOLD) return (FALSE);
+       if (o_ptr->tval == TV_GOLD)
+       {
+               /* See xtra2.c */
+               extern bool show_gold_on_floor;
+
+               if (!show_gold_on_floor) return (FALSE);
+       }
 
        /* Check the tval */
        if (item_tester_tval)
@@ -4368,7 +4363,10 @@ void display_inven(void)
        byte            attr = TERM_WHITE;
        char            tmp_val[80];
        char            o_name[MAX_NLEN];
+       int             wid, hgt;
 
+       /* Get size */
+       Term_get_size(&wid, &hgt);
 
        /* Find the "final" slot */
        for (i = 0; i < INVEN_PACK; i++)
@@ -4405,7 +4403,7 @@ void display_inven(void)
                Term_putstr(0, i, 3, TERM_WHITE, tmp_val);
 
                /* Obtain an item description */
-               object_desc(o_name, o_ptr, TRUE, 3);
+               object_desc(o_name, o_ptr, 0);
 
                /* Obtain the length of the description */
                n = strlen(o_name);
@@ -4426,7 +4424,7 @@ void display_inven(void)
                Term_erase(3+n, i, 255);
 
                /* Display the weight if needed */
-               if (show_weights && o_ptr->weight)
+               if (show_weights)
                {
                        int wgt = o_ptr->weight * o_ptr->number;
 #ifdef JP
@@ -4435,12 +4433,12 @@ void display_inven(void)
                        sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
 #endif
 
-                       Term_putstr(71, i, -1, TERM_WHITE, tmp_val);
+                       prt(tmp_val, i, wid - 9);
                }
        }
 
        /* Erase the rest of the window */
-       for (i = z; i < Term->hgt; i++)
+       for (i = z; i < hgt; i++)
        {
                /* Erase the line */
                Term_erase(0, i, 255);
@@ -4459,7 +4457,10 @@ void display_equip(void)
        byte            attr = TERM_WHITE;
        char            tmp_val[80];
        char            o_name[MAX_NLEN];
+       int             wid, hgt;
 
+       /* Get size */
+       Term_get_size(&wid, &hgt);
 
        /* Display the equipment */
        for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
@@ -4471,7 +4472,7 @@ void display_equip(void)
                tmp_val[0] = tmp_val[1] = tmp_val[2] = ' ';
 
                /* Is this item "acceptable"? */
-               if (item_tester_okay(o_ptr))
+               if (select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr))
                {
                        /* Prepare an "index" */
                        tmp_val[0] = index_to_label(i);
@@ -4484,18 +4485,18 @@ void display_equip(void)
                Term_putstr(0, i - INVEN_RARM, 3, TERM_WHITE, tmp_val);
 
                /* Obtain an item description */
-               if ((i == INVEN_LARM) && p_ptr->ryoute)
+               if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
                {
 #ifdef JP
                        strcpy(o_name, "(Éð´ï¤òξ¼ê»ý¤Á)");
 #else
                        strcpy(o_name, "(wielding with two-hands)");
 #endif
-                       attr = 1;
+                       attr = TERM_WHITE;
                }
                else
                {
-                       object_desc(o_name, o_ptr, TRUE, 3);
+                       object_desc(o_name, o_ptr, 0);
                        attr = tval_to_attr[o_ptr->tval % 128];
                }
 
@@ -4514,30 +4515,29 @@ void display_equip(void)
                /* Erase the rest of the line */
                Term_erase(3+n, i - INVEN_RARM, 255);
 
-               /* Display the slot description (if needed) */
-               if (show_labels)
-               {
-                       Term_putstr(61, i - INVEN_RARM, -1, TERM_WHITE, "<--");
-                       Term_putstr(65, i - INVEN_RARM, -1, TERM_WHITE, mention_use(i));
-               }
-
                /* Display the weight (if needed) */
-               if (show_weights && o_ptr->weight)
+               if (show_weights)
                {
                        int wgt = o_ptr->weight * o_ptr->number;
-                       int col = (show_labels ? 52 : 71);
 #ifdef JP
                        sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
 #else
                        sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
 #endif
 
-                       Term_putstr(col, i - INVEN_RARM, -1, TERM_WHITE, tmp_val);
+                       prt(tmp_val, i - INVEN_RARM, wid - (show_labels ? 28 : 9));
+               }
+
+               /* Display the slot description (if needed) */
+               if (show_labels)
+               {
+                       Term_putstr(wid - 20, i - INVEN_RARM, -1, TERM_WHITE, " <-- ");
+                       prt(mention_use(i), i - INVEN_RARM, wid - 15);
                }
        }
 
        /* Erase the rest of the window */
-       for (i = INVEN_TOTAL - INVEN_RARM; i < Term->hgt; i++)
+       for (i = INVEN_TOTAL - INVEN_RARM; i < hgt; i++)
        {
                /* Clear that line */
                Term_erase(0, i, 255);
@@ -4545,74 +4545,319 @@ void display_equip(void)
 }
 
 
-
-
-
-
 /*
- * Display the inventory.
+ * Find the "first" inventory object with the given "tag".
  *
- * Hack -- do not display "trailing" empty slots
+ * A "tag" is a numeral "n" appearing as "@n" anywhere in the
+ * inscription of an object.  Alphabetical characters don't work as a
+ * tag in this form.
+ *
+ * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
+ * and "x" is the "current" command_cmd code.
  */
-int show_inven(int target_item)
+static bool get_tag(int *cp, char tag, int mode)
 {
-       int             i, j, k, l, z = 0;
-       int             col, cur_col, len;
-       object_type     *o_ptr;
-       char            o_name[MAX_NLEN];
-       char            tmp_val[80];
-       int             out_index[23];
-       byte            out_color[23];
-       char            out_desc[23][MAX_NLEN];
-       int             target_item_label = 0;
-       int             wid, hgt;
-       char inven_spellbook_label[52+1];
-
-       /* See cmd5.c */
-       extern bool select_spellbook;
+       int i, start, end;
+       cptr s;
 
-       /* Starting column */
-       col = command_gap;
+       /* Extract index from mode */
+       switch (mode)
+       {
+       case USE_EQUIP:
+               start = INVEN_RARM;
+               end = INVEN_TOTAL - 1;
+               break;
 
-       /* Get size */
-       Term_get_size(&wid, &hgt);
+       case USE_INVEN:
+               start = 0;
+               end = INVEN_PACK - 1;
+               break;
 
-       /* Default "max-length" */
-       len = wid - col - 1;
+       default:
+               return FALSE;
+       }
 
+       /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
 
-       /* Find the "final" slot */
-       for (i = 0; i < INVEN_PACK; i++)
+       /* Check every inventory object */
+       for (i = start; i <= end; i++)
        {
-               o_ptr = &inventory[i];
+               object_type *o_ptr = &inventory[i];
 
                /* Skip non-objects */
                if (!o_ptr->k_idx) continue;
 
-               /* Track */
-               z = i + 1;
-       }
+               /* Skip empty inscriptions */
+               if (!o_ptr->inscription) continue;
 
-       if (select_spellbook)
-       {
-               int index;
+               /* Skip non-choice */
+               if (!item_tester_okay(o_ptr)) continue;
+
+               /* Find a '@' */
+               s = my_strchr(quark_str(o_ptr->inscription), '@');
+
+               /* Process all tags */
+               while (s)
+               {
+                       /* Check the special tags */
+                       if ((s[1] == command_cmd) && (s[2] == tag))
+                       {
+                               /* Save the actual inventory ID */
+                               *cp = i;
+
+                               /* Success */
+                               return (TRUE);
+                       }
+
+                       /* Find another '@' */
+                       s = my_strchr(s + 1, '@');
+               }
+       }
+
+
+       /**** Find a tag in the form of {@#} (allows only numerals)  ***/
+
+       /* Don't allow {@#} with '#' being alphabet */
+       if (tag < '0' || '9' < tag)
+       {
+               /* No such tag */
+               return FALSE;
+       }
+
+       /* Check every object */
+       for (i = start; i <= end; i++)
+       {
+               object_type *o_ptr = &inventory[i];
+
+               /* Skip non-objects */
+               if (!o_ptr->k_idx) continue;
+
+               /* Skip empty inscriptions */
+               if (!o_ptr->inscription) continue;
+
+               /* Skip non-choice */
+               if (!item_tester_okay(o_ptr)) continue;
+
+               /* Find a '@' */
+               s = my_strchr(quark_str(o_ptr->inscription), '@');
 
-               strcpy(inven_spellbook_label, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
-               for (i = 0; i < 52; i++)
+               /* Process all tags */
+               while (s)
+               {
+                       /* Check the normal tags */
+                       if (s[1] == tag)
+                       {
+                               /* Save the actual inventory ID */
+                               *cp = i;
+
+                               /* Success */
+                               return (TRUE);
+                       }
+
+                       /* Find another '@' */
+                       s = my_strchr(s + 1, '@');
+               }
+       }
+
+       /* No such tag */
+       return (FALSE);
+}
+
+
+/*
+ * Find the "first" floor object with the given "tag".
+ *
+ * A "tag" is a numeral "n" appearing as "@n" anywhere in the
+ * inscription of an object.  Alphabetical characters don't work as a
+ * tag in this form.
+ *
+ * Also, the tag "@xn" will work as well, where "n" is a any tag-char,
+ * and "x" is the "current" command_cmd code.
+ */
+static bool get_tag_floor(int *cp, char tag, int floor_list[], int floor_num)
+{
+       int i;
+       cptr s;
+
+       /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/
+
+       /* Check every object in the grid */
+       for (i = 0; i < floor_num && i < 23; i++)
+       {
+               object_type *o_ptr = &o_list[floor_list[i]];
+
+               /* Skip empty inscriptions */
+               if (!o_ptr->inscription) continue;
+
+               /* Find a '@' */
+               s = my_strchr(quark_str(o_ptr->inscription), '@');
+
+               /* Process all tags */
+               while (s)
                {
-                        char c;
-                        if (i < 26) c = (char)('a' + i);
-                        else c = (char)('A' + i - 26);
+                       /* Check the special tags */
+                       if ((s[1] == command_cmd) && (s[2] == tag))
+                       {
+                               /* Save the actual floor object ID */
+                               *cp = i;
 
-                       if (get_tag(&index, c))
+                               /* Success */
+                               return (TRUE);
+                       }
+
+                       /* Find another '@' */
+                       s = my_strchr(s + 1, '@');
+               }
+       }
+
+
+       /**** Find a tag in the form of {@#} (allows only numerals)  ***/
+
+       /* Don't allow {@#} with '#' being alphabet */
+       if (tag < '0' || '9' < tag)
+       {
+               /* No such tag */
+               return FALSE;
+       }
+
+       /* Check every object in the grid */
+       for (i = 0; i < floor_num && i < 23; i++)
+       {
+               object_type *o_ptr = &o_list[floor_list[i]];
+
+               /* Skip empty inscriptions */
+               if (!o_ptr->inscription) continue;
+
+               /* Find a '@' */
+               s = my_strchr(quark_str(o_ptr->inscription), '@');
+
+               /* Process all tags */
+               while (s)
+               {
+                       /* Check the normal tags */
+                       if (s[1] == tag)
                        {
-                               if (inven_spellbook_label[i] == c)
-                                        inven_spellbook_label[i] = ' ';
-                               inven_spellbook_label[index] = c;
+                               /* Save the floor object ID */
+                               *cp = i;
+
+                               /* Success */
+                               return (TRUE);
                        }
+
+                       /* Find another '@' */
+                       s = my_strchr(s + 1, '@');
                }
        }
 
+       /* No such tag */
+       return (FALSE);
+}
+
+
+/*
+ * Move around label characters with correspond tags
+ */
+static void prepare_label_string(char *label, int mode)
+{
+       cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+       int  offset = (mode == USE_EQUIP) ? INVEN_RARM : 0;
+       int  i;
+
+       /* Prepare normal labels */
+       strcpy(label, alphabet_chars);
+
+       /* Move each label */
+       for (i = 0; i < 52; i++)
+       {
+               int index;
+               char c = alphabet_chars[i];
+
+               /* Find a tag with this label */
+               if (get_tag(&index, c, mode))
+               {
+                       /* Delete the overwritten label */
+                       if (label[i] == c) label[i] = ' ';
+
+                       /* Move the label to the place of corresponding tag */
+                       label[index - offset] = c;
+               }
+       }
+}
+
+
+/*
+ * Move around label characters with correspond tags (floor version)
+ */
+static void prepare_label_string_floor(char *label, int floor_list[], int floor_num)
+{
+       cptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+       int  i;
+
+       /* Prepare normal labels */
+       strcpy(label, alphabet_chars);
+
+       /* Move each label */
+       for (i = 0; i < 52; i++)
+       {
+               int index;
+               char c = alphabet_chars[i];
+
+               /* Find a tag with this label */
+               if (get_tag_floor(&index, c, floor_list, floor_num))
+               {
+                       /* Delete the overwritten label */
+                       if (label[i] == c) label[i] = ' ';
+
+                       /* Move the label to the place of corresponding tag */
+                       label[index] = c;
+               }
+       }
+}
+
+
+/*
+ * Display the inventory.
+ *
+ * Hack -- do not display "trailing" empty slots
+ */
+int show_inven(int target_item)
+{
+       int             i, j, k, l, z = 0;
+       int             col, cur_col, len;
+       object_type     *o_ptr;
+       char            o_name[MAX_NLEN];
+       char            tmp_val[80];
+       int             out_index[23];
+       byte            out_color[23];
+       char            out_desc[23][MAX_NLEN];
+       int             target_item_label = 0;
+       int             wid, hgt;
+       char            inven_label[52 + 1];
+
+       /* Starting column */
+       col = command_gap;
+
+       /* Get size */
+       Term_get_size(&wid, &hgt);
+
+       /* Default "max-length" */
+       len = wid - col - 1;
+
+
+       /* Find the "final" slot */
+       for (i = 0; i < INVEN_PACK; i++)
+       {
+               o_ptr = &inventory[i];
+
+               /* Skip non-objects */
+               if (!o_ptr->k_idx) continue;
+
+               /* Track */
+               z = i + 1;
+       }
+
+       prepare_label_string(inven_label, USE_INVEN);
+
        /* Display the inventory */
        for (k = 0, i = 0; i < z; i++)
        {
@@ -4622,7 +4867,7 @@ int show_inven(int target_item)
                if (!item_tester_okay(o_ptr)) continue;
 
                /* Describe the object */
-               object_desc(o_name, o_ptr, TRUE, 3);
+               object_desc(o_name, o_ptr, 0);
 
                /* Save the object index, color, and description */
                out_index[k] = i;
@@ -4684,9 +4929,10 @@ int show_inven(int target_item)
                        }
                        else strcpy(tmp_val, "  ");
                }
-               else if (i <= INVEN_PACK && select_spellbook)
+               else if (i <= INVEN_PACK)
                {
-                       sprintf(tmp_val, "%c)", inven_spellbook_label[i]);
+                       /* Prepare an index --(-- */
+                       sprintf(tmp_val, "%c)", inven_label[i]);
                }
                else
                {
@@ -4709,13 +4955,9 @@ int show_inven(int target_item)
                        if (a & 0x80) a |= 0x40;
 #endif
 
-                       Term_draw(cur_col, j + 1, a, c);
-                       if (use_bigtile)
-                       {
-                               cur_col++;
-                               if (a & 0x80)
-                                       Term_draw(cur_col, j + 1, 255, -1);
-                       }
+                       Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
+                       if (use_bigtile) cur_col++;
+
                        cur_col += 2;
                }
 
@@ -4733,7 +4975,7 @@ int show_inven(int target_item)
                        (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
 #endif
 
-                       put_str(tmp_val, j + 1, wid - 9);
+                       prt(tmp_val, j + 1, wid - 9);
                }
        }
 
@@ -4763,7 +5005,7 @@ int show_equip(int target_item)
        char            out_desc[23][MAX_NLEN];
        int             target_item_label = 0;
        int             wid, hgt;
-
+       char            equip_label[52 + 1];
 
        /* Starting column */
        col = command_gap;
@@ -4781,19 +5023,21 @@ int show_equip(int target_item)
                o_ptr = &inventory[i];
 
                /* Is this item acceptable? */
-               if (!item_tester_okay(o_ptr) && (!((i == INVEN_LARM) && p_ptr->ryoute) || item_tester_no_ryoute)) continue;
+               if (!(select_ring_slot ? is_ring_slot(i) : item_tester_okay(o_ptr)) &&
+                   (!((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute) ||
+                    item_tester_no_ryoute)) continue;
 
                /* Description */
-               object_desc(o_name, o_ptr, TRUE, 3);
+               object_desc(o_name, o_ptr, 0);
 
-               if ((i == INVEN_LARM) && p_ptr->ryoute)
+               if ((((i == INVEN_RARM) && p_ptr->hidarite) || ((i == INVEN_LARM) && p_ptr->migite)) && p_ptr->ryoute)
                {
 #ifdef JP
                        (void)strcpy(out_desc[k],"(Éð´ï¤òξ¼ê»ý¤Á)");
 #else
                        (void)strcpy(out_desc[k],"(wielding with two-hands)");
 #endif
-                       out_color[k] = 1;
+                       out_color[k] = TERM_WHITE;
                }
                else
                {
@@ -4810,7 +5054,7 @@ int show_equip(int target_item)
 
                /* Extract the maximal length (see below) */
 #ifdef JP
-                l = strlen(out_desc[k]) + (2 + 1);
+               l = strlen(out_desc[k]) + (2 + 1);
 #else
                l = strlen(out_desc[k]) + (2 + 3);
 #endif
@@ -4818,7 +5062,7 @@ int show_equip(int target_item)
 
                /* Increase length for labels (if needed) */
 #ifdef JP
-                if (show_labels) l += (7 + 2);
+               if (show_labels) l += (7 + 2);
 #else
                if (show_labels) l += (14 + 2);
 #endif
@@ -4838,11 +5082,12 @@ int show_equip(int target_item)
 
        /* Hack -- Find a column to start in */
 #ifdef JP
-        col = (len > wid - 6) ? 0 : (wid - len - 1);
+       col = (len > wid - 6) ? 0 : (wid - len - 1);
 #else
        col = (len > wid - 4) ? 0 : (wid - len - 1);
 #endif
 
+       prepare_label_string(equip_label, USE_EQUIP);
 
        /* Output each entry */
        for (j = 0; j < k; j++)
@@ -4869,9 +5114,16 @@ int show_equip(int target_item)
                        }
                        else strcpy(tmp_val, "  ");
                }
-               else
+               else if (i >= INVEN_RARM)
+               {
+                       /* Prepare an index --(-- */
+                       sprintf(tmp_val, "%c)", equip_label[i - INVEN_RARM]);
+               }
+               else /* Paranoia */
+               {
                        /* Prepare an index --(-- */
                        sprintf(tmp_val, "%c)", index_to_label(i));
+               }
 
                /* Clear the line with the (possibly indented) index */
                put_str(tmp_val, j+1, col);
@@ -4888,13 +5140,9 @@ int show_equip(int target_item)
                        if (a & 0x80) a |= 0x40;
 #endif
 
-                       Term_draw(cur_col, j + 1, a, c);
-                       if (use_bigtile)
-                       {
-                               cur_col++;
-                               if (a & 0x80)
-                                       Term_draw(cur_col, j + 1, 255, -1);
-                       }
+                       Term_queue_bigchar(cur_col, j + 1, a, c, 0, 0);
+                       if (use_bigtile) cur_col++;
+
                        cur_col += 2;
                }
 
@@ -4930,12 +5178,12 @@ int show_equip(int target_item)
                {
                        int wgt = o_ptr->weight * o_ptr->number;
 #ifdef JP
-                        (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
+                       (void)sprintf(tmp_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) );
 #else
                        (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
 #endif
 
-                       put_str(tmp_val, j+1, wid - 9);
+                       prt(tmp_val, j + 1, wid - 9);
                }
        }
 
@@ -5015,7 +5263,7 @@ static bool verify(cptr prompt, int item)
        }
 
        /* Describe */
-       object_desc(o_name, o_ptr, TRUE, 3);
+       object_desc(o_name, o_ptr, 0);
 
        /* Prompt */
 #ifdef JP
@@ -5041,6 +5289,8 @@ static bool get_item_allow(int item)
 
        object_type *o_ptr;
 
+       if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
+
        /* Inventory */
        if (item >= 0)
        {
@@ -5057,7 +5307,7 @@ static bool get_item_allow(int item)
        if (!o_ptr->inscription) return (TRUE);
 
        /* Find a '!' */
-       s = strchr(quark_str(o_ptr->inscription), '!');
+       s = my_strchr(quark_str(o_ptr->inscription), '!');
 
        /* Process preventions */
        while (s)
@@ -5075,7 +5325,7 @@ if (!verify("
                }
 
                /* Find another '!' */
-               s = strchr(s + 1, '!');
+               s = my_strchr(s + 1, '!');
        }
 
        /* Allow it */
@@ -5092,6 +5342,8 @@ static bool get_item_okay(int i)
        /* Illegal items */
        if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
 
+       if (select_ring_slot) return is_ring_slot(i);
+
        /* Verify the item */
        if (!item_tester_okay(&inventory[i])) return (FALSE);
 
@@ -5102,94 +5354,6 @@ static bool get_item_okay(int i)
 
 
 /*
- * Find the "first" inventory object with the given "tag".
- *
- * A "tag" is a char "n" appearing as "@n" anywhere in the
- * inscription of an object.
- *
- * Also, the tag "@xn" will work as well, where "n" is a tag-char,
- * and "x" is the "current" command_cmd code.
- */
-int get_tag(int *cp, char tag)
-{
-       int i;
-       cptr s;
-
-       /* Check every object */
-       for (i = 0; i < INVEN_TOTAL; ++i)
-       {
-               object_type *o_ptr = &inventory[i];
-
-               /* Skip non-objects */
-               if (!o_ptr->k_idx) continue;
-
-               /* Skip empty inscriptions */
-               if (!o_ptr->inscription) continue;
-
-               /* Skip non-choice */
-               if (!item_tester_okay(o_ptr)) continue;
-
-               /* Find a '@' */
-               s = strchr(quark_str(o_ptr->inscription), '@');
-
-               /* Process all tags */
-               while (s)
-               {
-                       /* Check the special tags */
-                       if ((s[1] == command_cmd) && (s[2] == tag))
-                       {
-                               /* Save the actual inventory ID */
-                               *cp = i;
-
-                               /* Success */
-                               return (TRUE);
-                       }
-
-                       /* Find another '@' */
-                       s = strchr(s + 1, '@');
-               }
-       }
-
-       /* Check every object */
-       for (i = 0; i < INVEN_TOTAL; ++i)
-       {
-               object_type *o_ptr = &inventory[i];
-
-               /* Skip non-objects */
-               if (!o_ptr->k_idx) continue;
-
-               /* Skip empty inscriptions */
-               if (!o_ptr->inscription) continue;
-
-               /* Skip non-choice */
-               if (!item_tester_okay(o_ptr)) continue;
-
-               /* Find a '@' */
-               s = strchr(quark_str(o_ptr->inscription), '@');
-
-               /* Process all tags */
-               while (s)
-               {
-                       /* Check the normal tags */
-                       if (s[1] == tag && !((s[2] >= '0' && s[2] <= '9') || (s[2] >= 'a' && s[2] <= 'z') || (s[2] >= 'A' && s[2] <= 'Z')))
-               {
-                               /* Save the actual inventory ID */
-                               *cp = i;
-
-                               /* Success */
-                               return (TRUE);
-                       }
-
-                       /* Find another '@' */
-                       s = strchr(s + 1, '@');
-               }
-       }
-
-       /* No such tag */
-       return (FALSE);
-}
-
-/*
  * Determine whether get_item() can get some item or not
  * assuming mode = (USE_EQUIP | USE_INVEN | USE_FLOOR).
  */
@@ -5201,7 +5365,7 @@ bool can_get_item(void)
                if (item_tester_okay(&inventory[j]))
                        return TRUE;
 
-       floor_num = scan_floor(floor_list, py, px, 0x01);
+       floor_num = scan_floor(floor_list, py, px, 0x03);
        if (floor_num)
                return TRUE;
 
@@ -5262,7 +5426,7 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
 {
        s16b this_o_idx, next_o_idx = 0;
 
-       char n1, n2, which = ' ';
+       char which = ' ';
 
        int j, k, i1, i2, e1, e2;
 
@@ -5282,31 +5446,46 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
        char out_val[160];
 
        /* See cmd5.c */
-       extern bool select_spellbook;
        extern bool select_the_force;
 
        int menu_line = (use_menu ? 1 : 0);
        int max_inven = 0;
        int max_equip = 0;
 
+#ifdef ALLOW_REPEAT
+
+       static char prev_tag = '\0';
+       char cur_tag = '\0';
+
+#endif /* ALLOW_REPEAT */
+
 #ifdef ALLOW_EASY_FLOOR /* TNB */
 
        if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
 
 #endif /* ALLOW_EASY_FLOOR -- TNB */
 
+       /* Extract args */
+       if (mode & USE_EQUIP) equip = TRUE;
+       if (mode & USE_INVEN) inven = TRUE;
+       if (mode & USE_FLOOR) floor = TRUE;
+
 #ifdef ALLOW_REPEAT
 
        /* Get the item index */
        if (repeat_pull(cp))
        {
-               if (*cp == 1111) { /* the_force */
-                   item_tester_tval = 0;
-                   item_tester_hook = NULL;
-                   return (TRUE);
-               } else
+               /* the_force */
+               if (select_the_force && (*cp == INVEN_FORCE))
+               {
+                       item_tester_tval = 0;
+                       item_tester_hook = NULL;
+                       command_cmd = 0; /* Hack -- command_cmd is no longer effective */
+                       return (TRUE);
+               }
+
                /* Floor item? */
-               if (*cp < 0)
+               else if (floor && (*cp < 0))
                {
                        object_type *o_ptr;
 
@@ -5319,38 +5498,58 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
                        /* Validate the item */
                        if (item_tester_okay(o_ptr))
                        {
-                               /* Forget the item_tester_tval restriction */
+                               /* Forget restrictions */
                                item_tester_tval = 0;
-
-                               /* Forget the item_tester_hook restriction */
                                item_tester_hook = NULL;
+                               command_cmd = 0; /* Hack -- command_cmd is no longer effective */
 
                                /* Success */
-                               return (TRUE);
+                               return TRUE;
                        }
                }
 
-               /* Verify the item */
-               else if (get_item_okay(*cp))
+               else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
+                        (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
                {
-                       /* Forget the item_tester_tval restriction */
-                       item_tester_tval = 0;
+                       if (prev_tag && command_cmd)
+                       {
+                               /* Look up the tag and validate the item */
+                               if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
+                               else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
+                               else if (!get_item_okay(k)) /* Reject */;
+                               else
+                               {
+                                       /* Accept that choice */
+                                       (*cp) = k;
 
-                       /* Forget the item_tester_hook restriction */
-                       item_tester_hook = NULL;
+                                       /* Forget restrictions */
+                                       item_tester_tval = 0;
+                                       item_tester_hook = NULL;
+                                       command_cmd = 0; /* Hack -- command_cmd is no longer effective */
 
-                       /* Success */
-                       return (TRUE);
+                                       /* Success */
+                                       return TRUE;
+                               }
+
+                               prev_tag = '\0'; /* prev_tag is no longer effective */
+                       }
+
+                       /* Verify the item */
+                       else if (get_item_okay(*cp))
+                       {
+                               /* Forget restrictions */
+                               item_tester_tval = 0;
+                               item_tester_hook = NULL;
+                               command_cmd = 0; /* Hack -- command_cmd is no longer effective */
+
+                               /* Success */
+                               return TRUE;
+                       }
                }
        }
 
 #endif /* ALLOW_REPEAT */
 
-       /* Extract args */
-       if (mode & (USE_EQUIP)) equip = TRUE;
-       if (mode & (USE_INVEN)) inven = TRUE;
-       if (mode & (USE_FLOOR)) floor = TRUE;
-
 
        /* Paranoia XXX XXX XXX */
        msg_print(NULL);
@@ -5389,7 +5588,7 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
        else if (use_menu)
        {
                for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
-                       if (item_tester_okay(&inventory[j])) max_equip++;
+                       if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
                if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
        }
 
@@ -5397,6 +5596,14 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
        while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
        while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
 
+       if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
+       {
+               if (p_ptr->migite)
+               {
+                       if (e2 < INVEN_LARM) e2 = INVEN_LARM;
+               }
+               else if (p_ptr->hidarite) e1 = INVEN_RARM;
+       }
 
 
        /* Restrict floor usage */
@@ -5414,7 +5621,7 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
                        next_o_idx = o_ptr->next_o_idx;
 
                        /* Accept the item on the floor if legal */
-                       if (item_tester_okay(o_ptr)) allow_floor = TRUE;
+                       if (item_tester_okay(o_ptr) && (o_ptr->marked & OM_FOUND)) allow_floor = TRUE;
                }
        }
 
@@ -5431,7 +5638,7 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
                done = TRUE;
 
                if (select_the_force) {
-                   *cp = 1111;
+                   *cp = INVEN_FORCE;
                    item = TRUE;
                }
        }
@@ -5441,7 +5648,6 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
        {
                /* Hack -- Start on equipment if requested */
                if (command_see && command_wrk && equip)
-
                {
                        command_wrk = TRUE;
                }
@@ -5466,10 +5672,10 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
        }
 
 
-        /*
-         * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
-         */
-        if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
+       /*
+        * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
+        */
+       if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
 
        /* Hack -- start out in "display" mode */
        if (command_see)
@@ -5485,49 +5691,43 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
                int get_item_label = 0;
 
                /* Show choices */
-               if (show_choices)
+               int ni = 0;
+               int ne = 0;
+
+               /* Scan windows */
+               for (j = 0; j < 8; j++)
                {
-                       int ni = 0;
-                       int ne = 0;
+                       /* Unused */
+                       if (!angband_term[j]) continue;
 
-                       /* Scan windows */
-                       for (j = 0; j < 8; j++)
-                       {
-                               /* Unused */
-                               if (!angband_term[j]) continue;
+                       /* Count windows displaying inven */
+                       if (window_flag[j] & (PW_INVEN)) ni++;
 
-                               /* Count windows displaying inven */
-                               if (window_flag[j] & (PW_INVEN)) ni++;
+                       /* Count windows displaying equip */
+                       if (window_flag[j] & (PW_EQUIP)) ne++;
+               }
 
-                               /* Count windows displaying equip */
-                               if (window_flag[j] & (PW_EQUIP)) ne++;
-                       }
+               /* Toggle if needed */
+               if ((command_wrk && ni && !ne) ||
+                   (!command_wrk && !ni && ne))
+               {
+                       /* Toggle */
+                       toggle_inven_equip();
 
-                       /* Toggle if needed */
-                       if ((command_wrk && ni && !ne) ||
-                           (!command_wrk && !ni && ne))
-                       {
-                               /* Toggle */
-                               toggle_inven_equip();
+                       /* Track toggles */
+                       toggle = !toggle;
+               }
 
-                               /* Track toggles */
-                               toggle = !toggle;
-                       }
+               /* Update */
+               p_ptr->window |= (PW_INVEN | PW_EQUIP);
 
-                       /* Update */
-                       p_ptr->window |= (PW_INVEN | PW_EQUIP);
+               /* Redraw windows */
+               window_stuff();
 
-                       /* Redraw windows */
-                       window_stuff();
-               }
 
                /* Inventory screen */
                if (!command_wrk)
                {
-                       /* Extract the legal requests */
-                       n1 = I2A(i1);
-                       n2 = I2A(i2);
-
                        /* Redraw if needed */
                        if (command_see) get_item_label = show_inven(menu_line);
                }
@@ -5535,10 +5735,6 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
                /* Equipment screen */
                else
                {
-                       /* Extract the legal requests */
-                       n1 = I2A(e1 - INVEN_RARM);
-                       n2 = I2A(e2 - INVEN_RARM);
-
                        /* Redraw if needed */
                        if (command_see) get_item_label = show_equip(menu_line);
                }
@@ -5548,23 +5744,21 @@ bool get_item(int *cp, cptr pmt, cptr str, int mode)
                {
                        /* Begin the prompt */
 #ifdef JP
-sprintf(out_val, "»ý¤Áʪ:");
+                       sprintf(out_val, "»ý¤Áʪ:");
 #else
                        sprintf(out_val, "Inven:");
 #endif
 
-
                        /* Some legal items */
                        if ((i1 <= i2) && !use_menu)
                        {
                                /* Build the prompt */
 #ifdef JP
-sprintf(tmp_val, "%c-%c,'(',')',",
+                               sprintf(tmp_val, "%c-%c,'(',')',",
 #else
                                sprintf(tmp_val, " %c-%c,'(',')',",
 #endif
-
-                                       index_to_label(i1), index_to_label(i2));
+                                       index_to_label(i1), index_to_label(i2));
 
                                /* Append */
                                strcat(out_val, tmp_val);
@@ -5572,23 +5766,17 @@ sprintf(tmp_val, "%c-%c,'(',')',",
 
                        /* Indicate ability to "view" */
 #ifdef JP
-if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
+                       if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
 #else
                        if (!command_see && !use_menu) strcat(out_val, " * to see,");
 #endif
 
-
                        /* Append */
 #ifdef JP
-if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
-else if (select_the_force)
-       strcat(out_val, " 'w'Îýµ¤½Ñ,");
+                       if (equip) strcat(out_val, format(" %s ÁõÈ÷ÉÊ,", use_menu ? "'4'or'6'" : "'/'"));
 #else
-if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
-else if (select_the_force)
-       strcat(out_val, " w for the Force,");
+                       if (equip) strcat(out_val, format(" %s for Equip,", use_menu ? "4 or 6" : "/"));
 #endif
-
                }
 
                /* Viewing equipment */
@@ -5596,23 +5784,21 @@ else if (select_the_force)
                {
                        /* Begin the prompt */
 #ifdef JP
-sprintf(out_val, "ÁõÈ÷ÉÊ:");
+                       sprintf(out_val, "ÁõÈ÷ÉÊ:");
 #else
                        sprintf(out_val, "Equip:");
 #endif
 
-
                        /* Some legal items */
                        if ((e1 <= e2) && !use_menu)
                        {
                                /* Build the prompt */
 #ifdef JP
-sprintf(tmp_val, "%c-%c,'(',')',",
+                               sprintf(tmp_val, "%c-%c,'(',')',",
 #else
                                sprintf(tmp_val, " %c-%c,'(',')',",
 #endif
-
-                                       index_to_label(e1), index_to_label(e2));
+                                       index_to_label(e1), index_to_label(e2));
 
                                /* Append */
                                strcat(out_val, tmp_val);
@@ -5620,29 +5806,28 @@ sprintf(tmp_val, "%c-%c,'(',')',",
 
                        /* Indicate ability to "view" */
 #ifdef JP
-if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
+                       if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
 #else
                        if (!command_see) strcat(out_val, " * to see,");
 #endif
 
-
                        /* Append */
 #ifdef JP
-if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
+                       if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
 #else
-if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
+                       if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
 #endif
-
                }
 
                /* Indicate legality of the "floor" item */
 #ifdef JP
-if (allow_floor) strcat(out_val, " '-'¾²¾å,");
+               if (allow_floor) strcat(out_val, " '-'¾²¾å,");
+               if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
 #else
                if (allow_floor) strcat(out_val, " - for floor,");
+               if (select_the_force) strcat(out_val, " w for the Force,");
 #endif
 
-
                /* Finish the prompt */
                strcat(out_val, " ESC");
 
@@ -5652,7 +5837,6 @@ if (allow_floor) strcat(out_val, " '-'
                /* Show the prompt */
                prt(tmp_val, 0, 0);
 
-
                /* Get a key */
                which = inkey();
 
@@ -5753,10 +5937,10 @@ if (allow_floor) strcat(out_val, " '-'
                                done = TRUE;
                                break;
                        }
-                       case 'w':
+                       case 'w':
                        {
                                if (select_the_force) {
-                                       *cp = 1111;
+                                       *cp = INVEN_FORCE;
                                        item = TRUE;
                                        done = TRUE;
                                        break;
@@ -5883,7 +6067,7 @@ if (other_query_flag && !verify("
                        case '7': case '8': case '9':
                        {
                                /* Look up the tag */
-                               if (!get_tag(&k, which))
+                               if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
                                {
                                        bell();
                                        break;
@@ -5914,13 +6098,15 @@ if (other_query_flag && !verify("
                                (*cp) = k;
                                item = TRUE;
                                done = TRUE;
+#ifdef ALLOW_REPEAT
+                               cur_tag = which;
+#endif /* ALLOW_REPEAT */
                                break;
                        }
 
 #if 0
                        case '\n':
                        case '\r':
-#endif
                        {
                                /* Choose "default" inventory item */
                                if (!command_wrk)
@@ -5954,48 +6140,54 @@ if (other_query_flag && !verify("
                                done = TRUE;
                                break;
                        }
+#endif
 
-                       case 'w':
+                       case 'w':
                        {
                                if (select_the_force) {
-                                       *cp = 1111;
+                                       *cp = INVEN_FORCE;
                                        item = TRUE;
                                        done = TRUE;
                                        break;
                                }
+
+                               /* Fall through */
                        }
 
                        default:
                        {
                                int ver;
-                               if(select_spellbook){
-                                    bool not_found = FALSE;
-                                    /* Look up the tag */
-                                    if (!get_tag(&k, which))
-                                    {
+                               bool not_found = FALSE;
+
+                               /* Look up the alphabetical tag */
+                               if (!get_tag(&k, which, command_wrk ? USE_EQUIP : USE_INVEN))
+                               {
                                        not_found = TRUE;
-                                    }
+                               }
 
-                                    /* Hack -- Validate the item */
-                                    if ((k < INVEN_RARM) ? !inven : !equip)
-                                    {
+                               /* Hack -- Validate the item */
+                               else if ((k < INVEN_RARM) ? !inven : !equip)
+                               {
                                        not_found = TRUE;
-                                    }
+                               }
 
-                                    /* Validate the item */
-                                    if (!get_item_okay(k))
-                                    {
+                               /* Validate the item */
+                               else if (!get_item_okay(k))
+                               {
                                        not_found = TRUE;
-                                    }
+                               }
 
-                                    if( !not_found ){
-                                        /* Accept that choice */
-                                        (*cp) = k;
-                                        item = TRUE;
-                                        done = TRUE;
-                                        break;
-                                    }
-                               }                               
+                               if (!not_found)
+                               {
+                                       /* Accept that choice */
+                                       (*cp) = k;
+                                       item = TRUE;
+                                       done = TRUE;
+#ifdef ALLOW_REPEAT
+                                       cur_tag = which;
+#endif /* ALLOW_REPEAT */
+                                       break;
+                               }
 
                                /* Extract "query" setting */
                                ver = isupper(which);
@@ -6004,16 +6196,16 @@ if (other_query_flag && !verify("
                                /* Convert letter to inventory index */
                                if (!command_wrk)
                                {
-                                        if (which == '(') k = i1;
-                                        else if (which == ')') k = i2;
-                                        else k = label_to_inven(which);
+                                       if (which == '(') k = i1;
+                                       else if (which == ')') k = i2;
+                                       else k = label_to_inven(which);
                                }
 
                                /* Convert letter to equipment index */
                                else
                                {
-                                        if (which == '(') k = e1;
-                                        else if (which == ')') k = e2;
+                                       if (which == '(') k = e1;
+                                       else if (which == ')') k = e2;
                                        else k = label_to_equip(which);
                                }
 
@@ -6074,18 +6266,15 @@ if (ver && !verify("
        item_tester_hook = NULL;
 
 
-       /* Clean up */
-       if (show_choices)
-       {
-               /* Toggle again if needed */
-               if (toggle) toggle_inven_equip();
+       /* Clean up  'show choices' */
+       /* Toggle again if needed */
+       if (toggle) toggle_inven_equip();
 
-               /* Update */
-               p_ptr->window |= (PW_INVEN | PW_EQUIP);
+       /* Update */
+       p_ptr->window |= (PW_INVEN | PW_EQUIP);
 
-               /* Window stuff */
-               window_stuff();
-       }
+       /* Window stuff */
+       window_stuff();
 
 
        /* Clear the prompt line */
@@ -6094,10 +6283,16 @@ if (ver && !verify("
        /* Warning if needed */
        if (oops && str) msg_print(str);
 
+       if (item)
+       {
 #ifdef ALLOW_REPEAT
-       if (item) repeat_push(*cp);
+               repeat_push(*cp);
+               if (command_cmd) prev_tag = cur_tag;
 #endif /* ALLOW_REPEAT */
 
+               command_cmd = 0; /* Hack -- command_cmd is no longer effective */
+       }
+
        /* Result */
        return (item);
 }
@@ -6139,7 +6334,7 @@ int scan_floor(int *items, int y, int x, int mode)
                if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
 
                /* Marked */
-               if ((mode & 0x02) && !o_ptr->marked) continue;
+               if ((mode & 0x02) && !(o_ptr->marked & OM_FOUND)) continue;
 
                /* Accept this item */
                /* XXX Hack -- Enforce limit */
@@ -6156,6 +6351,7 @@ int scan_floor(int *items, int y, int x, int mode)
        return num;
 }
 
+
 /*
  * Display a list of the items on the floor at the given location.
  */
@@ -6177,6 +6373,9 @@ int show_floor(int target_item, int y, int x, int *min_width)
 
        int floor_list[23], floor_num;
        int wid, hgt;
+       char floor_label[52 + 1];
+
+       bool dont_need_to_show_weights = TRUE;
 
        /* Get size */
        Term_get_size(&wid, &hgt);
@@ -6186,15 +6385,15 @@ int show_floor(int target_item, int y, int x, int *min_width)
 
 
        /* Scan for objects in the grid, using item_tester_okay() */
-       floor_num = scan_floor(floor_list, y, x, 0x01);
+       floor_num = scan_floor(floor_list, y, x, 0x03);
 
-       /* Display the inventory */
+       /* Display the floor objects */
        for (k = 0, i = 0; i < floor_num && i < 23; i++)
        {
                o_ptr = &o_list[floor_list[i]];
 
                /* Describe the object */
-               object_desc(o_name, o_ptr, TRUE, 3);
+               object_desc(o_name, o_ptr, 0);
 
                /* Save the index */
                out_index[k] = i;
@@ -6211,6 +6410,8 @@ int show_floor(int target_item, int y, int x, int *min_width)
                /* Be sure to account for the weight */
                if (show_weights) l += 9;
 
+               if (o_ptr->tval != TV_GOLD) dont_need_to_show_weights = FALSE;
+
                /* Maintain the maximum length */
                if (l > len) len = l;
 
@@ -6218,12 +6419,16 @@ int show_floor(int target_item, int y, int x, int *min_width)
                k++;
        }
 
+       if (show_weights && dont_need_to_show_weights) len -= 9;
+
        /* Save width */
        *min_width = len;
 
        /* Find the column to start in */
        col = (len > wid - 4) ? 0 : (wid - len - 1);
 
+       prepare_label_string_floor(floor_label, floor_list, floor_num);
+
        /* Output each entry */
        for (j = 0; j < k; j++)
        {
@@ -6250,8 +6455,10 @@ int show_floor(int target_item, int y, int x, int *min_width)
                        else strcpy(tmp_val, "   ");
                }
                else
+               {
                        /* Prepare an index --(-- */
-                       sprintf(tmp_val, "%c)", index_to_label(j));
+                       sprintf(tmp_val, "%c)", floor_label[j]);
+               }
 
                /* Clear the line with the (possibly indented) index */
                put_str(tmp_val, j + 1, col);
@@ -6260,7 +6467,7 @@ int show_floor(int target_item, int y, int x, int *min_width)
                c_put_str(out_color[j], out_desc[j], j + 1, col + 3);
 
                /* Display the weight if needed */
-               if (show_weights)
+               if (show_weights && (o_ptr->tval != TV_GOLD))
                {
                        int wgt = o_ptr->weight * o_ptr->number;
 #ifdef JP
@@ -6269,7 +6476,7 @@ int show_floor(int target_item, int y, int x, int *min_width)
                        sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
 #endif
 
-                       put_str(tmp_val, j + 1, wid - 9);
+                       prt(tmp_val, j + 1, wid - 9);
                }
        }
 
@@ -6293,9 +6500,10 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
 
        bool oops = FALSE;
 
-       bool equip = FALSE;
-       bool inven = FALSE;
-       bool floor = FALSE;
+       /* Extract args */
+       bool equip = (mode & USE_EQUIP) ? TRUE : FALSE;
+       bool inven = (mode & USE_INVEN) ? TRUE : FALSE;
+       bool floor = (mode & USE_FLOOR) ? TRUE : FALSE;
 
        bool allow_equip = FALSE;
        bool allow_inven = FALSE;
@@ -6309,7 +6517,6 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
        int floor_num, floor_list[23], floor_top = 0;
        int min_width = 0;
 
-       extern bool select_spellbook;
        extern bool select_the_force;
 
        int menu_line = (use_menu ? 1 : 0);
@@ -6318,60 +6525,102 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
 
 #ifdef ALLOW_REPEAT
 
+       static char prev_tag = '\0';
+       char cur_tag = '\0';
+
        /* Get the item index */
        if (repeat_pull(cp))
        {
-               if (*cp == 1111) { /* the_force */
-                   item_tester_tval = 0;
-                   item_tester_hook = NULL;
-                   return (TRUE);
-               } else
+               /* the_force */
+               if (select_the_force && (*cp == INVEN_FORCE))
+               {
+                       item_tester_tval = 0;
+                       item_tester_hook = NULL;
+                       command_cmd = 0; /* Hack -- command_cmd is no longer effective */
+                       return (TRUE);
+               }
+
                /* Floor item? */
-               if (*cp < 0)
+               else if (floor && (*cp < 0))
                {
-                       object_type *o_ptr;
+                       if (prev_tag && command_cmd)
+                       {
+                               /* Scan all objects in the grid */
+                               floor_num = scan_floor(floor_list, py, px, 0x03);
 
-                       /* Special index */
-                       k = 0 - (*cp);
+                               /* Look up the tag */
+                               if (get_tag_floor(&k, prev_tag, floor_list, floor_num))
+                               {
+                                       /* Accept that choice */
+                                       (*cp) = 0 - floor_list[k];
 
-                       /* Acquire object */
-                       o_ptr = &o_list[k];
+                                       /* Forget restrictions */
+                                       item_tester_tval = 0;
+                                       item_tester_hook = NULL;
+                                       command_cmd = 0; /* Hack -- command_cmd is no longer effective */
+
+                                       /* Success */
+                                       return TRUE;
+                               }
+
+                               prev_tag = '\0'; /* prev_tag is no longer effective */
+                       }
 
                        /* Validate the item */
-                       if (item_tester_okay(o_ptr))
+                       else if (item_tester_okay(&o_list[0 - (*cp)]))
                        {
-                               /* Forget the item_tester_tval restriction */
+                               /* Forget restrictions */
                                item_tester_tval = 0;
-
-                               /* Forget the item_tester_hook restriction */
                                item_tester_hook = NULL;
+                               command_cmd = 0; /* Hack -- command_cmd is no longer effective */
 
                                /* Success */
-                               return (TRUE);
+                               return TRUE;
                        }
                }
 
-               /* Verify the item */
-               else if (get_item_okay(*cp))
+               else if ((inven && (*cp >= 0) && (*cp < INVEN_PACK)) ||
+                        (equip && (*cp >= INVEN_RARM) && (*cp < INVEN_TOTAL)))
                {
-                       /* Forget the item_tester_tval restriction */
-                       item_tester_tval = 0;
+                       if (prev_tag && command_cmd)
+                       {
+                               /* Look up the tag and validate the item */
+                               if (!get_tag(&k, prev_tag, (*cp >= INVEN_RARM) ? USE_EQUIP : USE_INVEN)) /* Reject */;
+                               else if ((k < INVEN_RARM) ? !inven : !equip) /* Reject */;
+                               else if (!get_item_okay(k)) /* Reject */;
+                               else
+                               {
+                                       /* Accept that choice */
+                                       (*cp) = k;
 
-                       /* Forget the item_tester_hook restriction */
-                       item_tester_hook = NULL;
+                                       /* Forget restrictions */
+                                       item_tester_tval = 0;
+                                       item_tester_hook = NULL;
+                                       command_cmd = 0; /* Hack -- command_cmd is no longer effective */
 
-                       /* Success */
-                       return (TRUE);
+                                       /* Success */
+                                       return TRUE;
+                               }
+
+                               prev_tag = '\0'; /* prev_tag is no longer effective */
+                       }
+
+                       /* Verify the item */
+                       else if (get_item_okay(*cp))
+                       {
+                               /* Forget restrictions */
+                               item_tester_tval = 0;
+                               item_tester_hook = NULL;
+                               command_cmd = 0; /* Hack -- command_cmd is no longer effective */
+
+                               /* Success */
+                               return TRUE;
+                       }
                }
        }
 
 #endif /* ALLOW_REPEAT */
 
-       /* Extract args */
-       if (mode & (USE_EQUIP)) equip = TRUE;
-       if (mode & (USE_INVEN)) inven = TRUE;
-       if (mode & (USE_FLOOR)) floor = TRUE;
-
 
        /* Paranoia XXX XXX XXX */
        msg_print(NULL);
@@ -6410,7 +6659,7 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
        else if (use_menu)
        {
                for (j = INVEN_RARM; j < INVEN_TOTAL; j++)
-                       if (item_tester_okay(&inventory[j])) max_equip++;
+                       if (select_ring_slot ? is_ring_slot(j) : item_tester_okay(&inventory[j])) max_equip++;
                if (p_ptr->ryoute && !item_tester_no_ryoute) max_equip++;
        }
 
@@ -6418,6 +6667,15 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
        while ((e1 <= e2) && (!get_item_okay(e1))) e1++;
        while ((e1 <= e2) && (!get_item_okay(e2))) e2--;
 
+       if (equip && p_ptr->ryoute && !item_tester_no_ryoute)
+       {
+               if (p_ptr->migite)
+               {
+                       if (e2 < INVEN_LARM) e2 = INVEN_LARM;
+               }
+               else if (p_ptr->hidarite) e1 = INVEN_RARM;
+       }
+
 
        /* Count "okay" floor items */
        floor_num = 0;
@@ -6426,7 +6684,7 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
        if (floor)
        {
                /* Scan all objects in the grid */
-               floor_num = scan_floor(floor_list, py, px, 0x01);
+               floor_num = scan_floor(floor_list, py, px, 0x03);
        }
 
        /* Accept inventory */
@@ -6451,7 +6709,7 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
                done = TRUE;
 
                if (select_the_force) {
-                   *cp = 1111;
+                   *cp = INVEN_FORCE;
                    item = TRUE;
                }
        }
@@ -6485,10 +6743,10 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
                }
        }
 
-        /*
-         * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
-         */
-        if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
+       /*
+        * Äɲ媥ץ·¥ç¥ó(always_show_list)¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¾ï¤Ë°ìÍ÷¤òɽ¼¨¤¹¤ë
+        */
+       if ((always_show_list == TRUE) || use_menu) command_see = TRUE;
 
        /* Hack -- start out in "display" mode */
        if (command_see)
@@ -6503,41 +6761,38 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
                int get_item_label = 0;
 
                /* Show choices */
-               if (show_choices)
-               {
-                       int ni = 0;
-                       int ne = 0;
+               int ni = 0;
+               int ne = 0;
 
-                       /* Scan windows */
-                       for (j = 0; j < 8; j++)
-                       {
-                               /* Unused */
-                               if (!angband_term[j]) continue;
+               /* Scan windows */
+               for (j = 0; j < 8; j++)
+               {
+                       /* Unused */
+                       if (!angband_term[j]) continue;
 
-                               /* Count windows displaying inven */
-                               if (window_flag[j] & (PW_INVEN)) ni++;
+                       /* Count windows displaying inven */
+                       if (window_flag[j] & (PW_INVEN)) ni++;
 
-                               /* Count windows displaying equip */
-                               if (window_flag[j] & (PW_EQUIP)) ne++;
-                       }
+                       /* Count windows displaying equip */
+                       if (window_flag[j] & (PW_EQUIP)) ne++;
+               }
 
-                       /* Toggle if needed */
-                       if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
-                               (command_wrk == (USE_INVEN) && !ni && ne))
-                       {
-                               /* Toggle */
-                               toggle_inven_equip();
+               /* Toggle if needed */
+               if ((command_wrk == (USE_EQUIP) && ni && !ne) ||
+                   (command_wrk == (USE_INVEN) && !ni && ne))
+               {
+                       /* Toggle */
+                       toggle_inven_equip();
 
-                               /* Track toggles */
-                               toggle = !toggle;
-                       }
+                       /* Track toggles */
+                       toggle = !toggle;
+               }
 
-                       /* Update */
-                       p_ptr->window |= (PW_INVEN | PW_EQUIP);
+               /* Update */
+               p_ptr->window |= (PW_INVEN | PW_EQUIP);
 
-                       /* Redraw windows */
-                       window_stuff();
-               }
+               /* Redraw windows */
+               window_stuff();
 
                /* Inventory screen */
                if (command_wrk == (USE_INVEN))
@@ -6580,7 +6835,7 @@ bool get_item_floor(int *cp, cptr pmt, cptr str, int mode)
                {
                        /* Begin the prompt */
 #ifdef JP
-sprintf(out_val, "»ý¤Áʪ:");
+                       sprintf(out_val, "»ý¤Áʪ:");
 #else
                        sprintf(out_val, "Inven:");
 #endif
@@ -6589,12 +6844,11 @@ sprintf(out_val, "
                        {
                                /* Build the prompt */
 #ifdef JP
-sprintf(tmp_val, "%c-%c,'(',')',",
+                               sprintf(tmp_val, "%c-%c,'(',')',",
 #else
                                sprintf(tmp_val, " %c-%c,'(',')',",
 #endif
-
-                                       index_to_label(i1), index_to_label(i2));
+                                       index_to_label(i1), index_to_label(i2));
 
                                /* Append */
                                strcat(out_val, tmp_val);
@@ -6602,38 +6856,30 @@ sprintf(tmp_val, "%c-%c,'(',')',",
 
                        /* Indicate ability to "view" */
 #ifdef JP
-if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
+                       if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
 #else
                        if (!command_see && !use_menu) strcat(out_val, " * to see,");
 #endif
 
-
                        /* Append */
-#ifdef JP
                        if (allow_equip)
                        {
+#ifdef JP
                                if (!use_menu)
                                        strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
                                else if (allow_floor)
                                        strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
                                else
                                        strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
-                       }
-                       else if (select_the_force)
-                               strcat(out_val, " 'w'Îýµ¤½Ñ,");
 #else
-                       if (allow_equip)
-                       {
                                if (!use_menu)
                                        strcat(out_val, " / for Equip,");
                                else if (allow_floor)
                                        strcat(out_val, " 6 for Equip,");
                                else
                                        strcat(out_val, " 4 or 6 for Equip,");
-                       }
-                       else if (select_the_force)
-                               strcat(out_val, " w for the Force,");
 #endif
+                       }
 
                        /* Append */
                        if (allow_floor)
@@ -6654,7 +6900,6 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
                                        strcat(out_val, " 4 or 6 for floor,");
 #endif
                        }
-
                }
 
                /* Viewing equipment */
@@ -6662,22 +6907,20 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
                {
                        /* Begin the prompt */
 #ifdef JP
-sprintf(out_val, "ÁõÈ÷ÉÊ:");
+                       sprintf(out_val, "ÁõÈ÷ÉÊ:");
 #else
                        sprintf(out_val, "Equip:");
 #endif
 
-
                        if (!use_menu)
                        {
                                /* Build the prompt */
 #ifdef JP
-sprintf(tmp_val, "%c-%c,'(',')',",
+                               sprintf(tmp_val, "%c-%c,'(',')',",
 #else
                                sprintf(tmp_val, " %c-%c,'(',')',",
 #endif
-
-                                       index_to_label(e1), index_to_label(e2));
+                                       index_to_label(e1), index_to_label(e2));
 
                                /* Append */
                                strcat(out_val, tmp_val);
@@ -6685,12 +6928,11 @@ sprintf(tmp_val, "%c-%c,'(',')',",
 
                        /* Indicate ability to "view" */
 #ifdef JP
-if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
+                       if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
 #else
                        if (!command_see && !use_menu) strcat(out_val, " * to see,");
 #endif
 
-
                        /* Append */
                        if (allow_inven)
                        {
@@ -6702,7 +6944,6 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
                                else
                                        strcat(out_val, " '4'or'6' »ý¤Áʪ,");
 #else
-
                                if (!use_menu)
                                        strcat(out_val, " / for Inven,");
                                else if (allow_floor)
@@ -6743,29 +6984,26 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
                        sprintf(out_val, "Floor:");
 #endif
 
-
                        if (!use_menu)
                        {
                                /* Build the prompt */
 #ifdef JP
-sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
+                               sprintf(tmp_val, "%c-%c,'(',')',", n1, n2);
 #else
                                sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
 #endif
 
-
                                /* Append */
                                strcat(out_val, tmp_val);
                        }
 
                        /* Indicate ability to "view" */
 #ifdef JP
-if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
+                       if (!command_see && !use_menu) strcat(out_val, " '*'°ìÍ÷,");
 #else
                        if (!command_see && !use_menu) strcat(out_val, " * to see,");
 #endif
 
-
                        if (use_menu)
                        {
                                if (allow_inven && allow_equip)
@@ -6775,7 +7013,6 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
 #else
                                        strcat(out_val, " 4 for Equip, 6 for Inven,");
 #endif
-
                                }
                                else if (allow_inven)
                                {
@@ -6784,7 +7021,6 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
 #else
                                        strcat(out_val, " 4 or 6 for Inven,");
 #endif
-
                                }
                                else if (allow_equip)
                                {
@@ -6793,7 +7029,6 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
 #else
                                        strcat(out_val, " 4 or 6 for Equip,");
 #endif
-
                                }
                        }
                        /* Append */
@@ -6804,7 +7039,6 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
 #else
                                strcat(out_val, " / for Inven,");
 #endif
-
                        }
                        else if (allow_equip)
                        {
@@ -6813,7 +7047,6 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
 #else
                                strcat(out_val, " / for Equip,");
 #endif
-
                        }
 
                        /* Append */
@@ -6827,6 +7060,13 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
                        }
                }
 
+               /* Append */
+#ifdef JP
+               if (select_the_force) strcat(out_val, " 'w'Îýµ¤½Ñ,");
+#else
+               if (select_the_force) strcat(out_val, " w for the Force,");
+#endif
+
                /* Finish the prompt */
                strcat(out_val, " ESC");
 
@@ -7028,10 +7268,10 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
                                done = TRUE;
                                break;
                        }
-                       case 'w':
+                       case 'w':
                        {
                                if (select_the_force) {
-                                       *cp = 1111;
+                                       *cp = INVEN_FORCE;
                                        item = TRUE;
                                        done = TRUE;
                                        break;
@@ -7083,28 +7323,28 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
                        {
                                int i, o_idx;
                                cave_type *c_ptr = &cave[py][px];
+
                                if (command_wrk != (USE_FLOOR)) break;
 
                                /* Get the object being moved. */
-                               o_idx = c_ptr->o_idx;
+                               o_idx = c_ptr->o_idx;
+
                                /* Only rotate a pile of two or more objects. */
                                if (!(o_idx && o_list[o_idx].next_o_idx)) break;
 
                                /* Remove the first object from the list. */
                                excise_object_idx(o_idx);
-       
+
                                /* Find end of the list. */
                                i = c_ptr->o_idx;
                                while (o_list[i].next_o_idx)
                                        i = o_list[i].next_o_idx;
-       
+
                                /* Add after the last object. */
                                o_list[i].next_o_idx = o_idx;
-       
+
                                /* Re-scan floor list */ 
-                               floor_num = scan_floor(floor_list, py, px, 0x01);
+                               floor_num = scan_floor(floor_list, py, px, 0x03);
 
                                /* Hack -- Fix screen */
                                if (command_see)
@@ -7228,25 +7468,42 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
                        case '4': case '5': case '6':
                        case '7': case '8': case '9':
                        {
-                               /* Look up the tag */
-                               if (!get_tag(&k, which))
+                               if (command_wrk != USE_FLOOR)
                                {
-                                       bell();
-                                       break;
-                               }
+                                       /* Look up the tag */
+                                       if (!get_tag(&k, which, command_wrk))
+                                       {
+                                               bell();
+                                               break;
+                                       }
 
-                               /* Hack -- Validate the item */
-                               if ((k < INVEN_RARM) ? !inven : !equip)
-                               {
-                                       bell();
-                                       break;
-                               }
+                                       /* Hack -- Validate the item */
+                                       if ((k < INVEN_RARM) ? !inven : !equip)
+                                       {
+                                               bell();
+                                               break;
+                                       }
 
-                               /* Validate the item */
-                               if (!get_item_okay(k))
+                                       /* Validate the item */
+                                       if (!get_item_okay(k))
+                                       {
+                                               bell();
+                                               break;
+                                       }
+                               }
+                               else
                                {
-                                       bell();
-                                       break;
+                                       /* Look up the alphabetical tag */
+                                       if (get_tag_floor(&k, which, floor_list, floor_num))
+                                       {
+                                               /* Special index */
+                                               k = 0 - floor_list[k];
+                                       }
+                                       else
+                                       {
+                                               bell();
+                                               break;
+                                       }
                                }
 
                                /* Allow player to "refuse" certain actions */
@@ -7260,6 +7517,9 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
                                (*cp) = k;
                                item = TRUE;
                                done = TRUE;
+#ifdef ALLOW_REPEAT
+                               cur_tag = which;
+#endif /* ALLOW_REPEAT */
                                break;
                        }
 
@@ -7324,48 +7584,74 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
                        }
 #endif
 
-                       case 'w':
+                       case 'w':
                        {
                                if (select_the_force) {
-                                       *cp = 1111;
+                                       *cp = INVEN_FORCE;
                                        item = TRUE;
                                        done = TRUE;
                                        break;
                                }
+
+                               /* Fall through */
                        }
 
                        default:
                        {
                                int ver;
 
-                               if(select_spellbook){
-                                    bool not_found = FALSE;
-                                    /* Look up the tag */
-                                    if (!get_tag(&k, which))
-                                    {
-                                       not_found = TRUE;
-                                    }
+                               if (command_wrk != USE_FLOOR)
+                               {
+                                       bool not_found = FALSE;
 
-                                    /* Hack -- Validate the item */
-                                    if ((k < INVEN_RARM) ? !inven : !equip)
-                                    {
-                                       not_found = TRUE;
-                                    }
+                                       /* Look up the alphabetical tag */
+                                       if (!get_tag(&k, which, command_wrk))
+                                       {
+                                               not_found = TRUE;
+                                       }
 
-                                    /* Validate the item */
-                                    if (!get_item_okay(k))
-                                    {
-                                       not_found = TRUE;
-                                    }
+                                       /* Hack -- Validate the item */
+                                       else if ((k < INVEN_RARM) ? !inven : !equip)
+                                       {
+                                               not_found = TRUE;
+                                       }
+
+                                       /* Validate the item */
+                                       else if (!get_item_okay(k))
+                                       {
+                                               not_found = TRUE;
+                                       }
+
+                                       if (!not_found)
+                                       {
+                                               /* Accept that choice */
+                                               (*cp) = k;
+                                               item = TRUE;
+                                               done = TRUE;
+#ifdef ALLOW_REPEAT
+                                               cur_tag = which;
+#endif /* ALLOW_REPEAT */
+                                               break;
+                                       }
+                               }
+                               else
+                               {
+                                       /* Look up the alphabetical tag */
+                                       if (get_tag_floor(&k, which, floor_list, floor_num))
+                                       {
+                                               /* Special index */
+                                               k = 0 - floor_list[k];
 
-                                    if( !not_found ){
-                                        /* Accept that choice */
-                                        (*cp) = k;
-                                        item = TRUE;
-                                        done = TRUE;
-                                        break;
-                                    }
-                               }                               
+                                               /* Accept that choice */
+                                               (*cp) = k;
+                                               item = TRUE;
+                                               done = TRUE;
+#ifdef ALLOW_REPEAT
+                                               cur_tag = which;
+#endif /* ALLOW_REPEAT */
+                                               break;
+                                       }
+                               }
 
                                /* Extract "query" setting */
                                ver = isupper(which);
@@ -7374,24 +7660,24 @@ if (!command_see && !use_menu) strcat(out_val, " '*'
                                /* Convert letter to inventory index */
                                if (command_wrk == (USE_INVEN))
                                {
-                                        if (which == '(') k = i1;
-                                        else if (which == ')') k = i2;
+                                       if (which == '(') k = i1;
+                                       else if (which == ')') k = i2;
                                        else k = label_to_inven(which);
                                }
 
                                /* Convert letter to equipment index */
                                else if (command_wrk == (USE_EQUIP))
                                {
-                                        if (which == '(') k = e1;
-                                        else if (which == ')') k = e2;
+                                       if (which == '(') k = e1;
+                                       else if (which == ')') k = e2;
                                        else k = label_to_equip(which);
                                }
 
                                /* Convert letter to floor index */
                                else if (command_wrk == USE_FLOOR)
                                {
-                                        if (which == '(') k = 0;
-                                        else if (which == ')') k = floor_num - 1;
+                                       if (which == '(') k = 0;
+                                       else if (which == ')') k = floor_num - 1;
                                        else k = islower(which) ? A2I(which) : -1;
                                        if (k < 0 || k >= floor_num || k >= 23)
                                        {
@@ -7457,18 +7743,15 @@ if (ver && !verify("
        item_tester_hook = NULL;
 
 
-       /* Clean up */
-       if (show_choices)
-       {
-               /* Toggle again if needed */
-               if (toggle) toggle_inven_equip();
+       /* Clean up  'show choices' */
+       /* Toggle again if needed */
+       if (toggle) toggle_inven_equip();
 
-               /* Update */
-               p_ptr->window |= (PW_INVEN | PW_EQUIP);
+       /* Update */
+       p_ptr->window |= (PW_INVEN | PW_EQUIP);
 
-               /* Window stuff */
-               window_stuff();
-       }
+       /* Window stuff */
+       window_stuff();
 
 
        /* Clear the prompt line */
@@ -7477,10 +7760,16 @@ if (ver && !verify("
        /* Warning if needed */
        if (oops && str) msg_print(str);
 
+       if (item)
+       {
 #ifdef ALLOW_REPEAT
-       if (item) repeat_push(*cp);
+               repeat_push(*cp);
+               if (command_cmd) prev_tag = cur_tag;
 #endif /* ALLOW_REPEAT */
 
+               command_cmd = 0; /* Hack -- command_cmd is no longer effective */
+       }
+
        /* Result */
        return (item);
 }
@@ -7490,8 +7779,6 @@ static bool py_pickup_floor_aux(void)
 {
        s16b this_o_idx;
 
-       object_type *o_ptr;
-
        cptr q, s;
 
        int item;
@@ -7517,9 +7804,6 @@ static bool py_pickup_floor_aux(void)
                return (FALSE);
        }
 
-       /* Access the object */
-       o_ptr = &o_list[this_o_idx];
-
        /* Pick up the object */
        py_pickup_aux(this_o_idx);
 
@@ -7534,7 +7818,7 @@ static bool py_pickup_floor_aux(void)
  *
  * This is called by py_pickup() when easy_floor is TRUE.
  */
-void py_pickup_floor(int pickup)
+void py_pickup_floor(bool pickup)
 {
        s16b this_o_idx, next_o_idx = 0;
 
@@ -7554,7 +7838,7 @@ void py_pickup_floor(int pickup)
                o_ptr = &o_list[this_o_idx];
 
                /* Describe the object */
-               object_desc(o_name, o_ptr, TRUE, 3);
+               object_desc(o_name, o_ptr, 0);
 
                /* Access the next object */
                next_o_idx = o_ptr->next_o_idx;
@@ -7567,8 +7851,8 @@ void py_pickup_floor(int pickup)
                {
                        /* Message */
 #ifdef JP
-                msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
-                           (long)o_ptr->pval, o_name);
+               msg_format(" $%ld ¤Î²ÁÃͤ¬¤¢¤ë%s¤ò¸«¤Ä¤±¤¿¡£",
+                          (long)o_ptr->pval, o_name);
 #else
                        msg_format("You have found %ld gold pieces worth of %s.",
                                (long) o_ptr->pval, o_name);
@@ -7640,11 +7924,11 @@ void py_pickup_floor(int pickup)
 #endif /* ALLOW_EASY_SENSE */
 
                        /* Describe the object */
-                       object_desc(o_name, o_ptr, TRUE, 3);
+                       object_desc(o_name, o_ptr, 0);
 
                        /* Message */
 #ifdef JP
-                                msg_format("%s¤¬¤¢¤ë¡£", o_name);
+                               msg_format("%s¤¬¤¢¤ë¡£", o_name);
 #else
                        msg_format("You see %s.", o_name);
 #endif
@@ -7688,11 +7972,11 @@ void py_pickup_floor(int pickup)
 #endif /* ALLOW_EASY_SENSE */
 
                        /* Describe the object */
-                       object_desc(o_name, o_ptr, TRUE, 3);
+                       object_desc(o_name, o_ptr, 0);
 
                        /* Message */
 #ifdef JP
-                                msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
+                               msg_format("¥¶¥Ã¥¯¤Ë¤Ï%s¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£", o_name);
 #else
                        msg_format("You have no room for %s.", o_name);
 #endif
@@ -7704,7 +7988,7 @@ void py_pickup_floor(int pickup)
                {
                        /* Message */
 #ifdef JP
-                        msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
+                       msg_format("¥¶¥Ã¥¯¤Ë¤Ï¾²¤Ë¤¢¤ë¤É¤Î¥¢¥¤¥Æ¥à¤âÆþ¤é¤Ê¤¤¡£", o_name);
 #else
                        msg_print("You have no room for any of the objects on the floor.");
 #endif
@@ -7738,7 +8022,7 @@ void py_pickup_floor(int pickup)
 #endif /* ALLOW_EASY_SENSE */
 
                        /* Describe the object */
-                       object_desc(o_name, o_ptr, TRUE, 3);
+                       object_desc(o_name, o_ptr, 0);
 
                        /* Build a prompt */
 #ifdef JP