]> granicus.if.org Git - nethack/commitdiff
Add message for failed fountain monster detection
authorMichael Meyer <me@entrez.cc>
Thu, 7 Apr 2022 16:51:35 +0000 (12:51 -0400)
committerPatR <rankin@nethack.org>
Fri, 8 Apr 2022 17:11:20 +0000 (10:11 -0700)
When the fountain quaffing monster detection effect was triggered on a
level without any monsters, no message would be printed.  I think this
was the only scenario where drinking from a fountain wouldn't print
anything, so it stood out as unusual.

Print a messsage in the case monster detection fails, to make it
consistent with other fountain effects and ensure it's clear the hero
did still drink from the fountain on that turn.  I used "the water
tastes like nothing" for the (sort of tenuous) connection to there being
nothing living on the level, but there might be a better message to put
in there.

src/fountain.c

index 5a31c34b84725631760f92dc4c484538fcb08171..7f315e972b95b0f630fda926e8092076a083b4dc 100644 (file)
@@ -332,7 +332,8 @@ drinkfountain(void)
             exercise(A_WIS, TRUE);
             break;
         case 26: /* See Monsters */
-            (void) monster_detect((struct obj *) 0, 0);
+            if (monster_detect((struct obj *) 0, 0))
+                pline_The("%s tastes like nothing.", hliquid("water"));
             exercise(A_WIS, TRUE);
             break;
         case 27: /* Find a gem in the sparkling waters. */