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"
This commit is contained in:
cohrs
2002-02-04 05:00:41 +00:00
parent 1a72729895
commit 1a197060b4
3 changed files with 21 additions and 11 deletions
+8 -2
View File
@@ -1022,7 +1022,10 @@ dumb:
mtmp->data == &mons[PM_WATCH_CAPTAIN]) && mtmp->data == &mons[PM_WATCH_CAPTAIN]) &&
couldsee(mtmp->mx, mtmp->my) && couldsee(mtmp->mx, mtmp->my) &&
mtmp->mpeaceful) { 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!"); verbalize("Halt, thief! You're under arrest!");
(void) angry_guards(FALSE); (void) angry_guards(FALSE);
break; break;
@@ -1038,7 +1041,10 @@ dumb:
if ((mtmp->data == &mons[PM_WATCHMAN] || if ((mtmp->data == &mons[PM_WATCHMAN] ||
mtmp->data == &mons[PM_WATCH_CAPTAIN]) && mtmp->data == &mons[PM_WATCH_CAPTAIN]) &&
mtmp->mpeaceful && couldsee(mtmp->mx, mtmp->my)) { 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) { if(levl[x][y].looted & D_WARNED) {
verbalize("Halt, vandal! You're under arrest!"); verbalize("Halt, vandal! You're under arrest!");
(void) angry_guards(FALSE); (void) angry_guards(FALSE);
+12 -9
View File
@@ -213,7 +213,7 @@ castmu(mtmp, mattk, thinks_it_foundyou, foundyou)
if (!foundyou && thinks_it_foundyou && if (!foundyou && thinks_it_foundyou &&
!is_undirected_spell(mattk->adtyp, spellnum)) { !is_undirected_spell(mattk->adtyp, spellnum)) {
pline("%s casts a spell at %s!", pline("%s casts a spell at %s!",
canseemon(mtmp) ? Monnam(mtmp) : "It", canseemon(mtmp) ? Monnam(mtmp) : "Something",
levl[mtmp->mux][mtmp->muy].typ == WATER levl[mtmp->mux][mtmp->muy].typ == WATER
? "empty water" : "thin air"); ? "empty water" : "thin air");
return(0); return(0);
@@ -225,14 +225,17 @@ castmu(mtmp, mattk, thinks_it_foundyou, foundyou)
pline_The("air crackles around %s.", mon_nam(mtmp)); pline_The("air crackles around %s.", mon_nam(mtmp));
return(0); return(0);
} }
pline("%s casts a spell%s!", Monnam(mtmp), if (canspotmon(mtmp) || !is_undirected_spell(mattk->adtyp, spellnum)) {
is_undirected_spell(mattk->adtyp, spellnum) ? "" : pline("%s casts a spell%s!",
(Invisible && !perceives(mtmp->data) && canspotmon(mtmp) ? Monnam(mtmp) : "Something",
(mtmp->mux != u.ux || mtmp->muy != u.uy)) ? is_undirected_spell(mattk->adtyp, spellnum) ? "" :
" at a spot near you" : (Invisible && !perceives(mtmp->data) &&
(Displaced && (mtmp->mux != u.ux || mtmp->muy != u.uy)) ? (mtmp->mux != u.ux || mtmp->muy != u.uy)) ?
" at your displaced image" : " at a spot near you" :
" at 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 * As these are spells, the damage is related to the level
+1
View File
@@ -272,6 +272,7 @@ register int nux,nuy;
see_monsters(); see_monsters();
vision_full_recalc = 1; vision_full_recalc = 1;
nomul(0); nomul(0);
vision_recalc(0); /* vision before effects */
spoteffects(TRUE); spoteffects(TRUE);
invocation_message(); invocation_message();
} }