MCPcopy Create free account
hub / github.com/NetHack/NetHack / use_unpaid_trapobj

Function use_unpaid_trapobj

src/shk.c:6100–6114  ·  view source on GitHub ↗

Shopkeeper bills for use of a land mine or bear trap they own */

Source from the content-addressed store, hash-verified

6098
6099/* Shopkeeper bills for use of a land mine or bear trap they own */
6100void
6101use_unpaid_trapobj(struct obj *otmp, coordxy x, coordxy y)
6102{
6103 if (otmp->unpaid) {
6104 if (!Deaf) {
6105 struct monst *shkp = find_objowner(otmp, x, y);
6106
6107 if (shkp && !muteshk(shkp)) {
6108 SetVoice(shkp, 0, 80, 0);
6109 verbalize("You set it, you buy it!");
6110 }
6111 }
6112 bill_dummy_object(otmp);
6113 }
6114}
6115
6116#undef PAY_BUY
6117#undef PAY_CANT

Callers 1

use_trapFunction · 0.85

Calls 3

find_objownerFunction · 0.85
verbalizeFunction · 0.85
bill_dummy_objectFunction · 0.85

Tested by

no test coverage detected