From: nethack.allison Date: Wed, 14 Jun 2006 23:44:16 +0000 (+0000) Subject: throwing and breaking glass wand in shop (trunk only) X-Git-Tag: MOVE2GIT~981 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d8528f7e2f3929d7e05213718c8fc5b18f72fefa;p=nethack throwing and breaking glass wand in shop (trunk only) wrote: > - when in a hardware store, I put a glass wand out of a sack (the glass wand > will cost you 266 zorkmids) and threw it in the shop => shattered into a > thousand pieces BUT if I try to pay, I do not owe the shopkeeper anything !!! > If I break a potion with a /oS, I have to pay ! --- diff --git a/doc/fixes35.0 b/doc/fixes35.0 index f81095323..f7efa6e2e 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -147,6 +147,7 @@ limit recursive calls to spoteffects (poly'd hero fell into water, reverted to human because of it, fell into same water, then crawled out twice) ensure that the punishment ball and chain make it into the save file after being temporarily orphaned from the normal chains in the swallowing code +charge for thrown wand that shatters into a thousand pieces in a shop Platform- and/or Interface-Specific Fixes diff --git a/src/dothrow.c b/src/dothrow.c index 15e30d24a..fae5d3404 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -703,6 +703,10 @@ register boolean broken; if (obj->unpaid) { (void)stolen_value(obj, u.ux, u.uy, (boolean)shkp->mpeaceful, FALSE); + costly_alteration(obj, COST_DSTROY); + /* costly_alteration() probably already called + subfrombill() for the object, but just in case it + didn't, call it again. If it did, this is a NOOP. */ subfrombill(obj, shkp); } obj->no_charge = 1;