diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 0b2e27463..73552e130 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -168,6 +168,7 @@ stop wielding cockatrice corpse which triggered own death followed by life-save format various prompts to avoid "Query truncated" entries in paniclog for inventory display, include cost info on hero-owned containers holding shop goods +shops now claim ownership of items created by using an unpaid horn of plenty Platform- and/or Interface-Specific Fixes diff --git a/src/mkobj.c b/src/mkobj.c index 0786fee26..5eea5b698 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -1826,6 +1826,14 @@ boolean tipping; /* caller emptying entire contents; affects shop handling */ obj->blessed = horn->blessed; obj->cursed = horn->cursed; obj->owt = weight(obj); + /* using a shop's horn of plenty entails a usage fee and also + confers ownership of the created item to the shopkeeper */ + if (carried(horn) ? horn->unpaid : + (costly_spot(u.ux, u.uy) && !horn->no_charge)) + addtobill(obj, FALSE, FALSE, tipping); + /* if it ended up on bill, we don't want "(unpaid, N zorkids)" + being included in its formatted name during next message */ + iflags.suppress_price++; if (!tipping) { obj = hold_another_object(obj, u.uswallow ? "Oops! %s out of your reach!" : @@ -1850,6 +1858,7 @@ boolean tipping; /* caller emptying entire contents; affects shop handling */ dropy(obj); } } + iflags.suppress_price--; if (horn->dknown) makeknown(HORN_OF_PLENTY); } return objcount;