Charge hero for making off with shop-owned boulder

Pushing a shop-owned boulder out of the shop wouldn't charge the hero
anything.  Remedy this (and remove the boulder from the bill if the hero
then pushes it back in).  Also tried to handle a couple other uncharged
boulder "theft" scenarios: pushing a boulder into lava or water, into a
trapdoor or hole, or into a level teleporter (various other traps
already charged for the boulder -- it was pretty inconsistent).

I externified onbill() for this, since relying on otmp->unpaid by itself
impossibles if you push a boulder through a gap in a wall between two
adjoining shops.
This commit is contained in:
Michael Meyer
2022-11-19 00:13:13 -08:00
committed by PatR
parent fa0cc01ae7
commit b8472af927
4 changed files with 19 additions and 7 deletions
+1
View File
@@ -2481,6 +2481,7 @@ extern void shopper_financial_report(void);
extern int inhishop(struct monst *);
extern struct monst *shop_keeper(char);
extern boolean tended_shop(struct mkroom *);
struct bill_x *onbill(struct obj *, struct monst *, boolean);
extern boolean is_unpaid(struct obj *);
extern void delete_contents(struct obj *);
extern void obfree(struct obj *, struct obj *);