]> granicus.if.org Git - nethack/commitdiff
unseen monster messages
authorcohrs <cohrs>
Mon, 4 Feb 2002 05:00:41 +0000 (05:00 +0000)
committercohrs <cohrs>
Mon, 4 Feb 2002 05:00:41 +0000 (05:00 +0000)
- 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"

src/dokick.c
src/mcastu.c
src/teleport.c

index 90593e5b7cc801cdb741388fb4a70fd8dc0c5d4d..4b5933e89a9e322602587a0c98380b8de99127f1 100644 (file)
@@ -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);
index 255fd0a96fa719ea081190066da2974cdb3b0a13..563e43baa4aaada96ff487cf270e85f964104ca8 100644 (file)
@@ -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
index 85d38c78823a47fe3a6cf1d3c04fe01e808a11fa..c101d412b59a83a211c584d17bde2eb0aee2eb46 100644 (file)
@@ -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();
 }