]> granicus.if.org Git - nethack/commitdiff
attrcurse() on 'see invisible'
authorPatR <rankin@nethack.org>
Sun, 12 Dec 2021 19:32:09 +0000 (11:32 -0800)
committerPatR <rankin@nethack.org>
Sun, 12 Dec 2021 19:32:09 +0000 (11:32 -0800)
If hero has intrinsic see-invisible and a gremlin steals that, the
map wasn't being updated to hide invisible monsters (until the next
iteration of moveloop() after other monsters finished current turn).

doc/fixes37.0
src/display.c
src/sit.c

index bfe6e5fb9ba63df752313d4e0aaeb499d3619be9..eff95f2c4a4b5760a9e2f526ebe0fa2c0fd1cd9a 100644 (file)
@@ -711,6 +711,7 @@ fix some inconsistencies with applied bullwhip vs monster
 polymorphing while wearing an amulet of strangulation from a form that wasn't
        vulnerable to one that was gave wrong message ("still constricts")
 for accessibility reasons, give a message when monster teleports
+if a gremlin stole intrinsic 'see invisible' the map wasn't updated properly
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index 64da6c2f0280aed76222016abcea28d1ce46e0ba..a0812547bd8c837b6025b880b055e933cc0eb10f 100644 (file)
@@ -1265,6 +1265,7 @@ under_ground(int mode)
  *      + hallucinating
  *      + doing a full screen redraw
  *      + see invisible times out or a ring of see invisible is taken off
+ *        or intrinsic see invisible is stolen by a gremlin
  *      + when a potion of see invisible is quaffed or a ring of see
  *        invisible is put on
  *      + gaining telepathy when blind [givit() in eat.c, pleased() in pray.c]
index ef016650f42315ed65a7341998983fca21ea0424..a62e456ffd9e4221c6ed45655cb65366da2d39b4 100644 (file)
--- a/src/sit.c
+++ b/src/sit.c
@@ -479,6 +479,12 @@ attrcurse(void)
     case 7:
         if (HSee_invisible & INTRINSIC) {
             HSee_invisible &= ~INTRINSIC;
+            if (!See_invisible) {
+                set_mimic_blocking();
+                see_monsters();
+                /* might not be able to see self anymore */
+                newsym(u.ux, u.uy);
+            }
             You("%s!", Hallucination ? "tawt you taw a puttie tat"
                                      : "thought you saw something");
             break;