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.
This commit is contained in:
cohrs
2002-07-08 00:15:27 +00:00
parent e88a6182dd
commit 632e741a52
2 changed files with 8 additions and 0 deletions
+2
View File
@@ -149,6 +149,8 @@ eating various rotten food items would not break vegan/vegetarian conduct
unaligned special levels should inherit alignment from the dungeon unaligned special levels should inherit alignment from the dungeon
Samurai quest was missing several doors Samurai quest was missing several doors
Cancelled while polymorphed and Unchanging should provide feedback 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 Platform- and/or Interface-Specific Fixes
+6
View File
@@ -1600,6 +1600,7 @@ struct obj *obj, *otmp;
(void) get_obj_location(obj, &oox, &ooy, 0); (void) get_obj_location(obj, &oox, &ooy, 0);
if (!animate_statue(obj, oox, ooy, if (!animate_statue(obj, oox, ooy,
ANIMATE_SPELL, (int *)0)) { ANIMATE_SPELL, (int *)0)) {
struct obj *item;
makecorpse: if (mons[obj->corpsenm].geno & makecorpse: if (mons[obj->corpsenm].geno &
(G_NOCORPSE|G_UNIQ)) { (G_NOCORPSE|G_UNIQ)) {
res = 0; res = 0;
@@ -1607,7 +1608,12 @@ makecorpse: if (mons[obj->corpsenm].geno &
} }
/* Unlikely to get here since genociding /* Unlikely to get here since genociding
* monsters also sets the G_NOCORPSE flag. * 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); obj = poly_obj(obj, CORPSE);
break; break;
} }