From: cohrs Date: Tue, 1 Jul 2003 01:33:42 +0000 (+0000) Subject: B04001 - Staff of Aesclepius message while swallowed X-Git-Tag: MOVE2GIT~1913 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=00c666a80ff85922eab82d5360ab3624c2b38754;p=nethack B04001 - Staff of Aesclepius message while swallowed Since cansee() is false for all locations while swallowed, need to test if the monster being hit is the one that swallowed you to ensure that various artifact hit messages, including the DRLI message, are printed. --- diff --git a/doc/fixes34.2 b/doc/fixes34.2 index 036ca72ed..436409b40 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -98,6 +98,7 @@ geographical shopkeeper updates stethoscope use should be free the first time it's use per player move travel command caches last position to make non-mouse less painful update pit trapped time when polymorphing to or from a monster that passes_walls +show artifact hit message which affect the monster that swallowed the hero Platform- and/or Interface-Specific Fixes diff --git a/src/artifact.c b/src/artifact.c index 8ee060795..eb758c631 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -942,7 +942,8 @@ int dieroll; /* needed for Magicbane and vorpal blades */ boolean youattack = (magr == &youmonst); boolean youdefend = (mdef == &youmonst); boolean vis = (!youattack && magr && cansee(magr->mx, magr->my)) - || (!youdefend && cansee(mdef->mx, mdef->my)); + || (!youdefend && cansee(mdef->mx, mdef->my)) + || (youattack && u.uswallow && mdef == u.ustuck && !Blind); boolean realizes_damage; const char *wepdesc; static const char you[] = "you";