diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 15246339d..ce1d425e3 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1180,6 +1180,8 @@ hangup in wizard or explore mode would result in answering ESC to "Die?" process was probably killed without anyone knowing why it happened] with OPTIONS=blind (blind from birth), being inflicted with timed blinding yielded "your vision seems to dim for a moment but is normal now" +avoid sanity_check warning if statue in water or lava gets polymorphed into a + boulder; break it into a stack of rocks if that would happen Fixes to 3.7.0-x General Problems Exposed Via git Repository diff --git a/src/zap.c b/src/zap.c index 54d011315..a9f859c2a 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1860,12 +1860,16 @@ poly_obj(struct obj *obj, int id) } } /* old_wornmask */ } else if (obj_location == OBJ_FLOOR) { - if (obj->otyp == BOULDER && otmp->otyp != BOULDER - && !does_block(ox, oy, &levl[ox][oy])) - unblock_point(ox, oy); - else if (obj->otyp != BOULDER && otmp->otyp == BOULDER) - /* (checking does_block() here would be redundant) */ - block_point(ox, oy); + if (obj->otyp == BOULDER && otmp->otyp != BOULDER) { + if (!does_block(ox, oy, &levl[ox][oy])) + unblock_point(ox, oy); + } else if (obj->otyp != BOULDER && otmp->otyp == BOULDER) { + /* leaving boulder in liquid would trigger sanity_check warning */ + if (is_pool_or_lava(ox, oy)) + fracture_rock(otmp); + if (does_block(ox, oy, &levl[ox][oy])) + block_point(ox, oy); + } } /* note: if otmp is gone, billing for it was handled by useup() */