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).
When built without STATUS_HILITES, don't treat highlighting options as
if they were unknown. This may need some tweaking; the feedback feels
a bit intrusive so perhaps 'statushilites' and 'hilite_status' should
just be ignored when not available.
'hitpointbar' now relies on wc2 handling instead of being conditionally
present.
The call to hmon() in flooreffects() was passing a boolean where int
is expected. The 'thrown' argument may have once been a boolean, but
it is 'int' for as far back as the repository history goes.
Adjust the Candelabrum of Invocation's weight when it has candles
attached. This has been a known issue ever since the candelabrum and
candles were introduced.
When the candelabrum burns out, update persistent inventory window to
show that it no longer has candles.
thitu() is mostly used for arrows and darts "thrown" by traps, but
scatter() uses it on items launched by a land mine explosion. Traps
had no need for potion handling, but scattering does. Changing thitu()
to call potionhit() required that more information be passed to the
latter in case killer reason was needed, and thitu()'s callers needed
to be updated since it now might use up its missile (only when that's
a potion, so scatter() is only caller which actually needed to care).
Quite a bit of work--especially the testing--for something which will
never be noticed in actual play. In hindsight, it would have been
much simpler just to make scatter destroy all potions rather than
allow the 1% chance of remaining intact (via obj_resists()), or else
leave any intact ones at the explosion spot instead of launching them.
Turning the boolean option force_invmenu makes all the commands
that ask for an inventory item pop up a menu instead of asking
a text query. This should be much more friendlier to new
players, and is very useful for window ports on systems
with touch screens and no physical keyboard, such as cell phones.
Reported directly to devteam, player threw a troll corpse into lava and
then later got messages about it reviving and burning to death. Items
thrown, kicked, or dropped into lava were being subjected to fire damage
(so scrolls burned up, potions boiled, non-fireproofed flammable weapons
and armor eroded), but corpses and a lot of other stuff not subject to
erosion remained unaffected. This makes things that are made out of
wood, cloth, flesh and other flammable stuff burn up (when in lava, not
when hit by fire).
The countdown for delayed vomiting gave message "you suddenly vomit!"
at T-2, allowing you to move some more, then vomit at T-0 with no
message, finally at T+2 get "you can move again", making it seem as
if the program was letting you move during a time it thought that you
couldn't move. Also, there was nothing "sudden" about it since it was
near the end of a 15 or so turn sequence where a few other messages
are given leading up to that.
Change it to
T-2: You are about to vomit. // different wording
T-0: You vomit! // new message
so that "you can move again" more clearly refers to the actual event.
It was once pointed out that
static long nulls[ sizeof (struct trap) + sizeof (struct fruit) ];
should have been
static long nulls[ max(sizeof (struct trap), sizeof (struct fruit)) ];
which is right, but using an array of longs to represent a null trap or
null fruit doesn't handle pointers properly so replace 'nulls' with
separate structs. This doesn't recover the previously wasted memory
(fairly trivial since these structs are small) but does guarantee that
null pointers in the relevant structs always have a valid value instead
of just all bits zero.
While doing some cleanup I found an old personal bug list with four
entries. Two have already been fixed, or at least I couldn't reproduce
them with current code, one is still pending (dungeon overview feedback
is inconsistent if you find an unlit temple and haven't seen its altar
yet), plus this one: a buffer overflow (triggering a crash for me) in
wizard mode if you turn on the 'extmenu' option and start an extended
command. The menu can't handle long line width for 'w' with all its
wizthis and wizthat entries; strcat() goes out of bounds writing into
a local array.
(This bug predates the keybinding patch that turned all commands into
extended commands.)
When entering a new menucolor via options, show regex error
immediately afterwards, instead of asking for color and attribute
before showing the error.
Also actually show config errors even if config error handler
hasn't been initialized.
Prevent using a leash while engulfed. If someone wants to supply a
better message, go ahead. I just tried to get the logic straight.
(The new swallowed part is easy; the previous lack of handling for
remembered unseen monsters wasn't quite so easy.)
Applying a leash was always using a move, even if player cancelled
at the prompt to pick an adjacent monster. Now some of the early
exits don't use a move.
For breath damage, the 'S' in NdS is ignored. 'N' for the number of
dice is used, but for number of sides of those dice, 6 is used for
most damage types. Add a comment to that effect to monst.c and change
a few Nd8 to Nd6 so that viewing the monster definitions matches what
they actually do.
The sequence
You feel the amulet draining your energy away.
You don't have enough energy to cast that spell.
didn't use any energy or cost any time so the player could try over
and over until the randomly chosen drain amount happened to be low
enough to succeed.
The old behavior was that the cost of the current cast attempt got
incresed by a random amount. Now, if hero already lacks sufficient
energy to cast the spell, the Amulet's effect won't take place, the
second message will be given, and no energy or time will be consumed.
When there is enough energy to cast the spell, the drain effect will
occur and some energy will be used up immediately (instead of
increasing the cost of this attempt). The energy drain might then
result in the second message, but if so, a turn will be used.
No longer increasing the energy cost of the current cast has a
side-effect on not increasing the hunger penalty for the current cast
(since that is based on the energy cost) but the energy drain message
doesn't actually imply any effect on hunger.
I started out just reformatting the function header for regularize()
but ended up doing miscellaneous other stuff, including some code
changes. I think the CHDIR code is a bit cleaner now, but shouldn't
have any differences in behavior.
Along the way I noticed that 'nethack -dpath' or 'nethack -d path'
modifies argv[] before PANICTRACE attempted to save argv[0], so would
break having nethack invoke gdb to get a backtrace. ('ARGV0' seems to
be unnecessary since 'hname' holds the same value, but I didn't get rid
of it....)