The X11 interface reads file NetHack.ad (after cd'ing to the playground
directory, where 'make install' puts a copy) and feeds the contents to
X Windows for use as default resources to override the compiled in
defaults. When use of #define was introduced into NetHack.ad (back in
September, 2016) this was severely hobbled and startup spit out a lot
complaints to stderr about invalid resource values. This implements
rudimentary macro expansion for '#define name value' within the data
stream that's fed to X, getting back decent default values and
eliminating the invalid value complaints.
Fix several warnings about using 'void *' for a function pointer and
a couple of unused variables. Add a_nfunc for 'int NDECL((*func))'
alternative for union anything. Make the enum list of union anything
types actually match the alternatives (field a_uchar was missing from
enums, enum mask32 had no corresponding a_mask32 field).
Add another command, #therecmdmenu, so that the context menu for an
adjacent spot can be tested without mouse support. It revealed that
you could get an empty menu if nothing applicable was at target spot.
Add a few adjacent actions: lock/unlock door if carrying suitable
implement, search door for traps, examine known trap (door/ceiling,
not door), #untrap known trap, mount saddled critter, remove saddle.
Make "kick door" be the last choice for closed door instead of first.
Add one 'here' action: dismount.
Both #herecmdmenu and #therecmdmenu interact strangely with ^A, but
differently from each other. I didn't make any attempt to solve this.
There's no documentation for #therecmdmenu.
Add a new boolean option herecmd_menu. If this is on, and using
a windowport that supports mouse, clicking on your character pops
up a menu of actions doable in that location. Basically this is
nothing new, as almost all of the same actions were done before
on the mouse click.
You can also pop up the context menu with the #herecmdmenu
extended command
Expand "You bump into it." into something more comprehensive when
encountering an unseen monster while hurtling. Tested with jumping
but other forms of hurtling should behave the same.
Accidentally caused by my grappling hook fix 2 months ago, attempting
to jump over water made hero enter that water and drown (or crawl out).
hurtle_step() was originally intended to be used for recoil while
levitating, but it is used in other situations where not levitating
and behavior for the two circumstances should be different.
This doesn't fix things properly, just gets jumping working again.
Black is a better choice given that the map background
will always be black. This also creates a better polished
experience when all window backgrounds are set to black.
It was possible to arbitrarily boost strength (up to its race-specific
limit) by wearing a ring of sustain ability, becoming weak from hunger
(but not actually losing strength due to Fixed_abil), removing the ring,
eating enough to stop being Weak, then repeat as desired. I think you
could substitute polymorph for wearing ring, and rehumanize for removing
ring and get similar results, although that would be more tedious.
My first attempt to fix this was a lot more complicated. This one puts
the temporary strength loss in ATEMP(A_STR) where it carries over from
normal form to polymophed form and back. Fixed_abil doesn't prevent the
loss any more, nor its recovery.
One side-effect of the change is that the possibility of dying when
becoming weak from hunger (if Str gets down to 3, further attempts to
lower it take away HP instead of Str) no longer exists. Using ATEMP()
instead of directly manipulating ABASE() means that current strength is
less but underlying base strength does not actually drop any more.
Make #untrap while carrying the non-cursed (for rogues) or blessed
(for non-rogues) Key work the same as #invoke has been doing (without
regard to its bless/curse state): when used on trapped door or chest,
that trap will always be found and disarming it will always succeed.
It should work when carried by monsters too: if they try to open a
trapped door while carrying the Key (must be blessed since they're
not rogues) the trap will be automatically disarmed. (Caveat: that
hasn't been adequately tested.)
TODO (maybe...): change the #invoke property to detect unseen/secret
door detection instead of #untrap. The latter isn't completely
redundant; it works when the Key is cursed. But quest artifacts
strongly resist becoming cursed so that isn't a particularly useful
distinction.
Also, trap hints when wielding the Key without gloves didn't notice
adjacent door and chest traps. Now it does. And the behavior is
slightly different: known traps covered by objects or monsters are
treated like unknown traps as far as the hot/cold hints go.
Fix bug where permanent inventory window would go away after
any operation that used the inventory window to pick items. Since
we were hiding the permanent inventory window, this would also
leave a space filled with white, creating jarring visual if
using dark themed window backgrounds.
Originally by Ray Chason for 3.4.3, based on the Qt windowport by
Warwick Allison. The look and feel is mostly the same.
Some improvements over the Qt 3 interface are:
* Panes are resizable
* Full support for IBMgraphics, and walls and corridors are drawn with
graphical primitives for a continuous appearance no matter what the font
says
* Lots of irritating glitches fixed
* Menus support proportional fonts correctly
Adding this because the old Qt windowport cannot be compiled on Qt4,
even with Qt3 compatibility stuff.
TODO:
- background map glyphs
- status hilites
- menucolors
Always find traps when using the rogue's quest Key to lock or unlock a
trapped door or chest provided that the Key is not cursed (for rogues)
or is blessed (for non-rogues). When a trap is found, the player is
given the opportunity to disarm it, and doing so will always succeed.
(It isn't disarmed automatically; the player may prefer to leave traps
in place, presumably hoping to set up a dangerous bones file. Or he
or she may be unaware of the guaranteed success and be too timid to
risk trying to disarm the trap.)
TODO: make #untrap of a door or chest while carrying that Key always
find traps (with same bless/curse requirements as above). And maybe
change its #invoke property from untrap to detect unseen/secret door
detection since current invoke power would become redundant.
Also, move a bunch of new artifact abilities from the fixes section to
the new features section in fixes36.1.
If the key is wielded and touching skin (that is, you're not
wearing gloves), it will give heat-related messages like
minesweeper, counting the undetected traps around player.
My tty+X11 binary was letting me see and modify status highlights under
X11 even though they don't do anything. Options parsing has to accept
them since we don't know which interface will be chosen, but interactive
option handling does know and shouldn't show inappropriate options.
initoptions_finish() should probably we validating all the wc and wc2
options, but I only added a check for trying to enable statushilites
when they're unavailable.
Give sensible feedback for obsolete options if options.c is modified
to #undef BACKWARD_COMPAT. Affects boulder, DECgraphics, IBMgraphics,
and MACgraphics.
When hitting a monster with the Cleaver, you swing it in an
arc, possibly hitting the monsters to the left and right of
the targeted monster.
Based on code by Fredrik Ljungdahl
I've sometimes seen
, and basic NetHack features.
as the last line of the features section from '#version'. I thought
it was due to the way feature phrases were split into individual words
by makedefs, but it turned out to be due to inserting pattern matching
method at run-time. That dynamic options update had a second problem:
if the final phrase "and basic NetHack features" was split across two
lines, the run-time substitution didn't find it and the pattern matching
entry ended up being left out. This fixes both problems, but if future
dynamic entries become more complex, the phrase-splitting/word-wrapping
being done by makedefs may need to be moved into nethack.
Also, add entries for XLOGFILE and PANICLOG to makedefs' options and
re-order a couple of existing ones alphabetically (a failry hopeless
endeavor).