more vault guard (trunk only)

Fix several obscure bugs that can happen when a guard leads someone
out of a vault:
1) non-pit traps created in the temporary corridor would persist inside
   solid rock after the corridor was removed (pits dug by the hero were
   explicitly removed but several other trap types are possible);
2) lighting the corridor with scroll/wand/spell left the affected spots
   flagged as lit after they reverted to rock; tunneling through that
   area, either by digging or by teleporting back to the vault and having
   another guard appear, unearthed lit corridor there;
3) if you became encased in solid rock because you were in the temporary
   corridor when it was removed (which will happen if the guard is killed
   while you're in his corridor), you were only told so if you saw part of
   it revert to rock; when blind, you simply found yourself unable to move;
4) dragging an iron ball in the temporary corridor could result in part
   of that corridor becoming permanent if the guard was killed; in 3.4.3,
   it would only occur if the cause of death took away all the guard's
   hit points (which happens for most but not all deaths); in development
   code after my recent patch, that would be every cause of death.
#4 could also yield "dmonsfree: <N+1> removed doesn't match <N> pending"
warning in 3.4.3 when the fmon list was scanned and a guard at <0,0> with
no hit points was found but hadn't passed through to the end of mondead()
and m_detach().  The previous patch fixed that, I think/hope.  Most guard
deaths won't trigger that; grddead() moves the guard to <0,0> but then
removes the temp corridor on its second try, returns true, and mondead()
finishes normally.
This commit is contained in:
nethack.rankin
2011-10-13 00:31:13 +00:00
parent 909ac45014
commit 30b3e5a2ea
5 changed files with 75 additions and 19 deletions

View File

@@ -384,6 +384,14 @@ when dying outside all shops on a level with multiple shopkeepers and one takes
hero poly'd into a critter without hands could still open tins
if a vault guard was killed, his inventory would be dropped at <0,0>
throwing gold to/at a vault guard will no longer be treated as an attack
non-pit traps created in vault guard's temporary corridor would remain after
the location reverted to solid rock
using magic to light vault guard's temporary corridor would produce lit solid
rock after reversion, and then yield lit corridor if dug out again
if hero was blind, killing the vault guard while in his temporary corridor
would leave hero encased in solid rock without informing player
if hero dragged iron ball into temporary corridor and then killed vault guard,
the portion of corridor currently in existence would become permanent
Platform- and/or Interface-Specific Fixes