called by sanity checking when an unpaid or no_charge item is not at a costly_spot; it might still be within the boundary of the shop; if so, those flags are still valid */
| 5366 | costly_spot; it might still be within the boundary of the shop; if so, |
| 5367 | those flags are still valid */ |
| 5368 | boolean |
| 5369 | costly_adjacent( |
| 5370 | struct monst *shkp, |
| 5371 | coordxy x, coordxy y) |
| 5372 | { |
| 5373 | struct eshk *eshkp; |
| 5374 | |
| 5375 | if (!shkp || !inhishop(shkp) || !isok(x, y)) |
| 5376 | return FALSE; |
| 5377 | eshkp = ESHK(shkp); |
| 5378 | /* adjacent if <x,y> is a shop wall spot, including door; |
| 5379 | also treat "free spot" one step inside the door as adjacent */ |
| 5380 | return (levl[x][y].edge || (x == eshkp->shk.x && y == eshkp->shk.y)); |
| 5381 | } |
| 5382 | |
| 5383 | /* called by dotalk(sounds.c) when #chatting; returns obj if location |
| 5384 | contains shop goods and shopkeeper is willing & able to speak */ |
no test coverage detected