#turn fix

Don't report that undead monsters are "turning to flee"
when they're about to be made peaceful or killed outright,
and add a missing alignment fixup for the case where they do
get made peaceful.

     Also, a trivial bit that only matters when using wizard
mode to wish for altars.  To #offer the Amulet you need to be
on the Astral level rather than just anywhere in the endgame.
This commit is contained in:
nethack.rankin
2002-03-03 04:28:08 +00:00
parent 9fdde2b3aa
commit b1b5e13bfa

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)pray.c 3.4 2002/01/15 */
/* SCCS Id: @(#)pray.c 3.4 2002/03/02 */
/* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1182,7 +1182,7 @@ dosacrifice()
} /* corpse */
if (otmp->otyp == AMULET_OF_YENDOR) {
if (!In_endgame(&u.uz)) {
if (!Is_astralevel(&u.uz)) {
if (Hallucination)
You_feel("homesick.");
else
@@ -1634,22 +1634,23 @@ doturn()
switch (mtmp->data->mlet) {
/* this is intentional, lichs are tougher
than zombies. */
case S_LICH: xlev += 2;
case S_GHOST: xlev += 2;
case S_VAMPIRE: xlev += 2;
case S_WRAITH: xlev += 2;
case S_MUMMY: xlev += 2;
case S_LICH: xlev += 2; /*FALLTHRU*/
case S_GHOST: xlev += 2; /*FALLTHRU*/
case S_VAMPIRE: xlev += 2; /*FALLTHRU*/
case S_WRAITH: xlev += 2; /*FALLTHRU*/
case S_MUMMY: xlev += 2; /*FALLTHRU*/
case S_ZOMBIE:
monflee(mtmp, 0, FALSE, TRUE); /* at least */
if(u.ulevel >= xlev &&
!resist(mtmp, '\0', 0, NOTELL)) {
if(u.ualign.type == A_CHAOTIC) {
if (u.ulevel >= xlev &&
!resist(mtmp, '\0', 0, NOTELL)) {
if (u.ualign.type == A_CHAOTIC) {
mtmp->mpeaceful = 1;
set_malign(mtmp);
} else { /* damn them */
killed(mtmp);
}
}
break;
break;
} /* else flee */
/*FALLTHRU*/
default:
monflee(mtmp, 0, FALSE, TRUE);
break;