used from invent.c */
| 1784 | |
| 1785 | /* used from invent.c */ |
| 1786 | boolean |
| 1787 | not_fully_identified(struct obj *otmp) |
| 1788 | { |
| 1789 | /* gold doesn't have any interesting attributes [yet?] */ |
| 1790 | if (otmp->oclass == COIN_CLASS) |
| 1791 | return FALSE; /* always fully ID'd */ |
| 1792 | /* check fundamental ID hallmarks first */ |
| 1793 | if (!otmp->known || !otmp->dknown |
| 1794 | #ifdef MAIL_STRUCTURES |
| 1795 | || (!otmp->bknown && otmp->otyp != SCR_MAIL) |
| 1796 | #else |
| 1797 | || !otmp->bknown |
| 1798 | #endif |
| 1799 | || !objects[otmp->otyp].oc_name_known) |
| 1800 | return TRUE; |
| 1801 | if ((!otmp->cknown && (Is_container(otmp) || otmp->otyp == STATUE)) |
| 1802 | || (!otmp->lknown && Is_box(otmp))) |
| 1803 | return TRUE; |
| 1804 | if (otmp->oartifact && undiscovered_artifact(otmp->oartifact)) |
| 1805 | return TRUE; |
| 1806 | /* otmp->rknown is the only item of interest if we reach here */ |
| 1807 | /* |
| 1808 | * Note: if a revision ever allows scrolls to become fireproof or |
| 1809 | * rings to become shockproof, this checking will need to be revised. |
| 1810 | * `rknown' ID only matters if xname() will provide the info about it. |
| 1811 | */ |
| 1812 | if (otmp->rknown |
| 1813 | || (otmp->oclass != ARMOR_CLASS && otmp->oclass != WEAPON_CLASS |
| 1814 | && !is_weptool(otmp) /* (redundant) */ |
| 1815 | && otmp->oclass != BALL_CLASS)) /* (useless) */ |
| 1816 | return FALSE; |
| 1817 | else /* lack of `rknown' only matters for vulnerable objects */ |
| 1818 | return (boolean) is_damageable(otmp); |
| 1819 | } |
| 1820 | |
| 1821 | /* format a corpse name (xname() omits monster type; doname() calls us); |
| 1822 | eatcorpse() also uses us for death reason when eating tainted glob */ |
no test coverage detected