I just tried to build with MONITOR_HEAP defined in unixconf.h plus
WANT_WIN_X11=1 for make. tile2x11 wouldn't link. It doesn't use
alloc() and free(), but it does link with drawing.o, and drawing.o
has calls to free(), so MONITOR_HEAP makes it need nhfree() from
alloc.o.
All the miscellaneous tile utilities seem to link with drawing.o, so
they all need alloc.o too, and that drags in util/panic.o as well.
I've only changed it for Unix where I can actually test the change
but other platforms probably should do this too. Or we need to redo
drawing.c so that the small subset of stuff utilities want is
separate from the code the core uses for that same stuff.
Attempting to read a cursed spellbook fails with a nasty effect. But
a non-cursed book can become cursed while being read (malignant aura
after Wizard has been killed). Assuming no interruption for other
reasons, the read would finish, the spell be learned, and then the
nasty effect would be given. This changes things so that if the book
being read becomes cursed and the hero notices (book's bknown flag is
set), the read-in-progress will be interrupted. Resuming will take
the attempting-to-read-a-cursed-book path. Unfortunately, if the
hero doesn't notice, the old behavior still applies. Maybe the new
behavior should happen even if bknown isn't set (but then player
won't be told why the interruption occurred).
X11 had been ignoring add_menu(..., MENU_SELECTED) to specify a
pre-selected menu entry. This adds support for that.
Attempt to implement pre-selected entry for PICK_ONE menu sanely by
returning the pre-selected entry instead of toggling it off if the
user chooses it explicitly. Inner workings of menus are convoluted
so I'm not sure it's 100% correct, although testing hasn't found any
problems. (tty currently returns 0 for "nothing picked" when
explicitly picking a pre-selected entry in a PICK_ONE menu, and the
core jumps through hoops to handle it. That can't be cleaned up until
all interfaces which support pre-selected entries achieve sanity.)
Make "random" be chosen for <return> or <enter> during role selection
and highlight it to reflect that. (Role selection for X11 uses its
own code instead of nethack menus, so pre-selection isn't applicable.)
After the recent shopkeeper fix, I wanted to find out what happens if
you turn to stone in the spot inside the shop door. It didn't go too
well--a change of mine from three weeks ago caused a crash due to
passing a null pointer to strcmp(). Death from being turned to stone
or from starvation when there was no while-helpless reason (probably
not possible for starving) triggered it. This fixes that.
As far as the test goes, the shopkeeper takes your inventory and moves
it all the way into the shop, and a statue of the petrified hero is
left without contents in the spot in front of the door. That shk was
awfully quick....
Post-3.6.0 bug, so no fixes entry.
The impossible about partly eaten glob having more nutrition than
an untouched one after another glob had been absorbed into it was
not a 3.6.0 bug, it was an interim situation when I converted glob
nutrition to be based on glob weight rather than on the creature
corpse weight. So take that fixes36.1 entry out.
Add one about black puddings that was included in the glob patch.
read_config_file() has used a buffer of size (4 * BUFSZ) since 3.4.x
so parse_config_line() needs a buffer of the same size to avoid
buffer overrun. Allows my old .nethackrc to work again.
Globs on the floor used different criteria (anything goes) than globs
in inventory (mostly requiring same ownership when in shops and same
curse/bless state--other stuff generally isn't applicable) when
deciding whether two globs should merge. That was okay as long as
the globs on the floor were from being left behind when a pudding or
ooze was killed, but not if the player had picked some up, dipped
them in holy or unholy water, and dropped them again. This changes
things so that globs on the floor use the same criteria as globs in
inventory when deciding whether to coallesce.
Also, my earlier fix was modifying globs in the mergeable() test (to
make bknown and rknown match) rather than during actual merge, which
would be a problem if the merger didn't take place for some reason.
Without this, the keyboard commands don't work in the extended
command window on Linux. If the translations are removed from
menuformview, then the keyboard commands don't work on Mac.
Having the translations in both doesn't seem to hurt.
The report that a tame Archon got two "<pet>'s long sword is not
affected" messages thought there was some duplication error when a
flaming sphere exploded, which was incorrect. Since an Archon has
two weapon attacks, getting that message twice just meant that both
attacks hit. However, the player has only 1/6 chance to suffering
passive fire damage to weapon, where monster-on-monster or monster-
on-polyd-hero was inflicting that for every successful hit, so
there was a bug here after all. Give monsters the same 1/6 chance.
Also, add even more verbosity to that message--now that it won't be
delivered so often--to mention what didn't affect the item.
While investigating this, I noticed that hitting a steam vortex
with a flammable weapon was doing fire damage to that weapon. Fire
damage in the steam vortex definition makes some sense in that it
allows fire resistance to give protection, but dishing out actual
fire damage makes no sense and is now prevented for passive counter-
effects.
The code to handle monsters fleeing up the upstairs on level 1 was
expecting those stairs to be normal upstairs but they are actually
sstairs like the ones down into the mines. So monsters fled to the
Plane of Earth instead of escaping the dungeon as intended.
When destroy_item() or destroy_mitem() burned up a glob of green slime,
they had the message index and damage amount reversed. This could give
a nonsense message ("the glob of green slime freezes and shatters") or
go out of array bounds and wreak havoc. Even if the message index had
been correct, fatal damage would have produced an incorrect cause of
death since it would have used a potion or scroll string.
Now globs will boil and explode like potions, and damage will be
proportional to the size (weight) of the glob, which seems to be the
original intent.
Since the attempted fix for the warning about has_color() being
implicitly declared introduced a worse problem of conflicting
declaration in cases where it's already declared, back that change
out.
I noticed that my paniclog had a "Query truncated" entry from testing
the post-3.6.0 changes to #dip prompting. For
"What do you want to dip <the object> into? [xyz or ?*] "
the use of safe_qbuf() didn't account for getobj() appending the list
of choices, so wasn't ensuring that the formatted object name combined
with the other text couldn't overflow QBUFSZ.
I had a more elaborate fix than this that still used safe_qbuf(), but
the extra complexity just wasn't worth it. This potentially truncates
the formatted object description more severely than necessary but is
simple enough to be comprehensible.
No fixes36.1 entry. This is updating a post-3.6.0 revision.
From a July 2011 report listing multiple movement anomalies, fix one
of the easier ones. If you polymorph from a fast from into a slow
one, pending movement points can let the slow form get in some moves
it shouldn't.
I've deliberately avoided adjusting pending movement when you change
into a faster form, which will get it's own movement boost on the
next turn.
From a followup to #H2247, April 2011... Physical damage from a mind
flayer attack was inflicted in the AD_DRIN case for hitmu(), then
being inflicted again in the common code after the switch statement.
The new comment explaining the reason for non-standard damage is just
a guess.
Suppress the "you climb/fly up the stairs/ladder" message if the
'verbose' option is off (unless punishment is going to augment the
message by "with great effort").
Bug report subject was "menu interface things" but this isn't related
to menus, just getobj(). Make the requested change to not list worn
suit as a likely candidate for T (and R) if a worn cloak is going to
prevent it from being removed. (Suit can still be picked, but the
take-off operation for it will be refused, same as when it was being
listed as a candidate.)
In discussion about the request, there was a separate suggestion that
cloaks shouldn't interfere with removing things underneath since
they're generally sleeveless. I haven't done that; I think it is
better to keep the layering as it is.
The bug report also asked for the likely candidates when writing with
a magic marker to exclude non-blank scrolls and books. That has been
implemented already (post-3.6.0).
Chameleon impersonating a vampire and vampire subject to protection
from shape changers weren't the only ways to have a vampire monster
which isn't a vampshifter. One-shot polymorph could produce that too.
For !menu_tab_sep, the boolean options were formatted with a different
width than the compound and 'other' options when the menu for 'O' was
active. Use the same format string for all of them, consider them all
when constructing it, and construct it just once instead of every time.
Reported directly to devteam, with patch: tipping corpses out of an
ice box wasn't restarting their rot timers, producing corpses that
would last indefinitely.
I stumbled across why the Death Quotes hadn't been getting displayed
evenly before being recycled: ones I've added since 3.6.0--probably
even before the release--were unintentionally missing their '%e passage'
directive, so attempted look-up for those returned the very last one
(terminated by '%e title'). The recent change to read_passage() has
made '%e passage' be optional for one-line death quote passages, so
this patch doesn't bother putting them in.
Instead of just using 'random' as the default choice if the user hits
<return> when picking role, race, gender, or alignment, flag it as
pre-selected in the menu so that it can be seen to be the default.
Someday somebody is going to have to fix up the interaction between
PICK_ONE menu and pre-selected choice....
Make the six buttons (ok, cancel, all, none, invert, search) on
menus for X11 all have the same width.
'ok' should probably be changed to 'okay' to be consistent with
X11_getlin(). (Another inconsistency: the extended commands
menu uses 'dismiss' rather than 'cancel'.)
Two cosmetic changes for the X11 version of the getlin() routine:
1) Make the text entry box big enough to hold 60 characters before
sliding the beginning input off the left edge, instead of just 13,
so that user can see much more of what is being typed;
2) Make the cancel button be a little wider, and the okay button be
the same width as the cancel button so they look a little nicer.
When a chameleon/doppelganger/sandestin took vampire or vampire lord
shape, it stopped taking on new shapes. Vampire shapeshifting was
being applied to all vampires rather than just to is_vampshifter().
When is_vampshifter() is false, the vampire is some other shapeshifter
or Protection_from_shape_changers is in effect, so vampire shifting
doesn't apply.
While testing, I noticed that vampires/lords only turned into bats/
wolves during initial creation. They did turn into fog clouds in
order to pass closed doors but the other alternate forms were ignored.
That's fixed too.
This is more robust than the previous hack. The issue of whether to
use it in other places is still unexplored. Ultimately it's the user's
fault if overzealous message suppression hides something important.
[For an eerie game, try 'MSGTYPE=hide .'.]
Increase the lex paramaters in lev_comp.l and replace use of snprintf
with sprintf in lev_comp.y and lev_main.c.
Also some reformatting for lev_comp.y, but I gave up pretty quickly:
some early tab replacement and adjusting of the spacing for casts.
User had
MSGTTYPE=norep "You see here"
and complained that once the message had been given while walking
over an object, using ':' to intentionally look at something would
end up doing nothing if its feedback was a repeat of "You see here".
Trying to classify which actions should deliberately override
no-repeat (or no-show) will be an ordeal. This fixes the case for
the ':' command where the user obviously expects feedback. I think
it could be done better but am settling for something quick and easy.
Rename the option for adding coordinates to autodescribe feedback for
the '/' and ';' commands from 'getpos_coord' to 'whatis_coord', after
the '/' command that uses it instead of after the internal routine
that implements it. The 'whatis' name was only in dat/hh as far as I
could find, so this changes it to 'what-is' and also updates dat/help
and the Guidebook to mention the name too.
Add a 'screen' choice to the option to show coordinates as row,column
rather than x,y or compass direction(s). Revise the /m, /M, /o, /O
operations of 'what-is' to honor the whatis_coord option (mostly; a
value of 'none' gets overridden by 'map' to force coordinates).
Also, update the description of the functionality of the '/' command
in the Guidebook. The .mn version is tested, the .tex one isn't.
Chatting with Death doesn't always deliver a tribute Death Quote but
when it does, it wasn't giving each of them once before reusing them
even though they should have been treated the same as passage
selections from a novel. I'm still not sure why it wasn't working
as intended, but after some revision to the tribute parsing code, now
it is. If you #chat with Death enough times to get 20 tribute quotes,
you will see each of the 20 quotes once (in random order), then
further chatting will give them again (in different random order).
When entering an extended command, allow the user just type
and match a new command immediately, if no match was found,
instead of needing to wait the 2.5 seconds.
There have been several comments on IRC how the Wizard is a very
light sleeper now; aggravate cast by monsters makes him wake up
and come out of the tower. So, lets limit aggravate to either
outside or inside of the tower, depending on which side the player is.