]> granicus.if.org Git - nethack/log
nethack
18 years agofixes typo
nethack.rankin [Fri, 12 May 2006 00:36:13 +0000 (00:36 +0000)]
fixes typo

     Pointed out by <Someone>.

18 years agocandelabrum in shop (trunk only)
nethack.rankin [Fri, 12 May 2006 00:30:32 +0000 (00:30 +0000)]
candelabrum in shop (trunk only)

     The code to have Izchak recognize the Candelabrum of Invocation
instead of just being uninterested in an item not stocked in his shop was
being skipped when the character is hallucinating.  Make it work for any
lighting store (slash'em sometimes has another candle shop, run by a
randomly named shopkeeper), and make it recogize Izchak even when
hallucinating.  Also, have him give a message about the need for 7 candles
if the candelabrum doesn't already have them attached.

18 years agoDelphi follow-up (trunk only)
nethack.allison [Thu, 11 May 2006 21:22:06 +0000 (21:22 +0000)]
Delphi follow-up (trunk only)

18 years agowater vs acid
nethack.rankin [Thu, 11 May 2006 03:26:55 +0000 (03:26 +0000)]
water vs acid

     Fix the bug From a bug report.alt.org server, where killing a monster by closing the
castle drawbridge resulted in a panic after the dead monster's possessions
were dropped into the moat and a potion of acid exploded in the process.
water_damage() deleted the object but had no way to tell flooreffects()
that it was gone, so flooreffects() couldn't tell its own caller not to
place and stack the object.  After that, a chunk of freed memory became
part of the floor objects chain and eventually triggered a panic which
tried to make a save file but whose reason didn't get logged properly.

18 years agoDelphi msg (trunk only)
nethack.allison [Wed, 10 May 2006 23:13:28 +0000 (23:13 +0000)]
Delphi msg (trunk only)

<email deleted> wrote:
> * Angering the Oracle then entering her room still gives
> "Hello, <Dudley>, welcome to Delphi!"

18 years agoselling candelabrum in lighting store
nethack.allison [Wed, 10 May 2006 03:31:53 +0000 (03:31 +0000)]
selling candelabrum in lighting store

<email deleted> wrote:
> * You can't sell a candelabrum (with candles attached) to a lighting store.

You still can't sell the candelabrum after this, but acknowledge
the situation by having Izchak say something unique.

18 years agoset_corpsenm()
nethack.allison [Tue, 9 May 2006 23:10:22 +0000 (23:10 +0000)]
set_corpsenm()

Provide a common routine that always does the right
thing with respect to timers and weight when altering
obj->corpsenm, and use it throughout the code.

18 years ago#H85: create_object() bugs
nethack.allison [Tue, 9 May 2006 01:31:55 +0000 (01:31 +0000)]
#H85: create_object() bugs

From a bug report.c was first creating  a corpse
complete with revive timer if it was a troll, or without
a timer if it was a lizard or lichen corpse. Then it might
change the corpse type, leaving strange corpse
types that revived, or that lasted forever.

18 years agodungeon open failure
nethack.allison [Sun, 7 May 2006 14:32:04 +0000 (14:32 +0000)]
dungeon open failure

We've been getting numerous complaints from people
about "dungeon failure", often related to attempts
to start NetHack from within various zip utilities
that present a folder-like view.

The dungeon failure was actually misleading. The
real problem was a dlb file open failure, but the
return value of dlb_init() was not being checked
in pcmain.

This moves the dlb_init earlier in the startup,
checks for failure, and provides some feedback
around the common zip utility problem for win32.

18 years agomore rumors processing (trunk only)
nethack.rankin [Sun, 7 May 2006 05:31:27 +0000 (05:31 +0000)]
more rumors processing (trunk only)

     This fix should work for both DLB and non-DLB without forcing binary
mode for the latter.  And it should continue to work even if we later
decide to force that mode (which I think we should do...).  Use actual
file positions to calculate the size of the true and false sections,
rather than counting the bytes of each rumor (that counting has been left
in place but it gets overridden now.)  Those two sizes will be bigger on
platforms which use CR+LF line ends and maintain dat/rumors as non-DLB
text file.  But due to the way that nethack uses the sizes, such size
differences don't matter.

     The branch variant shouldn't need any corresponding fix.  It uses
the counting method when the output is binary, where the accumulated
value is accurate, and the check end-of-file shortcut when using text,
which should not be affected by stdio converting CR+LF into \n for text
input and back to CR+LF again for text output.  (The original bug was due
to starting out with the EOF shortcut when input had CR+LF line ends, but
then writing less data due to binary output keeping just LF instead of
putting CR back.)

18 years agowin32 Makefile updates
nethack.allison [Sat, 6 May 2006 19:13:35 +0000 (19:13 +0000)]
win32 Makefile updates

- DLB wasn't defined during util builds, including makedefs.
- spotless wasn't spotless

18 years agorumor consumption during level creation
nethack.rankin [Sat, 6 May 2006 05:08:27 +0000 (05:08 +0000)]
rumor consumption during level creation

     I've forgotten who pointed this out recently, but the hero was having
wisdom exercized (if true rumor chosen) or abused (for false one) whenever
level creation made a random floor engraving which used a rumor for its text.

18 years agofixes entry for rumors fix
nethack.rankin [Sat, 6 May 2006 04:57:10 +0000 (04:57 +0000)]
fixes entry for rumors fix

18 years agomore thorough rumor processing (trunk only)
nethack.rankin [Sat, 6 May 2006 04:55:57 +0000 (04:55 +0000)]
more thorough rumor processing (trunk only)

     To fix the gibberish rumor observed by at least a couple of players on
Windows (where if rumors.tru had <cr><lf> line ends and DLB was defined,
makedefs built a file that caused nethack to end up in the wrong place when
it reached EOF and tried to jump back to the first false rumor), change
the way that makedefs builds the rumors file.  It now will collect more
information about the true and false rumors.  Instead of one hex value on
the second line, there are nine values (three groups of three).

1,2,3;4,5,6;7,8,9

