From a bug report, dropping and selling a container that had some things owned
by the hero and some already owned by the shop, you could get "You sold
some items inside <a container> for N gold piecess." Shop handing for
containers has been changed significantly since 3.4.3, but the typo
"pieces" that then optionally gets plural "s" appended was still there.
While testing the trivial fix, I noticed suboptional feedback in the
prompt about selling. For a container owned by the shop, it said "items"
even when there was just one hero owned item inside. Fortunately this
potentinal can of worns only seemed to have one tiny weeny worm in it....
The revised version of count_buc() that I've had laying around for
a while is also included.
The fixes entry is for "piecess", not escaped/captured/exterminated
worms, and goes into fixes34.4 despite this patch being labeled "trunk
only". Separate patch for trunk to follow.
Using the two Windows binaries, starting a game with the tty
interface (nethack.exe) and saving, then restoring and finishing with
the win32 interface (nethackW.exe) would display the topten output as a
series of popup windows displaying one line at a time. The win32 binary
forces the toptenwin option to 1, but when restoring a saved game that
would get overridden by data from the save file and could end up 0.
This change keeps the toptenwin option out of save files, like color
and other display-oriented features that might not be applicable when
restoring on something with different capabilities. Separate binaries
for alternate interfaces aren't quite the same situation, but close enough.
The toptenwin option can still be toggled interactively with 'O', but the
new value will disappear if you save rather than finish. Setting it once
via config file or environment variable is the preferred way to go if you
want to override the default behavior.
Both trunk and branch get iflags.toptenwin added. For the trunk,
flags.toptenwin is simply deleted and patchlevel.h's EDITLEVEL is bumped.
For the branch, flags.toptenwin is renamed and becomes unused, while
EDITLEVEL is left alone. Leaving a dummy field in the old toptenwin slot
of struct flags preserves save file compatability with 3.4.3.
Revert a change from five weeks ago which added M1_NOHANDS to the
jabberwock definition. The jabberwock illustration from Lewis Carroll's
_Through_the_Looking_Glass_ depicts one with its forelegs held like arms
and the forefeet look like clutching hands. Enormous hands, but
nethack's one-size-fits-all object model means they can manipulate things
just like anybody else's hands.
This might fix the following buglist entry
|Teleporting while using tiles may place you one tile beyond the edge of
|the display screen, and place the crosshair on empty space.
Various bits of code, including teleport, are assigning directly to
u.ux,u.uy instead of calling u_on_newpos(). It wouldn't be an issue for
small tiles where the whole map fits on the screen, but it probably is for
bigger ones where clipping is in operation. Using u_on_newpos() adjusts
the clipped map right away but changing u.ux,u.uy directly won't do so
until control returns to moveloop() and it eventually calls cliparound().
Usually the hero's position only changes by one column and/or row, hence
stays within the clipping margin, but that's not the case for teleport
nor for hurtling (throwing recoil while levitating, &c).
Perhaps all the places that assign u.ux,uy should call u_on_newpos()
instead? Most--all?--of them aren't updating u.usteed->mx,my, but I
guess that monster's coordinates don't matter since it isn't placed on
the map.
From a bug report, the function escapes(),
which is used during options parsing for various options that accept
string values, is given user-controlled input that could end with a
backslash or caret (or two character "\M"). Such a malformed escape
sequence would make it consume the input's end-of-string character and
then keep processing whatever followed. That meant that it could
generate more data than its output buffer was prepared to hold, making
nethack be vulnerable to stack overflow issues.
His example that was supposed to clobber the stack didn't trigger
any trouble for me, and I didn't bother trying the second one that can
allegedly cause the Win32 binary to run another program. But the bug
itself is clearly real.
Jabberwocks are flagged as animals hence won't use items, or else
this would have been obvious long ago. They weren't flagged as no-hands,
so a hero in their form could wear gloves and/or wield a weapon (or a
cockatrice corpse, whose ineffectiveness when used with a claw attack
which followed a bite attack led to the discovery of this oversight).
I'm not sure what a jabberwock ultimately looks like, but am pretty sure
that it shouldn't have usable hands, particularly ones which are only
usable by a poly'd hero and not by jabberwock monsters.
From a bug report, if you dismount
from a steed whose legs are wounded, you won't recover the point of
dexterity which was removed when they becme injured. He noticed the
case where the steed had just died, but it happens for voluntary
dismount too (actually any dismount except one which wounds the hero's
legs in the process: DISMOUNT_THROWN or DISMOUNT_FELL).
It seems rather odd that the hero temporarily loses Dex when the
steed becomes injured, but I haven't changed that.
From a bug report, applying unlit Candelabrum
of Invocation when its candles had 1 turn's worth of burning left would
give a message that the candles were burning but not actually light them
if done anywhere other than the invocation location. Their burn time is
cut it half when not at that spot, and dividing an age of 1 yielded 0,
confusing begin_burn(). They wouldn't light and they couldn't be replaced
since they'd never get used up.
The problem is real, but the chance of it actually happening in
normal play is just about zero. This applies his suggested fix of
rounding the halved burn time up instead of down so that it can't yield 0.
It also applies his suggestion that the Candelabrum treat the invocation
spot like any other location once invocation has produced stairs there,
just as the Bell and the Book do.
From a bug report,
when climbing out of Gehennom while carrying the Amulet, you could skip
a handful of levels by taking the magic portal into the Wizard's Tower,
dropping the Amulet, zapping it with a wand of teleportation--possibly
more than once--until it lands outside the tower. Then take the portal
back out of the tower and level teleport--feasible now that you're not
carrying the Amulet any more--back to the tower level and retrieve the
Amulet. Overall probably not much of a savings unless you're having
really bad luck with the mysterious force sending you back whenever you
try to go up. The hero and monsters can't teleport from inside the tower
to the outside or vice versa; this gives the same limitation to objects.
From a bug report, using Alt+5 when number_pad mode
is set to MSDOS compatibility (where Alt+5 is supposed to function as the
'G' movement prefix) didn't work correctly. The code that did M-5 to G
conversion was being executed after the code which should have gotten G's
direction, resulting in strange behavior, probably using stale values for
u.dx and u.dy. (With current dev code, I evidently had u.dx==0 && u.dy==0
so was getting "You can't get there from here..." which is actually pretty
amusing in the current context. 3.4.3 didn't have that feedback so I'm
not sure what happened in it; possibly just silent refusal to move.)
From a bug report, the weight of a non-cursed bag
of holding would be off by 1 when the weight of contents was a multiple
of 2 (for uncursed) or of 4 (for blessed), since the round off handling
added 1 when it shouldn't in those cases. Mainly noticeable when empty;
the extra 1 unit made it be twice as heavy as it should have been.
Probably never noticed in actual play. He has implemented a patch
which shows weights as part of an object's formatted description, making
this stand out. Supposedly the Vulture's Eye interface also added a
patch like that a farily long time ago; I wonder why nobody using it ever
noticed. (Maybe the weight was suppressed for bags of holding there?)
Noticed when testing the [trunk] ^X fix: polymorphing into human
form (not reverting to original form) reported "you feel like a new man"
when I resumed being a cavewomen. Like with ^X, it used poly'd hero's
current monster gender instead of the about-to-be-restored role gender.
It's amazing that nobody seems to have ever noticed in all this time.
Noticed while testing a forthcoming mimic patch: when blind, some
actions (open, close, #untrap, applying a key [as of a month ago],
possibly others) taken against a mimic posing as a door would yield
"Wait! That's a monster!" but leave the map showing the door instead
of replacing it with the unseen monster glyph. Similarly, using #untrap
towards a known trap location covered by a concealed mimic could yield
"It is in the way." or "It isn't trapped.", depending upon the type of
trap present, and not reveal the mimic. Same thing happened when not
blind, except the message would refer to "the <size> mimic" rather than
"it". Now it will expose the mimic, regardless of the type of trap.
Noticed while looking through steal.c: theft that takes multiple
turns uses stealarm() callback which removes stolen armor from hero's
shopping bill, but theft that happened without delay did not. So theft
of an unpaid non-armor or non-worn item while in a shop left it on the
bill where it wouldn't show up for either ``I u'' or ``I x'', hiding the
charge from the player ('$' did disclose the total amount that the shk
was owed though), and the shopkeeper would persist in blocking the door.
This makes immediate theft behave the same as delayed theft; the stolen
item is removed from shop's bill when the thieving monster takes it away
from the hero.
Dropped items that a shopkeeper doesn't want have their no_charge
bit set; that's only supposed to be used for floor items inside shops.
But no_charge would stick when an object was picked up by a monster, so
the object would stay free for player if that monster was subsequently
killed in another shop which stocked that kind of item. Probably never
noticed because most monsters won't pick up items off of shop floors,
also most levels don't have other shops dealing with alternate types of
stuff. This clears no_charge, except when the monster picking up the
item is tame (so that a pet picking up and then dropping a no_change
object in the same shop won't cause the shk to silently take possession,
which would certainly lead to reports of a bug...).
<Someone> reported that being killed by a monster with a long name
can result in nethack going into an infinte loop printing spaces. Handle
this by detecting attempts to wrap the topten output on a word that is too
long and just inserting breaks in the middle of the word in this case.
From a bug report, if you entered water
while blind and any spellbooks got blanked, you would know they became
"plain spellbooks" iff their original description was known. The same
situation applied to scrolls and potions; if they had been previously
seen you'd learn they'd become blank or clear. This fix resets the
obj->dknown flag during transformation so that altered objects are only
known by their class when blind, never their description, the same as
when they hadn't been seen before being blanked. (When sighted, the
dknown flag gets set again the next time the object's name is formatted,
so the player shouldn't be able to notice that any reset took place.)
Unpaid objects which get blanked should be treated as used up for
shop billing purposes (force the hero to buy), but there aren't any pools
in shops so aside from the added comment I'm going to pretend I didn't
notice that that isn't being done....
Potions seen before becoming blind which become diluted while blind
will be known to be diluted since there's no way to know the description
without also knowing the dilution. I don't think that's important enough
to track known-dilution separately, although I suppose we could overload
the cknown (contents-known) flag for that if necessary.
This also removes an inaccurate comment about the effects of Luck.
Its maximum is always 13 regardless of whether the moon is full, so 5%
for the lowest chance of blanking via submersion was impossible.
From a bug report, you could write a
spellbook with a magic marker while blind and were told the description
(often a color) of the resulting book. This prevents books from being
written while blind, just as they can't be read in that situation, and
it adds an extra test when attempting to write scrolls while blind.
(When you succeed in writing a scroll while blind, you're just told that
the result is ``x - a scroll'' as it's moved to its new inventory slot.)
This also removes a couple of overly hyper exclamations when writing
fails. Someday somebody ought to go through the whole program and decide
which messages actually warrant exclamation points, but I doubt that
that'll ever happen.
From the newsgroup: the 'O' command's menu for setting pickup_burden
shows "Unencumbered" for the 'u' choice but the Guidebook and the in-game
options help show "Unburdened". (For config file processing, the program
only examines the first letter so accepts either value.) This changes the
documentation to match the game.
From a bug report, drinking a potion of
polymorph which is wielded would trigger an "object lost" panic if hero
took on a form that was forced to drop its weapon. Once weapon/potion
got dropped, subsequent useup() of the potion was no longer operating on
an inventory object.
Unwield the potion at start of drinking, so that dropping doesn't
come into play. (If we ever introduce a monster form incapable of
holding inventory so drops everything, this will have to be revisited.)
From a bug report, it was possible to get
|You hit the with all your might. You stop digging.
if a boulder went away--in his case, it was picked up by a giant--while
you were occupied trying to break it with a pick-axe. The code explicitly
used "" to fill in the message when dig_target had an unexpected value.
This just avoids giving the message in a case like this. Possibly
extra stop_occupation() calls should be done instead, but I didn't want
to try to figure out how many would be needed (monster picks up object,
monster zaps wand of striking, others?).
From a bug report, if you were a mimic
who was hiding (via #monster, becoming a strange object) and polymorphed
into some other monster type, you retained the hidden/object form. That
didn't happen when reverting to normal form, or when polymorphing into a
monster while involuntarily mimicking gold, but handling for the latter
inadvertently blocked dealing with the hiding-voluntarily case.
From a bug report, a long worm with 0 HP
was observed via stethoscope after cutting one or more worms in half many
times, followed by an unspecified crash. Cutting a worm doesn't reduce
its level below 3, but if a worm is drained to level 0 by some other means
and then gets cut in half (and still has at least 2 HP left), cutworm()
would give the new level 0 worm 0d8 (hence 0) for current and max HP.
That could confuse end-of-move monster cleanup, which thinks 0 HP is a
dead monster who has been removed from the map but not yet purged from the
fmon list. Purging it would then leave a stale monster pointer on the map.
cutworm() should have special cased level 0 to use 1d4 for HP, but
instead I've changed it to not produce a cloned worm if the source one is
lower than level 3.
From a bug report.5 years ago? and again today:
mimics appear on the rogue level even though they're lowercase letter
monsters. <Someone> notes that during level generation, mimics pretending to
be closed doors are sometimes substituted for trapped actual doors. That
should be avoided on the rogue level both because its doorways are always
empty (enforced after the fact in extralev.c code rather than in the door
making code) and because mimics aren't uppercase letter monsters (so
should only ever appear there if they've travelled from another level).
From a bug report, being stuck in the
floor or in lava and trying to move downwards while levitating gave "you
are floating high above the floor/lava" which contradicts being stuck.
Now you'll get "you are trapped in the floor/lava" in that situation.
I thought about letting it fall through to the chance to autodig with
wielded pick, but decided to go with just the alternate message. (Being
tethered to a buried iron ball still lets you "float high above the floor",
so this doesn't check for being trapped that way.)
From the newsgroup: hero's steed can become untame if killed while
it is wearing an amulet of life saving, leaving the hero still mounted
and resulting in repeated "placing steed onto map?" warnings when the
steed tries to move. Force the hero to be thrown off the mount in that
situation.
From a bug report:
The following steps do not yield the expected fruit:
1) start nethack in explore mode (with a wand of wishing)
2) change fruit name to "tomato"
3) save/restore
4) change fruit name back to "slime mold"
5) save/restore
6) wish for a fruit; you get a tomato
7) check options; fruit name is set to "slime mold"
If you specified a fruit name that already existed in the list,
fruitadd() always set current_fruit to the fruit with
the highest fid encountered in the list to that point, instead
of the fid of the matching entry.
From a bug report, archeologists were
inadvertently starting out at basic skill level in sling because of their
carried touchstone, which is flagged as being sling ammo.
From a bug report: in the irregularly
shaped temple on the C quest home level (the room where the leader is
located), the lit south wall contained a dark spot where a secret door
is located. It stayed blank until you got right next to it rather than
just until you got to a good angle facing it. (Magic mapping hides the
problem by showing that spot as a wall instead of leaving it as unseen;
you have to walk or teleport to that room in order to see the problem.)
The code that lights walls and doors which border lit rooms neglected
temporary walls produced by secret doors.
From a bug report,
the message when dipping one stack of potions into another triggers an
explosion says "BOOM" yet nearby sleeping monsters remained undisturbed.
I did some research, and technically, a jellyfish does indeed have no head
(and, technically, no brain, just a "nerve net"). The part on top is a
"bell" used for buoyancy, not a head.
From the newsgroup: hangup save while picking up gold from the
floor in a shop would duplicate that gold in the save file. First the
gold amount was being added to hero's gold, then two messages were given
[pline() or prinv() about pickup followed by one from costly_gold() about
shop credit], and lastly the floor gold would be removed. The second
message could trigger --More-- and provide a controllable interruption
point between giving the gold to the hero and removing it from the floor.
Change this to do the removal step before feedback.
Fix the problem From a bug report. His system has a logical name "DATA" pointing at some disk, and
when the dlb utility tried to open "data" for inclusion in the library
being built at install time, it attempted to access the wrong thing and
failed. He then attempted to fix it in a manner which let dlb finish, by
modifying dlb_main.c to append "." to file names that lack a dot, but
then nethack couldn't access "dungeon" in the library because string
comparison didn't match the altered dlb directory entry of "dungeon.".
NetHack was working around this unintended interaction with the
environment issue in fopen_datafile(), and dlb was doing so for fopen()
but not open(). This moves nethack's fixup out of src/files.c and into
sys/vms/vmsfiles.c, adds another routine there so that both open() and
fopen() are covered, and updates the vms Makefiles so that the various
utility programs all link with vmsfiles. (The build script vmsbuild.com
puts object files into a library and gets that last bit for free.)
Reported a month ago by <email deleted>, putting on
a cloak of invisibility while blind and then using ';' or '/' to examine
yourself revealed that you had become invisible. This fix just changes
the lookat() output when you can't see that you can't see yourself. :-)
Probing and stethoscope still reveal invisibility, as will any message
which uses x_monnam() to identify the hero. (First part is intentional;
last part seems not worth bothering about--I'm not even sure that the
player can arrange to trigger it.)
From a bug report, if you're swallowed
while in a vault and the guard arrives, he'll ask your name even though
you're hidden within the engulfer. This makes him give a message and
then leave, as is already done if you're mimicking an object or unable to
speak.
This also suppresses his repeated "Move along!" message if you're
swallowed or held since it's silly to keep telling you to move when you
obviously can't.
From a bug report, a monster which
died by moving into a trap which was next to the hero standing on Elbereth
resulted in "The <mon> is killed! The <mon> turns to flee!". An earlier
change made monflee() return if it's given a dead monster, so the fleeing
message is no longer given. This fixes the place where monflee() was
inappropriately being called for a dead monster in the reported situation.
Fix the crash From a bug report, where
having the hit that cuts a long worm into two also take the original down
to 1 HP would result in clone_mon() returning null and nethack crashing due
to a segmentation fault or access violation. The same thing could happen
if there's been enough long worms created to get them flagged as extinct.
This bug was only present in 3.4.3. Prior to that, cut_worm() did
its own monster creation inline instead of calling clone_mon(), ignoring
extinction and too-low hit points.
From the newsgroup: you could get "suddenly you cannot see the <mon>"
even though it remained visible. Cited case was for an orc who drank a
potion of invisibility while being observed by a hero wielding Sting, which
causes orcs to be displayed even when they're invisible. But it could also
happen when non-blind telepathy or extended monster detection is in effect.
Another entry in $cvsroot/shared/bugs/buglist, this one reported by
<email deleted>: if the Wizard had the Amulet and used
his "double trouble" spell, his clone would attack him in order to try to
get the Amulet. This prevents any monster who's after the Amulet from
attacking the Wizard to get it.
From an entry in $cvsroot/shared/bugs/buglist From a bug report:
when item weights were all scaled up by a factor of 10 for 3.1.0, the
code controlling random item drops by monsters still limited small ones
to dropping things of 3 weight units of less. Scale that up to 30.
While testing something, I noticed that my last remaining discovery
would never be forgotten. The formula
count = ((count * percent) + 50) / 100
always yields 0 with count==1 and percent==25 (the value used for mind
flayer attacks). Not likely to come up in actual play very often....
From a bug report: nymphs could steal
boulders even though they aren't allowed to pick those up. It happened
becuase can_carry() is only called for monkeys (consequently, they don't
have this problem), not for nymphs.
From the newsgroup: Conflict caused tame engulfer to swallow hero.
To try to get out, player hit it (with Magicbane, but that's not relevant
other than to provide an alternate "you hit it" message).
The magic-absorbing blade probes the invisible Audrey!
You get regurgitated!
placing defunct monster onto map?
Program in disorder, &c
[some look_here() feedback]
You kill poor invisible Audrey!
The problem was caused by hmon_hitmon(): it subtracted damage from the
target's hit points, did some bookkeeping and message delivery, then
called killed(). One bit of bookkeeping was to call abuse_pet() and
monflee() when the target is tame, regardless of whether the damage was
fatal. monflee() -> release_hero() -> expels() puts the hero and the
engulfer back onto the map, and that warning was triggered because the
former engulfer had no hit points left.
From a bug report, getting the "you kick at
empty space" result doesn't use any turns but can have side-effects like
waking up monsters and negatively exercising hero's stats. It should take
a turn even though nothing gets kicked.
splatter_burning_oil() is called when a lit potion of oil gets
broken, and it can dish out fatal damage to the hero. An earlier fix
to prevent a light-source panic (thrown item is not on any of the object
lists) during bones creation didn't address leaving that lit potion
intact if it was on the floor (which can happen if the breakage is caused
by striking or force bolt rather than its being thrown or kicked). Use
the existing obj->in_use mechanism as a more general fix, after teaching
bones code that it applies to other things besides the hero's inventory.