]> granicus.if.org Git - nethack/commit
levitation timeout vs traps (trunk only)
authornethack.rankin <nethack.rankin>
Thu, 23 Nov 2006 03:06:19 +0000 (03:06 +0000)
committernethack.rankin <nethack.rankin>
Thu, 23 Nov 2006 03:06:19 +0000 (03:06 +0000)
commit6a081301c62e01fe5402a4f207d87afbb635c064
tree75d27589d5e63badf69abc42a65c9e68a846eb91
parenta29bf9d63dba22d216be9c638faee168e93acaad
levitation timeout vs traps (trunk only)

<email deleted>:
> If you enter a magic trap on the same turn that you lose your levitation
> and "float gently to the floor", you are hit by the trap twice.

     I don't think this is actually a bug, but it does look fairly strange
if there aren't any monsters attacking (after you move on to the trap,
monsters get a chance to move too before timeouts are run, but if there
aren't any messages triggered by monster activity then it feels like the
timeout and second activation happens immediately).  To prevent this, if
levitation is due to time out on the same turn that a trap is being
entered, either extend the duration by an extra move or make it end
immediately instead of waiting until end of current turn.  Deferring
timeout is a lot easier but doing that unconditionally would allow player
to move back and forth between adjacent traps without ever descending.
The early timeout might lead to anomalous behavior in obscure cases; it
seems to be working ok so far though.
doc/fixes35.0
src/hack.c