E void FDECL(mhitm_ad_legs, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_dgst, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_samu, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
+E void FDECL(mhitm_ad_dise, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E boolean FDECL(do_stone_u, (struct monst *));
E void FDECL(do_stone_mon, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E int FDECL(damageum, (struct monst *, struct attack *, int));
return mhm.hitflags;
break;
case AD_DISE:
- hitmsg(mtmp, mattk);
- if (!diseasemu(mdat))
- mhm.damage = 0;
+ mhitm_ad_dise(mtmp, mattk, &g.youmonst, &mhm);
+ if (mhm.done)
+ return mhm.hitflags;
break;
case AD_FIRE:
mhitm_ad_fire(mtmp, mattk, &g.youmonst, &mhm);
}
}
+void
+mhitm_ad_dise(magr, mattk, mdef, mhm)
+struct monst *magr;
+struct attack *mattk;
+struct monst *mdef;
+struct mhitm_data *mhm;
+{
+ struct permonst *pa = magr->data;
+ struct permonst *pd = mdef->data;
+
+ if (magr == &g.youmonst) {
+ /* uhitm */
+ mhm->damage = 0;
+ } else if (mdef == &g.youmonst) {
+ /* mhitu */
+ hitmsg(magr, mattk);
+ if (!diseasemu(pa))
+ mhm->damage = 0;
+ } else {
+ /* mhitm */
+ mhm->damage = 0;
+ }
+}
+
/* Template for monster hits monster for AD_FOO.
- replace "break" with return