From: nethack.rankin Date: Sat, 27 May 2006 04:13:20 +0000 (+0000) Subject: unseen monsters vs hiding hero X-Git-Tag: MOVE2GIT~998 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=12586f6ee8a7ce03eda9f4de1d2e015f6089cb28;p=nethack unseen monsters vs hiding hero While testing the hiding vs traps patch, I became a mimic and hid. It gets stuck to you. Huh? Nothing was visible; nothing became visible (aside from the ']' at my position changing back to 'm'). Display the invisible monster glyph when an unseen monster bumps into you while you're hiding or mimicking gold. That's usually handled by the hit and miss routines, but they aren't used when you're just brought out of hiding instead of attacked. --- diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 80ad4a52f..1c1226ad1 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -231,6 +231,8 @@ specifying role and/or race along with an invalid alignment for it/them in mentioned the rejected alignment when asking player to pick alignment temple donation can recover protection previously stolen by attrcurse attack even when protection amount is so big that no increment would be given +display the invisible monster glyph ('I') whenever an unseen monster forces + poly'd hero out of hiding Platform- and/or Interface-Specific Fixes diff --git a/src/mhitu.c b/src/mhitu.c index 7e62f4c27..d0f1a3ba4 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -343,6 +343,7 @@ mattacku(mtmp) #endif if (u.uundetected && !range2 && foundyou && !u.uswallow) { + if (!canspotmon(mtmp)) map_invisible(mtmp->mx, mtmp->my); u.uundetected = 0; if (is_hider(youmonst.data) && u.umonnum != PM_TRAPPER) { coord cc; /* maybe we need a unexto() function? */ @@ -420,8 +421,10 @@ mattacku(mtmp) } return(0); } + if (youmonst.data->mlet == S_MIMIC && youmonst.m_ap_type && !range2 && foundyou && !u.uswallow) { + if (!canspotmon(mtmp)) map_invisible(mtmp->mx, mtmp->my); if (!youseeit) pline("It gets stuck on you."); else pline("Wait, %s! That's a %s named %s!", m_monnam(mtmp), youmonst.data->mname, plname); @@ -434,6 +437,7 @@ mattacku(mtmp) /* player might be mimicking an object */ if (youmonst.m_ap_type == M_AP_OBJECT && !range2 && foundyou && !u.uswallow) { + if (!canspotmon(mtmp)) map_invisible(mtmp->mx, mtmp->my); if (!youseeit) pline("%s %s!", Something, (likes_gold(mtmp->data) && youmonst.mappearance == GOLD_PIECE) ?