Commit Graph

3387 Commits

Author SHA1 Message Date
nethack.rankin
0b95104f0e fix #Q417 - gelatinous cubes can engulf Rider corpses
From a bug report:  gelatinous cubes
could engulf Rider corpses, allowing g.cube and cargo to be teleported
away without triggering corpse revival, or to be hit with theft attack by
poly'd hero to get the corpse into inventory so it could then be put into
a container in order to prevent revival (or to be destroyed via bag of
holding explosion or cursed access).
2007-02-11 03:59:08 +00:00
nethack.rankin
aa97ea65b1 umpteenth hangup bit
From a bug report:  hangup during
screen updating at tail end of successful restore didn't create a new
save file when disconnecting.  Use his suggestion for moving the setting
of program_state.something_worth_saving sooner, before the save file is
deleted.  To do that, restlevelstate() needs to come sooner too.  I think
this is safe enough to include in the branch code.

     For the trunk, I'm not sure whether the SAFERHANGUP config will work
well here.  It has to survive long enough under autopilot to enter moveloop
before the chance to save kicks in.
2007-02-11 03:36:15 +00:00
nethack.rankin
a9b7b19b95 more jumping (trunk only)
Allow jumping via spell when hero or steed has wounded legs.
Otherwise the previous fix for immobilized steed--and the existing code
requiring limbs for physical jump but not for spell jump--is inconsistent.
2007-02-11 01:50:56 +00:00
nethack.rankin
2343e77eb0 fix #Q382 - jumping possible while riding a sleeping pet (trunk only)
From a bug report:  when riding,
#jump command and jumping spell didn't check whether steed is able to move.
This makes #jump command, either magic boots or knight's innate ability,
fail if the steed can't move.  Spell still succeeds; its magic overrides
steed's immobility.  Fix is trunk only since it relies on a function that
isn't in the branch.

     Also, tweak hero movement to avoid an extra function call per move
