From: PatR Date: Sun, 26 Apr 2020 02:17:46 +0000 (-0700) Subject: fix previous #332 fix X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=42ffce0e5d163754cb05c201345acc4c165bd050;p=nethack fix previous #332 fix Add missing visibility check. --- diff --git a/src/mhitm.c b/src/mhitm.c index 26b598298..4e648d0c7 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -976,9 +976,11 @@ int dieroll; now we'll know and might need to deliver skipped message (note: if there's no message there'll be no auxilliary damage so the message here isn't coming too late) */ - if (!artifact_hit(magr, mdef, mwep, &tmp, dieroll)) - pline("%s hits %s.", Monnam(magr), - mon_nam_too(mdef, magr)); + if (!artifact_hit(magr, mdef, mwep, &tmp, dieroll)) { + if (g.vis) + pline("%s hits %s.", Monnam(magr), + mon_nam_too(mdef, magr)); + } /* artifact_hit updates 'tmp' but doesn't inflict any damage; however, it might cause carried items to be destroyed and they might do so */