remove previously applied surcharge from all billed items */
| 1341 | |
| 1342 | /* remove previously applied surcharge from all billed items */ |
| 1343 | staticfn void |
| 1344 | pacify_shk(struct monst *shkp, boolean clear_surcharge) |
| 1345 | { |
| 1346 | NOTANGRY(shkp) = TRUE; /* make peaceful */ |
| 1347 | if (clear_surcharge && ESHK(shkp)->surcharge) { |
| 1348 | struct bill_x *bp = ESHK(shkp)->bill_p; |
| 1349 | int ct = ESHK(shkp)->billct; |
| 1350 | |
| 1351 | ESHK(shkp)->surcharge = FALSE; |
| 1352 | while (ct-- > 0) { |
| 1353 | long reduction = (bp->price + 3L) / 4L; |
| 1354 | bp->price -= reduction; /* undo 33% increase */ |
| 1355 | bp++; |
| 1356 | } |
| 1357 | } |
| 1358 | } |
| 1359 | |
| 1360 | /* add aggravation surcharge to all billed items */ |
| 1361 | staticfn void |
no outgoing calls
no test coverage detected