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.
This commit is contained in:
nethack.rankin
2006-05-27 04:13:20 +00:00
parent 7190f5a497
commit 12586f6ee8
2 changed files with 6 additions and 0 deletions

View 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

View 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) ?