fix U100 - vampire stoning buf

Fix the reported bug of a vampire that is wearing gloves being
able to bite a cockatrice without becoming petrified.
This commit is contained in:
nethack.rankin
2002-10-18 06:49:34 +00:00
parent 2f6d82dcc6
commit 7411e1daf5
4 changed files with 85 additions and 33 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)mhitu.c 3.4 2002/03/29 */
/* SCCS Id: @(#)mhitu.c 3.4 2002/10/17 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -2390,15 +2390,16 @@ register struct attack *mattk;
goto assess_dmg;
case AD_STON: /* cockatrice */
{
int protector =
mattk->aatyp == AT_TENT ? 0 :
mattk->aatyp == AT_KICK ? W_ARMF : W_ARMG;
if (!resists_ston(mtmp) &&
(mattk->aatyp != AT_WEAP || !MON_WEP(mtmp)) &&
mattk->aatyp != AT_GAZE && mattk->aatyp != AT_EXPL &&
mattk->aatyp != AT_MAGC &&
!(mtmp->misc_worn_check & protector)) {
if(poly_when_stoned(mtmp->data)) {
long protector = attk_protection(mattk->aatyp),
wornitems = mtmp->misc_worn_check;
/* wielded weapon gives same protection as gloves here */
if (MON_WEP(mtmp) != 0) wornitems |= W_ARMG;
if (!resists_ston(mtmp) && (protector == 0L ||
(protector != ~0L &&
(wornitems & protector) != protector))) {
if (poly_when_stoned(mtmp->data)) {
mon_to_stone(mtmp);
return (1);
}