Bones loading was only checking to see if a
monster was marked extinct, it wasn't adding
up the born count of a species in the current
game with the number of that species on the
bones level being loaded. That made it possible
to exceed the correct number of nazgul and
erinys via bones.
This adds a common routine called propagate()
that makemon() and restmonchn(ghostly) share,
for incrementing the born count and checking for
extinction, etc.
When a bones level is loaded, restmonchn()
will flag an illegal monster (duplicated unique,
or too many of a species) by setting the
individual monster's mhpmax to the cookie
value DEFUNCT_MONSTER. Before getbones() finishes
loading the bones level, it will purge those
monsters from the chain.
Although the overlay stuff is destined to be
removed someday, this patch just makes the
use of STATIC_DCL, STATIC_OVL consistent
in the trunk.
[As a side pointless experiment, I was able
to build a working 8086 port of 3.4.2 after
this change that worked correctly in limited
testing right up until it came time to enter
Ft. Ludios., where it couldn't allocated the
required amount of memory.]
U631 - bustling town down stairs
correct the region where the down stairs can be placed so they don't show up
in a cut off cave. If/when the level generator is improved to avoid generating
such caves, the down stairs region could potentially be changed back.
U613 specifying alignment in win32 and CE (from Yitzhak)
> The bug involved using the initalign (and related) indexes into
> the array of alignments as indexes into the respective combo box,
> and these are (apparently) not equivalent. To fix, the combo box
> is queried one by one for the item with the index that produces
> that proper alignment value, and then uses that index found. I
> did not find an API that does this in one step, but this only
> happens once, at dialog initialization.
The Info.plist file contains vital information about a given
application package. Rename the file from .pli to .plist (note
that other files in this directory use long extensions).
Also correct and add to some of the information in this file.
flaming sphere and sliming
Reported to rgrn vs 3.4.1, polymorphing into other flaming monsters cures
sliming, but polymorphing to a flaming sphere did not.
monster hp loss with Stormbringer
<Someone> forwarded from rgrn that a monster using Stormbringer would
lose hp when hitting the player. The sign of the "gain" was reversed due
to subtracting the difference in the wrong order.
This old conditional was targeted for Apple compilers in a Unix
environment (probably A/UX, which hasn't been sold in over 10
years). It now interferes with installations under MacOS X.
nethack.allison [Thu, 28 Aug 2003 11:19:08 +0000 (11:19 +0000)]
bits (from <Someone>)
- Guidebook typo
- wizard mode prompt
[...]
> 2/3) In Guidebook* the lines subkeyval (Win32 tty NetHackonly).
> May be used to alter the value of should read subkeyval (Win32
> tty NetHack only). May be used to alter the value of
>
> 3/3) I miss a hint for the new wizmode feature levelteleport by
> menu. Neither wizhelp nor the dialog tell you about it. Maybe if
> (++trycnt == 2) Strcat(qbuf, " [type a number or ?]"); in
> teleport.c:589 could provide a hint.
>
> <Someone>
nethack.allison [Thu, 28 Aug 2003 05:46:50 +0000 (05:46 +0000)]
version info (from Yitzhak)
Changes are: Complete copyright notice, Versions using dot format instead of comma format, and nulls at the end of strings (required, at least for Windows 2000).
cohrs [Tue, 26 Aug 2003 15:11:58 +0000 (15:11 +0000)]
X11 install
Build and install the NetHack.ad file, and change the nethack.sh to append
the HACKDIR to the XUSERFILESEARCHPATH. This means users do not have to
do anything special to use the NetHack X11 resources, nor does it require
teaching nethack where the X11 app-defaults directory is. The change also
updates the X11 and linux doc files in a corresponding way.
kmhugo [Tue, 26 Aug 2003 00:19:58 +0000 (00:19 +0000)]
Mac port prefix files
Support compilation of multiple flavors for the Macintosh:
1. A Carbon port, text only and backwards-compatible with
older versions of the MacOS.
2. A termcap/Unix port for MacOS X only.
3. A Qt port, tiled and MacOS X only.
The flavor can be selected at compile-time by specifying the
appropriate prefix file for the compiler.
nethack.rankin [Sun, 24 Aug 2003 18:32:58 +0000 (18:32 +0000)]
fix B08001 - stone-to-flesh undoes cancellation
Prevent succubi from being fully restored via cycles of petrifying
and reviving. It wasn't just a matter of saving traits; cancellation is
one of the monster traits which is explicitly reset when a monster gets
revived. I think that probably makes sense, but this will override it
for succubi and incubi to prevent abuse; if they were cancelled at time
of petrification they'll remain cancelled when reanimated. Likewise for
nymphs; even though the abuse facter isn't present, the cancel effect is
pretty similar for them so keep revivals similar too.
This saves monster traits for every monster that gets turned into a
statue. Unlike with corpses there's no stacking involved to make players
notice that each has become unique, so all such statues might as well all
reanimate just like they were instead of as new replacment monsters.
nethack.allison [Sun, 24 Aug 2003 15:37:50 +0000 (15:37 +0000)]
Borland build fixes (from Yitzhak)
> This patch fixes warnings relating to pointers (using int *
> instead of unsigned int * ), provides prototypes for some
> functions, and adds a missing argument to one of the functions
>
> It also changes a bit in the way flex/bison are used in the
> Borland makefile to allow me to test compilation with those
> utilities using a batch file.
nethack.rankin [Fri, 22 Aug 2003 09:59:15 +0000 (09:59 +0000)]
vms build fix
Noticed when trying out the "heck patch", where the name of the file
for the sanctum level was changed and I neglected to update my Makefile to
reflect that: nothing was noticed if any files were missing when loading
them into a dlb container. Populating the playground directory for the
non-dlb configuration suffered a similar problem. Now the VMS playground
setup will issue a warning message if this happens (but not abort the
installation; perhaps it ought to do that as well...).
Other ports have the same problem. For example, Unix Makefile.top
relies on file globbing to build the dlb container; if a wildcard pattern
matches no files, dlb won't notice because the shell will have eaten the
offending pattern. Likewise for its non-dlb configuration, where cp won't
notice. However, this isn't a very interesting bug because it won't hit
when the distributed Makefiles correspond with the needed data files.
nethack.rankin [Fri, 22 Aug 2003 08:39:57 +0000 (08:39 +0000)]
fix sleeping shopkeeper's gold handling
Make a sleeping or paralyzed shopkeeper wake up if you drop something
he's interested in buying (covers the recently reported case where dropping
gold failed to add credit, but picking it back up increased shop dept) or
if you use the 'p'ay command while owing money. Sleeping shopkeeper is not
affected if you drop something he doesn't care about, or use 'p'ay when
there is no debt, or pick up shop goods (latter case is handled normally--
you'll owe money for the item even though the shk remains asleep).
This makes shopping become a little easier--you aren't stuck waiting
for the shopkeeper to wake up if you actually want to pay for something--
in the rare case where the shopkeeper has been put to sleep, but it's an
awful lot simpler than any other reasonable way I could think of to deal
with the [lack of] credit problem.
This makes the snoring message handling moot--it no longer exists.
(It wasn't very reasonable to begin with, because the program can't tell
whether mon->mfrozen is for timed sleep or timed paralysis so avoided
giving that message for temporary sleep. There ought to be two separate
counters; probing is another case where vague messages are given because
the program can't tell the reason why a monster can't move.)
cohrs [Thu, 21 Aug 2003 19:10:06 +0000 (19:10 +0000)]
blinded/unblinded message every turn while engulfed wearing the Eyes
I think this was From a bug report, but I cannot find the report
anymore. Perhaps I noticed it while doing something else. In any case,
every turn you're engulfed in, say, a dust vortex wearing the Eyes of the
Overworld, you get the "can't see"/"vision clears" message pair. This
patch modifies the behavior to only display this the first turn. Other code,
partially related to B01003, already deals with the puton-remove cases.
Since B01003 is only in the trunk, this fix is also only in the trunk.
cohrs [Wed, 20 Aug 2003 17:51:49 +0000 (17:51 +0000)]
another unreachable message
Correct the unreachable "snores" message From a bug report.
Applied to trunk only in hopes that beta8 might be the last for 3.4.2.
The fixes entry is generic since I'm sure other similar messages will be fixed.
nethack.allison [Wed, 20 Aug 2003 11:39:57 +0000 (11:39 +0000)]
win32 bits for main trunk (from <Someone>)
- set correct checkmark on "Lock Windows" menu item on startup
- redraw message window on resizing (it does not update properly otherwise)
- fixed copy/paste error in read registry settings function
nethack.allison [Tue, 19 Aug 2003 14:41:54 +0000 (14:41 +0000)]
guardian corpse, statue animation follow-up
- fix ring of protection from shape changers causing
real monster to be created.
- add ability to get the character class monster from
genus() or the species.
- use the character class monster when animating
guardian corpses.
nethack.allison [Tue, 19 Aug 2003 02:52:03 +0000 (02:52 +0000)]
animating quest guardian statues
Also a related bug: the guard against animating a unique
monster via tossing a statue onto a statue trap location, was
causing stone to flesh to silently ignore any statue of a unique
monster which seemed very uncharacteristic of the spell.
After this patch, statues of quest guardians and statues of
unique monsters will animate as shape-shifters posing as those
monsters, not the monsters themselves.
cohrs [Mon, 18 Aug 2003 20:14:18 +0000 (20:14 +0000)]
U592 - stuck in the floor
Digging a pit in the location where you're stuck should always free you.
This would not occur if you used a wand of digging to do the digging,
especially if you did so while levitating.
nethack.allison [Sun, 17 Aug 2003 14:35:04 +0000 (14:35 +0000)]
message fix for sewer rat from sink
> Getting a sewer rat from a sink when not blind, but can't see it
> (because of boulders, etc.) gives "Eek! There's it in the sink!"
> [<email deleted>]
nethack.allison [Sat, 16 Aug 2003 21:18:30 +0000 (21:18 +0000)]
kicking empty space not bars
> When you kick iron bars, it says "you kick empty space". Maybe
> this should be something more like "you hurt your foot on the
> iron bars" or "the bars resonate with your hit". Something other
> than "empty space". [<email deleted>]
nethack.allison [Thu, 14 Aug 2003 11:23:33 +0000 (11:23 +0000)]
win ce keypad (from <Someone>)
> I had some reports similar to "#U574: 3.4.1 On PocketPC, screwed
> up message area font" but regarding the keypad window. Since
> there is no separate option for keypad font, this patch makes it
> use message font option if it is set.
nethack.allison [Thu, 14 Aug 2003 11:17:49 +0000 (11:17 +0000)]
clipping patch (from <Someone>)
No objections were heard to this previously circulated
change.
> Clipping should occur right before user input (rhack) vs in the
> beginning of the move loop. For example, if hero had
> "teleportitis" and teleported because of that then the clipping
> region was not updated to reflect a new hero position until the
> next turn. This patch fixes that.
nethack.rankin [Thu, 14 Aug 2003 02:40:24 +0000 (02:40 +0000)]
fix "singular of null?" warning for info lookup
Guard against the pathological cases of ", <anything>" and
" called <anything>" strings that a user could type in to indirectly
trigger impossible(). Now they'll yield "no info about such things".
nethack.rankin [Tue, 12 Aug 2003 06:54:39 +0000 (06:54 +0000)]
monster level teleporting fix
From newsgroup discussion: prevent monsters from level teleporting
to Moloch's Sanctum level unless the invocation ritual has already made it
accessible (same restriction player's character already has). Otherwise a
monster could pick up one of the invocation items and effectively take it
into limbo, making it become impossible for the player to reach that level.
cohrs [Wed, 6 Aug 2003 04:59:51 +0000 (04:59 +0000)]
some "it" avoidance in killer names
<Someone> reported a couple cases where "it" could show up in killer names.
Chose his suggested fixes which result in short killer names.
cohrs [Tue, 5 Aug 2003 17:28:59 +0000 (17:28 +0000)]
delayed mimicing appearance change
Back in April, <Someone> reported to the list that when you are
polymorphed into a mimic and #monster, and return to human form while still
mimicing, your appearance does not change. This was due to a change
between 3.4.0 and 3.4.1 that caused all mimicing to go thru one case and
the code to change appearance was actually never executed.
cohrs [Mon, 4 Aug 2003 21:37:19 +0000 (21:37 +0000)]
U234, buglist, and related iron ball bugs
Several bug reports have been filed regarding the use of attached iron balls to
move in ways that are otherwise disallowed: moving diagonally from a
doorway, moving through boulders, squeezing through small openings, passing
over traps and diagonally between boulders on sokoban levels. Modified
bhit to deal with this. All these cases now cause the iron ball to stop if
appropriate for your form, level of burden, and so on. Since both boulders
and iron balls are big, boulders now always stop thrown iron balls,
even if not attached. Since iron balls don't cause any damage as they pull
you along, I didn't add any damage for the new "jerks to a halt" cases.
nethack.allison [Mon, 4 Aug 2003 01:39:31 +0000 (01:39 +0000)]
DOS bits
On some MSDOS ports, STATIC_OVL doesn't equate
to static, so taking_off in do_wear.c conflicts with the
one in invent.c in those environments. Somebody
out there might wish to try and build the 16 port and
tune it to work properly someday.
nethack.allison [Sun, 3 Aug 2003 19:58:49 +0000 (19:58 +0000)]
another buglist entry
> fog cloud hit uses "it". I was exploring the insides of a fog
> cloud with my fifth level wizard, and cast force bolt at its
> insides. I got the message "The spell hits it. You destroy the
> fog cloud!". Shouldn't "it" be "the fog cloud"? If so, it is
> debatable whether or not the then second "fog cloud" should
> perhaps be "it"... [<Someone>]
nethack.allison [Sun, 3 Aug 2003 18:05:36 +0000 (18:05 +0000)]
buglist item (main trunk only)
> The lighting store doesn't sell oil (probably never added when
> POT_OIL was added). There currently isn't enough room in the
> shclass struct for another item, but that could be expanded. I
> think adding oil there would be useful for the post-3.4.x
> version.
cohrs [Sun, 3 Aug 2003 03:11:53 +0000 (03:11 +0000)]
U550 - grid bug travel redux
Undo the change to test_move and instead, don't even test moving in diagonals.
This opens the possibility for approximating the diagonal while polymorphed
into a grid bug in the future.
cohrs [Sat, 2 Aug 2003 22:42:49 +0000 (22:42 +0000)]
cmdassist for grid bugs
the cmdassist message shows all the valid directions even if you are
polymorphed into a grid bug. I noticed this when I typed a diagonal
direction as a grid bug and got the dialog, telling me the key I just typed
was valid, but it wasn't. Limit the keys to those valid for grid bugs.
cohrs [Sat, 2 Aug 2003 21:39:57 +0000 (21:39 +0000)]
U571 - access denied message
Since only developers know that "13" is EACCES, try to include the text
message. I'm not 100% sure the ifdefs are complete, but it can be tweaked
as needed. This was the only common message in files.c that included errno
so it's the only one I changed. Of course, "13" is only one of several
possible errno values that might reasonably show up here.
nethack.allison [Fri, 1 Aug 2003 12:06:43 +0000 (12:06 +0000)]
ce changes (from <Someone>)
The following files are gone (sys\wince):
- stat.h (moved to ceinc\sys\stat.h)
- fcntl.h (moved to ceinc\fcntl.h)
- errno.h (moved to ceinc\errno.h)
- assert.h (moved to ceinc\assert.h)
The following files were added:
- mhtxtbuf.c
- mhtxtbuf.h
- menubar.uu
- ceinc
- ceinc\sys
- ceinc\fcntl.h
- ceinc\errno.h
- ceinc\assert.h
- ceinc\sys\stat.h
CE notes:
Fixes:
- added new options "wraptext", "fullscreen" and "softkeyboard"
- CE341-1 fix ("wraptext" option)
- hide map scrollbars on Smartphone
- added View->Options menu
- PocketPC: added "Fit to screen" and "Show/Hide keypad" icons
on the menu bar
- Smartphone: '<', '>' keys were mapped incorrectly
- build: use source files directly from <buildroot>\sys\wince instead of
copying them to <buildroot>\wince\
U555 - solaris compilation bits
- If you have Gnome installed on solaris, the GETRES support wouldn't build.
I don't have access to a solaris system with Gnome installed, but hacked
unixconf.h to force the GETRES code itself to be compiled. So, I believe the
unixres.c change will work for folks really using Gnome on Solaris.
Whether the rest of the gnome code will build there is beyond me.
- I accidentally left TIMED_DELAY defined and the Solaris build failed.
While solaris has usleep(), this is not part of SVR4 as far as I can tell.
But, SysV does have poll, so I implemented msleep() for SysV systems in
terms of poll. So, you can now define TIMED_DELAY on any SYSV build.
B05003 - tree kicking object grammar
<Someone> thought the incorrect grammar in the messages was due to scatter()
changing the quan of treefruit, but in fact, it was due to treefruit
referring to the wrong object (there is also a theoretical possibility that
treefruit can refer to a merged object with the wrong count). Create a temp
object for use in the message to avoid these possibilities.
<email deleted> wrote:
> Windows NetHack graphical Version 3.4.1
> comments: I have been unable to remove or put in partial groups
> of items into a bag of holding or scak. With hethack 3.3.X I
> could put 2 of 3 potions or 3000 of 8000 pieces of gold into the
> bag. The menu persents you with the following options (yn#aq)(n).
> Using # exits the menu and typing in the number you wish to use
> does nothing. The work around is to drop the number you wish to
> not store and put all the remaining into the bag then pick up the
> remaining.
Add missing handling for trapped containers and for Schroedinger's Cat
to the #tip command. Also, after tipping out the contents of a cursed bag
of holding, its weight would still reflect any items destroyed during the
process.
Releasing Schroedinger's Cat from a box which is being carried would
place the monster at the coordinates of wherever the box was last on the
floor instead of adjacent to the current location.
Also, the message sequence
The housecat inside the box is still alive!
The large box is empty.
seemed a little strange. This makes it say "is now empty" when a cat has
just been released.
> Trying to loot a bag on the floor while wielding a cursed
> quarterstaff: "You carefully open the bag... You have no free hand."
> Shouldn't I notice that I have no free hand before even trying?
<email deleted> wrote in rgrn:
> Using a stethoscope while inside a monster (air elemental, vortex)
> and while riding a steed will not let you use the stethoscope
> on your steed. You'll only get the engulfer-monster's stats
> instead of your steeds.
Fix the reported but that prevented stethoscope application to your
steed while engulfed. While the inability to apply your stethoscope
to your steed while engulfed was a code oversight, I think it's a
feature that your ability to use the stethoscope is impacted in the
midst of a swirling, noisy vortex. Make it deliberate with a
two-in-3 chance of avoiding the interference (nine-in-10 chance if
you're a healer who is much more skilled at using a stethoscope).
B05001 - eating a tin in a stack on the floor
Make sure to splitobj tin.tin before calling bill_dummy_object.
Avoids charging to all the stacked tins when you eat the 1st one.
Previously, if mksobj() was called with the 1st argument
having a value of CORPSE, and a second argument (init)
set to FALSE, the corpse would never get a timer attached.
Since the crysknife is the only MINERAL object in the
game that isn't affected by the "stone to flesh" spell,
and the only thing that makes it to the default
case on the switch statement in zap.c, make it
obvious that it isn't an oversight that nothing happens.
(it wasn't an oversight, right?)
B03008 - stop_occupation while digging in a pit
If you dug in a pit next to a sleeping, angry monster, you'd stop every
turn due to a complex check at the end of dochugw. It turned out this
was due to a long-standing bug in the special case vision code that failed
to set the COULD_SEE bit for the locations where it set the IN_SIGHT bit.
It looks like the underwater code had the same problem (it didn't set the
bit, obviously there are no pits underwater). However, the same could
occur if you see the angry, sleeping monster with Xray vision. In this
case, setting COULD_SEE is not appropriate, so added a mcanmove check to
the complex check in dochugw.
B04007 - invisible steed glyph while chatting and blind
Avoid ever putting an "I" on the hero's location by checking it in
map_invisible(). It appeared there were a few other special cases that
could call map_invisible() for actions involving the steed, so checking there
catches them all.
U537 - autosearching while digging a trapped statue
Noticing a statue trap animate should stop your occupation.
That avoids the reported "You hit the with all your might." message.
<Someone>:
> You aren't very skilled at reaching from the saddled blue dragon.
> Continue your attempt to set the land mine? [yn] (n)
> You begin setting your land mine.
> There is the trigger of your mine in a pile of soil below you.
> KAABLAMM!!! The air currents set your land mine off!
> I somehow suspect that it'd be more than the air currents, if I were
> trying to arm a land mine from dragonback while not very good at
> controlling it.
<Someone>:
> What do you want to use or apply? [cmu or ?*]
> You aren't very skilled at reaching from the saddled warhorse.
> Continue your attempt to set the land mine? [yn] (n)
> You begin setting your land mine. You escape your land mine.
> Is "escape" really the right word here?