]> granicus.if.org Git - nethack/log
nethack
18 years agofix #H177 - mimicking gold while hallucinating (trunk only)
nethack.rankin [Sat, 19 Aug 2006 05:29:16 +0000 (05:29 +0000)]
fix #H177 - mimicking gold while hallucinating (trunk only)

     From a bug report, having hallucination time out while
mimicking an orange (instead of gold, after eating a mimic corpse), you'd
still get the hallucinatory end-of-mimicking message about not wanting to
be peeled.  If hallucination state is toggled, update the pending message
and change the hero's appearance.  In practice, only the orange-to-gold
case can occur.  Anything which might trigger gold-to-orange will have
terminated the hero's mimickery befort that happens.

18 years agofix grab/engulf by tame/peaceful monster (trunk only)
nethack.rankin [Thu, 17 Aug 2006 04:35:08 +0000 (04:35 +0000)]
fix grab/engulf by tame/peaceful monster (trunk only)

     <Someone> reported being swallowed by his pet purple worm during
Conflict, then being stuck inside once Conflict ended.  I'm not entirely
sure what dog_move() intended by the "swallowed case handled above" comment.
It returns without letting the pet move when the distance between pet and
hero is 0; that wasn't much in the way of "handling" being swallowed.
Grabbing pets did let go, but peaceful monsters didn't until you actually
attempted to move away from them.  Now all four combinations (grabbed or
swallowed by tame or peaceful monster) are handled the same:  the monster
will let the hero go next time it gets a chance to try to move, using up
its move in the process.

18 years agofix #H167 - entering monster filled level
nethack.rankin [Sun, 13 Aug 2006 06:03:23 +0000 (06:03 +0000)]
fix #H167 - entering monster filled level

     When the hero arrives on a level and a monster at his destination can't
be relocated to make room for him, goto_level() would place the hero on top
of the monster.  From a bug report, who said that the
game panicked (without providing specifics, at least so far).  I wasn't able
to reproduce a panic but get a pair of impossible warnings and can confirm
that there is a monster on the same spot as the hero, which could easily
lead to strangeness depending upon what actions the monster attempts to
perform.  This fix causes a non-relocateable monster in that situation to
be moved to the migrating monsters list for later arrival back on that same
level.  That's inconsistant with the migrating monster arrival routine,
which kills off any monster it can't place; I'm not sure which action is
more reasonable, deferred arrival or outright removal.

     There are three or four dozen ``(void) rloc(mon)'' calls which don't
