diff --git a/doc/fixes37.0 b/doc/fixes37.0 index ecae26886..fe805db69 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.522 $ $NHDT-Date: 1620076691 2021/05/03 21:18:11 $ +NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.524 $ $NHDT-Date: 1620326528 2021/05/06 18:42:08 $ General Fixes and Modified Features ----------------------------------- @@ -497,6 +497,8 @@ change "killed by , while {paralyzed|frozen} by " into offended an unseen demon lord Entering a special room, only wake up the monsters in that room instead of doing a level-wide wake-up +any blessed key was behaving as if was the rogue's Master Key when unlocking + a trapped chest or box Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/artifact.c b/src/artifact.c index 1202369e1..c50b7c426 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 artifact.c $NHDT-Date: 1606765210 2020/11/30 19:40:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.161 $ */ +/* NetHack 3.7 artifact.c $NHDT-Date: 1620326528 2021/05/06 18:42:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.167 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2151,11 +2151,13 @@ boolean is_magic_key(struct monst *mon, /* if null, non-rogue is assumed */ struct obj *obj) { - if (((obj && obj->oartifact == ART_MASTER_KEY_OF_THIEVERY) - && ((mon == &g.youmonst) ? Role_if(PM_ROGUE) - : (mon && mon->data == &mons[PM_ROGUE]))) - ? !obj->cursed : obj->blessed) - return TRUE; + if (obj && obj->oartifact == ART_MASTER_KEY_OF_THIEVERY) { + if ((mon == &g.youmonst) ? Role_if(PM_ROGUE) + : (mon && mon->data == &mons[PM_ROGUE])) + return !obj->cursed; /* a rogue; non-cursed suffices for magic */ + /* not a rogue; key must be blessed to behave as a magic one */ + return obj->blessed; + } return FALSE; }