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.
This commit is contained in:
nethack.rankin
2006-06-01 03:54:25 +00:00
parent ac49eb5b84
commit a72e370899
2 changed files with 34 additions and 6 deletions

View File

@@ -143,6 +143,8 @@ don't give attribute adjustment messages ("you feel wise") unless the current
meditating monsters stop meditating when affected by something which wakes
sleeping mosnters
monsters capable of hiding can't do so when trapped or while holding you
limit recursive calls to spoteffects (poly'd hero fell into water, reverted
to human because of it, fell into same water, then crawled out twice)
Platform- and/or Interface-Specific Fixes