do anything special when rloc fails to move the monster.  Those need to be
reviewed and the ones where it's making a space for some other monster have
to do something about failure.  (Failed teleport attempts can simply leave
the monster in place, so most of those calls won't need any extra handling.)

18 years agoshopkeeper/temple priest teleporting (trunk only)
nethack.rankin [Thu, 10 Aug 2006 00:45:32 +0000 (00:45 +0000)]
shopkeeper/temple priest teleporting (trunk only)

     Forwarded from the newsgroup by <Someone>:  temple priest might
abandon his post via teleport if conditions are obscure enough.  Change
rloc_pos_ok() to only accept spots inside the same shop or temple when a
shopkeeper or temple priest is teleported to a random destination.  rloc()
tries rloc_pos_ok() 500 times before reverting to goodpos(), so this will
usually succeed for a large room; it may fail for a small one (reverting
to the current behavior, more or less).  Shopkeepers or priests who get
polymorphed into a critter which teleports to the stairs when in need of
healing will still leave their shop or temple if wounded (no change).

     Priests resist if the player tries to teleport them, but shopkeepers
don't.  So for direct attack by the player, this only affects shopkeeper
destination.  But it affects both types as far as being hit by quantum
mechanics (probably caused by player's use of conflict) or if polymorphed
into monsters which steal and then flee (again, probably caused by the
player since those strong monsters won't voluntarily polymorph).

18 years agocomment typo
nethack.rankin [Wed, 9 Aug 2006 23:40:28 +0000 (23:40 +0000)]
comment typo

18 years agofix #H164 - boulder pushing bug (trunk only)
nethack.rankin [Wed, 9 Aug 2006 23:27:29 +0000 (23:27 +0000)]
fix #H164 - boulder pushing bug (trunk only)

     From a bug report...):  pushing a boulder onto a level teleporter trap
could repeat the
  You push the boulder and suddenly it disappears!
message.  That would happen whenever the teleport destination was the same
as the current level (20% chance).  The boulder wasn't being moved onto the
trap location so was still present when the pushing code tried to handle
the next one in the pile.  I've changed so that pushing stops whenever a
pushed boulder is affected by a trap, and also so that the boulder gets
moved as usual when a level teleporter fails to send it somewhere.

     I've always thought it's pretty strange that pushing ever operates
on more than one boulder in the same turn in any situation, but I haven't
changed that for the non-trap cases.  (Usually the first boulder pushed
ends up blocking the second one, so you get a "you try to move it, but
in vain" message which seems odd since you just moved one.  But if there's
a pool of water or lava in the path, you can actually push multiple
boulders successfully.)

18 years agomon vs mon attack message phrasing
nethack.rankin [Tue, 8 Aug 2006 05:08:23 +0000 (05:08 +0000)]
mon vs mon attack message phrasing

     From <Someone>:
  Pet picks up 8 spears.
  Pet wields 8 spears.
  Pet thrusts its spear at Foe.
The routine to handle a monster attacking the hero are already uses "mon
thrusts one of its spears" in this case, so make monster against monster
messages do the same.  Also, it's no longer necessary to save one monster
name before formatting another when using two monster names in the same
message, so switch to the more straightforward usage here.  (The Blind
check is needed in the mhitu case but not in the mhitm one, where it's
redundant because the caller has already verified that both monsters'
locations are visible, but I left it in.)

18 years agomore #H166 - quest locate level message
nethack.rankin [Sun, 6 Aug 2006 05:16:23 +0000 (05:16 +0000)]
more #H166 - quest locate level message

     More tweaking brought about by the report of falling through a
trapdoor above the quest locate level and landing below it (which won't
happen randomly any more, but can still be achieved via controlled level
teleport).  You don't get any message for the locate level when arriving
from below, and giving the full initial message if you manage to make a
return visit from above produces silly results.  This adjusts the logic
for delivering those messages; once you've been on the level, you won't
get the full initial message later even if it wasn't given the first time.
You will still get the shorter secondary message, up until the nemesis has
been killed.  (In some cases it might not make much sense since its wording
is based on the assumption that you've already seen the full message.)

     The handling for these messages will never be completely correct
unless the messages themselves are rewritten (and the result would
probably end up with really wishy-washy phrasing so there's not much point).
They assume that you'll be arriving via the stairs, even for the case where
you do come from above rather than unexpectedly from below, and they can
be misleading or confusing if you arrive someplace else.  We could improve
things by having alternate FIRSTLOCATE and NEXTLOCATE messages for use when
not on--or next to, for the case where a pet displaces your arrival--the
stairs.  But I'm not going to attempt to compose those.

18 years agofix #H166 - trapdoors on quest levels
nethack.rankin [Sun, 6 Aug 2006 05:13:22 +0000 (05:13 +0000)]
fix #H166 - trapdoors on quest levels

     From a bug report, it was possible
to fall from above the quest locate level to below it even though it has
nondiggable floors (hence no trapdoors or holes to pass through).  Since
the game can't verify that it is nondiggable (which could vary on a role
by role basis depending upon their quest descriptions) when it is not the
current level, restrict falling past it only when it hasn't been visited
yet.  Impose the same restriction for random level teleport.  This enforces
proper sequencing of the quest feedback, which was the more significant
thing that went wrong in the reported case (player finally got the full
locate level message on a return visit, when descending from above, after
having already cleared out that level on his way back up from falling).

     Once the locate level has been reached or passed, it is no longer a
barrier to falling or random teleport.  (When it is eventually visited,
there's no attempt to remember whether it allows holes, since that
information and the corresponding fall check would need to be extended to
every level in the dungeon.  Also, controlled teleport is still allowed to
bypass it even when it hasn't yet been visited, so the "enforces proper
sequencing" claim above is an exaggeration.)

18 years agorecover (trunk only)
nethack.allison [Fri, 4 Aug 2006 03:58:46 +0000 (03:58 +0000)]
recover (trunk only)

Bring recover process up to date with current save file contents
(self_recover and external recover)

18 years agofix #H158 - typo in monk data.base entry
nethack.rankin [Thu, 3 Aug 2006 04:00:07 +0000 (04:00 +0000)]
fix #H158 - typo in monk data.base entry

     From a bug report, the whatis description
for monks (a passage about a monk being invited to a meal) was using "month"
where "mouth" is clearly intended.  I think this came up a few years ago
when monk was first added and am not sure why it wasn't changed them, even
if it happens to be an accurate transcription from the quote's source.

18 years agomore set_corpsenm (trunk only)
nethack.allison [Sun, 30 Jul 2006 20:08:57 +0000 (20:08 +0000)]
more set_corpsenm (trunk only)

Use set_corpsenm() in a few more places.

18 years agowin32 makefile gui build with <email deleted> wrote:
nethack.allison [Tue, 18 Jul 2006 13:24:20 +0000 (13:24 +0000)]
win32 makefile gui build with <email deleted> wrote:
> Command line compile of tiled Nethack breaks, at the end, with an error:
>
> Linking....
>        link /DEBUG  /INCREMENTAL:NO /NOLOGO kernel32.lib
> ws2_32.lib mswsock.lib advapi32.lib bufferoverflowu.lib user32.lib
> gdi32.lib comdlg32.lib winspool.lib /STACK:2048 user32.lib
> winmm.lib  -out:..\binary\NetHackW.exe
> @NetHackW.lnk winhack.o : error LNK2019: unresolved external symbol
> __imp__InitCommonControlsEx@4 referenced
> in function <email deleted>

18 years agoinstall.nt clarification
nethack.allison [Sun, 16 Jul 2006 18:48:34 +0000 (18:48 +0000)]
install.nt clarification

18 years agofix #H148 - applying a pickaxe doesn't respect pushweapon
nethack.rankin [Sat, 15 Jul 2006 03:25:08 +0000 (03:25 +0000)]
fix #H148 - applying a pickaxe doesn't respect pushweapon

     From a bug report, applying a pick-axe will
wield it in place of the primary weapon but wouldn't update the alternate
weapon.  Make objects which become wielded when applied (pick, lamp, whip,
grappling hook, pole-arm) honor the pushweapon option (where the previously
wielded weapon becomes the alternate weapon without use of 'x' command) the
same as when explicitly wielded.  Old behavior matched the documentation,
but that seemed overly restrictive.

18 years agocast int64 to smaller types (trunk only)
nethack.allison [Tue, 11 Jul 2006 12:38:16 +0000 (12:38 +0000)]
cast int64 to smaller types (trunk only)

The devteam feedback was to place casts in the code
in question.

This puts explicit casts on some code that was being
compiled into 'int64' then stuffed into smaller types with
VC2005.

18 years agontconf vc2005 warnings bit
nethack.allison [Tue, 11 Jul 2006 12:29:51 +0000 (12:29 +0000)]
ntconf vc2005 warnings bit

18 years agorecent dead code(trunk only)
nethack.allison [Tue, 11 Jul 2006 12:28:19 +0000 (12:28 +0000)]
recent dead code(trunk only)

remove function zero_anything() completely, as it isn't needed any longer

18 years agounion bit (trunk only)
nethack.rankin [Tue, 11 Jul 2006 04:08:24 +0000 (04:08 +0000)]
union bit (trunk only)

     I'm pretty sure that some pre-standard compilers don't know how to
apply an initializer to a variable of type union.  Unfortunately, I don't
have access to one to check.  Fortunately, there's no need to explicitly
initialize `zeroany' since the default value is what we want--the first
field will be set to zero or null as appropriate (null in this case).

     Strictly speaking, this isn't adequate; what if long is wider than a
pointer rather than narrower?  Using `= {DUMMY}' didn't handle that case
either; the ordering of the union's fields controls which bits get stored.
As a practical matter, it should make no difference.  As long as the code
reading a union accesses the same field as the code writing that union set
up in it, anything in extraneous bits should be irrelevant--except perhaps
when a debugger tries to format things.  The whole issue has always been
implicitly based on the assumption that null pointers have all bits zero
in the first place; that's typical but not guaranteed.

18 years agomore dos bits
nethack.allison [Mon, 10 Jul 2006 02:10:22 +0000 (02:10 +0000)]
more dos bits

18 years agobits
nethack.allison [Sun, 9 Jul 2006 22:17:57 +0000 (22:17 +0000)]
bits

- catch up on a couple of DOS bits
- fix a copy-and-paste error on hack.c function

18 years agomore zeroany (trunk only)
nethack.allison [Sun, 9 Jul 2006 17:39:43 +0000 (17:39 +0000)]
more zeroany (trunk only)

18 years agoanother pointer to long conversion (trunk only)
nethack.allison [Sun, 9 Jul 2006 16:42:21 +0000 (16:42 +0000)]
another pointer to long conversion (trunk only)

botl.c conversions. All the ports seem to be using genl_status_update(),
rather than a window port specific version, so botl.c was the only place
this had to be adjusted.

Also a uudecode cast for the result of strlen, since it isn't using
config.h

18 years agozeroany [trunk only]
nethack.allison [Sun, 9 Jul 2006 16:25:39 +0000 (16:25 +0000)]
zeroany [trunk only]

Avoid function call when clearing 'anything' union.

18 years agoremove pointer to long conversions - part 3 of 3 (trunk only)
nethack.allison [Sun, 9 Jul 2006 01:23:26 +0000 (01:23 +0000)]
remove pointer to long conversions - part 3 of 3 (trunk only)

Remove some more code that forced pointers into a long int, and
vice versa where information could be lost (P64 platforms such as
WIN64 have a 64 bit pointer size, but a 32 bit long size.)

This 3rd part deals with region functions switching
some arguments from type genericptr_t to 'anything'.

Like the previous 2 parts, this needs to increment
 EDITLEVEL in patchlevel.h.

18 years agoremove pointer to long conversions - part 2 of 3 (trunk only)
nethack.allison [Sun, 9 Jul 2006 01:02:51 +0000 (01:02 +0000)]
remove pointer to long conversions - part 2 of 3 (trunk only)

Remove some more code that forced pointers into a long int, and
vice versa where information could be lost (P64 platforms such as
WIN64 have a 64 bit pointer size, but a 32 bit long size.)

This 2nd part deals with timeout functions switching
some arguments from type genericptr_t to 'anything'.

Like part 1, this needs to increment EDITLEVEL in patchlevel.h.

18 years agoremove pointer to long conversions - part 1 of 3 rev 2 (trunk only)
nethack.allison [Sat, 8 Jul 2006 23:31:39 +0000 (23:31 +0000)]
remove pointer to long conversions - part 1 of 3 rev 2 (trunk only)

[the problem in the earlier rev was tracked to cleanup_burn(),
where arg was holding a (genericptr_t) timer id, and
passed directly to del_light_source() as is.]

P64 (Win64) has a 64 bit pointer size, but a 32 bit long size.
Remove some code that forced pointers into a long int, and
vice versa where information could be lost.

This part deals with light source functions and their
arguments mostly, and switches some arguments
from type genericptr_t to 'anything'.

18 years agoback out part1 patch (trunk only)
nethack.allison [Sat, 8 Jul 2006 20:16:13 +0000 (20:16 +0000)]
back out part1 patch (trunk only)

I got an unexpected access violation since
checking in that patch, so I'm backing out the
change while investigating.

18 years agoremove pointer to long conversions - part 1 of 3 (trunk only)
nethack.allison [Sat, 8 Jul 2006 18:24:01 +0000 (18:24 +0000)]
remove pointer to long conversions - part 1 of 3 (trunk only)

P64 (Win64) has a 64 bit pointer size, but a 32 bit long size.
Remove some code that forced pointers into a long int, and
vice versa where information could be lost.

This part deals with light source functions and their
arguments mostly, and switches some arguments
from type genericptr_t to 'anything'.

18 years agopointer formatting (trunk only)
nethack.rankin [Sat, 8 Jul 2006 03:22:40 +0000 (03:22 +0000)]
pointer formatting (trunk only)

     Hide pointer formatting in alloc.c by eliminating the need for callers
to know how big a buffer is required.  I generally prefer the caller to
pass in its own buffer for this sort of thing, but in this case the usage
is almost entirely for debugging so using static buffers results in less
clutter in the rest of the code.

18 years agocompilation w/o WIZARD
cohrs [Mon, 3 Jul 2006 15:11:25 +0000 (15:11 +0000)]
compilation w/o WIZARD
> Michael Allison wrote:
> There are unresolved functions in the trunk if you build without WIZARD
> defined and attempt to link:
Also to a lesser extent, in the 3.4.4 branch.

18 years agoregion memory
nethack.allison [Mon, 3 Jul 2006 14:30:01 +0000 (14:30 +0000)]
region memory

<Someone> wrote on Tuesday, July 27, 2004 at 06:46:15
> In the region.c function rest_regions allocates storage for the possible
> enter_msg and leave_msg strings. But the function free_region does not relese
> this storage.

Also ensures that some code that is currently ifdef'd out
makes copies of the strings into memory from alloc()
to ensure that no problems with free() result if the function
gets passed a literal string.

18 years agoregion memory
nethack.allison [Mon, 3 Jul 2006 14:21:21 +0000 (14:21 +0000)]
region memory

<Someone> wrote on Tuesday, July 27, 2004 at 06:46:15
> In the region.c function rest_regions allocates storage for the possible
> enter_msg and leave_msg strings. But the function free_region does not relese
> this storage.

Also ensures that some code that is currently ifdef'd out
makes copies of the strings into memory from alloc()
to ensure that no problems with free() result if the function
gets passed a literal string.

18 years agomore fmt_ptr (trunk only)
nethack.allison [Sun, 2 Jul 2006 19:16:58 +0000 (19:16 +0000)]
more fmt_ptr (trunk only)

18 years agomore fmt_ptr (trunk only)
nethack.allison [Sun, 2 Jul 2006 19:09:42 +0000 (19:09 +0000)]
more fmt_ptr (trunk only)

18 years agofmt_ptr (trunk only)
nethack.allison [Sun, 2 Jul 2006 18:43:35 +0000 (18:43 +0000)]
fmt_ptr (trunk only)

fmt_ptr() is no longer dependant on WIZARD or MONITOR_HEAP,
so that it can be used in panic messages.

18 years agostartup menu crash follow up (trunk only)
nethack.allison [Sat, 1 Jul 2006 19:32:27 +0000 (19:32 +0000)]
startup menu crash follow up (trunk only)

Pat:
Either both editions [of bot()] should reset those botl flags
or neither one should.

18 years ago<Someone> wrote:
nethack.allison [Sat, 1 Jul 2006 18:44:18 +0000 (18:44 +0000)]
<Someone> wrote:
> NetHack feedback form submitted by
> <email deleted> on Friday, June 30, 2006 at 17:31:12
> ---------------------------------------------------------------------------
>
> mailversion:1.35
>
> nhversion:3.4.3
>
> nhfrom:Our 3.4.3 source release, unmodified

> comments:
> telnet nethack.alt.org with the terminal set to 21 rows.
> Choose to pick a char, not accept pot luck, and game segfaults.
> (same happens from linux console)

I was able to reproduce something similar in win32 by setting
the console to 21 rows. As he stated, don't let the game pick you
character for you to reproduce the problem. As soon as I chose
Archeologist the problem occurred:

Where:
  In hack.c, weight_cap()
   if (Levitation || Is_airlevel(&u.uz)    /* <email deleted> */
  #ifdef STEED
|| (u.usteed && strongmonst(u.usteed->data))
  #endif
)

Variables:
carrcap 200
u.usteed 0x00000000
&u.uz 0x005e54aa
youmonst.data 0x00000000

Examination of the preprocessor output of that section
of code reveals that
"Levitation" becomes:
    (u.uprops[47].intrinsic || u.uprops[47].extrinsic ||
((youmonst.data)->mlet == 5))
so it is the is_floater(youmonst.data) causing the crash.

Call stack:
  weight_cap() line 2300 + 24 bytes
  inv_weight() line 2342 + 5 bytes
  calc_capacity(int 0) line 2354 + 5 bytes
  near_capacity() line 2365 + 7 bytes
  bot() line 607 + 5 bytes
  docorner(int 47, int 19) line 2378
  erase_menu_or_text(int 5, WinDesc * 0x00a22550, char 0) line 994 + 25     bytes
  tty_dismiss_nhwindow(int 5) line 1664 + 15 bytes
  tty_select_menu(int 5, int 1, mi * * 0x0006fc40) line 2248 + 9 bytes
  tty_player_selection() line 442 + 16 bytes
  pcmain(int 3, char * * 0x00a20eb0) line 457
  main(int 3, char * * 0x00a20eb0) line 91 + 13 bytes

This adds a check for a valid youmonst.data in
bot().

18 years agoheader reorg (trunk only)
nethack.rankin [Thu, 29 Jun 2006 05:03:15 +0000 (05:03 +0000)]
header reorg (trunk only)

     Move the new VOID_ARGS and some other argument manipulation stuff
from global.h to tradstdc.h where it feels like a better fit.  Make the
definition of VOID_ARGS more general; it should work nearly everwhere
these days even if it is only needed for one configuration.  XXXconf.h
can redefine it as empty if necessary.

     For MONST_P and OBJ_P, I left "void*" as is but I'm pretty sure that
the lack of space in between the two components was never part of the
issue there.  (The Ultrix system I used to have access to is long gone.
It was chugging along on autopilot, effectively defenseless, at the time
a linux box on the same subnet got hacked.  It probably would have been
shut down for Y2K anyway if it had lasted til then.)

18 years agolint bit
nethack.rankin [Thu, 29 Jun 2006 03:06:46 +0000 (03:06 +0000)]
lint bit

18 years agoregion ttl field size change (trunk only)
nethack.allison [Wed, 28 Jun 2006 02:34:02 +0000 (02:34 +0000)]
region ttl field size change (trunk only)

make region ttl field a long instead of short to get rid of lint warnings
about a possible loss of data

18 years agoremove duplication
nethack.allison [Tue, 27 Jun 2006 00:17:35 +0000 (00:17 +0000)]
remove duplication

Janet pointed out that I must have just hought I was seeing double :-)

18 years agofixes34.4 catch up
nethack.allison [Mon, 26 Jun 2006 20:19:40 +0000 (20:19 +0000)]
fixes34.4 catch up

18 years agoInstall.nt updates
nethack.allison [Mon, 26 Jun 2006 11:02:36 +0000 (11:02 +0000)]
Install.nt updates

- Additional information for using MS VC++ 2005 Express Edition in
  combination with the Platform SDK.

18 years agoAllow makefile build with VC2005 (trunk only)
nethack.allison [Sun, 25 Jun 2006 22:40:58 +0000 (22:40 +0000)]
Allow makefile build with VC2005 (trunk only)

18 years agofunction pointer assignment warnings in VC2005
nethack.allison [Sun, 25 Jun 2006 19:54:31 +0000 (19:54 +0000)]
function pointer assignment warnings in VC2005

The latest Micrsoft compilers complain when a function is
assigned to a function pointer, and the function's argument
list does not match the prototype precisely.
It was evem complaining about the difference between this:
     int x()
     {
        [...]
     }
and a prototype of
     int x(void);
when assigning that function's address to a function pointer.

This quiets those warnings, without suppressing the mismatch
check altogether for more serious mismatches.

18 years agodetected hidden monsters
nethack.rankin [Thu, 22 Jun 2006 05:03:48 +0000 (05:03 +0000)]
detected hidden monsters

     From a bug report, attempting to attack
a hidden monster who is revealed by ongoing monster detection (blessed
potion or skilled spell) gave "wait!  there's a <monster> hiding there"
response and prevented the attack.  Make it behave the same as when the
hidden monster is revealed by telepathy; the monster comes out of hiding
and the hero's attack proceeds.

18 years agocomment tidbit (trunk only)
nethack.rankin [Thu, 22 Jun 2006 04:57:27 +0000 (04:57 +0000)]
comment tidbit (trunk only)

18 years agoshop theft/breakage (trunk only)
nethack.rankin [Thu, 22 Jun 2006 04:08:40 +0000 (04:08 +0000)]
shop theft/breakage (trunk only)

     The recent fix for "breaking glass wand in tool shop" looked suspect,
adding a call to costly_alteration after an existing call to stolen_value.
Either one or the other ought to suffice.  (For items on the floor,
costly_alteration() calls stolen_value(); for items in inventory, or just
released from inventory and not placed on floor yet, costly_alteration()
adds a usage fee to the shop bill but doesn't annoy the shopkeeper into
adding surcharges to prices or summoning the kops if already hostile.)

     In 3.4.3, stolen_value() wasn't smart enough to charge for an out-of-
shk's-field item (like a wand in a tool shop) taken from a shop container,
and that's the problem the user was reporting.  But the post-3.4.3 code was
changed to handle that by checking billable() instead of saleable(); this
bug should have been gone.  Unfortunately, billable() treats items already
on the bill as not interesting--from the perspective of adding things to
the bill--so the change accidentally resulted in stolen_value() no longer
handling objects which are marked unpaid, triggering the same symptom for
a different reason.  (Other events besides the breakage of thrown objects
suffered from the bug's new incarnation since various places deliberately
call stolen_value() for unpaid objects.)  This updates stolen_value() and
stolen_container() to account for the behavior of billable().  And a few
calls to subfrombill() go away since stolen_value() now takes care of that.

18 years ago#tip horn of plenty (trunk only)
nethack.rankin [Tue, 20 Jun 2006 02:31:37 +0000 (02:31 +0000)]
#tip horn of plenty (trunk only)

     Bug in #tip handling for horn of plenty.  Emptying one while levitating
would trigger an "obj not free" panic by flooreffects() due to following
hitfloor() with redundant/inappropriate dropy().

18 years agobag of tricks, horn of plenty, #tip (trunk only)
nethack.rankin [Sun, 18 Jun 2006 05:20:36 +0000 (05:20 +0000)]
bag of tricks, horn of plenty, #tip (trunk only)

     <Someone> reported that he applied an unID'd bag and it became
discovered as a bag of tricks even though a spellbook appeared on the floor
next to him rather than having a monster show up (the monster was a mimic).
Suppress the bag discovery unless you can see or sense a monster appear.
(This doesn't really achieve much for most players, who'll recognize the
bag because they know that only one type of container doesn't prompt to
take things out and/or put things in, but I think it does make sense.)

     While mucking with bag of tricks I decided that to be consistent with
the behavior of other containers, the #tip command should release all the
monsters in the bag instead of just one.

     And after doing that, I realized that horn of plenty ought to behave
much the same, so #tip will operate on it now.  However, it won't be listed
as a likely candidate in the "which item?" prompt unless/until it has been
discovered.  (Attempting to empty any other type of horn yields "nothing
happens", same as for a horn of plenty with no charges left.)  Emptying a
horn of plenty in a shop can be extremely verbose, but I don't think that
qualifies as a bug and don't currently have any plans to alter it.

18 years agowielded candles vs rust (trunk only)
nethack.rankin [Sat, 17 Jun 2006 04:43:44 +0000 (04:43 +0000)]
wielded candles vs rust (trunk only)

     From a bug report: [ slashem-Bugs-1206099 ] Torches are not extinguished with rust traps).
A rust trap that hits the torso candles causes all lit objects being carried
to be extinguished, but one which hit the weapon arm didn't have same affect
on a wielded light.  This fix causes wielded candles or lamps (not Sunsword)
to go out if affected by any rust, such as hitting a rust monster with one,
rather than use his patch that just handled the trap case.  It also excludes
wielded lights from the existing torso splash since having them be hit by
both instances is too obviously buggy.

     I think brass lanterns ought to be exempt from being extinguished by
water (at least splashing which is less drastic than total submersion) since
there are references to them operating by batteries rather than fire, but I
didn't want to track all the places which would be affected.

18 years agothrowing and breaking glass wand in shop (trunk only)
nethack.allison [Wed, 14 Jun 2006 23:44:16 +0000 (23:44 +0000)]
throwing and breaking glass wand in shop (trunk only)

<email deleted> wrote:
> - when in a hardware store, I put a glass wand out of a sack (the glass wand
> will cost you 266 zorkmids) and threw it in the shop => shattered into a
> thousand pieces BUT if I try to pay, I do not owe the shopkeeper anything !!!
> If I break a potion with a /oS, I have to pay !

18 years agowin32 embedded version info
nethack.allison [Wed, 14 Jun 2006 10:48:09 +0000 (10:48 +0000)]
win32 embedded version info

I noticed that the NetHack version being reported in the
system's event log was old:
Faulting application nethackw.exe, version 3.4.2.0,
faulting module nethackw.exe, version 3.4.2.0, fault address 0x001648eb.

18 years agoscroll learning follow-up (trunk only)
nethack.allison [Wed, 14 Jun 2006 02:53:13 +0000 (02:53 +0000)]
scroll learning follow-up (trunk only)

18 years agoanother null scroll reference (trunk only)
nethack.allison [Wed, 14 Jun 2006 02:38:53 +0000 (02:38 +0000)]
another null scroll reference (trunk only)

18 years agofix null pointer reference (trunk only)
nethack.allison [Tue, 13 Jun 2006 21:59:55 +0000 (21:59 +0000)]
fix null pointer reference (trunk only)

This problem only existed in post 3.4.3 code, so no fixes entry.

18 years agopolyself bit (trunk only)
nethack.rankin [Tue, 13 Jun 2006 03:15:03 +0000 (03:15 +0000)]
polyself bit (trunk only)

     Some recent code shuffling introduced an unintended change in behavior
(not observable to the player; just unnecessary deletion and re-creation of
light source with identical radius when polymorphing from one light emitting
form to another).  The fixup for light range 1 would need to be repeated for
`old_light' when outside the `if (old_light != new_light)' block; move it
back inside where that isn't required.  Also, youmonst.data is valid all the
time so a couple of `Upolyd' tests in the surrounding code can be dropped.

18 years agobuild warning
nethack.allison [Sun, 11 Jun 2006 18:27:55 +0000 (18:27 +0000)]
build warning

- remove an unreferenced variable
- continue with recent code trend towards having DEADMONSTER()
  check in its own if/continue statement in a few more places

18 years agopolyself changes (trunk only)
nethack.rankin [Sun, 11 Jun 2006 06:09:35 +0000 (06:09 +0000)]
polyself changes (trunk only)

     Several polymorph tweaks, most dealing with specifying form under
polymorph control or for wizard #polyself:
1) allow "were<critter>" and "human were<critter>" for your type of
   <critter> when you're inflicted with lycanthropy; now you'll toggle
   shape rather than be told "you cannot polymorph into that".
2) allow your own role; now you'll become a new man (or whatever race)
   rather than get "you can't".
3) allow "human" to force a new man (or whatever) regardless of race.
   No change for human characters, but elves, dwarves, and such can now
   use either their own race or "human".  (They never become humans.)
4) for wizard #polyself only, override the 20% chance of becoming a new
   man instead of taking on the selected form.  (This implicitly prevents
   the annoying "your new form isn't healthy enough to survive" death
   since your experience level won't drop below 1.)
5) remove a redundant drowning check in polyself(); it's already handled
   in polymon() and polyman(for newman()) via spoteffects().

     This also gets rid of an old use of 0 as not-a-valid-monster (not
responisble for any bugs though since giant ants aren't lycanthropes).

18 years agotemple sounds (trunk only)
nethack.rankin [Sun, 11 Jun 2006 04:00:40 +0000 (04:00 +0000)]
temple sounds (trunk only)

     The user (<email deleted>) who recently suggested a
dump command for containers also wanted atmospheric sounds on levels which
have altars.  Right now we'd have to find unattended altars the hard way
(by scanning the entire level) but we could add a counter (or set of
counters, one per alignment) like for fountains and sinks if we really
wanted to do that.  [Now that I think about it, the #overview patch may
have already done something of the sort.]  But what noises would an altar
be expected to produce?  This only adds sounds for temples, where the
attending priest can be the source of the noise.

     I'm not real thrilled with the initial set of sounds, particularly
the hallucinating one, but the implementation works.  The "carcass" one is
a little clumsy; it's intended to add a hint for new players who haven't
figured out what the #offer command does.

18 years agocharging scroll fix (trunk only)
nethack.rankin [Thu, 8 Jun 2006 05:05:33 +0000 (05:05 +0000)]
charging scroll fix (trunk only)

     A while back some code ended up in the wrong order, resulting in null
pointer dereference when reading a not-yet-discovered scroll of charging.

18 years agofollow-up for lost ball and chain
nethack.allison [Wed, 7 Jun 2006 01:46:41 +0000 (01:46 +0000)]
follow-up for lost ball and chain

18 years agolost ball and chain (trunk only)
nethack.allison [Sat, 3 Jun 2006 17:55:24 +0000 (17:55 +0000)]
lost ball and chain (trunk only)

Saving the game while punished, not carrying the attached ball,
and while swallowed by a purple worm resulted in losing the
ball and chain.

Since the required information was not being written to the
save file at all, I couldn't come up with a clean way to do this
for the branch, and preserve save file format. I could think
of lots of kludgy ways to do it (insert ball and chain into
the hero's inventory prior to saving, and remove it on restore, etc.)

18 years agolost ball and chain (trunk only)
nethack.allison [Sat, 3 Jun 2006 17:48:22 +0000 (17:48 +0000)]
lost ball and chain (trunk only)

Saving the game while punished, not carrying the attached ball,
and while swallowed by a purple worm resulted in losing the
ball and chain.

Since the required information was not being written to the
save file at all, I couldn't come up with a clean way to do this
for the branch, and preserve save file format. I could think
of lots of kludgy ways to do it (insert ball and chain into
the hero's inventory prior to saving, and remove it on restore, etc.)

18 years agogolem life
nethack.rankin [Thu, 1 Jun 2006 04:27:35 +0000 (04:27 +0000)]
golem life

     When testing the spoteffects/drown hack I noticed that draining myself
with Stormbringer (toss up, get hit on head) while in iron golem form gave
messages about it drawing or draining life.  (I'm sure that this has come
up before....)  I've altered the artifact hit message rather than making
golems become resistant, although the opposite approach seems at least as
valid.  The drain life spell uses different wording and isn't affected.

18 years agorecursive spoteffects (trunk only)
nethack.rankin [Thu, 1 Jun 2006 03:54:25 +0000 (03:54 +0000)]
recursive spoteffects (trunk only)

     Attempt to fix a buglist item:  if hero poly'd into iron golem form
enters a pool of water and drowning triggers reversion to human/whatever
form due to water damage, he will fall into that pool again, crawl or
teleport out, then redundantly crawl or teleport out for the initial entry.
[ spoteffects -> drown -> losehp -> rehumanize -> polyman -> spoteffects
  -> drown ]

     I don't have a lot of confidence in this fix.  It does handle the
reported problem, and hasn't broken a couple of earlier tricky cases
(ice melting to water, land mine turning into a pit).  But drown() and
lava_effects() seem to leave a trail of special case handling wherever
they appear so they--or spoteffects, or both--ought to be redone somehow.

18 years agobuild warning
nethack.allison [Tue, 30 May 2006 05:07:16 +0000 (05:07 +0000)]
build warning

a recent patch triggered a new warning:
cmd.c(995) : warning C4101: 'numbuf' : unreferenced local variable

18 years agoinvocation vs being trapped
nethack.rankin [Tue, 30 May 2006 04:07:34 +0000 (04:07 +0000)]
invocation vs being trapped

     I can't find the report about this; I must have deleted it after
reading, or else recently reread something so old that I'm not going back
far enough now.  When you perform the invocation ritual to create the
stairs down to Moloch's Sanctum, any trap at your location gets deleted.
But if you were in a trapped state at the time then you got left in that
state.  Descending stairs doesn't check for traps so you wouldn't notice
unless you tried to move around on the same level first.  Then you'd get
"you're stuck in a pit/beartrap/web" even though it wasn't there anymore.

18 years agounseen monsters vs hiding hero
nethack.rankin [Sat, 27 May 2006 04:13:20 +0000 (04:13 +0000)]
unseen monsters vs hiding hero

     While testing the hiding vs traps patch, I became a mimic and hid.
  It gets stuck to you.
Huh?  Nothing was visible; nothing became visible (aside from the ']' at my
position changing back to 'm').  Display the invisible monster glyph when
an unseen monster bumps into you while you're hiding or mimicking gold.
That's usually handled by the hit and miss routines, but they aren't used
when you're just brought out of hiding instead of attacked.

18 years agomore hiding monsters vs traps (trunk only)
nethack.rankin [Sat, 27 May 2006 03:58:35 +0000 (03:58 +0000)]
more hiding monsters vs traps (trunk only)

     Previous patch only handled hides-under monsters and the hero; this
takes care of other hiding monsters.

18 years agohiding monsters vs traps (trunk only)
nethack.rankin [Sat, 27 May 2006 03:46:03 +0000 (03:46 +0000)]
hiding monsters vs traps (trunk only)

     From a bug report, the game gave feedback
about a monster becoming stuck in a web but there seemed to be no monster
around because it immediately began hiding under an object at the web's
location.  Prevent monsters--or poly'd hero--from hiding when trapped in
anything other than a pit or spiked pit.  Also, prevent them from hiding if
they're holding you or you're poly'd and holding them.  I'm not sure whether
either of those cases ever actually happened but big mimics are capable of
both hiding and grabbing on.

18 years agofix #H108 - lost protection
nethack.rankin [Sat, 27 May 2006 01:58:22 +0000 (01:58 +0000)]
fix #H108 - lost protection

     Fix the problem From a bug report, where
giving a temple donation of the appropriate amount would fail to restore
protection previously stolen by gremlin attack iff the old protection amount
was big enough that the donation wouldn't have yielded a bonus in the normal
not-stolen case.  It shouldn't be checking the magnitude of u.ublessed at a
time when lack of the intrinsic renders that value inoperative.  After this
fix, the lost intrinsic will be granted and the old protection value will
be restored, same as happens when a prayer boon yields divine protection
(where no u.ublessed magnitude check is made) and as happened with donations
when the old protection was a more modest amount (magnitude test passed).

18 years agoprotection enlightenment (trunk only)
nethack.rankin [Sat, 27 May 2006 01:26:50 +0000 (01:26 +0000)]
protection enlightenment (trunk only)

     Yesterday's change to have enlightenment give "you have a <small,
moderate,&> defense bonus" instead of "you are protected" would yield
"you have a small defense penalty" if the combined protection value (from
rings, divine gift, and spell) was 0.  This changes the formatting routine
to give "you have no defense bonus" in that situation, then changes the
caller to only display the protection/defense attribute when non-zero so
the "no bonus" case will never actually happen.

18 years agoenlightment for protection and magic cancellation (trunk only)
nethack.rankin [Fri, 26 May 2006 03:31:57 +0000 (03:31 +0000)]
enlightment for protection and magic cancellation (trunk only)

     The bug report about losing/regaining the Protection intrinsic reminded
me of a couple of things.  First, as an intrinsic, Protection seems to be
completely useless and we ought to redo it.  Second, periodically people in
the newsgroup have complained about how it's nearly impossible to figure
out the important--possibly crucial--armor attribute of magic cancellation.
Wearing a cloak greatly increases characters' survival rates, but beyond
that, magic cancellation is just spoiler fodder.

     This doesn't do much about Protection other than to change "you are
protected" into "you have a <small,moderate,&c> defense bonus" similar to
how the attributes conferred by rings of increase damage and increase
accuracy are handled.  For magic cancellation, it adds new feedback:
  You are protected.  -- mc factor 3
  You are guarded.    -- mc factor 2
  You are warded.     -- mc factor 1
(with no extra feedback for mc factor 0, the normal naked state.  The mc 3
case might cause some confusion over the changed meaning of a previously
existing item, but I think it'll be ok and not need re-wording.)

18 years agofix [part of] #H103 - misleading prompt when choosing role,&c
nethack.rankin [Thu, 25 May 2006 05:43:49 +0000 (05:43 +0000)]
fix [part of] #H103 - misleading prompt when choosing role,&c

     From a bug report, specifying role and race
along with invalid alignment for that role/race combination resulted in a
prompt of "pick the alignment of your chaotic human Valkyrie".  This fixes
that particular problem, but the role selection code is incomprehensible
and I don't have a lot of confidence about whether other combinations have
similar trouble.

     This also fixes an obvious typo in ok_align().  Unfortunately I can't
figure out what to do with the if-then-else block in root_plselection_prompt
which has identical code for its `then' and `else' halves (in the alignment
code that the new ok_align() test skips).

18 years agofix #H105 - inconsistent handling of "meditating" monsters (trunk only)
nethack.rankin [Thu, 25 May 2006 04:36:11 +0000 (04:36 +0000)]
fix #H105 - inconsistent handling of "meditating" monsters (trunk only)

     From a bug report, monsters with the wait
strategy (described as "meditating" by stethoscope probing) could be
affected by music but left meditating.  Various wake up attempts shared
the same situation.  Finish waiting if the monster would have been woken
(or pacified).  I didn't search for places that diddle the msleeping bit
directly instead of calling one of the assorted wake() routines.

     A fair bit of this is making usage of DEADMONSTER() be consistent.
Sooner or later there'll be another monster movement overhaul and those
    if (DEADMONSTER(mon)) continue;
statements will all go away.  (Probably just wishful thinking.)

18 years agofix #H104 - misnamed high priestess
nethack.rankin [Thu, 25 May 2006 03:44:34 +0000 (03:44 +0000)]
fix #H104 - misnamed high priestess

     When high priests have their affiliation suppressed to avoid giving
away which altar is which on the Astral level, the name formatting also
bypasses the code that converts "priest" into "priestess" for females.
(The bug report was about Moloch's high priestess; the occupant of the
Sanctum's temple gets similar handling to those on Astral.)

     Also a tidbit for a change made a couple of days ago.  Avoid using
"Manlobbi the invisible shopkeeper" or "Asidonhopo the newt" in the message
given when a shk refuses an attempt to be renamed via the 'C' command.

18 years agorenaming shopkeepers and priests
nethack.rankin [Tue, 23 May 2006 04:09:23 +0000 (04:09 +0000)]
renaming shopkeepers and priests

     From a bug report, the 'C' command wasn't reporting that
"<shopkeeper> doesn't like being called names" even though the user's
supplied name was ineffective.  Same thing for temple priests and other
minion monsters; the name was accepted but didn't do anything.  Make such
monsters reject new names.

18 years agoadjattrib() feedback (trunk only)
nethack.rankin [Sun, 21 May 2006 05:32:16 +0000 (05:32 +0000)]
adjattrib() feedback (trunk only)

     Fix a bug described in the slash'em bugs page at Sourceforge.  When
attributes are undergoing adjustment (from drinking a potion of gain
ability, for instance), don't display "you feel wise" or "you feel weak"
messages if worn equipment is keeping the relevant attribute at some point
below max or above min and the current value doesn't actually change.
The old logic just checked whether you were at max or min and assumed that
when not, the value would be changing.  Now it checks whether the value
actually did change.  But it doesn't intercept attempts to go over max or
under min at the same point any more; I hope it hasn't introduced any new
bugs in the process.

18 years agoshktalk patch - speech by polymorphed shopkeepers (trunk only)
nethack.rankin [Sun, 21 May 2006 04:22:09 +0000 (04:22 +0000)]
shktalk patch - speech by polymorphed shopkeepers (trunk only)

     Add a patch attached to one of the bug reports sent by <email deleted>
which prevents shopkeepers who have been polymorphed into animals from
speaking.  Some messages are altered so that the player gets informed about
shop interactions without it seeming to be spoken by the shk, other messages
are suppressed outright.  I cleaned it up a bit (mostly formatting, but the
``getcad'' section seemed to have a logic error--using goto to jump into
the middle of an if-then-else is evil...) and implemented a TODO comment he
added (to use mbodypart() when second shopkeeper at end of game shakes his
head; also, skip that phrase if shk is in headless form--futility while
attempting to test this led to discovery of the misplaced parenthesis bug).

18 years agoend of game shopkeeper messages
nethack.rankin [Sun, 21 May 2006 04:00:08 +0000 (04:00 +0000)]
end of game shopkeeper messages

     Fix something I accidentally broke nearly three years ago (post 3.4.2,
so the bug appeared in 3.4.3).  A misplaced closing parenthesis caused an
in-sight check to always fail, so the "<shk> looks at your corpse, shakes
his head, and sighs" message when game ends would never occur.  That
situation is extremely rare anyway; it only happens after some other shk
has taken the hero's possessions.

18 years agoelven boots
nethack.allison [Fri, 19 May 2006 18:35:11 +0000 (18:35 +0000)]
elven boots

<email deleted> wrote:
> While levitating, I put on an unknown pair of boots.  They turned out to be
> elven boots.  I received the message, "You finish your dressing maneuver.  You
> walk very quietly."  Incidentally, I was hallucinating at the time.
>
> It seems to me that levitating individuals shouldn't be able to tell that they
> walk quietly.

18 years agoplayer control of spellbook order (trunk only)
nethack.rankin [Thu, 18 May 2006 04:18:28 +0000 (04:18 +0000)]
player control of spellbook order (trunk only)

     Add the capability of sorting the entire spellbook by various criteria,
augmenting the existing ability to swap pairs of spells.  In the menu that's
put up for the '+' command, add a non-spell entry after the last known spell
        + - [sort spells]
Selecting that brings up a new menu

        View known spells list sorted

        a + by casting letter
        b - alphabetically
        c - by level, low to high
        d - by level, high to low
        e - by skill group, alphabetized within each group
        f - by skill group, low to high level within group
        g - by skill group, high to low level within group
        h - maintain current ordering

        z - reassign casting letters to retain current order

'a' corresponds to the normal ordering; 'b' through 'g' cause the order
to change, but during the current invocation of the '+' command only.
(Entry 'h' is a no-op, something aside from ESC to get out without doing
anything.  'a' is only a no-op if you haven't picked any of 'b' through
'g' yet.)  After making a choice, you're taken back to the '+' command to
view the spells in the requested order.  And once back there, you can pick
'+' again to come back to this menu, where picking 'z' will cause casting
letters to be shuffled such that present display order becomes the actual
spellbook order.  Newly learned spells get appended to the end as usual;
the most recent sorting order isn't sticky even if finished off with 'z'.

     No doubt seeing it in action will be clearer than this description.
This also updates the Guidebook to mention the spell retention field added
to the '+' menu some weeks back.

18 years agoquest artifact handling (trunk only)
nethack.rankin [Thu, 18 May 2006 02:50:33 +0000 (02:50 +0000)]
quest artifact handling (trunk only)

     When the hero receives the quest artifact "got it" message, set the
artifact's dknown bit in case the hero is blinded.  That message describes
the object by name, effectively the same as seeing it up close.  (This
would have prevented the "now wearing an Eyes of the Overworld" grammar bug
for monks but not for non-monks, so the previous fix is still necessary.)

18 years agoEyes of the Overworld grammar
nethack.rankin [Thu, 18 May 2006 02:38:16 +0000 (02:38 +0000)]
Eyes of the Overworld grammar

     Putting on the Eyes while blind causes sight to be regained, which in
turn causes xname() to set the dknown bit and start using the previously
unseen object's name.  But obj_is_pname() was being called before xname in
the "you are now wearing ..." message, while dknown was still clear.  So
obj_is_pname thought the name was being suppressed and returned false,
resulting in "an Eyes" instead of "the Eyes".  Fix is to call xname first.

18 years agogrammar bit
nethack.allison [Wed, 17 May 2006 20:15:46 +0000 (20:15 +0000)]
grammar bit

<Someone> wrote:
> You find an anti-magic field.
> Where do you want to jump?  (For instructions type a ?)
> You pass right over _a_ anti-magic field.

18 years agoadditonal oextra care
nethack.allison [Sat, 13 May 2006 20:19:06 +0000 (20:19 +0000)]
additonal oextra care

Be deliberately careful with copies taken of
oextra pointers and clear the pointer if it
truly is a redundant copy that will become
invalid if/when the original holder is deallocated.

18 years agoadd pickup_thrown option (trunk only)
nethack.rankin [Sat, 13 May 2006 04:57:52 +0000 (04:57 +0000)]
add pickup_thrown option (trunk only)

     This patch by <email deleted> was released
when 3.4.1 was current and has been incorporated into slash'em.  It is
extremely useful while using ranged weapons.  When both autopickup and
pickup_thrown are enabled, walking across previously thrown objects will
pick them up even if they don't match the current pickup_types list.
[See cvs log for patchlevel.h for longer description.]

18 years agoadd pickup_thrown option (trunk only)
nethack.rankin [Sat, 13 May 2006 04:56:16 +0000 (04:56 +0000)]
add pickup_thrown option (trunk only)

     This patch by <email deleted> was released
when 3.4.1 was current and has been incorporated into slash'em.  It is
extremely useful while using ranged weapons.  When both autopickup and
pickup_thrown are enabled, walking across previously thrown objects will
pick them up even if they don't match the current pickup_types list.
(Autopickup exceptions weren't around when the patch was first developed
and while those can be used for this purpose if you're willing to name
every object prior to throwing it, pickup_thrown is much more convenient.
Especially when you run out of weapons and resort to throwing pick-axes,
unicorn horns, and spare suits of banded mail at that floating eye who
rudely refuses to die.)  If you drop a previously thrown object (after
getting it back into your inventory again, of course), its was_thrown bit
will be clear and subsequent walking over it behaves in the regular
autopickup manner.  There's no special stacking handling; if a thrown
object lands on a compatable object and they stack, the combined stack is
subject to pickup_thrown handling.

     The original patch updated makedefs to add an entry for pickup_thrown
patch to the options list displayed by #version; I've left that out.  It
also cleared the was_thrown bit in the pickup code, resulting in being
sticky for boomerangs and Mjollnir (where throwing, catching, and then
dropping those would result in behaving as if they had most recently been
thrown rather than dropped).  I've moved that to the add-to-inventory code
instead to fix this.  The original patch also put the pickup_thrown bit
into iflags instead of flags in order to avoid invalidating save files;
I've moved it to flags where it belongs and added a patchlevel.h update.
I've also reworded the Guidebook entries slightly.  [The original patch
can be obtained from <Someone>'s "NetHack Patch Database" at
http://bilious.homelinux.org/ under the "browse" heading.  I didn't hang
on the exact URL; sorry.]

     I think objects stolen from the hero should have their was_thrown bit
set (or else add a new was_stolen bit, which seems like overkill) so that
recovering stolen objects will become simpler after the thief has been
tracked down and dealt with, but I haven't done that here.

18 years agoxorn comment
nethack.allison [Fri, 12 May 2006 02:27:52 +0000 (02:27 +0000)]
xorn comment

18 years agoDelphi follow-up 2 (trunk only)
nethack.allison [Fri, 12 May 2006 01:59:56 +0000 (01:59 +0000)]
Delphi follow-up 2 (trunk only)

oops, Pat pointed out that I altered the logic.

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.