When the fire command prompts for missile, it autoquivers the chosen
item. Originally that was only done when the chosen item was a stack
but that got changed (back in 2007...) and the relevant comment was
not updated at the time.
I once changed dump_map() to suppress blank lines as it processed the
known portion of current dungeon level so that no blank lines would
be shown above the mapped area and at most one would be shown below.
Any blank lines within were put back. But the count of the current
block of suppressed lines wasn't being zeroed when an internal gap
did get put back, so after that every line got spurious blank lines
inserted in front of it. I'm surprised that no one seems to have
discovered this problem.
This fix also changes the dumped map to suppress trailing spaces. In
the process, I noticed that the original DUMPLOG code was clobbering
column COLNO-1 if that was ever part of known map. buf[x - 2] = '\0'
overwrote the final map character in buf[] with the terminator.
After about the third time typing '#' and getting a prompt of "# K", I
decided that it wasn't clumsy typing. The call chain for get_ext_cmd()
was passing an uninitialized output buffer to [hooked_tty_]getlin()
which treated random junk as the previous result to be used as current
default. Other interfaces may need a similar fix.
The cavemen quest description includes an 'S' in the lower right
corner of the MAP...ENDMAP section of the locate level. It produced
a secret door as intended but did not have horizontal vs vertical set
because the latter was only being done for DOOR directives. Instead
of adding an explicit directive, make the loading code set horizontal
vs vertical for all doors.
This fixes the orientation of that secret door in the Cav locate
level, but I noticed that it showed up an a visible horizontal wall
when the spots on either side were still blank. It's behaving as
if the door is on a lit spot and the adjacent walls are unlit (this
misbehavior was already present before the current change; it was
just shown incorrectly as a visible vertical wall before).
Wizard mode sanity checking gave spurious "mon not on map" warnings
for steed when hero is mounted. Steed is in the fmon list but not
expected to be present on the map.
The fix to prevent "crushed by a gas spore's explosion" set killer.name
to an empty string after a gas spore explosion finished, but that made
nested explosions end up with empty killer.name after the innermost
call completed. explode() shouldn't have been hanging on to a pointer
to a global value that is subject to change while it executes. Making
a local copy of the current value at the time explode() is called will
solve that (I hope...).
Simply reverting the reset of killer.name wouldn't have been correct.
The innermost explosion would still be clobbering killer.name for any
outer MON_EXPLODE explosions in progress. When the only exploding
monster is gas spore, that wouldn't be noticeable. But having other
types of exploding monsters and a chain reaction which affected more
than one type would have exposed that bug. I think this fixes both
aspects of this problem but don't have a second type of exploding
monster to verify the second part.
When dgn_comp.l and lev_comp.l are processed by older versions of
flex, 'gcc -Wunused' complains when compiling dgn_lex.c and lev_lex.c
because flex creates 'static void yyunput()' and nethack doesn't use
it. Newer versions honor macro YY_NO_UNPUT to hide the offending
code, but that doesn't help with older versions (like the one
masquerading as 'lex' on OSX). Adding a dummy usage would probably
cause problems with other lexers, so change it from static to
'void yyunput()' as a 'sed' fixup in util/Makefile after flex has
finished. That will be a no-op when yyunput doesn't exist or isn't
static.
In addition to the sys/unix/Makefile.utl change, this checks in new
sys/share/{dgn,lev}_lex.c with the fixup in place.
Fix a comment typo. While in there, change the cleave attack to
swing counter-clockwise the very first time instead of setting up
for that but then toggling to the opposite direction before the
actual attack. Also, refactor a bit of common code for choosing
< xdir[], ydir[] > index for next target.
Noticed while investigating the broken chest whose lock was already
broken: wishing for locked, unlocked, or broken chest (or large box)
was treated as asking for something unknown. Add support for those
three prefixes, although they only have meaning for chest and box.
If more that one is specified in the same wish, whichever one comes
last overrides the others.
Also, "empty" was already an accepted prefix (for tins); honor it for
containers too.
Lastly, wishing for "box" failed. Give a large box instead. I went
back and forth about whether to do the same for "small box" and ended
up not including it, but turns out that small/medium/large prefix for
globs ends up making "small box" and "medium box" match "box" which
has now become a synonym for "large box". I'm not sure whether that
is a bonus or a bug; small box is clearly not the same thing as large
box, but getting the only available box when asking for any box seems
better than claiming not to understand the request.
When using #force at a spot which has a broken or unlocked chest (or
large box) whose lock state has been previously discovered, avoid
|There is a broken chest here, but its lock is already broken.
|There is an unlocked chest here, but its lock is already unlocked.
by suppressing "broken"/"unlocked" from the chest description for
that particular message.
We might still want to change "broken chest" to "damaged chest" but
I don't think there should be any reference to its lock as the reason
it's broken or damaged. The fact that #loot, #force, and applying a
key still treat it as a container is sufficient to reveal that it
functions as one.
> When you try to #force a large box or chest whose lock is already broken from a
> previous #force, the game tells you "There is a broken large box here, but its
> lock is already broken." It's minor, but this implies that the box being broken
> is separate from the lock being broken (as well as that the box itself *can* be
> broken).
change the wording to "lock-damaged box" and suppress
", but its lock is aleady broken" when "lock-damaged box" has
already been displayed.
(Nobody particularly likes the wording "lock-damaged box" either, but at least
it seems less misleading)
Handle more *man and *men cases.
Some plural usage of completely made up fruit names that should
be entered in singular form but have what appears to be a
valid plural name it will end up singularized. Not much
we can do about that for ficticious words.
For instance, if you try to name your fruit bigmen or snakemen
and you intended that to be the singular name, NetHack will likely
singularize it to bigman or snakeman.
Many real dictionary words that end in "men", however, should
be handled a wee bit better now. A real word such as stamen,
for example.
"boxen" may be hacker slang for plural of "box", but "foxen" is
definitely not the plural of "fox". Restrict the "ox"->"oxen"
entry to full word "ox", not "*ox" suffix.
Trying to open at the same location as you did nothing,
make it loot instead. Apparently #looting is also annoying
when using vi-keys.
Based on code by aosdict