Adopt a feature mentioned in the xNetHack release announcement.
If you use the fire ('f') command when wielding a throw-and-return
weapon while your quiver is empty and the 'autoquiver' option is
Off, throw the wielded weapon instead of prompting to fill the
quiver. It will usually return and be re-wielded, so be ready to
fire again.
Implemented from scratch.
Guidebook.tex already uses mixed case for "Special Thanks"
but it put Dungeoneers into a new section--one on par with
Credits--rather than have that be a continuation of the
Special Thanks subsection. Split the difference: make
Dungeoneers be a second subsection of Credits in both.
Report from roughly two and half years ago was about "<monster>
opens the door" without displaying <monster>.
Monster movement first decides whether a monster can pass closed
door. If so, the monster is placed at the door spot, a message
is given about that movement (unlock, open, smash down, &c), and
finally the map is updated.
Changing the sequence to update the map before issuing the door
message was not sufficient to fix this. In the corridor plus
closed door plus lit room map fragment shown here, when 'O' moved
to '+', you would see it there if the hero is at '1' or '2', but
not if at '3', '4', or '5'; open door was shown instead. But the
message described 'O' accurately rather than as "it" for all those
hero locations.
: -----
: #O+1...
: |2...
: |3...
: |4...
: |5...
: -----
For 3,4,5 the #vision command shows the closed door as 3 before
the O move, but blank (0) after. In other words, the closed door
is within line of sight but once opened, the doorway spot isn't.
It makes sense that the closed door behaves like a wall but I'm
not sure whether the behavior for an open door's breach does too.
I had an awful workaround that successfully displayed the monster,
but it wouldn't show the same thing if the door was already open,
so I've changed the situation to yield "You see a door open."
For !force_invmenu when attempting a command that needs an object,
if inventory is completely empty
What do you want to <foo>? [*]
will report "Never mind" and stop asking if player presses return
or report "Not carrying anything" and reprompt if player types '*'.
But for force_invmenu, it would report
Not carrying anything. Never mind.
without any reprompting in between the two messages. Just skip
the second message in that situation.
Perhaps the first case should avoid reprompting too but I haven't
gone that far.
Previous update added one change to Guidebook.tex which was omitted
from Guidebook.mn, so catch up.
Don't try to list the interfaces or ports which support each menu
command key. Just have a generic "not every command is implemented
by every interface" instead.
Flesh out the one sentence menu_search description.
Update an example which shows changing menu_first_page to '{' now
that '{' has a default use for something else (menu_shift_left).
Since 'menu_first_page:^' is the opposite of 'menu_last_page:|' and
'\' shares the same key as '|' with opposite shift state, switch
the example to 'menu_first_page:\'.
Interaction with persistent inventory window was documented for
the '|' key a week ago but nothing was specified for '#perminv'.
menu_shift_left and menu_shift_right for X11 are now explicitly
for the perm_invent menu only.
The pull request that fixed a couple of instances where it was
possible to have multiple entries for gold in inventory indirectly
pointed out that the error checking was clumsy. If you executed
the #adjust command while having two '$' items in inventory, you
were told twice that you had multiple stacks of gold in inventory.
Change how that's handled so that the warning appears at most once
for any given #adjust command. Also avoids having #adjust's use
of getobj() re-scan entire invent for every item in invent.
Also, if player did manage to get two or more '$' entries, #adjust
would allow moving any but the last to a letter entry. Once in a
letter, further #adjust with count specified could split the letter
gold entries into even more gold entries. Now, if the player picks
gold as the #adjust 'from' item (which is only possible when there
are wrong letter gold entries or multiple ones or both) then #adjust
will now force 'to' slot to be '$' (without asking player to pick).
Lastly, the inventory check for multiple and/or wrong slot gold is
now performed by wizard mode sanity_check() in addition to #adjust.
for invalid 'O' values when option error messages are issued after
theme rooms have left iflags.in_lua set. The pull request just
turned the flag off but lua code turns back on and off after that
for other dungeon levels. nhlua probably shouldn't be sharing the
same error routine as options processing, or at least it should
toggle the flag on and off at need instead of pretending that it
can be global.
Fixes#471
Assigning a partial stack of gold to quiver (Qnn$) resulted in
an extra '$' slot in inventory, one for the unquivered part and
another for the quivered part.
Throwing a non-quivered partial stack of gold at self (tnn$.)
also resulted in an extra '$' slot after throwing at self was
rejected.
For the first case, reject the quiver-subset-of-gold attempt.
For both cases, recombine the two stacks back to original amount.
Fixes#469
If a monster read a scroll of earth and got killed in the process,
there would be an "dealloc_obj: obj not free" panic when trying to
use up the scroll. It was dropped to the ground with any other
possessions and no longer in the monster's inventory at the time
m_useup() was called. Use up the scroll before performing its
effects.
The patch does something similar for potion of polymorph, but if
newcham() can kill the monster then there are other problems
besides trying to use up the potion. I kept that in anyway.
Fixes#468
Post-3.6 change to monster inventory handling could result in hero
remaining mounted on an unsaddled steed (if saddle was removed via
opening magic).
Hero falling out of saddle would fall to the ground and take damage
even if levitating or flying without steed's help after dismount.
Fixes#470
Reported directly to devteam: constructing a verb by applying
"ing" to "dip <item> into" (when attempting to dip into '-')
didn't work too well. It yielded
|You mime dip <item> intoing something.
instead of
|You mime dipping <item> into something.
Reported seven years ago: when class genoicde (blessed scroll)
attempts to genocide something that has already been wiped out
|All foos are already nonexistent.
should be simplified to
|Foos are already nonexistent.
I think the redundant "All" was just there to avoid capitalization
handling for the monster species but that's trivial to deal with.
Add new '|' command, aka #perminv, which allows the player to
send menu scrolling keystrokes to the persistent inventory window.
Implemented for X11, where its usefulness is limited, and for
curses, where it is more needed and also more fully functional.
The interface can either prompt for one keystroke, act upon it,
and return to normal play, or it can loop for multiple keystrokes
until player types <return> or <escape>. X11 does the former if
the 'slow' application resource is False so that prompting uses
popups, and the latter when 'slow' is True where prompting is in
a fixed spot and doesn't end up causing the persistent inventory
window to be stacked behind the map window. curses always does
the loop-until-done approach. It also accepts up and down arrow
keys to scroll one line at a time.
Also adds two new menu scrolling commands, menu_shift_right (key
'}' by default) and menu_shift_left ('{') if wincap2 flags contain
WC2_MENU_SHIFT. Shifting allows different substrings of too-long
lines to be seen.
For X11, neither works because their handling requires a horizontal
scrollbar and for some reason that escapes me our menus don't have
one of those. If they did, shifts could work for all menus but a
shifted window would hide the selection letters. So shifting would
be most usefully done as: pan right, read more of any long lines,
immediately pan back to the left.
For curses, they only apply to the persistent inventory window.
Shift right redraws it with class headers and inventory letters
shown normally but the item descriptions omit their leftmost
portion, showing more text towards the end. Shift left reverses
that and does nothing if the beginning is already in view. Forward
and backward scrolling while shifted leave the shift in place.
Give the window-port side of *_update_inventory() an argument.
Calls in the core still omit that; invent.c's update_inventory()
is the only place that cares.
Looking up scrollbars did not work as intended. The code wanted an
ancestor widget that had both horizontal and vertical scrollbars,
but menus either have none or just vertical. The lookup code found
some top level widget and returned bad data.
OPTIONS=menu_previous_page:\mv
BINDINGS=M-v:menu_previous_page
both worked, but
OPTIONS=menu_previous_page:M-v
BINDINGS=\mv:menu_previous_page
both failed. Make all four variations work. Tiny change made large
by the need to move some things around.
The option definition for menu_first_page had a couple of its flag
bits swapped. I didn't try to figure out whether that had any impact.
When the 'O' command is used to change either 'menu_headings' or
'sortloot', inventory display can change so persistent inventory
needs to be updated.
Oddly, the flag to indicate initial options processing remained
True after options had been processed, but that ultimately didn't
matter here. It's fixed now anyway.
Also, sort the WC2_xxx options in a couple of places.
When panictrace feedback occurs due to catching a signal rather
than controlled panic, the backtrace is useless when running the
curses interface unless the terminal gets reset first. Let's
just hope that the signal triggering a panictrace doesn't occur
while resetting the terminal.
without using any time. Targetting an apparently empty spot at
valid polearm range where a monster happens to be hiding reports
"Wait! There's something there you can't see!" and displays the
remembered, unseen monster glyph, then aborts the attack attempt.
It would use a turn if the polearm became wielded in the attempt
but not if it was already wielded. Make latter case take time.
If the sort order for sortdiscoveries was s ('sortloot' order)
and any artifacts or unique items were discovered, using '\'
to see all discoveries included "Discovered Items" as a spurious
class header between the real header for the last object class with
discoveries and the discoveries for that class:
|Discoveries, sortloot order (by class with some sub-class groupings)
|
|Artifacts
| Sunsword [lawful long sword]
|Potions
| water (clear)
|Gems/Stones
|Discovered items
| diamond (white)
| flint stone (gray)
"Discovered items" is supposed to only be shown when sorting
alphabetically across all classes and there are artifacts and/or
unique items before the regular discovered objects.
From six years ago: hero is "blinded by the Archon's radiance"
even if the attacking Archon has been blinded, but monsters hit
by same thing were protected from it by that blindness. Make
monsters attacked by Archons be affected similarly to the hero.
Hypothetical case of hero-as-Archon versus monster is ignored
because hero can't polymorph into that shape.
doprtool() and doprinuse() collect the inventory letters of all
applicable items into a buffer capable of holding 52 letters plus
terminator. It is possible to have more than 52 items (ignoring
gold) so theoretically possible to have more than 52 separate lit
candles. Guard against that.
The easiest way to get an item in the overflow slot is to carry
52 non-boulders, polymorph into a giant, and pick up a boulder.
Assigning the latter to one of the three weapon slots would not
impact doprtool() but it will impact doprinuse(). However, that
wasn't enough to cause a crash for me; evidently the overflow
clobbered something innocuous. (52+boulder is not the only way
to get something into slot '#', just the only guaranteed one I
can think of offhand.)
This also removes a bunch of 'register' type qualifiers.
Revert part of commit f6a30e7b05
that moved a fixes entry from the 'fixes to 3.6.x' section
into the 'post-3.6.x, exposed by git' section. It wasn't due
to the conversion of engraving from multi-turn action into an
occupation, it was fixing a bug that had been around for 5 or 6
years. Moot now; the conversion to occupation removed it.
The monk role can be either male or female but the monk fake
player monster was flagged as male-only. Allow both genders.
The male and female monk tiles are identical though and this
doesn't address that.
Fixes#466
When X11_yn_function() re-uses a popup widget to issue a prompt
and get the player's response, make it resize properly. I'm not
sure why the old hack for that apparently worked for some folks
and not for me, or why this does work for me. At least it does.
Also, make the minimum popup width be 25 characters so that
really short prompts don't result in tiny popups. Since the
popup appears at whatever spot the pointer happens to be sitting,
it isn't always immediately noticeable when the player is using
the keyboard rather than the pointer.
After player has responded to a getline prompt, echo the prompt
and the line of text response to the message window. Uses pline()
so also gets put into core's message history for dumplog.
des.region() accepted booleans for the joined field, whereas des.room
accepted xchars. These were only being used as truth values, so this
converts the room ones into booleans for consistency. I don't think
accidentally using an int or a boolean wrongly would actually crash the
level generator, but consistency is good.
This converts an schar field in struct mkroom into a boolean; on most
systems these are probably 1-byte types and save files won't be broken,
but it might be best to treat this as a save breaker anyway.
Give a message for each boolean option toggled via 'O'. It may
help catch mistakes sooner if/when player types wrong menu letter.
Only applies to 'O', not booleans manipulated during config file
or NETHACKOPTIONS processing.
"Demote" wizmgender from an obscure wizard mode extended command
to an obscure wizard mode boolean option. Behaves the same except
that no message is given when the value gets toggled.
X11_yn_function() issues a pline() to put the prompt and player's
response into the message window. Change it to use visctrl() to
make sure that the response character is ledgible when something
like the '&' command allows an arbitrary answer.
This patch adds a leading space and two extra trailing spaces
to the prompt when it's being issued via popup, but that hasn't
affected the issue mentioned next....
The popup prompting when the 'slow' resource is False doesn't
always resize properly. I saw both too wide and too narrow
[What do you want to throw? [abc] ]b
[ In what direction? ]
and
[Really quit? [yn] (n) ]y
[Dump core? [ynq] (q) ]n (size seemed right, but hard to tell)
[Do you want your posses] (might have shown one more letter;
resize doodad in window's bottom right
corner on OSX oscures the rightmost
column--which is ordinarily a space)
The truncated one did accept responses. If I answered 'n' then
the next question was truncated too, but for 'y' (plus ensuing
feedback) it would be sized correctly for the question after that.
To be clear: the popup width issue was present before this change
and is still present after it. The code already has a hack that's
intended to deal with this but it doesn't do the job for me.
If 'perm_invent' is preset in player's options, have X11 show the
persistent inventory window from the start instead of waiting for
an 'i' command. moveloop() prolog needed a tweak do deal with it
cleanly.
Require WC_PERM_INVENT in order to honor the perm_invent option.
X11 and curses already set that, tty and curses don't support it,
so only Windows GUI needed to be updated for it.
When persistent inventory window is up, remove it if 'perm_invent'
option gets set to False. This has a side-effect of fixing the
end-of-game prompting problem it caused.
Objects shot, thrown, or kicked by the hero or by monsters stop
short if they try to pass over a sink; make objects launched by
an explosion behave similarly.
This hack prevents the perm_invent window for X11 on OSX from
creeping every time it gets updated. It is far from perfect and
at the very least ought be handled via user settable X resources
rather than hardcoded values, but it's as much effort as I'm likely
to spend.
Add a new file containing a list of issues that ought to be fixed.
The initial entries are things I noticed while experimenting with
perm_invent; there is lots of older stuff that could/should be
there too. I'm not sure whether the first one is OSX-specific; the
others aren't.
Options which show lists of possible values using '.CC' were
unintentionally being rendered with bold font. I tracked it
down to "figure 3" which has been in place for quite a while.
The font setting and resetting wasn't working as I expected.
This change yields the intended results.
Using ^I to identify inventory and picking '_' (or '^I' or full
menu) would update persistent inventory window after identifying
everything, but picking specific items (even everything as long
as '_' was excluded) to identify wasn't doing that.
I moved some fixes37.0 entries around to group the persistent
inventory ones together. One involved hold_another_object so I
group those too. I didn't look very hard to try to find others
that could fit with these.