]> granicus.if.org Git - nethack/commitdiff
vampire bit (trunk only)
authornethack.rankin <nethack.rankin>
Thu, 6 Oct 2005 03:57:15 +0000 (03:57 +0000)
committernethack.rankin <nethack.rankin>
Thu, 6 Oct 2005 03:57:15 +0000 (03:57 +0000)
     Vampires' aversion to altars is retained when they've shapeshifted
into their assorted alternate forms.

src/monmove.c

index c757ec8b469208890fbc67c9a0cbc656edd4c4a3..43cd4f7e56ed2a7c9b50dd6ba6c5e5386e4e2567 100644 (file)
@@ -125,12 +125,13 @@ struct monst *mtmp;
            is_rider(mtmp->data) || mtmp->data == &mons[PM_MINOTAUR])
                return(FALSE);
 
-       return (boolean)(sobj_at(SCR_SCARE_MONSTER, x, y)
+       return (boolean)(sobj_at(SCR_SCARE_MONSTER, x, y) ||
 #ifdef ELBERETH
-                        || sengr_at("Elbereth", x, y)
+                        sengr_at("Elbereth", x, y) ||
 #endif
-                        || (mtmp->data->mlet == S_VAMPIRE
-                            && IS_ALTAR(levl[x][y].typ)));
+                        (IS_ALTAR(levl[x][y].typ) &&
+                           (mtmp->data->mlet == S_VAMPIRE ||
+                            is_vampshifter(mtmp))));
 }
 
 /* regenerate lost hit points */