| 3774 | } |
| 3775 | |
| 3776 | void |
| 3777 | mhitm_ad_famn( |
| 3778 | struct monst *magr, |
| 3779 | struct attack *mattk UNUSED, |
| 3780 | struct monst *mdef, struct mhitm_data *mhm) |
| 3781 | { |
| 3782 | struct permonst *pd = mdef->data; |
| 3783 | |
| 3784 | if (magr == &gy.youmonst) { |
| 3785 | /* uhitm; hero can't polymorph into anything with this attack |
| 3786 | so this won't happen; if it could, it would be the same as |
| 3787 | the mhitm case except for messaging */ |
| 3788 | goto mhitm_famn; |
| 3789 | } else if (mdef == &gy.youmonst) { |
| 3790 | /* mhitu */ |
| 3791 | pline_mon(magr, "%s reaches out, and your body shrivels.", |
| 3792 | Monnam(magr)); |
| 3793 | exercise(A_CON, FALSE); |
| 3794 | if (!is_fainted()) |
| 3795 | morehungry(rn1(40, 40)); |
| 3796 | /* plus the normal damage */ |
| 3797 | } else { |
| 3798 | mhitm_famn: |
| 3799 | /* mhitm; it's possible for Famine to hit another monster; |
| 3800 | if target is something that doesn't eat, it won't be harmed; |
| 3801 | otherwise, just inflict the normal damage */ |
| 3802 | if (!(carnivorous(pd) || herbivorous(pd) || metallivorous(pd))) |
| 3803 | mhm->damage = 0; |
| 3804 | } |
| 3805 | } |
| 3806 | |
| 3807 | void |
| 3808 | mhitm_ad_pest( |
no test coverage detected