'I' command support for BUCX

Allow the 'I' command to show inventory of known blessed items via
pseudo object classes B, C, U, and X.  That's instead of an showing
inventory of specific object class.  The two can't be combined
because 'I' operates on single character input.

I had to modify tty_yn_function to prevent it from forcing a BUCX
character into lower case (simply using lower case would cause a
conflict with 'u' and 'x' for inventory of shopping bill), and did
that by checking whether any of the acceptable response characters
are upper case.  Pretty straightforward and shouldn't impact any
other uses that don't specify upper case choices.

I did the same thing for X11.  Other interfaces most likely need
to do something similar.  If they don't, a response of 'B' or 'C'
(for menustyle:traditional or menustyle:combination) will simply
not work, without causing any problems, same as typing an invalid
choice, and 'U' or 'X' will give shop feedback instead of the
requested subset of inventory.

The Guidebook revisions are untested.
This commit is contained in:
PatR
2015-04-26 03:20:58 -07:00
parent 54a22d39ea
commit 6386331148
6 changed files with 174 additions and 54 deletions

View File

@@ -742,12 +742,18 @@ something appropriate if {\it autoquiver\/} is true.
List your inventory (everything you're carrying).
%.lp
\item[\tb{I}]
List selected parts of your inventory.\\
List selected parts of your inventory, usually be specifying the character
for a particular set of objects, like `{\tt [}' for armor or `{\tt !}'
for potions.\\
%.sd
%.si
{\tt I*} --- list all gems in inventory;\\
{\tt Iu} --- list all unpaid items;\\
{\tt Ix} --- list all used up items that are on your shopping bill;\\
{\tt IB} --- list all items known to be blessed;\\
{\tt IU} --- list all items known to be uncursed;\\
{\tt IC} --- list all items known to be cursed;\\
{\tt IX} --- list all items whose bless/curse status is unknown;\\
{\tt I\$} --- count your money.
%.ei
%.ed
@@ -1543,6 +1549,12 @@ Objects can also be blessed. Blessed items usually work better or
more beneficially than normal uncursed items. For example, a blessed
weapon will do more damage against demons.
%.pg
Objects which are neither cursed nor blessed are referred to as uncursed.
They could just as easily have been described as unblessed, but the
uncursed designation is what you will see within the game. A ``glass
half full versus glass half empty'' situation; make of that what you will.
%.pg
There are magical means of bestowing or removing curses upon objects,
so even if you are stuck with one, you can still have the curse
@@ -1555,6 +1567,8 @@ An item with unknown status will be reported in your inventory with no prefix.
An item which you know the state of will be distinguished in your inventory
by the presence of the word ``cursed'', ``uncursed'' or ``blessed'' in the
description of the item.
In some cases ``uncursed'' will be omitted as being redundant when
enough other information is displayed.
%.hn 2
\subsection*{Weapons (`{\tt )}')}