* Returns: * True if monster is presumed to have a sense of smell. * False if monster definitely does not have a sense of smell. * * Do not base this on presence of a head or nose, since many * creatures sense smells other ways (feelers, forked-tongues, etc). * We're assuming all insects can smell at a distance too. */
| 1504 | * We're assuming all insects can smell at a distance too. |
| 1505 | */ |
| 1506 | boolean |
| 1507 | olfaction(struct permonst *mdat) |
| 1508 | { |
| 1509 | if (is_golem(mdat) |
| 1510 | || mdat->mlet == S_EYE /* spheres */ |
| 1511 | || mdat->mlet == S_JELLY || mdat->mlet == S_PUDDING |
| 1512 | || mdat->mlet == S_BLOB || mdat->mlet == S_VORTEX |
| 1513 | || mdat->mlet == S_ELEMENTAL |
| 1514 | || mdat->mlet == S_FUNGUS /* mushrooms and fungi */ |
| 1515 | || mdat->mlet == S_LIGHT) |
| 1516 | return FALSE; |
| 1517 | return TRUE; |
| 1518 | } |
| 1519 | |
| 1520 | /* Convert attack damage type AD_foo to M_SEEN_bar */ |
| 1521 | unsigned long |
no outgoing calls
no test coverage detected