| 1724 | |
| 1725 | /* getobj callback for object to be invoked */ |
| 1726 | staticfn int |
| 1727 | invoke_ok(struct obj *obj) |
| 1728 | { |
| 1729 | if (!obj) |
| 1730 | return GETOBJ_EXCLUDE; |
| 1731 | |
| 1732 | /* artifacts and other special items */ |
| 1733 | if (obj->oartifact || objects[obj->otyp].oc_unique |
| 1734 | || (obj->otyp == FAKE_AMULET_OF_YENDOR && !obj->known)) |
| 1735 | return GETOBJ_SUGGEST; |
| 1736 | |
| 1737 | /* synonym for apply, though actually invoking it will do different things |
| 1738 | * depending if it's a regular crystal ball, an artifact one that has an |
| 1739 | * invoke power, and a (theoretical) artifact one that doesn't have an |
| 1740 | * invoke power */ |
| 1741 | if (obj->otyp == CRYSTAL_BALL) |
| 1742 | return GETOBJ_SUGGEST; |
| 1743 | |
| 1744 | return GETOBJ_EXCLUDE; |
| 1745 | } |
| 1746 | |
| 1747 | /* the #invoke command */ |
| 1748 | int |
nothing calls this directly
no outgoing calls
no test coverage detected