fix #K4026 - "object lost" panic during theft

"object lost" panic occurred when hero's worn amulet of magical
breathing was stolen.  This prevents drown() -> emergency_disrobe()
from dropping an item while in the midst of it being stolen, avoiding
the possibility of it no longer being in inventory when the theft
completes.  There may be variations other than drowning that lead to
unwear -> drop-or-destroy that are still vulnerable, and this fix can
potentially cause items to vanish from hangup save files.

It also has a side-effect of not being able to drop levitation boots
to lighten encumbrance enough to crawl out of water if the drowning
occurs while they are being taken off, not just when being stolen,
even though they should be easily droppable in such circumstance.  The
hero will just need to drop other things instead.
This commit is contained in:
PatR
2023-11-01 01:54:32 -07:00
parent c8a84acfa5
commit fa0f3751a3
3 changed files with 41 additions and 3 deletions

View File

@@ -1266,6 +1266,9 @@ if a temple was entered while blind, #overview could show a line of just "."
rolling boulders ignored walls and trees
shopkeepers consider the monster type when charging for tins, eggs and corpses
separate level flags premapped and sokoban
hero had worn amulet of magical breathing become unworn during theft by nymph,
dropped it to be able to crawl out of water, so it wasn't there when
game tried to transfer it to thief, triggering an "object lost" panic
Fixes to 3.7.0-x General Problems Exposed Via git Repository