In wizard mode, I used ^W to wish for the Amulet of Yendor and was
immediately prompted for another wish. It was baffling and took a
while to figure out. Give a message before initiating the wish.
This has been laying around for a few weeks. I meant to do more but
have forgotten what the rest would have been.
Don't mark generic objects as dknown.
Extend the recently changed behavior for cursed potion of invisibility.
Monsters won't drink potions of invisibility if already invisible so
can't accidentally or voluntarily make themselves visible again, but
let player make them become visible by hitting them with thrown or
wielded cursed potion of invisibility.
They don't have any concept of temporary invisibility that might let
them remain invisible while losing permanent invisibility, so they
just lose the latter and immediately become visible.
Return a couple of variables that actually held a direction back
to int from coordxy.
bhit() takes int params instead of coordxy.
boomhit() takes int params instead of coordxy.
xytod() renamed to xytodir(), and takes int params (promotion will handle
coordxy params).
dtoxy(coord *, int) renamed to dirtocoord(coord *, int).
dmgval is also used for monster attacks; move the healer knife
bonus to actual hero-specific code, and make sure it only
applies to hand-to-hand combat.
Styled as anatomy knowledge, a healer attacking a monster in melee
with a knife gets +1 damage per 6 dead monsters of that type,
capped at +3 damage.
Handwaving away the fact we're not keeping track who actually
killed the monsters...
Idea from aosdict.
The existing detection logic was not working on any groff since at least
1.22.3 (November 2014), as could be seen by uncommenting the "$(info
...)" line. The regex used to match "nroff --version" output was
insufficiently flexible.
Fixes:
$ (cd doc && rm -f Guidebook && PATH=$HOME/groff-1.22.3/usr/bin:/bin make Guidebook) | grep NROFF
NROFFISGROFF=
$ (cd doc && rm -f Guidebook && PATH=$HOME/groff-1.22.4/usr/bin:/bin make Guidebook) | grep NROFF
NROFFISGROFF=
$ (cd doc && rm -f Guidebook && PATH=$HOME/groff-1.23.0/usr/bin:/bin make Guidebook) | grep NROFF
NROFFISGROFF=
$ (cd doc && rm -f Guidebook && PATH=$HOME/groff-HEAD/usr/bin:/bin make Guidebook) | grep NROFF
NROFFISGROFF=
Use a different approach in Make to recording groff detection. Use
"grep -c" (which is POSIX-conforming) to count the number of matches so
that we can use the contents of the Make macro `NROFFISGROFF` as a sort
of Boolean, which reads more idiomatically (in my opinion).
Further, instead of trying to lexically analyze a matched line in the
output of "nroff --version" and parse components of a version number out
of it, use GNU troff's built-in facility for extracting its minor
version number by storing the output of a tiny *roff document that
reports that datum (and nothing else).
Ignore warnings in category "scale" in any version of groff, because the
`tmac.n` macro package provokes them.
Clarify comments.
groff 1.24 is in its second release candidate of this writing and
features a noteworthy revision to its syntax.
---snip---
NEWS:
* If your roff(7) documents follow any of the requests ... `so`, ...
with a comment after their file name argument, and did not place that
comment immediately after the file name, you are likely to get a
diagnostic message resembling the following.
warning: cannot open macro file 'e.tmac ': No such file or directory
Or, less likely, the formatter will open the wrong file, one with
spaces at the end of its name. That is because these requests are
now able to process file names containing space characters. (This
change also makes the request syntax consistent with that of `ds`,
`as`, and others.) A quick fix is to place the comment escape
sequence as early as possible. For example, we would change:
.mso e.tmac \" Load Eric Allman's package.
to:
.mso e.tmac\" Load Eric Allman's package.
to tell the formatter to load the "e.tmac" file rather than
"e.tmac ". See the items below for further details.
---end snip---
Work around this change while maintaining with older groff and other
*roff formatters.
1. Stop using space to separate comments from the argument to `so`.
2. Temporarily define a `So` macro to wrap the `soquiet` request (for
groff 1.23 and later) or `so` request (for everything else).
3. Abort formatting with an error diagnostic if the `nh` macro package
the Guidebook requires cannot be located.
Fixes:
$ (cd doc && rm -f Guidebook && make Guidebook)
troff:<standard input>:34: error: cannot open 'tmac.nh ': No such file or directory
troff:<standard input>:35: error: cannot open 'doc/tmac.nh': No such file or directory
Fixes warning in category "syntax" from the forthcoming groff 1.24.
troff:<standard input>:790: warning: ignoring a space on input line after output line continuation escape sequence
[94 more occurrences]
Starting a text line with leading spaces causes a break when filling.
Usually this is not what is intended.
Fixes:
$ nroff -ww -z -rCHECKSTYLE=4 -man doc/*.[67]
an.tmac:doc/makedefs.6:102: style: 1 leading space(s) on input line
Issue reported by copperwater:
| a = selection.match(some_mapfrag);
| b = selection.match(another_mapfrag);
| c = a + b;
Instead of being a union of all the points that match either mapfrag,
the resulting selection c is empty.
[Report included a choice of two possible fixes.]
I put both in, without adequate testing of either one.
I didn't hit any problems with the existing special levels but didn't
try many theme rooms.
Closes#1467
The lua des.reset_level() call did not reset the special level
coder, so some values were kept and couldn't be changed.
Adjust the movement tests for this change.
Add a new debug flag prevent_pline, which prevents all messages
from going out to the UI. This prevents the tests from stopping
for -more-.
Add rudimentary tests for applying whistles, camera, and stethoscope.
A thread on Reddit mentions that successfully casting the cure sickness
spell when not Sick doesn't provide any feedback. Change it to report
|You are not ill.
in that situation. Also, give "you are no longer ill" feedback when
actually curing sickness after status gets updated.
Test generation of every object, both via des.object and obj.new.
Expose FIRST_OBJECT and LAST_OBJECT numbers to lua.
Add lua nh.int_to_objname, a function to convert integer value to
object base name and class.
Allow creating new nethack lua object by specifying id and class.
Expose constants NUMMONS, LOW_PM, and HIGH_PM to lua.
Allow converting an int to monster type name.
Create one of each type of monster in the lua tests.
Reported via contact form but misclassified as spam. Applyin a magic
has a chance to teleport the hero to be adjacent to a pet rather than
vice versa, but it could do so even on no-teleport levels.