* Determine if the given monster number can be hatched from an egg. * Return the monster number to use as the egg's corpsenm. Return * NON_PM if the given monster can't be hatched. */
| 5543 | * NON_PM if the given monster can't be hatched. |
| 5544 | */ |
| 5545 | int |
| 5546 | can_be_hatched(int mnum) |
| 5547 | { |
| 5548 | /* ranger quest nemesis has the oviparous bit set, making it |
| 5549 | be possible to wish for eggs of that unique monster; turn |
| 5550 | such into ordinary eggs rather than forbidding them outright */ |
| 5551 | if (mnum == PM_SCORPIUS) |
| 5552 | mnum = PM_SCORPION; |
| 5553 | |
| 5554 | mnum = little_to_big(mnum); |
| 5555 | /* |
| 5556 | * Queen bees lay killer bee eggs (usually), but killer bees don't |
| 5557 | * grow into queen bees. Ditto for [winged-]gargoyles. |
| 5558 | */ |
| 5559 | if (mnum == PM_KILLER_BEE || mnum == PM_GARGOYLE |
| 5560 | || (lays_eggs(&mons[mnum]) |
| 5561 | && (BREEDER_EGG |
| 5562 | || (mnum != PM_QUEEN_BEE && mnum != PM_WINGED_GARGOYLE)))) |
| 5563 | return mnum; |
| 5564 | return NON_PM; |
| 5565 | } |
| 5566 | |
| 5567 | /* type of egg laid by #sit; usually matches parent */ |
| 5568 | int |
no test coverage detected