From: Pasi Kallinen Date: Sat, 28 Jan 2023 18:25:49 +0000 (+0200) Subject: Don't let monsters loot Schroedinger's box X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=734dcfdabed9b4ab02825c21e0d95561279db034;p=nethack Don't let monsters loot Schroedinger's box --- diff --git a/src/muse.c b/src/muse.c index 3277efef7..22a412adc 100644 --- a/src/muse.c +++ b/src/muse.c @@ -2021,6 +2021,7 @@ find_misc(struct monst* mtmp) } nomore(MUSE_BAG); if (Is_container(obj) && obj->otyp != BAG_OF_TRICKS && !rn2(5) + && !SchroedingersBox(obj) && !gm.m.has_misc && Has_contents(obj) && !obj->olocked && !obj->otrapped) { gm.m.misc = obj; @@ -2062,6 +2063,8 @@ mloot_container( /* FIXME: handle cursed bag of holding */ if (Is_mbag(container) && container->cursed) return res; /* 0 */ + if (SchroedingersBox(container)) + return res; switch (rn2(10)) { default: /* case 0, 1, 2, 3: */