| 1824 | } |
| 1825 | |
| 1826 | void |
| 1827 | mpickgold(struct monst *mtmp) |
| 1828 | { |
| 1829 | struct obj *gold; |
| 1830 | int mat_idx; |
| 1831 | |
| 1832 | if ((gold = g_at(mtmp->mx, mtmp->my)) != 0) { |
| 1833 | mat_idx = objects[gold->otyp].oc_material; |
| 1834 | obj_extract_self(gold); |
| 1835 | add_to_minv(mtmp, gold); |
| 1836 | if (cansee(mtmp->mx, mtmp->my)) { |
| 1837 | if (flags.verbose && !mtmp->isgd) |
| 1838 | pline_mon(mtmp, "%s picks up some %s.", Monnam(mtmp), |
| 1839 | mat_idx == GOLD ? "gold" : "money"); |
| 1840 | newsym(mtmp->mx, mtmp->my); |
| 1841 | } |
| 1842 | } |
| 1843 | } |
| 1844 | |
| 1845 | /* monster picks up one item stack from the map location they are at */ |
| 1846 | boolean |
no test coverage detected