]> granicus.if.org Git - nethack/commitdiff
unseen monsters vs hiding hero
authornethack.rankin <nethack.rankin>
Sat, 27 May 2006 04:13:20 +0000 (04:13 +0000)
committernethack.rankin <nethack.rankin>
Sat, 27 May 2006 04:13:20 +0000 (04:13 +0000)
     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.

doc/fixes34.4
src/mhitu.c

index 80ad4a52ffdce03942c5f27f469cabe3834d0a69..1c1226ad171c5eb8f33d95befa6a0e971c03a196 100644 (file)
@@ -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
index 7e62f4c2797c7066550c24532e50c1c87cdd4ca7..d0f1a3ba42706edba8a5fdcdedc170e24d66efb1 100644 (file)
@@ -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) ?