]> granicus.if.org Git - nethack/commitdiff
Prevent monsters from picking up locked containers
authorPasi Kallinen <paxed@alt.org>
Thu, 24 Dec 2020 20:37:58 +0000 (22:37 +0200)
committerPasi Kallinen <paxed@alt.org>
Thu, 24 Dec 2020 20:37:58 +0000 (22:37 +0200)
src/muse.c

index e30bee61e3e2c2aafb2ed478606df773f4871677..a9fadee8b8e4d2f73a7a21ee3f236d8dc00a5461 100644 (file)
@@ -2407,7 +2407,8 @@ struct obj *obj;
                               && mon->data != &mons[PM_KI_RIN]);
         if (typ == FROST_HORN || typ == FIRE_HORN)
             return (obj->spe > 0 && can_blow(mon));
-        if (Is_container(obj) && !(Is_mbag(obj) && obj->cursed))
+        if (Is_container(obj) && !(Is_mbag(obj) && obj->cursed)
+            && !obj->olocked)
             return TRUE;
         break;
     case FOOD_CLASS: