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

Function rile_shk

src/shk.c:1361–1377  ·  view source on GitHub ↗

add aggravation surcharge to all billed items */

Source from the content-addressed store, hash-verified

1359
1360/* add aggravation surcharge to all billed items */
1361staticfn void
1362rile_shk(struct monst *shkp)
1363{
1364 NOTANGRY(shkp) = FALSE; /* make angry */
1365 if (!ESHK(shkp)->surcharge) {
1366 long surcharge;
1367 struct bill_x *bp = ESHK(shkp)->bill_p;
1368 int ct = ESHK(shkp)->billct;
1369
1370 ESHK(shkp)->surcharge = TRUE;
1371 while (ct-- > 0) {
1372 surcharge = (bp->price + 2L) / 3L;
1373 bp->price += surcharge;
1374 bp++;
1375 }
1376 }
1377}
1378
1379/* wakeup and/or unparalyze shopkeeper */
1380staticfn void

Callers 5

next_shkpFunction · 0.85
shop_keeperFunction · 0.85
hot_pursuitFunction · 0.85
shk_moveFunction · 0.85
shopdigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected