From: PatR Date: Sun, 13 Dec 2015 14:15:54 +0000 (-0800) Subject: commit 8a13a4d2044264cf7427ba6a035021949788b5f1 X-Git-Tag: NetHack-3.6.1_RC01~1181 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50065303e11176aac2598409c34a00f1cd8e9bd5;p=nethack commit 8a13a4d2044264cf7427ba6a035021949788b5f1 Author: PatR Date: Sun Dec 13 06:06:58 2015 -0800 fix #H4066 - bug eating ring of protection Intrinsic protection of 0 (usually from having a gremlin steal divine protection, but also possible by eating a +0 ring of protection) does not contribute to "magic cancellation", the defense attribute that makes some special attacks fail. That's intended. Negative intrinsic protection (not possible from having divine protection, but turns out to be possible from eating negatively enchanted/charged rings of protection), did contribute. That wasn't intended, so stop it. (Positive intrinsic protection gives a magic cancellation of 1 if worn armor doesn't provide any MC.) --- diff --git a/doc/fixes36.1 b/doc/fixes36.1 index efd39ad2e..e9d8a81bf 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -24,6 +24,8 @@ change dipping prompt to not ignore 'called' and 'named' attributes of item avoid 'the unlabeled {scroll,spellbook} fades' when blank item is hit by water wrong message given when high priest on astral plane rejects being assigned a name (got the one for unique monsters instead of the one for priests) +negative intrinsic protection shouldn't confer MC=1, "you are warded" (not + possible from divine protection but is possible from eating rings) Platform- and/or Interface-Specific Fixes diff --git a/src/mhitu.c b/src/mhitu.c index 2d489a1c2..998c86be1 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mhitu.c $NHDT-Date: 1446854230 2015/11/06 23:57:10 $ $NHDT-Branch: master $:$NHDT-Revision: 1.130 $ */ +/* NetHack 3.6 mhitu.c $NHDT-Date: 1450016149 2015/12/13 14:15:49 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.131 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -827,7 +827,7 @@ struct monst *mon; } else if (mc < 1) { /* intrinsic Protection is weaker (play balance; obtaining divine protection is too easy); it confers minimum mc 1 instead of 0 */ - if ((is_you && ((HProtection && u.ublessed) || u.uspellprot)) + if ((is_you && ((HProtection && u.ublessed > 0) || u.uspellprot)) /* aligned priests and angels have innate intrinsic Protection */ || (mon->data == &mons[PM_ALIGNED_PRIEST] || is_minion(mon->data))) mc = 1;