decide whether an egg of the indicated monster type is viable; also used to determine whether an egg or tin can be created... */
| 5584 | /* decide whether an egg of the indicated monster type is viable; |
| 5585 | also used to determine whether an egg or tin can be created... */ |
| 5586 | boolean |
| 5587 | dead_species(int m_idx, boolean egg) |
| 5588 | { |
| 5589 | int alt_idx; |
| 5590 | |
| 5591 | /* generic eggs are unhatchable and have corpsenm of NON_PM */ |
| 5592 | if (m_idx < LOW_PM) |
| 5593 | return TRUE; |
| 5594 | /* |
| 5595 | * For monsters with both baby and adult forms, genociding either |
| 5596 | * form kills all eggs of that monster. Monsters with more than |
| 5597 | * two forms (small->large->giant mimics) are more or less ignored; |
| 5598 | * fortunately, none of them have eggs. Species extinction due to |
| 5599 | * overpopulation does not kill eggs. |
| 5600 | */ |
| 5601 | /* assert(ismnum(m_idx)); */ |
| 5602 | alt_idx = egg ? big_to_little(m_idx) : m_idx; |
| 5603 | return (boolean) ((svm.mvitals[m_idx].mvflags & G_GENOD) != 0 |
| 5604 | || (svm.mvitals[alt_idx].mvflags & G_GENOD) != 0); |
| 5605 | } |
| 5606 | |
| 5607 | /* kill off any eggs of genocided monsters */ |
| 5608 | staticfn void |
no test coverage detected