using unpaid horn of plenty (trunk only)
Make objects created by applying or #tipping a horn of plenty which
is owned by a shop also start out being owned by the shop. That's in
addition to the usage charge for using an unpaid item.
I think wishes conferred by unpaid objects, or by entities released
from unpaid objects, should probably work that way too, but have left
that alone.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user