From: cohrs Date: Mon, 4 Feb 2002 05:00:41 +0000 (+0000) Subject: unseen monster messages X-Git-Tag: MOVE2GIT~3273 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a197060b43b344214d78422c19b86f32f442a85;p=nethack unseen monster messages - watch messages if you can't see the watch now start "You hear" - unseen spellcaster messages are shown as "Something", to remove some silly message pairs. - unseen spellcaster that casts at itself causes no message - recalc vision before spoteffects messsages, to avoid invalid "It" --- diff --git a/src/dokick.c b/src/dokick.c index 90593e5b7..4b5933e89 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -1022,7 +1022,10 @@ dumb: mtmp->data == &mons[PM_WATCH_CAPTAIN]) && couldsee(mtmp->mx, mtmp->my) && mtmp->mpeaceful) { - pline("%s yells:", Amonnam(mtmp)); + if (canspotmon(mtmp)) + pline("%s yells:", Amonnam(mtmp)); + else + You_hear("someone yell:"); verbalize("Halt, thief! You're under arrest!"); (void) angry_guards(FALSE); break; @@ -1038,7 +1041,10 @@ dumb: if ((mtmp->data == &mons[PM_WATCHMAN] || mtmp->data == &mons[PM_WATCH_CAPTAIN]) && mtmp->mpeaceful && couldsee(mtmp->mx, mtmp->my)) { - pline("%s yells:", Amonnam(mtmp)); + if (canspotmon(mtmp)) + pline("%s yells:", Amonnam(mtmp)); + else + You_hear("someone yell:"); if(levl[x][y].looted & D_WARNED) { verbalize("Halt, vandal! You're under arrest!"); (void) angry_guards(FALSE); diff --git a/src/mcastu.c b/src/mcastu.c index 255fd0a96..563e43baa 100644 --- a/src/mcastu.c +++ b/src/mcastu.c @@ -213,7 +213,7 @@ castmu(mtmp, mattk, thinks_it_foundyou, foundyou) if (!foundyou && thinks_it_foundyou && !is_undirected_spell(mattk->adtyp, spellnum)) { pline("%s casts a spell at %s!", - canseemon(mtmp) ? Monnam(mtmp) : "It", + canseemon(mtmp) ? Monnam(mtmp) : "Something", levl[mtmp->mux][mtmp->muy].typ == WATER ? "empty water" : "thin air"); return(0); @@ -225,14 +225,17 @@ castmu(mtmp, mattk, thinks_it_foundyou, foundyou) pline_The("air crackles around %s.", mon_nam(mtmp)); return(0); } - pline("%s casts a spell%s!", Monnam(mtmp), - is_undirected_spell(mattk->adtyp, spellnum) ? "" : - (Invisible && !perceives(mtmp->data) && - (mtmp->mux != u.ux || mtmp->muy != u.uy)) ? - " at a spot near you" : - (Displaced && (mtmp->mux != u.ux || mtmp->muy != u.uy)) ? - " at your displaced image" : - " at you"); + if (canspotmon(mtmp) || !is_undirected_spell(mattk->adtyp, spellnum)) { + pline("%s casts a spell%s!", + canspotmon(mtmp) ? Monnam(mtmp) : "Something", + is_undirected_spell(mattk->adtyp, spellnum) ? "" : + (Invisible && !perceives(mtmp->data) && + (mtmp->mux != u.ux || mtmp->muy != u.uy)) ? + " at a spot near you" : + (Displaced && (mtmp->mux != u.ux || mtmp->muy != u.uy)) ? + " at your displaced image" : + " at you"); + } /* * As these are spells, the damage is related to the level diff --git a/src/teleport.c b/src/teleport.c index 85d38c788..c101d412b 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -272,6 +272,7 @@ register int nux,nuy; see_monsters(); vision_full_recalc = 1; nomul(0); + vision_recalc(0); /* vision before effects */ spoteffects(TRUE); invocation_message(); }