{
/* Build the prompt */
#ifdef JP
-sprintf(tmp_val, "%c-%c,",
+sprintf(tmp_val, "%c-%c,'(',')',",
#else
- sprintf(tmp_val, " %c-%c,",
+ sprintf(tmp_val, " %c-%c,'(',')',",
#endif
index_to_label(i1), index_to_label(i2));
{
/* Build the prompt */
#ifdef JP
-sprintf(tmp_val, "%c-%c,",
+sprintf(tmp_val, "%c-%c,'(',')',",
#else
- sprintf(tmp_val, " %c-%c,",
+ sprintf(tmp_val, " %c-%c,'(',')',",
#endif
index_to_label(e1), index_to_label(e2));
default:
{
int ver;
-
if(select_spellbook){
bool not_found = FALSE;
/* Look up the tag */
/* Convert letter to inventory index */
if (!command_wrk)
{
- 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
{
- k = label_to_equip(which);
+ if (which == '(') k = e1;
+ else if (which == ')') k = e2;
+ else k = label_to_equip(which);
}
/* Validate the item */
{
/* Build the prompt */
#ifdef JP
-sprintf(tmp_val, "%c-%c,",
+sprintf(tmp_val, "%c-%c,'(',')',",
#else
- sprintf(tmp_val, " %c-%c,",
+ sprintf(tmp_val, " %c-%c,'(',')',",
#endif
index_to_label(i1), index_to_label(i2));
{
/* Build the prompt */
#ifdef JP
-sprintf(tmp_val, "%c-%c,",
+sprintf(tmp_val, "%c-%c,'(',')',",
#else
- sprintf(tmp_val, " %c-%c,",
+ sprintf(tmp_val, " %c-%c,'(',')',",
#endif
index_to_label(e1), index_to_label(e2));
{
/* 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);
+ sprintf(tmp_val, " %c-%c,'(',')',", n1, n2);
#endif
/* Convert letter to inventory index */
if (command_wrk == (USE_INVEN))
{
- 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 (command_wrk == (USE_EQUIP))
{
- k = label_to_equip(which);
+ 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)
{
- k = islower(which) ? A2I(which) : -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)
{
bell();