when not riding.
2007-02-11 01:33:26 +00:00
nethack.rankin
00fc519903 sleeping gas trap vs steed
Noticed while checking out the report that you can #jump when riding
a sleeping steed:  hero's sleep resistance or magical breathing prevented
sleeping gas traps from hitting steed.  "You are enveloped in a cloud of
gas" but your steed is untouched?  That didn't make sense.
2007-02-11 01:23:28 +00:00
cohrs
33fde404e7 gcc compilation warning bits 2007-02-10 17:37:17 +00:00
cohrs
10e24ceeae H238 - spelling of Dr Dolittle 2007-02-10 17:30:24 +00:00
cohrs
fe43698867 Q387 - grammar fixes in Samurai quest
"Wakarimasu?" should be "Wakarimasu ka?"
2007-02-10 16:31:14 +00:00
nethack.rankin
7c64dbaf83 fix #Q404 - monster wielding cursed corpse
From a bug report, applying a bullwhip
towards a monster to try to steal its weapon would report that a cursed
cockatrice corpse was welded to the monster's hands even though corpses
wielded by the player never become welded.  Code for monsters deciding
what to wield knew that corpses don't weld; everywhere else seems to
assume that they only wield weldable weapons.  Add a routine to check
whether a wielded item is welded, similar to what's done for the hero.  I
fixed a couple of other spots besides use_whip() but didn't hunt all over.
2007-02-10 05:14:22 +00:00
nethack.rankin
262c1780b6 typo in previous patch 2007-02-10 04:19:41 +00:00
nethack.rankin
c937cc0091 finish_map prototype
There's a newsgroup posting about building for Windows using minGW
(gcc) within the cygwin Unix emulation environment, and it includes diffs
for the changes used.  One of the items being patched is a straight source
bug triggered by altering the definition of `boolean'.  finish_map()'s
prototype doesn't match its definition (uses boolean args but has XCHAR_P
in the prototype).
2007-02-10 04:18:52 +00:00
nethack.rankin
4168718d5d fix #Q159 - segfault with super long item names
From a bug report, putting an object with
really long specific and type names into a container with really long
specific and type names caused the program to crash.  pline() overflowed
the buffer it formatted into, and even though it was able to send that
for output and trigger a --More-- prompt, eventually a segfault occurred.
Give vpline and vraw_printf a much bigger working buffer, then truncate
the formatted text to BUFSZ - 1 characters so that we don't just push the
long line trouble into the separate interfaces.
2007-02-10 04:05:47 +00:00
nethack.allison
a83e2ba4a4 Q416 kicking gold (trunk only)
<email deleted> on Monday, January 29, 2007:
>Hero is able to kick a pile of gold (say, 100) and have the entire pile move at
>once in the same direction; very easy to avoid gold on traps.  Kicking gold
>should probably scatter the pieces in multiple directions or at least not be
>quite so easy.
2007-02-10 02:02:49 +00:00
nethack.rankin
eabf0f649e fix #Q367 - tinning Rider corpse when level is full
From a bug report:  if you try to tin a
Rider's corpse and revival fails, you still get the gimicky message about
War not preserving his enemies.  Give the suggested alternate message in
that case:  The corpse evades your grasp.  I hope that we can do better
than that, but I'm too burned out to think of anything.
2007-02-09 01:35:41 +00:00
nethack.rankin
c2a3a3a38b fix #H239 - doppleganger/mimic bug
From a bug report:  a shapechanger
which becomes a mimic would always stay as 'm' rather than take on object
or furniture shape.  Same applied to monsters which hide in other ways.
The code did that deliberately, but I don't think that it's actually
necessary so this lets them mimic/hide when they're in the right shape.
If they change form to non-mimic/hider while concealed, concealment ends.

     It would be fun to have shapechangers-as-mimics actually change their
mimicked shapes periodically, but this doesn't do that.  They'd probably
change to non-mimic quicker than they'd mimic something else so it's not
worth the effort.
2007-02-09 00:25:47 +00:00
nethack.rankin
1fe4018f3b fix #Q295 - post-choking food side-effects
From a bug report, but
just received:  if you choked while eating a cockatrice egg and survived,
the turn-to-stone sequence wouldn't be initiated.  For such eggs, turning
to stone starts when the food is finished rather than when it's started,
and fpostfx() wasn't called for food that triggered choking so the egg
went away without actually being finished.  Fortune cookies, lumps of
royal jelly, and a few other things suffered from the same situation.
2007-02-08 23:33:14 +00:00
nethack.rankin
8c982b0e05 typo in chest description
From a bug report:  "The" should be "Then".
2007-02-08 20:46:01 +00:00
nethack.rankin
e46663e456 weapon rustproofing status
From a bug report, hitting a rust monster with a
fireproof--but not identified as fireproof--weapon caused the rknown bit
to become set, identifying the item as fireproof.  That would also happen
for a monster's anything-proof weapon if it hit a rust monster, whether
you could see it happen or not.  The code involved is convoluted; I hope
this fix is correct.
2007-02-08 07:06:39 +00:00
nethack.rankin
6b2078f89c redundant or inconsistent msleeping handling
Eliminate some redundant monster sleep handling pointed out by <email deleted>.  I'm not sure if this is the right fix for mattackm(),
but the wakeup-after-hit was definitely wrong for the case where that hit
put the target to sleep.  (I didn't try to make that actually take place
but it is a possible outcome of monster-against-monster combat.)
2007-02-08 05:04:33 +00:00
nethack.rankin
128ed0f0be fix #Q117 - vomiting by rodents & more
From a bug report:  you could vomit when polymorphed into a rat but real life
rats can't/don't vomit.  The latter was confirmed by <Someone> and <Someone>.
While testing a fix for this, I discovered a couple of other problems.
Healing magic which cured sickness failed to heal Vomiting (potion or
spell; unicorn horn deals with them separately).  Enlightenment failed to
report Vomiting (it's not shown on the status line).  Most significant was
that vomiting_dialogue() called vomit() twice (also make_confused() and
make_stunned() three times for every once intended).  It was dividing the
remaining turns by 3 and then using that value to decide what to do, but
only message display took into account that the same divided value would
occur on 3 consecutive turns (or just 2 for the final countdown to 0,
because dialog routine gets called before timed-property decrement).
2007-02-06 04:35:50 +00:00
nethack.rankin
8465f87d2f fix #Q108 - adding candles to Candelabrum while underwater
From a bug report, but just received:
you can't affix candles to the candelabrum while underwater, because the
underwater check (can't light candles while underwater) is made too soon.
If you somehow managed to get a lit lamp, candle, or candelabrum while
underwater, you wouldn't be able to extinguish it for same reason.  The
bug report included a URL for a fix, but I didn't look at that.  This
changes use_candle() to rely on use_lamp() for underwater handling, and
changes use_lamp() and use_candelabrum() to check for extinguishing
before making the underwater check.
2007-02-04 05:34:59 +00:00
nethack.rankin
0f0f7190f3 goto_level message reorg (trunk only)
Clean up the code at the end of goto_level().  The only change in
behavior, aside from eliminating a couple of wizard mode quirks, is that
if a hangup save occurs while staring at the quest entry message, it will
be flagged as seen and not show up again if you leave and return to the
quest after restore.  (For wizard mode, you'll no longer find the Wizard
waiting if you use the level teleport menu to jump directly to the Astral
Plane from outside the endgame, and level teleporting away from astral
level to one of the elemental planes then returning won't make more fake
players or another guardian angel.)
2007-02-04 05:31:24 +00:00
nethack.rankin
dc6a38fe32 fix #Q94 - quest portal bug
From a bug report.  (Michael forwarded a newsgroup posting about it back
then, but I had trouble reproducing it and didn't figure it out until
trying again now.)  If hangup occurred while entering the quest, the magic
portal could be rendered inactive for the hero but still work for monsters.
That's because the hangup save stored the old value of u.uz0 before
goto_level set it to the new u.uz, and a magic portal won't operate when
u.uz0 differs from u.uz (to prevent a pair of portals from getting stuck
sending the hero back and forth).  The problem could also occur going from
the quest back to the dungeon, or either direction for Ft.Ludios, but the
--More-- prompt when the quest entry text is being displayed makes hangup
during level change most likely to occur during initial quest entry.

     This is just a bandaid, and the SAFERHANGUP config wouldn't be hit
by this situation.
2007-02-04 04:26:35 +00:00
nethack.rankin
1e705189f2 more engraving with empty wands (#Q85)
#Q85: Bug: wrest a wand in one turn through engraving
From a bug report:  engraving with an empty wand while not levitating, then using
ESC to abort when asked for the text to write, let you attempt to wrest
the last charge without using up a turn.  Between the time this report was
sent and received, someone else reported similar issue with levitation,
where no prompting occurs.  The fix for it also fixed the original problem.
Somewhat inadvertently though, since you can now no longer write in the
dust with a empty wand.  I'm going to leave it this way; all that's needed
is some feedback about failing to engrave.
2007-02-04 04:01:33 +00:00
nethack.rankin
42444d0db5 m-prefix groundwork (trunk only)
Set up to be able to use the m command prefix to request menu mode
for commands other than just pickup.  As a side-effect, a hardcoded ','
referencing that command is eliminated.  Also, the command handling for
pickup was accepting the other prefix characters (F,g,G,M,numpad 5) as
synonyms for m; this reverts all but 'm' to movement modifiers only (it
may be reasonable to retain M and 5, but this doesn't).
2007-02-03 03:41:22 +00:00
nethack.rankin
dda8161ece hangup paranoia (trunk only)
If nhwindows_hangup() were to get called a second time, it would have
saved hup_exit_nhwindows() as the previous interface's shutdown routine.
Then if/when exit_nhwindows() gets called, hup_exit_nhwindows() would
have called itself with uncontrolled recursion.  So guard against that by
preventing the hangup shutdown routine from ever being saved as previous
interface shutdown routine.

     Also, avoid the exit_windows macro when using it as a pointer rather
than for a function call, since pre-ANSI compilers might be confused by
its expansion.
2007-02-03 01:59:49 +00:00
nethack.rankin
47f052e7b8 yet more hangup (trunk only)
From two weeks ago:
>      The last of my intended hangup overhaul.  Once hangup is detected,
> replace currently loaded windowing routines with stubs that never do any
> terminal I/O.  Real interface routines call their siblings directly rather
> than via the windowprocs pointers, so this shouldn't pull the rug out from
> under them, but it also can't prevent whatever they have in progress at
> the time of hangup from attempting further I/O once the handler returns.

     hangup_nhwindows() shouldn't call exit_nhwindows() prior to replacing
windowprocs with no-ops.  Even though the original intgerface can still
access its own routines directly, the exit_nhwindows() routine probably
releases its dynamic data structures.  And those could be in active use if
the hangup occurs while an interface routine is executing.
2007-02-02 03:07:47 +00:00
nethack.rankin
13b1aa6bc2 hangup followup (trunk only)
The hangup check added to xwaitforspace() (which gets tty user's
response to --More-- and "Press Return to continue: ") wouldn't be good
enough if hangup occurred while that routine's input loop was executing.
2007-02-02 02:45:37 +00:00
nethack.rankin
fdbc2c9e86 several hangup tweaks (trunk only)
NOSAVEONHANGUP isn't documented anywhere.  I don't see why it should
wipe out recoverable level files just because it doesn't want to build a
save file out of them during the hangup.  Leave them intact if checkpoint
is active.  If someone really wants to make them always go away, they'll
need to disable INSURANCE as well as enable NOSAVEONHANGUP.

     tty's getret() -> xwaitforspace() could get stuck in a loop after
hangup, depending upon the state of terminal shutdown (accepting EOF or
ESC cares about cbreak mode?).  Make xwaitforspace() become a no-op during
hangup processing.

     vms's call to hangup() from an exit handler took place after the
terminal has been reset (the exit handler for the latter is registered
later so executes sooner).  Then exit_nhwindows() resulted in a second tty
reset attempt and settty() -> setctty() encountered an error (which it
reported, triggeting a getret() call).  Make the vms code correctly guard
against multiple resets.
2007-02-01 06:15:04 +00:00
nethack.rankin
e7cb81fe7b acid vs iron bars (trunk only)
Make yellow dragon breath destroy iron bars (unless their wall_info
is marked as non-diggable, which I think is currently impossible for bars).
The shop handling is untested; no shop has iron bars for its walls or
includes them as interior obstacles.  (The latter would require changes
to shop repair because lost bars will become solid wall if/when rebuilt.)

     Thrown potions of acid and spat or thrown splashes of acid venom
don't affect bars--at least so far--because those always pass through
without hitting.  Monsters who have a non-ranged attack which does acidic
damage can't use such attacks against iron bars.
2007-01-28 04:39:14 +00:00
nethack.rankin
4f77e8b156 monster ranged attacks (trunk only)
A fairly recent change had a mistake in it which allowed monsters to
throw, shoot, and zap through walls and closed doors if there was at least
one unobstructed spot between the attacker and the wall or door.
2007-01-28 02:20:40 +00:00
nethack.rankin
5b88c67d97 engraving with empty wand
From a bug report:  if you
attempted to engrave with an empty wand while levitating, it wouldn't use
a turn unless you successfully wrested an extra charge out of the wand.
So you could always get such charge in a single elapsed turn of game time
if you didn't care about zapping in any particular direction; extremely
useful for wishing.

     Noticed when checking this:  when you did wrest the extra charge,
the engraving code accessed freed memory for the wand after it had been
used up.

     Lastly, wands producing certain effects always become discovered,
even when you don't yet know what they look like.  (This part of the patch
is trunk-only since it utilizes the routine which fixes similar case for
zapping.)
2007-01-27 05:50:10 +00:00
nethack.rankin
e2fffafb7c kicking off edge of map
From a bug report:  if you
were at one of the map edges and kicked away from map center while blind,
you'd get impossible("show_glyph: bad pos ...").  That was due to calling
feel_location() for the out of bounds location, which occurred after the
kick code had made use of invalid data so other problems might occur too.

     Now you kick "nothing" as if it was something (hence possibly wounding
your leg, taking some damage, potentially dying).  I didn't want to try to
classify the surrounding terrain as rock or air or whatever, and the thing
being kicked only shows up if the kick is fatal.
2007-01-27 04:33:16 +00:00
nethack.rankin
c36712aabe eating artifacts while poly'd
From the newsgroup:  if polymorphed into a metallivore, you could eat
artifacts that you couldn't touch with your hands.  Now you can't eat ones
which evade your grasp, and you take some damage from other touchy items
on--actually, prior to--the first bite.  (Those still "taste delicious" if
you survive; I'm not sure whether this ought to be changed.)
2007-01-25 06:24:39 +00:00
nethack.rankin
0bd89ff28d Confused #loot (trunk only)
Attempting to loot while suffering from confusion and not on top
of a container will drop gold if hero is carrying some, but it behaved
differently for GOLDOBJ config (gold dropped over a hole or down stairs
always stayed on current level) than for !GOLDOBJ (gold had a chance to
fall to lower level) when done at some location other than a throne.
This makes GOLDOBJ use dropx() instead of dropy(), same as !GOLDOBJ.

     And with access to a throne it can be used to repeatedly summon
monsters until they're extinct.  This makes it check for confusion before
finding containers, but the chest/exchequer code doesn't always kick in
so can't be attempted as many times before confusion expires, throttling
summoning a little.  Also, when placing hero's gold into a chest, it now
clears the contents-known flag and relocks the chest.
2007-01-25 05:01:01 +00:00
nethack.rankin
e93303eae4 hangup tweaks (trunk only)
Fix a typo in some conditional (NOSAVEONHANGUP) code, and tweak
SAFERHANGUP so that it doesn't defer hangup handling if the game hasn't
started yet or has already finished (it's possible to be waiting for a
--More-- prompt at end of game code before the hangup handler is reset,
so the regular handler could be called in that state).  Also, undefine
SAFERHANGUP if NOSAVEONHANGUP is defined, since there's no point in
deferring hangup for the latter.
2007-01-19 03:02:05 +00:00
nethack.rankin
697ec97812 hangup hangup bit (trunk only)
Accidentally left out  of the previous patch.
2007-01-18 05:12:36 +00:00
nethack.rankin
72abae042b hangup hangup (trunk only)
The last of my intended hangup overhaul.  Once hangup is detected,
replace currently loaded windowing routines with stubs that never do any
terminal I/O.  Real interface routines call their siblings directly rather
than via the windowprocs pointers, so this shouldn't pull the rug out from
under them, but it also can't prevent whatever they have in progress at
the time of hangup from attempting further I/O once the handler returns.
[We might want to change nhwindows_hangup() into winprocs.hangup_nhwindows()
so that each interface has more control over its own fate.]

     This assumes that user input of ESC and menu selection result of -1
everywhere in the core will eventually cause active function calls to
unwind their way back to moveloop() rather than to continually re-prompt.
(This assumption is not a new one, just a bit more explicit now.)
2007-01-18 04:16:03 +00:00
nethack.rankin
151dcad8fa hangup revamp (trunk only)
[See cvs log for src/cmd.c for more complete description.]

     This turns clearlocks() into a no-op during the period when the UNIX
port is asking the user to confirm whether to overwrite an existing game.
Also, this removes the duplication of code and function between hangup()
and end_of_input(), and it simplifies the check for whether hangups are
supported by adding new macro HANGUPHANDLING.  (I don't think global.h is
the best place to be defining that but I couldn't figure out where else
it would fit, other than repeating for individual xxxconf.h files.)  And
adds a couple more done_hup checks to try to cope with situations where
rhack() is being bypassed.  Lastly, having readchar() return EOF was
ignored for non-UNIX configs; now everybody gets ESC instead of letting
EOF be seen further inside the core.
2007-01-16 04:54:38 +00:00
nethack.rankin
b01f1f804f hangup revamp (trunk only)
The previous "hangup cleanup" didn't accomplish much (other than to
give everyone a good view of extern.h).  This one achieves more, and also
tries to fix the bug From a bug report:
> Buglet: Destroy old game -prompt can make game unrecoverable
>
> I haven't confirmed this myself, but few people playing on NAO
> have had the following happen:
> 1) play nethack
> 2) your network connection gets cut
> 3) reconnect, and get "Destroy old game" -prompt
> 4) your network connection gets cut, again, before you get to answer 'n'
> 5) game is not recoverable, because the level 0 file is gone.

     The reason for #5 is simple to explain; it's the expected behavior of
current hangup() routine (although that hasn't always called clearlocks();
I don't know why it was added).  The puzzle is why #2 left any lock files
around in the first place.  I suspect it was because SAFERHANGUP defers
until rhack(), and rhack() doesn't get called if the hero is immobilized or
in the midst of a counted operation.  I don't know how long a disconnected
process is allowed to run, but I don't think it's forever.  (Alternatively,
nethack might be attempting further terminal I/O and getting stuck on the
hung connection; this won't help much if that's the case.)

     This turns clearlocks() into a no-op during the period when the UNIX
port is asking the user to confirm whether to overwrite an existing game.
Also, this removes the duplication of code and function between hangup()
and end_of_input(), and it simplifies the check for whether hangups are
supported by adding new macro HANGUPHANDLING.  (I don't think global.h is
the best place to be defining that but I couldn't figure out where else
it would fit, other than repeating for individual xxxconf.h files.)  And
adds a couple more done_hup checks to try to cope with situations where
rhack() is being bypassed.  Lastly, having readchar() return EOF was
ignored for non-UNIX configs; now everybody gets ESC instead of letting
EOF be seen further inside the core.
2007-01-16 04:53:20 +00:00
nethack.rankin
b6778e36cf !GOLDOBJ gold in inventory during save/restore (trunk only)
Simplify the save/restore handling the !GOLDOBJ config does for gold
to maintain save/bones file compatibility with the GOLDOBJ config.
2007-01-12 04:18:40 +00:00
nethack.rankin
187b8dec9f need hands to throw
From the newsgroup:  slash'em lychanthrope character could throw
while in wolf form.  That came straight from nethack; any animal capable
of manipulating an object--possibly with its mouth--could throw things.
Now hands are required.  This doesn't require free hands, although it
probably should; it's kind of tough to imagine making a competent throw
while your hands are stuck to a cursed two-handed weapon.
2007-01-11 05:15:33 +00:00
nethack.rankin
538b91ddc9 hangup() cleanup; SIGXCPU handling (trunk only)
While looking at a bug report from two months ago about how having
hangup take place while at the "destroy old game?" prompt causes an
interrupted game to become unrecoverable, I decided to try to clean up
convoluted hangup() a bit.  Didn't achieve much there, but did notice that
the Unix port was handling SIGXCPU (whatever that is...) inconsistently.
This attempts to fix that, but I have no way to test it.

     The original bug report is still unresolved.

     makedefs ought to add something for SAFERHANGUP and NOSAVEONHANGUP
to the #version output.

[ This is the missing bit from the patch on Monday which accidentally
  included all of extern.h as its log entry message. ]
2007-01-11 03:39:15 +00:00
nethack.rankin
f2d8a53718 hangup() cleanup; SIGXCPU handling 2007-01-09 05:29:17 +00:00
nethack.rankin
1c20fe6223 gold in inventory bit (trunk only)
Update some disabled code in case it ever gets used.
2007-01-07 06:33:39 +00:00
nethack.rankin
8ec44f77b0 wizard mode bit
Wishing for a grave would say it made one even when it didn't.
[How come graves aren't allowed at corridor locations?]
2007-01-07 05:22:31 +00:00
nethack.rankin
7c93acbaf8 shopkeeper/priest movement
From a bug report:  shopkeeper
wouldn't move to block his doorway if there was a grave at that location.
Nothing supernatural; shopkeeper and temple priest movement was too
specific about what sort of terrain might be present and didn't know that
room floor might be replaced by a grave.
2007-01-07 05:11:09 +00:00
nethack.rankin
21caf64b86 !GOLDOBJ gold in inventory (trunk only)
Simplify the insertion into and removal from of gold in inventory for
the !GOLDOBJ configuration.  If GOLDOBJ ever becomes unconditional this
will be superfluous, but in the mean time it unclutters the container and
drop code.  Also, tweak a recent getobj() hack so that its purpose might
be a bit clearer.
2007-01-06 04:53:56 +00:00
nethack.rankin
15122d269c gold in menus fix (tty; GOLDOBJ for branch, both GOLDOBJ/!GOLDOBJ for trunk)
A recent change to force gold in inventory (during multi-item Drop or
applying/looting containers) to have '$' for its inventory letter for the
!GOLDOBJ configuration has revealed a bug which 3.4.3 has for the GOLDOBJ
configuration.  Specifying a count followed by '$' to use a subset of
carried gold didn't work under tty; the $ was treated as a group accelator
and overrode the count, so full stack was always used.  (The code a few
lines above this which counts the occurrences of group accelators already
includes this same fix:  ignore an item's group accelator when it matches
the selector.)

     I wouldn't be surprised if other interfaces are subject to the same
problem; since I can't test those I'm not attempting to fix them blindly.
2007-01-06 04:39:49 +00:00
nethack.rankin
f919f69251 container message tweaks (trunk only)
"You carefully open the <container>..." is rather tedious after
you've opened that container multiple times, so omit "carefully" once the
contents and lock-status are both known.  (I don't think it's possible
for a container to still be trapped in such circumstances, but even if it
is, you'll now stop being careful....)

     "<The container> is empty." becomes "<The container> is now empty."
if it just released Schroedinger's Cat.  Do the same if a cursed bag of
holding just destroyed the last of its contents.  Also, there's no need
to count the number of items inside a container; that dates to before the
container-and-contents overhaul done for 3.1.0.

     And for the loot menu, change "q - do nothing" to "q - done" if some
prior action (prodding the Cat into life or death, loss of any cursed bag
contents, or using ':' to look inside when contents aren't yet known) has
been enough to cause this container access to use up a turn.  I haven't
bothered to do the same in the help text for non-menu looting, which seems
like more trouble than it'd be worth.
2007-01-06 02:18:49 +00:00