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

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

View 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

View 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();
}