1 = number of true rumors; not previously collected and not currently used
2 = size in bytes for all true rumors (in decimal, as is #1)
3 = offset to first true rumor (in hexadecimal; not previously collected)
4,5,6 = same as 1,2,3 but for the false rumors section
7,8 = always 0 (imaginary third section has no entries, no size)
9 = offset to end-of-file (could be used for sanity checks; currently isn't)

Adding #2 with #3 yields #6; adding #5 with #6 yields #9.  The old format's
lone entry was the same as the new format's #6.  #2, #3, and #5 are values
which nethack was previously calculating on the fly after opening the file.

     This also extends rumor_check() a little bit (displays the last rumor
for both sections in addition to the first), but I think it can probably
now be demoted to ``#if 0'' and removed from the extended commands list.

18 years agoThe last straightforward additions.
jwalz [Thu, 4 May 2006 22:15:37 +0000 (22:15 +0000)]
The last straightforward additions.

Now I have to figure out which of the shifts from here to there we
want from the <email deleted> submissions.

18 years agoAnd another handful of submitted entries.
jwalz [Wed, 3 May 2006 23:01:02 +0000 (23:01 +0000)]
And another handful of submitted entries.

18 years agowork around win32 rumor issues (#H80)
nethack.allison [Tue, 2 May 2006 22:10:54 +0000 (22:10 +0000)]
work around win32 rumor issues (#H80)

With makedefs changed to open the files as binary, the
rumors generation and retrieval seems to work consistently.

win32tty
T start=000067 (000043), end=020658 (0050b2), size=020591 (00506f)
F start=020658 (0050b2), end=043641 (00aa79), size=022983 (0059c7)
T 000067 A blindfold can be very useful if you're telepathic.
F 020658 "So when I die, the first thing I will see in heaven is a score list?"

win32gui
T start=000067 (000043), end=020658 (0050b2), size=020591 (00506f)
F start=020658 (0050b2), end=043641 (00aa79), size=022983 (0059c7)
T 000067 A blindfold can be very useful if you're telepathic.
F 020658 "So when I die, the first thing I will see in heaven is a score list?"

18 years agowizrumorcheck update for trunk
nethack.allison [Tue, 2 May 2006 12:50:09 +0000 (12:50 +0000)]
wizrumorcheck update for trunk

18 years agodebug mode #wizrumorcheck
nethack.allison [Mon, 1 May 2006 01:49:18 +0000 (01:49 +0000)]
debug mode #wizrumorcheck

Provide a command to easily verify that the rumor true/false
boundary offsets are correct for the rumors file.
If the boundary is pointing mid-line, the rumor at the boundary
won't decrypt properly.

18 years agoguidebook autopickup_exceptions
nethack.allison [Sun, 30 Apr 2006 17:55:09 +0000 (17:55 +0000)]
guidebook autopickup_exceptions

autopickup_exceptions is no longer in the experimental section of config.h

18 years agoYet more of the <email deleted> entries.
jwalz [Sat, 29 Apr 2006 23:13:18 +0000 (23:13 +0000)]
Yet more of the <email deleted> entries.

18 years agoAnd another batch from <email deleted>
jwalz [Fri, 28 Apr 2006 22:28:48 +0000 (22:28 +0000)]
And another batch from <email deleted>

18 years agoThe next few from <email deleted>
jwalz [Thu, 27 Apr 2006 22:35:41 +0000 (22:35 +0000)]
The next few from <email deleted>

18 years agoThe next <email deleted> batch.
jwalz [Wed, 26 Apr 2006 23:02:25 +0000 (23:02 +0000)]
The next <email deleted> batch.

18 years agoAnother batch from <email deleted>
jwalz [Tue, 25 Apr 2006 20:46:31 +0000 (20:46 +0000)]
Another batch from <email deleted>

And some space removal after I noticed some on incoming entries.

18 years agogcc compilation warning bits
cohrs [Tue, 25 Apr 2006 04:08:22 +0000 (04:08 +0000)]
gcc compilation warning bits
some rather complex boolean operations needed more parentheses to avoid
warnings.  I think I put them in the right places.
A couple other items: naked assignments in if stmts, and an extra function decl

18 years agofix W343-1 open win32 bug from known bugs page
nethack.allison [Tue, 25 Apr 2006 01:16:54 +0000 (01:16 +0000)]
fix W343-1 open win32 bug from known bugs page

W343-1 Redirecting score output through a pipe doesn't work.

18 years agoNext batch from <email deleted>
jwalz [Mon, 24 Apr 2006 20:00:11 +0000 (20:00 +0000)]
Next batch from <email deleted>

18 years agoFirst batch from <email deleted>
jwalz [Sun, 23 Apr 2006 18:51:39 +0000 (18:51 +0000)]
First batch from <email deleted>

18 years agoUpdate dungeoneers for data.base entries.
jwalz [Sun, 23 Apr 2006 17:22:46 +0000 (17:22 +0000)]
Update dungeoneers for data.base entries.

18 years agodigging land mines sequel (trunk only)
nethack.rankin [Sat, 22 Apr 2006 04:39:17 +0000 (04:39 +0000)]
digging land mines sequel (trunk only)

     Axes can't dig through the floor, but attempting to dig down with one
shouldn't just "scratch the floor" if there is an armed land mine present.
Have it set off a land mine or bear trap, in addition to the possibility
of chopping your way out of being stuck in a bear trap (a recent change).

18 years agodungeon overview build fix
nethack.rankin [Sat, 22 Apr 2006 04:22:08 +0000 (04:22 +0000)]
dungeon overview build fix

18 years agoexperimental - dungeon overview (trunk only)
nethack.allison [Thu, 20 Apr 2006 00:57:45 +0000 (00:57 +0000)]
experimental - dungeon overview (trunk only)

Add Hojita Discordia's Dungeon Map overview as
conditional code for experimentation and testing.
Everything is guarded by
#ifdef DUNGEON_OVERVIEW
#endif

The notes that accompanied the original patch follow.

Dungeon Map Overview Patch for Nethack 3.4.3
Version 3
=============================================================================
Changelist:
    v3: Changed #level to #annotate to avoid #levelchange collision.  Fixed
        handling of elemental planes and astral plane (oops).  Changed
formatting to be slightly closer to print_dungeon()'s.  Should be
"final" version for 3.4.3.
    v2: Added tracking of trees.  Changed ctrl-m command to ctrl-o.  Portals
        displayed as "sealed" instead of "closed".
    v1: First release.
    (Note: all versions are mutually save compatible.)
=============================================================================
This patch creates a dungeon map overview that is recorded as the player
explores the dungeon.  I was tired of returning to a game a few days later
and having no idea what the dungeon looked like.  Trying to name pieces
of armor with shorthand didn't work so well as an intermediate solution
either, especially around nymphs.

It can be assumed that this map is in the mind of the hero and thus
can't be stolen, can be read when blind, or when buried, or when the hero
doesn't have any hands, or eyes, or hands free, or...etc. On the other hand,
this implies that the hero doesn't remember all of the details ("a fountain",
"some fountains", "many fountains") and that the map is subject to amnesia
when applicable.

This overview tracks fountains, altars, stores, temples, sinks, thrones,
trees, and dungeon branches.  It attempts to not spoil the player nor
reveal more information than the hero knows.  For this reason, it only
tracks dungeon features found in the guidebook and dungeon branches.

This patch breaks save file compatibility.  Sorry.

Added commands
=============================================================================
#overview (ctrl-o, if not in wizard mode) - displays overview
#annotate (ctrl-n, if using numpad) - names current level

Example Output From #overview
=============================================================================
The Dungeons of Doom: levels 1 to level 15
   Level 1:
      A fountain
   Level 3: (My stash.)
      An altar, some fountains
      Stairs down to The Gnomish Mines
   Level 7:
      Many fountains
   Level 8:
      Stairs up to Sokoban, level 7
   Level 15:
      A general store
      Sealed portal to The Quest
The Gnomish Mines: levels 4 to level 7
   Level 7: <- You are here
      Many stores, some fountains, a temple

More Details
=============================================================================
The overview shows only levels that have anything interesting to display and
doesn't show branches that don't have any interesting levels.

To avoid the map revealing more information than the hero knows, the overview
only displays things that the hero has seen or touched.  (If the hero
blinds herself, levitates above a known fountain, and obliterates it with a
wand of digging, the overview will still say that there is a fountain.)

This is done, sadly, by adding 6 bits to the rm struct to track the last
known dungeon type.  On the other hand, this change could potentially allow
a window port to do something like drawing an item and a fountain on the same
square.

Things That Could Be Better And Maybe Some Feedback Would Help
=============================================================================
"<- You Are Here" is pretty goofy
    -...but an indicator of some sort is nice.
=============================================================================
Many thanks to all the kind folks on r.g.r.n. who had very good feedback
about this patch, in particular L (for the trees), <Someone> Papaganou (for the
#annotate suggestion and some formatting feedback), and <Someone> (for the suggestion
of just overriding ctrl-o instead of using the very broken ctrl-m.)
=============================================================================
20060311. Hojita Discordia. (My usenet email is bogus. Sorry.)

18 years agocomment bit (trunk only)
nethack.allison [Thu, 20 Apr 2006 00:50:37 +0000 (00:50 +0000)]
comment bit (trunk only)

18 years agoStarting with a formatting sweep, including adding Pat's [] breaks.
jwalz [Wed, 19 Apr 2006 22:20:54 +0000 (22:20 +0000)]
Starting with a formatting sweep, including adding Pat's [] breaks.

18 years agofix #H79 - steed disintegration
nethack.rankin [Tue, 18 Apr 2006 05:26:00 +0000 (05:26 +0000)]
fix #H79 - steed disintegration

     From a bug report, a steed hit by disintegration
breath survived via life-saving, but the program was confused about whether
the hero could still ride and issued some impossible warnings.  The code
to disintegrate a monster's inventory didn't bother to unwear worn items as
it destroyed them, presumeably assuming that the monster was sure to die,
so steed was left with a flag bit set claiming it was saddled even though
the saddle was gone.  This fixes that, and the rider will end up being
dismounted as the saddle gets destroyed, regardless of whether the steed
ultimately survives.  [Since the steed is still present at the time of
dismounting, the hero will get bumped to some other location, possibly to
the next spot about to be hit by the same black dragon breath attack which
just vaporized the steed.  That's suboptimal, to put it mildly....]

     I couldn't test the circumstances of the original report.  Post-3.4.3,
ki-rin has been marked no-hands and is no longer capable of wearing armor
or amulets.  I looked to see whether any other potential steed could wear
an amulet of life-saving and couldn't find one.  But the original bug also
applied to conferred properties of special armor worn by non-steed monsters
too, so the fix was needed anyway.

     The branch and trunk patches are different.  For the trunk, I moved a
big chunk of code out of buzz() into a seperate routine.  That actual fix
is the same in both variants.

18 years agomore munstone fixes
nethack.rankin [Tue, 18 Apr 2006 03:41:05 +0000 (03:41 +0000)]
more munstone fixes

      Move part of the recent "munstone fixes" patch to the branch code
since one of those fixes prevents accessing freed memory.  The part that
lets monsters eat tins of lizard meat or tins of acidic monsters in order
to get the same benefit as the corresponding corpse has been left out.

18 years agoanother safe_oname() bit (trunk only)
nethack.allison [Sat, 15 Apr 2006 15:49:00 +0000 (15:49 +0000)]
another safe_oname() bit (trunk only)

18 years agosafe_oname (trunk only)
nethack.allison [Sat, 15 Apr 2006 15:40:27 +0000 (15:40 +0000)]
safe_oname (trunk only)

There were routines that were passed the
object name as an argument.  Before the oextra
patch, ONAME() always returned a valid pointer
to a location within the obj struct. The oextra
patch worked around those cases by
using a temporary variable that was either set
to ONAME (if the obj passed the has_oname() test),
or to ""  (pointer to an empty string) if no name was
present.

Since that might be a common thing to do, provide
the safe_oname() routine that you can use as a
function parameter without having to worry about
about whether ONAME(obj) is valid, and without
the need for the temporary variable.

18 years agoincrement editlevel
nethack.allison [Sat, 15 Apr 2006 13:40:11 +0000 (13:40 +0000)]
increment editlevel

That last merge update should have included this.

18 years agooextra follow-up - merging (trunk only)
nethack.allison [Sat, 15 Apr 2006 13:37:58 +0000 (13:37 +0000)]
oextra follow-up - merging (trunk only)

It seemed inappropriate to allocate and tack on an oextra
structure just to mark it as unmergable, and the oextra
struct itself wouldn't be released until a save/restore took
place.

This uses one of the freed up oattached bits to prevent the merge.

18 years agooextra obj.h follow-up (trunk only)
nethack.allison [Sat, 15 Apr 2006 13:09:57 +0000 (13:09 +0000)]
oextra obj.h follow-up (trunk only)

Just add some notes to obj.h around oextra.

18 years agoomailcmd (trunk only)
nethack.rankin [Sat, 15 Apr 2006 02:14:36 +0000 (02:14 +0000)]
omailcmd (trunk only)

     The revised newmail() wouldn't compile (Strncpy doesn't exist, `buf'
was an array of pointers rather than of char).  Simplify it substantially,
and adjust the one caller (vms) that relied on the old convoluted bit.

18 years agodrum of earthquake follow-up
nethack.allison [Fri, 14 Apr 2006 17:01:18 +0000 (17:01 +0000)]
drum of earthquake follow-up

18 years agocode change - oextra
nethack.allison [Fri, 14 Apr 2006 16:23:56 +0000 (16:23 +0000)]
code change - oextra

move oattached and oname and other things that vary
the size of the obj structure into a separate
non-adjacent oextra structure, similar to what has
already been done for mextra. The obj structure
itself becomes a fixed size.

New macros:

#define ONAME(o) ((o)->oextra->oname)
#define OMID(o) ((o)->oextra->omid)
#define OMONST(o) ((o)->oextra->omonst)
#define OLONG(o) ((o)->oextra->olong)
#define OMAILCMD(o) ((o)->oextra->omailcmd)

#define has_oname(o) ((o)->oextra && ONAME(o))
#define has_omid(o) ((o)->oextra && OMID(o))
#define has_omonst(o) ((o)->oextra && OMONST(o))
#define has_olong(o) ((o)->oextra && OLONG(o))
#define has_omailcmd(o) ((o)->oextra && OMAILCMD(o))

changed macros:
has_name(mon) becomes has_mname(mon)  to correspond.

The CVS repository was tagged with
NETHACK_PRE_OEXTRA
before commiting these, and
tagged with
NETHACK_POST_OEXTRA
immediately after. The diff
between those two tags is this oextra patch.

The associated mail daemon changes to use an oextra
structure instead of a hidden command located in the
name after the terminating NUL, have not been tried
or tested.

18 years agohostile prisoner chat
nethack.allison [Fri, 14 Apr 2006 15:26:45 +0000 (15:26 +0000)]
hostile prisoner chat

<email deleted> wrote:
> * #chatting to hostile prisoners gives "This will teach you not to disturb me!"
> This only makes sense for djinn and water demons.

I don't have a clue what they should say, this only deals with
what they shouldn't say.

18 years agodrum of earthquake - monster portion
nethack.allison [Fri, 14 Apr 2006 14:33:01 +0000 (14:33 +0000)]
drum of earthquake - monster portion

<Someone> wrote:
> When applying a drum of earthquake, should you "fall into a chasm" if
> you're already at the bottom of a pit? (Likewise monsters.)

monster already in a pit won't "fall into a chasm" from drum of earthquake

18 years agodrum of earthquake - hero portion
nethack.allison [Fri, 14 Apr 2006 13:53:33 +0000 (13:53 +0000)]
drum of earthquake - hero portion

<Someone> wrote:
> When applying a drum of earthquake, should you "fall into a chasm" if
> you're already at the bottom of a pit? (Likewise monsters.)

hero already in a pit won't "fall into a chasm" from drum of earthquake

18 years agomunstone fixes (trunk only)
nethack.rankin [Thu, 13 Apr 2006 07:10:48 +0000 (07:10 +0000)]
munstone fixes (trunk only)

     From a bug report, a monster who eats a lizard
corpse in order to cure confusion was treated the same as one who did so
to cure petrification, losing intrinsic speed in the process.  In the same
report by <l>, monsters wouldn't eat lizard corpses to cure being stunned,
and those who ate them for another reason weren't cured of stunning, even
though the hero gets that benefit.  While fixing those, I added some code
to let monsters who are carrying tins of lizard or acidic monster use them
if they're also carrying a tin opener, dagger, or knife.  I don't think
any monsters except for nymphs are willing to pick up tins, so it won't
have much effect.  It now works for nymphs though.

     Examining the code while testing showed that mon_consume_unstone()
has been accessing the potion (acid) or corpse (lizard or acidic monster)
after the item had been used up, so that has been fixed too.  I never saw
any detectable problems due to this, but folks using a debugging malloc
implementation which overwrites freed memory may have not been suffering
collateral acid damage or receiving intended confusion cure, or perhaps
did get either or both of those effects when they shouldn't have.  Since
it only applied to monsters it wouldn't have been easy to observe.

18 years agodon't reveal surface when Blind and levitating
nethack.allison [Tue, 11 Apr 2006 02:00:38 +0000 (02:00 +0000)]
don't reveal surface when Blind and levitating

<email deleted> wrote the following on April 10, 2006:
> When blind and levitating, you can produce a message - "You try to feel what
> is lying here on the ice. But you can't reach it!" - which reveals too much
> about the terrain below you.

18 years agodigging land mines & bear traps (trunk only)
nethack.rankin [Sat, 8 Apr 2006 06:55:15 +0000 (06:55 +0000)]
digging land mines & bear traps (trunk only)

     <Someone> suggested that digging down on a land mine with a pick-axe ought
to set if off.  I agree; this implements that and also for bear traps.  In
the bear trap case, if you dig down once trapped, you will destroy that
trap explicitly rather than replace it with a pit, so it's now possible to
escape from one without leaving another trap in your wake.  Once the bear
trap is gone, further digging there will make a pit as usual.  While stuck
in one, digging down poses a modest risk of harming yourself.

|You now wield a pick-axe.
|You start digging downward.  A bear trap closes on your foot!
|You start digging downward.  You destroy the bear trap with your pick-axe.
|You continue digging downward.  You dig a pit in the floor.
|You start digging downward.  You dig a hole through the floor.
|You fall through...

[It seems a bit strange that finishing a pit discards all digging context,
so that resuming within the pit in order to make a hole "starts" digging
rather than "continues" it.]

     Digging down with a wand or spell will disarm these two types of traps
and then leave the corresponding object (which may or may not fall through
the resulting hole, like any other object there).  Digging to the side via
magic while trapped in a pit will also disarm such traps when it encounters
them.  (When not in a pit, a digging beam which simply passes over an armed
bear trap or land mine won't have any effect on the trap.)  Digging to the
side via tool behaves somewhat oddly ("no room for the rubble"?) and will
probably need some tweaking before eventual release; at present it doesn't
reach adjacent traps so didn't need any land mine or bear trap handling.

     I put the fixes entry in the new features section.

18 years agosilver vs poly'd hero (trunk only)
nethack.rankin [Thu, 6 Apr 2006 05:57:50 +0000 (05:57 +0000)]
silver vs poly'd hero (trunk only)

     <Someone> reported that thitu() was adding d20 damage for silver object
hitting silver-hating hero even though all the callers were using dmgval()
which also does that, resulting in doubled silver bonus/penalty.  This
fixes that (including for boomerangs thrown by player, which weren't using
dmgval(), to handle a hyptothetical silver boomerang).  While testing it,
I noticed that there was no "the silver sears your flesh" message when a
monster hit you with a wielded silver weapon, so this fixes that too.
(How did we miss that?  And how did <Someone>? :-)

18 years agoautopickup during failed #untrap attempt (trunk only)
nethack.rankin [Thu, 6 Apr 2006 04:55:07 +0000 (04:55 +0000)]
autopickup during failed #untrap attempt (trunk only)

     From a bug report, moving into a trap
during a failed untrap attempt didn't autopickup any objects there or
report about objects which aren't picked up.  Although that appears to have
been intentional, change move_into_trap() to behave more like a regular
move.  (I wrote this bit of code and don't remember whether the no pickup
aspect was deliberate; I suspect it might have been to avoid the redundant
"there is a trap here" message which you get when pickup checking is done
but not everything on the spot gets picked up.  This patch suppresses that
message.)

18 years agomain() reorganization (trunk only)
nethack.rankin [Sun, 2 Apr 2006 07:35:30 +0000 (07:35 +0000)]
main() reorganization (trunk only)

     Move some internals-related code out of port-specific main so that
it isn't duplicated a bunch of times.  One minor side-effect of this
change is that if you auto-pickup something at the very start of a game,
it will happen after any full moon/new moon/Friday 13th message rather
than before.  There's a second change for some:  the shared main() used
by several of the micro ports had a small difference in game play--if you
saved a game while on an engraving, it would automatically be read when
you resume--that will now occur for everybody [Elbereth weenies rejoice!].
pcmain() was also calling update_inventory() at start of play.  That's
unnecessary for new games, where inventory initialization triggers a call
to it for each item added to your pack; but I wasn't sure about restored
games, so everybody gets it there now.

     The Mac and BeOS ports evidently haven't been touched it some time;
they still referenced flags.move which got replaced by context.move quite
a while back.  The Windows GUI code has a declaration for mswin_moveloop()
which appears to be non-existant, but I left it alone.  I assume that the
Qt interface uses the existing main() routines; at least I couldn't find
any start of game code specific to it.  vmsmain's revised main() is the
only one which has been tested.

18 years ago#terrain (trunk only)
nethack.rankin [Sat, 1 Apr 2006 05:48:55 +0000 (05:48 +0000)]
#terrain (trunk only)

     I've been using this for a while; it is occasionally handy.  #terrain
is a new wizard mode command which brings up a text display where the map
topology is revealed, similar to the obscure #wmode command but showing
different information.  Also, #wmode has been tweaked a little so as to
actually overlay the tty-mode map exactly, rather than being off by one
line and one column.  (That shouldn't really matter for other windowing
schemes where the map and a text rendition of it aren't very likely to
have a given location be displayed at the exact same screen position.)

     The line of formatted flags info below the terrain display probably
belongs in a separate debugging command altogether where it wouldn't have
to be displayed in such a terse fashion.

18 years agoshattering monster's weapon stack
nethack.rankin [Thu, 30 Mar 2006 05:52:28 +0000 (05:52 +0000)]
shattering monster's weapon stack

     Something I encountered while playing slash'em a while back, but
relevant to nethack:  "Its orcish spears shatter from the force of your
blow!".  I was using a two-handed weapon (at skilled or expert level) to
fight an invisible monster which was wielding a stack of multiple spears
(slash'em gives them out in groups of 3 for monsters' starting inventory).
After killing it, I found 2 orcish spears along with an invisible corpse
of somebody-or-other the Kobold King.  The message suggested that the
whole spear stack had been destroyed (and the weapon shattering code in
hmon_hitmon() clearly expects that to be the case), but only one of them
had actually gotten used up.

     I can't recall whether "shatter" was actually given as singular or
plural at the time; nethack handles that aspect correctly.  Only object
destruction needed tweaking.

18 years agoswallowed time (trunk only)
nethack.rankin [Tue, 28 Mar 2006 04:57:40 +0000 (04:57 +0000)]
swallowed time (trunk only)

     From a bug report, making engulf time longer for high AC
didn't make sense for non-digestion attacks:  taking longer to die from
being digested (high AC lets you last longer there) is much different from
being stuck inside a vortex or elemental and suffering extra buffettings
or whatever.  Calculate swallow time differently for non-digestion than
for digestion.  (The adjustment based around level 25 doesn't make much
sense either, but I left that in.)

     If you survive total digestion via life saving, you get a message
about the monster not liking your taste.  I don't think that's appropriate,
but haven't tried to figure out how to fix it.

18 years agoeating gold in front of the vault guard (trunk only)
nethack.allison [Sun, 26 Mar 2006 05:23:46 +0000 (05:23 +0000)]
eating gold in front of the vault guard (trunk only)

<email deleted> wrote:
> Eating gold in a vault (or polymorphing a pile of gold into 1 gold piece)
> doesn't anger the guard.

This addresses the eating part of that report, but the hero
has to get caught doing it.

18 years agowording bit in fixes35.0
nethack.allison [Sun, 26 Mar 2006 03:56:37 +0000 (03:56 +0000)]
wording bit in fixes35.0

18 years agoclear pits in temporary corridor
nethack.allison [Sun, 26 Mar 2006 03:52:46 +0000 (03:52 +0000)]
clear pits in temporary corridor

From a bug report, then leave the corridor (causing it to
> vanish), the pit will be embedded in rock instead of being removed.

clear any pits that the hero digs in the vault guard's temporary corridor

18 years agoprevent possible minor MAIL abuse
nethack.allison [Sat, 25 Mar 2006 21:06:49 +0000 (21:06 +0000)]
prevent possible minor MAIL abuse

<email deleted> wrote:
> * MAIL Abuse: one can polymorph into a gelatinous cube, send themselves lots of
> scrolls of mail, and eat them, gaining free nutrition.

18 years agodigging conjoined pits follow-up (trunk only)
nethack.allison [Sat, 25 Mar 2006 18:59:53 +0000 (18:59 +0000)]
digging conjoined pits follow-up (trunk only)

Pat Rankin wrote:
>      Isn't an array of booleans overkill?  A single byte bitmap
> could achieve the same result.

18 years agovms Makefile bit
nethack.rankin [Sat, 25 Mar 2006 05:22:56 +0000 (05:22 +0000)]
vms Makefile bit

Old copy/paste typo.  This alternate target obviously doesn't get much use.

18 years agowizard mode level teleport (trunk only)
nethack.rankin [Sat, 25 Mar 2006 05:16:24 +0000 (05:16 +0000)]
wizard mode level teleport (trunk only)

     Responding with '?' to the "what level?" prompt when using ^V in
wizard mode brings up a menu of special level destinations that lets you
move across dungeon branches.  But getting in and out of Fort Ludios
didn't work, and jumping to the endgame forced you to arrive on the Plane
of Earth.  Now Fort Ludios will not be selectable in the menu until after
the portal ordinarily used to reach it has been created (so you'll need a
level between Bigroom and Medusa with a vault on it to be created before
you can bypass the magic portal and jump directly to the Fort), and you
can go directly to any of the elemental planes, including Astral, without
stopping at Earth first (the Wizard will be there to greet you, whichever
level you pick).  Also, this limits the menu to endgame entries once you
are in the endgame.  (Previously, picking a non-endgame level would yield
"you can't get there from here"; you can still get that, if you really
want to see it for some reason, by giving a destination level number
outside the range of -1 to -5 instead of using the menu.)

     I hadn't realized that this feature has been around since 3.4.2 until
I couldn't find any new feature entry for in the current fixes file....

18 years agochameleon/genocide fix (trunk only)
nethack.rankin [Sat, 25 Mar 2006 04:43:07 +0000 (04:43 +0000)]
chameleon/genocide fix (trunk only)

     While testing some pending teleport changes, I was baffled by having
my adjacent pet sometimes vanish when accompanying me on a level teleport.
Tracing through parts of execution:  keepdogs() kept it; losedogs() called
mon_arrive() which called place_monster() for it, but then right after that
kill_genocided_monsters() removed it.  Turns out that `kill_cham' was left
uninitialized for the first iteration through the fmon loop (and pet had
always just been inserted as first entry of the fmon list).

     No fixes entry; this revises a post-3.4.3 revision.

18 years agodigging conjoined pits (trunk only)
nethack.allison [Sun, 19 Mar 2006 23:59:03 +0000 (23:59 +0000)]
digging conjoined pits (trunk only)

This one turned out to be more effort than I had
originally anticipated.

We had a bug report requesting that zapping a wand of digging
laterally while in a pit should dig beside you. That seemed
like a reasonable enough request, but this ended up with
the following results:
- needed to check where this should not be permitted, or at
  least where there should be special-case code because there is
  something such as furniture on the surface above the dig
  point.
- now tracks conjoined pits through new fields in the trap
  structure, hence the pathlevel increment. The array of
  8 boolean values represents each of the 8 directions
  around a pit.
- Previously, pits could be adjacent to each other as two
  individual pits, in which case moving between them
  results in a fall as you went into the next pit. That
  behavior is preserved.
- Pits created either by zapping a wand of digging
  laterally while in a pit, or by "clearing debris"
  between two adjacent pits via a pick-axe, sets the
  conjoined fields for those two pits. You cannot
  create a brand new adjacent pit via pick-axe, only
  with the wand.
- The hero can pass between conjoined pits without
  falling.
- dighole() was hijacked for adjacent pit digging,
  so the ability to pass coordinates to it and
  its downstream functions was added (dig_up_grave()
  for example). dighole() does pretty much everything
  appropriately for this adjacent digging, more so
  than calling digactualhole() directly.
- moving into a conjoined pit that has spikes still
  does damage, but less so that "falling" into the
  spiked pit, and you "step on" the spikes rather
  than falling into them.
- Not done: should pits with the conjoined fields
  set be referred to as 'trenches' rather than pits
  in messages and identifications?

18 years agodigactualhole() bit
nethack.allison [Sun, 19 Mar 2006 23:13:11 +0000 (23:13 +0000)]
digactualhole() bit

I'm pretty sure this check at_u should be included since x,y
can be passed to digactualhole().  The lack of any related
bug reports suggest that at_u is currently always
true for any code that calls digactualhole().

18 years agodungeon tidbit
nethack.rankin [Sun, 19 Mar 2006 06:48:47 +0000 (06:48 +0000)]
dungeon tidbit

     Nothing actually uses the s_level.flags.rogue_like flag, but since the
dungeon compiler is prepared to handle it we might as well have it do so.

18 years agoleather spellbook build warning cleanup
nethack.allison [Fri, 17 Mar 2006 17:42:36 +0000 (17:42 +0000)]
leather spellbook build warning cleanup

The tile was not adjusted for the leather -> leathery change.

18 years agocancelled nurse #chat
nethack.allison [Tue, 14 Mar 2006 23:53:22 +0000 (23:53 +0000)]
cancelled nurse #chat

On May 17, 2005, <email deleted> wrote:
> Cancelled nurses shouldn't say "Relax, this won't
> hurt a bit."

18 years agoremove hard-coded cmd letters in feedback (trunk only)
nethack.allison [Sun, 12 Mar 2006 05:36:34 +0000 (05:36 +0000)]
remove hard-coded cmd letters in feedback (trunk only)

18 years agochameleon behaviour
nethack.allison [Sun, 12 Mar 2006 04:43:28 +0000 (04:43 +0000)]
chameleon behaviour

- restore intended behaviour of kill_genocided_monsters().
  It has been incorrect since  the chameleon overhaul in June 2004.
- eliminate CHAM_ORDINARY and use NON_PM instead.

18 years agofilling antholes
nethack.rankin [Thu, 9 Mar 2006 05:39:38 +0000 (05:39 +0000)]
filling antholes

     From a bug report:  when creating a
level, anthole rooms can be generated even when no ants are left, unlike
beehives which get suppressed once killer bees are gone.  Also, if some
ants are available but the type chosen for the current level isn't (in his
case, soldier ants had been genocided), the anthole was filled will random
monsters instead of picking another type of ant.  This fixes both issues.
Random monsters will only occur if the last type of ant gets used up while
filling an anthole that was started when some ants were available, same as
how monster generation for beehives and barracks works.

18 years agowand of locking message (trunk only)
nethack.allison [Wed, 8 Mar 2006 23:08:25 +0000 (23:08 +0000)]
wand of locking message (trunk only)

<email deleted> wrote:
> BUGS TO REPORT:
>
> * Zapping a wand of locking at an open door with an object on it probably
> shouldn't give a "Something's in the way." message - especially if the wand is
> unidentified.

avoid "Something's in the way" message with unidentified wand of locking

19 years agobroken wand of striking vs door (trunk only)
nethack.allison [Tue, 7 Mar 2006 03:10:58 +0000 (03:10 +0000)]
broken wand of striking vs door (trunk only)

<email deleted> wrote:
> * Doors absorb the blast of a broken wand of striking. What's more, the message
> reads "The door absorbs your bolt!" rather than "blast".

passes wand type to explode() as a negative value for the case
where the wand type isn't mapped to an AD_* explosion type.

Then explode() converts it to a positive and passes it to zap_over_floor().

19 years agomagicbane grammar
nethack.allison [Mon, 6 Mar 2006 04:11:36 +0000 (04:11 +0000)]
magicbane grammar

I don't know for sure what all the possible values of hittee passed to
Mb_hit() are, but this checks to see if it matches the name of the
mdef monster and forces the word "is" if it does.

19 years agoconfused scroll of light follow-up (trunk only)
nethack.allison [Sat, 4 Mar 2006 13:25:59 +0000 (13:25 +0000)]
confused scroll of light follow-up (trunk only)

Provide an opportunity to name the scroll when known is not set

19 years agominor scroll overhaul (trunk only)
nethack.rankin [Sat, 4 Mar 2006 06:11:11 +0000 (06:11 +0000)]
minor scroll overhaul (trunk only)

     The recently revised scroll of charging left out making it become
discovered.  When fixing that I decided to remove all the early returns
from seffects(), so that its logic is easier--at least for me--to follow.
I think the return values of seffects(), chwepon(), and the various
xxx_detect() routines are backwards (True denotes failure, False indicates
success), but they're all consistent with each other so I left those alone.

19 years agoluck confusion
nethack.rankin [Thu, 2 Mar 2006 05:54:04 +0000 (05:54 +0000)]
luck confusion

     Remove a couple of false comments about Luck, and an unreachable
switch case based upon them.  I don't know if the comment in you.h was ever
true, but it was false by the time Kevin brought across assorted changes
from slash'em however many years ago.  Full moon does not change the range
of possible Luck values, and ``rn2((Luck + 6) >> 1)'' produces a value
between 0 and 8 for prayer result, never 9.  Natural luck is always within
the range of -10 to +10, and extra luck from carrying blessed or cursed
luckstone can add or subtract another 3.  Full moon and Friday the 13th
change the equilibrium point for luck timeout but do not change the overall
range of possible values, which remains at -13 to +13.

19 years agodoorless doorways (trunk only)
nethack.rankin [Tue, 28 Feb 2006 05:21:57 +0000 (05:21 +0000)]
doorless doorways (trunk only)

     Simplify some door checks.  No change in game behavior.

19 years agotypo
nethack.allison [Sun, 26 Feb 2006 18:17:26 +0000 (18:17 +0000)]
typo

19 years agomake disappearing scroll trick trunk only
nethack.allison [Sun, 26 Feb 2006 00:40:13 +0000 (00:40 +0000)]
make disappearing scroll trick trunk only

19 years agohero location bookkeeping bit
nethack.rankin [Sat, 25 Feb 2006 06:48:52 +0000 (06:48 +0000)]
hero location bookkeeping bit

     On the first move of the game and the first move after each level
change, the "previous position's coordinates" <u.ux0, u.uy0> had bogus
values:  zero at start, last location on old level otherwise.  They're
never used to undo a level change, so the last location on the old level
isn't interesting.  Set them to match current location, as if you'd just
rested on the new spot.  I'm not aware of any bugs attributable to this.

19 years agodisappearing scroll trick
nethack.allison [Sat, 25 Feb 2006 00:43:39 +0000 (00:43 +0000)]
disappearing scroll trick

<email deleted>
> * When you read a charging scroll, it "disappears", but when you are
> selecting the object to charge, the scroll itself remains in your
> inventory listing until you make your selection.

19 years agotame hidden monster message
nethack.allison [Fri, 24 Feb 2006 02:54:58 +0000 (02:54 +0000)]
tame hidden monster message

<email deleted> wrote:
> * Searching next to a tame hidden monster gives the message "You find a
> <kraken>." It should be "your <kraken>."

While I don't consider this a bug, the change seems appropriate.

19 years agoleather spellbook revisited
nethack.rankin [Thu, 23 Feb 2006 05:10:21 +0000 (05:10 +0000)]
leather spellbook revisited

     Change the description of leather spellbook to leathery.  Eating it
does not violate vegan or vegetarian conduct.  [By shear coincidence, I got
``Blecch!  Rotten paper!'' for it while testing this.]

19 years ago[baby] long worms
nethack.rankin [Tue, 21 Feb 2006 06:32:53 +0000 (06:32 +0000)]
[baby] long worms

     Between the addition of worm body parts and the phrasing of engulfing/
digesting status, I remembered an oddity with the vanquished monster list:
it shows baby long worms right next to adult long worms; both were defined
as level 8 monsters.  It also turns out that babies dealt more damage per
attack than adults; that was counterintuitive, to put it mildly.  Boost
long worms from level 8 to 9; drop baby long worms from level 8 to 5, half
rounded up just like the relationship between baby and adult purple worms
(who are levels 8 and 15, respectively).  And increase the damage for adult
long worm attack (was 1d4, now 2d4); drop it for baby (was 1d6, now 1d4).

19 years agofix part of #H43 - probing feedback when engulfed
nethack.rankin [Tue, 21 Feb 2006 06:07:22 +0000 (06:07 +0000)]
fix part of #H43 - probing feedback when engulfed

     From a bug report, feedback of the form

Status of the fog cloud (neutral):  Level 2  HP 5(5)  AC 0, engulfed you.

sounds odd.  "Engulfing you" seems a little odd as well, since the engulf
has already taken place, but I think it works out better.  For symmetry,
replace "swallowed you" by "swallowing you".  But that one will never
occur, because all the animals with engulfing attacks will now yield the
more precise and much more significant "digesting you".

     The code formatting is strange.  Lining up the text parts works out
a lot better than attempting to fit the associated tests within the space
left after the large indentation being used.

19 years agoleather spellbook
nethack.allison [Tue, 21 Feb 2006 03:28:57 +0000 (03:28 +0000)]
leather spellbook

<Someone> wrote:
> * Eating a leather spellbook doesn't violate
> vegetarian conduct. I suggest you rename it to
> something else. (May I suggest "bark"?) Also, I refuse
> to consider "leather" to be a colour or texture.
> * While as a water nymph in water, seducing an unseen
> monster on dry land sometimes gives away its identity.
> * When submerged iron golem monsters residually
> "rust", and the rust damage kills them, it doesn't
> report their death.
> * Drum of Earthquake says "the entire dungeon shakes
> around you" even when you're in the Endgame or the
> Quest's top level.
> * Wishing for a statue of a guard, then destoning it,
> then chatting to it, makes it say "drop that gold"
> without context. This could probably be extended to
> other cases, too (like Croesus?)

This corrects only the first complaint in the list above.

19 years agoGuidebook update - thank you to Ron Van Iwaarden
nethack.allison [Mon, 20 Feb 2006 00:01:49 +0000 (00:01 +0000)]
Guidebook update - thank you to Ron Van Iwaarden

19 years agoconfused scroll of light
nethack.allison [Sun, 19 Feb 2006 23:28:38 +0000 (23:28 +0000)]
confused scroll of light

Implement the following suggestion by <email deleted>
- Reading a scroll of light while confused should
create a hostile yellow light (black light if cursed).

It only creates the light monster effect 1 out of 5 times.

19 years agofinish a trailing sentence in a comment
nethack.allison [Sun, 19 Feb 2006 22:44:06 +0000 (22:44 +0000)]
finish a trailing sentence in a comment

19 years agofixes35.0 update
nethack.allison [Sun, 19 Feb 2006 22:40:52 +0000 (22:40 +0000)]
fixes35.0 update

19 years agofrying water elementals
nethack.allison [Sun, 19 Feb 2006 22:35:23 +0000 (22:35 +0000)]
frying water elementals

Subject: Some problems to report!
Date: Tue, 17 May 2005 07:01:40 -0700 (<email deleted>
<email deleted>

[...]
- When polymorphed into a water elemental, falling
into lava still says "you burn to a crisp."
[...]

19 years agoanatomy bits
nethack.allison [Sun, 19 Feb 2006 21:57:54 +0000 (21:57 +0000)]
anatomy bits

Subject: Some problems to report!
Date: Tue, 17 May 2005 07:01:40 -0700 (<email deleted>
<email deleted>

Hi. I'm a sourcediver but not a source compiler.
I use the Mac carbon port under Mac OS X. But enough
about me; I noticed these things:

Polyself/Anatomy Bugs:

- Mimics are amorphous, so they should have jelly
parts rather than animal parts.
- Piercers, trappers and lurkers above have animal
parts, including "head," but they are M1_NOHEAD.
- All elementals have vortex body parts. This should
only be the case for air elementals.
(Remember: stalkers, unlike the other elementals, have
heads.)
- Krakens ought to have tentacles, like jellyfish. ("A
gush of water hits the kraken's left fin!")
- Worms have snake body parts, but they shouldn't have
scales.
[...]

 This patch:
- adds worm_parts
- gives krakens tentacles
- ensures that stalkers have a head

19 years agoscroll of identify fix (trunk only)
nethack.rankin [Sun, 19 Feb 2006 05:47:57 +0000 (05:47 +0000)]
scroll of identify fix (trunk only)

     My recent patch included a typo in a pline() call which broke compile,
and much worse, was accessing scroll of identify after using it up.  Cache
scroll->otyp, scroll->blessed, and scroll->cursed instead of re-re-ordering
the identify scroll/spell code.

19 years agolatent level arrival message bug (trunk only)
nethack.rankin [Thu, 16 Feb 2006 07:35:00 +0000 (07:35 +0000)]
latent level arrival message bug (trunk only)

     Something I noticed during a level change in slash'em:
        You hear the sounds of civilization.  You fly down the stairs.
The first message ought to follow the second.  Our only arrival messages
that are handled via the special level loader occur in the endgame where
travel is by magic portal, and the transit message given for portals is
for entering one rather than exiting at the far side, so this sequencing
problem can't currently be noticed in nethack.  But sooner or later there
will be levels reachable by stairs and having entry messages, or there'll
be some feedback added when magic portal transport finishes, and then we'd
get bitten by this.

     Tested by adding an arrival message to each of the bigroom variants.

19 years agoscroll usage; also spell of ID (trunk only)
nethack.rankin [Thu, 16 Feb 2006 06:47:02 +0000 (06:47 +0000)]
scroll usage; also spell of ID (trunk only)

[I neglected to commit the invent.c part of previous patch.]

19 years agoscroll usage; also spell of ID (trunk only)
nethack.rankin [Thu, 16 Feb 2006 06:44:24 +0000 (06:44 +0000)]
scroll usage; also spell of ID (trunk only)

     Make a not-very-robust fix for the report from <email deleted> about
being told a scoll disappears as you read it, then for the case of cursed
remove curse being told that the scroll disintegrates.  He missed similar
case for scroll of fire erupting into flames after it had disappeared.
This suppresses the "disappears" part of the scroll reading message for
those two cases, but won't be very reliable if other scroll messages
referring to the scroll itself get introduced in the future.  [Several
paths through scroll of fire won't report that it burns, and now it doesn't
give the disappears message any more.  I don't think that's worth worrying
about; the scroll leaving inventory after burning up is implicit.]

     Also cut down on redundant feedback for several scrolls (genocide,
charging, identify, stinking cloud) that start off by informing the player
what they are.  That's only needed when the the player doesn't already
know the type of scroll.  I've always felt it silly to be told that I've
"found a scroll of genocide" when I'm intentionally reading a known scroll
of genocide.  All these types of scroll give a subsequent prompt which
makes them recongizable if you somehow manage to choose the wrong object
when picking the one to read.

    Lastly, make spell of identify behave like ordinary uncursed scroll of
identify by default instead of ususally ID'ing multiple items.  Now you'll
need to be skilled or better in divination spells skill in order to get the
blessed scroll effect out of it.  And give some feedback if the spell is
cast when not carrying any inventory; it was just silently moving on to the
user's next command in that case.

19 years agoghoul fodder (trunk only)
nethack.rankin [Tue, 14 Feb 2006 05:27:16 +0000 (05:27 +0000)]
ghoul fodder (trunk only)

     I doubt if many players in nethack ever have pet ghouls (in slash'em
they're the necromancer's starting pet), but if so, provide them with a
portable food source by letting ghouls eat dead eggs in addition to tainted
corpses.  Also, let them eat fresher varieties of either when they're about
to starve to death.  Treat lizard & lichen corpses as always fresh since
they never become tainted (probably ruining slash'em necromancers' present
pet food of choice, though they'll still be able to eat lizard corspes if
starving).

     I set the omnivore flag in their monster definition.  Previously they
had been left as non-eaters despite the fact that they need to eat.  When
the flag wasn't set, a hero who poly'd into one and then put on an amulet of
unchanging could go a very long time (thousands of turns) before the hunger
imposed by wearing an amulet finally made him/her become hungry.  (Same as
with any other truely non-eating monster, so not really a big deal.)

     Also, avoid the expression &mons[obj->corpsenm] for objects where the
corpsenm field isn't applicable, in case the default value ever changes from
0 (PM_GIANT_ANT) to NON_PM (-1).