/* Increment the equip counter by hand */
equip_cnt++;
+#ifdef JP
+#define STR_WIELD_RARM "%s(%c)¤ò±¦¼ê¤ËÁõÈ÷¤·¤¿¡£"
+#define STR_WIELD_LARM "%s(%c)¤òº¸¼ê¤ËÁõÈ÷¤·¤¿¡£"
+#define STR_WIELD_ARMS "%s(%c)¤òξ¼ê¤Ç¹½¤¨¤¿¡£"
+#else
+#define STR_WIELD_RARM "You are wielding %s (%c) in your right hand."
+#define STR_WIELD_LARM "You are wielding %s (%c) in your left hand."
+#define STR_WIELD_ARMS "You are wielding %s (%c) with both hands."
+#endif
+
/* Where is the item now */
switch (slot)
{
case INVEN_RARM:
if (object_allow_two_hands_wielding(o_ptr) && (empty_hands(FALSE) == EMPTY_HAND_LARM) && (!p_ptr->riding || (p_ptr->pet_extra_flags & PF_RYOUTE)))
-#ifdef JP
- act = "%s(%c)¤òξ¼ê¤Ç¹½¤¨¤¿¡£";
-#else
- act = "You are wielding %s (%c) with both hands.";
-#endif
+ act = STR_WIELD_ARMS;
else
-#ifdef JP
- act = (left_hander ? "%s(%c)¤òº¸¼ê¤ËÁõÈ÷¤·¤¿¡£" : "%s(%c)¤ò±¦¼ê¤ËÁõÈ÷¤·¤¿¡£");
-#else
- act = (left_hander ? "You are wielding %s (%c) on left hand." : "You are wielding %s (%c) on right hand.");
-#endif
+ act = (left_hander ? STR_WIELD_LARM : STR_WIELD_RARM);
break;
case INVEN_LARM:
if (object_allow_two_hands_wielding(o_ptr) && (empty_hands(FALSE) == EMPTY_HAND_RARM) && (!p_ptr->riding || (p_ptr->pet_extra_flags & PF_RYOUTE)))
-#ifdef JP
- act = "%s(%c)¤òξ¼ê¤Ç¹½¤¨¤¿¡£";
-#else
- act = "You are wielding %s (%c) with both hands.";
-#endif
+ act = STR_WIELD_ARMS;
else
-#ifdef JP
- act = (left_hander ? "%s(%c)¤ò±¦¼ê¤ËÁõÈ÷¤·¤¿¡£" : "%s(%c)¤òº¸¼ê¤ËÁõÈ÷¤·¤¿¡£");
-#else
- act = (left_hander ? "You are wielding %s (%c) on right hand." : "You are wielding %s (%c) on left hand.");
-#endif
+ act = (left_hander ? STR_WIELD_RARM : STR_WIELD_LARM);
break;
case INVEN_BOW:
#ifdef JP
msg_format("%s¤ò%s¤Ç¹½¤¨¤¿¡£", o_name, (left_hander ? "º¸¼ê" : "±¦¼ê"));
#else
- msg_format("You are wielding %s on %s hand.", o_name, (left_hander ? "left":"right"));
+ msg_format("You are wielding %s in your %s hand.", o_name, (left_hander ? "left":"right"));
#endif
}
else
bool show_weapon = FALSE;
bool show_armour = FALSE;
- cptr s;
+ cptr s, s0;
char *t;
char p1 = '(', p2 = ')';
break;
}
-
/* Armour */
case TV_BOOTS:
case TV_GLOVES:
break;
}
-
/* Lites (including a few "Specials") */
case TV_LITE:
{
modstr = k_name + flavor_k_ptr->flavor_name;
#ifdef JP
- if (!flavor) basenm = "%¤Î¥¢¥ß¥å¥ì¥Ã¥È";
- else if (aware) basenm = "%¤Î#¥¢¥ß¥å¥ì¥Ã¥È";
- else basenm = "#¥¢¥ß¥å¥ì¥Ã¥È";
+ if (!flavor) basenm = "%¤Î¥¢¥ß¥å¥ì¥Ã¥È";
+ else if (aware) basenm = "%¤Î#¥¢¥ß¥å¥ì¥Ã¥È";
+ else basenm = "#¥¢¥ß¥å¥ì¥Ã¥È";
#else
- if (!flavor) basenm = "& Amulet~ of %";
- else if (aware) basenm = "& # Amulet~ of %";
- else basenm = "& # Amulet~";
+ if (!flavor) basenm = "& Amulet~ of %";
+ else if (aware) basenm = "& # Amulet~ of %";
+ else basenm = "& # Amulet~";
#endif
break;
modstr = k_name + flavor_k_ptr->flavor_name;
#ifdef JP
- if (!flavor) basenm = "%¤Î»ØÎØ";
- else if (aware) basenm = "%¤Î#»ØÎØ";
- else basenm = "#»ØÎØ";
+ if (!flavor) basenm = "%¤Î»ØÎØ";
+ else if (aware) basenm = "%¤Î#»ØÎØ";
+ else basenm = "#»ØÎØ";
#else
- if (!flavor) basenm = "& Ring~ of %";
- else if (aware) basenm = "& # Ring~ of %";
- else basenm = "& # Ring~";
+ if (!flavor) basenm = "& Ring~ of %";
+ else if (aware) basenm = "& # Ring~ of %";
+ else basenm = "& # Ring~";
#endif
if (!k_ptr->to_h && !k_ptr->to_d && (o_ptr->to_h || o_ptr->to_d)) show_weapon = TRUE;
modstr = k_name + flavor_k_ptr->flavor_name;
#ifdef JP
- if (!flavor) basenm = "%¤Î¾ó";
- else if (aware) basenm = "%¤Î#¾ó";
- else basenm = "#¾ó";
+ if (!flavor) basenm = "%¤Î¾ó";
+ else if (aware) basenm = "%¤Î#¾ó";
+ else basenm = "#¾ó";
#else
- if (!flavor) basenm = "& Staff~ of %";
- else if (aware) basenm = "& # Staff~ of %";
- else basenm = "& # Staff~";
+ if (!flavor) basenm = "& Staff~ of %";
+ else if (aware) basenm = "& # Staff~ of %";
+ else basenm = "& # Staff~";
#endif
break;
modstr = k_name + flavor_k_ptr->flavor_name;
#ifdef JP
- if (!flavor) basenm = "%¤ÎËâË¡ËÀ";
- else if (aware) basenm = "%¤Î#ËâË¡ËÀ";
- else basenm = "#ËâË¡ËÀ";
+ if (!flavor) basenm = "%¤ÎËâË¡ËÀ";
+ else if (aware) basenm = "%¤Î#ËâË¡ËÀ";
+ else basenm = "#ËâË¡ËÀ";
#else
if (!flavor) basenm = "& Wand~ of %";
else if (aware) basenm = "& # Wand~ of %";
#ifdef JP
if (!flavor) basenm = "%¤Î¥í¥Ã¥É";
else if (aware) basenm = "%¤Î#¥í¥Ã¥É";
- else basenm = "#¥í¥Ã¥É";
+ else basenm = "#¥í¥Ã¥É";
#else
- if (!flavor) basenm = "& Rod~ of %";
- else if (aware) basenm = "& # Rod~ of %";
- else basenm = "& # Rod~";
+ if (!flavor) basenm = "& Rod~ of %";
+ else if (aware) basenm = "& # Rod~ of %";
+ else basenm = "& # Rod~";
#endif
break;
modstr = k_name + flavor_k_ptr->flavor_name;
#ifdef JP
- if (!flavor) basenm = "%¤Î´¬Êª";
- else if (aware) basenm = "¡Ö#¡×¤È½ñ¤«¤ì¤¿%¤Î´¬Êª";
- else basenm = "¡Ö#¡×¤È½ñ¤«¤ì¤¿´¬Êª";
+ if (!flavor) basenm = "%¤Î´¬Êª";
+ else if (aware) basenm = "¡Ö#¡×¤È½ñ¤«¤ì¤¿%¤Î´¬Êª";
+ else basenm = "¡Ö#¡×¤È½ñ¤«¤ì¤¿´¬Êª";
#else
- if (!flavor) basenm = "& Scroll~ of %";
- else if (aware) basenm = "& Scroll~ titled \"#\" of %";
- else basenm = "& Scroll~ titled \"#\"";
+ if (!flavor) basenm = "& Scroll~ of %";
+ else if (aware) basenm = "& Scroll~ titled \"#\" of %";
+ else basenm = "& Scroll~ titled \"#\"";
#endif
break;
modstr = k_name + flavor_k_ptr->flavor_name;
#ifdef JP
- if (!flavor) basenm = "%¤ÎÌô";
- else if (aware) basenm = "%¤Î#Ìô";
- else basenm = "#Ìô";
+ if (!flavor) basenm = "%¤ÎÌô";
+ else if (aware) basenm = "%¤Î#Ìô";
+ else basenm = "#Ìô";
#else
- if (!flavor) basenm = "& Potion~ of %";
- else if (aware) basenm = "& # Potion~ of %";
- else basenm = "& # Potion~";
+ if (!flavor) basenm = "& Potion~ of %";
+ else if (aware) basenm = "& # Potion~ of %";
+ else basenm = "& # Potion~";
#endif
break;
modstr = k_name + flavor_k_ptr->flavor_name;
#ifdef JP
- if (!flavor) basenm = "%¤Î¥¥Î¥³";
- else if (aware) basenm = "%¤Î#¥¥Î¥³";
- else basenm = "#¥¥Î¥³";
+ if (!flavor) basenm = "%¤Î¥¥Î¥³";
+ else if (aware) basenm = "%¤Î#¥¥Î¥³";
+ else basenm = "#¥¥Î¥³";
#else
- if (!flavor) basenm = "& Mushroom~ of %";
- else if (aware) basenm = "& # Mushroom~ of %";
- else basenm = "& # Mushroom~";
+ if (!flavor) basenm = "& Mushroom~ of %";
+ else if (aware) basenm = "& # Mushroom~ of %";
+ else basenm = "& # Mushroom~";
#endif
break;
}
/* Hack -- The only one of its kind */
- else if (known && object_is_artifact(o_ptr))
+ else if ((known && object_is_artifact(o_ptr)) ||
+ ((o_ptr->tval == TV_CORPSE) &&
+ (r_info[o_ptr->pval].flags1 & RF1_UNIQUE)))
{
t = object_desc_str(t, "The ");
}
- /* Unique corpses are unique */
- else if (o_ptr->tval == TV_CORPSE)
- {
- monster_race *r_ptr = &r_info[o_ptr->pval];
-
- if (r_ptr->flags1 & RF1_UNIQUE)
- {
- t = object_desc_str(t, "The ");
- }
- }
-
/* A single one */
else
{
#endif
/* Copy the string */
- for (; *s; s++)
+ for (s0 = NULL; *s || s0; )
{
- /* Insert the modifier (flavor) */
- if (*s == '#')
+ /* The end of the flavour/kind string. */
+ if (!*s)
+ {
+ s = s0 + 1;
+ s0 = NULL;
+ }
+
+ /* Begin to append the modifier (flavor) */
+ else if ((*s == '#') && !s0)
{
- t = object_desc_str(t, modstr);
+ s0 = s;
+ s = modstr;
- /* Paranoia -- Never append multiple modstr's */
+ /* Paranoia -- Never append multiple modstrs */
modstr = "";
}
- /* Append kind name */
- else if (*s == '%')
+ /* Begin to append the kind name */
+ else if ((*s == '%') && !s0)
{
- t = object_desc_str(t, kindname);
+ s0 = s;
+ s = kindname;
- /* Paranoia -- Never append multiple kindname's */
+ /* Paranoia -- Never append multiple kindnames */
kindname = "";
}
/* Add an 's' */
*t++ = 's';
}
+ s++;
}
#endif
else
{
/* Copy */
- *t++ = *s;
+ *t++ = *s++;
}
}