]> granicus.if.org Git - nethack/commit
mimicking by pets (trunk only)
authornethack.rankin <nethack.rankin>
Fri, 10 Feb 2012 09:29:28 +0000 (09:29 +0000)
committernethack.rankin <nethack.rankin>
Fri, 10 Feb 2012 09:29:28 +0000 (09:29 +0000)
commitcbfe97cf51c910867c698a63678b0a6d2cffc4df
treea28a66a933c43c80c3ac45984d668fb4eaf9cf32
parent6ac27851a6bed11579c032afd3cdc350fef17c6e
mimicking by pets (trunk only)

     I killed a mimic in a shop, then left.  My dog or cat entered that shop
where I could no longer see it, and I got
    You see a tripe ration appear where it was!
when it evidently ate the corpse, without me being able to see any such thing.
This fix is only approximate but I didn't want to figure out all the
permutations of esp or prolonged monster detection or infravision.  (There
probably aren't as many permutations as I first thought since only "ordinary"
pets will take on alternate monster form, so won't ever switch from detectable
via esp to not detectable or vice versa.  Maybe this is good enough.)

     No fixes entry; this is post-3.4.3 code.  There was an early return with
a comment stating that idx==0 was impossible.  I took that out since 0 is not
only possible, it's a valid index into the array of transformations.
src/dogmove.c