called in dokick.c when we kick an object that might be in a store */
| 5347 | |
| 5348 | /* called in dokick.c when we kick an object that might be in a store */ |
| 5349 | boolean |
| 5350 | costly_spot(coordxy x, coordxy y) |
| 5351 | { |
| 5352 | struct monst *shkp; |
| 5353 | struct eshk *eshkp; |
| 5354 | |
| 5355 | if (!svl.level.flags.has_shop) |
| 5356 | return FALSE; |
| 5357 | shkp = shop_keeper(*in_rooms(x, y, SHOPBASE)); |
| 5358 | if (!shkp || !inhishop(shkp)) |
| 5359 | return FALSE; |
| 5360 | eshkp = ESHK(shkp); |
| 5361 | return (boolean) (inside_shop(x, y) |
| 5362 | && !(x == eshkp->shk.x && y == eshkp->shk.y)); |
| 5363 | } |
| 5364 | |
| 5365 | /* called by sanity checking when an unpaid or no_charge item is not at a |
| 5366 | costly_spot; it might still be within the boundary of the shop; if so, |
no test coverage detected