if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
{
- if (o_ptr->xtra3 < TR_FLAG_MAX+1)
+ int add = o_ptr->xtra3 - 1;
+
+ if (add < TR_FLAG_MAX)
{
- add_flag(flgs, o_ptr->xtra3 - 1);
+ add_flag(flgs, add);
}
- else if (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_ACID)
+ else if (add == ESSENCE_TMP_RES_ACID)
{
add_flag(flgs, TR_RES_ACID);
add_flag(flgs, TR_ACTIVATE);
}
- else if (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_ELEC)
+ else if (add == ESSENCE_TMP_RES_ELEC)
{
add_flag(flgs, TR_RES_ELEC);
add_flag(flgs, TR_ACTIVATE);
}
- else if (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_FIRE)
+ else if (add == ESSENCE_TMP_RES_FIRE)
{
add_flag(flgs, TR_RES_FIRE);
add_flag(flgs, TR_ACTIVATE);
}
- else if (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_COLD)
+ else if (add == ESSENCE_TMP_RES_COLD)
{
add_flag(flgs, TR_RES_COLD);
add_flag(flgs, TR_ACTIVATE);
}
- else if (o_ptr->xtra3 == 1+ESSENCE_SH_FIRE)
+ else if (add == ESSENCE_SH_FIRE)
{
add_flag(flgs, TR_RES_FIRE);
add_flag(flgs, TR_SH_FIRE);
}
- else if (o_ptr->xtra3 == 1+ESSENCE_SH_ELEC)
+ else if (add == ESSENCE_SH_ELEC)
{
add_flag(flgs, TR_RES_ELEC);
add_flag(flgs, TR_SH_ELEC);
}
- else if (o_ptr->xtra3 == 1+ESSENCE_SH_COLD)
+ else if (add == ESSENCE_SH_COLD)
{
add_flag(flgs, TR_RES_COLD);
add_flag(flgs, TR_SH_COLD);
}
- else if (o_ptr->xtra3 == 1+ESSENCE_RESISTANCE)
+ else if (add == ESSENCE_RESISTANCE)
{
add_flag(flgs, TR_RES_ACID);
add_flag(flgs, TR_RES_ELEC);
add_flag(flgs, TR_RES_FIRE);
add_flag(flgs, TR_RES_COLD);
}
- else if (o_ptr->xtra3 == 1+ESSENCE_EARTHQUAKE)
+ else if (add == TR_IMPACT)
{
add_flag(flgs, TR_ACTIVATE);
}
if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
{
- if (o_ptr->xtra3 < 1+MAX_TR_FLAG_ESSENCE)
+ int add = o_ptr->xtra3 - 1;
+
+ if (add < TR_FLAG_MAX)
{
- add_flag(flgs, o_ptr->xtra3 - 1);
+ add_flag(flgs, add);
}
- else if (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_ACID)
+ else if (add == ESSENCE_TMP_RES_ACID)
{
add_flag(flgs, TR_RES_ACID);
}
- else if (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_ELEC)
+ else if (add == ESSENCE_TMP_RES_ELEC)
{
add_flag(flgs, TR_RES_ELEC);
}
- else if (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_FIRE)
+ else if (add == ESSENCE_TMP_RES_FIRE)
{
add_flag(flgs, TR_RES_FIRE);
}
- else if (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_COLD)
+ else if (add == ESSENCE_TMP_RES_COLD)
{
add_flag(flgs, TR_RES_COLD);
}
- else if (o_ptr->xtra3 == 1+ESSENCE_SH_FIRE)
+ else if (add == ESSENCE_SH_FIRE)
{
add_flag(flgs, TR_RES_FIRE);
add_flag(flgs, TR_SH_FIRE);
}
- else if (o_ptr->xtra3 == 1+ESSENCE_SH_ELEC)
+ else if (add == ESSENCE_SH_ELEC)
{
add_flag(flgs, TR_RES_ELEC);
add_flag(flgs, TR_SH_ELEC);
}
- else if (o_ptr->xtra3 == 1+ESSENCE_SH_COLD)
+ else if (add == ESSENCE_SH_COLD)
{
add_flag(flgs, TR_RES_COLD);
add_flag(flgs, TR_SH_COLD);
}
- else if (o_ptr->xtra3 == 1+ESSENCE_RESISTANCE)
+ else if (add == ESSENCE_RESISTANCE)
{
add_flag(flgs, TR_RES_ACID);
add_flag(flgs, TR_RES_ELEC);
}
- if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == 1+ESSENCE_TMP_RES_ACID))
+ if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
{
+ 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;
- if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == 1+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;
- if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == 1+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;
- if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == 1+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;
- if ((o_ptr->tval > TV_CAPTURE) && (o_ptr->xtra3 == 1+ESSENCE_EARTHQUAKE))
- {
+ 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)
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[lookup_kind(o_ptr->tval, o_ptr->sval)].text),
+ 77 - 15, temp);
for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
{ info[i] = &temp[j]; 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
}
}
- if (o_ptr->name2 == EGO_RING_WIZARD)
+ if (have_flag(flgs, TR_EASY_SPELL))
{
#ifdef JP
info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò²¼¤²¤ë¡£";
#else
- info[i++] = "It affects your ability to use magic devices.";
+ info[i++] = "It affects your ability to cast spells.";
#endif
}
#ifdef JP
info[i++] = "¤½¤ì¤ÏËâË¡¤ÎÆñ°×ÅÙ¤ò¾å¤²¤ë¡£";
#else
- info[i++] = "It prevents you from using magic items.";
+ info[i++] = "It interferes with casting spells.";
#endif
}
if (o_ptr->name2 == EGO_LITE_DARKNESS)
{
#ifdef JP
-info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
+ info[i++] = "¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£";
+#else
+ info[i++] = "It provides no light.";
+#endif
+
+ if (o_ptr->sval == SV_LITE_FEANOR ||
+ o_ptr->sval == SV_LITE_LANTERN)
+ {
+#ifdef JP
+ info[i++] = "¤½¤ì¤ÏÌÀ¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-2)¡£";
#else
- info[i++] = "It provides no light..";
+ info[i++] = "It decreases radius of light source by 2.";
#endif
+ }
+ else
+ {
+#ifdef JP
+ info[i++] = "¤½¤ì¤ÏÌÀ¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
+#else
+ info[i++] = "It decreases radius of light source by 1.";
+#endif
+ }
}
else if (artifact_p(o_ptr))
{
{
if ((o_ptr->name2 == EGO_DARK) || (o_ptr->name1 == ART_NIGHT))
#ifdef JP
-info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë¡£";
+info[i++] = "¤½¤ì¤ÏÌÀ¤«¤ê¤ÎȾ·Â¤ò¶¹¤á¤ë(Ⱦ·Â¤Ë-1)¡£";
#else
- info[i++] = "It decreases radius of your light source.";
+ info[i++] = "It decreases radius of your light source by 1.";
#endif
else
#ifdef JP
-info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë¡£";
+info[i++] = "¤½¤ì¤Ï±Ê±ó¤ÎÌÀ¤«¤ê¤ò¼ø¤±¤ë(Ⱦ·Â¤Ë+1)¡£";
#else
- info[i++] = "It provides permanent light.";
+ info[i++] = "It provides permanent light. (radius +1)";
#endif
}
if (have_flag(flgs, TR_ESP_ANIMAL))
{
#ifdef JP
-info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ï¼«Á³³¦¤ÎÀ¸Êª¤ò´¶ÃΤ¹¤ë¡£";
#else
info[i++] = "It senses natural creatures.";
#endif
if (have_flag(flgs, TR_ESP_UNDEAD))
{
#ifdef JP
-info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ï¥¢¥ó¥Ç¥Ã¥É¤ò´¶ÃΤ¹¤ë¡£";
#else
info[i++] = "It senses undead.";
#endif
if (have_flag(flgs, TR_ESP_DEMON))
{
#ifdef JP
-info[i++] = "¤½¤ì¤Ï°Ëâ¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ï°Ëâ¤ò´¶ÃΤ¹¤ë¡£";
#else
info[i++] = "It senses demons.";
#endif
if (have_flag(flgs, TR_ESP_ORC))
{
#ifdef JP
-info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ï¥ª¡¼¥¯¤ò´¶ÃΤ¹¤ë¡£";
#else
info[i++] = "It senses orcs.";
#endif
if (have_flag(flgs, TR_ESP_TROLL))
{
#ifdef JP
-info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ï¥È¥í¥ë¤ò´¶ÃΤ¹¤ë¡£";
#else
info[i++] = "It senses trolls.";
#endif
if (have_flag(flgs, TR_ESP_GIANT))
{
#ifdef JP
-info[i++] = "¤½¤ì¤Ïµð¿Í¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ïµð¿Í¤ò´¶ÃΤ¹¤ë¡£";
#else
info[i++] = "It senses giants.";
#endif
if (have_flag(flgs, TR_ESP_DRAGON))
{
#ifdef JP
-info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò´¶ÃΤ¹¤ë¡£";
#else
info[i++] = "It senses dragons.";
#endif
if (have_flag(flgs, TR_ESP_HUMAN))
{
#ifdef JP
-info[i++] = "¤½¤ì¤Ï¿Í´Ö¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ò´¶ÃΤ¹¤ë¡£";
#else
info[i++] = "It senses humans.";
#endif
if (have_flag(flgs, TR_ESP_EVIL))
{
#ifdef JP
-info[i++] = "¤½¤ì¤Ï¼Ù°¤ÊÀ¸¤Êª¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ï¼Ù°¤Ê¸ºß¤ò´¶ÃΤ¹¤ë¡£";
#else
info[i++] = "It senses evil creatures.";
#endif
if (have_flag(flgs, TR_ESP_GOOD))
{
#ifdef JP
-info[i++] = "¤½¤ì¤ÏÁ±ÎɤÊÀ¸¤Êª¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤ÏÁ±Îɤʸºß¤ò´¶ÃΤ¹¤ë¡£";
#else
info[i++] = "It senses good creatures.";
#endif
if (have_flag(flgs, TR_ESP_NONLIVING))
{
#ifdef JP
-info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤθºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤò´¶ÃΤ¹¤ë¡£";
#else
info[i++] = "It senses non-living creatures.";
#endif
if (have_flag(flgs, TR_ESP_UNIQUE))
{
#ifdef JP
-info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤Î¸ºß¤ò´¶¤¸¤È¤ë¡£";
+info[i++] = "¤½¤ì¤ÏÆÃÊ̤ʶ¯Å¨¤ò´¶ÃΤ¹¤ë¡£";
#else
info[i++] = "It senses unique monsters.";
#endif
#ifdef JP
info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
#else
- info[i++] = "It causes you miss blows.";
+ info[i++] = "It causes you to miss blows.";
#endif
}
#ifdef JP
info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
#else
- info[i++] = "It helps your enemys' blows.";
+ info[i++] = "It helps your enemies' blows.";
#endif
}
int show_inven(int target_item)
{
int i, j, k, l, z = 0;
- int col, cur_col, len, lim;
+ int col, cur_col, len;
object_type *o_ptr;
char o_name[MAX_NLEN];
char tmp_val[80];
/* Default "max-length" */
len = wid - col - 1;
- /* Maximum space allowed for descriptions */
- lim = wid - 4;
-
- /* Require space for weight (if needed) */
- if (show_weights) lim -= 9;
-
- /* Require space for icon */
- if (show_item_graph)
- {
- lim -= 2;
- if (use_bigtile) lim--;
- }
/* Find the "final" slot */
for (i = 0; i < INVEN_PACK; i++)
strcpy(inven_spellbook_label, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
for (i = 0; i < 52; i++)
{
- char c;
- if (i < 26) c = (char)('a' + i);
- else c = (char)('A' + i - 26);
+ char c;
+ if (i < 26) c = (char)('a' + i);
+ else c = (char)('A' + i - 26);
if (get_tag(&index, c))
{
- inven_spellbook_label[i] = ' ';
+ if (inven_spellbook_label[i] == c)
+ inven_spellbook_label[i] = ' ';
inven_spellbook_label[index] = c;
}
}
/* Describe the object */
object_desc(o_name, o_ptr, TRUE, 3);
- /* Hack -- enforce max length */
- o_name[lim] = '\0';
-
/* Save the object index, color, and description */
out_index[k] = i;
out_color[k] = tval_to_attr[o_ptr->tval % 128];
int show_equip(int target_item)
{
int i, j, k, l;
- int col, cur_col, len, lim;
+ int col, cur_col, len;
object_type *o_ptr;
char tmp_val[80];
char o_name[MAX_NLEN];
/* Maximal length */
len = wid - col - 1;
- /* Maximum space allowed for descriptions */
- lim = wid - 4;
-
- /* Require space for labels (if needed) */
-#ifdef JP
- if (show_labels) lim -= (7 + 2);
-#else
- if (show_labels) lim -= (14 + 2);
-#endif
-
-
- /* Require space for weight (if needed) */
-#ifdef JP
- if (show_weights) lim -= 10;
-#else
- if (show_weights) lim -= 9;
-#endif
-
-
- if (show_item_graph) lim -= 2;
/* Scan the equipment list */
for (k = 0, i = INVEN_RARM; i < INVEN_TOTAL; i++)
/* Description */
object_desc(o_name, o_ptr, TRUE, 3);
- /* Truncate the description */
- o_name[lim] = 0;
-
if ((i == INVEN_LARM) && p_ptr->ryoute)
{
#ifdef JP
/* 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
/* 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
/* 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
{
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
/* Get the item index */
if (repeat_pull(cp))
{
- if (*cp == 1111) { /* the_force */
+ if (*cp == 1111) { /* the_force */
item_tester_tval = 0;
item_tester_hook = NULL;
return (TRUE);
}
- /*
- * Äɲ媥ץ·¥ç¥ó(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)
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);
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);
done = TRUE;
break;
}
- case 'w':
+ case 'w':
{
if (select_the_force) {
*cp = 1111;
break;
}
- case 'w':
+ case 'w':
{
if (select_the_force) {
*cp = 1111;
{
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 tag */
+ if (!get_tag(&k, which))
+ {
not_found = TRUE;
- }
+ }
- /* Hack -- Validate the item */
- if ((k < INVEN_RARM) ? !inven : !equip)
- {
+ /* Hack -- Validate the item */
+ if ((k < INVEN_RARM) ? !inven : !equip)
+ {
not_found = TRUE;
- }
+ }
- /* Validate the item */
- if (!get_item_okay(k))
- {
+ /* Validate the item */
+ 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;
+ break;
+ }
}
/* Extract "query" setting */
/* 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);
}
int show_floor(int target_item, int y, int x, int *min_width)
{
int i, j, k, l;
- int col, len, lim;
+ int col, len;
object_type *o_ptr;
/* Default length */
len = MAX((*min_width), 20);
- /* Maximum space allowed for descriptions */
- lim = wid - 4;
-
- /* Require space for weight (if needed) */
- if (show_weights) lim -= 9;
/* Scan for objects in the grid, using item_tester_okay() */
floor_num = scan_floor(floor_list, y, x, 0x01);
/* Describe the object */
object_desc(o_name, o_ptr, TRUE, 3);
- /* Hack -- enforce max length */
- o_name[lim] = '\0';
-
/* Save the index */
out_index[k] = i;
/* Get the item index */
if (repeat_pull(cp))
{
- if (*cp == 1111) { /* the_force */
+ if (*cp == 1111) { /* the_force */
item_tester_tval = 0;
item_tester_hook = NULL;
return (TRUE);
}
}
- /*
- * Äɲ媥ץ·¥ç¥ó(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)
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);
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);
done = TRUE;
break;
}
- case 'w':
+ case 'w':
{
if (select_the_force) {
*cp = 1111;
/* 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);
}
#endif
- case 'w':
+ case 'w':
{
if (select_the_force) {
*cp = 1111;
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 tag */
+ if (!get_tag(&k, which))
+ {
not_found = TRUE;
- }
+ }
- /* Hack -- Validate the item */
- if ((k < INVEN_RARM) ? !inven : !equip)
- {
+ /* Hack -- Validate the item */
+ if ((k < INVEN_RARM) ? !inven : !equip)
+ {
not_found = TRUE;
- }
+ }
- /* Validate the item */
- if (!get_item_okay(k))
- {
+ /* Validate the item */
+ 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;
+ break;
+ }
}
/* Extract "query" setting */
/* 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)
{
{
/* 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);
/* Check the next object */
continue;
}
+ else if (o_ptr->marked & OM_NOMSG)
+ {
+ /* If 0 or 1 non-NOMSG items are in the pile, the NOMSG ones are
+ * ignored. Otherwise, they are included in the prompt. */
+ o_ptr->marked &= ~(OM_NOMSG);
+ continue;
+ }
/* Count non-gold objects that can be picked up. */
if (inven_carry_okay(o_ptr))
/* Message */
#ifdef JP
- msg_format("%s¤¬¤¢¤ë¡£", o_name);
+ msg_format("%s¤¬¤¢¤ë¡£", o_name);
#else
msg_format("You see %s.", o_name);
#endif
/* 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
{
/* 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