disease */
| 4590 | |
| 4591 | /* disease */ |
| 4592 | void |
| 4593 | mhitm_ad_dise( |
| 4594 | struct monst *magr, struct attack *mattk, |
| 4595 | struct monst *mdef, struct mhitm_data *mhm) |
| 4596 | { |
| 4597 | struct permonst *pa = magr->data, *pd = mdef->data; |
| 4598 | |
| 4599 | if (magr == &gy.youmonst) { |
| 4600 | /* uhitm; hero can't polymorph into anything with this attack so |
| 4601 | this won't happen; if it could, it would be the same as the |
| 4602 | mhitm case except for messaging */ |
| 4603 | goto mhitm_dise; |
| 4604 | } else if (mdef == &gy.youmonst) { |
| 4605 | /* mhitu */ |
| 4606 | hitmsg(magr, mattk); |
| 4607 | if (!diseasemu(pa)) |
| 4608 | mhm->damage = 0; |
| 4609 | } else { |
| 4610 | mhitm_dise: |
| 4611 | /* mhitm; protected monsters use the same criteria as for poly'd |
| 4612 | hero gaining sick resistance combined with any hero wielding a |
| 4613 | weapon or wearing dragon scales/mail that guards against disease */ |
| 4614 | if (pd->mlet == S_FUNGUS || pd == &mons[PM_GHOUL] |
| 4615 | || defended(mdef, AD_DISE)) |
| 4616 | mhm->damage = 0; |
| 4617 | /* else does ordinary damage */ |
| 4618 | } |
| 4619 | } |
| 4620 | |
| 4621 | /* seduce and also steal item */ |
| 4622 | void |
no test coverage detected