]> granicus.if.org Git - nethack/commit
address #H5426 - inventory category selections
authorPatR <rankin@nethack.org>
Wed, 21 Jun 2017 21:02:13 +0000 (14:02 -0700)
committerPatR <rankin@nethack.org>
Wed, 21 Jun 2017 21:02:13 +0000 (14:02 -0700)
commit6a848409711199c5424f7963197d3836e6e20faa
tree2e571cb753532ab09d7f6d06355085bbf9eb5801
parent60443a4ee749ec8d8d5ebcf24ade35ace39cab38
address #H5426 - inventory category selections

Report #5426 was classified as not-a-bug, but the underlying issue
can be improved.

For item selection where BUCX (bless/curse state) filtering is
supported (mostly for menustyle:Full, but there are a few actions
where Traditional and Combination handle BUCX too), 3.4.3 took the
union of object class and bless/curse state (so ?!B gave all scrolls
and all potions and every blessed item from other classes) but 3.6.0
changed that to the intersection (so ?!B gives blessed scrolls and
blessed potions, period).  Since gold is inherently not blessed or
cursed it has been getting excluded during intersection handling
when that includes BUCX filtering.  Report #5426 was from a player
who was used to choosing $X when putting newly acquired loot into a
container asking to have the old behavior reinstated.

The ideal fix would be to support both union ($ | X) and intersection
(?! & B), but implementation would be bug prone and the interface,
especially when done for menus, would be cumbersome.  Instead, this
adds new boolean option, goldX, to allow the player to decide whether
gold is classified as uncursed--even though it is never described as
such--or unknown.  The new-loot-into-container issued can be solved
either via $abcX, where abc lists all classes that have any X items
(when gold is included as one of the classes, its BUCX state is now
ignored for the current selection), or by setting the goldX option
and then just picking X for the types of items to put into the
container (or drop or whatever other action supports BUCX filtering).

The situations where menustyle:Full allows BUCX filtering during
object class specification and styles Traditional and Combination
don't should to be fixed (by extending BUCX support to Traditional
and Combination rather than removing it from Full, obviously).
dat/opthelp
doc/Guidebook.mn
doc/Guidebook.tex
doc/fixes36.1
include/flag.h
src/invent.c
src/options.c
src/pickup.c