From: cohrs Date: Mon, 8 Jul 2002 00:15:27 +0000 (+0000) Subject: R853 - Items inside statues lost X-Git-Tag: MOVE2GIT~2658 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=632e741a525e9fba88e49e94668cb8a8b3686676;p=nethack R853 - Items inside statues lost If you cast stone to flesh on a statue on a location containing a monster, the statue would be turned into a corpse and the contents lost. This didn't seem to be appropriate for the spell. Now the contents spill out. --- diff --git a/doc/fixes34.1 b/doc/fixes34.1 index ca6906063..17d696a5f 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -149,6 +149,8 @@ eating various rotten food items would not break vegan/vegetarian conduct unaligned special levels should inherit alignment from the dungeon Samurai quest was missing several doors Cancelled while polymorphed and Unchanging should provide feedback +stone to flesh on a statue with contents would lose the contents if a + monster was on the same location as the statue Platform- and/or Interface-Specific Fixes diff --git a/src/zap.c b/src/zap.c index 6ddcfca1f..deee40c82 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1600,6 +1600,7 @@ struct obj *obj, *otmp; (void) get_obj_location(obj, &oox, &ooy, 0); if (!animate_statue(obj, oox, ooy, ANIMATE_SPELL, (int *)0)) { + struct obj *item; makecorpse: if (mons[obj->corpsenm].geno & (G_NOCORPSE|G_UNIQ)) { res = 0; @@ -1607,7 +1608,12 @@ makecorpse: if (mons[obj->corpsenm].geno & } /* Unlikely to get here since genociding * monsters also sets the G_NOCORPSE flag. + * Drop the contents, poly_obj looses them. */ + while ((item = obj->cobj) != 0) { + obj_extract_self(item); + place_object(item, obj->ox, obj->oy); + } obj = poly_obj(obj, CORPSE); break; }