talking to quest guardians from other class

prevent quest guardians from other classes from talking to you as if they
were your quest guardian
This commit is contained in:
nethack.allison
2003-08-19 04:56:23 +00:00
parent 3372f5d694
commit 61c3188405
2 changed files with 9 additions and 1 deletions

View File

@@ -133,6 +133,8 @@ digging a pit while stuck in the floor should always free the player
quest guardians can no longer be created via stone-to-flesh on their statue
stone-to-flesh no longer silently ignored by a statue of a unique monster
wishing for quest guardian corpse now gives a generic corpse of the species
prevent quest guardians from other classes from talking to you as if they
were your quest guardian
Platform- and/or Interface-Specific Fixes

View File

@@ -435,6 +435,12 @@ register struct monst *mtmp;
if (!flags.soundok) return(0);
if (is_silent(ptr)) return(0);
/* Make sure its your role's quest quardian; adjust if not */
if (ptr->msound == MS_GUARDIAN && ptr != &mons[urole.guardnum]) {
int mndx = monsndx(ptr);
ptr = &mons[genus(mndx)];
}
/* be sure to do this before talking; the monster might teleport away, in
* which case we want to check its pre-teleport position
*/
@@ -578,7 +584,7 @@ register struct monst *mtmp;
pline_msg = "squeaks.";
break;
case MS_SQAWK:
if (mtmp->data == &mons[PM_RAVEN] && !mtmp->mpeaceful)
if (ptr == &mons[PM_RAVEN] && !mtmp->mpeaceful)
verbl_msg = "Nevermore!";
else
pline_msg = "squawks.";